gnulib-tool.py: Fix an undefined function name.
[gnulib.git] / ChangeLog
blob96b29b7fc415ba5844361b02e077c01599df8d61
1 2024-05-03  Collin Funk  <collin.funk1@gmail.com>
3         gnulib-tool.py: Fix an undefined function name.
4         * pygnulib/main.py (main_with_exception_handling): Use the tempfile
5         module prefix when calling mkdtemp(). Use the 'glpy' prefix for the
6         temporary directory that exists for the entirety of the program.
8 2024-05-03  Simon Josefsson  <simon@josefsson.org>
10         maint.mk: Don't fail on ~/.indent.pro, reported by Collin Funk.
11         * top/maint.mk (indent_args): Use --ignore-profile.
13 2024-05-02  Collin Funk  <collin.funk1@gmail.com>
15         gnulib-tool.sh: Fix program name in error message.
16         * gnulib-tool.sh: Use 'gnulib-tool' instead of 'gnulib' as the program
17         name in the error message.
19 2024-05-02  Collin Funk  <collin.funk1@gmail.com>
21         DEPENDENCIES: Add Cygwin as supported platform.
22         * DEPENDENCIES: Mention Cygwin as a supported platform for building
23         Windows binaries.
25 2024-05-02  Bruno Haible  <bruno@clisp.org>
27         doc: Add appendix about Gnulib history.
28         * doc/gnulib-history.texi: New file.
29         * doc/gnulib.texi: Include it.
31 2024-05-02  Collin Funk  <collin.funk1@gmail.com>
33         gnulib-tool.py: Don't leave temporary directories on exit.
34         * pygnulib/main.py (main_with_exception_handling): Use
35         tempfile.TemporaryDirectory as a context manager so it is removed before
36         the program exits.
37         (main): Expect a temporary directory to be passed as an argument.
38         * pygnulib/GLConfig.py (GLConfig.__init__): Accept an optional temporary
39         directory parameter instead of creating one.
40         * pygnulib/GLImport.py (GLImport.__init__): Don't remove the cache's
41         temporary directory since it doesn't create one anymore.
42         (GLImport.execute): Don't remove the temporary directory explicitly. It
43         is handled by the usage of a context manager.
44         * pygnulib/GLTestDir.py (GLTestDir.execute, GLMegaTestDir.execute):
45         Likewise.
47 2024-05-01  Collin Funk  <collin.funk1@gmail.com>
49         gnulib-tool.py: Quote file names passed to 'patch'.
50         * pygnulib/GLTestDir.py (_patch_test_driver): Import shlex and cleanup
51         unused imports. Use shlex.quote() on the file names passed to 'patch'.
52         * pygnulib/GLFileSystem.py (GLFileSystem.lookup): Likewise. Perform
53         redirection using sp.call() arguments instead of using the shell.
55 2024-05-01  Bruno Haible  <bruno@clisp.org>
57         readutmp, boot-time: Improve for some Cygwin installations.
58         Reported by Ken Brown <kbrown@cornell.edu> in
59         <https://lists.gnu.org/archive/html/bug-gnulib/2024-05/msg00008.html>.
60         * lib/boot-time-aux.h (get_windows_boot_time): Use /proc/cygdrive/
61         instead of /cygdrive/.
63 2024-05-01  Bruno Haible  <bruno@clisp.org>
65         stddef: A better workaround against GCC bug 114870.
66         * lib/stddef.in.h: If STDDEF_NOT_IDEMPOTENT is 1, disable the special
67         invocation convention.
68         * m4/stddef_h.m4 (gl_STDDEF_H): Set STDDEF_NOT_IDEMPOTENT.
69         (gl_STDDEF_H_DEFAULTS): Initialize STDDEF_NOT_IDEMPOTENT.
70         * modules/stddef (Makefile.am): Substitute STDDEF_NOT_IDEMPOTENT.
72 2024-05-01  Bruno Haible  <bruno@clisp.org>
74         stddef: Fix <stddef.h> behaviour on Cygwin (regression 2024-04-27).
75         Reported by Markus Mützel <markus.muetzel@gmx.de> in
76         <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00522.html>.
77         * lib/stddef.in.h: Don't test _@GUARD_PREFIX@_STDDEF_H. Fix comments.
79 2024-05-01  Bruno Haible  <bruno@clisp.org>
81         doc: Reference a gcc bug.
82         * doc/posix-headers/stddef.texi: Reference a gcc bug.
84 2024-05-01  Bruno Haible  <bruno@clisp.org>
86         sprintf-posix, snprintf-posix tests: Add comment.
87         Suggested by Collin Funk in
88         <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00546.html>.
89         * tests/test-sprintf-posix.h (test_function): Add comment about known
90         failures.
92 2024-05-01  Collin Funk  <collin.funk1@gmail.com>
94         gnulib-tool.py: Fix mistake in previous commit.
95         * pygnulib/GLModuleSystem.py (GLModuleSystem.exists)
96         (GLModuleSystem.find): Rename 'module' argument to 'module_name' so it
97         is clear they are not a GLModule object. Treat them as such.
99 2024-05-01  Collin Funk  <collin.funk1@gmail.com>
101         gnulib-tool.py: Use the GLModule's name variable directly.
102         * pygnulib/GLModuleSystem.py (GLModule.getName): Remove function.
103         (GLModule.__str__, GLModule.__repr__, GLModule.isNonTests)
104         (GLModule.repeatModuleInTests, GLModule.getDependenciesRecursively)
105         (GLModule.getShellFunc, GLModule.getShellVar)
106         (GLModule.getConditionalName, GLModule.getApplicability)
107         (GLModule.getDependencies, GLModule.getAutomakeSnippet_Unconditional)
108         (GLModule.getLicense, GLModuleSystem.find)
109         (GLModuleTable.transitive_closure): Use the GLModule's name instance
110         variable instead of using str() or removed getName() function.
111         * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippet)
112         (GLEmiter.preEarlyMacros, GLEmiter.lib_Makefile_am)
113         (GLEmiter.tests_Makefile_am): Likewise.
114         * pygnulib/GLImport.py (GLImport.gnulib_comp, GLImport.prepare):
115         Likewise.
116         * pygnulib/GLTestDir.py (GLTestDir.execute, GLMegaTestDir.execute):
117         Likewise.
119 2024-04-30  Paul Eggert  <eggert@cs.ucla.edu>
121         intprops: document fix for GCC bug 68193
122         * lib/intprops-internal.h (_GL__GENERIC_BOGUS):
123         GCC bug 68193 is fixed in GCC 14.  This is just for documentation,
124         as _GL__GENERIC_BOGUS is not consulted in GCC 14.
126 2024-04-30  Bruno Haible  <bruno@clisp.org>
128         *printf: Don't invoke gl_PRINTF_DIRECTIVE_N when it's not needed.
129         * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_IS_POSIX): Don't require
130         gl_PRINTF_DIRECTIVE_N if gl_PRINTF_SUPPORT_N_DIRECTIVE is not defined.
131         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_IS_POSIX): Likewise.
132         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_IS_POSIX): Likewise.
133         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_IS_POSIX): Likewise.
134         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_IS_POSIX): Likewise.
135         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_IS_POSIX): Likewise.
136         * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_IS_POSIX): Likewise.
137         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_IS_POSIX): Likewise.
138         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_IS_POSIX): Likewise.
139         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_IS_POSIX): Likewise.
140         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_IS_POSIX): Likewise.
142 2024-04-30  Bruno Haible  <bruno@clisp.org>
144         *printf: Avoid a dialog during 'configure' with MSVC in debug mode.
145         Suggested by Paul Harris <harris.pc@gmail.com> in
146         <https://lists.gnu.org/archive/html/bug-gettext/2024-04/msg00005.html>.
147         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_N): In the test program, include
148         <crtdbg.h> and disable the MSVC reporting for assertion failures.
150 2024-04-30  Collin Funk  <collin.funk1@gmail.com>
152         gnulib-tool.py: Remove remaining unused instance variables.
153         * pygnulib/GLModuleSystem.py (GLModule.__init__)
154         (GLModuleTable.__init__): Remove the unused GLFileSystem variable. These
155         classes perform lookups with a GLModuleSystem.
156         * pygnulib/GLTestDir.py (GLTestDir.__init__): Remove the unused
157         GLFileAssistant variable. The transformations it performs are not needed
158         in testdirs.
160 2024-04-29  Collin Funk  <collin.funk1@gmail.com>
162         gnulib-tool.py: Add type hints to classes.
163         * pygnulib/*.py: Add type hints for all instance and class variables.
164         * pygnulib/GLMakefileTable.py (GLMakefileTable.__getitem__): Fix return
165         type hint since the dictionary has str values.
167 2024-04-29  Collin Funk  <collin.funk1@gmail.com>
169         gnulib-tool.py: Emit libtests in testdirs generated Makefile.am.
170         Reported by Bruno Haible in
171         <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00463.html>.
172         * pygnulib/GLTestDir.py (GLTestDir.execute): Modify the GLEmiter's
173         config variable instead of the GLTestDir's so that it can be accessed
174         when emitting the Makefile.am.
176 2024-04-28  Collin Funk  <collin.funk1@gmail.com>
178         doc: Update macro list in gnulib-cache.m4 documentation.
179         * doc/gnulib-tool.texi (Modified imports): Add missing macros from the
180         sed invocation in func_import of gnulib-tool.sh.
182 2024-04-28  Collin Funk  <collin.funk1@gmail.com>
184         doc: Mention AC_CONFIG_MACRO_DIRS in configure.ac.
185         Document the following gnulib-tool change:
186         2021-12-19  Bruno Haible  <bruno@clisp.org>
187         gnulib-tool: Don't insist on ACLOCAL_AMFLAGS.
188         * doc/gnulib-tool.texi (Initial import): Update the example gnulib-tool
189         invocation. Document the use of AC_CONFIG_MACRO_DIRS as an alternative
190         to ACLOCAL_AMFLAGS.
192 2024-04-28  Bruno Haible  <bruno@clisp.org>
194         bootstrap: Support checking out a recent GNULIB_REVISION, part 2.
195         Reported by Markus Mützel <markus.muetzel@gmx.de> in
196         <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00507.html>.
197         * top/bootstrap-funclib.sh (prepare_GNULIB_SRCDIR): If using a submodule
198         and the 'git checkout' command fails, fetch the newer commits and then
199         retry it.
200         * build-aux/bootstrap: Regenerated.
202 2024-04-27  Collin Funk  <collin.funk1@gmail.com>
204         gnulib-tool.py: Preserve module ordering in --create-megatestdir.
205         * pygnulib/GLTestDir.py (GLMegaTestDir.execute): Use a separate set to
206         remove duplicates from the original list without sorting.
208 2024-04-27  Bruno Haible  <bruno@clisp.org>
210         gnulib-tool: Simplify the Python version test.
211         Suggested by Pádraig Brady in
212         <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00469.html>.
213         * gnulib-tool: Use Python's sys.version_info, not --version.
214         * gnulib-tool.py: Use the same version test here. Use --version only to
215         produce a specific error message.
217 2024-04-27  Bruno Haible  <bruno@clisp.org>
219         fcntl-h, stdio, unistd: Ensure off64_t is defined on all platforms.
220         * lib/fcntl.in.h: Update comment regarding off64_t.
221         * lib/stdio.in.h: Likewise.
222         * lib/unistd.in.h: Likewise.
223         * tests/test-fcntl-h.c: Verify that off64_t is defined.
224         * tests/test-stdio.c: Likewise.
225         * tests/test-unistd.c: Likewise.
226         * doc/posix-headers/fcntl.texi: Mention the off64_t workaround.
227         * doc/posix-headers/stdio.texi: Likewise.
228         * doc/posix-headers/unistd.texi: Likewise.
229         * doc/posix-headers/aio.texi: Mention the problem with off64_t.
231         sys_types: Ensure off64_t is defined on all platforms.
232         * m4/off64_t.m4: New file.
233         * m4/sys_types_h.m4 (gl_SYS_TYPES_H): Require gl_TYPE_OFF64_T.
234         * lib/sys_types.in.h (off64_t): New type.
235         (GNULIB_defined_off64_t): New macro.
236         * modules/sys_types (Files): Add m4/off64_t.m4.
237         (configure.ac-early): Require AC_USE_SYSTEM_EXTENSIONS.
238         (Makefile.am): Substitute HAVE_OFF64_T.
239         * tests/test-sys_types.c: Verify that off64_t is defined.
240         * doc/posix-headers/sys_types.texi: Mention the off64_t workaround.
242 2024-04-27  Paul Eggert  <eggert@cs.ucla.edu>
244         nullptr: work around GCC nullptr sentinel bug
245         * m4/nullptr.m4 (gl_NULLPTR): Work around GCC bug 114780.
247         stddef: work around GCC stddef.h bugs
248         * lib/stddef.in.h: Do nothing if _@GUARD_PREFIX@_STDDEF_H is
249         defined, as stddef.h has already been included.  This works
250         around GCC bug 114870.
251         (_GCC_NULLPTR_T): Define if needed to work around GCC bug 114869.
252         * m4/stddef_h.m4 (gl_STDDEF_H, gl_STDDEF_H_DEFAULTS):
253         * modules/stddef (stddef.h):
254         Detect the two bugs.
255         * doc/posix-headers/stddef.texi: Mention one of the two bugs.
257 2024-04-27  Bruno Haible  <bruno@clisp.org>
259         bootstrap: Support checking out a recent GNULIB_REVISION.
260         Reported by Markus Mützel <markus.muetzel@gmx.de> in
261         <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00462.html>.
262         * top/bootstrap-funclib.sh (prepare_GNULIB_SRCDIR): If the
263         'git checkout' command fails, fetch the newer commits and then retry it.
264         * build-aux/bootstrap: Regenerated.
266 2024-04-27  Bruno Haible  <bruno@clisp.org>
268         ctime, localtime, tzset, wcsftime: Fix env access (regr. 2024-02-09).
269         Reported by Markus Mützel <markus.muetzel@gmx.de> in
270         <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00457.html>.
271         * lib/ctime.c (rpl_ctime): Fix logic of environment traversal.
272         * lib/localtime.c (rpl_localtime): Likewise.
273         * lib/tzset.c (rpl_tzset): Likewise.
274         * lib/wcsftime.c (rpl_wcsftime): Likewise.
276 2024-04-26  Bruno Haible  <bruno@clisp.org>
278         login_tty tests: Avoid gcc warnings.
279         * tests/test-login_tty.c: Include ignore-value.h.
280         (main): Ignore the results of the freopen calls.
281         * modules/login_tty-tests (Depends-on): Add ignore-value.
283 2024-04-26  Bruno Haible  <bruno@clisp.org>
285         Document prerequisite for gnulib-tool.
286         Suggested by Collin Funk in
287         <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00450.html>.
288         * DEPENDENCIES: Add Python 3.7 as "recommended".
290 2024-04-26  Bruno Haible  <bruno@clisp.org>
292         gnulib-tool: Use the Python implementation by default.
293         * gnulib-tool: If GNULIB_TOOL_IMPL is not set: Use the Python
294         implementation if a suitable 'python3' program is found in $PATH;
295         otherwise print a warning and use the shell implementation.
297 2024-04-26  Collin Funk  <collin.funk1@gmail.com>
299         gnulib-tool.py: Remove some unused instance variables.
300         * pygnulib/GLTestDir.py (GLMegaTestDir.__init__): Don't define instance
301         variables that are never used.
303 2024-04-25  Collin Funk  <collin.funk1@gmail.com>
305         gnulib-tool.py: Reduce code duplication in file name transformations.
306         * pygnulib/functions.py: New file for shared functions between modules.
307         Add a function based on functions removed from GLImport and GLTestDir.
308         Accepts a single file name instead of a list.
309         * pygnulib/GLImport.py (GLImport.prepare): Use the new function.
310         (GLImport.rewrite_new_files, GLImport.rewrite_old_files): Remove
311         functions.
312         * pygnulib/GLTestDir.py (GLTestDir.execute): Use the new function.
313         (GLTestDir.rewrite_files): Remove functions.
314         * pygnulib/main.py (main): Remove unused function import. Use the new
315         function.
317 2024-04-25  Bruno Haible  <bruno@clisp.org>
319         doc: Remove documentation of IRIX as supported platform.
320         * doc/posix-headers/netdb.texi: Don't mention IRIX specific workarounds.
321         * doc/posix-headers/pthread.texi: Likewise.
322         * doc/posix-headers/sys_socket.texi: Likewise.
323         * doc/posix-headers/wctype.texi: Likewise.
324         * doc/posix-functions/btowc.texi: Likewise.
325         * doc/posix-functions/cbrtf.texi: Likewise.
326         * doc/posix-functions/cbrtl.texi: Likewise.
327         * doc/posix-functions/copysignf.texi: Likewise.
328         * doc/posix-functions/exp2.texi: Likewise.
329         * doc/posix-functions/exp2f.texi: Likewise.
330         * doc/posix-functions/exp2l.texi: Likewise.
331         * doc/posix-functions/expm1f.texi: Likewise.
332         * doc/posix-functions/expm1l.texi: Likewise.
333         * doc/posix-functions/fabsl.texi: Likewise.
334         * doc/posix-functions/isnan.texi: Likewise.
335         * doc/posix-functions/iswblank.texi: Likewise.
336         * doc/posix-functions/link.texi: Likewise.
337         * doc/posix-functions/log10l.texi: Likewise.
338         * doc/posix-functions/log1pf.texi: Likewise.
339         * doc/posix-functions/log2.texi: Likewise.
340         * doc/posix-functions/log2f.texi: Likewise.
341         * doc/posix-functions/log2l.texi: Likewise.
342         * doc/posix-functions/lseek.texi: Likewise.
343         * doc/posix-functions/nl_langinfo.texi: Likewise.
344         * doc/posix-functions/pthread_sigmask.texi: Likewise.
345         * doc/posix-functions/remainderf.texi: Likewise.
346         * doc/posix-functions/remainderl.texi: Likewise.
347         * doc/posix-functions/rintf.texi: Likewise.
348         * doc/posix-functions/sigaltstack.texi: Likewise.
349         * doc/posix-functions/strtod.texi: Likewise.
350         * doc/posix-functions/strtold.texi: Likewise.
351         * doc/posix-functions/vscanf.texi: Likewise.
352         * doc/posix-functions/wctob.texi: Likewise.
353         * doc/**/*.texi: Update.
355 2024-04-25  Collin Funk  <collin.funk1@gmail.com>
357         HACKING: Fix a typo.
358         * HACKING: Add missing 't' to platforms.
360 2024-04-25  Bruno Haible  <bruno@clisp.org>
362         relocatable-lib-lgpl: Allow unconditional use of set_relocation_prefix.
363         Reported by Reuben Thomas <rrt@sc3d.org> in
364         <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00384.html>.
365         * lib/relocatable.h (set_relocation_prefix): Define in a dummy way if
366         ENABLE_RELOCATABLE is not defined.
368 2024-04-25  Bruno Haible  <bruno@clisp.org>
370         doc: Update target platforms list.
371         * doc/gnulib-intro.texi (Supported Platforms): Mention FreeBSD 14
372         instead of 13. Mention AIX 7.3 instead of 7.2. Mention Cygwin 3.4.
373         Don't mention IRIX.
374         (Formerly Supported Platforms): Add IRIX.
376 2024-04-25  Bruno Haible  <bruno@clisp.org>
378         largefile: Update documentation.
379         * doc/largefile.texi: Remove mention of IRIX.
381 2024-04-24  Collin Funk  <collin.funk1@gmail.com>
383         gnulib-tool.py: Add a new GLFileTable class.
384         * pygnulib/GLFileTable.py: New file. Define the GLFileTable class with
385         five attributes which can be individually typed.
386         * pygnulib/GLTestDir.py (GLTestDir.execute): Use the GLFileTable class.
387         * pygnulib/GLImport.py (GLImport.gnulib_comp, GLImport.prepare)
388         (GLImport.execute): Likewise. Update type hints and doc strings.
390 2024-04-24  Paul Eggert  <eggert@cs.ucla.edu>
392         largefile: port to C++
393         This patch is mostly taken from Autoconf master.
394         * m4/largefile.m4 (AC_SYS_YEAR2038_RECOMMENDED):
395         Undefine if unpatched Autoconf 2.72 or earlier, so that
396         later code will redefine it.
397         The remaining part of this patch is from Autoconf master.
398         (_AC_SYS_YEAR2038_PROBE, _AC_SYS_LARGEFILE_PROBE):
399         Put "$CCFLAGS" in diagnostics, not "$CC".
400         (_AC_SYS_LARGEFILE_OPTIONS): Omit -n32.
401         (AC_SYS_LARGEFILE_PROBE): Fiddle with CPPFLAGS, not CC.
402         Do not worry about -n32.
404         c32srtombs,mbsrtoc32s,mbsrtowcs,wcsrtombs: pacify GCC 14
405         * lib/c32srtombs-state.c (_gl_c32srtombs_state):
406         * lib/mbsrtoc32s-state.c (_gl_mbsrtoc32s_state):
407         * lib/mbsrtowcs-state.c (_gl_mbsrtowcs_state):
408         * lib/wcsrtombs-state.c (_gl_wcsrtombs_state):
409         Add an extern decl for a “private” extern symbol, to pacify GCC
410         14’s -Wmissing-variable-declarations option.
412 2024-04-24  Bruno Haible  <bruno@clisp.org>
414         physmem: Port better to Linux.
415         * lib/physmem.h (physmem_total, physmem_available): Add documentation.
416         (physmem_claimable): New declaration.
417         * lib/physmem.c: Include <fcntl.h>, <stdio.h>, full-read.h.
418         (get_meminfo): New function.
419         (physmem_claimable): Renamed from physmem_available. Add logic for
420         aggressivity > 0.
421         (physmem_available): New function.
422         * modules/physmem (Depends-on): Add full-read.
424 2024-04-24  Bruno Haible  <bruno@clisp.org>
426         Fix warnings triggered by including <config.h> twice (regr. 2024-04-19).
427         Reported by Collin Funk in
428         <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00398.html>.
429         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use AH_VERBATIM instead
430         of AC_DEFINE.
432 2024-04-23  Paul Eggert  <eggert@cs.ucla.edu>
434         manywarnings: update C warnings for GCC 14
435         Adjust for C programs compiled by GCC 14.
436         (A C++ expert still needs to look at manywarnings-c++.m4.)
437         * build-aux/gcc-warning.spec: Add warnings introduced in GCC 14.
438         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC):
439         Add -Wflex-array-member-not-at-end, -Wmissing-variable-declarations.
441 2024-04-23  Bruno Haible  <bruno@clisp.org>
443         Update HACKING.
444         Suggested by Paul Eggert in
445         <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00388.html>.
446         * HACKING: Mention an alternative to gitk.
448 2024-04-23  Collin Funk  <collin.funk1@gmail.com>
450         gnulib-tool.py: Make better use of imports.
451         * pygnulib/*.py: Import functions from constants.py directly instead of
452         assigning them to module-specific variable. Keep the module prefix for
453         standard library functions.
455 2024-04-23  Bruno Haible  <bruno@clisp.org>
457         Update HACKING.
458         * HACKING: Mention the linear git history, how to work with ChangeLog,
459         how to run a testdir, where to find the gnulib-tool tests, and where are
460         the continuous integrations.
462 2024-04-22  Bruno Haible  <bruno@clisp.org>
464         gnulib-tool: Fix trouble caused by Python's bytecode cache.
465         Reported by Paul Eggert in
466         <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00367.html>.
467         * gnulib-tool: In sh+py mode, ignore the __pycache__ directory during
468         comparison.
470 2024-04-22  Bruno Haible  <bruno@clisp.org>
472         gnulib-tool.py: Fix trouble caused by Python's bytecode cache.
473         Reported by Paul Eggert in
474         <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00367.html>.
475         * gnulib-tool.py: Set PYTHONPYCACHEPREFIX, so as to avoid creating a
476         __pycache__ directory in the developer's gnulib checkout (only effective
477         with Python ≥ 3.8).
479 2024-04-21  Collin Funk  <collin.funk1@gmail.com>
481         gnulib-tool.py: Make temporary directories recognizable.
482         * pygnulib/GLConfig.py (GLConfig.__init__): Pass the 'glpy' prefix to
483         mkdtemp.
485 2024-04-21  Bruno Haible  <bruno@clisp.org>
487         gnulib-tool.sh: In --create-testdir, just warn about a bad module name.
488         * gnulib-tool.sh (func_create_testdir): Validate the modules list.
490 2024-04-21  Collin Funk  <collin.funk1@gmail.com>
492         gnulib-tool.py: Don't fail when given a bad module name.
493         * pygnulib/GLTestDir.py (GLTestDir.execute): Don't include None in the
494         list of GLModule objects.
495         * pygnulib/GLModuleSystem.py (GLModuleSystem.find): Document the meaning
496         of the None return.
498 2024-04-21  Collin Funk  <collin.funk1@gmail.com>
500         gnulib-tool.py: Update type hints and docstring.
501         * pygnulib/GLImport.py (GLImport.execute): Update transformer type hint
502         to reflect change from sed expressions to re.sub() arguments.
503         (GLImport.prepare): Likewise. Don't reference sed or license
504         replacements in docstring.
506 2024-04-20  Bruno Haible  <bruno@clisp.org>
508         signed-snan: Relicense under LGPLv2+.
509         * modules/signed-snan (License): Change to LGPLv2+.
510         * lib/signed-snan.h: Update license notice.
512         snan: Relicense under LGPLv2+.
513         * modules/snan (License): Change to LGPLv2+.
514         * lib/snan.h: Update license notice.
516         signed-nan: Relicense under LGPLv2+.
517         * modules/signed-nan (License): Change to LGPLv2+.
518         * lib/signed-nan.h: Update license notice.
520         nan: Relicense under LGPLv2+.
521         Eric Blake's approval is in
522         <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00290.html>.
523         Paul Eggert's approval is in
524         <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00324.html>.
525         Daniel Richard G.'s approval was given in private email.
526         * modules/nan (License): Change to LGPLv2+.
527         * lib/nan.h: Update license notice.
529 2024-04-20  Bruno Haible  <bruno@clisp.org>
531         gnulib-tool: In sh+py mode, don't fail because of dangling symlinks.
532         Reported by Paul Eggert in
533         <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00318.html>
534         and Pádraig Brady in
535         <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00321.html>.
536         * gnulib-tool: In sh+py mode, use diff option '--no-dereference' if
537         available.
539 2024-04-20  Collin Funk  <collin.funk1@gmail.com>
541         gnulib-tool.py: Remove duplicate per-module definitions.
542         * pygnulib/constants.py: Remove duplicate __authors__, __license__, and
543         __copyright__ definitions.
544         * pygnulib/GLInfo.py: Use the value of __authors__ and __copyright__
545         from __init__.py for output.
546         * pygnulib/*.py: Remove unused references to the constant.py
547         definitions.
549 2024-04-20  Bruno Haible  <bruno@clisp.org>
551         gnulib-tool.py: Fix a bug in removed / added files handling.
552         * pygnulib/GLImport.py (GLImport.execute): When looking for files that
553         are in both filetable['old'] and filetable['new'], consider only the
554         first element of each tuple, not the entire tuple.
556 2024-04-20  Bruno Haible  <bruno@clisp.org>
558         gnulib-tool.py: Sort file lists case-sensitively.
559         * pygnulib/GLImport.py (GLImport.prepare, GLImport.execute): Omit
560         .lower() call in sort key computation.
562 2024-04-20  Bruno Haible  <bruno@clisp.org>
564         gnulib-tool.py: Fix output of --create-megatestdir.
565         * pygnulib/GLTestDir.py (GLMegaTestDir.execute): Remove stray backslash
566         from output.
568 2024-04-19  Bruno Haible  <bruno@clisp.org>
570         wcsstr: Update doc.
571         * doc/posix-functions/wcsstr.texi: Update glibc version.
573 2024-04-19  Bruno Haible  <bruno@clisp.org>
575         getlogin_r tests: Fix compilation error on some OpenSolaris derivatives.
576         * tests/test-getlogin_r.c (getlogin_r): Don't check the signature on
577         Solaris.
579 2024-04-19  Bruno Haible  <bruno@clisp.org>
581         memset_explicit: Fix compilation error on some OpenSolaris derivatives.
582         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Arrange to define
583         __STDC_WANT_LIB_EXT1__ to 1.
584         * modules/memset_explicit (Depends-on): Add extensions.
585         * m4/memset_explicit.m4 (gl_FUNC_MEMSET_EXPLICIT): Require
586         gl_USE_SYSTEM_EXTENSIONS.
587         * lib/memset_explicit.c (__STDC_WANT_LIB_EXT1__): Remove definition.
589 2024-04-19  Collin Funk  <collin.funk1@gmail.com>
591         gnulib-tool.py: Make use of GLModule's __hash__ method.
592         * pygnulib/GLModuleSystem.py (GLModuleTable.addUnconditional)
593         (GLModuleTable.isConditional): Use the GLModule object instead of the
594         module name directly.
595         (GLModuleTable.addConditional, GLModuleTable.getCondition): Likewise.
596         Use a tuple of two GLModule objects as a key for the conditionals
597         dictionary.
599 2024-04-19  Collin Funk  <collin.funk1@gmail.com>
601         gnulib-tool.py: Simplify data structures for dependencies.
602         * pygnulib/GLModuleSystem.py (GLModuleTable.__init__): Use a defaultdict
603         for dependers to remove the base initialization case.
604         (GLModuleTable.addConditional): Use a set to disallow duplicates instead
605         of performing list lookups.
607 2024-04-19  Bruno Haible  <bruno@clisp.org>
609         gnulib-tool.py: Simplify running some commands in a given directory.
610         * pygnulib/GLImport.py (GLImport.execute): Use sp.call with a cwd
611         argument, instead of calling chdir twice.
612         * pygnulib/GLModuleSystem.py (GLModuleSystem.list): Likewise.
613         * pygnulib/main.py (mode=='find'): Likewise.
615 2024-04-19  Bruno Haible  <bruno@clisp.org>
617         gnulib-tool.py: Update authors list.
618         * pygnulib/constants.py (__author__): Add Collin Funk.
619         * pygnulib/__init__.py (__copyright__, __author__): Include years and
620         authors of the gnulib-tool shell script.
622 2024-04-19  Bruno Haible  <bruno@clisp.org>
624         getpayload* tests: Don't assume that '-' works as expected on NaN.
625         * tests/test-getpayload.c: Include signed-nan.h.
626         (main): Use minus_NaNd.
627         * tests/test-getpayloadf.c: Include signed-nan.h.
628         (main): Use minus_NaNf.
629         * tests/test-getpayloadl.c: Include signed-nan.h.
630         (main): Use minus_NaNl.
631         * modules/getpayload-tests (Depends-on): Add signed-nan.
632         * modules/getpayloadf-tests (Depends-on): Likewise.
633         * modules/getpayloadl-tests (Depends-on): Likewise.
635         signed-nan: Don't assume that '-' works as expected on NaN values.
636         * lib/signed-nan.h (minus_NaNf): New function.
637         (positive_NaNf, negative_NaNf): Use it.
638         (minus_NaNd): New function.
639         (positive_NaNd, negative_NaNd): Use it.
640         (minus_NaNl): New function.
641         (positive_NaNl, negative_NaNl): Use it.
642         * tests/test-totalorder.c (TOTALORDER_MINUS): New macro.
643         * tests/test-totalorderf.c (TOTALORDER_MINUS): New macro.
644         * tests/test-totalorderl.c (TOTALORDER_MINUS): New macro.
645         * tests/test-totalorder.h (negative_NaN_with_payload): Use it.
646         * tests/test-totalordermag.c (TOTALORDER_MINUS): New macro.
647         * tests/test-totalordermagf.c (TOTALORDER_MINUS): New macro.
648         * tests/test-totalordermagl.c (TOTALORDER_MINUS): New macro.
649         * tests/test-totalordermag.h (negative_NaN_with_payload): Use it.
651 2024-04-19  Collin Funk  <collin.funk1@gmail.com>
653         gnulib-tool.py: Add a comment about coding style.
654         * pygnulib/main.py: Add a note about the common convention of using an
655         underscore prefix to mark a function/variable as private.
657 2024-04-19  Collin Funk  <collin.funk1@gmail.com>
659         gnulib-tool.py: Remove some unused instance variables.
660         * pygnulib/GLModuleSystem.py (GLModuleSystem.__init__)
661         (GLModule.__init__): Remove unused 'args' instance variable.
663 2024-04-19  Paul Eggert  <eggert@cs.ucla.edu>
665         fstatat, stat: document macOS st_ino pipe bug
666         * doc/posix-functions/fstatat.texi (fstatat):
667         * doc/posix-functions/stat.texi (stat):
668         Document macOS bug (see <https://bugs.gnu.org/70411>).
670 2024-04-18  Bruno Haible  <bruno@clisp.org>
672         totalordermagl: Add tests.
673         * tests/test-totalordermagl.c: New file, based on
674         tests/test-totalorderl.c.
675         * modules/totalordermagl-tests: New file, based on
676         modules/totalorderl-tests.
678         totalordermagl: New module.
679         * lib/math.in.h (totalordermagl): New declaration.
680         * lib/totalordermagl.c: New file, based on lib/totalorderl.c.
681         * m4/math_h.m4 (gl_MATH_H): Test whether totalordermagl is declared.
682         (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_TOTALORDERMAGL.
683         (gl_MATH_H_DEFAULTS): Initialize HAVE_TOTALORDERMAGL,
684         REPLACE_TOTALORDERMAGL.
685         * modules/math (Makefile.am): Substitute GNULIB_TOTALORDERMAGL,
686         HAVE_TOTALORDERMAGL, REPLACE_TOTALORDERMAGL.
687         * modules/totalordermagl: New file, based on modules/totalorderl.
688         * doc/posix-functions/totalordermagl.texi: Mention the new module.
690 2024-04-18  Bruno Haible  <bruno@clisp.org>
692         totalordermagf: Add tests.
693         * tests/test-totalordermagf.c: New file, based on
694         tests/test-totalorderf.c.
695         * modules/totalordermagf-tests: New file, based on
696         modules/totalorderf-tests.
698         totalordermagf: New module.
699         * lib/math.in.h (totalordermagf): New declaration.
700         * lib/totalordermagf.c: New file, based on lib/totalorderf.c.
701         * m4/math_h.m4 (gl_MATH_H): Test whether totalordermagf is declared.
702         (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_TOTALORDERMAGF.
703         (gl_MATH_H_DEFAULTS): Initialize HAVE_TOTALORDERMAGF,
704         REPLACE_TOTALORDERMAGF.
705         * modules/math (Makefile.am): Substitute GNULIB_TOTALORDERMAGF,
706         HAVE_TOTALORDERMAGF, REPLACE_TOTALORDERMAGF.
707         * modules/totalordermagf: New file, based on modules/totalorderf.
708         * doc/posix-functions/totalordermagf.texi: Mention the new module.
710 2024-04-18  Bruno Haible  <bruno@clisp.org>
712         totalordermag: Add tests.
713         * tests/test-totalordermag.c: New file, based on
714         tests/test-totalorder.c.
715         * tests/test-totalordermag.h: New file, based on
716         tests/test-totalorder.h.
717         * modules/totalordermag-tests: New file, based on
718         modules/totalorder-tests.
720         totalordermag: New module.
721         * lib/math.in.h (totalordermag): New declaration.
722         * lib/totalordermag.c: New file, based on lib/totalorder.c.
723         * m4/totalordermag.m4: New file, based on m4/totalorder.m4.
724         * m4/math_h.m4 (gl_MATH_H): Test whether totalordermag is declared.
725         (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_TOTALORDERMAG.
726         (gl_MATH_H_DEFAULTS): Initialize HAVE_TOTALORDERMAG,
727         REPLACE_TOTALORDERMAG.
728         * modules/math (Makefile.am): Substitute GNULIB_TOTALORDERMAG,
729         HAVE_TOTALORDERMAG, REPLACE_TOTALORDERMAG.
730         * modules/totalordermag: New file, based on modules/totalorder.
731         * doc/posix-functions/totalordermag.texi: Mention the new module.
733 2024-04-18  Bruno Haible  <bruno@clisp.org>
735         setpayloadsig*: Support newer MIPS CPUs.
736         * lib/setpayloadsig.c (setpayloadsig): On MIPS CPUs with MIPS_NAN2008_DOUBLE,
737         reject a zero payload.
738         * lib/setpayloadsigf.c (setpayloadsigf): On MIPS CPUs with MIPS_NAN2008_FLOAT,
739         reject a zero payload.
740         * lib/setpayloadsigl.c (setpayloadsigl): On MIPS CPUs with
741         MIPS_NAN2008_LONG_DOUBLE, reject a zero payload.
743 2024-04-18  Bruno Haible  <bruno@clisp.org>
745         setpayload*: Support newer MIPS CPUs.
746         * lib/setpayload.c (setpayload): On MIPS CPUs with MIPS_NAN2008_DOUBLE,
747         accept a zero payload.
748         * lib/setpayloadf.c (setpayloadf): On MIPS CPUs with MIPS_NAN2008_FLOAT,
749         accept a zero payload.
750         * lib/setpayloadl.c (setpayloadl): On MIPS CPUs with
751         MIPS_NAN2008_LONG_DOUBLE, accept a zero payload.
752         * m4/setpayload.m4 (gl_FUNC_SETPAYLOADF, gl_FUNC_SETPAYLOAD,
753         gl_FUNC_SETPAYLOADL): Invoke gl_NAN_MIPS.
754         * modules/setpayload (Files): Add m4/nan-mips.m4.
755         * modules/setpayloadf (Files): Likewise.
756         * modules/setpayloadl (Files): Likewise.
758 2024-04-18  Bruno Haible  <bruno@clisp.org>
760         totalorder*: Support newer MIPS CPUs.
761         * lib/totalorder.c (totalorder): On MIPS CPUs with MIPS_NAN2008_DOUBLE,
762         don't invert the most significant bit of the mantissa field.
763         * lib/totalorderf.c (totalorderf): On MIPS CPUs with MIPS_NAN2008_FLOAT,
764         don't invert the most significant bit of the mantissa field.
765         * lib/totalorderl.c (totalorderl): On MIPS CPUs with
766         MIPS_NAN2008_LONG_DOUBLE, don't invert the most significant bit of the
767         mantissa field.
768         * m4/totalorder.m4 (gl_FUNC_TOTALORDERF, gl_FUNC_TOTALORDER,
769         gl_FUNC_TOTALORDERL): Invoke gl_NAN_MIPS.
770         * modules/totalorder (Files): Add m4/nan-mips.m4.
771         * modules/totalorderf (Files): Likewise.
772         * modules/totalorderl (Files): Likewise.
774 2024-04-18  Bruno Haible  <bruno@clisp.org>
776         snan: Add support for m68k.
777         * lib/snan.h (construct_memory_SNaNl): Handle m68k specially.
779 2024-04-18  Bruno Haible  <bruno@clisp.org>
781         totalorderl: Simplify on MSVC.
782         * lib/totalorderl.c (totalorderl): If 'long double' is the same as
783         'double', just invoke totalorder. Otherwise, drop the optimized code
784         for small 'long double' since it does not occur on any platform.
785         * m4/totalorder.m4 (gl_FUNC_TOTALORDERL): Require
786         gl_LONG_DOUBLE_VS_DOUBLE. If 'long double' is the same as 'double', use
787         TOTALORDER_LIBM.
788         * modules/totalorderl (Depends-on): Add totalorder.
790 2024-04-18  Bruno Haible  <bruno@clisp.org>
792         signbit: Fix typos.
793         * lib/signbitd.c: Fix typo in comment.
794         * lib/signbitf.c: Likewise.
796 2024-04-18  Collin Funk  <collin.funk1@gmail.com>
798         gnulib-tool.py: Ignore 'attribute-defined-outside-init' warnings.
799         * pygnulib/.pylintrc: Add W0201 to the disabled warnings.
800         See discussion here:
801         <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00275.html>
803 2024-04-17  Bruno Haible  <bruno@clisp.org>
805         totalorder* tests: Strengthen tests.
806         * tests/test-totalorder.h: Include <math.h>.
807         (positive_NaN_with_payload, negative_NaN_with_payload): New functions.
808         (main): Test quiet NaNs of each sign with different payload.
809         * tests/test-totalorder.c (TOTALORDER_POSITIVE_NAN,
810         TOTALORDER_NEGATIVE_NAN): Remove macros.
811         (TOTALORDER_SETPAYLOAD): New macro.
812         * tests/test-totalorderf.c (TOTALORDER_POSITIVE_NAN,
813         TOTALORDER_NEGATIVE_NAN): Remove macros.
814         (TOTALORDER_SETPAYLOAD): New macro.
815         * tests/test-totalorderl.c (TOTALORDER_POSITIVE_NAN,
816         TOTALORDER_NEGATIVE_NAN): Remove macros.
817         (TOTALORDER_SETPAYLOAD): New macro.
818         * modules/totalorder-tests (Depends-on): Add setpayload.
819         (Makefile.am): Link test-totalorder with $(SETPAYLOAD_LIBM).
820         * modules/totalorderf-tests (Depends-on): Add setpayloadf.
821         (Makefile.am): Link test-totalorderf with $(SETPAYLOADF_LIBM).
822         * modules/totalorderl-tests (Depends-on): Add setpayloadl.
823         (Makefile.am): Link test-totalorderl with $(SETPAYLOADL_LIBM).
825 2024-04-17  Bruno Haible  <bruno@clisp.org>
827         gnulib-tool.py: Use same warning style as gnulib-tool.sh.
828         * pygnulib/GLTestDir.py (GLTestDir.execute): Prefix the
829         "incompatible license" message with "gnulib-tool: warning: ".
831 2024-04-17  Bruno Haible  <bruno@clisp.org>
833         stdio, utime-h: Fix more linkage errors when using C++.
834         * lib/stdio.in.h (rpl_fwrite, rpl_fwrite_unlocked): Use _GL_EXTERN_C
835         instead of extern.
836         * lib/utime.in.h (_gl_utimens_windows): Likewise.
838 2024-04-17  Bruno Haible  <bruno@clisp.org>
840         Fix linkage errors when using C++.
841         Reported by Miro Palmu <email@miropalmu.cc> in
842         <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00274.html>.
843         * lib/acl.h: Add 'extern "C" {' / '}' boilerplate.
844         * lib/alignalloc.h: Likewise.
845         * lib/aligned-malloc.h: Likewise.
846         * lib/allocator.h: Likewise.
847         * lib/arcfour.h: Likewise.
848         * lib/arctwo.h: Likewise.
849         * lib/areadlink.h: Likewise.
850         * lib/argv-iter.h: Likewise.
851         * lib/argz.in.h: Likewise.
852         * lib/binary-io.h: Likewise.
853         * lib/bitrotate.h: Likewise.
854         * lib/bitset.h: Likewise.
855         * lib/bitsetv.h: Likewise.
856         * lib/c-strcaseeq.h: Likewise.
857         * lib/canon-host.h: Likewise.
858         * lib/careadlinkat.h: Likewise.
859         * lib/chdir-long.h: Likewise.
860         * lib/check-version.h: Likewise.
861         * lib/classpath.h: Likewise.
862         * lib/cloexec.h: Likewise.
863         * lib/close-stream.h: Likewise.
864         * lib/crc.h: Likewise.
865         * lib/csharpcomp.h: Likewise.
866         * lib/csharpexec.h: Likewise.
867         * lib/cycle-check.h: Likewise.
868         * lib/des.h: Likewise.
869         * lib/dev-ino.h: Likewise.
870         * lib/di-set.h: Likewise.
871         * lib/eealloc.h: Likewise.
872         * lib/exclude.h: Likewise.
873         * lib/execinfo.in.h: Likewise.
874         * lib/execute.h: Likewise.
875         * lib/exitfail.h: Likewise.
876         * lib/fcntl-safer.h: Likewise.
877         * lib/file-set.h: Likewise.
878         * lib/file-type.h: Likewise.
879         * lib/filenamecat.h: Likewise.
880         * lib/filevercmp.h: Likewise.
881         * lib/fpending.h: Likewise.
882         * lib/fprintftime.h: Likewise.
883         * lib/fpucw.h: Likewise.
884         * lib/fsusage.h: Likewise.
885         * lib/ftoastr.h: Likewise.
886         * lib/full-read.h: Likewise.
887         * lib/gc.h: Likewise.
888         * lib/getndelim2.h: Likewise.
889         * lib/getnline.h: Likewise.
890         * lib/getugroups.h: Likewise.
891         * lib/glthread/tls.h: Likewise.
892         * lib/hamt.h: Likewise.
893         * lib/hard-locale.h: Likewise.
894         * lib/hash-pjw-bare.h: Likewise.
895         * lib/hash-pjw.h: Likewise.
896         * lib/hash-triple.h: Likewise.
897         * lib/hmac.h: Likewise.
898         * lib/human.h: Likewise.
899         * lib/i-ring.h: Likewise.
900         * lib/idcache.h: Likewise.
901         * lib/idx.h: Likewise.
902         * lib/ino-map.h: Likewise.
903         * lib/inttostr.h: Likewise.
904         * lib/isapipe.h: Likewise.
905         * lib/javacomp.h: Likewise.
906         * lib/javaexec.h: Likewise.
907         * lib/jit/cache.h: Likewise.
908         * lib/linebuffer.h: Likewise.
909         * lib/localeinfo.h: Likewise.
910         * lib/long-options.h: Likewise.
911         * lib/mbchar.h: Likewise.
912         * lib/mbfile.h: Likewise.
913         * lib/mbiter.h: Likewise.
914         * lib/mbiterf.h: Likewise.
915         * lib/mbuiter.h: Likewise.
916         * lib/mbuiterf.h: Likewise.
917         * lib/mcel.h: Likewise.
918         * lib/memcasecmp.h: Likewise.
919         * lib/memcoll.h: Likewise.
920         * lib/memxor.h: Likewise.
921         * lib/mgetgroups.h: Likewise.
922         * lib/mkdir-p.h: Likewise.
923         * lib/modechange.h: Likewise.
924         * lib/mountlist.h: Likewise.
925         * lib/mpsort.h: Likewise.
926         * lib/msvc-nothrow.h: Likewise.
927         * lib/nan.h: Likewise.
928         * lib/openat-priv.h: Likewise.
929         * lib/openat.h: Likewise.
930         * lib/opendirat.h: Likewise.
931         * lib/pagealign_alloc.h: Likewise.
932         * lib/parse-datetime.h: Likewise.
933         * lib/parse-duration.h: Likewise.
934         * lib/physmem.h: Likewise.
935         * lib/posixtm.h: Likewise.
936         * lib/posixver.h: Likewise.
937         * lib/printf-frexp.h: Likewise.
938         * lib/printf-frexpl.h: Likewise.
939         * lib/priv-set.h: Likewise.
940         * lib/quote.h: Likewise.
941         * lib/quotearg.h: Likewise.
942         * lib/read-file.h: Likewise.
943         * lib/readline.h: Likewise.
944         * lib/readtokens.h: Likewise.
945         * lib/readtokens0.h: Likewise.
946         * lib/regex-quote.h: Likewise.
947         * lib/renameatu.h: Likewise.
948         * lib/rijndael-alg-fst.h: Likewise.
949         * lib/rijndael-api-fst.h: Likewise.
950         * lib/safe-alloc.h: Likewise.
951         * lib/safe-write.h: Likewise.
952         * lib/same-inode.h: Likewise.
953         * lib/same.h: Likewise.
954         * lib/save-cwd.h: Likewise.
955         * lib/savedir.h: Likewise.
956         * lib/savewd.h: Likewise.
957         * lib/selinux-at.h: Likewise.
958         * lib/signed-nan.h: Likewise.
959         * lib/signed-snan.h: Likewise.
960         * lib/snan.h: Likewise.
961         * lib/sockets.h: Likewise.
962         * lib/stdio-safer.h: Likewise.
963         * lib/stdlib-safer.h: Likewise.
964         * lib/streq.h: Likewise.
965         * lib/strerror-override.h: Likewise.
966         * lib/tmpdir.h: Likewise.
967         * lib/trim.h: Likewise.
968         * lib/u64.h: Likewise.
969         * lib/unicase/casefold.h: Likewise.
970         * lib/unicase/caseprop.h: Likewise.
971         * lib/unicase/invariant.h: Likewise.
972         * lib/unicase/special-casing.in.h: Likewise.
973         * lib/unicase/unicasemap.h: Likewise.
974         * lib/unicodeio.h: Likewise.
975         * lib/unilbrk/lbrktables.h: Likewise.
976         * lib/unilbrk/ulc-common.h: Likewise.
977         * lib/uninorm/decompose-internal.h: Likewise.
978         * lib/unistd-safer.h: Likewise.
979         * lib/unitypes.in.h: Likewise.
980         * lib/uniwbrk/wbrktable.h: Likewise.
981         * lib/unlinkdir.h: Likewise.
982         * lib/userspec.h: Likewise.
983         * lib/utimecmp.h: Likewise.
984         * lib/utimens.h: Likewise.
985         * lib/windows-spawn.h: Likewise.
986         * lib/write-any-file.h: Likewise.
987         * lib/xbinary-io.h: Likewise.
988         * lib/xgetcwd.h: Likewise.
989         * lib/xgetdomainname.h: Likewise.
990         * lib/xgethostname.h: Likewise.
991         * lib/xmemcoll.h: Likewise.
992         * lib/xprintf.h: Likewise.
993         * lib/xreadlink.h: Likewise.
994         * lib/xsize.h: Likewise.
995         * lib/xstrndup.h: Likewise.
996         * lib/xstrtod.h: Likewise.
997         * lib/xstrtol.h: Likewise.
998         * lib/yesno.h: Likewise.
999         * lib/isnand-nolibm.h (isnand): Declare with C linkage.
1000         * lib/isnanf-nolibm.h (isnanf): Likewise.
1001         * lib/isnanl-nolibm.h (isnanl): Likewise.
1003 2024-04-17  Collin Funk  <collin.funk1@gmail.com>
1005         gnulib-tool.py: Make an instance variable local to a function.
1006         * pygnulib/GLImport.py (GLImport.execute): Define the GLFileAssistant as
1007         local to this function because it is unused elsewhere.
1009 2024-04-17  Collin Funk  <collin.funk1@gmail.com>
1011         gnulib-tool.py: Remove an unused instance attribute.
1012         * pygnulib/GLImport.py (GLImport.__init__): Remove the unused
1013         GLFileSystem object.
1015 2024-04-17  Collin Funk  <collin.funk1@gmail.com>
1017         gnulib-tool.py: Fix a pylint 'attribute-defined-outside-init' warning.
1018         * pygnulib/GLModuleSystem.py (GLModuleTable.transitive_closure): Don't
1019         define a 'modules' attribute since it is never used.
1021 2024-04-17  Bruno Haible  <bruno@clisp.org>
1023         getpayloadl: Add tests.
1024         * tests/test-getpayloadl.c: New file.
1025         * modules/getpayloadl-tests: New file.
1027         getpayloadl: New module.
1028         * lib/math.in.h (getpayloadl): New declaration.
1029         * lib/getpayloadl.c: New file.
1030         * m4/math_h.m4 (gl_MATH_H): Test whether getpayloadl is declared.
1031         (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_GETPAYLOADL.
1032         (gl_MATH_H_DEFAULTS): Initialize HAVE_GETPAYLOADL, REPLACE_GETPAYLOADL.
1033         * modules/math (Makefile.am): Substitute GNULIB_GETPAYLOADL,
1034         HAVE_GETPAYLOADL, REPLACE_GETPAYLOADL.
1035         * modules/getpayloadl: New file.
1036         * doc/posix-functions/getpayloadl.texi: Mention the new module and the
1037         glibc bug.
1039 2024-04-17  Bruno Haible  <bruno@clisp.org>
1041         getpayloadf: Add tests.
1042         * tests/test-getpayloadf.c: New file.
1043         * modules/getpayloadf-tests: New file.
1045         getpayloadf: New module.
1046         * lib/math.in.h (getpayloadf): New declaration.
1047         * lib/getpayloadf.c: New file.
1048         * m4/math_h.m4 (gl_MATH_H): Test whether getpayloadf is declared.
1049         (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_GETPAYLOADF.
1050         (gl_MATH_H_DEFAULTS): Initialize HAVE_GETPAYLOADF, REPLACE_GETPAYLOADF.
1051         * modules/math (Makefile.am): Substitute GNULIB_GETPAYLOADF,
1052         HAVE_GETPAYLOADF, REPLACE_GETPAYLOADF.
1053         * modules/getpayloadf: New file.
1054         * doc/posix-functions/getpayloadf.texi: Mention the new module and the
1055         glibc bug.
1057 2024-04-17  Bruno Haible  <bruno@clisp.org>
1059         getpayload: Add tests.
1060         * tests/test-getpayload.c: New file.
1061         * modules/getpayload-tests: New file.
1063         getpayload: New module.
1064         * lib/math.in.h (getpayload): New declaration.
1065         * lib/getpayload.c: New file.
1066         * m4/getpayload.m4: New file.
1067         * m4/math_h.m4 (gl_MATH_H): Test whether getpayload is declared.
1068         (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_GETPAYLOAD.
1069         (gl_MATH_H_DEFAULTS): Initialize HAVE_GETPAYLOAD, REPLACE_GETPAYLOAD.
1070         * modules/math (Makefile.am): Substitute GNULIB_GETPAYLOAD,
1071         HAVE_GETPAYLOAD, REPLACE_GETPAYLOAD.
1072         * modules/getpayload: New file.
1073         * doc/posix-functions/getpayload.texi: Mention the new module and the
1074         glibc bug.
1076 2024-04-16  Sam James  <sam@gentoo.org>
1078         wchar: Fix serial number.
1079         * m4/wchar_h.m4: Remove duplicate serial number specification and
1080         increment serial.
1082 2024-04-16  Collin Funk  <collin.funk1@gmail.com>
1084         gnulib-tool.py: Make GLModule's __eq__ and __hash__ method agree.
1085         * pygnulib/GLModuleSystem.py (GLModuleTable.__hash__): Only use the
1086         module name in hash computations.
1088 2024-04-16  Bruno Haible  <bruno@clisp.org>
1090         setpayloadsigl: Add tests.
1091         * tests/test-setpayloadsigl.c: New file, based on
1092         tests/test-setpayloadl.c.
1093         * modules/setpayloadsigl-tests: New file.
1095         setpayloadsigl: New module.
1096         * lib/math.in.h (setpayloadsigl): New declaration.
1097         * lib/setpayloadsigl.c: New file, based on lib/setpayloadl.c.
1098         * m4/math_h.m4 (gl_MATH_H): Test whether setpayloadsigl is declared.
1099         (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_SETPAYLOADSIGL.
1100         (gl_MATH_H_DEFAULTS): Initialize HAVE_SETPAYLOADSIGL.
1101         * modules/math (Makefile.am): Substitute GNULIB_SETPAYLOADSIGL,
1102         HAVE_SETPAYLOADSIGL.
1103         * modules/setpayloadsigl: New file.
1104         * doc/posix-functions/setpayloadsigl.texi: Mention the new module.
1106 2024-04-16  Bruno Haible  <bruno@clisp.org>
1108         setpayloadsigf: Add tests.
1109         * tests/test-setpayloadf.c (PAYLOAD_BITS): New macro.
1110         (main): Use it.
1111         * tests/test-setpayloadsigf.c: New file, based on
1112         tests/test-setpayloadf.c.
1113         * modules/setpayloadsigf-tests: New file.
1115         setpayloadsigf: New module.
1116         * lib/math.in.h (setpayloadsigf): New declaration.
1117         * lib/setpayloadsigf.c: New file, based on lib/setpayloadf.c.
1118         * m4/math_h.m4 (gl_MATH_H): Test whether setpayloadsigf is declared.
1119         (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_SETPAYLOADSIGF.
1120         (gl_MATH_H_DEFAULTS): Initialize HAVE_SETPAYLOADSIGF.
1121         * modules/math (Makefile.am): Substitute GNULIB_SETPAYLOADSIGF,
1122         HAVE_SETPAYLOADSIGF.
1123         * modules/setpayloadsigf: New file.
1124         * doc/posix-functions/setpayloadsigf.texi: Mention the new module.
1126 2024-04-16  Bruno Haible  <bruno@clisp.org>
1128         setpayloadsig: Add tests.
1129         * tests/test-setpayload.c (PAYLOAD_BITS): New macro.
1130         (main): Use it.
1131         * tests/test-setpayloadsig.c: New file, based on
1132         tests/test-setpayload.c.
1133         * modules/setpayloadsig-tests: New file.
1135         setpayloadsig: New module.
1136         * lib/math.in.h (setpayloadsig): New declaration.
1137         * lib/setpayloadsig.c: New file, based on lib/setpayload.c.
1138         * m4/setpayloadsig.m4: New file, based on m4/setpayload.m4.
1139         * m4/math_h.m4 (gl_MATH_H): Test whether setpayloadsig is declared.
1140         (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_SETPAYLOADSIG.
1141         (gl_MATH_H_DEFAULTS): Initialize HAVE_SETPAYLOADSIG.
1142         * modules/math (Makefile.am): Substitute GNULIB_SETPAYLOADSIG,
1143         HAVE_SETPAYLOADSIG.
1144         * modules/setpayloadsig: New file.
1145         * doc/posix-functions/setpayloadsig.texi: Mention the new module.
1147 2024-04-16  Bruno Haible  <bruno@clisp.org>
1149         setpayloadl: Fix platform-specific bugs.
1150         * lib/setpayloadl.c (setpayloadl): On m68k, consider the actual memory
1151         layout of a 'long double'. On platforms with quadruple-precision
1152         'long double', store 111 bits of payload, not only 110 bits.
1154 2024-04-16  Collin Funk  <collin.funk1@gmail.com>
1156         gnulib-tool.py: Prefer 'not in' over 'not ... in'.
1157         * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippet): Change conditional.
1158         * pygnulib/GLModuleSystem.py (GLModuleTable.addConditional): Likewise.
1160 2024-04-16  Collin Funk  <collin.funk1@gmail.com>
1162         gnulib-tool.py: Make data structures more clear.
1163         * pygnulib/GLModuleSystem.py (GLModuleTable.__init__): Use a set to
1164         represent the unconditional modules instead of a dictionary. Remove
1165         redundant comments.
1166         (GLModuleTable.addUnconditional): Add the module to a set instead of
1167         using it as a key to the dictionary.
1169 2024-04-16  Bruno Haible  <bruno@clisp.org>
1171         setpayloadl: Add tests.
1172         * tests/test-setpayloadl.c: New file.
1173         * modules/setpayloadl-tests: New file.
1175         setpayloadl: New module.
1176         * lib/math.in.h (setpayloadl): New declaration.
1177         * lib/setpayloadl.c: New file.
1178         * m4/math_h.m4 (gl_MATH_H): Test whether setpayloadl is declared.
1179         (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_SETPAYLOADL.
1180         (gl_MATH_H_DEFAULTS): Initialize HAVE_SETPAYLOADL.
1181         * modules/math (Makefile.am): Substitute GNULIB_SETPAYLOADL,
1182         HAVE_SETPAYLOADL.
1183         * modules/setpayloadl: New file.
1184         * doc/posix-functions/setpayloadl.texi: Mention the new module.
1186 2024-04-16  Bruno Haible  <bruno@clisp.org>
1188         setpayloadf: Add tests.
1189         * tests/test-setpayloadf.c: New file.
1190         * modules/setpayloadf-tests: New file.
1192         setpayloadf: New module.
1193         * lib/math.in.h (setpayloadf): New declaration.
1194         * lib/setpayloadf.c: New file.
1195         * m4/math_h.m4 (gl_MATH_H): Test whether setpayloadf is declared.
1196         (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_SETPAYLOADF.
1197         (gl_MATH_H_DEFAULTS): Initialize HAVE_SETPAYLOADF.
1198         * modules/math (Makefile.am): Substitute GNULIB_SETPAYLOADF,
1199         HAVE_SETPAYLOADF.
1200         * modules/setpayloadf: New file.
1201         * doc/posix-functions/setpayloadf.texi: Mention the new module.
1203 2024-04-16  Bruno Haible  <bruno@clisp.org>
1205         setpayload: Add tests.
1206         * tests/test-setpayload.c: New file.
1207         * modules/setpayload-tests: New file.
1209         setpayload: New module.
1210         * lib/math.in.h (setpayload): New declaration.
1211         * lib/setpayload.c: New file.
1212         * m4/setpayload.m4: New file.
1213         * m4/math_h.m4 (gl_MATH_H): Test whether setpayload is declared.
1214         (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_SETPAYLOAD.
1215         (gl_MATH_H_DEFAULTS): Initialize HAVE_SETPAYLOAD.
1216         * modules/math (Makefile.am): Substitute GNULIB_SETPAYLOAD,
1217         HAVE_SETPAYLOAD.
1218         * modules/setpayload: New file.
1219         * doc/posix-functions/setpayload.texi: Mention the new module.
1221 2024-04-15  Collin Funk  <collin.funk1@gmail.com>
1223         gnulib-tool.py: Optimize directory creation.
1224         * pygnulib/GLTestDir.py (GLTestDir.execute): Use a list of possible
1225         subdirectories and create them upfront instead of checking every file.
1227 2024-04-15  Simon Josefsson  <simon@josefsson.org>
1229         gitlog-to-changelog: Revert 2024-04-12 fix and add documentation.
1230         * build-aux/gitlog-to-changelog: Use localtime.
1231         * doc/gitlog-to-changelog.texi: Add.
1232         * doc/gnulib.texi (Build Infrastructure Modules): Add.
1234 2024-04-14  Collin Funk  <collin.funk1@gmail.com>
1236         gnulib-tool.py: Fix incorrect type hint.
1237         * pygnulib/constants.py (filter_filelist): Correct the type hint on the
1238         'filelist' argument. It is a list of strings, not a string.
1240 2024-04-14  Collin Funk  <collin.funk1@gmail.com>
1242         gnulib-tool.py: Write newlines consistently.
1243         * pygnulib/constants.py (NL): Remove variable.
1244         * pygnulib/GLImport.py (GLImport.gnulib_comp): Use '\n' instead of
1245         constants.NL.
1246         * pygnulib/GLModuleSystem.py
1247         (GLModule.getAutomakeSnippet_Unconditional): Likewise.
1248         * pygnulib/main.py (main_with_exception_handling): Likewise.
1250 2024-04-14  Collin Funk  <collin.funk1@gmail.com>
1252         gnulib-tool.py: Don't perform newline conversions.
1253         * pygnulib/constants.py (nlconvert): Remove function. Remove unused
1254         platform import.
1255         * pygnulib/GLImport.py (GLImport.gnulib_cache): Remove calls to
1256         nlconvert().
1257         * pygnulib/GLModuleSystem.py
1258         (GLModule.getAutomakeSnippet_Unconditional): Likewise.
1259         * pygnulib/GLTestDir.py (GLTestDir.execute, GLMegaTestDir.execute):
1260         Likewise.
1262 2024-04-14  Bruno Haible  <bruno@clisp.org>
1264         users.txt: Update some more entries.
1265         * users.txt: Remove cvsps, gpg, gtkreindeer, libvirt, mailfromd, msmtp,
1266         OPeNDAP. Update some existing entries.
1268 2024-04-14  Collin Funk  <collin.funk1@gmail.com>
1270         gnulib-tool.py: Remove some unused variable assignments.
1271         * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Remove unused
1272         variable.
1273         * pygnulib/GLInfo.py (GLInfo.date, GLInfo.version): Remove assignments
1274         to variables unconditionally set in try, except blocks.
1275         * pygnulib/GLModuleSystem.py (GLModule.getConditionalName)
1276         (GLModule.getShellFunc, GLModule.getShellVar): Likewise.
1278 2024-04-14  Collin Funk  <collin.funk1@gmail.com>
1280         gnulib-tool.py: Don't use mutable default arguments.
1281         * pygnulib/GLFileSystem.py (GLFileAssistant.__init__): Set the default
1282         argument for 'transformers' to None. If it is None then set it to an
1283         empty dictionary in the body.
1285 2024-04-13  Bruno Haible  <bruno@clisp.org>
1287         bootstrap: Implement phase 1 as documented in the --help output.
1288         Reported by Simon Josefsson as bug #1 in
1289         <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00152.html>.
1290         * top/bootstrap: Correct indentation.
1291         * top/bootstrap-funclib.sh (prepare_GNULIB_SRCDIR): Implement as
1292         documented:
1293         If GNULIB_SRCDIR and GNULIB_REVISION are set and there is a 'gnulib'
1294         submodule, checkout the revision GNULIB_REVISION.
1295         If GNULIB_SRCDIR and GNULIB_REVISION are set and --no-git is specified,
1296         don't checkout the revision GNULIB_REVISION.
1298 2024-04-13  Bruno Haible  <bruno@clisp.org>
1300         bootstrap: Simplify git submodule initialization.
1301         * top/bootstrap-funclib.sh (prepare_GNULIB_SRCDIR): Err out if git is
1302         older than version 1.6.4. Remove fallback code for older versions.
1303         * build-aux/bootstrap: Regenerated.
1305 2024-04-13  Collin Funk  <collin.funk1@gmail.com>
1307         Improve 'git diff' of Python files.
1308         * .gitattributes: Add a rule for *.py files.
1310 2024-04-13  Collin Funk  <collin.funk1@gmail.com>
1312         gnulib-tool.py: Fix extra arguments to function call.
1313         * pygnulib/GLImport.py (GLImport.execute): Add the missing joinpath call
1314         on two file name components before calling isfile().
1316 2024-04-13  Bruno Haible  <bruno@clisp.org>
1318         bootstrap: Fix --help messages.
1319         Reported by Simon Josefsson in
1320         <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00162.html>.
1321         * top/bootstrap (usage): Fix the description of GNULIB_SRCDIR. Document
1322         GNULIB_REFDIR. Use full-sentences style. Tweak wording.
1323         * top/bootstrap-funclib.sh (autopull_usage): Clarify the phase. Don't
1324         mention nonexistent options --gnulib-srcdir and --gnulib-refdir. Use
1325         full-sentences style.
1326         (autogen_usage): Clarify the phase. Use full-sentences style.
1327         * build-aux/bootstrap: Regenerated.
1329 2024-04-13  Bruno Haible  <bruno@clisp.org>
1331         gnulib-tool.py: Code tweak.
1332         * pygnulib/main.py (main): Move file contents analysis out of a 'with'
1333         statement.
1335 2024-04-13  Bruno Haible  <bruno@clisp.org>
1337         gnulib-tool.py: Stop using codecs.open.
1338         * pygnulib/*.py: To open a file, consistently use
1339         open(..., mode='[rwa]', newline='\n', encoding='utf-8').
1341 2024-04-13  Bruno Haible  <bruno@clisp.org>
1343         gnulib-tool.py: Refactor directory tree removals.
1344         * pygnulib/constants.py (rmtree): New function.
1345         * pygnulib/GLImport.py (GLImport.execute): Use it instead of calling
1346         'rm -rf' directly or shutil.rmtree.
1347         * pygnulib/GLTestDir.py (GLTestDir.execute, GLMegaTestDir.execute):
1348         Likewise.
1349         * pygnulib/main.py (main): Likewise.
1351 2024-04-12  Collin Funk  <collin.funk1@gmail.com>
1353         gnulib-tool.py: Fix --copy-file directory creation.
1354         Reported by Bruno Haible in
1355         <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00140.html>
1356         * pygnulib/main.py (main): Make sure that destdir is set in the GLConfig
1357         object before copying files.
1359 2024-04-12  Bruno Haible  <bruno@clisp.org>
1361         gnulib-tool.py: Implement --add-import --with-*-tests correctly.
1362         * pygnulib/GLConfig.py (GLConfig.update): Use list-merging for the test
1363         categories.
1364         * pygnulib/GLImport.py (GLImport.__init__): Don't merge back those
1365         values which were already considered by taking the union.
1367 2024-04-12  Bruno Haible  <bruno@clisp.org>
1369         gnulib-tool.py: Implement --add-import --avoid correctly.
1370         * pygnulib/GLConfig.py (GLConfig.update): Don't test for the unused key
1371         'tests'.
1372         (GLConfig.default): Likewise.
1373         * pygnulib/GLImport.py (GLImport.__init__): Don't merge back those
1374         values which were already considered by taking the union.
1376 2024-04-12  Bruno Haible  <bruno@clisp.org>
1378         gnulib-tool.py: Refactor.
1379         * pygnulib/GLConfig.py (GLConfig.update, GLConfig.update_key): Improve
1380         variable names and comments.
1381         * pygnulib/GLImport.py (GLImport.__init__): Improve comments.
1383 2024-04-12  Bruno Haible  <bruno@clisp.org>
1385         gnulib-tool.py: Optimize.
1386         * pygnulib/GLConfig.py (GLConfig.update, GLConfig.update_key): Avoid
1387         useless cloning of dictionaries.
1389 2024-04-12  Bruno Haible  <bruno@clisp.org>
1391         gnulib-tool.py: Implement --no-conditional-dependencies correctly.
1392         * pygnulib/GLConfig.py (GLConfig.default): For 'conddeps', return None,
1393         not False.
1394         (GLConfig.checkCondDeps): Update result type.
1395         (resetCondDeps): Reset to return None, not False.
1396         * pygnulib/GLImport.py (GLImport.actioncmd): Update.
1398 2024-04-12  Bruno Haible  <bruno@clisp.org>
1400         gnulib-tool.py: Implement --no-libtool option correctly.
1401         * pygnulib/GLConfig.py (GLConfig.default): For 'libtool', return None,
1402         not False.
1403         (GLConfig.checkLibtool): Update result type.
1404         (resetLibtool): Reset to return None, not False.
1405         * pygnulib/GLImport.py (GLImport.actioncmd): Update.
1407 2024-04-12  Bruno Haible  <bruno@clisp.org>
1409         gnulib-tool.py: Accept conditional dependencies with tests.
1410         * pygnulib/GLImport.py (GLImport.__init__): Don't reject the combination
1411         of gl_CONDITIONAL_DEPENDENCIES and gl_WITH_TESTS.
1412         * pygnulib/GLError.py (GLError.__repr__): Remove error 10.
1413         * pygnulib/main.py (main_with_exception_handling): Likewise.
1415 2024-04-12  Bruno Haible  <bruno@clisp.org>
1417         gnulib-tool.py: Fix handling of --with-obsolete.
1418         * pygnulib/constants.py (TESTS): Remove 'obsolete' category.
1419         * pygnulib/GLConfig.py (GLConfig.__init__): Add optional incobsolete
1420         parameter.
1421         (GLConfig.default): Handle 'incobsolete'.
1422         (GLConfig.checkIncObsolete, GLConfig.setIncObsolete,
1423         GLConfig.resetIncObsolete): New methods.
1424         * pygnulib/GLModuleSystem.py (GLModuleSystem.transitive_closure): For
1425         incobsolete, use new GLConfig methods.
1426         * pygnulib/GLImport.py (GLImport.__init__, GLImport.actioncmd,
1427         GLImport.gnulib_cache): Likewise.
1428         * pygnulib/main.py (main): Pass the incobsolete value to the GLConfig
1429         constructor.
1431 2024-04-12  Simon Josefsson  <simon@josefsson.org>
1433         gitlog-to-changelog: Make output reproducible.
1434         * build-aux/gitlog-to-changelog: Use gmtime instead of localtime.
1436 2024-04-12  Bruno Haible  <bruno@clisp.org>
1438         gnulib-tool.py: Fix parsing of gl_LGPL in gnulib-cache.m4.
1439         * pygnulib/GLImport.py (GLImport.__init__): Search for gl_LGPL in
1440         gnulib-cache.m4 more carefully.
1442         gnulib-tool.py: Fix parsing of gnulib-cache.m4.
1443         * pygnulib/GLImport.py (GLImport.__init__): While parsing
1444         gnulib-cache.m4, stop parsing the identifier starting with 'gl_' when
1445         encountering a character that is not a uppercase letter, digit, or
1446         underscore.
1448 2024-04-12  Bruno Haible  <bruno@clisp.org>
1450         gnulib-tool.py: Fix misspelled option in output.
1451         * pygnulib/GLImport.py (GLImport.actioncmd): Fix typo.
1453 2024-04-12  Bruno Haible  <bruno@clisp.org>
1455         gnulib-tool.py: Persist the --with-longrunning-tests option.
1456         * pygnulib/GLImport.py (GLImport.gnulib_cache): Conditionally add
1457         gl_WITH_LONGRUNNING_TESTS to gnulib-cache.m4.
1459 2024-04-12  Bruno Haible  <bruno@clisp.org>
1461         gnulib-tool.py: Print warnings just like gnulib-tool.sh.
1462         * pygnulib/main.py (main): When printing a warning, print just
1463         "gnulib-tool" instead of the absolute file name.
1465 2024-04-12  Bruno Haible  <bruno@clisp.org>
1467         gnulib-tool.sh: Accept conditional dependencies with tests.
1468         * gnulib-tool.sh (func_import): Don't reject the combination of
1469         gl_CONDITIONAL_DEPENDENCIES and gl_WITH_TESTS.
1471 2024-04-11  Bruno Haible  <bruno@clisp.org>
1473         gnulib-tool.py: Optimize module set lookups.
1474         * gnulib-tool.py (profiler_args): New variable.
1475         * pygnulib/GLModuleSystem.py (GLModuleTable.transitive_closure): Turn
1476         handledmodules into a set.
1477         (GLModuleTable.transitive_closure_separately): For the 'in' test, use
1478         a set variable main_modules_set.
1480 2024-04-11  Collin Funk  <collin.funk1@gmail.com>
1482         gnulib-tool.py: Remove redundant backslashes from regexps.
1483         * pygnulib/GLTestDir.py (GLTestDir.execute): Don't backslash ']' when it
1484         is outside of a set.
1485         * pygnulib/GLImport.py (GLImport.__init__): Don't use a backslash when
1486         ']' is at the start of a '[...]' set. Don't backslash special characters
1487         in a '[...]' set since they have their meaning dropped.
1488         * pygnulib/main.py (main): Likewise.
1490 2024-04-11  Collin Funk  <collin.funk1@gmail.com>
1492         gnulib-tool.py: Simplify regular expressions.
1493         * pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am)
1494         (GLEmiter.tests_Makefile_am): Change occurrences of '[A-Z][A-Z]*' to
1495         '[A-Z]+'.
1497 2024-04-11  Bruno Haible  <bruno@clisp.org>
1499         users.txt: Correct some entries.
1500         * users.txt: Update some existing entries.
1502 2024-04-11  Bruno Haible  <bruno@clisp.org>
1504         gnulib-tool.sh: Improve sort order of directories.
1505         * gnulib-tool.sh (func_import): In file fileset-changes, store directory
1506         names without a trailing slash.
1508 2024-04-11  Bruno Haible  <bruno@clisp.org>
1510         gnulib-tool.sh: Remove './' prefix from file names to update or remove.
1511         * gnulib-tool.sh (func_import): Don't let rewritten file names start
1512         with './'.
1514 2024-04-11  Collin Funk  <collin.funk1@gmail.com>
1516         gnulib-tool.py: Fix sorting of the LINGUAS file.
1517         * pygnulib/GLImport.py (GLImport.execute): Sort the list of locales
1518         before writing them into the LINGUAS file.
1520 2024-04-10  Bruno Haible  <bruno@clisp.org>
1522         gnulib-tool.sh: Handle .gitignore files that do not end in a newline.
1523         * gnulib-tool.sh (func_import): If the .gitignore file ends with a
1524         character other than a newline, add a newline before adding more lines.
1526 2024-04-10  Bruno Haible  <bruno@clisp.org>
1528         gnulib-tool.py: Skip nonexistent modules instead of failing.
1529         * pygnulib/GLModuleSystem.py (GLModuleSystem.find): Use the same warning
1530         wording as gnulib-tool.sh.
1531         * pygnulib/GLImport.py (GLImport.gnulib_cache): Print the specified
1532         modules, not the base modules.
1533         (GLImport.prepare): Don't put None elements into base_modules.
1535 2024-04-10  Collin Funk  <collin.funk1@gmail.com>
1537         gnulib-tool.py: Use function arguments instead of magic numbers.
1538         * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Remove the
1539         'verifier' integer flag argument. Add the 'module_filter' function
1540         argument. Use it to determine if Autoconf snippets should be printed for
1541         each module.
1542         * pygnulib/GLImport.py (GLImport.gnulib_comp): Update call to use a
1543         lambda function.
1544         * pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
1546 2024-04-10  Collin Funk  <collin.funk1@gmail.com>
1548         gnulib-tool: Fix a typo.
1549         * gnulib-tool.sh: Fix a typo in comment.
1550         * pygnulib/main.py (main): Likewise.
1552 2024-04-09  Collin Funk  <collin.funk1@gmail.com>
1554         gnulib-tool.py: Change the avoid list to a set for lookups.
1555         * pygnulib/GLModuleSystem.py (GLModuleSystem.__init__): Store the
1556         avoided modules in a set instead of a list. This is used only for
1557         membership checks when computing the transitive closure of the given
1558         modules, therefore prefer the O(1) average case over O(n).
1560 2024-04-09  Collin Funk  <collin.funk1@gmail.com>
1562         gnulib-tool.py: Remove unused setter and getter functions.
1563         * pygnulib/GLModuleSystem.py (GLModuleTable.getAvoids)
1564         (GLModuleTable.setAvoids): Remove these unused functions.
1566 2024-04-09  Bruno Haible  <bruno@clisp.org>
1568         totalorder, totalorderf: Avoid miscompilation by gcc on NetBSD/i386.
1569         * lib/totalorder.c (totalorder): Use the a compiler optimization barrier
1570         also for GCC.
1571         * lib/totalorderf.c (totalorderf): Likewise.
1573 2024-04-09  Collin Funk  <collin.funk1@gmail.com>
1575         gnulib-tool.py: Simplify use of GLModuleTable accessors.
1576         * pygnulib/GLModuleSystem.py (GLModuleTable.__getitem__): Remove
1577         function.
1578         * pygnulib/GLImport.py (GLImport.gnulib_cache, GLImport.gnulib_comp)
1579         (GLImport.execute): Use function calls on the GLModuleTable to access
1580         module lists instead of using keys to emulate a dictionary.
1582 2024-04-09  Bruno Haible  <bruno@clisp.org>
1584         totalorder, totalorderf: Avoid miscompilation by clang on OpenBSD/i386.
1585         * lib/totalorder.c (totalorder): Insert a compiler optimization barrier.
1586         * lib/totalorderf.c (totalorderf): Likewise.
1588 2024-04-09  Bruno Haible  <bruno@clisp.org>
1590         totalorder, totalorderf: Fix handling of SNaN on i386 and x86_64 CPUs.
1591         * lib/totalorder.c: Include <string.h>.
1592         (totalorder): Use memcpy to copy the 'double' values into the union.
1593         Drop 'volatile'.
1594         * lib/totalorderf.c: Include <string.h>.
1595         (totalorderf): Use memcpy to copy the 'float' values into the union.
1596         Drop 'volatile'.
1598 2024-04-09  Bruno Haible  <bruno@clisp.org>
1600         totalorder tests: Fix signature test.
1601         * tests/test-totalorder.c: Test the signature of totalorder, not
1602         totalorderf.
1604 2024-04-08  Collin Funk  <collin.funk1@gmail.com>
1606         gnulib-tool.py: Use single-quotes for strings, part 2.
1607         * pygnulib/GLEmiter.py (GLEmiter.po_Makevars): Change a double-quoted
1608         string to single-quotes missed by the previous commit.
1610 2024-04-08  Collin Funk  <collin.funk1@gmail.com>
1612         gnulib-tool.py: Use single-quotes for strings.
1613         * pygnulib/*.py: Change double-quoted strings to use single-quotes
1614         unless doing so would require adding backslashes.
1616 2024-04-08  Collin Funk  <collin.funk1@gmail.com>
1618         gnulib-tool.py: Prefer 'list.append(item)' over 'list += [item]'.
1619         * pygnulib/*.py: Change occurrences '+= [item]' to use '.append(item)'
1620         where item is a single element added to the list.
1621         See discussion here:
1622         <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00091.html>
1624 2024-04-08  Bruno Haible  <bruno@clisp.org>
1626         ptsname_r: Work around ptsname_r bug on NetBSD 10.0.
1627         * m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): On NetBSD, arrange to override
1628         ptsname_r.
1629         * lib/ptsname_r.c (ptsname_r): Add workaround for NetBSD bug.
1630         * doc/glibc-functions/ptsname_r.texi: Mention the NetBSD bug.
1632 2024-04-08  Collin Funk  <collin.funk1@gmail.com>
1634         gnulib-tool.py: Fix incomplete type hint.
1635         * pygnulib/GLModuleSystem.py (GLModuleTable.getCondition): Add None to
1636         the return type hint. This is the return value when the module is not a
1637         conditional dependency.
1639 2024-04-08  Collin Funk  <collin.funk1@gmail.com>
1641         gnulib-tool.py: Remove unnecessary conditional.
1642         * pygnulib/GLModuleSystem.py (GLModuleTable.__getitem__): Don't check if
1643         the key is valid twice.
1645 2024-04-08  Collin Funk  <collin.funk1@gmail.com>
1647         gnulib-tool.py: Remove an unused and incorrect function.
1648         * pygnulib/GLFileSystem.py (GLFileAssistant.removeFile): Remove this
1649         unused function. The correct method of removing an element from a list
1650         is to use the remove() function, not pop() which takes an index.
1652 2024-04-08  Collin Funk  <collin.funk1@gmail.com>
1654         gnulib-tool.py: Omit some unnecessary list() calls around sorted().
1655         * pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am): Remove the list()
1656         call in the argument to sorted. The sorted() function works on any
1657         iterable and always returns a list.
1658         * pygnulib/GLImport.py (GLImport.rewrite_old_files)
1659         (GLImport.rewrite_new_files): Likewise.
1660         * pygnulib/GLModuleSystem.py (GLModuleTable.transitive_closure)
1661         (GLModuleTable.transitive_closure_separately): Likewise.
1662         * pygnulib/GLTestDir.py (GLTestDir.rewrite_files): Likewise.
1664 2024-04-08  Bruno Haible  <bruno@clisp.org>
1666         pthread-h: Fix configuration (regression 2024-03-28).
1667         Reported by Collin Funk in
1668         <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00036.html>.
1669         * m4/pthread_h.m4 (gl_PTHREAD_H_PART1): New macro, extracted from
1670         gl_PTHREAD_H.
1671         (gl_PTHREAD_H): Require it. Define using AC_DEFUN.
1672         * m4/pthread-spin.m4 (gl_PTHREAD_SPIN): Require gl_PTHREAD_H_PART1,
1673         not only gl_PTHREAD_H_DEFAULTS.
1675 2024-04-07  Collin Funk  <collin.funk1@gmail.com>
1677         gnulib-tool.py: Don't remove duplicate avoided modules.
1678         * pygnulib/GLConfig.py (GLConfig.addAvoid): Don't remove duplicates from
1679         the modules passed with --avoid.
1681 2024-04-07  Bruno Haible  <bruno@clisp.org>
1683         sigsegv tests: Avoid a crash on NetBSD 10.0/i386.
1684         * tests/test-sigsegv-catch-stackoverflow1.c
1685         (stackoverflow_handler_continuation): On NetBSD/i386, align the stack
1686         pointer before calling longjmp.
1688 2024-04-07  Bruno Haible  <bruno@clisp.org>
1690         gnulib-tool.py: Add comment.
1691         * pygnulib/constants.py (joinpath): Document a limitation.
1693 2024-04-07  Collin Funk  <collin.funk1@gmail.com>
1695         gnulib-tool.py: Don't allow path normalization to delete a variable.
1696         * pygnulib/GLModuleSystem.py
1697         (GLModule.getAutomakeSnippet_Unconditional): Use os.path.join() on the
1698         Makefile variable so it isn't deleted by a following '..' from
1699         os.path.norm().
1701 2024-04-07  Collin Funk  <collin.funk1@gmail.com>
1703         gnulib-tool.py: Use auxdir as given by AC_CONFIG_AUX_DIR.
1704         * pygnulib/GLImport.py (GLImport.__init__): Don't modify the path given
1705         by AC_CONFIG_AUX_DIR by prefixing it with destdir. Use a more strict
1706         regular expression instead of cleaner().
1708 2024-04-07  Collin Funk  <collin.funk1@gmail.com>
1710         gnulib-tool.py: Locate configure.ac correctly when --dir is given.
1711         * pygnulib/GLConfig.py (GLConfig.setAutoconfFile): Don't combine the
1712         given file name argument with destdir.
1713         * pygnulib/main.py (main): Use os.path.join() instead of joinpath() when
1714         constructing the path to the configure.ac file. The latter normalizes
1715         paths which causes the test suite to fail when printed in files.
1717 2024-04-06  Bruno Haible  <bruno@clisp.org>
1719         expm1l: Work around a NetBSD 10.0/i386 bug.
1720         * m4/expm1l.m4 (gl_FUNC_EXPM1L): Test the value of
1721         expm1l(2^LDBL_MIN_EXP).
1722         * doc/posix-functions/expm1l.texi: Mention the NetBSD 10.0/i386 bug.
1723         * tests/test-expm1.h (test_function): Allow more deviation on
1724         NetBSD/i386.
1726 2024-04-05  Bruno Haible  <bruno@clisp.org>
1728         exp2l: Work around a NetBSD 10.0/i386 bug.
1729         * m4/exp2l.m4 (gl_FUNC_EXP2L): Test the value of exp2l(LDBL_MAX_EXP-1).
1730         * doc/posix-functions/exp2l.texi: Mention the NetBSD 10.0/i386 bug.
1732 2024-04-05  Bruno Haible  <bruno@clisp.org>
1734         roundl: Fix a link error on Linux/powerpc64le.
1735         * m4/check-math-lib.m4 (gl_CHECK_MATH_LIB): Accept an additional TYPE
1736         argument.
1737         * m4/isfinite.m4 (gl_ISFINITE): Use the type 'double'.
1738         * m4/isinf.m4 (gl_ISINF): Likewise.
1739         * m4/round.m4 (gl_FUNC_ROUND): Likewise.
1740         * m4/roundf.m4 (gl_FUNC_ROUNDF): Use the type 'float'.
1741         * m4/roundl.m4 (gl_FUNC_ROUNDL): Use the type 'long double'.
1743 2024-04-05  Bruno Haible  <bruno@clisp.org>
1745         exp2l tests: Enable a test for glibc versions >= 2.16.
1746         * tests/test-exp2.h (test_function): Disable a glibc bug workaround for
1747         glibc versions >= 2.16.
1749 2024-04-05  Bruno Haible  <bruno@clisp.org>
1751         expl tests: Avoid test failure on NetBSD 10.0/i386.
1752         * tests/test-exp.h (test_function): Allow more deviation on NetBSD/i386.
1754 2024-04-05  Collin Funk  <collin.funk1@gmail.com>
1756         gnulib-tool.py: Use 'Any' instead of type unions in GLConfig.
1757         * pygnulib/GLConfig.py (GLConfig.__getitem__, GLConfig.dictionary)
1758         (GLConfig.default, GLConfig.isdefault, GLConfig.values): Use 'Any' from
1759         the typing module instead of large type unions. This silences unhelpful
1760         warnings from type checkers.
1762 2024-04-05  Collin Funk  <collin.funk1@gmail.com>
1764         gnulib-tool.py: Fix 'consider-using-set-comprehension' warnings.
1765         * pygnulib/GLImport.py (GLImport.prepare): Create a set directly instead
1766         of creating a list and passing it to a call of set().
1767         (GLImport.__init__): Likewise. Use max() instead of getting the last
1768         element of a sorted list.
1770 2024-04-05  Collin Funk  <collin.funk1@gmail.com>
1772         gnulib-tool.py: Fix 'consider-using-with' pylint warnings.
1773         * pygnulib/GLModuleSystem.py (GLModuleSystem.list): Use run() instead of
1774         Popen() from the subprocess module. This function handles cleanup
1775         internally instead of as a context manager via the 'with' statement.
1777 2024-04-05  Bruno Haible  <bruno@clisp.org>
1779         Update for NetBSD 9.3 and 10.0.
1780         * doc/*/*.texi: Update for NetBSD 9.3 and 10.0.
1781         * m4/expm1l.m4 (gl_FUNC_EXPM1L): Update comments and cross-compilation
1782         guess.
1783         * m4/log1pl.m4 (gl_FUNC_LOG1PL_WORKS): Likewise.
1784         * m4/log2l.m4 (gl_FUNC_LOG2L_WORKS): Likewise.
1785         * m4/printf.m4 (gl_SWPRINTF_DIRECTIVE_LA): Likewise.
1786         * m4/remainderl.m4 (gl_FUNC_REMAINDERL_WORKS): Likewise.
1787         * m4/fcntl.m4: Update comments.
1788         * m4/fenv-environment.m4: Likewise.
1789         * m4/fenv-exceptions-trapping.m4: Likewise.
1790         * m4/fnmatch.m4: Likewise.
1791         * m4/getcwd-abort-bug.m4: Likewise.
1792         * m4/iswdigit.m4: Likewise.
1793         * m4/iswxdigit.m4: Likewise.
1794         * m4/modfl.m4: Likewise.
1795         * m4/wcscmp.m4: Likewise.
1796         * m4/wcsncmp.m4: Likewise.
1797         * m4/wctrans.m4: Likewise.
1798         * m4/wcwidth.m4: Likewise.
1800 2024-04-04  Collin Funk  <collin.funk1@gmail.com>
1802         posix-modules, all-modules: Fix --version output using git options.
1803         * all-modules (func_version): Pass --format and --date options to git
1804         so the output does not depend on the user's configuration. Pass
1805         '-n 1' to speed up the operation, since we only need the first entry.
1806         * posix-modules (func_version): Likewise.
1808 2024-04-04  Bruno Haible  <bruno@clisp.org>
1810         all-modules: Fix errors during './all-modules --version' execution.
1811         Reported by Collin Funk in
1812         <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00050.html>.
1813         * all-modules (func_exit, func_fatal_error, func_readlink,
1814         func_gnulib_dir): Include auxiliary functions from gnulib-tool.sh.
1816 2024-04-04  Bruno Haible  <bruno@clisp.org>
1818         posix-modules: Sync auxiliary functions from gnulib-tool.sh.
1819         * posix-modules (func_exit, func_fatal_error, func_readlink,
1820         func_gnulib_dir): Move before func_usage and func_version. Incorporate
1821         improvements from gnulib-tool.sh.
1823 2024-04-04  Collin Funk  <collin.funk1@gmail.com>
1825         gnulib-tool.py: Ignore 'use-dict-literal' warnings.
1826         * pygnulib/.pylintrc: Don't emit warning messages suggesting that
1827         'dict()' be converted to '{}'. This literal can be mistaken for sets,
1828         see discussion here:
1829         <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00054.html>
1830         * pygnulib/main.py: Document this convention in coding style section.
1831         * pygnulib/GLFileSystem.py (GLFileAssistant.__init__): Convert an
1832         occurrence of '{}' to 'dict()'.
1834 2024-04-04  Collin Funk  <collin.funk1@gmail.com>
1836         gnulib-tool.py: Fix pylint 'raise-missing-from' warnings.
1837         * pygnulib/*.py: Use explicit exception chaining so that stack trace
1838         messages do not seem like bugs. See examples in:
1839         <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00056.html>
1841 2024-04-04  Bruno Haible  <bruno@clisp.org>
1843         Add serial numbers to *.m4 files that did not have them.
1844         * m4/*.m4: Ensure the usual file header with file name and serial
1845         number.
1847         Make the file header of *.m4 files consistent:
1848         1. The file name.
1849         2. The serial number.
1850         3. The copyright and license header.
1851         * m4/*.m4: Adjust file headers.
1853         Make the serial numbers in *.m4 files effective.
1854         Reported by Sam James in
1855         <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00051.html>.
1856         * m4/*.m4: Apply sed -e '1s|^# \(.*[.]m4\) serial |# \1\n# serial |'.
1858 2024-04-03  Bruno Haible  <bruno@clisp.org>
1860         gnulib-tool.sh: Reduce code duplication in last commit.
1861         * gnulib-tool.sh (func_get_automake_snippet_unconditional): Refactor
1862         computation of sed_prepend_auxdir.
1864 2024-04-03  Collin Funk  <collin.funk1@gmail.com>
1866         gnulib-tool.sh: Don't emit an unnecessary './' path component.
1867         * gnulib-tool.sh (func_get_automake_snippet_unconditional): Only prefix
1868         build-aux files with '$(top_srcdir)/' when $auxdir is the top level
1869         directory.
1871 2024-04-03  Collin Funk  <collin.funk1@gmail.com>
1873         gnulib-tool.py: Modernize class declarations to Python 3.
1874         * pygnulib/GLConfig.py: Remove the explicit object inheritance from
1875         class declarations. This is previously required in Python 2.
1876         * pygnulib/GLEmiter.py: Likewise.
1877         * pygnulib/GLFileSystem.py: Likewise.
1878         * pygnulib/GLImport.py: Likewise.
1879         * pygnulib/GLInfo.py: Likewise.
1880         * pygnulib/GLMakefileTable.py: Likewise.
1881         * pygnulib/GLModuleSystem.py: Likewise.
1882         * pygnulib/GLTestDir.py: Likewise.
1884 2024-04-03  Collin Funk  <collin.funk1@gmail.com>
1886         gnulib-tool.py: Ignore pylint 'unidiomatic-typecheck' warnings.
1887         * pygnulib/.pylintrc: Disable warning C0123 since we don't mind using
1888         'type() is' instead of 'isinstance'.
1890 2024-04-03  Collin Funk  <collin.funk1@gmail.com>
1892         gnulib-tool.py: Don't ignore the argument to --doc-base.
1893         * pygnulib/main.py (main): Check for the argument to --doc-base before
1894         creating the GLConfig object.
1896 2024-04-03  Pádraig Brady  <P@draigBrady.com>
1898         quotearg: fix shell-escape quoting with single quotes
1899         With shell-escape quoting, we misquoted strings
1900         where the first and last characters required escaping,
1901         while the string also contained single quotes.
1903         * lib/quotearg.c (quotearg_buffer_restyled): Ensure that
1904         pending_shell_escape_end is reset to the initial state
1905         when reprocessing input due to single quotes.
1906         * tests/test-quotearg-simple.c: Add a minimal test case.
1907         * tests/test-quotearg.c: Likewise.
1908         * tests/test-quotearg.h: Likewise.
1909         Reported by Grisha Levit
1911 2024-04-02  Collin Funk  <collin.funk1@gmail.com>
1913         gnulib-tool.py: Use [] instead of list() to initialize empty lists.
1914         * pygnulib/*.py: Change occurrences of list() to [].
1916 2024-04-02  Collin Funk  <collin.funk1@gmail.com>
1918         gnulib-tool.py: Fix determination whether to add the dummy module.
1919         * pygnulib/GLModuleSystem.py (GLModuleSystem.add_dummy): Only match the
1920         'lib_SOURCES' variable; stop at end-of-line.
1922 2024-04-02  Pádraig Brady  <P@draigBrady.com>
1924         renameatu: handle ENOSYS from renameatx_np
1925         * lib/renameatu.c(): Fall back to renameat() without RENAME_EXCL
1926         if "Function not implemented" is returned.  This was seen with macFUSE.
1927         Reported at https://github.com/coreutils/coreutils/issues/79
1929 2024-04-02  Collin Funk  <collin.funk1@gmail.com>
1931         gnulib-tool.py: Accept valid make syntax for escaped newlines.
1932         * pygnulib/GLModuleSystem.py (GLModuleTable.add_dummy): Use
1933         combine_lines instead of remove remove_backslash_newline so spaces are
1934         added between each combined line.
1935         * pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
1936         * pygnulib/constants.py (remove_backslash_newline): Remove unused
1937         function.
1939 2024-04-02  Collin Funk  <collin.funk1@gmail.com>
1941         gnulib-tool.py: Don't default to 'build-aux' for --auxdir.
1942         * pygnulib/GLConfig.py (GLConfig.__getitem__): Don't map '' to
1943         'build-aux' for the 'auxdir' key.
1944         * pygnulib/GLImport.py (GLImport.__init__): Change conditional to use an
1945         empty string instead of None since this is returned when --auxdir is not
1946         used.
1948 2024-04-02  Bruno Haible  <bruno@clisp.org>
1950         gnulib-tool: Remove unused variables.
1951         * pygnulib/GLConfig.py: Remove unused variables.
1952         * pygnulib/GLEmiter.py: Likewise.
1953         * pygnulib/GLFileSystem.py: Likewise.
1954         * pygnulib/GLImport.py: Likewise.
1955         * pygnulib/GLInfo.py: Likewise.
1956         * pygnulib/GLModuleSystem.py: Likewise.
1957         * pygnulib/GLTestDir.py: Likewise.
1958         * pygnulib/main.py: Likewise.
1959         * gnulib-tool.sh (func_emit_tests_Makefile_am): Remove unused variable
1960         perhapsLT.
1962         gnulib-tool.py: Remove no-op statements.
1963         * pygnulib/GLConfig.py (GLConfig.update): Remove no-op statement.
1965         gnulib-tool.py: Remove unused imports.
1966         * pygnulib/GLFileSystem.py: Remove unused imports.
1967         * pygnulib/GLEmiter.py: Likewise.
1968         (GLEmiter.autoconfSnippets): Fix type assertion message.
1970         gnulib-tool.py: Fix some IDE warnings.
1971         * HACKING: Update configuration of warnings.
1973 2024-04-01  Bruno Haible  <bruno@clisp.org>
1975         gnulib-tool.py: Add developer documentation.
1976         * HACKING: New section "Debugging the Python implementation of
1977         gnulib-tool".
1979 2024-04-01  Bruno Haible  <bruno@clisp.org>
1981         gnulib-tool.py: Use a standard Python program directory structure.
1982         * pygnulib/main.py (main_with_exception_handling): New function for
1983         existing code.
1984         * .gnulib-tool.py: New file.
1985         * pygnulib/constants.py: Update the computation of APP['root'].
1986         * gnulib-tool.py: Don't set PYTHONPATH.
1988 2024-04-01  Bruno Haible  <bruno@clisp.org>
1990         gnulib-tool.py: Simplify imports.
1991         * pygnulib/enums.py: New file, extracted from pygnulib/GLFileSystem.py.
1992         * pygnulib/classes.py: Remove file.
1993         * pygnulib/GLFileSystem.py: Remove class CopyAction. Update imports.
1994         * pygnulib/GLTestDir.py: Update imports.
1995         * pygnulib/GLConfig.py: Update imports and remove 'classes.' prefix.
1996         * pygnulib/main.py: Likewise.
1998 2024-04-01  Collin Funk  <collin.funk1@gmail.com>
2000         gnulib-tool.py: Only check existence for --extract-tests-module.
2001         * pygnulib/main.py (main): Check that the test module exists instead of
2002         looking it up and patching it if diff's are found.
2004 2024-04-01  Collin Funk  <collin.funk1@gmail.com>
2006         gnulib-tool.py: Fix --extract-tests-module with a test module.
2007         * pygnulib/GLModuleSystem.py (GLModule.getTestsName): Return the module
2008         name with '-tests' appended to it unconditionally.
2010 2024-04-01  Collin Funk  <collin.funk1@gmail.com>
2012         gnulib-tool.py: Use case-sensitive sorting for file names.
2013         * pygnulib/GLImport.py (GLImport.prepare): Remove the str.lower key from
2014         the call to sorted().
2016 2024-04-01  Paul Eggert  <eggert@cs.ucla.edu>
2018         getcwd: port better to buggy file systems
2019         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
2020         Time out after 5 seconds.
2022 2024-03-31  Collin Funk  <collin.funk1@gmail.com>
2024         gnulib-tool.py: Add missing quotation mark to reminder.
2025         * pygnulib/GLImport.py (GLImport.execute): Add missing end quote around
2026         file name in AC_CONFIG_FILES reminder.
2028 2024-03-31  Bruno Haible  <bruno@clisp.org>
2030         quotearg: Improve documentation.
2031         * lib/quotearg.h: Refer to specification of $'...' syntax. Document a
2032         limitation of QA_ELIDE_OUTER_QUOTES.
2034 2024-03-31  Bruno Haible  <bruno@clisp.org>
2036         canonicalize[-lgpl] tests: Fix test failure on musl libc.
2037         Reported by Adept's Lab <adeptslab@gmail.com> via Pádraig Brady at
2038         <https://lists.gnu.org/archive/html/bug-coreutils/2024-03/msg00086.html>.
2039         * tests/test-canonicalize-lgpl.c (main): Don't special-case "//"
2040         handling for musl libc.
2041         * tests/test-canonicalize.c (main): Likewise.
2042         * modules/canonicalize-lgpl-tests (Files): Remove m4/musl.m4.
2043         (configure.ac): Don't invoke gl_MUSL_LIBC.
2045 2024-03-31  Collin Funk  <collin.funk1@gmail.com>
2047         gnulib-tool.py: Fix output of 'po/LINGUAS'.
2048         * pygnulib/GLImport.py (GLImport.execute): Only use PO files when
2049         determining the output for po/LINGUAS.
2051 2024-03-31  Collin Funk  <collin.funk1@gmail.com>
2053         gnulib-tool.py: Fix sorting of modules when --local-dir is used.
2054         * pygnulib/GLModuleSystem.py (GLModule.__eq__, GLModule.__ne__)
2055         (GLModule.__ge__, GLModule.__gt__, GLModule.__hash__, GLModule.__le__)
2056         (GLModule.__lt__): Use module names as identifiers instead of paths.
2058 2024-03-31  Bruno Haible  <bruno@clisp.org>
2060         gnulib-tool.py: Make a module's name immediately accessible.
2061         * pygnulib/GLModuleSystem.py (GLModuleSystem.find): Pass the module name
2062         to the GLModule constructor.
2063         (GLModule.__init__): Accept the module's name as argument and store it.
2064         (GLModule.getName): Simplify.
2066 2024-03-30  Collin Funk  <collin.funk1@gmail.com>
2068         gnulib-tool.py: Don't discard the 'dummy' module.
2069         * pygnulib/GLImport.py (GLImport.prepare): Don't set modules stored in
2070         the GLModuleTable until after the 'dummy' module is added.
2071         * pygnulib/GLModuleSystem.py (GLImport.setBaseModules)
2072         (GLImport.setFinalModules, GLImport.setMainModules)
2073         (GLImport.setTestsModules): Don't sort modules since the 'dummy' module
2074         should be placed last in the Makefiles.
2076 2024-03-30  Collin Funk  <collin.funk1@gmail.com>
2078         gnulib-tool.py: Fix reading of 'gl_VC_FILES' in gnulib-cache.m4.
2079         * pygnulib/GLImport.py (GLImport.__init__): Check for an empty string
2080         explicitly in conditional so False is not ignored.
2082 2024-03-30  Bruno Haible  <bruno@clisp.org>
2084         time_r tests: Avoid misleading skip message on native Windows.
2085         * tests/test-localtime_r.c (main): Use the macro FRENCH_TZ.
2086         * tests/test-localtime_r-mt.c (main): Likewise.
2088 2024-03-30  Paul Eggert  <eggert@cs.ucla.edu>
2090         time_r-tests: skip French tests if no Europe/Paris
2091         * tests/test-localtime_r.c (main):
2092         * tests/test-localtime_r-mt.c (main):
2093         If TZ='Europe/Paris' does not work, skip these tests.
2095 2024-03-29  Paul Eggert  <eggert@cs.ucla.edu>
2097         intprops: pacify GCC < 10 -Wsign-compare
2098         Problem reported by Martin Dorey in:
2099         https://savannah.gnu.org/bugs/index.php?65537
2100         * lib/intprops-internal.h (_GL_INT_MULTIPLY_WRAPV):
2101         When working around GCC bug 91450, pacify -Wsign-compare by
2102         casting 0 to the result type.
2104 2024-03-29  Bruno Haible  <bruno@clisp.org>
2106         gnulib-tool: Use bold output on Linux, NetBSD, OpenBSD, OmniOS consoles.
2107         Reported by Pádraig Brady in
2108         <https://lists.gnu.org/archive/html/bug-gnulib/2024-03/msg00399.html>.
2109         * gnulib-tool.sh (func_show_module_list): Use 'tput' to determine the
2110         "bold" capability of terminal types other than xterm*.
2111         * pygnulib/constants.py (get_terminfo_string, bold_escapes): New
2112         functions.
2113         * pygnulib/GLTestDir.py (GLTestDir.execute): Invoke
2114         constants.bold_escapes.
2115         * pygnulib/GLImport.py (GLImport.prepare): Likewise.
2117 2024-03-29  Collin Funk  <collin.funk1@gmail.com>
2119         gnulib-tool.py: Display specified modules in bold.
2120         * pygnulib/GLImport.py (GLImport.prepare): Detect terminals starting
2121         with 'xterm'. Change hexadecimal numbers to octal, matching
2122         gnulib-tool.sh.
2123         * pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
2125 2024-03-29  Bruno Haible  <bruno@clisp.org>
2127         attribute: Work around compiler bug of Oracle cc 12.6.
2128         * m4/gnulib-common.m4 (gl_COMMON_BODY): Expand _GL_ATTRIBUTE_PACKED to
2129         empty on SunPRO C.
2131 2024-03-29  Bruno Haible  <bruno@clisp.org>
2133         gnulib-tool.py: Don't print Makefile.am edits that are already done.
2134         * pygnulib/GLMakefileTable.py (GLMakefileTable): Improve comments.
2135         (GLMakefileTable.__getitem__): Do not clone the result.
2136         * pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am, tests_Makefile_am):
2137         Avoid a KeyError when testing for 'var'.
2138         Use 'del' to remove a dictionary entry.
2139         * pygnulib/GLImport.py (GLImport.execute): Avoid a KeyError when
2140         testing for 'var'. Simplify loop over makefiletable.
2142 2024-03-28  Bruno Haible  <bruno@clisp.org>
2144         fenv-exceptions-state-c99: Fix test failures with Oracle cc 12.6.
2145         * lib/fenv-except-state-set.c (mask387cw): New function.
2146         (fesetexceptflag): Use it on glibc.
2148 2024-03-28  Bruno Haible  <bruno@clisp.org>
2150         mcel tests: Fix test failure with Oracle cc 12.6.
2151         * tests/test-mcel.c (main): Explicitly return 0 at the end.
2153 2024-03-28  Bruno Haible  <bruno@clisp.org>
2155         gnulib-tool: Drop workarounds for Automake < 1.14.
2156         Reported by Collin Funk in
2157         <https://lists.gnu.org/archive/html/bug-gnulib/2024-03/msg00384.html>.
2158         * gnulib-tool.sh (func_emit_lib_Makefile_am): Emit pkgdata_DATA
2159         initialization always.
2160         (func_emit_tests_Makefile_am): Likewise.
2161         (func_import): Don't emit 'AC_REQUIRE([AM_PROG_CC_C_O])' into
2162         gnulib-comp.m4.
2163         (func_create_testdir): Don't emit AM_PROG_CC_C_O into configure.ac.
2164         Bump required Automake version to 1.14.
2165         (func_create_megatestdir): Bump required Automake version to 1.14.
2166         * pygnulib/constants.py: Update comments.
2167         * pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am): Emit pkgdata_DATA
2168         initialization always. Don't return uses_subdirs.
2169         (GLEmiter.tests_Makefile_am): Likewise.
2170         * pygnulib/GLImport.py (GLImport.gnulib_comp): Don't emit
2171         'AC_REQUIRE([AM_PROG_CC_C_O])'.
2172         (GLImport.execute): Update.
2173         * pygnulib/GLTestDir.py (GLTestDir.execute): Don't emit AM_PROG_CC_C_O
2174         into configure.ac. Bump required Automake version to 1.14.
2175         (GLMegaTestDir.execute): Bump required Automake version to 1.14.
2177 2024-03-28  Bruno Haible  <bruno@clisp.org>
2179         pthread-h: Fix override of pthread_spinlock_t with non-GNU compilers.
2180         * m4/pthread-spin.m4 (gl_PTHREAD_SPIN): Define through AC_DEFUN_ONCE.
2181         Require gl_PTHREAD_H_DEFAULTS, not gl_PTHREAD_H.
2182         * m4/pthread_h.m4 (gl_PTHREAD_H): Invoke gl_PTHREAD_SPIN.
2183         * lib/pthread.in.h (pthread_spinlock_t,
2184         GNULIB_defined_pthread_spin_types): Don't define if
2185         HAVE_PTHREAD_SPIN_INIT && !REPLACE_PTHREAD_SPIN_INIT.
2186         * modules/pthread-h (Files): Add m4/pthread-spin.m4.
2188 2024-03-28  Bruno Haible  <bruno@clisp.org>
2190         havelib: Recognize ELF platform despite SunPRO C on Linux.
2191         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Recognize Linux as an ELF
2192         platform, even with the SunPRO C compiler that does not define __ELF__.
2194 2024-03-28  Collin Funk  <collin.funk1@gmail.com>
2196         gnulib-tool.py: Fix missing 'gnulib-cache.m4' in EXTRA_DIST.
2197         * pygnulib/GLMakefileTable.py (GLMakefileTable.parent): Fix the loop
2198         condition so that it matches gnulib-tool.sh.
2200 2024-03-28  Collin Funk  <collin.funk1@gmail.com>
2202         gnulib-tool.py: Fix whitespace in gnulib-comp.m4.
2203         * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippet): Prefix each line with
2204         the indentation string instead of using regular expressions.
2206 2024-03-27  Collin Funk  <collin.funk1@gmail.com>
2208         gnulib-tool.py: Inline 'sed' invocations used on library files.
2209         * pygnulib/GLFileSystem.py (GLFileAssistant.__init__): Update type hints
2210         and docstrings to reflect changes necessary for using re.sub() instead
2211         of 'sed'.
2212         (GLFileAssistant.add_or_update): Use re.sub() instead of invoking 'sed'.
2213         * pygnulib/GLImport.py (GLImport.prepare): Update transformation
2214         variables to reflect changes to GLFileAssistant.
2216 2024-03-27  Bruno Haible  <bruno@clisp.org>
2218         obstack: Work around ICE with Oracle cc 12.6 (regr. 2023-12-01).
2219         * lib/obstack.in.h (__PTR_ALIGN): Use SMALL_PTRDIFF_T, instead of
2220         testing sizeof (ptrdiff_t) < sizeof (void *) at compile time.
2221         * m4/obstack.m4 (gl_FUNC_OBSTACK): Set SMALL_PTRDIFF_T.
2222         * modules/obstack (Makefile.am): Substitute SMALL_PTRDIFF_T.
2224 2024-03-27  Collin Funk  <collin.funk1@gmail.com>
2226         gnulib-tool.py: Add type hints to all functions.
2227         * pygnulib/*.py: Add type hints and remove duplicate function signatures
2228         from docstrings.
2230 2024-03-26  Collin Funk  <collin.funk1@gmail.com>
2232         gnulib-tool.py: Allow the use of both configure.ac and configure.in.
2233         * pygnulib/GLImport.py (GLImport.__init__): Remove redundant checks for
2234         configure.ac and configure.in.
2235         * pygnulib/main.py (main): Check for configure.ac and configure.in
2236         before reading it. Pass it to GLImport using the GLConfig object.
2238 2024-03-26  Bruno Haible  <bruno@clisp.org>
2240         gettime-res: Fix test failure on Solaris 11.4/SPARC.
2241         * lib/gettime-res.c (gettime_res): On Solaris/SPARC, just return 1 ns.
2243 2024-03-25  Bruno Haible  <bruno@clisp.org>
2245         jit/cache: Fix a compilation error on Solaris 11.4/SPARC.
2246         * lib/jit/cache.h: On Solaris, include <stddef.h>.
2248 2024-03-25  Bruno Haible  <bruno@clisp.org>
2250         gnulib-tool.py: Print "executing mkdir ..." messages.
2251         * pygnulib/GLTestDir.py (GLTestDir.execute, GLMegaTestDir.execute):
2252         Print a message before creating a 'build-aux' directory.
2254 2024-03-25  Bruno Haible  <bruno@clisp.org>
2256         gnulib-tool.py: Tweak last change.
2257         * pygnulib/GLImport.py (GLImport.execute): Recognize #if also at the
2258         beginning of an Include snippet.
2260 2024-03-25  Collin Funk  <collin.funk1@gmail.com>
2262         gnulib-tool.py: Fix output of #include directive advice.
2263         * pygnulib/GLImport.py (GLImport.execute): Copy comment from
2264         gnulib-tool.sh with modified variable names. Search the 'Include:' as a
2265         whole instead of each individual line.
2267 2024-03-25  Bruno Haible  <bruno@clisp.org>
2269         gnulib-tool.py: Simplify last change.
2270         * pygnulib/GLImport.py (GLImport.execute): Remove unnecessary list to
2271         set and set to list conversion.
2273 2024-03-25  Collin Funk  <collin.funk1@gmail.com>
2275         gnulib-tool.py: Fix "Creating directory" output.
2276         * pygnulib/GLImport.py (GLImport.execute): Reorder directories. Use
2277         os.path.join instead of joinpath to avoid path normalization.
2279 2024-03-25  Bruno Haible  <bruno@clisp.org>
2281         gnulib-tool.py: Tweak last change.
2282         * pygnulib/GLImport.py (GLImport._update_ignorelist_): Rename some local
2283         variables. Use rstrip built-in function.
2285 2024-03-25  Collin Funk  <collin.funk1@gmail.com>
2287         gnulib-tool.py: Handle removed files in the vc ignore files.
2288         * pygnulib/GLImport.py (GLImport._update_ignorelist_): Handle removed
2289         files. Check whether the original lines should be removed too.
2291 2024-03-24  Collin Funk  <collin.funk1@gmail.com>
2293         gnulib-tool.py: Fix filetable construction for ignorelist.
2294         * pygnulib/GLImport.py (GLImport.execute): Fix typo in dictionary key
2295         that overwrites removed files. Sort ignorelist by directory.
2297 2024-03-24  Bruno Haible  <bruno@clisp.org>
2299         gnulib-tool.py: Use Python raw strings for regular expressions.
2300         * pygnulib/*.py: Use raw string syntax for regular expression pattern
2301         strings and repl strings.
2303 2024-03-24  Bruno Haible  <bruno@clisp.org>
2305         gnulib-tool.py: Bring the output into the right order.
2306         * pygnulib/constants.py (force_output): New function.
2307         (execute): Flush stdout after printing the "executing ..." line.
2308         * pygnulib/GLTestDir.py (GLTestDir.execute, GLMegaTestDir.execute):
2309         Invoke force_output.
2310         * pygnulib/main.py (test, megatest): Likewise.
2312 2024-03-24  Bruno Haible  <bruno@clisp.org>
2314         nstrtime, c-nstrftime: Fix %c directive's result on glibc ≤ 2.30.
2315         * lib/strftime.c (__strftime_internal): On glibc ≤ 2.30, like on NetBSD
2316         and Solaris, remove the last word of the %c directive's result if it
2317         looks like a time zone.
2318         * doc/posix-functions/strftime.texi: Update platforms list.
2320 2024-03-24  Bruno Haible  <bruno@clisp.org>
2322         gnulib-tool.py: Fix output of notices.
2323         * pygnulib/GLTestDir.py (GLTestDir.execute): Don't print notices if the
2324         verbosity is < -1. Strip newlines from each notice.
2325         * pygnulib/GLImport.py (GLImport.prepare): Don't print notices if the
2326         verbosity is < -1. Strip only newlines, not spaces.
2328 2024-03-23  Bruno Haible  <bruno@clisp.org>
2330         gnulib-tool.py: Fix the modules indentation in --create-testdir' output.
2331         * pygnulib/GLTestDir.py (GLTestDir.execute): Use specified_modules
2332         instead of self.config.getModules(), since the latter may be empty.
2334 2024-03-23  Bruno Haible  <bruno@clisp.org>
2336         gnulib-tool.sh: Use a default auxdir in --extract-automake-snippet.
2337         * gnulib-tool.sh (extract-automake-snippet): Set auxdir to 'build-aux'
2338         if it is not set.
2340 2024-03-23  Bruno Haible  <bruno@clisp.org>
2342         gnulib-tool.py: Don't unnecessarily sort an EXTRA_DIST augmentation.
2343         * pygnulib/GLModuleSystem.py
2344         (GLModule.getAutomakeSnippet_Unconditional): Don't remove duplicates or
2345         sort the filenames in the EXTRA_lib_SOURCES augmentation or the
2346         EXTRA_DIST augmentation for build-aux.
2348 2024-03-23  Collin Funk  <collin.funk1@gmail.com>
2350         gnulib-tool.py: Don't print Python bools in gnulib-cache.m4.
2351         * pygnulib/GLImport.py (GLImport.gnulib_cache): Convert Python bools to
2352         lowercase before printing.
2354 2024-03-23  Bruno Haible  <bruno@clisp.org>
2356         gnulib-tool.py: Don't unnecessarily run configure && make in testdirs.
2357         * pygnulib/GLTestDir.py (GLTestDir.execute): Correct the value of
2358         tests_distributed_built_sources.
2360 2024-03-23  Bruno Haible  <bruno@clisp.org>
2362         gnulib-tool.py: Fix autoconf snippets inclusion if --single-configure.
2363         * pygnulib/GLTestDir.py (GLTestDir.execute): Correct the arguments
2364         passed to autoconfSnippets.
2366 2024-03-23  Bruno Haible  <bruno@clisp.org>
2368         gnulib-tool.py: Produce same diagnostics regardless of Automake version.
2369         * pygnulib/GLTestDir.py (_patch_test_driver): Suppress the diagnostics
2370         from 'patch', and instead provide our own diagnostics.
2372 2024-03-23  Bruno Haible  <bruno@clisp.org>
2374         gnulib-tool.py: Print "executing touch config.h.in".
2375         * pygnulib/GLTestDir.py (GLTestDir.execute): Print
2376         "executing touch config.h.in", like gnulib-tool.sh does.
2378 2024-03-23  Bruno Haible  <bruno@clisp.org>
2380         gnulib-tool.py: Refactor.
2381         * pygnulib/GLImport.py (GLImport._done_dir_,
2382         GLImport._update_ignorelist_, GLImport.execute): Rename some variables.
2383         (GLImport._update_ignorelist_): Use constants.substart.
2385 2024-03-23  Collin Funk  <collin.funk1@gmail.com>
2387         gnulib-tool.py: Follow gnulib-tool changes, part 69.
2388         Follow gnulib-tool change
2389         2012-08-19  Bruno Haible  <bruno@clisp.org>
2390         gnulib-tool: Remove old file names from .cvsignore, .gitignore.
2391         * pygnulib/GLImport.py (GLImport._update_ignorelist_): Add
2392         gnulib-comp.m4 to the added file list.
2393         (GLImport.execute): Remove unused variables. Use sets to match the
2394         'join' invocations in gnulib-tool.sh.
2396 2024-03-22  Collin Funk  <collin.funk1@gmail.com>
2398         gnulib-tool.py: Don't remove newlines in testdir's Automake snippets.
2399         * pygnulib/GLTestDir.py (GLTestDir.execute): Don't strip newlines from
2400         Automake snippets.
2402 2024-03-22  Collin Funk  <collin.funk1@gmail.com>
2404         gnulib-tool.py: Fix empty newline output in test directories.
2405         * pygnulib/GLTestDir.py (GLTestDir.execute, GLMegaTestDir.execute):
2406         Match newlines printed by gnulib-tool.sh.
2408 2024-03-22  Collin Funk  <collin.funk1@gmail.com>
2410         gnulib-tool.py: Fix unconditional Automake snippets for non-tests.
2411         * pygnulib/GLModuleSystem.py
2412         (GLModule.getAutomakeSnippet_Unconditional): Fix the file lookups used
2413         to determine the EXTRA_DIST and EXTRA_lib_SOURCES Automake variables.
2414         Update comment to match gnulib-tool.sh.
2415         * pygnulib/constants.py (filter_filelist): Fix misleading return type in
2416         docstring. Return an empty string if no files were found.
2418 2024-03-22  Bruno Haible  <bruno@clisp.org>
2420         gnulib-tool.sh: Produce same diagnostics regardless of Automake version.
2421         * gnulib-tool.sh (func_create_testdir, func_create_megatestdir):
2422         Suppress the diagnostics from 'patch', and instead provide our own
2423         diagnostics.
2425 2024-03-22  Bruno Haible  <bruno@clisp.org>
2427         gnulib-tool: Remove test-driver.{orig,rej} if patching succeeded.
2428         * gnulib-tool.sh (func_create_testdir, func_create_megatestdir): After
2429         a 'patch' command failed, remove the leftover files test-driver.orig and
2430         test-driver.rej.
2431         * pygnulib/GLTestDir.py (_patch_test_driver): Likewise.
2433 2024-03-22  Bruno Haible  <bruno@clisp.org>
2435         gnulib-tool.py: Fix an error in --create-testdir.
2436         * pygnulib/GLTestDir.py (GLTestDir.execute): Fix chdir calls at the end.
2438 2024-03-21  Collin Funk  <collin.funk1@gmail.com>
2440         gnulib-tool.sh: Avoid a redundant space in gl_AVOID in gnulib-cache.m4.
2441         * gnulib-tool.sh (avoidlist): Don't add a space before the first module
2442         name.
2444 2024-03-21  Collin Funk  <collin.funk1@gmail.com>
2446         gnulib-tool.py: Fix --extract-recursive-link-directive.
2447         * pygnulib/GLModuleSystem.py (GLModule.getLinkDirectiveRecursively):
2448         Check the 'Link:' section of each individual module. Use sets instead of
2449         lists to remove duplicates.
2451 2024-03-21  Collin Funk  <collin.funk1@gmail.com>
2453         gnulib-tool.py: Make --extract-filelist match gnulib-tool.sh.
2454         * pygnulib/GLModuleSystem.py (GLModule.getFiles_Raw): New function which
2455         returns the 'Files:' section from a module unchanged.
2456         (GLModule.getFiles): Use it.
2457         * pygnulib/main.py (main): Use it and match the output of gnulib-tool.sh
2458         for --extract-filelist.
2460 2024-03-21  Bruno Haible  <bruno@clisp.org>
2462         gnulib-tool: Make the .gitignore files handling more consistent.
2463         * gnulib-tool.sh (func_done_dir): Ignore the presence or absence of a
2464         .git directory if there is a .gitignore file in the same place.
2465         * pygnulib/GLImport.py (GLImport._done_dir_): Likewise.
2467 2024-03-20  Bruno Haible  <bruno@clisp.org>
2469         gnulib-tool.sh: Undocument the --[no-]cache-modules options.
2470         Reported by Collin Funk in
2471         <https://lists.gnu.org/archive/html/bug-gnulib/2024-03/msg00234.html>.
2472         Rationale:
2473         <https://lists.gnu.org/archive/html/bug-gnulib/2024-03/msg00243.html>.
2474         * gnulib-tool.sh (func_usage): Don't mention --cache-modules,
2475         --no-cache-modules.
2477 2024-03-20  Collin Funk  <collin.funk1@gmail.com>
2479         gnulib-tool.py: Don't print empty Automake snippets.
2480         * pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am)
2481         (GLEmiter.tests_Makefile_am): Handle empty strings when checking if the
2482         snippet should be printed.
2484 2024-03-19  Collin Funk  <collin.funk1@gmail.com>
2486         gnulib-tool.py: Follow gnulib-tool changes, part 68.
2487         Follow gnulib-tool change
2488         2022-07-31  Akim Demaille  <akim@lrde.epita.fr>
2489         gnulib-tool: add support for --automake-subdir-tests
2490         * pygnulib/main.py (main): Add support for --automake-subdir-tests.
2491         * pygnulib/GLInfo.py (GLInfo.usage): Add --automake-subdir-tests to the
2492         help message.
2493         * pygnulib/GLConfig.py (GLConfig.__init__): Add 'automake_subdir_tests'
2494         to the parameter list. Initialize it.
2495         (GLConfig.default): Default --automake-subdir-tests to False.
2496         (GLConfig.resetAutomakeSubdir): Fix misleading docstring.
2497         (GLConfig.getAutomakeSubdirTests, GLConfig.setAutomakeSubdirTests)
2498         (GLConfig.resetAutomakeSubdirTests): New functions to manipulate and
2499         access whether --automake-subdir-tests is in use.
2500         * pygnulib/GLEmiter.py (GLEmiter.shellvars_init)
2501         (GLEmiter.initmacro_end): Use sourcebase when handling tests and
2502         --automake-subdir-tests is given.
2503         * pygnulib/GLError.py (GLError.__repr__): Update error message to
2504         include --automake-subdir-tests.
2505         * pygnulib/GLImport.py (GLImport.__init__): Check for the
2506         'subdir-objects' Automake option when --automake-subdir-tests is in use.
2507         (GLImport.actioncmd): Add --automake-subdir-tests to the actioncmd
2508         printed in generated files.
2510 2024-03-19  Collin Funk  <collin.funk1@gmail.com>
2512         gnulib-tool.py: Fix incorrect assignment operator.
2513         * pygnulib/GLImport.py (GLImport.actioncmd): Use '+=' instead of '=' to
2514         append the string to the actioncmd instead of overwriting it.
2516 2024-03-19  Bruno Haible  <bruno@clisp.org>
2518         gnulib-tool: Make it work in the test suite.
2519         * gnulib-tool.sh (gnulib_dir): Make absolute.
2520         (func_create_megatestdir): If .git/refs/heads/master does not exist, use
2521         ChangeLog instead.
2522         * pygnulib/main.py (main): Make gnulib_dir absolute.
2523         * pygnulib/GLTestDir.py (GLMegaTestDir.execute): If
2524         .git/refs/heads/master does not exist, use ChangeLog instead.
2526 2024-03-19  Collin Funk  <collin.funk1@gmail.com>
2528         gnulib-tool.py: Make sure temporary files are removed.
2529         * pygnulib/GLImport.py (GLImport.execute): Fix nesting of statement so
2530         that both temporary files are removed.
2532 2024-03-19  Collin Funk  <collin.funk1@gmail.com>
2534         gnulib-tool.py: Follow gnulib-tool changes, part 67.
2535         Follow gnulib-tool change
2536         2022-03-01  Paul Eggert  <eggert@cs.ucla.edu>
2537         Create lib/Makefile.am after gnulib-comp.m4
2538         * pygnulib/GLImport.py (GLImport.execute): Create library makefile after
2539         creating gnulib-comp.m4.
2541 2024-03-19  Collin Funk  <collin.funk1@gmail.com>
2543         gnulib-tool.py: Follow gnulib-tool changes, part 66.
2544         Follow gnulib-tool change
2545         2021-12-25  Bruno Haible  <bruno@clisp.org>
2546         gnulib-tool: Fix handling of module libtextstyle-optional.
2547         * pygnulib/GLModuleSystem.py (GLModule.repeatModuleInTests): New function.
2548         * pygnulib/GLEmiter.py (GLEmiter.tests_Makefile_am): Use it for creating
2549         the tests/Makefile.am.
2550         * pygnulib/GLTestDir.py (GLTestDir.execute): Use it when creating the
2551         file list.
2553 2024-03-19  Collin Funk  <collin.funk1@gmail.com>
2555         gnulib-tool.py: Follow gnulib-tool changes, part 65.
2556         Follow gnulib-tool change
2557         2021-12-19  Bruno Haible  <bruno@clisp.org>
2558         gnulib-tool: Don't insist on ACLOCAL_AMFLAGS.
2559         * pygnulib/GLImport.py (GLImport.execute): Don't add extra '-I' before
2560         m4 directory in ACLOCAL_AMFLAGS. Prefer '0' instead of 'int()'. Mention
2561         the use of AC_CONFIG_MACRO_DIRS in configure.ac as an alternative to
2562         augmenting ACLOCAL_AMFLAGS.
2563         * pygnulib/main.py (main): To find the m4 directories, look also for
2564         AC_CONFIG_MACRO_DIR and AC_CONFIG_MACRO_DIRS invocations in
2565         configure.ac. Remove unnecessary call to 'joinpath' since it accepts a
2566         variable length of arguments.
2568 2024-03-18  Bruno Haible  <bruno@clisp.org>
2570         gnulib-tool.py: Tweak last change.
2571         * pygnulib/GLModuleSystem.py (GLModule.isTests, GLModule.isNonTests):
2572         Update comments.
2574 2024-03-18  Collin Funk  <collin.funk1@gmail.com>
2576         gnulib-tool.py: Follow gnulib-tool changes, part 64.
2577         Follow gnulib-tool change
2578         2021-12-25  Bruno Haible  <bruno@clisp.org>
2579         gnulib-tool: Respect applicability 'all' without --single-configure.
2580         * pygnulib/GLModuleSystem.py (GLModule.isTests): Treat modules with
2581         applicability 'all' like 'tests' modules, not like 'main' modules.
2582         (GLModule.isNonTests): Treat all modules not ending in '-tests' as
2583         non-test modules.
2584         (GLModule.getApplicability): Don't use GLModule.isTests(). Because it
2585         depends on the result of this function, using it would cause a
2586         RecursionError exception.
2587         (GLModule.getDependencies): Respect the difference between
2588         module.isTests(), module.isNonTests(), and
2589         module.getName().endswith('-tests').
2590         (GLModule.getAutomakeSnippet_Unconditional, GLModule.getLicense)
2591         (GLModuleTable.add_dummy): Likewise.
2592         * pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am): Likewise.
2594 2024-03-17  Bruno Haible  <bruno@clisp.org>
2596         gnulib-tool.py: Handle empty lists of lines consistently.
2597         * pygnulib/constants.py (lines_to_multiline): New function.
2598         (nlremove): Remove unused function.
2599         * pygnulib/GLEmiter.py (_eliminate_NMD): Use lines_to_multiline instead
2600         of the '\n'.join idiom.
2601         (GLEmiter.autoconfSnippet, GLEmiter.autoconfSnippets,
2602         GLEmiter.lib_Makefile_am): Likewise.
2603         * pygnulib/GLImport.py (GLImport._update_ignorelist_, GLImport.execute):
2604         Likewise.
2605         * pygnulib/GLModuleSystem.py (GLModule.getDependenciesRecursively,
2606         GLModule.getLinkDirectiveRecursively, GLModuleTable.remove_if_blocks):
2607         Likewise.
2608         * pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
2609         * pygnulib/main.py (main): Likewise.
2611 2024-03-17  Collin Funk  <collin.funk1@gmail.com>
2613         gnulib-tool.py: Follow gnulib-tool changes, part 63.
2614         Follow gnulib-tool change
2615         2020-12-28  Bruno Haible  <bruno@clisp.org>
2616         gnulib-tool: Fix logic whether to add a dummy.c.
2617         * pygnulib/GLModuleSystem.py (GLModuleTable.remove_if_blocks): New
2618         function.
2619         (GLModuleTable.add_dummy): Use it to eliminate all conditional
2620         statements from the automake snippet.
2622 2024-03-17  Collin Funk  <collin.funk1@gmail.com>
2624         gnulib-tool.py: Don't print extra newlines.
2625         * pygnulib/GLEmiter.py (GLEmiter.initmacro_end): Don't print extra
2626         newline that are not printed by gnulib-tool.sh.
2628 2024-03-17  Collin Funk  <collin.funk1@gmail.com>
2630         gnulib-tool.py: Follow gnulib-tool changes, part 62.
2631         Follow gnulib-tool change
2632         2020-02-22  Bruno Haible  <bruno@clisp.org>
2633         gnulib-tool: Ensure copied files are writable.
2634         * pygnulib/constants.py (ensure_writable): New function. Make sure files
2635         are writable.
2636         (symlink_relative, hardlink): Use it.
2637         * pygnulib/GLFileSystem.py (GLFileSystem.lookup)
2638         (GLFileAssistant.add_or_update): Likewise.
2639         * pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
2640         * pygnulib/main.py (main): Likewise.
2642 2024-03-17  Bruno Haible  <bruno@clisp.org>
2644         gnulib-tool: Add undocumented option --gnulib-dir.
2645         * gnulib-tool.sh: Accept --gnulib-dir=... option.
2646         * pygnulib/constants.py (init_DIRS): New function.
2647         * pygnulib/main.py (main): Accept --gnulib-dir=... option. Invoke
2648         init_DIRS. Expect .git directory to be present in DIRS['root'], not
2649         APP['root'].
2650         * pygnulib/GLImport.py (GLImport.execute): Use DIRS['root'], not
2651         APP['root'].
2653 2024-03-17  Collin Funk  <collin.funk1@gmail.com>
2655         gnulib-tool.py: Follow gnulib-tool changes, part 61.
2656         Follow gnulib-tool change
2657         2022-01-09  Bruno Haible  <bruno@clisp.org>
2658         Remove influence of Automake conditionals on conditional dependencies.
2659         * pygnulib/GLModuleSystem.py (GLModuleTable.transitive_closure): Don't
2660         inhibit conditional dependencies processing on a module that uses an
2661         Automake conditional.
2663 2024-03-17  Collin Funk  <collin.funk1@gmail.com>
2665         gnulib-tool.py: Follow gnulib-tool changes, part 60.
2666         Follow gnulib-tool change
2667         2019-11-18  Bruno Haible  <bruno@clisp.org>
2668         gnulib-tool: Fix build error on macOS with --conditional-dependencies.
2669         * pygnulib/GLModuleSystem.py (GLModuleTable.add_dummy): Ignore modules
2670         that are conditionally enabled.
2672 2024-03-17  Collin Funk  <collin.funk1@gmail.com>
2674         gnulib-tool.py: Don't try to remove files that don't exist.
2675         * pygnulib/GLFileSystem.py (GLFileSystem.add_or_update): Check if the
2676         temporary file exists before trying to remove it.
2678 2024-03-16  Paul Eggert  <eggert@cs.ucla.edu>
2680         renameatu: support RENAME_EXCHANGE on macOS
2681         * lib/renameatu.c (renameat2ish, renameatu) [RENAME_SWAP]:
2682         Use macOS RENAME_SWAP to implement GNU/Linux RENAME_EXCHANGE.
2683         * tests/test-renameatu.c (main): Add a test for RENAME_EXCHANGE.
2685 2024-03-16  Collin Funk  <collin.funk1@gmail.com>
2687         gnulib-tool.py: Follow gnulib-tool changes, part 59.
2688         Follow gnulib-tool change
2689         2017-10-29  Bruno Haible  <bruno@clisp.org>
2690         gnulib-tool: Avoid unnecessary config.h.in remaking in testdirs.
2691         * pygnulib/GLTestDir.py (GLTestDir.execute): Touch the 'config.h.in'
2692         file after executing 'autoheader' to update it's timestamps.
2694 2024-03-16  Collin Funk  <collin.funk1@gmail.com>
2696         gnulib-tool.py: Fix 'git update-index' call when using hard links.
2697         * pygnulib/main.py: Fix conditional used to check whether 'git
2698         update-index' should be called. Only catch FileNotFoundError exceptions
2699         thrown when no 'git' program exists.
2701 2024-03-16  Collin Funk  <collin.funk1@gmail.com>
2703         gnulib-tool.py: Coding style: Avoid not().
2704         * pygnulib/GLModuleSystem.py (isNonTests): Avoid not(). Write
2705         'not condition' instead of 'not(condition)'.
2707 2024-03-16  Bruno Haible  <bruno@clisp.org>
2709         gnulib-tool.py: Coding style: Avoid bool().
2710         * pygnulib/GLModuleSystem.py (GLModule): Write False instead of bool().
2712 2024-03-16  Collin Funk  <collin.funk1@gmail.com>
2714         gnulib-tool.py: Follow gnulib-tool changes, part 58.
2715         Follow gnulib-tool change
2716         2017-05-21  Bruno Haible  <bruno@clisp.org>
2717         gnulib-tool: Add options to create hard links.
2718         * pygnulib/GLConfig.py (GLConfig.__init__): Add 'copymode' and
2719         'lcopymode' to the parameter list. Initialize them.
2720         (GLConfig.default): Don't use symbolic or hard links by default.
2721         (GLConfig.checkCopyMode, GLConfig.setCopyMode, GLConfig.resetCopyMode):
2722         New functions to modify and check the method for copying non --local-dir
2723         files.
2724         (GLConfig.checkLCopyMode, GLConfig.setLCopyMode)
2725         (GLConfig.resetLCopyMode): New functions to modify and check the method
2726         for copying --local-dir files.
2727         (GLConfig.checkSymbolic, GLConfig.resetSymbolic, GLConfig.setSymbolic)
2728         (GLConfig.checkLSymbolic, GLConfig.resetLSymbolic)
2729         (GLConfig.setLSymbolic): Remove unused functions. The functionality of
2730         these are now implemented in the *CopyMode() and *LCopyMode() variants.
2731         * pygnulib/GLFileSystem.py (CopyAction.Hardlink): New Enum value to
2732         describe hard links.
2733         (GLFileSystem.shouldLink): Check if hard links should be used.
2734         (GLFileAssistant.add, GLFileAssistant.update): Try to hard link if
2735         enabled. Copy the file if linking fails.
2736         (GLFileAssistant.add_or_update): Remove temporary files unconditionally.
2737         * pygnulib/GLInfo.py (GLInfo.usage): Document new options in the usage
2738         message.
2739         * pygnulib/GLTestDir.py (GLTestDir.execute): Try to hard link if
2740         enabled. Copy the file if linking fails.
2741         * pygnulib/classes.py: Importy the CopyAction Enum.
2742         * pygnulib/constants.py (hardlink): New function based on
2743         symlink_relative.
2744         * pygnulib/main.py (main): Add new options --hardlink and
2745         --local-hardlink. Invoke 'git update-index --refresh' to mitigate the
2746         effects of the hard links on git.
2748 2024-03-16  Bruno Haible  <bruno@clisp.org>
2750         gnulib-tool.sh: Make --local-dir options in gnulib-cache.m4 look nicer.
2751         * gnulib-tool.sh (func_import): Append the --local-dir=... options
2752         through func_append_actionarg.
2754 2024-03-16  Bruno Haible  <bruno@clisp.org>
2756         gnulib-tool.py: Don't lose the gl_LGPL value from gnulib-cache.m4.
2757         Reported by Simon Josefsson in
2758         <https://lists.gnu.org/archive/html/bug-gnulib/2024-03/msg00152.html>.
2759         * pygnulib/GLConfig.py (GLConfig.default): For the 'lgpl' property,
2760         return None, not False.
2762 2024-03-15  Bruno Haible  <bruno@clisp.org>
2764         gnulib-tool.py: Don't lose the gl_LOCAL_DIR value from gnulib-cache.m4.
2765         Reported by Simon Josefsson in
2766         <https://lists.gnu.org/archive/html/bug-gnulib/2024-03/msg00152.html>.
2767         * pygnulib/GLConfig.py (GLConfig.default): For the 'localpath' property,
2768         return [], not ''.
2770 2024-03-15  Bruno Haible  <bruno@clisp.org>
2772         gnulib-tool: Enhance last patch.
2773         * gnulib-tool: If gnulib-tool.sh failed but gnulib-tool.py succeeded,
2774         report that and don't erase the outputs and log files.
2776 2024-03-14  Collin Funk  <collin.funk1@gmail.com>
2778         gnulib-tool.py: Follow gnulib-tool changes, part 57.
2779         Follow gnulib-tool change
2780         2019-01-04  Bruno Haible  <bruno@clisp.org>
2781         gnulib-tool: New option --extract-recursive-link-directive.
2782         * pygnulib/GLModuleSystem.py (GLModule.getDependenciesRecursively): New
2783         function. Implements the --extract-recursive-dependencies option.
2784         (GLModule.getLinkDirectiveRecursively): New function. Implements the
2785         --extract-recursive-link-directive.
2786         * pygnulib/main.py (main): Add the --extract-recursive-dependencies and
2787         --extract-recursive-link-directive options.
2788         * pygnulib/GLInfo.py (GLInfo.usage): Add new options to help message.
2790 2024-03-14  Bruno Haible  <bruno@clisp.org>
2792         gnulib-tool: Obey environment variable GNULIB_TOOL_IMPL.
2793         * gnulib-tool.sh: Renamed from gnulib-tool.
2794         * gnulib-tool: New file, based on gnulib-tool.sh.
2795         * gnulib-tool.py: Check the Python version.
2797 2024-03-14  Collin Funk  <collin.funk1@gmail.com>
2799         gnulib-tool.py: Fix write failure due to bad sourcebase.
2800         * pygnulib/constants.py (cleaner): Only call strip() on string objects.
2801         * pygnulib/main.py (main): Fix parsing of AMLOCAL_AMFLAGS from
2802         Makefile.am. Add some comments from gnulib-tool.
2804 2024-03-13  Bruno Haible  <bruno@clisp.org>
2806         sig2str tests: Refactor.
2807         * tests/test-sig2str.c (test_sig2str, test_str2sig): New functions,
2808         extracted from main.
2809         (main): Invoke them.
2811 2024-03-13  Collin Funk  <collin.funk1@gmail.com>
2813         sig2str: Add tests.
2814         * tests/test-sig2str.c: New file.
2815         * modules/sig2str-tests: New file.
2817 2024-03-12  Collin Funk  <collin.funk1@gmail.com>
2819         gnulib-tool.py: Follow gnulib-tool changes, part 56.
2820         Follow gnulib-tool change
2821         2021-04-26  Paul Eggert  <eggert@cs.ucla.edu>
2822         gnulib-tool: port better to current Autoconf
2823         * pygnulib/GLImport.py (GLImport.execute): Remove exit() call before
2824         printing reminders. Suggest replacing AC_PROG_CC_STDC and
2825         AC_PROG_CC_C99, as per current Autoconf.
2827 2024-03-12  Collin Funk  <collin.funk1@gmail.com>
2829         gnulib-tool.py: Fix last commit.
2830         * pygnulib/GLEmiter.py (GLEmiter.initmacro_end): Silence Python
2831         warnings about invalid escape. Make sure to escape the backslash
2832         character we want to print.
2834 2024-03-12  Collin Funk  <collin.funk1@gmail.com>
2836         gnulib-tool.py: Follow gnulib-tool changes, part 55.
2837         Follow gnulib-tool changes
2838         2022-01-05  Bruno Haible  <bruno@clisp.org>
2839         gnulib-tool: Avoid known warnings that reflect Gnulib's coding style.
2840         2022-01-08  Bruno Haible  <bruno@clisp.org>
2841         gnulib-tool: Remove all *.Po files upon distclean (regr. 2022-01-05).
2842         * pygnulib/GLEmiter.py (GLEmiter.initmacro_end): Collect the *.Po or
2843         *.Plo files to remove into an AC_SUBSTed variable gl_LIBOBJDEPS. Use
2844         Python f-strings instead of string replacements.
2845         (GLEmiter.lib_Makefile_am): Add the GL_CFLAG_GNULIB_WARNINGS to the
2846         CFLAGS of all the compilation units of the library. Extend the distclean
2847         and maintainer-clean rules.
2848         (GLEmiter.tests_Makefile_am): Add the GL_CFLAG_GNULIB_WARNINGS to the
2849         CFLAGS.
2850         * pygnulib/GLImport.py (GLImport.gnulib_comp): Emit an invocation of
2851         gl_CC_GNULIB_WARNINGS.
2853 2024-03-11  Collin Funk  <collin.funk1@gmail.com>
2855         gnulib-tool.py: Follow gnulib-tool changes, part 54.
2856         Follow gnulib-tool change
2857         2021-12-24  Paul Eggert  <eggert@cs.ucla.edu>
2858         maint: avoid empty lines in recipes
2859         * pygnulib/GLEmiter.py (_eliminate_NMD_from_line): Eliminate occurrences
2860         of @!NMD@ too. Document parameters in docstring.
2861         (_eliminate_NMD): Update docstring to reflect changes. Document
2862         parameters.
2864 2024-03-11  Bruno Haible  <bruno@clisp.org>
2866         gnulib-tool.py: Tweak last commit.
2867         * pygnulib/GLEmiter.py (_eliminate_NMD): Don't add an extra newline when
2868         the result should be empty.
2870 2024-03-11  Collin Funk  <collin.funk1@gmail.com>
2872         gnulib-tool.py: Follow gnulib-tool changes, part 53.
2873         Follow gnulib-tool change
2874         2021-12-21  Bruno Haible  <bruno@clisp.org>
2875         Optimize redundant 'mkdir -p .' invocations.
2876         * pygnulib/GLEmiter.py (_eliminate_NMD_from_line): New private function
2877         to remove @NMD@ occurrences from the line of an Automake snippet.
2878         (_eliminate_NMD): New private function which uses
2879         _eliminate_NMD_from_line on each line of the Automake snippet.
2880         (GLEmiter.lib_Makefile_am, GLEmiter.tests_Makefile_am): Use
2881         _eliminate_NMD on the Automake snippet.
2883 2024-03-11  Bruno Haible  <bruno@clisp.org>
2885         gnulib-tool.py: Make some code more straightforward.
2886         * pygnulib/GLImport.py (GLImport.__init__): Reorder assignments and
2887         conditions slightly.
2889 2024-03-11  Collin Funk  <collin.funk1@gmail.com>
2891         gnulib-tool.py: Follow gnulib-tool changes, part 52.
2892         Follow gnulib-tool change
2893         2021-12-15  Bruno Haible  <bruno@clisp.org>
2894         automake-subdir support: Look for 'subdir-objects' also in configure.ac.
2895         * pygnulib/GLImport.py (GLImport.__init__): Check for 'subdir-objects'
2896         in the AM_INIT_AUTOMAKE macro of configure.ac.
2898 2024-03-10  Bruno Haible  <bruno@clisp.org>
2900         gnulib-tool.py: Tweak last commit.
2901         * pygnulib/GLEmiter.py (GLEmiter.initmacro_end): Avoid an implicit str
2902         to bool conversion.
2903         * pygnulib/GLImport.py (GLImport.__init__): Add a comment. Don't allow
2904         a '|' in place of whitespace. Don't emit redundant gl_source_base
2905         assignments.
2907 2024-03-10  Collin Funk  <collin.funk1@gmail.com>
2909         gnulib-tool.py: Follow gnulib-tool changes, part 51.
2910         Follow gnulib-tool change
2911         2021-12-15  Bruno Haible  <bruno@clisp.org>
2912         Accommodate non-recursive Automake in a less hacky way.
2913         * pygnulib/GLConfig.py (GLConfig.__init__): Add 'automake_subdir' to the
2914         parameter list.
2915         (GLConfig.default): Set the default value of automake_subdir to a
2916         boolean False.
2917         (GLConfig.getAutomakeSubdir, GLConfig.setAutomakeSubdir)
2918         (GLConfig.resetAutomakeSubdir): New functions to access and manipulate
2919         the automake_subdir option.
2920         * pygnulib/GLEmiter.py (GLEmiter.shellvars_init): New function.
2921         (GLEmiter.initmacro_end): Add second parameter 'gentests'. Use it to prefix each
2922         object file name in *_LIBOBJS and *_LTLIBOBJS.
2923         * pygnulib/GLError.py (GLError.__init__, GLError.__repr__): Add new
2924         error for if --automake-subdir is used without the 'subdir-objects'
2925         Automake option.
2926         * pygnulib/GLImport.py (GLImport.__init__): Check for 'subdir-objects'
2927         in Makefile.am.
2928         (GLImport.actioncmd): Emit --automake-subdir in actioncmd.
2929         (GLImport.gnulib_cache): Add gl_AUTOMAKE_SUBDIR to gnulib-cache.m4 if
2930         --automake-subdir is used.
2931         (GLImport.gnulib_comp): Update calls to GLEmiter.initmacro_end. Call
2932         GLEmiter.shellvars_init.
2933         (GLImport.execute): Likewise. Use the build-aux/prefix-gnulib-mk script.
2934         * pygnulib/GLInfo.py (GLInfo.usage): Add --automake-subdir to the usage
2935         message.
2936         * pygnulib/GLTestDir.py (GLTestDir.execute): Update calls to
2937         GLEmiter.initmacro_end. Call GLEmiter.shellvars_init.
2938         * pygnulib/main.py (main): Add support for --automake-subdir.
2940 2024-03-10  Collin Funk  <collin.funk1@gmail.com>
2942         gnulib-tool: Don't remove comments referencing @NMD@, part 2.
2943         * gnulib-tool (func_emit_tests_Makefile_am): Replace lines that start
2944         with @NMD@ or @!NMD@ instead of lines that contain them.
2946 2024-03-10  Bruno Haible  <bruno@clisp.org>
2948         gnulib-tool.py: One more comment regarding coding style.
2949         * pygnulib/main.py: Add comment regarding conditional expressions.
2951 2024-03-09  Collin Funk  <collin.funk1@gmail.com>
2953         gnulib-tool.py: Follow gnulib-tool changes, part 50.
2954         Follow gnulib-tool changes
2955         2021-12-12  Bruno Haible  <bruno@clisp.org>
2956         gnulib-tool: Try to support non-recursive-gnulib-prefix-hack with tests.
2957         2021-12-13  Bruno Haible  <bruno@clisp.org>
2958         gnulib-tool: Fix mistake in last commit.
2959         * pygnulib/GLImport.py (GLImport.gnulib_comp): Expect the filetable as a
2960         parameter instead of a list of all files. Add type checks. Invoke
2961         AC_CONFIG_LIBOBJ_DIR based on the location of alloca.c.
2962         (GLImport.execute): Adjust call to GLImport.gnulib_comp to reflect
2963         parameter changes.
2965 2024-03-09  Collin Funk  <collin.funk1@gmail.com>
2967         gnulib-tool.py: Follow gnulib-tool changes, part 49.
2968         Follow gnulib-tool change
2969         2021-08-07  Bruno Haible  <bruno@clisp.org>
2970         gnulib-tool: Add support for Automake 1.16.4.
2971         * pygnulib/GLTestDir.py (_patch_test_driver): If patching
2972         build-aux/test-driver fails with build-aux/test-driver.diff try again
2973         with build-aux/test-driver-1.16.3.diff.
2975 2024-03-09  Bruno Haible  <bruno@clisp.org>
2977         unistr/u16-to-u32: Relicense under LGPLv2+.
2978         * modules/unistr/u16-to-u32 (License): Change to LGPLv2+.
2979         * lib/unistr/u16-to-u32.c: Update license notice.
2981         unistr/u16-mbtoucr: Relicense under LGPLv2+.
2982         * modules/unistr/u16-mbtoucr (License): Change to LGPLv2+.
2983         * lib/unistr/u16-mbtoucr.c: Update license notice.
2985         unistr/u16-strlen: Relicense under LGPLv2+.
2986         * modules/unistr/u16-strlen (License): Change to LGPLv2+.
2987         * lib/unistr/u16-strlen.c: Update license notice.
2989 2024-03-09  Bruno Haible  <bruno@clisp.org>
2991         parse-datetime: Simplify.
2992         * modules/parse-datetime (Makefile.am): Don't generate
2993         parse-datetime-gen.h.
2995 2024-03-09  Bruno Haible  <bruno@clisp.org>
2997         parse-datetime: Simplify.
2998         * lib/parse-datetime.y (yyerror): Change return type to 'void'.
3000 2024-03-09  Collin Funk  <collin.funk1@gmail.com>
3002         gnulib-tool.py: Follow gnulib-tool changes, part 48.
3003         Follow gnulib-tool change
3004         2019-01-23  Bruno Haible  <bruno@clisp.org>
3005         gnulib-tool: Support running testdirs on Android.
3006         * pygnulib/GLError.py (GLError.__init__, GLError.__repr__): Add errno 20
3007         to print an error if patching build-aux/test-driver fails.
3008         * pygnulib/main.py (main): Likewise.
3009         * pygnulib/GLTestDir.py (_patch_test_driver): New private function which
3010         runs patch on build-aux/test-driver with build-aux/test-driver.diff.
3011         (GLTestDir.execute, GLMegaTestDir.execute): Check for
3012         build-aux/test-driver in each testdir and patch it after running
3013         automake.
3015 2024-03-08  Collin Funk  <collin.funk1@gmail.com>
3017         gnulib-tool: Don't remove comments referencing @NMD@.
3018         * gnulib-tool (func_emit_lib_Makefile_am): Replace lines that start with
3019         @NMD@ or @!NMD@ instead of lines that contain them.
3021 2024-03-08  Collin Funk  <collin.funk1@gmail.com>
3023         gnulib-tool.py: Follow gnulib-tool changes, part 47.
3024         Follow gnulib-tool changes
3025         2021-12-15  Bruno Haible  <bruno@clisp.org>
3026         Fix creation of build directories with non-recursive-gnulib-prefix-hack.
3027         2021-12-18  Bruno Haible  <bruno@clisp.org>
3028         Fix support for --gnu-make in tests (regression 2021-12-15).
3029         * pygnulib/GLEmiter.py (_CONVERT_TO_GNU_MAKE): New variable which is a
3030         list of tuples which are used with re.sub.
3031         (_convert_to_gnu_make): New function which converts an input snippet
3032         from Automake to GNU Make syntax using the regular expressions stored in
3033         _CONVERT_TO_GNU_MAKE.
3034         (GLEmiter.lib_Makefile_am): Use _convert_to_gnu_make. Replace '%reldir%'
3035         tokens.
3036         (GLEmiter.tests_Makefile_am): Likewise.
3038 2024-03-07  Collin Funk  <collin.funk1@gmail.com>
3040         gnulib-tool.py: Fix errors when executing --create-megatestdir.
3041         * pygnulib/GLTestDir.py (GLMegaTestDir.execute): Create a testdir for
3042         each module in its own subdirectory. Create a testdir with all modules
3043         in 'ALL'. Add missing join call on str object. Don't emit 'configure.ac'
3044         into 'Makefile.am'. Make sure commands are executed in the proper
3045         directory.
3047 2024-03-07  Collin Funk  <collin.funk1@gmail.com>
3049         gnulib-tool.py: Follow gnulib-tool changes, part 46.
3050         Follow gnulib-tool change
3051         2022-02-22  Simon Josefsson  <simon@josefsson.org>
3052         gnulib-tool: Bump automake dependency.
3053         * pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am)
3054         (GLEmiter.tests_Makefile_am): Require Automake >= 1.14, for %reldir%
3055         support.
3057 2024-03-07  Collin Funk  <collin.funk1@gmail.com>
3059         gnulib-tool.py: Follow gnulib-tool changes, part 45.
3060         Follow gnulib-tool changes
3061         2021-12-12  Bruno Haible  <bruno@clisp.org>
3062         gnulib-tool: Support different basenames for the lib/,tests/ Makefiles.
3063         2022-01-08  Bruno Haible  <bruno@clisp.org>
3064         gnulib-tool: Fix "Don't forget" messages (regression 2021-12-12).
3065         * pygnulib/GLConfig.py (GLConfig.__init__): Add 'tests_makefile_name'
3066         argument.
3067         (GLConfig.getMakefileName, GLConfig.setMakefileName)
3068         (GLConfig.resetMakefileName): Remove references to tests Makefile.am in
3069         doc strings.
3070         (GLConfig.getTestsMakefileNamem, GLConfig.setTestsMakefileName)
3071         (GLConfig.resetTestsMakefileName): New methods used to access value
3072         passed with the '--tests-makefile-name' option.
3073         * pygnulib/GLImport.py (GLImport.__init__): Check for
3074         'gl_TESTS_MAKEFILE_NAME' in cache.
3075         (GLImport.actioncmd): Output --tests-makefile-name when describing
3076         gnulib-tool invocation.
3077         (GLImport.gnulib_cache): Output 'gl_TESTS_MAKEFILE_NAME' to cache.
3078         (GLImport.execute): Use two local variables, source_makefile_am and
3079         tests_makefile_am, which are passed to gnulib-tool.py or given default
3080         values.
3081         * pygnulib/GLInfo.py (GLInfo.usage): Add '--tests-makefile-name' to
3082         usage message.
3083         * pygnulib/GLMakefileTable.py (GLMakefileTable.parent): Reduce code
3084         duplication by expecting Makefile names passed as arguments.
3085         * pygnulib/main.py (main): Add support for '--tests-makefile-name'.
3087 2024-03-06  Bruno Haible  <bruno@clisp.org>
3089         gnulib-tool: Search for a working 'join' program.
3090         Reported by Reuben Thomas <rrt@sc3d.org> in
3091         <https://lists.gnu.org/archive/html/bug-gnulib/2024-03/msg00044.html>.
3092         * gnulib-tool (JOIN): New variable. Use it everywhere instead of 'join'.
3094 2024-03-06  Bruno Haible  <bruno@clisp.org>
3096         c-strtof, c-strtod, c-strtold: Comment.
3097         * lib/c-strtod.c: Mention me as co-author.
3099 2024-03-06  Collin Funk  <collin.funk1@gmail.com>
3101         gnulib-tool.py: Fix value of LDADD for libtests.
3102         * pygnulib/GLEmiter.py (GLEmiter.tests_Makefile_am): Fix value of LDADD
3103         to match gnulib-tool.
3105 2024-03-06  Collin Funk  <collin.funk1@gmail.com>
3107         gnulib-tool.py: Follow gnulib-tool changes, part 44.
3108         Follow gnulib-tool changes
3109         2021-06-10  Bruno Haible  <bruno@clisp.org>
3110         Clarify where to report test failures from Gnulib tests.
3111         2021-06-11  Bruno Haible  <bruno@clisp.org>
3112         Make message in last commit more precise.
3113         * pygnulib/GLEmiter.py (GLEmiter.tests_Makefile_am): Emit a dependency
3114         of 'check-am' on 'check-notice' that prints a notice describing where to
3115         report test failures.
3117 2024-03-06  Bruno Haible  <bruno@clisp.org>
3119         gnulib-tool.py: Tweak comment location.
3120         * pygnulib/GLEmiter.py (GLEmiter.tests_Makefile_am): Move a comment.
3122 2024-03-06  Collin Funk  <collin.funk1@gmail.com>
3124         gnulib-tool.py: Follow gnulib-tool changes, part 43.
3125         Follow gnulib-tool change
3126         2021-06-10  Bruno Haible  <bruno@clisp.org>
3127         Clarify that compiler warnings in the Gnulib tests can be ignored.
3128         * pygnulib/GLEmiter.py (GLEmiter.initmacro_start): Add boolean argument
3129         to control whether gl_CC_ALLOW_WARNINGS and gl_CXX_ALLOW_WARNINGS should
3130         be required.
3131         (GLEmiter.tests_Makefile_am): Emit overrides for CFLAGS and CXXFLAGS.
3132         Emit a dependency of 'all' on 'all-notice' that prints a warning that
3133         compiler warnings can be ignored for tests.
3134         * pygnulib/GLImport.py (GLImport.gnulib_comp): Add boolean argument to
3135         tell whether a tests Makefile.am is being emitted. Update calls to
3136         GLEmiter.initmacro_start.
3137         (GLImport.execute): Update calls to GLEmiter.initmacro_start.
3138         * pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
3140 2024-03-06  Collin Funk  <collin.funk1@gmail.com>
3142         gnulib-tool.py: Fix gnulib-cache.m4 output.
3143         * pygnulib/GLImport.py (GLImport.gnulib_cache): Don't emit an extra '#'
3144         to start the actioncmd comment.
3146 2024-03-06  Bruno Haible  <bruno@clisp.org>
3148         gnulib-tool.py: Tweak comment.
3149         * pygnulib/GLMakefileTable.py (GLMakefileTable.parent): Tweak 'gentests'
3150         description.
3152 2024-03-06  Collin Funk  <collin.funk1@gmail.com>
3154         gnulib-tool.py: Follow gnulib-tool changes, part 42.
3155         Follow gnulib-tool change
3156         2019-02-15  Bruno Haible  <bruno@clisp.org>
3157         gnulib-tool: Support --import with just a few tests, not --with-tests.
3158         * pygnulib/GLImport.py (GLImport.execute): Use 'gentests' instead of
3159         'inctests' when generating files.
3160         * pygnulib/GLMakefileTable.py (GLMakefileTable.parent): Add 'gentests'
3161         argument and use it instead of 'inctests'.
3163 2024-03-05  Collin Funk  <collin.funk1@gmail.com>
3165         gnulib-tool.py: Follow gnulib-tool changes, part 41.
3166         Follow gnulib-tool change
3167         2018-09-03  Bruno Haible  <bruno@clisp.org>
3168         gnulib-tool: Fix build order when $testsbase is a subdir of $sourcebase.
3169         * pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am): Consider the dotfirst
3170         flag.
3171         (GLEmiter.tests_Makefile_am): Don't consider the dotfirst flag.
3172         * pygnulib/GLImport.py (GLImport.execute): Set the dotfirst for tests.
3173         * pygnulib/GLMakefileTable.py (GLMakefileTable.editor): Add optional
3174         dotfirst flag to fix build order when $testsbase is a subdir of
3175         $sourcebase.
3177 2024-03-05  Collin Funk  <collin.funk1@gmail.com>
3179         gnulib-tool.py: Follow gnulib-tool changes, part 40.
3180         Follow gnulib-tool change
3181         2021-12-18  Bruno Haible  <bruno@clisp.org>
3182         stdint: Fix handling of limits.h (regression 2021-12-16).
3183         * pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am)
3184         (GLEmiter.tests_Makefile_am): If --gnu-make is used, assume that
3185         AC_SUBSTed variables for conditionals are constructed by appending the
3186         suffix '_CONDITION'.
3188 2024-03-05  Collin Funk  <collin.funk1@gmail.com>
3190         gnulib-tool.py: Fix incorrect tests Makefile.am generation.
3191         * pygnulib/GLImport.py: Call GLEmiter.tests_Makefile_am instead of
3192         GLEmiter.lib_Makefile_am when creating the tests Makefile. Replace
3193         incorrect actioncmd argument with witness_macro.
3195 2024-03-05  Bruno Haible  <bruno@clisp.org>
3197         doc: Update info about fopencookie.
3198         Reported by Michael Ford <fanquake@gmail.com>.
3199         * doc/glibc-functions/fopencookie.texi: Update platforms list.
3201 2024-03-05  Bruno Haible  <bruno@clisp.org>
3203         doc: Fix a typo.
3204         Reported by Tim Rice in
3205         <https://lists.gnu.org/archive/html/bug-gnulib/2024-03/msg00023.html>.
3206         * doc/build-automation.texi (Building gnulib): Fix typo.
3208 2024-03-05  Bruno Haible  <bruno@clisp.org>
3210         c-strtof, c-strtod, c-strtold: Make multithread-safe.
3211         * lib/c-strtod.c: Include <langinfo.h>, c-ctype.h.
3212         (decimal_point_char): New function, copied from lib/vasnprintf.c.
3213         (C_STRTOD): On platforms that don't have STRTOD_L nor a working
3214         uselocale(), pre-parse the number and call STRTOD after having replaced
3215         the '.' with the locale-dependent decimal point character.
3216         * m4/c-strtod.m4 (gl_C_STRTOD, gl_C_STRTOF, gl_C_STRTOLD): Test for
3217         nl_langinfo().
3218         * modules/c-strtof (Depends-on): Add c-ctype. Remove strdup-posix.
3219         * modules/c-strtod (Depends-on): Likewise.
3220         * modules/c-strtold (Depends-on): Likewise.
3222 2024-03-05  Bruno Haible  <bruno@clisp.org>
3224         c-strtold: Add multithread-safety test.
3225         * tests/test-c-strtold-mt.c: New file.
3226         * tests/test-c-strtold-mt.sh: New file, based on
3227         tests/test-c-strtold1.sh.
3228         * modules/c-strtold-tests (Files): Add them.
3229         (Depends-on): Add thread, nanosleep.
3230         (Makefile.am): Arrange to build test-c-strtold-mt and run
3231         test-c-strtold-mt.sh.
3233 2024-03-05  Bruno Haible  <bruno@clisp.org>
3235         c-strtod: Add multithread-safety test.
3236         * tests/test-c-strtod-mt.c: New file.
3237         * tests/test-c-strtod-mt.sh: New file, based on tests/test-c-strtod1.sh.
3238         * modules/c-strtod-tests (Files): Add them.
3239         (Depends-on): Add thread, nanosleep.
3240         (Makefile.am): Arrange to build test-c-strtod-mt and run
3241         test-c-strtod-mt.sh.
3243 2024-03-05  Bruno Haible  <bruno@clisp.org>
3245         c-strtof: Add multithread-safety test.
3246         * tests/test-c-strtof-mt.c: New file.
3247         * tests/test-c-strtof-mt.sh: New file, based on tests/test-c-strtof1.sh.
3248         * modules/c-strtof-tests (Files): Add them.
3249         (Depends-on): Add thread, nanosleep.
3250         (Makefile.am): Arrange to build test-c-strtof-mt and run
3251         test-c-strtof-mt.sh.
3253 2024-03-05  Bruno Haible  <bruno@clisp.org>
3255         locale-*.m4: Update comments.
3256         * m4/locale-ar.m4: Update comments for Solaris 10.
3257         * m4/locale-fr.m4: Likewise.
3258         * m4/locale-ja.m4: Likewise.
3259         * m4/locale-tr.m4: Likewise.
3261 2024-03-05  Bruno Haible  <bruno@clisp.org>
3263         c-strtold: Add tests.
3264         * tests/test-strtold.h: New file, extracted from tests/test-strtold.c.
3265         * tests/test-strtold.c: Include test-strtold.h.
3266         (FABSL): Remove unused macro.
3267         (main): Just invoke test_function.
3268         * tests/test-strtold1.c: Add comment.
3269         * modules/strtold-tests (Files): Add tests/test-strtold.h.
3270         * tests/test-c-strtold.c: New file, based on tests/test-strtold.c.
3271         * tests/test-c-strtold1.c: New file, based on tests/test-strtold1.c.
3272         * tests/test-c-strtold1.sh: New file, based on tests/test-strtold1.sh.
3273         * modules/c-strtold-tests: New file, based on modules/strtold-tests.
3275 2024-03-05  Bruno Haible  <bruno@clisp.org>
3277         c-strtod: Add tests.
3278         * tests/test-strtod.h: New file, extracted from tests/test-strtod.c.
3279         * tests/test-strtod.c: Include test-strtod.h.
3280         (FABS): Remove unused macro.
3281         (main): Just invoke test_function.
3282         * tests/test-strtod1.c: Add comment.
3283         * modules/strtod-tests (Files): Add tests/test-strtod.h.
3284         * tests/test-c-strtod.c: New file, based on tests/test-strtod.c.
3285         * tests/test-c-strtod1.c: New file, based on tests/test-strtod1.c.
3286         * tests/test-c-strtod1.sh: New file, based on tests/test-strtod1.sh.
3287         * modules/c-strtod-tests: New file, based on modules/strtod-tests.
3289 2024-03-05  Bruno Haible  <bruno@clisp.org>
3291         c-strtof: Add tests.
3292         * tests/test-strtof.h: New file, extracted from tests/test-strtof.c.
3293         * tests/test-strtof.c: Include test-strtof.h.
3294         (FABS): Remove unused macro.
3295         (main): Just invoke test_function.
3296         * tests/test-strtof1.c: Add comment.
3297         * modules/strtof-tests (Files): Add tests/test-strtof.h.
3298         * tests/test-c-strtof.c: New file, based on tests/test-strtof.c.
3299         * tests/test-c-strtof1.c: New file, based on tests/test-strtof1.c.
3300         * tests/test-c-strtof1.sh: New file, based on tests/test-strtof1.sh.
3301         * modules/c-strtof-tests: New file, based on modules/strtof-tests.
3303 2024-03-04  Collin Funk  <collin.funk1@gmail.com>
3305         gnulib-tool.py: Follow gnulib-tool changes, part 39.
3306         Follow gnulib-tool change
3307         2017-12-28  Bruno Haible  <bruno@clisp.org>
3308         gnulib-tool: Make --conditional-dependencies work better.
3309         * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Add argument
3310         referenceable_modules. Use referencable_modules for dependencies.
3311         * pygnulib/GLImport.py (GLImport.__init__): Don't reject the combination
3312         of --conditional-dependencies with --with-tests when mode is 'import'.
3313         (GLImport.gnulib_comp): Pass it.
3314         * pygnulib/GLTestDir.py (GLTestDir.execute): Pass it.
3316 2024-03-04  Bruno Haible  <bruno@clisp.org>
3318         doc: Tweak last commit.
3319         * doc/gnulib-tool.texi (Style of #include statements): Use
3320         @itemize @asis{}. Recommended by Patrice Dumas.
3322 2024-03-04  Collin Funk  <collin.funk1@gmail.com>
3324         doc: Fix build errors.
3325         * doc/gnulib-tool.texi (Style of #include statements): Use @itemize w{}
3326         instead of the incorrect @itemize @asis.
3328 2024-03-04  Collin Funk  <collin.funk1@gmail.com>
3330         gnulib-tool.py: Adjust construction of configure.ac path.
3331         * pygnulib/GLConfig.py (GLConfig.setAutoconfFile): Join destdir and
3332         configure.ac instead of using relativize.
3334 2024-03-03  Collin Funk  <collin.funk1@gmail.com>
3335             Bruno Haible  <bruno@clisp.org>
3337         gnulib-tool.py: Fix output of gnulib-comp.m4.
3338         * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Fix indentation.
3339         Don't print nonstring values into gnulib-comp.m4.
3341 2024-03-03  Collin Funk  <collin.funk1@gmail.com>
3343         gnulib-tool.py: Make output of test Makefile.am match gnulib-tool.
3344         * pygnulib/GLModuleSystem.py
3345         (GLModule.getAutomakeSnippet_Unconditional): Don't sort EXTRA_DIST file
3346         names for test modules.
3348 2024-03-03  Bruno Haible  <bruno@clisp.org>
3350         gnulib-tool.py: Fix last commit.
3351         * pygnulib/GLEmiter.py (GLEmiter.tests_Makefile_am): Ignore libname and
3352         libext here.
3354 2024-03-03  Collin Funk  <collin.funk1@gmail.com>
3356         gnulib-tool.py: Follow gnulib-tool changes, part 38.
3357         Follow gnulib-tool change
3358         2020-12-26  Bruno Haible  <bruno@clisp.org>
3359         gnulib-tool: Make --conditional-dependencies work with --with-tests.
3360         * pygnulib/GLEmiter.py (GLEmiter.tests_Makefile_am): Add missing
3361         moduletable argument. Handle conditional dependencies like
3362         GLEmiter.lib_Makefile_am.
3363         * pygnulib/GLTestDir.py (GLTestDir.execute): Adjust arguments.
3365 2024-03-03  Bruno Haible  <bruno@clisp.org>
3367         doc: Update regarding --create-megatestdir.
3368         Reported by Alexei Sholomitskiy <asholomitskiy84@gmail.com> in
3369         <https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00071.html>
3370         and by Collin Funk <collin.funk1@gmail.com> in
3371         <https://lists.gnu.org/archive/html/bug-gnulib/2024-03/msg00007.html>.
3372         * doc/build-automation.texi (Building gnulib): Discourage the use of
3373         --create-megatestdir with all modules.
3375 2024-03-01  Bruno Haible  <bruno@clisp.org>
3377         gnulib-tool.py: Clarify minimum supported Python version.
3378         * pygnulib/main.py: Add comment regarding the Python version.
3380 2024-03-01  Collin Funk  <collin.funk1@gmail.com>
3382         gnulib-tool.py: Follow gnulib-tool changes, part 37.
3383         Follow gnulib-tool change
3384         2018-10-22  Bruno Haible  <bruno@clisp.org>
3385         Assume Automake >= 1.11.
3386         * pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am)
3387         (GLEmiter.tests_Makefile_am): Emit a Makefile.am that requires Automake
3388         >= 1.11.
3389         * pygnulib/GLTestDir.py (GLTestDir.execute, GLMegaTestDir.execute):
3390         Likewise.
3391         * pygnulib/constants.py: Update comment.
3393 2024-03-01  Collin Funk  <collin.funk1@gmail.com>
3395         gnulib-tool.py: Fix GNU Make conversion regular expressions.
3396         * pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am): Reduce code
3397         duplication. Use re.MULTILINE so '^' matches the start of each line
3398         instead of only the start of a string.
3400 2024-02-29  Collin Funk  <collin.funk1@gmail.com>
3402         gnulib-tool.py: Follow gnulib-tool changes, part 36.
3403         Follow gnulib-tool change
3404         2017-03-14  Mathieu Lirzin  <mthl@gnu.org>
3405         gnulib-tool: don't automatically distribute files from top/
3406         * pygnulib/GLModuleSystem.py
3407         (GLModule.getAutomakeSnippet_Unconditional): Don't distribute files from
3408         top/ automatically.
3410 2024-02-29  Bruno Haible  <bruno@clisp.org>
3412         xalloc: Don't use identifier 'nonnull'.
3413         * lib/xmalloc.c (check_nonnull): Renamed from nonnull.
3415 2024-02-29  Collin Funk  <collin.funk1@gmail.com>
3417         gnulib-tool.py: Follow gnulib-tool changes, part 35.
3418         Follow gnulib-tool change
3419         2023-05-28  Bruno Haible  <bruno@clisp.org>
3420         warnings, manywarnings: Assume autoconf >= 2.64.
3421         * pygnulib/GLConfig.py (GLConfig.default, GLConfig.getAutoconfVersion)
3422         (GLConfig.setAutoconfVersion, resetAutoconfVersion): Set required
3423         Autoconf version to 2.64.
3424         * pygnulib/GLError.py (GLError.__init__, GLError.__repr__): Likewise.
3425         * pygnulib/GLImport.py (GLImport.__init__): Likewise.
3426         * pygnulib/constants.py (DEFAULT_AUTOCONF_MINVERSION): Likewise.
3427         * pygnulib/main.py: Likewise.
3429 2024-02-29  Collin Funk  <collin.funk1@gmail.com>
3431         gnulib-tool.py: Follow gnulib-tool changes, part 34.
3432         Follow gnulib-tool change
3433         2017-05-15  Bruno Haible  <bruno@clisp.org>
3434         gnulib-tool: Fix generated code when libtests contains module 'alloca'.
3435         * pygnulib/GLEmiter.py (GLEmiter.tests_Makefile_am): Use @ALLOCA@ for
3436         libtests.a instead of @LTALLOCA@.
3438 2024-02-29  Collin Funk  <collin.funk1@gmail.com>
3440         gnulib-tool.py: Follow gnulib-tool changes, part 33.
3441         Follow gnulib-tool change
3442         2017-03-14  Bruno Haible  <bruno@clisp.org>
3443         gnulib-tool: Don't produce a tests directory with only snippet .h files.
3444         * pygnulib/GLModuleSystem.py
3445         (GLModuleTable.transitive_closure_separately): Don't create a test
3446         directory if all test related modules have applicability 'all'.
3448 2024-02-28  Collin Funk  <collin.funk1@gmail.com>
3450         gnulib-tool.py: Follow gnulib-tool changes, part 32.
3451         Follow gnulib-tool change
3452         2018-10-22  Bruno Haible  <bruno@clisp.org>
3453         Fix failure of 'gnulib-tool --create-testdir' with all modules.
3454         * pygnulib/GLTestDir.py (GLTestDir.execute): Exclude the 'timevar'
3455         module from --create-testdir with all modules. Update comment.
3457 2024-02-28  Collin Funk  <collin.funk1@gmail.com>
3459         gnulib-tool.py: Emit year range on file copyright notices.
3460         * pygnulib/GLInfo.py (GLInfo.copyright_range): New function. Return a
3461         copyright string with a year range.
3462         * pygnulib/GLEmiter.py (GLEmiter.copyright_notice): Use the new function
3463         for file copyright headers.
3465 2024-02-28  Collin Funk  <collin.funk1@gmail.com>
3467         gnulib-tool.py: Make module sorting more similar to gnulib-tool.
3468         * pygnulib/GLImport.py (GLImport.__init__): Sort modules when mode is
3469         'import'.
3470         (GLImport.actioncmd): Don't sort modules while creating actioncmd. Use
3471         preferred quoting style.
3473 2024-02-28  Bruno Haible  <bruno@clisp.org>
3475         gnulib-tool: Make --version output independent of git's configuration.
3476         Reported by Collin Funk <collin.funk1@gmail.com> in
3477         <https://lists.gnu.org/archive/html/bug-gnulib/2024-02/msg00268.html>.
3478         * pygnulib/GLInfo.py (GLInfo.date): Pass --format and --date options, to
3479         override the user's git configuration.
3480         * gnulib-tool (func_version): Likewise. Also pass options '-n 1', to
3481         speed up the operation.
3483 2024-02-28  Bruno Haible  <bruno@clisp.org>
3485         gnulib-tool.py: Avoid exception when 'git log' output is unexpected.
3486         * pygnulib/GLInfo.py (GLInfo.date): When the 'git log' output does not
3487         contain a line with the expected 'Date:' pattern, pass the empty string
3488         to GNU date.
3490 2024-02-28  Bruno Haible  <bruno@clisp.org>
3492         gnulib-tool: Avoid references to functions that get defined later.
3493         * gnulib-tool (func_fatal_error, func_warning, func_readlink): Move
3494         before func_gnulib_dir.
3496 2024-02-27  Bruno Haible  <bruno@clisp.org>
3498         isnan: Fix compilation error in C++ mode on OpenBSD 7.5-beta.
3499         Reported by Christian Weisgerber <naddy@mips.inka.de> in
3500         <https://lists.gnu.org/archive/html/bug-gnulib/2024-02/msg00261.html>.
3501         * lib/math.in.h (GNULIB_NAMESPACE_LACKS_ISNAN): Define on all platforms
3502         with clang ≥ 14.
3504 2024-02-27  Collin Funk  <collin.funk1@gmail.com>
3506         gnulib-tool.py: Fix configure.ac output.
3507         * pygnulib/GLEmiter.py (GLEmiter.initmacro_end): Fix backslash escapes
3508         in raw string.
3510 2024-02-27  Collin Funk  <collin.funk1@gmail.com>
3512         gnulib-tool.py: Follow gnulib-tool changes, part 31.
3513         Follow gnulib-tool change
3514         2021-06-04  Bruno Haible  <bruno@clisp.org>
3515         gnulib-tool: Stop doing license notice replacements.
3516         * pygnulib/GLConfig.py (GLConfig.default): Remove 'copyrights' key.
3517         (checkCopyrights): Remove function.
3518         (setSymbolic, resetSymbolic): Remove 'copyrights' key.
3519         * pygnulib/GLImport.py (GLImport.prepare): Remove copyrights variable.
3520         Don't modify license notice on source files.
3521         (GLImport.execute): Remove copyrights variable.
3523 2024-02-27  Collin Funk  <collin.funk1@gmail.com>
3525         gnulib-tool.py: Small fix of part 27.
3526         * pygnulib/GLConfig.py (GLConfig.default): Add 'gnu_make' key which
3527         returns False.
3529 2024-02-27  Collin Funk  <collin.funk1@gmail.com>
3531         gnulib-tool.py: Follow gnulib-tool changes, part 30.
3532         Follow gnulib-tool change
3533         2021-05-30  Bruno Haible  <bruno@clisp.org>
3534         Write 'LGPLv3+ or GPLv2+' instead of 'LGPLv3+ or GPLv2'.
3535         * pygnulib/GLImport.py (GLImport.prepare): Change.
3536         * pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
3538 2024-02-27  Collin Funk  <collin.funk1@gmail.com>
3540         gnulib-tool.py: Follow gnulib-tool changes, part 29.
3541         Follow gnulib-tool change
3542         2021-03-06  Paul Eggert  <eggert@cs.ucla.edu>
3543         parse-datetime2: fix licensing
3544         * pygnulib/GLModuleSystem.py (GLModule.getLicense): Handle the special
3545         licensing case for parse-datetime2 or any other module starting with
3546         "parse-datetime". Update comment.
3548 2024-02-26  Bruno Haible  <bruno@clisp.org>
3550         gnulib-tool.py: Add more comments.
3551         * pygnulib/main.py: Add comments regarding code style. Mention the
3552         pycodestyle and pylint configurations.
3554 2024-02-26  Collin Funk  <collin.funk1@gmail.com>
3556         gnulib-tool.py: Add configuration files for Python tools.
3557         * pygnulib/.pylintrc: New file, used by pylintrc.
3558         * pygnulib/setup.cfg: New file, currently only used for pycodestyle
3559         options.
3561 2024-02-26  Collin Funk  <collin.funk1@gmail.com>
3563         gnulib-tool.py: Fix undefined variable access.
3564         * pygnulib/main.py (main): Don't use gnu_make before it is defined.
3566 2024-02-26  Bruno Haible  <bruno@clisp.org>
3568         gnulib-tool.py: Reorganize code.
3569         * pygnulib/main.py: New file, moved here from gnulib-tool.py.
3570         * pygnulib/constants.py: Change the way APP['name'] and DIRS['root'] are
3571         computed.
3572         * gnulib-tool.py: New file, based on gnulib-tool.
3574 2024-02-25  Bruno Haible  <bruno@clisp.org>
3576         bitset: Don't access errno when it's not set.
3577         * lib/bitset/stats.c (bitset_stats_read): Don't use errno after neither
3578         fread() nor ferror() has set it. On native Windows, don't use errno
3579         after fclose().
3581 2024-02-25  Bruno Haible  <bruno@clisp.org>
3583         bitset: Avoid newlines at the end of translatable strings.
3584         * lib/bitset/stats.c (bitset_percent_histogram_print,
3585         bitset_log_histogram_print): Print a newline after msg.
3586         (bitset_stats_print_1): Don't include a newline in the argument of
3587         bitset_percent_histogram_print or bitset_log_histogram_print.
3588         (bitset_stats_print): Move newlines outside of translatable strings.
3590 2024-02-24  Collin Funk  <collin.funk1@gmail.com>
3592         gnulib-tool.py: Follow gnulib-tool changes, part 28.
3593         Follow gnulib-tool change
3594         2018-07-17  Paul Eggert  <eggert@cs.ucla.edu>
3595         gnulib-tool: limit line length for git send-email
3596         * pygnulib/GLImport.py (GLImport.actioncmd): Break actioncmd into
3597         multiple lines. Reorder emitting of arguments to match gnulib-tool. Emit
3598         "--witness-c-macro" instead of "--witness_c_macro". Emit "--po-domain"
3599         instead of "--podomain". Document ordering of unimplemented options. Add
3600         updated comments documenting line length limitations of git send-email
3601         and some implementations of AWK.
3602         * pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am): Remove comment which
3603         was moved to pygnulib/GLImport.py. Remove length limitation on actioncmd
3604         since it now spans multiple lines.
3606 2024-02-24  Bruno Haible  <bruno@clisp.org>
3608         gnulib-tool.py: Further fix last commit.
3609         * gnulib-tool.py (main): Make the mode test match for 'create-testdir',
3610         'create-megatestdir', 'test', 'megatest'.
3612 2024-02-24  Collin Funk  <collin.funk1@gmail.com>
3614         gnulib-tool.py: Fix conditional checking the incorrect variable.
3615         Reported by Bruno Haible <bruno@clisp.org> in
3616         <https://lists.gnu.org/archive/html/bug-gnulib/2024-02/msg00207.html>.
3617         * gnulib-tool.py (main): Fix incorrect conditional. Check that mode, not
3618         modules, is not None before treating it as a string.
3620 2024-02-24  Bruno Haible  <bruno@clisp.org>
3622         striconveha tests: Avoid test failure on macOS 12.5.
3623         * tests/test-striconveha.c (main): Skip transliteration tests when using
3624         Apple's modified GNU libiconv or the bastard Apple iconv.
3626 2024-02-23  Bruno Haible  <bruno@clisp.org>
3628         DEPENDENCIES: Update entry about gperf.
3629         Reported by Gavin Smith <gavinsmith0123@gmail.com> in
3630         <https://lists.gnu.org/archive/html/bug-gnulib/2024-02/msg00201.html>.
3631         * DEPENDENCIES (gperf): Mention some more modules which require 'gperf'.
3633 2024-02-23  Bruno Haible  <bruno@clisp.org>
3635         unictype/mirror: Update to Unicode 15.1.0.
3636         Reported by Daurnimator <quae@daurnimator.com> in
3637         <https://lists.gnu.org/archive/html/bug-libunistring/2016-11/msg00010.html>.
3638         * lib/gen-uni-tables.c (struct mirror_pair): New type.
3639         (mirror_pairs): Don't initialize statically.
3640         (mirror_pairs_count): New variable.
3641         (fill_mirror): New function.
3642         (get_mirror_value): Update.
3643         (main): Expect the file name of BidiMirroring.txt as command-line
3644         argument. Invoke fill_mirror.
3645         * lib/unictype/mirror.h: Regenerated.
3646         * modules/unictype/mirror (configure.ac): Bump required libunistring
3647         version.
3649 2024-02-23  Bruno Haible  <bruno@clisp.org>
3651         gen-uni-tables: Keep line number better up-to-date.
3652         * lib/gen-uni-tables.c (fill_width, fill_org_lbp): Increase lineno by 1
3653         when reading a blank line.
3655 2024-02-23  Collin Funk  <collin.funk1@gmail.com>
3657         gnulib-tool.py: Follow gnulib-tool changes, part 27.
3658         Follow gnulib-tool changes
3659         2017-03-12  Paul Eggert  <eggert@cs.ucla.edu>
3660         gnulib-tool: new option --gnu-make
3661         2017-03-13  Paul Eggert  <eggert@cs.ucla.edu>
3662         gnulib-tool: minor --gnu-make fixups
3663         2017-03-14  Paul Eggert  <eggert@cs.ucla.edu>
3664         gnulib-tool: fix typo in comment output
3665         2017-05-14  Paul Eggert  <eggert@cs.ucla.edu>
3666         gnulib-tool: improve GNU Make debugging
3667         2018-07-04  Paul Eggert  <eggert@cs.ucla.edu>
3668         gnulib-tool: minor tweaks for --gnu-make
3669         * gnulib-tool.py (main): Add --gnu-make option. Do not allow --gnu-make
3670         in test modes, since they all require Automake.
3671         * pygnulib/GLConfig.py: Add gnu_make argument to constructor.
3672         (getGnuMake, setGnuMake, resetGnuMake): New methods for accessing the
3673         gnu_make instance variable.
3674         * pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am): Use the "+=" operator
3675         with GNU Make and Automake. Transform conditionals to GNU Make syntax if
3676         --gnu-make is in use. Use a Autoconf subprocess to define values and
3677         check the return code for errors.
3678         (GLEmiter.tests_Makefile_am): Likewise.
3679         * pygnulib/GLImport.py (GLImport.actioncmd): Add "--gnu-make" to the
3680         output comment if it is in use.
3681         (GLImport.gnulib_comp): Don't require "AM_PROG_CC_C_O" when using GNU
3682         Make.
3683         * pygnulib/GLInfo.py (GLInfo.usage): Update help message to reflect
3684         addition of --gnu-make.
3685         * pygnulib/GLModuleSystem.py (GLModuleTable.transitive_closure): Don't
3686         add Automake snippets as unconditional dependencies when using
3687         --gnu-make.
3689 2024-02-23  Bruno Haible  <bruno@clisp.org>
3691         unistdio/*printf tests: Update expected test results regarding %n.
3692         * tests/unistdio/test-u8-printf1.h (test_xfunction): If
3693         NEED_PRINTF_WITH_N_DIRECTIVE is not defined, expect a NULL result in the
3694         %n test.
3695         * tests/unistdio/test-u16-printf1.h (test_xfunction): Likewise.
3696         * tests/unistdio/test-u32-printf1.h (test_xfunction): Likewise.
3697         * tests/unistdio/test-ulc-printf1.h (test_xfunction): Likewise.
3699 2024-02-22  Collin Funk  <collin.funk1@gmail.com>
3701         gnulib-tool.py: Follow gnulib-tool changes, part 26.
3702         Follow gnulib-tool change
3703         2017-04-20  Bruno Haible  <bruno@clisp.org>
3704         verify tests: Fix spurious failure with parallel make.
3705         * pygnulib/GLEmiter.py (GLEmiter.tests_Makefile_am): Emit initialization
3706         of EXTRA_PROGRAMS so that the verify-tests module does not cause
3707         Automake to warn about the use of "+=" instead of "=".
3709 2024-02-22  Collin Funk  <collin.funk1@gmail.com>
3711         gnulib-tool.py: Follow gnulib-tool changes, part 25.
3712         Follow gnulib-tool change
3713         2017-06-11  Bruno Haible  <bruno@clisp.org>
3714         gnulib-tool: Clean up after autotools.
3715         * pygnulib/GLTestDir.py (GLTestDir.execute): Remove
3716         unnessecary autom4te.cache directory generated by Autotools.
3717         (GLMegaTestDir.execute): Likewise.
3719 2024-02-21  Bruno Haible  <bruno@clisp.org>
3721         c-strtof: New module.
3722         * lib/c-strtod.h (c_strtof): New declaration.
3723         * lib/c-strtod.c: Support FLOAT.
3724         * lib/c-strtof.c: New file.
3725         * m4/c-strtod.m4 (gl_C_STRTOF): New macro.
3726         * modules/c-strtof: New file.
3728 2024-02-21  Bruno Haible  <bruno@clisp.org>
3730         c-strtold: Use strtold_l when available (regr. 2019-01-31).
3731         * lib/c-strtod.c: Fix typo: HAVE_GOOD_STRTOLD_L was never defined.
3733 2024-02-21  Bruno Haible  <bruno@clisp.org>
3735         strtof: Add tests.
3736         * tests/test-strtof.c: New file, based on tests/test-strtod.c.
3737         * tests/test-strtof1.sh: New file, based on tests/test-strtod1.sh.
3738         * tests/test-strtof1.c: New file, based on tests/test-strtod1.c.
3739         * modules/strtof-tests: New file, based on modules/strtod-tests.
3741         strtof: New module.
3742         * lib/stdlib.in.h (strtof): New declaration.
3743         * lib/strtod.c: Support USE_FLOAT.
3744         * lib/strtof.c: New file.
3745         * m4/strtof.m4: New file, based on m4/strtod.m4.
3746         * m4/ldexpf.m4 (gl_CHECK_LDEXPF_NO_LIBM): New macro, based on
3747         m4/ldexp.m4.
3748         * m4/stdlib_h.m4 (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize
3749         GNULIB_STRTOF.
3750         * modules/stdlib (Makefile.am): Substitute GNULIB_STRTOF, HAVE_STRTOF,
3751         REPLACE_STRTOF.
3752         * modules/strtof: New file.
3753         * tests/test-stdlib-c++.cc (strtof): Check signature.
3754         * doc/posix-functions/strtof.texi: Mention the new module and the bugs
3755         that it fixes.
3756         (gl_STDLIB_H_DEFAULTS): Initialize HAVE_STRTOF, REPLACE_STRTOF.
3758 2024-02-21  Bruno Haible  <bruno@clisp.org>
3760         strtod, strtold tests: Avoid a test failure on native Windows.
3761         * modules/strtod-tests (Depends-on): Add setlocale.
3762         * modules/strtold-tests (Depends-on): Likewise.
3764 2024-02-21  Collin Funk  <collin.funk1@gmail.com>
3766         gnulib-tool.py: Fix undefined variable while emitting testdir.
3767         * pygnulib/GLTestDir.py (GLTestDir.execute): Fix undefined
3768         variable refrence caused by commit
3769         01cd78f9d682ff75cc5ab1c2d21b911bdd9215b8.
3770         Restore the previous auxdir when finished writing the
3771         configure.ac file in the test directory.
3773 2024-02-21  Bruno Haible  <bruno@clisp.org>
3775         *printf-posix: Disable support for the 'n' directive by default.
3776         * m4/printf-with-n-directive.m4: New file.
3777         * modules/printf-with-n-directive: New file.
3778         * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_IS_POSIX): If
3779         gl_PRINTF_SUPPORT_N_DIRECTIVE is not defined, ignore the value of the
3780         gl_cv_func_printf_directive_n variable.
3781         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_IS_POSIX): Likewise.
3782         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_IS_POSIX): Likewise.
3783         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_IS_POSIX): Likewise.
3784         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_IS_POSIX): Likewise.
3785         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_IS_POSIX): Likewise.
3786         * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_IS_POSIX): Likewise.
3787         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_IS_POSIX): Likewise.
3788         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_IS_POSIX): Likewise.
3789         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_IS_POSIX): If
3790         gl_PRINTF_SUPPORT_N_DIRECTIVE is not defined, ignore the values of the
3791         gl_cv_func_printf_directive_n and gl_cv_func_snprintf_directive_n
3792         variables.
3793         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_IS_POSIX): Likewise.
3794         * lib/printf-parse.c (PRINTF_PARSE): If NEED_PRINTF_WITH_N_DIRECTIVE is
3795         not defined, treat the 'n' directive like an unknown directive.
3796         * lib/vasnprintf.c (VASNPRINTF): If NEED_PRINTF_WITH_N_DIRECTIVE is not
3797         defined, disable the processing of the 'n' directive.
3798         * tests/test-snprintf-posix.h (test_function): If
3799         NEED_PRINTF_WITH_N_DIRECTIVE is not defined, skip the %n test.
3800         * tests/test-sprintf-posix.h (test_function): Likewise.
3801         * tests/test-vasnprintf-posix.c (test_function): Likewise.
3802         * tests/test-vasnwprintf-posix.c (test_function): Likewise.
3803         * tests/test-vasprintf-posix.c (test_function): Likewise.
3804         * doc/posix-functions/dprintf.texi: Mention that support for the 'n'
3805         directive is only enabled together with the module
3806         'printf-with-n-directive'.
3807         * doc/posix-functions/fprintf.texi: Likewise.
3808         * doc/posix-functions/printf.texi: Likewise.
3809         * doc/posix-functions/snprintf.texi: Likewise.
3810         * doc/posix-functions/sprintf.texi: Likewise.
3811         * doc/posix-functions/vdprintf.texi: Likewise.
3812         * doc/posix-functions/vfprintf.texi: Likewise.
3813         * doc/posix-functions/vprintf.texi: Likewise.
3814         * doc/posix-functions/vsnprintf.texi: Likewise.
3815         * doc/posix-functions/vsprintf.texi: Likewise.
3816         * doc/glibc-functions/obstack_printf.texi: Likewise.
3817         * doc/glibc-functions/obstack_vprintf.texi: Likewise.
3818         * NEWS: Mention the change.
3820 2024-02-21  Bruno Haible  <bruno@clisp.org>
3822         *printf-posix: Avoid crash in another configure test.
3823         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): In the test program, catch the
3824         SIGABRT signal, so that the program does not dump core.
3826 2024-02-20  Bruno Haible  <bruno@clisp.org>
3828         unimetadata/u-version: Add tests.
3829         * tests/unimetadata/test-u-version.c: New file.
3830         * modules/unimetadata/u-version-tests: New file.
3832         unimetadata/u-version: New module.
3833         * lib/gen-uni-tables.c (output_version): New function.
3834         (main): Invoke it.
3835         * lib/unimetadata/u-version.c: New generated file.
3836         * modules/unimetadata/u-version: New file.
3838         unimetadata/base: New module.
3839         * lib/unimetadata.in.h: New file.
3840         * m4/unimetadata_h.m4: New file.
3841         * modules/unimetadata/base: New file.
3843 2024-02-20  Collin Funk  <collin.funk1@gmail.com>
3845         maint.mk: Fix include header typo.
3846         * top/maint.mk: Change arpa_inet.h to arpa/inet.h.
3848 2024-02-20  Bruno Haible  <bruno@clisp.org>
3850         *printf-posix: Avoid crash in a configure test.
3851         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_N): In the test program, catch the
3852         SIGABRT signal, so that the program does not dump core.
3854 2024-02-18  Jim Meyering  <meyering@meta.com>
3856         maint.mk: improve new syntax-check rule
3857         * top/maint.mk (sc_prefer_angle_bracket_headers): Rename from
3858         sc_verify_absolute_include_headers.  Simplify to run a single
3859         invocation of grep, rather than usually many.  Derive a regular
3860         expression matching the selected headers, and warn about any
3861         offending matches via what is usually a single grep invocation.
3863 2024-02-18  Collin Funk  <collin.funk1@gmail.com>
3865         gnulib-tool.py: Fix function call on incorrect object.
3866         * pygnulib/GLImport.py: Call checkInclTestCategory on the
3867         GLConfig member instead of the GLImport object itself.
3868         * pygnulib/__init__.py: Update copyright dates.
3869         * pygnulib/constants.py: Update copyright dates.
3871 2024-02-18  Bruno Haible  <bruno@clisp.org>
3873         maint.mk: Add more comments.
3874         * top/maint.mk: Reference the Gnulib documentation where suitable.
3876 2024-02-18  Collin Funk  <collin.funk1@gmail.com>
3878         maint.mk: Add syntax-check rule to check for #include syntax.
3879         * top/maint.mk (sc_verify_absolute_include_headers): New rule
3880         to check for #includes that might cause
3881         -Winclude-next-absolute-path warnings.
3883 2024-02-18  Bruno Haible  <bruno@clisp.org>
3885         doc: Mention requirement regarding #include syntax.
3886         * doc/gnulib-tool.texi (-I options, Include <config.h>,
3887         Style of #include statements): New subsections.
3889 2024-02-17  Paul Eggert  <eggert@cs.ucla.edu>
3891         qsort_r-tests: minor visibility cleanup
3892         * tests/test-qsort_r.c (cmp): Now static.
3894         savedir: work around GCC bug 113963
3895         * lib/savedir.c: Ignore -Wanalyzer-malloc-leak and
3896         -Wanalyzer-null-dereference.
3898         Solaris EOL update
3899         * doc/solaris-versions: Solaris 11.4 EOL update.  Also mention 11.3.
3901 2024-02-17  Collin Funk  <collin.funk1@gmail.com>
3903         math: More clang -Winclude-next-absolute-path silencing.
3904         * lib/math.c: Write #include <math.h> instead of #include "math.h".
3906 2024-02-17  Bruno Haible  <bruno@clisp.org>
3908         error: More clang -Winclude-next-absolute-path silencing.
3909         * modules/error-h (Include): Suggest <error.h>, not "error.h".
3910         * m4/error_h.m4: Write #include <error.h>.
3912 2024-02-15  Bruno Haible  <bruno@clisp.org>
3914         nstrftime: Optimize module dependencies.
3915         * modules/nstrftime (Depends-on): Remove localename-unsafe. Add
3916         localename-unsafe-limited.
3918 2024-02-15  Bruno Haible  <bruno@clisp.org>
3920         localename-unsafe-limited: New module.
3921         * m4/localename.m4 (gl_LOCALENAME_UNSAFE_LIMITED): New macro.
3922         * modules/localename-unsafe-limited: New file.
3923         * modules/localename-unsafe (Depends-on): Add localename-unsafe-limited.
3924         (Makefile.am): Compile localename-unsafe.c only if the module
3925         localename-unsafe-limited does not already do it.
3927 2024-02-15  Bruno Haible  <bruno@clisp.org>
3929         nstrftime, fprintftime: Optimize.
3930         * lib/strftime.c (should_remove_ampm): Call gl_locale_name_unsafe
3931         instead of gl_locale_name.
3932         * modules/nstrftime (Depends-on): Remove localename. Add
3933         localename-unsafe.
3935 2024-02-15  Bruno Haible  <bruno@clisp.org>
3937         localename-unsafe: Optimize.
3938         * lib/localename-unsafe.c (gl_locale_name_posix_unsafe): Call
3939         setlocale_null_unlocked instead of setlocale_null.
3940         * modules/localename-unsafe (Depends-on): Add setlocale-null-unlocked.
3942 2024-02-15  Bruno Haible  <bruno@clisp.org>
3944         setlocale_null-unlocked: Add tests.
3945         * tests/test-setlocale_null-unlocked.c: New file, based on
3946         tests/test-setlocale_null.c.
3947         * modules/setlocale-null-unlocked-tests: New file.
3949         setlocale_null-unlocked: New module.
3950         * lib/setlocale_null.h (setlocale_null_r_unlocked,
3951         setlocale_null_unlocked): New declarations.
3952         * lib/setlocale_null-unlocked.c: New file, based on
3953         lib/setlocale_null.c.
3954         * lib/setlocale_null.c: Don't include <wchar.h>.
3955         (setlocale_null_unlocked, setlocale_null_r_unlocked): Remove functions.
3956         * modules/setlocale-null-unlocked: New file.
3957         * modules/setlocale-null (Depends-on): Add setlocale-null-unlocked.
3959 2024-02-15  Bruno Haible  <bruno@clisp.org>
3961         setlocale-null: Refactor.
3962         * lib/setlocale_null.c
3963         (setlocale_null_r_with_lock): Renamed from setlocale_null_with_lock.
3964         (setlocale_null_r_unlocked): Renamed from setlocale_null_unlocked.
3965         (setlocale_null_unlocked): Renamed from setlocale_null_androidfix.
3967 2024-02-15  Bruno Haible  <bruno@clisp.org>
3969         localename-unsafe: New module.
3970         * lib/localename.h (gl_locale_name_unsafe, gl_locale_name_thread_unsafe,
3971         gl_locale_name_posix_unsafe): New declarations.
3972         * lib/localename-unsafe.c: New file, based on lib/localename.c.
3973         (gl_locale_name_thread_unsafe): Renamed from gl_locale_name_thread.
3974         (gl_locale_name_posix_unsafe): Renamed from gl_locale_name_posix.
3975         (gl_locale_name_unsafe): Renamed from gl_locale_name.
3976         (struniq): Define only on platforms that need it.
3977         * lib/localename.c: Remove code that was moved to
3978         lib/localename-unsafe.c.
3979         (gl_locale_name_thread): Just call gl_locale_name_thread_unsafe and
3980         struniq.
3981         (gl_locale_name_posix): Just call gl_locale_name_posix_unsafe and
3982         struniq.
3983         * lib/locale.in.h: Test @GNULIB_LOCALENAME_UNSAFE@ instead of
3984         @GNULIB_LOCALENAME@.
3985         * m4/locale_h.m4 (gl_LOCALE_H_REQUIRE_DEFAULTS): Initialize
3986         GNULIB_LOCALENAME_UNSAFE instead of GNULIB_LOCALENAME.
3987         * modules/locale (Makefile.am): Substitute GNULIB_LOCALENAME_UNSAFE
3988         instead of GNULIB_LOCALENAME.
3989         * m4/localename.m4 (gl_LOCALENAME_UNSAFE): Renamed from gl_LOCALENAME.
3990         * modules/localename-unsafe: New file, based on modules/localename.
3991         * modules/localename: Greatly simplify.
3992         (Depends-on): Add localename-unsafe.
3994 2024-02-15  Bruno Haible  <bruno@clisp.org>
3996         localename: Refactor.
3997         * lib/struniq.h: New file, extracted from lib/localename.c.
3998         * lib/localename.c: Include it.
3999         * modules/localename (Files): Add lib/struniq.h.
4001 2024-02-15  Bruno Haible  <bruno@clisp.org>
4003         localename: Speed up lookup of the LC_MESSAGES name on AIX ≥ 7.2.
4004         * m4/intl-thread-locale.m4 (gt_INTL_THREAD_LOCALE_NAME): On AIX, test
4005         for the 'locale_name' member.
4006         * lib/localename.c (get_locale_t_name): For the LC_MESSAGES category,
4007         use the 'locale_name' member if available.
4009 2024-02-15  Bruno Haible  <bruno@clisp.org>
4011         localename: Add more comments.
4012         * m4/intl-thread-locale.m4: Document expected configuration results.
4013         * doc/posix-functions/uselocale.texi: Update platforms list.
4014         * lib/localename.c: Likewise.
4016 2024-02-15  Bruno Haible  <bruno@clisp.org>
4018         localename: Add parameter validation.
4019         * lib/localename.c (get_locale_t_name, gl_locale_name_thread_unsafe,
4020         gl_locale_name_thread, gl_locale_name_posix, gl_locale_name): Verify
4021         that the category argument is not LC_ALL.
4023 2024-02-14  Bruno Haible  <bruno@clisp.org>
4025         localename: Notice setlocale() invocations on more platforms.
4026         * lib/localename.c (HAVE_LOCALE_NULL): Define also on musl, FreeBSD,
4027         NetBSD, Solaris, Haiku.
4028         * modules/localename (Files): Add m4/musl.m4.
4029         (configure.ac): Invoke gl_MUSL_LIBC.
4030         * tests/test-localename.c (C_CANONICALIZED): New macro, for Haiku.
4031         (is_default): New function, for musl libc and Haiku.
4032         (test_locale_name, test_locale_name_posix): Use these definitions.
4033         * modules/localename-tests (Files): Add m4/musl.m4.
4034         (configure.ac): Invoke gl_MUSL_LIBC.
4036 2024-02-14  Bruno Haible  <bruno@clisp.org>
4038         Don't treat Apple's new Citrus/FreeBSD-based iconv like GNU libiconv.
4039         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): Don't treat the bastard Apple
4040         iconv like GNU libiconv.
4041         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Likewise.
4042         * lib/striconveh.c (iconv_carefully, iconv_carefully_1,
4043         mem_cd_iconveh_internal): Likewise.
4044         * lib/propername.c (proper_name_utf8): Likewise.
4045         * lib/unicodeio.c (unicode_to_mb): Likewise.
4046         * lib/uniconv/u16-conv-from-enc.c (UTF16_NAME): Likewise.
4047         * lib/uniconv/u16-conv-to-enc.c (UTF16_NAME): Likewise.
4048         * lib/uniconv/u16-strconv-to-enc.c (UTF16_NAME): Likewise.
4049         * lib/uniconv/u32-conv-from-enc.c (UTF32_NAME): Likewise.
4050         * lib/uniconv/u32-conv-to-enc.c (UTF32_NAME): Likewise.
4051         * lib/uniconv/u32-strconv-to-enc.c (UTF32_NAME): Likewise.
4052         * tests/test-striconveh.c (main): Likewise.
4053         * tests/test-striconveha.c (main): Likewise.
4054         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
4055         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
4056         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
4057         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
4058         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
4059         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
4061 2024-02-14  Bruno Haible  <bruno@clisp.org>
4063         Improve support of Citrus/FreeBSD iconv.
4064         * lib/striconveh.c (iconveh_open): Use //TRANSLIT with all iconv
4065         implementations that support it.
4066         * lib/striconveha.c (mem_iconveha, str_iconveha): Likewise.
4067         * lib/propername.c (proper_name_utf8): Likewise.
4069 2024-02-14  Bruno Haible  <bruno@clisp.org>
4071         isnan: Fix compilation error in C++ mode on macOS 14.4 / Xcode 15.2.
4072         Reported by Paul E Reimer <reimer@anl.gov> in
4073         <https://lists.gnu.org/archive/html/bug-gettext/2024-02/msg00002.html>.
4074         * lib/math.in.h (GNULIB_NAMESPACE_LACKS_ISNAN): Define also on macOS
4075         with clang ≥ 14.
4077 2024-02-13  Paul Eggert  <eggert@cs.ucla.edu>
4079         nstrftime: allow opt-out of AM/PM adjustment
4080         For Emacs I would rather avoid bringing in the Gnulib locking code,
4081         since Emacs has its own idea about locks and its main engine is
4082         single-threaded anyway.
4083         Provide a way to use the nstrftime module while avoiding its
4084         recently-added localename dependency, which entails locking code.
4085         (It’s not clear to me that the locking code is needed for nstrftime,
4086         as NetBSD has strftime_z and Solaris locales could be inspected in
4087         some thread-safe way, e.g., by probing strftime month names.
4088         Anyway, all that’s more hassle than I want to put up with right now
4089         for the trivial matter of AM/PM behavior.)
4090         * lib/strftime.c (REQUIRE_GNUISH_STRFTIME_AM_PM):
4091         New macro, which can be overridden by config.h.
4092         (should_remove_ampm, __strftime_internal):
4093         Use it instead of !USE_C_LOCALE when deciding to
4094         implement Gnuish AM/PM behavior.
4096 2024-02-13  Bruno Haible  <bruno@clisp.org>
4098         uniwidth/width tests: Update unit test for last commit.
4099         * tests/uniwidth/test-uc_width2.sh: Update expected test result.
4101 2024-02-12  Bruno Haible  <bruno@clisp.org>
4103         uniwidth/width: Assign width 1 to prepended concatenation marks.
4104         Suggested by Jules Bertholet <julesbertholet@quoi.xyz> in
4105         <https://lists.gnu.org/archive/html/bug-gnulib/2024-02/msg00093.html>.
4106         * lib/gen-uni-tables.c (is_nonspacing): For characters with property
4107         Prepended_Concatenation_Mark, return false instead of true.
4108         * lib/uniwidth/width0.h: Regenerated. This assigns width 1 to the
4109         characters U+0600..U+0605, U+06DD, U+070F, U+0890..U+0891, U+08E2,
4110         U+110BD, U+110CD.
4111         * modules/uniwidth/width (configure.ac): Bump required libunistring
4112         version.
4113         * modules/uniwidth/u8-width (configure.ac): Likewise.
4114         * modules/uniwidth/u8-strwidth (configure.ac): Likewise.
4115         * modules/uniwidth/u16-width (configure.ac): Likewise.
4116         * modules/uniwidth/u16-strwidth (configure.ac): Likewise.
4117         * modules/uniwidth/u32-width (configure.ac): Likewise.
4118         * modules/uniwidth/u32-strwidth (configure.ac): Likewise.
4120 2024-02-12  Bruno Haible  <bruno@clisp.org>
4122         Implement a new property, added by Unicode 9.0.0.
4123         * lib/gen-uni-tables.c (is_property_prepended_concatenation_mark): New
4124         function.
4125         (output_properties): Output also the property
4126         prepended_concatenation_mark.
4127         * lib/unictype.in.h (UC_PROPERTY_PREPENDED_CONCATENATION_MARK,
4128         uc_is_property_prepended_concatenation_mark): New declarations.
4129         * m4/unictype_h.m4 (gl_UNICTYPE_H_REQUIRE_DEFAULTS): Initialize
4130         GNULIB_UNICTYPE_PROPERTY_PREPENDED_CONCATENATION_MARK.
4131         * modules/unictype/base (Makefile.am): Substitute
4132         GNULIB_UNICTYPE_PROPERTY_PREPENDED_CONCATENATION_MARK.
4133         * lib/unictype/pr_prepended_concatenation_mark.c: New file.
4134         * lib/unictype/pr_prepended_concatenation_mark.h: New generated file.
4135         * modules/unictype/property-prepended-concatenation-mark: New file.
4136         * tests/unictype/test-pr_prepended_concatenation_mark.c: New generated
4137         file.
4138         * modules/unictype/property-prepended-concatenation-mark-tests: New
4139         file.
4140         * lib/unictype/pr_byname.gperf: Add prepended_concatenation_mark.
4141         * lib/unictype/pr_byname.c
4142         (UC_PROPERTY_INDEX_PREPENDED_CONCATENATION_MARK): New enum item.
4143         (uc_property_byname): Handle it.
4144         * modules/unictype/property-byname (Depends-on): Add
4145         unictype/property-prepended-concatenation-mark.
4146         * modules/unictype/property-all (Depends-on): Likewise.
4147         * MODULES.html.sh (func_all_modules): Add
4148         unictype/property-prepended-concatenation-mark.
4150 2024-02-12  Bruno Haible  <bruno@clisp.org>
4152         posixtm tests: Fix reference to undefined module (regr. 2024-02-09).
4153         * modules/posixtm-tests (Depends-on): Remove strftime. Add
4154         strftime-fixes.
4156 2024-02-12  Bruno Haible  <bruno@clisp.org>
4158         limits-h: Fix BOOL_MAX value.
4159         * lib/limits.in.h (BOOL_MAX): Define to 1, not to 2^BOOL_WIDTH-1.
4160         * tests/test-limits-h.c (main): Change expected value of BOOL_MAX.
4162 2024-02-12  Bruno Haible  <bruno@clisp.org>
4164         stdalign: Document a clang 17 bug.
4165         * doc/posix-headers/stdalign.texi: Mention a clang 17 bug.
4167 2024-02-12  Bruno Haible  <bruno@clisp.org>
4169         getcwd, getcwd-lgpl: Fix configure test.
4170         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Don't redeclare getcwd().
4172 2024-02-12  Florian Weimer  <fweimer@redhat.com>
4174         pthread_mutex_timedlock, pthread-spin: Fix configure test.
4175         * m4/pthread_mutex_timedlock.m4 (gl_FUNC_PTHREAD_MUTEX_TIMEDLOCK): Pass
4176         a pointer of the correct type to pthread_mutex_timedlock.
4177         * m4/pthread-spin.m4 (gl_PTHREAD_SPIN): Pass a pointer of the correct
4178         type to pthread_spin_init.
4180 2024-02-11  Bruno Haible  <bruno@clisp.org>
4182         Fulfil the obligations of the Unicode license.
4183         * lib/gen-uni-tables.c: Prepend the Unicode license when copying
4184         NameAliases.txt, UnicodeData.txt, NormalizationTest.txt,
4185         GraphemeBreakTest.txt, WordBreakTest.txt.
4186         * tests/unigbrk/GraphemeBreakTest.txt: Prepend the Unicode license.
4187         * tests/uniname/NameAliases.txt: Likewise.
4188         * tests/uniname/UnicodeData.txt: Likewise.
4189         * tests/uninorm/NormalizationTest.txt: Likewise.
4190         * tests/uniwbrk/WordBreakTest.txt: Likewise.
4191         * tests/uniname/HangulSyllableNames.txt: Add public-domain notice.
4193 2024-02-11  Bruno Haible  <bruno@clisp.org>
4195         time_r: Add tests.
4196         * lib/time_r.c: Add comment.
4197         * tests/test-gmtime_r.c: New file.
4198         * tests/test-gmtime_r-mt.c: New file, based on
4199         tests/test-nl_langinfo-mt.c.
4200         * tests/test-localtime_r.c: New file.
4201         * tests/test-localtime_r-mt.c: New file, based on
4202         tests/test-nl_langinfo-mt.c.
4203         * modules/time_r-tests: New file.
4205 2024-02-10  Paul Eggert  <eggert@cs.ucla.edu>
4207         doc: improve warnings about ctime etc.
4208         * doc/posix-functions/asctime.texi (asctime):
4209         * doc/posix-functions/asctime_r.texi (asctime_r):
4210         Say why these functions are typically used mistakenly.
4211         * doc/posix-functions/ctime.texi (ctime):
4212         * doc/posix-functions/ctime_r.texi (ctimef):
4213         Say that they can dump core due to an internal null pointer, too.
4214         * doc/posix-functions/ctime.texi (ctime):
4215         Don’t recommend ctime_r.
4217 2024-02-10  Bruno Haible  <bruno@clisp.org>
4219         havelib: Add support for NetBSD/sparc64.
4220         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): On NetBSD/sparc64 in
4221         32-bit mode, search for libraries in /usr/lib/sparc.
4223 2024-02-09  Bruno Haible  <bruno@clisp.org>
4225         ctime, localtime, tzset, wcsftime: Make multithread-safe.
4226         * lib/ctime.c: Include <wchar.h>.
4227         (rpl_ctime): Modify _environ and _wenviron without using _putenv.
4228         * lib/localtime.c: Include <wchar.h>.
4229         (rpl_localtime): Modify _environ and _wenviron without using _putenv.
4230         * lib/tzset.c: Include <wchar.h>.
4231         (rpl_tzset): Modify _environ and _wenviron without using _putenv.
4232         * lib/wcsftime.c (rpl_wcsftime): Likewise.
4234 2024-02-09  Bruno Haible  <bruno@clisp.org>
4236         strftime: Remove module, deprecated in 2017.
4237         * modules/strftime: Remove file.
4238         * NEWS: Mention it.
4240 2024-02-09  Bruno Haible  <bruno@clisp.org>
4242         Avoid suboptimal definition of _GL_HAS_ATTRIBUTE on FreeBSD/sparc64.
4243         * m4/gnulib-common.m4 (gl_COMMON_BODY): Define _GL_HAS_ATTRIBUTE only
4244         once.
4246 2024-02-08  Bruno Haible  <bruno@clisp.org>
4248         nstrtime, c-nstrftime tests: Strengthen the tests.
4249         * tests/test-nstrftime.h (FUNC_CHECKED): New function.
4250         (posixtm_test, tzalloc_test, quarter_test, errno_test, locales_test):
4251         Invoke FUNC_CHECKED instead of FUNC.
4253 2024-02-08  Bruno Haible  <bruno@clisp.org>
4255         nstrtime: Fix %p, %P, %r directives' results on NetBSD, Solaris.
4256         * lib/strftime.c: Include <locale.h>, localename.h.
4257         (should_remove_ampm): New function.
4258         (__strftime_internal): On NetBSD and Solaris, remove the AM/PM indicator
4259         from the %p, %r directives' results in specific locales.
4260         * modules/nstrftime (Depends-on): Add localename.
4261         * tests/test-nstrftime.h (locales_test): Update the expected result of
4262         the %r directive.
4263         * doc/posix-functions/strftime.texi: Mention the problem of the %p and
4264         %r directives on NetBSD and Solaris.
4266 2024-02-08  Bruno Haible  <bruno@clisp.org>
4268         nstrtime, c-nstrftime: Fix %c directive's result on NetBSD, Solaris.
4269         * lib/strftime.c (__strftime_internal): On NetBSD and Solaris, remove
4270         the last word of the %c directive's result if it looks like a time zone.
4271         * doc/posix-functions/strftime.texi: Mention this as a restriction of
4272         strftime.
4274 2024-02-07  Bruno Haible  <bruno@clisp.org>
4276         c-nstrftime: Add tests.
4277         * tests/test-c-nstrftime.c: New file, based on tests/test-nstrftime.c.
4278         * tests/test-c-nstrftime-1.sh: New file, based on
4279         tests/test-nstrftime-1.sh.
4280         * tests/test-c-nstrftime-2.sh: New file, based on
4281         tests/test-nstrftime-2.sh.
4282         * modules/c-nstrftime-tests: New file.
4284         c-nstrftime: New module.
4285         Suggested by Paul Eggert.
4286         * lib/strftime.h (c_nstrftime): New declaration.
4287         * lib/c-nstrftime.c: New file.
4288         * lib/strftime.c (FPRINTFTIME): Move fallback definition before its
4289         first use.
4290         (USE_C_LOCALE): Add fallback definition.
4291         If USE_C_LOCALE is set, include c-ctype.h instead of <ctype.h>.
4292         Conditionally include <locale.h>.
4293         (TOUPPER, TOLOWER): Define differently if USE_C_LOCALE is set.
4294         (c_locale_cache, c_locale): New definitions, copied from lib/c-strtod.c.
4295         (c_weekday_names, c_month_names): New variables, based on
4296         glibc/time/strftime_l.c.
4297         (__strftime_internal): Define a_wkday, aw_len, f_wkday, a_month, am_len,
4298         f_month, ampm, ap_len differently for USE_C_LOCALE. Avoid a
4299         'goto underlying_strftime' if USE_C_LOCALE && !HAVE_STRFTIME_L. If
4300         USE_C_LOCALE, use strftime_l() with the C locale object instead of
4301         strftime().
4302         * m4/c-nstrftime.m4: New file, based on m4/nstrftime.m4.
4303         * modules/c-nstrftime: New file, based on modules/nstrftime.
4305 2024-02-07  Bruno Haible  <bruno@clisp.org>
4307         nstrftime: Add tests of all directives, also in non-trivial locales.
4308         * tests/test-nstrftime.h (language_t): New type.
4309         (locales_test): New function.
4310         * tests/test-nstrftime.c: Include <locale.h>, <stdlib.h>.
4311         (main): Invoke setlocale and locales_test.
4312         * tests/test-nstrftime-1.sh: New file.
4313         * tests/test-nstrftime-2.sh: New file, based on tests/test-strtod1.sh.
4314         * modules/nstrftime-tests (Files): Add them. Add m4/locale-fr.m4,
4315         m4/codeset.m4, m4/musl.m4.
4316         (configure.ac): Invoke gt_LOCALE_FR, gt_LOCALE_FR_UTF8, gl_MUSL_LIBC.
4317         (Makefile.am): Link test-nstrftime with $(SETLOCALE_LIB). Test
4318         test-nstrftime-*.sh instead of test-nstrftime.
4320 2024-02-07  Bruno Haible  <bruno@clisp.org>
4322         nstrftime: Work around strftime bug with %r on macOS and FreeBSD.
4323         * lib/strftime.c (__strftime_internal): For %r, don't use the underlying
4324         strftime() directly.
4325         * doc/posix-functions/strftime.texi: Mention the %r bug.
4327 2024-02-07  Paul Eggert  <eggert@cs.ucla.edu>
4329         Assume ‘long long’ support
4330         * modules/strtoimax, modules/strtoumax (Depends-on):
4331         Assume the compiler supports ‘long long’.
4332         This was overlooked in the 2019-12-22 patch
4333         <https://lists.gnu.org/r/bug-gnulib/2019-12/msg00190.html>.
4335 2024-02-07  Bruno Haible  <bruno@clisp.org>
4337         nstrftime: Fix typo in documentation.
4338         Reported by Tim Rice <tim@multitalents.net>.
4339         * lib/strftime.h (nstrftime): Fix typo in comment.
4341 2024-02-07  Bruno Haible  <bruno@clisp.org>
4343         nstrftime tests: Avoid test failures on DragonFly BSD.
4344         * tests/test-nstrftime.h (LT): Disable specific test cases also on
4345         DragonFly BSD.
4347 2024-02-07  Bruno Haible  <bruno@clisp.org>
4349         nstrftime: Modernize.
4350         * lib/strftime.c (__strftime_internal): Make the strftime fallback
4351         declaration ISO C 23 compliant.
4353 2024-02-07  Bruno Haible  <bruno@clisp.org>
4355         nstrftime tests: Avoid test failures on FreeBSD, NetBSD, Android.
4356         * tests/test-nstrftime.h (LT): Disable specific test cases on FreeBSD,
4357         NetBSD, Android.
4359 2024-02-07  Bruno Haible  <bruno@clisp.org>
4361         nstrftime tests: Allow reuse with another function.
4362         * tests/test-nstrftime.h: New file, extracted from
4363         tests/test-nstrftime.c.
4364         (FUNC_NAME, STRINGIFY): New macros.
4365         (posixtm_test, tzalloc_test, quarter_test, errno_test): Use FUNC or
4366         FUNC_NAME instead of nstrftime.
4367         (quarter_test): Rename local variable 'result' to 'fail'.
4368         * tests/test-nstrftime.c: Remove code that moved to test-nstrftime.h.
4369         Include test-nstrftime.h.
4370         (STREQ): Remove redundant macro.
4371         * modules/nstrftime-tests (Files): Add tests/test-nstrftime.h.
4373 2024-02-07  Bruno Haible  <bruno@clisp.org>
4375         nstrftime: Document the nstrftime function.
4376         * lib/strftime.h (nstrftime): Add more comments.
4378 2024-02-06  Bruno Haible  <bruno@clisp.org>
4380         nl_langinfo: Fix fallback list of month names (regression 2014-07-07).
4381         * lib/nl_langinfo.c (nl_langinfo): In the implementation for native
4382         Windows, fix the results for MON_8..MON_12, ALTMON_8..ALTMON_12,
4383         ABMON_8..ABMON_12.
4385 2024-02-06  Bruno Haible  <bruno@clisp.org>
4387         nstrftime: Merge glibc strftime changes.
4388         This incorporates:
4389         2023-02-07 Use 64-bit time_t interfaces in strftime and strptime
4390         * lib/strftime.c [_LIBC] (time_t, __gmtime_r, mktime): Define as macros.
4391         * config/srclist.txt: Update comment regarding glibc/time/strftime_l.c.
4393 2024-02-06  Bruno Haible  <bruno@clisp.org>
4395         nstrftime, fprintftime: Simplify.
4396         * lib/strftime.c: Renamed from lib/nstrftime.c.
4397         (my_strftime): Don't define here.
4398         * lib/nstrftime.c: New file.
4399         * lib/fprintftime.c (my_strftime): New macro.
4400         Include strftime.c, not nstrftime.c.
4401         * m4/nstrftime.m4 (gl_FUNC_GNU_STRFTIME): Don't define my_strftime in
4402         config.h.
4403         * modules/nstrftime (Files): Add lib/strftime.c.
4404         * modules/fprintftime (Files): Likewise.
4405         * config/srclist.txt: Update comment regarding glibc/time/strftime.c.
4407 2024-02-06  Bruno Haible  <bruno@clisp.org>
4409         Further improve cross-compilation for midipix.
4410         Reported by Ørjan Malde <red@foxi.me>.
4411         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Improve cross-compilation guess
4412         for midipix.
4414 2024-02-05  Paul Eggert  <eggert@cs.ucla.edu>
4416         ctime: improve doc
4417         * doc/posix-functions/asctime.texi (asctime):
4418         * doc/posix-functions/asctime_r.texi (asctime_r):
4419         * doc/posix-functions/ctime_r.texi (ctime_r):
4420         * doc/posix-functions/ctime.texi (ctime):
4421         Mention locale problem of strftime more consistently.  Improve
4422         wording.  For ctime and ctime_r, mention that localtime_r can
4423         fail.
4424         * doc/posix-functions/ctime.texi (ctime): Move history section
4425         to end and spiff up a bit.
4426         * doc/posix-functions/ctime_r.texi (ctime_r): Omit commentary that
4427         assumes traditional SunOS ctime_r API; it was confusing and not
4428         useful for Gnulib apps, which assume the POSIX API.
4430 2024-02-05  Bruno Haible  <bruno@clisp.org>
4432         Further improve cross-compilation for midipix.
4433         Based on patch by Ørjan Malde <red@foxi.me> from
4434         <https://lists.gnu.org/archive/html/bug-gnulib/2024-02/msg00004.html>.
4435         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Add cross-compilation guess for
4436         midipix.
4437         * m4/rename.m4 (gl_FUNC_RENAME): Likewise.
4438         * m4/truncate.m4 (gl_FUNC_TRUNCATE): Likewise.
4439         * m4/utime.m4 (gl_FUNC_UTIME): Likewise.
4440         * m4/utimens.m4 (gl_UTIMENS): Likewise.
4441         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Likewise.
4443 2024-02-05  Paul Eggert  <eggert@cs.ucla.edu>
4445         doc: Extend doc of *ctime functions.
4446         * doc/posix-functions/ctime.texi (ctime): Document why we got into
4447         this mess.
4448         * doc/posix-functions/asctime.texi (asctime):
4449         * doc/posix-functions/asctime_r.texi (asctime_r):
4450         * doc/posix-functions/ctime_r.texi (ctime_r):
4451         Refer to ctime’s buffer overflow doc.
4453 2024-02-05  Bruno Haible  <bruno@clisp.org>
4455         snippet/warn-on-use: Add comment.
4456         * lib/warn-on-use.h: Document a restriction of _GL_WARN_ON_USE.
4458 2024-02-03  Paul Eggert  <eggert@cs.ucla.edu>
4460         xalloc-oversized: omit unnecessary cast
4461         * lib/xalloc-oversized.h (__xalloc_oversized): Omit unnecessary
4462         cast of a positive in-range value to size_t.  This seems to be
4463         left over from an older version of the code.
4465         glob: port better to C23
4466         * lib/glob.c: Include <stdckdint.h>.
4467         (size_add_wrapv): Remove.  All uses replaced by ckd_add.
4468         * modules/glob: Depend on stdckdint.
4470         ctime: fix false positive
4471         Problem reported by Bjarni Ingi Gislason in:
4472         https://lists.gnu.org/r/bug-gnulib/2024-02/msg00006.html
4473         * lib/time.in.h (ctime): Do not warn about ctime portability,
4474         as there is a more serious warning about it crashing,
4475         and the two warning directives can cause false alarms.
4477 2024-01-31  Bruno Haible  <bruno@clisp.org>
4479         Implement 3 new properties, added by Unicode 15.1.0.
4480         * lib/gen-uni-tables.c (is_property_id_compat_math_start,
4481         is_property_id_compat_math_continue, is_property_ids_unary_operator):
4482         New functions.
4483         (output_properties): Output also the properties id_compat_math_start,
4484         id_compat_math_continue, ids_unary_operator.
4485         * lib/unictype.in.h (UC_PROPERTY_ID_COMPAT_MATH_START,
4486         UC_PROPERTY_ID_COMPAT_MATH_CONTINUE, UC_PROPERTY_IDS_UNARY_OPERATOR,
4487         uc_is_property_id_compat_math_start,
4488         uc_is_property_id_compat_math_continue,
4489         uc_is_property_ids_unary_operator): New declarations.
4490         * m4/unictype_h.m4 (gl_UNICTYPE_H_REQUIRE_DEFAULTS): Initialize
4491         GNULIB_UNICTYPE_PROPERTY_ID_COMPAT_MATH_START_DLL_VARIABLE,
4492         GNULIB_UNICTYPE_PROPERTY_ID_COMPAT_MATH_CONTINUE_DLL_VARIABLE,
4493         GNULIB_UNICTYPE_PROPERTY_IDS_UNARY_OPERATOR_DLL_VARIABLE.
4494         * modules/unictype/base (Makefile.am): Substitute
4495         GNULIB_UNICTYPE_PROPERTY_ID_COMPAT_MATH_START_DLL_VARIABLE,
4496         GNULIB_UNICTYPE_PROPERTY_ID_COMPAT_MATH_CONTINUE_DLL_VARIABLE,
4497         GNULIB_UNICTYPE_PROPERTY_IDS_UNARY_OPERATOR_DLL_VARIABLE.
4498         * lib/unictype/pr_id_compat_math_continue.c: New file.
4499         * lib/unictype/pr_id_compat_math_continue.h: New generated file.
4500         * lib/unictype/pr_id_compat_math_start.c: New file.
4501         * lib/unictype/pr_id_compat_math_start.h: New generated file.
4502         * lib/unictype/pr_ids_unary_operator.c: New file.
4503         * modules/unictype/property-id-compat-math-continue: New file.
4504         * modules/unictype/property-id-compat-math-start: New file.
4505         * modules/unictype/property-ids-unary-operator: New file.
4506         * tests/unictype/test-pr_id_compat_math_continue.c: New generated file.
4507         * tests/unictype/test-pr_id_compat_math_start.c: New generated file.
4508         * tests/unictype/test-pr_ids_unary_operator.c: New generated file.
4509         * modules/unictype/property-id-compat-math-continue-tests: New file.
4510         * modules/unictype/property-id-compat-math-start-tests: New file.
4511         * modules/unictype/property-ids-unary-operator-tests: New file.
4512         * lib/unictype/pr_byname.gperf: Add id_compat_math_start,
4513         id_compat_math_continue, ids_unary_operator.
4514         * lib/unictype/pr_byname.c (UC_PROPERTY_INDEX_ID_COMPAT_MATH_START,
4515         UC_PROPERTY_INDEX_ID_COMPAT_MATH_CONTINUE,
4516         UC_PROPERTY_INDEX_IDS_UNARY_OPERATOR): New enum items.
4517         (uc_property_byname): Handle them.
4518         * modules/unictype/property-byname (Depends-on): Add
4519         unictype/property-id-compat-math-continue,
4520         unictype/property-id-compat-math-start,
4521         unictype/property-ids-unary-operator.
4522         * modules/unictype/property-all (Depends-on): Likewise.
4523         * MODULES.html.sh (func_all_modules): Add
4524         unictype/property-id-compat-math-continue,
4525         unictype/property-id-compat-math-start,
4526         unictype/property-ids-unary-operator.
4528 2024-01-30  Bruno Haible  <bruno@clisp.org>
4530         Update to Unicode 15.1.0.
4532         * lib/gen-uni-tables.c (PROP_SENTENCE_TERMINAL): Renamed from
4533         PROP_STERM.
4534         (PROP_IDS_UNARY_OPERATOR, PROP_ID_COMPAT_MATH_CONTINUE,
4535         PROP_ID_COMPAT_MATH_START): New enum items.
4536         (UC_INDIC_CONJUNCT_BREAK_*): New enum items.
4537         (unicode_indic_conjunct_break): New variable.
4538         (fill_properties): Rename local variable propvalue to propcode. Handle
4539         the properties IDS_Unary_Operator, ID_Compat_Math_Continue,
4540         ID_Compat_Math_Start. Parse the InCB values from file
4541         DerivedCoreProperties.txt.
4542         (indic_conjunct_break_as_c_identifier,
4543         output_indic_conjunct_break_test): New functions.
4544         (indic_conjunct_break_table): New variable.
4545         (output_indic_conjunct_break): New function.
4546         (fill_width): Accept spaces at the end of field0 and at the start and
4547         end of field1.
4548         (LBP_QU1, LBP_QU2, LBP_QU3): New enum items, for Unicode TR #14 rules
4549         (LB15a) and (LB15b).
4550         (LBP_AP, LBP_AK, LBP_AS, LBP_VI, LBP_VF): New enum items, for Brahmic
4551         scripts.
4552         (get_lbp): Update such that unilbrk/lbrkprop.txt comes out as expected.
4553         (debug_output_lbp): Print either LBP_QU1 or LBP_QU2 or LBP_QU3 as
4554         LBP_QU. Handle LBP_AP, LBP_AK, LBP_AS, LBP_VI, LBP_VF.
4555         (fill_org_lbp): Accept spaces at the end of field0 and at the start and
4556         end of field1. Recognize LBP_AP, LBP_AK, LBP_AS, LBP_VI, LBP_VF.
4557         (debug_output_org_lbp): Handle LBP_AP, LBP_AK, LBP_AS, LBP_VI, LBP_VF.
4558         (lbp_value_to_string): Handle LBP_QU1, LBP_QU2, LBP_QU3 instead of
4559         LBP_QU. Handle LBP_AP, LBP_AK, LBP_AS, LBP_VI, LBP_VF.
4560         (output_lbrk_rules_as_tables): Treat LBP_QU as macro that maps to three
4561         table rows/columns. Replace rule (LB15) with rules (LB15b) and (LB15a).
4562         (get_wbp): Update such that uniwbrk/wbrkprop.txt comes out as expected.
4563         (main): Invoke output_indic_conjunct_break_test and
4564         output_indic_conjunct_break.
4566         * All generated files under lib/uni* and tests/uni*: Regenerate.
4567         * tests/uniname/NameAliases.txt: Update.
4568         * tests/uniname/UnicodeData.txt: Update.
4569         * tests/uninorm/NormalizationTest.txt: Update.
4570         * tests/unigbrk/GraphemeBreakTest.txt: Update.
4571         * tests/uniwbrk/WordBreakTest.txt: Update.
4573         * lib/unilbrk/lbrktables.h (LBP_QU1, LBP_QU2, LBP_QU3): New enum items,
4574         for Unicode TR #14 rules (LB15a) and (LB15b).
4575         (LBP_QU): Remove enum item.
4576         (LBP_AP, LBP_AK, LBP_AS, LBP_VI, LBP_VF): New enum items, for Brahmic
4577         scripts.
4578         (unilbrk_table): Update array bounds.
4579         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks_loop):
4580         Conditionally replace LBP_QU2 with LBP_QU1, for rule (LB15a).
4581         Conditionally replace LBP_QU3 with LBP_QU1, for rule (LB15b).
4582         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks_loop):
4583         Likewise.
4584         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks_loop):
4585         Likewise.
4587         * lib/unictype.in.h (UC_INDIC_CONJUNCT_BREAK_*): New enum values.
4588         (uc_indic_conjunct_break_name, uc_indic_conjunct_break_byname,
4589         uc_indic_conjunct_break): New declarations.
4590         * lib/unictype/incb_byname.c: New file.
4591         * lib/unictype/incb_byname.gperf: New file.
4592         * lib/unictype/incb_name.c: New file.
4593         * lib/unictype/incb_name.h: New file.
4594         * lib/unictype/incb_of.c: New file.
4595         * lib/unictype/incb_of.h: New generated file.
4596         * modules/unictype/incb-all: New file.
4597         * modules/unictype/incb-byname: New file.
4598         * modules/unictype/incb-name: New file.
4599         * modules/unictype/incb-of: New file.
4600         * tests/unictype/test-incb_byname.c: New file.
4601         * tests/unictype/test-incb_name.c: New file.
4602         * tests/unictype/test-incb_of.c: New file.
4603         * tests/unictype/test-incb_of.h: New generated file.
4604         * modules/unictype/incb-byname-tests: New file.
4605         * modules/unictype/incb-name-tests: New file.
4606         * modules/unictype/incb-of-tests: New file.
4608         * lib/unigbrk.in.h (uc_is_grapheme_break, u*_grapheme_next,
4609         u*_grapheme_prev): Add comments.
4610         * lib/unigbrk/u-grapheme-breaks.h (FUNC): Add local variables
4611         incb_consonant_extended, incb_consonant_extended_linker,
4612         incb_consonant_extended_linker_extended. Implement rule (GB9c).
4613         * modules/unigbrk/u8-grapheme-breaks (Depends-on): Add unictype/incb-of.
4614         * modules/unigbrk/u16-grapheme-breaks (Depends-on): Likewise.
4615         * modules/unigbrk/u32-grapheme-breaks (Depends-on): Likewise.
4616         * modules/unigbrk/uc-grapheme-breaks (Depends-on): Likewise.
4617         * tests/unigbrk/test-uc-is-grapheme-break.c (main): Add local variables
4618         incb_consonant_extended, incb_consonant_extended_linker,
4619         incb_consonant_extended_linker_extended. Skip test cases that match rule
4620         (GB9c).
4621         * modules/unigbrk/uc-is-grapheme-break-tests (Depends-on): Add
4622         unictype/incb-of.
4624         * All the affected modules: Bump required libunistring version.
4626 2024-01-30  Bruno Haible  <bruno@clisp.org>
4628         unigbrk/uc-is-grapheme-break tests: Reduce verbosity.
4629         * tests/unigbrk/test-uc-is-grapheme-break.c
4630         (graphemebreakproperty_to_string): Don't print gbp to stdout.
4632 2024-01-30  Bruno Haible  <bruno@clisp.org>
4634         gen-uni-tables: Update copyright year in output.
4635         * lib/gen-uni-tables.c (output_predicate_test, output_predicate,
4636         output_category, output_combclass, output_bidi_category,
4637         output_decimal_digit_test, output_decimal_digit, output_digit_test,
4638         output_digit, output_numeric_test, output_numeric, output_mirror,
4639         output_joining_type_test, output_joining_type,
4640         output_joining_group_test, output_joining_group, output_scripts,
4641         output_scripts_byname, output_blocks, output_ident_category,
4642         output_nonspacing_property, output_lbrk_tables,
4643         output_lbrk_rules_as_tables, output_wbrk_tables, output_gbp_test,
4644         output_gbp_table, output_decomposition_tables,
4645         output_composition_tables, output_simple_mapping_test,
4646         output_simple_mapping, output_casing_rules): Bump copyright year in
4647         output.
4648         * lib/uniname/gen-uninames.lisp (main): Likewise.
4650 2024-01-30  Bruno Haible  <bruno@clisp.org>
4652         gen-uni-tables: Refactor, based on UAX #14 version 49.
4653         * lib/gen-uni-tables.c (get_lbp): Reorder, based on
4654         <https://www.unicode.org/reports/tr14/tr14-49.html#DescriptionOfProperties>.
4655         For LBP_EB, use the "emoji modifier base" property.
4657 2024-01-30  Bruno Haible  <bruno@clisp.org>
4659         unigbrk tests: Tweak error reporting.
4660         * tests/unigbrk/test-ulc-grapheme-breaks.c (main): Print byte values in
4661         upper-case hexadecimal.
4662         * tests/unigbrk/test-u8-grapheme-breaks.c (test_u8_grapheme_breaks):
4663         Print unit values in upper-case hexadecimal.
4664         * tests/unigbrk/test-u16-grapheme-breaks.c (test_u16_grapheme_breaks):
4665         Print unit values with at least 4 hexadecimal digits.
4666         * tests/unigbrk/test-u32-grapheme-breaks.c (test_u32_grapheme_breaks):
4667         Likewise.
4668         * tests/unigbrk/test-uc-grapheme-breaks.c (test_uc_grapheme_breaks):
4669         Print characters with at least 4 hexadecimal digits.
4671 2024-01-30  Bruno Haible  <bruno@clisp.org>
4673         Update copyright year in tests/unictype/*.
4674         * tests/unictype/*: Bump copyright years range to include 2024.
4675         * Makefile (update-copyright): Don't exclude the tests/unictype
4676         directory.
4678 2024-01-29  Patrice Dumas  <pertusus@free.fr>
4680         gendocs: get only targetted manual source and includes, when possible
4681         * build-aux/gendocs.sh: if makeinfo, based on version, has the
4682         --trace-includes option, gather only the targetted manual srcfile and
4683         the included files obtained with makeinfo --trace-includes. In that
4684         case output include files to tar stdin and use -T-. Bruno Haible for
4685         the version comparison and use of tar.
4687 2024-01-29  Bruno Haible  <bruno@clisp.org>
4689         Port FALLTHROUGH to Mac OS X 10.9.
4690         Report and fix by Ryan Carsten Schmidt <gnulib@ryandesign.com>
4691         at <https://savannah.gnu.org/bugs/?63866>.
4692         * m4/gnulib-common.m4 (gl_COMMON_BODY): For _GL_HAS_ATTRIBUTE, don't use
4693         __has_attribute for Apple clang versions < 7000000.
4694         * lib/cdefs.h (__glibc_has_attribute): Don't use __has_attribute for
4695         Apple clang versions < 7000000.
4697 2024-01-29  Bruno Haible  <bruno@clisp.org>
4699         libc-config: Apply lesson learned on 2023-01-13.
4700         * lib/cdefs.h (__glibc_has_attribute): On non-Apple platforms, don't
4701         use __has_attribute for clang versions < 5.0.
4703 2024-01-28  Bruno Haible  <bruno@clisp.org>
4705         host-cpu-c-abi: Let gl_HOST_CPU_C_ABI_32BIT never return 'unknown'.
4706         Reported by Mohammad-Reza Nabipoor <mnabipoor@gnu.org>.
4707         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI_32BIT): Use the list of
4708         always-32-bit CPUs and the list of always-64-bit CPUs also when
4709         gl_HOST_CPU_C_ABI has already been run. As a fallback, use a test of
4710         'sizeof (void *)' to always return 'yes' or 'no', never 'unknown'.
4712 2024-01-27  Paul Eggert  <eggert@cs.ucla.edu>
4714         gendocs: allow other chars in source file names
4715         * build-aux/gendocs.sh: Generalize to also allow leading ‘-’
4716         and newlines (!) in source file names.  Exit if there
4717         is an error creating the tarball.
4719 2024-01-27  Patrice Dumas  <pertusus@free.fr>
4721         gendocs: allow spaces, metacharacters and quotes in source file names
4722         * build-aux/gendocs.sh: output files to tar stdin and use -T- to allow
4723         spaces, metacharacters and quotes in file names.  Bruno Haible
4724         solution.
4726 2024-01-27  Patrice Dumas  <pertusus@free.fr>
4728         gendocs: fix --no-html
4729         * build-aux/gendocs.sh: fix typo in variable name set by --no-html.
4731 2024-01-25  Bruno Haible  <bruno@clisp.org>
4733         execute tests: Avoid test failure on macOS 14.
4734         Reported by Guangyu Li <gl343@cornell.edu> in
4735         <https://lists.gnu.org/archive/html/bug-gettext/2024-01/msg00006.html>.
4736         * tests/test-execute-main.c (main): In the tests 17, 18, 19, 20, use the
4737         file descriptors 15, 16 instead of 10, 11, respectively.
4738         * tests/test-execute-child.c (main): Likewise.
4740 2024-01-25  Bruno Haible  <bruno@clisp.org>
4742         Resolve conflicts for functions introduced in Android API level 35.
4744         * lib/time.in.h (timespec_getres): Consider REPLACE_TIMESPEC_GETRES.
4745         * m4/time_h.m4 (gl_TIME_H_DEFAULTS): Initialize REPLACE_TIMESPEC_GETRES.
4746         * modules/time-h (Makefile.am): Substitute REPLACE_TIMESPEC_GETRES.
4747         * m4/timespec_getres.m4 (gl_FUNC_TIMESPEC_GETRES): Test for
4748         timespec_getres using gl_CHECK_FUNCS_ANDROID instead of
4749         AC_CHECK_FUNCS_ONCE. Conditionally set REPLACE_TIMESPEC_GETRES.
4750         * modules/timespec_getres (Depends-on, configure.ac): Consider
4751         REPLACE_TIMESPEC_GETRES.
4752         * m4/gettime.m4 (gl_GETTIME_RES): Test for timespec_getres using
4753         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
4754         * doc/posix-functions/timespec_getres.texi: Mention the Android API
4755         levels.
4757 2024-01-25  Bruno Haible  <bruno@clisp.org>
4759         Resolve conflicts for functions introduced in Android API level 34.
4761         * m4/copy-file-range.m4 (gl_FUNC_COPY_FILE_RANGE): On platforms without
4762         glibc, test for copy_file_range using gl_CHECK_FUNCS_ANDROID instead of
4763         AC_CHECK_FUNCS_ONCE. Conditionally set REPLACE_COPY_FILE_RANGE.
4764         * doc/glibc-functions/copy_file_range.texi: Mention the Android API
4765         levels.
4767         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): Test for
4768         posix_spawn_file_actions_addchdir_np and
4769         posix_spawn_file_actions_addfchdir_np using gl_CHECK_FUNCS_ANDROID
4770         instead of AC_CHECK_FUNCS_ONCE.
4771         * m4/posix_spawn_faction_addchdir.m4
4772         (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR): Test for
4773         posix_spawn_file_actions_addchdir_np using gl_CHECK_FUNCS_ANDROID
4774         instead of AC_CHECK_FUNCS_ONCE.
4775         * m4/posix_spawn_faction_addfchdir.m4
4776         (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR): Test for
4777         posix_spawn_file_actions_addfchdir_np using gl_CHECK_FUNCS_ANDROID
4778         instead of AC_CHECK_FUNCS_ONCE.
4779         * doc/glibc-functions/posix_spawn_file_actions_addchdir_np.texi: Mention
4780         the Android API levels.
4781         * doc/glibc-functions/posix_spawn_file_actions_addfchdir_np.texi:
4782         Likewise.
4784         * lib/string.in.h (memset_explicit): Consider REPLACE_MEMSET_EXPLICIT.
4785         * m4/string_h.m4 (gl_STRING_H_DEFAULTS): Initialize
4786         REPLACE_MEMSET_EXPLICIT.
4787         * modules/string (Makefile.am): Substitute REPLACE_MEMSET_EXPLICIT.
4788         * m4/memset_explicit.m4 (gl_FUNC_MEMSET_EXPLICIT): Test for
4789         memset_explicit using gl_CHECK_FUNCS_ANDROID instead of
4790         AC_CHECK_FUNCS_ONCE. Conditionally set REPLACE_MEMSET_EXPLICIT.
4791         * modules/memset_explicit (configure.ac): Consider
4792         REPLACE_MEMSET_EXPLICIT.
4793         * doc/posix-functions/memset_explicit.texi: Mention the Android API
4794         levels.
4796         * m4/freadahead.m4 (gl_FUNC_FREADAHEAD): Test for __freadahead using
4797         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
4798         * lib/freadahead.h: Update comment.
4800 2024-01-25  Bruno Haible  <bruno@clisp.org>
4802         Doc regarding functions introduced in Android API level 33.
4803         * doc/glibc-functions/backtrace.texi: Mention the Android API levels.
4804         * doc/glibc-functions/backtrace_symbols.texi: Likewise.
4805         * doc/glibc-functions/backtrace_symbols_fd.texi: Likewise.
4806         * doc/glibc-functions/preadv2.texi: Likewise.
4807         * doc/glibc-functions/pwritev2.texi: Likewise.
4809 2024-01-25  Bruno Haible  <bruno@clisp.org>
4811         Resolve conflicts for functions introduced in Android API level 30.
4813         * doc/glibc-functions/memfd_create.texi: Mention the Android API levels.
4814         * doc/glibc-functions/mlock2.texi: Likewise.
4815         * doc/glibc-functions/pthread_cond_clockwait.texi: Likewise.
4816         * doc/glibc-functions/pthread_mutex_clocklock.texi: Likewise.
4817         * doc/glibc-functions/pthread_rwlock_clockrdlock.texi: Likewise.
4818         * doc/glibc-functions/pthread_rwlock_clockwrlock.texi: Likewise.
4819         * doc/glibc-functions/renameat2.texi: Likewise.
4820         * doc/glibc-functions/sem_clockwait.texi: Likewise.
4821         * doc/glibc-functions/statx.texi: Likewise.
4823         * lib/threads.in.h (thrd_sleep): Consider REPLACE_THRD_SLEEP.
4824         (thrd_yield): Consider REPLACE_THRD_YIELD.
4825         (mtx_init): Consider REPLACE_MTX_INIT.
4826         (mtx_lock): Consider REPLACE_MTX_LOCK.
4827         (mtx_trylock): Consider REPLACE_MTX_TRYLOCK.
4828         (mtx_timedlock): Consider REPLACE_MTX_TIMEDLOCK.
4829         (mtx_unlock): Consider REPLACE_MTX_UNLOCK.
4830         (mtx_destroy): Consider REPLACE_MTX_DESTROY.
4831         (call_once): Consider REPLACE_CALL_ONCE. Fix warning message.
4832         (cnd_init): Consider REPLACE_CND_INIT.
4833         (cnd_wait): Consider REPLACE_CND_WAIT.
4834         (cnd_timedwait): Consider REPLACE_CND_TIMEDWAIT.
4835         (cnd_signal): Consider REPLACE_CND_SIGNAL.
4836         (cnd_broadcast): Consider REPLACE_CND_BROADCAST.
4837         (cnd_destroy): Consider REPLACE_CND_DESTROY.
4838         (tss_create): Consider REPLACE_TSS_CREATE.
4839         (tss_set): Consider REPLACE_TSS_SET.
4840         (tss_get): Consider REPLACE_TSS_GET.
4841         (tss_delete): Consider REPLACE_TSS_DELETE.
4842         * m4/threads_h.m4 (gl_THREADS_H_DEFAULTS): Initialize REPLACE_CALL_ONCE,
4843         REPLACE_CND_BROADCAST, REPLACE_CND_DESTROY, REPLACE_CND_INIT,
4844         REPLACE_CND_SIGNAL, REPLACE_CND_TIMEDWAIT, REPLACE_CND_WAIT,
4845         REPLACE_MTX_DESTROY, REPLACE_MTX_INIT, REPLACE_MTX_LOCK,
4846         REPLACE_MTX_TIMEDLOCK, REPLACE_MTX_TRYLOCK, REPLACE_MTX_UNLOCK,
4847         REPLACE_THRD_SLEEP, REPLACE_THRD_YIELD, REPLACE_TSS_CREATE,
4848         REPLACE_TSS_DELETE, REPLACE_TSS_GET, REPLACE_TSS_SET.
4849         * modules/threads-h (Makefile.am): Substitute REPLACE_CALL_ONCE,
4850         REPLACE_CND_BROADCAST, REPLACE_CND_DESTROY, REPLACE_CND_INIT,
4851         REPLACE_CND_SIGNAL, REPLACE_CND_TIMEDWAIT, REPLACE_CND_WAIT,
4852         REPLACE_MTX_DESTROY, REPLACE_MTX_INIT, REPLACE_MTX_LOCK,
4853         REPLACE_MTX_TIMEDLOCK, REPLACE_MTX_TRYLOCK, REPLACE_MTX_UNLOCK,
4854         REPLACE_THRD_SLEEP, REPLACE_THRD_YIELD, REPLACE_TSS_CREATE,
4855         REPLACE_TSS_DELETE, REPLACE_TSS_GET, REPLACE_TSS_SET.
4856         * m4/thrd.m4 (gl_FUNC_THRD_CREATE): New macro.
4857         * modules/thrd (configure.ac): Invoke gl_FUNC_THRD_CREATE.
4858         * m4/call_once.m4: New file.
4859         * modules/call_once (Files): Add m4/call_once.m4.
4860         (configure.ac): Invoke gl_FUNC_CALL_ONCE. Consider REPLACE_CALL_ONCE.
4861         * m4/cnd.m4: New file.
4862         * modules/cnd (Files): Add m4/cnd.m4.
4863         (configure.ac): Invoke gl_FUNC_CND_INIT. Consider REPLACE_CND_INIT.
4864         * m4/mtx.m4: New file.
4865         * modules/mtx (Files): Add m4/mtx.m4.
4866         (configure.ac): Invoke gl_FUNC_MTX_INIT. Consider REPLACE_MTX_INIT.
4867         * m4/tss.m4: New file.
4868         * modules/tss (Files): Add m4/tss.m4.
4869         (configure.ac): Invoke gl_FUNC_TSS_CREATE. Consider REPLACE_TSS_CREATE.
4870         * doc/posix-functions/call_once.texi: Mention the Android API levels.
4871         * doc/posix-functions/cnd_broadcast.texi: Likewise.
4872         * doc/posix-functions/cnd_destroy.texi: Likewise.
4873         * doc/posix-functions/cnd_init.texi: Likewise.
4874         * doc/posix-functions/cnd_signal.texi: Likewise.
4875         * doc/posix-functions/cnd_timedwait.texi: Likewise.
4876         * doc/posix-functions/cnd_wait.texi: Likewise.
4877         * doc/posix-functions/mtx_destroy.texi: Likewise.
4878         * doc/posix-functions/mtx_init.texi: Likewise.
4879         * doc/posix-functions/mtx_lock.texi: Likewise.
4880         * doc/posix-functions/mtx_timedlock.texi: Likewise.
4881         * doc/posix-functions/mtx_trylock.texi: Likewise.
4882         * doc/posix-functions/mtx_unlock.texi: Likewise.
4883         * doc/posix-functions/thrd_create.texi: Likewise.
4884         * doc/posix-functions/thrd_current.texi: Likewise.
4885         * doc/posix-functions/thrd_detach.texi: Likewise.
4886         * doc/posix-functions/thrd_equal.texi: Likewise.
4887         * doc/posix-functions/thrd_exit.texi: Likewise.
4888         * doc/posix-functions/thrd_join.texi: Likewise.
4889         * doc/posix-functions/thrd_sleep.texi: Likewise.
4890         * doc/posix-functions/thrd_yield.texi: Likewise.
4891         * doc/posix-functions/tss_create.texi: Likewise.
4892         * doc/posix-functions/tss_delete.texi: Likewise.
4893         * doc/posix-functions/tss_get.texi: Likewise.
4894         * doc/posix-functions/tss_set.texi: Likewise.
4896 2024-01-21  Bruno Haible  <bruno@clisp.org>
4898         readutmp, boot-time: Port to Android NDK r26.
4899         Reported by Po Lu <luangruo@yahoo.com> in
4900         <https://lists.gnu.org/archive/html/bug-gnulib/2024-01/msg00063.html>.
4901         * lib/readutmp.h: Update comments.
4902         (UTMP_NAME_FUNCTION): Define as a no-op for Android with HAVE_UTMPX_H.
4904 2024-01-21  Bruno Haible  <bruno@clisp.org>
4906         asyncsafe-spin: Fix link error on various platforms.
4907         * m4/atomic-cas.m4: New file.
4908         * lib/asyncsafe-spin.c: Test HAVE_ATOMIC_COMPARE_AND_SWAP_GCC41 instead
4909         of a condition that considers only __sparc__, __ANDROID__, __ibmxl__.
4910         * lib/pthread-spin.c: Likewise.
4911         * lib/simple-atomic.c: Likewise.
4912         * modules/asyncsafe-spin (Files): Add m4/atomic-cas.m4.
4913         (configure.ac): Require gl_ATOMIC_COMPARE_AND_SWAP.
4914         * modules/pthread-spin: Likewise.
4915         * modules/simple-atomic: Likewise.
4917 2024-01-19  Bruno Haible  <bruno@clisp.org>
4919         fenv-environment: Fix for NetBSD/powerpc.
4920         * m4/fenv-environment.m4 (gl_FENV_ENVIRONMENT): For feupdateenv, use
4921         the same configure test on NetBSD/powerpc as on glibc/hppa.
4922         * doc/posix-functions/feupdateenv.texi: Mention the NetBSD/powerpc bug.
4924         fenv-exceptions-trapping: Avoid a test failure on *BSD/powerpc*.
4925         * tests/test-fenv-except-trapping-2.c (main): Skip the '4' tests also on
4926         FreeBSD/powerpc* and NetBSD/powerpc*.
4928         fenv-exceptions-state-c99: Fix for FreeBSD/powerpc64 and NetBSD/powerpc.
4929         * m4/fenv-exceptions-state.m4 (gl_FENV_EXCEPTIONS_STATE): On
4930         FreeBSD/powerpc64 and NetBSD/powerpc, set REPLACE_FESETEXCEPTFLAG.
4931         * doc/posix-functions/fesetexceptflag.texi: Mention the FreeBSD and
4932         NetBSD bug.
4934         fenv-*: Avoid test failures on FreeBSD/powerpc64 and NetBSD/powerpc.
4935         On these platforms, FE_ALL_EXCEPT contains additional bits.
4936         * tests/test-fenv-except-tracking-1.c (FE_VXSOFT, FE_VXZDZ): Define
4937         fallbacks.
4938         (main): Allow fetestexcept(FE_ALL_EXCEPT) to contain FE_VXSOFT or
4939         FE_VXZDZ in addition to FE_INVALID.
4940         * tests/test-fenv-except-tracking-4.c (FE_VXSOFT): Define fallback.
4941         (main): Allow fetestexcept(FE_ALL_EXCEPT) to contain FE_VXSOFT in
4942         addition to FE_INVALID.
4943         * tests/test-fenv-env-2.c: Likewise.
4944         * tests/test-fenv-env-3.c: Likewise.
4945         * tests/test-fenv-env-4.c: Likewise.
4946         * tests/test-fenv-env-5.c: Likewise.
4948 2024-01-19  Bruno Haible  <bruno@clisp.org>
4950         fenv-*: Fix test failures on NetBSD 9.3/arm64.
4951         * m4/fenv-exceptions-trapping.m4 (gl_FENV_EXCEPTIONS_TRAPPING): Override
4952         feenableexcept() also on NetBSD/arm64.
4953         * doc/glibc-functions/feenableexcept.texi: Update platforms list.
4955 2024-01-19  Bruno Haible  <bruno@clisp.org>
4957         fenv-*: Avoid test failures on OpenBSD/sparc64.
4958         * tests/test-fenv-except-tracking-2.c (main): On OpenBSD/sparc64, skip
4959         the 'long double' test.
4960         * tests/test-fenv-except-trapping-2.c (main): Skip the 'long double'
4961         tests also on OpenBSD/sparc64.
4963 2024-01-18  Bruno Haible  <bruno@clisp.org>
4965         fenv-rounding: Avoid a test failure on OpenBSD/arm64.
4966         * tests/test-fenv-round.c (test_towardzero, test_upward, test_downward):
4967         Skip the 'long double' tests on OpenBSD/arm64.
4968         * doc/posix-functions/fesetround.texi: Update platforms list.
4970 2024-01-18  Bruno Haible  <bruno@clisp.org>
4972         Avoid test failures in FreeBSD's GB18030 locale.
4973         The FreeBSD 14.0 iconv converter (GB18030 → UTF-8) cannot convert e.g.
4974         0x94 0x32 0xBB 0x34 to U+1D100.
4975         * tests/test-c32isalnum.c (main): Skip the GB18030 locale tests on
4976         FreeBSD, if GL_CHAR32_T_IS_UNICODE (or, equivalently,
4977         GL_CHAR32_T_VS_WCHAR_T_NEEDS_CONVERSION) is defined.
4978         * tests/test-c32isalpha.c (main): Likewise.
4979         * tests/test-c32isblank.c (main): Likewise.
4980         * tests/test-c32iscntrl.c (main): Likewise.
4981         * tests/test-c32isdigit.c (main): Likewise.
4982         * tests/test-c32islower.c (main): Likewise.
4983         * tests/test-c32ispunct.c (main): Likewise.
4984         * tests/test-c32isspace.c (main): Likewise.
4985         * tests/test-c32isupper.c (main): Likewise.
4986         * tests/test-c32isxdigit.c (main): Likewise.
4987         * tests/test-c32rtomb.c (main): Likewise.
4988         * tests/test-c32snrtombs.c (main): Likewise.
4989         * tests/test-c32srtombs.c (main): Likewise.
4990         * tests/test-c32stombs.c (main): Likewise.
4991         * tests/test-c32tolower.c (main): Likewise.
4992         * tests/test-c32toupper.c (main): Likewise.
4993         * tests/test-mbrtoc16.c (main): Likewise.
4994         * tests/test-mbrtoc32.c (main): Likewise.
4995         * tests/test-mbsnrtoc32s.c (main): Likewise.
4996         * tests/test-mbsrtoc32s.c (main): Likewise.
4997         * tests/test-mbstoc32s.c (main): Likewise.
4999 2024-01-18  Bruno Haible  <bruno@clisp.org>
5001         get-rusage-data: Avoid test failure on NetBSD 9.3.
5002         * tests/test-get-rusage-data.c (main): Don't expect a strict increase on
5003         NetBSD systems.
5005 2024-01-18  Bruno Haible  <bruno@clisp.org>
5007         log10l: Work around bug on NetBSD 9.3/arm64.
5008         * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Add another test case, taken from
5009         the unit test.
5011 2024-01-18  Bruno Haible  <bruno@clisp.org>
5013         doc: Update regarding <math.h> *l functions on NetBSD 9.3.
5014         * doc/posix-functions/acoshl.texi: Mention the buggy implementation on
5015         NetBSD.
5016         * doc/posix-functions/acosl.texi: Likewise.
5017         * doc/posix-functions/asinhl.texi: Likewise.
5018         * doc/posix-functions/asinl.texi: Likewise.
5019         * doc/posix-functions/atan2l.texi: Likewise.
5020         * doc/posix-functions/atanhl.texi: Likewise.
5021         * doc/posix-functions/atanl.texi: Likewise.
5022         * doc/posix-functions/coshl.texi: Likewise.
5023         * doc/posix-functions/cosl.texi: Likewise.
5024         * doc/posix-functions/erfcl.texi: Likewise.
5025         * doc/posix-functions/erfl.texi: Likewise.
5026         * doc/posix-functions/powl.texi: Likewise.
5027         * doc/posix-functions/sinhl.texi: Likewise.
5028         * doc/posix-functions/sinl.texi: Likewise.
5029         * doc/posix-functions/tanhl.texi: Likewise.
5030         * doc/posix-functions/tanl.texi: Likewise.
5031         * doc/posix-functions/expl.texi: Update NetBSD version info.
5032         * doc/posix-functions/exp2l.texi: Likewise.
5033         * doc/posix-functions/hypotl.texi: Likewise.
5034         * doc/posix-functions/logl.texi: Likewise.
5035         * doc/posix-functions/log10l.texi: Likewise.
5036         * m4/expl.m4 (gl_FUNC_EXPL): Update comments.
5037         * m4/exp2l.m4 (gl_FUNC_EXP2L): Likewise.
5038         * m4/hypotl.m4 (gl_FUNC_HYPOTL_WORKS): Likewise.
5039         * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Likewise.
5040         * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Likewise.
5042 2024-01-18  Bruno Haible  <bruno@clisp.org>
5044         modfl: Work around bug on NetBSD 9.3/arm64.
5045         * m4/modfl.m4 (gl_FUNC_MODFL): Add test whether modfl basically works.
5046         * doc/posix-functions/modfl.texi: Mention the NetBSD bug.
5048 2024-01-18  Bruno Haible  <bruno@clisp.org>
5050         isnanl: Avoid autoconf warning.
5051         * m4/isnanl.m4 (gl_FUNC_ISNANL): Declare through AC_DEFUN_ONCE.
5053 2024-01-18  Bruno Haible  <bruno@clisp.org>
5055         fmaf, fma, fmal: Work around bugs on OpenBSD 7.4/arm64.
5056         * m4/fmaf.m4 (gl_FUNC_FMAF_WORKS): Use a volatile function pointer
5057         variable to disable clang's inlining.
5058         * m4/fma.m4 (gl_FUNC_FMA_WORKS): Likewise.
5059         * m4/fmal.m4 (gl_FUNC_FMAL_WORKS): Likewise.
5060         * doc/posix-functions/fmaf.texi: Mention the OpenBSD bug.
5061         * doc/posix-functions/fma.texi: Likewise.
5062         * doc/posix-functions/fmal.texi: Likewise.
5064 2024-01-18  Bruno Haible  <bruno@clisp.org>
5066         doc: Update regarding stable branches.
5067         * doc/gnulib-readme.texi (Stable Branches): Mention new branch
5068         stable-202401. Mention that stable-202301 is no longer updated.
5070 2024-01-17  Bruno Haible  <bruno@clisp.org>
5072         getopt-gnu: Fix out-of-bounds access (regression 2023-12-11).
5073         * lib/getopt.c (process_long_option): Don't set ambig_set[option_index]
5074         if ambig_set is &ambig_fallback.
5076 2024-01-17  Bruno Haible  <bruno@clisp.org>
5078         Improve naming of local variables.
5079         * gnulib-tool, posix-modules, build-aux/relocatable.sh.in,
5080         build-aux/reloc-ldflags, build-aux/install-reloc, tests/init.sh,
5081         m4/argz.m4: Rename save_IFS to saved_IFS.
5082         * m4/*.m4: Rename save_LIBS to saved_LIBS.
5083         * m4/00gnulib.m4, m4/gnulib-common.m4, m4/warn-on-use.m4, m4/wchar_h.m4:
5084         Rename save_ac_compile to saved_ac_compile.
5085         * m4/00gnulib.m4: Rename ac_save_ac_compile to ac_saved_ac_compile.
5086         * m4/gnulib-common.m4: Rename save_ac_compile_for_check_decl to
5087         saved_ac_compile_for_check_decl.
5088         * m4/assert_h.m4, m4/manywarnings.m4, m4/stdalign.m4, m4/visibility.m4:
5089         Rename gl_save_CFLAGS to gl_saved_CFLAGS.
5090         * m4/dirfd.m4: Rename dirfd_save_CFLAGS to gl_saved_CFLAGS.
5091         * m4/include_next.m4, m4/pread.m4, m4/pwrite.m4, m4/termcap.m4,
5092         m4/terminfo.m4: Rename gl_save_CPPFLAGS to gl_saved_CPPFLAGS.
5093         * m4/lib-link.m4: Rename ac_save_CPPFLAGS to acl_save_CPPFLAGS.
5094         * m4/iconv.m4, m4/readline.m4: Rename am_save_CPPFLAGS to
5095         gl_saved_CPPFLAGS.
5096         * m4/gettext.m4: Rename gt_save_CPPFLAGS to gt_saved_CPPFLAGS.
5097         * m4/ansi-c++.m4: Rename gl_save_CXX to gl_saved_CXX.
5098         * m4/manywarnings-c++.m4: Rename gl_save_CXXFLAGS to gl_saved_CXXFLAGS.
5099         * m4/lib-link.m4: Rename acl_save_ifs to acl_saved_IFS.
5100         * m4/lib-prefix.m4: Rename acl_save_IFS to acl_saved_IFS.
5101         * m4/progtest.m4: Rename ac_save_IFS to gt_saved_IFS.
5102         * m4/lib-link.m4: Rename save_libdir to saved_libdir, acl_save_libdir to
5103         acl_saved_libdir.
5104         * m4/ld-version-script.m4: Rename save_LDFLAGS to saved_LDFLAGS.
5105         * m4/acl.m4, m4/getgroups.m4: Rename ac_save_LIBS to gl_saved_LIBS.
5106         * m4/lib-link.m4: Rename ac_save_LIBS to acl_saved_LIBS.
5107         * m4/getdomainname.m4, m4/gethostname.m4, m4/getloadavg.m4,
5108         m4/hostent.m4, m4/inet_ntop.m4, m4/inet_pton.m4,
5109         m4/pthread_mutex_timedlock.m4, m4/pthread_sigmask.m4,
5110         m4/pthread-spin.m4, m4/readutmp.m4, m4/selinux-selinux-h.m4,
5111         m4/servent.m4, m4/socketlib.m4, m4/termcap.m4, m4/terminfo.m4,
5112         m4/thread.m4: Rename gl_save_LIBS to gl_saved_LIBS.
5113         * m4/getaddrinfo.m4, m4/iconv.m4, m4/readline.m4: Rename am_save_LIBS to
5114         gl_saved_LIBS.
5115         * m4/gettext.m4, m4/intlmacosx.m4: Rename gt_save_LIBS to gt_saved_LIBS.
5116         * m4/libunistring.m4: Rename glus_save_LIBS to glus_saved_LIBS.
5117         * m4/nanosleep.m4: Rename nanosleep_save_libs to gl_saved_LIBS.
5118         * m4/lib-prefix.m4: Rename acl_save_prefix to acl_saved_prefix,
5119         acl_save_exec_prefix to acl_saved_exec_prefix.
5120         * m4/configmake.m4: Rename gl_save_<variable> to gl_saved_<variable>.
5121         * m4/terminfo.m4: Likewise.
5122         * m4/gettext.m4: Rename gt_save_<variable> to gt_saved_<variable>.
5123         * m4/javaexec.m4: Rename save_CLASSPATH to gt_saved_CLASSPATH.
5124         * m4/warnings.m4: Rename gl_save_compiler_FLAGS to
5125         gl_saved_compiler_FLAGS.
5126         * lib/pread.c, lib/pwrite.c, lib/read-file.c, lib/tempname.c: Rename
5127         save_errno to saved_errno.
5128         * lib/read-file.c: Rename save_alloc to saved_alloc.
5129         * lib/strptime.c: Rename save_wday to saved_wday, save_mday to
5130         saved_mday, save_mon to saved_mon.
5132 2024-01-16  Paul Eggert  <eggert@cs.ucla.edu>
5134         posixtm: pacify clang 18
5135         Problem reported by Khem Raj in:
5136         https://lists.gnu.org/r/bug-gnulib/2024-01/msg00045.html
5137         * lib/posixtm.c (posixtime): Pacify clang 18 by converting bool to int.
5138         Arguably this is a bug in draft C2x, since the non-pointer args to
5139         ckd_add should promote just like any other expressions do;
5140         but that’s not clang’s fault.
5142 2024-01-07  Jim Meyering  <meyering@meta.com>
5144         update-copyright: handle more cases
5145         * build-aux/update-copyright: Handle cases like gunzip.in
5146         with its two copyright lines.
5147         Making it work required two changes: don't stop upon first match.
5148         And then, when continuing, a little trickiness: knowing that the
5149         final substitution would reset m{}g's "pos()", so save and restore
5150         that, to avoid an infinite loop in some cases.
5151         * tests/test-update-copyright.sh: Add a test for this.
5153 2024-01-15  Paul Eggert  <eggert@cs.ucla.edu>
5155         test-framework-sh: fix spelling typo
5156         * tests/init.sh (setup_): Name local var consistently with
5157         elsewhere in Gnulib, fixing a typo.
5159 2024-01-15  Bruno Haible  <bruno@clisp.org>
5161         test-framework-sh: Improve portability to native Windows and OS/2.
5162         Reported by KO Myung-Hun <komh78@gmail.com> in
5163         <https://lists.gnu.org/archive/html/bug-gnulib/2024-01/msg00037.html>.
5164         * tests/init.sh (setup_): Test for an absolute directory name like
5165         Autoconf does.
5167         test-framework-sh: Improve portability to native Windows and OS/2.
5168         Reported by KO Myung-Hun <komh78@gmail.com> in
5169         <https://lists.gnu.org/archive/html/bug-gnulib/2024-01/msg00037.html>.
5170         * tests/init.sh (setup_): In new_PATH, use $PATH_SEPARATOR instead of
5171         ':'.
5173         test-framework-sh: Improve portability to native Windows and OS/2.
5174         Reported by KO Myung-Hun <komh78@gmail.com> in
5175         <https://lists.gnu.org/archive/html/bug-gnulib/2024-01/msg00037.html>.
5176         * tests/init.sh (setup_): Set IFS, like in Autoconf's _AS_PATH_WALK and
5177         in build-aux/relocatable.sh.in.
5179 2024-01-12  Bruno Haible  <bruno@clisp.org>
5181         jit/cache tests: Fix link error.
5182         * modules/jit/cache-tests (Makefile.am): Link test-cache with
5183         $(LIBINTL).
5185 2024-01-12  Bruno Haible  <bruno@clisp.org>
5187         qsort_r: Fix compilation error in C++ mode on FreeBSD 14.0/powerpc64.
5188         * lib/stdlib.in.h (qsort_r): Enable the C++ alias warning only on glibc
5189         systems.
5191 2024-01-11  Bruno Haible  <bruno@clisp.org>
5193         time: Fix test failure on FreeBSD 12.2/sparc64.
5194         * m4/time.m4 (gl_FUNC_TIME): Guess that it does not work on
5195         FreeBSD/sparc.
5196         * doc/posix-functions/time.texi: Mention the bug on FreeBSD/sparc.
5198 2024-01-11  Bruno Haible  <bruno@clisp.org>
5200         gnulib-tool: Reject broken 'join' program as seen in macOS, FreeBSD etc.
5201         Reported by Avinash Sonawane <rootkea@gmail.com> in
5202         <https://lists.gnu.org/archive/html/bug-gnulib/2024-01/msg00028.html>.
5203         * gnulib-tool: Move the func_gnulib_dir and func_tmpdir invocations
5204         ahead. If the 'join' program exists but does not handle missing fields,
5205         bail out.
5207 2024-01-10  Bruno Haible  <bruno@clisp.org>
5209         jit/cache tests: Fix for powerpc64le CPUs.
5210         * tests/jit/test-cache.c: Treat Linux/powerpc64le *not* like AIX.
5212 2024-01-10  Bruno Haible  <bruno@clisp.org>
5214         jit/cache tests: Avoid gcc -Wstrict-aliasing warning on Linux/powerpc64.
5215         * tests/jit/test-cache.c (funcptr_to_structptr): Turn into an inline
5216         function.
5218 2024-01-10  Bruno Haible  <bruno@clisp.org>
5220         jit/cache tests: Fix for arm CPUs with GCC target arm-linux-gnueabihf.
5221         * tests/jit/test-cache.c (CODE): Define differently on arm.
5222         (SET_CODE, IS, SET_IS): New macros.
5223         (main): New variables is_of_return1, is_of_return2. Use the SET_CODE and
5224         SET_IS macros.
5226 2024-01-10  Bruno Haible  <bruno@clisp.org>
5228         jit/cache tests: Avoid compiler warnings on OpenBSD.
5229         * tests/jit/test-cache.c (main): New variables size_of_return1,
5230         size_of_return2.
5232 2024-01-09  Bruno Haible  <bruno@clisp.org>
5234         jit/cache: Fix for ia64 CPUs.
5235         * lib/jit/cache.h (clear_cache): On ia64 CPUs, use the 'fc', 'sync',
5236         'srlz' instructions.
5238 2024-01-09  Bruno Haible  <bruno@clisp.org>
5240         jit/cache: Fix for hppa CPUs.
5241         * lib/jit/cache.h (clear_cache): On hppa CPUs, use the 'fdc' and 'fic'
5242         instructions.
5244         jit/cache tests: Avoid test failure on OpenBSD.
5245         * tests/jit/test-cache.c (return1_code, return2_code): New constants.
5246         (main): On OpenBSD, use return1_code and return2_code instead of
5247         CODE (return1) and CODE (return2), since the latter may not be in a
5248         readable memory area.
5250         jit/cache tests: Avoid test failure on hppa CPUs.
5251         * tests/jit/test-cache.c (FUNCPTR_BIAS): New macro.
5252         (structptr_to_funcptr, funcptr_to_structptr): New functions/macros.
5253         (xcopy_structptr): Renamed from xcopy_funcptr. Mark as inline.
5254         (COPY_FUNCPTR, CODE): Use structptr_to_funcptr, funcptr_to_structptr.
5255         * modules/jit/cache-tests (configure.ac): Require AC_C_INLINE.
5257 2024-01-08  Bruno Haible  <bruno@clisp.org>
5259         jit/cache tests: Fix for powerpc*, ia64, hppa* CPUs.
5260         * modules/jit/cache-tests (Depends-on): Add xalloc.
5261         * tests/jit/test-cache.c: Include xalloc.h.
5262         (FUNCPTR_POINTS_TO_CODE, COPY_FUNCPTR): New macros.
5263         (xcopy_funcptr): New function.
5264         (main): Create a copy of the function pointer return1, so as not to
5265         destructively modify return1. Fix memcpy argument.
5267 2024-01-08  Bruno Haible  <bruno@clisp.org>
5269         jit/cache tests: Port to native Windows.
5270         * tests/jit/test-cache.c (main): On native Windows, use VirtualAlloc
5271         instead of mmap.
5273 2024-01-08  Bruno Haible  <bruno@clisp.org>
5275         jit/cache tests: Avoid test failure on OpenBSD.
5276         * modules/jit/cache-tests (Files): Add m4/warnings.m4.
5277         (configure.ac): Set and substitute DISABLE_OPENBSD_RETGUARD.
5278         (Makefile.am): Set test_cache_CFLAGS.
5279         * tests/jit/test-cache.c (main): If the compiler defines _RET_PROTECTOR,
5280         skip the test.
5282 2024-01-08  Bruno Haible  <bruno@clisp.org>
5284         jit/cache tests: Avoid test failure on CentOS, *BSD, macOS.
5285         * tests/jit/test-cache.c: Include <fcntl.h>, <stdio.h>, <stdlib.h>.
5286         Don't include pagealign_alloc.h. Include clean-temp-simple.h. Don't test
5287         HAVE_MPROTECT.
5288         (struct func): Fix #if conditions.
5289         (main): Don't invoke pagealign_xalloc and mprotect. Instead, invoke mmap,
5290         using a temporary file if needed.
5291         * modules/jit/cache-tests (Files): Add m4/mmap-anon.m4.
5292         (Depends-on): Add clean-temp-simple. Remove pagealign_alloc.
5293         (configure.ac): Invoke gl_FUNC_MMAP_ANON. Don't test for mprotect.
5295 2024-01-07  Paul Eggert  <eggert@cs.ucla.edu>
5297         doc: adjust to texinfo 7.1
5298         * doc/Makefile (MAKEINFO): Adjust to texinfo 7.1, where makeinfo
5299         by default outputs ASCII approximations to characters.
5301 2024-01-02  Bruno Haible  <bruno@clisp.org>
5303         strverscmp: Work around bug in musl libc 1.2.3 and in Cygwin.
5304         Reported by Dmitry Bogatov <KAction@gnu.org> via Simon Josefsson in
5305         <https://lists.gnu.org/archive/html/bug-gnulib/2024-01/msg00002.html>.
5306         * m4/string_h.m4 (gl_STRING_H_DEFAULTS): Initialize REPLACE_STRVERSCMP.
5307         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP): Test whether strverscmp works
5308         and set REPLACE_STRVERSCMP if not.
5309         * lib/string.in.h (strverscmp): Consider REPLACE_STRVERSCMP.
5310         * modules/strverscmp (Depends-on, configure.ac): Likewise.
5311         * modules/string (Makefile.am): Substitute REPLACE_STRVERSCMP.
5312         * tests/test-strverscmp.c (main): Add test cases suggested by Dmitry
5313         Bogatov and by Simon Josefsson.
5314         * doc/glibc-functions/strverscmp.texi: Mention the musl and Cygwin bug.
5315         Update version info regarding FreeBSD.
5317 2024-01-01  Paul Eggert  <eggert@cs.ucla.edu>
5319         update-copyright-tests: immunize against self
5320         Problem reported by Bernhard Voelker in:
5321         https://lists.gnu.org/r/bug-gnulib/2024-01/msg00003.html
5322         * tests/test-update-copyright.sh (ight): New var.
5323         Use it in tests, to prevent update-copyright from
5324         messing with the test data.
5326 2023-12-29  Paul Eggert  <eggert@cs.ucla.edu>
5328         tests: don’t skip if LONG_MAX < pid
5329         * modules/pthread_sigmask-tests, modules/sigprocmask-tests:
5330         (Depends-on): Add inttypes.
5331         * tests/test-pthread_sigmask1.c, tests/test-sigprocmask.c:
5332         Include inttypes.h.
5333         (main): Don’t skip test if pid exceeds LONG_MAX.
5335         Omit no-longer-needed pragmas
5336         * lib/anytostr.c, lib/poll.c, lib/regex.c:
5337         Omit pragmas that should no longer be needed.
5339         gnulib-common: suppress -Wtautological-constant-out-of-range-compare
5340         * m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): Pass
5341         -Wno-tautological-constant-out-of-range-compare to clang, as it’s
5342         the warning is enabled by default and in portable code where type
5343         ranges are platform dependent it is generally more trouble than
5344         it’s worth.
5346 2023-12-29  Simon Josefsson  <simon@josefsson.org>
5348         announce-gen: Improve links.
5349         * build-aux/announce-gen: Use https:// URLs.
5351 2023-12-29  Bruno Haible  <bruno@clisp.org>
5353         error: More clang -Winclude-next-absolute-path silencing.
5354         * modules/error (Include): Suggest <error.h>, not "error.h".
5355         * tests/test-error.c: Write #include <error.h>.
5356         * tests/test-exclude.c: Likewise.
5357         * tests/test-verror.c: Likewise.
5358         * tests/test-xstrtol.c: Likewise.
5360 2023-12-28  Paul Eggert  <eggert@cs.ucla.edu>
5362         include_next: pacify clang -Winclude-next-absolute-path
5363         Without this change, Ubuntu clang version 16.0.6 (15) issues
5364         warnings like this: “In file included from xalloc-die.c:25:
5365         ./error.h:28:3: warning: #include_next in file found relative to
5366         primary source file or found by absolute path; will search from
5367         start of include path [-Winclude-next-absolute-path]”.
5368         And sure enough, each file includes itself rather than the
5369         next include file and it’s only the subsidiary include that
5370         gets around to including the next include file.
5371         * lib/argmatch.c, lib/chdir-long.c, lib/clean-temp-simple.c:
5372         * lib/clean-temp.c, lib/closein.c, lib/closeout.c, lib/copy-acl.c:
5373         * lib/copy-file.c, lib/creat.c, lib/csharpcomp.c:
5374         * lib/csharpexec.c, lib/error.c, lib/exclude.c, lib/execute.c:
5375         * lib/faccessat.c, lib/fopen.c, lib/freopen.c, lib/getopt.c:
5376         * lib/getopt1.c, lib/git-merge-changelog.c, lib/javacomp.c:
5377         * lib/javaexec.c, lib/javaversion.c, lib/mkdir-p.c, lib/open.c:
5378         * lib/openat-die.c, lib/openat.c, lib/os2-spawn.c:
5379         * lib/pagealign_alloc.c, lib/pipe-filter-gi.c:
5380         * lib/pipe-filter-ii.c, lib/same.c, lib/set-acl.c:
5381         * lib/sigpipe-die.c, lib/spawn-pipe.c, lib/sys_socket.c, lib/truncate.c:
5382         * lib/unistd.c, lib/verror.c, lib/wait-process.c, lib/wctype-h.c:
5383         * lib/xalloc-die.c, lib/xfreopen.c, lib/xmemcoll.c, lib/xprintf.c:
5384         * lib/xsetenv.c, lib/xstdopen.c, lib/xstrtol-error.c:
5385         Use ‘#include <foo.h>’ instead of ‘#include "foo.h"’ if foo.h
5386         possibly uses #include_next.  (However, don’t do this on OSF/1
5387         which has its own problems.)
5389         stat-time: fix macOS bug with negative file times
5390         macOS has a bug similar (but not identical) to Solaris when
5391         file timestamps are negative: tv_nsec might go negative.
5392         Problem reported on Darwin 8.11.0 for GNU Tar by Gordon Steemson in:
5393         https://lists.gnu.org/r/bug-tar/2023-12/msg00001.html
5394         This was evidently Mac OS X 10.4.11; I reproduced it on
5395         Darwin 21.6.0 (macOS 12.6 build 21G115).
5396         * lib/stat-time.h (STAT_TIMESPEC_OFFSETOF): New macro.
5397         (stat_time_normalize): Also normalize timestamps on macOS.
5398         * m4/fstat.m4 (gl_FUNC_FSTAT):
5399         * m4/fstatat.m4 (gl_FUNC_FSTATAT):
5400         * m4/lstat.m4 (gl_FUNC_LSTAT):
5401         * m4/stat.m4 (gl_FUNC_STAT):
5402         Also replace on macOS.
5404 2023-12-19  Bruno Haible  <bruno@clisp.org>
5406         jit/cache: Fix compilation error on m68k, sparc, etc.
5407         * lib/jit/cache.h: Include <stdint.h>.
5408         * modules/jit/cache (Depends-on): Add stdint.
5410 2023-12-19  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
5412         jit/cache tests: Make more portable.
5413         * tests/jit/test-cache.c (CODE): New macro.
5414         (struct func): New type.
5415         (main): Initialize f more carefully.
5416         * modules/jit/cache-tests (Depends-on): Add host-cpu-c-abi.
5418 2023-12-19  Christian Göttsche  <cgzones@googlemail.com>
5420         selinux-h: add stubs and wrappers for raw counterparts
5421         Add stubs and wrappers of already covered libselinux interfaces for
5422         their `raw` counterparts.  These counterparts perform the same
5423         operation except for context translation.  Context translation is used
5424         to convert SELinux labels to human readable form, see mcstransd(8).
5425         * lib/se-selinux.in.h: Add declarations for raw variants.
5426         * lib/se-label.in.h: Likewise.
5427         * lib/getfilecon.c: Add wrappers for problematic raw variants.
5428         * m4/selinux-selinux-h.m4: Use wrappers for problematic raw variants.
5430 2023-12-14  Paul Eggert  <eggert@cs.ucla.edu>
5432         mcel-tests: fix thinko in test
5433         * tests/test-mcel.c (main): Fix typo in mcel_scanz test.
5434         Problem reported by Bruno Haible in:
5435         https://lists.gnu.org/r/bug-gnulib/2023-12/msg00034.html
5437 2023-12-11  Paul Eggert  <eggert@cs.ucla.edu>
5439         savedir: scale better when sorting by name
5440         * lib/savedir.c: Include attribute.h.
5441         (direntry_t): The ‘name’ member is now idx_t, not char *,
5442         so that it survives name_space relocation.
5443         (direntry_cmp_name, direntry_cmp_inode, comparison_function):
5444         Adjust to qsort_r API, and to direntry_t layout change.
5445         (streamsavedir): Redo to avoid need for xstrdup on each directory
5446         entry.  Instead, copy the string data into name_space; this
5447         typically scales better as the memory allocator is called O(log N)
5448         rather than O(N) times.  Use qsort_r so that name_space can be
5449         passed to the comparison functions.  Simplify calls to ‘free’ so
5450         that lack of leakage is more obvious.
5451         * modules/savedir (Depends-on): Add attribute, qsort_r.
5453         getopt: pacify gcc -Wanalyzer-null-dereference
5454         * lib/getopt.c (process_long_option): Simplify logic slightly.
5455         This pacifies gcc -flto -Wanalyzer-null-dereference when compiling
5456         GNU tar on x86-64 with gcc 13.2.1 20231205 (Red Hat 13.2.1-6).
5458 2023-12-10  Pádraig Brady  <P@draigBrady.com>
5460         bootstrap: fix option propagation with --bootstrap-sync
5461         * top/bootstrap: Ensure options are propagated through
5462         upgrade_bootstrap().
5463         * top/bootstrap-funclib.sh: Likewise.
5464         * build-aux/bootstrap: Auto generated with `make build-aux/bootstrap`.
5465         Fixes https://bugs.gnu.org/67731
5467 2023-12-01  Paul Eggert  <eggert@cs.ucla.edu>
5469         frexp, frexpf: pacify clang re address-of-volatile
5470         Problem reported by Sam James in:
5471         https://lists.gnu.org/r/bug-gnulib/2023-12/msg00013.html
5472         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Don’t try to convert
5473         ‘double volatile *’ to ‘void const *’ as the C standard
5474         doesn’t allow accessing volatile variables through
5475         pointer-to-nonvolatile.
5476         * m4/frexpf.m4 (gl_FUNC_FREXPF_WORKS): Likewise.
5478         Update portability doc for CHERI, C23
5479         * doc/gnulib-readme.texi:
5480         Prefer “null pointer” to “@code{NULL}” since C23 has nullptr.
5481         (Portability guidelines): Mention C99 instead of C89 for what
5482         Gnulib assumes of headers.
5483         (C99 features avoided): Mention CHERI issue with intptr_t etc.
5484         (Other portability assumptions): Say that C23 requires two’s
5485         complement.  Mention CHERI’s holes.
5487 2023-12-01  Bruno Haible  <bruno@clisp.org>
5489         obstack: Avoid undefined behaviour.
5490         Reported by Alexey Palienko <Alexey.Palienko@cma.se> in
5491         <https://lists.gnu.org/archive/html/bug-m4/2023-02/msg00000.html>.
5492         * lib/obstack.in.h: Include <stdint.h>.
5493         (__BPTR_ALIGN): Remove macro.
5494         (__PTR_ALIGN): For the optimized case, compute the alignment through
5495         uintptr_t, instead of computing NULL + something.
5497 2023-12-01  Bruno Haible  <bruno@clisp.org>
5499         doc: Update for FreeBSD 14.0.
5500         * doc/posix-headers/*.texi: Update.
5501         * doc/glibc-headers/*.texi: Likewise.
5502         * doc/posix-functions/*.texi: Likewise.
5503         * doc/pastposix-functions/*.texi: Likewise.
5504         * doc/glibc-functions/*.texi: Likewise.
5505         * m4/printf.m4: Update comments.
5507 2023-12-01  Bruno Haible  <bruno@clisp.org>
5509         sethostname tests: Fix a compilation error on FreeBSD 14.0.
5510         * tests/test-sethostname1.c: Skip the SIGNATURE_CHECK on some platforms.
5511         * doc/glibc-functions/sethostname.texi: Update platforms list.
5513 2023-11-27  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
5515         stack: Fix documentation in header file.
5516         * lib/stack.h: Correct documentation on `stack_current_base'.
5518 2023-11-27  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
5520         jit/cache-tests: Fix include guard.
5521         * tests/jit/test-cache.c (main): Extend range of include guard.
5523 2023-11-25  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
5525         jit/cache-tests: New module.
5526         * tests/jit/test-cache.c: New file.
5527         * modules/jit/cache-tests: New file.  Mark the test as unportable
5528         for now.
5530 2023-11-25  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
5532         jit/cache: Fix configure error.
5533         * m4/valgrind-helper.m4: Unconditionally set support_valgrind.
5535 2023-11-24  Bruno Haible  <bruno@clisp.org>
5537         floorf, ceilf tests: Strengthen against compiler optimizations.
5538         Reported by René Rebe <rene@t2-project.org>.
5539         * tests/test-floorf1.c (main): Mark my_floorf as 'volatile'.
5540         * tests/test-floorf-ieee.c (main): Likewise.
5541         * tests/test-ceilf1.c (main): Mark my_ceilf as 'volatile'.
5542         * tests/test-ceilf-ieee.c (main): Likewise.
5544 2023-11-21  Bruno Haible  <bruno@clisp.org>
5546         strerrorname_np: Work around glibc bug on HPPA systems.
5547         * m4/strerrorname_np.m4 (gl_FUNC_STRERRORNAME_NP): Test also
5548         strerrorname_np (ENOSYM).
5549         * lib/strerrorname_np.c (strerrorname_np): Update comments.
5550         * tests/test-strerrorname_np.c (main): Likewise.
5551         * doc/glibc-functions/strerrorname_np.texi: Mention that glibc 2.37
5552         still needs a workaround.
5554 2023-11-21  Bruno Haible  <bruno@clisp.org>
5556         rand: Use the usual patterns for overriding a function.
5557         * lib/stdlib.in.h (RAND_MAX): Override also if module 'rand' is present.
5558         (rand): New declaration.
5559         * m4/stdlib_h.m4 (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize GNULIB_RAND.
5560         (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_RAND.
5561         * modules/stdlib (Makefile.am): Substitute GNULIB_RAND and REPLACE_RAND.
5563 2023-11-18  Bruno Haible  <bruno@clisp.org>
5565         nan, snan tests: Don't include these tests by default.
5566         * modules/nan-tests (Status): Mark the test as unportable.
5567         * modules/snan-tests (Status): Likewise.
5569 2023-11-17  Bruno Haible  <bruno@clisp.org>
5571         realloc-gnu: Fix wrong configure test result with optimizing ibm-clang.
5572         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Use 'volatile', to defeat an
5573         ibm-clang optimization.
5574         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Likewise.
5576 2023-11-17  Bruno Haible  <bruno@clisp.org>
5578         mbrtowc, mbrtoc32, nl_langinfo, setlocale-null: Obey --disable-threads.
5579         Reported by David Edelsohn <dje.gcc@gmail.com> in
5580         <https://gcc.gnu.org/pipermail/gcc-patches/2023-November/636830.html>,
5581         <https://gcc.gnu.org/pipermail/gcc-patches/2023-November/636843.html>.
5582         * m4/threadlib.m4 (gl_THREADLIB_BODY): If --disable-threads was
5583         specified, define AVOID_ANY_THREADS to 1.
5584         * lib/mbtowc-lock.c: Omit all code if --disable-threads was specified.
5585         * lib/nl_langinfo-lock.c: Likewise.
5586         * lib/setlocale-lock.c: Likewise.
5587         * lib/mbtowc-lock.h: Omit locking code if --disable-threads was
5588         specified.
5589         * lib/nl_langinfo.c: Likewise.
5590         * lib/setlocale_null.c: Likewise.
5591         * lib/mbrtowc.c: Don't include any multithreading headers if
5592         --disable-threads was specified.
5593         * lib/mbrtoc32.c: Likewise.
5595 2023-11-17  Bruno Haible  <bruno@clisp.org>
5597         gettext: Recognize a statically built libintl on macOS and AIX.
5598         Reported by David Edelsohn <dje.gcc@gmail.com> in
5599         <https://gcc.gnu.org/pipermail/gcc-patches/2023-November/636558.html>.
5600         * m4/gettext.m4 (AM_GNU_GETTEXT): In the
5601         "checking for GNU gettext in libintl..." test, add also the special
5602         system library dependencies needed on macOS and AIX.
5604 2023-11-16  Bruno Haible  <bruno@clisp.org>
5606         boot-time: Make it work on Adélie Linux.
5607         * lib/boot-time.c (get_boot_time_uncached): Invoke Linux fallbacks also
5608         on Linux systems that have neither <utmp.h> nor <utmpx.h>.
5610 2023-11-15  Bruno Haible  <bruno@clisp.org>
5612         obstack: Modernize, fixing several problems.
5613         * lib/obstack.in.h: Renamed from lib/obstack.h. Add reference to the
5614         glibc documentation.
5615         (_OBSTACK_INTERFACE_VERSION): Remove macro.
5616         (_OBSTACK_SIZE_T, _CHUNK_SIZE_T, _OBSTACK_CAST): Mark old values with
5617         _LIBC.
5618         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
5619         _obstack_memory_used, _obstack_allocated_p): Override if REPLACE_OBSTACK
5620         is 1.
5621         * lib/obstack.c: Don't include <gnu-versions.h>.
5622         (_OBSTACK_ELIDE_CODE): Remove macro.
5623         * m4/obstack.m4 (gl_FUNC_OBSTACK): Test whether obstack.h exists. Don't
5624         define HAVE_OBSTACK any more. Set HAVE_OBSTACK, REPLACE_OBSTACK,
5625         GL_GENERATE_OBSTACK_H.
5626         * modules/obstack (Files): Remove obstack.h. Add obstack.in.h.
5627         (Depends-on): Add gen-header. Add conditions.
5628         (configure.ac): Consider HAVE_OBSTACK, REPLACE_OBSTACK. Invoke
5629         gl_CONDITIONAL_HEADER and AC_PROG_MKDIR_P.
5630         (Makefile.am): Generate obstack.h. Augment BUILT_SOURCES and
5631         MOSTLYCLEANFILES.
5633 2023-11-15  Paul Eggert  <eggert@cs.ucla.edu>
5635         striconveha: pacify gcc -Wcast-align
5636         * lib/striconveha.c (uniconv_register_autodetect): Rewrite to
5637         avoid the need to cast from char * to a pointer to a more strictly
5638         aligned type.  Use decls after statements to avoid some repetition.
5640 2023-11-14  Bruno Haible  <bruno@clisp.org>
5642         doc: Mention a 'random' limitation on OpenBSD.
5643         Reported by Corinna Vinschen <vinschen@redhat.com>.
5644         * doc/posix-functions/random.texi: Mention the OpenBSD limitation.
5646 2023-11-14  Bruno Haible  <bruno@clisp.org>
5648         rand: Mark as obsolete.
5649         * modules/rand (Status, Notice): New sections.
5651 2023-11-14  Bruno Haible  <bruno@clisp.org>
5653         *printf-posix: Revert expectations of %lc of 0.
5654         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LC): Expect a NUL byte in the
5655         output.
5656         * lib/vasnprintf.c (VASNPRINTF): In the %lc implementation, don't
5657         special-case the NUL wide character.
5658         * tests/test-vasnprintf-posix.c (test_function): Change expected result
5659         for %lc of L'\0'.
5660         * tests/test-vasprintf-posix.c (test_function): Likewise.
5661         * tests/test-snprintf-posix.h (test_function): Likewise.
5662         * tests/test-sprintf-posix.h (test_function): Likewise.
5663         * doc/posix-functions/dprintf.texi: Update platform list regarding %lc
5664         of 0 bug.
5665         * doc/posix-functions/fprintf.texi: Likewise.
5666         * doc/posix-functions/printf.texi: Likewise.
5667         * doc/posix-functions/snprintf.texi: Likewise.
5668         * doc/posix-functions/sprintf.texi: Likewise.
5669         * doc/posix-functions/vdprintf.texi: Likewise.
5670         * doc/posix-functions/vfprintf.texi: Likewise.
5671         * doc/posix-functions/vprintf.texi: Likewise.
5672         * doc/posix-functions/vsnprintf.texi: Likewise.
5673         * doc/posix-functions/vsprintf.texi: Likewise.
5674         * doc/glibc-functions/asprintf.texi: Likewise.
5675         * doc/glibc-functions/vasprintf.texi: Likewise.
5676         * doc/glibc-functions/obstack_printf.texi: Likewise.
5677         * doc/glibc-functions/obstack_vprintf.texi: Likewise.
5679 2023-11-13  Bruno Haible  <bruno@clisp.org>
5681         doc: Add a note.
5682         * doc/posix-headers/stdatomic.texi: Add a note about the memory model.
5684 2023-11-13  Bruno Haible  <bruno@clisp.org>
5686         Don't use CHERI facilities with CC="clang -march=morello".
5687         Suggested by Jessica Clarke <jrtc27@jrtc27.com> in
5688         <https://lists.gnu.org/archive/html/bug-gnulib/2023-11/msg00116.html>.
5689         * lib/alignalloc.h (alignalloc): Test __CHERI_PURE_CAPABILITY__, not
5690         __CHERI__.
5691         * lib/eealloc.h (eemalloc, eerealloc): Likewise.
5692         * lib/ialloc.h (irealloc, ireallocarray): Likewise.
5693         * lib/malloca.h (malloca): Likewise.
5694         * lib/malloca.c (small_t, mmalloca, freea): Likewise.
5695         * lib/rawmemchr.c (rawmemchr): Likewise.
5696         * lib/safe-alloc.h (safe_alloc_realloc_n): Likewise.
5697         * lib/sigsegv.c (SIGSEGV_FAULT_STACKPOINTER): Likewise.
5698         * lib/ssfmalloc.h (struct dissected_page_header, init_small_block_page,
5699         init_medium_block_page, free_block_from_pool, allocate_block): Likewise.
5700         * tests/test-stdint.c: Likewise.
5702 2023-11-13  Bruno Haible  <bruno@clisp.org>
5704         jit/cache: Fix configure test.
5705         * m4/valgrind-helper.m4 (gl_VALGRIND_HELPER): Check already at configure
5706         time whether <valgrind/valgrind.h> exists. Fix AC_DEFINE_UNQUOTED
5707         invocation.
5709 2023-11-12  Paul Eggert  <eggert@cs.ucla.edu>
5711         rawmemchr: speed up, particularly on CHERI
5712         * lib/rawmemchr.c (rawmemchr) [__CHERI__]: Use memchr instead of
5713         one-byte reads.  This sped up a simple benchmark (rawmemchr on
5714         100,000 bytes) by 6x on a Research Morello SoC r0p0 on CheriBSD 14.
5715         [!__CHERI__]: Use sizeof, not alignof, as better alignment
5716         should help performance a bit on some platforms.
5717         * modules/rawmemchr (Depends-on): Remove alignasof.
5719 2023-11-12  Bruno Haible  <bruno@clisp.org>
5721         jit/cache: New module.
5722         * lib/jit/cache.h: New file.
5723         * m4/valgrind-helper.m4: New file.
5724         * modules/jit/cache: New file.
5726 2023-11-11  Bruno Haible  <bruno@clisp.org>
5728         ssfmalloc: Take advantage of CHERI bounds-checking.
5729         * lib/ssfmalloc.h: Include <cheri.h>.
5730         (struct dissected_page_header) [CHERI]: Add field 'whole_page'.
5731         (init_small_block_page, init_medium_block_page) [CHERI]: Initialize it.
5732         (free_block_from_pool) [CHERI]: Use this field to initialize
5733         pool->freeable_page.
5734         (allocate_block) [CHERI]: Return a pointer with a tight upper bound.
5736 2023-11-11  Johannes Schindelin  <johannes.schindelin@gmx.de>
5738         vasnprintf: Re-enable parsing of directive with I64 (regr. 2023-03-24).
5739         * lib/printf-parse.c (PRINTF_PARSE): When parsing a size specifier
5740         "I64", increment cp by 3, not 1.
5742 2023-11-11  Bruno Haible  <bruno@clisp.org>
5744         malloca: Take advantage of CHERI bounds-checking.
5745         * lib/malloca.h: Include <cheri.h>.
5746         (malloca) [CHERI]: In the stack-allocation case, return a pointer with
5747         a tight lower bound and a tight upper bound.
5748         * lib/malloca.c: Include <cheri.h>.
5749         (small_t) [CHERI]: Define as uintptr_t.
5750         (mmalloca) [CHERI]: Return a pointer with a tight upper bound.
5751         (freea) [CHERI]: Update.
5753 2023-11-11  Bruno Haible  <bruno@clisp.org>
5755         safe-alloc: Take advantage of CHERI bounds-checking.
5756         * lib/safe-alloc.h: Include <cheri.h>.
5757         (safe_alloc_realloc_n): When count or size is 0, return a pointer whose
5758         bounds are of size 0, not 1.
5760 2023-11-11  Bruno Haible  <bruno@clisp.org>
5762         ialloc: Take advantage of CHERI bounds-checking.
5763         * lib/ialloc.h: Include <cheri.h>.
5764         (irealloc): When s is 0, return a pointer whose bounds are of size 0,
5765         not 1.
5766         (ireallocarray): When n or s is 0, return a pointer whose bounds are of
5767         size 0, not 1.
5769 2023-11-11  Bruno Haible  <bruno@clisp.org>
5771         eealloc: Take advantage of CHERI bounds-checking.
5772         * lib/eealloc.h: Include <cheri.h>.
5773         (eemalloc): When n is 0, return a pointer whose bounds are of size 0,
5774         not 1.
5775         (eerealloc): Likewise.
5777 2023-11-11  Bruno Haible  <bruno@clisp.org>
5779         alignalloc: Take advantage of CHERI bounds-checking.
5780         * lib/alignalloc.h: Include <cheri.h>.
5781         (alignalloc): When size is 0, return a pointer whose bounds are of
5782         size 0, not 1.
5784 2023-11-11  Bruno Haible  <bruno@clisp.org>
5786         rawmemchr tests: Add test case for last commit.
5787         * tests/test-rawmemchr.c (main): Add test case for aligned oversized
5788         read.
5790 2023-11-11  Paul Eggert  <eggert@cs.ucla.edu>
5792         rawmemchr: port better to CHERI
5793         * lib/rawmemchr.c (rawmemchr): Use unsigned char for longword,
5794         since CHERI doesn’t allow the aligned-word trick to speed up
5795         performance.
5797 2023-11-10  Paul Eggert  <eggert@cs.ucla.edu>
5799         di-set: port better to CHERI-64
5800         * lib/di-set.c: Include stdint.h.
5801         (hashint): Make it uintptr_t, not size_t, since it’s for use
5802         when converting to pointer and back again.  This suppresses
5803         a false positive on CHERI-64.
5804         * modules/di-set (Depends-on): Add stdint.
5806         stdio: fix port to older macOS
5807         * lib/stdio.in.h: It’s pre macOS 13, not pre macOS 10.13.
5808         Problem reported by Sevan Janiyan in:
5809         https://lists.gnu.org/r/bug-gnulib/2023-11/msg00066.html
5810         et seq.
5812 2023-11-10  Bruno Haible  <bruno@clisp.org>
5814         doc: Mention rand and srand limitations.
5815         * doc/posix-functions/rand.texi: Mention multithread-safety problem.
5816         * doc/posix-functions/srand.texi: Mention a Cygwin bug.
5818 2023-11-10  Bruno Haible  <bruno@clisp.org>
5820         tests: In multithreaded tests, use random() instead of rand().
5821         * tests/test-asyncsafe-spin2.c (random_account, lock_mutator_thread):
5822         Use random() instead of rand().
5823         * tests/test-lock.c (random_account, lock_mutator_thread,
5824         rwlock_mutator_thread, recshuffle): Likewise.
5825         * tests/test-mtx.c (random_account, lock_mutator_thread, recshuffle):
5826         Likewise.
5827         * tests/test-pthread-mutex.c (random_account, lock_mutator_thread,
5828         recshuffle): Likewise.
5829         * tests/test-pthread-rwlock.c (random_account, rwlock_mutator_thread):
5830         Likewise.
5831         * tests/test-pthread-spin.c (random_account, lock_mutator_thread):
5832         Likewise.
5833         * tests/test-pthread-tss.c (perhaps_yield, worker_thread,
5834         racecheck_thread): Likewise.
5835         * tests/test-thread_local.c (perhaps_yield, worker_thread): Likewise.
5836         * tests/test-tls.c (perhaps_yield, worker_thread, racecheck_thread):
5837         Likewise.
5838         * tests/test-tss.c (perhaps_yield, worker_thread, racecheck_thread):
5839         Likewise.
5840         * asyncsafe-spin-tests (Depends-on): Add random.
5841         * lock-tests (Depends-on): Likewise.
5842         * mtx-tests (Depends-on): Likewise.
5843         * pthread-mutex-tests (Depends-on): Likewise.
5844         * pthread-rwlock-tests (Depends-on): Likewise.
5845         * pthread-spin-tests (Depends-on): Likewise.
5846         * pthread-tss-tests (Depends-on): Likewise.
5847         * threads-h-tests (Depends-on): Likewise.
5848         * tls-tests (Depends-on): Likewise.
5849         * tss-tests (Depends-on): Likewise.
5851 2023-11-10  Bruno Haible  <bruno@clisp.org>
5853         doc: Mention an srandom limitation on OpenBSD.
5854         * doc/posix-functions/srandom.texi: Mention the OpenBSD limitation.
5856 2023-11-10  Bruno Haible  <bruno@clisp.org>
5858         random tests: Add multithread-safety test.
5859         * tests/test-random-mt.c: New file.
5860         * modules/random-tests (Files): Add it.
5861         (Depends-on): Add xalloc, thread, yield.
5862         (Makefile.am): Also build and test test-random-mt.
5864         random: Fix multithread-safety bug in general.
5865         * m4/random.m4 (gl_FUNC_RANDOM): Override also macOS, FreeBSD, Solaris,
5866         Cygwin, Haiku.
5867         * doc/posix-functions/random.texi: Mention the wider scope of the
5868         multithread-safety bug.
5870 2023-11-09  Bruno Haible  <bruno@clisp.org>
5872         sigsegv: Improve port to CHERI.
5873         * lib/sigsegv.c (SIGSEGV_FAULT_STACKPOINTER): Define also on CheriBSD.
5875         sigsegv: Port to CHERI.
5876         * lib/sigsegv.c: Treat __aarch64__ like __arm64__.
5877         (SIGSEGV_FOR_ALL_SIGNALS): Treat SIGPROT like SIGSEGV and SIGBUS.
5879 2023-11-09  Paul Eggert  <eggert@cs.ucla.edu>
5881         stdio: port better to older macOS
5882         * lib/stdio.in.h: Do not define _POSIX_C_SOURCE on older macOS,
5883         as it is not needed and defining it causes other problems.
5884         Problem reported by Sevan Janiyan in:
5885         https://mail.gnu.org/r/bug-gnulib/2023-11/msg00039.html
5887 2023-11-09  Bruno Haible  <bruno@clisp.org>
5889         rand: Add tests.
5890         * tests/test-rand.c: New file.
5891         * modules/rand-tests: New file.
5893         rand: New module.
5894         * lib/rand.c: New file, based on glibc/stdlib/rand.c.
5895         * m4/rand.m4: New file.
5896         * modules/rand: New file.
5897         * doc/posix-functions/rand.texi: Mention the new module.
5899 2023-11-09  Bruno Haible  <bruno@clisp.org>
5901         random: Fix multithread-safety bug on CheriBSD.
5902         * m4/random.m4 (gl_FUNC_RANDOM): Override on CheriBSD.
5903         * lib/random.c: Include glthread/lock.h.
5904         (__libc_lock_define_initialized, __libc_lock_lock, __libc_lock_unlock):
5905         Define to do real locking.
5906         * modules/random (Depends-on): Add lock.
5907         * doc/posix-functions/random.texi: Mention the multithread-safety
5908         problem.
5910 2023-11-09  Bruno Haible  <bruno@clisp.org>
5912         host-cpu-c-abi: Port to CHERI.
5913         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI_32BIT): Treat aarch64c like
5914         aarch64.
5916 2023-11-08  Bruno Haible  <bruno@clisp.org>
5918         pthread-rwlock: Port to Mac OS X 10.4.
5919         Reported by Sevan Janiyan <venture37@geeklan.co.uk>.
5920         * m4/pthread-rwlock.m4 (gl_PTHREAD_RWLOCK): On macOS, test for the
5921         presence of PTHREAD_RWLOCK_INITIALIZER. If it is not defined, don't
5922         attempt to use pthread_rwlock_init.
5924 2023-11-07  Bruno Haible  <bruno@clisp.org>
5926         fenv-environment tests: Add a test of the link dependencies.
5927         * tests/test-fenv-env-6.c: Renamed from tests/test-fenv-env-5.c.
5928         * tests/test-fenv-env-5.c: Renamed from tests/test-fenv-env-4.c.
5929         * tests/test-fenv-env-4.c: Renamed from tests/test-fenv-env-3.c.
5930         * tests/test-fenv-env-3.c: Renamed from tests/test-fenv-env-2.c.
5931         * tests/test-fenv-env-2.c: Renamed from tests/test-fenv-env-1.c.
5932         * tests/test-fenv-env-1.c: New file.
5933         * tests/test-fenv-env-6.sh: Renamed from tests/test-fenv-env-5.sh. Update.
5934         * modules/fenv-environment-tests: Update. Add test-fenv-env-1 unit test.
5936 2023-11-07  Bruno Haible  <bruno@clisp.org>
5938         fenv-exceptions-state-c99 tests: Add a test of the link dependencies.
5939         * tests/test-fenv-except-state-4.c: Renamed from
5940         tests/test-fenv-except-state-3.c.
5941         * tests/test-fenv-except-state-3.c: Renamed from
5942         tests/test-fenv-except-state-2.c.
5943         * tests/test-fenv-except-state-2.c: Renamed from
5944         tests/test-fenv-except-state-1.c.
5945         * tests/test-fenv-except-state-1.c: New file.
5946         * modules/fenv-exceptions-state-c23-tests: Update.
5947         * modules/fenv-exceptions-state-c99-tests: Update. Add
5948         test-fenv-except-state-1 unit test.
5950 2023-11-07  Bruno Haible  <bruno@clisp.org>
5952         fenv-exceptions-trapping tests: Comments.
5953         * tests/test-fenv-except-trapping-1.c (main): Add a comment.
5955 2023-11-07  Paul Eggert  <eggert@cs.ucla.edu>
5957         malloca: pacify -Wcheri-provenance
5958         This shouldn’t affect generated code when optimizing.
5959         * lib/malloca.c (mmalloca): Pacify -Wcheri-provenance on CHERI-64 cc.
5960         (freea): Assign to temporaries to simplify debugging and avoid casts.
5962 2023-11-07  Bruno Haible  <bruno@clisp.org>
5964         rawmemchr: Port to CHERI.
5965         * lib/rawmemchr.c (rawmemchr): Use 'unsigned long' instead of uintptr_t.
5967 2023-11-06  Paul Eggert  <eggert@cs.ucla.edu>
5969         stdint: port intptr_t to CHERI
5970         * lib/stdint.in.h: Do not redefine intptr_t/uintptr_t
5971         if __INTPTR_WIDTH__ says otherwise.  This is needed on CHERI.
5973         stdint-tests: port to CHERI etc
5974         * tests/test-stdint.c: Test intptr_t only if INTPTR_MAX is
5975         defined, since the type is optional.  Similarly for uintptr_t.
5976         If CHERI, don’t assume TYPE_MINIMUM and TYPE_MAXIMUM works on
5977         intptr_t, and similarly for TYPE_MAXIMUM and uintptr_t.
5979         posix_memalign-tests: port to CHERI-64
5980         * tests/test-posix_memalign.c (main):
5981         Don’t assume sizeof (void *) <= 8.
5983         mcel-tests: fix read overrun in test case
5984         * tests/test-mcel.c (main): Don’t overrun test input buffer.
5985         Problem reported by Bruno Haible; found on CHERI-64.
5987 2023-11-06  Bruno Haible  <bruno@clisp.org>
5989         fenv-exceptions-tracking-c99 tests: Fix typo.
5990         Found by coverity.
5991         * tests/test-fenv-except-tracking-1.c (main): Write & ~, not & !.
5993 2023-11-06  Bruno Haible  <bruno@clisp.org>
5995         snan: Avoid test failures on OpenBSD/mips64.
5996         * tests/test-snan-1.c (main): Skip the 'long double' test on
5997         OpenBSD/mips64.
5998         * tests/test-snan-2.c (main): Likewise.
6000         fenv-*: Avoid test failures on OpenBSD/mips64.
6001         * tests/test-fenv-round.c (test_towardzero, test_upward, test_downward):
6002         Skip the 'long double' tests on OpenBSD/mips64.
6003         * tests/test-fenv-except-tracking-2.c (main): On OpenBSD/mips64, skip
6004         the 'long double' test.
6005         * tests/test-fenv-except-trapping-2.c (main): Skip the '4' tests and the
6006         'long double' tests also on OpenBSD/mips64.
6007         * doc/posix-functions/fesetround.texi: Mention OpenBSD/mips64 here too.
6009         fenv-exceptions-tracking-c99: Fix test failures on OpenBSD/mips64.
6010         * m4/fenv-exceptions-tracking.m4 (gl_FENV_EXCEPTIONS_TRACKING): On
6011         OpenBSD/mips, set REPLACE_FECLEAREXCEPT to 1.
6012         * doc/posix-functions/feclearexcept.texi: Mention the OpenBSD/mips64
6013         bug.
6014         * m4/fenv-exceptions-state.m4 (gl_FENV_EXCEPTIONS_STATE): No need to set
6015         gl_cv_func_fesetexceptflag_works1 to 'no' on OpenBSD/mips.
6017 2023-11-06  Bruno Haible  <bruno@clisp.org>
6019         nan: Defeat clang's incorrect -O2 optimization on mips64.
6020         * lib/nan.h (NaNf, NaNd, NaNl): Use 'volatile' to disable a clang
6021         optimization.
6023 2023-11-06  Bruno Haible  <bruno@clisp.org>
6025         nan: Work around clang's incorrect constant-folding on mips64.
6026         * lib/nan.h (NaNf, NaNd, NaNl): On mips platforms, avoid the compiler's
6027         constant-folding for 0.0f/0.0f, 0.0/0.0, 0.0L/0.0L.
6029 2023-11-06  Bruno Haible  <bruno@clisp.org>
6031         snan: Add more info for mips-based platforms.
6032         * m4/nan-mips.m4: New file.
6033         * lib/snan.h: Add comments regarding mips.
6034         * modules/snan (Files): Add m4/nan-mips.m4.
6035         (configure.ac): Invoke gl_NAN_MIPS.
6036         * m4/snan.m4: Update comment.
6038 2023-11-06  Bruno Haible  <bruno@clisp.org>
6040         fenv-exceptions-state-c99: Update doc regarding Minix.
6041         * doc/posix-functions/fesetexceptflag.texi: Mention the Minix bug.
6043 2023-11-05  Bruno Haible  <bruno@clisp.org>
6045         fenv-exceptions-trapping: Avoid test failure on Minix.
6046         * tests/test-fenv-except-trapping-2.c (main): Skip the '4' tests also on
6047         Minix.
6049         fenv-exceptions-tracking-c99: Fix test failures on Minix.
6050         * m4/fenv-exceptions-tracking.m4 (gl_FENV_EXCEPTIONS_TRACKING): On
6051         Minix, set REPLACE_FECLEAREXCEPT and REPLACE_FETESTEXCEPT to 1.
6052         * doc/posix-functions/feclearexcept.texi: Mention the Minix bug.
6053         * doc/posix-functions/fetestexcept.texi: Likewise.
6055 2023-11-05  Bruno Haible  <bruno@clisp.org>
6057         fenv-exceptions-trapping: Avoid test failure on Haiku/i386.
6058         * tests/test-fenv-except-trapping-2.c (main): Skip the '4' tests also on
6059         Haiku/i386.
6061         fenv-exceptions-state: Fix test failure on Haiku/i386 and Haiku/x86_64.
6062         * m4/fenv-exceptions-state.m4 (gl_FENV_EXCEPTIONS_STATE): Arrange to
6063         override fesetexceptflag() on Haiku.
6064         * doc/posix-functions/fesetexceptflag.texi: Mention the Haiku bug.
6066 2023-11-05  Bruno Haible  <bruno@clisp.org>
6068         fenv: Add C++ tests.
6069         * tests/test-fenv-c++.cc: New file.
6070         * modules/fenv-c++-tests: New file.
6071         * modules/fenv-tests (Depends-on): Add it.
6073 2023-11-05  Bruno Haible  <bruno@clisp.org>
6075         fenv-environment: Add tests.
6076         * tests/test-fenv-env-1.c: New file.
6077         * tests/test-fenv-env-2.c: New file.
6078         * tests/test-fenv-env-3.c: New file.
6079         * tests/test-fenv-env-4.c: New file.
6080         * tests/test-fenv-env-5.sh: New file.
6081         * tests/test-fenv-env-5.c: New file.
6082         * modules/fenv-environment-tests: New file.
6084         fenv-environment: New module.
6085         * lib/fenv.in.h (fenv_t) [hppa]: Remove the __exception field.
6086         (FE_DFL_ENV): Override if <fenv.h> exists but HAVE_FE_DFL_ENV is not
6087         defined.
6088         (fegetenv, fesetenv, feupdateenv, feholdexcept): New declarations.
6089         * lib/fenv-env.c: New file, based on glibc.
6090         * lib/fenv-env-hold.c: New file.
6091         * lib/fenv-env-update.c: New file.
6092         * m4/fenv-environment.m4: New file.
6093         * m4/mathfunc.m4 (gl_MATHFUNC): Handle also the 'fenv_t *' type.
6094         * m4/fenv_h.m4 (gl_FENV_H_DEFAULTS): Initialize REPLACE_FEGETENV,
6095         REPLACE_FEHOLDEXCEPT, REPLACE_FESETENV, REPLACE_FEUPDATEENV.
6096         * modules/fenv (Makefile.am): Substitute REPLACE_FEGETENV,
6097         REPLACE_FEHOLDEXCEPT, REPLACE_FESETENV, REPLACE_FEUPDATEENV.
6098         * modules/fenv-environment: New file.
6099         * doc/posix-functions/fegetenv.texi: Mention the new module and the bugs
6100         on glibc, macOS, AIX.
6101         * doc/posix-functions/feholdexcept.texi: Mention the new module and the
6102         bugs on glibc, musl libc, FreeBSD, AIX, mingw, MSVC.
6103         * doc/posix-functions/fesetenv.texi: Mention the new module and the bugs
6104         on musl libc, FreeBSD, NetBSD, AIX, Solaris, Cygwin, mingw, MSVC.
6105         * doc/posix-functions/feupdateenv.texi: Mention the new module and the
6106         bugs on glibc, musl libc, macOS, FreeBSD, AIX, Solaris, mingw, MSVC.
6108 2023-11-05  Bruno Haible  <bruno@clisp.org>
6110         fenv-exceptions-tracking-c99 tests: Enhance tests.
6111         * tests/test-fenv-except-tracking-3.sh: Test not only FE_INVALID, but
6112         also FE_DIVBYZERO, FE_OVERFLOW, FE_UNDERFLOW, FE_INEXACT.
6113         * tests/test-fenv-except-tracking-3.c: Include <stdlib.h>, <string.h>.
6114         Don't include fpe-trapping.h. Assume HAVE_FPE_TRAPPING is 1.
6115         (main): Receive the exception to test as first argument.
6117 2023-11-05  Bruno Haible  <bruno@clisp.org>
6119         fpe-trapping: Simplify.
6120         * lib/fpe-trapping.h (sigfpe_on_invalid): Remove all platform specific
6121         code. Just rely on feclearexcept and feenableexcept.
6122         * m4/fpe-trapping.m4: Renamed from m4/fpe.m4.
6123         (gl_FPE_TRAPPING): Greatly simplify.
6124         * modules/fpe-trapping (Files): Use m4/fpe-trapping.m4 instead of
6125         m4/fpe.m4. Remove m4/mathfunc.m4, m4/musl.m4.
6126         (Depends-on): Add fenv-exceptions-trapping.
6127         * tests/test-fenv-except-state-2.c (main): Update skip message.
6128         * tests/test-fenv-except-tracking-2.c (main): Likewise.
6129         * tests/test-fenv-except-tracking-3.c (main): Likewise.
6130         * tests/test-fenv-except-tracking-5.c (main): Likewise.
6131         * tests/test-nan-2.c (main): Likewise.
6132         * tests/test-snan-2.c (main): Likewise.
6134 2023-11-05  Bruno Haible  <bruno@clisp.org>
6136         fpe-tracking: Remove module.
6137         * modules/fpe-tracking: Remove file.
6138         * m4/fpe.m4 (gl_FPE_TRACKING): Remove macro.
6139         (gl_FPE_TRAPPING): Require gl_FENV_EXCEPTIONS_TRACKING instead of
6140         gl_FPE_TRACKING. Use FENV_EXCEPTIONS_TRACKING_LIBM instead of
6141         FPE_TRACKING_LIBM.
6142         * modules/nan-tests (Depends-on): Add fenv-exceptions-tracking-c99.
6143         Remove fpe-tracking.
6144         (Makefile.am): Use FENV_EXCEPTIONS_TRACKING_LIBM instead of
6145         FPE_TRACKING_LIBM.
6146         * modules/snan-tests (Depends-on): Add fenv-exceptions-tracking-c99.
6147         Remove fpe-tracking.
6148         (Makefile.am): Use FENV_EXCEPTIONS_TRACKING_LIBM instead of
6149         FPE_TRACKING_LIBM.
6150         * tests/test-nan-1.c: Assume HAVE_FE_INVALID is 1.
6151         * tests/test-snan-1.c: Likewise.
6153 2023-11-05  Bruno Haible  <bruno@clisp.org>
6155         fenv-exceptions-trapping: Avoid test failure on NetBSD/sparc.
6156         * tests/test-fenv-except-trapping-2.c (main): Skip the 'long double'
6157         tests also on NetBSD/sparc.
6159 2023-11-05  Bruno Haible  <bruno@clisp.org>
6161         fenv-exceptions-trapping: Update documentation.
6162         * doc/glibc-functions/feenableexcept.texi: Document the Linux/hppa
6163         problem.
6165 2023-11-05  Bruno Haible  <bruno@clisp.org>
6167         fenv-exceptions-trapping: Avoid test failure on older systems.
6168         * tests/test-fenv-except-trapping-2.c (main): Skip the test also on x86
6169         systems with gcc < 8.
6171 2023-11-04  Bruno Haible  <bruno@clisp.org>
6173         fenv-exceptions-trapping: Fix for powerpc* platforms.
6174         * lib/fenv-except-trapping.c (feenableexcept, fedisableexcept)
6175         [powerpc]: Use the correct bit mask for the trap bits.
6176         * tests/test-fenv-except-trapping-2.c (main): Reenable the '9' tests on
6177         powerpc platforms.
6179 2023-11-04  Bruno Haible  <bruno@clisp.org>
6181         fenv-exceptions-state-c99: Fix compilation error on FreeBSD.
6182         * lib/fenv.in.h (fegetexceptflag, fesetexceptflag): On FreeBSD, use an
6183         rpl_ prefix, to avoid a conflict with an inline definition in FreeBSD's
6184         <fenv.h>.
6186 2023-11-04  Bruno Haible  <bruno@clisp.org>
6188         doc: Update info about Cygwin feraiseexcept bug.
6189         * doc/posix-functions/feraiseexcept.texi: Update info regarding Cygwin.
6191 2023-11-04  Bruno Haible  <bruno@clisp.org>
6193         fenv-exceptions-tracking-c99 tests: Avoid test failure on NetBSD/sparc.
6194         * tests/test-fenv-except-tracking-2.c (main): On NetBSD/sparc, skip the
6195         'long double' test.
6197 2023-11-04  Bruno Haible  <bruno@clisp.org>
6199         fenv-exceptions-tracking-c99: Fix fetestexcept() override for AIX.
6200         * lib/fenv-except-tracking-test.c (fetestexcept): On AIX, use
6201         fp_read_flag() rather than the fpscr register.
6203 2023-11-04  Bruno Haible  <bruno@clisp.org>
6205         fenv-exceptions-tracking-c99: Work around a NetBSD/x86_64 bug.
6206         * m4/fenv-exceptions-tracking.m4 (gl_FENV_EXCEPTIONS_TRACKING): On
6207         NetBSD/x86_64, set REPLACE_FETESTEXCEPT to 1.
6208         * doc/posix-functions/fetestexcept.texi: Document the NetBSD bug.
6210 2023-11-04  Bruno Haible  <bruno@clisp.org>
6212         fenv-rounding: Avoid a test failure on NetBSD/sparc64.
6213         * tests/test-fenv-round.c (test_towardzero, test_upward, test_downward):
6214         Skip the 'long double' tests on NetBSD/sparc64.
6215         * doc/posix-functions/fesetround.texi: Mention the problem with
6216         'long double' operations on some platforms.
6218 2023-11-04  Bruno Haible  <bruno@clisp.org>
6220         fenv-rounding: Improve code for MSVC.
6221         * lib/fenv-round.c (fegetround) [MSVC]: Use the rounding direction from
6222         the SSE unit. Don't assume stable values for FE_UPWARD and FE_DOWNWARD.
6223         (fesetround) [MSVC]: Set the rounding direction only in the SSE unit.
6224         Don't assume stable values for FE_UPWARD and FE_DOWNWARD.
6226 2023-11-04  Bruno Haible  <bruno@clisp.org>
6228         fenv-rounding et al.: Require AC_CANONICAL_HOST before accessing $host.
6229         * m4/fenv-rounding.m4 (gl_FENV_ROUNDING): Require AC_CANONICAL_HOST.
6230         * m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): Likewise.
6231         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Likewise.
6232         * m4/iswdigit.m4 (gl_FUNC_ISWDIGIT): Likewise.
6233         * m4/iswpunct.m4 (gl_FUNC_ISWPUNCT): Likewise.
6234         * m4/iswxdigit.m4 (gl_FUNC_ISWXDIGIT): Likewise.
6235         * m4/strerrorname_np.m4 (gl_FUNC_STRERRORNAME_NP): Likewise.
6236         * m4/strfmon_l.m4 (gl_FUNC_STRFMON_L): Likewise.
6237         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
6238         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Likewise.
6239         * m4/wcscmp.m4 (gl_FUNC_WCSCMP): Likewise.
6240         * m4/wcsncmp.m4 (gl_FUNC_WCSNCMP): Likewise.
6242 2023-11-04  Bruno Haible  <bruno@clisp.org>
6244         fenv: Document an ABI break on MSVC.
6245         * doc/posix-headers/fenv.texi: Document why fegetround and fesetround
6246         are seemingly broken on MSVC.
6248 2023-10-31  Bruno Haible  <bruno@clisp.org>
6250         fenv-exceptions-trapping: Add tests.
6251         * tests/test-fenv-except-trapping-1.c: New file.
6252         * tests/test-fenv-except-trapping-2.sh: New file.
6253         * tests/test-fenv-except-trapping-2.c: New file.
6254         * modules/fenv-exceptions-trapping-tests: New file.
6256         fenv-exceptions-trapping: New module.
6257         * lib/fenv.in.h (feenableexcept, fedisableexcept, fegetexcept): New
6258         declarations.
6259         * lib/fenv-except-trapping.c: New file, based on glibc.
6260         * m4/fenv_h.m4 (gl_FENV_H): Test also whether fegetexcept is declared.
6261         * m4/fenv-exceptions-trapping.m4: New file.
6262         * modules/fenv-exceptions-trapping: New file.
6263         * doc/glibc-functions/fegetexcept.texi: Mention the new module.
6264         * doc/glibc-functions/fedisableexcept.texi: Likewise.
6265         * doc/glibc-functions/feenableexcept.texi: Likewise. Mention the glibc,
6266         macOS, FreeBSD bugs.
6268 2023-10-30  Bruno Haible  <bruno@clisp.org>
6270         fenv-exceptions-state-c99: Fix the x86_64 and i386 case.
6271         * lib/fenv-except-state-set.c (fesetexceptflag): Make sure to restore
6272         the exception trap bits in all cases.
6274 2023-10-30  Bruno Haible  <bruno@clisp.org>
6276         fenv-exceptions-state-c23: Add tests.
6277         * tests/test-fenv-except-state-3.c: New file.
6278         * modules/fenv-exceptions-state-c23-tests: New file.
6280         fenv-exceptions-state-c23: New module.
6281         * lib/fenv.in.h (fetestexceptflag): New declaration.
6282         * lib/fenv-except-state-test.c: New file, based on glibc.
6283         * m4/fenv-exceptions-state-c23.m4: New file.
6284         * modules/fenv-exceptions-state-c23: New file.
6285         * doc/posix-functions/fetestexceptflag.texi: Mention the new module.
6287 2023-10-30  Bruno Haible  <bruno@clisp.org>
6289         fenv-exceptions-state-c99: Add tests.
6290         * tests/test-fenv-except-state-1.c: New file.
6291         * tests/test-fenv-except-state-2.c: New file.
6292         * modules/fenv-exceptions-state-c99-tests: New file.
6294         fenv-exceptions-state-c99: New module.
6295         * lib/fenv.in.h (fegetexceptflag, fesetexceptflag): New declarations.
6296         * lib/fenv-except-state-get.c: New file, based on glibc.
6297         * lib/fenv-except-state-set.c: New file, based on glibc.
6298         * m4/mathfunc.m4 (gl_MATHFUNC): Handle also the 'fexcept_t *' type.
6299         * m4/fenv-exceptions-state.m4: New file.
6300         * modules/fenv-exceptions-state-c99: New file.
6301         * doc/posix-functions/fegetexceptflag.texi: Mention the new module.
6302         * doc/posix-functions/fesetexceptflag.texi: Mention the new module and
6303         the glibc, musl libc, macOS, AIX, mingw bugs.
6305 2023-10-30  Bruno Haible  <bruno@clisp.org>
6307         fenv-exceptions-tracking-{c99,c23}: Fix the x86_64 and i386 case.
6308         * lib/fenv-except-tracking-clear.c (feclearexcept): Make sure to restore
6309         the exception trap bits in all cases.
6310         * lib/fenv-except-tracking-raise.c (feraiseexcept): Likewise.
6311         * lib/fenv-except-tracking-set.c (fesetexcept): Likewise.
6313 2023-10-29  Bruno Haible  <bruno@clisp.org>
6315         fenv-exceptions-tracking-c23: Add tests.
6316         * tests/test-fenv-except-tracking-4.c: New file.
6317         * tests/test-fenv-except-tracking-5.c: New file.
6318         * modules/fenv-exceptions-tracking-c23-tests: New file.
6320         fenv-exceptions-tracking-c23: New module.
6321         * lib/fenv.in.h (fesetexcept): New declaration.
6322         * lib/fenv-except-tracking-set.c: New file, based on glibc.
6323         * lib/fenv-private.h (_GETMSR, _SETMSR, MSR_FP_EXC_MASK, PR_SET_FPEXC,
6324         PR_FP_EXC_DISABLED, PR_FP_EXC_NONRECOV, PR_FP_EXC_ASYNC,
6325         PR_FP_EXC_PRECISE, prctl) [NetBSD/powerpc]: New macros.
6326         * m4/fenv-exceptions-tracking-c23.m4: New file.
6327         * modules/fenv-exceptions-tracking-c23: New file.
6328         * doc/posix-functions/fesetexcept.texi: Mention the new module and the
6329         glibc bugs.
6331 2023-10-28  Bruno Haible  <bruno@clisp.org>
6333         fenv-exceptions-tracking-c99: Fix feraiseexcept (FE_OVERFLOW) on MSVC.
6334         * lib/fenv-except-tracking-raise.c (feraiseexcept): Use the generic
6335         approach for all exceptions.
6337 2023-10-28  Bruno Haible  <bruno@clisp.org>
6339         fpe-trapping: Always clear the FE_INVALID exception flag first.
6340         * lib/fpe-trapping.h: Include <fenv.h> on all platforms.
6341         (sigfpe_on_invalid) [AIX, HP-UX, IRIX, Solaris] : Clear the FE_INVALID
6342         exception flag first.
6343         * modules/fpe-trapping (Depends-on): Add fenv-exceptions-tracking-c99.
6345 2023-10-28  Bruno Haible  <bruno@clisp.org>
6347         fenv-exceptions-tracking-c99: Add tests.
6348         * tests/test-fenv-except-tracking-1.c: New file.
6349         * tests/test-fenv-except-tracking-2.sh: New file.
6350         * tests/test-fenv-except-tracking-2.c: New file.
6351         * tests/test-fenv-except-tracking-3.sh: New file.
6352         * tests/test-fenv-except-tracking-3.c: New file.
6353         * modules/fenv-exceptions-tracking-c99-tests: New file.
6355         fenv-exceptions-tracking-c99: New module.
6356         * lib/fenv.in.h (feclearexcept, feraiseexcept, fetestexcept): New
6357         declarations.
6358         * lib/fenv-except-tracking-clear.c: New file, based on glibc.
6359         * lib/fenv-except-tracking-raise.c: New file, based on glibc.
6360         * lib/fenv-except-tracking-test.c: New file, based on glibc.
6361         * m4/fenv-exceptions-tracking.m4: New file.
6362         * m4/fenv-exceptions.m4: New file.
6363         * modules/fenv-exceptions-tracking-c99: New file.
6364         * doc/posix-functions/feclearexcept.texi: Mention the new module.
6365         * doc/posix-functions/fetestexcept.texi: Likewise.
6366         * doc/posix-functions/feraiseexcept.texi: Likewise. Mention the glibc
6367         and Cygwin bugs.
6369 2023-10-27  Bruno Haible  <bruno@clisp.org>
6371         fenv-rounding: Add tests.
6372         * tests/test-fenv-round.c: New file.
6373         * modules/fenv-rounding-tests: New file.
6375         fenv-rounding: New module.
6376         * lib/fenv.in.h (fegetround, fesetround): New declarations.
6377         * lib/fenv-private.h: New file, based on glibc.
6378         * lib/fenv-round.c: New file, based on glibc.
6379         * m4/mathfunc.m4 (gl_MATHFUNC): Handle also the type fp_rnd.
6380         * m4/fenv-rounding.m4: New file.
6381         * modules/fenv (Depends-on): Add snippet/c++defs.
6382         (Makefile.am): Substitute $(CXXDEFS_H) into fenv.h.
6383         * modules/fenv-rounding: New file.
6384         * doc/posix-functions/fegetround.texi: Mention the new module.
6385         * doc/posix-functions/fesetround.texi: Likewise.
6387 2023-10-27  Bruno Haible  <bruno@clisp.org>
6389         tests: Use C99 initializer syntax for memory_long_double.
6390         * tests/test-isfinite.c (test_isfinitel): Use '.word = ...' syntax when
6391         initializing memory_long_double variables.
6392         * tests/test-isinf.c (test_isinfl): Likewise.
6393         * tests/test-isnan.c (test_long_double): Likewise.
6394         * tests/test-snprintf-posix.h (test_function): Likewise.
6395         * tests/test-sprintf-posix.h (test_function): Likewise.
6396         * tests/test-vasnprintf-posix.c (test_function): Likewise.
6397         * tests/test-vasnwprintf-posix.c (test_function): Likewise.
6398         * tests/test-vasprintf-posix.c (test_function): Likewise.
6399         * modules/isfinite-tests (Depends-on): Add c99.
6400         * modules/isinf-tests (Depends-on): Likewise.
6401         * modules/isnan-tests (Depends-on): Likewise.
6402         * modules/isnanl-nolibm-tests (Depends-on): Likewise.
6403         * modules/isnanl-tests (Depends-on): Likewise.
6404         * modules/pipe-filter-gi-tests (Depends-on): Likewise.
6405         * modules/pipe-filter-ii-tests (Depends-on): Likewise.
6406         * modules/snprintf-posix-tests (Depends-on): Likewise.
6407         * modules/sprintf-posix-tests (Depends-on): Likewise.
6408         * modules/vasnprintf-posix-tests (Depends-on): Likewise.
6409         * modules/vasnwprintf-posix-tests (Depends-on): Likewise.
6410         * modules/vasprintf-posix-tests (Depends-on): Likewise.
6411         * modules/vsnprintf-posix-tests (Depends-on): Likewise.
6412         * modules/vsprintf-posix-tests (Depends-on): Likewise.
6414 2023-10-26  Pádraig Brady  <P@draigBrady.com>
6416         base32, base64: disallow non-canonical encodings
6417         * lib/base32.c: Check that discarded bits in the encoding are zero.
6418         * lib/base64.c: Likewise.
6419         * tests/test-base32.c: Add test cases.
6420         * tests/test-base64.c: Likewise.
6422 2023-10-26  Bruno Haible  <bruno@clisp.org>
6424         fenv: Add tests.
6425         * tests/test-fenv.c: New file.
6426         * modules/fenv-tests: New file.
6428         fenv: New module.
6429         * lib/fenv.in.h: New file, based on glibc.
6430         * m4/fenv_h.m4: New file.
6431         * modules/fenv: New file.
6432         * doc/posix-headers/fenv.texi: Mention the new module.
6434 2023-10-25  Paul Eggert  <eggert@cs.ucla.edu>
6436         base32: new function isubase32; also, tune.
6437         * lib/base32.c (BASE32_INLINE): Define.
6438         (base32_to_int): Rename from b32 and make it extern.  All uses changed.
6439         (uchar_in_range): Remove.  All uses removed.
6440         (isbase32, base32_decode_ctx_init):
6441         Move to lib/base32.h and make inline.
6442         * lib/base32.h: Ignore -Wtype-limits, so that we needn’t
6443         worry about uchar_in_range.
6444         (BASE32_INLINE): Define, and use _GL_INLINE_HEADER_BEGIN.
6445         (isubase32): New function, useful as it as a different signature.
6446         (isbase32): Define in terms of isubase32.
6447         * modules/base32 (Depends-on): Add extern-inline.
6449         base64: new function isubase64; also, tune.
6450         * lib/base64.c (BASE64_INLINE): Define.
6451         (base64_to_int): Rename from b64 and make it extern.  All uses changed.
6452         (uchar_in_range): Remove.  All uses removed.
6453         (isbase64, base64_decode_ctx_init):
6454         Move to lib/base64.h and make inline.
6455         * lib/base64.h: Ignore -Wtype-limits, so that we needn’t
6456         worry about uchar_in_range.
6457         (BASE64_INLINE): Define, and use _GL_INLINE_HEADER_BEGIN.
6458         (isubase64): New function, useful as it as a different signature.
6459         (isbase64): Define in terms of isubase64.
6460         * modules/base64 (Depends-on): Add extern-inline.
6462 2023-10-24  Paul Eggert  <eggert@cs.ucla.edu>
6464         tests/unistr/u16-chr-tests: pacify -Wcast-align
6465         * tests/unistr/test-chr.h (main): Redo types to pacify
6466         gcc -Wcast-align.
6468         isnanl-tests, stdio-tests: pacify GCC -Wshadow
6469         * tests/test-isnanl.h (NWORDS): Remove.
6470         (memory_long_double): Do not redefine in an inner scope.
6471         All uses changed to use the snan.h memory_long_double.
6472         * tests/test-stdio.c (NWORDS): Remove.
6473         (memory_long_double): Do not redefine in an inner scope.
6474         The snan.h memory_long_double is fine here.
6476         explicit_bzero-tests: pacify GCC 13.2.1
6477         * tests/test-explicit_bzero.c:
6478         * tests/test-memset_explicit.c:
6479         Ignore -Wdangling pointer.
6481 2023-10-22  Bruno Haible  <bruno@clisp.org>
6483         memset_explicit, explicit_bzero tests: Fix test failures with new gcc.
6484         Reported by Sam James <sam@gentoo.org> in
6485         <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111904>.
6486         Fix by Alexandre Oliva <aoliva@gcc.gnu.org>.
6487         * tests/test-memset_explicit.c (do_secret_stuff): Declare with
6488         attributes 'noclone' and 'noipa'.
6489         * tests/test-explicit_bzero.c (do_secret_stuff): Likewise.
6491 2023-10-15  Bruno Haible  <bruno@clisp.org>
6493         net_if tests: Fix gcc warning.
6494         * tests/test-net_if.c: Include <string.h>.
6496 2023-10-15  Bruno Haible  <bruno@clisp.org>
6498         mbspbrk: Fix gcc warning (regression 2023-09-26).
6499         * lib/mbspbrk.c (mbspbrk): Fix gcc warning in GNULIB_MCEL_PREFER mode.
6501 2023-10-15  Bruno Haible  <bruno@clisp.org>
6503         pthread-spin: Fix warnings on FreeBSD 5.2.1/i386.
6504         * lib/pthread.in.h (pthread_spinlock_t): Override if <pthread.h> defines
6505         pthread_spinlock_t but we need to approximate spinlocks with mutexes.
6506         * m4/pthread-spin.m4 (gl_PTHREAD_SPIN): When the pthread_spin_*
6507         functions are declared but don't exist, mark them as REPLACEd.
6509         pthread-spin: Fix link errors on FreeBSD 5.2.1/i386.
6510         * m4/pthread-spin.m4 (gl_PTHREAD_SPIN): Test not only whether
6511         <pthread.h> defines the pthread_spinlock_t type, but also whether the
6512         function pthread_spin_init is actually defined.
6514 2023-10-15  Bruno Haible  <bruno@clisp.org>
6516         pthread_mutex_timedlock: Fix link errors on FreeBSD 5.2.1/i386.
6517         * m4/pthread_mutex_timedlock.m4 (gl_FUNC_PTHREAD_MUTEX_TIMEDLOCK): Test
6518         not only whether pthread_mutex_timedlock is declared, but also whether
6519         it is actually defined.
6521 2023-10-15  Bruno Haible  <bruno@clisp.org>
6523         threadlib: Fix link errors on FreeBSD 5.2.1/i386.
6524         * m4/threadlib.m4 (gl_PTHREADLIB_BODY): When pthread_kill could not be
6525         found in -lpthread, try -lthr.
6527 2023-10-15  Bruno Haible  <bruno@clisp.org>
6529         lock: Make Autoconf macro more robust.
6530         * m4/pthread_rwlock_rdlock.m4 (gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER):
6531         Require gl_THREADLIB, not gl_THREADLIB_EARLY. Needed to get the value of
6532         LIBMULTITHREAD.
6534 2023-10-15  Bruno Haible  <bruno@clisp.org>
6536         totalorder-bench-tests: New module.
6537         * tests/bench-totalorder.c: New file, based on tests/test-totalorder.h.
6538         * modules/totalorder-bench-tests: New file.
6540 2023-10-15  Bruno Haible  <bruno@clisp.org>
6542         snan: Simplify a type.
6543         * lib/snan.h (memory_long_double): Put the 'value' field first.
6544         * tests/test-totalorder.h (main): No need for designated initializer
6545         syntax any more.
6547 2023-10-15  Bruno Haible  <bruno@clisp.org>
6549         vma-iter: Fix compilation error on FreeBSD 5.2.1.
6550         * lib/vma-iter.c [FreeBSD]: Include <sys/param.h>.
6552 2023-10-14  Bruno Haible  <bruno@clisp.org>
6554         totalorder*: Document glibc bug on SH4.
6555         * doc/posix-functions/totalorder.texi: Mention the glibc bug on SH4.
6556         * doc/posix-functions/totalorderf.texi: Likewise.
6557         * doc/posix-functions/totalorderl.texi: Likewise.
6559         totalorder*: Fix test failures on SH4.
6560         * lib/snan.h: Update comment.
6561         * lib/totalorderf.c (totalorderf): On sh4, invert bit 22 before
6562         comparing two NaNs.
6563         * lib/totalorder.c (totalorder): On sh4, invert bit 51 before comparing
6564         two NaNs.
6565         * lib/totalorderl.c (totalorderl): On sh4, invert bit 51 or 47 of the
6566         xhi, yhi parts before comparing two NaNs.
6568         totalorder*: Fix test failures on PA-RISC and MIPS CPUs.
6569         * lib/totalorderf.c (totalorderf): On hppa and mips, invert bit 22
6570         before comparing two NaNs.
6571         * lib/totalorder.c (totalorder): On hppa and mips, invert bit 51 before
6572         comparing two NaNs.
6573         * lib/totalorderl.c: Include <float.h>.
6574         (totalorderl): On hppa and mips, invert bit 51 or 47 of the xhi, yhi
6575         parts before comparing two NaNs.
6576         * modules/totalorderl (Depends-on): Add 'float'.
6578 2023-10-14  Bruno Haible  <bruno@clisp.org>
6580         totalorder* tests: Test also the signalling NaNs.
6581         * tests/test-totalorder.h: Include signed-snan.h.
6582         (main): Change the array initializer to contain memory_* objects rather
6583         than floating-point numbers. This is needed for i386 and x86_64 CPUs.
6584         * tests/test-totalorder.c (TOTALORDER_TYPE): Use memory_double.
6585         (TOTALORDER_HAVE_SNAN, TOTALORDER_POSITIVE_SNAN,
6586         TOTALORDER_NEGATIVE_SNAN): New macros.
6587         * tests/test-totalorderf.c (TOTALORDER_TYPE): Use memory_float.
6588         (TOTALORDER_HAVE_SNAN, TOTALORDER_POSITIVE_SNAN,
6589         TOTALORDER_NEGATIVE_SNAN): New macros.
6590         * tests/test-totalorderl.c (TOTALORDER_TYPE): Use memory_long_double.
6591         (TOTALORDER_HAVE_SNAN, TOTALORDER_POSITIVE_SNAN,
6592         TOTALORDER_NEGATIVE_SNAN): New macros.
6593         * modules/totalorder-tests (Depends-on): Add signed-snan.
6594         * modules/totalorderf-tests (Depends-on): Likewise.
6595         * modules/totalorderl-tests (Depends-on): Likewise.
6597 2023-10-14  Bruno Haible  <bruno@clisp.org>
6599         totalorder* tests: Make it easier to debug failures.
6600         * tests/test-totalorder.h: Include <stdio.h>.
6601         (main): Print array indices of all failures.
6603 2023-10-14  Bruno Haible  <bruno@clisp.org>
6605         totalorder* tests: Verify also the function signatures.
6606         * tests/test-totalorder.h: New file, based on tests/test-totalorder.c.
6607         * tests/test-totalorder.c: Check the signature. Include
6608         test-totalorder.h for the rest.
6609         * tests/test-totalorderf.c: Include <config.h>, <math.h>. Check the
6610         signature. Include test-totalorder.h instead of test-totalorder.c.
6611         * tests/test-totalorderl.c: Likewise.
6612         * modules/totalorder-tests (Files): Add test-totalorder.h, signature.h.
6613         * modules/totalorderf-tests (Files): Add test-totalorder.h, signature.h.
6614         Remove test-totalorder.c.
6615         * modules/totalorderl-tests (Files): Likewise.
6617 2023-10-14  Bruno Haible  <bruno@clisp.org>
6619         totalorder*: Improve documentation.
6620         * doc/posix-functions/totalorder.texi: Reference the specification.
6621         * doc/posix-functions/totalorderf.texi: Likewise.
6622         * doc/posix-functions/totalorderl.texi: Likewise.
6624 2023-10-14  Bruno Haible  <bruno@clisp.org>
6626         snan, signed-snan: Add API that works also on x86 and x86_64 CPUs.
6627         * lib/snan.h (memory_float, memory_double, memory_long_double): New
6628         types.
6629         (construct_memory_SNaNf, memory_SNaNf, construct_memory_SNaNd,
6630         memory_SNaNd, construct_memory_SNaNl, memory_SNaNl): New functions.
6631         * lib/signed-snan.h (memory_positive_SNaNf, memory_negative_SNaNf,
6632         memory_positive_SNaNd, memory_negative_SNaNd, memory_positive_SNaNl,
6633         memory_negative_SNaNl): New functions.
6635 2023-10-14  Bruno Haible  <bruno@clisp.org>
6637         snan tests: Fix "unused variable" warnings on i386.
6638         * tests/test-snan-1.c (main): Mark nanf, nand, nanl as possibly unused.
6639         * tests/test-snan-2.c (main): Likewise.
6641 2023-10-14  Bruno Haible  <bruno@clisp.org>
6643         snan: Avoid test failures with CC="gcc -mfpmath=387".
6644         * tests/test-snan-1.c (main): Treat x86_64 CPU with
6645         __FLT_EVAL_METHOD__ == 2 like i386 CPU. Update comments.
6646         * tests/test-snan-2.c (main): Likewise.
6648 2023-10-14  Bruno Haible  <bruno@clisp.org>
6650         snan: Fix the value of SNaNl() on i386, x86_64, ia64 CPUs.
6651         * lib/snan.h (construct_SNaNl): On i386, x86_64, ia64 CPUs, invert
6652         bit 62, not bit 63, of the mantissa.
6653         * m4/snan.m4 (gl_SNAN): Require gl_LONG_DOUBLE_VS_DOUBLE.
6654         * modules/snan (Files): Add m4/math_h.m4.
6656 2023-10-13  Bruno Haible  <bruno@clisp.org>
6658         tests: Make use of signed signalling NaNs.
6659         * tests/test-signbit.c: Include signed-snan.h instead of snan.h.
6660         (test_signbitf): Test positive_SNaNf, negative_SNaNf, instead of only
6661         SNaNf.
6662         (test_signbitd): Test positive_SNaNd, negative_SNaNd, instead of only
6663         SNaNd.
6664         (test_signbitl): Test positive_SNaNl, negative_SNaNl, instead of only
6665         SNaNl.
6666         * tests/test-stdio.c: Include signed-snan.h instead of snan.h.
6667         (main): Test positive_SNaNd, negative_SNaNd, instead of only SNaNd.
6668         Also, test positive_NaNd, negative_NaNd, instead of NaNd.
6669         * modules/signbit-tests (Depends-on): Add signed-snan. Remove snan.
6670         * modules/stdio-tests (Depends-on): Likewise.
6672 2023-10-13  Bruno Haible  <bruno@clisp.org>
6674         signed-snan: New module.
6675         * lib/snan.h (construct_SNaNf): New function, extracted from SNaNf.
6676         (SNaNf): Use it.
6677         (construct_SNaNd): New function, extracted from SNaNd.
6678         (SNaNd): Use it.
6679         (construct_SNaNl): New function, extracted from SNaNl.
6680         (SNaNl): Use it.
6681         * lib/signed-snan.h: New file.
6682         * modules/signed-snan: New file.
6684 2023-10-13  Bruno Haible  <bruno@clisp.org>
6686         signed-nan: New module, renamed from qnan.
6687         * lib/signed-nan.h: Renamed from lib/qnan.h. Update double-inclusion
6688         guard.
6689         * modules/signed-nan: Renamed from modules/qnan. Update.
6690         * tests/test-signbit.c: Update.
6691         * tests/test-stdio.c: Likewise.
6692         * tests/test-totalorder.c: Likewise.
6693         * modules/*-tests: Update.
6695 2023-10-13  Bruno Haible  <bruno@clisp.org>
6697         access: Fix test failure on native Windows.
6698         * lib/access.c (access): Do the trailing slash workaround also on
6699         native Windows.
6700         * modules/access (Depends-on): Add stat.
6702 2023-10-13  Bruno Haible  <bruno@clisp.org>
6704         isnanf, isnand: Fix conflict with Solaris <ieeefp.h>.
6705         * lib/math.in.h (isnanf, isnand): On Solaris and IRIX, declare this
6706         function, instead of defining it as a macro.
6708 2023-10-12  Bruno Haible  <bruno@clisp.org>
6710         *printf tests: Test printing of signalling NaNs.
6711         These tests run without sigfpe_on_invalid(), therefore they won't crash.
6712         * tests/test-vasnprintf-posix.c: Include snan.h.
6713         (test_function): For each test case that uses NaNd or NaNl, add a test
6714         case with SNaNd or SNaNl, respectively.
6715         * tests/test-vasprintf-posix.c: Likewise.
6716         * tests/test-snprintf-posix.h: Likewise.
6717         * tests/test-sprintf-posix.h: Likewise.
6718         * tests/test-vasnwprintf-posix.c: Likewise.
6719         * modules/vasnprintf-posix-tests (Depends-on): Add snan.
6720         * modules/vasprintf-posix-tests (Depends-on): Likewise.
6721         * modules/vsnprintf-posix-tests (Depends-on): Likewise.
6722         * modules/snprintf-posix-tests (Depends-on): Likewise.
6723         * modules/vsprintf-posix-tests (Depends-on): Likewise.
6724         * modules/sprintf-posix-tests (Depends-on): Likewise.
6725         * modules/vasnwprintf-posix-tests (Depends-on): Likewise.
6726         * modules/pipe-filter-gi-tests (Depends-on): Likewise.
6727         * modules/pipe-filter-ii-tests (Depends-on): Likewise.
6729 2023-10-12  Bruno Haible  <bruno@clisp.org>
6731         nan, snan tests: Avoid test failures.
6732         * tests/test-nan-1.c (main): Special handling of arm CPUs with software
6733         floating-point emulation.
6734         * tests/test-snan-1.c (main): Likewise. Disable tests that are known to
6735         fail.
6736         * tests/test-snan-2.c (main): Skip tests that are known to fail.
6737         * modules/snan-tests (Files): Add m4/math_h.m4.
6738         (configure.ac): Require gl_LONG_DOUBLE_VS_DOUBLE.
6739         * m4/math_h.m4 (gl_LONG_DOUBLE_VS_DOUBLE): Mention also NetBSD/sparc32.
6741 2023-10-12  Bruno Haible  <bruno@clisp.org>
6743         snan: Add tests.
6744         * tests/test-snan-1.c: New file.
6745         * tests/test-snan-2.sh: New file.
6746         * tests/test-snan-2.c: New file.
6747         * modules/snan-tests: New file.
6749 2023-10-12  Bruno Haible  <bruno@clisp.org>
6751         nan: Add tests.
6752         * tests/test-nan-1.c: New file.
6753         * tests/test-nan-2.c: New file.
6754         * modules/nan-tests: New file.
6756 2023-10-12  Bruno Haible  <bruno@clisp.org>
6758         fpe-tracking, fpe-trapping: New modules.
6759         * lib/fpe-trapping.h: New file.
6760         * m4/mathfunc.m4 (gl_MATHFUNC): Handle also the type fp_except_t.
6761         * m4/fpe.m4: New file.
6762         * modules/fpe-tracking: New file.
6763         * modules/fpe-trapping: New file.
6765 2023-10-12  Bruno Haible  <bruno@clisp.org>
6767         snan: Comments.
6768         * lib/snan.h: Add more comments.
6770 2023-10-12  Bruno Haible  <bruno@clisp.org>
6772         snan: New module.
6773         * lib/snan.h: Renamed from tests/snan.h. Add double-inclusion guard.
6774         * m4/snan.m4: New file.
6775         * modules/snan: New file.
6776         * isfinite-tests (Files): Remove tests/snan.h, m4/exponent*.m4.
6777         (Depends-on): Add snan.
6778         (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION,
6779         gl_DOUBLE_EXPONENT_LOCATION, gl_LONG_DOUBLE_EXPONENT_LOCATION.
6780         * isinf-tests (Files): Remove tests/snan.h, m4/exponent*.m4.
6781         (Depends-on): Add snan.
6782         (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION,
6783         gl_DOUBLE_EXPONENT_LOCATION, gl_LONG_DOUBLE_EXPONENT_LOCATION.
6784         * isnan-tests (Files): Remove tests/snan.h, m4/exponent*.m4.
6785         (Depends-on): Add snan.
6786         (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION,
6787         gl_DOUBLE_EXPONENT_LOCATION, gl_LONG_DOUBLE_EXPONENT_LOCATION.
6788         * isnanf-nolibm-tests (Files): Remove tests/snan.h, m4/exponentf.m4.
6789         (Depends-on): Add snan.
6790         (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION.
6791         * isnanf-tests (Files): Remove tests/snan.h, m4/exponentf.m4.
6792         (Depends-on): Add snan.
6793         (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION.
6794         * isnand-nolibm-tests (Files): Remove tests/snan.h, m4/exponentd.m4.
6795         (Depends-on): Add snan.
6796         (configure.ac): Don't invoke gl_DOUBLE_EXPONENT_LOCATION.
6797         * isnand-tests (Files): Remove tests/snan.h, m4/exponentd.m4.
6798         (Depends-on): Add snan.
6799         (configure.ac): Don't invoke gl_DOUBLE_EXPONENT_LOCATION.
6800         * isnanl-nolibm-tests (Files): Remove tests/snan.h, m4/exponentl.m4.
6801         (Depends-on): Add snan.
6802         (configure.ac): Don't invoke gl_LONG_DOUBLE_EXPONENT_LOCATION.
6803         * isnanl-tests (Files): Remove tests/snan.h, m4/exponentl.m4.
6804         (Depends-on): Add snan.
6805         (configure.ac): Don't invoke gl_LONG_DOUBLE_EXPONENT_LOCATION.
6806         * signbit-tests (Files): Remove tests/snan.h, m4/exponent*.m4.
6807         (Depends-on): Add snan.
6808         (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION,
6809         gl_DOUBLE_EXPONENT_LOCATION, gl_LONG_DOUBLE_EXPONENT_LOCATION.
6810         * stdio-tests (Files): Remove tests/snan.h
6811         (Depends-on): Add snan.
6813 2023-10-12  Bruno Haible  <bruno@clisp.org>
6815         qnan: New module.
6816         * lib/qnan.h: Renamed from tests/qnan.h. Add double-inclusion guard.
6817         * modules/qnan: New file.
6818         * modules/signbit-tests (Files): Remove tests/qnan.h.
6819         (Depends-on): Add qnan. Remove nan.
6820         * modules/stdio-tests (Files): Remove tests/qnan.h.
6821         (Depends-on): Add qnan. Remove nan.
6822         * modules/totalorder-tests (Files): Remove tests/qnan.h.
6823         (Depends-on): Add qnan. Remove nan, signbit.
6824         * modules/totalorderf-tests (Files): Remove tests/qnan.h.
6825         (Depends-on): Add qnan. Remove nan, signbit.
6826         * modules/totalorderl-tests (Files): Remove tests/qnan.h.
6827         (Depends-on): Add qnan. Remove nan, signbit.
6829 2023-10-12  Bruno Haible  <bruno@clisp.org>
6831         nan: New module.
6832         * lib/nan.h: Renamed from tests/nan.h. Change double-inclusion guard.
6833         * modules/nan: New file.
6834         * modules/*-tests: Depend on this module instead of embedding
6835         tests/nan.h.
6837 2023-10-11  Bruno Haible  <bruno@clisp.org>
6839         unictype/category-and-not: Add more tests.
6840         Suggested by Arindam Sharma <arindam.sharma@imperial.ac.uk>.
6841         * tests/unictype/test-categ_and_not.c (main): Add two more test cases.
6842         * modules/unictype/category-and-not-tests (Depends-on): Add
6843         unictype/category-Cc.
6845 2023-10-09  Bruno Haible  <bruno@clisp.org>
6847         tests: Refactor functions for signalling NaNs.
6848         * tests/snan.h: New file, based on tests/test-isnanf.h,
6849         tests/test-isnand.h, tests/test-isnanl.h.
6850         * tests/test-isfinite.c: Include snan.h.
6851         (test_isfinitef, test_isfinited, test_isfinitel): Simplify.
6852         * tests/test-isinf.c: Include snan.h.
6853         (test_isinff, test_isinfd, test_isinfl): Simplify.
6854         * tests/test-isnan.c: Include snan.h.
6855         (test_float, test_double, test_long_double): Simplify.
6856         * tests/test-isnanf.h: Include snan.h.
6857         (main): Simplify.
6858         * tests/test-isnand.h: Include snan.h.
6859         (main): Simplify.
6860         * tests/test-isnanl.h: Include snan.h.
6861         (main): Simplify.
6862         * tests/test-signbit.c: Include snan.h.
6863         (test_signbitf, test_signbitd, test_signbitl): Simplify.
6864         * tests/test-stdio.c: Include qnan.h, snan.h instead of nan.h.
6865         (main): Test quiet NaNs always. Also test a signalling NaN.
6866         * modules/isfinite-tests (Files): Add tests/nan.h, tests/snan.h.
6867         * modules/isinf-tests (Files): Likewise.
6868         * modules/isnan-tests (Files): Add tests/snan.h.
6869         * modules/isnanf-tests (Files): Likewise.
6870         * modules/isnanf-nolibm-tests (Files): Likewise.
6871         * modules/isnand-tests (Files): Likewise.
6872         * modules/isnand-nolibm-tests (Files): Likewise.
6873         * modules/isnanl-tests (Files): Likewise.
6874         * modules/isnanl-nolibm-tests (Files): Likewise.
6875         * modules/signbit-tests (Files): Likewise.
6876         * modules/stdio-tests (Files): Add tests/qnan.h, tests/snan.h.
6878 2023-10-08  Bruno Haible  <bruno@clisp.org>
6880         isfinite: Work around a bug with 'long double' in glibc 2.5/ia64.
6881         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Require
6882         gl_LONG_DOUBLE_EXPONENT_LOCATION. Test also another NaN value.
6883         * modules/isfinite (Files): Add m4/exponentl.m4.
6884         * doc/posix-functions/isfinite.texi: Mention also a 'long double'
6885         problem on ia64.
6887 2023-10-07  Bruno Haible  <bruno@clisp.org>
6889         tests: Refactor functions for quiet NaNs.
6890         * tests/qnan.h: New file, based on tests/totalorder.c.
6891         * tests/nan.h: Add double-inclusion guard.
6892         * tests/test-signbit.c: Include qnan.h.
6893         (test_signbitf, test_signbitd, test_signbitl): Simplify.
6894         * tests/test-totalorder.c: Include qnan.h instead of NaN.h.
6895         (TOTALORDER_NAN): Remove macro.
6896         (TOTALORDER_POSITIVE_NAN, TOTALORDER_NEGATIVE_NAN): New macros.
6897         (positive_nan, negative_nan): Remove functions.
6898         (main): Update.
6899         * tests/test-totalorderf.c (TOTALORDER_NAN): Remove macro.
6900         (TOTALORDER_POSITIVE_NAN, TOTALORDER_NEGATIVE_NAN): New macros.
6901         * tests/test-totalorderl.c (TOTALORDER_NAN): Remove macro.
6902         (TOTALORDER_POSITIVE_NAN, TOTALORDER_NEGATIVE_NAN): New macros.
6903         * modules/signbit-tests (Files): Add tests/nan.h, tests/qnan.h.
6904         * modules/totalorder-tests (Files): Add tests/qnan.h.
6905         (Depends-on): Add signbit.
6906         * modules/totalorderf-tests (Files): Add tests/qnan.h.
6907         (Depends-on): Add signbit.
6908         * modules/totalorderl-tests (Files): Add tests/qnan.h.
6909         (Depends-on): Add signbit.
6911 2023-10-07  Bruno Haible  <bruno@clisp.org>
6913         totalorder*: Fix compilation error on glibc 2.25..2.30.
6914         * m4/totalorder.m4 (gl_FUNC_TOTALORDERF): Test whether <math.h> has an
6915         incompatible declaration of totalorderf, and set REPLACE_TOTALORDERF
6916         to 1 if so.
6917         (gl_FUNC_TOTALORDER): Test whether <math.h> has an incompatible
6918         declaration of totalorder, and set REPLACE_TOTALORDER to 1 if so.
6919         (gl_FUNC_TOTALORDERL): Test whether <math.h> has an incompatible
6920         declaration of totalorderl, and set REPLACE_TOTALORDERL to 1 if so.
6922 2023-10-07  Bruno Haible  <bruno@clisp.org>
6924         isnan: Avoid dangerous shell coding pattern.
6925         * m4/isnand.m4 (gl_FUNC_ISNAND): Use 'test -n "$arg"', not
6926         'test "$arg"'.
6927         * m4/isnanf.m4 (gl_FUNC_ISNANF): Likewise.
6928         * m4/isnanl.m4 (gl_FUNC_ISNANL): Likewise.
6930 2023-10-05  Bruno Haible  <bruno@clisp.org>
6932         doc: Mention xstrerror.
6933         * doc/posix-functions/strerror_r.texi: Mention xstrerror.
6935         xstrerror: Add tests.
6936         * tests/test-xstrerror.c: New file.
6937         * modules/xstrerror-tests: New file.
6939         xstrerror: New module.
6940         * lib/xstrerror.h: New file.
6941         * lib/xstrerror.c: New file.
6942         * modules/xstrerror: New file.
6943         * modules/strerror_r-posix (configure.ac): Update comment.
6945 2023-10-05  Paul Eggert  <eggert@cs.ucla.edu>
6947         isnan: slightly simplify configuration
6948         * m4/isnand.m4 (gl_FUNC_ISNAND):
6949         * m4/isnanf.m4 (gl_FUNC_ISNANF):
6950         * m4/isnanl.m4 (gl_FUNC_ISNANL):
6951         Slightly simplify shell ‘if’.  This should simplify future changes.
6953         totalorder: speed up configuration
6954         * m4/totalorder.m4 (gl_FUNC_TOTALORDERF, gl_FUNC_TOTALORDER)
6955         (gl_FUNC_TOTALORDERL): Avoid unnecessary call to AC_SEARCH_LIBS,
6956         since the information is already available in shell vars.
6958         totalorderl: minor porting fixes
6959         * lib/totalorderl.c (LDBL_SIGNBIT_WORD): Define to -1 if not defined.
6960         (totalorderl): Avoid unused local zu by preferring ‘if’ to ‘ifdef’.
6961         Don’t assume sizeof (unsigned long long) == 2 * sizeof (unsigned).
6963 2023-10-04  Bruno Haible  <bruno@clisp.org>
6965         totalorder* tests: Refactor.
6966         * tests/test-totalorder.c (positive_nan, negative_nan): New functions,
6967         extracted from main.
6968         (main): Use them when initializing the array.
6970 2023-10-04  Bruno Haible  <bruno@clisp.org>
6972         totalorderl: Optimize.
6973         * modules/totalorderl (Files): Add m4/signbit.m4.
6974         * m4/totalorder.m4 (gl_FUNC_TOTALORDERL): Invoke
6975         gl_LONG_DOUBLE_SIGN_LOCATION.
6976         * lib/totalorderl.c (totalorderl): If LDBL_SIGNBIT_WORD is known,
6977         use it, so that 'bigendian' becomes a constant.
6979 2023-10-04  Bruno Haible  <bruno@clisp.org>
6981         totalorderl: Work around Solaris cc bug.
6982         * lib/totalorderl.c (totalorderl): Initialize xu, yu, zu using a
6983         different syntax.
6985 2023-10-04  Bruno Haible  <bruno@clisp.org>
6987         signbit tests: Strengthen tests.
6988         * tests/test-signbit.c (test_signbitf, test_signbitd, test_signbitl):
6989         Test the sign bit both of a NaN value and of its negative.
6991 2023-10-03  Bruno Haible  <bruno@clisp.org>
6993         doc: Document portability of __VA_ARGS__.
6994         * doc/gnulib-readme.texi (C99 features assumed): Add a note about
6995         __VA_ARGS__.
6997 2023-10-03  Bruno Haible  <bruno@clisp.org>
6999         ilogb: Document a Mac OS X bug.
7000         * doc/posix-functions/ilogb.texi: Mention a bug that affects Mac OS X.
7001         * m4/ilogb.m4 (gl_FUNC_ILOGB): Update comments.
7003 2023-10-03  Bruno Haible  <bruno@clisp.org>
7005         *printf-posix: Work around bug with %#.0x on Mac OS X 10.6.
7006         * lib/vasnprintf.c (VASNPRINTF): Enable NEED_PRINTF_UNBOUNDED_PRECISION-
7007         guarded code also for NEED_PRINTF_FLAG_ALT_PRECISION_ZERO. Set
7008         prec_ourselves to 1 if NEED_PRINTF_FLAG_ALT_PRECISION_ZERO, precision is
7009         0, and the directive is 'x' or 'X'. If prec_ourselves, remove the "0"
7010         output if required.
7011         * m4/printf.m4 (gl_PRINTF_FLAG_ALT_PRECISION_ZERO): New macro.
7012         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_ALT_PRECISION_ZERO): New
7013         macro.
7014         (gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS): Invoke it.
7015         * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_IS_POSIX): Require
7016         gl_PRINTF_FLAG_ALT_PRECISION_ZERO and test its result.
7017         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_IS_POSIX): Likewise.
7018         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_IS_POSIX):
7019         Likewise.
7020         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_IS_POSIX): Likewise.
7021         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_IS_POSIX): Likewise.
7022         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_IS_POSIX): Likewise.
7023         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_IS_POSIX): Likewise.
7024         * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_IS_POSIX): Likewise.
7025         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_IS_POSIX): Likewise.
7026         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_IS_POSIX): Likewise.
7027         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_IS_POSIX): Likewise.
7028         * doc/glibc-functions/asprintf.texi: Mention the %#.0x bug.
7029         * doc/glibc-functions/obstack_printf.texi: Likewise.
7030         * doc/glibc-functions/obstack_vprintf.texi: Likewise.
7031         * doc/glibc-functions/vasprintf.texi: Likewise.
7032         * doc/posix-functions/dprintf.texi: Likewise.
7033         * doc/posix-functions/fprintf.texi: Likewise.
7034         * doc/posix-functions/fwprintf.texi: Likewise.
7035         * doc/posix-functions/printf.texi: Likewise.
7036         * doc/posix-functions/snprintf.texi: Likewise.
7037         * doc/posix-functions/sprintf.texi: Likewise.
7038         * doc/posix-functions/swprintf.texi: Likewise.
7039         * doc/posix-functions/vdprintf.texi: Likewise.
7040         * doc/posix-functions/vfprintf.texi: Likewise.
7041         * doc/posix-functions/vfwprintf.texi: Likewise.
7042         * doc/posix-functions/vprintf.texi: Likewise.
7043         * doc/posix-functions/vsnprintf.texi: Likewise.
7044         * doc/posix-functions/vsprintf.texi: Likewise.
7045         * doc/posix-functions/vswprintf.texi: Likewise.
7046         * doc/posix-functions/vwprintf.texi: Likewise.
7047         * doc/posix-functions/wprintf.texi: Likewise.
7049 2023-10-03  Bruno Haible  <bruno@clisp.org>
7051         faccessat tests: Strengthen tests.
7052         * tests/test-faccessat.c (main): Test other modes than F_OK. Check errno
7053         values.
7055 2023-10-03  Bruno Haible  <bruno@clisp.org>
7057         euidaccess: Reject trailing slashes on symlinks to non-directories.
7058         * modules/euidaccess (Depends-on): Add access.
7060         euidaccess: Add tests.
7061         * tests/test-access.h: New file, extracted from tests/test-access.c.
7062         * tests/test-access.c: Moved most code to tests/test-access.h.
7063         Include test-access.h.
7064         (main): Invoke test_access.
7065         * tests/test-euidaccess.c: New file, based on tests/test-access.c.
7066         * modules/access-tests (Files): Add tests/test-access.h.
7067         * modules/euidaccess-tests: New file, based on modules/access-tests.
7069 2023-10-03  Bruno Haible  <bruno@clisp.org>
7071         access: Make last change work also when module 'stat' is in use.
7072         * lib/access.c (access): When stat() returns -1 with errno != EOVERFLOW,
7073         fail.
7075         access: Work around trailing slash bug on Mac OS X 10.5.
7076         * m4/access.m4 (gl_FUNC_ACCESS): Test whether access honors a trailing
7077         slash. Set REPLACE_ACCESS to 1 and define ACCESS_TRAILING_SLASH_BUG if
7078         not.
7079         * lib/access.c (access): Add an implementation for Unix-like platforms.
7080         * tests/test-access.c (main): Test for result if the argument has a
7081         trailing slash.
7082         * modules/access-tests (Depends-on): Add 'symlink'.
7083         * doc/posix-functions/access.texi: Mention the Mac OS X bug.
7085 2023-10-03  Bruno Haible  <bruno@clisp.org>
7087         update-copyright tests: Fix test failure (regression 2023-06-18).
7088         * build-aux/update-copyright: Add "use re 'eval';" declaration.
7090 2023-10-03  Bruno Haible  <bruno@clisp.org>
7092         Update re *-*-windows*-gnu* config triplets, withdrawn on 2023-09-19.
7093         * m4/*.m4: Don't recognize windows*-gnu* as equivalent to mingw*.
7095 2023-10-03  Bruno Haible  <bruno@clisp.org>
7097         string-c++-tests, uchar-c++-tests: Fix link errors on Mac OS X.
7098         * modules/string-c++-tests (Makefile.am): Link test-string-c++ with
7099         $(LIBC32CONV).
7100         * modules/uchar-c++-tests (Makefile.am): Link test-uchar-c++ with
7101         $(LIBC32CONV).
7103 2023-10-03  Bruno Haible  <bruno@clisp.org>
7105         mcel tests: Fix link error.
7106         * modules/mcel-tests (Makefile.am): Link test-mcel with $(LIBUNISTRING)
7107         $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBC32CONV).
7109 2023-10-03  Bruno Haible  <bruno@clisp.org>
7111         mcel: Fix compilation error in tests.
7112         * lib/mcel.h (mcel_scan): Undefine 'mbs' after use.
7114 2023-10-02  Bruno Haible  <bruno@clisp.org>
7116         localename, gettext: Avoid crash on macOS 14.
7117         Reported by Shupeng Xue <dspxue@gmail.com> at
7118         <https://lists.gnu.org/archive/html/bug-gettext/2023-10/msg00001.html>.
7119         Cf <https://github.com/aria2/aria2/issues/2083#issuecomment-1694662007>.
7120         * m4/intlmacosx.m4 (gt_INTL_MACOSX): Link with the CoreServices
7121         framework in addition to the CoreFoundation framework.
7123 2023-10-02  Bruno Haible  <bruno@clisp.org>
7125         localcharset: Avoid internal compiler error with -Wextra on macOS 10.5.
7126         * lib/localcharset.c (locale_charset): Use an empty compound statement
7127         instead of a null statement.
7129 2023-10-02  KO Myung-Hun  <komh78@gmail.com>
7131         fchdir: Fix a compilation error on OS/2 kLIBC (regression 2023-09-29).
7132         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Define REPLACE_FCHDIR macro to 1 if
7133         REPLACE_FCHDIR is 1.
7135 2023-10-02  Bruno Haible  <bruno@clisp.org>
7137         totalorder, totalorderf, totalorderl: Fix some typos.
7138         * m4/totalorder.m4 (gl_FUNC_TOTALORDERF): Assign TOTALORDERF_LIBM, not
7139         TOTALORDER_LIBM.
7140         * modules/totalorder (Description): Fix copy&paste mistake.
7141         (Depends-on): Fix conditions.
7142         * modules/totalorderf (Depends-on): Likewise.
7143         * modules/totalorderl (Depends-on): Likewise.
7145 2023-10-01  Paul Eggert  <eggert@cs.ucla.edu>
7147         totalorder, totalorderf, totalorderl: new modules
7148         * lib/math.in.h: Declare totalorderf, totalorder, totalorderl.
7149         * lib/totalorder.c, lib/totalorderf.c, lib/totalorderl.c:
7150         * m4/totalorder.m4, modules/totalorder, modules/totalorder-tests:
7151         * modules/totalorderf, modules/totalorderf-tests:
7152         * modules/totalorderl, modules/totalorderl-tests:
7153         * tests/test-totalorder.c, tests/test-totalorderf.c:
7154         * tests/test-totalorderl.c: New files.
7155         * m4/math_h.m4 (gl_MATH_H, gl_MATH_H_REQUIRE_DEFAULTS)
7156         (gl_MATH_H_DEFAULTS):
7157         * modules/math (math.h): Set up totalorder, totalorderf, totalorderl.
7158         * m4/mathfunc.m4 (gl_MATHFUNC): Also support pointer-to-const.
7160 2023-09-30  Paul Eggert  <eggert@cs.ucla.edu>
7162         regex-quote: fix recently-introduced typo
7163         Problem reported by Bruno Haible in:
7164         https://lists.gnu.org/r/bug-gnulib/2023-09/msg00146.html
7165         * lib/regex-quote.c (regex_quote_copy): Add missing #endif.
7167 2023-09-30  Bruno Haible  <bruno@clisp.org>
7169         wgetcwd-lgpl: Add tests.
7170         * tests/test-wgetcwd-lgpl.c: New file, based on
7171         tests/test-getcwd-lgpl.c.
7172         * modules/wgetcwd-lgpl-tests: New file, based on
7173         modules/getcwd-lgpl-tests.
7175         wgetcwd-lgpl: New module.
7176         * lib/wchar.in.h (wgetcwd): New declaration.
7177         * lib/wgetcwd-lgpl.c: New file, based on lib/getcwd-lgpl.c.
7178         * m4/wchar_h.m4 (gl_WCHAR_H_REQUIRE_DEFAULTS): Initialize
7179         GNULIB_WGETCWD.
7180         * modules/wchar (Makefile.am): Substitute GNULIB_WGETCWD.
7181         * modules/wgetcwd-lgpl: New file.
7183 2023-09-30  Bruno Haible  <bruno@clisp.org>
7185         getcwd-lgpl: Tweaks.
7186         * lib/unistd.in.h (getcwd): Mention the module 'getcwd-lgpl'.
7187         * lib/getcwd-lgpl.c (rpl_getcwd): Minimize scope of local variables.
7188         * tests/test-getcwd-lgpl.c (main): Use GNU coding style.
7190 2023-09-29  Bruno Haible  <bruno@clisp.org>
7192         Allow different --libtool options from multiple gnulib-tool invocations.
7193         * modules/crypto/gc (Makefile.am): Don't test GL_COND_LIBTOOL, since
7194         gnulib-tool already eliminates lib_LDFLAGS augmentations for non-libtool
7195         libraries.
7196         * modules/striconv (Makefile.am): Likewise.
7197         * modules/striconveh (Makefile.am): Likewise.
7198         * modules/termcap (Makefile.am): Likewise.
7199         * modules/terminfo (Makefile.am): Likewise.
7201 2023-09-29  KO Myung-Hun  <komh78@gmail.com>
7203         stdlib: Cast putenv() on OS/2 kLIBC
7204         * lib/stdlib.in.h (putenv) [kLIBC]: Cast with _GL_CXXALIAS_SYS_CAST().
7206 2023-09-29  Bruno Haible  <bruno@clisp.org>
7208         fchdir: Override properly on OS/2 kLIBC.
7209         * lib/unistd.in.h (fchdir): Override if REPLACE_FCHDIR is 1.
7210         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_FCHDIR.
7211         * modules/unistd (Makefile.am): Substitute REPLACE_FCHDIR.
7212         * modules/fchdir (Depends-on, configure.ac): Test REPLACE_FCHDIR.
7213         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Instead of setting HAVE_FCHDIR to 0,
7214         set REPLACE_FCHDIR to 1.
7216 2023-09-29  KO Myung-Hun  <komh78@gmail.com>
7218         fdopendir: Use Windows code path on OS/2 kLIBC
7219         * lib/closedir.c (closedir): Use Windows code path.
7220         * lib/dirent.in.h (_gl_register_dirp_fd, _gl_unregister_dirp_fd):
7221         Remove.
7222         * lib/dirfd.c (_gl_register_dirp_fd, _gl_unregister_dirp_fd): Remove.
7223         (dirfd): Use Windows code path.
7224         * lib/fdopendir.c (fdopendir): Use Windows code path.
7225         * lib/opendir.c (opendir): Use Windows code path.
7226         * m4/closedir.m4 (REPLACE_CLOSEDIR): Use Windows code path.
7227         * m4/dirent_h.m4 (DIR_HAS_FD_MEMBER): Use Windows code path.
7228         * m4/dirfd.m4 (REPLACE_DIRFD): Use Windows code path.
7229         * m4/fchdir.m4 (HAVE_FCHDIR): Replace fchdir() if dirfd() does not work.
7230         * m4/opendir.m4 (REPLACE_OPENDIR): Use Windows code path.
7231         * m4/readdir.m4 (REPLACE_READDIR): Use Windows code path.
7232         * m4/rewinddir.m4 (REPLACE_REWINDDIR): Use Windows code path.
7233         * modules/fchdir (Depends-on): Include dirent always.
7235 2023-09-26  Paul Eggert  <eggert@cs.ucla.edu>
7237         mcel-bench-tests: fix typo
7238         * tests/bench-mcel.c (main): Fix typo in usage message.
7240         Remaining support for GNULIB_MCEL_PREFER
7241         Support mcel API in remaining modules where this might matter,
7242         for apps that prefer it.
7243         * lib/mbmemcasecmp.c, lib/mbscspn.c, lib/mbsncasecmp.c, lib/mbsnlen.c:
7244         * lib/mbspbrk.c, lib/mbspcasecmp.c, lib/mbssep.c, lib/mbsspn.c:
7245         * lib/regex-quote.c:
7246         Include mcel.h instead of mbiterf.h or mbuiterf.h,
7247         if GNULIB_MCEL_PREFER.
7248         * lib/mbmemcasecmp.c (mbmemcasecmp), lib/mbscspn.c (mbscspn):
7249         * lib/mbsncasecmp.c (mbsncasecmp), lib/mbsnlen.c (mbsnlen):
7250         * lib/mbspbrk.c (mbspbrk), lib/mbspcasecmp.c (mbspcasecmp):
7251         * lib/mbssep.c (mbssep), lib/mbsspn.c (mbsspn):
7252         * lib/regex-quote.c (regex_quote_length, regex_quote_copy):
7253         Use mcel API, if GNULIB_MCEL_PREFER.
7254         * lib/mbscspn.c, lib/mbspbrk.c, lib/mbspcasecmp.c, lib/mbsspn.c:
7255         Include stdlib.h, for MB_CUR_MAX.
7256         * modules/mbmemcasecmp, modules/mbsncasecmp, modules/mbspcasecmp:
7257         Depend on c32tolower.
7258         * modules/regex-quote: Depend on mempcpy.
7260 2023-09-25  Paul Eggert  <eggert@cs.ucla.edu>
7262         mbscasestr: support GNULIB_MCEL_PREFER
7263         Support mcel API for apps that prefer it.
7264         This mirrors the recent changes to mbsstr.
7265         * lib/mbscasestr.c [GNULIB_MCEL_PREFER]: Include mcel.h not mbuiter.h.
7266         (mbchar_t, mb_equal) [GNULIB_MCEL_PREFER]: New type and function,
7267         to make it easier to use common code.
7268         (knuth_morris_pratt_multibyte): Don't assume mbchar_t's alignment
7269         is at least that of size_t.
7270         (knuth_morris_pratt_multibyte, mbscasestr) [GNULIB_MCEL_PREFER]:
7271         Use mcel API.
7272         * modules/mbscasestr (Depends-on): Add alignasof.
7274 2023-09-24  Bernhard Voelker  <mail@bernhard-voelker.de>
7276         maintainer-makefile: Fix syntax-check rules wrt README.
7277         * top/maint.mk (sc_readme_link_install): Change the value of the
7278         variable in_vc_files to contain a pattern for the README file.
7279         (sc_readme_link_copying): Likewise.
7280         Previously, the above rules always passed, because the generated
7281         list of files was empty.  Bug introduced when adding the rules
7282         in commit 53b4bf3018.
7284 2023-09-22  Bruno Haible  <bruno@clisp.org>
7286         striconveh, *vasnprintf, vasnwprintf: Make more virtual-memory friendly.
7287         * lib/striconveh.c (mem_cd_iconveh_internal): Mark hex as 'const'.
7288         * lib/vasnprintf.c (wctomb_fallback): Likewise.
7290 2023-09-21  Paul Eggert  <eggert@cs.ucla.edu>
7292         mbschr, mbsrchr: support GNULIB_MCEL_PREFER
7293         Support mcel API for apps that prefer it.
7294         The following changes are in effect only if GNULIB_MCEL_PREFER.
7295         * lib/mbschr.c, lib/mbsrchr.c: Include stdlib.h, for MB_CUR_MAX.
7296         [GNULIB_MCEL_PREFER]: Include mcel.h instead of mbuiterf.h.
7297         (mbschr, mbsrchr) [GNULIB_MCEL_PREFER]: Use mcel API.
7299         gnulib-common: don’t suppress -Wpedantic
7300         Problem reported by Pádraig Brady in:
7301         https://lists.gnu.org/r/bug-gnulib/2023-09/msg00130.html
7302         * m4/gnulib-common.m4 (_GL_HAVE___HAS_C_ATTRIBUTE): New macro.
7303         Use it instead of ‘defined __has_c_attribute’.
7305         crypto/sm3: rename gl_cv_* variable for clarity
7306         * m4/gc-sm3.m4 (gl_cv_libgcrypt_md_sm3):
7307         Rename from gl_cv_libcrypt_md_sm3 since this is unrelated to libcrypt.
7309 2023-09-17  Paul Eggert  <eggert@cs.ucla.edu>
7311         intprops: pacify GCC -Wtype-limits
7312         * lib/intprops-internal.h: Pacify gcc (GCC) 13.2.1 20230728 (Red
7313         Hat 13.2.1-1) x86-64 -Wtype-limits on bleeding-edge diffutils.
7315 2023-09-16  Bruno Haible  <bruno@clisp.org>
7317         lib-symbol-visibility: Fix a misnomer.
7318         * doc/lib-symbol-visibility.texi: Rename LIBFOO_DLL_EXPORTED to
7319         LIBFOO_SHLIB_EXPORTED. Prefer the term "shared library", since the term
7320         "DLL" applies only to Windows.
7321         * lib/relocatable.h (RELOCATABLE_SHLIB_EXPORTED): Renamed from
7322         RELOCATABLE_DLL_EXPORTED. Prefer the term "shared library", since the
7323         term "DLL" applies only to Windows.
7324         * lib/mbtowc-lock.c (SHLIB_EXPORTED): Renamed from DLL_EXPORTED.
7325         * lib/nl_langinfo-lock.c (SHLIB_EXPORTED): Likewise.
7326         * lib/setlocale-lock.c (SHLIB_EXPORTED): Likewise.
7328 2023-09-15  Bruno Haible  <bruno@clisp.org>
7330         acl-permissions: Fix compilation error on Solaris 11 (regr. 2023-09-04).
7331         * lib/set-permissions.c: Include minmax.h.
7332         * modules/acl-permissions (Depends-on): Add minmax.
7334 2023-09-15  Bruno Haible  <bruno@clisp.org>
7336         readutmp: Fix crash when gdm is in use.
7337         Reported by Thorsten Kukuk <kukuk@suse.com> in
7338         <https://lists.gnu.org/archive/html/bug-gnulib/2023-09/msg00093.html>.
7339         * lib/readutmp.c (read_utmp_from_systemd): Don't use the value returned
7340         by sd_session_get_display if it is NULL.
7342 2023-09-14  Bruno Haible  <bruno@clisp.org>
7344         doc: Mention libucontext.
7345         * doc/pastposix-functions/getcontext.texi: Mention libucontext.
7346         * doc/pastposix-functions/makecontext.texi: Likewise.
7347         * doc/pastposix-functions/setcontext.texi: Likewise.
7348         * doc/pastposix-functions/swapcontext.texi: Likewise.
7350 2023-09-13  Bruno Haible  <bruno@clisp.org>
7352         mbfile: Add tests.
7353         * tests/test-mbfile.sh: New file.
7354         * tests/test-mbfile.c: New file.
7355         * modules/mbfile-tests: New file.
7357         mbfile: Fix major bug (regression 2023-07-04).
7358         Reported by Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org> in
7359         <https://lists.gnu.org/archive/html/bug-gnulib/2023-09/msg00088.html>.
7360         * lib/mbfile.h (mbfile_multi_getc): If bytes != -1, -2, -3, add the
7361         previous mbf->bufcount to bytes.
7363 2023-09-11  Pádraig Brady  <P@draigBrady.com>
7365         gnu-web-doc-update: fix updating of manual directory
7366         * build-aux/gnu-web-doc-update: Change to the 'manual' directory,
7367         since $tmp is a relative path.  This avoids removing files
7368         outside of the 'manual' directory.
7370 2023-09-10  Bruno Haible  <bruno@clisp.org>
7372         Fix clang errors "different exception specifier" (regr. 2023-09-04).
7373         * lib/malloc.in.h (memalign): Don't use _GL_ATTRIBUTE_NOTHROW on
7374         platforms other than glibc systems.
7375         * lib/stdio.in.h (fdopen): Likewise.
7376         * lib/stdlib.in.h (aligned_alloc, calloc, canonicalize_file_name,
7377         malloc, realloc): Likewise.
7378         * lib/string.in.h (strdup, strndup): Likewise.
7379         * lib/sys_stat.in.h (getumask): Likewise.
7380         * lib/wchar.in.h (wcsdup): Likewise.
7382 2023-09-09  Paul Eggert  <eggert@cs.ucla.edu>
7384         propername: support GNULIB_MCEL_PREFER
7385         Support mcel API for apps that prefer it.
7386         The following changes are in effect only if GNULIB_MCEL_PREFER.
7387         * lib/propername.c: Include mcel.h, not mbchar.h and mbuiter.h.
7388         (mbsstr_trimmed_wordbounded): Use mcel API.
7389         * modules/propername (Depends-on): Add c32isalnum.
7391         trim: support GNULIB_MCEL_PREFER
7392         Support mcel API for apps that prefer it.
7393         The following changes are in effect only if GNULIB_MCEL_PREFER.
7394         * lib/trim.c: Include mcel.h, not mbchar.h and mbuiterf.h.
7395         (trim2): Use mcel API.
7396         * modules/trim (Depends-on): Add c32isspace.
7398         mbsstr: support GNULIB_MCEL_PREFER
7399         Support mcel API for apps that prefer it.
7400         * lib/mbsstr.c [GNULIB_MCEL_PREFER]: Include mcel.h not mbuiter.h.
7401         (mbchar_t, mb_equal) [GNULIB_MCEL_PREFER]: New type and function,
7402         to make it easier to use common code.
7403         (knuth_morris_pratt_multibyte): Don't assume mbchar_t's alignment
7404         is at least that of size_t.
7405         (knuth_morris_pratt_multibyte, mbsstr) [GNULIB_MCEL_PREFER]:
7406         Use mcel API.
7407         * modules/mbsstr (Depends-on): Add alignasof.
7409         mbslen: support GNULIB_MCEL_PREFER
7410         Support mcel API for apps that prefer it.
7411         The following changes are in effect only if GNULIB_MCEL_PREFER.
7412         * lib/mbslen.c: Include mcel.h instead of mbuiterf.h.
7413         (mbslen): Use mcel API.
7415         chown: work around symlink issues on odd platforms
7416         Problem reported by Jordi Sanfeliu in:
7417         https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00116.html
7418         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
7419         Do not declare unused locals st, stat_valid.
7420         Redo to just call chown if arg is a symlink.
7421         This induces a race but is perhaps the best we can do easily
7422         on oddball platforms where chown does not follow symlinks.
7424 2023-09-09  Bruno Haible  <bruno@clisp.org>
7426         chown, lchown: Revisit platforms.
7427         * doc/posix-functions/chown.texi: Update platforms list.
7428         * doc/posix-functions/lchown.texi: Likewise.
7429         * lib/chown.c (rpl_chown): Add platform comments.
7430         * lib/lchown.c: Likewise.
7432 2023-09-07  Paul Eggert  <eggert@cs.ucla.edu>
7434         mbscasecmp: support GNULIB_MCEL_PREFER
7435         * lib/mbscasecmp.c: Include stdlib.h, since we use MB_CUR_MAX.
7436         Include uchar.h, for c32tolower.
7437         (GNULIB_MCEL_PREFER): Include mcel.h instead of mbuiterf.h.
7438         (mbscasecmp) [GNULIB_MCEL_PREFER]: Use mcel instead of mbuiterf.
7439         * modules/mbscasecmp (Depends-on): Add c32tolower, stdlib, uchar.
7440         Depend on mbuiterf only if not preferring mcel.
7442         exclude: support GNULIB_MCEL_PREFER
7443         Support mcel API for apps that prefer it.
7444         The following changes are in effect only if GNULIB_MCEL_PREFER.
7445         * lib/exclude.c: Include mcel.h instead of mbuiter.h.
7446         (string_hasher_ci): Use mcel_scanz instead of mbui_init,
7447         mbui_avail, mbui_cur, and mbui_advance.
7448         * modules/exclude: Do not depend on mbuiter.
7450         mcel-prefer: new module
7451         * modules/mcel-prefer: New file.
7453         mcel-bench-tests: new module
7454         * modules/mcel-bench-tests, tests/bench-mcel.c: New files.
7455         * tests/bench-multibyte.h (TEXT_LATIN_ASCII_LINE1)
7456         (TEXT_FRENCH_UTF8_LINE1, TEXT_GREEK_UTF8_LINE1)
7457         (TEXT_CHINESE_UTF8_LINE1): New macros.
7458         (text_random_bytes): New constant.
7459         * tests/bench.h (timing_output): Mark with _GL_UNUSED,
7460         since bench-mcel.c does not use it.
7462         mcel-tests: new module
7463         * modules/mcel-tests, tests/test-mcel.c: New files
7465         mcel: new module
7466         * lib/mcel.c, lib/mcel.h, modules/mcel: New files.
7468 2023-09-07  Bruno Haible  <bruno@clisp.org>
7470         Don't use 'throw ()' in C++ 11 or newer.
7471         * lib/stddef.in.h (_GL_ATTRIBUTE_NOTHROW):  Provide fallback definition.
7472         (abort): Declare with _GL_ATTRIBUTE_NOTHROW instead of throw().
7473         * lib/malloc.in.h (rpl_free, free): Likewise.
7474         * lib/stdlib.in.h (free): Likewise.
7475         * lib/string.in.h (rpl_free, free, memchr, memrchr, rawmemchr,
7476         strchrnul, strpbrk, strstr, strcasestr): Likewise.
7477         * lib/wchar.in.h (rpl_free, free): Likewise.
7478         * lib/getopt-cdefs.in.h (__THROW): Define to noexcept(true) for C++ 11
7479         or newer.
7480         * lib/md5.h (__THROW): Likewise.
7482 2023-09-07  Bruno Haible  <bruno@clisp.org>
7484         Add info about recommended warning options with clang.
7485         * HACKING (Warning Options): Add info regarding clang.
7487 2023-09-07  Bruno Haible  <bruno@clisp.org>
7489         uchar: Fix references to overridden functions with GNULIB_NAMESPACE.
7490         * lib/uchar.in.h (btoc32, c32isalnum, c32isalpha, c32isblank,
7491         c32iscntrl, c32isdigit, c32isgraph, c32islower, c32isprint, c32ispunct,
7492         c32isspace, c32isupper, c32isxdigit, c32tolower, c32toupper, c32width,
7493         c32snrtombs, c32srtombs, c32swidth, c32tob, mbsnrtoc32s, mbsrtoc32s,
7494         c32_get_type_test, c32_apply_type_test, c32_get_mapping,
7495         c32_apply_mapping): Use GNULIB_NAMESPACE:: prefix to refer to the gnulib
7496         overridden function.
7497         * modules/uchar (Depends-on): Add wctype-h.
7498         (Makefile.am): Substitute GNULIB_BTOWC, GNULIB_ISWDIGIT,
7499         GNULIB_ISWXDIGIT, GNULIB_WCWIDTH, GNULIB_WCSNRTOMBS, GNULIB_WCSRTOMBS,
7500         GNULIB_WCSWIDTH, GNULIB_WCTOB, GNULIB_MBSNRTOWCS, GNULIB_MBSRTOWCS,
7501         GNULIB_WCTYPE, GNULIB_ISWCTYPE, GNULIB_WCTRANS, GNULIB_TOWCTRANS.
7503 2023-09-07  Bruno Haible  <bruno@clisp.org>
7505         tests: Fix some clang -Wimplicit-fallthrough warnings.
7506         * tests/test-execute-main.c (main): Add 'break' statement.
7507         * tests/test-sys_file.c (main): Likewise.
7509         unictype/category-none: Fix clang -Wpedantic warning.
7510         * lib/unictype/categ_none.c (_UC_CATEGORY_NONE): Use ISO C designated
7511         initializer syntax to initialize the intended field of the union.
7513         c-*snprintf: Fix some clang -Wmissing-prototypes warnings.
7514         * lib/c-snprintf.c: Include c-snprintf.h instead of <stdio.h>.
7515         * lib/c-vsnprintf.c: Include c-vsnprintf.h instead of <stdio.h>.
7516         * lib/c-vasnprintf.c: Include c-vasnprintf.h.
7518 2023-09-06  Bruno Haible  <bruno@clisp.org>
7520         argp: Fix clang -Wextra-semi-stmt warning.
7521         * lib/argp-help.c (SKIPWS): Remove trailing semicolon.
7523 2023-09-06  Bruno Haible  <bruno@clisp.org>
7525         doc: Refine documentation of MSVC support for shared libraries.
7526         * doc/lib-symbol-visibility.texi (Exported Symbols of Shared Libraries):
7527         Recommend to define BUILDING_SHARED as an Autoconf variable. Recommend
7528         to test DLL_EXPORT.
7530 2023-09-06  Bruno Haible  <bruno@clisp.org>
7532         doc: Fix syntax error (regression 2023-09-03).
7533         * doc/posix-headers/sys_stat.texi: Correct @itemize / @end itemize
7534         nesting.
7536 2023-09-05  Bruno Haible  <bruno@clisp.org>
7538         relocatable-lib-lgpl: Don't export symbols from static MSVC .obj files.
7539         Reported by Dmitry Bely <dmitry.bely@gmail.com> in
7540         <https://lists.gnu.org/archive/html/bug-gnu-libiconv/2023-08/msg00002.html>.
7541         * lib/relocatable.h (RELOCATABLE_DLL_EXPORTED): Don't use
7542         __declspec(dllexport) when creating static .obj files with MSVC.
7544 2023-09-05  Bruno Haible  <bruno@clisp.org>
7546         unigbrk/u8-grapheme-{next,prev} tests: Fix gcc -Wformat warnings.
7547         * tests/unigbrk/test-u8-grapheme-next.c (test_u8_grapheme_next): Use
7548         %tu, not %zu, to print a pointer difference.
7549         * tests/unigbrk/test-u16-grapheme-next.c (test_u16_grapheme_next):
7550         Likewise.
7551         * tests/unigbrk/test-u32-grapheme-next.c (test_u32_grapheme_next):
7552         Likewise.
7553         * tests/unigbrk/test-u8-grapheme-prev.c (test_u8_grapheme_prev):
7554         Likewise.
7555         * tests/unigbrk/test-u16-grapheme-prev.c (test_u16_grapheme_prev):
7556         Likewise.
7557         * tests/unigbrk/test-u32-grapheme-prev.c (test_u32_grapheme_prev):
7558         Likewise.
7560 2023-09-05  Bruno Haible  <bruno@clisp.org>
7562         stdint, *printf: Update doc about MSVC.
7563         * doc/posix-headers/stdint.texi: MSVC 14 has <stdint.h>.
7564         * doc/posix-functions/*printf.texi: Current mingw and MSVC 14 support
7565         the j, t, z size specifiers.
7566         * doc/glibc-functions/obstack_*printf.texi: Likewise.
7568 2023-09-05  Bruno Haible  <bruno@clisp.org>
7570         tests: Ensure stderr output is displayed before abort().
7571         * tests/atomic-int-gnulib.h (init_atomic_int): Call fflush(stderr)
7572         before abort().
7573         * tests/atomic-int-isoc.h (init_atomic_int): Likewise.
7574         * tests/atomic-int-posix.h (init_atomic_int): Likewise.
7575         * tests/unigbrk/test-u8-grapheme-breaks.c (test_u8_grapheme_breaks):
7576         Likewise.
7577         * tests/unigbrk/test-u16-grapheme-breaks.c (test_u16_grapheme_breaks):
7578         Likewise.
7579         * tests/unigbrk/test-u32-grapheme-breaks.c (test_u32_grapheme_breaks):
7580         Likewise.
7581         * tests/unigbrk/test-uc-grapheme-breaks.c (test_uc_grapheme_breaks):
7582         Likewise.
7583         * tests/unigbrk/test-ulc-grapheme-breaks.c (main): Likewise.
7584         * tests/unigbrk/test-u8-grapheme-next.c (test_u8_grapheme_next):
7585         Likewise.
7586         * tests/unigbrk/test-u16-grapheme-next.c (test_u16_grapheme_next):
7587         Likewise.
7588         * tests/unigbrk/test-u32-grapheme-next.c (test_u32_grapheme_next):
7589         Likewise.
7590         * tests/unigbrk/test-u8-grapheme-prev.c (test_u8_grapheme_prev):
7591         Likewise.
7592         * tests/unigbrk/test-u16-grapheme-prev.c (test_u16_grapheme_prev):
7593         Likewise.
7594         * tests/unigbrk/test-u32-grapheme-prev.c (test_u32_grapheme_prev):
7595         Likewise.
7597 2023-09-05  Bruno Haible  <bruno@clisp.org>
7599         threads-h: Modernize configure test.
7600         * m4/threads_h.m4 (gl_THREADS_H): In the test program, put the
7601         '_Thread_local' storage class specifier before the type.
7603 2023-09-05  Bruno Haible  <bruno@clisp.org>
7605         Add info about recommended warning options.
7606         * HACKING: New section "Warning Options".
7608 2023-09-04  Bruno Haible  <bruno@clisp.org>
7610         string-buffer tests: Fix a compilation error (regression from today).
7611         * tests/test-string-buffer.c: Include <wchar.h>.
7613         unistr/u{8,16,32}-strtok tests: Fix -Wanalyzer-allocation-size warnings.
7614         * tests/unistr/test-u-strtok.h (test_u_strtok): Correct values of
7615         input_len and delim_len.
7617         sigpipe tests: Fix -Wanalyzer-unsafe-call-within-signal-handler warning.
7618         * tests/test-sigpipe.c (handler): Invoke _exit, not exit.
7619         * tests/test-raise.c (handler): Update comments after 2020-11-25 change.
7621         argp: Distinguish NULL and '\0' from 0.
7622         * lib/argp-pin.c: Include <stddef.h>.
7623         (program_invocation_short_name, program_invocation_name): Use NULL
7624         instead of 0.
7625         * lib/argp-parse.c (convert_options, __argp_parse, __argp_input):
7626         Likewise.
7627         * lib/argp-fmtstream.c (__argp_make_fmtstream): Likewise.
7628         * lib/argp-help.c (make_hol, hol_entry_first_long, hol_find_entry,
7629         hol_append, hol_entry_help, argp_doc, _help): Likewise.
7630         (hol_usage): Use '\0' instead of 0.
7632         argp: Fix gcc -Wanalyzer-use-of-uninitialized-value warning.
7633         * lib/argp-help.c (hol_find_entry): Access hol->entries only after
7634         having verified that hol->num_entries > 0.
7636         unictype/category-byname tests: Fix gcc -Wunused-value warning.
7637         * tests/unictype/test-categ_byname.c (main): Add some tests for category
7638         Nl.
7640         unigbrk/uc-grapheme-breaks tests: Fix gcc -Wunused-function warning.
7641         * tests/unigbrk/test-uc-grapheme-breaks.c
7642         (graphemebreakproperty_to_string): Mark as possibly unused.
7644         bitset, nonblocking-* tests: Fix gcc -Wunused-but-set-variable warnings.
7645         * tests/test-bitset.c (check_zero): Mark 'i' as possibly unused.
7646         * tests/test-nonblocking-reader.h (full_read): Mark 'spent_time' as
7647         possibly unused.
7649 2023-09-04  Bruno Haible  <bruno@clisp.org>
7651         Use statement-expressions without warnings, even in strict ISO C mode.
7652         Suggested by Eric Blake <eblake@redhat.com> in
7653         <https://lists.gnu.org/archive/html/bug-gnulib/2023-09/msg00025.html>.
7654         * lib/error.in.h (__gl_error_call): Use the variant with obvious control
7655         flow also with clang. Use '__extension__' to avoid -Wpedantic warnings.
7656         * lib/math.in.h (gl_signbitf, gl_signbitd, gl_signbitl): Define as
7657         macros even when __STRICT_ANSI__ is defined. But use '__extension__' to
7658         avoid -Wpedantic warnings.
7659         * lib/setenv.c (KNOWN_VALUE): Use '__extension__' to avoid -Wpedantic
7660         warnings.
7661         * lib/xalloc-oversized.h (xalloc_oversized): Use optimized variant even
7662         when __STRICT_ANSI__ is defined. But use '__extension__' to avoid
7663         -Wpedantic warnings.
7665 2023-09-04  Bruno Haible  <bruno@clisp.org>
7667         Fix some g++ warnings "has a different exception specifier".
7668         * m4/gnulib-common.m4 (gl_COMMON_BODY): Make _GL_ATTRIBUTE_NOTHROW
7669         effective in C++ mode.
7670         * lib/attribute.h (ATTRIBUTE_NOTHROW): Add a comment.
7671         * lib/malloc.in.h (_GL_ATTRIBUTE_NOTHROW): Provide fallback definition.
7672         (memalign): Invoke _GL_FUNCDECL_SYS with _GL_ATTRIBUTE_NOTHROW.
7673         * lib/stdio.in.h (_GL_ATTRIBUTE_NOTHROW): Provide fallback definition.
7674         (fdopen): Invoke _GL_FUNCDECL_SYS with _GL_ATTRIBUTE_NOTHROW.
7675         * lib/stdlib.in.h (_GL_ATTRIBUTE_NOTHROW): Provide fallback definition.
7676         (aligned_alloc, calloc, canonicalize_file_name, malloc, realloc): Invoke
7677         _GL_FUNCDECL_SYS with _GL_ATTRIBUTE_NOTHROW.
7678         * lib/string.in.h (_GL_ATTRIBUTE_NOTHROW): Provide fallback definition.
7679         (strdup, strndup): Invoke _GL_FUNCDECL_SYS with _GL_ATTRIBUTE_NOTHROW.
7680         * lib/sys_stat.in.h (_GL_ATTRIBUTE_NOTHROW): Provide fallback
7681         definition.
7682         (getumask): Invoke _GL_FUNCDECL_SYS with _GL_ATTRIBUTE_NOTHROW.
7683         * lib/wchar.in.h (_GL_ATTRIBUTE_NOTHROW): Provide fallback definition.
7684         (wcsdup): Invoke _GL_FUNCDECL_SYS with _GL_ATTRIBUTE_NOTHROW.
7686 2023-09-04  Bruno Haible  <bruno@clisp.org>
7688         unistr/u{8,16,32}-strchr tests: Fix some gcc -Wshadow warnings.
7689         * tests/unistr/test-strchr.h (test_strchr): Reduce of scope of local
7690         variable 'i'.
7692         unistr/u{8,16,32}-chr tests: Fix some gcc -Wshadow warnings.
7693         * tests/unistr/test-chr.h (main): Reduce of scope of local variables
7694         'i' and 'page_boundary'.
7696         pipe-filter-gi, pipe-filter-ii tests: Fix some gcc -Wshadow warnings.
7697         * tests/test-pipe-filter-gi1.c (main): Rename local variable 'argv' to
7698         'tr_argv'.
7699         * tests/test-pipe-filter-ii1.c (main): Likewise.
7701         argv-iter tests: Avoid gcc -Wanalyzer-out-of-bounds warning.
7702         * tests/test-argv-iter.c (main): Simplify logic.
7704         crypto/{gc-rijndael,rijndael} tests: Fix some gcc -Wshadow warnings.
7705         * tests/test-gc-rijndael.c (main): Rename local variable 'i' to 'round'.
7706         * tests/test-rijndael.c (main): Likewise.
7708         threads-h tests: Fix gcc -Wold-style-declaration warning.
7709         * tests/test-thread_local.c (value0, value1, value2, value3): Put the
7710         'thread_local' storage class specifier before the type.
7712         ieee754-h tests: Fix some gcc -Wmissing-field-initializers warnings.
7713         * tests/test-ieee754-h.c (float_tests): Use float literals.
7714         (double_tests): Use double literals. Initialize frac_lo.
7716         string-buffer tests: Fix a gcc -Wformat warning.
7717         * tests/test-string-buffer.c: Don't assume that wint_t has the same size
7718         as 'int'.
7720         crypto/* tests: Fix some gcc -Wdiscarded-qualifiers warnings.
7721         * tests/test-gc-hmac-md5.c (main): Change type of variables with a
7722         string literal initializer to 'const char *'.
7723         * tests/test-gc-hmac-sha1.c (main): Likewise.
7724         * tests/test-gc-hmac-sha256.c (main): Likewise.
7725         * tests/test-gc-hmac-sha512.c (main): Likewise.
7726         * tests/test-gc-md2.c (main): Likewise.
7727         * tests/test-gc-md5.c (main): Likewise.
7728         * tests/test-gc-sha1.c (main): Likewise.
7729         * tests/test-gc-sha256.c (main): Likewise.
7730         * tests/test-gc-sha512.c (main): Likewise.
7731         * tests/test-hmac-md5.c (main): Likewise.
7732         * tests/test-hmac-sha1.c (main): Likewise.
7733         * tests/test-hmac-sha256.c (main): Likewise.
7734         * tests/test-hmac-sha512.c (main): Likewise.
7736         file-has-acl: Avoid gcc warning.
7737         * lib/acl-internal.h (MIN): Remove definition.
7739 2023-09-03  Paul Eggert  <eggert@cs.ucla.edu>
7741         same-inode, stat-size: support pointers too
7742         Add functions and macros so that we can test pointers to struct
7743         stat as well as plain struct stat.  This lets coreutils deal with
7744         structs that are only partly initialized, without relying on
7745         undefined behavior.
7746         * NEWS: Mention this.
7747         * doc/posix-headers/sys_stat.texi, doc/stat-size.texi:
7748         Mention this and modernize.
7749         * lib/at-func2.c (at_func2):
7750         * lib/fts.c (same_fd):
7751         * lib/rename.c (rpl_rename) [RENAME_HARD_LINK_BUG]:
7752         * lib/same-inode.c: New file.
7753         * lib/same.c (same_nameat):
7754         * lib/term-style-control.c (activate_term_style_controller):
7755         Prefer psame_inode (a, b) to SAME_INODE (*a, *b).
7756         * lib/hash-triple-simple.c (triple_compare_ino_str):
7757         * lib/hash-triple.c (triple_compare):
7758         Prefer PSAME_INODE (a, b) to SAME_INODE (*a, *b).
7759         psame_inode is not suitable since the args are not struct stat *.
7760         * lib/same-inode.h: Check that config.h is included first.
7761         (SAME_INODE_INLINE, PSAME_INODE): New macros.
7762         (SAME_INODE): Reimplement in terms of PSAME_INODE.
7763         (psame_inode): New function.
7764         * lib/stat-size.h (STP_BLKSIZE, STP_NBLOCKS): New macros.
7765         (ST_BLKSIZE, ST_NBLOCKS): Use them.
7766         * lib/term-style-control.c (log_signal_handler_called):
7767         Always define as a function, to pacify -Wunused*.
7768         * modules/canonicalize-lgpl-tests (Files): Add m4/musl.m4.
7769         (Depends-on): Call gl_MUSL_LIBC.
7770         * modules/same-inode (Files): Add same-inode.c.
7771         (Depends-on): Add extern-inline, stdbool.
7772         (lib_SOURCES): New macro.
7773         * tests/test-binary-io.c, tests/test-canonicalize-lgpl.c:
7774         * tests/test-canonicalize.c, tests/test-cloexec.c:
7775         * tests/test-dup-safer.c, tests/test-dup2.c, tests/test-error.c:
7776         * tests/test-fcntl.c, tests/test-fdopendir.c, tests/test-fgetc.c:
7777         * tests/test-fputc.c, tests/test-fread.c, tests/test-fstat.c:
7778         * tests/test-fstatat.c, tests/test-ftruncate.c:
7779         * tests/test-fwrite.c, tests/test-getcwd.c:
7780         * tests/test-getdtablesize.c, tests/test-isblank.c:
7781         * tests/test-linkat.c, tests/test-lock.c, tests/test-lstat.h:
7782         * tests/test-malloc-gnu.c, tests/test-openat.c:
7783         * tests/test-pthread-thread.c, tests/test-pthread_sigmask1.c:
7784         * tests/test-pthread_sigmask2.c, tests/test-ptsname.c:
7785         * tests/test-ptsname_r.c, tests/test-raise.c:
7786         * tests/test-realloc-gnu.c, tests/test-rwlock1.c:
7787         * tests/test-sigprocmask.c, tests/test-snprintf.c:
7788         * tests/test-stat.h, tests/test-term-style-control-hello.c:
7789         * tests/test-term-style-control-yes.c, tests/test-thread_create.c:
7790         * tests/test-unlinkat.c, tests/test-vasnprintf.c:
7791         * tests/test-xalloc-die.c:
7792         Adjust to these changes, and fix some warnings elicited by
7793         -Wall -Wextra that I ran into while testing.
7794         * top/maint.mk (sc_prohibit_stat_st_blocks): Mention STP_NBLOCKS.
7796 2023-09-02  Bruno Haible  <bruno@clisp.org>
7798         alignalloc: Fix license header.
7799         Suggested by Paul Eggert in
7800         <https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00170.html>.
7801         * lib/alignalloc.h: Make license header consistent with module
7802         description.
7803         * lib/alignalloc.c: Likewise.
7805 2023-09-01  Bruno Haible  <bruno@clisp.org>
7807         crypto/{sha*,md5}-buffer: Add comment.
7808         * m4/gl-openssl.m4 (gl_CRYPTO_CHECK): Add comment regarding license.
7810 2023-09-01  Bruno Haible  <bruno@clisp.org>
7812         crypto/{sha*,md5,sm3}-buffer: Fix --with-openssl (regr. 2023-08-26).
7813         Reported by Agostino Sarubbo via Sam James <sam@gentoo.org> in
7814         <https://lists.gnu.org/archive/html/bug-gnulib/2023-09/msg00000.html>.
7815         * lib/sha1.h: Test the OpenSSL major version before attempting to
7816         include <openssl/configuration.h>.
7817         * lib/sha256.h: Likewise.
7818         * lib/sha512.h: Likewise.
7819         * lib/md5.h: Likewise.
7820         * lib/sm3.h: Likewise.
7822 2023-08-31  Bruno Haible  <bruno@clisp.org>
7824         readutmp: Fix memory leak introduced by last commit.
7825         * lib/readutmp.c (read_utmp_from_systemd): If num_sessions == 0 and
7826         sessions != NULL, do call free (sessions).
7828 2023-08-30  Paul Eggert  <eggert@cs.ucla.edu>
7830         readutmp: fix core dump if --enable-systemd
7831         Problem reported by Thorsten Kukuk <https://bugs.gnu.org/65617>.
7832         * lib/readutmp.c (read_utmp_from_systemd):
7833         Don’t assume session_ptr != NULL if num_sessions == 0.
7834         In practice it can be null, and the man page OKs this behavior.
7836 2023-08-30  Bruno Haible  <bruno@clisp.org>
7838         doc: Mention the module 'wchar-single'.
7839         * doc/multithread.texi: Mention the module 'wchar-single'.
7841 2023-08-30  Paul Eggert  <eggert@cs.ucla.edu>
7843         wchar-single: fix module broken since 2021
7844         Adjust to 2021-03-07 change “Rename GNULIB_WCHAR_SINGLE to
7845         GNULIB_WCHAR_SINGLE_LOCALE”.  Apparently nobody noticed that
7846         the module was broken.  Perhaps we should obsolete the module?
7847         * modules/wchar-single (GNULIB_WCHAR_SINGLE_LOCALE): Define.
7849 2023-08-29  Bruno Haible  <bruno@clisp.org>
7851         wctype: Rely on module iswpunct.
7852         * m4/wctype.m4 (gl_FUNC_WCTYPE): Also test whether the "punct" class
7853         works.
7854         * modules/wctype (Depends-on): Add iswpunct.
7855         * tests/test-iswctype.c (main): Add more tests of the "punct" class.
7856         * doc/posix-functions/wctype.texi: Mention the Android problem.
7858         c32ispunct: Rely on module iswpunct.
7859         * modules/c32ispunct (Depends-on): Add iswpunct.
7860         * tests/test-c32ispunct.c (main): Add a few more tests in the "C"
7861         locale.
7863         iswpunct: Add tests.
7864         * tests/test-iswpunct.c: New file, based on tests/test-iswdigit.c and
7865         tests/test-c32ispunct.c.
7866         * tests/test-iswpunct.sh: New file, based on tests/test-iswdigit.sh.
7867         * modules/iswpunct-tests: New file.
7869         iswpunct: New module.
7870         * lib/wctype.in.h (iswpunct): New declaration.
7871         * lib/iswpunct.c: New file.
7872         * m4/iswpunct.m4: New file.
7873         * m4/wctype_h.m4 (gl_WCTYPE_H_REQUIRE_DEFAULTS): Initialize
7874         GNULIB_ISWPUNCT.
7875         (gl_WCTYPE_H_DEFAULTS): Initialize REPLACE_ISWPUNCT.
7876         * modules/wctype-h (Makefile.am): Substitute GNULIB_ISWPUNCT,
7877         REPLACE_ISWPUNCT.
7878         * modules/iswpunct: New file.
7879         * doc/posix-functions/iswpunct.texi: Mention the new module.
7881         wctype-h tests: Add more tests.
7882         * tests/test-wctype-h.c (main): Add a sanity check of iswpunct.
7884 2023-08-29  Bruno Haible  <bruno@clisp.org>
7886         iswdigit, iswxdigit: Fix documentation.
7887         * doc/posix-functions/iswdigit.texi: Mention the module 'iswdigit'.
7888         * doc/posix-functions/iswxdigit.texi: Mention the module 'iswxdigit'.
7890 2023-08-29  Bruno Haible  <bruno@clisp.org>
7892         wctype: Fix documentation (mistake 2023-07-26).
7893         * doc/posix-functions/wctype.texi: The "blank" argument problem on mingw
7894         is now worked around by Gnulib.
7896 2023-08-26  Paul Eggert  <eggert@cs.ucla.edu>
7898         trim: do not over-allocate result
7899         * lib/trim.c: Include mbuiterf.h, not mbiterf.h, since we no
7900         longer compute strlen at first.
7901         (trim2): Do not over-allocate result and then trim the parts we
7902         don’t want.  Instead, skip unwanted input before allocating,
7903         so that the result is just the right size.  Use mempcpy
7904         instead of memmove.  Simplify.
7905         * modules/trim (Depends-on): Remove mbiterf, memmove, strdup, xalloc.
7906         Add mbuiterf, mempcpy, xalloc-die.
7908 2023-08-26  Paul Eggert  <eggert@cs.ucla.edu>
7910         propername: tune single-byte code
7911         * lib/propername.c (mbsstr_trimmed_wordbounded): Cache MB_CUR_MAX.
7912         Simplify word boundary detection in single-byte code.
7914 2023-08-26  Paul Eggert  <eggert@cs.ucla.edu>
7916         Tune single-byte code involving tolower
7917         * lib/mbmemcasecmp.c (mbmemcasecmp):
7918         * lib/mbscasecmp.c (mbscasecmp):
7919         * lib/mbscasestr.c (mbscasestr):
7920         * lib/mbsncasecmp.c (mbsncasecmp):
7921         * lib/mbspcasecmp.c (mbspcasecmp):
7922         Avoid some unnecessary calls to tolower.  For example, if the two
7923         single-byte characters are equal before downcasing there is no
7924         need to call tolower on either character.
7926 2023-08-26  Bruno Haible  <bruno@clisp.org>
7928         c32width tests: Avoid failure on FreeBSD 12.
7929         * tests/test-c32width.c (main): Skip two tests on FreeBSD < 13.
7931 2023-08-26  Bruno Haible  <bruno@clisp.org>
7933         crypto/{sha*,md5,sm3}-buffer: Ignore too old OpenSSL versions.
7934         * lib/sha1.h: If <openssl/macros.h> would give a compile-time error,
7935         undefine HAVE_OPENSSL_SHA1.
7936         * lib/sha256.h: If <openssl/macros.h> would give a compile-time error,
7937         undefine HAVE_OPENSSL_SHA256.
7938         * lib/sha512.h: If <openssl/macros.h> would give a compile-time error,
7939         undefine HAVE_OPENSSL_SHA512.
7940         * lib/md5.h: If <openssl/macros.h> would give a compile-time error,
7941         undefine HAVE_OPENSSL_MD5.
7942         * lib/sm3.h: If <openssl/macros.h> would give a compile-time error,
7943         undefine HAVE_OPENSSL_SM3.
7945 2023-08-26  Bruno Haible  <bruno@clisp.org>
7947         selinux-h: Add a comment.
7948         * lib/se-selinux.in.h: Clarify which #endif belongs to the
7949         double-inclusion guard.
7951 2023-08-26  Bruno Haible  <bruno@clisp.org>
7953         sys_utsname: Make double-inclusion guard more robust.
7954         * lib/sys_utsname.in.h: Test the guard symbol a second time.
7956 2023-08-26  Bruno Haible  <bruno@clisp.org>
7958         sys_times: Make double-inclusion guard more robust.
7959         * lib/sys_times.in.h: Test the guard symbol a second time.
7961 2023-08-26  Bruno Haible  <bruno@clisp.org>
7963         uchar: Make #include_next work right.
7964         * lib/uchar.in.h: Use a split double-inclusion guard.
7966 2023-08-26  Paul Eggert  <eggert@cs.ucla.edu>
7968         utimens: update FIXME date
7969         * lib/utimens.c (fdutimens): Change FIXME date to agree with
7970         similar FIXME in utimensat.c.
7972 2023-08-24  Paul Eggert  <eggert@cs.ucla.edu>
7974         exclude: refactor for more-modern style
7975         * lib/exclude.c: Sort include directives.
7976         (fnmatch_pattern_has_wildcards, file_name_matches):
7977         Prefer ‘true’ to ‘1’.
7978         (string_hasher, string_compare, string_compare_ci):
7979         Avoid unnecessary locals.
7980         (string_free): Remove.  All callers changed to just use ‘free’.
7981         (new_exclude_segment): Prefer xmalloc to xzalloc when it’s
7982         clearer to initialize ourselves.
7983         (new_exclude_segment, exclude_patopts, add_exclude_fp):
7984         Prefer nullptr to NULL.
7985         (free_exclude_segment, file_pattern_matches):
7986         Avoid unnecessary nesting.
7987         (free_exclude, fnmatch_no_wildcards, exclude_fnmatch)
7988         (excluded_file_name, add_exclude, add_exclude_fp):
7989         Assume C99 decl syntax.
7990         (fnmatch_no_wildcards): Prefer idx_t to size_t.
7991         (exclude_fnmatch, add_exclude_fp): Prefer ‘f (x)’ to ‘(*f) (x)’.
7992         (add_exclude): Help compiler by refactoring search for
7993         trailing slashes.  Avoid unnecessary cast to char *.
7994         * modules/exclude (Depends-on): Add nullptr.
7996 2023-08-21  Paul Eggert  <eggert@cs.ucla.edu>
7998         unlocked-io: fix getc_unlocked typo
7999         * lib/unlocked-io.h (getc): Fix misspelling of ‘getc_unlocked’.
8001 2023-08-21  Bruno Haible  <bruno@clisp.org>
8003         alignasof, stdalign: Fix a compilation error in C++ mode on FreeBSD 12.
8004         * m4/stdalign.m4 (gl_ALIGNASOF): In C++ mode, prefer __builtin_offsetof
8005         over offsetof when possible, since __builtin_offsetof works also when
8006         <stddef.h> has not been fully included yet.
8008 2023-08-21  Bruno Haible  <bruno@clisp.org>
8010         wcsstr: Relicense under LGPLv2+.
8011         * modules/wcsstr (License): Change to LGPLv2+.
8013         wcsstr-simple: Relicense under LGPLv2+.
8014         * modules/wcsstr-simple (License): Change to LGPLv2+.
8015         * lib/wcsstr.c: Update license notice.
8016         * lib/wcsstr-impl.h: Update license notice. The code added here on
8017         2023-03-27 was under LGPLv2+.
8019         wmemcmp: Relicense under LGPLv2+.
8020         * modules/wmemcmp (License): Change to LGPLv2+.
8021         * lib/wmemcmp.c: Update license notice.
8022         * lib/wmemcmp-impl.h: Likewise.
8024         wcschr: Relicense under LGPLv2+.
8025         * modules/wcschr (License): Change to LGPLv2+.
8026         * lib/wcschr.c: Update license notice.
8027         * lib/wcschr-impl.h: Likewise.
8029 2023-08-21  Bruno Haible  <bruno@clisp.org>
8031         unistr/u32-strlen: Complete license change from 2023-07-23.
8032         * lib/unistr/u-strlen.h: Update license notice.
8034 2023-08-21  Bruno Haible  <bruno@clisp.org>
8036         isnanl: Relicense under LGPLv2+.
8037         * modules/isnanl (License): Change to LGPLv2+.
8039 2023-08-20  Paul Eggert  <eggert@cs.ucla.edu>
8041         ldexp: port to non-two’s complement
8042         * lib/ldexp.c (FUNC): Don’t assume two’s-complement.
8044 2023-08-20  Bruno Haible  <bruno@clisp.org>
8046         readutmp, boot-time: Fix the result on runit and s6 init systems.
8047         * lib/boot-time-aux.h (get_linux_boot_time_fallback): Try also
8048         /var/lib/urandom/random-seed. Try /var/run/utmp last.
8050 2023-08-20  Paul Eggert  <eggert@cs.ucla.edu>
8052         ldexp: fix INT_MIN infloop
8053         * lib/ldexp.c (FUNC): Instead of converting EXP to unsigned,
8054         work on it directly.  This simplifies the code and avoids
8055         an infinite loop when EXP == INT_MIN.
8056         * modules/ldexp, modules/ldexpl: Depend on stdbool.
8057         * tests/test-ldexp.h: Include <limits.h> for INT_MIN.
8058         (test_function): Test for infloop.
8060 2023-08-20  Bruno Haible  <bruno@clisp.org>
8062         ldexp: Fix compilation error in C++ mode.
8063         * lib/math.in.h (ldexp): Use _GL_CXXALIASWARN1, not _GL_CXXALIASWARN.
8065 2023-08-19  Bruno Haible  <bruno@clisp.org>
8067         ldexp: Work around OpenBSD/mips64 bug.
8068         * lib/math.in.h (ldexp): New declaration.
8069         * lib/ldexp.c: New file, based on lib/ldexpl.c.
8070         * lib/ldexpl.c: Moved the implementation to lib/ldexp.c. Just include
8071         it.
8072         * m4/math_h.m4 (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_LDEXP.
8073         (gl_MATH_H_DEFAULTS): Initialize REPLACE_LDEXP.
8074         * m4/ldexp.m4 (gl_FUNC_LDEXP): Require gl_MATH_H_DEFAULTS and
8075         gl_FUNC_ISNAND. Invoke gl_FUNC_LDEXP_WORKS. Set REPLACE_LDEXP. Consider
8076         it when setting LDEXP_LIBM.
8077         (gl_FUNC_LDEXP_WORKS): New macro.
8078         * modules/math (Makefile.am): Substitute GNULIB_LDEXP, REPLACE_LDEXP.
8079         * modules/ldexp (Files): Add lib/ldexp.c.
8080         (Depends-on): Add math, isnand.
8081         (configure.ac): Set GL_COND_OBJ_LDEXP. Invoke gl_MATH_MODULE_INDICATOR.
8082         (Makefile.am): Conditionally compile ldexp.c.
8083         * modules/ldexpl (Files): Add lib/ldexp.c.
8084         * doc/posix-functions/ldexp.texi: Mention the OpenBSD bug.
8086 2023-08-19  Bruno Haible  <bruno@clisp.org>
8088         ldexpl: Relicense under LGPLv2+.
8089         * modules/ldexpl (License): Change to LGPLv2+.
8090         * lib/ldexpl.c: Update license notice.
8092 2023-08-19  Bruno Haible  <bruno@clisp.org>
8094         isnand: Relicense under LGPLv2+.
8095         * modules/isnand (License): Change to LGPLv2+.
8097 2023-08-19  Bruno Haible  <bruno@clisp.org>
8099         ldexpl: Avoid possible -Wshadow warning.
8100         * lib/ldexpl.c (exp): Locally rename to 'exponent'.
8102         ldexpl: Fix signed integer overflow.
8103         * lib/ldexpl.c (ldexpl): Use an 'unsigned int' variable to represent the
8104         absolute value of exp without overflow.
8106 2023-08-19  Bruno Haible  <bruno@clisp.org>
8108         logbl: Work around endless loop on OpenBSD 7.3/mips64.
8109         * m4/logbl.m4 (gl_FUNC_LOGBL_WORKS): Terminate the test program if it
8110         takes longer than 5 seconds.
8111         * doc/posix-functions/logbl.texi: Mention the OpenBSD bug.
8113 2023-08-18  Bruno Haible  <bruno@clisp.org>
8115         thrd: Work around thrd_join bug on AIX 7.3.1.
8116         * m4/threads_h.m4 (gl_THREADS_H): Test against AIX 7 thrd_join bug. Set
8117         BROKEN_THRD_JOIN.
8118         (gl_THREADS_H_DEFAULTS): Initialize BROKEN_THRD_JOIN.
8119         * m4/thrd.m4 (gl_FUNC_THRD_JOIN): Set REPLACE_THRD_* to 1 also if
8120         BROKEN_THRD_JOIN is 1. Define BROKEN_THRD_START_T_OR_JOIN instead of
8121         BROKEN_THRD_START_T.
8122         * modules/threads-h (Makefile.am): Substitute BROKEN_THRD_JOIN.
8123         * lib/threads.in.h (rpl_thrd_t, thrd_t): Define also if BROKEN_THRD_JOIN
8124         is 1.
8125         * lib/thrd.c: Test BROKEN_THRD_START_T_OR_JOIN instead of
8126         BROKEN_THRD_START_T.
8127         * doc/posix-functions/thrd_join.texi: Update.
8128         * doc/posix-functions/thrd_exit.texi: Likewise.
8130         thrd: Refactor.
8131         * m4/thrd.m4 (gl_FUNC_THRD_JOIN): Define BROKEN_THRD_JOIN_NULL, not
8132         BROKEN_THRD_JOIN. Rename gl_cv_func_thrd_join_works to
8133         gl_cv_func_thrd_join_null_works.
8134         * lib/thrd.c: Test BROKEN_THRD_JOIN_NULL instead of BROKEN_THRD_JOIN.
8136 2023-08-18  Bruno Haible  <bruno@clisp.org>
8138         thrd tests: Add unit test for thrd_exit.
8139         * tests/test-thrd_exit.c: New file, based on tests/test-thrd_create.c.
8140         * modules/thrd-tests (Files): Add it.
8141         (Makefile.am): Compile and run it.
8143         thrd: On AIX 7.1 and 7.2, override also thrd_exit.
8144         * lib/threads.in.h (thrd_exit): Consider REPLACE_THRD_EXIT.
8145         * lib/thrd.c (rpl_thrd_exit): New function.
8146         * m4/threads_h.m4 (gl_THREADS_H_DEFAULTS): Initialize REPLACE_THRD_EXIT.
8147         * m4/thrd.m4 (gl_FUNC_THRD_JOIN): Set also REPLACE_THRD_EXIT and adjust
8148         LIBSTDTHREAD.
8149         * modules/threads-h (Makefile.am): Substitute REPLACE_THRD_EXIT.
8150         * doc/posix-functions/thrd_exit.texi: Mention the AIX thrd_join problem
8151         also here.
8153 2023-08-18  Bruno Haible  <bruno@clisp.org>
8155         aligned_alloc: Fix test failure on AIX 7.3 with ibm-clang.
8156         * m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Use 'volatile', to
8157         disable optimization of ibm-clang -O2.
8158         * doc/posix-functions/aligned_alloc.texi: Update version info.
8160 2023-08-18  Bruno Haible  <bruno@clisp.org>
8162         sys_socket: Fix compilation errors in C++ mode on AIX 7.3 with gcc.
8163         * lib/sys_socket.in.h (accept, getpeername, getsockname, recvfrom):
8164         Disable _GL_CXXALIASWARN invocation on non-glibc systems.
8166 2023-08-18  Bruno Haible  <bruno@clisp.org>
8168         stddef: Don't unnecessarily override max_align_t on AIX 7.3 with gcc.
8169         * lib/stddef.in.h (max_align_t, GNULIB_defined_max_align_t): Don't
8170         define or override if HAVE_MAX_ALIGN_T is 1.
8172 2023-08-18  Bruno Haible  <bruno@clisp.org>
8174         uptime: Deprecate.
8175         Suggested by Paul Eggert in
8176         <https://lists.gnu.org/archive/html/bug-coreutils/2023-08/msg00070.html>.
8177         * modules/uptime (Status, Notice): New sections.
8179 2023-08-17  Bruno Haible  <bruno@clisp.org>
8181         Recognize the *-*-windows* config triplets introduced on 2023-06-26.
8182         * m4/*.m4: Treat windows* as equivalent to mingw*.
8183         * modules/*: Likewise.
8185 2023-08-16  Bruno Haible  <bruno@clisp.org>
8187         mbrtoc32-regular: Make it work as expected on glibc 2.12.
8188         * lib/mbrtoc32.c (mbrtoc32): If necessary, clear the mbstate_t after
8189         mbrtowc() returned.
8191 2023-08-16  Bruno Haible  <bruno@clisp.org>
8193         fnmatch: Override fnmatch from glibc versions < 2.22.
8194         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Force REPLACE_FNMATCH=1 in
8195         glibc versions < 2.22.
8197 2023-08-16  Bruno Haible  <bruno@clisp.org>
8199         tests: Avoid some test failures on Slackware 13.37.
8200         * tests/test-c32isalnum.c (main): Disable GB18030 tests on
8201         glibc 2.13..2.15.
8202         * tests/test-c32isalpha.c (main): Likewise.
8203         * tests/test-c32isblank.c (main): Likewise.
8204         * tests/test-c32iscntrl.c (main): Likewise.
8205         * tests/test-c32isdigit.c (main): Likewise.
8206         * tests/test-c32isgraph.c (main): Likewise.
8207         * tests/test-c32islower.c (main): Likewise.
8208         * tests/test-c32isprint.c (main): Likewise.
8209         * tests/test-c32ispunct.c (main): Likewise.
8210         * tests/test-c32isspace.c (main): Likewise.
8211         * tests/test-c32isupper.c (main): Likewise.
8212         * tests/test-c32isxdigit.c (main): Likewise.
8213         * tests/test-c32rtomb.c (main): Likewise.
8214         * tests/test-c32snrtombs.c (main): Likewise.
8215         * tests/test-c32srtombs.c (main): Likewise.
8216         * tests/test-c32stombs.c (main): Likewise.
8217         * tests/test-c32tolower.c (main): Likewise.
8218         * tests/test-c32toupper.c (main): Likewise.
8219         * tests/test-fnmatch.c (main): Likewise.
8220         * tests/test-mbrtoc16.c (main): Likewise.
8221         * tests/test-mbrtoc32.c (main): Likewise.
8222         * tests/test-mbsnrtoc32s.c (main): Likewise.
8223         * tests/test-mbsrtoc32s.c (main): Likewise.
8224         * tests/test-mbstoc32s.c (main): Likewise.
8226 2023-08-15  Bruno Haible  <bruno@clisp.org>
8228         readutmp tests: Add test against today's bug.
8229         * tests/test-readutmp.c (main): Verify that there is exactly one
8230         BOOT_TIME entry.
8232         readutmp: Fix for platforms without ut_type (regression 2023-08-08).
8233         * lib/readutmp.h (UT_TYPE_BOOT_TIME, UT_TYPE_USER_PROCESS): Don't use
8234         UT_TYPE_EQ macro.
8235         (IS_USER_PROCESS): Don't use UT_USER, UT_TYPE_NOT_DEFINED macros.
8236         * lib/readutmp.c (IS_USER_PROCESS): Don't override.
8238 2023-08-14  Bruno Haible  <bruno@clisp.org>
8240         readutmp, boot-time: Don't use __UT_* symbols (regression 2023-08-11).
8241         * lib/readutmp.h (_GL_UT_USER_SIZE, _GL_UT_ID_SIZE, _GL_UT_LINE_SIZE,
8242         _GL_UT_HOST_SIZE): New macros.
8243         (struct utmpx32): Use them.
8245 2023-08-14  Bruno Haible  <bruno@clisp.org>
8247         readutmp, boot-time: Fix build on 32-bit glibc (regression 2023-08-11).
8248         Reported by Andreas Schwab <schwab@suse.de> in
8249         <https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00125.html>.
8250         * lib/readutmp.h (struct utmpx32): Reference __UT_NAMESIZE, not
8251         __UT_USERSIZE.
8253 2023-08-13  Bruno Haible  <bruno@clisp.org>
8255         stdint: Fix configure test result with gcc 4.7 or 4.8.
8256         * m4/stdint.m4 (gl_STDINT_H): Don't assume that _Generic works with
8257         GCC versions < 4.9 with -std=gnu11.
8259 2023-08-13  Bruno Haible  <bruno@clisp.org>
8261         Fix some test module descriptions.
8262         * modules/boot-time-tests (Files): Add tests/macros.h.
8263         * modules/dprintf-gnu-tests (Files): Likewise.
8264         * modules/fclose-tests (Files): Likewise.
8265         * modules/getcwd-tests (Files): Likewise.
8266         * modules/lock-tests (Files): Likewise.
8267         * modules/nullptr-c++-tests (Files): Likewise.
8268         * modules/posix_spawn-tests (Files): Likewise.
8269         * modules/posix_spawnp-tests (Files): Likewise.
8270         * modules/readutmp-tests (Files): Likewise.
8271         * modules/sh-quote-tests (Files): Likewise.
8272         * modules/unigbrk/u16-grapheme-breaks-tests (Files): Likewise.
8273         * modules/unigbrk/u16-grapheme-next-tests (Files): Likewise.
8274         * modules/unigbrk/u16-grapheme-prev-tests (Files): Likewise.
8275         * modules/unigbrk/u32-grapheme-breaks-tests (Files): Likewise.
8276         * modules/unigbrk/u32-grapheme-next-tests (Files): Likewise.
8277         * modules/unigbrk/u32-grapheme-prev-tests (Files): Likewise.
8278         * modules/unigbrk/u8-grapheme-breaks-tests (Files): Likewise.
8279         * modules/unigbrk/u8-grapheme-next-tests (Files): Likewise.
8280         * modules/unigbrk/u8-grapheme-prev-tests (Files): Likewise.
8281         * modules/unigbrk/uc-grapheme-breaks-tests (Files): Likewise.
8283 2023-08-13  Bruno Haible  <bruno@clisp.org>
8285         nproc, physmem: Use sysctl() as a fallback on GNU/kFreeBSD.
8286         * lib/nproc.c: Do include <sys/sysctl.h> on GNU/kFreeBSD.
8287         (num_processors_ignoring_omp): Call sysctl on GNU/kFreeBSD.
8288         * lib/physmem.c: Do include <sys/sysctl.h> on GNU/kFreeBSD.
8289         (physmem_total, physmem_available): Call sysctl on GNU/kFreeBSD.
8291 2023-08-13  Bruno Haible  <bruno@clisp.org>
8293         physmem: Add tests.
8294         * tests/test-physmem.c: New file.
8295         * modules/physmem-tests: New file.
8297 2023-08-13  Bruno Haible  <bruno@clisp.org>
8299         readutmp, boot-time: Fix warning on glibc 2.30..2.31 on Linux.
8300         Reported by Pádraig Brady in
8301         <https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00110.html>.
8302         * lib/readutmp.c: Don't include <sys/sysctl.h> on glibc/Linux.
8303         * lib/boot-time.c: Likewise.
8305 2023-08-13  Paul Eggert  <eggert@cs.ucla.edu>
8307         fts: improve memory-allocation errno handling
8308         * lib/fts.c (fts_read, fts_build): When enter_dir or setup_dir
8309         fails, report its errno value back to the user.
8310         (internal_function): Preserve errno.
8311         * modules/fts (Depends-on): Add calloc-posix, free-posix,
8312         malloc-posix, and realloc-posix, for better errno handling
8313         on allocation failures.
8315         hash: set errno on failure
8316         * lib/hash.c: Include errno.h.
8317         (compute_bucket_size, hash_initialize, hash_rehash)
8318         (hash_insert_if_absent): Set errno reliably on failure.
8319         (hash_free): Preserve errno, like plain 'free'.
8320         * modules/hash (Depends-on): Depend on calloc-posix,
8321         free-posix, malloc-posix, so that errno is set reliably.
8323 2023-08-13  Bruno Haible  <bruno@clisp.org>
8325         readutmp, boot-time: Fix compilation error on old Android.
8326         Reported by Po Lu in
8327         <https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00108.html>.
8328         * lib/readutmp.h (BOOT_TIME): Add fallback.
8330 2023-08-13  Bruno Haible  <bruno@clisp.org>
8332         readutmp, boot-time: Fix compilation error on Android API 8.
8333         Reported by Po Lu in
8334         <https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00108.html>.
8335         * m4/readutmp.m4 (gl_PREREQ_READUTMP_H): Test whether sysinfo is
8336         declared.
8337         * lib/boot-time-aux.h (get_linux_uptime): Invoke sysinfo only if it is
8338         declared.
8339         * doc/glibc-functions/sysinfo.texi: Mention the Android problem.
8341 2023-08-13  Bruno Haible  <bruno@clisp.org>
8343         readutmp, boot-time: Fix compilation error on old Android.
8344         Reported by Po Lu in
8345         <https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00108.html>.
8346         * lib/readutmp.c (endutent): New fallback declaration, for Android.
8347         (getutent): Remove Ultrix workaround from 2000-04-05.
8348         * lib/boot-time.c: Likewise.
8349         * m4/readutmp.m4 (gl_PREREQ_READUTMP_H): Test whether endutent is
8350         declared, not getutent.
8351         * doc/glibc-functions/endutent.texi: Mention the Android bug.
8353 2023-08-12  Paul Eggert  <eggert@cs.ucla.edu>
8355         boot-time,readutmp: do not depend on c-strtod
8356         * lib/boot-time-aux.h (get_linux_uptime): Compute struct timespec
8357         using integer arithmetic rather than double.
8358         * lib/boot-time.c, lib/readutmp.c: Don’t include c-strtod.h.
8359         * modules/boot-time, modules/readutmp (Depends-on): Remove c-strtod.
8361         boot-time,readutmp: remove -lrt usage
8362         This code uses clock-relevant functions only on platforms
8363         that do not need -lrt.
8364         * m4/readutmp.m4 (gl_READUTMP): Do not require gl_CLOCK_TIME
8365         or add CLOCK_TIME_LIB to READUTMP_LIB.
8366         * modules/boot-time (Link): No need to link with CLOCK_TIME_LIB.
8368         boot-time,readutmp: do not depend on fopen-gnu
8369         These modules should work well enough even if fopen is not fixed
8370         to conform to fopen-gnu standards.  The only gotcha I can see is
8371         older fopen implementations that lack support for "e", and
8372         a potential O_CLOEXEC leak is not worth worrying about.
8373         * modules/boot-time (Depends-on):
8374         * modules/readutmp (Depends-on):
8375         Remove fopen-gnu.
8377         readutmp: do not depend on timespec_get
8378         boot-time code no longer needs it.
8379         * modules/readutmp (Depends-on): Remove timespec_get.
8381         boot-time: do not depend on timespec_get
8382         This is for Emacs, which does not use timespec_get now
8383         and which likes to minimize dependencies.
8384         Also, treat musl libc like recent glibc,
8385         and fix a timespec_get return value typo.
8386         * lib/boot-time-aux.h (get_linux_uptime):
8387         Assume musl libc supports CLOCK_BOOTTIME.
8388         (get_linux_boot_time_final_fallback):
8389         Likewise for musl libc and CLOCK_REALTIME.
8390         Do not rely on the timespec_get module, to break the dependency.
8391         Consider 0 to be a failure return from timespec_get.
8392         Fall back on gettimeofday if timespec_get does not exist.
8393         * modules/boot-time (Depends-on): Remove timespec_get.
8395 2023-08-12  Bruno Haible  <bruno@clisp.org>
8397         readutmp, boot-time: Fix parsing of /proc/uptime.
8398         * lib/boot-time-aux.h (get_linux_uptime): Use c_strtod, not strtod.
8399         * lib/readutmp.c: Include c-strtod.h.
8400         * lib/boot-time.c: Likewise.
8401         * modules/readutmp (Depends-on): Add c-strtod.
8402         * modules/boot-time (Depends-on): Likewise.
8404 2023-08-12  Bruno Haible  <bruno@clisp.org>
8406         readutmp: On Linux, don't fail if /var/run/utmp is not accessible.
8407         * lib/boot-time-aux.h (get_linux_boot_time_final_fallback): Don't test
8408         NEED_BOOT_TIME_FINAL_FALLBACK.
8409         * lib/boot-time.c (NEED_BOOT_TIME_FINAL_FALLBACK): Remove macro.
8410         * lib/readutmp.c (NEED_BOOT_TIME_FINAL_FALLBACK): Remove macro.
8411         (read_utmp_from_file): As a fallback on Linux, invoke
8412         get_linux_boot_time_final_fallback.
8413         (get_boot_time_uncached): Don't do it here.
8414         * m4/readutmp.m4 (gl_READUTMP): Add $CLOCK_TIME_LIB to READUTMP_LIB.
8416 2023-08-12  Bruno Haible  <bruno@clisp.org>
8418         readutmp, boot-time: On Haiku, return the boot time.
8419         * m4/readutmp.m4 (gl_PREREQ_READUTMP_H): Test whether <OS.h> exists.
8420         * lib/boot-time-aux.h (get_haiku_boot_time,
8421         get_haiku_boot_time_final_fallback): New functions.
8422         * lib/readutmp.c: Include <OS.h>.
8423         (read_utmp_from_file): If opening UTMP_FILE fails, continue processing
8424         instead of failing. Invoke get_haiku_boot_time and
8425         get_haiku_boot_time_final_fallback.
8426         * lib/boot-time.c: Include <OS.h>.
8427         (get_boot_time_uncached): Invoke get_haiku_boot_time and
8428         get_haiku_boot_time_final_fallback.
8430 2023-08-12  Bruno Haible  <bruno@clisp.org>
8432         readutmp: Reduce code duplication.
8433         * lib/readutmp.c (have_boot_time): New function.
8434         (read_utmp_from_file): Invoke it, instead of duplicating the same loop.
8436 2023-08-12  Paul Eggert  <eggert@cs.ucla.edu>
8438         c-file-type: new module
8439         * lib/c-file-type.c: New file, containing all of the
8440         old file-type except for the gettext call.
8441         * lib/file-type.c (_): Remove; no longer used.
8442         (file_type): Call c_file_type for most of the work.
8443         * modules/c-file-type: New module.
8444         * modules/file-type (Depends-on): Add c-file-type.
8446 2023-08-12  Bruno Haible  <bruno@clisp.org>
8448         readutmp, boot-time: Use the BSD sysctl as fallback.
8449         * m4/readutmp.m4 (gl_PREREQ_READUTMP_H): Test for <sys/param.h>,
8450         <sys/sysctl.h>, sysctl.
8451         * lib/boot-time-aux.h (get_bsd_boot_time_final_fallback): New function.
8452         * lib/readutmp.c: Include <sys/param.h> and <sys/sysctl.h>.
8453         (read_utmp_from_file): Invoke get_bsd_boot_time_final_fallback as a
8454         fallback.
8455         * lib/boot-time.c: Include <sys/param.h> and <sys/sysctl.h>.
8456         (get_boot_time_uncached): Invoke get_bsd_boot_time_final_fallback as a
8457         fallback.
8459 2023-08-12  Bruno Haible  <bruno@clisp.org>
8461         readutmp: Fix compilation error on OpenBSD (regression 2023-08-11).
8462         * lib/readutmp.c (read_utmp_from_file): Remove extraneous 'break'
8463         statement.
8465 2023-08-11  Bruno Haible  <bruno@clisp.org>
8467         boot-time: Add comment about multithread-safety.
8468         * lib/boot-time.h (get_boot_time): Add comment, same as in readutmp.h.
8470 2023-08-11  Bruno Haible  <bruno@clisp.org>
8472         boot-time: Simplify execution.
8473         * lib/boot-time.c: Include <stdio.h>, <string.h>, <sys/types.h>,
8474         <sys/stat.h>, <sys/sysinfo.h>, <time.h>, stat-time.h, unlocked-io.h,
8475         boot-time-aux.h.
8476         (UT_USER): New macro, from lib/readutmp.c.
8477         (getutent): New declaration.
8478         (get_boot_time_uncached): New function, containing a simplified code
8479         from lib/readutmp.c.
8480         (get_boot_time): Don't invoke read_utmp. Instead, invoke
8481         get_boot_time_uncached and cache the result.
8482         * modules/boot-time (Files): Add lib/boot-time-aux.h, lib/readutmp.h,
8483         m4/readutmp.m4.
8484         (Depends-on): Remove readutmp. Add extensions, fopen-gnu, stat-time,
8485         stdbool, time-h, timespec_get, unlocked-io-internal.
8486         (configure.ac): Invoke gl_PREREQ_READUTMP_H.
8487         (Link): Remove $(READUTMP_LIB). Add $(CLOCK_TIME_LIB).
8488         * modules/boot-time-tests (Makefile.am): Link test-boot-time with
8489         $(CLOCK_TIME_LIB), not with $(READUTMP_LIB).
8491 2023-08-11  Bruno Haible  <bruno@clisp.org>
8493         readutmp: Refactor boot time determination code.
8494         * lib/boot-time-aux.h: New file, extracted from lib/readutmp.c.
8495         * lib/readutmp.c: On Linux, include <sys/sysinfo.h> even if
8496         !READUTMP_USE_SYSTEMD.
8497         Include boot-time-aux.h.
8498         (SIZEOF): Remove macro, moved to boot-time-aux.h.
8499         (get_linux_uptime): Remove function, moved to boot-time-aux.h.
8500         (read_utmp_from_file): Invoke get_linux_boot_time_fallback,
8501         get_android_boot_time, get_openbsd_boot_time, get_windows_boot_time.
8502         Code moved to boot-time-aux.h.
8503         (get_boot_time_uncached: Invoke get_linux_boot_time_final_fallback.
8504         Code moved to boot-time-aux.h.
8505         * m4/readutmp.m4 (gl_PREREQ_READUTMP_H): New macro, extracted from
8506         gl_READUTMP.
8507         (gl_READUTMP): Invoke it.
8508         * modules/readutmp (Files): Add lib/boot-time-aux.h.
8510 2023-08-11  Bruno Haible  <bruno@clisp.org>
8512         readutmp: Make 'struct utmpx32' usable by other code.
8513         * lib/readutmp.h (struct utmpx32): Moved to here from lib/readutmp.c.
8514         (UTMP_STRUCT_NAME): Define as utmpx32 if needed.
8515         * lib/readutmp.c (read_utmp_from_file): Simply use UTMP_STRUCT_NAME.
8517 2023-08-11  Bruno Haible  <bruno@clisp.org>
8519         readutmp tests: Fix link error.
8520         * modules/readutmp-tests (Makefile.am): Link test-readutmp with
8521         $(LIBINTL).
8523 2023-08-11  Bruno Haible  <bruno@clisp.org>
8525         readutmp: Fix the boot time returned on Minix.
8526         * lib/readutmp.c (read_utmp_from_file): [__minix] When the time of the
8527         BOOT_TIME entry is very close to the Epoch, replace it with the time
8528         from the "run-level m" entry.
8530 2023-08-11  Bruno Haible  <bruno@clisp.org>
8532         readutmp: On Cygwin and Windows, return the boot time.
8533         * lib/readutmp.h (READ_UTMP_SUPPORTED): Define also on native Windows.
8534         * lib/readutmp.c (desirable_utmp_entry): Ignore READ_UTMP_CHECK_PIDS on
8535         Windows.
8536         (read_utmp_from_file): Add a BOOT_TIME entry on Windows.
8538 2023-08-11  Bruno Haible  <bruno@clisp.org>
8540         clock-time: On mingw, avoid buggy clock_gettime from libwinpthread.
8541         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_CANONICAL_HOST. On
8542         native Windows, avoid using clock_getres clock_gettime clock_settime
8543         from mingw's libwinpthread.
8544         * doc/posix-functions/clock_gettime.texi: Mention the mingw bug.
8546 2023-08-10  Bruno Haible  <bruno@clisp.org>
8548         readutmp: Make the header file includable from C++.
8549         * lib/readutmp.h: Add extern "C" block.
8551 2023-08-10  Bruno Haible  <bruno@clisp.org>
8553         readutmp: Tweak the Android specific addition.
8554         * lib/readutmp.c (read_utmp_from_file) [__ANDROID__]: Don't fake a
8555         BOOT_TIME entry if the options request to omit it or if a BOOT_TIME
8556         entry is already present.
8558 2023-08-10  Bruno Haible  <bruno@clisp.org>
8560         readutmp: Fix the boot time returned on Raspbian.
8561         * lib/readutmp.c (read_utmp_from_file): When the time of the BOOT_TIME
8562         entry is very close to the Epoch, replace it with the time from the
8563         "runlevel"/"~" entry.
8565 2023-08-10  Bruno Haible  <bruno@clisp.org>
8567         boot-time: Add tests.
8568         * tests/test-boot-time.c: New file.
8569         * modules/boot-time-tests: New file.
8571         boot-time: New module.
8572         * lib/boot-time.h: New file.
8573         * lib/boot-time.c: New file.
8574         * modules/boot-time: New file.
8576 2023-08-10  Bruno Haible  <bruno@clisp.org>
8578         readutmp: Return a boot time also on Android.
8579         * lib/readutmp.c (get_linux_uptime): New function, extracted from
8580         get_boot_time_uncached.
8581         (read_utmp_from_file): Don't look for file time stamps on Android.
8582         Instead, use get_linux_uptime.
8583         (get_boot_time_uncached): Use get_linux_uptime.
8585 2023-08-09  Bruno Haible  <bruno@clisp.org>
8587         readutmp: Fix a mistake (regression 2023-08-08).
8588         * lib/readutmp.c (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED): Fix a typo.
8590         readutmp: Return a boot time also on OpenBSD.
8591         * lib/readutmp.h (BOOT_TIME, USER_PROCESS): Provide fallback
8592         definitions.
8593         * lib/readutmp.c (read_utmp_from_file) [__OpenBSD__]: Fake a BOOT_TIME
8594         entry by looking at the time stamp of a specific file.
8596         readutmp: Return a boot time also on Alpine Linux.
8597         * lib/readutmp.c: Include stat-time.h.
8598         (SIZEOF): New macro.
8599         (read_utmp_from_file) [__linux__]: Fake a BOOT_TIME entry by looking
8600         at the time stamp of a specific file.
8601         * modules/readutmp (Depends-on): Add stat-time.
8603         readutmp: Fix boot time in VMs after sleep state and date update.
8604         * lib/readutmp.c (read_utmp_from_file): New function, extracted from
8605         read_utmp.
8606         (get_boot_time_uncached): Before all other approaches, try to find the
8607         boot time in the /var/run/utmp file.
8608         (read_utmp): Invoke read_utmp_from_file.
8610         readutmp: Make it easier to filter for/against the boot-time entry.
8611         * lib/readutmp.h (READ_UTMP_BOOT_TIME, READ_UTMP_NO_BOOT_TIME): New
8612         enum items.
8613         * lib/readutmp.c (desirable_utmp_entry, read_utmp_from_systemd):
8614         Implement them.
8615         (read_utmp): If no entries can match the given options, return
8616         immediately.
8618 2023-08-08  Paul Eggert  <eggert@cs.ucla.edu>
8620         readutmp: omit pragma
8621         * lib/readutmp.c: Omit -Wstringop-overread pragma.
8622         It’s no longer needed now that extract_trimmed_name
8623         no longer calls strnlen.
8625 2023-08-08  Bruno Haible  <bruno@clisp.org>
8627         readutmp: Use classical implementation for files != /var/run/utmp.
8628         * lib/readutmp.c (read_utmp_from_systemd): Renamed from read_utmp
8629         [READUTMP_USE_SYSTEMD]. Remove file argument.
8630         (read_utmp): Call it when the file argument is "/var/run/utmp".
8632 2023-08-08  Bruno Haible  <bruno@clisp.org>
8634         readutmp: Get the boot time with higher precision.
8635         Suggested by Thorsten Kukuk <kukuk@suse.com> in
8636         <https://github.com/thkukuk/utmpx/blob/main/utmp-to-logind.md#determine-boot-time>.
8637         * lib/readutmp.c (get_boot_time_uncached): Try clock_gettime first.
8639 2023-08-08  Bruno Haible  <bruno@clisp.org>
8641         readutmp: Add comment about multithread-safety.
8642         * lib/readutmp.h (read_utmp): Add comment.
8644 2023-08-08  Bruno Haible  <bruno@clisp.org>
8646         readutmp: Return entries with unbounded strings on all platforms.
8647         Suggested  by Paul Eggert in
8648         <https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00165.html>.
8649         * m4/readutmp.m4 (gl_READUTMP): Test also whether struct utmp has an
8650         ut_tv member, and whether struct utmp and struct utmpx have an
8651         ut_session member.
8652         * lib/readutmp.h (struct gl_utmp): Define always. Add ut_exit field.
8653         (HAVE_GL_UTMP): Remove macro.
8654         (UT_USER, UT_TIME_MEMBER, UT_PID, UT_TYPE_EQ, UT_TYPE_NOT_DEFINED,
8655         UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT, STRUCT_UTMP): Define w.r.t.
8656         struct gl_utmp.
8657         (UT_USER_SIZE, UT_ID_SIZE, UT_LINE_SIZE, UT_HOST_SIZE): Define to -1
8658         always.
8659         (getutent): Remove declaration.
8660         (HAVE_STRUCT_XTMP_UT_EXIT): Remove unused macro.
8661         (HAVE_STRUCT_XTMP_UT_ID, HAVE_STRUCT_XTMP_UT_PID,
8662         HAVE_STRUCT_XTMP_UT_HOST): Change to match the way coreutils uses these
8663         macros.
8664         * lib/readutmp.c (UT_USER, UT_TIME_MEMBER, UT_PID, UT_TYPE_EQ,
8665         UT_TYPE_NOT_DEFINED, IS_USER_PROCESS, UT_EXIT_E_TERMINATION,
8666         UT_EXIT_E_EXIT, UT_USER_SIZE, UT_ID_SIZE, UT_LINE_SIZE, UT_HOST_SIZE):
8667         Define w.r.t. struct utmpx or struct utmp.
8668         (extract_trimmed_name): Don't use UT_USER or UT_USER_SIZE here.
8669         (desirable_utmp_entry): Don't use UT_TIME_MEMBER or UT_USER here.
8670         (struct utmp_alloc): Define always.
8671         (add_utmp): Likewise. Add user_len, id_len, line_len, host_len,
8672         termination, exit arguments. Don't require that user, id, line, host are
8673         NUL-terminated. Assume user and host are non-NULL.
8674         (finish_utmp): New function, extracted from read_utmp.
8675         (read_utmp) [READUTMP_USE_SYSTEMD]: Update add_utmp invocations. Pass a
8676         non-NULL user and a non-NULL host. Call finish_utmp.
8677         (getutent): Move declaration from readutmp.h to here.
8678         (copy_utmp_entry): Remove function.
8679         (read_utmp) [UTMP_NAME_FUNCTION]: Replace variables n_read, n_alloc,
8680         utmp with a 'struct utmp_alloc'. Use 'struct utmpx32' from
8681         copy_utmp_entry here. Invoke add_utmp and finish_utmp.
8682         (read_utmp) [!UTMP_NAME_FUNCTION]: Replace variables n_read, n_alloc,
8683         utmp with a 'struct utmp_alloc'. Invoke add_utmp and finish_utmp.
8684         * NEWS: Mention the API change.
8686 2023-08-08  Bruno Haible  <bruno@clisp.org>
8688         readutmp: Fix compilation error on OpenBSD and AIX (regr. 2023-08-03).
8689         * lib/readutmp.h (UT_TIME_MEMBER) [HAVE_UTMP_H]: Revert last change.
8691 2023-08-08  Bruno Haible  <bruno@clisp.org>
8693         readutmp: Fix compilation error on OpenBSD (regr. 2023-08-02).
8694         * lib/readutmp.h (UT_ID_SIZE): Define to a dummy if there is no ut_id
8695         field.
8697 2023-08-07  Paul Eggert  <eggert@cs.ucla.edu>
8699         quotearg: fix obsolete comment
8700         * lib/quotearg.h: Fix comment to match behavior.
8701         This fixes a commentary bug introduced in
8702         commit 1a43a982c927eaf26bbc2701a872009d9be4b33b
8703         "quotearg: do not use grave accent for left quote"
8704         dated 2011-12-18 15:44:17+01, where the comment
8705         was not updated to match the changed behavior.
8707 2023-08-06  Paul Eggert  <eggert@cs.ucla.edu>
8709         readutmp: fix comment bug ID
8710         * lib/readutmp.c: Fix comment (thanks to Bruno Haible).
8712         doc: Document lack of printf "%n" on Android, OpenBSD.
8713         * doc/posix/functions/*printf.texi: Document that the POSIX-specified
8714         printf functions do not support the %n format on Android and OpenBSD.
8715         This lack of support is deliberate, as %n is a common target of attacks
8716         on security.
8718 2023-08-05  Paul Eggert  <eggert@cs.ucla.edu>
8720         readutmp: anticipate Y2038 hack for utmp
8721         * lib/readutmp.c (struct utmpx32): Use unsigned int for tv_sec,
8722         not int, as that is more likely to work after 2038.
8723         Suggested by Andreas Schwab in:
8724         https://sourceware.org/pipermail/libc-alpha/2023-August/150661.html
8726         diffseq: simplify lint removal
8727         * lib/diffseq.h (IF_LINT): Remove.
8728         Instead, always ignore the diagnostic, as that’s simpler
8729         now that we have the pragma change installed in May.
8730         This removes the last IF_LINT from diffutils, though not
8731         the last use of GCC_LINT.
8733 2023-08-04  Bruno Haible  <bruno@clisp.org>
8735         unistr/{u8-mbtouc,u8-mbsnlen}: Fix test failures (regr. 2023-07-25).
8736         * modules/unistr/u8-mbtouc (configure.ac): Compile this code if the
8737         preinstalled libunistring version is >= 0.9.4, < 1.2.
8738         * modules/unistr/u8-mbsnlen (configure.ac): Likewise.
8740         unistr/*-pcpy: Fix compilation errors (regression 2023-07-21).
8741         * modules/unistr/base (configure.ac): Generate unistr.h if the
8742         preinstalled libunistring version is >= 0.9.11, < 1.2.
8744 2023-08-04  Bruno Haible  <bruno@clisp.org>
8746         readutmp: In systemd mode, fix the ut_host contents (regr. yesterday).
8747         * lib/readutmp.c (add_utmp): Fix ut_host contents.
8748         * tests/test-readutmp.c (main): Show also the contents of the ut_host
8749         field.
8751 2023-08-04  Bruno Haible  <bruno@clisp.org>
8753         readutmp: Ensure multithread-safety.
8754         * lib/readutmp.c (get_boot_time): Initialize 'cached' after 'boot_time',
8755         not before. Also declare both as volatile.
8757 2023-08-04  Bruno Haible  <bruno@clisp.org>
8759         readutmp tests: Fix gcc warning (regression from yesterday).
8760         * tests/test-readutmp.c: Include idx.h.
8761         (main): Use idx_t instead of size_t.
8763 2023-08-03  Paul Eggert  <eggert@cs.ucla.edu>
8765         readutmp: systemd supports only UTMP_FILE
8766         * lib/readutmp.c (read_utmp): Fail if not UTMP_FILE.
8767         * m4/systemd.m4 (gl_SYSTEMD_CHOICE): Default to no for now,
8768         since yes means "who /var/log/wtmp" stops working.
8770         readutmp: switch new struct to struct timespec
8771         * lib/readutmp.c (get_boot_time_uncached, get_boot_time)
8772         (add_utmp, read_utmp):
8773         Use struct timespec, not struct timeval.
8774         * lib/readutmp.h: Always include <time.h>, for struct timespec.
8775         Simplify when utmp.h and utmpx.h are included.
8776         (struct gl_utmp): Use the same struct for both the
8777         systemd and the dummy version.  Reorder members, and
8778         use proper pid_t type for ut_session.  Rename ut_tv to ut_ts
8779         and make it a struct timespec.  All uses changed.
8780         (HAVE_GL_UTMP): New macro.  Use it where appropriate, instead
8781         of READUTMP_USE_SYSTEMD.
8782         (UT_USER, HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID)
8783         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_HOST):
8784         Simplify.
8785         * modules/readutmp (Depends-on): Add time-h, timespec_get.
8786         Remove sys_type.  Sort.
8788         readutmp: fix # indentation
8789         * lib/readutmp.h: Change # indentation to standard Gnulib style.
8791         readutmp: pacify -Wstrict-prototypes
8792         * lib/readutmp.c (get_boot_time_uncached, get_boot_time):
8793         Pacify gcc 13 -Wstrict-prototypes.
8795         readutmp: fix idx_t FIXME in API
8796         * lib/readutmp.c (read_utmp): 2nd arg is now idx_t *, not
8797         size_t *.
8798         * lib/readutmp.h: Include idx.h, for idx_t.
8799         * modules/readutmp (Depends-on): Add idx.
8801         readutmp: go back to simple ‘free’
8802         Omit the new free_utmp function.  Instead, allocate storage
8803         in one block, so that using code can still just call ‘free’.
8804         * lib/readutmp.c (struct utmp_alloc) [READUTMP_USE_SYSTEMD]: New type.
8805         (add_utmp) [READUTMP_USE_SYSTEMD]: New function.
8806         (read_utmp) [READUTMP_USE_SYSTEMD]: Use it.
8807         Also, use malloc a bit less heavily.
8808         (free_utmp): Remove.
8809         * tests/test-readutmp.c (main): Call free, not free_utmp.
8811         readutmp: simplify extract_trimmed_name via ximemdup0
8812         * lib/readutmp.c (extract_trimmed_name): Simplify.
8813         * modules/readutmp (Depends-on):
8814         Add strnlen, which was a missing dependency.
8816 2023-08-03  Bruno Haible  <bruno@clisp.org>
8818         alignasof, stdalign: Avoid some -Wundef warnings from config.h.
8819         Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
8820         <https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00012.html>.
8821         * m4/stdalign.m4 (gl_ALIGNASOF): Test whether __cplusplus is defined
8822         before evaluating it. Assume HAVE_STDALIGN_H, _GL_STDALIGN_NEEDS_STDDEF
8823         are never defined to 0.
8825 2023-08-03  Bruno Haible  <bruno@clisp.org>
8827         doc: More platform detail.
8828         * doc/posix-functions/fnmatch.texi: Mention Solaris OpenIndiana here,
8829         since it behaves differently than Solaris 11.4.
8831 2023-08-03  Bruno Haible  <bruno@clisp.org>
8833         doc: Add references to FreeBSD bugs.
8834         * doc/posix-functions/fnmatch.texi: Add commented reference to FreeBSD
8835         bug.
8836         * doc/posix-functions/wcscmp.texi: Likewise.
8837         * doc/posix-functions/wcsncmp.texi: Likewise.
8839 2023-08-02  Bruno Haible  <bruno@clisp.org>
8841         readutmp: In systemd mode, put the X11 display into the ut_host field.
8842         * lib/readutmp.c (read_utmp): In sessions of type "x11", use the X11
8843         display as host.
8845 2023-08-02  Bruno Haible  <bruno@clisp.org>
8847         readutmp: Small change to reduce the code size on the coreutils side.
8848         * lib/readutmp.h (UT_ID_SIZE): New constant and macro.
8850 2023-08-01  Bruno Haible  <bruno@clisp.org>
8852         readutmp: Small changes to reduce the code size on the coreutils side.
8853         * m4/readutmp.m4 (gl_READUTMP): Test also for the ut_host field in
8854         'struct utmpx' and 'struct utmp'.
8855         * lib/readutmp.h (HAVE_STRUCT_XTMP_UT_HOST): New macro.
8856         (UT_USER_SIZE): Define also as a macro. Set to -1 if
8857         READUTMP_USE_SYSTEMD.
8858         (UT_LINE_SIZE, UT_HOST_SIZE): New constants and macros.
8860 2023-08-01  Bruno Haible  <bruno@clisp.org>
8862         readutmp: For year-2038 safety on Linux/{x86,arm}, use systemd APIs.
8863         Suggested by Thorsten Kukuk <kukuk@suse.com> in
8864         <https://www.thkukuk.de/blog/Y2038_glibc_utmp_64bit/> and
8865         <https://github.com/thkukuk/utmpx/blob/main/utmp-to-logind.md>.
8866         * m4/systemd.m4: New file.
8867         * m4/readutmp.m4 (gl_READUTMP): Require gl_SYSTEMD_CHOICE. Set
8868         READUTMP_LIB. Conditionally define READUTMP_USE_SYSTEMD.
8869         * lib/readutmp.h: For READUTMP_USE_SYSTEMD, include <sys/time.h> and
8870         <utmpx.h>.
8871         (struct gl_utmp): New type.
8872         (UTMP_STRUCT_NAME, UT_TIME_MEMBER, UT_EXIT_E_TERMINATION,
8873         UT_EXIT_E_EXIT, UT_USER, HAVE_STRUCT_XTMP_UT_EXIT,
8874         HAVE_STRUCT_XTMP_UT_ID, HAVE_STRUCT_XTMP_UT_PID): Define differently for
8875         READUTMP_USE_SYSTEMD.
8876         (UT_USER_SIZE): Don't define for READUTMP_USE_SYSTEMD.
8877         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, READ_UTMP_SUPPORTED): Define also for
8878         READUTMP_USE_SYSTEMD.
8879         (free_utmp): New declaration.
8880         * lib/readutmp.c: Add new includes for READUTMP_USE_SYSTEMD.
8881         (extract_trimmed_name): Adapt to READUTMP_USE_SYSTEMD.
8882         (get_boot_time_uncached, get_boot_time, guess_pty_name): New functions.
8883         (read_utmp): New implementation for READUTMP_USE_SYSTEMD.
8884         (free_utmp): New function.
8885         * tests/test-readutmp.c (main): At the end, invoke free_utmp.
8886         * modules/readutmp (Files): Add m4/systemd.m4.
8887         (Link): New section.
8888         * modules/readutmp-tests (Makefile.am): Link test-readutmp with
8889         READUTMP_LIB.
8890         * NEWS: Mention the free_utmp function and the READUTMP_LIB link
8891         requirement.
8893 2023-08-01  Bruno Haible  <bruno@clisp.org>
8895         readutmp: Trivial simplification.
8896         * lib/readutmp.c (extract_trimmed_name): Use constant UT_USER_SIZE.
8898 2023-07-31  Bruno Haible  <bruno@clisp.org>
8900         readutmp tests: Show also the ut_line field.
8901         * tests/test-readutmp.c (main): Add a "Device" column to the table.
8902         Adjust the column widths. Flush stdout before possibly calling abort().
8904 2023-07-31  Bruno Haible  <bruno@clisp.org>
8906         readutmp: Fix test failure on OpenBSD.
8907         * lib/readutmp.c (desirable_utmp_entry): On OpenBSD, eliminate entirely
8908         empty entries.
8910 2023-07-31  Bruno Haible  <bruno@clisp.org>
8912         readutmp: Revisit portability.
8913         * m4/readutmp.m4 (gl_READUTMP): Don't test for struct utmp.ut_exit.ut_*,
8914         since no platform has these.
8915         * lib/readutmp.h (UT_EXIT_E_TERMINATION): Don't test
8916         HAVE_STRUCT_UTMP_UT_EXIT_UT_TERMINATION.
8917         (UT_EXIT_E_EXIT): Don't test HAVE_STRUCT_UTMP_UT_EXIT_UT_EXIT.
8918         * doc/posix-headers/utmpx.texi: Update platforms list. Mention
8919         portability problems of specific 'struct utmpx' fields.
8920         * doc/glibc-headers/utmp.texi: Update platforms list. Mention
8921         portability problems of specific 'struct utmp' fields.
8923 2023-07-31  Bruno Haible  <bruno@clisp.org>
8925         readutmp: Make argument names consistent.
8926         * lib/readutmp.h (UT_TIME_MEMBER, UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT,
8927         UT_USER, UT_PID, UT_TYPE_EQ, UT_TYPE_BOOT_TIME, UT_TYPE_USER_PROCESS,
8928         IS_USER_PROCESS): Rename parameter to 'UT'.
8929         * lib/readutmp.c (desirable_utmp_entry, read_utmp): Rename local
8930         variable 'u' to 'ut'.
8932 2023-07-31  Bruno Haible  <bruno@clisp.org>
8934         readutmp: Make the header file and function usable on all platforms.
8935         * lib/readutmp.h (struct gl_utmp, UTMP_STRUCT_NAME, UT_TIME_MEMBER,
8936         UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT, UT_USER): Provide fallback
8937         definitions.
8938         (READ_UTMP_SUPPORTED): New macro.
8939         * lib/readutmp.c (read_utmp) [!READ_UTMP_SUPPORTED]: Provide a dummy
8940         definition.
8941         * modules/readutmp (Depends-on): Add sys_time.
8942         (configure.ac): Remove conditional.
8943         (Makefile.am): Compile readutmp.c on all platforms.
8944         (Include): Include readutmp.h on all platforms.
8945         * tests/test-readutmp.c: Include readutmp.h on all platforms.
8946         (main): Invoke read_utmp on all platforms.
8948 2023-07-30  Bruno Haible  <bruno@clisp.org>
8950         readutmp: Add tests.
8951         * tests/test-readutmp.c: New file.
8952         * modules/readutmp-tests: New file.
8954         readutmp: Improve comments. Fix module description.
8955         * lib/readutmp.h (extract_trimmed_name): Add specification comment.
8956         (read_utmp): Move specification comment from lib/readutmp.c to here.
8957         Mention also UTMP_FILE and READ_UTMP_USER_PROCESS.
8958         * lib/readutmp.c (extract_trimmed_name): Fix comment.
8959         * modules/readutmp (Include): Only include the .h file if
8960         HAVE_UTMPX_H || HAVE_UTMP_H.
8962 2023-07-29  Paul Eggert  <eggert@cs.ucla.edu>
8964         readutmp: work around glibc utmpx bug
8965         When compiled with _TIME_BITS=64, glibc <utmpx.h> does not work,
8966         because the files use 32-bit time_t and the code passes this to
8967         the user unmodified, but <utmpx.h> defines a struct with 64-bit
8968         time_t.  Work around this compatibility bug.
8969         * lib/readutmp.c (copy_utmp_entry): New function.
8970         (read_utmp): Use it.
8972 2023-07-29  Bruno Haible  <bruno@clisp.org>
8974         wcsrtombs tests: Renumber tests.
8975         * tests/test-wcsrtombs*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5.
8976         * tests/test-wcsrtombs.c: Update.
8977         * modules/wcsrtombs-tests: Update.
8979         wcsnrtombs tests: Renumber tests.
8980         * tests/test-wcsnrtombs*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5.
8981         * tests/test-wcsnrtombs.c: Update.
8982         * modules/wcsnrtombs-tests: Update.
8984         wcrtomb tests: Renumber tests.
8985         * tests/test-wcrtomb.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
8986         * tests/test-wcrtomb.c: Update.
8987         * tests/test-wcrtomb-w32-*.sh: Renamed 1 -> 2 -> 3 -> 5 -> 7 -> 4 -> 6
8988         -> 8.
8989         * tests/test-wcrtomb-w32.c: Update.
8990         * modules/wcrtomb-tests: Update.
8992         mbstoc32s tests: Renumber tests.
8993         * tests/test-mbstoc32s-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
8994         * tests/test-mbstoc32s.c: Update.
8996         mbsrtoc32s tests: Renumber tests.
8997         * tests/test-mbsrtoc32s-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
8998         * tests/test-mbsrtoc32s.c: Update.
9000         mbsnrtoc32s tests: Renumber tests.
9001         * tests/test-mbsnrtoc32s-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
9002         * tests/test-mbsnrtoc32s.c: Update.
9004         mbstowcs tests: Renumber tests.
9005         * tests/test-mbstowcs*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
9006         * tests/test-mbstowcs.c: Update.
9007         * modules/mbstowcs-tests: Update.
9009         mbsrtowcs tests: Renumber tests.
9010         * tests/test-mbsrtowcs*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
9011         * tests/test-mbsrtowcs.c: Update.
9012         * modules/mbsrtowcs-tests: Update.
9014         mbsnrtowcs tests: Renumber tests.
9015         * tests/test-mbsnrtowcs*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
9016         * tests/test-mbsnrtowcs.c: Update.
9017         * modules/mbsnrtowcs-tests: Update.
9019         mbrtoc16 tests: Renumber tests.
9020         * tests/test-mbrtoc16-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
9021         * tests/test-mbrtoc16.c: Update.
9022         * tests/test-mbrtoc16-w32-*.sh: Renamed 1 -> 2 -> 3 -> 5 -> 7 -> 4 -> 6
9023         -> 8.
9024         * tests/test-mbrtoc16-w32.c: Update.
9025         * modules/mbrtoc16-tests: Update.
9027         mbrtoc32 tests: Renumber tests.
9028         * tests/test-mbrtoc32-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
9029         * tests/test-mbrtoc32.c: Update.
9030         * tests/test-mbrtoc32-w32-*.sh: Renamed 1 -> 2 -> 3 -> 5 -> 7 -> 4 -> 6
9031         -> 8.
9032         * tests/test-mbrtoc32-w32.c: Update.
9033         * modules/mbrtoc32-tests: Update.
9035         mbrtowc tests: Renumber tests.
9036         * tests/test-mbrtowc*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
9037         * tests/test-mbrtowc.c: Update.
9038         * tests/test-mbrtowc-w32-*.sh: Renamed 1 -> 2 -> 3 -> 5 -> 7 -> 4 -> 6
9039         -> 8.
9040         * tests/test-mbrtowc-w32.c: Update.
9041         * modules/mbrtowc-tests: Update.
9043         mbrlen tests: Renumber tests.
9044         * tests/test-mbrlen*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
9045         * tests/test-mbrlen.c: Update.
9046         * tests/test-mbrlen-w32-*.sh: Renamed 1 -> 2 -> 3 -> 5 -> 7 -> 4 -> 6
9047         -> 8.
9048         * tests/test-mbrlen-w32.c: Update.
9049         * modules/mbrlen-tests: Update.
9051         mbmemcasecoll tests: Renumber tests.
9052         * tests/test-mbmemcasecoll*.sh: Renamed 1 -> 2 -> 3 -> 4.
9053         * tests/test-mbmemcasecoll.c: Update.
9054         * modules/mbmemcasecoll-tests: Update.
9056         mbmemcasecmp tests: Renumber tests.
9057         * tests/test-mbmemcasecmp*.sh: Renamed 1 -> 2 -> 3 -> 4.
9058         * tests/test-mbmemcasecmp.c: Update.
9059         * modules/mbmemcasecmp-tests: Update.
9061         fnmatch tests: Renumber tests.
9062         * tests/test-fnmatch-w32-*.sh: Renamed 1 -> 2 -> 3 -> 5 -> 7 -> 4 -> 6
9063         -> 8.
9064         * tests/test-fnmatch-w32.c: Update.
9065         * modules/fnmatch-tests: Update.
9067         c32stombs tests: Renumber tests.
9068         * tests/test-c32stombs-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5.
9069         * tests/test-c32stombs.c: Update.
9070         * modules/c32stombs-tests: Update.
9072         c32srtombs tests: Renumber tests.
9073         * tests/test-c32srtombs-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5.
9074         * tests/test-c32srtombs.c: Update.
9075         * modules/c32srtombs-tests: Update.
9077         c32snrtombs tests: Renumber tests.
9078         * tests/test-c32snrtombs-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5.
9079         * tests/test-c32snrtombs.c: Update.
9080         * modules/c32snrtombs-tests: Update.
9082         c32rtomb tests: Renumber tests.
9083         * tests/test-c32rtomb.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
9084         * tests/test-c32rtomb.c: Update.
9085         * tests/test-c32rtomb-w32-*.sh: Renamed 1 -> 2 -> 3 -> 5 -> 7 -> 4 -> 6
9086         -> 8.
9087         * tests/test-c32rtomb-w32.c: Update.
9088         * modules/c32rtomb-tests: Update.
9090         btoc32 tests: Renumber tests.
9091         * tests/test-btoc32-*.sh: Renamed 1 -> 2 -> 3 -> 1.
9092         * tests/test-btoc32.c: Update.
9094         btowc tests: Renumber tests.
9095         * tests/test-btowc*.sh: Renamed 1 -> 2 -> 3 -> 1.
9096         * tests/test-btowc.c: Update.
9097         * modules/btowc-tests: Update.
9099 2023-07-29  Bruno Haible  <bruno@clisp.org>
9101         time-h: Simplify after 2017-05-01 change.
9102         * m4/time_h.m4 (gl_TIME_H_DEFAULTS): Don't provide a default value for
9103         GNULIB_GETTIMEOFDAY.
9105         time-h: Obey GNULIB_POSIXCHECK, not GNULIB_PORTCHECK.
9106         * lib/time.in.h (timespec_get, timespec_getres, time, nanosleep, tzset,
9107         mktime, localtime_r, gmtime_r, localtime, strptime, ctime, strftime,
9108         timegm): Add _GL_WARN_ON_USE invocation.
9109         (asctime, ctime): Don't assume that these functions are declared, since
9110         POSIX obsoletes them.
9111         * m4/time_h.m4 (gl_TIME_H): Test for the declarations of asctime, ctime,
9112         gmtime_r, localtime, localtime_r, mktime, nanosleep, strftime, strptime,
9113         time, timegm, timespec_get, timespec_getres, tzset.
9114         (gl_TIME_H_DEFAULTS): Initialize REPLACE_CTIME, REPLACE_LOCALTIME_R,
9115         REPLACE_MKTIME, REPLACE_NANOSLEEP, REPLACE_STRFTIME, REPLACE_TIMEGM,
9116         REPLACE_TIMESPEC_GET, REPLACE_TZSET with 0 instead of GNULIB_PORTCHECK.
9117         * m4/ctime.m4 (gl_FUNC_CTIME): Don't re-initialize REPLACE_CTIME.
9118         * m4/time_r.m4 (gl_TIME_R): Don't re-initialize REPLACE_LOCALTIME_R.
9119         * m4/mktime.m4 (gl_FUNC_MKTIME): Don't re-initialize REPLACE_MKTIME.
9120         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Don't re-initialize
9121         REPLACE_NANOSLEEP.
9122         * m4/strftime-fixes.m4 (gl_FUNC_STRFTIME): Don't re-initialize
9123         REPLACE_STRFTIME.
9124         * m4/timegm.m4 (gl_FUNC_TIMEGM): Don't re-initialize REPLACE_TIMEGM.
9125         * m4/timespec_get.m4 (gl_FUNC_TIMESPEC_GET): Don't re-initialize
9126         REPLACE_TIMESPEC_GET.
9127         * m4/tzset.m4 (gl_FUNC_TZSET: Don't re-initialize REPLACE_TZSET.
9129 2023-07-28  Bruno Haible  <bruno@clisp.org>
9131         fnmatch: Ensure that on Cygwin ≥ 3.5.0, Cygwin's native fnmatch is used.
9132         Tested by Corinna Vinschen in
9133         <https://cygwin.com/pipermail/cygwin/2023-July/254036.html>.
9134         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): On Cygwin, don't force
9135         REPLACE_FNMATCH to 1 just because wchar_t is small.
9137 2023-07-28  Bruno Haible  <bruno@clisp.org>
9139         posixcheck: Fix dependencies.
9140         * modules/posixcheck (Depends-on): Add malloc-h, pthread-h, sched,
9141         sys_random, threads-h, uchar, utmp.
9143 2023-07-28  Bruno Haible  <bruno@clisp.org>
9145         uchar: Include the necessary snippets.
9146         * lib/uchar.in.h: Add insertion points for _GL_ARG_NONNULL and
9147         _GL_WARN_ON_USE.
9148         * modules/uchar (Depends-on): Add snippet/arg-nonnull,
9149         snippet/warn-on-use.
9150         (Makefile.am): In uchar.h, include the ARG_NONNULL_H and WARN_ON_USE_H
9151         snippets.
9153 2023-07-28  Bruno Haible  <bruno@clisp.org>
9155         mbmemcasecmp, mbmemcasecoll: Avoid test failure on MSVC.
9156         * tests/test-mbmemcasecmp.h (test_utf_8): Disable two tests on platforms
9157         that don't have the upper/lower mappings for 'ü'/'Ü'.
9158         * tests/test-mbmemcasecmp.c: Include <wchar.h>, <wctype.h>.
9159         * tests/test-mbmemcasecoll.c: Likewise.
9160         * modules/mbmemcasecmp-tests (Depends-on): Add mbrtowc, wctype-h.
9161         * modules/mbmemcasecoll-tests (Depends-on): Likewise.
9163 2023-07-27  Bruno Haible  <bruno@clisp.org>
9165         gnulib-tool: Include ftruncate in testdirs.
9166         * gnulib-tool (func_create_testdir): Don't exclude module 'ftruncate'
9167         from testdirs by default.
9168         * pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
9170 2023-07-27  Bruno Haible  <bruno@clisp.org>
9172         fnmatch-h, glob-h tests: Fix link errors (regression 2023-07-24).
9173         * modules/fnmatch-h-c++-tests (Makefile.am): Link test-fnmatch-h-c++
9174         with $(LIBUNISTRING).
9175         * modules/glob-h-c++-tests (Makefile.am): Link test-glob-h-c++ with
9176         $(LIBUNISTRING).
9178         fnmatch, glob tests: Fix link errors (regression 2023-07-24).
9179         * modules/fnmatch-tests (Makefile.am): Link test-fnmatch-w32 with the
9180         same libraries as test-fnmatch.
9181         * modules/glob (Link): Add $(LIBUNISTRING).
9182         * modules/glob-tests (Makefile.am): Link test-glob with $(LIBUNISTRING).
9184 2023-07-26  Bruno Haible  <bruno@clisp.org>
9186         wctrans: Work around bug on NetBSD.
9187         * lib/wctype.in.h (rpl_wctrans_t, wctrans_t, GNULIB_defined_wctrans_t):
9188         Define if REPLACE_WCTRANS is 1.
9189         (wctrans): Consider REPLACE_WCTRANS.
9190         (towctrans): Override if REPLACE_WCTRANS is 1.
9191         * m4/wctype_h.m4 (gl_WCTYPE_H_DEFAULTS): Initialize REPLACE_WCTRANS.
9192         * m4/wctrans.m4 (gl_FUNC_WCTRANS): Define through AC_DEFUN_ONCE. Test
9193         whether wctrans supports the "tolower" character mapping. Set
9194         REPLACE_WCTRANS if not.
9195         * m4/towctrans.m4 (gl_FUNC_TOWCTRANS): Require gl_FUNC_WCTRANS.
9196         * modules/wctrans (Depends-on): Add towctrans.
9197         (configure.ac): Consider REPLACE_WCTRANS.
9198         * modules/towctrans (Files): Add m4/wctrans.m4.
9199         (configure.ac): Override also if REPLACE_WCTRANS is 1.
9200         * modules/wctype-h (Makefile.am): Substitute REPLACE_WCTRANS.
9201         * doc/posix-functions/wctrans.texi: Mention the NetBSD bug.
9203 2023-07-26  Bruno Haible  <bruno@clisp.org>
9205         towctrans: Add tests.
9206         * tests/test-towctrans.c: New file, based on
9207         tests/test-c32_apply_mapping.c.
9208         * modules/towctrans-tests: New file.
9210         wctrans: Add tests.
9211         * tests/test-wctrans.c: New file, based on tests/test-c32_get_mapping.c.
9212         * modules/wctrans-tests: New file.
9214 2023-07-26  Bruno Haible  <bruno@clisp.org>
9216         fnmatch: Update dependencies.
9217         * modules/fnmatch (Depends-on): Add wctype.
9219 2023-07-26  Bruno Haible  <bruno@clisp.org>
9221         wctype: Work around wctype+iswctype bug on MSVC.
9222         * m4/wctype.m4 (gl_FUNC_WCTYPE): In the test program, test also for the
9223         MSVC bug. Update cross-compilation guess.
9224         * doc/posix-functions/wctype.texi: Mention the MSVC bug.
9226 2023-07-26  Bruno Haible  <bruno@clisp.org>
9228         wctype: Work around wctype bug on mingw.
9229         * lib/wctype.in.h (rpl_wctype_t, wctype_t, GNULIB_defined_wctype_t):
9230         Define if REPLACE_WCTYPE is 1.
9231         (wctype): Consider REPLACE_WCTYPE.
9232         (iswctype): Override also if REPLACE_WCTYPE is 1.
9233         * lib/iswctype.c: If GNULIB_defined_wctype_t is defined, use the
9234         function-pointer based implementation.
9235         * m4/wctype_h.m4 (gl_WCTYPE_H_DEFAULTS): Initialize REPLACE_WCTYPE.
9236         * m4/wctype.m4 (gl_FUNC_WCTYPE): Define through AC_DEFUN_ONCE. Test
9237         whether wctype supports the "blank" character class. Set REPLACE_WCTYPE
9238         if not.
9239         * m4/iswctype.m4 (gl_FUNC_ISWCTYPE): Require gl_FUNC_WCTYPE.
9240         * modules/wctype (Status, Notice): Remove.
9241         (Depends-on): Add iswctype. Consider REPLACE_WCTYPE.
9242         (configure.ac): Consider REPLACE_WCTYPE.
9243         * modules/iswctype (Status, Notice): Remove.
9244         (Files): Add m4/wctype.m4.
9245         (configure.ac): Override also if REPLACE_WCTYPE is 1.
9246         * modules/wctype-h (Makefile.am): Substitute REPLACE_WCTYPE.
9247         * doc/posix-functions/wctype.texi: Mention the mingw bug.
9249 2023-07-26  Bruno Haible  <bruno@clisp.org>
9251         wctype-h: Work around iswprint bug on mingw.
9252         * lib/wctype.in.h (rpl_iswprint): On mingw, don't use the system's
9253         iswprint function.
9254         * tests/test-wctype-h.c (main): Verify that this character class
9255         contains the ASCII space but not tab and newline.
9256         * tests/test-c32isprint.c (main): For tab, \v, \f, expect the same value
9257         on native Windows as on other platforms.
9258         * doc/posix-functions/iswprint.texi: Mention the mingw bug.
9260 2023-07-26  Bruno Haible  <bruno@clisp.org>
9262         iswblank tests: Add more tests.
9263         * tests/test-iswblank.c (main): Verify that this character class
9264         contains the ASCII space and tab, but not newline.
9266 2023-07-26  Bruno Haible  <bruno@clisp.org>
9268         wctype, wctrans: Require a non-NULL argument.
9269         * lib/wctype.in.h: Add placeholder for definition of _GL_ARG_NONNULL.
9270         (wctype, wctrans): Mark with _GL_ARG_NONNULL ((1)).
9271         * modules/wctype-h (Depends-on): Add snippet/arg-nonnull.
9272         (Makefile.am): Substitute $(ARG_NONNULL_H) into wctype.h.
9274 2023-07-25  Bruno Haible  <bruno@clisp.org>
9276         iswctype: Add tests.
9277         * tests/test-iswctype.c: New file, based on
9278         tests/test-c32_apply_type_test.c.
9279         * tests/test-c32_apply_type_test.c (main): Update accordingly.
9280         * modules/iswctype-tests: New file.
9282         wctype: Add tests.
9283         * tests/test-wctype.c: New file, based on
9284         tests/test-c32_get_type_test.c.
9285         * modules/wctype-tests: New file.
9287 2023-07-25  Bruno Haible  <bruno@clisp.org>
9289         Compile benchmark programs without assertions.
9290         * modules/mbiter-bench-tests (Makefile.am): Compile bench-mbiter with
9291         -DNDEBUG.
9292         * modules/mbiterf-bench-tests (Makefile.am): Compile bench-mbiterf with
9293         -DNDEBUG.
9294         * modules/mbuiter-bench-tests (Makefile.am): Compile bench-mbuiter with
9295         -DNDEBUG.
9296         * modules/mbuiterf-bench-tests (Makefile.am): Compile bench-mbuiterf
9297         with -DNDEBUG.
9298         * modules/mbswidth-bench-tests (Makefile.am): Compile bench-mbswidth
9299         with -DNDEBUG.
9300         * modules/crypto/md5-buffer-tests (Makefile.am): Compile bench-md5 with
9301         -DNDEBUG.
9302         * modules/crypto/sha1-buffer-tests (Makefile.am): Compile bench-sha1
9303         with -DNDEBUG.
9304         * modules/crypto/sha256-buffer-tests (Makefile.am): Compile bench-sha224
9305         and bench-sha256 with -DNDEBUG.
9306         * modules/crypto/sha512-buffer-tests (Makefile.am): Compile bench-sha384
9307         and bench-sha512 with -DNDEBUG.
9309 2023-07-25  Bruno Haible  <bruno@clisp.org>
9311         unistr/u8-*: Make Unicode decoder more Unicode Standard compliant.
9312         Based on a remark by Paul Eggert in
9313         <https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00120.html>.
9314         * tests/unistr/test-u8-mbtouc.c (test_safe_function): Change expected
9315         results for "non-shortest form" or out-of-range byte sequences. Add new
9316         test cases of incomplete well-formed byte sequences.
9317         * tests/unistr/test-u8-mbsnlen.c (main): Likewise.
9318         * lib/unistr/u8-mbtouc-aux.c (u8_mbtouc_aux): Reject a first byte in the
9319         range 0xF5..0xF7 as invalid. Distinguish incomplete from invalid byte
9320         sequences correctly. For the former, return only the number of bytes in
9321         the maximal well-formed subpart.
9322         * lib/unistr/u8-mbtouc.c (u8_mbtouc): Likewise.
9323         * lib/unistr/u8-check.c (u8_check): Reject a first byte in the range
9324         0xF5..0xF7 as invalid.
9325         * lib/unistr/u8-mblen.c (u8_mblen): Likewise.
9326         * lib/unistr/u8-mbtoucr.c (u8_mbtoucr): Likewise.
9327         * lib/unistr/u8-strmbtouc.c (u8_strmbtouc): Likewise.
9328         * lib/unistr/u8-strmblen.c (u8_strmblen): Likewise.
9329         * lib/unistr/u8-prev.c (u8_prev): Likewise.
9331 2023-07-24  Bruno Haible  <bruno@clisp.org>
9333         fnmatch: Overcome wchar_t limitations.
9334         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Set REPLACE_FNMATCH to 1 on
9335         AIX in 32-bit mode.
9336         * lib/fnmatch.c: Include <uchar.h>. Conditionally include unistr.h.
9337         (UCHAR_TO_WCHAR): Renamed from BTOWC.
9338         (WCHAR_T, WINT_T, BTOWC, MBSRTOWCS, WCSLEN, WCSCAT, WMEMPCPY, WMEMCHR,
9339         TOWLOWER, WCTYPE_T, WCTYPE, ISWCTYPE): New macros.
9340         (IS_CHAR_CLASS): Use WCTYPE instead of wctype.
9341         (UCHAR_TO_WCHAR): Use BTOWC instead of btowc.
9342         (FOLD): Use TOWLOWER instead of towlower.
9343         (CHAR): Use WCHAR_T instead of wchar_t.
9344         (UCHAR, INT): Use WINT_T instead of wint_t.
9345         (STRLEN): Use WCSLEN instead of wcslen.
9346         (STRCAT): Use WCSCAT instead of wcscat.
9347         (MEMPCPY): Use WMEMPCPY instead of wmempcpy.
9348         (MEMCHR): Use WMEMCHR instead of wmemchr.
9349         (is_char_class): Use WCTYPE_T instead of wctype_t, WCHAR_T instead of
9350         wchar_t, WCTYPE instead of wctype.
9351         (fnmatch): Use WCHAR_T instead of wchar_t, MBSRTOWCS instead of
9352         mbsrtowcs.
9353         * lib/fnmatch_loop.c (FCT): Use WCTYPE_T instead of wctype_t, ISWCTYPE
9354         instead of iswctype. Update for renamed BTOWC.
9355         * modules/fnmatch (Depends-on): Add btoc32, c32tolower,
9356         c32_get_type_test, c32_apply_type_test, mbsrtoc32s, unistr/u32-chr,
9357         unistr/u32-pcpy, unistr/u32-strcat, unistr/u32-strlen.
9358         (Link): Add $(LIBUNISTRING).
9359         * modules/fnmatch-tests (Makefile.am): Link test-fnmatch with
9360         $(LIBUNISTRING).
9361         * doc/posix-functions/fnmatch.texi: Move the Cygwin, mingw, MSVC, AIX
9362         bug descriptions to the "fixed by Gnulib" section.
9364 2023-07-24  Bruno Haible  <bruno@clisp.org>
9366         fnmatch: Update doc regarding Solaris 10.
9367         * doc/posix-functions/fnmatch.texi: Move the Solaris 10 bug description
9368         to the "fixed by Gnulib" section.
9370 2023-07-23  Paul Eggert  <eggert@cs.ucla.edu>
9372         timespec_get: port to Ubuntu 23.04
9373         * m4/timespec_get.m4 (gl_FUNC_TIMESPEC_GET):
9374         Default REPLACE_TIMESPEC_GET to 0, fixing a typo.
9376 2023-07-23  Bruno Haible  <bruno@clisp.org>
9378         unistr/u32-strcat: Relicense under LGPLv2+.
9379         * modules/unistr/u32-strcat (License): Change to LGPLv2+.
9380         * lib/unistr/u32-strcat.c: Update license notice.
9381         * lib/unistr/u-strcat.h: Likewise.
9383 2023-07-23  Bruno Haible  <bruno@clisp.org>
9385         unistr/u32-strlen: Relicense under LGPLv2+.
9386         * modules/unistr/u32-strlen (License): Change to LGPLv2+.
9387         * lib/unistr/u32-strlen.c: Update license notice.
9389 2023-07-23  Bruno Haible  <bruno@clisp.org>
9391         unistr/u32-chr: Relicense under LGPLv2+.
9392         * modules/unistr/u32-chr (License): Change to LGPLv2+.
9393         * lib/unistr/u32-chr.c: Update license notice.
9395 2023-07-23  Paul Eggert  <eggert@cs.ucla.edu>
9397         utimecmp: clean up old spare1 cruft
9398         * lib/utimecmp.c: Remove a ‘defined HAVE_STRUCT_STAT_ST_SPARE1’
9399         that has been false since 2007.
9401 2023-07-23  Bruno Haible  <bruno@clisp.org>
9403         fnmatch tests: Avoid a test failure on FreeBSD.
9404         * tests/test-fnmatch.c (main): In a GB18030 locale, test the towupper()
9405         mapping of 'ö', not of 'ü'.
9407 2023-07-23  Bruno Haible  <bruno@clisp.org>
9409         fnmatch: Work around bugs on FreeBSD, NetBSD, Solaris, Cygwin, Android.
9410         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Add three more test cases to
9411         the test program. Reorganize its return values.
9412         * tests/test-fnmatch.c (main): Reflect the changes done in fnmatch.m4.
9413         * doc/posix-functions/fnmatch.texi: Move the corresponding bug
9414         descriptions to the "fixed by Gnulib" section.
9416 2023-07-23  Bruno Haible  <bruno@clisp.org>
9418         fnmatch, fnmatch-gnu: Document known bugs.
9419         * doc/posix-headers/fnmatch.texi: Mention the macros FNM_LEADING_DIR,
9420         FNM_CASEFOLD, FNM_EXTMATCH, FNM_FILE_NAME.
9421         * doc/posix-functions/fnmatch.texi: Reference the glibc documentation
9422         and the Linux man page. Document the effects of the two modules and all
9423         the known bugs in detail.
9425 2023-07-22  Bruno Haible  <bruno@clisp.org>
9427         fnmatch tests: Add many more test cases.
9428         * lib/fnmatch.in.h (GNULIB_defined_fnmatch_function): New macro.
9429         * tests/test-fnmatch.c: Add many more test cases.
9430         * tests/test-fnmatch-1.sh: New file, based on tests/test-mbrtoc32-5.sh.
9431         * tests/test-fnmatch-2.sh: New file, based on tests/test-mbrtoc32-1.sh.
9432         * tests/test-fnmatch-3.sh: New file, based on tests/test-mbrtoc32-2.sh.
9433         * tests/test-fnmatch-4.sh: New file, based on tests/test-mbrtoc32-3.sh.
9434         * tests/test-fnmatch-5.sh: New file, based on tests/test-mbrtoc32-4.sh.
9435         * tests/test-fnmatch-w32.c: New file, based on tests/test-mbrtoc32-w32.c
9436         and tests/test-fnmatch.c.
9437         * tests/test-fnmatch-w32-1.sh: New file, based on
9438         tests/test-mbrtoc32-w32-1.sh.
9439         * tests/test-fnmatch-w32-2.sh: New file, based on
9440         tests/test-mbrtoc32-w32-2.sh.
9441         * tests/test-fnmatch-w32-3.sh: New file, based on
9442         tests/test-mbrtoc32-w32-3.sh.
9443         * tests/test-fnmatch-w32-4.sh: New file, based on
9444         tests/test-mbrtoc32-w32-4.sh.
9445         * tests/test-fnmatch-w32-5.sh: New file, based on
9446         tests/test-mbrtoc32-w32-5.sh.
9447         * tests/test-fnmatch-w32-6.sh: New file, based on
9448         tests/test-mbrtoc32-w32-6.sh.
9449         * tests/test-fnmatch-w32-7.sh: New file, based on
9450         tests/test-mbrtoc32-w32-7.sh.
9451         * modules/fnmatch-tests: Add the new program and shell scripts.
9453 2023-07-22  Bruno Haible  <bruno@clisp.org>
9455         doc: Mention a wctype bug.
9456         * doc/posix-functions/wctype.texi: Mention a bug on mingw.
9458 2023-07-21  Bruno Haible  <bruno@clisp.org>
9460         unistr/u8-pcpy, unistr/u16-pcpy, unistr/u32-pcpy: Add tests.
9461         * tests/unistr/test-pcpy.h: New file, based on tests/unistr/test-cpy.h.
9462         * tests/unistr/test-u8-pcpy.c: New file, based on
9463         tests/unistr/test-u8-cpy.c.
9464         * tests/unistr/test-u16-pcpy.c: New file, based on
9465         tests/unistr/test-u16-cpy.c.
9466         * tests/unistr/test-u32-pcpy.c: New file, based on
9467         tests/unistr/test-u32-cpy.c.
9468         * modules/unistr/u8-pcpy-tests: New file, based on
9469         modules/unistr/u8-cpy-tests.
9470         * modules/unistr/u16-pcpy-tests: New file, based on
9471         modules/unistr/u16-cpy-tests.
9472         * modules/unistr/u32-pcpy-tests: New file, based on
9473         modules/unistr/u32-cpy-tests.
9475         unistr/u8-pcpy, unistr/u16-pcpy, unistr/u32-pcpy: New modules.
9476         * lib/unistr.in.h (u8_pcpy, u16_pcpy, u32_pcpy): New declarations.
9477         * lib/unistr/u-pcpy.h: New file, based on lib/wmempcpy.c.
9478         * lib/unistr/u8-pcpy.c: New file, based on lib/unistr/u8-cpy.c.
9479         * lib/unistr/u16-pcpy.c: New file, based on lib/unistr/u16-cpy.c.
9480         * lib/unistr/u32-pcpy.c: New file, based on lib/unistr/u32-cpy.c.
9481         * modules/unistr/u8-pcpy: New file, based on modules/unistr/u8-cpy.
9482         * modules/unistr/u16-pcpy: New file, based on modules/unistr/u16-cpy.
9483         * modules/unistr/u32-pcpy: New file, based on modules/unistr/u32-cpy.
9485 2023-07-20  Bruno Haible  <bruno@clisp.org>
9487         error-h: Fix dependencies.
9488         Reported by <cbh34680@gmail.com> in
9489         <https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00111.html>.
9490         * modules/error-h (Depends-on): Add include_next.
9492 2023-07-20  Pádraig Brady  <P@draigBrady.com>
9494         fts: fix compilation errors with fts_cross_check()
9495         * lib/fts.c: Fix printf format chars.
9496         * lib/fts_.h: Provide a declaration for users.
9498 2023-07-19  Bruno Haible  <bruno@clisp.org>
9500         Document migration path for obsolescent functions.
9501         * doc/glibc-functions/timespec_get.texi: Add reference to ISO C.
9502         * doc/posix-functions/_tolower.texi: Recommend use of tolower.
9503         * doc/posix-functions/_toupper.texi: Recommend use of toupper.
9504         * doc/posix-functions/asctime.texi: Recommend use of strftime.
9505         * doc/posix-functions/asctime_r.texi: Likewise.
9506         * doc/posix-functions/ctime.texi: Recommend use of localtime_r and
9507         strftime.
9508         * doc/posix-functions/ctime_r.texi: Likewise.
9509         * doc/posix-functions/ftw.texi: Recommend use of fts.
9510         * doc/posix-functions/getitimer.texi: Recommend use of timer_gettime.
9511         * doc/posix-functions/gets.texi: Recommend use of fgets.
9512         * doc/posix-functions/gettimeofday.texi: Recommend use of gettime or
9513         timespec_get.
9514         * doc/posix-functions/inet_addr.texi: Recommend use of inet_pton.
9515         * doc/posix-functions/inet_ntoa.texi: Recommend use of inet_ntop.
9516         * doc/posix-functions/pthread_getconcurrency.texi: Recommend no-op.
9517         * doc/posix-functions/pthread_setconcurrency.texi: Recommend no-op.
9518         * doc/posix-functions/rand_r.texi: Recommend use of random_r.
9519         * doc/posix-functions/setitimer.texi: Recommend use of timer_create and
9520         timer_settime.
9521         * doc/posix-functions/setpgrp.texi: Recommend use of setpgid or setsid.
9522         * doc/posix-functions/sighold.texi: Recommend use of sigprocmask.
9523         * doc/posix-functions/sigignore.texi: Recommend use of sigaction.
9524         * doc/posix-functions/siginterrupt.texi: Recommend use of sigaction.
9525         * doc/posix-functions/sigpause.texi: Recommend use of sigsuspend.
9526         * doc/posix-functions/sigrelse.texi: Recommend use of sigprocmask.
9527         * doc/posix-functions/sigset.texi: Recommend use of sigaction.
9528         * doc/posix-functions/tempnam.texi: Recommend use of mkstemp.
9529         * doc/posix-functions/ulimit.texi: Recommend use of getrlimit and
9530         setrlimit.
9531         * doc/posix-functions/utime.texi: Recommend use of utimens.
9533 2023-07-19  Paul Eggert  <eggert@cs.ucla.edu>
9535         Document POSIX obsolescence
9536         * doc/posix-functions/_longjmp.texi, doc/posix-functions/_setjmp.texi:
9537         * doc/posix-functions/_tolower.texi, doc/posix-functions/_toupper.texi:
9538         * doc/posix-functions/asctime.texi, doc/posix-functions/asctime_r.texi:
9539         * doc/posix-functions/ctime.texi, doc/posix-functions/ctime_r.texi:
9540         * doc/posix-functions/encrypt.texi, doc/posix-functions/ftw.texi:
9541         * doc/posix-functions/getitimer.texi, doc/posix-functions/gets.texi:
9542         * doc/posix-functions/gettimeofday.texi:
9543         * doc/posix-functions/inet_addr.texi:
9544         * doc/posix-functions/inet_ntoa.texi, doc/posix-functions/isascii.texi:
9545         * doc/posix-functions/pthread_getconcurrency.texi:
9546         * doc/posix-functions/pthread_setconcurrency.texi:
9547         * doc/posix-functions/rand_r.texi, doc/posix-functions/setitimer.texi:
9548         * doc/posix-functions/setkey.texi, doc/posix-functions/setpgrp.texi:
9549         * doc/posix-functions/sighold.texi, doc/posix-functions/sigignore.texi:
9550         * doc/posix-functions/siginterrupt.texi:
9551         * doc/posix-functions/sigpause.texi, doc/posix-functions/sigrelse.texi:
9552         * doc/posix-functions/sigset.texi, doc/posix-functions/tempnam.texi:
9553         * doc/posix-functions/toascii.texi, doc/posix-functions/ulimit.texi:
9554         * doc/posix-functions/utime.texi:
9555         Update as per draft 3 of POSIX 10003.1-202x.
9557 2023-07-19  Paul Eggert  <eggert@cs.ucla.edu>
9559         Don’t worry about Version 7 tolower
9560         Some code ported back to pre-C89 libraries where tolower (C) had
9561         undefined behavior if C is not an upper case character.
9562         Nowadays that function is _tolower which is itself obsolete,
9563         and much Gnulib code already assumes this part of C89 anyway.
9564         Assume C89 or better tolower, which simplifies the code
9565         and should improve performance slightly.
9566         * lib/mbmemcasecmp.c, lib/mbmemcasecoll.c, lib/mbscasecmp.c:
9567         * lib/mbscasestr.c, lib/mbsncasecmp.c, lib/mbspcasecmp.c:
9568         * lib/strcasecmp.c, lib/strcasestr.c, lib/strncasecmp.c:
9569         (TOLOWER): Remove.  All uses replaced by tolower.
9571 2023-07-19  Bruno Haible  <bruno@clisp.org>
9573         c32swidth, mbszero: Fix file list.
9574         * modules/c32swidth (Files): Add locale-ja.m4, locale-zh.m4, codeset.m4.
9575         * modules/mbszero (Files): Likewise.
9577 2023-07-19  Bruno Haible  <bruno@clisp.org>
9579         wcsnrtombs: Fix file list.
9580         * modules/wcsnrtombs (Files): Add locale-fr.m4.
9582 2023-07-19  Bruno Haible  <bruno@clisp.org>
9584         mbsnrtowcs: Fix file list.
9585         * modules/mbsnrtowcs (Files): Add locale-fr.m4, codeset.m4.
9587 2023-07-19  Bruno Haible  <bruno@clisp.org>
9589         mbrtoc16: Fix file list.
9590         * modules/mbrtoc16 (Files): Add locale-zh.m4.
9592 2023-07-19  Bruno Haible  <bruno@clisp.org>
9594         mbrlen: Fix file list.
9595         * modules/mbrlen (Files): Add locale-fr.m4, locale-ja.m4, locale-zh.m4,
9596         codeset.m4.
9598 2023-07-18  Paul Eggert  <eggert@cs.ucla.edu>
9600         mbiterf, mbuiterf: port to strict C17
9601         I ran into this problem on NetBSD 9.3.
9602         * lib/mbiterf.h (mbiterf_next) [!GNULIB_MBRTOC32_REGULAR]:
9603         * lib/mbuiterf.h (mbuiterf_next) [!GNULIB_MBRTOC32_REGULAR]:
9604         Don’t label a declaration.
9606 2023-07-18  Bruno Haible  <bruno@clisp.org>
9608         mbiter, mbiterf, mbuiter, mbuiterf: Force inlining with clang.
9609         * lib/mbiter.h (MBITER_INLINE): Use _GL_ATTRIBUTE_ALWAYS_INLINE.
9610         * lib/mbiterf.h (MBITERF_INLINE): Likewise.
9611         * lib/mbuiter.h (MBUITER_INLINE): Likewise.
9612         * lib/mbuiterf.h (MBUITERF_INLINE): Likewise.
9614 2023-07-18  Bruno Haible  <bruno@clisp.org>
9616         mbsspn: Optimize.
9617         * lib/mbsspn.c: Include mbuiterf.h instead of mbuiter.h.
9618         (mbsspn): Use mbuif_* macros instead of mbui_* macros.
9619         * modules/mbsspn (Depends-on): Add mbuiterf. Remove mbuiter.
9621         mbscspn: Optimize.
9622         * lib/mbscspn.c: Include mbuiterf.h instead of mbuiter.h.
9623         (mbscspn): Use mbuif_* macros instead of mbui_* macros.
9624         * modules/mbscspn (Depends-on): Add mbuiterf. Remove mbuiter.
9626         mbspbrk: Optimize.
9627         * lib/mbspbrk.c: Include mbuiterf.h instead of mbuiter.h.
9628         (mbspbrk): Use mbuif_* macros instead of mbui_* macros.
9629         * modules/mbspbrk (Depends-on): Add mbuiterf. Remove mbuiter.
9631         mbspcasecmp: Optimize.
9632         * lib/mbspcasecmp.c: Include mbuiterf.h instead of mbuiter.h.
9633         (mbspcasecmp): Use mbuif_* macros instead of mbui_* macros.
9634         * modules/mbspcasecmp (Depends-on): Add mbuiterf. Remove mbuiter.
9636         mbsncasecmp: Optimize.
9637         * lib/mbsncasecmp.c: Include mbuiterf.h instead of mbuiter.h.
9638         (mbsncasecmp): Use mbuif_* macros instead of mbui_* macros.
9639         * modules/mbsncasecmp (Depends-on): Add mbuiterf. Remove mbuiter.
9641         mbscasecmp: Optimize.
9642         * lib/mbscasecmp.c: Include mbuiterf.h instead of mbuiter.h.
9643         (mbscasecmp): Use mbuif_* macros instead of mbui_* macros.
9644         * modules/mbscasecmp (Depends-on): Add mbuiterf. Remove mbuiter.
9646         mbssep: Optimize.
9647         * lib/mbssep.c: Include mbuiterf.h instead of mbuiter.h.
9648         (mbssep): Use mbuif_* macros instead of mbui_* macros.
9649         * modules/mbssep (Depends-on): Add mbuiterf. Remove mbuiter.
9651         mbsrchr: Optimize.
9652         * lib/mbsrchr.c: Include mbuiterf.h instead of mbuiter.h.
9653         (mbsrchr): Use mbuif_* macros instead of mbui_* macros.
9654         * modules/mbsrchr (Depends-on): Add mbuiterf. Remove mbuiter.
9656         mbschr: Optimize.
9657         * lib/mbschr.c: Include mbuiterf.h instead of mbuiter.h.
9658         (mbschr): Use mbuif_* macros instead of mbui_* macros.
9659         * modules/mbschr (Depends-on): Add mbuiterf. Remove mbuiter.
9661         mbslen: Optimize.
9662         * lib/mbslen.c: Include mbuiterf.h instead of mbuiter.h.
9663         (mbslen): Use mbuif_* macros instead of mbui_* macros.
9664         * modules/mbslen (Depends-on): Add mbuiterf. Remove mbuiter.
9666         mbuiterf: Add a benchmark.
9667         * tests/bench-mbuiterf.c: New file, based on tests/bench-mbuiter.c.
9668         * modules/mbuiterf-bench-tests: New file, based on
9669         modules/mbuiter-bench-tests.
9671         mbuiterf: New module.
9672         * lib/mbuiterf.h: New file, based on lib/mbuiter.h.
9673         * lib/mbuiterf.c: New file, based on lib/mbuiter.c.
9674         * modules/mbuiterf: New file, based on modules/mbuiter.
9676 2023-07-18  Bruno Haible  <bruno@clisp.org>
9678         mbiterf: Fix compiler warnings.
9679         * lib/mbiterf.h (mbiterf_next): Use C99 designated initializer syntax.
9680         * tests/bench-mbiterf.c (do_test): Use a 'const char *' pointer.
9682         trim: Optimize.
9683         * lib/trim.c: Include mbiterf.h instead of mbiter.h.
9684         (trim2): Use mbif_* macros instead of mbi_* macros.
9685         * modules/trim (Depends-on): Add mbiterf. Remove mbiter.
9687         mbmemcasecmp: Optimize.
9688         * lib/mbmemcasecmp.c: Include mbiterf.h instead of mbiter.h.
9689         (mbmemcasecmp): Use mbif_* macros instead of mbi_* macros.
9690         * modules/mbmemcasecmp (Depends-on): Add mbiterf. Remove mbiter.
9692         mbsnlen: Optimize.
9693         * lib/mbsnlen.c: Include mbiterf.h instead of mbiter.h.
9694         (mbsnlen): Use mbif_* macros instead of mbi_* macros.
9695         * modules/mbsnlen (Depends-on): Add mbiterf. Remove mbiter.
9697         mbiterf: Add a benchmark.
9698         * tests/bench-mbiterf.c: New file, based on tests/bench-mbiter.c.
9699         * modules/mbiterf-bench-tests: New file, based on
9700         modules/mbiter-bench-tests.
9702         mbiterf: New module.
9703         * lib/mbiterf.h: New file, based on lib/mbiter.h.
9704         * lib/mbiterf.c: New file, based on lib/mbiter.c.
9705         * modules/mbiterf: New file, based on modules/mbiter.
9707 2023-07-18  Bruno Haible  <bruno@clisp.org>
9709         mbstok_r: Simplify dependencies.
9710         * lib/mbstok_r.c: Include <stdlib.h> instead of mbuiter.h.
9711         * modules/mbstok_r (Depends-on): Remove mbuiter.
9713 2023-07-17  Simon Josefsson  <simon@josefsson.org>
9715         announce-gen: Allow using local git user.name.
9716         * build-aux/announce-gen (readable_interval): Remove --global
9717         parameter to 'git config' call.
9719 2023-07-17  Bruno Haible  <bruno@clisp.org>
9721         mbuiter: Optimize.
9722         * lib/mbuiter.h (struct mbuiter_multi): Add cur_max field.
9723         (mbui_init): Initialize it.
9724         (mbuiter_multi_next): Use it instead of MB_CUR_MAX.
9725         (mbuiter_multi_copy): Update.
9727 2023-07-17  Bruno Haible  <bruno@clisp.org>
9729         mbchar: Reduce size of 'struct mbchar'.
9730         * modules/mbfile (configure.ac): Define GNULIB_MBFILE as an indicator.
9731         * lib/mbchar.h (MBCHAR_BUF_SIZE): Set to 4.
9732         (struct mbchar): Disable member 'buf' if the module 'mbfile' is not in
9733         use.
9734         (mb_setascii): Disable if the module 'mbfile' is not in use.
9735         (mb_copy): Update.
9737 2023-07-17  Bruno Haible  <bruno@clisp.org>
9739         mbszero: Fix for Minix.
9740         * lib/wchar.in.h: (_GL_MBSTATE_INIT_SIZE): Don't define on Minix.
9741         (_GL_MBSTATE_ZERO_SIZE): Define to 4 on Minix.
9743 2023-07-17  Bruno Haible  <bruno@clisp.org>
9745         mbszero: Source code tweaks.
9746         Suggested by Paul Eggert in
9747         <https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00084.html>.
9748         * lib/wchar.in.h: Comment changes.
9749         (_GL_MBSTATE_INIT_SIZE): Don't define on NetBSD, Solaris, native
9750         Windows. Use a safe default at the end.
9751         (_GL_MBSTATE_ZERO_SIZE): Don't define on AIX, IRIX, Solaris, native
9752         Windows. Use a safe default at the end.
9753         * lib/mbrtoc16.c: Update comments accordingly.
9755 2023-07-16  Bruno Haible  <bruno@clisp.org>
9757         dfa: Optimize clearing an mbstate_t.
9758         * lib/dfa.c (mbszero) [GAWK]: Add fallback definition.
9759         (mbs_to_wchar, lex, addtok_wc, dfaexec_main): Use mbszero.
9760         * modules/dfa (Depends-on): Add mbszero.
9762 2023-07-16  Bruno Haible  <bruno@clisp.org>
9764         uchar-c23: Optimize clearing an mbstate_t.
9765         * lib/lc-charset-unicode.c (locale_encoding_to_unicode,
9766         unicode_to_locale_encoding): Use mbszero.
9767         * modules/uchar-c23 (Depends-on): Add mbszero.
9769 2023-07-16  Bruno Haible  <bruno@clisp.org>
9771         quotearg: Optimize clearing an mbstate_t.
9772         * lib/quotearg.c: Include <wchar.h>.
9773         (quotearg_buffer_restyled): Use mbszero.
9774         * modules/quotearg (Depends-on): Add mbszero.
9776 2023-07-16  Bruno Haible  <bruno@clisp.org>
9778         vasnprintf, vasnwprintf: Optimize clearing an mbstate_t.
9779         * lib/vasnprintf.c (VASNPRINTF): Use mbszero.
9780         * modules/vasnprintf (Depends-on): Add mbszero.
9781         * modules/vasnwprintf (Depends-on): Likewise.
9782         * modules/c-vasnprintf (Depends-on): Likewise.
9783         * modules/unistdio/u8-vasnprintf (Depends-on): Likewise.
9784         * modules/unistdio/u8-u8-vasnprintf (Depends-on): Likewise.
9785         * modules/unistdio/u16-vasnprintf (Depends-on): Likewise.
9786         * modules/unistdio/u16-u16-vasnprintf (Depends-on): Likewise.
9787         * modules/unistdio/u32-vasnprintf (Depends-on): Likewise.
9788         * modules/unistdio/u32-u32-vasnprintf (Depends-on): Likewise.
9789         * modules/unistdio/ulc-vasnprintf (Depends-on): Likewise.
9791 2023-07-16  Bruno Haible  <bruno@clisp.org>
9793         mbmemcasecoll: Optimize clearing an mbstate_t.
9794         * lib/mbmemcasecoll.c (apply_c32tolower): Use mbszero.
9795         * modules/mbmemcasecoll (Depends-on): Add mbszero.
9797 2023-07-16  Bruno Haible  <bruno@clisp.org>
9799         mbswidth: Optimize clearing an mbstate_t.
9800         * lib/mbswidth.c (mbsnwidth): Use mbszero.
9801         * modules/mbswidth (Depends-on): Add mbszero.
9803 2023-07-16  Bruno Haible  <bruno@clisp.org>
9805         mbfile: Optimize clearing an mbstate_t.
9806         * lib/mbfile.h (mbfile_multi_getc, mbf_init): Use mbszero.
9807         * modules/mbfile (Depends-on): Add mbszero.
9809 2023-07-16  Bruno Haible  <bruno@clisp.org>
9811         mbuiter: Optimize clearing an mbstate_t.
9812         * lib/mbuiter.h: Include <wchar.h>.
9813         (mbuiter_multi_next, mbuiter_multi_copy, mbui_init): Use mbszero.
9814         * modules/mbuiter (Depends-on): Add mbszero.
9816 2023-07-16  Bruno Haible  <bruno@clisp.org>
9818         mbiter: Optimize clearing an mbstate_t.
9819         * lib/mbiter.h: Include <wchar.h>.
9820         (mbiter_multi_next, mbiter_multi_copy, mbi_init): Use mbszero.
9821         * modules/mbiter (Depends-on): Add mbszero.
9823 2023-07-16  Bruno Haible  <bruno@clisp.org>
9825         c32stombs: Optimize clearing an mbstate_t.
9826         * lib/c32stombs.c (c32stombs): Use mbszero.
9827         * lib/uchar.in.h (c32stombs): Likewise.
9828         * modules/c32stombs (Depends-on): Add mbszero.
9830 2023-07-16  Bruno Haible  <bruno@clisp.org>
9832         mbstoc32s: Optimize clearing an mbstate_t.
9833         * lib/mbstoc32s.c (mbstoc32s): Use mbszero.
9834         * lib/uchar.in.h (mbstoc32s): Likewise.
9835         * modules/mbstoc32s (Depends-on): Add mbszero.
9837 2023-07-16  Bruno Haible  <bruno@clisp.org>
9839         mbstowcs: Optimize clearing an mbstate_t.
9840         * lib/mbstowcs.c (mbstowcs): Use mbszero.
9841         * modules/mbstowcs (Depends-on): Add mbszero.
9843 2023-07-16  Bruno Haible  <bruno@clisp.org>
9845         c32tob: Optimize clearing an mbstate_t.
9846         * lib/c32tob.c (c32tob): Use mbszero.
9847         * modules/c32tob (Depends-on): Add mbszero.
9849 2023-07-16  Bruno Haible  <bruno@clisp.org>
9851         wctomb: Optimize clearing an mbstate_t.
9852         * lib/wctomb-impl.h (wctomb): Use mbszero.
9853         * modules/wctomb (Depends-on): Add mbszero.
9855 2023-07-16  Bruno Haible  <bruno@clisp.org>
9857         btoc32: Optimize clearing an mbstate_t.
9858         * lib/btoc32.c: Include <wchar.h>.
9859         (btoc32): Use mbszero.
9860         * modules/btoc32 (Depends-on): Add mbszero.
9862 2023-07-16  Bruno Haible  <bruno@clisp.org>
9864         btowc: Optimize clearing an mbstate_t.
9865         * lib/btowc.c (btowc): Use mbszero.
9866         * modules/btowc (Depends-on): Add mbszero.
9868 2023-07-16  Bruno Haible  <bruno@clisp.org>
9870         mbrtoc32: Optimize clearing an mbstate_t.
9871         * lib/mbrtoc32.c (mbrtoc32): Use mbszero.
9872         * modules/mbrtoc32 (Depends-on): Add mbsinit, mbszero.
9874 2023-07-16  Bruno Haible  <bruno@clisp.org>
9876         mbtowc: Optimize clearing an mbstate_t.
9877         * lib/mbtowc-impl.h (mbtowc): Use mbszero.
9878         * modules/mbtowc (Depends-on): Add mbszero.
9880 2023-07-16  Bruno Haible  <bruno@clisp.org>
9882         mbszero: New module.
9883         * lib/wchar.in.h: Include <string.h>.
9884         (_GL_MBSTATE_INIT_SIZE, _GL_MBSTATE_ZERO_SIZE): New macros.
9885         (mbszero): New declaration.
9886         * lib/mbrtoc16.c: Update comments.
9887         * lib/mbszero.c: New file.
9888         * m4/wchar_h.m4 (gl_WCHAR_H_REQUIRE_DEFAULTS): Initialize
9889         GNULIB_MBSZERO.
9890         * modules/wchar (Depends-on): Add extern-inline.
9891         (Makefile.am): Substitute GNULIB_MBSZERO.
9892         * modules/mbszero: New file.
9894 2023-07-15  Bruno Haible  <bruno@clisp.org>
9896         mbsinit: Fix module description.
9897         * modules/mbsinit (Files): Add m4/mbrtowc.m4.
9899 2023-07-15  Bruno Haible  <bruno@clisp.org>
9901         c32_apply_type_test: Fix compilation error with GCC < 9.
9902         * lib/uchar.in.h (c32_apply_type_test) [_GL_WCHAR_T_IS_UCS4]: Remove
9903         _GL_ARG_NONNULL attribute.
9905 2023-07-13  Bruno Haible  <bruno@clisp.org>
9907         mbchar: Optimize is_basic.
9908         * lib/mbchar.h (is_basic_table): Remove declaration.
9909         (is_basic) [IS_BASIC_ASCII]: Define through a simple range test.
9910         * lib/mbchar.c (is_basic_table): Remove array.
9912         localcharset: Clean up locale encodings used by glibc.
9913         * lib/localcharset.h: Remove VISCII from the list, since never supported
9914         in glibc/localedata/SUPPORTED. JOHAB is not supported by glibc any more
9915         since 2000-09-25. TCVN5712-1 is not supported by glibc any more since
9916         2012-05-21.
9918 2023-07-13  Bruno Haible  <bruno@clisp.org>
9920         doc: Mention c32_get_mapping, c32_apply_mapping.
9921         * doc/posix-functions/wctrans.texi: Mention c32_get_mapping.
9922         * doc/posix-functions/towctrans.texi: Mention c32_apply_mapping.
9923         * doc/strings.texi (Comparison of character APIs): Mention both.
9925         c32_apply_mapping: Add tests.
9926         * tests/test-c32_apply_mapping.c: New file.
9927         * modules/c32_apply_mapping-tests: New file.
9929         c32_apply_mapping: New module.
9930         * lib/uchar.in.h (c32_apply_mapping): New declaration.
9931         * lib/c32_apply_mapping.c: New file.
9932         * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
9933         GNULIB_C32_APPLY_MAPPING.
9934         * modules/uchar (Makefile.am): Substitute GNULIB_C32_APPLY_MAPPING.
9935         * modules/c32_apply_mapping: New file.
9937         c32_get_mapping: Add tests.
9938         * tests/test-c32_get_mapping.c: New file.
9939         * modules/c32_get_mapping-tests: New file.
9941         c32_get_mapping: New module.
9942         * lib/uchar.in.h (c32_mapping_t): New type.
9943         (c32_get_mapping): New declaration.
9944         * lib/c32_get_mapping.c: New file, based on lib/wctrans-impl.h.
9945         * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
9946         GNULIB_C32_GET_MAPPING.
9947         * modules/uchar (Makefile.am): Substitute GNULIB_C32_GET_MAPPING.
9948         * modules/c32_get_mapping: New file.
9950         towctrans: Relax license.
9951         * modules/towctrans (License): Change to LGPLv2+.
9952         * lib/towctrans.c: Update license notice.
9953         * lib/towctrans-impl.h: Likewise.
9955         wctrans: Relax license.
9956         * modules/wctrans (License): Change to LGPLv2+.
9957         * lib/wctrans.c: Update license notice.
9958         * lib/wctrans-impl.h: Likewise.
9960 2023-07-12  Bruno Haible  <bruno@clisp.org>
9962         doc: Mention c32_get_type_test, c32_apply_type_test.
9963         * doc/posix-functions/wctype.texi: Mention c32_get_type_test.
9964         * doc/posix-functions/iswctype.texi: Mention c32_apply_type_test.
9965         * doc/strings.texi (Comparison of character APIs): Mention both.
9967         c32_apply_type_test: Add tests.
9968         * tests/test-c32_apply_type_test.c: New file.
9969         * modules/c32_apply_type_test-tests: New file.
9971         c32_apply_type_test: New module.
9972         * lib/uchar.in.h (c32_apply_type_test): New declaration.
9973         * lib/c32_apply_type_test.c: New file.
9974         * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
9975         GNULIB_C32_APPLY_TYPE_TEST.
9976         * modules/uchar (Makefile.am): Substitute GNULIB_C32_APPLY_TYPE_TEST.
9977         * modules/c32_apply_type_test: New file.
9979         c32_get_type_test: Add tests.
9980         * tests/test-c32_get_type_test.c: New file.
9981         * modules/c32_get_type_test-tests: New file.
9983         c32_get_type_test: New module.
9984         * lib/uchar.in.h (c32_type_test_t): New type.
9985         (c32_get_type_test): New declaration.
9986         * lib/c32_get_type_test.c: New file, based on lib/wctype-impl.h.
9987         * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
9988         GNULIB_C32_GET_TYPE_TEST.
9989         * modules/uchar (Makefile.am): Substitute GNULIB_C32_GET_TYPE_TEST.
9990         * modules/c32_get_type_test: New file.
9992         iswctype: Relax license.
9993         * modules/iswctype (License): Change to LGPLv2+.
9994         * lib/iswctype.c: Update license notice.
9995         * lib/iswctype-impl.h: Likewise.
9997         wctype: Relax license.
9998         * modules/wctype (License): Change to LGPLv2+.
9999         * lib/wctype.c: Update license notice.
10000         * lib/wctype-impl.h: Likewise.
10002 2023-07-12  Bruno Haible  <bruno@clisp.org>
10004         mbiter, mbuiter: Small optimization.
10005         * lib/mbiter.h: Optimize away the in_shift field when the module
10006         'mbrtoc32-regular' is in use.
10007         * lib/mbuiter.h: Likewise.
10009 2023-07-12  Gavin Smith  <gavinsmith0123@gmail.com>
10011         gendocs: support chapter- and section-level split
10012         * doc/gendocs_template: Add lines to mark parts of file to output
10013         only when splitting HTML by node.
10014         Remove obsolete comment about ranges of years in copyright notice
10015         (as per Karl).
10016         * build-aux/gendocs.sh
10017         [!texi2html]: Strip out parts of the template depending on --split.
10018         [texi2html] Include all of the template as before.
10020 2023-07-11  Bruno Haible  <bruno@clisp.org>
10022         mbsrtoc32s, mbsnrtoc32s: Small optimization.
10023         * lib/mbsrtoc32s.c (USES_C32): Set to 0 when the module
10024         'mbrtoc32-regular' is in use.
10025         * lib/mbsnrtoc32s.c (USES_C32): Likewise.
10027 2023-07-11  Bruno Haible  <bruno@clisp.org>
10029         mbswidth: Add a benchmark.
10030         * tests/bench-mbswidth.c: New file, based on tests/bench-mbiter.c.
10031         * modules/mbswidth-bench-tests: New file.
10033         mbuiter: Add a benchmark.
10034         * tests/bench-mbuiter.c: New file, based on tests/bench-mbiter.c.
10035         * modules/mbuiter-bench-tests: New file.
10037         mbiter: Add a benchmark.
10038         * tests/bench-mbiter.c: New file.
10039         * tests/bench-multibyte.h: New file.
10040         * modules/mbiter-bench-tests: New file.
10042         tests: Create new file bench.h.
10043         * tests/bench.h: New file, extracted from tests/bench-digest.h.
10044         * tests/bench-digest.h: Include it.
10045         * modules/crypto/md5-buffer-tests (Files): Add tests/bench.h.
10046         * modules/crypto/sha1-buffer-tests (Files): Likewise.
10047         * modules/crypto/sha256-buffer-tests (Files): Likewise.
10048         * modules/crypto/sha512-buffer-tests (Files): Likewise.
10050 2023-07-11  Bruno Haible  <bruno@clisp.org>
10052         Optimize away some mbsinit calls.
10053         * lib/mbiter.h (mbiter_multi_next): When the module 'mbrtoc32-regular'
10054         is in use, don't invoke mbsinit and don't compare the mbrtoc32 result
10055         against (size_t)(-3).
10056         * lib/mbuiter.h (mbuiter_multi_next): Likewise.
10057         * lib/mbfile.h (mbfile_multi_getc): Likewise.
10058         * lib/mbswidth.c (mbsnwidth): Likewise.
10059         * lib/mbmemcasecoll.c (apply_c32tolower): Likewise.
10060         * lib/quotearg.c (quotearg_buffer_restyled): Likewise.
10062 2023-07-11  Bruno Haible  <bruno@clisp.org>
10064         Fix build errors on Linux/hppa.
10065         * modules/math (Makefile.am): Split long pipe command into several
10066         smaller commands.
10067         * modules/pthread-h (Makefile.am): Likewise.
10068         * modules/stdio (Makefile.am): Likewise.
10069         * modules/stdlib (Makefile.am): Likewise.
10070         * modules/string (Makefile.am): Likewise.
10071         * modules/unictype/base (Makefile.am): Likewise.
10072         * modules/unistd (Makefile.am): Likewise.
10073         * modules/wchar (Makefile.am): Likewise.
10075 2023-07-11  Paul Eggert  <eggert@cs.ucla.edu>
10077         quotearg: update Solaris-related comments
10078         * doc/solaris-versions: Modernize.
10079         * lib/quotearg.c: Update comments.
10081 2023-07-10  Bruno Haible  <bruno@clisp.org>
10083         dfa: Overcome wchar_t limitations.
10084         * lib/localeinfo.h: Include <uchar.h>. Add special definitions for GAWK.
10085         (case_folded_counterparts): Change array element type to char32_t.
10086         * lib/localeinfo.c: Include <uchar.h>. Add special definitions for GAWK.
10087         (is_using_utf8, init_localeinfo): Use mbrtoc32 instead of mbrtowc.
10088         (lonesome_lower): Change element type to 'unsigned short'.
10089         (case_folded_counterparts): Change array element type to char32_t. Use
10090         c32toupper instead of towupper. Use c32tolower instead of towlower.
10091         * lib/dfa.c: Include <uchar.h>. Add special definitions for GAWK.
10092         (struct mb_char_classes): Change element type of 'chars' to char32_t.
10093         (mbs_to_wchar): Use mbrtoc32 instead of mbrtowc.
10094         (setbit_wc): Change type of first argument to char32_t. Use c32tob
10095         instead of wctob.
10096         (parse_bracket_exp): Update.
10097         (lex): Use c32isprint instead of iswprint. Use c32isspace instead of
10098         iswspace. Use c32rtomb instead of a %lc directive.
10099         (addtok_wc): Use c32rtomb instead of wcrtomb.
10100         (atom): Update.
10101         * modules/dfa (Depends-on): Remove wctype-h. Add uchar,
10102         mbrtoc32-regular, c32rtomb, c32tob, c32tolower, c32toupper, c32isprint,
10103         c32isspace.
10104         (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
10105         * modules/dfa-tests (Makefile.am): Link test-dfa-match-aux with
10106         $(LIBUNISTRING) $(LIBC32CONV).
10107         * NEWS: Mention the change.
10109 2023-07-10  Bruno Haible  <bruno@clisp.org>
10111         mbrtoc32-regular: Add tests.
10112         * tests/test-mbrtoc32-regular.c: New file.
10113         * modules/mbrtoc32-regular-tests: New file.
10115         mbrtoc32-regular: New module.
10116         * modules/mbrtoc32-regular: New file.
10117         * lib/mbrtoc32.c (mbrtoc32): If the module 'mbrtoc32-regular' is present
10118         and the system's mbrtoc32 returned a char32_t, clear the mbstate_t.
10119         * doc/posix-functions/mbrtoc32.texi: Mention the new module.
10121 2023-07-10  Bruno Haible  <bruno@clisp.org>
10123         Apply the last change to all locale-*.m4 files.
10124         * m4/locale-ar.m4 (gt_LOCALE_AR): Reject locale name that might cause
10125         trouble with sh or make.
10126         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise.
10128 2023-07-09  Paul Eggert  <eggert@cs.ucla.edu>
10130         c32width: protect against bad configure args
10131         Avoid ‘test’ misuse with ‘./configure gt_cv_locale_fr=""’.
10132         Possible problem of this sort reported by Angelo Graziosi in:
10133         https://lists.gnu.org/r/emacs-devel/2023-07/msg00329.html
10134         * m4/locale-fr.m4 (gt_LOCALE_FR_UTF8, gt_LOCALE_FR_UTF8):
10135         * m4/locale-ja.m4 (gt_LOCALE_JA):
10136         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN):
10137         Reject locale names that might cause trouble with sh or make.
10139 2023-07-06  Bruno Haible  <bruno@clisp.org>
10141         wcscmp: Work around a glibc bug.
10142         Reported by مصعب الزعبي (Mosab Al-Zoubi) <moceap@hotmail.com> in
10143         <https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00029.html>.
10144         * m4/wcscmp.m4 (gl_FUNC_WCSCMP): Test against a glibc/arm* bug.
10145         * doc/posix-functions/wcscmp.texi: Mention the glibc/arm* bug.
10147 2023-07-04  Bruno Haible  <bruno@clisp.org>
10149         mbiter, mbfile, mbmemcasecoll: Improve handling of mbrtoc32 result.
10150         * lib/mbiter.h (mbi_avail): If cur.ptr has reached the limit but
10151         in_shift is true, call mbiter_multi_next.
10152         (mbiter_multi_next): Set in_shift to false after an incomplete multibyte
10153         character.
10154         * lib/mbfile.h (mbfile_multi_getc): Pass the input bytes incrementally
10155         into mbrtoc32. When mbf->state is not in the initial state, call
10156         mbrtoc32 again.
10157         * lib/mbmemcasecoll.c (apply_c32tolower): When the state is not in the
10158         initial state, call mbrtoc32 again.
10160 2023-07-04  Bruno Haible  <bruno@clisp.org>
10162         mbiter, mbuiter, mbfile: Improve state handling after invalid input.
10163         * lib/mbiter.h (mbiter_multi_next): After an invalid multibyte sequence
10164         was encountered, clear the state.
10165         * lib/mbuiter.h (mbuiter_multi_next): Likewise.
10166         * lib/mbfile.h (mbfile_multi_getc): Likewise.
10168 2023-07-04  Bruno Haible  <bruno@clisp.org>
10170         mbchar: Optimize all chars from the POSIX "portable character set".
10171         * lib/mbchar.h (is_basic): Include all the characters from the POSIX
10172         "portable character set".
10173         * lib/mbchar.c (is_basic_table): Likewise.
10174         * lib/mbiter.h (mbiter_multi_next): Update comment.
10175         * lib/mbuiter.h (mbuiter_multi_next): Likewise.
10176         * lib/mbfile.h (mbfile_multi_getc): Likewise.
10178 2023-07-04  Paul Eggert  <eggert@cs.ucla.edu>
10180         mbchar: treat @, $, ` as basic
10181         The C standard says that @, $, ` must have a single-byte
10182         representation so they count as basic as far as multibyte
10183         character processing goes.
10184         * lib/mbchar.c (is_basic_table):
10185         * lib/mbchar.h (is_basic):
10186         * lib/mbswidth.c (mbsnwidth):
10187         Treat @, $, ` as basic too.
10189 2023-07-03  Bruno Haible  <bruno@clisp.org>
10191         mbrtoc32: Document another glibc bug.
10192         * doc/posix-functions/mbrtoc32.texi: Reference the glibc bug in
10193         BIG5-HKSCS locales.
10195 2023-07-03  Paul Eggert  <eggert@cs.ucla.edu>
10197         mbrtoc32: document (size_t) -3 issue
10198         * doc/posix-functions/mbrtoc32.texi (mbrtoc32):
10199         Say (size_t) -3 might not be worth bothering about.
10201 2023-07-02  Bruno Haible  <bruno@clisp.org>
10203         mbsrtoc32s: Accommodate a difference between mbrtowc and mbrtoc32.
10204         * lib/mbsrtoc32s.c (USES_C32): New macro.
10205         * lib/mbsrtowcs.c (USES_C32): New macro.
10206         * lib/mbsrtowcs-impl.h (FUNC): If USES_C32 and mbrtoc32 returned
10207         (size_t)(-3), don't increment the pointer.
10209 2023-07-02  Bruno Haible  <bruno@clisp.org>
10211         mbsnrtoc32s: Accommodate a difference between mbrtowc and mbrtoc32.
10212         * lib/mbsnrtoc32s.c (USES_C32): New macro.
10213         * lib/mbsnrtowcs.c (USES_C32): New macro.
10214         * lib/mbsnrtowcs-impl.h (FUNC): If USES_C32 and mbrtoc32 returned
10215         (size_t)(-3), don't increment the pointer.
10217 2023-07-02  Bruno Haible  <bruno@clisp.org>
10219         mbmemcasecoll: Overcome wchar_t limitations.
10220         * lib/mbmemcasecoll.c: Include <uchar.h> instead of <wctype.h>.
10221         (apply_c32tolower): Renamed from apply_towlower. Use mbrtoc32 instead of
10222         mbrtowc. Use c32tolower instead of towlower. Use c32rtomb instead of
10223         wcrtomb.
10224         * modules/mbmemcasecoll (Depends-on): Remove mbrtowc, wcrtomb. Add
10225         uchar, mbrtoc32, c32rtomb, c32tolower.
10226         (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
10227         * modules/mbmemcasecoll-tests (Makefile.am): Link test-mbmemcasecoll
10228         with $(LIBUNISTRING) $(LIBC32CONV).
10230 2023-07-02  Bruno Haible  <bruno@clisp.org>
10232         mbswidth: Overcome wchar_t limitations.
10233         * lib/mbswidth.c: Include <uchar.h> instead of <wctype.h>.
10234         (mbsnwidth): Use mbrtoc32 instead of mbrtowc. Use c32width instead of
10235         wcwidth. Use c32iscntrl instead of iswcntrl.
10236         * modules/mbswidth (Depends-on): Remove wctype-h, mbrtowc, wcwidth. Add
10237         uchar, mbrtoc32, c32width, c32iscntrl.
10238         (Link): Add $(LIBC32CONV).
10240 2023-07-01  Paul Eggert  <eggert@cs.ucla.edu>
10242         Fix long bootstrap lines
10243         * top/bootstrap:
10244         * top/bootstrap-funclib.sh: Reformat to fit into 80 columns,
10245         for coreutils ‘make syntax-check’.
10247 2023-07-01  Bruno Haible  <bruno@clisp.org>
10249         doc: Update regarding stable branches.
10250         * doc/gnulib-readme.texi (Stable Branches): Mention new branch
10251         stable-202307. Mention that stable-202207 is no longer updated.
10253 2023-07-01  Paul Eggert  <eggert@cs.ucla.edu>
10255         maint.mk: Modernize stddef.h checks for C23
10256         * top/maint.mk (_stddef_syms_re): Modernize for C23.
10258 2023-07-01  Bruno Haible  <bruno@clisp.org>
10260         quotearg: Overcome wchar_t limitations.
10261         * lib/quotearg.c: Include <uchar.h> instead of <wchar.h>, <wctype.h>.
10262         (quotearg_buffer_restyled): Use mbrtoc32, c32isprint instead of mbrtowc,
10263         iswprint.
10264         * modules/quotearg (Files): Remove m4/mbstate_t.m4, m4/mbrtowc.m4
10265         (redundant).
10266         (Depends-on): Add uchar, mbrtoc32, c32isprint. Remove wchar, wctype-h,
10267         mbrtowc.
10268         (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
10269         * modules/quotearg-tests (Makefile.am): Link test-quotearg with
10270         $(LIBUNISTRING) $(LIBC32CONV).
10271         * modules/quotearg-simple (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
10272         * modules/quotearg-simple-tests (Makefile.am): Link test-quotearg-simple
10273         with $(LIBUNISTRING) $(LIBC32CONV).
10274         --
10275         * modules/quote (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
10276         --
10277         * modules/acl (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
10278         * modules/acl-tests (Makefile.am): Link test-set-mode-acl and
10279         test-copy-acl with $(LIBUNISTRING) $(LIBC32CONV).
10280         * modules/copy-file (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
10281         * modules/copy-file-tests (Makefile.am): Link test-copy-file with
10282         $(LIBUNISTRING) $(LIBC32CONV).
10283         --
10284         * modules/argmatch (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
10285         * modules/argmatch-tests (Makefile.am): Link test-argmatch with
10286         $(LIBUNISTRING) $(LIBC32CONV).
10287         * modules/backup-rename (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
10288         * modules/backupfile (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
10289         * modules/human (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
10290         --
10291         * modules/sh-quote (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
10292         * modules/sh-quote-tests (Makefile.am): Link test-sh-quote with
10293         $(LIBUNISTRING) $(LIBC32CONV).
10294         * modules/system-quote (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
10295         * modules/system-quote-tests (Makefile.am): Link test-system-quote-main
10296         with $(LIBUNISTRING) $(LIBC32CONV).
10297         * modules/csharpcomp (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
10298         * modules/csharpexec (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
10299         * modules/javacomp (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
10300         * modules/javaexec (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
10301         --
10302         * modules/string-desc-quotearg (Link): New section.
10303         * modules/string-desc-quotearg-tests (Makefile.am): Link
10304         test-string-desc-quotearg with $(LIBUNISTRING) $(LIBC32CONV).
10305         --
10306         * modules/xmemcoll (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
10307         --
10308         * modules/closeout (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
10309         * modules/readtokens-tests (Makefile.am): Link test-readtokens with
10310         $(LIBUNISTRING) $(LIBC32CONV).
10311         --
10312         * modules/closein (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
10313         * modules/closein-tests (Makefile.am): Link test-closein with
10314         $(LIBUNISTRING) $(LIBC32CONV).
10315         * modules/yesno-tests (Makefile.am): Link test-yesno with
10316         $(LIBUNISTRING) $(LIBC32CONV).
10318 2023-06-30  Bruno Haible  <bruno@clisp.org>
10320         Accommodate a difference between mbrtowc and mbrtoc32.
10321         * lib/mbiter.h (mbiter_multi_next): Handle the mbrtoc32 return value
10322         (size_t)(-3).
10323         * lib/mbuiter.h (mbuiter_multi_next): Likewise.
10324         * lib/mbfile.h (mbfile_multi_getc): Likewise.
10326 2023-06-30  Bruno Haible  <bruno@clisp.org>
10328         doc: Reference some reported bugs (in comments).
10329         * doc/posix-functions/mbrlen.texi: Add references to bug reports.
10330         * doc/posix-functions/mbrtoc16.texi: Likewise.
10331         * doc/posix-functions/mbrtoc32.texi: Likewise.
10332         * doc/posix-functions/mbrtowc.texi: Likewise.
10333         * doc/posix-functions/mbsnrtowcs.texi: Likewise.
10334         * doc/posix-functions/mbsrtowcs.texi: Likewise.
10335         * doc/posix-functions/mbstowcs.texi: Likewise.
10337 2023-06-29  Paul Eggert  <eggert@cs.ucla.edu>
10339         assert-tests: pacify gcc -Wunused-function
10340         * tests/test-assert.c (main): Call f, so that the test
10341         works even if NDEBUG is defined.
10343         stddef-tests: pacify gcc -Wshadow
10344         * tests/test-stddef.c (mat): Rename from ‘x’.
10346         nullptr-tests: pacify gcc -Wmissing-declarations
10347         * tests/test-nullptr.c (varargs_callee): Now static.
10349 2023-06-29  Bruno Haible  <bruno@clisp.org>
10351         libtextstyle-optional: Update to gettext 0.22.
10352         * lib/textstyle.in.h: Declare all functions that were added in
10353         textstyle.h from gettext-0.22.
10355         libtextstyle-optional: Update to gettext 0.21.
10356         * lib/textstyle.in.h: Declare all functions that exist in textstyle.h
10357         from gettext-0.21, independently of iconv.
10359 2023-06-28  Bruno Haible  <bruno@clisp.org>
10361         doc: Mention c8rtomb and mbrtoc8 from ISO C 23.
10362         * doc/posix-functions/c8rtomb.texi: New file.
10363         * doc/posix-functions/mbrtoc8.texi: New file.
10364         * doc/gnulib.texi (Function Substitutes): Include them.
10366 2023-06-28  Bruno Haible  <bruno@clisp.org>
10368         mbrtoc16: Add tests.
10369         * tests/test-mbrtoc16.c: New file, based on tests/test-mbrtoc32.c.
10370         * tests/test-mbrtoc16-1.sh: New file, based on tests/test-mbrtoc32-1.sh.
10371         * tests/test-mbrtoc16-2.sh: New file, based on tests/test-mbrtoc32-2.sh.
10372         * tests/test-mbrtoc16-3.sh: New file, based on tests/test-mbrtoc32-3.sh.
10373         * tests/test-mbrtoc16-4.sh: New file, based on tests/test-mbrtoc32-4.sh.
10374         * tests/test-mbrtoc16-5.sh: New file, based on tests/test-mbrtoc32-5.sh.
10375         * tests/test-mbrtoc16-w32.c: New file, based on
10376         tests/test-mbrtoc32-w32.c.
10377         * tests/test-mbrtoc16-w32-1.sh: New file, based on
10378         tests/test-mbrtoc32-w32-1.sh.
10379         * tests/test-mbrtoc16-w32-2.sh: New file, based on
10380         tests/test-mbrtoc32-w32-2.sh.
10381         * tests/test-mbrtoc16-w32-3.sh: New file, based on
10382         tests/test-mbrtoc32-w32-3.sh.
10383         * tests/test-mbrtoc16-w32-4.sh: New file, based on
10384         tests/test-mbrtoc32-w32-4.sh.
10385         * tests/test-mbrtoc16-w32-5.sh: New file, based on
10386         tests/test-mbrtoc32-w32-5.sh.
10387         * tests/test-mbrtoc16-w32-6.sh: New file, based on
10388         tests/test-mbrtoc32-w32-6.sh.
10389         * tests/test-mbrtoc16-w32-7.sh: New file, based on
10390         tests/test-mbrtoc32-w32-7.sh.
10391         * modules/mbrtoc16-tests: New file, based on modules/mbrtoc32-tests.
10393         mbrtoc16: New module.
10394         * lib/uchar.in.h (mbrtoc16): New declaration.
10395         * lib/mbrtoc16.c: New file.
10396         * m4/mbrtoc16.m4: New file, based on m4/mbrtoc32.m4.
10397         * modules/mbrtoc16: New file.
10398         * m4/uchar_h.m4 (gl_UCHAR_H): Test whether mbrtoc16 is declared.
10399         (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize GNULIB_MBRTOC16.
10400         (gl_UCHAR_H_DEFAULTS): Initialize HAVE_MBRTOC16, REPLACE_MBRTOC16.
10401         * modules/uchar (Makefile.am): Substitute GNULIB_MBRTOC16,
10402         HAVE_MBRTOC16, REPLACE_MBRTOC16.
10403         * doc/posix-functions/mbrtoc16.texi: Mention the mbrtoc16 module and the
10404         mbsinit related limitation.
10405         * doc/posix-functions/mbsinit.texi: Mention the mbrtoc16 related
10406         limitation.
10408 2023-06-28  Bruno Haible  <bruno@clisp.org>
10410         c32*: Update comment.
10411         * lib/c32is-impl.h (FUNC): Add comment regarding Android.
10412         * lib/c32to-impl.h (FUNC): Likewise.
10413         * lib/c32width.c (c32width): Likewise.
10415 2023-06-28  Bruno Haible  <bruno@clisp.org>
10417         mbrtoc32: Doc tweak.
10418         * doc/posix-functions/mbrtoc32.texi: Mention that mingw and Android have
10419         the empty input bug.
10420         * m4/mbrtoc32.m4 (gl_MBRTOC32_EMPTY_INPUT): Update cross-compilation
10421         guess.
10423 2023-06-28  Bruno Haible  <bruno@clisp.org>
10425         mbrtowc: Doc tweak.
10426         * doc/posix-functions/mbrtowc.texi: Mention that MSVC has the empty
10427         input bug and the return value bug. Mention that Android has the empty
10428         input bug.
10429         * m4/mbrtowc.m4 (gl_MBRTOC32_EMPTY_INPUT): Update cross-compilation
10430         guess.
10432 2023-06-28  Bruno Haible  <bruno@clisp.org>
10434         mbrtowc, mbrtoc32: Simplify autoconf macros.
10435         * m4/mbrtowc.m4 (gl_MBRTOWC_EMPTY_INPUT, gl_MBRTOWC_C_LOCALE): Put
10436         cross-compilation guess at the usual place.
10437         * m4/mbrtoc32.m4 (gl_MBRTOC32_EMPTY_INPUT, gl_MBRTOC32_C_LOCALE):
10438         Likewise.
10440 2023-06-27  Bruno Haible  <bruno@clisp.org>
10442         c32*: Optionally enforce ISO C 23 semantics of char32_t.
10443         * lib/lc-charset-unicode.h: New file.
10444         * lib/lc-charset-unicode.c: New file.
10445         * modules/uchar-c23: New file.
10446         * lib/uchar.in.h (char32_t): Add comment.
10447         * lib/mbrtoc32.c: Include lc-charset-unicode.h.
10448         (mbrtoc32): If char32_t is Unicode and wchar_t is not, invoke
10449         locale_encoding_to_unicode.
10450         * lib/btoc32.c: Include lc-charset-unicode.h.
10451         (btoc32): If char32_t is Unicode and wchar_t is not, invoke
10452         locale_encoding_to_unicode.
10453         * lib/c32rtomb.c: Include lc-charset-unicode.h.
10454         (c32rtomb): If char32_t is Unicode and wchar_t is not, invoke
10455         unicode_to_locale_encoding.
10456         * lib/c32tob.c: Include lc-charset-unicode.h.
10457         (c32tob): If char32_t is Unicode and wchar_t is not, invoke
10458         unicode_to_locale_encoding.
10459         * lib/mbsnrtoc32s.c: If char32_t is Unicode and wchar_t is not, don't
10460         use mbsnrtowcs.
10461         * lib/mbsrtoc32s.c: If char32_t is Unicode and wchar_t is not, don't use
10462         mbsrtowcs.
10463         * lib/c32snrtombs.c: If char32_t is Unicode and wchar_t is not, don't
10464         use wcsnrtombs.
10465         * lib/c32srtombs.c: If char32_t is Unicode and wchar_t is not, don't use
10466         wcsrtombs.
10467         * lib/c32is-impl.h: Include lc-charset-unicode.h.
10468         (FUNC): If char32_t is Unicode and wchar_t is not, use UCS_FUNC.
10469         * lib/c32to-impl.h: Include lc-charset-unicode.h.
10470         (FUNC): If char32_t is Unicode and wchar_t is not, use UCS_FUNC.
10471         * lib/c32width.c: Include lc-charset-unicode.h.
10472         (c32width): If char32_t is Unicode and wchar_t is not, use uc_width.
10473         * tests/test-mbrtoc32.c: Include <wchar.h>.
10474         (main): Skip GB18030 tests on NetBSD and Solaris. If
10475         GL_CHAR32_T_IS_UNICODE, expect Unicode encoding for the char32_t values.
10476         * tests/test-mbrtoc32-w32.c: Include <wchar.h>.
10477         (test_one_locale): Simplify.
10478         * tests/test-c32rtomb.c (main): Skip GB18030 tests on NetBSD and
10479         Solaris.
10480         * tests/test-c32rtomb.sh: Update.
10481         * tests/test-mbsnrtoc32s.c: Include <wchar.h>.
10482         (main): Skip GB18030 tests on NetBSD and Solaris.
10483         * tests/test-mbsrtoc32s.c: Include <wchar.h>.
10484         (main): Skip GB18030 tests on NetBSD and Solaris.
10485         * tests/test-mbstoc32s.c (main): Skip GB18030 tests on NetBSD and
10486         Solaris.
10487         * tests/test-c32snrtombs.c (main): Skip GB18030 tests on NetBSD and
10488         Solaris.
10489         * tests/test-c32srtombs.c (main): Skip GB18030 tests on NetBSD and
10490         Solaris.
10491         * tests/test-c32stombs.c (main): Skip GB18030 tests on NetBSD and
10492         Solaris.
10493         * tests/test-c32isalnum.c (main): Skip GB18030 tests on NetBSD and
10494         Solaris.
10495         * tests/test-c32isalnum.sh: Update.
10496         * tests/test-c32isalpha.c (main): Skip GB18030 tests on NetBSD and
10497         Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
10498         Solaris.
10499         * tests/test-c32isalpha.sh: Update.
10500         * tests/test-c32isblank.c (main): Skip GB18030 tests on NetBSD and
10501         Solaris.
10502         * tests/test-c32isblank.sh: Update.
10503         * tests/test-c32iscntrl.c (main): Skip GB18030 tests on NetBSD and
10504         Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
10505         Solaris.
10506         * tests/test-c32iscntrl.sh: Update.
10507         * tests/test-c32isdigit.c (main): Skip GB18030 tests on NetBSD and
10508         Solaris.
10509         * tests/test-c32isdigit.sh: Update.
10510         * tests/test-c32isgraph.c (main): Skip GB18030 tests on NetBSD and
10511         Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
10512         Solaris.
10513         * tests/test-c32isgraph.sh: Update.
10514         * tests/test-c32islower.c (main): Skip GB18030 tests on NetBSD and
10515         Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
10516         Solaris.
10517         * tests/test-c32islower.sh: Update.
10518         * tests/test-c32isprint.c (main): Skip GB18030 tests on NetBSD and
10519         Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
10520         Solaris.
10521         * tests/test-c32isprint.sh: Update.
10522         * tests/test-c32ispunct.c (main): Skip GB18030 tests on NetBSD and
10523         Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
10524         Solaris.
10525         * tests/test-c32ispunct.sh: Update.
10526         * tests/test-c32isspace.c (main): Skip GB18030 tests on NetBSD and
10527         Solaris.
10528         * tests/test-c32isspace.sh: Update.
10529         * tests/test-c32isupper.c (main): Skip GB18030 tests on NetBSD and
10530         Solaris.
10531         * tests/test-c32isupper.sh: Update.
10532         * tests/test-c32isxdigit.c (main): Skip GB18030 tests on NetBSD and
10533         Solaris.
10534         * tests/test-c32isxdigit.sh: Update.
10535         * tests/test-c32tolower.c (main): Skip GB18030 tests on NetBSD and
10536         Solaris.
10537         * tests/test-c32tolower.sh: Update.
10538         * tests/test-c32toupper.c (main): Skip GB18030 tests on NetBSD and
10539         Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
10540         Solaris.
10541         * tests/test-c32toupper.sh: Update.
10542         * modules/mbrtoc32 (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
10543         * modules/mbrtoc32-tests (Makefile.am): Link test-mbrtoc32 with
10544         $(LIBUNISTRING) $(LIBC32CONV).
10545         * modules/btoc32 (Link): New section.
10546         * modules/btoc32-tests (Makefile.am): Link test-btoc32 with
10547         $(LIBUNISTRING) $(LIBC32CONV).
10548         * modules/c32rtomb (Link): New section.
10549         * modules/c32rtomb-tests (Makefile.am): Link test-c32rtomb with
10550         $(LIBUNISTRING) $(LIBC32CONV).
10551         * modules/c32tob (Link): New section.
10552         * modules/mbsnrtoc32s (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
10553         * modules/mbsnrtoc32s-tests (Makefile.am): Link test-mbsnrtoc32s with
10554         $(LIBUNISTRING) $(LIBC32CONV).
10555         * modules/mbsrtoc32s (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
10556         * modules/mbsrtoc32s-tests (Makefile.am): Link test-mbsrtoc32s with
10557         $(LIBUNISTRING) $(LIBC32CONV).
10558         * modules/mbstoc32s (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
10559         * modules/mbstoc32s-tests (Makefile.am): Link test-mbstoc32s with
10560         $(LIBUNISTRING) $(LIBC32CONV).
10561         * modules/c32snrtombs (Link): New section.
10562         * modules/c32snrtombs-tests (Makefile.am): Link test-c32snrtombs with
10563         $(LIBUNISTRING) $(LIBC32CONV).
10564         * modules/c32srtombs (Link): New section.
10565         * modules/c32srtombs-tests (Makefile.am): Link test-c32srtombs with
10566         $(LIBUNISTRING) $(LIBC32CONV).
10567         * modules/c32stombs (Link): New section.
10568         * modules/c32stombs-tests (Makefile.am): Link test-c32stombs with
10569         $(LIBUNISTRING) $(LIBC32CONV).
10570         * modules/c32isalnum (Link): Add $(LIBC32CONV).
10571         * modules/c32isalnum-tests (Makefile.am): Link test-c32isalnum with
10572         $(LIBC32CONV).
10573         * modules/c32isalpha (Link): Add $(LIBC32CONV).
10574         * modules/c32isalpha-tests (Makefile.am): Link test-c32isalpha with
10575         $(LIBC32CONV).
10576         * modules/c32isblank (Link): Add $(LIBC32CONV).
10577         * modules/c32isblank-tests (Makefile.am): Link test-c32isblank with
10578         $(LIBC32CONV).
10579         * modules/c32iscntrl (Link): Add $(LIBC32CONV).
10580         * modules/c32iscntrl-tests (Makefile.am): Link test-c32iscntrl with
10581         $(LIBC32CONV).
10582         * modules/c32isdigit (Link): Add $(LIBC32CONV).
10583         * modules/c32isdigit-tests (Makefile.am): Link test-c32isdigit with
10584         $(LIBC32CONV).
10585         * modules/c32isgraph (Link): Add $(LIBC32CONV).
10586         * modules/c32isgraph-tests (Makefile.am): Link test-c32isgraph with
10587         $(LIBC32CONV).
10588         * modules/c32islower (Link): Add $(LIBC32CONV).
10589         * modules/c32islower-tests (Makefile.am): Link test-c32islower with
10590         $(LIBC32CONV).
10591         * modules/c32isprint (Link): Add $(LIBC32CONV).
10592         * modules/c32isprint-tests (Makefile.am): Link test-c32isprint with
10593         $(LIBC32CONV).
10594         * modules/c32ispunct (Link): Add $(LIBC32CONV).
10595         * modules/c32ispunct-tests (Makefile.am): Link test-c32ispunct with
10596         $(LIBC32CONV).
10597         * modules/c32isspace (Link): Add $(LIBC32CONV).
10598         * modules/c32isspace-tests (Makefile.am): Link test-c32isspace with
10599         $(LIBC32CONV).
10600         * modules/c32isupper (Link): Add $(LIBC32CONV).
10601         * modules/c32isupper-tests (Makefile.am): Link test-c32isupper with
10602         $(LIBC32CONV).
10603         * modules/c32isxdigit (Link): Add $(LIBC32CONV).
10604         * modules/c32isxdigit-tests (Makefile.am): Link test-c32isxdigit with
10605         $(LIBC32CONV).
10606         * modules/c32tolower (Link): Add $(LIBC32CONV).
10607         * modules/c32tolower-tests (Makefile.am): Link test-c32tolower with
10608         $(LIBC32CONV).
10609         * modules/c32toupper (Link): Add $(LIBC32CONV).
10610         * modules/c32toupper-tests (Makefile.am): Link test-c32toupper with
10611         $(LIBC32CONV).
10612         * modules/c32width (Link): Add $(LIBC32CONV).
10613         * modules/c32width-tests (Makefile.am): Link test-c32width with
10614         $(LIBC32CONV).
10615         * modules/c32swidth (Link): Add $(LIBC32CONV).
10616         * modules/c32swidth-tests (Makefile.am): Link test-c32swidth with
10617         $(LIBC32CONV).
10618         * modules/mbchar (Link): Add $(LIBC32CONV).
10619         * modules/mbiter (Link): Add $(LIBC32CONV).
10620         * modules/mbuiter (Link): Add $(LIBC32CONV).
10621         * modules/mbfile (Link): Add $(LIBC32CONV).
10622         * modules/mbmemcasecmp (Link): Add $(LIBC32CONV).
10623         * modules/mbmemcasecmp-tests (Makefile.am): Link test-mbmemcasecmp with
10624         $(LIBC32CONV).
10625         * modules/mbscasecmp (Link): Add $(LIBC32CONV).
10626         * modules/mbscasecmp-tests (Makefile.am): Link test-mbscasecmp with
10627         $(LIBC32CONV).
10628         * modules/mbscasestr (Link): Add $(LIBC32CONV).
10629         * modules/mbscasestr-tests (Makefile.am): Link test-mbscasestr1,
10630         test-mbscasestr2, test-mbscasestr3, test-mbscasestr4 with $(LIBC32CONV).
10631         * modules/mbschr (Link): Add $(LIBC32CONV).
10632         * modules/mbschr-tests (Makefile.am): Link test-mbschr with
10633         $(LIBC32CONV).
10634         * modules/mbscspn (Link): Add $(LIBC32CONV).
10635         * modules/mbscspn-tests (Makefile.am): Link test-mbscspn with
10636         $(LIBC32CONV).
10637         * modules/mbslen (Link): Add $(LIBC32CONV).
10638         * modules/mbsncasecmp (Link): Add $(LIBC32CONV).
10639         * modules/mbsncasecmp-tests (Makefile.am): Link test-mbsncasecmp with
10640         $(LIBC32CONV).
10641         * modules/mbsnlen (Link): Add $(LIBC32CONV).
10642         * modules/mbspbrk (Link): Add $(LIBC32CONV).
10643         * modules/mbspbrk-tests (Makefile.am): Link test-mbspbrk with
10644         $(LIBC32CONV).
10645         * modules/mbspcasecmp (Link): Add $(LIBC32CONV).
10646         * modules/mbspcasecmp-tests (Makefile.am): Link test-mbspcasecmp with
10647         $(LIBC32CONV).
10648         * modules/mbsrchr (Link): Add $(LIBC32CONV).
10649         * modules/mbsrchr-tests (Makefile.am): Link test-mbsrchr with
10650         $(LIBC32CONV).
10651         * modules/mbssep (Link): Add $(LIBC32CONV).
10652         * modules/mbsspn (Link): Add $(LIBC32CONV).
10653         * modules/mbsspn-tests (Makefile.am): Link test-mbsspn with
10654         $(LIBC32CONV).
10655         * modules/mbsstr (Link): Add $(LIBC32CONV).
10656         * modules/mbsstr-tests (Makefile.am): Link test-mbsstr1, test-mbsstr2,
10657         test-mbsstr3 with $(LIBC32CONV).
10658         * modules/mbstok_r (Link): Add $(LIBC32CONV).
10659         * modules/propername (Link): Add $(LIBC32CONV).
10660         * modules/regex-quote (Link): Add $(LIBC32CONV).
10661         * modules/regex-quote-tests (Makefile.am): Link test-regex-quote with
10662         $(LIBC32CONV).
10663         * modules/trim (Link): Add $(LIBC32CONV).
10664         * modules/trim-tests (Makefile.am): Link test-trim with $(LIBC32CONV).
10665         * modules/exclude (Link): Add $(LIBC32CONV).
10666         * modules/exclude-tests (Makefile.am): Link test-exclude with
10667         $(LIBC32CONV).
10668         * doc/posix-headers/uchar.texi: Mention the uchar-c23 module.
10669         * doc/posix-functions/mbrtoc32.texi: Likewise.
10670         * doc/strings.texi (The char32_t type): Likewise.
10672 2023-06-27  Bruno Haible  <bruno@clisp.org>
10674         striconveh: Fix module description.
10675         * modules/striconveh (Link): Add $(LIBUNISTRING).
10676         * modules/striconveha (Link): New section.
10677         * modules/xstriconveh (Link): New section.
10679 2023-06-25  Bruno Haible  <bruno@clisp.org>
10681         strncat: Update doc regarding Solaris 11.4.
10682         * doc/posix-functions/strncat.texi: Mention that the bug still exists on
10683         Solaris 11.4.
10684         * m4/strncat.m4 (gl_FUNC_STRNCAT): Update comments.
10686 2023-06-25  Bruno Haible  <bruno@clisp.org>
10688         thread: Avoid compiler warnings on Solaris.
10689         * lib/glthread/thread.h: Include <stdint.h>.
10690         (gl_thread_self_pointer): Do the cast from pthread_t to 'void *' via
10691         intptr_t.
10692         * modules/thread (Depends-on): Add stdint.
10694 2023-06-25  Bruno Haible  <bruno@clisp.org>
10696         strerrorname_np: Add support for Solaris 11.4/sparc.
10697         * lib/strerrorname_np.c (strerrorname_np): Consider ECKSUM, EFRAGS.
10698         Allow ENOANO to be overloaded to another value.
10699         * tests/test-strerrorname_np.c (main): Likewise.
10701 2023-06-25  Jim Meyering  <meyering@meta.com>
10703         doc: correct doubled "on on"
10704         * doc/glibc-functions/initstate_r.texi: As above.
10705         * doc/posix-functions/initstate.texi: As above.
10707 2023-06-25  Bruno Haible  <bruno@clisp.org>
10709         sigdescr_np tests: Avoid test failure on glibc/sparc.
10710         * tests/test-sigdescr_np.c (main): Accept the glibc result for SIGEMT.
10711         * doc/glibc-functions/sigdescr_np.texi: Mention two glibc deficiencies.
10713 2023-06-25  Bruno Haible  <bruno@clisp.org>
10715         strerrorname_np: Work around glibc bug on PowerPC, SPARC systems.
10716         * m4/strerrorname_np.m4 (gl_FUNC_STRERRORNAME_NP): Test also
10717         strerrorname_np (EDEADLOCK).
10718         * doc/glibc-functions/strerrorname_np.texi: Mention that glibc 2.36
10719         still needs a workaround.
10721 2023-06-25  Bruno Haible  <bruno@clisp.org>
10723         doc: Mention glibc initstate, initstate_r bug.
10724         * doc/posix-functions/initstate.texi: Mention glibc bug.
10725         * doc/glibc-functions/initstate_r.texi: Likewise.
10726         * tests/test-random_r.c: Add a comment.
10728 2023-06-25  Bruno Haible  <bruno@clisp.org>
10730         doc: Update doc regarding 'setstate'.
10731         * doc/posix-functions/setstate.texi: Mention also Solaris 11.4.
10733 2023-06-25  Bruno Haible  <bruno@clisp.org>
10735         doc: Update doc regarding <ieee754.h>.
10736         * doc/glibc-headers/ieee754.texi: Mention that it's not present on
10737         glibc/sparc64 in 32-bit mode.
10739 2023-06-25  Bruno Haible  <bruno@clisp.org>
10741         exclude: Complete last change.
10742         * lib/exclude.c: Include <uchar.h> instead of <wctype.h>.
10744 2023-06-24  Bruno Haible  <bruno@clisp.org>
10746         mbchar, mbiter, mbuiter: Overcome wchar_t limitations.
10747         * lib/mbchar.h: Include <uchar.h> instead of <wchar.h>, <wctype.h>.
10748         (struct mbchar): Use char32_t instead of wchar_t.
10749         (mb_casecmp, mb_caseequal): Use c32tolower instead of towlower.
10750         (mb_isalnum): Use c32isalnum instead of iswalnum.
10751         (mb_isalpha): Use c32isalpha instead of iswalpha.
10752         (mb_isblank): Use c32isblank instead of iswblank.
10753         (mb_iscntrl): Use c32iscntrl instead of iswcntrl.
10754         (mb_isdigit): Use c32isdigit instead of iswdigit.
10755         (mb_isgraph): Use c32isgraph instead of iswgraph.
10756         (mb_islower): Use c32islower instead of iswlower.
10757         (mb_isprint): Use c32isprint instead of iswprint.
10758         (mb_ispunct): Use c32ispunct instead of iswpunct.
10759         (mb_isspace): Use c32isspace instead of iswspace.
10760         (mb_isupper): Use c32isupper instead of iswupper.
10761         (mb_isxdigit): Use c32isxdigit instead of iswxdigit.
10762         (mb_width_aux): Use c32width, c32iscntrl instead of wcwidth, iswcntrl.
10763         * lib/mbiter.h: Include <uchar.h> instead of <wchar.h>.
10764         (mbiter_multi_next): Use mbrtoc32 instead of mbrtowc.
10765         * lib/mbuiter.h: Include <uchar.h> instead of <wchar.h>.
10766         (mbuiter_multi_next): Use mbrtoc32 instead of mbrtowc.
10767         * lib/mbfile.h (mbfile_multi_getc): Use mbrtoc32 instead of mbrtowc.
10768         * lib/mbscasestr.c (knuth_morris_pratt_multibyte, mbscasestr): Use
10769         c32tolower instead of towlower.
10770         * lib/exclude.c (string_hasher_ci): Use char32_t, c32tolower instead of
10771         wchar_t, towlower.
10772         * modules/mbchar (Depends-on): Add uchar, c32isalnum, c32isalpha,
10773         c32isblank, c32iscntrl, c32isdigit, c32isgraph, c32islower, c32isprint,
10774         c32ispunct, c32isspace, c32isupper, c32isxdigit, c32tolower, c32width.
10775         Remove wchar, wctype-h, iswblank, iswdigit, iswxdigit, wcwidth.
10776         * modules/mbiter (Depends-on): Add mbrtoc32, uchar. Remove mbrtowc,
10777         wchar.
10778         * modules/mbuiter (Depends-on): Likewise.
10779         * modules/mbscasestr (Depends-on): Add c32tolower.
10780         * modules/exclude (Depends-on): Add c32tolower.
10781         * doc/strings.texi (C strings): Fix typo.
10783 2023-06-22  Bruno Haible  <bruno@clisp.org>
10785         doc: Use makeinfo option to check menu structure.
10786         Trick revealed by Patrice Dumas <pertusus@free.fr> in
10787         <https://lists.gnu.org/archive/html/bug-texinfo/2023-06/msg00015.html>.
10788         * doc/Makefile (MAKEINFO): Enforce checking of menu structure.
10790 2023-06-22  Bruno Haible  <bruno@clisp.org>
10792         doc: Correct info menu structure.
10793         Reported by Elijah Zarezky <elijah@zarezky.spb.ru> in
10794         <https://lists.gnu.org/archive/html/bug-gnulib/2023-06/msg00105.html>.
10795         * doc/strings.texi (Strings): Add missing @menu item.
10797 2023-06-20  Paul Eggert  <eggert@cs.ucla.edu>
10799         doc: INSTALL uses UTF-8 now
10800         * doc/Makefile (INSTALL.ISO, INSTALL.UTF-8):
10801         Adjust to the fact that INSTALL now uses UTF-8.
10802         INSTALL.UTF-8 is now obsolescent since it is identical.
10803         (INSTALL.ISO): Transliterate all non-ASCII characters,
10804         not just single quotes.
10805         * doc/INSTALL.ISO: Regenerate.
10807 2023-06-19  Paul Eggert  <eggert@cs.ucla.edu>
10809         largefile: port to GNU/Linux s390x and alpha
10810         This patch syncs from Autoconf master.
10811         Problem reported by Matoro <https://bugs.gnu.org/64123>.
10812         * lib/autoconf/specific.m4 (_AC_SYS_LARGEFILE_TEST_CODE):
10813         New overridable macro FTYPE, to test types other than off_t.
10814         (_AC_SYS_LARGEFILE_TEST_CODE): Test ino_t for
10815         -D_FILE_OFFSETBITS=64 too, if no flags are needed for off_t.
10816         Needed for GNU/Linux on alpha and s390x.
10818 2023-06-19  Bruno Haible  <bruno@clisp.org>
10820         doc: Corrections to the "Strings and Characters" chapter.
10821         Suggested by Paul Eggert.
10822         * doc/strings.texi: Corrections: GB18030 is rarely used nowadays.
10823         <ctype.h> functions can be useful for specific data.
10825 2023-06-19  Bruno Haible  <bruno@clisp.org>
10827         doc: Use "spaced en dash" style instead of "spaced em dash" style.
10828         Suggested by Paul Eggert.
10829         * doc/gnulib.texi: At sentence level, use "spaced en dash" style instead
10830         of "spaced em dash" style.
10831         * doc/gnulib-intro.texi: Likewise.
10832         * doc/multithread.texi: Likewise.
10833         * doc/strings.texi: Likewise.
10835 2023-06-19  Bruno Haible  <bruno@clisp.org>
10837         setenv: Simplify m4 requires.
10838         * m4/setenv.m4 (gl_PREREQ_SETENV): Don't require AC_FUNC_ALLOCA.
10840 2023-06-18  Bruno Haible  <bruno@clisp.org>
10842         configmake: Bypass the unusable 'echo' command of some shells.
10843         Reported by Brian Inglis <Brian.Inglis@Shaw.ca> in
10844         <https://lists.gnu.org/archive/html/bug-gettext/2023-06/msg00054.html>.
10845         * m4/build-to-host.m4 (gl_BUILD_TO_HOST): Use 'printf' instead of
10846         'echo', because the "dash" shell has a SystemV compatible 'echo'
10847         command. Also, be sure to remove trailing CRs.
10849 2023-06-18  Paul Eggert  <eggert@cs.ucla.edu>
10851         update-copyright tests: fix to match behavior
10852         * tests/test-update-copyright.sh: Change tests to match new behavior.
10854 2023-06-18  Bruno Haible  <bruno@clisp.org>
10856         update-copyright tests: Add tests for man pages.
10857         * tests/test-update-copyright.sh: Add 4 tests that use man page syntax.
10859 2023-06-18  Bruno Haible  <bruno@clisp.org>
10861         gettext: Clarify the purpose of this module.
10862         Suggested by Paul Eggert in
10863         <https://lists.gnu.org/archive/html/bug-gnulib/2023-06/msg00089.html>.
10864         * modules/gettext (Description): Clarify the purpose.
10865         (Makefile.am): Remove outdated comment. "gettextize --intl" is no longer
10866         possible since 2019.
10868 2023-06-18  Paul Eggert  <eggert@cs.ucla.edu>
10870         Update \(en in copyright notices
10871         * build-aux/update-copyright (ndash_re): New var, matching \(en too.
10872         (stmt_remainder_re, stmt): Use it.
10873         (stmt): Match year in constructs like "\(en2023".
10874         (ndash): Now \(en in man pages.
10876 2023-06-17  Bruno Haible  <bruno@clisp.org>
10878         gettext: Update to gettext 0.22.
10879         * modules/gettext (Files): Add m4/build-to-host.m4.
10880         (configure.ac): Request infrastructure compatible with gettext 0.22.
10881         * m4/gettext.m4: Update from gettext 0.22.
10882         * m4/po.m4: Likewise.
10884 2023-06-15  Bruno Haible  <bruno@clisp.org>
10886         aligned-malloc, rmdir-errno: Sanitize configuration test result.
10887         * m4/malloc-align.m4 (gl_MALLOC_ALIGNMENT): Don't put a newline at the
10888         end of the conftest.out file.
10889         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Don't put a newline at the
10890         end of the confdir2/errno file.
10892 2023-06-13  Bruno Haible  <bruno@clisp.org>
10894         Make internationalization tests stricter on musl systems.
10895         --
10896         * m4/locale-fr.m4 (gt_LOCALE_FR): On musl systems, set LOCALE_FR_UTF8 to
10897         "fr_FR.UTF-8" instead of "none". Set and substitute
10898         LC_COLLATE_IMPLEMENTED, LC_NUMERIC_IMPLEMENTED, LC_TIME_IMPLEMENTED,
10899         LC_MONETARY_IMPLEMENTED.
10900         * m4/iswdigit.m4 (gl_FUNC_ISWDIGIT): Skip testing a certain locale if
10901         that locale is "none".
10902         * m4/iswxdigit.m4 (gl_FUNC_ISWXDIGIT): Likewise.
10903         * m4/mbrlen.m4 (gl_MBRLEN_RETVAL): Likewise.
10904         * m4/mbrtowc.m4 (gl_MBRTOWC_RETVAL): Likewise.
10905         * m4/mbrtoc32.m4 (gl_MBRTOC32_SANITYCHECK): Likewise.
10906         * m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): Likewise.
10907         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise.
10908         --
10909         * tests/test-c32isalpha.c (main): On musl libc, disable tests that fail.
10910         * tests/test-c32iscntrl.c (main): Likewise.
10911         * tests/test-c32isgraph.c (main): Likewise.
10912         * tests/test-c32islower.c (main): Likewise.
10913         * tests/test-c32isprint.c (main): Likewise.
10914         * tests/test-c32toupper.c (main): Likewise.
10915         * tests/test-nl_langinfo1.c (main): Likewise.
10916         * tests/test-nl_langinfo2.c (main): Likewise.
10917         * modules/c32isalpha-tests (Files): Add musl.m4.
10918         (configure.ac): Invoke gl_MUSL_LIBC.
10919         * modules/c32iscntrl-tests (Files): Add musl.m4.
10920         (configure.ac): Invoke gl_MUSL_LIBC.
10921         * modules/c32isgraph-tests (Files): Add musl.m4.
10922         (configure.ac): Invoke gl_MUSL_LIBC.
10923         * modules/c32islower-tests (Files): Add musl.m4.
10924         (configure.ac): Invoke gl_MUSL_LIBC.
10925         * modules/c32isprint-tests (Files): Add musl.m4.
10926         (configure.ac): Invoke gl_MUSL_LIBC.
10927         * modules/c32toupper-tests (Files): Add musl.m4.
10928         (configure.ac): Invoke gl_MUSL_LIBC.
10929         * modules/nl_langinfo-tests (Files): Add musl.m4.
10930         (configure.ac): Invoke gl_MUSL_LIBC.
10931         --
10932         * tests/test-strtod1.sh: Skip the test if LC_NUMERIC_IMPLEMENTED is
10933         false.
10934         * tests/test-strtold1.sh: Likewise.
10935         * tests/test-vasnprintf-posix2.sh: Likewise.
10936         * tests/test-vasnwprintf-posix2.sh: Likewise.
10937         * modules/strtod-tests (Makefile.am): Set LC_NUMERIC_IMPLEMENTED in the
10938         tests environment.
10939         * modules/strtold-tests (Makefile.am): Likewise.
10940         * modules/vasnprintf-posix-tests (Makefile.am): Likewise.
10941         * modules/vasnwprintf-posix-tests (Makefile.am): Likewise.
10943 2023-06-12  Bruno Haible  <bruno@clisp.org>
10945         vasnwprintf-posix: Work around another musl libc bug.
10946         * m4/printf.m4 (gl_SWPRINTF_DIRECTIVE_LC): New macro.
10947         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Invoke it, and set
10948         NEED_WPRINTF_DIRECTIVE_LC if the %lc test failed.
10949         * lib/vasnprintf.c (VASNPRINTF): If NEED_WPRINTF_DIRECTIVE_LC is set, do
10950         the processing for %lc and %ls ourselves.
10951         (local_wcslen): Update condition.
10952         * doc/posix-functions/swprintf.texi: Mention the %lc problem.
10954 2023-06-12  Bruno Haible  <bruno@clisp.org>
10956         vasnwprintf-posix: Work around a musl libc bug.
10957         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Test also whether swprintf
10958         in the C locale is free of encoding errors, and set
10959         NEED_WPRINTF_DIRECTIVE_C if not.
10960         * doc/posix-functions/swprintf.texi: Clarify the list of platforms for
10961         the %c problem.
10963 2023-06-12  Bruno Haible  <bruno@clisp.org>
10965         vasnwprintf: Fix some cross-compilation results.
10966         * m4/printf.m4 (gl_SWPRINTF_WORKS): Fix cross-compilation result for
10967         musl.
10968         (gl_SWPRINTF_DIRECTIVE_LA): Fix cross-compilation result for Android.
10970 2023-06-12  Bruno Haible  <bruno@clisp.org>
10972         warnings: Save memory and CPU time when inhibiting all warnings.
10973         * m4/warnings.m4 (gl_WARN_ADD): Improve comments.
10974         (gl_CC_INHIBIT_WARNINGS): Add also '-fno-analyzer' to
10975         GL_CFLAG_INHIBIT_WARNINGS.
10976         (gl_CXX_INHIBIT_WARNINGS): Add also '-fno-analyzer' to
10977         GL_CXXFLAG_INHIBIT_WARNINGS.
10979 2023-06-11  Bruno Haible  <bruno@clisp.org>
10981         javacomp-script, javacomp: Document effects of yesterday's change.
10982         * NEWS: Mention yesterday's change.
10984 2023-06-11  Bruno Haible  <bruno@clisp.org>
10986         javacomp-script, javacomp: Silence javac warnings regarding [options].
10987         * m4/javacomp.m4 (gt_JAVACOMP): Use option '-Xlint:-options' by default
10988         and omit it only when it does not work.
10989         * lib/javacomp.c (compile_using_javac): Add nowarn_option parameter.
10990         (is_envjavac_usable): Add nowarn_option_out parameter. Use option
10991         '-Xlint:-options' by default and omit it only when it does not work.
10992         (is_javac_usable): Likewise.
10993         (compile_java_class): Store the nowarn_option returned from
10994         is_envjavac_usable and use it when invoking compile_using_envjavac.
10995         Store the nowarn_option returned from is_javac_usable and use it when
10996         invoking compile_using_javac.
10998 2023-06-10  Bruno Haible  <bruno@clisp.org>
11000         javacomp-script, javacomp: Add support for javac versions > 11.
11001         Reported by Adrian Bunk <bunk-gnu@fs.tum.de> in
11002         <https://savannah.gnu.org/bugs/?63385>.
11003         * m4/javacomp.m4 (gt_JAVACOMP): When the java version is > 11, use that
11004         version as target_version, not 11. When the java version is > 17, don't
11005         warn. Remove goodcode, failcode variables. Don't bail out if the
11006         source-version argument or the target-version argument is in the range
11007         12..99. Use a heuristic that works with javac versions 11..20 at least.
11008         Update comments.
11009         * lib/javacomp.h (compile_java_class): State that source-version and
11010         target-version may be larger than 11.
11011         * lib/javacomp.c (default_target_version): Accommodate versions up to
11012         99.
11013         (SOURCE_VERSION_BOUND): Increase to 94.
11014         (source_version_index): Accept versions up to 99.
11015         (get_goodcode_snippet, get_failcode_snippet): Remove functions.
11016         (TARGET_VERSION_BOUND): Increase to 94.
11017         (target_version_index): Accept versions up to 99.
11018         (corresponding_classfile_version): Remove function.
11019         (execute_and_read_line): New function, based on lib/javaversion.c.
11020         (get_compiler_version): New function.
11021         (is_envjavac_usable): Add parameters source_option_out,
11022         target_option_out. Use a heuristic that works with javac versions 11..20
11023         at least. Call cleanup_temp_dir.
11024         (is_javac_usable): Likewise.
11025         (compile_java_class): Update.
11027 2023-06-10  Bruno Haible  <bruno@clisp.org>
11029         javacomp-script, javacomp: Remove support for javac versions < 1.6.
11030         * m4/javacomp.m4 (gt_JAVACOMP): State that the minimum source_version
11031         and the minimum target_version are 1.6. Map smaller values to 1.6.
11032         Complain if the java version is < 1.6. Use 1.6 as default, instead of
11033         1.1. Don't bother trying the -target option alone.
11034         * lib/javacomp.h (compile_java_class): State that the minimum
11035         source_version and the minimum target_version are 1.6.
11036         * lib/javacomp.c (default_target_version): Complain if the java version
11037         is < 1.6. Use 1.6 as default, instead of 1.1.
11038         (SOURCE_VERSION_BOUND, source_version_index, get_goodcode_snippet,
11039         get_failcode_snippet): Adjust to the new minimum source_version = 1.6.
11040         (TARGET_VERSION_BOUND, target_version_index,
11041         corresponding_classfile_version): Adjust to the new minimum
11042         target_version = 1.6.
11043         (get_source_version_for_javac): Remove function.
11044         (is_envjavac_usable): Remove source_version_for_javac parameter. Don't
11045         bother trying the -target option alone.
11046         (is_javac_usable): Likewise.
11047         (compile_java_class): Map source_version < 1.6 to 1.6. Map
11048         target_version < 1.6 to 1.6. Use source_version instead of calling
11049         get_source_version_for_javac.
11051 2023-06-10  Bruno Haible  <bruno@clisp.org>
11053         javacomp: Simplify after gcj support was removed.
11054         * m4/javacomp.m4 (gt_JAVACOMP): Don't create conftestlib.java.
11055         * lib/javacomp.c (compile_java_class): Remove local variables
11056         no_assert_option, fsource_option, ftarget_option.
11058 2023-06-09  Bruno Haible  <bruno@clisp.org>
11060         doc: Document <stdatomic.h>.
11061         * doc/posix-headers/stdatomic.texi: New file.
11062         * doc/gnulib.texi (Header File Substitutes): Include it.
11064 2023-06-09  Jim Meyering  <meyering@meta.com>
11066         maint.mk: sc_prohibit_xalloc_without_use: also match alloc_die
11067         * top/maint.mk (sc_prohibit_xalloc_without_use):
11068         Adjust in-comment command's regexp so it also finds alloc_die,
11069         whose declaration has a prefix of "_Noreturn ".
11070         Also delete some now-obsolete commentary.
11071         (_xa1): Regenerate the regexp using that command.
11072         Reported by Pádraig Brady in
11073         <https://lists.gnu.org/r/bug-gnulib/2023-06/msg00062.html>.
11075 2023-06-09  Paul Eggert  <eggert@cs.ucla.edu>
11077         xalloc-die: omit /*extern*/
11078         * lib/xalloc.h (xalloc_die): Omit leading "/*extern*/".
11079         It complicates syntax checking; see:
11080         https://lists.gnu.org/r/bug-gnulib/2023-06/msg00062.html
11081         Plus, it’s inconsistent style: the other function declarations in
11082         xalloc.h don’t use ‘extern’. (I’m not a fan of using ‘extern’ when
11083         it’s just noise, as is the case here.)
11085 2023-06-09  Bruno Haible  <bruno@clisp.org>
11087         javaversion: Update comments.
11088         * lib/javaversion.h (javaexec_version): Document the possible results up
11089         to OpenJDK 20.
11091 2023-06-09  Bruno Haible  <bruno@clisp.org>
11093         javacomp: Remove support for 'jikes'.
11094         * lib/javacomp.c (compile_using_jikes, is_jikes_present): Remove
11095         functions.
11096         (compile_java_class): Remove jikes related code.
11098         javacomp-script: Remove support for 'jikes'.
11099         * build-aux/javacomp.sh.in: Don't test HAVE_JIKES.
11100         * m4/javacomp.m4 (gt_JAVACOMP): Don't set HAVE_JIKES. Don't set
11101         CONF_JAVAC to 'jikes'. Update comment.
11102         (gt_JAVACOMP_DISABLED): Don't set HAVE_JIKES.
11104 2023-06-09  Bruno Haible  <bruno@clisp.org>
11106         javacomp: Remove support for 'gcj'.
11107         * lib/javacomp.h: Update comment.
11108         * lib/javacomp.c (compile_using_gcj, is_envjavac_gcj, is_envjavac_gcj43,
11109         is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
11110         is_envjavac_oldgcj_14_13_usable, is_gcj_present, is_gcj_43,
11111         is_gcj43_usable, is_oldgcj_14_14_usable, is_oldgcj_14_13_usable): Remove
11112         functions.
11113         (is_envjavac_usable): Renamed from is_envjavac_nongcj_usable.
11114         (compile_java_class): Remove gcj related code.
11116         javacomp-script: Remove support for 'gcj'.
11117         * build-aux/javacomp.sh.in: Don't test HAVE_GCJ_C.
11118         * m4/javacomp.m4 (gt_JAVACOMP): Don't set HAVE_GCJ_C. Don't test whether
11119         $JAVAC is gcj. Don't set CONF_JAVAC to 'gcj -C'. Update comment.
11120         (gt_JAVACOMP_DISABLED): Don't set HAVE_GCJ_C.
11122         javaexec: Remove support for 'gij'.
11123         * lib/javaexec.c (execute_java_class): Don't test for gij.
11125         javaexec-script: Remove support for 'gij'.
11126         * build-aux/javaexec.sh.in: Don't test HAVE_GIJ.
11127         * m4/javaexec.m4 (gt_JAVAEXEC): Don't set HAVE_GIJ. Don't set CONF_JAVA
11128         to 'gij'.
11129         * m4/javacomp.m4: Update comment.
11131 2023-06-09  Bruno Haible  <bruno@clisp.org>
11133         javaexec: Remove support for 'jview'.
11134         * lib/javaexec.c (execute_java_class): Don't test for jview.
11136         javaexec-script: Remove support for 'jview'.
11137         * build-aux/javaexec.sh.in: Don't test HAVE_JVIEW.
11138         * m4/javaexec.m4 (gt_JAVAEXEC): Don't set HAVE_JVIEW. Don't set
11139         CONF_JAVA to 'jview'.
11140         (gt_JAVAEXEC_DISABLED): Don't set HAVE_JVIEW.
11141         * m4/javacomp.m4: Update comment.
11143 2023-06-06  Jim Meyering  <meyering@meta.com>
11145         maint.mk: regenerate regex to reflect new functions in xalloc.h
11146         * top/maint.mk (sc_prohibit_xalloc_without_use) [_xa1]:
11147         Regenerate using the command listed in the comment.
11149 2023-06-06  Paul Eggert  <eggert@cs.ucla.edu>
11151         propername: pacify po_check
11152         Problem reported by Bruno Haible <https://bugs.gnu.org/63933>.
11153         * lib/propername.h: Change comment.
11155         Put "/" at end of .gitignore directory names
11156         * build-aux/bootstrap: Regenerate.
11157         * top/bootstrap-funclib.sh (symlink_to_dir, autogen):
11158         Put slashes after .gitignore entries that name directories.
11160 2023-06-06  Jose E. Marchesi  <jemarch@gnu.org>
11162         maintainer-makefile: Enforce the GNU Coding Standards in the README.
11163         * top/maint.mk (sc_readme_link_install): New rule.
11164         (sc_readme_link_copying): Likewise.
11166 2023-06-05  Paul Eggert  <eggert@cs.ucla.edu>
11168         copy-file-range: support building for older kernels
11169         * m4/copy-file-range.m4 (gl_FUNC_COPY_FILE_RANGE):
11170         Remove static check, to support the dubious practice of
11171         building for platforms that predate the build platform.
11172         On working kernels this adds an extra syscall the first time
11173         that copy_file_range is used.  Problem reported for Gentoo by
11174         Sam James <https://bugs.gnu.org/63850>.
11176         manywarnings: more nuance about optimization
11177         * doc/manywarnings.texi (manywarnings): Suggest compiling with the
11178         optimization flags commonly used, as opposed to -O2 and -O0
11179         specifically.  -ggdb shouldn’t affect warnings so don’t mention it.
11181 2023-06-05  Bruno Haible  <bruno@clisp.org>
11183         posix_spawn-internal: Fix a warning (regression 2022-11-20).
11184         * lib/spawni.c: Don't use this particular #pragma for gcc < 4.2.
11186 2023-06-05  Bruno Haible  <bruno@clisp.org>
11188         file-has-acl: Fix compilation error on Slackware 13 (regr. 2023-05-12).
11189         * lib/file-has-acl.c (XATTR_NAME_POSIX_ACL_ACCESS,
11190         XATTR_NAME_POSIX_ACL_DEFAULT): Add fallback definitions.
11192 2023-06-05  Bruno Haible  <bruno@clisp.org>
11194         Fix bugs on mingw when module dirfd is in use (regression 2023-04-26).
11195         * lib/getcwd.c: When GNULIB_defined_DIR, revert to the system's
11196         definitions of opendir, closedir, readdir, rewinddir.
11197         * lib/mountlist.c: When GNULIB_defined_DIR, revert to the system's
11198         definitions of opendir, closedir, readdir.
11199         * lib/scandir.c: Likewise.
11200         * lib/glob.c: Fix comment. When GNULIB_defined_DIR, don't undefine
11201         opendir, closedir.
11203 2023-06-04  Bruno Haible  <bruno@clisp.org>
11205         manywarnings: Overhaul documentation.
11206         * doc/manywarnings.texi: In the example, put all unwanted warning
11207         options into 'nw', and use a second gl_MANYWARN_COMPLEMENT invocation to
11208         sort out how these options need to get added to WARN_FLAGS.
11209         Describe the first-time use in more detail: Recommend a new GCC.
11210         Recommend to test builds with -O2 and with -O0. Suggest to sort the
11211         warning by warning option. Add reference to the GCC pragma's
11212         documentation.
11214 2023-06-04  Bruno Haible  <bruno@clisp.org>
11216         error: Fix support for library namespacing (regression 2023-05-27).
11217         * lib/error.in.h (error): If error is defined as a macro, define a
11218         static inline function _gl_inline_error that invokes it, and let the
11219         new error macro invoke that function.
11220         (error_at_line): If error_at_line is defined as a macro, define a static
11221         inline function _gl_inline_error_at_line that invokes it, and let the
11222         new error_at_line macro invoke that function.
11224 2023-06-04  Bruno Haible  <bruno@clisp.org>
11226         terminfo, termcap: Fix "discards 'const' qualifier" warnings.
11227         * lib/tparm.c (tparm): Change type of 'fmt'. New local variable 'fmtp'.
11229 2023-06-04  Bruno Haible  <bruno@clisp.org>
11231         uniname/uniname: Add comments.
11232         * modules/uniname/uniname (Makefile.am): Explain how to work around a
11233         GCC bug.
11235 2023-06-04  Bruno Haible  <bruno@clisp.org>
11237         uniname/uniname: Fix -Wformat-signedness warning.
11238         * lib/uniname/uniname.c (unicode_character_name): Use %u instead of %d
11239         in format string.
11241 2023-06-04  Bruno Haible  <bruno@clisp.org>
11243         uniname/uniname: Improve comments.
11244         * lib/uniname/uniname.c (unicode_character_name): Fix comments.
11246 2023-06-03  Bruno Haible  <bruno@clisp.org>
11248         classpath, csharpexec: Avoid "candidate for attribute 'malloc'" warning.
11249         * lib/classpath.h (set_classpath): Mark with attribute 'malloc'.
11251 2023-06-03  Bruno Haible  <bruno@clisp.org>
11253         propername-lite: Improve documentation.
11254         * lib/propername.h: Describe functional differences between
11255         proper_name_lite and proper_name_utf8.
11257 2023-06-03  Bruno Haible  <bruno@clisp.org>
11259         gnulib-tool: Keep in sync with last change to gnulib-tool.py.
11260         * gnulib-tool (func_emit_po_Makevars): Treat proper_name_lite like
11261         proper_name_utf8.
11263 2023-06-03  Bruno Haible  <bruno@clisp.org>
11265         error: Improve comments.
11266         * lib/error.in.h (__gl_error_call): Add more comments.
11268 2023-06-02  Paul Eggert  <eggert@cs.ucla.edu>
11270         error: do not evaluate status twice
11271         Do this in a different way, so that the status is evaluated
11272         once even when not optimizing and when using GCC.
11273         * lib/error.in.h (__gl_error_call1) [__GNUC__]: New macro.
11274         (__gl_error_call) [__GNUC__]: Use it.
11276 2023-06-02  Bruno Haible  <bruno@clisp.org>
11278         warnings: Add ability to inhibit all warnings.
11279         * m4/warnings.m4 (gl_CC_INHIBIT_WARNINGS, gl_CXX_INHIBIT_WARNINGS): New
11280         macros, based on gl_CC_ALLOW_WARNINGS and gl_CXX_ALLOW_WARNINGS in
11281         m4/gnulib-common.m4.
11283 2023-06-02  Paul Eggert  <eggert@cs.ucla.edu>
11285         propername-lite: new module
11286         propername_lite acts like propername_utf8 but needs less
11287         infrastructure, e.g., it does not worry about memory allocation.
11288         * MODULES.html.sh (func_all_modules): Mention it.
11289         * lib/propername.h (proper_name_lite): New decl.
11290         * lib/propername-lite.c, modules/propername-lite: New files.
11291         * pygnulib/GLEmiter.py (GLEmiter.po_Makevars):
11292         Treat proper_name_lite like proper_name_utf8.
11294 2023-06-02  Bruno Haible  <bruno@clisp.org>
11296         openmp-init: Silence "no previous prototype for 'openmp_init'" warning.
11297         * lib/omp.in.h: Test _OPENMP.
11298         * lib/omp-init.c: Include <omp.h> always.
11299         * modules/openmp-init (Include): Allow <omp.h> to be included always.
11301 2023-06-02  Bruno Haible  <bruno@clisp.org>
11303         term-style-control: Silence -Wshadow warning.
11304         * lib/term-style-control.c (continuing_signal_handler): Rename
11305         parameter.
11307 2023-06-02  Bruno Haible  <bruno@clisp.org>
11309         pipe-filter-gi, pipe-filter-ii: Silence -Wunused-macro warning.
11310         * lib/pipe-filter-aux.c: Remove many unnecessary includes.
11311         (_): Remove macro.
11313 2023-06-02  Bruno Haible  <bruno@clisp.org>
11315         javacomp: Silence -Wanalyzer-possible-null-argument warning.
11316         * lib/javacomp.c: Include verify.h.
11317         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_13_usable,
11318         is_envjavac_nongcj_usable, compile_java_class): Assert that the
11319         xasprintf results are non-NULL. This is possible since all involved
11320         format strings are valid and don't use %ls, and all argument strings
11321         are small compared to INT_MAX.
11322         * modules/javacomp (Depends-on): Add verify.
11324 2023-06-02  Bruno Haible  <bruno@clisp.org>
11326         striconveha: Don't crash if malloc() returns NULL.
11327         * lib/striconveha.c (mem_iconveha, str_iconveha): Check malloca() return
11328         value.
11330 2023-06-02  Bruno Haible  <bruno@clisp.org>
11332         setenv: Don't crash if malloc() returns NULL.
11333         * lib/setenv.c (rpl_setenv): Check malloca() return value.
11335 2023-06-02  Bruno Haible  <bruno@clisp.org>
11337         error: Avoid implicit-fallthrough warnings with -O0 (regr. 2023-05-30).
11338         * lib/error.in.h (__gl_error_call): Parenthesize status. When not
11339         optimizing, expand to code without compound statements.
11341 2023-06-01  Bruno Haible  <bruno@clisp.org>
11343         getprogname: Add support for ASCII-compatible environments in z/OS.
11344         Reported by Mike Fulton <mikefultonpersonal@gmail.com> in
11345         <https://lists.gnu.org/archive/html/bug-gnulib/2023-05/msg00198.html>.
11346         * lib/getprogname.c (getprogname): On z/OS, when compiling for an
11347         ASCII-compatible environment, convert the result from EBCDIC to ASCII.
11349 2023-06-01  Mitch Capper  <mitch.capper@gmail.com>
11351         gnulib-tool.py: Fix a format string mistake.
11352         * pygnulib/GLImport.py (GLImport.execute): Fix a typo in a format
11353         string.
11354         Copyright-paperwork-exempt: Yes
11356 2023-06-01  Bruno Haible  <bruno@clisp.org>
11358         Add info for maintainers and contributors.
11359         * HACKING: New file.
11361 2023-05-30  Nick Bowler  <nbowler@draconx.ca>
11363         readline: fix memory leak in replacement readline.
11364         * lib/readline.c (readline): Free memory after getline failure.
11365         Copyright-paperwork-exempt: true
11367 2023-05-30  Paul Eggert  <eggert@cs.ucla.edu>
11369         error: don’t call ‘exit’
11370         Let the underlying functions call ‘exit’, instead of having the
11371         Gnulib replacement macros do it.  Use ‘unreachable’ to tell the
11372         compiler that those functions exit when the status is nonzero.
11373         This saves a function call.
11374         * lib/error.in.h: Include stddef.h, not stdlib.h.
11375         (__gl_error_call): Rely on the function to exit, using
11376         ‘unreachable’ to tell the compiler that the function does not return.
11377         * modules/error (Depends-on): Add stddef.
11379         error: don’t evaluate status arg twice
11380         This avoids potential issues if the first argument has a side effect.
11381         * lib/error.in.h (__gl_error_call): New macro, which evaluates its
11382         status arg only once, by using a statement expression if GNU C -
11383         the only platform we need to worry about pacifying - and by simply
11384         calling ‘error’ otherwise.
11385         (error, error_at_line): Use it.
11387 2023-05-28  Bruno Haible  <bruno@clisp.org>
11389         warnings, manywarnings: Assume autoconf >= 2.64.
11390         * m4/warnings.m4 (gl_AS_VAR_APPEND): Remove macro.
11391         (gl_COMPILER_OPTION_IF, gl_WARN_ADD): Use AS_VAR_APPEND instead of
11392         gl_AS_VAR_APPEND.
11393         * m4/manywarnings.m4: Likewise.
11395 2023-05-28  Jim Meyering  <meyering@fb.com>
11397         file-has-acl: avoid warning from bleeding-edge GCC
11398         * lib/file-has-acl.c: Include attribute.h.
11399         (have_xattr): Declare with ATTRIBUTE_PURE,
11400         to avoid new warning from GCC14-to-be.
11401         * modules/file-has-acl (Depends-on): Add attribute.
11402         Spotted while building coreutils with this:
11403         gcc version 14.0.0 20230526 (experimental)
11405 2023-05-28  Bruno Haible  <bruno@clisp.org>
11407         error: Avoid -Wint-in-bool-context warning.
11408         Reported by Pádraig Brady in
11409         <https://lists.gnu.org/archive/html/bug-gnulib/2023-05/msg00178.html>.
11410         * lib/error.in.h (error, error_at_line): Use 'status != 0', since status
11411         is expected to be an int, not a bool value.
11413 2023-05-27  Bruno Haible  <bruno@clisp.org>
11415         error: Support the compiler's control flow analysis better.
11416         * lib/error.in.h: Remove @PRAGMA_SYSTEM_HEADER@. Include <stdlib.h>.
11417         (error): Define as a macro that explicitly invokes exit().
11418         (error_at_line): Likewise.
11419         * lib/error.c (_GL_NO_INLINE_ERROR): Define before including error.h.
11420         * modules/error-h (configure.ac): Don't invoke gl_CONDITIONAL_HEADER.
11421         (Makefile.am): Generate error.h always. Don't substitute
11422         PRAGMA_SYSTEM_HEADER.
11423         * m4/error_h.m4 (gl_ERROR_H): Set COMPILE_ERROR_C instead of
11424         GL_GENERATE_ERROR_H.
11425         * modules/error (configure.ac, Depends-on): Test COMPILE_ERROR_C instead
11426         of GL_GENERATE_ERROR_H.
11427         * lib/copy-file.c: Revert the last change.
11429 2023-05-26  Bruno Haible  <bruno@clisp.org>
11431         flexmember: Make it easier to use.
11432         * lib/flexmember.h (FLEXNSIZEOF): New macro.
11433         * lib/hamt.c (alloc_bucket, alloc_subtrie): Fix FLEXSIZEOF invocation.
11434         Use FLEXNSIZEOF instead of FLEXSIZEOF.
11435         * lib/ssfmalloc.h (init_small_block_page_pool): Use FLEXNSIZEOF instead
11436         of FLEXSIZEOF.
11438 2023-05-26  Bruno Haible  <bruno@clisp.org>
11440         diffseq: Silence another gcc warning.
11441         * lib/diffseq.h (compareseq): Move into the scope of the '#pragma GCC
11442         diagnostic'.
11444 2023-05-26  Bruno Haible  <bruno@clisp.org>
11446         copy-file: Silence gcc warnings.
11447         * lib/copy-file.c: Add #pragma GCC diagnostic.
11449 2023-05-26  Bruno Haible  <bruno@clisp.org>
11451         diffseq: Silence gcc warning.
11452         * lib/diffseq.h: Add #pragma GCC diagnostic.
11454 2023-05-24  Paul Eggert  <eggert@cs.ucla.edu>
11456         manywarnings: speed up nomfi test
11457         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Simplify and speed up
11458         on current platforms, by seeing first whether
11459         -Wno-missing-field-initializers is needed (it isn’t), so that
11460         later we don’t need to determine whether it’s supported.
11462         Simplify -Wno-missing-field-initializers checking
11463         * m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): Don’t worry about
11464         -Wmissing-field-initializers, as this is no longer needed now that
11465         gl_MANYWARN_ALL_GCC is fixed.
11467         manywarnings: port better to GCC 11.2 and earlier
11468         Problem reported by Bruno Haible in:
11469         https://lists.gnu.org/r/bug-diffutils/2023-05/msg00015.html
11470         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC):
11471         Also test for GCC bug 82283
11472         <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82283>.
11474 2023-05-24  Bruno Haible  <bruno@clisp.org>
11476         asyncsafe-spin, simple-atomic: Don't use -mcpu-v9 on NetBSD/sparc.
11477         Reported by Brandon Applegate in
11478         <https://lists.gnu.org/archive/html/bug-gettext/2023-05/msg00042.html>.
11479         * lib/asyncsafe-spin.c: Limit the SPARC workaround to Solaris.
11480         * lib/simple-atomic.c: Likewise.
11481         * m4/sparcv8+.m4 (gl_SPARC_V8PLUS): Likewise.
11483 2023-05-23  Paul Eggert  <eggert@cs.ucla.edu>
11485         nstrftime: wmemmove → __wmemmove in glibc part
11486         https://sourceware.org/pipermail/libc-alpha/2023-May/148435.html
11487         * lib/nstrftime.c (__strftime_internal) [COMPILE_WIDE]:
11488         Use __wmemmove, not wmemmove, to keep in better sync with draft glibc.
11490 2023-05-22  Bruno Haible  <bruno@clisp.org>
11492         git-merge-changelog: Code style changes.
11493         * lib/git-merge-changelog.c: Don't make side effects to variables
11494         inside parenthesized expressions. Write (size_t)(-1), for consistency
11495         with gl_list.h.
11496         (compute_mapping): Rename variable in2 to jrev.
11498 2023-05-21  Paul Eggert  <eggert@cs.ucla.edu>
11500         strtol: match 'configure' to 'make check'
11501         Inferred from report by Tomasz Kłoczko <https://bugs.gnu.org/63632>.
11502         * m4/strtol.m4 (gl_FUNC_STRTOL):
11503         * m4/strtoll.m4 (gl_FUNC_STRTOLL):
11504         Also test "0b", since the test cases check it.
11506         git-merge-changelog: port to size_t padding
11507         * lib/git-merge-changelog (entry_hashcode):
11508         As a nicety, Prefer SIZE_WIDTH to computing it ourselves.
11510         git-merge-changelog: prefer idx_t
11511         * lib/git-merge-changelog.c: Include idx.h.
11512         (struct entry, entry_create, entry_hashcode)
11513         (struct changelog_file, read_changelog_file)
11514         (entries_mapping_get, entries_mapping_reverse_get)
11515         (compute_mapping, struct edit, struct differences)
11516         (compute_differences, find_paragraph_end)
11517         (try_split_merged_entry, struct conflict, conflict_write, main):
11518         Prefer idx_t to ptrdiff_t and size_t when the value is a
11519         nonnegative index or size.  Change a few for-loops so that
11520         the index never goes negative.
11521         * modules/git-merge-changelog (Depends-on): Add idx.
11523         git-merge-changelog: ssize_t → ptrdiff_t
11524         Prefer ptrdiff_t to ssize_t, as per
11525         <https://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00019.html>.
11526         * lib/git-merge-changelog.c (struct entries_mapping)
11527         (entries_mapping_get, entries_mapping_reverse_get)
11528         (compute_mapping, struct edit, struct differences, OFFSET)
11529         (OFFSET_MAX, EXTRA_CONTEXT_FIELDS, compute_differences, main):
11530         Use ptrdiff_t, not ssize_t.
11531         * modules/git-merge-changelog (Depends-on): Add stdint for PTRDIFF_MAX.
11533         git-merge-changelog: port to ssize_t padding
11534         * lib/git-merge-changelog.c (OFFSET_MAX): New macro, as a nicety.
11536 2023-05-21  Bruno Haible  <bruno@clisp.org>
11538         limits-h tests: Check the value of SSIZE_MAX.
11539         * tests/test-limits-h.c (limits12): New variable.
11540         Include <sys/types.h> and check the value of SSIZE_MAX.
11541         * modules/limits-h-tests (Depends-on): Add sys_types.
11543 2023-05-21  Bruno Haible  <bruno@clisp.org>
11545         ssize_t: Fix replacement on 64-bit Windows.
11546         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Use prefix 'gl_' instead of 'gt_'.
11547         Define ssize_t to 'long long' or 'long', depending on the width of
11548         'size_t'.
11550 2023-05-20  Paul Eggert  <eggert@cs.ucla.edu>
11552         limits-h: other modules can rely on SSIZE_MAX
11553         * lib/areadlink-with-size.c, lib/areadlinkat-with-size.c:
11554         * lib/careadlinkat.c, lib/getdelim.c, lib/getndelim2.c:
11555         * lib/regex_internal.h:
11556         (SSIZE_MAX): Do not define.
11557         * modules/areadlink-with-size, modules/areadlinkat-with-size:
11558         * modules/careadlinkat, modules/getdelim, modules/getndelim2:
11559         * modules/regex:
11560         (Depends-on) Add limits-h.
11562         limits-h: define SSIZE_MAX
11563         * doc/posix-headers/limits.texi (limits.h): Document this.
11564         * lib/limits.in.h (SSIZE_MAX): Define if not already defined.
11565         * m4/limits-h.m4 (gl_LIMITS_H): Also generate limits.h
11566         if <limits.h> does not define SSIZE_MAX.
11568         diffseq: backward compatibility for OFFSET_MAX
11569         * lib/diffseq.h (OFFSET_MAX): Define only if not already defined.
11571 2023-05-19  Bruno Haible  <bruno@clisp.org>
11573         careadlinkat: Silence gcc warning for GCC ≥ 12.
11574         * lib/careadlinkat.c: For GCC 12 or newer, use
11575         "#pragma GCC diagnostic ignored" to silence the warning.
11577 2023-05-19  Pádraig Brady  <P@draigBrady.com>
11579         modechange: pacify gcc -Wsuggest-attribute=pure
11580         * lib/modechange.h (mode_adjust): Add _GL_ATTRIBUTE_PURE
11581         suggested with GCC 12 with -flto.
11583 2023-05-19  Paul Eggert  <eggert@cs.ucla.edu>
11585         diffseq: don’t assume integers lack padding
11586         * NEWS: Mention this.
11587         * lib/diffseq.h (OFFSET_MAX): Don’t define;
11588         this is now the user’s responsibility.
11589         * lib/fstrcmp.c (OFFSET_MAX): Define to PTRDIFF_MAX.
11591 2023-05-18  Bruno Haible  <bruno@clisp.org>
11593         getndelim2: Silence gcc warning.
11594         * lib/getndelim2.c: Add #pragma GCC diagnostic.
11595         (IF_LINT): Remove macro.
11596         (getndelim2): Remove use of IF_LINT.
11598 2023-05-18  Bruno Haible  <bruno@clisp.org>
11600         canonicalize: Silence gcc warning.
11601         * lib/canonicalize.c: Add #pragma GCC diagnostic.
11602         (IF_LINT): Remove macro.
11603         (canonicalize_filename_mode_stk): Remove use of IF_LINT.
11605 2023-05-18  Bruno Haible  <bruno@clisp.org>
11607         vasnprintf, c-vasnprintf: Silence gcc warning.
11608         * lib/vasnprintf.c: Add #pragma GCC diagnostic.
11610 2023-05-18  Bruno Haible  <bruno@clisp.org>
11612         nstrftime: Silence gcc warning.
11613         * lib/nstrftime.c: Add #pragma GCC diagnostic.
11615 2023-05-18  Bruno Haible  <bruno@clisp.org>
11617         astrxfrm: Silence gcc warning.
11618         * lib/astrxfrm.c: Add #pragma GCC diagnostic.
11620 2023-05-18  Bruno Haible  <bruno@clisp.org>
11622         vasnprintf, c-vasnprintf: Silence gcc warnings.
11623         * lib/vasnprintf.c (scale10_round_decimal_decoded): Remove memory==NULL
11624         test.
11625         (scale10_round_decimal_long_double, scale10_round_decimal_double): Test
11626         for memory==NULL here. Remove use of IF_LINT.
11628 2023-05-18  Bruno Haible  <bruno@clisp.org>
11630         bitset: Silence gcc warning.
11631         * lib/bitset/list.c (lbitset_copy_): Remove redundant test from the
11632         loop's first iteration.
11634 2023-05-18  Bruno Haible  <bruno@clisp.org>
11636         stack: Silence gcc warning in tests.
11637         * lib/stack.h (init, destroy, empty, current_base, push, pop, discard,
11638         top, size): Mark as possibly unused.
11640 2023-05-18  Bruno Haible  <bruno@clisp.org>
11642         hamt: Silence gcc warning.
11643         * lib/hamt.c (init_element): Mark as possibly unused.
11645 2023-05-18  Bruno Haible  <bruno@clisp.org>
11647         get-rusage-data: Silence gcc warning.
11648         * lib/get-rusage-data.c (get_rusage_data_via_iterator): Mark as possibly
11649         unused.
11651 2023-05-18  Bruno Haible  <bruno@clisp.org>
11653         astrxfrm: Fix use-after-free bug.
11654         * lib/astrxfrm.c (astrxfrm): Don't use memcpy after realloc succeeded.
11656 2023-05-18  Bruno Haible  <bruno@clisp.org>
11658         gnulib-tool: Ignore .orig and .rej files under modules/.
11659         * gnulib-tool (func_sanitize_modulelist): Exclude also files whose name
11660         ends in .orig or .rej.
11661         * pygnulib/GLModuleSystem.py (GLModuleSystem.file_is_module): Likewise.
11663 2023-05-18  Bruno Haible  <bruno@clisp.org>
11665         uchar: Fix error when <uchar.h> is included twice.
11666         * lib/uchar.in.h: Fix double-inclusion guard.
11668 2023-05-17  Paul Eggert  <eggert@cs.ucla.edu>
11670         stdckdint: use in more modules
11671         * lib/nstrftime.c (__strftime_internal):
11672         * lib/parse-datetime.y (apply_relative_time, zone, date)
11673         (iso_8601_date, relunit, relunit_snumber, time_zone_hhmm)
11674         (to_tm_year, yylex, parse_datetime_body):
11675         * lib/timespec-add.c (timespec_add):
11676         * lib/timespec-sub.c (timespec_sub):
11677         * lib/xstrtol.c (bkm_scale):
11678         Prefer ckd_add to INT_ADD_WRAPV etc., and include stdckdint.h.
11679         * modules/nstrftime, modules/parse-datetime:
11680         * modules/timespec-add, modules/timespec-sub, modules/xstrtol:
11681         (Depends-on): Add stdckdint.
11683         nstrftime: suggest to glibc how to avoid alloca
11684         * lib/nstrftime.c (widen) [COMPILE_WIDE]: Remove.
11685         (__strftime_internal) [COMPILE_WIDE): Instead of converting the
11686         multibyte time zone abbreviation into a potentially unbounded
11687         alloca buffer, convert it directly into the output buffer.
11688         Although this code is not used in Gnulib, this can help the glibc
11689         developers avoid the problem on the glibc side.
11691 2023-05-15  Bruno Haible  <bruno@clisp.org>
11693         doc: New chapter "Strings and Characters".
11694         * doc/strings.texi: New file.
11695         * doc/gnulib.texi (POSIXURL): New variable.
11696         (posixheader, posixfunc, func): New macros, from GNU libunistring's
11697         documentation.
11698         Include strings.texi.
11699         (Particular Modules): Don't include c-locale.texi here.
11700         * doc/c-locale.texi: Sections become subsections, subsections become
11701         subsubsections.
11702         * doc/posix-functions/isalnum.texi: Mention c32isalnum.
11703         * doc/posix-functions/isalpha.texi: Mention c32isalpha.
11704         * doc/posix-functions/isblank.texi: Mention c32isblank.
11705         * doc/posix-functions/iscntrl.texi: Mention c32iscntrl.
11706         * doc/posix-functions/isdigit.texi: Mention c32isdigit.
11707         * doc/posix-functions/isgraph.texi: Mention c32isgraph.
11708         * doc/posix-functions/islower.texi: Mention c32islower.
11709         * doc/posix-functions/isprint.texi: Mention c32isprint.
11710         * doc/posix-functions/ispunct.texi: Mention c32ispunct.
11711         * doc/posix-functions/isspace.texi: Mention c32isspace.
11712         * doc/posix-functions/isupper.texi: Mention c32isupper.
11713         * doc/posix-functions/isxdigit.texi: Mention c32isxdigit.
11714         * doc/posix-functions/tolower.texi: Mention alternative APIs.
11715         * doc/posix-functions/toupper.texi: Likewise.
11716         * doc/posix-functions/towlower.texi: Mention c32tolower.
11717         * doc/posix-functions/towupper.texi: Mention c32toupper.
11718         * doc/posix-functions/wcswidth.texi: Mention c32swidth.
11719         * doc/posix-functions/wcwidth.texi: Mention c32width.
11721 2023-05-15  Bruno Haible  <bruno@clisp.org>
11723         sigsegv: Add tentative support for Hurd/x86_64.
11724         Based on explanations by Sergey Bugaev <bugaevc@gmail.com>.
11725         * lib/sigsegv.c: Update from libsigsegv/src/fault-hurd-i386-old.h.
11727 2023-05-15  Paul Eggert  <eggert@cs.ucla.edu>
11729         file-has-acl: improve port to Fedora 39
11730         Problem reported by Ondrej Valousek in:
11731         https://lists.gnu.org/r/bug-gnulib/2023-05/msg00078.html
11732         * lib/file-has-acl.c: Include minmax.h.
11733         [USE_ACL && HAVE_LINUX_XATTR_H && HAVE_LISTXATTR]: Include stdckdint.h.
11734         (file_has_acl) [USE_ACL && HAVE_LINUX_XATTR_H && HAVE_LISTXATTR]:
11735         If the file has NFSv4 ACLs, ignore any POSIX ACLs, for Fedora 39.
11736         Return a bit faster when listxattr returns 0.
11737         Don’t loop forever if an attacker is fiddling with ACLs.
11738         * modules/file-has-acl (Depends-on): Add minmax, stdckdint.
11740 2023-05-15  Bruno Haible  <bruno@clisp.org>
11742         Work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82283 .
11743         Reported by Pádraig Brady <P@draigBrady.com> in
11744         <https://lists.gnu.org/archive/html/bug-gnulib/2023-05/msg00077.html>.
11745         * m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): Add
11746         -Wno-missing-field-initializers for GCC < 11.
11748 2023-05-15  Bruno Haible  <bruno@clisp.org>
11750         gettimeofday, pthread-*, thread, thrd: Don't omit intended initializers.
11751         * lib/gettimeofday.c (gettimeofday): List the initializers of both
11752         tv_sec and tv_usec.
11753         * lib/glthread/thread.c (gl_thread_self): List the initializers of both
11754         tv_sec and tv_nsec.
11755         * lib/pthread-cond.c (pthread_cond_wait): Likewise.
11756         * lib/thrd.c (rpl_thrd_current): Likewise.
11757         * lib/pthread-rwlock.c (MIN): New macro.
11758         (pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock): List the
11759         initializers of both tv_sec and tv_nsec. Don't modify the duration after
11760         having initialized it.
11761         * lib/pthread_mutex_timedlock.c (MIN): New macro.
11762         (pthread_mutex_timedlock): List the initializers of both tv_sec and
11763         tv_nsec. Don't modify the duration after having initialized it.
11765         select: Fix compilation error (regression from yesterday).
11766         * lib/select.c (rpl_select): Revert last change.
11768         poll: Fix syntax error (regression from yesterday).
11769         * lib/poll.c (poll): Remove semicolon inside braces.
11771 2023-05-14  Paul Eggert  <eggert@cs.ucla.edu>
11773         timespec: fill in other members
11774         This problem was found when compiling GNU Emacs with
11775         --enable-gcc-warnings on a platform where tv_sec is 64 bits and
11776         tv_nsec is 32 bits, and struct timespec has padding.  GCC
11777         -Wuse-of-uninitialized-value complained when a struct timespec
11778         initialized only via assigning to tv_sec and tv_nsec was copied
11779         via assignment (this was in lib/timespec.h’s make_timespec).
11780         Although behavior is well-defined on this platform, the warning is
11781         annoying and the behavior might not be well-defined on theoretical
11782         platforms where struct timespec has other members.  To work around
11783         this, initialize all the struct’s members.
11784         * lib/getsockopt.c (rpl_getsockopt):
11785         * lib/gettime.c (gettime):
11786         * lib/gettimeofday.c (gettimeofday):
11787         * lib/glthread/thread.c (gl_thread_self):
11788         * lib/nanosleep.c (nanosleep):
11789         * lib/parse-datetime.y (digits_to_date_time, set_hhmmss)
11790         (signed_seconds, unsigned_seconds, yylex, parse_datetime_body):
11791         * lib/poll.c (poll):
11792         * lib/pselect.c (pselect):
11793         * lib/pthread-cond.c (endlessly, pthread_cond_timedwait):
11794         * lib/pthread-rwlock.c (pthread_rwlock_timedrdlock)
11795         (pthread_rwlock_timedwrlock):
11796         * lib/pthread_mutex_timedlock.c (pthread_mutex_timedlock):
11797         * lib/select.c (rpl_select):
11798         * lib/settime.c (settime):
11799         * lib/stat-time.h (get_stat_atime, get_stat_ctime)
11800         (get_stat_mtime, get_stat_birthtime):
11801         * lib/thrd.c (rpl_thrd_current):
11802         * lib/timespec.h (make_timespec):
11803         * lib/timespec_getres.c (timespec_getres):
11804         * lib/utimecmp.c (utimecmpat):
11805         * lib/utimens.c (fdutimens):
11806         When filling in a struct timespec or similar time-related structure
11807         that might be copied elsewhere, also assign to any storage other
11808         than tv_sec and tv_nsec, to avoid undefined behavior on (likely
11809         theoretical) platforms where struct timespec has other members,
11810         and also to avoid warnings from GCC and/or valgrind.
11812         year2038-recommended: Improve failure diagnostic.
11813         * m4/largefile.m4 (AC_SYS_YEAR2038_RECOMMENDED): Sync from Autoconf.
11815 2023-05-13  Paul Eggert  <eggert@cs.ucla.edu>
11817         stdio: use _GL_ATTRIBUTE_MALLOC
11818         * lib/stdio.in.h (fdopen, fopen, popen, tmpfile): Declare with
11819         _GL_ATTRIBUTE_MALLOC, for consistency with glibc, and so that
11820         building the fopen module with ‘gcc -O2 -Wsuggest-attribute=malloc
11821         -Wsystem-headers -Werror’ does not fail with “stdio.h: In function
11822         ‘rpl_fopen’: stdio.h:970:1: error: function might be candidate for
11823         attribute ‘malloc’ [-Werror=suggest-attribute=malloc]”, a problem
11824         I noticed on both Fedora 38 and Ubuntu 23.04.
11826 2023-05-12  Bruno Haible  <bruno@clisp.org>
11828         sigsegv: Add tentative support for Hurd/x86_64.
11829         Reported by Samuel Thibault <samuel.thibault@ens-lyon.org>.
11830         * lib/sigsegv.c: Update from libsigsegv/src/fault-hurd-i386.h.
11832 2023-05-12  Paul Eggert  <eggert@cs.ucla.edu>
11834         file-has-acl: port to Fedora 39
11835         Fedora 39 getxattr with XATTR_NAME_POSIX_ACL_ACCESS either
11836         succeeds or fails with ENODATA, so it is no longer possible to
11837         detect from its failure that the filesystem might support NFSv4 ACLs.
11838         Problem reported by Ondrej Valousek in:
11839         https://lists.gnu.org/r/bug-gnulib/2023-04/msg00228.html
11840         Instead, use listxattr to determine whether NFSv4 ACLs are in play.
11841         This typically saves syscalls anyway.
11842         * lib/file-has-acl.c: In #if, use (HAVE_LINUX_XATTR_H &&
11843         HAVE_LISTXATTR) instead of GETXATTR_WITH_POSIX_ACLS.
11844         The following changes apply when (USE_ACL && HAVE_LINUX_XATTR_H &&
11845         HAVE_LISTXATTR):
11846         Include minmax.h.
11847         (have_xattr): New function.
11848         (file_has_acl): Try listxattr first; typically this means we need
11849         to do no other syscall.  Call getxattr only if there are NFSv4
11850         ACLs but not POSIX ACLs.
11851         * m4/acl.m4 (gl_FILE_HAS_ACL): Simplify by merely testing for
11852         linux/xattr.h and listxattr.  All uses changed.
11854 2023-05-10  Josh Soref  <jsoref@gmail.com>
11856         bootstrap: spelling/grammar fix in comment
11857         * build-aux/bootstrap: As above.
11859 2023-05-07  Paul Eggert  <eggert@cs.ucla.edu>
11861         Warn against bogus TZ settings
11862         * doc/parse-datetime.texi (Specifying time zone rules):
11863         Warn against TZ="UTC=5".
11865 2023-05-05  Bruno Haible  <bruno@clisp.org>
11867         dirfd: Add tests.
11868         * tests/test-dirfd.c: New file.
11869         * modules/dirfd-tests: New file.
11871 2023-05-05  Bruno Haible  <bruno@clisp.org>
11873         dirfd: Fix bogus override (regression 2023-04-26).
11874         Reported by Bjarni Ingi Gislason <bjarniig@simnet.is> in
11875         <https://lists.gnu.org/archive/html/bug-gnulib/2023-05/msg00040.html>.
11876         * m4/dirfd.m4 (gl_FUNC_DIRFD): Fix mistake in last change.
11878 2023-05-04  Bruno Haible  <bruno@clisp.org>
11880         c32swidth: Add tests.
11881         * tests/test-c32swidth.c: New file, based on tests/test-c32width.c.
11882         * modules/c32swidth-tests: New file.
11884         c32swidth: New module.
11885         * lib/uchar.in.h (c32swidth): New declaration.
11886         * lib/wcswidth-impl.h: Use macros FUNC, UNIT, CHARACTER_WIDTH.
11887         * lib/wcswidth.c: Define FUNC, UNIT, CHARACTER_WIDTH before including
11888         wcswidth-impl.h.
11889         * lib/c32swidth.c: New file.
11890         * modules/c32swidth: New file.
11891         * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
11892         GNULIB_C32SWIDTH.
11893         * modules/uchar (Makefile.am): Substitute GNULIB_C32SWIDTH.
11895 2023-05-04  Bruno Haible  <bruno@clisp.org>
11897         wcswidth: Fix result in case of overflow.
11898         * lib/wcswidth-impl.h (wcswidth): Continue searching for a non-printing
11899         wide character after the total width has become > INT_MAX.
11901 2023-05-04  Bruno Haible  <bruno@clisp.org>
11903         wcswidth: Relax license.
11904         * modules/wcswidth (License): Change to LGPLv2+.
11905         * lib/wcswidth.c: Update license notice.
11906         * lib/wcswidth-impl.h: Likewise.
11908 2023-05-04  Bruno Haible  <bruno@clisp.org>
11910         c32width: Relax license.
11911         * modules/c32width (License): Change to LGPLv2+.
11912         * lib/c32width.c: Update license notice.
11914 2023-05-04  Bruno Haible  <bruno@clisp.org>
11916         c32to*: Relax license.
11917         * modules/c32tolower (License): Change to LGPLv2+.
11918         * modules/c32toupper (License): Likewise.
11919         * lib/c32tolower.c: Update license notice.
11920         * lib/c32toupper.c: Likewise.
11921         * lib/c32to-impl.h: Likewise.
11923         unicase/tolower, unicase/toupper: Relax license.
11924         * lib/gen-uni-tables.c (output_simple_mapping): Bump copyright year. For
11925         unicase/tolower.h and unicase/toupper.h, use the LGPLv2+.
11926         * lib/unicase/tolower.h: Regenerated.
11927         * lib/unicase/toupper.h: Likewise.
11928         * lib/unicase/simple-mapping.h: Update license notice.
11929         * lib/unicase/tolower.c: Likewise.
11930         * lib/unicase/toupper.c: Likewise.
11931         * modules/unicase/tolower (License): Change to LGPLv2+.
11932         * modules/unicase/toupper (License): Likewise.
11934         unicase/base: Relax license.
11935         * modules/unicase/base (License): Change to LGPLv2+.
11936         * lib/unicase.in.h: Update license notice.
11938 2023-05-04  Bruno Haible  <bruno@clisp.org>
11940         c32is*: Relax license.
11941         * modules/c32isalnum (License): Change to LGPLv2+.
11942         * modules/c32isalpha (License): Likewise.
11943         * modules/c32isblank (License): Likewise.
11944         * modules/c32iscntrl (License): Likewise.
11945         * modules/c32isdigit (License): Likewise.
11946         * modules/c32isgraph (License): Likewise.
11947         * modules/c32islower (License): Likewise.
11948         * modules/c32isprint (License): Likewise.
11949         * modules/c32ispunct (License): Likewise.
11950         * modules/c32isspace (License): Likewise.
11951         * modules/c32isupper (License): Likewise.
11952         * modules/c32isxdigit (License): Likewise.
11953         * lib/c32isalnum.c: Update license notice.
11954         * lib/c32isalpha.c: Likewise.
11955         * lib/c32isblank.c: Likewise.
11956         * lib/c32iscntrl.c: Likewise.
11957         * lib/c32isdigit.c: Likewise.
11958         * lib/c32isgraph.c: Likewise.
11959         * lib/c32islower.c: Likewise.
11960         * lib/c32isprint.c: Likewise.
11961         * lib/c32ispunct.c: Likewise.
11962         * lib/c32isspace.c: Likewise.
11963         * lib/c32isupper.c: Likewise.
11964         * lib/c32isxdigit.c: Likewise.
11965         * lib/c32is-impl.h: Likewise.
11967         unictype/ctype-*: Relax license.
11968         * lib/gen-uni-tables.c (output_predicate): Bump copyright year. For
11969         unictype/ctype_*, use the LGPLv2+.
11970         * lib/unictype/ctype_*.h: Regenerated.
11971         * lib/unictype/ctype_*.c: Update license notice.
11972         * modules/unictype/ctype-alnum (License): Change to LGPLv2+.
11973         * modules/unictype/ctype-alpha (License): Likewise.
11974         * modules/unictype/ctype-blank (License): Likewise.
11975         * modules/unictype/ctype-cntrl (License): Likewise.
11976         * modules/unictype/ctype-digit (License): Likewise.
11977         * modules/unictype/ctype-graph (License): Likewise.
11978         * modules/unictype/ctype-lower (License): Likewise.
11979         * modules/unictype/ctype-print (License): Likewise.
11980         * modules/unictype/ctype-punct (License): Likewise.
11981         * modules/unictype/ctype-space (License): Likewise.
11982         * modules/unictype/ctype-upper (License): Likewise.
11983         * modules/unictype/ctype-xdigit (License): Likewise.
11985 2023-05-04  Bruno Haible  <bruno@clisp.org>
11987         c32width: Add tests.
11988         * tests/test-c32width.c: New file, based on tests/test-wcwidth.c.
11989         * modules/c32width-tests: New file.
11991         c32width: New module.
11992         * lib/uchar.in.h (c32width): New declaration.
11993         * lib/c32width.c: New file, based on lib/c32is-impl.h.
11994         * modules/c32width: New file.
11995         * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
11996         GNULIB_C32WIDTH.
11997         * modules/uchar (Makefile.am): Substitute GNULIB_C32WIDTH.
11999 2023-05-04  Bruno Haible  <bruno@clisp.org>
12001         doc: Mention macOS wcwidth bug.
12002         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Mention macOS bugs.
12003         * doc/posix-functions/wcwidth.texi: Update regarding macOS.
12005 2023-05-03  Bruno Haible  <bruno@clisp.org>
12007         vasnprintf, vasnwprintf: Make '0' flag handling more ISO C compliant.
12008         * lib/vasnprintf.c (VASNPRINTF): When doing the padding ourselves,
12009         ignore the '0' flag if a precision is specified and the conversion is
12010         one of d, i, o, u, x, X, b, B.
12011         * tests/test-vasnprintf-posix.c (test_function): Update expected results
12012         accordingly.
12013         * tests/test-vasprintf-posix.c (test_function): Likewise.
12014         * tests/test-snprintf-posix.h (test_function): Likewise.
12015         * tests/test-sprintf-posix.h (test_function): Likewise.
12016         * tests/test-vasnwprintf-posix.c (test_function): Likewise.
12018 2023-05-02  Paul Eggert  <eggert@cs.ucla.edu>
12020         mktime: include <intprops.h>
12021         * lib/mktime.c: Include <intprops.h> again,
12022         fixing a typo noted by Bruno Haible in:
12023         https://lists.gnu.org/r/bug-gnulib/2023-05/msg00014.html
12025 2023-05-02  Bruno Haible  <bruno@clisp.org>
12027         fopen: Silence a gcc warning.
12028         * lib/fopen.c (rpl_fopen): Mark open_direction as used.
12030 2023-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12032         extern-inline: port to pcc
12033         * m4/extern-inline.m4 (gl_EXTERN_INLINE): Port to pcc
12034         1.2.0.DEVEL 20220331, which doesn’t support extern inline
12035         even though it claims to be GCC 4.3 and to support C11.
12037         regex: prefer C23 style overflow checking
12038         * lib/regex_internal.h: Include stdckdint.h.
12039         * lib/regexec.c (re_search_2_stub):
12040         * modules/regex (Depends-on): Add stdckdint.
12041         Prefer stdckdint.h to intprops.h macros.
12043         dynarray: prefer C23 style overflow checking
12044         * lib/malloc/dynarray_emplace_enlarge.c, lib/malloc/dynarray_resize.c:
12045         Include stdckdint.h, not intprops.h.
12046         * lib/malloc/dynarray_emplace_enlarge.c:
12047         (__libc_dynarray_emplace_enlarge):
12048         * lib/malloc/dynarray_resize.c (__libc_dynarray_resize):
12049         Prefer stdckdint.h to intprops.h macros.
12050         * modules/glibc-internal/dynarray (Depends-on):
12051         Depend on stdckdint, not intprops.
12053         mktime: prefer C23 style overflow checking
12054         Prefer stdckdint.h macros to intprops.h macros where either will do,
12055         as this is the C23 standard.  Also, it ports around a pcc bug.
12056         * config/srclist.txt: Comment out mktime.c.
12057         * lib/mktime.c: Include stdckdint.h, not intprops.h.
12058         (__mktime_internal): Prefer stdckdint.h to intprops.h macros.
12059         * modules/mktime (Depends-on): Add stdckdint.
12061         limits-h: port to pcc
12062         * doc/posix-headers/limits.texi: Document the issue.
12063         * lib/limits.in.h (MB_LEN_MAX): New macro, if not already defined.
12064         * m4/limits-h.m4 (gl_LIMITS_H): Test for MB_LEN_MAX.
12065         * tests/test-limits-h.c: Check that it’s positive.
12067 2023-04-28  Paul Eggert  <eggert@cs.ucla.edu>
12069         year2038-recommended: new module
12070         Remove year2038-required and largefile-required, replacing
12071         the former with year2038-recommended and simply removing
12072         the latter.  This syncs with Autoconf master.
12073         * MODULES.html.sh, NEWS, doc/largefile.texi:
12074         * all-modules (exclude): Exclude year2038-recommended, not -required.
12075         * doc/posix-headers/sys_types.texi, doc/posix-headers/time.texi:
12076         * doc/year2038.texi: Mention this.
12077         * m4/largefile.m4: Sync from Autoconf.  Override existing macros
12078         if AC_SYS_YEAR2038_RECOMMENDED is not defined, rather than if
12079         AC_SYS_LARGEFILE_REQUIRED is not defined.
12080         * modules/largefile-required, modules/year2038-required: Removed.
12081         * modules/year2038: Do not depend on largefile; simply
12082         use m4/largefile.m4, since we shouldn’t need the extra goodies
12083         largefile supplies.
12084         * modules/year2038-recommended: New module.
12086 2023-04-28  Bruno Haible  <bruno@clisp.org>
12088         stdio: Avoid different configure results in different testdirs.
12089         * m4/stdio_h.m4 (gl_STDIO_H_EARLY): New macro, extracted from
12090         gl_STDIO_H.
12091         (gl_STDIO_H): Move the code that sets __USE_MINGW_ANSI_STDIO to
12092         gl_STDIO_H_EARLY.
12093         * modules/stdio (configure.ac-early): New section.
12095 2023-04-28  Bruno Haible  <bruno@clisp.org>
12097         stdbool tests: Avoid compilation error with Sun C on Solaris 10.
12098         * tests/test-stdbool.c (WORKING_BOOL): Set to 0 on Sun C.
12100 2023-04-28  Bruno Haible  <bruno@clisp.org>
12102         hamt tests: Fix test failure with Sun C on Solaris 10/SPARC.
12103         * tests/test-hamt.c (main): Finish with exit code 0.
12105 2023-04-27  Bruno Haible  <bruno@clisp.org>
12107         localeconv: Work around a mingw bug.
12108         * m4/localeconv.m4 (gl_FUNC_LOCALECONV): Test whether fields of type
12109         'char' are filled correctly.
12110         (gl_PREREQ_LOCALECONV): Test whether 'struct lconv' has the int_{p,n}_*
12111         members.
12112         * lib/localeconv.c (FIX_CHAR_VALUE): New macro.
12113         (localeconv): Replace negative field values with CHAR_MAX.
12114         * doc/posix-functions/localeconv.texi: Mention the mingw bug.
12116 2023-04-27  Bruno Haible  <bruno@clisp.org>
12118         stdlib: Fix error when cross-compiling (regression 2023-04-04).
12119         Reported by Pierre Labastie <pierre.labastie@neuf.fr> in
12120         <https://lists.gnu.org/archive/html/bug-gnulib/2023-04/msg00220.html>.
12121         * m4/stdlib_h.m4 (gl_STDLIB_H): Provide a 4th argument to AC_RUN_IFELSE.
12123 2023-04-26  Paul Eggert  <eggert@cs.ucla.edu>
12125         freopen-safer: pacify GCC 13
12126         * lib/freopen-safer.c: Ignore -Wanalyzer-fd-leak.
12128 2023-04-26  Bruno Haible  <bruno@clisp.org>
12130         fdopendir: Fix fd leak and test failure on native Windows.
12131         --
12132         * lib/dirent-private.h: On mingw, define 'struct gl_directory' as a
12133         wrapper around the original DIR. On MSVC, add an 'fd_to_close' field to
12134         'struct gl_directory'.
12135         * lib/dirent.in.h (DIR): Define when DIR_HAS_FD_MEMBER is 0, i.e. on
12136         both mingw and MSVC.
12137         (GNULIB_defined_DIR): New macro.
12138         (opendir): Avoid incompatible redeclaration.
12139         (readdir): Consider REPLACE_READDIR.
12140         (rewinddir): Consider REPLACE_REWINDDIR.
12141         * m4/dirent_h.m4 (gl_DIRENT_DIR): New macro.
12142         (gl_DIRENT_H): Invoke it.
12143         (gl_DIRENT_H_DEFAULTS): Initialize REPLACE_READDIR, REPLACE_REWINDDIR.
12144         * modules/dirent (Makefile.am): Substitute DIR_HAS_FD_MEMBER,
12145         REPLACE_READDIR, REPLACE_REWINDDIR.
12146         --
12147         * lib/dirfd.c (dirfd): If GNULIB_defined_DIR, just use the
12148         'fd_to_close' field.
12149         * m4/dirfd.m4 (gl_FUNC_DIRFD): Set HAVE_DIRFD. Don't set REPLACE_DIRFD
12150         to 1 if HAVE_DIRFD is 0. If DIR_HAS_FD_MEMBER is 0, ensure dirfd.c gets
12151         compiled.
12152         * modules/dirfd (Files): Add lib/dirent-private.h.
12153         (Depends-on, configure.ac): Simplify conditions.
12154         --
12155         * lib/closedir.c: Include <stdlib.h> always, for free().
12156         (closedir): If GNULIB_defined_DIR, arrange to call close(dirfd(dirp)) at
12157         the end. On mingw, call free() of dirp. Prefer testing HAVE_DIRENT_H,
12158         for consistency with dirent.h.
12159         * m4/closedir.m4 (gl_FUNC_CLOSEDIR): Don't set REPLACE_CLOSEDIR to 1 if
12160         HAVE_CLOSEDIR is 0. If DIR_HAS_FD_MEMBER is 0, ensure closedir.c gets
12161         compiled.
12162         --
12163         * lib/opendir.c: Include <stdlib.h> always. Include <string.h>.
12164         (opendir): On mingw, allocate the 'struct gl_directory' through malloc.
12165         If GNULIB_defined_DIR, set the 'fd_to_close' field to -1. Prefer
12166         testing HAVE_DIRENT_H, for consistency with dirent.h.
12167         * m4/opendir.m4 (gl_FUNC_OPENDIR): Don't set REPLACE_OPENDIR to 1 if
12168         HAVE_OPENDIR is 0. If DIR_HAS_FD_MEMBER is 0, ensure opendir.c gets
12169         compiled.
12170         --
12171         * lib/fdopendir.c (fdopendir): If GNULIB_defined_DIR, use a simple
12172         implementation based on opendir and the fchdir module. If __KLIBC__,
12173         don't define unused auxiliary functions.
12174         * modules/fdopendir (Files): Add lib/dirent-private.h.
12175         --
12176         * lib/readdir.c (readdir): On mingw, redirect to the original readdir
12177         function. Prefer testing HAVE_DIRENT_H, for consistency with dirent.h.
12178         * m4/readdir.m4 (gl_FUNC_READDIR): If DIR_HAS_FD_MEMBER is 0, ensure
12179         readdir.c gets compiled.
12180         * modules/readdir (configure.ac): Consider REPLACE_READDIR.
12181         --
12182         * lib/rewinddir.c (rewinddir): On mingw, redirect to the original
12183         rewinddir function. Prefer testing HAVE_DIRENT_H, for consistency with
12184         dirent.h.
12185         * m4/rewinddir.m4 (gl_FUNC_REWINDDIR): If DIR_HAS_FD_MEMBER is 0, ensure
12186         rewinddir.c gets compiled.
12187         * modules/rewinddir (configure.ac): Consider REPLACE_REWINDDIR.
12188         --
12189         * lib/fchdir.c (dir_info_t): Remove a FIXME.
12191 2023-04-26  Bruno Haible  <bruno@clisp.org>
12193         fchdir tests: Fix test failure on native Windows.
12194         * modules/fchdir-tests (Depends-on): Add dup.
12196 2023-04-26  Bruno Haible  <bruno@clisp.org>
12198         fclose: Make last change more maintainable.
12199         * m4/fclose.m4 (gl_FUNC_FCLOSE): Define through AC_DEFUN_ONCE. Don't
12200         modify REPLACE_FOPEN.
12201         * modules/fclose (Depends-on): Add comment.
12202         (configure.ac): Don't modify REPLACE_FOPEN. Don't duplicate actions of
12203         module 'fopen'.
12204         * m4/fopen.m4 (gl_FUNC_FOPEN_ITSELF): Renamed from gl_FUNC_FOPEN.
12205         (gl_FUNC_FOPEN): New macro.
12206         * modules/fopen (Files): Add m4/fclose.m4, m4/fflush.m4.
12207         * m4/close.m4 (gl_FUNC_CLOSE): Define through AC_DEFUN_ONCE.
12209 2023-04-26  Po Lu  <luangruo@yahoo.com>  (tiny change)
12210             Bruno Haible  <bruno@clisp.org>
12212         gnulib-tool: For conditional dependencies, generate portable sh code.
12213         * gnulib-tool (func_emit_autoconf_snippets): Avoid sh syntax
12214         'if ! variable', that does not work with Solaris /bin/sh.
12215         * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Likewise.
12217 2023-04-25  Bruno Haible  <bruno@clisp.org>
12219         expm1 tests: Avoid test failure on 32-bit mingw.
12220         * tests/test-expm1.h (test_function): Mark y as 'volatile'.
12222 2023-04-25  Bruno Haible  <bruno@clisp.org>
12224         poll tests: Avoid test failure on native Windows.
12225         * tests/test-poll.c (test_pipe): Disable the POLLHUP check also on
12226         native Windows.
12227         * doc/posix-functions/poll.texi: Mention also native Windows w.r.t.
12228         POLLHUP.
12230 2023-04-25  Bruno Haible  <bruno@clisp.org>
12232         dfa tests: Fix compilation error (regression 2023-04-22).
12233         * tests/test-dfa-match-aux.c: Include unistd.h.
12234         * modules/dfa-tests (Depends-on): Add unistd.
12236 2023-04-24  Bruno Haible  <bruno@clisp.org>
12238         tests: Suppress ‘#pragma GCC diagnostic’ warnings with GCC < 13.
12239         * tests/test-localename.c: Disable #pragma for GCC < 12.
12240         * tests/test-dup2.c: Disable #pragma for GCC < 13.
12241         * tests/test-fcntl.c: Likewise.
12242         * tests/test-getdtablesize.c: Likewise.
12243         * tests/test-listen.c: Likewise.
12244         * tests/test-open.h: Likewise.
12245         * tests/test-perror2.c: Likewise.
12246         * tests/test-select.h: Likewise.
12248 2023-04-24  Bruno Haible  <bruno@clisp.org>
12250         select, pselect: Fix test failure on native Windows.
12251         * lib/select.c (rpl_select): Fail if nfds is out-of-range.
12252         * lib/pselect.c (pselect): Likewise.
12254 2023-04-24  Paul Eggert  <eggert@cs.ucla.edu>
12256         fclose: pacify gcc -Wanalyzer-file-leak
12257         Without this patch, building coreutils with
12258         --enable-gcc-checking=expensive would fail with a message like
12259         “lib/exclude.c:682:6: error: leak of FILE 'in' [CWE-775]
12260         [-Werror=analyzer-file-leak]”, because Gnulib replaced fclose but
12261         not fopen, and GCC saw a call to fopen followed by a call to
12262         rpl_fclose.  The patch causes GCC to instead see a call to
12263         rpl_fopen followed by rpl_fclose.
12264         * m4/fclose.m4 (gl_FUNC_FCLOSE): Replace fopen when replacing
12265         fclose.
12266         * modules/fclose (Depends-on): Add fopen.
12267         (configure.ac): Replace fopen when replacing fclose.
12269         unsetenv-tests: pacify -Wanalyzer-putenv-of-auto-var
12270         * tests/test-unsetenv.c (main): Make entry static.  Even with this
12271         change, it’s unclear whether this test is portable POSIX code, but
12272         that’s a different matter.
12274         tests: suppress some unwanted -fanalyzer checking
12275         * tests/test-dup2.c, tests/test-fcntl.c, tests/test-fopen.h:
12276         * tests/test-getdtablesize.c, tests/test-listen.c:
12277         * tests/test-localename.c, tests/test-open.h, tests/test-perror2.c:
12278         * tests/test-select.h:
12279         Add pragmas to disable unwanted -fanalyzer checking.
12281 2023-04-24  Bruno Haible  <bruno@clisp.org>
12283         ftell, ftello: Fix recognition of pipes on native Windows.
12284         * m4/lseek.m4 (gl_FUNC_LSEEK): Update comment.
12285         * m4/ftello.m4 (gl_FUNC_FTELLO): On native Windows, set REPLACE_FTELLO=1
12286         always.
12287         * doc/posix-functions/ftello.texi: Mention the behaviour on pipes.
12288         * doc/posix-functions/ftell.texi: Likewise.
12289         * doc/posix-functions/fgetpos.texi: Likewise.
12291 2023-04-24  Bruno Haible  <bruno@clisp.org>
12293         lseek: Fix module dependencies (regression 2021-11-15).
12294         * modules/lseek (Depends-on): Re-enable the msvc-nothrow dependency
12295         also when WINDOWS_64_BIT_OFF_T is 0.
12297 2023-04-24  Bruno Haible  <bruno@clisp.org>
12299         system-quote: Fix memory overrun bug on native Windows.
12300         * lib/system-quote.c (system_quote): Allocate enough space for the
12301         result.
12303 2023-04-24  Bruno Haible  <bruno@clisp.org>
12305         unicodeio tests: Avoid test failures on native Windows.
12306         * tests/test-unicodeio.c: Include localcharset.h.
12307         (main): Handle C locales whose encoding is CP1252 or similar.
12308         * modules/unicodeio-tests (Depends-on): Add localcharset.
12310 2023-04-24  Bruno Haible  <bruno@clisp.org>
12312         *sprintf tests: Avoid test failures on mingw 10.
12313         * tests/test-vasnprintf-posix.c (test_function): On newer mingw, expect
12314         the de-facto standard result.
12315         * tests/test-vasprintf-posix.c (test_function): Likewise.
12316         * tests/test-snprintf-posix.h (test_function): Likewise.
12317         * tests/test-sprintf-posix.h (test_function): Likewise.
12319 2023-04-23  Bruno Haible  <bruno@clisp.org>
12321         Improve quoting of AS_HELP_STRING's first argument.
12322         * m4/acl.m4 (gl_FUNC_ACL_ARG): Don't underquote AS_HELP_STRING's first
12323         argument.
12324         * m4/assert.m4 (gl_ASSERT): Likewise.
12325         * m4/gc.m4 (gl_GC): Likewise.
12326         * m4/gnulib-common.m4 (gl_COMMON_BODY): Likewise.
12327         * m4/ld-version-script.m4 (gl_LD_VERSION_SCRIPT): Likewise.
12328         * m4/lib-ld.m4 (AC_LIB_PROG_LD): Likewise.
12329         * m4/libgmp.m4 (gl_LIBGMP): Likewise.
12330         * m4/regex.m4 (gl_REGEX): Likewise.
12331         * m4/relocatable-lib.m4 (gl_RELOCATABLE_NOP): Likewise.
12332         * m4/selinux-selinux-h.m4 (gl_LIBSELINUX): Likewise.
12333         * m4/sigsegv.m4 (gl_SIGSEGV): Likewise.
12334         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Likewise.
12335         * m4/valgrind-tests.m4 (gl_VALGRIND_TESTS): Likewise.
12336         * m4/version-etc.m4 (gl_VERSION_ETC_FLAG): Likewise.
12337         * m4/xattr.m4 (gl_FUNC_XATTR): Likewise.
12338         * doc/manywarnings.texi (manywarnings): Likewise. This avoids the use of
12339         quadrigraphs.
12341 2023-04-23  Bruno Haible  <bruno@clisp.org>
12343         category-none: Fix link errors on MSVC, when libunistring is installed.
12344         * modules/unictype/category-none (configure.ac): Remove
12345         gl_LIBUNISTRING_MODULE invocation.
12346         (Makefile.am): Compile unictype/categ_none.c always.
12348 2023-04-23  Paul Eggert  <eggert@cs.ucla.edu>
12350         manywarnings: use AS_IF
12351         * m4/manywarnings.m4 (gl_MANYWARN_COMPLEMENT):
12352         Use AS_IF when the body contains Autoconf macros that could
12353         conceivably require something.
12355         manywarnings: update C warnings for GCC 13
12356         Adjust for C programs compiled by GCC 13.
12357         (A C++ expert still needs to look at manywarnings-c++.m4.)
12358         * build-aux/gcc-warning.spec: Add warnings introduced in GCC 13.
12359         * doc/manywarnings.texi (manywarnings): Document flex arrays.
12360         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add
12361         -fstrict-flex-arrays and -Wstrict-flex-arrays as these should be
12362         suitable for Gnulib-using code.
12364         manywarnings: bring doc up to date
12365         * doc/manywarnings.texi: Bring doc up to date for GCC 12.
12367         manywarnings: omit -fno-common in GCC 10+
12368         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Omit -fno-common
12369         in GCC 10 and later, as it is the default there.
12370         Check exit status of ‘gcc --version’.
12372 2023-04-23  Bruno Haible  <bruno@clisp.org>
12374         libunistring: Fix build on Windows, when a libunistring is installed.
12375         * lib/unicase.in.h: Include <unistring/woe32dll.h>.
12376         (unicase_empty_prefix_context, unicase_empty_suffix_context): Declare
12377         with GNULIB_UNICASE_..._DLL_VARIABLE.
12378         * lib/unictype.in.h: Include <unistring/woe32dll.h>.
12379         (UC_CATEGORY_*, UC_PROPERTY_*): Declare with
12380         GNULIB_UNICTYPE_..._DLL_VARIABLE.
12381         * lib/uninorm.in.h: Include <unistring/woe32dll.h>.
12382         (unicode_normalization_form uninorm_nf*): Declare with
12383         GNULIB_UNINORM_..._DLL_VARIABLE.
12384         * m4/libunistring-base.m4 (gl_LIBUNISTRING_MODULE_WITH_VARIABLE): New
12385         macro.
12386         (gl_LIBUNISTRING_LIB_PREPARE): Set HAVE_UNISTRING_WOE32DLL_H.
12387         * m4/unicase_h.m4: New file.
12388         * m4/unictype_h.m4: New file.
12389         * m4/uninorm_h.m4: New file.
12390         * modules/unicase/base (Files): Add m4/unicase_h.m4.
12391         (configure.ac): Bump version number. Invoke gl_UNICASE_H,
12392         gl_UNICASE_H_REQUIRE_DEFAULTS.
12393         (Makefile.am): Substitute all GNULIB_UNICASE_*_DLL_VARIABLE.
12394         * modules/unicase/empty-*-context (configure.ac): Invoke
12395         gl_UNICASE_H_REQUIRE_DEFAULTS. Use gl_LIBUNISTRING_MODULE_WITH_VARIABLE.
12396         * modules/unictype/base (Files): Add m4/unictype_h.m4.
12397         (configure.ac): Bump version number. Invoke gl_UNICTYPE_H,
12398         gl_UNICTYPE_H_REQUIRE_DEFAULTS.
12399         (Makefile.am): Substitute all GNULIB_UNICTYPE_*_DLL_VARIABLE.
12400         * modules/unictype/category-* (configure.ac): Invoke
12401         gl_UNICTYPE_H_REQUIRE_DEFAULTS. Use
12402         gl_LIBUNISTRING_MODULE_WITH_VARIABLE.
12403         * modules/unictype/property-* (configure.ac): Likewise.
12404         * modules/uninorm/base (Files): Add m4/uninorm_h.m4.
12405         (configure.ac): Bump version number. Invoke gl_UNINORM_H,
12406         gl_UNINORM_H_REQUIRE_DEFAULTS.
12407         (Makefile.am): Substitute all GNULIB_UNINORM_*_DLL_VARIABLE.
12408         * modules/uninorm/nf* (configure.ac): Invoke
12409         gl_UNINORM_H_REQUIRE_DEFAULTS. Use gl_LIBUNISTRING_MODULE_WITH_VARIABLE.
12411 2023-04-22  Bruno Haible  <bruno@clisp.org>
12413         Avoid some Autoconf "was expanded before it was required" warnings.
12414         * m4/locale-ar.m4 (gt_LOCALE_AR): Define through AC_DEFUN_ONCE.
12415         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Likewise.
12416         * m4/locale-ja.m4 (gt_LOCALE_JA): Likewise.
12417         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise.
12418         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
12420 2023-04-22  Bruno Haible  <bruno@clisp.org>
12422         string-desc tests: Avoid test failure on native Windows.
12423         * tests/test-string-desc.c: Include <fcntl.h>, <unistd.h>.
12424         (main): Expect a file name argument. Write to this file, instead of to
12425         fd 3.
12426         * tests/test-string-desc.sh: Pass a file name as argument, instead of
12427         using '3>'.
12428         * modules/string-desc-tests (Depends-on): Add close.
12430 2023-04-22  Bruno Haible  <bruno@clisp.org>
12432         threadlib, pthread-h, threads-h: Avoid mingw's libwinpthread by default.
12433         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Set
12434         gl_use_winpthreads_default to 'no' by default.
12435         (gl_AVOID_WINPTHREAD): Update comments.
12437 2023-04-22  Bruno Haible  <bruno@clisp.org>
12439         posixtm tests: Avoid test failure on native Windows.
12440         * tests/test-posixtm.c (T): On native Windows, disable test cases that
12441         would fail.
12443 2023-04-22  Bruno Haible  <bruno@clisp.org>
12445         dfa tests: Fix test failure on mingw differently.
12446         Suggested by Paul Eggert.
12447         * tests/test-dfa-invalid-char-class.sh: Revert last change.
12448         * tests/test-dfa-match-aux.c: Include binary-io.h.
12449         (main): Put stdout into binary mode.
12450         * modules/dfa-tests (Depends-on): Add binary-io.
12452 2023-04-20  Bruno Haible  <bruno@clisp.org>
12454         getumask: Make it work on native Windows.
12455         * lib/getumask.c (getumask): When TMPDIR is unset, try TMP and TEMP.
12456         * tests/test-getumask.c (ASSUME_UMASK_CONSTANT): Define to 1 on native
12457         Windows.
12459 2023-04-20  Bruno Haible  <bruno@clisp.org>
12461         posixtm tests: Fix link error.
12462         * modules/posixtm-tests (Depends-on): Add stpcpy.
12464 2023-04-20  Bruno Haible  <bruno@clisp.org>
12466         readtokens tests: Fix test failure on mingw.
12467         * tests/test-readtokens.sh: Transform CRLF to LF in the output, before
12468         comparing with the expected output.
12470         parse-duration tests: Fix test failure on mingw.
12471         * tests/test-parse-duration.sh: Transform CRLF to LF in the output,
12472         before analyzing the output.
12474         dfa tests: Fix test failure on mingw.
12475         * tests/test-dfa-invalid-char-class.sh: Transform CRLF to LF in the
12476         output, before comparing with the expected output.
12478 2023-04-20  Bruno Haible  <bruno@clisp.org>
12480         Fix uses of libwinpthread on mingw 10.
12481         * m4/threadlib.m4 (gl_WEAK_SYMBOLS): On mingw, set the result to
12482         "guessing no".
12484 2023-04-20  Bruno Haible  <bruno@clisp.org>
12486         Move remaining call_once tests from mtx-tests to call_once-tests.
12487         * tests/test-call_once1.c: Renamed from tests/test-call_once.c.
12488         * tests/test-call_once2.c: New file, based on tests/test-mtx.c.
12489         * tests/test-mtx.c: Remove the code that was testing call_once.
12490         * modules/call_once-tests (Files): Add test-call_once1.c,
12491         test-call_once2.c. Remove test-call_once.c.
12492         (Depends-on): Add thrd, lock, stdint.
12493         (configure.ac): Check for alarm.
12494         (Makefile.am): Test test-call_once1 instead of test-call_once. Also test
12495         test-call_once2.
12497 2023-04-20  Bruno Haible  <bruno@clisp.org>
12499         execute tests: Fix compilation error on mingw (regression 2023-01-17).
12500         * tests/test-execute-main.c (main): Don't use SIGPIPE if it's not
12501         defined.
12503 2023-04-20  Bruno Haible  <bruno@clisp.org>
12505         assert-h, verify: Fix compilation error in C++ mode with MSVC 14.30.
12506         * lib/verify.h (_Static_assert): In C++ mode with MSVC 14.1 or newer,
12507         define merely to static_assert.
12508         (static_assert): In C++ mode with MSVC 14.1 or newer, don't define.
12510 2023-04-19  Bruno Haible  <bruno@clisp.org>
12512         chown, lchown tests: Fix link error on mingw 10.
12513         * modules/chown-tests (configure.ac): Test whether getgid() exists.
12514         * modules/lchown-tests (configure.ac): Likewise.
12515         * modules/fchownat-tests (configure.ac): Likewise.
12516         * tests/test-chown.h (getgid): Define a fallback.
12517         * tests/test-lchown.h (getgid): Likewise.
12519 2023-04-19  Bruno Haible  <bruno@clisp.org>
12521         ctime: Fix compilation errors in C++ mode on mingw 10.
12522         * lib/c++defs.h (_GL_FUNCDECL_RPL): Add a comment.
12523         * lib/time.in.h (ctime): Don't use _GL_ATTRIBUTE_DEPRECATED before
12524         _GL_FUNCDECL_RPL in C++ mode.
12526 2023-04-19  Bruno Haible  <bruno@clisp.org>
12528         random: Fix compilation errors in C++ mode on mingw 10.
12529         * lib/stdlib.in.h (random, srandom): Disable _GL_CXXALIASWARN invocation
12530         on non-glibc systems.
12532 2023-04-19  Bruno Haible  <bruno@clisp.org>
12534         year2038-required: Fix configure failure with MSVC.
12535         * m4/largefile.m4 (_AC_SYS_LARGEFILE_PROBE): Distinguish the results
12536         "support not detected" and "supported through gnulib". If the result is
12537         "supported through gnulib", don't fail.
12539 2023-04-19  Bruno Haible  <bruno@clisp.org>
12541         doc: Add references to changes accepted for future POSIX revisions.
12542         * doc/glibc-functions/bind_textdomain_codeset.texi: Add reference to
12543         www.austingroupbugs.net issue.
12544         * doc/glibc-functions/bindtextdomain.texi: Likewise.
12545         * doc/glibc-functions/dcgettext.texi: Likewise.
12546         * doc/glibc-functions/dcngettext.texi: Likewise.
12547         * doc/glibc-functions/dgettext.texi: Likewise.
12548         * doc/glibc-functions/dngettext.texi: Likewise.
12549         * doc/glibc-functions/getentropy.texi: Likewise.
12550         * doc/glibc-functions/getresgid.texi: Likewise.
12551         * doc/glibc-functions/getresuid.texi: Likewise.
12552         * doc/glibc-functions/gettext.texi: Likewise.
12553         * doc/glibc-functions/ngettext.texi: Likewise.
12554         * doc/glibc-functions/posix_spawn_file_actions_addchdir_np.texi:
12555         Likewise.
12556         * doc/glibc-functions/posix_spawn_file_actions_addfchdir_np.texi:
12557         Likewise.
12558         * doc/glibc-functions/setresgid.texi: Likewise.
12559         * doc/glibc-functions/setresuid.texi: Likewise.
12560         * doc/glibc-functions/textdomain.texi: Likewise.
12561         * doc/posix-functions/asctime_r.texi: Likewise.
12562         * doc/posix-functions/ctime_r.texi: Likewise.
12564 2023-04-19  Bruno Haible  <bruno@clisp.org>
12566         wcsncmp: Add tests.
12567         * tests/test-wcsncmp.c: New file, based on tests/unistr/test-strncmp.h
12568         and tests/test-wcscmp.c.
12569         * modules/wcsncmp-tests: New file.
12571         wcsncmp: Work around two ISO C compliance bugs on several platforms.
12572         * lib/wchar.in.h (wcsncmp): Consider REPLACE_WCSNCMP.
12573         * lib/wcsncmp-impl.h (wcsncmp): Don't assume that the two wide
12574         characters are in the range 0..INT_MAX.
12575         * m4/wcsncmp.m4 (gl_FUNC_WCSNCMP): Test whether wcsncmp works for all
12576         wide characters. Set REPLACE_WCSNCMP.
12577         * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WCSNCMP.
12578         * modules/wchar (Makefile.am): Substitute REPLACE_WCSNCMP.
12579         * modules/wcsncmp (Status, Notice): Un-obsolete this module.
12580         (configure.ac): Consider REPLACE_WCSNCMP.
12581         * doc/posix-functions/wcsncmp.texi: Mention the two bugs.
12583 2023-04-18  Bruno Haible  <bruno@clisp.org>
12585         wcscmp: Add tests.
12586         * tests/test-wcscmp.c: New file, based on tests/unistr/test-strcmp.h.
12587         * modules/wcscmp-tests: New file.
12589         wcscmp: Work around two ISO C compliance bugs on several platforms.
12590         * lib/wchar.in.h (wcscmp): Consider REPLACE_WCSCMP.
12591         * lib/wcscmp-impl.h (wcscmp): Don't assume that the two wide characters
12592         are in the range 0..INT_MAX.
12593         * m4/wcscmp.m4 (gl_FUNC_WCSCMP): Test whether wcscmp works for all wide
12594         characters. Set REPLACE_WCSCMP.
12595         * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WCSCMP.
12596         * modules/wchar (Makefile.am): Substitute REPLACE_WCSCMP.
12597         * modules/wcscmp (Status, Notice): Un-obsolete this module.
12598         (configure.ac): Consider REPLACE_WCSCMP.
12599         * doc/posix-functions/wcscmp.texi: Mention the two bugs.
12601 2023-04-18  Bruno Haible  <bruno@clisp.org>
12603         wmemcmp: Add tests.
12604         * tests/test-wmemcmp.c: New file, based on tests/unistr/test-cmp.h.
12605         * modules/wmemcmp-tests: New file.
12607         wmemcmp: Work around ISO C compliance bug on several platforms.
12608         * lib/wchar.in.h (wmemcmp): Consider REPLACE_WMEMCMP.
12609         * lib/wmemcmp-impl.h (wmemcmp): Don't assume that the two wide
12610         characters are in the range 0..INT_MAX.
12611         * m4/wmemcmp.m4 (gl_FUNC_WMEMCMP): Test whether wmemcmp works for all
12612         wide characters. Set REPLACE_WMEMCMP.
12613         * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WMEMCMP.
12614         * modules/wchar (Makefile.am): Substitute REPLACE_WMEMCMP.
12615         * modules/wmemcmp (configure.ac): Consider REPLACE_WMEMCMP.
12616         * doc/posix-functions/wmemcmp.texi: Mention the bug.
12618 2023-04-18  Bruno Haible  <bruno@clisp.org>
12620         doc: Update platform list for posix_spawnp.
12621         * doc/posix-functions/posix_spawnp.texi: Update platform list.
12623 2023-04-18  Paul Eggert  <eggert@cs.ucla.edu>
12625         Go back to dynamic largefile, year2038 tests
12626         Problem reported by Bruno Haible in:
12627         https://lists.gnu.org/r/bug-gnulib/2023-04/msg00134.html
12628         * modules/largefile-tests, modules/year2038-tests (Depends-on):
12629         Remove assert-h.
12630         * tests/test-largefile.c, tests/test-year2038.c:
12631         Test dynamically, not via static_assert.
12633         doc: mention when O_* defaults to 0
12634         * doc/posix-headers/fcntl.texi: Document in more detail which O_*
12635         macros default to 0 in Gnulib.
12637 2023-04-18  Bruno Haible  <bruno@clisp.org>
12639         doc: Mention a Cygwin 3.4.6 bug.
12640         * doc/posix-functions/readlinkat.texi: Mention a readlinkat bug on
12641         Cygwin < 3.4.7.
12643 2023-04-18  Bruno Haible  <bruno@clisp.org>
12645         ilogbl: Work around a Cygwin 3.4.6 bug.
12646         * m4/ilogbl.m4 (gl_FUNC_ILOGBL_WORKS): Also test the value of
12647         ilogbl(NaN).
12648         * doc/posix-functions/ilogbl.texi: Mention the new Cygwin bug.
12650 2023-04-18  Bruno Haible  <bruno@clisp.org>
12652         file-has-acl tests: Avoid test failures on Cygwin 3.4.6.
12653         * tests/test-file-has-acl.sh: Fix distinction between Linux setfacl and
12654         Cygwin setfacl.
12656 2023-04-18  Bruno Haible  <bruno@clisp.org>
12658         c32isgraph tests: Avoid test failure on Cygwin 3.4.6.
12659         * tests/test-c32isgraph.c (main): Skip U+00A0 test on Cygwin.
12661 2023-04-17  Paul Eggert  <eggert@cs.ucla.edu>
12663         Slightly nicer largefile, year2038 tests
12664         * modules/largefile-tests, modules/year2038-tests (Depends-on):
12665         Add assert-h, intprops.
12666         * tests/test-largefile.c, tests/test-year2038.c:
12667         Prefer compile-time to run-time tests.
12668         Don’t assume CHAR_BIT == 8.
12670 2023-04-17  Bruno Haible  <bruno@clisp.org>
12672         MODULES.html.sh: Ensure hyperlinked files are displayable.
12673         * MODULES.html.sh (repo_url_prefix): Use cgit instead of gitweb.
12675         MODULES.html.sh: Avoid a HTTP redirect.
12676         * MODULES.html.sh (repo_url_prefix): Use the unabbreviated name of the
12677         git repository server.
12679 2023-04-16  Bruno Haible  <bruno@clisp.org>
12681         year2038: Add tests.
12682         * tests/test-year2038.c: New file.
12683         * modules/year2038-tests: New file.
12685 2023-04-16  Bruno Haible  <bruno@clisp.org>
12687         largefile: Add tests.
12688         * tests/test-largefile.c: New file.
12689         * modules/largefile-tests: New file.
12691 2023-04-16  Bruno Haible  <bruno@clisp.org>
12693         year2038: Revert the added module dependencies.
12694         Suggested by Paul Eggert in
12695         <https://lists.gnu.org/archive/html/bug-gnulib/2023-04/msg00117.html>.
12696         * modules/year2038 (Depends-on): Remove sched, sys_msg, sys_select,
12697         sys_sem, sys_shm, sys_stat, sys_time, sys_types, time-h, utime-h.
12699 2023-04-16  Bruno Haible  <bruno@clisp.org>
12701         posix_spawn_file_actions_addclose tests: Avoid test failure on Cygwin.
12702         * tests/test-posix_spawn_file_actions_addclose.c (main): Skip an
12703         unportable test also on Cygwin.
12705 2023-04-15  Bruno Haible  <bruno@clisp.org>
12707         Fix compilation errors of list, set, oset, map, omap in C++ mode.
12708         * m4/gnulib-common.m4 (gl_COMMON_BODY): Define
12709         _GL_BRACKET_BEFORE_ATTRIBUTE. In _GL_ATTRIBUTE_DEPRECATED,
12710         _GL_ATTRIBUTE_MAYBE_UNUSED, _GL_ATTRIBUTE_NODISCARD, don't use the
12711         bracket syntax if _GL_BRACKET_BEFORE_ATTRIBUTE is defined.
12713 2023-04-15  Bruno Haible  <bruno@clisp.org>
12715         Don't include module 'year2038-required' in all-of-gnulib testdirs.
12716         * all-modules (exclude): Add year2038-required.
12718 2023-04-15  Bruno Haible  <bruno@clisp.org>
12720         selinux-h: Fix compilation error (regression 2023-04-13).
12721         * m4/selinux-selinux-h.m4 (gl_HEADERS_SELINUX_SELINUX_H): Instead of
12722         defining the C macro HAVE_SELINUX_SELINUX_H to 0, set the Autoconf
12723         variable HAVE_SELINUX_SELINUX_H to 0.
12725 2023-04-14  Bruno Haible  <bruno@clisp.org>
12727         year2038: Fix configure failure on 32-bit mingw.
12728         * m4/largefile.m4 (_AC_SYS_YEAR2038_PROBE): Use the same option
12729         spelling as in _AC_SYS_YEAR2038_OPTIONS.
12731 2023-04-14  Bruno Haible  <bruno@clisp.org>
12733         isnan: Fix compilation error in C++ mode on FreeBSD 13.2.
12734         * lib/math.in.h (isnan): On FreeBSD 13.2 or newer, don't declare isnan
12735         through _GL_MATH_CXX_REAL_FLOATING_DECL_2.
12737 2023-04-14  Bruno Haible  <bruno@clisp.org>
12739         filemode: Fix double-inclusion guard.
12740         * lib/filemode.h: Make the double-inclusion guard actually work.
12742 2023-04-14  Bruno Haible  <bruno@clisp.org>
12744         year2038: Add reminder to include <config.h> before time_t gets defined.
12745         * lib/sched.in.h: Check that config.h was already included before the
12746         #include_next.
12747         * lib/sys_select.in.h: Likewise.
12748         * lib/sys_stat.in.h: Likewise.
12749         * lib/sys_time.in.h: Likewise.
12750         * lib/sys_types.in.h: Likewise.
12751         * lib/time.in.h: Likewise.
12752         * lib/utime.in.h: Likewise.
12753         * modules/year2038 (Depends-on): Add sched, sys_msg, sys_select,
12754         sys_sem, sys_shm, sys_stat, sys_time, sys_types, time-h, utime-h.
12756         sys_shm: New module.
12757         * lib/sys_shm.in.h: New file.
12758         * m4/sys_shm_h.m4: New file.
12759         * modules/sys_shm: New file.
12760         * doc/posix-headers/sys_shm.texi: Mention the new module.
12762         sys_sem: New module.
12763         * lib/sys_sem.in.h: New file.
12764         * m4/sys_sem_h.m4: New file.
12765         * modules/sys_sem: New file.
12766         * doc/posix-headers/sys_sem.texi: Mention the new module.
12768         sys_msg: New module.
12769         * lib/sys_msg.in.h: New file.
12770         * m4/sys_msg_h.m4: New file.
12771         * modules/sys_msg: New file.
12772         * doc/posix-headers/sys_msg.texi: Mention the new module.
12774 2023-04-13  Bruno Haible  <bruno@clisp.org>
12776         Add more reminders to include <config.h>.
12777         * lib/aligned-malloc.h: Check that config.h was already included.
12778         * lib/careadlinkat.h: Likewise.
12779         * lib/filemode.h: Likewise.
12780         * lib/freadptr.h: Likewise.
12781         * lib/fseterr.h: Likewise.
12782         * lib/glthread/lock.h: Likewise.
12783         * lib/glthread/tls.h: Likewise.
12784         * lib/immutable.h: Likewise.
12785         * lib/isapipe.h: Likewise.
12786         * lib/isnand-nolibm.h: Likewise.
12787         * lib/isnanf-nolibm.h: Likewise.
12788         * lib/isnanl-nolibm.h: Likewise.
12789         * lib/mbswidth.h: Likewise.
12790         * lib/md5.h: Likewise.
12791         * lib/minmax.h: Likewise.
12792         * lib/msvc-inval.h: Likewise.
12793         * lib/msvc-nothrow.h: Likewise.
12794         * lib/pathmax.h: Likewise.
12795         * lib/sha1.h: Likewise.
12796         * lib/sha256.h: Likewise.
12797         * lib/sha512.h: Likewise.
12798         * lib/size_max.h: Likewise.
12799         * lib/sm3.h: Likewise.
12800         * lib/stat-size.h: Likewise.
12801         * lib/termcap.h: Likewise.
12802         * lib/terminfo.h: Likewise.
12803         * lib/thread-optim.h: Likewise.
12804         * lib/unlocked-io.h: Likewise.
12805         * lib/vma-iter.h: Likewise.
12807 2023-04-13  Bruno Haible  <bruno@clisp.org>
12809         Adjust comments in <config.h> reminders.
12810         * lib/*.h: In the comments, mention also HAVE_*.
12812 2023-04-13  Bruno Haible  <bruno@clisp.org>
12814         Adjust comments in <config.h> reminders.
12815         * lib/*.in.h: In the comments, mention also HAVE_RAW_DECL_*.
12816         * Makefile (sc_check_config_h_reminder): Search also for HAVE_RAW_DECL_.
12818 2023-04-13  Bruno Haible  <bruno@clisp.org>
12820         utmp: Avoid using HAVE_* macros in *.in.h files.
12821         * m4/pty_h.m4 (gl_PTY_CHECK_UTIL_H): New macro, extracted from gl_PTY_H.
12822         (gl_PTY_H): Invoke it.
12823         * m4/utmp_h.m4 (gl_UTMP_H): Invoke gl_PTY_CHECK_UTIL_H and set
12824         HAVE_TERMIOS_H.
12825         (gl_UTMP_H_DEFAULTS): Require gl_PTY_H_DEFAULTS, gl_TERMIOS_H_DEFAULTS.
12826         * modules/utmp (Files): Add m4/pty_h.m4, m4/termios_h.m4.
12827         (Makefile.am): Substitute also HAVE_UTIL_H, HAVE_LIBUTIL_H,
12828         HAVE_TERMIOS_H.
12829         * lib/utmp.in.h: Test HAVE_UTIL_H, HAVE_LIBUTIL_H, HAVE_TERMIOS_H as
12830         Autoconf variables.
12832 2023-04-13  Bruno Haible  <bruno@clisp.org>
12834         getprogname: Avoid using HAVE_* macros in *.in.h files.
12835         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
12836         HAVE_DECL_PROGRAM_INVOCATION_NAME.
12837         * m4/getprogname.m4 (gl_FUNC_GETPROGNAME): Require gl_STDLIB_H_DEFAULTS
12838         and gl_USE_SYSTEM_EXTENSIONS. Set HAVE_DECL_PROGRAM_INVOCATION_NAME.
12839         * modules/stdlib (Makefile.am): Substitute
12840         HAVE_DECL_PROGRAM_INVOCATION_NAME.
12841         * lib/stdlib.in.h (getprogname): Test HAVE_DECL_PROGRAM_INVOCATION_NAME
12842         as an Autoconf variable.
12844 2023-04-13  Bruno Haible  <bruno@clisp.org>
12846         selinux-h: Avoid using HAVE_* macros in *.in.h files.
12847         * m4/selinux-selinux-h.m4 (gl_HEADERS_SELINUX_SELINUX_H): Initialize
12848         HAVE_SELINUX_SELINUX_H.
12849         * modules/selinux-h (Makefile.am): Substitute HAVE_SELINUX_SELINUX_H.
12850         * lib/se-selinux.in.h: Test HAVE_SELINUX_SELINUX_H as an Autoconf
12851         variable.
12853 2023-04-13  Bruno Haible  <bruno@clisp.org>
12855         ialloc, gethrxtime: Restore GCC diagnostics options.
12856         * lib/ialloc.h: Invoke _GL_INLINE_HEADER_END.
12857         * lib/xtime.h: Likewise.
12858         * Makefile (sc_check_GL_INLINE_HEADER_use): New rule.
12860 2023-04-13  Bruno Haible  <bruno@clisp.org>
12862         flexmember: Fix module description (regression 2016-09-07).
12863         * modules/flexmember (Include): Add "flexmember.h".
12865 2023-04-12  Paul Eggert  <eggert@cs.ucla.edu>
12867         doc: year2038 MIPS o32 nudge
12868         * doc/year2038.texi: Use more-common "o32" name for
12869         32-bit MIPS ABI.
12871 2023-04-12  Bruno Haible  <bruno@clisp.org>
12873         Add more reminders to include <config.h>.
12874         * m4/gnulib-common.m4 (gl_COMMON): In config.h, define
12875         _GL_CONFIG_H_INCLUDED.
12876         * lib/acl-internal.h: Test _GL_CONFIG_H_INCLUDED instead of
12877         _GL_INLINE_HEADER_BEGIN.
12878         * lib/alignalloc.h: Likewise.
12879         * lib/argp-fmtstream.h: Likewise.
12880         * lib/argp.h: Likewise.
12881         * lib/binary-io.h: Likewise.
12882         * lib/bitrotate.h: Likewise.
12883         * lib/c-ctype.h: Likewise.
12884         * lib/count-leading-zeros.h: Likewise.
12885         * lib/count-one-bits.h: Likewise.
12886         * lib/count-trailing-zeros.h: Likewise.
12887         * lib/eealloc.h: Likewise.
12888         * lib/execinfo.in.h: Likewise.
12889         * lib/gethrxtime.h: Likewise.
12890         * lib/gl_list.h: Likewise.
12891         * lib/gl_map.h: Likewise.
12892         * lib/gl_omap.h: Likewise.
12893         * lib/gl_openssl.h: Likewise.
12894         * lib/gl_oset.h: Likewise.
12895         * lib/gl_set.h: Likewise.
12896         * lib/gl_xlist.h: Likewise.
12897         * lib/gl_xmap.h: Likewise.
12898         * lib/gl_xomap.h: Likewise.
12899         * lib/gl_xoset.h: Likewise.
12900         * lib/gl_xset.h: Likewise.
12901         * lib/gl_xsublist.h: Likewise.
12902         * lib/glthread/cond.h: Likewise.
12903         * lib/hamt.h: Likewise.
12904         * lib/ialloc.h: Likewise.
12905         * lib/math.in.h: Likewise.
12906         * lib/mbchar.h: Likewise.
12907         * lib/mbfile.h: Likewise.
12908         * lib/mbiter.h: Likewise.
12909         * lib/mbuiter.h: Likewise.
12910         * lib/openat.h: Likewise.
12911         * lib/pipe-filter-aux.h: Likewise.
12912         * lib/priv-set.h: Likewise.
12913         * lib/safe-alloc.h: Likewise.
12914         * lib/savewd.h: Likewise.
12915         * lib/se-context.in.h: Likewise.
12916         * lib/se-label.in.h: Likewise.
12917         * lib/se-selinux.in.h: Likewise.
12918         * lib/sig-handler.h: Likewise.
12919         * lib/stat-time.h: Likewise.
12920         * lib/string-desc-quotearg.h: Likewise.
12921         * lib/string-desc.h: Likewise.
12922         * lib/sys_socket.in.h: Likewise.
12923         * lib/timespec.h: Likewise.
12924         * lib/u64.h: Likewise.
12925         * lib/uchar.in.h: Likewise.
12926         * lib/unistd.in.h: Likewise.
12927         * lib/utimens.h: Likewise.
12928         * lib/wctype.in.h: Likewise.
12929         * lib/xalloc.h: Likewise.
12930         * lib/xbinary-io.h: Likewise.
12931         * lib/xsize.h: Likewise.
12932         * lib/xstring-desc.h: Likewise.
12933         * lib/xtime.h: Likewise.
12934         * lib/acl.h: Check that config.h was already included.
12935         * lib/alignof.h: Likewise.
12936         * lib/argmatch.h: Likewise.
12937         * lib/argv-iter.h: Likewise.
12938         * lib/arpa_inet.in.h: Likewise.
12939         * lib/attribute.h: Likewise.
12940         * lib/backupfile.h: Likewise.
12941         * lib/base32.h: Likewise.
12942         * lib/base64.h: Likewise.
12943         * lib/basename-lgpl.h: Likewise.
12944         * lib/bitset.h: Likewise.
12945         * lib/bitsetv.h: Likewise.
12946         * lib/c-snprintf.h: Likewise.
12947         * lib/c-stack.h: Likewise.
12948         * lib/c-strcase.h: Likewise.
12949         * lib/c-vasnprintf.h: Likewise.
12950         * lib/c-vasprintf.h: Likewise.
12951         * lib/c-vsnprintf.h: Likewise.
12952         * lib/c-xvasprintf.h: Likewise.
12953         * lib/canon-host.h: Likewise.
12954         * lib/canonicalize.h: Likewise.
12955         * lib/clean-temp.h: Likewise.
12956         * lib/concat-filename.h: Likewise.
12957         * lib/ctype.in.h: Likewise.
12958         * lib/dfa.h: Likewise.
12959         * lib/di-set.h: Likewise.
12960         * lib/dirent-safer.h: Likewise.
12961         * lib/dirent.in.h: Likewise.
12962         * lib/dirname.h: Likewise.
12963         * lib/eloop-threshold.h: Likewise.
12964         * lib/error.in.h: Likewise.
12965         * lib/exclude.h: Likewise.
12966         * lib/fatal-signal.h: Likewise.
12967         * lib/fcntl.in.h: Likewise.
12968         * lib/file-type.h: Likewise.
12969         * lib/filenamecat.h: Likewise.
12970         * lib/filevercmp.h: Likewise.
12971         * lib/flexmember.h: Likewise.
12972         * lib/fnmatch.in.h: Likewise.
12973         * lib/fpending.h: Likewise.
12974         * lib/freadable.h: Likewise.
12975         * lib/freadahead.h: Likewise.
12976         * lib/freading.h: Likewise.
12977         * lib/fts_.h: Likewise.
12978         * lib/fwritable.h: Likewise.
12979         * lib/fwriting.h: Likewise.
12980         * lib/gc.h: Likewise.
12981         * lib/get_progname_of.h: Likewise.
12982         * lib/glob.in.h: Likewise.
12983         * lib/glthread/thread.h: Likewise.
12984         * lib/hash-pjw-bare.h: Likewise.
12985         * lib/hash-pjw.h: Likewise.
12986         * lib/hash-triple.h: Likewise.
12987         * lib/hash.h: Likewise.
12988         * lib/i-ring.h: Likewise.
12989         * lib/iconv.in.h: Likewise.
12990         * lib/ino-map.h: Likewise.
12991         * lib/inttostr.h: Likewise.
12992         * lib/inttypes.in.h: Likewise.
12993         * lib/javaversion.h: Likewise.
12994         * lib/langinfo.in.h: Likewise.
12995         * lib/locale.in.h: Likewise.
12996         * lib/localename.h: Likewise.
12997         * lib/malloc.in.h: Likewise.
12998         * lib/malloca.h: Likewise.
12999         * lib/memcasecmp.h: Likewise.
13000         * lib/memchr2.h: Likewise.
13001         * lib/memcmp2.h: Likewise.
13002         * lib/modechange.h: Likewise.
13003         * lib/monetary.in.h: Likewise.
13004         * lib/mountlist.h: Likewise.
13005         * lib/netdb.in.h: Likewise.
13006         * lib/obstack.h: Likewise.
13007         * lib/opendirat.h: Likewise.
13008         * lib/pagealign_alloc.h: Likewise.
13009         * lib/pipe-filter.h: Likewise.
13010         * lib/poll.in.h: Likewise.
13011         * lib/pthread.in.h: Likewise.
13012         * lib/pty.in.h: Likewise.
13013         * lib/quotearg.h: Likewise.
13014         * lib/read-file.h: Likewise.
13015         * lib/readline.h: Likewise.
13016         * lib/readutmp.h: Likewise.
13017         * lib/regex-quote.h: Likewise.
13018         * lib/relocatable.h: Likewise.
13019         * lib/savedir.h: Likewise.
13020         * lib/sched.in.h: Likewise.
13021         * lib/search.in.h: Likewise.
13022         * lib/sh-quote.h: Likewise.
13023         * lib/signal.in.h: Likewise.
13024         * lib/sigpipe-die.h: Likewise.
13025         * lib/sockets.h: Likewise.
13026         * lib/spawn.in.h: Likewise.
13027         * lib/ssfmalloc.h: Likewise.
13028         * lib/stack.h: Likewise.
13029         * lib/stdalign.in.h: Likewise.
13030         * lib/stdarg.in.h: Likewise.
13031         * lib/stddef.in.h: Likewise.
13032         * lib/stdio-safer.h: Likewise.
13033         * lib/stdio.in.h: Likewise.
13034         * lib/stdlib.in.h: Likewise.
13035         * lib/stdnoreturn.in.h: Likewise.
13036         * lib/strerror-override.h: Likewise.
13037         * lib/striconv.h: Likewise.
13038         * lib/striconveh.h: Likewise.
13039         * lib/striconveha.h: Likewise.
13040         * lib/string-buffer.h: Likewise.
13041         * lib/string.in.h: Likewise.
13042         * lib/strings.in.h: Likewise.
13043         * lib/strnlen1.h: Likewise.
13044         * lib/sys_file.in.h: Likewise.
13045         * lib/sys_ioctl.in.h: Likewise.
13046         * lib/sys_random.in.h: Likewise.
13047         * lib/sys_resource.in.h: Likewise.
13048         * lib/sys_select.in.h: Likewise.
13049         * lib/sys_stat.in.h: Likewise.
13050         * lib/sys_time.in.h: Likewise.
13051         * lib/sys_times.in.h: Likewise.
13052         * lib/sys_utsname.in.h: Likewise.
13053         * lib/sys_wait.in.h: Likewise.
13054         * lib/system-quote.h: Likewise.
13055         * lib/term-style-control.h: Likewise.
13056         * lib/termios.in.h: Likewise.
13057         * lib/textstyle.in.h: Likewise.
13058         * lib/threads.in.h: Likewise.
13059         * lib/time.in.h: Likewise.
13060         * lib/trim.h: Likewise.
13061         * lib/utime.in.h: Likewise.
13062         * lib/utmp.in.h: Likewise.
13063         * lib/vasnprintf.h: Likewise.
13064         * lib/verror.h: Likewise.
13065         * lib/version-etc.h: Likewise.
13066         * lib/wchar.in.h: Likewise.
13067         * lib/windows-spawn.h: Likewise.
13068         * lib/windows-thread.h: Likewise.
13069         * lib/xgetcwd.h: Likewise.
13070         * lib/xgetdomainname.h: Likewise.
13071         * lib/xgethostname.h: Likewise.
13072         * lib/xmalloca.h: Likewise.
13073         * lib/xmemdup0.h: Likewise.
13074         * lib/xprintf.h: Likewise.
13075         * lib/xreadlink.h: Likewise.
13076         * lib/xstriconv.h: Likewise.
13077         * lib/xstriconveh.h: Likewise.
13078         * lib/xstrndup.h: Likewise.
13079         * lib/xstrtol-error.h: Likewise.
13080         * lib/xvasprintf.h: Likewise.
13081         * Makefile (config_h_MACROS*): New variables.
13082         (sc_check_config_h_reminder): New rule.
13084 2023-04-11  Paul Eggert  <eggert@cs.ucla.edu>
13086         doc: update year2038 list further
13087         Prompted by Adhemerval Zanella Netto’s email in:
13088         https://lists.gnu.org/r/bug-gnulib/2023-04/msg00083.html
13089         Also, mention 32-bit Android.
13090         * doc/year2038.texi: Mention Linux/ork1 and Android.
13091         Append "32" to powerpc and sparc names.
13093 2023-04-11  Bruno Haible  <bruno@clisp.org>
13095         Fix the "make sc_prohibit_AC_LIBOBJ_in_m4" findings.
13096         * Makefile (allow_AC_LIBOBJ): Update after 2023-03-24 change. Add
13097         termcap, terminfo.
13099 2023-04-11  Bruno Haible  <bruno@clisp.org>
13101         Fix some "make sc_prohibit_leading_TABs" findings.
13102         * tests/test-calloc-gnu.c: Expand tabs.
13103         * tests/test-regex.c: Likewise.
13105 2023-04-11  Bruno Haible  <bruno@clisp.org>
13107         Makefile: Fix a syntax alert.
13108         * Makefile: Indent commands with tabs, not spaces.
13110 2023-04-10  Bruno Haible  <bruno@clisp.org>
13112         alignasof: Ensure a correct _Alignas (regression 2023-01-15).
13113         * m4/stdalign.m4 (gl_ALIGNASOF): Define _Alignas also when <stdalign.h>
13114         exists.
13116 2023-04-10  Paul Eggert  <eggert@cs.ucla.edu>
13118         doc: update list of year2038 platforms
13119         * doc/year2038.texi: Update list of platforms
13120         by adding dates and version numbers and fixing some that
13121         appear to have been misfiled.  Also, list working systems
13122         and versions first, as that helps shorten the list of
13123         failing systems by saying "older versions".
13125         doc: moved year2038 para up
13126         * doc/year2038.texi: Move a paragraph up,
13127         as it’s lonely at the end.
13129         doc: document year2038 first
13130         * doc/year2038.texi: Document year2038 first, then
13131         year2038-required.
13133 2023-04-10  Bruno Haible  <bruno@clisp.org>
13135         doc: Clarify list of platforms for year2038 support.
13136         * doc/year2038.texi (Avoiding the year 2038 problem): List the platforms
13137         on which year2038-required is known to fail vs. known to succeed.
13139 2023-04-10  Bruno Haible  <bruno@clisp.org>
13141         doc: Avoid ambiguous wording.
13142         * doc/posix-headers/time.texi: Say "or" not "and".
13144 2023-04-09  Bruno Haible  <bruno@clisp.org>
13146         doc: Fix a typo.
13147         * doc/posix-headers/time.texi: Fix typo in module name.
13149 2023-04-09  Paul Eggert  <eggert@cs.ucla.edu>
13151         largefile: sync from Autoconf master
13152         * modules/largefile-required, modules/year2038-required: New modules.
13153         * MODULES.html.sh, doc/largefile.texi, doc/posix-headers/time.texi:
13154         * doc/year2038.texi: Document this.
13155         * m4/largefile.m4: Sync from Autoconf master.
13156         Conditionalize the workaround on AC_SYS_LARGEFILE_REQUIRED rather
13157         than on AC_SYS_YEAR2038 so that we replace older but still
13158         unreleased Autoconf.
13159         (AC_SYS_LARGEFILE_REQUIRED, AC_SYS_YEAR2038_REQUIRED): New macros.
13161         year2038: configure earlier
13162         * modules/year2038: Put AC_SYS_YEAR2038 in configure.ac-early
13163         since it can affect later compilations with _TIME_BITS=64.
13165 2023-04-09  Bruno Haible  <bruno@clisp.org>
13167         c32toupper: Add tests.
13168         * tests/test-c32toupper.sh: New file.
13169         * tests/test-c32toupper.c: New file, based on tests/test-c32islower.c.
13170         * modules/c32toupper-tests: New file.
13172         c32toupper: New module.
13173         * lib/uchar.in.h (c32toupper): New declaration.
13174         * lib/c32toupper.c: New file.
13175         * modules/c32toupper: New file.
13176         * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
13177         GNULIB_C32TOUPPER.
13178         * modules/uchar (Makefile.am): Substitute GNULIB_C32TOUPPER.
13180 2023-04-09  Bruno Haible  <bruno@clisp.org>
13182         c32tolower: Add tests.
13183         * tests/test-c32tolower.sh: New file.
13184         * tests/test-c32tolower.c: New file, based on tests/test-c32isupper.c.
13185         * modules/c32tolower-tests: New file.
13187         c32tolower: New module.
13188         * lib/uchar.in.h (c32tolower): New declaration.
13189         * lib/c32tolower.c: New file.
13190         * lib/c32to-impl.h: New file, based on lib/c32is-impl.h.
13191         * modules/c32tolower: New file.
13192         * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
13193         GNULIB_C32TOLOWER.
13194         * modules/uchar (Makefile.am): Substitute GNULIB_C32TOLOWER.
13196 2023-04-09  Bruno Haible  <bruno@clisp.org>
13198         c32is*: Ensure GNULIB_defined_mbstate_t is defined on AIX.
13199         * m4/mbrtowc.m4 (gl_MBSTATE_T_BROKEN): Define through AC_DEFUN_ONCE.
13200         * m4/mbrtoc32.m4 (gl_FUNC_MBRTOC32): Require it.
13201         * modules/c32isalnum (Files): Add m4/mbrtowc.m4, m4/locale-ja.m4.
13202         (configure.ac): Require gl_MBSTATE_T_BROKEN.
13203         * modules/c32isalpha: Likewise.
13204         * modules/c32isblank: Likewise.
13205         * modules/c32iscntrl: Likewise.
13206         * modules/c32isdigit: Likewise.
13207         * modules/c32isgraph: Likewise.
13208         * modules/c32islower: Likewise.
13209         * modules/c32isprint: Likewise.
13210         * modules/c32ispunct: Likewise.
13211         * modules/c32isspace: Likewise.
13212         * modules/c32isupper: Likewise.
13213         * modules/c32isxdigit: Likewise.
13215 2023-04-09  Bruno Haible  <bruno@clisp.org>
13217         mbrtoc32: Add comments.
13218         * lib/mbrtoc32.c: Add comment regarding AIX.
13219         * m4/mbrtoc32.m4 (gl_FUNC_MBRTOC32): Add comment regarding
13220         GNULIB_defined_mbstate_t.
13222 2023-04-09  Bruno Haible  <bruno@clisp.org>
13224         doc: Mention a NetBSD bug.
13225         * doc/posix-functions/towlower.texi: Mention NetBSD bug 57339.
13226         * doc/posix-functions/towupper.texi: Likewise.
13228 2023-04-09  Bruno Haible  <bruno@clisp.org>
13230         vasnwprintf-posix: More details about the glibc bug.
13231         * doc/posix-functions/swprintf.texi: Add comment.
13232         * m4/printf.m4 (gl_SWPRINTF_DIRECTIVE_LA): Update cross-compilation
13233         guess.
13235 2023-04-08  Bruno Haible  <bruno@clisp.org>
13237         doc: Mention another Haiku bug.
13238         * doc/posix-functions/open.texi: Mention a Haiku bug with symlinks.
13240 2023-04-08  Bruno Haible  <bruno@clisp.org>
13242         Avoid Autoconf "was expanded before it was required" warning.
13243         * m4/exponentf.m4 (gl_FLOAT_EXPONENT_LOCATION): Define through
13244         AC_DEFUN_ONCE.
13245         * m4/exponentd.m4 (gl_DOUBLE_EXPONENT_LOCATION): Likewise.
13246         * m4/exponentl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Likewise.
13248 2023-04-08  Bruno Haible  <bruno@clisp.org>
13250         striconveh tests: Avoid test failure on glibc 2.15.
13251         * tests/test-striconveh.c (main): Skip some of the GB18030 tests on
13252         glibc < 2.16.
13254 2023-04-08  Bruno Haible  <bruno@clisp.org>
13256         vasnwprintf-posix: Really work around %La bug in glibc 2.15 and Haiku.
13257         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Fix a copy&paste bug.
13259 2023-04-08  Bruno Haible  <bruno@clisp.org>
13261         login_tty: Fix compilation error in C++ mode on Solaris 11.4.
13262         * m4/login_tty.m4 (gl_FUNC_LOGIN_TTY): Test whether <termios.h> exists.
13263         Consider it when testing whether login_tty is declared.
13264         * lib/utmp.in.h: If none of <util.h> and <libutil.h> exists, include
13265         <termios.h> instead.
13266         * doc/glibc-functions/login_tty.texi: Document the Solaris 11.4 problem.
13268 2023-04-08  Bruno Haible  <bruno@clisp.org>
13270         time: Fix compilation error in C++ mode on Solaris 11.
13271         * lib/time.in.h (time): Disable _GL_CXXALIASWARN invocation on non-glibc
13272         systems.
13274 2023-04-07  Bruno Haible  <bruno@clisp.org>
13276         unistdio/*: Fix test failures (regression 2023-01-28).
13277         * modules/unistdio/*printf (configure.ac): Bump required libunistring
13278         version number.
13280 2023-04-07  Bruno Haible  <bruno@clisp.org>
13282         trim tests: Fix link error.
13283         * modules/trim-tests (Makefile.am): Link test-trim also against libintl.
13285 2023-04-07  Bruno Haible  <bruno@clisp.org>
13287         stdio: Fix the value of _PRINTF_NAN_LEN_MAX on OpenBSD.
13288         * lib/stdio.in.h (_PRINTF_NAN_LEN_MAX): Define to 4 on OpenBSD.
13290 2023-04-07  Bruno Haible  <bruno@clisp.org>
13292         vasnwprintf-posix: Work around %La bug in glibc 2.15 and Haiku.
13293         * m4/printf.m4 (gl_SWPRINTF_DIRECTIVE_LA): New macro.
13294         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Invoke
13295         gl_SWPRINTF_DIRECTIVE_LA and define NEED_WPRINTF_DIRECTIVE_LA
13296         accordingly.
13297         * lib/vasnprintf.c: When compiling vasnwprintf, if
13298         NEED_WPRINTF_DIRECTIVE_LA, handle the %La and %LA directives ourselves.
13299         * doc/posix-functions/swprintf.texi: Mention the %La bug.
13301 2023-04-07  Bruno Haible  <bruno@clisp.org>
13303         stdio: Fix compilation error in C++ mode on macOS.
13304         * lib/stdio.in.h (getw, putw): Repeat the declaration even if the
13305         function is already supposed to be declared.
13307 2023-04-07  Bruno Haible  <bruno@clisp.org>
13309         vasnwprintf-posix tests: Avoid test failure on mingw.
13310         * tests/test-vasnwprintf-posix.c (test_function): For mingw, change two
13311         expected test results.
13313 2023-04-06  Bruno Haible  <bruno@clisp.org>
13315         uchar: Inline functions with C linkage in C++ mode (regr. 2023-04-04).
13316         * m4/gnulib-common.m4 (gl_COMMON_BODY): Put definitions of
13317         _GL_BEGIN_C_LINKAGE, _GL_END_C_LINKAGE into config.h.
13318         * lib/uchar.in.h: Enclose all inline functions in _GL_BEGIN_C_LINKAGE /
13319         _GL_END_C_LINKAGE.
13321 2023-04-06  Bruno Haible  <bruno@clisp.org>
13323         alignalloc: Fix link error on glibc 2.15 systems.
13324         * lib/alignalloc.h (ALIGNALLOC_VIA_ALIGNED_ALLOC): Set to 0 on
13325         glibc 2.15 systems.
13327 2023-04-05  Bruno Haible  <bruno@clisp.org>
13329         doc: Add references to registered Haiku bugs.
13330         * doc/posix-functions/call_once.texi: Mention Haiku bug.
13331         * doc/posix-functions/duplocale.texi: Likewise.
13332         * doc/posix-functions/freelocale.texi: Likewise.
13333         * doc/posix-functions/getlogin_r.texi: Likewise.
13334         * doc/posix-functions/initstate.texi: Likewise.
13335         * doc/posix-functions/mbrtoc32.texi: Likewise.
13336         * doc/posix-functions/strxfrm.texi: Likewise.
13337         * doc/posix-headers/math.texi: Update.
13339 2023-04-05  Bruno Haible  <bruno@clisp.org>
13341         string-desc-quotearg tests: Avoid a test failure on Haiku.
13342         * tests/test-string-desc-quotearg.c (main): For the
13343         clocale_quoting_style, accept also the U+2018 and U+2019 characters in
13344         UTF-8 encoding.
13346 2023-04-05  Bruno Haible  <bruno@clisp.org>
13348         random_r: Fix compilation error on Haiku.
13349         * lib/stdlib.in.h: For random_r, include <stdint.h> always.
13350         * modules/random_r (Depends-on): Depend on 'stdint' always.
13352 2023-04-05  Bruno Haible  <bruno@clisp.org>
13354         forkpty, openpty, login_tty: Fix link errors of the tests.
13355         * m4/pty.m4 (gl_PTY_LIB): On Haiku, set PTY_LIB to '-lbsd'.
13357 2023-04-05  Bruno Haible  <bruno@clisp.org>
13359         strerrorname_np: Fix compilation error on Haiku.
13360         * lib/strerrorname_np.c (strerrorname_np): Avoid conflict between
13361         EDOOFUS and EINVAL.
13362         * tests/test-strerrorname_np.c (main): Likewise.
13364 2023-04-05  Bruno Haible  <bruno@clisp.org>
13366         uchar: Fix recent change.
13367         * lib/uchar.in.h: Include <string.h>, <wctype.h>.
13369 2023-04-05  Bruno Haible  <bruno@clisp.org>
13371         localename tests: Work around a Haiku bug.
13372         * tests/test-localename.c (freelocale): New macro.
13374 2023-04-05  Bruno Haible  <bruno@clisp.org>
13376         localename: Add support for Haiku's per-thread locales.
13377         * lib/localename.c: Include <dlfcn.h>.
13378         (gl_locale_name_thread_unsafe): Add special code for Haiku.
13380 2023-04-05  Bruno Haible  <bruno@clisp.org>
13382         uchar: Work around Haiku bug.
13383         * m4/uchar_h.m4 (gl_UCHAR_H, gl_TYPE_CHAR8_T, gl_TYPE_CHAR16_T,
13384         gl_TYPE_CHAR32_T): Before including <uchar.h>, on Haiku, first include
13385         <stdint.h>.
13386         * m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): Likewise.
13387         * m4/mbrtoc32.m4 (gl_FUNC_MBRTOC32, gl_CHECK_FUNC_MBRTOC32,
13388         gl_MBRTOC32_EMPTY_INPUT, gl_MBRTOC32_C_LOCALE, gl_MBRTOC32_SANITYCHECK):
13389         Likewise.
13390         * lib/uchar.in.h: On Haiku, include <stdint.h> before the include_next.
13391         * doc/posix-headers/uchar.texi: Mention the Haiku bug.
13393 2023-04-05  Bruno Haible  <bruno@clisp.org>
13395         stdlib, btowc: Fix file lists.
13396         * modules/stdlib (Files): Add m4/codeset.m4.
13397         * modules/btowc (Files): Likewise.
13398         * modules/c-dtoastr-tests (Files): Likewise.
13399         * modules/c-ldtoastr-tests (Files): Likewise.
13400         * modules/c-snprintf-tests (Files): Likewise.
13401         * modules/c-vasprintf-tests (Files): Likewise.
13402         * modules/c-vsnprintf-tests (Files): Likewise.
13403         * modules/c-xvasprintf-tests (Files): Likewise.
13404         * modules/nl_langinfo-tests (Files): Likewise.
13406 2023-04-04  Bruno Haible  <bruno@clisp.org>
13408         duplocale: Fix compilation error on Haiku (regression 2023-01-22).
13409         * lib/locale.in.h (duplocale): If HAVE_DUPLOCALE = 0, don't declare it,
13410         even if REPLACE_DUPLOCALE = 1.
13411         * modules/duplocale (Depends-on, configure.ac): Don't compile a
13412         replacement if HAVE_DUPLOCALE = 0 and REPLACE_DUPLOCALE = 1.
13414 2023-04-04  Bruno Haible  <bruno@clisp.org>
13416         c32tob, c32is*, c32rtomb, mbrtoc32: Fix file lists.
13417         * modules/c32tob (Files): Add m4/locale-fr.m4, m4/locale-zh.m4,
13418         m4/codeset.m4.
13419         * modules/c32isalnum (Files): Likewise.
13420         * modules/c32isalpha (Files): Likewise.
13421         * modules/c32isblank (Files): Likewise.
13422         * modules/c32iscntrl (Files): Likewise.
13423         * modules/c32isdigit (Files): Likewise.
13424         * modules/c32isgraph (Files): Likewise.
13425         * modules/c32islower (Files): Likewise.
13426         * modules/c32isprint (Files): Likewise.
13427         * modules/c32ispunct (Files): Likewise.
13428         * modules/c32isspace (Files): Likewise.
13429         * modules/c32isupper (Files): Likewise.
13430         * modules/c32isxdigit (Files): Likewise.
13431         * modules/c32rtomb (Files): Likewise.
13432         * modules/mbrtoc32 (Files): Likewise.
13434 2023-04-04  Bruno Haible  <bruno@clisp.org>
13436         stdlib: Work around MB_CUR_MAX bug on Solaris 10.
13437         * lib/stdlib.in.h (gl_MB_CUR_MAX): New function.
13438         (MB_CUR_MAX, GNULIB_defined_MB_CUR_MAX): New macros.
13439         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether MB_CUR_MAX is correct.
13440         (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_MB_CUR_MAX.
13441         * modules/stdlib (Files): Add m4/locale-fr.m4.
13442         (Makefile.am): Substitute REPLACE_MB_CUR_MAX.
13443         * doc/posix-headers/stdlib.texi: Mention the Solaris 10 bug.
13445 2023-04-04  Bruno Haible  <bruno@clisp.org>
13447         *c32*: Inline most functions on glibc and musl libc.
13448         * lib/uchar.in.h: Invoke _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
13449         (btoc32): Inline if _GL_WCHAR_T_IS_UCS4.
13450         (c32isalnum, c32isalpha, c32isblank, c32iscntrl, c32isdigit, c32isgraph,
13451         c32islower, c32isprint, c32ispunct, c32isspace, c32isupper,
13452         c32isxdigit): Inline if
13453         _GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t.
13454         (c32snrtombs, c32srtombs, c32stombs, c32tob, mbsnrtoc32s, mbsrtoc32s,
13455         mbstoc32s): Inline if _GL_WCHAR_T_IS_UCS4.
13456         * lib/btoc32.c: Define compilation unit marker.
13457         (btoc32): Conditionally mark as _GL_EXTERN_INLINE.
13458         * lib/c32isalnum.c: Define compilation unit marker.
13459         * lib/c32isalpha.c: Likewise.
13460         * lib/c32isblank.c: Likewise.
13461         * lib/c32iscntrl.c: Likewise.
13462         * lib/c32isdigit.c: Likewise.
13463         * lib/c32isgraph.c: Likewise.
13464         * lib/c32islower.c: Likewise.
13465         * lib/c32isprint.c: Likewise.
13466         * lib/c32ispunct.c: Likewise.
13467         * lib/c32isspace.c: Likewise.
13468         * lib/c32isupper.c: Likewise.
13469         * lib/c32isxdigit.c: Likewise.
13470         * lib/c32is-impl.h (FUNC): Conditionally mark as _GL_EXTERN_INLINE.
13471         * lib/c32snrtombs.c: Define compilation unit marker.
13472         (c32snrtombs): Conditionally mark as _GL_EXTERN_INLINE.
13473         * lib/c32srtombs.c: Define compilation unit marker.
13474         (c32srtombs): Conditionally mark as _GL_EXTERN_INLINE.
13475         * lib/c32stombs.c: Define compilation unit marker.
13476         (c32stombs): Conditionally mark as _GL_EXTERN_INLINE.
13477         * lib/c32tob.c: Define compilation unit marker.
13478         (c32tob): Conditionally mark as _GL_EXTERN_INLINE.
13479         * lib/mbsnrtoc32s.c: Define compilation unit marker.
13480         (mbsnrtoc32s): Conditionally mark as _GL_EXTERN_INLINE.
13481         * lib/mbsrtoc32s.c: Define compilation unit marker.
13482         (mbsrtoc32s): Conditionally mark as _GL_EXTERN_INLINE.
13483         * lib/mbstoc32s.c: Define compilation unit marker.
13484         (mbstoc32s): Conditionally mark as _GL_EXTERN_INLINE.
13485         * modules/uchar (Depends-on): Add extern-inline.
13487 2023-04-04  Pádraig Brady  <P@draigBrady.com>
13489         backupfile: fix bug when renaming from subdirectory
13490         * lib/backupfile.c (backup_internal): Ensure we use the
13491         appropriate offset if operating on a subdirectory,
13492         i.e., on an updated sdir.
13493         Fixes https://bugs.gnu.org/62607
13495 2023-04-04  Bruno Haible  <bruno@clisp.org>
13497         *c32*: Optimize on musl libc like on glibc.
13498         * lib/uchar.in.h (_GL_WCHAR_T_IS_UCS4): New macro.
13499         * lib/btoc32.c (btoc32): Test _GL_WCHAR_T_IS_UCS4 instead of __GLIBC__.
13500         * lib/mbsrtoc32s.c: Likewise.
13501         * lib/mbsnrtoc32s.c: Likewise.
13502         * lib/c32tob.c (c32tob): Likewise.
13503         * lib/c32srtombs.c: Likewise.
13504         * lib/c32snrtombs.c: Likewise.
13505         * lib/c32is-impl.h (FUNC): Likewise.
13507 2023-04-04  Bruno Haible  <bruno@clisp.org>
13509         uchar: Rename _GL_LARGE_CHAR32_T to _GL_SMALL_WCHAR_T.
13510         * lib/uchar.in.h (_GL_SMALL_WCHAR_T): Renamed from _GL_LARGE_CHAR32_T.
13511         * lib/mbrtoc32.c: Update.
13512         * lib/mbsrtoc32s.c: Update.
13513         * lib/mbsnrtoc32s.c: Update.
13514         * lib/c32tob.c: Update.
13515         * lib/c32rtomb.c: Update.
13516         * lib/c32srtombs.c: Update.
13517         * lib/c32snrtombs.c: Update.
13518         * lib/c32is-impl.h: Update.
13519         * tests/test-uchar.c: Update.
13521 2023-04-04  Bruno Haible  <bruno@clisp.org>
13523         c32rtomb: Fix an autoconf test.
13524         * m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): In a test program, include
13525         <stddef.h>, for NULL.
13527 2023-04-03  Bruno Haible  <bruno@clisp.org>
13529         tests: Set executable bit on more tests.
13530         * tests/test-c-dtoastr.sh: Make executable.
13531         * tests/test-c-ldtoastr.sh: Likewise.
13532         * tests/test-immutable.sh: Likewise.
13533         * tests/test-vasnwprintf-posix2.sh: Likewise.
13535 2023-04-03  Jim Meyering  <meyering@fb.com>
13537         tests: set executable bit in test-trim[1-3].sh
13538         This avoids a test failure for each new file.
13539         * tests/test-trim1.sh: Make this file executable.
13540         * tests/test-trim2.sh: Likewise.
13541         * tests/test-trim3.sh: Likewise.
13543 2023-04-03  Bruno Haible  <bruno@clisp.org>
13545         Use the 'extern-inline' module explicitly where needed.
13546         I found the list of affected modules through this command:
13547           for m in $(for f in `grep -Fl _GL_INLINE_HEADER_BEGIN lib/*.h | sort`
13548                      do ./gnulib-tool --find $f; done)
13549           do grep '^extern-inline' modules/$m > /dev/null || echo $m
13550           done
13551         * modules/fdutimensat (Depends-on): Add extern-inline.
13552         * modules/file-has-acl (Depends-on): Likewise.
13553         * modules/hamt (Depends-on): Likewise.
13554         * modules/relocatable-prog-wrapper (Depends-on): Likewise.
13555         * modules/safe-alloc (Depends-on): Likewise.
13556         * modules/string-desc (Depends-on): Likewise.
13557         * modules/string-desc-quotearg (Depends-on): Likewise.
13558         * modules/xstring-desc (Depends-on): Likewise.
13559         * modules/xvasprintf (Depends-on): Likewise.
13561 2023-04-03  Bruno Haible  <bruno@clisp.org>
13563         vasnprintf-posix: Fix harmless mistake (regression 2023-03-24).
13564         Found by Coverity.
13565         * lib/vasnprintf.c (MAX_ROOM_NEEDED): Insert 'break;' statement.
13567 2023-04-03  Bruno Haible  <bruno@clisp.org>
13569         mbstoc32s tests: Check behaviour in the C locale.
13570         * tests/test-mbstoc32s.c (main): Test behaviour in the C locale. Based
13571         on tests/test-mbstowcs.c.
13572         * tests/test-mbstoc32s-5.sh: New file, based on tests/test-mbstowcs5.sh.
13573         * modules/mbstoc32s-tests (Files): Add it.
13574         (Depends-on): Add btoc32.
13575         (Makefile.am): Run test-mbstoc32s-5.sh.
13577 2023-04-03  Bruno Haible  <bruno@clisp.org>
13579         mbsnrtoc32s tests: Check behaviour in the C locale.
13580         * tests/test-mbsnrtoc32s.c (main): Test behaviour in the C locale. Based
13581         on tests/test-mbsnrtowcs.c.
13582         * tests/test-mbsnrtoc32s-5.sh: New file, based on
13583         tests/test-mbsrtowcs5.sh.
13584         * modules/mbsnrtoc32s-tests (Files): Add it.
13585         (Depends-on): Add btoc32.
13586         (Makefile.am): Run test-mbsnrtoc32s-5.sh.
13588 2023-04-03  Bruno Haible  <bruno@clisp.org>
13590         mbsrtoc32s tests: Check behaviour in the C locale.
13591         * tests/test-mbsrtoc32s.c (main): Test behaviour in the C locale. Based
13592         on tests/test-mbsrtowcs.c.
13593         * tests/test-mbsrtoc32s-5.sh: New file, based on
13594         tests/test-mbsrtowcs5.sh.
13595         * modules/mbsrtoc32s-tests (Files): Add it.
13596         (Depends-on): Add btoc32.
13597         (Makefile.am): Run test-mbsrtoc32s-5.sh.
13599 2023-04-03  Bruno Haible  <bruno@clisp.org>
13601         btoc32 tests: Check behaviour in the C locale.
13602         * tests/test-btoc32.c (main): Test behaviour in the C locale. Based on
13603         tests/test-btowc.c.
13604         * tests/test-btoc32-3.sh: New file, based on tests/test-btowc3.sh.
13605         * modules/btoc32-tests (Files): Add it.
13606         (Makefile.am): Test it.
13608 2023-04-03  Bruno Haible  <bruno@clisp.org>
13610         mbrtoc32 tests: Prefer *c32* functions.
13611         * tests/test-mbrtoc32.c (main): Use btoc32 instead of btowc.
13612         * modules/mbrtoc32-tests (Depends-on): Add btoc32.
13614 2023-04-03  Bruno Haible  <bruno@clisp.org>
13616         mbrtoc32 tests: Add comment.
13617         * m4/mbrtowc.m4 (gl_MBRTOWC_C_LOCALE): Add comment.
13618         * m4/mbrtoc32.m4 (gl_MBRTOC32_C_LOCALE): Add comment.
13619         * tests/test-mbrtoc32.c: Add comment.
13620         * tests/test-mbrtoc32-5.sh: Use symmetric coding style.
13621         * doc/posix-functions/mbrtoc32.texi: Update.
13623 2023-04-02  Bruno Haible  <bruno@clisp.org>
13625         trim: Fix trim_trailing result in multibyte locales.
13626         * lib/trim.c (trim2): Simplify algorithm for trim_trailing in multibyte
13627         locales, to use 2 instead of 3 states.
13628         (IF_LINT): Remove macro.
13630         trim: Add tests.
13631         * tests/test-trim.c: New file.
13632         * tests/test-trim1.sh: New file.
13633         * tests/test-trim2.sh: New file.
13634         * tests/test-trim3.sh: New file.
13635         * modules/trim-tests: New file.
13637 2023-04-02  Bruno Haible  <bruno@clisp.org>
13639         unistr/u8-strstr: Simplify code.
13640         * lib/unistr/u8-strstr.c: Inline the contents of lib/unistr/u-strstr.h.
13641         * lib/unistr/u-strstr.h: Remove file.
13642         * modules/unistr/u8-strstr (Files): Remove it.
13644         unistr/u{16,32}-strstr: Use two-way algorithm (no memory allocation).
13645         * lib/wcs-two-way.h: Use UNIT instead of wchar_t. Don't undefine
13646         RETURN_TYPE.
13647         * lib/wcsstr-impl.h: Move the non-linear implementation away. Use UNIT
13648         instead of wchar_t, RETURN_TYPE instead of 'wchar_t *', FUNC instead of
13649         wcsstr.
13650         (AVAILABLE): Use MEMCHR0 instead of wmemchr.
13651         (FUNC): Use STRCHR instead of wcschr.
13652         * lib/wcsstr.c: Moved the non-linear implementation to here.
13653         (FUNC, UNIT, RETURN_TYPE, MEMCHR0, STRCHR): New macros.
13654         * lib/unistr/u16-strstr.c: Don't include malloca.h, str-kmp.h,
13655         u-strstr.h. Instead, include wcsstr-impl.h.
13656         * lib/unistr/u32-strstr.c: Likewise.
13657         * modules/unistr/u16-strstr (Files): Remove u-strstr.h, str-kmp.h. Add
13658         wcsstr-impl.h, wcs-two-way.h.
13659         (Depends-on): Remove u16-strmbtouc, u16-strlen, u16-strnlen, malloca.
13660         Add u16-chr, u16-cmp.
13661         * modules/unistr/u32-strstr (Files): Remove u-strstr.h, str-kmp.h. Add
13662         wcsstr-impl.h, wcs-two-way.h.
13663         (Depends-on): Remove u32-strlen, u32-strnlen, malloca. Add u32-chr,
13664         u32-cmp.
13666 2023-04-02  Bruno Haible  <bruno@clisp.org>
13668         unistr/u*strstr tests: Add more tests.
13669         * tests/unistr/test-u-strstr.h (test_u_strstr): Add the two latest tests
13670         from tests/test-strstr.c.
13671         * tests/unistr/test-u8-strstr.c (U_SET): New macro.
13672         * tests/unistr/test-u16-strstr.c (U_SET): New macro.
13673         * tests/unistr/test-u32-strstr.c (U_SET): New macro.
13674         * modules/unistr/u8-strstr-tests (Depends-on): Add unistr/u8-set.
13675         * modules/unistr/u16-strstr-tests (Depends-on): Add unistr/u16-set.
13676         * modules/unistr/u32-strstr-tests (Depends-on): Add unistr/u32-set.
13678 2023-04-01  Bruno Haible  <bruno@clisp.org>
13680         vasnwprintf-posix: Fix behaviour in the C locale.
13681         * lib/vasnprintf.c (VASNPRINTF): If NEED_WPRINTF_DIRECTIVE_C is set,
13682         implement the 'c' directive here.
13683         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Invoke gl_MBRTOWC_C_LOCALE.
13684         If mbrtowc is buggy in the C locale, define NEED_WPRINTF_DIRECTIVE_C.
13685         * modules/vasnwprintf (Files): Add m4/mbrtowc.m4.
13686         * tests/test-vasnwprintf-posix.c (test_function): Add tests of %s and %c
13687         in the C locale.
13688         * doc/posix-functions/fwprintf.texi: Mention the C locale behaviour bug.
13689         * doc/posix-functions/swprintf.texi: Likewise.
13690         * doc/posix-functions/vfwprintf.texi: Likewise.
13691         * doc/posix-functions/vswprintf.texi: Likewise.
13692         * doc/posix-functions/vwprintf.texi: Likewise.
13693         * doc/posix-functions/wprintf.texi: Likewise.
13695 2023-04-01  Bruno Haible  <bruno@clisp.org>
13697         vasnprintf-posix: Fix crash in narrow %lc directive (regr. 2023-03-21).
13698         * lib/vasnprintf.c (VASNPRINTF): Negative results of local_wcrtomb can
13699         now occur; handle them.
13700         * tests/test-vasnprintf-posix.c (test_function): Test %lc directive with
13701         a wint_t argument that is not a valid wide character.
13702         * tests/test-snprintf-posix.h (test_function): Likewise.
13703         * tests/test-sprintf-posix.h (test_function): Likewise.
13704         * tests/test-vasnwprintf-posix.c (test_function): Likewise.
13705         * tests/test-vasprintf-posix.c (test_function): Likewise.
13707 2023-04-01  Bruno Haible  <bruno@clisp.org>
13709         stddef: Fix __need_wint_t handling in case of two stddef.h overrides.
13710         * lib/stddef.in.h: Replace _GL_STDDEF_WINT_T with a symbol that depends
13711         on the @GUARD_PREFIX@.
13713 2023-03-31  Bruno Haible  <bruno@clisp.org>
13715         vasnwprintf: Fix crash upon conversion failure when processing %s.
13716         * lib/vasnprintf.c (VASNPRINTF): When processing %s with !has_precision
13717         and !has_width, don't call abort() if there is a conversion failure.
13719 2023-03-30  Bruno Haible  <bruno@clisp.org>
13721         Avoid test failures on Android.
13722         * tests/test-btowc.c (main): Treat C locale like in
13723         tests/test-mbrtowc.c.
13724         * tests/test-mbsrtowcs.c (main): Likewise.
13725         * tests/test-mbsnrtowcs.c (main): Likewise.
13726         * tests/test-mbstowcs.c (main): Likewise.
13728 2023-03-30  Bruno Haible  <bruno@clisp.org>
13730         mbstowcs: Add tests.
13731         * tests/test-mbstowcs1.sh: New file, based on tests/test-mbsrtowcs1.sh.
13732         * tests/test-mbstowcs2.sh: New file, based on tests/test-mbsrtowcs2.sh.
13733         * tests/test-mbstowcs3.sh: New file, based on tests/test-mbsrtowcs3.sh.
13734         * tests/test-mbstowcs4.sh: New file, based on tests/test-mbsrtowcs4.sh.
13735         * tests/test-mbstowcs5.sh: New file, based on tests/test-mbsrtowcs5.sh.
13736         * tests/test-mbstowcs.c: New file, based on tests/test-mbsrtowcs.c.
13737         * modules/mbstowcs-tests: New file, based on modules/mbsrtowcs-tests.
13739         mbstowcs: New module.
13740         * lib/stdlib.in.h (mbstowcs): New declaration.
13741         * lib/mbstowcs.c: New file, based on lib/mbstoc32s.c.
13742         * m4/mbstowcs.m4: New file.
13743         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether mbstowcs is declared.
13744         (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize GNULIB_MBSTOWCS.
13745         (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_MBSTOWCS.
13746         * modules/stdlib (Makefile.am): Substitute GNULIB_MBSTOWCS,
13747         REPLACE_MBSTOWCS.
13748         * modules/mbstowcs: New file.
13749         * tests/test-stdlib-c++.cc (mbstowcs): Check signature.
13750         * doc/posix-functions/mbstowcs.texi: Mention the C locale behaviour bug
13751         and the new module.
13753 2023-03-30  Bruno Haible  <bruno@clisp.org>
13755         mbsnrtowcs: Fix behaviour in the C locale.
13756         * m4/mbsnrtowcs.m4 (gl_FUNC_MBSNRTOWCS): Invoke gl_MBRTOWC_C_LOCALE. If
13757         mbrtowc is buggy in the C locale, override also mbsnrtowcs.
13758         * modules/mbsnrtowcs (Files): Add m4/mbrtowc.m4.
13759         * tests/test-mbsnrtowcs.c (main): Add a test of the C locale, based on
13760         tests/test-mbsrtowcs.c.
13761         * tests/test-mbsnrtowcs5.sh: New file, based on tests/test-mbrtowc5.sh.
13762         * modules/mbsnrtowcs-tests (Files): Add it.
13763         (Makefile.am): Test it.
13764         * doc/posix-functions/mbsnrtowcs.texi: Mention the C locale behaviour
13765         bug.
13767 2023-03-30  Bruno Haible  <bruno@clisp.org>
13769         mbsrtowcs: Fix behaviour in the C locale.
13770         * m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS): Invoke gl_MBRTOWC_C_LOCALE. If
13771         mbrtowc is buggy in the C locale, override also mbsrtowcs.
13772         * modules/mbsrtowcs (Files): Add m4/mbrtowc.m4.
13773         * tests/test-mbsrtowcs.c (main): Add a test of the C locale, based on
13774         tests/test-mbrtowc.c.
13775         * tests/test-mbsrtowcs5.sh: New file, based on tests/test-mbrtowc5.sh.
13776         * modules/mbsrtowcs-tests (Files): Add it.
13777         (Makefile.am): Test it.
13778         * doc/posix-functions/mbsrtowcs.texi: Mention the C locale behaviour
13779         bug.
13781 2023-03-30  Bruno Haible  <bruno@clisp.org>
13783         mbrlen: Add tests.
13784         * tests/test-mbrlen1.sh: New file, based on tests/test-mbrtowc1.sh.
13785         * tests/test-mbrlen2.sh: New file, based on tests/test-mbrtowc2.sh.
13786         * tests/test-mbrlen3.sh: New file, based on tests/test-mbrtowc3.sh.
13787         * tests/test-mbrlen4.sh: New file, based on tests/test-mbrtowc4.sh.
13788         * tests/test-mbrlen5.sh: New file, based on tests/test-mbrtowc5.sh.
13789         * tests/test-mbrlen.c: New file, based on tests/test-mbrtowc.c.
13790         * tests/test-mbrlen-w32-1.sh: New file, based on
13791         tests/test-mbrtowc-w32-1.sh.
13792         * tests/test-mbrlen-w32-2.sh: New file, based on
13793         tests/test-mbrtowc-w32-2.sh.
13794         * tests/test-mbrlen-w32-3.sh: New file, based on
13795         tests/test-mbrtowc-w32-3.sh.
13796         * tests/test-mbrlen-w32-4.sh: New file, based on
13797         tests/test-mbrtowc-w32-4.sh.
13798         * tests/test-mbrlen-w32-5.sh: New file, based on
13799         tests/test-mbrtowc-w32-5.sh.
13800         * tests/test-mbrlen-w32-6.sh: New file, based on
13801         tests/test-mbrtowc-w32-6.sh.
13802         * tests/test-mbrlen-w32-7.sh: New file, based on
13803         tests/test-mbrtowc-w32-7.sh.
13804         * tests/test-mbrlen-w32.c: New file, based on tests/test-mbrtowc-w32.c.
13805         * modules/mbrlen-tests: New file, based on modules/mbrtowc-tests.
13806         * doc/posix-functions/mbrlen.texi: Update.
13808 2023-03-30  Bruno Haible  <bruno@clisp.org>
13810         btowc: Fix behaviour in the C locale.
13811         * lib/btowc.c: Include <string.h>
13812         (btowc): Use mbrtowc instead of mbtowc when possible.
13813         * m4/btowc.m4 (gl_FUNC_BTOWC): Test for the mingw bug in the C locale.
13814         Invoke gl_MBRTOWC_C_LOCALE. If mbrtowc is buggy in the C locale,
13815         override also btowc.
13816         (gl_PREREQ_BTOWC): Test whether mbrtowc exists.
13817         * modules/btowc (Files): Add m4/mbrtowc.m4.
13818         (Depends-on): Add mbrtowc.
13819         * tests/test-btowc.c (main): Add a test of the C locale, based on
13820         tests/test-mbrtowc.c.
13821         * tests/test-btowc3.sh: New file, based on tests/test-mbrtowc5.sh.
13822         * modules/btowc-tests (Files): Add it.
13823         (Makefile.am): Test it.
13824         * doc/posix-functions/btowc.texi: Mention the two C locale behaviour
13825         bugs and that they are worked around.
13827 2023-03-30  Bruno Haible  <bruno@clisp.org>
13829         mbrtowc tests: Add comment.
13830         * tests/test-mbrtowc.c: Add comment.
13831         * tests/test-mbrtowc5.sh: Use symmetric coding style.
13832         * doc/posix-functions/mbrtowc.texi: Update.
13834 2023-03-30  Bruno Haible  <bruno@clisp.org>
13836         stdlib tests: Check behaviour of C locale.
13837         * tests/test-stdlib.c (main): Check MB_CUR_MAX.
13839 2023-03-30  Bruno Haible  <bruno@clisp.org>
13841         string-desc tests: Fix "make distcheck" failure.
13842         * tests/test-string-desc.sh: Run the test in a subdir.
13844 2023-03-30  Bruno Haible  <bruno@clisp.org>
13846         snprintf: Avoid autoconf warning regarding gl_PRINTF_POSITIONS.
13847         * m4/printf.m4 (gl_PRINTF_POSITIONS): Define through AC_DEFUN_ONCE.
13849 2023-03-28  Bruno Haible  <bruno@clisp.org>
13851         doc: Document string-desc and related modules.
13852         * doc/string-desc.texi: New file.
13853         * doc/gnulib.texi (Particular Modules): Include it.
13855         string-desc-quotearg: Add tests.
13856         * tests/test-string-desc-quotearg.c: New file.
13857         * modules/string-desc-quotearg-tests: New file.
13859         string-desc-quotearg: New module.
13860         * lib/string-desc-quotearg.h: New file.
13861         * lib/string-desc-quotearg.c: New file.
13862         * modules/string-desc-quotearg: New file.
13864         xstring-desc: Add tests.
13865         * tests/test-xstring-desc.c: New file.
13866         * modules/xstring-desc-tests: New file.
13868         xstring-desc: New module.
13869         * lib/xstring-desc.h: New file.
13870         * lib/xstring-desc.c: New file.
13871         * modules/xstring-desc: New file.
13873         string-desc: Add tests.
13874         * tests/test-string-desc.sh: New file.
13875         * tests/test-string-desc.c: New file.
13876         * modules/string-desc-tests: New file.
13878         string-desc: New module.
13879         * lib/string-desc.h: New file.
13880         * lib/string-desc.c: New file.
13881         * lib/string-desc-contains.c: New file.
13882         * modules/string-desc: New file.
13884 2023-03-28  Bruno Haible  <bruno@clisp.org>
13886         doc: Fix placement of memset_explicit node.
13887         * doc/posix-functions/memset_explicit.texi: Define a section, not a
13888         subsection.
13890 2023-03-28  Bruno Haible  <bruno@clisp.org>
13892         doc: Update regarding linear string search.
13893         * doc/glibc-functions/memmem.texi: Update platforms list.
13894         * doc/posix-functions/strstr.texi: Likewise.
13895         * doc/glibc-functions/strcasestr.texi: Likewise.
13897 2023-03-27  Bruno Haible  <bruno@clisp.org>
13899         ialloc: Add comments.
13900         * lib/ialloc.h (imalloc, irealloc, icalloc, ireallocarray): Add
13901         comments.
13903 2023-03-27  Paul Eggert  <eggert@cs.ucla.edu>
13905         Support FALLTHROUGH macro better in glibc+clang.
13906         * lib/fnmatch.c (FALLTHROUGH): Use __attribute__ ((__fallthrough__))
13907         also in clang >= 10.
13908         * lib/fts.c (FALLTHROUGH): Likewise.
13909         * lib/regex_internal.h (FALLTHROUGH): Likewise.
13911 2023-03-27  Bruno Haible  <bruno@clisp.org>
13913         wcsstr: Ensure worst-case linear execution time.
13914         * lib/wchar.in.h (wcsstr): Consider REPLACE_WCSSTR.
13915         * lib/wcs-two-way.h: New file, based on lib/str-two-way.h.
13916         * lib/wcsstr-impl.h: If requested, use the two-way algorithm. New code
13917         based on lib/strstr.c.
13918         * m4/wcsstr.m4 (gl_FUNC_WCSSTR_SIMPLE): Renamed from gl_FUNC_WCSSTR.
13919         (gl_FUNC_WCSSTR): New macro, based on gl_FUNC_STRSTR in m4/strstr.m4.
13920         * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WCSSTR.
13921         * modules/wchar (Makefile.am): Substitute REPLACE_WCSSTR.
13922         * modules/wcsstr-simple: New file, based on modules/wcsstr.
13923         * modules/wcsstr (Description): Document that this module now provides
13924         an efficient implementation.
13925         (Files): Add lib/wcs-two-way.h.
13926         (Depends-on): Depend on wcsstr-simple and the dependencies of the
13927         two-way implementation.
13928         (configure.ac): Use AC_LIBOBJ instead of a conditional. Don't invoke
13929         gl_WCHAR_MODULE_INDICATOR.
13930         (Makefile.am): Don't augment lib_SOURCES.
13931         * tests/test-wcsstr.c: New file, based on tests/test-strstr.c.
13932         * modules/wcsstr-tests: New file, based on modules/strstr-tests.
13933         * doc/posix-functions/wcsstr.texi: Mention the worst-case complexity.
13934         Mention the new 'wcsstr-simple' module.
13935         * doc/posix-functions/strstr.texi: Fix typo.
13937 2023-03-27  Bruno Haible  <bruno@clisp.org>
13939         Add test case from a past musl libc bug.
13940         * tests/test-strstr.c (main): Add test of periodic needle.
13941         * tests/test-strcasestr.c (main): Likewise.
13942         * tests/test-c-strstr.c (main): Likewise.
13943         * tests/test-c-strcasestr.c (main): Likewise.
13944         * tests/test-memmem.c (main): Likewise.
13946 2023-03-27  Bruno Haible  <bruno@clisp.org>
13948         uchar: ISO C 23: Define char8_t.
13949         * lib/uchar.in.h (char8_t): New type or macro.
13950         * m4/uchar_h.m4 (gl_TYPE_CHAR8_T): New macro.
13951         (gl_UCHAR_H): Invoke it. Set CXX_HAS_CHAR8_TYPE.
13952         * modules/uchar (Makefile.am): Substitute CXX_HAS_CHAR8_TYPE,
13953         GNULIBHEADERS_OVERRIDE_CHAR8_T.
13954         * tests/test-uchar.c: Add tests for char8_t.
13956 2023-03-25  Bruno Haible  <bruno@clisp.org>
13958         stdlib: ISO C 23: Document issue with once_flag and call_once.
13959         * doc/posix-headers/stdlib.texi: Document issue and workaround.
13961 2023-03-25  Bruno Haible  <bruno@clisp.org>
13963         call_once: New module, separate from mtx.
13964         * lib/threads.in.h (call_once): Declare as part of module 'call_once',
13965         not module 'mtx'.
13966         * lib/call_once.c: New file, extracted from lib/mtx.c.
13967         * lib/mtx.c (call_once): Remove function.
13968         * m4/threads_h.m4 (gl_THREADS_H_REQUIRE_DEFAULTS): Inititalize
13969         GNULIB_CALL_ONCE.
13970         * modules/threads-h (Makefile.am): Substitute GNULIB_CALL_ONCE.
13971         * modules/call_once: New file, based on modules/mtx.
13972         * modules/threads (Depends-on): Add call_once.
13973         * tests/test-threads-c++.cc: Update accordingly.
13974         * modules/call_once-tests: New file, based on modules/mtx-tests.
13975         * modules/mtx-tests (Files): Remove tests/test-call_once.c.
13976         (Makefile.am): Don't compile test-call_once.
13977         * doc/posix-functions/call_once.texi: Document that the relevant module
13978         is now 'call_once'.
13979         * NEWS: Mention the change.
13981 2023-03-25  Bruno Haible  <bruno@clisp.org>
13983         stdio: ISO C 23: Define _PRINTF_NAN_LEN_MAX.
13984         * lib/stdio.in.h (_PRINTF_NAN_LEN_MAX): New macro.
13985         * m4/stdio_h.m4 (gl_STDIO_H): Invoke gl_MUSL_LIBC.
13986         * modules/stdio (Files): Add m4/musl.m4.
13987         * tests/test-stdio.c: Check that _PRINTF_NAN_LEN_MAX is defined.
13988         Include nan.h, macros.h.
13989         (main): Check the value of _PRINTF_NAN_LEN_MAX.
13990         * modules/stdio-tests (Files): Add tests/nan.h, tests/macros.h,
13991         m4/exponentd.m4.
13992         (configure.ac): Invoke gl_DOUBLE_EXPONENT_LOCATION.
13994 2023-03-25  Bruno Haible  <bruno@clisp.org>
13996         Make some header file tests a bit stronger.
13997         * tests/test-float.c: Include fpucw.h and macros.h only after checking
13998         the macros.
13999         * tests/test-glob-h.c: Include macros.h only after checking the types
14000         and macros.
14001         * tests/test-inttypes.c: Don't include <stddef.h>.
14002         * tests/test-math.c: Include <limits.h> and macros.h only after checking
14003         the types and macros.
14004         * tests/test-stddef.c: Include <limits.h> only after checking the types
14005         and macros.
14006         * tests/test-sys_select.c: Include signature.h only after checking the
14007         types.
14008         * tests/test-sys_socket.c: Include <errno.h> only after checking the
14009         types and macros.
14010         * tests/test-wctype-h.c: Include macros.h only after checking the types.
14012 2023-03-25  Bruno Haible  <bruno@clisp.org>
14014         is* tests: Ensure needed .m4 files are packaged.
14015         * modules/isfinite-tests (Files): Add m4/exponent*.m4.
14016         * modules/isnan-tests (Files): Likewise.
14017         * modules/isnanf-tests (Files): Add m4/exponentf.m4.
14018         * modules/isnanf-nolibm-tests (Files): Likewise.
14019         * modules/isnand-tests (Files): Add m4/exponentd.m4.
14020         * modules/isnand-nolibm-tests (Files): Likewise.
14021         * modules/isnanl-tests (Files): Add m4/exponentl.m4.
14022         * modules/isnanl-nolibm-tests (Files): Likewise.
14023         * modules/isinf-tests (Files): Reorder.
14025 2023-03-24  Bruno Haible  <bruno@clisp.org>
14027         *printf-posix: ISO C 23: Support size specifiers 'wN' and 'wfN'.
14028         * lib/printf-args.h: Include <stdint.h>.
14029         (arg_type): Add TYPE_[U]INT8_T, ..., TYPE_[U]INT_FAST64_T and
14030         TYPE_COUNT_INT8_T_POINTER, ..., TYPE_COUNT_INT_FAST64_T_POINTER.
14031         (argument): Add the union members a_[u]int8_t, ..., a_[u]int_fast64_t
14032         and a_count_int8_t_pointer, ..., a_count_int_fast64_t_pointer.
14033         * lib/printf-args.c: Include <limits.h>.
14034         (PRINTF_FETCHARGS): Handle TYPE_[U]INT8_T, ..., TYPE_[U]INT_FAST64_T and
14035         TYPE_COUNT_INT8_T_POINTER, ..., TYPE_COUNT_INT_FAST64_T_POINTER.
14036         * lib/printf-parse.c (PRINTF_PARSE): Accept only one size specifier, not
14037         a sequence of size specifiers. Accept "wN" and "wfN", where N = 8, 16,
14038         32, 64.
14039         * lib/vasnprintf.c (MAX_ROOM_NEEDED, VASNPRINTF): Handle the new TYPE_*
14040         values as well.
14041         * m4/printf.m4 (gl_PRINTF_SIZES_C23): New macro.
14042         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_IS_POSIX): Require
14043         gl_PRINTF_SIZES_C23. Test gl_cv_func_printf_sizes_c23.
14044         * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_IS_POSIX): Likewise.
14045         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_IS_POSIX): Likewise.
14046         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_IS_POSIX):
14047         Likewise.
14048         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_IS_POSIX): Likewise.
14049         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_IS_POSIX): Likewise.
14050         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_IS_POSIX): Likewise.
14051         * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_IS_POSIX): Likewise.
14052         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_IS_POSIX): Likewise.
14053         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_IS_POSIX): Likewise.
14054         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_IS_POSIX): Likewise.
14055         * tests/test-vasnprintf-posix.c (test_function): Add tests for size
14056         specifiers with %d, %u, %b, %o, %x.
14057         * tests/test-snprintf-posix.h (test_function): Likewise.
14058         * tests/test-sprintf-posix.h (test_function): Likewise.
14059         * tests/test-vasnwprintf-posix.c (test_function): Likewise.
14060         * tests/test-vasprintf-posix.c (test_function): Likewise.
14061         * modules/vasnprintf (Depends-on): Add limits-h.
14062         * modules/vasnwprintf (Depends-on): Add limits-h.
14063         * modules/c-vasnprintf (Depends-on): Add limits-h, stdint.
14064         * modules/unistdio/u-printf-args (Depends-on): Add stdint, limits-h.
14065         * doc/posix-functions/dprintf.texi: Mention the ISO C 23 size
14066         specifiers.
14067         * doc/posix-functions/fprintf.texi: Likewise.
14068         * doc/posix-functions/fwprintf.texi: Likewise.
14069         * doc/posix-functions/printf.texi: Likewise.
14070         * doc/posix-functions/snprintf.texi: Likewise.
14071         * doc/posix-functions/sprintf.texi: Likewise.
14072         * doc/posix-functions/swprintf.texi: Likewise.
14073         * doc/posix-functions/vdprintf.texi: Likewise.
14074         * doc/posix-functions/vfprintf.texi: Likewise.
14075         * doc/posix-functions/vfwprintf.texi: Likewise.
14076         * doc/posix-functions/vprintf.texi: Likewise.
14077         * doc/posix-functions/vsnprintf.texi: Likewise.
14078         * doc/posix-functions/vsprintf.texi: Likewise.
14079         * doc/posix-functions/vswprintf.texi: Likewise.
14080         * doc/posix-functions/vwprintf.texi: Likewise.
14081         * doc/posix-functions/wprintf.texi: Likewise.
14083 2023-03-24  Bruno Haible  <bruno@clisp.org>
14085         xprintf-gnu: New module.
14086         * modules/xprintf-gnu: New file, based on modules/vasnprintf-gnu and
14087         modules/xprintf-posix.
14089 2023-03-24  Bruno Haible  <bruno@clisp.org>
14091         xvasprintf-gnu: New module.
14092         * modules/xvasprintf-gnu: New file, based on modules/xvasprintf-posix.
14094 2023-03-24  Bruno Haible  <bruno@clisp.org>
14096         vasnwprintf-gnu: Add tests.
14097         * tests/test-vasnwprintf-gnu.c: New file, based on
14098         tests/test-vasnwprintf-posix.c and tests/test-vasnprintf-gnu.c.
14099         * modules/vasnwprintf-gnu-tests: New file, based on
14100         modules/vasnwprintf-posix-tests.
14102         vasnwprintf-gnu: New module.
14103         * m4/vasnwprintf-posix.m4 (gl_FUNC_VASNWPRINTF_IS_POSIX): New macro.
14104         (gl_FUNC_VASNWPRINTF_POSIX): Require it. Invoke
14105         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
14106         * m4/vasnwprintf-gnu.m4: New file, based on m4/vasnprintf-gnu.m4.
14107         * modules/vasnwprintf-gnu: New file, based on modules/vasnprintf-gnu.
14109 2023-03-24  Bruno Haible  <bruno@clisp.org>
14111         obstack-printf-gnu: Add tests.
14112         * modules/obstack-printf-gnu-tests: New file, based on
14113         modules/obstack-printf-posix-tests.
14115         obstack-printf-gnu: New module.
14116         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_IS_POSIX): New
14117         macro, extracted from gl_FUNC_OBSTACK_PRINTF_POSIX.
14118         (gl_FUNC_OBSTACK_PRINTF_POSIX): Require it. Invoke
14119         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
14120         * m4/obstack-printf-gnu.m4: New file, based on
14121         m4/obstack-printf-posix.m4.
14122         * modules/obstack-printf-gnu: New file, based on modules/vasnprintf-gnu.
14123         * doc/glibc-functions/obstack_printf.texi: Mention the new module.
14124         * doc/glibc-functions/obstack_vprintf.texi: Likewise.
14126 2023-03-24  Bruno Haible  <bruno@clisp.org>
14128         dprintf-gnu: Add tests.
14129         * tests/test-dprintf-gnu.sh: New file, based on
14130         tests/test-dprintf-posix.sh.
14131         * tests/test-dprintf-gnu.c: New file, based on
14132         tests/test-vasnprintf-gnu.c.
14133         * modules/dprintf-gnu-tests: New file, based on
14134         modules/dprintf-posix-tests.
14136         dprintf-gnu: New module.
14137         * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_IS_POSIX): New macro,
14138         extracted from gl_FUNC_DPRINTF_POSIX.
14139         (gl_FUNC_DPRINTF_POSIX): Require it. Invoke
14140         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
14141         * m4/dprintf-gnu.m4: New file, based on m4/dprintf-posix.m4.
14142         * modules/dprintf-gnu: New file, based on modules/vasnprintf-gnu.
14143         * doc/posix-functions/dprintf.texi: Mention the new module.
14145 2023-03-24  Bruno Haible  <bruno@clisp.org>
14147         vdprintf-gnu: Add tests.
14148         * tests/test-vdprintf-gnu.sh: New file, based on
14149         tests/test-vdprintf-posix.sh.
14150         * tests/test-vdprintf-gnu.c: New file, based on
14151         tests/test-vdprintf-posix.c.
14152         * modules/vdprintf-gnu-tests: New file, based on
14153         modules/vdprintf-posix-tests.
14155         vdprintf-gnu: New module.
14156         * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_IS_POSIX): New macro,
14157         extracted from gl_FUNC_VDPRINTF_POSIX.
14158         (gl_FUNC_VDPRINTF_POSIX): Require it. Invoke
14159         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
14160         * m4/vdprintf-gnu.m4: New file, based on m4/vdprintf-posix.m4.
14161         * modules/vdprintf-gnu: New file, based on modules/vasnprintf-gnu.
14162         * doc/posix-functions/vdprintf.texi: Mention the new module.
14164 2023-03-24  Bruno Haible  <bruno@clisp.org>
14166         printf-gnu: Add tests.
14167         * tests/test-printf-gnu.sh: New file, based on
14168         tests/test-printf-posix.sh.
14169         * tests/test-printf-gnu.c: New file, based on tests/test-printf-posix.c.
14170         * modules/printf-gnu-tests: New file, based on
14171         modules/printf-posix-tests.
14173         printf-gnu: New module.
14174         * m4/printf-posix.m4: Renamed from m4/printf-posix-rpl.m4.
14175         (gl_FUNC_PRINTF_IS_POSIX): New macro.
14176         (gl_FUNC_PRINTF_POSIX): Require it. Don't require
14177         gl_FUNC_VFPRINTF_POSIX. Invoke gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS
14178         and gl_REPLACE_VASNPRINTF.
14179         * m4/printf-gnu.m4: New file, based on m4/fprintf-posix.m4.
14180         * modules/printf-posix (Files): Update.
14181         * modules/printf-gnu: New file, based on modules/vasnprintf-gnu.
14182         * doc/posix-functions/printf.texi: Mention the new module.
14184 2023-03-24  Bruno Haible  <bruno@clisp.org>
14186         vprintf-gnu: Add tests.
14187         * tests/test-vprintf-gnu.sh: New file, based on
14188         tests/test-vprintf-posix.sh.
14189         * tests/test-vprintf-gnu.c: New file, based on
14190         tests/test-vprintf-posix.c.
14191         * tests/test-printf-gnu.h: New file, based on
14192         tests/test-vasnprintf-gnu.c.
14193         * modules/vprintf-gnu-tests: New file, based on
14194         modules/vprintf-posix-tests.
14196         vprintf-gnu: New module.
14197         * m4/vprintf-posix.m4 (gl_FUNC_VPRINTF_IS_POSIX): New macro.
14198         (gl_FUNC_VPRINTF_POSIX): Require it. Don't require
14199         gl_FUNC_VFPRINTF_POSIX. Invoke gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS
14200         and gl_REPLACE_VASNPRINTF.
14201         * m4/vprintf-gnu.m4: New file, based on m4/vfprintf-posix.m4.
14202         * modules/vprintf-gnu: New file, based on modules/vasnprintf-gnu.
14203         * doc/posix-functions/vprintf.texi: Mention the new module.
14205 2023-03-24  Bruno Haible  <bruno@clisp.org>
14207         fprintf-gnu: Add tests.
14208         * tests/test-fprintf-gnu.sh: New file, based on
14209         tests/test-fprintf-posix.sh.
14210         * tests/test-fprintf-gnu.c: New file, based on
14211         tests/test-fprintf-posix.c.
14212         * modules/fprintf-gnu-tests: New file, based on
14213         modules/fprintf-posix-tests.
14215         fprintf-gnu: New module.
14216         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_IS_POSIX): New macro,
14217         extracted from gl_FUNC_FPRINTF_POSIX.
14218         (gl_FUNC_FPRINTF_POSIX): Require it. Invoke
14219         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
14220         * m4/fprintf-gnu.m4: New file, based on m4/fprintf-posix.m4.
14221         * modules/fprintf-gnu: New file, based on modules/vasnprintf-gnu.
14222         * doc/posix-functions/fprintf.texi: Mention the new module.
14224 2023-03-24  Bruno Haible  <bruno@clisp.org>
14226         vfprintf-gnu: Add tests.
14227         * tests/test-vfprintf-gnu.sh: New file, based on
14228         tests/test-vfprintf-posix.sh.
14229         * tests/test-vfprintf-gnu.c: New file, based on
14230         tests/test-vfprintf-posix.c.
14231         * tests/test-fprintf-gnu.h: New file, based on
14232         tests/test-vasnprintf-gnu.c.
14233         * tests/test-printf-gnu.output: New file, based on
14234         tests/test-vasnprintf-gnu.c.
14235         * modules/vfprintf-gnu-tests: New file, based on
14236         modules/vfprintf-posix-tests.
14238         vfprintf-gnu: New module.
14239         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_IS_POSIX): New macro,
14240         extracted from gl_FUNC_VFPRINTF_POSIX.
14241         (gl_FUNC_VFPRINTF_POSIX): Require it. Invoke
14242         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
14243         * m4/vfprintf-gnu.m4: New file, based on m4/vfprintf-posix.m4.
14244         * modules/vfprintf-gnu: New file, based on modules/vasnprintf-gnu.
14245         * doc/posix-functions/vfprintf.texi: Mention the new module.
14247 2023-03-24  Bruno Haible  <bruno@clisp.org>
14249         vasprintf-gnu: Add tests.
14250         * tests/test-vasprintf-gnu.c: New file, based on
14251         tests/test-vasprintf-posix.c and tests/test-vasnprintf-gnu.c.
14252         * modules/vasprintf-gnu-tests: New file, based on
14253         modules/vasprintf-posix-tests.
14255         vasprintf-gnu: New module.
14256         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_IS_POSIX): New macro,
14257         extracted from gl_FUNC_VASPRINTF_POSIX.
14258         (gl_FUNC_VASPRINTF_POSIX): Require it. Invoke
14259         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
14260         * m4/vasprintf-gnu.m4: New file, based on m4/vasprintf-posix.m4.
14261         * modules/vasprintf-gnu: New file, based on modules/vasnprintf-gnu.
14262         * doc/glibc-functions/vasprintf.texi: Mention the new module.
14263         * doc/glibc-functions/asprintf.texi: Likewise.
14265 2023-03-24  Bruno Haible  <bruno@clisp.org>
14267         sprintf-gnu: Add tests.
14268         * tests/test-sprintf-gnu.c: New file, based on
14269         tests/test-sprintf-posix.c.
14270         * modules/sprintf-gnu-tests: New file, based on
14271         modules/sprintf-posix-tests.
14273         sprintf-gnu: New module.
14274         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_IS_POSIX): New macro,
14275         extracted from gl_FUNC_SPRINTF_POSIX.
14276         (gl_FUNC_SPRINTF_POSIX): Require it. Invoke
14277         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
14278         * m4/sprintf-gnu.m4: New file, based on m4/sprintf-posix.m4.
14279         * modules/sprintf-gnu: New file, based on modules/vasnprintf-gnu.
14280         * doc/posix-functions/sprintf.texi: Mention the new module.
14282 2023-03-24  Bruno Haible  <bruno@clisp.org>
14284         vsprintf-gnu: Add tests.
14285         * tests/test-vsprintf-gnu.c: New file, based on
14286         tests/test-vsprintf-posix.c.
14287         * tests/test-sprintf-gnu.h: New file, based on
14288         tests/test-vasnprintf-gnu.c.
14289         * modules/vsprintf-gnu-tests: New file, based on
14290         modules/vsprintf-posix-tests.
14292         vsprintf-gnu: New module.
14293         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_IS_POSIX): New macro,
14294         extracted from gl_FUNC_VSPRINTF_POSIX.
14295         (gl_FUNC_VSPRINTF_POSIX): Require it. Invoke
14296         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
14297         * m4/vsprintf-gnu.m4: New file, based on m4/vsprintf-posix.m4.
14298         * modules/vsprintf-gnu: New file, based on modules/vasnprintf-gnu.
14299         * doc/posix-functions/vsprintf.texi: Mention the new module.
14301 2023-03-24  Bruno Haible  <bruno@clisp.org>
14303         snprintf-gnu: Add tests.
14304         * tests/test-snprintf-gnu.c: New file, based on
14305         tests/test-snprintf-posix.c.
14306         * modules/snprintf-gnu-tests: New file, based on
14307         modules/snprintf-posix-tests.
14309         snprintf-gnu: New module.
14310         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_IS_POSIX): New macro,
14311         extracted from gl_FUNC_SNPRINTF_POSIX.
14312         (gl_FUNC_SNPRINTF_POSIX): Require it. Invoke
14313         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
14314         * m4/snprintf-gnu.m4: New file, based on m4/snprintf-posix.m4.
14315         * modules/snprintf-gnu: New file, based on modules/vasnprintf-gnu.
14316         * doc/posix-functions/snprintf.texi: Mention the new module.
14318 2023-03-24  Bruno Haible  <bruno@clisp.org>
14320         vsnprintf-gnu: Add tests.
14321         * tests/test-vsnprintf-gnu.c: New file, based on
14322         tests/test-vsnprintf-posix.c.
14323         * tests/test-snprintf-gnu.h: New file, based on
14324         tests/test-vasnprintf-gnu.c.
14325         * modules/vsnprintf-gnu-tests: New file, based on
14326         modules/vsnprintf-posix-tests.
14328         vsnprintf-gnu: New module.
14329         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_IS_POSIX): New macro,
14330         extracted from gl_FUNC_VSNPRINTF_POSIX.
14331         (gl_FUNC_VSNPRINTF_POSIX): Require it. Invoke
14332         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
14333         * m4/vsnprintf-gnu.m4: New file, based on m4/vsnprintf-posix.m4.
14334         * modules/vsnprintf-gnu: New file, based on modules/vasnprintf-gnu.
14335         * doc/posix-functions/vsnprintf.texi: Mention the new module.
14337 2023-03-23  Bruno Haible  <bruno@clisp.org>
14339         vasnprintf-gnu: Add tests.
14340         * tests/test-vasnprintf-gnu.c: New file, based on
14341         tests/test-vasnprintf-posix.c.
14342         * modules/vasnprintf-gnu-tests: New file.
14344         vasnprintf-gnu: New module.
14345         Suggested by Eric Blake in
14346         <https://lists.gnu.org/archive/html/bug-gnulib/2023-03/msg00060.html>.
14347         * lib/printf-parse.c (PRINTF_PARSE): Recognize the 'B' conversion.
14348         * lib/printf-parse.h: Update comments.
14349         * lib/wprintf-parse.h: Likewise.
14350         * lib/vasnprintf.c (MAX_ROOM_NEEDED): Treat the 'B' conversion like 'b'.
14351         (VASNPRINTF): Implement 'B' conversion if
14352         NEED_PRINTF_DIRECTIVE_UPPERCASE_B is set. Support the 'B' conversion if
14353         requested.
14354         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_B): When cross-compiling, guess yes
14355         on glibc >= 2.35.
14356         (gl_PRINTF_DIRECTIVE_UPPERCASE_B): New macro.
14357         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS): Renamed
14358         from gl_PREREQ_VASNPRINTF_WITH_EXTRAS.
14359         (gl_PREREQ_VASNPRINTF_DIRECTIVE_UPPERCASE_B,
14360         gl_PREREQ_VASNPRINTF_WITH_GNU_EXTRAS): New macros.
14361         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_IS_POSIX): New macro,
14362         extracted from gl_FUNC_VASNPRINTF_POSIX.
14363         (gl_FUNC_VASNPRINTF_POSIX): Require it. Invoke
14364         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
14365         * m4/vasnprintf-gnu.m4: New file.
14366         * modules/vasnprintf-gnu: New file.
14367         * modules/c-vasnprintf (configure.ac): Update.
14368         * modules/unistdio/u8-vasnprintf (configure.ac): Likewise.
14369         * modules/unistdio/u8-u8-vasnprintf (configure.ac): Likewise.
14370         * modules/unistdio/u16-vasnprintf (configure.ac): Likewise.
14371         * modules/unistdio/u16-u16-vasnprintf (configure.ac): Likewise.
14372         * modules/unistdio/u32-vasnprintf (configure.ac): Likewise.
14373         * modules/unistdio/u32-u32-vasnprintf (configure.ac): Likewise.
14374         * modules/unistdio/ulc-vasnprintf (configure.ac): Likewise.
14376 2023-03-23  Bruno Haible  <bruno@clisp.org>
14378         printf-posix tests: Fix compilation error (regression 2021-08-28).
14379         * modules/printf-posix-tests (Files): Add tests/qemu.h.
14381 2023-03-22  Jim Meyering  <meyering@fb.com>
14383         gnu-web-doc-update: don't use host alias, cvs.sv.gnu.org
14384         * build-aux/gnu-web-doc-update: Use hostname cvs.savannah.gnu.org,
14385         not cvs.sv.gnu.org. Using the shorter alias would elicit this:
14386           $ pkg=grep ; cvs -d $USER@cvs.sv.gnu.org:/webcvs/$pkg co $pkg
14387           Bad server host key: Invalid key length
14389 2023-03-22  Bruno Haible  <bruno@clisp.org>
14391         *printf-posix: Fix implementation of %b directive.
14392         * lib/vasnprintf.c (VASNPRINTF): In the %b directive implementation, fix
14393         the precision handling, and ignore the '0' flag when a width and a
14394         precision are both present.
14395         * tests/test-snprintf-posix.h (test_function): Add test cases for the %x
14396         directive and more test cases for the %b directive.
14397         * tests/test-sprintf-posix.h (test_function): Likewise.
14398         * tests/test-vasnprintf-posix.c (test_function): Likewise.
14399         * tests/test-vasnwprintf-posix.c (test_function): Likewise.
14400         * tests/test-vasprintf-posix.c (test_function): Likewise.
14401         * modules/vasnwprintf-posix-tests (Files): Add m4/musl.m4.
14402         (configure.ac): Invoke gl_MUSL_LIBC.
14404 2023-03-22  Bruno Haible  <bruno@clisp.org>
14406         vasnwprintf: Fix a warning: implicit declaration of function ‘wcsnlen’.
14407         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Test also whether wcsnlen is
14408         declared.
14409         * lib/vasnprintf.c (local_wcsnlen): Together with HAVE_WCSNLEN, test
14410         also HAVE_DECL_WCSNLEN.
14412 2023-03-22  Bruno Haible  <bruno@clisp.org>
14414         vasnwprintf: Fix a "warning: unused function local_wcsnlen".
14415         * lib/vasnprintf.c: Adjust #if conditions.
14417 2023-03-22  Bruno Haible  <bruno@clisp.org>
14419         vasnwprintf: Fix test failures on FreeBSD, NetBSD, AIX, mingw.
14420         * m4/printf.m4 (gl_SWPRINTF_WORKS): New macro.
14421         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Invoke it and define
14422         HAVE_WORKING_SWPRINTF accordingly.
14423         * lib/vasnprintf.c: Together with HAVE_SWPRINTF, test also
14424         HAVE_WORKING_SWPRINTF.
14425         (VASNPRINTF): If WIDE_CHAR_VERSION && !DCHAR_IS_TCHAR, don't pass a
14426         wchar_t[] to snprintf. Add a workaround against mingw's snwprintf
14427         function.
14428         * doc/posix-functions/swprintf.texi: Document the null wide character
14429         bug.
14431 2023-03-22  Bruno Haible  <bruno@clisp.org>
14433         vasnwprintf: Fix a "warning: unused function 'wmax_room_needed'".
14434         * lib/vasnprintf.c (MAX_ROOM_NEEDED): Adjust #if condition.
14436 2023-03-22  Bruno Haible  <bruno@clisp.org>
14438         vasnwprintf: Simplify last change.
14439         * lib/vasnprintf.c (VASNPRINTF): Remove unused variable 'len'.
14441 2023-03-22  Bruno Haible  <bruno@clisp.org>
14443         vasnwprintf tests: Fix link errors on AIX.
14444         * modules/vasnwprintf (Link): New section.
14445         * modules/vasnwprintf-posix (Link): New section.
14446         * modules/vasnwprintf-tests (Makefile.am): Link test-vasnwprintf with
14447         $(MBRTOWC_LIB).
14448         * modules/vasnwprintf-posix-tests (Makefile.am): Link
14449         test-vasnwprintf-posix, test-vasnwprintf-posix2, test-vasnwprintf-posix3
14450         with $(MBRTOWC_LIB).
14452 2023-03-22  Bruno Haible  <bruno@clisp.org>
14454         gnu-web-doc-update: Make it work for the first upload of a manual.
14455         Reported by Reuben Thomas <rrt@sc3d.org> in
14456         <https://lists.gnu.org/archive/html/bug-gnulib/2023-03/msg00066.html>.
14457         * build-aux/gnu-web-doc-update: Put the 'manual' directory under version
14458         control if it is not yet.
14460 2023-03-21  Bruno Haible  <bruno@clisp.org>
14462         unistdio/u*-vasnprintf: Fix conversion of %Id directive result.
14463         * lib/vasnprintf.c (VASNPRINTF): Don't assume that snprintf's result is
14464         entirely ASCII if the directive contain the glibc 'I' flag.
14466 2023-03-21  Bruno Haible  <bruno@clisp.org>
14468         vasnwprintf: Fix for older platforms without swprintf.
14469         * lib/vasnprintf.c (VASNPRINTF): In the %lc handling, ignore the
14470         precision. Convert the snprintf result to a wchar_t[] not by mbsrtowcs,
14471         but by a loop that does not stop at NUL characters.
14472         * tests/test-vasnwprintf-posix.c (test_function): Add more tests for the
14473         %c and %lc directives.
14474         * modules/vasnwprintf (Depends-on): Add mbrtowc. Remove mbsrtowcs.
14476 2023-03-21  Bruno Haible  <bruno@clisp.org>
14478         *printf-posix: Work around bug with %lc of 0 on many platforms.
14479         * lib/vasnprintf.c (local_wctomb): Define also for
14480         NEED_PRINTF_DIRECTIVE_LC.
14481         (VASNPRINTF): Implement %lc handling ourselves if
14482         NEED_PRINTF_DIRECTIVE_LC.
14483         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LC): New macro.
14484         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_LC): New macro.
14485         (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): Invoke it.
14486         * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_POSIX): Require
14487         gl_PRINTF_DIRECTIVE_LC and test its result. Invoke
14488         gl_PREREQ_VASNPRINTF_DIRECTIVE_LC.
14489         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
14490         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_POSIX): Likewise.
14491         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
14492         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
14493         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
14494         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
14495         * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_POSIX): Likewise.
14496         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
14497         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
14498         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
14499         * tests/test-snprintf-posix.h (test_function): Add more tests for the
14500         %c and %lc directives.
14501         * tests/test-sprintf-posix.h (test_function): Likewise.
14502         * tests/test-vasnprintf-posix.c (test_function): Likewise.
14503         * tests/test-vasprintf-posix.c (test_function): Likewise.
14504         * doc/glibc-functions/asprintf.texi: Mention the %lc 0 bug.
14505         * doc/glibc-functions/obstack_printf.texi: Likewise.
14506         * doc/glibc-functions/obstack_vprintf.texi: Likewise.
14507         * doc/glibc-functions/vasprintf.texi: Likewise.
14508         * doc/posix-functions/dprintf.texi: Likewise.
14509         * doc/posix-functions/fprintf.texi: Likewise.
14510         * doc/posix-functions/printf.texi: Likewise.
14511         * doc/posix-functions/snprintf.texi: Likewise.
14512         * doc/posix-functions/sprintf.texi: Likewise.
14513         * doc/posix-functions/vdprintf.texi: Likewise.
14514         * doc/posix-functions/vfprintf.texi: Likewise.
14515         * doc/posix-functions/vprintf.texi: Likewise.
14516         * doc/posix-functions/vsnprintf.texi: Likewise.
14517         * doc/posix-functions/vsprintf.texi: Likewise.
14519 2023-03-21  Ar Rakin  <rakinar2@onesoftnet.eu.org>  (tiny change)
14521         gnupload: correct SFTP connection URL
14522         Approved by Sergey Poznyakoff in
14523         <https://lists.gnu.org/archive/html/bug-gnulib/2023-03/msg00078.html>.
14524         * build-aux/gnupload: fix gnu.org.ua SFTP connection URL:
14525         puszcza.gnu.org.ua -> download.gnu.org.ua
14527 2023-03-20  Bruno Haible  <bruno@clisp.org>
14529         memrchr tests: Avoid GCC warning.
14530         * tests/test-memrchr.c: Don't use '#pragma GCC diagnostic' for GCC
14531         versions older than 4.7.
14533 2023-03-20  Bruno Haible  <bruno@clisp.org>
14535         unistdio: Simplify code.
14536         * lib/unistdio/u8-vasnprintf.c (DCHAR_T_IS_UINT8_T): Remove unused
14537         macro.
14538         * lib/unistdio/u8-u8-vasnprintf.c: Likewise.
14539         * lib/unistdio/u16-vasnprintf.c (DCHAR_T_IS_UINT16_T): Remove unused
14540         macro.
14541         * lib/unistdio/u16-u32-vasnprintf.c: Likewise.
14542         * lib/unistdio/u32-vasnprintf.c (DCHAR_T_IS_UINT32_T): Remove unused
14543         macro.
14544         * lib/unistdio/u32-u32-vasnprintf.c: Likewise.
14546 2023-03-20  Bruno Haible  <bruno@clisp.org>
14548         vasnwprintf: Port to older platforms without swprintf.
14549         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Test for swprintf.
14550         * lib/vasnprintf.c (TCHAR_T, DCHAR_IS_TCHAR, SNPRINTF): When
14551         WIDE_CHAR_VERSION and swprintf does not exist, use TCHAR_T = char,
14552         SNPRINTF = snprintf, and !DCHAR_IS_TCHAR.
14553         (VASNPRINTF): In this case, implement %ls and %lc directly. Adjust a
14554         couple of #if conditions. For the conversion from TCHAR_T[] to
14555         DCHAR_T[], use mbsrtowcs.
14556         * modules/vasnwprintf (Depends-on): Add mbsrtowcs.
14558 2023-03-20  Bruno Haible  <bruno@clisp.org>
14560         wmemset: Relicense under LGPLv2+.
14561         * modules/wmemset (License): Change to LGPLv2+.
14562         * lib/wmemset.c: Update license notice.
14563         * lib/wmemset-impl.h: Likewise.
14565 2023-03-20  Bruno Haible  <bruno@clisp.org>
14567         wmemcpy: Relicense under LGPLv2+.
14568         * modules/wmemcpy (License): Change to LGPLv2+.
14569         * lib/wmemcpy.c: Update license notice.
14570         * lib/wmemcpy-impl.h: Likewise.
14572 2023-03-19  Bruno Haible  <bruno@clisp.org>
14574         vasnwprintf: Fix test failures on musl libc.
14575         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Invoke gl_MUSL_LIBC.
14576         * lib/vasnprintf.c (VASNPRINTF): On musl libc, when WIDE_CHAR_VERSION,
14577         - force pad_ourselves to be 1,
14578         - don't use %n.
14579         Fix zero-padding when the result starts with a prefix "0x" or "0b".
14580         * modules/vasnwprintf (Files): Add musl.m4.
14581         * doc/posix-functions/swprintf.texi: Mention two musl libc bugs.
14583 2023-03-19  Bruno Haible  <bruno@clisp.org>
14585         vasnwprintf: Fix module dependencies.
14586         * modules/vasnwprintf (Depends-on): Add wmemcpy, wmemset.
14587         * modules/vasnwprintf-tests (Depends-on): Add wmemcmp.
14588         * modules/vasnwprintf-posix-tests (Depends-on): Likewise.
14590 2023-03-19  Paul Eggert  <eggert@cs.ucla.edu>
14592         test-pselect, test-select: use different ports
14593         I have observed rare and hard-to-reproduce problems with the GNU
14594         grep release candidate with ‘make -j5 check’ on Fedora 37 x86-64.
14595         One possibility is that test-pselect and test-select interfere
14596         with each other somehow when run simultaneously, as they use the
14597         same port.  Work around this possibility by using different ports
14598         from each other, and from test-poll (which also uses 12345).
14599         Of course it’d be better if all these tests used system-assigned
14600         ports, but I assume that’d take more work.
14601         * tests/test-pselect.c, tests/test-select.c (TEST_PORT): New macro.
14602         * tests/test-select.h (TEST_PORT): Remove.
14604 2023-03-19  Bruno Haible  <bruno@clisp.org>
14606         Update MODULES.html.sh.
14607         * MODULES.html.sh: Move stack, wmempcpy, bison to different sections.
14608         Fix a HTML layout problem.
14610 2023-03-18  Paul Eggert  <eggert@cs.ucla.edu>
14612         dfa: pacify Oracle Solaris Studio 12.6
14613         Without this patch, the compiler complains “statement not reached”.
14614         * lib/dfa.c (lex): Refactor to omit unreachable statement.
14616         Update MODULES.html.sh
14617         * MODULES.html.sh: Add some recently-added modules.
14618         This is by no means a complete update.  I needed to point
14619         to something about ‘time’ so I added ‘time’, and then added
14620         more modules until I ran out of, errr, time.
14621         Assuming MODULES.html.sh is still useful,
14622         at some point a more-complete update should be done.
14624 2023-03-17  Bruno Haible  <bruno@clisp.org>
14626         *printf-posix: ISO C 23: Add %b directive for binary output of integers.
14627         * lib/printf-parse.c (PRINTF_PARSE): Recognize the 'b' directive.
14628         * lib/printf-parse.h: Update comment.
14629         * lib/wprintf-parse.h: Likewise.
14630         * lib/vasnprintf.c (MAX_ROOM_NEEDED, VASNPRINTF): Add support for the
14631         'b' directive.
14632         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_B): New macro.
14633         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_B): New macro.
14634         (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): Invoke it.
14635         * m4/vasnwprintf-posix.m4 (gl_FUNC_VASNWPRINTF_POSIX): Invoke
14636         gl_PREREQ_VASNPRINTF_DIRECTIVE_B.
14637         * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_POSIX): Require
14638         gl_PRINTF_DIRECTIVE_B and test its result. Invoke
14639         gl_PREREQ_VASNPRINTF_DIRECTIVE_B.
14640         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
14641         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_POSIX): Likewise.
14642         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
14643         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
14644         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
14645         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
14646         * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_POSIX): Likewise.
14647         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
14648         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
14649         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
14650         * tests/test-snprintf-posix.h (test_function): Add some tests of the %b
14651         directive.
14652         * tests/test-sprintf-posix.h (test_function): Likewise.
14653         * tests/test-vasnprintf-posix.c (test_function): Likewise.
14654         * tests/test-vasnwprintf-posix.c (test_function): Likewise.
14655         * tests/test-vasprintf-posix.c (test_function): Likewise.
14656         * doc/glibc-functions/asprintf.texi: Mention the 'b' directive.
14657         * doc/glibc-functions/obstack_printf.texi: Likewise.
14658         * doc/glibc-functions/obstack_vprintf.texi: Likewise.
14659         * doc/glibc-functions/vasprintf.texi: Likewise.
14660         * doc/posix-functions/dprintf.texi: Likewise.
14661         * doc/posix-functions/fprintf.texi: Likewise.
14662         * doc/posix-functions/fwprintf.texi: Likewise.
14663         * doc/posix-functions/printf.texi: Likewise.
14664         * doc/posix-functions/snprintf.texi: Likewise.
14665         * doc/posix-functions/sprintf.texi: Likewise.
14666         * doc/posix-functions/swprintf.texi: Likewise.
14667         * doc/posix-functions/vdprintf.texi: Likewise.
14668         * doc/posix-functions/vfprintf.texi: Likewise.
14669         * doc/posix-functions/vfwprintf.texi: Likewise.
14670         * doc/posix-functions/vprintf.texi: Likewise.
14671         * doc/posix-functions/vsnprintf.texi: Likewise.
14672         * doc/posix-functions/vsprintf.texi: Likewise.
14673         * doc/posix-functions/vswprintf.texi: Likewise.
14674         * doc/posix-functions/vwprintf.texi: Likewise.
14675         * doc/posix-functions/wprintf.texi: Likewise.
14677 2023-03-17  Bruno Haible  <bruno@clisp.org>
14679         vasnprintf, vasnwprintf: Simplify code.
14680         * lib/vasnprintf.c (MAX_ROOM_NEEDED): Remove dead code: The directives
14681         'o', 'x', 'X' always take an unsigned integer argument.
14683 2023-03-17  Bruno Haible  <bruno@clisp.org>
14685         vasnwprintf: Fix test failure on OpenBSD.
14686         * lib/vasnprintf.c (VASNPRINTF): Don't use the %n directive on OpenBSD.
14688 2023-03-17  Bruno Haible  <bruno@clisp.org>
14690         time: Fix test failure on AIX 7.2.
14691         * m4/time.m4 (gl_FUNC_TIME): Guess that it does not work on AIX.
14692         * doc/posix-functions/time.texi: Mention the bug on AIX.
14694         time: Fix test failure on native Windows.
14695         * m4/time.m4 (gl_FUNC_TIME): Guess that it does not work on native
14696         Windows.
14697         * modules/time (Depends-on): Add gettimeofday.
14698         * doc/posix-functions/time.texi: Mention the bug on Windows.
14700 2023-03-17  Bruno Haible  <bruno@clisp.org>
14702         vasnprintf, vasnwprintf: Include all necessary workarounds in libintl.
14703         * lib/vasnprintf.c: Remove IN_LIBINTL special-casing.
14705 2023-03-17  Bruno Haible  <bruno@clisp.org>
14707         vasnwprintf-posix: Add tests.
14708         * tests/test-vasnwprintf-posix.c: New file, based on
14709         tests/test-vasnprintf-posix.c.
14710         * tests/test-vasnwprintf-posix2.sh: New file, based on
14711         tests/test-vasnprintf-posix2.sh.
14712         * tests/test-vasnwprintf-posix2.c: New file, based on
14713         tests/test-vasnprintf-posix2.c.
14714         * tests/test-vasnwprintf-posix3.c: New file, based on
14715         tests/test-vasnprintf-posix3.c.
14716         * modules/vasnwprintf-posix-tests: New file, based on
14717         modules/vasnprintf-posix-tests.
14719         vasnwprintf-posix: New module.
14720         * m4/vasnwprintf-posix.m4: New file.
14721         * modules/vasnwprintf-posix: New file, based on
14722         modules/vasnprintf-posix.
14724 2023-03-17  Bruno Haible  <bruno@clisp.org>
14726         vasnprintf-posix: Relicense under LGPLv2+.
14727         * modules/vasnprintf-posix (License): Change to LGPLv2+.
14729 2023-03-17  Bruno Haible  <bruno@clisp.org>
14731         vasnwprintf: Add tests.
14732         * tests/test-vasnwprintf.c: New file, based on tests/test-vasnprintf.c.
14733         * modules/vasnwprintf-tests: New file, based on
14734         modules/vasnprintf-tests.
14736         vasnwprintf: New module.
14737         * lib/vasnprintf.c: Enable more code for WIDE_CHAR_VERSION, because
14738         snwprintf()/_snwprintf() (Windows) and swprintf() (Unix) don't return
14739         the needed buffer size, like snprintf does.
14740         * lib/wprintf-parse.h: New file, based on lib/printf-parse.h and
14741         gettext/gettext-runtime/intl/wprintf-parse.h.
14742         * lib/wprintf-parse.c: New file, based on
14743         gettext/gettext-runtime/intl/printf.c.
14744         * lib/vasnwprintf.h: New file, based on lib/vasnprintf.h and
14745         gettext/gettext-runtime/intl/vasnwprintf.h.
14746         * lib/vasnwprintf.c: New file.
14747         * lib/asnwprintf.c: New file, based on lib/asnprintf.c.
14748         * m4/vasnprintf.m4 (gl_FUNC_VASNWPRINTF): New macro.
14749         (gl_PREREQ_VASNXPRINTF): New macro, extracted from gl_PREREQ_VASNPRINTF.
14750         (gl_PREREQ_VASNPRINTF): Invoke it. Don't test for wcsnlen and mbrtowc.
14751         (gl_PREREQ_VASNWPRINTF): New macro.
14752         * modules/vasnwprintf: New file, based on modules/vasnprintf.
14754 2023-03-16  Bruno Haible  <bruno@clisp.org>
14756         strtol, strtoll, strtoul, strtoull: Make ISO C 23 compliant.
14757         * lib/strtol.c (INTERNAL (strtol)): Treat 'b' and base 2 like 'x' and
14758         base 16. Based on glibc commit 64924422a99690d147a166b4de3103f3bf3eaf6c
14759         by Joseph Myers.
14760         * m4/strtol.m4 (gl_FUNC_STRTOL): Test also whether parsing binary
14761         integers works. Update cross-compilation guesses.
14762         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
14763         * m4/strtoul.m4 (gl_FUNC_STRTOUL): Likewise.
14764         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise.
14765         * tests/test-strtol.c (main): Add tests of parsing binary integers.
14766         * tests/test-strtoll.c (main): Likewise.
14767         * tests/test-strtoul.c (main): Likewise.
14768         * tests/test-strtoull.c (main): Likewise.
14769         * doc/posix-functions/strtol.texi: Mention the problem with parsing
14770         binary integers.
14771         * doc/posix-functions/strtoll.texi: Likewise.
14772         * doc/posix-functions/strtoul.texi: Likewise.
14773         * doc/posix-functions/strtoull.texi: Likewise.
14775 2023-03-16  Bruno Haible  <bruno@clisp.org>
14777         timegm: Document under ISO C and POSIX substitutes.
14778         * doc/posix-functions/timegm.texi: Renamed from doc/glibc-functions/timegm.texi.
14779         * doc/gnulib.texi (Function Substitutes): Include timegm.texi here...
14780         (Glibc time.h): ... not here.
14782 2023-03-16  Bruno Haible  <bruno@clisp.org>
14784         stddef: Fix a compilation error on AIX 7.2 with xlclang.
14785         * lib/stddef.in.h (__CLANG_MAX_ALIGN_T_DEFINED): Define whenever we
14786         define GNULIB_defined_max_align_t.
14788 2023-03-16  Bruno Haible  <bruno@clisp.org>
14790         stddef: Define 'unreachable', for ISO C 23 compliance.
14791         * lib/verify.h (_GL_HAS_BUILTIN_UNREACHABLE): Don't define if already
14792         defined.
14793         * lib/stddef.in.h (_GL_HAS_BUILTIN_UNREACHABLE, unreachable): New
14794         macros.
14795         (abort): Declare if needed for unreachable.
14796         * m4/stddef_h.m4 (gl_STDDEF_H): Test for unreachable.
14797         * tests/test-stddef.c (test_unreachable_optimization,
14798         test_unreachable_noreturn): New functions, based on tests/test-verify.c.
14799         * doc/posix-headers/stddef.texi: Mention unreachable.
14801 2023-03-10  Paul Eggert  <eggert@cs.ucla.edu>
14803         posixtm: work around Glibc time issue
14804         * modules/posixtm (Depends-on): Add time.
14806 2023-03-09  Jim Meyering  <meyering@fb.com>
14808         bootstrap: correct last change
14809         * top/bootstrap-funclib.sh (autogen) [AUTORECONFFLAGS]: Do always
14810         apply the --no-recursive option.
14811         * build-aux/bootstrap: Regenerate.
14813         bootstrap: remove code that accommodated RHEL5's old autoreconf
14814         * top/bootstrap-funclib.sh (autogen) [AUTORECONFFLAGS]: RHEL5 has not
14815         been supported since 2017. It included (and this code worked around)
14816         a version of autoreconf that was so old it did not accept the
14817         --no-recursive option. Drop that workaround.
14818         * build-aux/bootstrap: Regenerate.
14820 2023-03-08  Bruno Haible  <bruno@clisp.org>
14822         gettimeofday, timespec_get tests: Avoid test failure on glibc/Linux.
14823         * modules/gettimeofday-tests (Depends-on): Add 'time'.
14824         * modules/timespec_get-tests (Depends-on): Likewise.
14825         * tests/test-gettimeofday.c (test_consistency): Update comment.
14826         * tests/test-timespec_get.c (main): Likewise.
14828         time: Add tests.
14829         * tests/test-time.c: New file.
14830         * modules/time-tests: New file.
14832         time: New module.
14833         * lib/time.in.h (time): New declaration.
14834         * lib/time.c: New file.
14835         * m4/time_h.m4 (gl_TIME_H_REQUIRE_DEFAULTS): Initialize GNULIB_TIME.
14836         (gl_TIME_H_DEFAULTS): Initialize REPLACE_TIME.
14837         * m4/time.m4: New file.
14838         * modules/time-h (Makefile.am): Substitute GNULIB_TIME, REPLACE_TIME.
14839         * modules/time: New file.
14840         * tests/test-time-h-c++.cc: Check the signature of
14841         GNULIB_NAMESPACE::time.
14842         * doc/posix-functions/time.texi: Mention the glibc problem and the
14843         'time' module.
14845 2023-03-08  Bruno Haible  <bruno@clisp.org>
14847         time-h: Renamed from time.
14848         * modules/time-h: Renamed from modules/time.
14849         * tests/test-time-h.c: Renamed from tests/test-time.c.
14850         * modules/time-h-tests: Renamed from modules/time-tests. Update.
14851         * tests/test-time-h-c++.cc: Renamed from tests/test-time-c++.cc.
14852         * tests/test-time-h-c++2.cc: Renamed from tests/test-time-c++2.cc.
14853         * modules/time-h-c++-tests: Renamed from modules/time-c++-tests. Update.
14854         * modules/cond (Depends-on): Update.
14855         * modules/ctime (Depends-on): Likewise.
14856         * modules/localtime (Depends-on): Likewise.
14857         * modules/mktime (Depends-on): Likewise.
14858         * modules/nanosleep (Depends-on): Likewise.
14859         * modules/parse-datetime (Depends-on): Likewise.
14860         * modules/posixcheck (Depends-on): Likewise.
14861         * modules/pthread-h (Depends-on): Likewise.
14862         * modules/stat-time (Depends-on): Likewise.
14863         * modules/stat-time-tests (Depends-on): Likewise.
14864         * modules/strftime-fixes (Depends-on): Likewise.
14865         * modules/strptime (Depends-on): Likewise.
14866         * modules/sys_stat (Depends-on): Likewise.
14867         * modules/tempname (Depends-on): Likewise.
14868         * modules/threads-h (Depends-on): Likewise.
14869         * modules/time_r (Depends-on): Likewise.
14870         * modules/time_rz (Depends-on): Likewise.
14871         * modules/timegm (Depends-on): Likewise.
14872         * modules/timespec (Depends-on): Likewise.
14873         * modules/timespec_get (Depends-on): Likewise.
14874         * modules/timespec_getres (Depends-on): Likewise.
14875         * modules/tzset (Depends-on): Likewise.
14876         * modules/usleep-tests (Depends-on): Likewise.
14877         * modules/utime (Depends-on): Likewise.
14878         * modules/utimecmp (Depends-on): Likewise.
14879         * modules/utimens (Depends-on): Likewise.
14880         * modules/windows-cond (Depends-on): Likewise.
14881         * modules/windows-timedmutex (Depends-on): Likewise.
14882         * modules/windows-timedrecmutex (Depends-on): Likewise.
14883         * modules/windows-timedrwlock (Depends-on): Likewise.
14884         * modules/xnanosleep (Depends-on): Likewise.
14885         * doc/posix-headers/time.texi: Update.
14886         * NEWS: Mention the change.
14888 2023-03-08  Bruno Haible  <bruno@clisp.org>
14890         gettimeofday tests: Enhance test.
14891         * tests/test-gettimeofday.c: Include <stdlib.h> and macros.h.
14892         (test_clobber): New function, extracted from main.
14893         (test_consistency): New function, based on tests/test-timespec_get.c.
14894         (main): Invoke both functions.
14895         * modules/gettimeofday-tests (Files): Add macros.h.
14897 2023-03-05  Paul Eggert  <eggert@cs.ucla.edu>
14899         stdio: suppress macOS 13 sprintf warnings
14900         * lib/stdio.in.h (_POSIX_C_SOURCE, _GL_DEFINED__POSIX_C_SOURCE):
14901         Suppress deprecation warnings for sprintf and vsprintf
14902         that were introduced in macOS 13.  These are not useful
14903         for Gnulib itself, and are more likely than not to be
14904         merely an annoyance for Gnulib-using code.
14906 2023-03-05  Bruno Haible  <bruno@clisp.org>
14908         timespec_get tests: Add comment.
14909         * tests/test-timespec_get.c: Add a comment regarding a glibc bug.
14911 2023-03-02  Bruno Haible  <bruno@clisp.org>
14913         nl_langinfo tests: Avoid test failure on Solaris 11.
14914         * tests/test-nl_langinfo2.c (main): Skip French T_FMT_AMPM test on
14915         Solaris.
14917 2023-02-28  Benno Schulenberg  <bensberg@telfort.nl>  (tiny change)
14919         terminfo, termcap: Fix more spellos in a comment.
14920         * lib/tparm.c: Fix misspellings and wording in the main comment.
14922 2023-02-28  Bruno Haible  <bruno@clisp.org>
14924         perl: Allow this module to be used with 'gnulib-tool --lgpl'.
14925         Reported by Reuben Thomas <rrt@sc3d.org> in
14926         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00191.html>.
14927         * modules/perl (License): Relax to 'GPLed build tool'.
14928         Approved by Jim Meyering in
14929         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00198.html>.
14931 2023-02-28  Bruno Haible  <bruno@clisp.org>
14933         dfa: Tweak the last patch.
14934         Suggested by Alexei Podtelezhnikov <apodtele@gmail.com>.
14935         * lib/dfa.c (FALLTHROUGH): Assume that Apple clang, in C mode, supports
14936         __attribute__ ((__fallthrough__)) starting with version 1200.
14937         References:
14938         https://en.wikipedia.org/wiki/Xcode#Xcode_11.0_-_14.x_(since_SwiftUI_framework)_2
14939         https://github.com/apple/llvm-project/blob/swift-5.3-RELEASE/clang/test/Sema/fallthrough-attr.c
14941 2023-02-27  ChuanGang Jiang  <jiangchuanganghw@outlook.com>
14943         fts: fail gracefully when out of memory
14944         * lib/fts.c (fts_read): Set errno==ENOMEM and return NULL
14945         when setup_dir() fails, rather than hitting an assertion later.
14947 2023-02-26  Jim Meyering  <meyering@fb.com>
14949         announce-gen: spell OpenBSD with a capital "O"
14950         * build-aux/announce-gen (print_checksums): Capitalize
14951         the "O" in OpenBSD, as suggested by Bruno Haible.
14953 2023-02-26  Bruno Haible  <bruno@clisp.org>
14955         dfa: Avoid warnings with some Apple clang versions.
14956         Reported by Werner Lemberg <wl@gnu.org> in
14957         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00159.html>.
14958         * lib/dfa.c (FALLTHROUGH): When __apple_build_version__ is defined,
14959         ignore __clang_major__.
14961 2023-02-25  Jim Meyering  <meyering@fb.com>
14963         announce-gen: add more info the auto-generated announce template
14964         * build-aux/announce-gen (readable_interval, readable_interval0):
14965         New functions.
14966         (digest_file_base64_wrap): New function to add padding to the
14967         base64-encoded SHA256 checksums.
14968         (print_checksums): Use that wrapper. Indent each line by two spaces.
14969         (main): Emit new sections, e.g., these lines from grep-3.8's release:
14970         - There have been 104 commits by 6 people in the 55 weeks since 3.7.
14971         - The following people contributed changes to this release: (and list)
14972         I tested with this, running from a sibling cloned grep directory:
14973           ../gnulib/build-aux/announce-gen --release-type=stable \
14974             --package-name=grep --previous-version=3.7 --current-version=3.8 \
14975             --gpg-key-id=0x7FD9FCCB000BEEEE --url-directory=https://testing
14976         Also, reference the cksum programs from coreutils-9.2 and from OpenBSD.
14978 2023-02-25  ChuanGang Jiang  <jiangchuanganghw@outlook.com>  (tiny change)
14980         terminfo, termcap: Fix typos in comments.
14981         * lib/tparm.c: Fix misspellings in comments.
14983 2023-02-23  Paul Eggert  <eggert@cs.ucla.edu>
14985         lseek: avoid SEEK_HOLE bugs in FreeBSD, macOS
14986         This attempts to fix <https://bugs.gnu.org/61386>, a bug in GNU cp
14987         caused by a serious data corruption bug in FreeBSD and macOS.
14988         * doc/posix-functions/lseek.texi: Mention the bug.
14989         * lib/unistd.in.h (SEEK_DATA, SEEK_HOLE): Undef in macOS < 13 and
14990         FreeBSD < 14.  FreeBSD fixed the bug sometime during FreeBSD 13
14991         <https://bugs.freebsd.org/256205>, so the "FreeBSD < 14" is
14992         conservative.  It’s unknown when Apple will fix macOS so use
14993         macOS "9999" as a placeholder.
14994         * m4/lseek.m4 (gl_FUNC_LSEEK): Replace lseek if on one of the
14995         above platforms.
14997 2023-02-18  Bruno Haible  <bruno@clisp.org>
14999         configmake: Add support for $build_os != $host_os.
15000         * m4/build-to-host.m4: New file.
15001         * m4/configmake.m4 (gl_CONFIGMAKE_PREP): Provide a configure-time
15002         definition for pkgdatadir, pkgincludedir, pkglibdir.
15003         (gl_CONFIGMAKE): New macro.
15004         * modules/configmake (Files): Add m4/build-to-host.m4.
15005         (configure.ac): Invoke gl_CONFIGMAKE instead of gl_CONFIGMAKE_PREP.
15006         (Makefile.am): For creating configmake.h, use the various *prefix_c_make
15007         and *dir_c_make variables.
15009 2023-02-18  Bruno Haible  <bruno@clisp.org>
15011         configmake: Prepare for using directory names with backslashes.
15012         * modules/configmake (Makefile.am): Use printf instead of echo.
15014 2023-02-18  Bruno Haible  <bruno@clisp.org>
15016         unilbrk tests: Fix compilation failures (regression 2023-02-11).
15017         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Outside of
15018         libunistring, don't test the backward compatibility function.
15019         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
15020         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
15021         * tests/unilbrk/test-ulc-possible-linebreaks.c (main): Likewise.
15022         * tests/unilbrk/test-u8-width-linebreaks.c (main): Likewise.
15023         * tests/unilbrk/test-u16-width-linebreaks.c (main): Likewise.
15024         * tests/unilbrk/test-u32-width-linebreaks.c (main): Likewise.
15025         * tests/unilbrk/test-ulc-width-linebreaks.c (main): Likewise.
15027 2023-02-17  Bruno Haible  <bruno@clisp.org>
15029         Improve cross-compilation for midipix.
15030         Reported by Ørjan Malde <red@foxi.me> at
15031         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00131.html>.
15032         This patch handles the cases where midipix acts like Linux.
15033         * m4/chmod.m4 (gl_FUNC_CHMOD): Treat midipix like Linux with glibc or
15034         musl libc.
15035         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
15036         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
15037         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Likewise.
15038         * m4/link.m4 (gl_FUNC_LINK): Likewise.
15039         * m4/linkat.m4 (gl_FUNC_LINKAT): Likewise.
15040         * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Likewise.
15041         * m4/mkdir.m4 (gl_FUNC_MKDIR): Likewise.
15042         * m4/pselect.m4 (gl_FUNC_PSELECT): Likewise.
15043         * m4/ptsname.m4 (gl_FUNC_PTSNAME): Likewise.
15044         * m4/readlink.m4 (gl_FUNC_READLINK): Likewise.
15045         * m4/rename.m4 (gl_FUNC_RENAME): Likewise.
15046         * m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise.
15047         * m4/select.m4 (gl_FUNC_SELECT): Likewise.
15048         * m4/sleep.m4 (gl_FUNC_SLEEP): Likewise.
15049         * m4/stat.m4 (gl_FUNC_STAT): Likewise.
15050         * m4/symlink.m4 (gl_FUNC_SYMLINK): Likewise.
15051         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Likewise.
15052         * m4/unlink.m4 (gl_FUNC_UNLINK): Likewise.
15053         * m4/usleep.m4 (gl_FUNC_USLEEP): Likewise.
15055         Improve cross-compilation for midipix.
15056         Reported by Ørjan Malde <red@foxi.me> at
15057         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00131.html>.
15058         Since midipix consists of musl libc based on an emulation of Linux system
15059         calls, for pure libc functionality it can be treated like musl libc.
15060         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Treat midipix like systems with
15061         musl libc.
15062         * m4/cbrtl.m4 (gl_FUNC_CBRTL): Likewise.
15063         * m4/ceil.m4 (gl_FUNC_CEIL): Likewise.
15064         * m4/ceilf.m4 (gl_FUNC_CEILF): Likewise.
15065         * m4/ceill.m4 (gl_FUNC_CEILL): Likewise.
15066         * m4/exp2l.m4 (gl_FUNC_EXP2L): Likewise.
15067         * m4/expl.m4 (gl_FUNC_EXPL): Likewise.
15068         * m4/expm1.m4 (gl_FUNC_EXPM1): Likewise.
15069         * m4/expm1f.m4 (gl_FUNC_EXPM1F): Likewise.
15070         * m4/expm1l.m4 (gl_FUNC_EXPM1L): Likewise.
15071         * m4/fclose.m4 (gl_FUNC_FCLOSE_STDIN): Likewise.
15072         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Likewise.
15073         * m4/ffsll.m4 (gl_FUNC_FFSLL): Likewise.
15074         * m4/floor.m4 (gl_FUNC_FLOOR): Likewise.
15075         * m4/floorf.m4 (gl_FUNC_FLOORF): Likewise.
15076         * m4/fmod.m4 (gl_FUNC_FMOD): Likewise.
15077         * m4/fmodf.m4 (gl_FUNC_FMODF): Likewise.
15078         * m4/fmodl.m4 (gl_FUNC_FMODL): Likewise.
15079         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Likewise.
15080         * m4/fopen.m4 (gl_FUNC_FOPEN_GNU): Likewise.
15081         * m4/fpurge.m4 (gl_FUNC_FPURGE): Likewise.
15082         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise.
15083         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
15084         * m4/hypot.m4 (gl_FUNC_HYPOT): Likewise.
15085         * m4/hypotf.m4 (gl_FUNC_HYPOTF): Likewise.
15086         * m4/hypotl.m4 (gl_FUNC_HYPOTL): Likewise.
15087         * m4/iconv_open-utf.m4 (gl_FUNC_ICONV_OPEN_UTF_SUPPORT): Likewise.
15088         * m4/log.m4 (gl_FUNC_LOG): Likewise.
15089         * m4/log10.m4 (gl_FUNC_LOG10): Likewise.
15090         * m4/log10f.m4 (gl_FUNC_LOG10F): Likewise.
15091         * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Likewise.
15092         * m4/log1p.m4 (gl_FUNC_LOG1P): Likewise.
15093         * m4/log1pf.m4 (gl_FUNC_LOG1PF): Likewise.
15094         * m4/log1pl.m4 (gl_FUNC_LOG1PL, gl_FUNC_LOG1PL_WORKS): Likewise.
15095         * m4/log2.m4 (gl_FUNC_LOG2): Likewise.
15096         * m4/log2f.m4 (gl_FUNC_LOG2F): Likewise.
15097         * m4/log2l.m4 (gl_FUNC_LOG2L_WORKS): Likewise.
15098         * m4/logf.m4 (gl_FUNC_LOGF): Likewise.
15099         * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Likewise.
15100         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Likewise.
15101         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Likewise.
15102         * m4/modf.m4 (gl_FUNC_MODF): Likewise.
15103         * m4/modff.m4 (gl_FUNC_MODFF): Likewise.
15104         * m4/modfl.m4 (gl_FUNC_MODFL): Likewise.
15105         * m4/musl.m4 (gl_MUSL_LIBC): Likewise.
15106         * m4/perror.m4 (gl_FUNC_PERROR): Likewise.
15107         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_SECURE,
15108         gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE,
15109         gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2,
15110         gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN): Likewise.
15111         * m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_INFINITE,
15112         gl_PRINTF_INFINITE_LONG_DOUBLE, gl_PRINTF_DIRECTIVE_A,
15113         gl_PRINTF_DIRECTIVE_F, gl_PRINTF_FLAG_ZERO, gl_SNPRINTF_TRUNCATION_C99,
15114         gl_SNPRINTF_RETVAL_C99, gl_SNPRINTF_DIRECTIVE_N,
15115         gl_VSNPRINTF_ZEROSIZE_C99): Likewise.
15116         * m4/pthread_rwlock_rdlock.m4 (gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER):
15117         Likewise.
15118         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
15119         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Likewise.
15120         * m4/remainder.m4 (gl_FUNC_REMAINDER): Likewise.
15121         * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Likewise.
15122         * m4/remainderl.m4 (gl_FUNC_REMAINDERL, gl_FUNC_REMAINDERL_WORKS):
15123         Likewise.
15124         * m4/rintl.m4 (gl_FUNC_RINTL): Likewise.
15125         * m4/round.m4 (gl_FUNC_ROUND): Likewise.
15126         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
15127         * m4/roundl.m4 (gl_FUNC_ROUNDL): Likewise.
15128         * m4/setenv.m4 (gl_FUNC_SETENV): Likewise.
15129         * m4/setlocale_null.m4 (gl_FUNC_SETLOCALE_NULL): Likewise.
15130         * m4/signbit.m4 (gl_SIGNBIT): Likewise.
15131         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
15132         * m4/strerror.m4 (gl_FUNC_STRERROR, gl_FUNC_STRERROR_0): Likewise.
15133         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
15134         * m4/strtold.m4 (gl_FUNC_STRTOLD): Likewise.
15135         * m4/trunc.m4 (gl_FUNC_TRUNC): Likewise.
15136         * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
15137         * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
15138         * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Likewise.
15139         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
15141 2023-02-13  ChuanGang Jiang  <jiangchuanganghw@outlook.com>  (tiny change)
15143         hamt: Detect GCC version correctly.
15144         * lib/hamt.h:Use __GNUC_MINOR__, not  __GNUC_MINOR.
15146 2023-02-11  Bruno Haible  <bruno@clisp.org>
15148         terminfo, termcap: Avoid wrong configure result with clang ≥ 15.
15149         clang 15 reports an error for -Wint-conversion by default.
15150         Reported by Sam James <sam@gentoo.org> in
15151         <https://savannah.gnu.org/bugs/?63793>.
15152         * m4/terminfo.m4 (gl_TERMINFO_BODY): Avoid a -Wint-conversion warning
15153         when testing for tparam and tparm.
15154         * m4/termcap.m4 (gl_TERMCAP_BODY): Likewise.
15156 2023-02-11  Bruno Haible  <bruno@clisp.org>
15158         error-h: Make less fragile.
15159         * lib/error.in.h: Use #include_next if the system has an <error.h>. Use
15160         a split double-inclusion guard.
15161         * m4/error_h.m4 (gl_ERROR_H): Invoke gl_CHECK_NEXT_HEADERS. Set
15162         HAVE_ERROR_H.
15163         * modules/error-h (Makefile.am): Substitute GUARD_PREFIX, HAVE_ERROR_H,
15164         INCLUDE_NEXT, PRAGMA_SYSTEM_HEADER, NEXT_ERROR_H.
15166 2023-02-11  Bruno Haible  <bruno@clisp.org>
15168         unilbrk: Don't compile unused functions outside of libunistring.
15169         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks): Don't
15170         compile outside of libunistring.
15171         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks):
15172         Likewise.
15173         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks):
15174         Likewise.
15175         * lib/unilbrk/ulc-possible-linebreaks.c (ulc_possible_linebreaks):
15176         Likewise.
15177         * lib/unilbrk/u8-width-linebreaks.c (u8_width_linebreaks): Likewise.
15178         * lib/unilbrk/u16-width-linebreaks.c (u16_width_linebreaks): Likewise.
15179         * lib/unilbrk/u32-width-linebreaks.c (u32_width_linebreaks): Likewise.
15180         * lib/unilbrk/ulc-width-linebreaks.c (ulc_width_linebreaks): Likewise.
15182 2023-02-11  Bruno Haible  <bruno@clisp.org>
15184         sigsegv: Fix a compilation error on OpenBSD with clang ≥ 16.
15185         * lib/sigsegv.c (install_for): Add a cast when assigning to
15186         action.sa_sigaction.
15188 2023-02-10  Bruno Haible  <bruno@clisp.org>
15190         Fix code duplication in last commit.
15191         * m4/gnulib-common.m4 (gl_CHECK_FUNCS_DEFAULT_CASE,
15192         gl_CHECK_FUNCS_CASE_FOR_ANDROID, gl_CHECK_FUNCS_CASE_FOR_MACOS,
15193         gl_CHECK_FUNCS_SET_RESULTS): New macros, extracted from
15194         gl_CHECK_FUNCS_ANDROID, gl_CHECK_FUNCS_MACOS,
15195         gl_CHECK_FUNCS_ANDROID_MACOS.
15196         (gl_CHECK_FUNCS_ANDROID, gl_CHECK_FUNCS_MACOS,
15197         gl_CHECK_FUNCS_ANDROID_MACOS): Use them.
15199         mkfifoat: Fix crash on macOS 12.
15200         * m4/gnulib-common.m4 (gl_PREPARE_CHECK_FUNCS_MACOS,
15201         gl_CHECK_FUNCS_MACOS, gl_CHECK_FUNCS_ANDROID_MACOS): New macros.
15202         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Test for mknodat and mkfifoat using
15203         gl_CHECK_FUNCS_ANDROID_MACOS instead of gl_CHECK_FUNCS_ANDROID.
15205 2023-02-10  ChuanGang Jiang  <jiangchuanganghw@outlook.com>  (tiny change)
15207         Fix typos like "the the" and "a a" in comments.
15208         * lib/c32is-impl.h: s/the the/the/
15209         * lib/getopt-pfx-core.h: s/a a/a/
15210         * lib/term-style-control.h: s/the the/the/
15211         * lib/textstyle.in.h: Likewise.
15213 2023-02-10  Bruno Haible  <bruno@clisp.org>
15215         chown, lchown, fchownat tests: Avoid test failure on macOS 12.
15216         * tests/test-chown.h (test_chown): Skip some assertions if
15217         getgid() == (gid_t)-1.
15218         * tests/test-lchown.h (test_lchown): Likewise.
15220 2023-02-09  Paul Eggert  <eggert@cs.ucla.edu>
15222         nullptr: work around Apple clang 14 issue
15223         Problem reported by Bruno Haible in:
15224         https://lists.gnu.org/r/bug-gnulib/2023-02/msg00098.html
15225         * doc/gnulib.texi (nullptr): Document limitations better.
15226         * m4/nullptr.m4 (gl_NULLPTR): Check for incompatibility of macOS
15227         clang 14.0.0 (clang-1400.0.29.202), where <stddef.h> defines a
15228         non-working nullptr macro.
15230 2023-02-09  Bruno Haible  <bruno@clisp.org>
15232         math: Fix compilation error in C++ mode on macOS 12.5.
15233         * lib/math.in.h (isnan): On macOS, treat clang version 14 again like
15234         clang versions < 12.
15236 2023-02-09  Bruno Haible  <bruno@clisp.org>
15238         Fix compilation errors in C++ mode on macOS 12.5.
15239         * m4/gnulib-common.m4 (gl_COMMON_BODY): Don't define
15240         _GL_ATTRIBUTE_MAYBE_UNUSED to [[__maybe_unused__]] if the compiler is
15241         an Apple variant of clang.
15243 2023-02-09  Bruno Haible  <bruno@clisp.org>
15245         limits-h: Work around a clang 15 bug.
15246         * m4/limits-h.m4 (gl_LIMITS_H): Test also for BOOL_MAX.
15247         * lib/limits.in.h: Handle the case where BOOL_WIDTH is present and
15248         BOOL_MAX is missing.
15249         * doc/posix-headers/limits.texi: Mention the clang bug.
15251 2023-02-09  Bruno Haible  <bruno@clisp.org>
15253         Fix error in C++ mode on glibc systems (regression 2022-04-28).
15254         * lib/malloc.in.h (rpl_free): Add exception specification like
15255         stdlib.in.h does.
15256         * lib/string.in.h (rpl_free): Likewise.
15257         * lib/wchar.in.h (rpl_free): Likewise.
15259 2023-02-09  Bruno Haible  <bruno@clisp.org>
15261         getcwd: Fix compilation error in C23 mode.
15262         * lib/getcwd.c: Include <stdio.h>.
15264 2023-02-08  Bruno Haible  <bruno@clisp.org>
15266         x-to-1: Accept additional help2man arguments.
15267         Suggested by Reuben Thomas <rrt@sc3d.org> in
15268         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00078.html>.
15269         * build-aux/x-to-1.in: Allow additional options after the HELP2MAN
15270         argument, and pass them down to help2man.
15272 2023-02-08  Bruno Haible  <bruno@clisp.org>
15274         x-to-1: Document the configure-time prerequisites.
15275         Suggested by Reuben Thomas <rrt@sc3d.org> in
15276         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00078.html>.
15277         * build-aux/x-to-1.in: Add more comments.
15279 2023-02-08  Bruno Haible  <bruno@clisp.org>
15281         hard-locale: Add comment regarding per-thread locales.
15282         * lib/hard-locale.h (hard_locale): Add comment.
15284 2023-02-08  Bruno Haible  <bruno@clisp.org>
15286         nl_langinfo: Add comment regarding per-thread locales.
15287         * lib/nl_langinfo.c (ctype_codeset): Add comment.
15289         nl_langinfo tests: Add another test.
15290         * tests/test-nl_langinfo2.c: New file.
15291         * tests/test-nl_langinfo2.sh: New file.
15292         * modules/nl_langinfo-tests (Files): Add them. Add
15293         intl-thread-locale.m4.
15294         (Depends-on): Add c-strcasestr, stdbool.
15295         (configure.ac): Invoke gt_FUNC_USELOCALE.
15296         (Makefile.am): Arrange to compile test-nl_langinfo2 and test it through
15297         test-nl_langinfo2.sh.
15299         nl_langinfo tests: Prepare for adding more tests.
15300         * tests/test-nl_langinfo1.c: Renamed from tests/test-nl_langinfo.c.
15301         * tests/test-nl_langinfo1.sh: Renamed from tests/test-nl_langinfo.sh.
15302         Update.
15303         * modules/nl_langinfo-tests (Files, Makefile.am): Update.
15305 2023-02-08  Bruno Haible  <bruno@clisp.org>
15307         assert-h: Fix test failure on IRIX 6.5.
15308         * m4/assert_h.m4 (gl_ASSERT_H): Ensure that on IRIX, including
15309         <assert.h> after <config.h> actually defines the assert macro.
15311 2023-02-07  Paul Eggert  <eggert@cs.ucla.edu>
15313         nullptr: test for compilers at autoconf-time
15314         * m4/nullptr.m4 (gl_NULLPTR): Test for C and C++ compiler usage at
15315         autoconf-time.  This should work better than testing at
15316         configure-time.  Also, push and pop languages so we check the
15317         proper compiler.
15319         nullptr: test for C++ nullptr at configure-time
15320         * m4/nullptr.m4 (gl_NULLPTR): Test for C++ support for nullptr
15321         at configure-time, as we already do for C support.
15322         This should be more reliable than maintaining #ifdefs by hand.
15324         nullptr: rename from c-nullptr
15325         * NEWS, doc/gnulib.texi: Mention this.
15326         * m4/nullptr.m4: Rename from m4/c-nullptr.m4.
15327         (gl_NULLPTR): Rename from gl_C_NULLPTR.
15328         * modules/nullptr: Rename from modules/nullptr.
15329         * modules/nullptr-c++-tests: Rename from modules/c-nullptr-c++-tests.
15330         * modules/nullptr-tests: Rename from modules/c-nullptr-tests.
15331         All uses changed.
15333 2023-02-07  Bruno Haible  <bruno@clisp.org>
15335         Fix a copyright header - module license mismatch.
15336         Reported by Bjarni Ingi Gislason <bjarniig@simnet.is> in
15337         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00057.html>.
15338         * lib/gen-uni-tables.c (output_predicate): For uniwidth/width2.h, use an
15339         LGPLv2+ license.
15340         (output_nonspacing_property): Use an LGPLv2+ license.
15341         * lib/uniwidth/width0.h: Regenerated.
15342         * lib/uniwidth/width2.h: Likewise.
15344 2023-02-07  Bruno Haible  <bruno@clisp.org>
15346         check-copyright: Don't fail because of the 'glob' module.
15347         Reported by Bjarni Ingi Gislason <bjarniig@simnet.is> in
15348         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00057.html>.
15349         * check-copyright: Filter out the files from the 'glob' module.
15351 2023-02-07  Bruno Haible  <bruno@clisp.org>
15353         check-copyright: Make output prettier.
15354         * check-copyright: Resize the second column from width 14 to width 17.
15356 2023-02-06  Bruno Haible  <bruno@clisp.org>
15358         setlocale-null: Don't use a lock in Cygwin >= 3.4.6.
15359         Road paved by Corinna Vinschen <vinschen@redhat.com>.
15360         * m4/setlocale_null.m4 (gl_FUNC_SETLOCALE_NULL): Assume that
15361         setlocale (LC_ALL, NULL) is multithread-safe in Cygwin >= 3.4.6.
15362         * lib/setlocale_null.c: Update comments.
15363         * tests/test-setlocale_null-mt-all.c: Likewise.
15365 2023-02-05  Bruno Haible  <bruno@clisp.org>
15367         c-nullptr: Fix conflict with libstdc++ in GCC >= 11.
15368         Reported by Bjarni Ingi Gislason <bjarniig@simnet.is> in
15369         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00030.html>.
15370         * m4/c-nullptr.m4 (gl_C_NULLPTR): Don't define nullptr if it is already
15371         defined. In C++ mode, ignore the result of the configure test and don't
15372         define it when we know that the C++ compiler already supports it.
15374 2023-02-05  Bruno Haible  <bruno@clisp.org>
15376         c-nullptr: Add tests.
15377         * tests/test-nullptr.c: New file.
15378         * modules/c-nullptr-tests: New file.
15379         * tests/test-nullptr-c++.cc: New file.
15380         * modules/c-nullptr-c++-tests: New file.
15382 2023-02-05  Paul Eggert  <eggert@cs.ucla.edu>
15384         sh-quote: backport fix from diffutils
15385         * lib/sh-quote.c (init_sh_quoting_options):
15386         Use C89 through C17 style for parameterless static function.
15387         This avoided a warning when compiling diffutils.
15388         This patch is backported from a circa-2009 diffutils patch
15389         and lets us remove diffutils/gl/lib/sh-quote.c.diff; see:
15390         https://git.savannah.gnu.org/cgit/diffutils.git/commit/?id=8c3d25a63a2c5912170ef6e13f748f3904e6b5cf
15392         c-nullptr: new module
15393         * doc/gnulib.texi (nullptr): New section.
15394         * doc/posix-headers/stddef.texi: Document lack of nullptr_t.
15395         * m4/c-nullptr.m4, modules/c-nullptr: New files.
15397 2023-02-05  Bruno Haible  <bruno@clisp.org>
15399         Update build-aux/po/Makefile.in.in.
15400         Reported by Reuben Thomas <rrt@sc3d.org> in
15401         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00020.html>.
15402         * build-aux/po/Makefile.in.in: Sync from GNU gettext 0.21.1.
15403         Fixes:
15404         - In the .po -> .gmo rules, consider the newest changes to the POT file.
15405         - Emit a warning when creating a tarball without POT file.
15407 2023-02-05  Bruno Haible  <bruno@clisp.org>
15409         assert-h, verify: Fix compilation error in C++ mode with MSVC 14.
15410         * lib/verify.h (static_assert): Define _ALLOW_KEYWORD_MACROS.
15411         * tests/test-assert-h-c++.cc: Strengthen test.
15412         * tests/test-assert-h-c++2.cc: Likewise.
15414 2023-02-04  Paul Eggert  <eggert@cs.ucla.edu>
15416         fts: pacify GCC 13 -Wuse-after-free
15417         Ordinarily I fix this sort of thing by using well-defined rather
15418         than undefined behavior, but a straightforward patch along those
15419         lines would change the fts_.h API since fts_accpath would change
15420         from a pointer to an integer with a more-complex interpretation.
15421         Instead, attempt to pacify GCC 13 with code that relies on
15422         undefined but portable-in-practice behavior that GCC 13 does not
15423         complain about.  GCC problem reported by Peter Frazier in:
15424         https://lists.gnu.org/r/bug-gnulib/2023-02/msg00000.html
15425         * lib/fts.c: Include stdint.h.
15426         (fts_build): Do not access freed pointer directly; instead,
15427         save its bit-pattern into a uintptr_t, and use that to compare.
15428         (ADJUST): Likewise, but more trickily since this hack
15429         actually accesses freed pointers, but does so in a way that
15430         I hope GCC doesn’t notice.  Although using ‘*(uintptr_t *) &P’
15431         instead of ‘(uintptr_t) P’ would avoid accessing freed pointers,
15432         it would provoke a -Wstrict-aliasing diagnostic.
15433         * modules/fts (Depends-on): Add stdint.
15435 2023-02-04  Bruno Haible  <bruno@clisp.org>
15437         assert-h, verify: Fix conflict with standard C++ header files on macOS.
15438         * lib/verify.h (_Static_assert): Don't redefine with clang ≥ 3.8.0
15439         in C++ mode.
15440         * tests/test-assert-h-c++.cc: Also check against conflict with the
15441         standard C++ header files.
15442         * tests/test-assert-h-c++2.cc: Likewise.
15444 2023-02-04  Bruno Haible  <bruno@clisp.org>
15446         Activate all existing C++ tests.
15447         * modules/assert-h-tests (Depends-on): Add assert-h-c++-tests.
15448         * modules/stdarg-tests (Depends-on): Add stdarg-c++-tests.
15450 2023-02-04  Bruno Haible  <bruno@clisp.org>
15452         spawn: Fix compilation error on macOS (regression 2023-01-22).
15453         * lib/spawn.in.h: Tweak logic for defining the POSIX_SPAWN_* constants.
15455 2023-02-03  Bruno Haible  <bruno@clisp.org>
15457         relocatable-prog: Fix compiler warning.
15458         * lib/progreloc.c (full_read): Use a non-const pointer.
15460 2023-02-03  Bruno Haible  <bruno@clisp.org>
15462         doc: Update regarding AIX.
15463         * doc/glibc-headers/getopt.texi: Update.
15465 2023-02-03  Bruno Haible  <bruno@clisp.org>
15467         doc: Update regarding NetBSD.
15468         * doc/posix-functions/sigprocmask.texi: Mention a NetBSD 9.0 bug.
15469         * doc/posix-functions/pthread_sigmask.texi: Likewise.
15471 2023-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15473         isnan: update comment
15474         * lib/isnan.c: Update comment for C23.
15476 2023-01-30  Bruno Haible  <bruno@clisp.org>
15478         at-internal: Fix support for z/OS.
15479         * lib/openat-proc.c (openat_proc_name) [z/OS]: Proper error handling.
15480         Convert only the relevant part of the dir[] buffer.
15482         at-internal: Add support for z/OS.
15483         Reported and draft patch by Igor Todorovski <itodorov@ca.ibm.com>.
15484         * lib/openat-proc.c [z/OS]: Include <termios.h>.
15485         (openat_proc_name): For z/OS, use an approach similar to kLIBC, with
15486         3 lines of z/OS specific code by Igor Todorovski <itodorov@ca.ibm.com>.
15488 2023-01-30  Bruno Haible  <bruno@clisp.org>
15490         Update NEWS.
15491         * NEWS: Update for qcopy-acl change on 2023-01-13.
15493 2023-01-29  Bruno Haible  <bruno@clisp.org>
15495         maintainer-makefile: Determine gnulib's location on disk correctly.
15496         * top/maint.mk (gnulib_dir): Give priority to $(GNULIB_SRCDIR) over
15497         $(srcdir)/gnulib.
15499 2023-01-29  Bruno Haible  <bruno@clisp.org>
15501         Fix compilation errors with CC="clang -D_FORTIFY_SOURCE=2" on Android.
15502         Reported by Alexey Rochev <equeim@gmail.com> in
15503         <https://lists.gnu.org/archive/html/bug-gnu-libiconv/2023-01/msg00019.html>.
15504         * lib/cdefs.h (__bos, __bos0, __glibc_objsize0, __glibc_objsize,
15505         __glibc_safe_len_cond, __glibc_unsigned_or_positive,
15506         __glibc_safe_or_unknown_len, __glibc_unsafe_len, __glibc_fortify,
15507         __glibc_fortify_n): Don't define these macros in Gnulib.
15508         * lib/libc-config.h: Don't undefine these macros in Gnulib.
15510 2023-01-28  Bruno Haible  <bruno@clisp.org>
15512         Clarify _GL_ATTRIBUTE_NODISCARD code.
15513         Reported by Paul Eggert.
15514         * m4/gnulib-common.m4 (gl_COMMON_BODY): Add comment regarding
15515         _GL_ATTRIBUTE_NODISCARD definition.
15517 2023-01-28  Bruno Haible  <bruno@clisp.org>
15519         unistdio/*printf: Fix negative width handling for %U, %lU, %llU.
15520         * lib/vasnprintf.c (VASNPRINTF): In the code for %U, %lU, %llU, test for
15521         the FLAG_LEFT bit in the flags variable.
15522         * tests/unistdio/test-u8-printf1.h (test_xfunction): Add tests for width
15523         given as argument for the directives %U, %lU, %llU, %s, %a, %f, %e, %g.
15524         * tests/unistdio/test-u16-printf1.h (test_xfunction): Likewise.
15525         * tests/unistdio/test-u32-printf1.h (test_xfunction): Likewise.
15526         * tests/unistdio/test-ulc-printf1.h (test_xfunction): Likewise.
15528 2023-01-28  Bruno Haible  <bruno@clisp.org>
15530         vasnprintf-posix: Fix possible bug with negative width handling for %lc.
15531         * lib/vasnprintf.c (VASNPRINTF): In the code for %lc in vasnprintf, test
15532         for the FLAG_LEFT bit in the flags variable.
15533         * tests/test-vasnprintf-posix.c (test_function): Add tests for width
15534         given as argument for the directives %c, %lc.
15535         * tests/test-vasprintf-posix.c (test_function): Likewise.
15536         * tests/test-snprintf-posix.h (test_function): Likewise.
15537         * tests/test-sprintf-posix.h (test_function): Likewise.
15538         * tests/test-snprintf-posix.c: Include <wchar.h>, for wint_t.
15539         * tests/test-sprintf-posix.c: Likewise.
15540         * tests/test-vsnprintf-posix.c: Likewise.
15541         * tests/test-vsprintf-posix.c: Likewise.
15543 2023-01-28  Bruno Haible  <bruno@clisp.org>
15545         vasnprintf-posix: Fix negative width handling for %ls directive.
15546         Reported by clang via Po Lu <luangruo@yahoo.com>.
15547         * lib/vasnprintf.c (VASNPRINTF): In the code for %ls in vasnprintf and
15548         for %s in vasnwprintf, test for the FLAG_LEFT bit in the flags variable.
15549         * tests/test-vasnprintf-posix.c (test_function): Add tests for width
15550         given as argument for the directives %s, %ls.
15551         * tests/test-vasprintf-posix.c (test_function): Likewise.
15552         * tests/test-snprintf-posix.h (test_function): Likewise.
15553         * tests/test-sprintf-posix.h (test_function): Likewise.
15555 2023-01-28  Bruno Haible  <bruno@clisp.org>
15557         vasnprintf-posix: Add more unit tests.
15558         * tests/test-vasnprintf-posix.c (test_function): Add tests for width
15559         given as argument for the directives %a, %f, %e, %g.
15560         * tests/test-vasprintf-posix.c (test_function): Likewise.
15561         * tests/test-snprintf-posix.h (test_function): Likewise.
15562         * tests/test-sprintf-posix.h (test_function): Likewise.
15564 2023-01-28  Bruno Haible  <bruno@clisp.org>
15566         Avoid clang warnings regarding [[__nodiscard__]].
15567         * m4/gnulib-common.m4 (gl_COMMON_BODY): For clang, in C++ mode, ignore
15568         the __has_c_attribute value and define _GL_ATTRIBUTE_NODISCARD to
15569         __attribute__ ((__warn_unused_result__)), not [[__nodiscard__]].
15571 2023-01-28  Bruno Haible  <bruno@clisp.org>
15573         Avoid clang warnings regarding [[__maybe_unused__]].
15574         * m4/gnulib-common.m4 (gl_COMMON_BODY): For clang versions ≥ 6, < 10,
15575         in C++ mode, ignore the __has_c_attribute value and define
15576         _GL_ATTRIBUTE_MAYBE_UNUSED to __attribute__ ((__unused__)), not
15577         [[__maybe_unused__]].
15579 2023-01-27  Bruno Haible  <bruno@clisp.org>
15581         alignasof: Ensure a correct _Alignof (regression 2023-01-15).
15582         * m4/stdalign.m4 (gl_ALIGNASOF): Apply the workaround for wrong _Alignof
15583         in GCC < 4.9 and clang < 8.0.0 also when the system has <stdalign.h>.
15585 2023-01-27  Bruno Haible  <bruno@clisp.org>
15587         stdalign: Ensure alignof is defined on FreeBSD (regression 2023-01-15).
15588         * lib/stdalign.in.h: Include the system's <stdalign.h> when it exists.
15589         * m4/stdalign.m4 (gl_ALIGNASOF): Invoke gl_CHECK_NEXT_HEADERS. Set
15590         HAVE_STDALIGN_H.
15591         * modules/stdalign (Makefile.am): Substitute GUARD_PREFIX,
15592         HAVE_STDALIGN_H, INCLUDE_NEXT, PRAGMA_SYSTEM_HEADER, PRAGMA_COLUMNS,
15593         NEXT_STDALIGN_H.
15595 2023-01-27  Bruno Haible  <bruno@clisp.org>
15597         stddef: Fix test-stddef compilation error on FreeBSD 12/x86.
15598         * m4/stddef_h.m4 (gl_STDDEF_H): When testing for good max_align_t, use
15599         an ISO C compliant definition of _Alignof.
15601 2023-01-25  Bruno Haible  <bruno@clisp.org>
15603         Keep config.h idempotent.
15604         * m4/gnulib-common.m4 (gl_COMMON_BODY): Add double-inclusion guards to
15605         the definitions of the macros _GL_ATTRIBUTE_ALLOC_SIZE,
15606         _GL_ATTRIBUTE_ALWAYS_INLINE, _GL_ATTRIBUTE_ARTIFICIAL,
15607         _GL_ATTRIBUTE_COLD, _GL_ATTRIBUTE_CONST, _GL_ATTRIBUTE_DEALLOC,
15608         _GL_ATTRIBUTE_DEPRECATED, _GL_ATTRIBUTE_ERROR, _GL_ATTRIBUTE_WARNING,
15609         _GL_ATTRIBUTE_EXTERNALLY_VISIBLE, _GL_ATTRIBUTE_FALLTHROUGH,
15610         _GL_ATTRIBUTE_FORMAT, _GL_ATTRIBUTE_LEAF, _GL_ATTRIBUTE_MALLOC,
15611         _GL_ATTRIBUTE_MAY_ALIAS, _GL_ATTRIBUTE_MAYBE_UNUSED,
15612         _GL_ATTRIBUTE_NODISCARD, _GL_ATTRIBUTE_NOINLINE, _GL_ATTRIBUTE_NONNULL,
15613         _GL_ATTRIBUTE_NONSTRING, _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PACKED,
15614         _GL_ATTRIBUTE_PURE, _GL_ATTRIBUTE_RETURNS_NONNULL,
15615         _GL_ATTRIBUTE_SENTINEL, _GL_ATTRIBUTE_UNUSED, _GL_UNUSED_LABEL.
15617 2023-01-25  Bruno Haible  <bruno@clisp.org>
15619         vasnprintf: Fix compilation error on Android NDK r26b.
15620         Reported by Po Lu <luangruo@yahoo.com>.
15621         * lib/vasnprintf.c: Include <wchar.h>.
15623 2023-01-25  Nick Bowler  <nbowler@draconx.ca>  (tiny change)
15625         threadlib: Fix support for Solaris 9 and older.
15626         * m4/threadlib.m4 (gl_PTHREADLIB_BODY): Allow case patterns to survive
15627         m4 processing by using changequote.
15629 2023-01-24  Bruno Haible  <bruno@clisp.org>
15631         alignasof, stdalign: Fix a compilation error on FreeBSD 12.0.
15632         * m4/stdalign.m4 (gl_ALIGNASOF): In C mode, prefer __builtin_offsetof
15633         over offsetof when possible, since __builtin_offsetof works also when
15634         <stddef.h> has not been fully included yet.
15636 2023-01-22  Bruno Haible  <bruno@clisp.org>
15638         doc: Update list of target platforms.
15639         * doc/gnulib-intro.texi (Supported Platforms): Mark musl libc, Android,
15640         and MSVC as "occasionally tested". Update the version numbers of some
15641         OSes. Combine paragraphs regarding mingw and MSVC.
15642         (Formerly Supported Platforms): Mark AIX 5, 6 as "formerly supported".
15644 2023-01-22  Bruno Haible  <bruno@clisp.org>
15646         Resolve conflicts for functions introduced in Android API level 29.
15648         * m4/reallocarray.m4 (gl_FUNC_REALLOCARRAY): Conditionally set
15649         REPLACE_REALLOCARRAY.
15650         * lib/stdlib.in.h (reallocarray): Disable _GL_CXXALIASWARN invocation on
15651         non-glibc systems.
15653         * lib/stdlib.in.h (getloadavg): Consider REPLACE_GETLOADAVG. Disable
15654         _GL_CXXALIASWARN invocation on non-glibc systems.
15655         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_GETLOADAVG.
15656         * modules/stdlib (Makefile.am): Substitute REPLACE_GETLOADAVG.
15657         * m4/getloadavg.m4 (gl_GETLOADAVG): Conditionally set
15658         REPLACE_GETLOADAVG.
15659         * modules/getloadavg (Depends-on, configure.ac): Consider
15660         REPLACE_GETLOADAVG.
15662         * lib/time.in.h (timespec_get): Consider REPLACE_TIMESPEC_GET. Disable
15663         _GL_CXXALIASWARN invocation on non-glibc systems.
15664         * m4/time_h.m4 (gl_TIME_H_DEFAULTS): Initialize REPLACE_TIMESPEC_GET.
15665         * modules/time (Makefile.am): Substitute REPLACE_TIMESPEC_GET.
15666         * m4/gettime.m4 (gl_CHECK_FUNC_TIMESPEC_GET): Set also
15667         gl_cv_onwards_func_timespec_get.
15668         * m4/timespec_get.m4 (gl_FUNC_TIMESPEC_GET): Conditionally set
15669         REPLACE_TIMESPEC_GET.
15670         * modules/timespec_get (Depends-on, configure.ac): Consider
15671         REPLACE_TIMESPEC_GET.
15673 2023-01-22  Bruno Haible  <bruno@clisp.org>
15675         Resolve conflicts for functions introduced in Android API level 28.
15677         * m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Conditionally set
15678         REPLACE_ALIGNED_ALLOC.
15679         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Conditionally set
15680         REPLACE_GETRANDOM.
15682         * m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Conditionally set
15683         REPLACE_GETLOGIN_R.
15684         * lib/unistd.in.h (getlogin_r): Disable _GL_CXXALIASWARN invocation on
15685         non-glibc systems.
15687         * m4/spawn_h.m4 (gl_HAVE_POSIX_SPAWN): Conditionally set
15688         REPLACE_POSIX_SPAWN.
15689         * lib/spawn.in.h: Adapt logic for defining the POSIX_SPAWN_* constants.
15690         (posix_spawn, posix_spawnp, posix_spawnattr_init,
15691         posix_spawnattr_destroy, posix_spawnattr_getsigdefault,
15692         posix_spawnattr_setsigdefault, posix_spawnattr_getsigmask,
15693         posix_spawnattr_setsigmask, posix_spawnattr_getflags,
15694         posix_spawnattr_setflags, posix_spawnattr_getpgroup,
15695         posix_spawnattr_setpgroup, posix_spawn_file_actions_init,
15696         posix_spawn_file_actions_destroy, posix_spawn_file_actions_addchdir,
15697         posix_spawn_file_actions_addfchdir): Disable _GL_CXXALIASWARN invocation
15698         on non-glibc systems.
15700         * m4/glob.m4 (gl_GLOB): Conditionally set REPLACE_GLOB.
15701         * lib/glob.in.h (glob): Disable _GL_CXXALIASWARN invocation on non-glibc
15702         systems.
15704         * lib/unistd.in.h (getentropy): Consider REPLACE_GETENTROPY. Disable
15705         _GL_CXXALIASWARN invocation on non-glibc systems.
15706         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_GETENTROPY.
15707         * modules/unistd (Makefile.am): Substitute REPLACE_GETENTROPY.
15708         * m4/getentropy.m4 (gl_FUNC_GETENTROPY): Conditionally set
15709         REPLACE_GETENTROPY.
15710         * modules/getentropy (Depends-on, configure.ac): Consider
15711         REPLACE_GETENTROPY.
15713 2023-01-22  Bruno Haible  <bruno@clisp.org>
15715         Resolve conflicts for functions introduced in Android API level 26.
15717         * m4/getdomainname.m4 (gl_FUNC_GETDOMAINNAME): Test for getdomainname
15718         using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. Conditionally
15719         set REPLACE_GETSUBOPT.
15721         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Conditionally set
15722         REPLACE_NL_LANGINFO.
15723         * lib/langinfo.in.h (nl_langinfo): Disable _GL_CXXALIASWARN invocation
15724         on non-glibc systems.
15726         * lib/stdlib.in.h (getsubopt): Consider REPLACE_GETSUBOPT. Disable
15727         _GL_CXXALIASWARN invocation on non-glibc systems.
15728         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_GETSUBOPT.
15729         * modules/stdlib (Makefile.am): Substitute REPLACE_GETSUBOPT.
15730         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Conditionally set
15731         REPLACE_GETSUBOPT.
15732         * modules/getsubopt (Depends-on, configure.ac): Consider
15733         REPLACE_GETSUBOPT.
15735 2023-01-22  Bruno Haible  <bruno@clisp.org>
15737         Resolve conflicts for functions introduced in Android API level 24.
15738         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Conditionally set
15739         REPLACE_STRCHRNUL.
15741 2023-01-22  Bruno Haible  <bruno@clisp.org>
15743         Resolve conflicts for functions introduced in Android API level 23.
15745         * m4/login_tty.m4 (gl_FUNC_LOGIN_TTY): Conditionally set
15746         REPLACE_LOGIN_TTY.
15747         * lib/utmp.in.h (login_tty): Disable _GL_CXXALIASWARN invocation on
15748         non-glibc systems.
15750         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Conditionally set REPLACE_MKFIFOAT.
15751         * lib/sys_stat.in.h (mkfifoat): Disable _GL_CXXALIASWARN invocation on
15752         non-glibc systems.
15754         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R_WORKS): Conditionally set
15755         REPLACE_STRERROR_R.
15756         * lib/string.in.h (strerror_r): Disable _GL_CXXALIASWARN invocation on
15757         non-glibc systems.
15759         * m4/error_h.m4 (gl_ERROR_H): Conditionally set REPLACE_ERROR.
15760         * lib/error.in.h (error): Disable _GL_CXXALIASWARN invocation on
15761         non-glibc systems.
15763         * lib/wchar.in.h (wmempcpy): Consider REPLACE_WMEMPCPY.
15764         * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WMEMPCPY.
15765         * modules/wchar (Makefile.am): Substitute REPLACE_WMEMPCPY.
15766         * m4/wmempcpy.m4 (gl_FUNC_WMEMPCPY): Conditionally set
15767         REPLACE_WMEMPCPY.
15768         * modules/wmempcpy (configure.ac): Consider REPLACE_WMEMPCPY.
15770         * lib/unistd.in.h (sethostname): Consider REPLACE_SETHOSTNAME. Disable
15771         _GL_CXXALIASWARN invocation on non-glibc systems.
15772         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_SETHOSTNAME.
15773         * modules/unistd (Makefile.am): Substitute REPLACE_SETHOSTNAME.
15774         * m4/sethostname.m4 (gl_FUNC_SETHOSTNAME): Conditionally set
15775         REPLACE_SETHOSTNAME.
15776         * modules/sethostname (Depends-on, configure.ac): Consider
15777         REPLACE_SETHOSTNAME.
15779         * lib/string.in.h (mempcpy): Consider REPLACE_MEMPCPY. Disable
15780         _GL_CXXALIASWARN invocation on non-glibc systems.
15781         * m4/string_h.m4 (gl_STRING_H_DEFAULTS): Initialize REPLACE_MEMPCPY.
15782         * modules/string (Makefile.am): Substitute REPLACE_MEMPCPY.
15783         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Conditionally set REPLACE_MEMPCPY.
15784         * modules/mempcpy (configure.ac): Consider REPLACE_MEMPCPY.
15786         * lib/stdlib.in.h (mkostemp): Consider REPLACE_MKOSTEMP. Disable
15787         _GL_CXXALIASWARN invocation on non-glibc systems.
15788         (mkostemps): Consider REPLACE_MKOSTEMPS. Disable _GL_CXXALIASWARN
15789         invocation on non-glibc systems.
15790         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_MKOSTEMP,
15791         REPLACE_MKOSTEMPS.
15792         * modules/stdlib (Makefile.am): Substitute REPLACE_MKOSTEMP,
15793         REPLACE_MKOSTEMPS.
15794         * m4/mkostemp.m4 (gl_FUNC_MKOSTEMP): Conditionally set REPLACE_MKOSTEMP.
15795         * modules/mkostemp (Depends-on, configure.ac): Consider
15796         REPLACE_MKOSTEMP.
15797         * m4/mkostemps.m4 (gl_FUNC_MKOSTEMPS): Conditionally set
15798         REPLACE_MKOSTEMPS.
15799         * modules/mkostemps (Depends-on, configure.ac): Consider
15800         REPLACE_MKOSTEMPS.
15802 2023-01-22  Bruno Haible  <bruno@clisp.org>
15804         Resolve conflicts for functions introduced in Android API level 21.
15806         * m4/fts.m4 (gl_FUNC_FTS_CORE): Use rpl_* symbols also when the system
15807         will have fts_open in a future version.
15808         * m4/iswblank.m4 (gl_FUNC_ISWBLANK): Conditionally set REPLACE_ISWBLANK.
15809         * m4/mbtowc.m4 (gl_FUNC_MBTOWC): Conditionally set REPLACE_MBTOWC.
15810         * m4/vdprintf.m4 (gl_REPLACE_VDPRINTF): Conditionally set
15811         REPLACE_VDPRINTF.
15812         * m4/wcsnrtombs.m4 (gl_FUNC_WCSNRTOMBS): Conditionally set
15813         REPLACE_WCSNRTOMBS.
15815         * m4/mbsnrtowcs.m4 (gl_FUNC_MBSNRTOWCS): Conditionally set
15816         REPLACE_MBSNRTOWCS.
15817         * lib/wchar.in.h (mbsnrtowcs): Disable _GL_CXXALIASWARN invocation on
15818         non-glibc systems.
15820         * m4/execvpe.m4 (gl_FUNC_EXECVPE): Conditionally set REPLACE_EXECVPE.
15821         * m4/linkat.m4 (gl_FUNC_LINKAT): Conditionally set REPLACE_LINKAT.
15822         * m4/readlinkat.m4 (gl_FUNC_READLINKAT): Conditionally set
15823         REPLACE_READLINKAT.
15824         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Conditionally set
15825         REPLACE_SYMLINKAT.
15826         * m4/truncate.m4 (gl_FUNC_TRUNCATE): Conditionally set REPLACE_TRUNCATE.
15827         * lib/unistd.in.h (execvpe, linkat, readlinkat, symlinkat, truncate):
15828         Disable _GL_CXXALIASWARN invocation on non-glibc systems.
15830         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Conditionally set REPLACE_MKNODAT.
15831         * lib/sys_stat.in.h (mknodat): Disable _GL_CXXALIASWARN invocation on
15832         non-glibc systems.
15834         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Conditionally set REPLACE_STPNCPY.
15835         * lib/string.in.h (stpncpy): Disable _GL_CXXALIASWARN invocation on
15836         non-glibc systems.
15838         * m4/random.m4 (gl_FUNC_RANDOM): Conditionally set REPLACE_INITSTATE,
15839         REPLACE_SETSTATE.
15840         * lib/stdlib.in.h (initstate, setstate): Disable _GL_CXXALIASWARN
15841         invocation on non-glibc systems.
15843         * m4/dprintf.m4 (gl_REPLACE_DPRINTF): Conditionally set REPLACE_DPRINTF.
15844         * lib/stdio.in.h (dprintf): Disable _GL_CXXALIASWARN invocation on
15845         non-glibc systems.
15847         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Conditionally set
15848         REPLACE_DUPLOCALE.
15849         * m4/localename.m4 (gl_LOCALENAME): Conditionally set REPLACE_NEWLOCALE,
15850         REPLACE_DUPLOCALE, REPLACE_FREELOCALE.
15851         * lib/locale.in.h (newlocale, duplocale, freelocale): Disable
15852         _GL_CXXALIASWARN invocation on non-glibc systems.
15854         * lib/unistd.in.h (dup3): Consider REPLACE_DUP3. Disable
15855         _GL_CXXALIASWARN invocation on non-glibc systems.
15856         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_DUP3.
15857         * modules/unistd (Makefile.am): Substitute REPLACE_DUP3.
15858         * m4/dup3.m4 (gl_FUNC_DUP3): Conditionally set REPLACE_DUP3.
15860         * lib/string.in.h (stpcpy): Consider REPLACE_STPCPY. Disable
15861         _GL_CXXALIASWARN invocation on non-glibc systems.
15862         * m4/string_h.m4 (gl_STRING_H_DEFAULTS): Initialize REPLACE_STPCPY.
15863         * modules/string (Makefile.am): Substitute REPLACE_STPCPY.
15864         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Conditionally set REPLACE_STPCPY.
15865         * modules/stpcpy (configure.ac): Consider REPLACE_STPCPY.
15867         * lib/stdlib.in.h (_Exit): Consider REPLACE__EXIT. Disable
15868         _GL_CXXALIASWARN invocation on non-glibc systems.
15869         (getprogname): Consider REPLACE_GETPROGNAME. Disable _GL_CXXALIASWARN
15870         invocation on non-glibc systems.
15871         (posix_openpt): Consider REPLACE_POSIX_OPENPT. Disable _GL_CXXALIASWARN
15872         invocation on non-glibc systems.
15873         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE__EXIT,
15874         REPLACE_GETPROGNAME, REPLACE_POSIX_OPENPT.
15875         * modules/stdlib (Makefile.am): Substitute REPLACE__EXIT,
15876         REPLACE_GETPROGNAME, REPLACE_POSIX_OPENPT.
15877         * m4/_Exit.m4 (gl_FUNC__EXIT): Conditionally set REPLACE__EXIT.
15878         * modules/_Exit (configure.ac): Consider REPLACE__EXIT.
15879         * m4/getprogname.m4 (gl_FUNC_GETPROGNAME): Conditionally set
15880         REPLACE_GETPROGNAME.
15881         * modules/getprogname (configure.ac): Consider REPLACE_GETPROGNAME.
15882         * m4/posix_openpt.m4 (gl_FUNC_POSIX_OPENPT): Conditionally set
15883         REPLACE_POSIX_OPENPT.
15884         * modules/posix_openpt (configure.ac): Consider REPLACE_POSIX_OPENPT.
15886         * lib/search.in.h (twalk): Consider REPLACE_TWALK.
15887         * m4/search_h.m4 (gl_SEARCH_H_DEFAULTS): Initialize REPLACE_TWALK.
15888         * modules/search (Makefile.am): Substitute REPLACE_TWALK.
15889         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Conditionally set REPLACE_TWALK.
15890         * modules/tsearch (configure.ac): Consider REPLACE_TWALK.
15892 2023-01-22  Bruno Haible  <bruno@clisp.org>
15894         Resolve conflicts for functions introduced in Android API level 19.
15896         * lib/inttypes.in.h (imaxabs): Consider REPLACE_IMAXABS. Disable
15897         _GL_CXXALIASWARN invocation on non-glibc systems.
15898         (imaxdiv): Consider REPLACE_IMAXDIV. Disable _GL_CXXALIASWARN invocation
15899         on non-glibc systems.
15900         * m4/inttypes.m4 (gl_INTTYPES_H_DEFAULTS): Initialize HAVE_IMAXABS,
15901         HAVE_IMAXDIV, REPLACE_IMAXABS, REPLACE_IMAXDIV.
15902         * modules/inttypes-incomplete (Makefile.am): Substitute REPLACE_IMAXABS,
15903         REPLACE_IMAXDIV.
15904         * m4/imaxabs.m4 (gl_FUNC_IMAXABS): Conditionally set HAVE_IMAXABS,
15905         REPLACE_IMAXABS.
15906         * modules/imaxabs (configure.ac): Consider HAVE_IMAXABS, REPLACE_IMAXABS.
15907         * m4/imaxdiv.m4 (gl_FUNC_IMAXDIV): Conditionally set HAVE_IMAXDIV,
15908         REPLACE_IMAXDIV.
15909         * modules/imaxdiv (configure.ac): Consider HAVE_IMAXDIV, REPLACE_IMAXDIV.
15911         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Conditionally set REPLACE_FUTIMENS.
15912         * lib/sys_stat.in.h (futimens): Disable _GL_CXXALIASWARN invocation on
15913         non-glibc systems.
15915 2023-01-22  Bruno Haible  <bruno@clisp.org>
15917         Resolve conflicts for functions introduced in Android API level 18.
15919         * m4/log2.m4 (gl_FUNC_LOG2): Conditionally set REPLACE_LOG2.
15920         * m4/log2f.m4 (gl_FUNC_LOG2F): Conditionally set REPLACE_LOG2F.
15921         * m4/log2l.m4 (gl_FUNC_LOG2L): Conditionally set REPLACE_LOG2L.
15922         * lib/math.in.h (log2f): Disable _GL_CXXALIASWARN invocation on
15923         non-glibc systems.
15925         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Conditionally set REPLACE_GETDELIM.
15926         * m4/getline.m4 (gl_FUNC_GETLINE): Conditionally set REPLACE_GETLINE.
15927         * lib/stdio.in.h (getdelim, getline): Disable _GL_CXXALIASWARN
15928         invocation on non-glibc systems.
15930 2023-01-22  Bruno Haible  <bruno@clisp.org>
15932         Resolve conflicts for functions introduced in Android API level 16-17.
15933         * m4/posix_memalign.m4 (gl_FUNC_POSIX_MEMALIGN): Conditionally set
15934         REPLACE_POSIX_MEMALIGN.
15935         * lib/stdlib.in.h (posix_memalign): Disable _GL_CXXALIASWARN invocation
15936         on non-glibc systems.
15938 2023-01-22  Bruno Haible  <bruno@clisp.org>
15940         Resolve conflicts for functions introduced in Android API level 16.
15942         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Conditionally set REPLACE_TSEARCH.
15943         * lib/search.in.h (tsearch, tfind, tdelete, twalk): Disable
15944         _GL_CXXALIASWARN invocation on non-glibc systems.
15946         * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Conditionally set
15947         REPLACE_FACCESSAT.
15948         * lib/unistd.in.h (faccessat): Disable _GL_CXXALIASWARN invocation on
15949         non-glibc systems.
15951 2023-01-22  Bruno Haible  <bruno@clisp.org>
15953         Resolve conflicts for functions introduced in Android API level 12.
15955         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Conditionally set
15956         REPLACE_UTIMENSAT.
15957         * lib/sys_stat.in.h (utimensat): Disable _GL_CXXALIASWARN invocation on
15958         non-glibc systems.
15960         * m4/timegm.m4 (gl_FUNC_TIMEGM): Conditionally set REPLACE_TIMEGM.
15961         * lib/time.in.h (timegm): Disable _GL_CXXALIASWARN invocation on
15962         non-glibc systems.
15964         * m4/pwrite.m4 (gl_FUNC_PWRITE): Conditionally set REPLACE_PWRITE.
15965         * lib/unistd.in.h (pwrite): Disable _GL_CXXALIASWARN invocation on
15966         non-glibc systems.
15968         * m4/pread.m4 (gl_FUNC_PREAD): Conditionally set REPLACE_PREAD.
15969         * lib/unistd.in.h (pread): Disable _GL_CXXALIASWARN invocation on
15970         non-glibc systems.
15972         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Conditionally set
15973         REPLACE_FTRUNCATE.
15974         * lib/unistd.in.h (ftruncate): Disable _GL_CXXALIASWARN invocation on
15975         non-glibc systems.
15977 2023-01-22  Bruno Haible  <bruno@clisp.org>
15979         Resolve conflicts for functions introduced in Android API level 9.
15980         * lib/unistd.in.h (fdatasync): Consider REPLACE_FDATASYNC. Disable
15981         _GL_CXXALIASWARN invocation on non-glibc systems.
15982         (pipe2): Consider REPLACE_PIPE2. Disable _GL_CXXALIASWARN invocation on
15983         non-glibc systems.
15984         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_FDATASYNC,
15985         REPLACE_PIPE2.
15986         * modules/unistd (Makefile.am): Substitute REPLACE_FDATASYNC,
15987         REPLACE_PIPE2.
15988         * m4/fdatasync.m4 (gl_FUNC_FDATASYNC): Test for fdatasync using
15989         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. Conditionally set
15990         REPLACE_FDATASYNC.
15991         * modules/fdatasync (Depends-on, configure.ac): Consider
15992         REPLACE_FDATASYNC.
15993         * m4/pipe2.m4 (gl_FUNC_PIPE2): Conditionally set REPLACE_PIPE2.
15995 2023-01-22  Bruno Haible  <bruno@clisp.org>
15997         Resolve conflicts for functions introduced in Android API level 8.
15998         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Conditionally set
15999         REPLACE_TTYNAME_R.
16000         * lib/unistd.in.h (ttyname_r): Disable _GL_CXXALIASWARN invocation on
16001         non-glibc systems.
16003 2023-01-22  Bruno Haible  <bruno@clisp.org>
16005         Prepare for resolving conflicts regarding future Android API levels.
16006         * m4/gnulib-common.m4 (gl_CHECK_FUNCS_ANDROID): Don't check for the
16007         function declaration on platforms other than Android. Set a variable
16008         gl_cv_onwards_func_<func>.
16010 2023-01-22  Paul Eggert  <eggert@cs.ucla.edu>
16012         sigsegv, vma-iter: port to Solaris 10
16013         On this platform, <sys/types.h> does not define off_t if neither
16014         _LP64 nor _FILE_OFFSET_BITS is defined, which can happen if we
16015         #undef _FILE_OFFSET_BITS.  This became a problem with the new way
16016         of doing stdbool, since config.h now includes <stdbool.h>, and
16017         Solaris 10 <stdbool.h> includes <sys/feature_tests.h> which
16018         arranges for _FILE_OFFSET_BITS to always be defined (if only to 32),
16019         which <sys/types.h> assumes.
16020         * lib/stackvma.c, lib/vma-iter.c (_FILE_OFFSET_BITS) [__sun && !_LP64]:
16021         Define to 32 instead of leaving undefined.
16023 2023-01-21  Bruno Haible  <bruno@clisp.org>
16025         login_tty: Ensure declaration in <utmp.h>.
16027         * tests/test-utmp-c++.cc: New file.
16028         * modules/utmp-c++-tests: New file.
16030         * tests/test-utmp.c: New file.
16031         * modules/utmp-tests: New file.
16033         * lib/login_tty.c: Include <utmp.h>.
16034         * m4/login_tty.m4: New file.
16035         (gl_FUNC_LOGIN_TTY): Moved here from m4/pty.m4. Set HAVE_LOGIN_TTY.
16036         * m4/pty.m4 (gl_FUNC_LOGIN_TTY): Moved to m4/login_tty.m4.
16037         * modules/login_tty (Files): Add m4/login_tty.m4.
16038         (Depends-on): Add utmp. Remove pty. Update condition.
16039         (configure.ac): Update condition. Invoke gl_UTMP_MODULE_INDICATOR
16040         instead of gl_PTY_MODULE_INDICATOR.
16041         (Include): List <utmp.h>.
16042         * doc/glibc-functions/login_tty.texi: Mark the include file diversity as
16043         fixed.
16044         * tests/test-login_tty.c: Include <utmp.h>. Don't declare login_tty
16045         here.
16047         * lib/utmp.in.h: New file.
16048         * m4/utmp_h.m4: New file.
16049         * modules/utmp: New file.
16050         * doc/glibc-headers/utmp.texi: New file.
16051         * doc/gnulib.texi (Glibc Header File Substitutes): Include it.
16053 2023-01-21  Bruno Haible  <bruno@clisp.org>
16055         login_tty: Fix detection of declaration (regression 2023-01-19).
16056         * m4/pty.m4 (gl_FUNC_LOGIN_TTY): Check for the three possible header
16057         files.
16059 2023-01-21  Bruno Haible  <bruno@clisp.org>
16061         alignasof tests: Rename test file.
16062         * tests/test-alignasof.c: Renamed from tests/test-stdalign.c.
16063         * modules/alignasof-tests (Files, Makefile.am): Update accordingly.
16065 2023-01-21  Bruno Haible  <bruno@clisp.org>
16067         alignasof tests: Fix GCC warning (regression 2023-01-15).
16068         * tests/test-stdalign.c (alignas): Undefine before redefine.
16070 2023-01-21  Bruno Haible  <bruno@clisp.org>
16072         getprogname: Move declaration from "getprogname.h" to <stdlib.h>.
16073         * lib/stdlib.in.h (getprogname): New declaration.
16074         * lib/getprogname.h: Add deprecation warning.
16075         (getprogname): Remove declaration.
16076         * lib/getprogname.c: Include <stdlib.h> instead of getprogname.h.
16077         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether getprogname is declared.
16078         (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize GNULIB_GETPROGNAME.
16079         (gl_STDLIB_H_DEFAULTS): Initialize HAVE_GETPROGNAME.
16080         * m4/getprogname.m4 (gl_PREREQ_GETPROGNAME): New macro, extracted from
16081         gl_FUNC_GETPROGNAME. Set HAVE_GETPROGNAME.
16082         (gl_FUNC_GETPROGNAME): Remove code that was moved to
16083         gl_PREREQ_GETPROGNAME.
16084         * modules/stdlib (Makefile.am): Substitute GNULIB_GETPROGNAME and
16085         HAVE_GETPROGNAME.
16086         * modules/getprogname (Depends-on): Add stdlib.
16087         (configure.ac): Define a module indicator. Invoke gl_PREREQ_GETPROGNAME.
16088         (Makefile.am): Don't compile getprogname.c if not needed.
16089         (Include): List <stdlib.h> instead of getprogname.h.
16090         * tests/test-getprogname.c: Include <stdlib.h> instead of getprogname.h.
16091         * NEWS: Mention the change.
16092         * lib/argmatch.c: Don't include getprogname.h.
16093         * lib/c-stack.c: Likewise.
16094         * lib/error.c: Likewise.
16095         * lib/git-merge-changelog.c: Likewise.
16097 2023-01-19  Paul Eggert  <eggert@cs.ucla.edu>
16099         snippet/_Noreturn: work around Clang _Noreturn bug
16100         This is a bigger-hammer workaround for the clang _Noreturn issue
16101         fix for dfa.c on 2023-01-01.  Unfortunately, it causes 270
16102         -Wreturn-type and -Wsometimes-uninitialized warnings when building
16103         bleeding-edge GNU Emacs from Git on Fedora 37 with plain
16104         ‘./configure && make’.  So the workaround is enabled only if you
16105         compile with -D_GL_WORK_AROUND_LLVM_BUG_59792.
16106         * lib/_Noreturn.h (_Noreturn):
16107         * m4/gnulib-common.m4 (gl_COMMON_BODY):
16108         #define _Noreturn to be empty if it is Clang 15 or earlier,
16109         and if _GL_WORK_AROUND_LLVM_BUG_59792 is defined.
16111 2023-01-19  Bruno Haible  <bruno@clisp.org>
16113         Fix warnings for functions introduced in Android API level 34.
16114         * modules/execute-tests (configure.ac): Test for close_range using
16115         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
16117 2023-01-19  Bruno Haible  <bruno@clisp.org>
16119         Fix warnings for functions introduced in Android API level 30.
16120         * m4/threadlib.m4 (gl_STDTHREADLIB_BODY): Test for thrd_create using
16121         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
16123 2023-01-19  Bruno Haible  <bruno@clisp.org>
16125         Fix warnings for functions introduced in Android API level 29.
16126         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for getloadavg using
16127         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNC.
16129 2023-01-19  Bruno Haible  <bruno@clisp.org>
16131         Fix warnings for functions introduced in Android API level 28.
16132         * m4/glob.m4 (gl_GLOB): Test for glob using gl_CHECK_FUNCS_ANDROID
16133         instead of AC_CHECK_FUNCS_ONCE.
16135 2023-01-19  Bruno Haible  <bruno@clisp.org>
16137         Fix warnings for functions introduced in Android API level 26.
16138         * m4/mountlist.m4 (gl_MOUNTLIST): Test for hasmntopt using
16139         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
16140         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Test for nl_langinfo using
16141         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16142         * m4/strtod.m4 (gl_PREREQ_STRTOD): Test for nl_langinfo using
16143         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
16144         * m4/strtold.m4 (gl_PREREQ_STRTOLD): Likewise.
16145         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Likewise.
16146         * m4/strerror_r.m4 (gl_PREREQ_STRERROR_R): Test for catgets using
16147         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16148         * m4/utimens.m4 (gl_UTIMENS): Test for lutimes using
16149         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16150         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Test for nl_langinfo_l using
16151         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16152         * modules/duplocale-tests (configure.ac): Likewise.
16153         * m4/getdomainname.m4 (gl_FUNC_GETDOMAINNAME): Update comment.
16155 2023-01-19  Bruno Haible  <bruno@clisp.org>
16157         Fix warnings for functions introduced in Android API level 24.
16158         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Test for strchrnul using
16159         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
16161 2023-01-19  Bruno Haible  <bruno@clisp.org>
16163         Fix warnings for functions introduced in Android API level 23.
16164         * m4/fbufmode.m4 (gl_FUNC_FBUFMODE): Test for __flbf, __fbufsize using
16165         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16166         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT_LGPL): Test for mempcpy using
16167         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16168         * m4/fpurge.m4 (gl_FUNC_FPURGE): Test for __fpurge using
16169         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16170         * m4/freadable.m4 (gl_FUNC_FREADABLE): Test for __freadable using
16171         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16172         * m4/fwritable.m4 (gl_FUNC_FWRITABLE): Test for __fwritable using
16173         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16174         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): Test for __fsetlocking using
16175         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16176         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Test for mempcpy using
16177         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
16178         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Test for mkfifoat using
16179         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16180         * m4/mkostemp.m4 (gl_FUNC_MKOSTEMP): Test for mkostemp using
16181         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16182         * m4/mkostemps.m4 (gl_FUNC_MKOSTEMPS): Test for mkostemps using
16183         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16184         * m4/pty.m4 (gl_FUNC_LOGIN_TTY): Test for login_tty using
16185         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
16186         * m4/sethostname.m4 (gl_FUNC_SETHOSTNAME): Test for sethostname using
16187         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
16188         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R_WORKS): Test for strerror_r using
16189         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16190         * m4/wmempcpy.m4 (gl_FUNC_WMEMPCPY): Test for wmempcpy using
16191         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16193 2023-01-19  Bruno Haible  <bruno@clisp.org>
16195         Fix warnings for functions introduced in Android API level 21.
16196         * m4/_Exit.m4 (gl_FUNC__EXIT): Test for _Exit using
16197         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
16198         * m4/c-strtod.m4 (gl_C_STRTOLD): Test for strtold_l using
16199         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
16200         * m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): Test for c32rtomb like
16201         gl_CHECK_FUNCS_ANDROID does.
16202         * m4/dprintf.m4 (gl_FUNC_DPRINTF): Test for dprintf using
16203         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16204         * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_POSIX): Likewise.
16205         * m4/dup3.m4 (gl_FUNC_DUP3): Test for dup3 using
16206         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16207         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Test for duplocale using
16208         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16209         * m4/execvpe.m4 (gl_FUNC_EXECVPE): Test for execvpe using
16210         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
16211         * m4/fts.m4 (gl_FUNC_FTS_CORE): Test for fts_open using
16212         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNC.
16213         * m4/getprogname.m4 (gl_FUNC_GETPROGNAME): Test for getprogname using
16214         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16215         * m4/intl-thread-locale.m4 (gt_FUNC_USELOCALE): Test for uselocale using
16216         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16217         * m4/iswblank.m4 (gl_FUNC_ISWBLANK): Test for iswblank using
16218         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16219         * m4/libtextstyle-optional.m4 (gl_LIBTEXTSTYLE_OPTIONAL): Test for
16220         tcdrain using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16221         * m4/linkat.m4 (gl_FUNC_LINKAT): Test for linkat using
16222         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16223         * m4/localename.m4 (gl_LOCALENAME): Test for newlocale, duplocale,
16224         freelocale using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16225         * m4/mbrtoc32.m4 (gl_CHECK_FUNC_MBRTOC32): Test for mbrtoc32 like
16226         gl_CHECK_FUNCS_ANDROID does.
16227         * m4/mbsnrtowcs.m4 (gl_FUNC_MBSNRTOWCS): Test for mbsnrtowcs using
16228         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16229         * m4/mbtowc.m4 (gl_FUNC_MBTOWC): Test for mbtowc using
16230         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
16231         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Test for mknodat using
16232         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16233         * m4/mountlist.m4 (gl_MOUNTLIST): Test for setmntent, endmntent using
16234         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
16235         * m4/posix_openpt.m4 (gl_FUNC_POSIX_OPENPT): Test for posix_openpt using
16236         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16237         * m4/pty.m4 (gl_FUNC_OPENPTY): Test for posix_openpt using
16238         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
16239         * m4/random.m4 (gl_FUNC_RANDOM): Test for initstate, setstate using
16240         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
16241         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Test for stpcpy using
16242         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
16243         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Test for stpncpy using
16244         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16245         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Test for symlinkat using
16246         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16247         * m4/truncate.m4 (gl_FUNC_TRUNCATE): Test for truncate using
16248         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16249         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Test for twalk using
16250         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
16251         * m4/vdprintf.m4 (gl_FUNC_VDPRINTF): Test for vdprintf using
16252         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16253         * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_POSIX): Likewise.
16254         * m4/wcsnrtombs.m4 (gl_FUNC_WCSNRTOMBS): Test for wcsnrtombs using
16255         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16256         * m4/readlinkat.m4 (gl_FUNC_READLINKAT): Test for readlinkat using
16257         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16258         * m4/fchmodat.m4 (gl_PREREQ_FCHMODAT): Likewise.
16259         * modules/careadlinkat (configure.ac): Likewise.
16260         * modules/ftoastr (configure.ac): Test for strtof using
16261         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16262         * modules/duplocale-tests (configure.ac): Test for duplocale using
16263         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16264         * modules/hard-locale-tests (configure.ac): Likewise.
16265         * modules/locale-tests (configure.ac): Test for newlocale using
16266         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16267         * modules/localename-tests (configure.ac): Likewise.
16268         * modules/tsearch-tests (configure.ac): Test for initstate using
16269         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16270         * modules/unistr/u8-stpcpy (configure.ac): Test for stpcpy using
16271         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16273         * m4/tcgetattr.m4: New file, extracted from m4/getpass.m4.
16274         * m4/getpass.m4 (gl_PREREQ_GETPASS): Remove code that tests for
16275         tcgetattr. Invoke gl_HAVE_TCGETATTR instead.
16276         * modules/getpass (Files): Add tcgetattr.m4.
16277         * modules/getpass-gnu (Files): Add tcgetattr.m4.
16278         * modules/term-style-control (Files): Add tcgetattr.m4.
16279         (configure.ac): Remove code that tests for tcgetattr. Invoke
16280         gl_HAVE_TCGETATTR instead.
16282 2023-01-19  Bruno Haible  <bruno@clisp.org>
16284         Fix warnings for functions introduced in Android API level 19.
16285         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Test for futimens using
16286         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16287         * m4/utimens.m4 (gl_UTIMENS): Likewise.
16288         * m4/imaxabs.m4 (gl_FUNC_IMAXABS): Test for imaxabs using
16289         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16290         * m4/imaxdiv.m4 (gl_FUNC_IMAXDIV): Test for imaxdiv using
16291         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16293 2023-01-19  Bruno Haible  <bruno@clisp.org>
16295         Fix warnings for functions introduced in Android API level 18.
16296         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Test for getdelim using
16297         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16298         * m4/getline.m4 (gl_FUNC_GETLINE): Test for getline using
16299         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNC.
16300         * m4/log2.m4 (gl_FUNC_LOG2): Test for log2 using
16301         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
16302         * m4/log2f.m4 (gl_FUNC_LOG2F): Test for log2f using
16303         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
16304         * m4/log2l.m4 (gl_FUNC_LOG2L): Test for log2l using
16305         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
16307 2023-01-19  Bruno Haible  <bruno@clisp.org>
16309         Fix warnings for functions introduced in Android API level 16 or 17.
16310         * m4/posix_memalign.m4 (gl_FUNC_POSIX_MEMALIGN): Test for posix_memalign
16311         using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16312         * m4/alignalloc.m4 (gl_ALIGNALLOC): Likewise.
16313         * m4/pagealign_alloc.m4 (gl_PREREQ_PAGEALIGN_ALLOC): Likewise.
16314         * modules/aligned-malloc (configure.ac): Likewise.
16316 2023-01-19  Bruno Haible  <bruno@clisp.org>
16318         Fix warnings for functions introduced in Android API level 16.
16319         * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Test for faccessat using
16320         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16321         * m4/canonicalize.m4 (gl_FUNC_CANONICALIZE_FILENAME_MODE,
16322         gl_CANONICALIZE_LGPL_SEPARATE): Likewise.
16323         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
16324         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Test for tsearch using
16325         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
16326         * m4/setenv.m4 (gl_PREREQ_SETENV): Likewise.
16328 2023-01-19  Bruno Haible  <bruno@clisp.org>
16330         Fix warnings for functions introduced in Android API level 12.
16331         Reported by Po Lu <luangruo@yahoo.com>.
16332         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Test for ftruncate using
16333         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16334         * m4/glob.m4 (gl_PREREQ_GLOB): Test for getpwnam_r using
16335         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16336         * m4/nproc.m4 (gl_PREREQ_NPROC): Test for sched_getaffinity using
16337         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
16338         * m4/pread.m4 (gl_FUNC_PREAD): Test for pread using
16339         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16340         * m4/pwrite.m4 (gl_FUNC_PWRITE): Test for pwrite using
16341         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16342         * m4/thread.m4 (gl_THREAD): Test for pthread_atfork using
16343         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
16344         * m4/timegm.m4 (gl_FUNC_TIMEGM): Test for timegm using
16345         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16346         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Test for utimensat using
16347         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16348         * m4/utimens.m4 (gl_UTIMENS): Likewise.
16350 2023-01-19  Bruno Haible  <bruno@clisp.org>
16352         Fix warnings for functions introduced in Android API level 9.
16353         * m4/pipe2.m4 (gl_FUNC_PIPE2): Test for pipe2 using
16354         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16355         * m4/fdatasync.m4 (gl_FUNC_FDATASYNC): Update comments.
16357 2023-01-19  Bruno Haible  <bruno@clisp.org>
16359         Fix warnings for functions introduced in Android API level 8.
16360         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Test for ttyname_r using
16361         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
16363 2023-01-19  Bruno Haible  <bruno@clisp.org>
16365         fts: Document this module.
16366         * doc/glibc-headers/fts.texi: Mention the 'fts' module.
16367         * doc/glibc-functions/fts_children.texi: Likewise.
16368         * doc/glibc-functions/fts_close.texi: Likewise.
16369         * doc/glibc-functions/fts_open.texi: Likewise.
16370         * doc/glibc-functions/fts_read.texi: Likewise.
16371         * doc/glibc-functions/fts_set.texi: Likewise.
16373 2023-01-18  Bruno Haible  <bruno@clisp.org>
16375         getcwd: Speed up on Linux. Add support for Android.
16376         * lib/getcwd.c (__getcwd_generic): On Linux, use a specific readlink
16377         call to speed up the operation.
16379 2023-01-17  Paul Eggert  <eggert@cs.ucla.edu>
16381         qcopy-acl: port to Fedora 9
16382         It has libattr-2.4.41, which is too old for our code.
16383         Problem reported by Po Lu <https://bugs.gnu.org/60843>.
16384         * m4/xattr.m4 (gl_FUNC_XATTR): Check that we can use
16385         ATTR_ACTION_PERMISSIONS, too.  Refactor so that there’s a single
16386         test program that we compile and link, rather than doing the tests
16387         in dribs and drabs.
16389 2023-01-17  Bruno Haible  <bruno@clisp.org>
16391         execute tests: Avoid test failure with GNU make 4.4.
16392         Reported by Eric Blake in
16393         <https://lists.gnu.org/archive/html/bug-gnulib/2023-01/msg00157.html>.
16394         * tests/test-execute-main.c (main): Reset the SIGPIPE handler to
16395         default on all platforms.
16397 2023-01-17  Bruno Haible  <bruno@clisp.org>
16399         fflush: Tweak last commit.
16400         * lib/stdio-impl.h (fp_): Make the last change work also with newer
16401         Android NDKs and _FILE_OFFSET_BITS=64.
16403 2023-01-17  Ondrej Valousek  <ondrej.valousek.xm@renesas.com>
16405         qset-acl, acl: Improve comments.
16406         * lib/qset-acl.c (qset_acl): Improve comments.
16407         * lib/set-acl.c (set_acl): Likewise.
16409 2023-01-17  Bruno Haible  <bruno@clisp.org>
16411         fflush: Fix a buffer overrun on 32-bit Android.
16412         * lib/stdio-impl.h (fp_): On Android, change the type of _offset to
16413         'long'.
16414         * lib/fflush.c (update_fpos_cache): On Android, update a 'long', not an
16415         'fpos_t'.
16417 2023-01-17  Bruno Haible  <bruno@clisp.org>
16419         execute tests: Avoid test failure on Android.
16420         * tests/test-execute-main.c (main): Reset the SIGPIPE handler to
16421         default.
16423 2023-01-17  Bruno Haible  <bruno@clisp.org>
16425         hard-locale: Port to Android ≥ 5.0.
16426         * lib/hard-locale.c: Include <stdlib.h>.
16427         (hard_locale): On Android, consider also MB_CUR_MAX, even if the
16428         locale's name is "C".
16429         * tests/test-hard-locale.c (test_one, main): Assume that on Android,
16430         even the "C" locale is hard.
16432 2023-01-16  Bruno Haible  <bruno@clisp.org>
16434         stddef tests: Fix compilation error (regression 2023-01-15).
16435         * tests/test-stddef.c: Don't include <stdalign.h>.
16437 2023-01-16  Bruno Haible  <bruno@clisp.org>
16439         mbrtowc, mbrtoc32 tests: Avoid test failure on Android ≥ 5.0.
16440         * tests/test-mbrtowc.c (main): On Android 5.0 or newer, when testing
16441         the "C" locale, verify that the encoding is UTF-8.
16442         * tests/test-mbrtoc32.c (main): Likewise.
16443         * doc/posix-functions/setlocale.texi: Mention the Android problems.
16445         mbrtowc, mbrtoc32 tests: Refactor.
16446         * tests/test-mbrtowc.c (main): Straighten convoluted code.
16447         * tests/test-mbrtoc32.c (main): Likewise.
16449 2023-01-16  Paul Eggert  <eggert@cs.ucla.edu>
16451         sigpipe tests: Modernize use of 'head'.
16452         POSIX no longer requires support for ‘head -1’.
16453         * tests/test-sigpipe.sh: Use ‘head -n1’ rather than ‘head -1’.
16454         * tests/test-sigpipe.c (main): Likewise.
16455         * lib/git-merge-changelog.c (main): Update comment accordingly.
16457 2023-01-15  Paul Eggert  <eggert@cs.ucla.edu>
16459         alignasof: new module
16460         This splits off support for the C23 keywords alignas and alignof,
16461         from the now-deprecated stdalign module.  The latter now merely
16462         provides C11 support.
16463         * MODULES.html.sh, NEWS, doc/gnulib.texi:
16464         * doc/posix-headers/stdalign.texi: Document the change.
16465         * lib/stdalign.in.h: Remove most of the definitions (which are now
16466         supplied by the alignasof module), leaving only
16467         __alignas_is_defined and __alignof_is_defined.
16468         * modules/alignasof, modules/alignasof-tests: New files.
16469         * m4/stdalign.m4 (gl_ALIGNASOF): New macro, with
16470         most of the contents of the old gl_STDALIGN_H.
16471         Do not define __alignas_is_defined or __alignof_is_defined.
16472         (gl_STDALIGN_H): Rely on gl_ALIGNASOF for most of the work.
16473         * modules/alignalloc, modules/alignof, modules/argp:
16474         * modules/crypto/md4-buffer, modules/crypto/md5-buffer:
16475         * modules/crypto/sha1-buffer, modules/crypto/sha256-buffer:
16476         * modules/crypto/sha512-buffer, modules/crypto/sm3-buffer:
16477         * modules/fts, modules/rawmemchr, modules/relocatable-prog-wrapper:
16478         * modules/stddef-tests, modules/sys_socket:
16479         Depend on alignasof, not stdalign.
16480         * modules/stdalign: Deprecate.  Depend on alignasof.
16481         * modules/stdalign-tests: Move most contents to the new module
16482         alignasof-tests, and depend on that.
16484 2023-01-15  Bruno Haible  <bruno@clisp.org>
16486         fpending: Fix compilation error with NDK ≥ r14b and Android API < 23.
16487         Report and patch by Po Lu <luangruo@yahoo.com>.
16488         * lib/fpending.c (__fpending) [__ANDROID__]: Use the fp_ macro.
16490 2023-01-14  Paul Eggert  <eggert@cs.ucla.edu>
16492         alignof: port to strict C23
16493         Problem reported by Khem Raj in:
16494         https://lists.gnu.org/r/bug-gnulib/2023-01/msg00111.html
16495         * lib/alignof.h (alignof_slot) [!__cplusplus]: Use C23-style alignof.
16496         * modules/alignof (Depends-on): Add stdalign.
16498         test-framework-sh: work around AIX 7.2 diff bugs
16499         * tests/init.sh (compare_dev_null_): Run diff in the C locale.
16500         AIX 7.2 diff messes up in UTF-8 locales; for example,
16501         ‘printf '\360\220\200\200\n' | diff - /dev/null’ incorrectly
16502         outputs nothing and exits with status 0 when LC_ALL=en_US.UTF-8.
16504 2023-01-14  Bruno Haible  <bruno@clisp.org>
16506         error, verror tests: Fix link error when the package uses libintl.
16507         * modules/error-tests (Makefile.am): Link test-error with $(LIBINTL).
16508         * modules/verror-tests (Makefile.am): Link test-verror with $(LIBINTL).
16510 2023-01-13  Bruno Haible  <bruno@clisp.org>
16512         localename: Fix -Wtautological-pointer-compare warning in a better way.
16513         * lib/localename.c (duplocale, freelocale): Revert last patch.
16514         (_GL_ARG_NONNULL): Define to empty.
16516 2023-01-13  Paul Eggert  <eggert@cs.ucla.edu>
16518         verify: work around xlclang 16.1 compiler bug
16519         Problem reported by Bruno Haible in:
16520         https://lists.gnu.org/r/grep-devel/2023-01/msg00003.html
16521         * lib/verify.h (_GL_HAS_BUILTIN_TRAP, _GL_HAS_BUILTIN_UNREACHABLE):
16522         Define to 0 if compiler advertises itself as clang before version 5.
16523         xlclang 16.1 advertises itself as 4.0.1 and this patch works
16524         around what appears to be a compiler bug when compiling dfa.c in
16525         bleeding-edge grep.
16527         assert-h: suppress xlclang 16.1 false alarms
16528         * m4/assert_h.m4 (gl_ASSERT_H): Pacify older clangs too,
16529         with regard to single-argument static_assert.
16530         Problem found with xlclang 16.1 on AIX 7.2.
16532         assert-h: fix configure comment-out
16533         * m4/assert_h.m4 (gl_ASSERT_H): Also break apart "#undef
16534         static_assert" with /**/.  Problem discovered with xlclang 16.1,
16535         though it does not directly affect xlclang 16.1.
16537         Don’t use alloc_size with xlclang 16.1
16538         * m4/gnulib-common.m4 (_GL_HAS_ATTRIBUTE): Require Clang 5 instead
16539         of 3.5 for this, to pacify xlclang 16.1.0 on AIX 7.2, which
16540         advertises itself as clang 4.0.1, and which otherwise issues
16541         warnings like “./xalloc.h:141:3: warning: 1540-2990 The attribute
16542         "__attribute__((alloc_size(2, 3)))" is not supported.  The
16543         attribute is ignored.” when building bleeding-edge GNU grep.
16545         localename: -Wtautological-pointer-compare
16546         Problem found by xlclang 16.1 on AIX 7.2.
16547         * lib/localename.c (duplocale, freelocale):
16548         Omit unnecessary comparison of non-null args to NULL.
16550 2023-01-13  Bruno Haible  <bruno@clisp.org>
16552         login_tty tests: Be more verbose when the test fails.
16553         * tests/test-login_tty.c (main): When the test fails, write a message
16554         into a file.
16556 2023-01-13  Bruno Haible  <bruno@clisp.org>
16558         qcopy-acl: Make last patch more robust.
16559         * m4/acl.m4 (gl_FUNC_ACL): Define through AC_DEFUN_ONCE.
16560         * modules/qcopy-acl (configure.ac): Require gl_FUNC_ACL.
16562         qcopy-acl: Adjust link dependencies.
16563         * modules/qcopy-acl (Depends-on): Add condition.
16564         (configure.ac): Set QCOPY_ACL_LIB.
16565         (Link): Add $(QCOPY_ACL_LIB). Remove $(LIB_ACL).
16566         * modules/qacl (Link): Add $(LIB_ACL) and $(QCOPY_ACL_LIB).
16567         * modules/acl (Link): Add $(LIB_ACL) and $(QCOPY_ACL_LIB).
16568         * modules/copy-file (Link): Add $(QCOPY_ACL_LIB).
16569         * modules/supersede (Link): Add $(QCOPY_ACL_LIB).
16570         * modules/acl-tests (Makefile.am): Link test-copy-acl with
16571         $(QCOPY_ACL_LIB).
16572         * modules/copy-file-tests (Makefile.am): Link test-copy-file with
16573         $(QCOPY_ACL_LIB).
16574         * modules/supersede-tests (Makefile.am): Link test-supersede with
16575         $(QCOPY_ACL_LIB).
16577 2023-01-13  Bruno Haible  <bruno@clisp.org>
16579         qcopy-acl: Avoid autoconf warning.
16580         * m4/xattr.m4 (gl_FUNC_XATTR): Provide a description in AC_DEFINE.
16581         Also, protect against unsafe use of a configure option value.
16583 2023-01-12  Ondrej Valousek  <ondrej.valousek.xm@renesas.com>
16585         qcopy-acl: Optimize copying of ACLs by directly copying the attributes.
16586         * lib/qcopy-acl.c (is_attr_permissions): New functions.
16587         (qcopy_acl): If USE_XATTR, copy the ACL related attributes directly.
16588         * m4/xattr.m4: New file.
16589         * modules/qcopy-acl (Files): Add it.
16590         (configure.ac): Invoke gl_FUNC_XATTR.
16592 2023-01-12  Bruno Haible  <bruno@clisp.org>
16594         error: Work around an Android problem.
16595         * lib/error.in.h: Renamed from lib/error.h.
16596         (_GL_ATTRIBUTE_SPEC_PRINTF_ERROR): New macro.
16597         (error): Consider HAVE_ERROR and REPLACE_ERROR.
16598         (error_at_line): Consider HAVE_ERROR_AT_LINE and REPLACE_ERROR_AT_LINE.
16599         * m4/error_h.m4: New file, partially based on m4/error.m4.
16600         * m4/error.m4 (gl_ERROR): Remove the test for error_at_line.
16601         * modules/error-h: New file.
16602         * modules/error (Files): Remove lib/error.h.
16603         (Depends-on): Add error-h. Update conditions.
16604         (configure.ac): Require gl_ERROR_H. Update condition.
16605         * doc/glibc-headers/error.texi: Mention the 'error-h' module.
16606         * doc/glibc-functions/error.texi: Mention the Android problem.
16607         * config/srclist.txt: Add comment regarding error.h.
16609 2023-01-12  Bruno Haible  <bruno@clisp.org>
16611         error, verror tests: Add clarification.
16612         * tests/test-error.c (main): Clarify why we don't test error_at_line
16613         with a NULL filename.
16614         * tests/test-verror.c (main): Clarify why we don't test verror_at_line
16615         with a NULL filename.
16617 2023-01-12  Bruno Haible  <bruno@clisp.org>
16619         verror: Add tests.
16620         * tests/test-verror.sh: New file, based on tests/test-error.sh.
16621         * tests/test-verror.c: New file, based on tests/test-error.c.
16622         * modules/verror-tests: New file.
16624 2023-01-12  Bruno Haible  <bruno@clisp.org>
16626         error: Add tests.
16627         * tests/test-error.sh: New file.
16628         * tests/test-error.c: New file.
16629         * modules/error-tests: New file.
16631 2023-01-11  Bruno Haible  <bruno@clisp.org>
16633         xstrtol-error: Improve comments.
16634         * lib/xstrtol-error.h (xstrtol_fatal): Add parameter names to
16635         declaration.
16637 2023-01-11  Bruno Haible  <bruno@clisp.org>
16639         spawn-pipe tests: Fix test failure on Android.
16640         * tests/test-spawn-pipe-child.c (main): Skip the is_open (STDERR_FILENO)
16641         check on Android.
16643 2023-01-11  Bruno Haible  <bruno@clisp.org>
16645         perror: Fix "perror clobbers strerror's buffer" problem on Android.
16646         * m4/perror.m4 (gl_FUNC_PERROR): Set REPLACE_PERROR to 1 on Android.
16647         * doc/posix-functions/perror.texi: Mention the Android problem.
16649 2023-01-11  Bruno Haible  <bruno@clisp.org>
16651         posix_spawn_file_actions_addfchdir tests: Fix test failure on Android.
16652         * tests/test-posix_spawn-fchdir.c: Include xvasprintf.h.
16653         (test): On Android, use "/proc" instead of "/".
16654         (main): Determine the relative location of the 'pwd' program
16655         accordingly.
16656         * modules/posix_spawn_file_actions_addfchdir-tests (Depends-on): Add
16657         xvasprintf.
16659 2023-01-11  Bruno Haible  <bruno@clisp.org>
16661         rename, renameat, renameatu: Fix test failures on Android/Termux.
16662         * tests/test-rename.h (test_rename): On Android, treat an EACCES failure
16663         like EPERM.
16665 2023-01-11  Bruno Haible  <bruno@clisp.org>
16667         link, linkat tests: Fix test failures on Android/Termux.
16668         * tests/test-link.h (test_link): On Android, treat an EACCES failure
16669         like EPERM.
16670         * tests/test-linkat.c (main): When test_link is marked skipped, skip the
16671         rest of the test as well.
16673 2023-01-11  Bruno Haible  <bruno@clisp.org>
16675         link tests: Correct indentation.
16676         * tests/test-link.h (test_link): Correct indentation.
16678 2023-01-11  Bruno Haible  <bruno@clisp.org>
16680         Fix link errors on Android 4.3.
16681         * lib/asyncsafe-spin.c: Don't use the GCC >= 4.1 builtins on Android,
16682         when building with GCC.
16683         * lib/pthread-spin.c: Likewise.
16684         * lib/simple-atomic.c: Likewise.
16686 2023-01-10  Jim Meyering  <meyering@fb.com>
16688         update-copyright: also work with two or more updatable lines in a file
16689         * build-aux/update-copyright: Replace every occurrence of the copyright
16690         line, not just the first one.
16691         * tests/test-update-copyright.sh: Add a test case for this.
16693 2023-01-10  Bruno Haible  <bruno@clisp.org>
16695         immutable: Fix initialization failure on Android.
16696         * lib/immutable.c: Include "pathmax.h".
16697         (do_init_mmap_file): Use $TMPDIR rather than /tmp, if it is safe.
16698         * modules/immutable (Depends-on): Add pathmax.
16700 2023-01-10  Bruno Haible  <bruno@clisp.org>
16702         Fix some test failures on Android ≥ 11.
16703         * tests/test-fclose.c (main): On Android, avoid triggering the
16704         file-descriptor sanitizer (fdsan).
16705         * tests/test-fdopen.c (main): Likewise.
16706         * tests/test-fflush.c (main): Likewise.
16707         * tests/test-fgetc.c (main): Likewise.
16708         * tests/test-fputc.c (main): Likewise.
16709         * tests/test-fread.c (main): Likewise.
16710         * tests/test-fseeko4.c (main): Likewise.
16711         * tests/test-ftello4.c (main): Likewise.
16712         * tests/test-fwrite.c (main): Likewise.
16714 2023-01-10  Bruno Haible  <bruno@clisp.org>
16716         utimens: Fix warning on Android.
16717         * m4/utimens.m4 (gl_UTIMENS): Test for futimesat and futimes using
16718         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16720 2023-01-10  Bruno Haible  <bruno@clisp.org>
16722         secure_getenv: Fix warning on Android.
16723         * m4/secure_getenv.m4 (gl_FUNC_SECURE_GETENV): Test for issetugid using
16724         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
16725         * lib/secure_getenv.c: Fix comment regarding issetugid.
16727 2023-01-10  Bruno Haible  <bruno@clisp.org>
16729         renameat, renameatu: Fix warning on Android.
16730         * m4/renameat.m4 (gl_FUNC_RENAMEAT): Test for renameat2 using
16731         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16733 2023-01-10  Bruno Haible  <bruno@clisp.org>
16735         memset_explicit tests: Fix signature check.
16736         * tests/test-memset_explicit.c: Fix return type in signature check.
16738 2023-01-10  Bruno Haible  <bruno@clisp.org>
16740         math: Fix compilation errors in C++ mode on Android.
16741         * lib/math.in.h: Declare nothing if this file gets included from
16742         /usr/include/c++/v1/math.h too early.
16744 2023-01-10  Bruno Haible  <bruno@clisp.org>
16746         sys_ioctl: Fix compilation error in C++ mode on Android.
16747         * lib/sys_ioctl.in.h (ioctl): Disable _GL_CXXALIASWARN invocation on
16748         non-glibc systems.
16750 2023-01-09  Bruno Haible  <bruno@clisp.org>
16752         threads-h: Improve portability.
16753         * lib/threads.in.h: Use INCLUDE_NEXT_AS_FIRST_DIRECTIVE when possible.
16754         * modules/threads-h (Makefile.am): Substitute
16755         INCLUDE_NEXT_AS_FIRST_DIRECTIVE and NEXT_AS_FIRST_DIRECTIVE_THREADS_H.
16757 2023-01-09  Bruno Haible  <bruno@clisp.org>
16759         threads-h: Fix compilation errors in C++ mode on Android.
16760         * lib/threads.in.h (_GL_ALREADY_INCLUDING_THREADS_H): New macro.
16762 2023-01-09  Bruno Haible  <bruno@clisp.org>
16764         aligned-malloc: Don't disturb the module aligned_alloc.
16765         * modules/aligned-malloc (configure.ac): Test for aligned_alloc in the
16766         same way as module aligned_alloc does.
16768 2023-01-09  Bruno Haible  <bruno@clisp.org>
16770         malloc-h: Improve portability.
16771         * lib/malloc.in.h: Use INCLUDE_NEXT_AS_FIRST_DIRECTIVE when possible.
16772         * modules/malloc-h (Makefile.am): Substitute
16773         INCLUDE_NEXT_AS_FIRST_DIRECTIVE and NEXT_AS_FIRST_DIRECTIVE_MALLOC_H.
16775 2023-01-09  Bruno Haible  <bruno@clisp.org>
16777         reallocarray: Fix compilation error in C++ mode on Android.
16778         * m4/reallocarray.m4 (gl_FUNC_REALLOCARRAY): Use gl_CHECK_FUNCS_ANDROID
16779         instead of AC_CHECK_FUNCS.
16781 2023-01-09  Bruno Haible  <bruno@clisp.org>
16783         getsubopt: Fix compilation error in C++ mode on Android.
16784         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Use gl_CHECK_FUNCS_ANDROID
16785         instead of AC_CHECK_FUNCS_ONCE.
16787 2023-01-09  Bruno Haible  <bruno@clisp.org>
16789         malloc-h: Fix compilation errors in C++ mode on Android.
16790         * lib/malloc.in.h: Don't include <stdlib.h>, except on Solaris and on
16791         HP-UX. Include <stddef.h>. Make _GL_ATTRIBUTE_DEALLOC_FREE work (code
16792         snippet copied from string.in.h and wchar.in.h).
16793         * m4/malloc_h.m4 (gl_MALLOC_H_REQUIRE_DEFAULTS): Invoke
16794         gl_STDLIB_H_REQUIRE_DEFAULTS.
16795         * modules/malloc-h (Depends-on): Add stddef, stdlib.
16796         (Makefile.am): Substitute GNULIB_FREE_POSIX and REPLACE_FREE.
16798 2023-01-09  Bruno Haible  <bruno@clisp.org>
16800         gettime: Fix compilation error in C++ mode on Android.
16801         * m4/gettime.m4 (gl_CHECK_FUNC_TIMESPEC_GET): Also test whether
16802         timespec_get is declared.
16804 2023-01-09  Bruno Haible  <bruno@clisp.org>
16806         malloc-h: Fix compilation error in C++ mode on Android.
16807         * lib/malloc.in.h (_GL_ALREADY_INCLUDING_MALLOC_H): New macro.
16809 2023-01-07  Bruno Haible  <bruno@clisp.org>
16811         timer_time: Rename LIB_TIMER_TIME to TIMER_TIME_LIB.
16812         * m4/timer_time.m4: Rename LIB_TIMER_TIME to TIMER_TIME_LIB.
16813         All uses changed.
16814         * NEWS: Mention the change
16816 2023-01-07  Bruno Haible  <bruno@clisp.org>
16818         setlocale-null: Rename LIB_SETLOCALE_NULL to SETLOCALE_NULL_LIB.
16819         * m4/setlocale_null.m4: Rename LIB_SETLOCALE_NULL to SETLOCALE_NULL_LIB.
16820         All uses changed.
16821         * NEWS: Mention the change
16823 2023-01-07  Bruno Haible  <bruno@clisp.org>
16825         setlocale: Rename LIB_SETLOCALE to SETLOCALE_LIB.
16826         * m4/setlocale.m4: Rename LIB_SETLOCALE to SETLOCALE_LIB.
16827         All uses changed.
16828         * NEWS: Mention the change.
16830 2023-01-07  Bruno Haible  <bruno@clisp.org>
16832         select: Rename LIB_SELECT to SELECT_LIB.
16833         * m4/select.m4: Rename LIB_SELECT to SELECT_LIB.
16834         All uses changed.
16835         * NEWS: Mention the change.
16837 2023-01-07  Bruno Haible  <bruno@clisp.org>
16839         sched_yield: Rename LIB_SCHED_YIELD to SCHED_YIELD_LIB.
16840         * m4/threadlib.m4: Rename LIB_SCHED_YIELD to SCHED_YIELD_LIB.
16841         All uses changed.
16842         * NEWS: Mention the change.
16844 2023-01-07  Bruno Haible  <bruno@clisp.org>
16846         pthread_sigmask: Rename LIB_PTHREAD_SIGMASK to PTHREAD_SIGMASK_LIB.
16847         * m4/pthread_sigmask.m4: Rename LIB_PTHREAD_SIGMASK to
16848         PTHREAD_SIGMASK_LIB.
16849         All uses changed.
16850         * NEWS: Mention the change.
16852 2023-01-07  Bruno Haible  <bruno@clisp.org>
16854         posix_spawn: Rename LIB_POSIX_SPAWN to POSIX_SPAWN_LIB.
16855         * m4/spawn_h.m4: Rename LIB_POSIX_SPAWN to POSIX_SPAWN_LIB.
16856         All uses changed.
16857         * NEWS: Mention the change.
16859 2023-01-07  Bruno Haible  <bruno@clisp.org>
16861         poll: Rename LIB_POLL to POLL_LIB.
16862         * m4/poll.m4: Rename LIB_POLL to POLL_LIB.
16863         All uses changed.
16864         * NEWS: Mention the change.
16866 2023-01-07  Bruno Haible  <bruno@clisp.org>
16868         nanosleep: Rename LIB_NANOSLEEP to NANOSLEEP_LIB.
16869         * m4/nanosleep.m4: Rename LIB_NANOSLEEP to NANOSLEEP_LIB.
16870         All uses changed.
16871         * NEWS: Mention the change.
16873 2023-01-07  Bruno Haible  <bruno@clisp.org>
16875         mbrtowc: Rename LIB_MBRTOWC to MBRTOWC_LIB.
16876         * m4/mbrtowc.m4: Rename LIB_MBRTOWC to MBRTOWC_LIB.
16877         All uses changed.
16878         * NEWS: Mention the change.
16880 2023-01-07  Bruno Haible  <bruno@clisp.org>
16882         hard-locale: Rename LIB_HARD_LOCALE to HARD_LOCALE_LIB.
16883         * modules/hard-locale (configure.ac): Rename LIB_HARD_LOCALE to
16884         HARD_LOCALE_LIB.
16885         All uses changed.
16886         * NEWS: Mention the change.
16888 2023-01-07  Bruno Haible  <bruno@clisp.org>
16890         getrandom: Rename LIB_GETRANDOM to GETRANDOM_LIB.
16891         * m4/getrandom.m4: Rename LIB_GETRANDOM to GETRANDOM_LIB.
16892         All uses changed.
16893         * NEWS: Mention the change.
16895 2023-01-07  Bruno Haible  <bruno@clisp.org>
16897         getlogin, getlogin_r: Rename LIB_GETLOGIN to GETLOGIN_LIB.
16898         * m4/getlogin.m4: Rename LIB_GETLOGIN to GETLOGIN_LIB.
16899         All uses changed.
16900         * NEWS: Mention the change.
16902 2023-01-07  Bruno Haible  <bruno@clisp.org>
16904         gethrxtime: Rename LIB_GETHRXTIME to GETHRXTIME_LIB.
16905         * m4/gethrxtime.m4: Rename LIB_GETHRXTIME to GETHRXTIME_LIB.
16906         All uses changed.
16907         * NEWS: Mention the change.
16909 2023-01-07  Bruno Haible  <bruno@clisp.org>
16911         fdatasync: Rename LIB_FDATASYNC to FDATASYNC_LIB.
16912         * m4/fdatasync.m4: Rename LIB_FDATASYNC to FDATASYNC_LIB.
16913         All uses changed.
16914         * NEWS: Mention the change.
16916 2023-01-07  Bruno Haible  <bruno@clisp.org>
16918         euidaccess: Rename LIB_EACCESS to EUIDACCESS_LIBGEN.
16919         * m4/euidaccess.m4: Rename LIB_EACCESS to EUIDACCESS_LIBGEN.
16920         All uses changed.
16921         * NEWS: Mention the change.
16923 2023-01-07  Bruno Haible  <bruno@clisp.org>
16925         duplocale: Rename LIB_DUPLOCALE to DUPLOCALE_LIB.
16926         * m4/duplocale.m4: Rename LIB_DUPLOCALE to DUPLOCALE_LIB.
16927         All uses changed.
16928         * NEWS: Mention the change.
16930 2023-01-07  Bruno Haible  <bruno@clisp.org>
16932         clock_time: Rename LIB_CLOCK_GETTIME to CLOCK_TIME_LIB.
16933         * m4/clock_time.m4: Rename LIB_CLOCK_GETTIME to CLOCK_TIME_LIB.
16934         All uses changed.
16935         * NEWS: Mention the change.
16937 2023-01-06  Paul Eggert  <eggert@cs.ucla.edu>
16939         file-has-acl: don’t bother setting LIB_HAS_ACL
16940         * m4/acl.m4 (gl_FUNC_ACL, gl_FILE_HAS_ACL): Don’t set LIB_HAS_ACL.
16941         I think only Coreutils and Tar used it, and I’ve updated them.
16943         bootstrap: suppress stray message from --pull
16944         * build-aux/bootstrap: Regenerate.
16945         * top/bootstrap-funclib.sh (autopull): Suggest running autogen.sh
16946         only if it exists (i.e., the package is using autopull.sh/autogen.sh).
16947         Suggest the same name for autogen.sh that is used in the test.
16949 2023-01-05  Bruno Haible  <bruno@clisp.org>
16951         string: Fix compilation errors in C++ mode on Android.
16952         * lib/string.in.h (memrchr, strchrnul, strcasestr): Disable
16953         _GL_CXXALIASWARN invocation on non-glibc systems.
16955 2023-01-05  Bruno Haible  <bruno@clisp.org>
16957         getpass: Fix compilation error on Android.
16958         * m4/getpass.m4 (gl_FUNC_GETPASS): Define NO_INLINE_GETPASS.
16959         * doc/glibc-functions/getpass.texi: Mention the Android problem.
16961 2023-01-05  Bruno Haible  <bruno@clisp.org>
16963         Recognize functions added in future versions of Android.
16964         * m4/gnulib-common.m4 (gl_CHECK_FUNCS_ANDROID): New macro.
16965         * m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Use
16966         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
16967         * m4/freading.m4 (gl_FUNC_FREADING): Likewise.
16968         * m4/fseterr.m4 (gl_FUNC_FSETERR): Likewise.
16969         * m4/fwriting.m4 (gl_FUNC_FWRITING): Likewise.
16970         * m4/getentropy.m4 (gl_FUNC_GETENTROPY): Likewise.
16971         * m4/getlogin_r.m4 (gl_CHECK_FUNCS_ANDROID): Likewise.
16972         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Likewise.
16973         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
16974         * m4/spawn_h.m4 (gl_HAVE_POSIX_SPAWN): Likewise.
16975         * doc/glibc-functions/getentropy.texi: Mark function as existing in
16976         Android 9.0.
16977         * doc/glibc-functions/getrandom.texi: Likewise.
16978         * doc/posix-functions/pthread_attr_getinheritsched.texi: Likewise.
16979         * doc/posix-functions/pthread_attr_setinheritsched.texi: Likewise.
16981 2023-01-05  Bruno Haible  <bruno@clisp.org>
16983         copy-file, supersede: Fix link-time requirements.
16984         * modules/copy-file (Link): Add $(LIB_ACL).
16985         * modules/supersede (Link): Likewise.
16987 2023-01-05  Bruno Haible  <bruno@clisp.org>
16989         More systematic naming of LIB variables.
16990         * m4/acl.m4 (gl_FUNC_ACL, gl_FILE_HAS_ACL): Set FILE_HAS_ACL_LIB to the
16991         same value as LIB_HAS_ACL.
16992         * modules/file-has-acl (Link): Use FILE_HAS_ACL_LIB instead of
16993         LIB_HAS_ACL.
16994         * modules/file-has-acl-tests (Makefile.am): Likewise.
16996 2023-01-04  Bruno Haible  <bruno@clisp.org>
16998         doc: Update regarding Android.
16999         * doc/glibc-functions/getdtablesize.texi: Update Android information.
17000         * doc/glibc-functions/wait3.texi: Likewise.
17001         * doc/pastposix-functions/ftime.texi: Likewise.
17002         * doc/pastposix-functions/index.texi: Likewise.
17003         * doc/pastposix-functions/pthread_attr_getstackaddr.texi: Likewise.
17004         * doc/pastposix-functions/pthread_attr_setstackaddr.texi: Likewise.
17005         * doc/pastposix-functions/wcswcs.texi: Likewise.
17007 2023-01-03  Bruno Haible  <bruno@clisp.org>
17009         ffsl, ffsll: Fix compilation error on Android.
17010         * lib/string.in.h: On Android as well, include <strings.h>.
17011         * m4/ffsl.m4 (gl_FUNC_FFSL): Use a specific link test instead of
17012         AC_CHECK_FUNCS_ONCE.
17013         * m4/ffsll.m4 (gl_FUNC_FFSLL): Likewise.
17014         * doc/glibc-functions/ffsl.texi: Mention Android problems.
17015         * doc/glibc-functions/ffsll.texi: Likewise.
17017         ffs: Document Android problem.
17018         * doc/posix-functions/ffs.texi: Mention Android problem.
17019         * m4/ffs.m4: Update comment.
17021 2023-01-03  Bruno Haible  <bruno@clisp.org>
17023         stdio: Fix error in C++ mode on Android, due to putw.
17024         * lib/stdio.in.h (putw): Don't declare in the C++ namespace if putw is
17025         not declared.
17026         * m4/stdio_h.m4 (gl_STDIO_H): Test whether putw is declared.
17027         (gl_STDIO_H_DEFAULTS): Initialize HAVE_DECL_PUTW.
17028         * modules/stdio (Makefile.am): Substitute HAVE_DECL_PUTW.
17029         * doc/glibc-functions/putw.texi: Update regarding Android.
17031 2023-01-03  Bruno Haible  <bruno@clisp.org>
17033         stdio: Fix error in C++ mode on Android, due to getw.
17034         * lib/stdio.in.h (getw): Don't declare in the C++ namespace if getw is
17035         not declared.
17036         * m4/stdio_h.m4 (gl_STDIO_H): Test whether getw is declared.
17037         (gl_STDIO_H_DEFAULTS): Initialize HAVE_DECL_GETW.
17038         * modules/stdio (Makefile.am): Substitute HAVE_DECL_GETW.
17040 2023-01-02  Bruno Haible  <bruno@clisp.org>
17042         sigsegv: Fix compilation error on Android 4.3.
17043         * lib/sigsegv.in.h: For Android, don't include <ucontext.h> and don't
17044         reference ucontext_t.
17045         * lib/sigsegv.c (SIGSEGV_FAULT_): For Android, use a plain POSIX fault
17046         handler (cf. libsigsegv/src/fault-posix.h).
17048 2023-01-01  Paul Eggert  <eggert@cs.ucla.edu>
17050         dfa: work around Clang 15 bug
17051         Problem reported by Kenton Groombridge in:
17052         https://lists.gnu.org/archive/html/bug-gawk/2022-12/msg00010.html
17053         On x86-64, Clang 15 gets confused by a call (X ? dfaerror :
17054         dfawarn) (Y) and generates the wrong code, presumably because
17055         dfaerror is _Noreturn and dfawarn is not.
17056         * lib/dfa.c (parse_bracket_exp): Reword to have one call for
17057         dfaerror, the other for dfawarn.
17059 2023-01-01  Bruno Haible  <bruno@clisp.org>
17061         doc: Update regarding stable branches.
17062         * doc/gnulib-readme.texi (Stable Branches): Mention new branch
17063         stable-202301. Mention that stable-202201 is no longer updated.
17065 2022-12-31  Paul Eggert  <eggert@cs.ucla.edu>
17067         maint: use UTC when updating copyright date
17068         Problem reported by Simon Josefsson in:
17069         https://lists.gnu.org/r/bug-gnulib/2022-12/msg00125.html
17070         * Makefile (COPYRIGHT_TZ): New macro.
17071         (update-copyright): Use it.
17073 2022-12-28  Paul Eggert  <eggert@cs.ucla.edu>
17075         assert-h: port static_assert to strict C99
17076         * lib/verify.h (_GL_VERIFY): Port MSVC hack back to C99.
17077         Problem found when testing bleeding-edge gzip on IBM XL C for AIX,
17078         V12.1 (5765-J02, 5725-C72), which complained ‘"malloca.c", line
17079         42.56: 1506-041 (E) The invocation of macro _Static_assert
17080         contains fewer arguments than are required by the macro
17081         definition.’  This diagnostic is valid because C99 requires
17082         that if you #define _Static_assert(R, ...) you must call
17083         _Static_assert with at least two arguments.  I found a similar
17084         problem with Sun C 5.9 SunOS_sparc Patch 124867-12 2009/11/22.
17086 2022-12-27  Paul Eggert  <eggert@cs.ucla.edu>
17088         file-has-acl: fix recently-introduced NFSv4 bug
17089         * lib/file-has-acl.c (acl_nfs4_nontrivial): Fix off-by-one
17090         error when rounding WHOLEN up to next multiple of 4.
17091         Pacify GCC 12.2.1 -Wcast-align.
17093         Add --pull, --gen options to build-aux/bootstrap
17094         This supports a single bootstrap script with --pull and --gen
17095         options, as an alternative to separate autogen.sh and autopull.sh
17096         and bootstrap-funclib.sh auxiliary files.
17097         * top/bootstrap: With --version, also output library version.
17098         Support update of package that has only the bootstrap script,
17099         and not the other three files.
17101         Support packages with just 'bootstrap'
17102         * top/bootstrap: With --version, also output library version.
17103         Support update of package that has only the bootstrap script,
17104         and not the other three files.
17106         * top/bootstrap-funclib.sh (scriptlibversion): Rename
17107         from scriptversion.  All uses changed.  This way we
17108         can distinguish script from script library versions.
17109         (upgrade_bootstrap): If the package currently has only
17110         the bootstrap script, just update that.
17112         Bootstrap with functions, not scripts
17113         * top/bootstrap: Use autopull and autogen functions, not
17114         shell scripts.  This lets build-aux/bootstrap become a
17115         standalone script.  It does not change the behavior of
17116         top/bootstrap, except for minor rewording of disagnostics.
17118         Make autopull a shell function too
17119         This does not change behavior.  It is helpful for future changes.
17120         * top/autopull.sh: Call autopull to do the actual work.
17121         (usage, download_po_files, update_po_files):
17122         Move to top/bootstrap-funclib.sh.
17123         * top/bootstrap-funclib.sh (autopull_usage): Rename from ‘usage’.
17124         (autopull): New function, containing the top level of the
17125         old top/autopull.sh.
17127         Make autogen a shell function too
17128         This does not change behavior.  It is helpful for future changes.
17129         * top/autogen.sh: Call autogen to do the actual work.
17130         (usage, version_controlled_file, gitignore_entries, insert_if_absent):
17131         (insert_vc_ignore, symlink_to_dir): Move to top/bootstrap-funclib.sh.
17132         * top/bootstrap-funclib.sh (autogen_usage): Rename from ‘usage’.
17133         (autogen): New function, containing the top level of the
17134         old top/autogen.sh.
17136 2022-12-27  Bruno Haible  <bruno@clisp.org>
17138         Fix compilation errors in C++ mode on Solaris 11 OpenIndiana.
17139         * m4/gnulib-common.m4 (gl_COMMON_BODY): In _GL_ATTRIBUTE_DEALLOC_FREE,
17140         with GNU C++, cast the 'free' function.
17141         * lib/string.in.h (_GL_ATTRIBUTE_DEALLOC_FREE): With GNU C++, cast the
17142         'free' function.
17143         * lib/wchar.in.h (_GL_ATTRIBUTE_DEALLOC_FREE): Likewise.
17145 2022-12-27  Bruno Haible  <bruno@clisp.org>
17147         stdnoreturn: Mark as deprecated, not obsolete. (Regression 2022-12-24.)
17148         * modules/stdnoreturn (Status): Remove.
17149         (Notice): Say that it is deprecated, not obsolete.
17150         * doc/noreturn.texi: Fix a typo.
17152 2022-12-26  Paul Eggert  <eggert@cs.ucla.edu>
17154         stdbool-c99: fix typo
17155         Reported against Autoconf by Todd C. Miller in:
17156         https://lists.gnu.org/r/autoconf/2022-12/msg00001.html
17157         * m4/stdbool.m4 (AC_CHECK_HEADER_STDBOOL): Sync from Autoconf master.
17159 2022-12-26  Bruno Haible  <bruno@clisp.org>
17161         ctime: Mark as deprecated, not obsolete. (Regression 2022-12-21.)
17162         * modules/ctime (Status): Remove.
17163         (Notice): Say that it is deprecated, not obsolete.
17165 2022-12-25  Paul Eggert  <eggert@cs.ucla.edu>
17167         largefile: sync from Autoconf master
17168         * m4/largefile.m4 (gl_SET_LARGEFILE_SOURCE): Test whether
17169         AC_SYS_YEAR2038 is defined when this macro is defined, not when it
17170         is used, as we now define AC_SYS_YEAR2038 later.
17171         (_AC_SYS_LARGEFILE_MACRO_VALUE): Remove.
17172         (_AC_SYS_YEAR2038_TEST_CODE, _AC_SYS_YEAR2038_OPTIONS)
17173         (_AC_SYS_YEAR2038_PROBE, _AC_SYS_YEAR2038_ENABLE)
17174         (_AC_SYS_YEAR2038_OPT_IN, AC_SYS_YEAR2038)
17175         (_AC_SYS_LARGEFILE_TEST_CODE, _AC_SYS_LARGEFILE_OPTIONS)
17176         (_AC_SYS_LARGEFILE_PROBE, _AC_SYS_LARGEFILE_ENABLE): New macros.
17177         (AC_SYS_LARGEFILE): Use them.
17178         * m4/year2038.m4: Remove.  All mentions removed.
17179         * modules/largefile, modules/year2038 (configure.ac-early):
17180         Do not require gl_YEAR2038_EARLY.
17181         * modules/year2038 (Depends-on): Depend on largefile.
17182         (configure.ac): Require AC_SYS_YEAR2038, not gl_YEAR2038.
17184 2022-12-24  Paul Eggert  <eggert@cs.ucla.edu>
17186         extensions: enable some C23 Annex F functions
17187         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS):
17188         Also define __STDC_WANT_IEC_60559_EXT__, for C23 Annex F
17189         functions like totalorder.  This syncs from Autoconf master.
17191         stdnoreturn: deprecate
17192         C23 says <stdnoreturn.h> is obsolescent, so deprecate the
17193         stdnoreturn module.  I don't think it was being used anyway
17194         as it had too many problems.
17195         * modules/stdnoreturn: Mark as obsolete.
17197 2022-12-23  Paul Eggert  <eggert@cs.ucla.edu>
17199         file-has-acl: improve recent NFSv4 support
17200         This fixes a link failure with emacsclient on GNU/Linux.  This
17201         program wants file_has_acl but none of the other ACL primitives,
17202         so it doesn’t link acl-internal.o; this way it doesn’t need to
17203         link with -lacl.  While I was at it I reviewed the recent changes,
17204         fixed some unlikely overflow bugs, and adjusted to GNU style.
17205         * doc/acl-nfsv4.txt: Remove.  Its contents are now in a
17206         comment in lib/file-has-acl.c.
17207         * lib/acl-internal.c, lib/acl-internal.h: Move recent changes
17208         relating to acl_nfs4_nontrivial to lib/file-has-acl.c, so that
17209         there is no trouble linking programs that need only file_has_acl.
17210         * lib/file-has-acl.c (acl_nfs4_nontrivial): Move here from
17211         lib/acl-internal.c, so that we needn't link -lacl in
17212         programs that want only file_has_acl, such as emacsclient.
17213         Do not assume a char buffer is aligned for uint32_t.
17214         Check more carefully for buffer read overrun.
17215         Allow up to 6 ACEs, since other code does; but check
17216         that they’re distinct.  Avoid integer overflow.
17217         Use memcmp rather than strncmp to compare memory blocks.
17218         (file_has_acl): Preserve initial errno instead of setting to 0.
17219         Allocate a bit more room for trivial ACL buffer.
17220         Use EINVAL for botchedk NFSv4 ACLs (which shouldn’t happen).
17222 2022-12-22  Paul Eggert  <eggert@cs.ucla.edu>
17224         posix_spawnp-tests: fix filename typo
17225         Problem reported for GNU m4 by Mitchell Dorrell in:
17226         https://lists.gnu.org/r/bug-m4/2022-12/msg00000.html
17227         * tests/test-posix_spawnp-script.c (DATA_FILENAME):
17228         Fix typo in file name that caused race with
17229         test-posix_spawn-script.c.
17231 2022-12-22  Ondrej Valousek  <ondrej.valousek.xm@renesas.com>
17233         file-has-acl: Basic support for checking NFSv4 ACLs in Linux.
17234         * lib/acl-internal.h (acl_nfs4_nontrivial): New declaration.
17235         * lib/acl-internal.c (acl_nfs4_nontrivial): New function.
17236         * lib/file-has-acl.c: Include <arpa/inet.h>.
17237         (XATTR_NAME_NFSV4_ACL, TRIVIAL_NFS4_ACL_MAX_LENGTH): New macros.
17238         (file_has_acl): Test for NFSv4 ACLs.
17239         * doc/acl-nfsv4.txt: New file.
17241 2022-12-21  Paul Eggert  <eggert@cs.ucla.edu>
17243         Port __has_c_attribute to strict C23
17244         * m4/gnulib-common.m4 (_GL_HAS_C_ATTRIBUTE): Remove, as C23 says
17245         behavior is undefined if __has_c_attribute appears anywhere other
17246         than at the top level of an #if or #ifdef.  All uses replaced by
17247         wordier invocations of __has_c_attribute.
17249         asctime, ctime: deprecate
17250         C23 deprecates asctime and ctime, so deprecate them in Gnulib too.
17251         * NEWS, doc/posix-functions/asctime.texi:
17252         * doc/posix-functions/ctime.texi: Mention this.
17253         * lib/time.in.h (ctime): Deprecate any ctime replacement.
17254         * modules/ctime: Now obsolete.
17256 2022-12-17  Paul Eggert  <eggert@cs.ucla.edu>
17258         memset_explicit: port to older MS-Windows
17259         * lib/memset_explicit.c (memset_explicit):
17260         Remove special case for C==0 and MS-Windows.  The code isn’t
17261         needed for correctness and it’s more trouble than it’s worth as it
17262         prevents this module from being used with GNU Emacs, which wants
17263         to port to MS-Windows versions so old that they lack
17264         SecureZeroMemory.
17266 2022-12-09  Bruno Haible  <bruno@clisp.org>
17268         Update users.txt.
17269         * users.txt: Add lbzip2.
17271 2022-12-09  Paul Eggert  <eggert@cs.ucla.edu>
17273         fts: make debug version compilable again
17274         This fixes things in what I hope is a better way than the
17275         fd-only approach proposed by Kamil Dudka here:
17276         https://lists.gnu.org/archive/html/bug-gnulib/2018-03/msg00079.html
17277         https://lists.gnu.org/archive/html/bug-gnulib/2018-03/msg00080.html
17278         * lib/fts.c (GNULIB_FTS_DEBUG): Rename from FTS_DEBUG,
17279         to avoid collision with coreutils symbol.
17280         Do not include <stdint.h> (not needed, since we include <stdint.h>)
17281         or "getcwdat.h" (no longer exists).
17282         (fd_ring_check, fd_ring_print): Add forward decls.
17283         (struct devino): New type.
17284         (PRINT_DEVINO): New macro.
17285         (getdevino): New static function.
17286         (fd_ring_print): Do nothing if not debugging.
17287         (fd_ring_print, fd_ring_check): Use getdevino instead of getcwdat.
17288         The output isn’t as good, but at least it compiles and runs.
17290 2022-12-07  Paul Eggert  <eggert@cs.ucla.edu>
17292         verify: update __STDC_VERSION__ as per C23
17293         This shouldn’t affect anything; it’s merely a refactoring.
17294         * lib/verify.h (_GL_HAVE__STATIC_ASSERT1): Require
17295         __STDC_VERSION__ to be at least 202311, instead of at least
17296         202000.  The latter number was put in in 2019 because we didn’t
17297         yet know C23’s __STDC_VERSION__ value.
17299 2022-12-06  Paul Eggert  <eggert@cs.ucla.edu>
17301         fts: fix race + mishandling of fstatat failure
17302         I hope this fixes a Luke Dashjr coreutils bug report about ext4
17303         ramdisks; see “9.1: du Aborted (corrupt filesystem)”
17304         <https://debbugs.gnu.org/59821>.
17305         * lib/fts.c (fts_build): Fix two bugs.  First, fts_stat was being
17306         called without checking its return value, causing a later abort.
17307         Second, there was a race between opening a directory and statting
17308         it, fixed by using fstat on the file descriptor rather than
17309         fstatat on the directory name.
17311         fts: omit goto break_without_closedir
17312         * lib/fts.c (fts_build): Refactor to omit goto.
17314         fts: clarify ISSET
17315         * lib/fts.c (ISSET): Refactor to clarify boolean usage.
17317 2022-12-05  Bruno Haible  <bruno@clisp.org>
17319         argp: Correct documentation.
17320         Reported by José E. Marchesi <jemarch@gnu.org>.
17321         * doc/glibc-functions/argp_*.texi: Mention the 'argp' module.
17323 2022-12-02  Pádraig Brady  <P@draigBrady.com>
17325         doc: poll: document poll of special files not supported on macOS
17326         * doc/posix-functions/poll.texi: Reinstate (updated) macOS info,
17327         removed in recent cleanup re removal of support for Mac OS X <= 10.4.
17328         * m4/poll.m4: Update macOS to latest tested version.
17330 2022-11-29  Pádraig Brady  <P@draigBrady.com>
17332         add new ronna and quetta SI prefixes
17333         As voted for in Nov 2022 by the BIPM:
17334         https://www.bipm.org/en/cgpm-2022/resolution-3
17336         * lib/human.c: Add Ronna (10^27), and Quetta (10^30) to the prefix list.
17337         * lib/xstrtol.c (__xstrtol): Likewise.
17339 2022-11-29  Bruno Haible  <bruno@clisp.org>
17341         Update users.txt.
17342         * users.txt: Add 4ti2, ale, amanda, binfmt-support, cgminer, collectd,
17343         complexity, dc3dd, dico, enchant-2, fuse-overlayfs, gsequencer, idutils,
17344         libu2f-host, licenseutils, mmv, pacemaker, trader, ttfautohint.
17346 2022-11-27  Paul Eggert  <eggert@cs.ucla.edu>
17348         explicit_bzero: implement via memset_explicit
17349         * lib/explicit_bzero.c (explicit_bzero):
17350         Simplify by just calling memset_explicit.
17351         * m4/explicit_bzero.m4 (gl_PREREQ_EXPLICIT_BZERO): Remove.
17352         All uses removed.
17353         * modules/explicit_bzero (Depends-on): Add memset_explicit.
17355         explicit_bzero: memset_explicit is standard
17356         * doc/glibc-functions/explicit_bzero.texi:
17357         Say that memset_explicit is preferred in new code.
17359         read-file: use memset_explicit
17360         * lib/read-file.c (fread_file, read_file):
17361         Use memset_explicit instead of explicit_bzero.
17362         * modules/read-file (Depends-on): Depend on memset_explicit
17363         instead of on explicit_bzero.
17365         memset_explicit: new module
17366         * doc/posix-functions/memset_explicit.texi, lib/memset_explicit.c:
17367         * m4/memset_explicit.m4, modules/memset_explicit:
17368         * modules/memset_explicit-tests, tests/test-memset_explicit.c:
17369         New files.
17370         * lib/string.in.h (memset_explict): New decl.
17371         * m4/string_h.m4 (gl_STRING_H, gl_STRING_H_REQUIRE_DEFAULTS)
17372         (gl_STRING_H_DEFAULTS):
17373         * modules/string (string.h):
17374         Support memset_explicit.
17376         explicit_bzero: add poison
17377         * m4/string_h.m4 (gl_STRING_H): Poison explicit_bzero.
17378         This was inadvertently omitted when explicit_bzero was added.
17380 2022-11-27  Arsen Arsenović  <arsen@aarsen.me>
17382         bootstrap: Fix --help output.
17383         * build-aux/bootstrap (usage): Regenerate.
17385 2022-11-27  Paul Eggert  <eggert@cs.ucla.edu>
17387         explicit_bzero: work with gcc -std=c99
17388         * lib/explicit_bzero.c (explicit_bzero) [__GNUC__ && !__clang__]:
17389         Use __asm__ instead of asm.
17391 2022-11-26  Paul Eggert  <eggert@cs.ucla.edu>
17393         Prefer "kill -INT" to killing with a number
17394         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK):
17395         * tests/test-login_tty.c (main):
17396         * tests/test-pthread_sigmask1.c (main):
17397         * tests/test-sigprocmask.c (main):
17398         Prefer "kill -INT" to "kill -N" where N is SIGINT’s value.
17399         Don’t assume pid_t fits in int.
17401 2022-11-25  Bruno Haible  <bruno@clisp.org>
17403         In 'trap' commands, prefer symbolic to numeric signal names.
17404         Reported by Mike Fulton <fultonm@ca.ibm.com> in
17405         <https://lists.gnu.org/archive/html/bug-gnulib/2022-11/msg00130.html>.
17406         * gnulib-tool: Use symbolic signal names.
17407         * posix-modules: Likewise.
17408         * MODULES.html.sh: Likewise.
17409         * build-aux/bootstrap (prepare_GNULIB_SRCDIR): Likewise.
17410         * build-aux/csharpcomp.sh.in: Likewise.
17411         * build-aux/gnu-web-doc-update: Likewise.
17412         * top/autogen.sh: Likewise.
17413         * top/bootstrap-funclib.sh: Likewise.
17414         * top/gitsub.sh: Likewise.
17415         * lib/t-idcache: Likewise.
17416         * tests/havelib/rpath-1: Likewise.
17417         * tests/havelib/rpath-2_a: Likewise.
17418         * tests/havelib/rpath-2_b: Likewise.
17419         * tests/havelib/rpath-3_a: Likewise.
17420         * tests/havelib/rpath-3_b: Likewise.
17421         * tests/init.sh: Likewise.
17422         * tests/test-binary-io.sh: Likewise.
17423         * tests/test-c-stack.sh: Likewise.
17424         * tests/test-c-stack2.sh: Likewise.
17425         * tests/test-dprintf-posix.sh: Likewise.
17426         * tests/test-fpending.sh: Likewise.
17427         * tests/test-fprintf-posix.sh: Likewise.
17428         * tests/test-lseek.sh: Likewise.
17429         * tests/test-printf-posix.sh: Likewise.
17430         * tests/test-select-in.sh: Likewise.
17431         * tests/test-select-out.sh: Likewise.
17432         * tests/test-sigpipe.sh: Likewise.
17433         * tests/test-tsearch.sh: Likewise.
17434         * tests/test-update-copyright.sh: Likewise.
17435         * tests/test-vdprintf-posix.sh: Likewise.
17436         * tests/test-vfprintf-posix.sh: Likewise.
17437         * tests/test-vprintf-posix.sh: Likewise.
17438         * tests/test-xprintf-posix.sh: Likewise.
17439         * tests/uniwidth/test-uc_width2.sh: Likewise.
17441 2022-11-20  Bruno Haible  <bruno@clisp.org>
17443         posix_spawn-internal: Avoid warning on macOS.
17444         Suggested by Minsoo Choo in
17445         <https://lists.gnu.org/archive/html/bug-gnulib/2022-11/msg00114.html>.
17446         * lib/spawni.c: Ignore -Wdeprecated-declarations warnings.
17448 2022-11-20  Bruno Haible  <bruno@clisp.org>
17450         posix_spawn tests: Fix compilation error (regression 2022-09-14).
17451         * modules/posix_spawn-tests (Makefile.am): Augment DEFS, to define
17452         EXEEXT.
17454 2022-11-14  Paul Eggert  <eggert@cs.ucla.edu>
17456         parse-datetime: improve doc formatting, timeliness
17457         * doc/parse-datetime.texi: Use @samp and @code in menus
17458         for consistenty with how the Coreutils manual will do
17459         this sort of thing.  Update examples to this year.
17461 2022-11-13  Simon Josefsson  <simon@josefsson.org>
17463         vc-list-files-tests: Avoid OpenPGP private key operations.
17464         * tests/test-vc-list-files-git.sh (GIT_CONFIG_GLOBAL): Set it to
17465         /dev/null.
17467 2022-11-03  Bruno Haible  <bruno@clisp.org>
17469         dynarray: Rename to glibc-internal/dynarray.
17470         * modules/glibc-internal/dynarray: Renamed from modules/dynarray.
17471         * modules/glibc-internal/dynarray-tests: Renamed from
17472         modules/dynarray-tests.
17473         * modules/regex (Depends-on): Update.
17474         * NEWS: Mention this change and the previous one.
17476 2022-11-03  Bruno Haible  <bruno@clisp.org>
17478         scratch_buffer: Rename to glibc-internal/scratch_buffer.
17479         * modules/glibc-internal/scratch_buffer: Renamed from
17480         modules/scratch_buffer.
17481         * modules/glibc-internal/scratch_buffer-tests: Renamed from
17482         modules/scratch_buffer-tests.
17483         * modules/canonicalize (Depends-on): Update.
17484         * modules/canonicalize-lgpl (Depends-on): Likewise.
17485         * modules/glob (Depends-on): Likewise.
17487 2022-11-02  Bruno Haible  <bruno@clisp.org>
17489         scratch_buffer: Document last change.
17490         * NEWS: Mention last change.
17492 2022-11-02  Paul Eggert  <eggert@cs.ucla.edu>
17494         scratch_buffer: adjust to glibc changes
17495         Problem reported by Karl Berry in:
17496         https://lists.gnu.org/r/bug-gnulib/2022-11/msg00004.html
17497         * build-aux/depcomp, doc/make-stds.texi, lib/malloc/scratch_buffer.h:
17498         Autoupdate.
17499         * build-aux/install-reloc (func_create_wrapper):
17500         Omit removed file scratch_buffer_dupfree.c.
17501         * config/srclist.txt: Remove lib/malloc/scratch_buffer_dupfree.c
17502         * lib/canonicalize-lgpl.c: Merge changes from glibc through its
17503         commit ef0700004bf0dccf493a5e8e21f71d9e7972ea9f dated 2022-07-05
17504         11:04:45 +0200.
17505         (__strdup) [!_LIBC]: New macro.
17506         (struct realpath_bufs): New type.
17507         (realpath_stk): Use it as the extra argument.  All uses changed.
17508         No longer any need for noinline or GCC_BOGUS_WRETURN_LOCAL_ADDR.
17509         * lib/canonicalize.c (struct realpath_bufs)
17510         (canonicalize_filename_mode_stk): Likewise.
17511         * lib/malloc/scratch_buffer_dupfree.c:
17512         Remove, since it was removed in glibc.
17513         * lib/scratch_buffer.h (scratch_buffer_dupfree) [0]:
17514         (__libc_scratch_buffer_dupfree): Remove decls.
17515         * modules/relocatable-prog-wrapper (Files):
17516         * modules/scratch_buffer (Files, lib_SOURCES):
17517         Remove lib/malloc/scratch_buffer_dupfree.c.
17519 2022-11-01  Bruno Haible  <bruno@clisp.org>
17521         relocatable-script: Relax license.
17522         * modules/relocatable-script (License): Change to GPLv2+.
17523         * build-aux/relocatable.sh.in: Change copyright header to GPLv2+.
17525 2022-10-31  Simon Josefsson  <simon@josefsson.org>
17527         maintainer-makefile: Fix Apple Xcode 'make syntax-check'.
17528         * top/maint.mk (sc_indent): Don't use non-GNU indent.
17530 2022-10-30  Paul Eggert  <eggert@cs.ucla.edu>
17532         thread: pacify gcc -Wbad-function-cast
17533         * lib/glthread/thread.h (gl_thread_self_pointer): With POSIX
17534         threads, cast the call to gl_thread_t before casting to void *.
17536         test-getlogin: pacify gcc -Wshadow
17537         * tests/test-getlogin.h (test_getlogin_result): Rename local.
17539 2022-10-25  Simon Josefsson  <simon@josefsson.org>
17541         gendocs: Output timestamp in English.
17542         * build-aux/gendocs.sh (SETLANG): Add LC_TIME= for "date".
17544 2022-10-23  Bruno Haible  <bruno@clisp.org>
17546         assert-h: Make static_assert work on Solaris 11.4.
17547         * m4/assert_h.m4 (gl_ASSERT_H): After including <assert.h>, on Solaris,
17548         redefine static_assert.
17550 2022-10-16  Bruno Haible  <bruno@clisp.org>
17552         getdelim: Work around buggy implementation on macOS 10.13.
17553         * doc/posix-functions/getdelim.texi: Mention the macOS bug.
17554         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Let the "checking for working
17555         getdelim function" test answer 'no' on macOS.
17557 2022-10-15  Bruno Haible  <bruno@clisp.org>
17559         Update to Unicode 15.0.0.
17561         * lib/gen-uni-tables.c (is_property_default_ignorable_code_point):
17562         Exclude 0x13439..0x1343F.
17563         (get_lbp): Update such that unilbrk/lbrkprop.txt comes out as expected.
17565         * All generated files under lib/uni* and tests/uni*: Regenerate.
17566         * tests/uniname/NameAliases.txt: Update.
17567         * tests/uniname/UnicodeData.txt: Update.
17568         * tests/uninorm/NormalizationTest.txt: Update.
17569         * tests/unigbrk/GraphemeBreakTest.txt: Update.
17570         * tests/uniwbrk/WordBreakTest.txt: Update.
17572         * tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
17573         0x0ECE, 0x10EFD..0x10EFF, 0x11241, 0x11F00..0x11F01, 0x11F36..0x11F3A,
17574         0x11F40, 0x11F42, 0x13439..0x13440, 0x13447..0x13455, 0x1E08F,
17575         0x1E4EC..0x1E4EF.
17577         * All the affected modules: Bump required libunistring version.
17579 2022-10-15  Bruno Haible  <bruno@clisp.org>
17581         gen-uni-tables: Temporarily revert last change.
17582         * lib/gen-uni-tables.c: Include <stdbool.h>, unless the C compiler
17583         advertises compliance to ISO C 23.
17585 2022-10-12  Paul Eggert  <eggert@cs.ucla.edu>
17587         doc: improve intprops doc
17588         * doc/intprops.texi: Tighten up wording, by saying that macros
17589         "yield 1 if X, 0 otherwise" rather than the weaker "yield 1 if X".
17590         Say "yield" rather than "return" since the macros are not
17591         functions.  Say "1" and "0" rather than "true" and "false" since
17592         the macros yield int.  Say that stdckdint.h is the standard
17593         alternative to the _WRAPV macros.  Mention another source of
17594         problems with the _OVERFLOW macros.
17596 2022-10-10  Paul Eggert  <eggert@cs.ucla.edu>
17598         tests: prefer stdckdint to intprops
17599         * modules/chown-tests, modules/fchownat-tests:
17600         * modules/fdutimensat-tests, modules/futimens-tests:
17601         * modules/lchown-tests, modules/stat-time-tests:
17602         * modules/utime-tests, modules/utimens-tests:
17603         * modules/utimensat-tests:
17604         (Depends on): Depend on stdckint, not intprops.
17605         * tests/nap.h: Include stdckdint.h, not intprops.h.
17606         All macro uses changed.
17608         stat-time: prefer stdckdint to intprops
17609         * lib/stat-time.h: Include stdckdint.h instead of intprops.h.
17610         (stat_time_normalize): Use ckd_add instead of INT_ADD_WRAPV.
17611         * modules/stat-time (Depends-on): Depend on stdckdint, not intprops.
17613         xalloc: remove stray includes + dependencies
17614         These used to be needed, but are not needed now.
17615         * lib/xalloc.h: Do not include stdlib.h.
17616         [GNULIB_XALLOC]: Do not include "intprops.h".
17617         * lib/xmalloc.c: Include stdint.h here instead, for SIZE_MAX.
17618         * modules/xalloc-die, modules/xvasprintf (Depends-on): Remove stdint.
17620 2022-09-30  Paul Eggert  <eggert@cs.ucla.edu>
17622         assert-h: suppress Apple clang 13 false alarms
17623         * m4/assert_h.m4 (gl_ASSERT_H): Suppress bogus warnings from Apple
17624         clang 13 (clang-1300.0.29.30).  Problem privately reported by
17625         Mattias Engdegård for GNU Emacs.
17627 2022-09-26  Daiki Ueno  <ueno@gnu.org>
17629         largefile: fix detection of time_t size on mingw32
17630         * modules/largefile (configure.ac-early): Ensure gl_YEAR2038_EARLY
17631         is invoked before gl_YEAR2038_BODY.
17633 2022-09-25  Paul Eggert  <eggert@cs.ucla.edu>
17635         fts: fix errno handling if dirfd fails
17636         * lib/fts.c (fts_build): Use proper errno if dirfd failed.
17637         Although I don’t know of any platform where dirfd can fail here,
17638         we might as well get it right.
17640 2022-09-25  Bruno Haible  <bruno@clisp.org>
17642         stdbool: Mostly revert last patch.
17643         * m4/c-bool.m4 (gl_C_BOOL): If stdbool.h does not exist, just err out.
17644         * modules/stdbool (Files): Remove m4/stdbool.m4.
17646 2022-09-24  Bruno Haible  <bruno@clisp.org>
17648         stdbool: Don't #include a gnulib-generated stdbool.h from config.h.
17649         * m4/c-bool.m4 (gl_C_BOOL): Check for stdbool.h and for _Bool. If
17650         stdbool.h does not exist, don't #include <stdbool.h> but instead put the
17651         substitute code into config.h.
17652         * modules/stdbool (Files): Add m4/stdbool.m4.
17654 2022-09-24  Bruno Haible  <bruno@clisp.org>
17656         stdalign: Don't #include a gnulib-generated stdalign.h from config.h.
17657         * m4/stdalign.m4 (gl_STDALIGN_H): Check for stdalign.h. If it does not
17658         exist, don't #include <stdalign.h> but instead put the substitute code
17659         into config.h.
17661 2022-09-24  Bruno Haible  <bruno@clisp.org>
17663         stdalign: Fix compilation error with MSVC in C++ mode.
17664         * lib/stdalign.in.h: Treat MSVC in C++ mode like C++11 compliant
17665         compilers.
17666         * tests/test-stdalign-c++.cc: Include some other header files.
17668         stdalign: Avoid namespace pollution.
17669         * lib/stdalign.in.h (_GL_STDALIGN_NEEDS_STDDEF): New macro.
17670         Include <stddef.h> only when needed.
17672 2022-09-23  Simon Josefsson  <simon@josefsson.org>
17674         warnings, manywarnings: Doc fixes.
17675         * doc/manywarnings.texi (manywarnings): Improve usage instruction.
17676         Start list of comments on particular warning flags, based on
17677         comment from Paul Eggert <eggert@cs.ucla.edu>.
17678         * doc/warnings.texi (warnings): Mention that it is often used with manywarnings.
17680 2022-09-21  Paul Eggert  <eggert@cs.ucla.edu>
17682         assert-h: suppress clang false alarms
17683         Suppress scads of annoying warnings from clang version 14.0.5
17684         (Fedora 14.0.5-1.fc36) of the form "warning: '_Static_assert' with
17685         no message is a C2x extension [-Wc2x-extensions]",
17686         by refusing to use single-arg static_assert with older clang.
17687         * m4/assert_h.m4 (gl_ASSERT_H): Turn -Wc2x-extensions from a
17688         warning into an error when testing static_assert, so that the
17689         annoying diagnostic causes the test to fail, which causes assert.h
17690         to be replaced in a way that suppresses the diagnostic during
17691         the real build.
17693 2022-09-20  Bruno Haible  <bruno@clisp.org>
17695         Add another helper script for creating testdirs.
17696         * all-modules: New file, based on posix-modules.
17698 2022-09-20  Bruno Haible  <bruno@clisp.org>
17700         snippet/warn-on-use: Don't cause wrong AC_CHECK_DECL results with clang.
17701         * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Use the clang command-line
17702         option that disables implicit built-in function declarations in clang.
17704 2022-09-19  Bruno Haible  <bruno@clisp.org>
17706         stdbool, stdbool-c99 tests: Fix compilation error with clang/MSVC.
17707         * tests/test-stdbool.c (WORKING_BOOL): Define to 0 on compilers that
17708         define _MSC_VER.
17710 2022-09-18  Paul Eggert  <eggert@cs.ucla.edu>
17712         stdbool: omit ‘#undef true’
17713         This is mostly just simplification.
17714         * m4/c-bool.m4 (gl_C_BOOL): Test all preprocessors when
17715         !HAVE_C_BOOL, not merely __SUNPRO_CC.  Use the slightly
17716         more-elegant ‘!true’ instead of ‘true == 1’; this shouldn’t matter
17717         in practice and if it does matter we want to know about it anyway.
17718         Remove an unnecessary ‘#undef true’ that is simply commented out
17719         by ‘configure’; again, if true is already #defined to be 0 the
17720         system is so messed up we want to know about it anyway.
17722 2022-09-18  Bruno Haible  <bruno@clisp.org>
17724         stdbool: Ensure that 'true' can be used in the preprocessor.
17725         * m4/c-bool.m4 (gl_C_BOOL): With Sun C++, redefine 'true' if it does not
17726         evaluate to 1 in the preprocessor.
17728         stdbool-c99: Ensure that 'true' can be used in the preprocessor.
17729         * lib/stdbool.in.h (true): Redefine if it does not evaluate to 1 in the
17730         preprocessor.
17732 2022-09-18  Bruno Haible  <bruno@clisp.org>
17734         uni{case,ctype,gbrk,str}/base: Fix installed .h file (regr. 2022-09-10).
17735         * lib/unicase.in.h: Do include <stdbool.h>.
17736         * lib/unictype.in.h: Likewise.
17737         * lib/unigbrk.in.h: Likewise.
17738         * lib/unistr.in.h: Likewise.
17740 2022-09-18  Bruno Haible  <bruno@clisp.org>
17742         signal: Fix a C++ compilation error due to sched_yield on OpenBSD 6.0.
17743         * lib/signal.in.h: On OpenBSD, include <sys/param.h>. Don't include
17744         <pthread.h> on OpenBSD ≥ 5.1.
17746 2022-09-17  Paul Eggert  <eggert@cs.ucla.edu>
17748         explicit_bzero-tests: robustify a bit
17749         This is mostly to suppress GCC warnings, though I suppose it
17750         might also improve the test.
17751         * tests/test-explicit_bzero.c: Do not ignore -Wmaybe-uninitialized,
17752         as this warning should no longer be generated given the other changes.
17753         (test_heap): ASSERT that malloc succeeds, to suppress any GCC
17754         warning about relying on malloc succeeding.  Declare addr to be
17755         volatile, so that GCC does not deduce that it is heapbuf in
17756         disguise and diagnose using it after freeing it.
17757         (do_secret_stuff): Declare more things to be volatile, to avoid
17758         optimizations that might disturb the stack and/or mess up the test
17759         in other ways.  Pass last_stackbuf address as a parameter rather
17760         than having last_stackbuf be static, to avoid GCC warning about
17761         assigning address of a local to a static; all callers changed.
17763 2022-09-17  Bruno Haible  <bruno@clisp.org>
17765         wchar: Fix compilation errors in C++ mode on Solaris 11.3.
17766         * lib/wchar.in.h (wcsnlen, wcpcpy, wcpncpy, wcscasecmp, wcsncasecmp,
17767         wcsdup): Force declaration in C++ mode on Solaris (which does not
17768         declare these functions in the global namespace).
17770 2022-09-17  Bruno Haible  <bruno@clisp.org>
17772         swab: Fix compilation error with Sun C++ on Solaris 11.3.
17773         * lib/unistd.in.h (swab): For the C++ declaration, under Solaris 11 but
17774         not under Solaris 10, test also __XOPEN_OR_POSIX.
17776 2022-09-17  Bruno Haible  <bruno@clisp.org>
17778         time C++ tests: Fix link error on CentOS 5.
17779         * modules/time-c++-tests (Makefile.am): Link test-time-c++ against
17780         $(LIB_CLOCK_GETTIME).
17782 2022-09-14  Bruno Haible  <bruno@clisp.org>
17784         time: Fix compilation errors with clang/MSVC.
17785         * m4/time_h.m4 (gl_TIME_H): Test whether asctime_r and ctime_r are
17786         declared.
17787         * lib/time.in.h (asctime_r, ctime_r): Skip _GL_WARN_ON_USE invocations
17788         when these functions are not declared.
17790 2022-09-14  Bruno Haible  <bruno@clisp.org>
17792         verify: Avoid syntax error due to static_assert with clang in C++ mode.
17793         * lib/verify.h (static_assert): Don't define in clang C++ 6 or newer.
17794         * m4/assert_h.m4 (gl_ASSERT_H): If we don't need to define static_assert
17795         with clang in C++ mode, don't include <assert.h>.
17797 2022-09-14  Paul Eggert  <eggert@cs.ucla.edu>
17799         assert-h: work around include confusion
17800         * m4/assert_h.m4 (gl_ASSERT_H): Arrange for <config.h> to not
17801         include <assert.h> if assert is already defined.  This works
17802         around bugs in packages that mistakenly include <config.h> after
17803         including <assert.h> (typically due to double-inclusion of
17804         <config.h>).  Found in coreutils, which I plan to fix.
17806         stdbool: depend on C99
17807         Record that stdbool depends on C99 these days.
17808         This matters only for ancient compilers that need special
17809         flags to support C99 features.
17810         * modules/stdbool (Depends-on): Add c99.
17812 2022-09-14  Bruno Haible  <bruno@clisp.org>
17814         verify: Avoid syntax error due to static_assert with MSVC 14 in C++.
17815         * lib/verify.h (static_assert): For MSVC in C++ mode, use a definition
17816         that supports both the two-arguments and the one-argument syntax.
17818 2022-09-14  Bruno Haible  <bruno@clisp.org>
17820         posix_spawn-* tests: Fix test failure on mingw when libtool is in use.
17821         * tests/test-posix_spawn-inherit0.c (CHILD_PROGRAM_FILENAME): Add the
17822         EXEEXT suffix.
17823         * tests/test-posix_spawn-inherit1.c (CHILD_PROGRAM_FILENAME): Likewise.
17824         * tests/test-posix_spawn-open1.c (CHILD_PROGRAM_FILENAME): Likewise.
17825         * tests/test-posix_spawn-open2.c (CHILD_PROGRAM_FILENAME): Likewise.
17827 2022-09-14  Bruno Haible  <bruno@clisp.org>
17829         verify: Avoid syntax error due to static_assert with MSVC 14.
17830         * lib/verify.h (_Static_assert): Pass only the first argument to
17831         _GL_VERIFY.
17833 2022-09-13  Paul Eggert  <eggert@cs.ucla.edu>
17835         verify: treat GNU C++ 6 like recent C++
17836         * m4/assert_h.m4 (gl_ASSERT_H):
17837         If we check __cpp_static_assert < 201411, also check __GNUG__ < 6,
17838         for consistency with the previous change.
17840 2022-09-13  Bruno Haible  <bruno@clisp.org>
17842         verify: Avoid syntax error due to static_assert with GNU C++ 6.x.
17843         * lib/verify.h (static_assert): Don't define in GNU C++ 6 or newer.
17845 2022-09-13  Paul Eggert  <eggert@cs.ucla.edu>
17847         stdalign: prefer to not include <stdalign.h>
17848         * lib/alignalloc.c, lib/argp-parse.c, lib/fts.c, lib/md4.c, lib/md5.c:
17849         * lib/rawmemchr.c, lib/sha1.c, lib/sha256.c, lib/sha512.c, lib/sm3.c:
17850         * lib/sys_socket.in.h:
17851         In C23, <stdalign.h> is a no-op, so don’t include it.
17853         stdalign: alignas and alignof are C23 keywords
17854         * m4/stdalign.m4 (gl_STDALIGN_H): Check also whether
17855         alignas and alignof are keywords and so don’t need stdalign.h,
17856         and define HAVE_C_ALIGNASOF if so.
17857         If not, arrange for config.h to #define alignas and alignof
17858         by including <stdalign.h>.
17859         * modules/stdalign: No need to include <stdalign.h>.
17860         * tests/test-stdalign.c: Do not include stdalign.h.
17862         assert-h: prefer to ‘verify’
17863         Where it’s easy, prefer ‘static_assert’ to ‘verify’,
17864         as this simplifies the source by removing the need to
17865         include verify.h.  Keep using ‘verify’ if verify.h
17866         is used for other reasons, or if code is shared with glibc.
17867         * lib/alignalloc.c, lib/argmatch.h, lib/c32is-impl.h:
17868         * lib/c32snrtombs.c, lib/c32srtombs.c, lib/exclude.c:
17869         * lib/filevercmp.c, lib/fma.c, lib/i-ring.h, lib/ino-map.c:
17870         * lib/localeinfo.c, lib/malloca.c, lib/mbrtoc32.c, lib/mbrtowc.c:
17871         * lib/mbsinit.c, lib/mbsnrtoc32s.c, lib/mbsrtoc32s.c:
17872         * lib/nanosleep.c, lib/parse-datetime.y, lib/pipe2.c:
17873         * lib/rawmemchr.c, lib/relocwrapper.c, lib/sleep.c:
17874         * lib/stat-w32.c, lib/strerror.c, lib/strtoimax.c:
17875         * lib/utimecmp.c, lib/vasnprintf.c, tests/test-alignof.c:
17876         * tests/test-intprops.c, tests/test-libgmp.c:
17877         * tests/test-limits-h.c, tests/test-locale.c:
17878         * tests/test-pthread.c, tests/test-round2.c:
17879         * tests/test-stdalign.c, tests/test-stddef.c, tests/test-stdio.c:
17880         * tests/test-stdlib.c, tests/test-string.c, tests/test-sys_stat.c:
17881         * tests/test-time.c, tests/test-uchar.c, tests/test-unistd.c:
17882         * tests/test-wchar.c:
17883         Prefer static_assert to verify, and stop including verify.h.
17884         * lib/stat.c: Don’t include verify.h (this include was unnecessary).
17885         * modules/alignalloc, modules/alignof-tests, modules/argmatch:
17886         * modules/c-vasnprintf, modules/c32isalnum, modules/c32isalpha:
17887         * modules/c32isblank, modules/c32iscntrl, modules/c32isdigit:
17888         * modules/c32isgraph, modules/c32islower, modules/c32isprint:
17889         * modules/c32ispunct, modules/c32isspace, modules/c32isupper:
17890         * modules/c32isxdigit, modules/c32snrtombs, modules/c32srtombs:
17891         * modules/exclude, modules/filevercmp, modules/fma, modules/fmaf:
17892         * modules/fmal, modules/fstat, modules/i-ring, modules/ino-map:
17893         * modules/intprops-tests, modules/libgmp-tests:
17894         * modules/limits-h-tests, modules/locale-tests, modules/malloca:
17895         * modules/mbrtoc32, modules/mbrtowc, modules/mbsinit:
17896         * modules/mbsnrtoc32s, modules/mbsrtoc32s, modules/nanosleep:
17897         * modules/parse-datetime, modules/pipe2, modules/pthread-h-tests:
17898         * modules/rawmemchr, modules/relocatable-prog-wrapper:
17899         * modules/round-tests, modules/roundf-tests, modules/sleep:
17900         * modules/stat, modules/stdalign-tests, modules/stdckdint-tests:
17901         * modules/stddef-tests, modules/stdio-tests, modules/stdlib-tests:
17902         * modules/strerror, modules/string-tests, modules/strtoimax:
17903         * modules/strtoumax, modules/sys_stat-tests, modules/time-tests:
17904         * modules/uchar-tests, modules/unistd-tests:
17905         * modules/unistdio/u16-u16-vasnprintf:
17906         * modules/unistdio/u16-vasnprintf:
17907         * modules/unistdio/u32-u32-vasnprintf:
17908         * modules/unistdio/u32-vasnprintf:
17909         * modules/unistdio/u8-u8-vasnprintf:
17910         * modules/unistdio/u8-vasnprintf, modules/unistdio/ulc-vasnprintf:
17911         * modules/utimecmp, modules/vasnprintf, modules/wchar-tests:
17912         Depend on assert-h, not verify.
17914         assert-h: static_assert is a keyword in C23
17915         * m4/assert_h.m4 (gl_ASSERT_H): Also test for static_assert
17916         keyword a la C23, and define HAVE_C_STATIC_ASSERT if so.
17917         If not, arrange for config.h to #define static_assert
17918         by including <assert.h>, and then do "#undef assert"
17919         so that the assert macro still needs an explicit include.
17920         This should be safe even on very old hosts, as assert.h
17921         has been re-includable for decades.
17922         * tests/tests-assert.c: New test.
17923         * modules/assert-h-tests (Files, Makefile.am): Add it.
17925 2022-09-13  Bruno Haible  <bruno@clisp.org>
17927         Prefer talking about alignas than _Alignas.
17928         * m4/gnulib-common.m4 (gl_COMMON_BODY): Don't mention _Alignas in a
17929         comment.
17930         * m4/stdalign.m4 (gl_STDALIGN_H): Likewise.
17932 2022-09-13  Paul Eggert  <eggert@cs.ucla.edu>
17934         stdalign-tests: port to C23
17935         * tests/test-stdalign.c: Do not test __alignas_is_defined,
17936         _Alignof, or _Alignas as they are obsolescent.
17937         Do not use __alignas_is_defined in C23 or later (or C++11 or later),
17938         as it’s removed in C23.
17940 2022-09-12  Bruno Haible  <bruno@clisp.org>
17942         supersede: Avoid a failure when writing to /dev/null in Solaris zones.
17943         * lib/supersede.c (open_supersede): Treat EACCES (seen on Solaris 11.3)
17944         like EINVAL (seen on Illumos).
17946 2022-09-11  Paul Eggert  <eggert@cs.ucla.edu>
17948         maint: avoid unportable ERE \}
17949         * top/maint.mk (sc_copyright_check):
17950         Avoid unportable use of \} in ERE.
17952         verify: improve maint check
17953         * top/maint.mk (sc_prohibit_verify_without_use):
17954         Adjust re to match verify.h.
17956         verify: port better to C23
17957         * lib/verify.h (_GL_VERIFY, static_assert):
17958         If C23, use static_assert keyword; no macro.
17959         This should simplify diagnostics and debugging.
17961 2022-09-10  Bruno Haible  <bruno@clisp.org>
17963         pipe-filter-gi: Fix test failure on native Windows.
17964         * lib/pipe-filter-aux.h (write): Redefine on native Windows.
17966 2022-09-10  Bruno Haible  <bruno@clisp.org>
17968         stdbool C++ tests: Fix compilation error with MSVC14 (regr. from today).
17969         * tests/test-stdbool-c++.cc (s): Choose field names that are not type
17970         names.
17972         Reorganize C++ tests for stdbool and stdbool-c99.
17973         * tests/test-stdbool-c++.cc: Don't include <stdbool.h> if TEST_STDBOOL_H
17974         is not defined. Add a couple of simple tests, from test-stdbool.c.
17975         * tests/test-stdbool-c99-c++.cc: New file.
17976         * modules/stdbool-c99-c++-tests: New file, based on
17977         modules/stdbool-c++-tests.
17978         * modules/stdbool-c99-tests (Depends-on): Add stdbool-c99-c++-tests.
17979         Remove stdbool-c++-tests.
17980         * modules/stdbool-tests (Depends-on): Add stdbool-c++-tests.
17982 2022-09-10  Bruno Haible  <bruno@clisp.org>
17984         stdbool C++ tests: Fix for C++20.
17985         * tests/test-stdbool-c++2.cc: Don't include <cstdbool> in C++20 or
17986         newer.
17988 2022-09-10  Bruno Haible  <bruno@clisp.org>
17990         uchar: Work around error in C++ mode on AIX 7.2 with xlclang.
17991         * lib/uchar.in.h (char16_t, char32_t): On AIX with xlclang++, define
17992         these as macros.
17993         * doc/posix-headers/uchar.texi: Document the AIX + xlclang++ bug.
17995 2022-09-10  Paul Eggert  <eggert@cs.ucla.edu>
17997         Rely on new stdbool behavior
17998         Prefer the C23 style to the C99 style,
17999         since the stdbool module now supports C23.
18000         * lib/acl-internal.h, lib/acl.h, lib/argmatch.c, lib/argmatch.h:
18001         * lib/argp-help.c, lib/argv-iter.h, lib/asyncsafe-spin.c:
18002         * lib/backup-internal.h, lib/backupfile.c, lib/base32.h:
18003         * lib/base64.h, lib/basename-lgpl.c, lib/bitset/base.h:
18004         * lib/c-ctype.h, lib/c-strcasestr.c, lib/canonicalize-lgpl.c:
18005         * lib/canonicalize.c, lib/chdir-long.c, lib/chown.c:
18006         * lib/classpath.h, lib/clean-temp-private.h:
18007         * lib/clean-temp-simple.c, lib/clean-temp-simple.h:
18008         * lib/clean-temp.c, lib/clean-temp.h, lib/cloexec.h:
18009         * lib/close-stream.c, lib/closein.c, lib/closeout.c, lib/closeout.h:
18010         * lib/csharpcomp.h, lib/csharpexec.h, lib/cycle-check.c:
18011         * lib/cycle-check.h, lib/des.h, lib/dfa.h, lib/diffseq.h:
18012         * lib/dirname.h, lib/exclude.c, lib/exclude.h, lib/execute.c:
18013         * lib/execute.h, lib/execvpe.c, lib/fatal-signal.c, lib/fchdir.c:
18014         * lib/file-set.h, lib/filevercmp.c, lib/findprog-in.c:
18015         * lib/findprog.c, lib/findprog.h, lib/fma.c, lib/fnmatch.c:
18016         * lib/fopen.c, lib/freadable.h, lib/freading.h, lib/freopen-safer.c:
18017         * lib/fstrcmp.c, lib/fsusage.h, lib/fts.c, lib/fwritable.h:
18018         * lib/fwriteerror.c, lib/fwriting.h, lib/gen-uni-tables.c:
18019         * lib/getaddrinfo.c, lib/getcwd.c, lib/getloadavg.c:
18020         * lib/getndelim2.c, lib/getpass.c, lib/getrandom.c:
18021         * lib/git-merge-changelog.c, lib/gl_list.h, lib/gl_map.h:
18022         * lib/gl_omap.h, lib/gl_oset.h, lib/gl_set.h, lib/glob.c:
18023         * lib/glthread/cond.h, lib/hamt.h, lib/hard-locale.h:
18024         * lib/hash-triple.h, lib/hash.h, lib/human.h, lib/i-ring.h:
18025         * lib/isapipe.c, lib/javacomp.h, lib/javaexec.h, lib/javaversion.c:
18026         * lib/lchown.c, lib/localeinfo.h, lib/localename.c:
18027         * lib/long-options.h, lib/malloc/dynarray.h, lib/mbchar.h:
18028         * lib/mbfile.h, lib/mbiter.h, lib/mbmemcasecoll.h, lib/mbscasestr.c:
18029         * lib/mbsstr.c, lib/mbuiter.h, lib/mkdir-p.h, lib/modechange.h:
18030         * lib/mountlist.h, lib/nanosleep.c, lib/nonblocking.h:
18031         * lib/nstrftime.c, lib/openat.c, lib/openat.h, lib/os2-spawn.c:
18032         * lib/parse-datetime.h, lib/pipe-filter-aux.c, lib/pipe-filter-gi.c:
18033         * lib/pipe-filter-ii.c, lib/pipe-filter.h, lib/posixtm.h:
18034         * lib/priv-set.c, lib/progreloc.c, lib/propername.c:
18035         * lib/pthread-spin.c, lib/quotearg.c, lib/readtokens.c:
18036         * lib/readtokens0.h, lib/readutmp.c, lib/regex-quote.h:
18037         * lib/regex_internal.h, lib/relocwrapper.c, lib/rename.c:
18038         * lib/renameatu.c, lib/rpmatch.c, lib/same.c, lib/same.h:
18039         * lib/save-cwd.c, lib/savewd.c, lib/savewd.h, lib/spawn-pipe.h:
18040         * lib/spawni.c, lib/stack.h, lib/stat.c, lib/stdckdint.in.h:
18041         * lib/strcasestr.c, lib/strfmon_l.c, lib/striconveh.c:
18042         * lib/striconveha.h, lib/string-buffer.h, lib/strptime.c:
18043         * lib/strstr.c, lib/strtod.c, lib/supersede.h, lib/system-quote.c:
18044         * lib/tempname.c, lib/term-style-control.c:
18045         * lib/term-style-control.h, lib/textstyle.in.h, lib/time_rz.c:
18046         * lib/tmpdir.c, lib/tmpdir.h, lib/tmpfile.c, lib/unicase.in.h:
18047         * lib/unicase/caseprop.h, lib/unicase/invariant.h:
18048         * lib/unicase/u16-casemap.c, lib/unicase/u16-ct-totitle.c:
18049         * lib/unicase/u16-is-invariant.c, lib/unicase/u32-casemap.c:
18050         * lib/unicase/u32-ct-totitle.c, lib/unicase/u32-is-invariant.c:
18051         * lib/unicase/u8-casemap.c, lib/unicase/u8-ct-totitle.c:
18052         * lib/unicase/u8-is-invariant.c, lib/unictype.in.h:
18053         * lib/unigbrk.in.h, lib/unigbrk/u16-grapheme-breaks.c:
18054         * lib/unigbrk/u32-grapheme-breaks.c:
18055         * lib/unigbrk/u8-grapheme-breaks.c:
18056         * lib/unigbrk/uc-grapheme-breaks.c, lib/uniname/uniname.c:
18057         * lib/unistr.in.h, lib/unlinkdir.h, lib/userspec.h, lib/utime.c:
18058         * lib/utimecmp.c, lib/utimens.c, lib/wait-process.h:
18059         * lib/windows-cond.c, lib/windows-spawn.c, lib/windows-spawn.h:
18060         * lib/windows-timedrwlock.c, lib/write-any-file.h, lib/xbinary-io.c:
18061         * lib/xstrtod.h, lib/yesno.h:
18062         * tests/nap.h, tests/qemu.h, tests/test-areadlink-with-size.c:
18063         * tests/test-areadlink.c, tests/test-areadlinkat-with-size.c:
18064         * tests/test-areadlinkat.c, tests/test-base32.c:
18065         * tests/test-base64.c, tests/test-ceil2.c, tests/test-ceilf2.c:
18066         * tests/test-chown.c, tests/test-dirname.c, tests/test-dup-safer.c:
18067         * tests/test-dup3.c, tests/test-exclude.c:
18068         * tests/test-execute-child.c, tests/test-execute-main.c:
18069         * tests/test-execute-script.c, tests/test-explicit_bzero.c:
18070         * tests/test-fchownat.c, tests/test-fcntl-safer.c:
18071         * tests/test-fcntl.c, tests/test-fdutimensat.c:
18072         * tests/test-filenamecat.c, tests/test-floor2.c:
18073         * tests/test-floorf2.c, tests/test-fstatat.c, tests/test-fstrcmp.c:
18074         * tests/test-futimens.c, tests/test-getlogin.h, tests/test-getopt.h:
18075         * tests/test-hard-locale.c, tests/test-hash.c:
18076         * tests/test-idpriv-drop.c, tests/test-idpriv-droptemp.c:
18077         * tests/test-immutable.c, tests/test-intprops.c:
18078         * tests/test-lchown.c, tests/test-link.c, tests/test-linkat.c:
18079         * tests/test-lstat.c, tests/test-mbmemcasecmp.c:
18080         * tests/test-mbmemcasecoll.c, tests/test-mkdir.c:
18081         * tests/test-mkdirat.c, tests/test-mkfifo.c, tests/test-mkfifoat.c:
18082         * tests/test-mknod.c, tests/test-nonblocking-pipe-child.c:
18083         * tests/test-nonblocking-pipe-main.c:
18084         * tests/test-nonblocking-socket-child.c:
18085         * tests/test-nonblocking-socket-main.c, tests/test-open.c:
18086         * tests/test-openat.c, tests/test-pipe.c, tests/test-pipe2.c:
18087         * tests/test-poll.c, tests/test-posix_spawn-chdir.c:
18088         * tests/test-posix_spawn-dup2-stdin.c:
18089         * tests/test-posix_spawn-dup2-stdout.c:
18090         * tests/test-posix_spawn-fchdir.c, tests/test-posix_spawn-open1.c:
18091         * tests/test-posix_spawn-open2.c, tests/test-quotearg-simple.c:
18092         * tests/test-quotearg.c, tests/test-readlink.c:
18093         * tests/test-readlinkat.c, tests/test-readtokens.c:
18094         * tests/test-rename.c, tests/test-renameat.c:
18095         * tests/test-renameatu.c, tests/test-rmdir.c, tests/test-round2.c:
18096         * tests/test-select.h, tests/test-spawn-pipe-child.c:
18097         * tests/test-spawn-pipe-main.c, tests/test-spawn-pipe-script.c:
18098         * tests/test-stack.c, tests/test-stat.c, tests/test-supersede.c:
18099         * tests/test-symlink.c, tests/test-symlinkat.c:
18100         * tests/test-system-quote-main.c:
18101         * tests/test-term-style-control-hello.c:
18102         * tests/test-term-style-control-yes.c, tests/test-timespec.c:
18103         * tests/test-trunc2.c, tests/test-truncf2.c, tests/test-unlink.c:
18104         * tests/test-unlinkat.c, tests/test-userspec.c, tests/test-utime.c:
18105         * tests/test-utimens.c, tests/test-utimensat.c:
18106         * tests/unictype/test-categ_byname.c:
18107         * tests/unigbrk/test-uc-is-grapheme-break.c:
18108         Don’t include stdbool.h.
18109         * modules/acl, modules/xgetcwd:
18110         Don’t depend on stdbool, as these modules don’t use bool.
18111         * modules/argp, modules/bitset, modules/diffseq, modules/file-has-acl:
18112         * modules/gen-uni-tables, modules/getrandom:
18113         * modules/hash-triple-simple, modules/posix_spawn-internal:
18114         * modules/strcasestr, modules/supersede, modules/system-quote:
18115         * modules/uniconv/base, modules/uniname/uniname, modules/utime:
18116         * modules/windows-timedrwlock:
18117         Depend on stdbool, as these modules use bool.
18119         stdbool: upgrade from C99 to C23
18120         Change the stdbool module so that it now emulates C23.
18121         The module now assumes C99.  The old module (which assumes
18122         C89 and emulates C99) is still available  as stdbool-c99,
18123         but is deprecated.
18124         * tests/test-stdbool.c [TEST_C_BOOL]: Do not include stdbool.h.
18125         * m4/c-bool.m4, modules/c-bool, modules/c-bool-tests:
18126         * tests/test-c-bool.c: New files.
18128 2022-09-10  Bruno Haible  <bruno@clisp.org>
18130         string: Fix compilation error in C++ mode on AIX 7.2 with xlclang.
18131         * lib/string.in.h (mbslen): Enable the C++ alias warning only on glibc
18132         systems.
18134 2022-09-10  Bruno Haible  <bruno@clisp.org>
18136         math: Fix compilation error in C++ mode on AIX 7.2 with xlclang.
18137         * lib/math.in.h (cbrtl, copysignl, exp2l, expm1l, fmal, ilogbl, log1pl,
18138         log2l, logbl, remainderl, rintl, roundl, truncl): Enable the C++ alias
18139         warning only on glibc systems.
18141 2022-09-10  Bruno Haible  <bruno@clisp.org>
18143         doc: Mention the stable branches.
18144         * doc/gnulib-readme.texi (High Quality): Add subsection
18145         'Stable Branches'.
18146         (Writing reliable code): Extracted from 'High Quality'. Mention also
18147         -Wall and valgrind.
18149 2022-09-09  Bruno Haible  <bruno@clisp.org>
18151         posix_spawn-internal: Optimize DuplicateHandle calls on native Windows.
18152         * lib/windows-spawn.h (DELAYED_DUP2_OLDFD, DELAYED_DUP2_NEWFD): New
18153         macros.
18154         (struct IHANDLE): Add a linked_fd field.
18155         * lib/spawni.c (SPAWN_INTERNAL_OPTIMIZE_DUPLICATEHANDLE): New macro.
18156         (do_delayed_dup2, do_remaining_delayed_dup2): New functions.
18157         (close_inheritable_handles): Don't close handles in DELAYED_DUP2_NEWFD
18158         entries.
18159         (do_close): Add a third parameter. Optimize delayed dup2 calls.
18160         (do_open): Use do_close.
18161         (do_dup2): Likewise. Prepare for optimizing the DuplicateHandle call.
18162         (__spawni): Do the remaining delayed dup2 invocations after the loop
18163         over the actions.
18165         posix_spawn-internal: Refactor.
18166         * lib/windows-spawn.h (struct IHANDLE): New type.
18167         (struct inheritable_handles): Combine handles and flags into a single
18168         array.
18169         * lib/windows-spawn.c (init_inheritable_handles, compose_handles_block,
18170         spawnpvech): Update.
18171         * lib/spawni.c (grow_inheritable_handles, shrink_inheritable_handles,
18172         do_open, do_dup2, do_close): Update.
18174         posix_spawn-internal: Optimize DuplicateHandle calls on native Windows.
18175         * lib/spawni.c (open_handle): Return an inheritable HANDLE.
18176         (do_open): Don't call DuplicateHandle. Remove curr_process parameter.
18177         (__spawni): Update.
18179         posix_spawn-internal: Optimize DuplicateHandle calls on native Windows.
18180         * lib/windows-spawn.h (KEEP_OPEN_IN_PARENT): New macro.
18181         * lib/windows-spawn.c (init_inheritable_handles): When a handle is
18182         already inheritable, don't bother duplicating it; instead, just mark it
18183         as KEEP_OPEN_IN_PARENT.
18184         * lib/spawni.c (shrink_inheritable_handles, close_inheritable_handles,
18185         do_open, do_dup2, do_close): Don't close handles that are marked as
18186         KEEP_OPEN_IN_PARENT.
18188 2022-09-09  Bruno Haible  <bruno@clisp.org>
18190         posix_spawn-internal: Don't lose flags while duplicating an fd.
18191         * lib/spawni.c (do_dup2): Fix the flags of the new fd.
18193 2022-09-09  Bruno Haible  <bruno@clisp.org>
18195         spawn-pipe: Fix pipe-filter-* test hangs (regression 2020-12-24).
18196         * lib/windows-spawn.h (struct inheritable_handles): Widen the per-fd
18197         flags from 8 bits to 16 bits.
18198         (KEEP_OPEN_IN_CHILD): New macro.
18199         (init_inheritable_handles): Change description of what it does when
18200         duplicate == true.
18201         * lib/windows-spawn.c (init_inheritable_handles): If duplicate == true,
18202         add all fds to the array, regardless whether they are scheduled to be
18203         preserved in the child process.
18204         (compose_handles_block): Update.
18205         (spawnpvech): Update.
18206         * lib/spawni.c (grow_inheritable_handles): Update.
18207         (shrink_inheritable_handles): Also close the handles not marked with
18208         KEEP_OPEN_IN_CHILD.
18209         (do_open, do_dup2): Mark the new fd with KEEP_OPEN_IN_CHILD.
18211 2022-09-09  Bruno Haible  <bruno@clisp.org>
18213         spawn-pipe: Fix possible hangs in programs that spawn several children.
18214         * lib/spawn-pipe.c (create_pipe) [Unix]: Create the ifd[] and ofd[] file
18215         descriptors with the close-on-exec flag set.
18217 2022-09-09  Bruno Haible  <bruno@clisp.org>
18219         pipe-filter-gi tests: Fix long-standing failure on native Windows.
18220         * tests/test-pipe-filter-gi2-main.c: Include binary-io.h.
18221         (main): Avoid NL to CRLF conversion on standard output.
18222         * tests/test-pipe-filter-gi2-child.c: Include <unistd.h>, binary-io.h.
18223         (main): Avoid NL to CRLF conversion on standard output.
18225 2022-09-09  Bruno Haible  <bruno@clisp.org>
18227         posix_spawn_file_actions_addclose tests: Fix mistake from 2022-09-07.
18228         * modules/posix_spawn_file_actions_addclose-tests (Files): Add
18229         m4/musl.m4.
18231 2022-09-08  Paul Eggert  <eggert@cs.ucla.edu>
18233         stdbool-tests: match stdbool
18234         * tests/test-stdbool.c: Omit test for
18235         __bool_true_false_are_defined since AC_CHECK_HEADER_STDBOOL no
18236         longer checks for this obsolescent macro.
18238         mktime: back in sync with GNUlib
18239         * config/srclist.txt: glibc has synced mktime from Gnulib.
18241 2022-09-07  Bruno Haible  <bruno@clisp.org>
18243         posix_spawn_file_actions_addclose tests: Avoid test failure on musl.
18244         Reported by Valery Ushakov <uwe@stderr.spb.ru> in
18245         <https://lists.gnu.org/archive/html/bug-gnulib/2022-09/msg00041.html>.
18246         * modules/posix_spawn_file_actions_addclose-tests (configure.ac): Invoke
18247         gl_MUSL_LIBC.
18248         * tests/test-posix_spawn_file_actions_addclose.c (main): Skip one of the
18249         tests on musl libc.
18251 2022-09-06  Simon Josefsson  <simon@josefsson.org>
18253         gnumakefile: Improve tarball reproducibility.
18254         * top/GNUmakefile (TAR_OPTIONS): Add --sort=name.  Suggested by
18255         Tzvetelin Katchov <katchov@gnu.org>.
18256         * DEPENDENCIES: Mention tar 1.28 dependency.
18258 2022-09-05  Bruno Haible  <bruno@clisp.org>
18260         pthread-h: Fix compilation error on mingw with --enable-threads=windows.
18261         * lib/pthread.in.h: In C++ mode, if mingw's <pthread.h> has not been
18262         used, import many pthread_* symbols from the GNULIB_NAMESPACE into the
18263         global namespace.
18265 2022-09-04  Bruno Haible  <bruno@clisp.org>
18267         Fix various test link errors on MSVC.
18268         * modules/crypto/gc-arcfour-tests (Makefile.am): Link test-gc-arcfour
18269         with $(LIB_GETRANDOM).
18270         * modules/crypto/gc-arctwo-tests (Makefile.am): Link test-gc-arctwo with
18271         $(LIB_GETRANDOM).
18272         * modules/crypto/gc-des-tests (Makefile.am): Link test-gc-des with
18273         $(LIB_GETRANDOM).
18274         * modules/crypto/gc-hmac-md5-tests (Makefile.am): Link test-gc-hmac-md5
18275         with $(LIB_GETRANDOM).
18276         * modules/crypto/gc-hmac-sha1-tests (Makefile.am): Link
18277         test-gc-hmac-sha1 with $(LIB_GETRANDOM).
18278         * modules/crypto/gc-hmac-sha256-tests (Makefile.am): Link
18279         test-gc-hmac-sha256 with $(LIB_GETRANDOM).
18280         * modules/crypto/gc-hmac-sha512-tests (Makefile.am): Link
18281         test-gc-hmac-sha512 with $(LIB_GETRANDOM).
18282         * modules/crypto/gc-md2-tests (Makefile.am): Link test-gc-md2 with
18283         $(LIB_GETRANDOM).
18284         * modules/crypto/gc-md4-tests (Makefile.am): Link test-gc-md4 with
18285         $(LIB_GETRANDOM).
18286         * modules/crypto/gc-md5-tests (Makefile.am): Link test-gc-md5 with
18287         $(LIB_GETRANDOM).
18288         * modules/crypto/gc-pbkdf2-tests (Makefile.am): Link test-gc-pbkdf2 with
18289         $(LIB_GETRANDOM).
18290         * modules/crypto/gc-pbkdf2-sha1-tests (Makefile.am): Link
18291         test-gc-pbkdf2-sha1 with $(LIB_GETRANDOM).
18292         * modules/crypto/gc-rijndael-tests (Makefile.am): Link test-gc-rijndael
18293         with $(LIB_GETRANDOM).
18294         * modules/crypto/gc-sha1-tests (Makefile.am): Link test-gc-sha1 with
18295         $(LIB_GETRANDOM).
18296         * modules/crypto/gc-sha256-tests (Makefile.am): Link test-gc-sha256 with
18297         $(LIB_GETRANDOM).
18298         * modules/crypto/gc-sha512-tests (Makefile.am): Link test-gc-sha512 with
18299         $(LIB_GETRANDOM).
18300         * modules/crypto/gc-sm3-tests (Makefile.am): Link test-gc-sm3 with
18301         $(LIB_GETRANDOM).
18302         * modules/sys_stat-c++-tests (Makefile.am): Link test-sys_stat-c++ with
18303         $(LIB_GETRANDOM).
18304         * modules/unistd-c++-tests (Makefile.am): Link test-unistd-c++ with
18305         $(LIB_GETRANDOM).
18307 2022-09-04  Bruno Haible  <bruno@clisp.org>
18309         count-leading-zeros: Fix a link error on 32-bit MSVC and a test failure.
18310         * lib/count-leading-zeros.h: Correct syntax for #pragma intrinsic.
18311         (COUNT_LEADING_ZEROS): Fix the return value.
18312         (count_leading_zeros_ll): Use two _BitScanReverse invocations instead
18313         of a _BitScanReverse64 invocation.
18315 2022-09-04  Bruno Haible  <bruno@clisp.org>
18317         count-trailing-zeros: Fix a link error on 32-bit MSVC.
18318         * lib/count-trailing-zeros.h: Correct syntax for #pragma intrinsic.
18319         (count_trailing_zeros_ll): Use two _BitScanForward invocations instead
18320         of a _BitScanForward64 invocation.
18322 2022-09-04  Bruno Haible  <bruno@clisp.org>
18324         unictype/category-none tests: Fix a link error on MSVC.
18325         * tests/unictype/test-categ_none.c (main): Disable the test on MSVC.
18327 2022-09-04  Bruno Haible  <bruno@clisp.org>
18329         oset-c++: Fix compilation error with MSVC 14.
18330         * lib/gl_oset.hh: With MSVC, avoid 'friend'.
18332 2022-09-04  Bruno Haible  <bruno@clisp.org>
18334         glob tests: Fix link error on mingw.
18335         * modules/glob-tests (Makefile.am): Link test-glob with $(LIBINTL).
18337 2022-09-04  Bruno Haible  <bruno@clisp.org>
18339         timespec_get: Fix compilation error with MSVC 14.
18340         * m4/gettime.m4 (gl_CHECK_FUNC_TIMESPEC_GET): New macro.
18341         (gl_GETTIME): Use it instead of AC_CHECK_FUNCS_ONCE.
18342         * m4/timespec_get.m4 (gl_FUNC_TIMESPEC_GET): Likewise.
18344 2022-09-04  Bruno Haible  <bruno@clisp.org>
18346         stdbool: Fix compilation error in C++ mode with MSVC 14.
18347         * lib/stdbool.in.h (_Bool, bool, false, true): In C++ mode with MSVC 14,
18348         don't define these as macros.
18350 2022-09-04  Bruno Haible  <bruno@clisp.org>
18352         fts: Fix compilation error with MSVC 14.
18353         * lib/fts.c (S_IFBLK): Add fallback definition.
18355 2022-09-04  Bruno Haible  <bruno@clisp.org>
18357         lstat: Fix compilation error in C++ mode on mingw.
18358         * lib/sys_stat.h (lstat): Move declaration after the declaration of
18359         'stat'.
18361 2022-09-04  Bruno Haible  <bruno@clisp.org>
18363         pselect: Fix compilation error in C++ mode on mingw.
18364         * lib/sys_select.in.h (pselect): Enable the C++ alias warning only on
18365         glibc systems.
18367 2022-09-04  Bruno Haible  <bruno@clisp.org>
18369         nanosleep: Work around bug on newer 32-bit mingw.
18370         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Test for 32-bit mingw bug.
18371         * tests/test-nanosleep.c (main): Add another test.
18372         * doc/posix-functions/nanosleep.texi: Mention the mingw bug.
18374 2022-09-03  Bruno Haible  <bruno@clisp.org>
18376         fmal: Work around glibc 2.17 bug on x86_64.
18377         * m4/fmal.m4 (gl_FUNC_FMAL_WORKS): Test against bug seen on glibc 2.17
18378         x86_64.
18379         * doc/posix-functions/fmal.texi: Update info.
18381 2022-09-03  Bruno Haible  <bruno@clisp.org>
18383         Fix a compilation error in C++ mode on Solaris 11.4.
18384         * lib/uchar.in.h (c32rtomb): Enable the C++ alias warning only on
18385         glibc ≥ 2.16 systems. Fix a GNULIB_POSIXCHECK mistake.
18386         (mbrtoc32): Enable the C++ alias warning only on glibc ≥ 2.16 systems.
18388 2022-09-03  Bruno Haible  <bruno@clisp.org>
18390         Fix compilation errors of C++ tests on Solaris 10 with Sun C++.
18391         * modules/string-c++-tests (Makefile.am): Link test-string-c++ with
18392         $(LIBUNISTRING).
18393         * modules/wchar-c++-tests (Makefile.am): Link test-wchar-c++ with
18394         $(LIBUNISTRING).
18396 2022-09-03  Bruno Haible  <bruno@clisp.org>
18398         Fix a compilation error in C++ mode on FreeBSD 13.1.
18399         * lib/signal.in.h: Don't include <pthread.h> on FreeBSD ≥ 8.0.
18400         * lib/sys_select.in.h: Don't include <sys/time.h> on FreeBSD.
18402 2022-09-03  Bruno Haible  <bruno@clisp.org>
18404         stdnoreturn: Document relation to C++.
18405         * doc/posix-headers/stdnoreturn.texi: Document FreeBSD problem.
18407 2022-09-03  Bruno Haible  <bruno@clisp.org>
18409         sysexits: Add C++ tests.
18410         * tests/test-sysexits-c++.cc: New file.
18411         * modules/sysexits-c++-tests: New file.
18412         * modules/sysexits-tests (Depends-on): Add sysexits-c++-tests.
18414 2022-09-03  Bruno Haible  <bruno@clisp.org>
18416         sys_utsname: Add C++ tests.
18417         * tests/test-sys_utsname-c++.cc: New file.
18418         * modules/sys_utsname-c++-tests: New file.
18419         * modules/sys_utsname-tests (Depends-on): Add sys_utsname-c++-tests.
18421 2022-09-03  Bruno Haible  <bruno@clisp.org>
18423         sys_uio: Add C++ tests.
18424         * tests/test-sys_uio-c++.cc: New file.
18425         * modules/sys_uio-c++-tests: New file.
18426         * modules/sys_uio-tests (Depends-on): Add sys_uio-c++-tests.
18428 2022-09-03  Bruno Haible  <bruno@clisp.org>
18430         sys_times: Add C++ tests.
18431         * tests/test-sys_times-c++.cc: New file.
18432         * modules/sys_times-c++-tests: New file.
18433         * modules/sys_times-tests (Depends-on): Add sys_times-c++-tests.
18435 2022-09-03  Bruno Haible  <bruno@clisp.org>
18437         sys_file: Add C++ tests.
18438         * tests/test-sys_file-c++.cc: New file.
18439         * modules/sys_file-c++-tests: New file.
18440         * modules/sys_file-tests (Depends-on): Add sys_file-c++-tests.
18442         sys_file: Document this module.
18443         * doc/glibc-headers/sys_file.texi: New file.
18444         * doc/gnulib.texi (Glibc Header File Substitutes): Include it.
18446 2022-09-03  Bruno Haible  <bruno@clisp.org>
18448         stdckdint: Add C++ tests.
18449         * tests/test-stdckdint-c++.cc: New file.
18450         * modules/stdckdint-c++-tests: New file.
18451         * modules/stdckdint-tests (Depends-on): Add stdckdint-c++-tests.
18453 2022-09-03  Bruno Haible  <bruno@clisp.org>
18455         stdalign: Add C++ tests.
18456         * tests/test-stdalign-c++.cc: New file.
18457         * modules/stdalign-c++-tests: New file.
18458         * modules/stdalign-tests (Depends-on): Add stdalign-c++-tests.
18460 2022-09-03  Bruno Haible  <bruno@clisp.org>
18462         sched: Add C++ tests.
18463         * tests/test-sched-c++.cc: New file.
18464         * modules/sched-c++-tests: New file.
18465         * modules/sched-tests (Depends-on): Add sched-c++-tests.
18467 2022-09-03  Bruno Haible  <bruno@clisp.org>
18469         netinet_in: Add C++ tests.
18470         * tests/test-netinet_in-c++.cc: New file.
18471         * modules/netinet_in-c++-tests: New file.
18472         * modules/netinet_in-tests (Depends-on): Add netinet_in-c++-tests.
18474 2022-09-03  Bruno Haible  <bruno@clisp.org>
18476         net_if: Add C++ tests.
18477         * tests/test-net_if-c++.cc: New file.
18478         * modules/net_if-c++-tests: New file.
18479         * modules/net_if-tests (Depends-on): Add net_if-c++-tests.
18480         * doc/posix-headers/net_if.texi: Fix documentation.
18482 2022-09-03  Bruno Haible  <bruno@clisp.org>
18484         termcap: Fix link error on AIX 7.
18485         * m4/termcap.m4 (gl_TERMCAP_BODY): Search also for libxcurses and for
18486         libcurses, like gl_TERMINFO_BODY does.
18487         * m4/terminfo.m4 (gl_TERMINFO_BODY): Update platform list in comment.
18489 2022-09-02  Bruno Haible  <bruno@clisp.org>
18491         getrandom: Fix compilation error in C++ mode on FreeBSD 12.
18492         * lib/sys_random.in.h (getrandom): Enable the C++ alias warning only on
18493         glibc ≥ 2.25 systems.
18495 2022-09-02  Bruno Haible  <bruno@clisp.org>
18497         math C++ tests: Fix compilation error with clang on FreeBSD 13.
18498         * lib/math.in.h (isnan): For clang >= 11 on FreeBSD, declare 'isnan',
18499         not 'rpl_isnan'.
18501 2022-09-02  Bruno Haible  <bruno@clisp.org>
18503         strerror_r-posix: Fix for Hurd.
18504         * lib/strerror_r.c (strerror_r): Interpret return value of
18505         __xpg_strerror_r correctly. Remove assumption about how strerror_r
18506         behaves.
18508 2022-09-02  Bruno Haible  <bruno@clisp.org>
18510         ptsname tests, ptsname_r tests: Fix test failures on Hurd.
18511         * tests/test-ptsname.c (main): On Hurd, test only the BSD ptys that
18512         actually exist on Hurd.
18513         * tests/test-ptsname_r.c (main): Likewise.
18515 2022-09-02  Bruno Haible  <bruno@clisp.org>
18517         strtol, strtoul: Fix compilation error in C++ mode on Solaris 11.
18518         * lib/stdlib.in.h (strtol, strtoul): Enable the C++ alias warning only
18519         on glibc systems.
18521 2022-09-02  Bruno Haible  <bruno@clisp.org>
18523         aligned_alloc: Fix compilation error in C++ mode on Solaris 11.
18524         * lib/stdlib.in.h (aligned_alloc): Enable the C++ alias warning only on
18525         glibc systems.
18527 2022-09-02  Bruno Haible  <bruno@clisp.org>
18529         getdomainname: Fix compilation error in C++ mode on Solaris 11.
18530         * lib/unistd.in.h (getdomainname): Enable the C++ alias warning only on
18531         glibc systems.
18533 2022-09-02  Bruno Haible  <bruno@clisp.org>
18535         terminfo: Don't disturb the termcap module.
18536         * m4/terminfo.m4 (gl_TERMINFO_BODY): Save and restore the variables
18537         determined by the gl_TERMCAP_BODY macro.
18539 2022-08-30  Paul Eggert  <eggert@cs.ucla.edu>
18541         fnmatch: fix stdckdint typo
18542         * lib/fnmatch_loop.c (NEW_PATTERN): Fix typo in previous patch.
18543         Problem and fix reported by Simon Josefsson in:
18544         https://lists.gnu.org/r/bug-gnulib/2022-08/msg00104.html
18546 2022-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18548         tempname: simplify by omitting _LIBC code
18549         * lib/tempname.c [_LIBC]: Simplify.
18550         Suggested by Bruno Haible in:
18551         https://lists.gnu.org/r/bug-gnulib/2022-08/msg00077.html
18552         I plan to propose a corresponding patch to glibc.
18554 2022-08-22  Paul Eggert  <eggert@cs.ucla.edu>
18556         tempname: don't lose entropy in seed
18557         * lib/tempname.c (random_bits): Don't lose entropy in S
18558         in the rare case where where the template has more than 10 Xs.
18559         From a suggestion by Bruno Haible in:
18560         https://bugs.gnu.org/57129#149
18562         tempname: fix multithreading, ASLR leak etc.
18563         Fix problems with tempname and multithreading, entropy loss,
18564         and missing clock data (this last on non-GNU platforms).
18565         See analysis by Bruno Haible in:
18566         https://bugs.gnu.org/57129#149
18567         While looking into this, I noticed that tempname can leak
18568         info derived from ASLR into publicly-visible file names,
18569         which is a no-no.  Fix that too.
18570         * lib/tempname.c: Don't include stdalign.h.
18571         (HAS_CLOCK_ENTROPY): Remove.
18572         (mix_random_values): New function.
18573         (random_bits): Use it.  Args are now new value address and
18574         old value, and this function now returns a success indicator.
18575         Omit old USE_GETRANDOM argument: always try getrandom now, as
18576         there is no good reason not to now that GRND_NONBLOCK is used.
18577         Caller changed.  Use CLOCK_REALTIME for for ersatz entropy,
18578         as CLOCK_MONOTONIC doesn't work on some platforms.
18579         Also, mix in ersatz entropy from tv_sec and from clock ().
18580         (try_tempname_len): Do not mix in ASLR-based entropy, as
18581         the result is published to the world and ASLR should be private.
18582         Do not try to use a static var as that has issues if multithreaded.
18583         Instead, simply generate new random bits.
18584         Worry about bias only with high-quality random bits.
18586         * modules/tempname (Depends-on): Do not depend on stdalign.
18588         tempname: merge 64-bit time_t fix from glibc
18589         This merges glibc commit 52a5fe70a2c77935afe807fb6e904e512ddd894e
18590         "Use 64 bit time_t stat internally".
18591         * lib/tempname.c (struct_stat64) [_LIBC]: Use struct __stat64_t64.
18592         (__lstat64_time64) [!_LIBC]: Rename from __lstat64.
18593         All uses changed.
18594         (direxists): Use __stat64_time64 instead of __stat64.
18596 2022-08-16  Bruno Haible  <bruno@clisp.org>
18598         tempname: Add more tests.
18599         Based on scenario described by Eli Zaretskii in
18600         <https://lists.gnu.org/archive/html/bug-gnulib/2022-08/msg00043.html>.
18601         * tests/test-tempname.c (main): Add another test.
18602         * modules/tempname-tests (Status): Mark the test as unportable.
18604 2022-08-16  Paul Eggert  <eggert@cs.ucla.edu>
18606         tempname: generate better names for MinGW Emacs
18607         On MinGW, GNU Emacs disables clock_gettime, which reliably breaks
18608         some of gen_tempname’s optimistic callers.  Work around the
18609         problem by making the generated names less predictable.  We don’t
18610         need cryptographic randomness here, just enough unpredictability
18611         to keep Emacs happy most of the time.
18612         * lib/tempname.c (HAS_CLOCK_ENTROPY): New macro.
18613         (random_bits): Use it.
18614         (try_tempname_len): On systems lacking clock entropy, maintain
18615         state so that gen_filename generates less-predictable names on
18616         successive successful calls.
18618 2022-08-16  Simon Josefsson  <simon@josefsson.org>
18620         maintainer-makefile: Check for incorrect DISTCHECK_CONFIGURE_FLAGS
18621         usage.
18622         * top/maint.mk (sc_makefile_DISTCHECK_CONFIGURE_FLAGS): Add.
18624 2022-08-16  Bruno Haible  <bruno@clisp.org>
18626         tempname: Add tests.
18627         * tests/test-tempname.c: New file.
18628         * modules/tempname-tests: New file.
18630 2022-08-16  Simon Josefsson  <simon@josefsson.org>
18632         pmccabe2html: Doc fix.
18633         * build-aux/pmccabe2html: Don't use reserved _SOURCES namespace.
18634         Use AM_V_GEN.  Use LC_ALL=C.
18636 2022-08-15  Bruno Haible  <bruno@clisp.org>
18638         stdbool: Drop old BeOS support that gets in the way of ISO C 23 support.
18639         * lib/stdbool.in.h: Don't include <OS.h>.
18641 2022-08-15  Bruno Haible  <bruno@clisp.org>
18643         tempname: Fix a comment.
18644         * lib/tempname.c (try_tempname_len): Use of entropy makes the function
18645         more, not less, secure.
18647 2022-08-15  Paul Eggert  <eggert@cs.ucla.edu>
18649         tempname: remove incorrect comment
18650         * lib/tempname.c, lib/tempname.h: Remove incorrect comment,
18651         as the names are not necessarily hard to predict (Bug#57129).
18653 2022-08-14  Simon Josefsson  <simon@josefsson.org>
18655         bootstrap.conf: Use proper shell marker for Emacs.
18656         * build-aux/bootstrap.conf: Add it.
18658 2022-08-13  Paul Eggert  <eggert@cs.ucla.edu>
18660         stdbool: port to C23
18661         * m4/stdbool.m4 (AC_CHECK_HEADER_STDBOOL): Copy from bleeding-edge
18662         Autoconf.  Define only if Autoconf 2.71 and earlier.
18663         * tests/test-stdbool.c (bool, false, true)
18664         (__bool_true_false_are_defined): Do not require these to be
18665         defined.  C23 still requires __bool_true_false_are_defined but
18666         marks it as obsolescent, and it’s no longer worth testing.
18667         (WORKING_BOOL): New macro, which also tests __STDC_VERSION__.
18668         Use it in tests for working bool.
18669         Test for bool instead of for _Bool, which C23 says is obsolescent.
18671 2022-08-13  Bruno Haible  <bruno@clisp.org>
18673         gnulib-tool.py: Fix some code generation details.
18674         * pygnulib/GLEmiter.py: Don't produce Windows CR-LFs on Windows.
18675         (GLEmiter.po_Makevars): Emit a definition of top_builddir, not
18676         top_subdir.
18677         (GLEmiter.po_POTFILES_in): Fix result when sourcebase is 'tests' or
18678         something like that.
18679         (GLEmiter.initmacro_start): Add two more newlines (mistake from
18680         2021-04-11).
18682         gnulib-tool.py: Reduce code duplication.
18683         * pygnulib/constants.py (relinverse): New function.
18684         * pygnulib/GLEmiter.py (GLEmiter.po_Makevars,
18685         GLEmiter.tests_Makefile_am): Use it.
18686         * pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
18688 2022-08-12  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
18690         hamt: fix technically undefined behavior
18691         Bug reported by Bruno Haible in
18692         <https://lists.gnu.org/r/bug-gnulib/2022-04/msg00023.html>.
18693         * lib/hamt.c (entry_insert): Remove technically undefined
18694         behavior when shifting an integer of N bits by N or more bits.
18696 2022-08-10  Paul Eggert  <eggert@cs.ucla.edu>
18698         stdckdint: fix dependency
18699         * modules/stdckdint (Depends-on): Add stdbool.
18700         Reported by Bruno Haible.
18702         maint: parenthesize macro definiens
18703         * lib/intprops.h (INT_ADD_OK, INT_SUBTRACT_OK, INT_MULTIPLY_OK):
18704         * lib/pipe-filter-ii.c (GetLastError):
18705         * lib/thread-optim.h (gl_multithreaded): Parenthesize
18706         function-like macro definiens beginning with a unary operator;
18707         needed for weird invocations like ‘m (...)[p]’.
18709 2022-08-09  Paul Eggert  <eggert@cs.ucla.edu>
18711         stdckdint: prefer to intprops when easy
18712         stdckdint.h is part of draft C23 and therefore is more likely
18713         to be familiar to programmers in the future, so prefer it to
18714         intprops.h in files that don’t need non-_WRAPV intprops.h macros.
18715         * lib/alignalloc.c, lib/backupfile.c, lib/fnmatch.c, lib/fnmatch_loop.c:
18716         * lib/group-member.c, lib/malloca.c, lib/posixtm.c, lib/reallocarray.c:
18717         * lib/xmalloc.c:
18718         For files that can use stdckdint.h just as easily as intprops.h,
18719         include the former instead of the latter, and use the former’s
18720         ckd_* macros instead of the latter’s *_WRAPV macros.
18721         * modules/alignalloc, modules/backup-rename, modules/backupfile:
18722         * modules/fnmatch, modules/group-member, modules/malloca:
18723         * modules/posixtm, modules/reallocarray:
18724         * modules/relocatable-prog-wrapper, modules/xalloc:
18725         Depend on stdckdint instead of intprops.
18727         stdckdint: new module
18728         This supports draft C23 <stdckdint.h>.
18729         * doc/posix-headers/stdckdint.texi:
18730         * lib/stdckdint.in.h, modules/stdckdint:
18731         * modules/stdckdint-tests, tests/test-stdckdint.c:
18732         New files.
18733         * MODULES.html.sh, doc/gnulib.texi: Update for new module.
18734         * lib/intprops-internal.h: Include <stdckdint.h> if C23 and
18735         its macros would help and our substitute has not already
18736         started to be included.
18737         (_GL_INT_ADD_WRAPV, _GL_INT_SUBTRACT_WRAPV)
18738         (_GL_INT_MULTIPLY_WRAPV): Use ckd_add, ckd_sub, ckd_mul
18739         if they are defined and would help.
18740         * lib/intprops-internal.h, lib/intprops.h: Improve comments.
18741         The C23 restrictions on stdckdint macros already mostly applied to
18742         intprops.h, so these are clarifications, not further restrictions.
18743         * tests/test-intprops.c: If TEST_STDCKDINT is defined,
18744         include <stdckdint.h> instead of "intprops.h", and test
18745         it instead.
18746         (VERIFY) [TEST_STDCKDINT]: Ignore the arg in this case.
18747         (main) [TEST_STDCKDINT]: Skip tests irrelevant to stdckdint.h.
18749         intprops: refactor intprops.h into two
18750         * lib/intprops.h: Include new file intprops-internal.h.
18751         (_GL_INT_CONVERT, _GL_INT_NEGATE_CONVERT, _GL_INT_MINIMUM)
18752         (_GL_INT_MAXIMUM, _GL_SIGNED_INT_MAXIMUM, LLONG_MAX, LLONG_MIN)
18753         (_GL_HAVE___TYPEOF__, _GL_SIGNED_TYPE_OR_EXPR)
18754         (_GL_HAS_BUILTIN_ADD_OVERFLOW, _GL_HAS_BUILTIN_MUL_OVERFLOW)
18755         (_GL_HAS_BUILTIN_OVERFLOW_P, _GL__GENERIC_BOGUS)
18756         (_GL_INT_OP_WRAPV, _GL_INT_OP_WRAPV_LONGISH, _GL_INT_OP_CALC)
18757         (_GL_INT_OP_WRAPV_VIA_UNSIGNED, _GL_INT_ADD_RANGE_OVERFLOW)
18758         (_GL_INT_SUBTRACT_RANGE_OVERFLOW)
18759         (_GL_INT_MULTIPLY_RANGE_OVERFLOW):
18760         Move to intprops-internal.h.
18761         (TYPE_SIGNED, EXPR_SIGNED, TYPE_WIDTH, INT_NEGATE_RANGE_OVERFLOW)
18762         (INT_NEGATE_OVERFLOW, INT_ADD_WRAPV, INT_SUBTRACT_WRAPV)
18763         (INT_MULTIPLY_WRAPV): Rename to _GL_ prefix, move to
18764         intprops-internal.h, and define here in terms of the _GL_ name.
18765         * lib/intprops-internal.h: New file, containing the above.
18766         * modules/intprops (Files): Add lib/intprops-internal.h.
18768         intprops: refactor _GL_HAS_BUILTIN_OVERFLOW_P
18769         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW_P)
18770         [_GL_HAS_BUILTIN_OVERFLOW_P]: Use __builtin_sub_overflow_p
18771         directly rather than indirectly via INT_SUBTRACT_OVERFLOW.
18772         This simplifies future changes, and doesn’t change the generated code.
18774         verify: port ‘assume’ to C23 non-GCC
18775         * lib/verify.h (assume): Use C23's unreachable if available
18776         and if GCC and/or MSC primitives are not available.
18778 2022-08-09  Bruno Haible  <bruno@clisp.org>
18780         gnulib-tool.py: Finish implementing option --conditional-dependencies.
18781         * gnulib-tool.py (main) Accept options --conditional-dependencies,
18782         --no-conditional-dependencies.
18783         * pygnulib/GLModuleSystem.py (GLModuleTable.addConditional): Use
18784         str(module), not module, as key. Fix logic bug.
18785         (GLModuleTable.getCondition): Simplify.
18786         (GLModuleTable.transitive_closure): Show a warning when there are
18787         duplicate dependencies. Fix logic bug.
18788         (GLModuleTable.transitive_closure_separately): Simplify.
18789         (GLModuleTable.add_dummy): Ignore tests modules. Cope with multiple
18790         lib_SOURCES augmentation lines. Cope with comments at the end of a
18791         lib_SOURCES augmentation line. Add the dummy module at the end of the
18792         modules list.
18793         * pygnulib/GLTestDir.py (GLTestDir.execute): Remove the code that forces
18794         the dummy module to the end of the list.
18795         * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Add code to
18796         terminate the shell functions. Add code for the dependencies from the
18797         unconditional to the conditional modules. Don't emit AM_CONDITIONAL for
18798         unconditional modules.
18800         gnulib-tool.py: Don't do license replacements in the autoconf snippets.
18801         * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippet): Remove fileassistant
18802         argument. Don't invoke the 'aux' transformer here. Don't produce Windows
18803         CR-LFs on Windows.
18804         (GLEmiter.autoconfSnippets): Remove fileassistant argument.
18805         * pygnulib/GLImport.py (GLImport.gnulib_comp): Update all callers.
18806         * pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
18808         gnulib-tool.py: Fix some code generation details.
18809         * pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am): When removing a
18810         lib_LDFLAGS line, remove also the newline. Fix regex that matches
18811         lib_SOMETHING. Add a newline after each '## begin gnulib module' line.
18812         Don't emit 'endif' lines without corresponding 'if'. When emitting a
18813         '+=' augmentation, make sure it does not get emitted a second time.
18814         Don't emit a blank line when there is no AM_CPPFLAGS augmentation.
18815         Update after getLink() changed. In the value of DEFAULT_TEXT_DOMAIN,
18816         backslash-escape the double-quotes. Don't produce Windows CR-LFs on
18817         Windows. Simplify.
18818         (GLEmiter.tests_Makefile_am): When removing a lib_LDFLAGS line, remove
18819         also the newline. Fix regex that matches lib_SOMETHING. Don't remove a
18820         blank line before EXTRA_DIST. Add a newline after each
18821         '## begin gnulib module' line. Set uses_subdirs also when there is a .c
18822         file in a subdir of tests/. When emitting a '+=' augmentation, make sure
18823         it does not get emitted a second time. Don't produce Windows CR-LFs on
18824         Windows. Simplify.
18825         * pygnulib/GLImport.py (GLImport.execute): Update after getLink()
18826         changed.
18828         gnulib-tool.py: Fixes for conditional dependencies.
18829         * pygnulib/GLModuleSystem.py (GLModule.shell_id_chars): New constant.
18830         (GLModule.getShellFunc): Don't use md5 just because of an '_' character.
18831         (GLModule.getShellVar): Likewise.
18832         (GLModule.getConditionalName): Include a newline in the md5 input.
18833         * pygnulib/constants.py (ALPHANUMERIC): Remove constant.
18835         gnulib-tool.py: Refactor.
18836         * pygnulib/GLModuleSystem.py (GLModule.getLicense): Separate the warning
18837         logic from the result logic.
18839 2022-08-09  Paul Eggert  <eggert@cs.ucla.edu>
18841         largefile, year2038: simplify if > Autoconf 2.71
18842         * m4/largefile.m4 (gl_SET_LARGEFILE_SOURCE)
18843         (_AC_SYS_LARGEFILE_MACRO_VALUE):
18844         * m4/year2038.m4 (gl_YEAR2038_EARLY, gl_YEAR2038, gl_YEAR2038_BODY):
18845         Adjust to Autoconf versions after 2.71, which should contain the Gnulib
18846         patches in this area and so should not need to be overridden.
18848 2022-08-07  Bruno Haible  <bruno@clisp.org>
18850         gnulib-tool.py: Finish implementing option --extract-test-module.
18851         * gnulib-tool.py (main): Accept option --extract-tests-module.
18853         gnulib-tool.py: Fix handling of nonexistent module names in --extract-*.
18854         * gnulib-tool.py (main): To test whether a module exists, just call
18855         GLModuleSystem.find and test its return value.
18857         gnulib-tool.py: Fix --extract-dependencies result.
18858         * pygnulib/GLModuleSystem.py (GLModule.getDependencies): Return a
18859         snippet, not a list. Implement dependency of ${module}-tests on
18860         ${module}.
18861         (GLModule.getDependenciesWithoutConditions,
18862         GLModule.getDependenciesWithConditions): New methods.
18863         (GLModuleTable.transitive_closure): Call getDependenciesWithConditions.
18864         * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Call
18865         getDependenciesWithoutConditions.
18866         * gnulib-tool.py (main) [--extract-dependencies]: Update.
18868         gnulib-tool.py: Rename a method.
18869         * pygnulib/GLModuleSystem.py (GLModule.getAutoconfEarlySnippet): Renamed
18870         from GLModule.getAutoconfSnippet_Early.
18871         * pygnulib/GLImport.py: Update.
18872         * pygnulib/GLTestDir.py: Likewise.
18874         gnulib-tool.py: Fix section extraction from module descriptions.
18875         The code with   self.content.split(section)[-1]
18876         was broken because it recognizes an indented section label.
18877         Similar code with   ('\n' + self.content).split('\n' + section)[-1]
18878         would still be broken because it recognizes an indented section label
18879         in the first line of the file.
18880         The code with   section_label_regex
18881         was broken because sometimes it returns the second-to-last section with
18882         the given label, not the last one.
18883         Also, whitespace after the colon was not ignored.
18884         * pygnulib/GLModuleSystem.py (GLModule.__init__): Dissect the module
18885         description's contents immediately, once only, in a reliable way.
18886         (GLModule.getDescription, GLModule.getComment): Simplify.
18887         (GLModule.getStatus): Simplify. Return a string.
18888         (GLModule.getStatuses): New function. Return a list.
18889         (GLModule.getNotice, GLModule.getApplicability, GLModule.getFiles,
18890         GLModule.getDependencies, GLModules.getAutoconfSnippet_Early,
18891         GLModules.getAutoconfSnippet, GLModule.getAutomakeSnippet_Conditional,
18892         GLModule.getInclude, GLModule.getLink, GLModule.getLicense_Raw):
18893         Simplify.
18894         (GLModule.getLicense): Remove whitespace after calling getLicense_Raw.
18895         (GLModule.getMaintainer): Simplify.
18896         (GLModuleTable.transitive_closure): Call getStatuses() instead of
18897         getStatus().
18898         * pygnulib/GLEmiter.py: Likewise.
18899         * gnulib-tool.py (main): For --extract-description, --extract-comment,
18900         --extract-status, --extract-notice, --extract-autoconf-snippet,
18901         --extract-automake-snippet, --extract-include-directive,
18902         --extract-link-directive, --extract-maintainer, don't add an extra
18903         newline after the snippet.
18905         gnulib-tool.py: Improve field naming.
18906         * pygnulib/GLModuleSystem.py (GLModule): Rename field 'module' to
18907         'path'. Fix a typo in a TypeError message.
18909         gnulib-tool.py: Simplify.
18910         * pygnulib/GLModuleSystem.py (GLModule): Convert Windows newlines right
18911         after reading the module description, not in every accessor.
18913         gnulib-tool.py: Reduce code duplication.
18914         * pygnulib/GLModuleSystem.py (GLModule): Declare two regexes are class
18915         variables.
18917         gnulib-tool.py: Implement option --find.
18918         * pygnulib/GLModuleSystem.py (GLModuleSystem.file_is_module): New
18919         method.
18920         (GLModuleSystem.list): Filter the listing in memory; don't use a 'sed'
18921         subprocess.
18922         * gnulib-tool.py (main): Handle mode 'find'.
18924         gnulib-tool: Fix option --find in combination with option --local-dir.
18925         * gnulib-tool (func_prefixed_modules_in_dir): New function.
18926         (find): Use it, and filter the directory names away after the 'grep'
18927         pass.
18929         gnulib-tool.py: Fix some regexes.
18930         * pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am): Use an equivalent
18931         regex as gnulib-tool.
18932         * pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
18934         gnulib-tool.py: Fix some regex uses.
18935         * pygnulib/GLModuleSystem.py (GLModuleTable.transitive_closure): Match
18936         the regex against all lines of the snippet, not only the first line.
18937         * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippet): Likewise.
18939         gnulib-tool.py: Make regex uses more straightforward.
18940         * pygnulib/constants.py: Don't use the "minimal matching" *? construct
18941         when it makes no difference (because we're matching a single line only
18942         and flag re.M is not specified).
18943         * pygnulib/GLModuleSystem.py: Likewise.
18945         gnulib-tool.py: Make regex uses more straightforward.
18946         * pygnulib/GLModuleSystem.py: Don't use flag re.S on regular expressions
18947         that are meant to match a single line only, and remove the use of the
18948         "minimal matching" *? construct whose only purpose was to neutralize the
18949         re.S flag.
18950         * pygnulib/GLEmiter.py: Likewise.
18951         * pygnulib/GLImport.py: Likewise.
18952         * pygnulib/GLTestDir.py: Likewise.
18954         gnulib-tool.py: Make regex uses more straightforward.
18955         * pygnulib/GLEmiter.py: Don't use flag re.S on regular expressions on
18956         regular expressions with no '.'.
18957         * pygnulib/GLImport.py: Likewise.
18959 2022-08-06  Bruno Haible  <bruno@clisp.org>
18961         gnulib-tool: In the VC files messages, omit the destination directory.
18962         This makes these messages consistent with the other "Copying ..." and
18963         "Creating ..." messages.
18964         * gnulib-tool (func_import): Omit $destdir/ from the "Updating"/
18965         "Creating" messages regarding .gitignore files.
18966         * pygnulib/GLImport.py (GLImport._update_ignorelist_): Likewise.
18968         gnulib-tool.py: Fix output in --dry-run mode.
18969         * pygnulib/GLImport.py (GLImport._update_ignorelist_): In dry-run mode,
18970         say "Update", not "Updating".
18972         gnulib-tool.py: Finish implementing options --vc-files, --no-vc-files.
18973         * gnulib-tool.py (main): Accept options --vc-files, --no-vc-files.
18974         * pygnulib/GLImport.py (GLImport.__init__): Correct parsing of
18975         gl_VC_FILES directive.
18976         (GLImport.gnulib_cache): Don't treat the value False like None.
18977         (GLImport.execute): Skip the .gitignore file manipulations if vc_files
18978         is False.
18980         gnulib-tool.py: Finish implementing option --witness-c-macro.
18981         * gnulib-tool.py (main): Accept option --witness-c-macro.
18982         * pygnulib/GLConfig.py (GLConfig.__init__): Remove wrong type check of
18983         witness_c_macro argument.
18985 2022-08-05  Bruno Haible  <bruno@clisp.org>
18987         gnulib-tool.py: Don't initialize local variables too early.
18988         * gnulib-tool.py (main): Initialize each local variable in one place.
18989         I prefer to have pylint tell me about uninitialized variables than to
18990         get the value None at runtime.
18992         gnulib-tool.py: Finish implementing option --po-domain.
18993         * gnulib-tool.py (main): Accept option --po-domain.
18994         * pygnulib/GLEmiter.py (GLEmiter.po_POTFILES_in): Fix variable
18995         reference.
18996         * pygnulib/GLImport.py (GLImport.execute): Don't delete Makefile.in.in
18997         from the gnulib directory. Don't require a shell when invoking wget.
18998         After invoking wget, restore the current directory.
19000         gnulib-tool.py: Finish implementing option --macro-prefix.
19001         * gnulib-tool.py (main): Accept option --macro-prefix.
19003         gnulib-tool.py: Refactor --makefile-name option.
19004         * gnulib-tool.py (main): Handle option --makefile-name like all other
19005         string-valued options.
19007         gnulib-tool.py: Implement option --no-libtool.
19008         * gnulib-tool.py (main): Accept option --no-libtool.
19010         gnulib-tool.py: Remove redundant type checks.
19011         * pygnulib/GLConfig.py (GLConfig.__init__): Remove redundant type
19012         checks, left over from 2022-08-04.
19013         (GLConfig.getIncludeGuardPrefix): Improve comment.
19014         (GLConfig.resetMacroPrefix): Optimize.
19016         gnulib-tool.py: Refactor --makefile-name option.
19017         * gnulib-tool.py (main): Rename variable 'makefile' to 'makefile_name'.
19018         * pygnulib/GLConfig.py: Rename attribute 'makefile' to 'makefile_name'.
19019         * pygnulib/GLMakefileTable.py: Update.
19020         * pygnulib/GLEmiter.py: Likewise.
19021         * pygnulib/GLImport.py: Likewise.
19022         * pygnulib/GLFileSystem.py (GLFileAssistant): Remove unused assignment.
19024         gnulib-tool.py: Fix link_if_changed function.
19025         * pygnulib/constants.py (joinpath): Fix comment.
19026         (as_link_value_at_dest): New function, extracted from link_relative.
19027         (link_relative): Use it.
19028         (link_if_changed): Really don't replace the symbolic link if it does not
19029         need to change.
19031         gnulib-tool.py: Fix 'Unused import' warnings.
19032         * gnulib-tool.py: Remove unused imports.
19033         * pygnulib/*.py: Likewise.
19035         gnulib-tool.py: Fix 'Undefined variable' errors.
19036         * pygnulib/constants.py: Import codecs.
19037         * pygnulib/GLConfig.py (GLConfig.setLibName): Fix local variable
19038         reference.
19039         * pygnulib/GLFileSystem.py (GLFileSystem.lookup,
19040         GLFileAssistant.update): Fix local variable references.
19041         * pygnulib/GLEmiter.py (GLEmiter.po_POTFILES_in): Fix reference.
19042         * pygnulib/GLTestDir.py (GLMegaTestDir.execute): Define missing local
19043         variables.
19045         gnulib-tool.py: Make option --version work.
19046         * pygnulib/constants.py (__copyright__): Bump copyright year.
19047         * pygnulib/GLInfo.py (GLInfo.authors): Add a comma after the
19048         second-to-last author.
19049         (GLInfo.copyright): Show only the last modification year.
19050         (GLInfo.date): Check whether git and GNU date are available. Use
19051         'git log ChangeLog', not 'git log'. Run 'git log' in the gnulib
19052         directory, not in the current directory. Search for 'Date:' only at the
19053         beginning of a line. As a fallback, look at the first ChangeLog entry.
19054         (GLInfo.version): Check whether git is available. Run git-version-gen in
19055         the gnulib directory, not in the current directory. Replace '-dirty'
19056         with '-modified'. As a fallback, return the empty string.
19057         * gnulib-tool.py (main) [--version]: Add a space before the version.
19059         gnulib-tool.py: Simplify.
19060         * pygnulib/constants.py (compiler): Remove function.
19061         * gnulib-tool.py: Use re.compile directly instead.
19062         * pygnulib/*.py: Likewise.
19064 2022-08-04  Bruno Haible  <bruno@clisp.org>
19066         gnulib-tool.py: Fix typo.
19067         * pygnulib/GLImport.py (GLImport.execute): Actually handle file
19068         removals.
19070         gnulib-tool.py: Coding style: Revisit line breaks.
19071         * gnulib-tool.py: Avoid line breaks at arbitrary points inside
19072         expressions. Use line breaks to clarify [... for ...] iterations.
19073         * pygnulib/*.py: Likewise.
19075         gnulib-tool.py: Simplify boolean setters.
19076         * pygnulib/GLConfig.py (setLibtool): New method, replaces enableLibtool
19077         and disableLibtool.
19078         (setCondDeps): New method, replaces enableCondDeps and disableCondDeps.
19079         (setVCFiles): New method, replaces enableVCFiles and disableVCFiles.
19080         (setSymbolic): New method, replaces enableSymbolic and disableSymbolic.
19081         (setLSymbolic): New method, replaces enableLSymbolic and
19082         disableLSymbolic.
19083         (setLibtests): New method, replaces enableLibtests and disableLibtests.
19084         (setSingleConfigure): New method, replaces enableSingleConfigure and
19085         disableSingleConfigure.
19086         (setDryRun): New method, replaces enableDryRun and disableDryRun.
19087         (setErrors): New method, replaces enableErrors and disableErrors.
19088         (__init__): Update.
19089         * pygnulib/GLImport.py: Likewise.
19090         * pygnulib/GLTestDir.py: Likewise.
19092         gnulib-tool.py: Implement options --cache-modules, --no-cache-modules.
19093         * gnulib-tool.py (main): Accept options --cache-modules,
19094         --no-cache-modules.
19095         * pygnulib/GLConfig.py: Remove modcache property and constructor
19096         argument.
19097         * pygnulib/GLInfo.py (GLInfo.usage): Don't document these no-op options.
19099         gnulib-tool.py: Use mainstream/GNU coding style.
19100         * gnulib-tool.py: Break lines before the % operator, not after.
19101         * pygnulib/*.py: Likewise. Avoid line breaks when the resulting lines
19102         are not too long.
19104         gnulib-tool.py: Follow gnulib-tool changes, part 24.
19105         Follow gnulib-tool change
19106         2017-02-19  Bruno Haible  <bruno@clisp.org>
19107         gnulib-tool: Avoid conflict of havelib-tests with --single-configure.
19108         * pygnulib/GLTestDir.py (GLTestDir.__init__): Don't allocate the
19109         GLModuleTable here.
19110         (GLTestDir.execute): Do it here. Avoid havelib-tests when
19111         --with-tests --single-configure is specified.
19113         gnulib-tool.py: Respect the specified module list.
19114         * pygnulib/GLTestDir.py (GLTestDir.execute): Don't remove specific
19115         modules (ftruncate, mountlist, etc.) from the specified module list.
19117         gnulib-tool.py: Implement option --avoid.
19118         * pygnulib/GLModuleSystem.py (GLModuleTable.__init__): Compute the
19119         effective avoids list here.
19120         (GLModuleTable.transitive_closure, GLModuleTable.add_dummy): Consider
19121         the avoids list.
19122         * pygnulib/GLImport.py (GLImport.gnulib_cache): Use the avoids list from
19123         GLConfig directly.
19124         (GLImport.prepare): No need any more to set the avoids list in the
19125         GLModuleTable.
19127         gnulib-tool.py: Make --with/--without-*-tests handling a little safer.
19128         * pygnulib/GLConfig.py (__init__): Fix reset* invocations.
19129         setInclTestCategories, setExclTestCategories): Revert to old value if
19130         the new value is invalid.
19132 2022-08-03  Bruno Haible  <bruno@clisp.org>
19134         gnulib-tool.py: Implement option --single-configure.
19135         * gnulib-tool.py (main): Accept option --single-configure. Pass its
19136         value to the GLConfig constructor.
19137         * pygnulib/GLTestDir.py (GLTestDir.execute): Remove debugging output.
19139         gnulib-tool.py: Implement options --without-c++-tests etc.
19140         * gnulib-tool.py (main): Accept options --without-c++-tests,
19141         --without-longrunning-tests, --without-privileged-tests,
19142         --without-unportable-tests.
19143         Improve error message for --copy-file with invalid number of arguments.
19144         Check for invalid options given in --import, --add-import,
19145         --remove-import, --update modes.
19146         Pass both sets of test categories to the GLConfig constructor.
19147         * pygnulib/GLConfig.py (GLConfig.__init__): Accept incl_test_categories
19148         and excl_test_categories instead of testflags.
19149         (checkInclTestCategory): Renamed from checkTestFlag.
19150         (enableInclTestCategory): Renamed from enableTestFlag.
19151         (disableInclTestCategory): Renamed from disableTestFlag.
19152         (getInclTestCategories): Renamed from getTestFlags.
19153         (setInclTestCategories): Renamed from setTestFlags.
19154         (resetInclTestCategories): Renamed from resetTestFlags.
19155         (setInclTestCategory, checkExclTestCategory, enableExclTestCategory,
19156         disableExclTestCategory, getExclTestCategories, setExclTestCategories,
19157         resetExclTestCategories): New methods.
19158         * pygnulib/GLModuleSystem.py (GLModuleTable.__init__): Accept two
19159         booleans as second and third constructor arguments.
19160         (transitive_closure): Correct the determination of whether to include
19161         each module, depending on the with-* and without-* options.
19162         (transitive_closure_separately): Update.
19163         * pygnulib/GLMakefileTable.py: Update.
19164         * pygnulib/GLImport.py (__init__, actioncmd, gnulib_cache, execute):
19165         Update.
19166         * pygnulib/GLTestDir.py (GLTestDir.__init__, GLTestDir.execute,
19167         GLMegaTestDir.__init__): Update.
19169         gnulib-tool.py: Implement option --without-tests.
19170         * gnulib-tool.py (main): Accept option --without-tests.
19172         gnulib-tool.py: Fix broken 'for' loop.
19173         * gnulib-tool.py (main): Canonicalize inctests before creating the
19174         GLConfig. Rewrite a broken 'for' loop.
19175         * pygnulib/GLConfig.py (GLConfig.setTestFlags): Remove unused statement.
19177         gnulib-tool.py: Follow gnulib-tool changes, part 23.
19178         Follow gnulib-tool changes
19179         2016-11-11  Bruno Haible  <bruno@clisp.org>
19180         gnulib-tool: Support for the dual "LGPLv3+ or GPLv2" license.
19181         2016-12-02  Nikos Mavrogiannopoulos <nmav@gnutls.org>
19182         gnulib-tool (func_import): Adhere to the license guideline ...
19183         2016-12-02  Daiki Ueno  <ueno@gnu.org>
19184         gnulib-tool (func_import): Relax the regex ...
19185         * gnulib-tool.py: For --lgpl, accept value 3orGPLv2.
19186         * pygnulib/GLInfo.py (GLInfo.usage): Update.
19187         * pygnulib/GLConfig.py (GLConfig.setLGPL): Update argument check.
19188         * pygnulib/GLImport.py (GLImport.__init__, GLImport.gnulib_cache):
19189         Update gl_LGPL handling.
19190         (GLImport.prepare): Update license compatibility checks and license
19191         header rewriting.
19192         * pygnulib/GLTestDir.py (GLTestDir.execute): Update license
19193         compatibility checks. Handle also the licenses GPLv3+, GPL, LGPLv3+.
19195         gnulib-tool.py: Fix unjustified "incompatible license" warnings.
19196         * pygnulib/GLTestDir.py (GLTestDir.execute): Don't emit a warning when
19197         the dependency module has a license such as "public domain" or
19198         "unlimited".
19200         gnulib-tool.py: Follow gnulib-tool changes, part 22.
19201         Follow gnulib-tool change
19202         2016-10-15  Bruno Haible  <bruno@clisp.org>
19203         Avoid gnulib-tool warnings about the dependencies of 'parse-datetime'.
19204         * pygnulib/GLModuleSystem.py (GLModule.getLicense): Special-case the
19205         'parse-datetime' module.
19207         gnulib-tool.py: Follow gnulib-tool changes, part 21.
19208         Follow gnulib-tool change
19209         2016-10-16  Bruno Haible  <bruno@clisp.org>
19210         gnulib-tool: Make --create-testdir on all modules work again.
19211         * pygnulib/GLTestDir.py (GLTestDir.execute): Don't include the
19212         non-recursive-gnulib-prefix-hack module.
19214         gnulib-tool.py: Follow gnulib-tool changes, part 20.
19215         Follow gnulib-tool changes
19216         2016-01-15  Paul Eggert  <eggert@cs.ucla.edu>
19217         gnulib-tool: don't assume ln -s works
19218         2016-01-24  Paul Eggert  <eggert@cs.ucla.edu>
19219         gnulib-tool: don't give up on ln -s so easily
19220         2017-06-08  Bruno Haible  <bruno@clisp.org>
19221         gnulib-tool: Fix bug in func_ln_s, from 2016-01-15.
19222         * pygnulib/constants.py (symlink_relative): New function.
19223         (link_relative): Use it instead of os.symlink.
19225         gnulib-tool.py: Avoid errors when writing to a VFAT file system, part 2.
19226         * pygnulib/constants.py (movefile): New function.
19227         * pygnulib/*.py: Use it instead of shutil.
19229         gnulib-tool.py: Avoid errors when writing to a VFAT file system.
19230         * pygnulib/constants.py (copyfile, copyfile2): New functions.
19231         * gnulib-tool.py: Use them instead of shutil.
19232         * pygnulib/*.py: Likewise.
19234         gnulib-tool.py: Fix typo.
19235         * pygnulib/GLImport.py (GLImport.__init__): Use the relative auxdir as
19236         second, not as first argument of joinpath.
19238 2022-07-31  Bruno Haible  <bruno@clisp.org>
19240         gnulib-tool.py: Fix typo.
19241         * pygnulib/GLTestDir.py (GLMegaTestDir.execute): Invoke os.mkdir as
19242         intended.
19244         gnulib-tool.py: Improve some error messages.
19245         * gnulib-tool.py (main): Write "*** Stop." instead of "*** Exit.".
19246         (__main__): Print an error message for GLError 5, 13, 14, 15, 16, 17, 18.
19247         * pygnulib/GLError.py (GLError.__repr__): Compute one error message,
19248         not 19.
19250         gnulib-tool.py: Write errors to stderr, not stdout.
19251         * pygnulib/constants.py: Write error messages to stderr, not stdout.
19253         gnulib-tool.py: Use mainstream coding style.
19254         * pygnulib/GLConfig.py: Use 'raise' to re-throw an exception.
19256         gnulib-tool.py: Implement options --symlink and --local-symlink.
19257         * gnulib-tool.py (main): Handle options --symlink and --local-symlink.
19258         * pygnulib/constants.py (link_if_changed): Ignore FileNotFoundError from
19259         os.remove call.
19261         gnulib-tool.py: Make --copy-file work.
19262         * gnulib-tool.py (main) [copy-file]: Fix reference to uninitialized
19263         variable. Fix error handling of os.makedirs. Pass the destdir to the
19264         GLFileAssistant.
19266         gnulib-tool.py: Allow module arguments to occur at any position.
19267         * gnulib-tool.py (main): Collect the non-option arguments in a single
19268         list, regardless of their position. Use parse_known_args instead of
19269         parse_args, and give an error message about unknown options ourselves.
19270         * gnulib-tool: Fix typo in error message.
19272         gnulib-tool.py: Make --test behaviour more similar to gnulib-tool.
19273         * gnulib-tool.py (main) [test]: Remove space from the testdir name.
19275         gnulib-tool: Clarify that --test allows zero module arguments.
19276         * gnulib-tool (func_usage): Mark the modules for --test as optional.
19277         * pygnulib/GLInfo.py (GLInfo.usage): Likewise.
19279         gnulib-tool.py: Make option processing more similar to gnulib-tool.
19280         * gnulib-tool.py (main): Allow --add-import and --remove-import with 0
19281         modules.
19283         gnulib-tool.py: Improve compliance with GNU standards.
19284         * gnulib-tool.py (main): Handle --help and --version before testing for
19285         conflicting modes.
19287         gnulib-tool.py: Emit error message when conflicting modes are specified.
19288         * gnulib-tool.py (main): Fix test of conflicting modes. (Some options
19289         produce a value of [], and as a condition, [] evaluates to False.)
19291         gnulib-tool.py: Remove most short options.
19292         * gnulib-tool.py (main): Reorder the list of options. Remove most short
19293         options, for consistency with gnulib-tool.
19295         gnulib-tool.py: Follow gnulib-tool changes, part 19.
19296         Follow gnulib-tool changes
19297         2015-12-09  Pavel Raiskup  <praiskup@redhat.com>
19298         gnulib-tool: allow multiple --local-dir usage
19299         2019-02-14  Bruno Haible  <bruno@clisp.org>
19300         gnulib-tool: Improve handling of multiple --local-dir options.
19301         * gnulib-tool (func_reconstruct_cached_dir): When the argument is
19302         absolute, return it unmodified.
19303         (func_compute_relative_local_gnulib_path): Renamed from
19304         func_count_relative_local_gnulib_path. Add comment.
19305         * gnulib-tool.py: Accept multiple --local-dir options and collect the
19306         values into localpath.
19307         * pygnulib/GLConfig.py: Take a localpath argument instead of a localdir
19308         argument.
19309         (getLocalDir, setLocalDir, resetLocalDir): Remove methods.
19310         (getLocalPath, setLocalPath, resetLocalPath): New methods.
19311         * pygnulib/GLFileSystem.py (CopyAction): New class.
19312         (GLFileSystem.lookup): Consider all dirs in localpath.
19313         (GLFileSystem.shouldLink): New method.
19314         (GLFileAssistant): Use shouldLink.
19315         * pygnulib/GLModuleSystem.py (GLModuleSystem.exists): Iterate over all
19316         dirs in localpath.
19317         (GLModuleSystem.list): Likewise.
19318         * pygnulib/GLEmiter.py: Update.
19319         * pygnulib/GLImport.py (GLImport.__init__): Put the argument of
19320         gl_LOCAL_DIR into localpath, not localdir.
19321         (GLImport.actioncmd): Consider all dirs in localpath.
19322         (GLImport.relative_to_destdir, GLImport.relative_to_currdir): New
19323         methods.
19324         (GLImport.gnulib_cache): Combine all dirs in localpath. Use
19325         self.relative_to_destdir.
19326         * pygnulib/GLTestDir.py (GLTestDir.execute): Use shouldLink.
19328         gnulib-tool.py: Improve the primitives for relative file names.
19329         * pygnulib/constants.py (relativize): Don't attempt to handle absolute
19330         file names. Fix bug with relativize('../foo/bar', '../foo/bla/zut').
19331         (relconcat): New function.
19333         gnulib-tool.py: Follow gnulib-tool changes, part 18.
19334         Follow gnulib-tool change
19335         2005-09-20  Bruno Haible  <bruno@clisp.org>
19336         gnulib-tool: Remove trailing slashes
19337         * pygnulib/constants.py (remove_trailing_slashes): New function.
19338         * pygnulib/GLConfig.py (GLConfig): Use it in the setters.
19340 2022-07-31  Bruno Haible  <bruno@clisp.org>
19342         avltree-omap, avltree-oset, avltreehash-list, rbtree-omap: Pacify GCC.
19343         * lib/gl_avltree_omap.c (gl_avltree_omap_check_invariants): Add extern
19344         decl.
19345         * lib/gl_avltree_oset.c (gl_avltree_oset_check_invariants): Likewise.
19346         * lib/gl_avltreehash_list.c (gl_avltreehash_list_check_invariants):
19347         Likewise.
19348         * lib/gl_rbtree_omap.c (gl_rbtree_omap_check_invariants): Likewise.
19350 2022-07-31  Paul Eggert  <eggert@cs.ucla.edu>
19352         rbtree-oset, rbtreehash-list: Pacify GCC
19353         * lib/gl_rbtree_oset.c (gl_rbtree_oset_check_invariants):
19354         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_check_invariants):
19355         Add extern decls, to pacify --enable-gcc-warnings with Bison.
19357 2022-07-31  Akim Demaille  <akim@lrde.epita.fr>
19359         gnulib-tool: add support for --automake-subdir-tests
19360         <https://lists.gnu.org/r/bug-gnulib/2022-01/msg00111.html>
19361         * gnulib-tool (main): Handle --automake-subdir-tests.
19362         (func_emit_shellvars_init, func_emit_lib_Makefile_am): Use
19363         $sourcebase when handling tests and --automake-subdir-tests is
19364         given.
19365         (func_append_actionarg): Support --automake-subdir-tests.
19366         (func_create_testdir): Add missing argument for func_emit_initmacro_end.
19368 2022-07-31  Bruno Haible  <bruno@clisp.org>
19370         gendocs.sh: Fix error when invoking 'perl' (regression 2022-07-23).
19371         * build-aux/gendocs.sh (PERL): Use double-quotes, not single-quotes.
19373 2022-07-30  Bruno Haible  <bruno@clisp.org>
19375         gnulib-tool.py: Clean up imports.
19376         * gnulib-tool.py: Remove unused constants.
19377         * pygnulib/*.py: Likewise.
19379         gnulib-tool.py: Assume Python 3.
19380         * gnulib-tool.py: Don't allow 'bytes' as an alternative to 'str'.
19381         * pygnulib/*.py: Likewise.
19383         gnulib-tool.py: Assume Python 3.
19384         * gnulib-tool.py: Don't set PYTHON3, string. Use str instead of string.
19385         * pygnulib/*.py: Likewise.
19387         gnulib-tool.py: Modernize coding style.
19388         * pygnulib/*.py: Remove parentheses around raise value expressions.
19390 2022-07-30  Bruno Haible  <bruno@clisp.org>
19392         doc: Update regarding bootstrap split.
19393         Reported by Paul Smith <psmith@gnu.org>.
19394         * doc/gnulib-tool.texi (gettextize and autopoint): Mention autogen.sh
19395         instead of bootstrap.
19396         (VCS Issues): Describe three alternative approaches.
19397         * doc/gnulib.texi (Developer tools): Mention also autopull.sh and
19398         autogen.sh.
19399         * top/bootstrap (usage): Fix copy&paste mistake.
19401 2022-07-29  Bruno Haible  <bruno@clisp.org>
19403         gnulib-tool.py: Follow gnulib-tool changes, part 17.
19404         Follow gnulib-tool change
19405         2015-10-06  Pavel Raiskup  <praiskup@redhat.com>
19406         gnulib-tool: fix tests of 'extensions' module
19407         * pygnulib/GLEmiter.py (GLEmiter.preEarlyMacros): New function.
19408         * pygnulib/GLImport.py (GLImport.gnulib_comp): Invoke it.
19409         * pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
19411         gnulib-tool.py: Follow gnulib-tool changes, part 16.
19412         Follow gnulib-tool change
19413         2015-09-25  Pavel Raiskup  <praiskup@redhat.com>
19414         gnulib-common.m4: fix gl_PROG_AR_RANLIB/AM_PROG_AR clash
19415         * pygnulib/GLImport.py (GLImport.gnulib_comp): Put the
19416         gl_USE_SYSTEM_EXTENSIONS right before gl_PROG_AR_RANLIB into
19417         gnulib-comp.m4 (if the 'extensions' module is used).
19419         gnulib-tool.py: Modernize coding style.
19420         * pygnulib/*.py: Remove parentheses around return value expressions.
19422         gnulib-tool.py: Modernize the file headers.
19423         * pygnulib/*.py: Remove '#!/usr/bin/python' (not needed) and
19424         'encoding: UTF-8' lines (default in Python 3). Add copyright notice.
19426         gnulib-tool.py: Use mainstream coding style.
19427         * gnulib-tool.py: Clarify the coding style. Fix some pycodestyle
19428         warnings.
19429         * pygnulib/constants.py: Likewise.
19430         * pygnulib/GLEmiter.py: Likewise.
19431         * pygnulib/GLImport.py: Likewise.
19432         * pygnulib/GLMakefileTable.py: Likewise.
19434 2022-07-29  Bruno Haible  <bruno@clisp.org>
19436         gnulib-tool.py: Fix error (regression 2021-04-11).
19437         * pygnulib/GLConfig.py (GLConfig.getModuleIndicatorPrefix): Fix code.
19439         gnulib-tool.py: Fix warning from Python 3.10.4.
19440         * pygnulib/GLModuleSystem.py (getConditionalName): Fix a string
19441         substitution expression.
19443         gnulib-tool.py: Fix error in Ubuntu 22.04.
19444         * gnulib-tool.py: Search for python3 in $PATH.
19446 2022-07-25  Bruno Haible  <bruno@clisp.org>
19448         bootstrap: Make the automatic sync more resilient.
19449         Reported by Paul Eggert in
19450         <https://lists.gnu.org/archive/html/bug-gnulib/2022-07/msg00060.html>.
19451         * top/bootstrap (bootstrap_sync): Set to true when bootstrap-funclib.sh
19452         is not present.
19453         * top/gen-bootstrap.sed: Insert a couple of comment lines.
19454         * build-aux/bootstrap: Regenerated using "make build-aux/bootstrap".
19456 2022-07-24  Bruno Haible  <bruno@clisp.org>
19458         Fix comment.
19459         Reported by Paul Eggert in
19460         <https://lists.gnu.org/archive/html/bug-gnulib/2022-07/msg00058.html>.
19461         * top/bootstrap-funclib.sh: Fix comment about canonical location.
19462         * top/autopull.sh: Likewise.
19463         * top/autogen.sh: Likewise.
19464         * top/bootstrap: Likewise.
19466         Split bootstrap into autopull.sh and autogen.sh.
19467         * top/bootstrap-funclib.sh: New file, based on build-aux/bootstrap.
19468         * top/autopull.sh: New file, based on build-aux/bootstrap.
19469         * top/autogen.sh: New file, based on build-aux/bootstrap.
19470         * top/bootstrap: New file, based on build-aux/bootstrap.
19471         * top/gen-bootstrap.sed: New file.
19472         * Makefile (build-aux/bootstrap): New rule.
19473         (regen): Depend on it.
19474         * build-aux/bootstrap: Regenerated using "make build-aux/bootstrap".
19476 2022-07-24  Bruno Haible  <bruno@clisp.org>
19478         bootstrap: Obey another environment variable GNULIB_REFDIR.
19479         * build-aux/bootstrap (usage): Document option --gnulib-refdir and
19480         environment variable GNULIB_REFDIR.
19481         Accept option --gnulib-refdir.
19482         When GNULIB_SRCDIR is specified, verify that it denotes a directory.
19483         Use $GNULIB_REFDIR, not $GNULIB_SRCDIR, as argument to git's --reference
19484         option.
19485         Improve an error message.
19486         * NEWS: Mention the change.
19488 2022-07-23  Bruno Haible  <bruno@clisp.org>
19490         Fix a couple of ShellCheck warnings.
19491         * MODULES.html.sh (sed_escape_slash): Remove unused variable.
19492         * build-aux/bootstrap: Avoid computed printf format strings.
19493         * build-aux/do-release-commit-and-tag: Likewise.
19494         * build-aux/gendocs.sh: Likewise.
19495         * build-aux/declared.sh: Fix "unrecognized option" message.
19496         * gnulib-tool (supplied_opts): Remove unused variable.
19497         (--single-con): Remove redundant option recognition.
19498         * tests/test-parse-duration.sh (nl): Remove unused variable.
19499         * tests/test-update-copyright.sh: Use double-quotes instead of
19500         single-quotes.
19502 2022-07-23  Bruno Haible  <bruno@clisp.org>
19504         Avoid DoS vulnerability through unsafe default assignment.
19505         See https://www.shellcheck.net/wiki/SC2223 .
19506         * MODULES.html.sh (func_tmpdir): Surround default assignment with
19507         double-quotes.
19508         * build-aux/bootstrap: Likewise.
19509         * build-aux/csharpcomp.sh.in (func_tmpdir): Likewise.
19510         * build-aux/gendocs.sh: Likewise.
19511         * build-aux/libtool-next-version (func_tmpdir): Likewise.
19512         * config/srclist-update: Likewise.
19513         * gnulib-tool (func_tmpdir): Likewise.
19514         * posix-modules (func_tmpdir): Likewise.
19515         * tests/test-atexit.sh: Likewise.
19516         * tests/test-btoc32-1.sh: Likewise.
19517         * tests/test-btoc32-2.sh: Likewise.
19518         * tests/test-btowc1.sh: Likewise.
19519         * tests/test-btowc2.sh: Likewise.
19520         * tests/test-c-dtoastr.sh: Likewise.
19521         * tests/test-c-ldtoastr.sh: Likewise.
19522         * tests/test-c-snprintf.sh: Likewise.
19523         * tests/test-c-strcase.sh: Likewise.
19524         * tests/test-c-vasprintf.sh: Likewise.
19525         * tests/test-c-vsnprintf.sh: Likewise.
19526         * tests/test-c-xvasprintf.sh: Likewise.
19527         * tests/test-c32isalnum.sh: Likewise.
19528         * tests/test-c32isalpha.sh: Likewise.
19529         * tests/test-c32isblank.sh: Likewise.
19530         * tests/test-c32iscntrl.sh: Likewise.
19531         * tests/test-c32isdigit.sh: Likewise.
19532         * tests/test-c32isgraph.sh: Likewise.
19533         * tests/test-c32islower.sh: Likewise.
19534         * tests/test-c32isprint.sh: Likewise.
19535         * tests/test-c32ispunct.sh: Likewise.
19536         * tests/test-c32isspace.sh: Likewise.
19537         * tests/test-c32isupper.sh: Likewise.
19538         * tests/test-c32isxdigit.sh: Likewise.
19539         * tests/test-c32rtomb.sh: Likewise.
19540         * tests/test-c32snrtombs-1.sh: Likewise.
19541         * tests/test-c32snrtombs-2.sh: Likewise.
19542         * tests/test-c32snrtombs-3.sh: Likewise.
19543         * tests/test-c32snrtombs-4.sh: Likewise.
19544         * tests/test-c32srtombs-1.sh: Likewise.
19545         * tests/test-c32srtombs-2.sh: Likewise.
19546         * tests/test-c32srtombs-3.sh: Likewise.
19547         * tests/test-c32srtombs-4.sh: Likewise.
19548         * tests/test-c32stombs-1.sh: Likewise.
19549         * tests/test-c32stombs-2.sh: Likewise.
19550         * tests/test-c32stombs-3.sh: Likewise.
19551         * tests/test-c32stombs-4.sh: Likewise.
19552         * tests/test-closein.sh: Likewise.
19553         * tests/test-copy-acl.sh (func_tmpdir): Likewise.
19554         * tests/test-copy-file.sh (func_tmpdir): Likewise.
19555         * tests/test-dprintf-posix.sh: Likewise.
19556         * tests/test-execl.sh: Likewise.
19557         * tests/test-execle.sh: Likewise.
19558         * tests/test-execlp.sh: Likewise.
19559         * tests/test-execv.sh: Likewise.
19560         * tests/test-execve.sh: Likewise.
19561         * tests/test-execvp.sh: Likewise.
19562         * tests/test-execvpe.sh: Likewise.
19563         * tests/test-file-has-acl.sh (func_tmpdir): Likewise.
19564         * tests/test-fprintf-posix.sh: Likewise.
19565         * tests/test-init.sh: Likewise.
19566         * tests/test-iswdigit.sh: Likewise.
19567         * tests/test-iswxdigit.sh: Likewise.
19568         * tests/test-mbmemcasecmp1.sh: Likewise.
19569         * tests/test-mbmemcasecmp2.sh: Likewise.
19570         * tests/test-mbmemcasecmp3.sh: Likewise.
19571         * tests/test-mbmemcasecoll1.sh: Likewise.
19572         * tests/test-mbmemcasecoll2.sh: Likewise.
19573         * tests/test-mbmemcasecoll3.sh: Likewise.
19574         * tests/test-mbrtoc32-1.sh: Likewise.
19575         * tests/test-mbrtoc32-2.sh: Likewise.
19576         * tests/test-mbrtoc32-3.sh: Likewise.
19577         * tests/test-mbrtoc32-4.sh: Likewise.
19578         * tests/test-mbrtowc1.sh: Likewise.
19579         * tests/test-mbrtowc2.sh: Likewise.
19580         * tests/test-mbrtowc3.sh: Likewise.
19581         * tests/test-mbrtowc4.sh: Likewise.
19582         * tests/test-mbscasecmp.sh: Likewise.
19583         * tests/test-mbscasestr2.sh: Likewise.
19584         * tests/test-mbscasestr3.sh: Likewise.
19585         * tests/test-mbscasestr4.sh: Likewise.
19586         * tests/test-mbschr.sh: Likewise.
19587         * tests/test-mbscspn.sh: Likewise.
19588         * tests/test-mbsinit.sh: Likewise.
19589         * tests/test-mbsncasecmp.sh: Likewise.
19590         * tests/test-mbsnrtoc32s-1.sh: Likewise.
19591         * tests/test-mbsnrtoc32s-2.sh: Likewise.
19592         * tests/test-mbsnrtoc32s-3.sh: Likewise.
19593         * tests/test-mbsnrtoc32s-4.sh: Likewise.
19594         * tests/test-mbsnrtowcs1.sh: Likewise.
19595         * tests/test-mbsnrtowcs2.sh: Likewise.
19596         * tests/test-mbsnrtowcs3.sh: Likewise.
19597         * tests/test-mbsnrtowcs4.sh: Likewise.
19598         * tests/test-mbspbrk.sh: Likewise.
19599         * tests/test-mbspcasecmp.sh: Likewise.
19600         * tests/test-mbsrchr.sh: Likewise.
19601         * tests/test-mbsrtoc32s-1.sh: Likewise.
19602         * tests/test-mbsrtoc32s-2.sh: Likewise.
19603         * tests/test-mbsrtoc32s-3.sh: Likewise.
19604         * tests/test-mbsrtoc32s-4.sh: Likewise.
19605         * tests/test-mbsrtowcs1.sh: Likewise.
19606         * tests/test-mbsrtowcs2.sh: Likewise.
19607         * tests/test-mbsrtowcs3.sh: Likewise.
19608         * tests/test-mbsrtowcs4.sh: Likewise.
19609         * tests/test-mbsspn.sh: Likewise.
19610         * tests/test-mbsstr2.sh: Likewise.
19611         * tests/test-mbsstr3.sh: Likewise.
19612         * tests/test-mbstoc32s-1.sh: Likewise.
19613         * tests/test-mbstoc32s-2.sh: Likewise.
19614         * tests/test-mbstoc32s-3.sh: Likewise.
19615         * tests/test-mbstoc32s-4.sh: Likewise.
19616         * tests/test-nl_langinfo.sh: Likewise.
19617         * tests/test-parse-duration.sh (func_tmpdir): Likewise.
19618         * tests/test-perror.sh: Likewise.
19619         * tests/test-printf-posix.sh: Likewise.
19620         * tests/test-set-mode-acl.sh (func_tmpdir): Likewise.
19621         * tests/test-setlocale1.sh: Likewise.
19622         * tests/test-strtod1.sh: Likewise.
19623         * tests/test-strtold1.sh: Likewise.
19624         * tests/test-unicodeio2.sh: Likewise.
19625         * tests/test-unicodeio3.sh: Likewise.
19626         * tests/test-vasnprintf-posix2.sh: Likewise.
19627         * tests/test-vc-list-files-cvs.sh: Likewise.
19628         * tests/test-vc-list-files-git.sh: Likewise.
19629         * tests/test-vdprintf-posix.sh: Likewise.
19630         * tests/test-vfprintf-posix.sh: Likewise.
19631         * tests/test-vprintf-posix.sh: Likewise.
19632         * tests/test-wcrtomb.sh: Likewise.
19633         * tests/test-wcsnrtombs1.sh: Likewise.
19634         * tests/test-wcsnrtombs2.sh: Likewise.
19635         * tests/test-wcsnrtombs3.sh: Likewise.
19636         * tests/test-wcsnrtombs4.sh: Likewise.
19637         * tests/test-wcsrtombs1.sh: Likewise.
19638         * tests/test-wcsrtombs2.sh: Likewise.
19639         * tests/test-wcsrtombs3.sh: Likewise.
19640         * tests/test-wcsrtombs4.sh: Likewise.
19641         * tests/test-xprintf-posix.sh: Likewise.
19642         * tests/test-xstrtoimax.sh: Likewise.
19643         * tests/test-xstrtol.sh: Likewise.
19644         * tests/test-xstrtoll.sh: Likewise.
19645         * tests/test-xstrtoumax.sh: Likewise.
19646         * tests/test-yesno.sh: Likewise.
19647         * tests/unicase/test-locale-language.sh: Likewise.
19648         * tests/unicase/test-ulc-casecmp1.sh: Likewise.
19649         * tests/unicase/test-ulc-casecmp2.sh: Likewise.
19650         * tests/unicase/test-ulc-casecoll1.sh: Likewise.
19651         * tests/unicase/test-ulc-casecoll2.sh: Likewise.
19652         * tests/unigbrk/test-ulc-grapheme-breaks.sh: Likewise.
19653         * tests/unistdio/test-u16-vasnprintf2.sh: Likewise.
19654         * tests/unistdio/test-u16-vasnprintf3.sh: Likewise.
19655         * tests/unistdio/test-u32-vasnprintf2.sh: Likewise.
19656         * tests/unistdio/test-u32-vasnprintf3.sh: Likewise.
19657         * tests/unistdio/test-u8-vasnprintf2.sh: Likewise.
19658         * tests/unistdio/test-u8-vasnprintf3.sh: Likewise.
19659         * tests/unistdio/test-ulc-vasnprintf2.sh: Likewise.
19660         * tests/unistdio/test-ulc-vasnprintf3.sh: Likewise.
19661         * tests/uniwbrk/test-ulc-wordbreaks.sh: Likewise.
19662         * tests/uniwidth/test-uc_width2.sh: Likewise.
19664 2022-07-18  Bruno Haible  <bruno@clisp.org>
19666         bootstrap: Comments.
19667         * build-aux/bootstrap: Comment about two unused variables.
19669 2022-07-17  Bruno Haible  <bruno@clisp.org>
19671         doc: Update README.
19672         * doc/README: Fix stale links (reported by Tzvetelin Katchov). Clarify
19673         the relation to build-aux/gnu-web-doc-update.
19675 2022-07-14  Bruno Haible  <bruno@clisp.org>
19677         doc: Fix typo.
19678         Reported by Eric Gallager <egall@gwmail.gwu.edu> in
19679         <https://lists.gnu.org/archive/html/bug-gnulib/2022-07/msg00045.html>.
19680         * doc/posix-functions/mmap.texi: Add parenthesis.
19682 2022-07-12  Paul Eggert  <eggert@cs.ucla.edu>
19684         parse-datetime: improve doc for TZ="<-07>7" etc.
19685         * doc/parse-datetime.texi (Specifying time zone rules):
19686         Give examples of POSIX TZ strings that specify UTC offsets (Bug#56524).
19688 2022-07-10  Bruno Haible  <bruno@clisp.org>
19690         sigsegv: Optimize stackvma implementation for AIX 7.
19691         Reported by Neha Jain <nehajain29@in.ibm.com> in
19692         <https://lists.gnu.org/archive/html/bug-m4/2022-06/msg00005.html>
19693         via Eric Blake.
19694         * lib/stackvma.c: For AIX, add implementation that uses /proc/$pid/map,
19695         based on lib/vma-iter.c.
19696         (sigsegv_get_vma): Use it on AIX 7 or higher.
19698 2022-07-10  Bruno Haible  <bruno@clisp.org>
19700         vma-iter: Add support for AIX 7.
19701         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define also on AIX.
19702         * lib/vma-iter.c (vma_iterate): Add code for AIX, known to work on
19703         AIX 7.
19704         * lib/get-rusage-as.c: Update comments.
19705         * lib/get-rusage-data.c: Likewise.
19706         * tests/test-get-rusage-as.c (main): Take into account the special
19707         address space organization on AIX in 32-bit mode.
19709 2022-07-10  Bruno Haible  <bruno@clisp.org>
19711         iconv: Define a summary result.
19712         Reported by Simon Josefsson in
19713         <https://lists.gnu.org/archive/html/bug-gnulib/2022-07/msg00020.html>.
19714         * m4/iconv.m4 (AM_ICONV): Define also am_cv_func_iconv_summary.
19716 2022-07-10  Bruno Haible  <bruno@clisp.org>
19718         iconv: Remove obsolete comment.
19719         * m4/iconv.m4 (AM_ICONV): Remove comment that is obsolete since
19720         2020-08-16.
19722 2022-07-10  Bruno Haible  <bruno@clisp.org>
19724         announce-gen: Fix internationalization in verification instructions.
19725         * build-aux/announce-gen: Set LC_ALL, not LANG, to "C", to force English
19726         output from gpg.
19728 2022-07-10  Bruno Haible  <bruno@clisp.org>
19730         lib-symbol-visibility: Improve documentation.
19731         * doc/lib-symbol-visibility.texi: Tweak BUILDING_SHARED snippet.
19733 2022-07-10  Bruno Haible  <bruno@clisp.org>
19735         doc: Mark Minix as no longer tested.
19736         Rationale: No commits since 2018 at https://git.minix3.org/.
19737         Reported by Paul Eggert and Jim Meyering in
19738         <https://lists.gnu.org/archive/html/grep-devel/2022-07/msg00027.html>.
19739         * doc/gnulib-intro.texi (Supported Platforms): Mark Minix as no longer
19740         tested.
19742 2022-07-09  Jim Meyering  <meyering@fb.com>
19744         announce-gen: better diagnose some usage errors
19745         * build-aux/announce-gen (main): Erroneous usage would elicit a
19746         misleading diagnostic. When --gnulib-version=V was specified:
19747         - without --bootstrap_tools, or
19748         - with --bootstrap_tools, but without listing "gnulib" as a tool
19749         we would give an inappropriate diagnostic. Now, each diagnostic
19750         is tailored to the precise erroneous condition.
19751         Reported by Bruno Haible in
19752         https://lists.gnu.org/r/bug-gnulib/2022-01/msg00025.html
19754 2022-07-09  Simon Josefsson  <simon@josefsson.org>
19756         git-version-gen: Doc fix.
19757         Reported by Reuben Thomas <rrt@sc3d.org> in
19758         <https://lists.gnu.org/archive/html/bug-gnulib/2022-04/msg00012.html>.
19759         * build-aux/git-version-gen (usage): Replace incorrect text with
19760         bug report instructions.
19762 2022-07-09  Simon Josefsson  <simon@josefsson.org>
19764         announce-gen: Improve GnuPG verification instructions.
19765         * build-aux/announce-gen: Add GPG fingerprint to output, and a
19766         pointer to GNU keyring.
19768 2022-07-08  Simon Josefsson  <simon@josefsson.org>
19770         lib-symbol-visibility: Improve documentation.
19771         * doc/lib-symbol-visibility.texi: Include BUILDING_SHARED snippet
19772         suggested by Bruno Haible.
19774 2022-07-04  Bruno Haible  <bruno@clisp.org>
19776         havelib: Fix 'configure --help' output.
19777         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Fix m4 quoting bug.
19779 2022-07-03  Bruno Haible  <bruno@clisp.org>
19781         lib-symbol-visibility: Improve documentation.
19782         Reported by Vivien Kraus <vivien@planete-kraus.eu> in
19783         <https://lists.gnu.org/archive/html/bug-gnulib/2022-06/msg00093.html>.
19784         * doc/lib-symbol-visibility.texi: List the platforms. Extend the
19785         LIBFOO_DLL_EXPORTED to work also with mingw and also with
19786         --disable-shared.
19788 2022-07-03  Bruno Haible  <bruno@clisp.org>
19790         supersede: Support the file name "/dev/null" on native Windows.
19791         * lib/supersede.c (open_supersede): On native Windows, map "/dev/null"
19792         to "NUL".
19794 2022-06-23  Jim Meyering  <meyering@fb.com>
19796         maint.mk: fix syntax-check for unnecessary hash.h header use
19797         * top/maint.mk (_hash_re): Correct the regexp. It had two problems:
19798         - lacked the "hash_" prefix, so would match non-uses
19799         - failed to detect uses of the hash_x?initialize functions
19800         The former led to an excess/unneeded use of hash.h in coreutils' cut.c.
19801         The latter would have led to a FP "not needed" report for copy.c.
19803 2022-06-22  Bruno Haible  <bruno@clisp.org>
19805         fchmodat: Fix test failure on native Windows.
19806         * modules/fchmodat (Depends-on): Add 'chmod'.
19808 2022-06-22  Bruno Haible  <bruno@clisp.org>
19810         chmod: Add tests.
19811         * tests/test-chmod.c: New file, based on tests/test-lchmod.c.
19812         * modules/chmod-tests: New file.
19814         chmod: New module.
19815         * lib/sys_stat.in.h (chmod): Declare when GNULIB_CHMOD is 1.
19816         * lib/chmod.c: New file, based on lib/lchmod.c.
19817         * m4/chmod.m4: New file, based on m4/fchmodat.m4.
19818         * m4/sys_stat_h.m4 (gl_SYS_STAT_H): Test whether chmod is declared.
19819         (gl_SYS_STAT_H_REQUIRE_DEFAULTS): Initialize GNULIB_CHMOD.
19820         (gl_SYS_STAT_H_DEFAULTS): Initialize REPLACE_CHMOD.
19821         * modules/sys_stat (Makefile.am): Substitute GNULIB_CHMOD,
19822         REPLACE_CHMOD.
19823         * modules/chmod: New file, based on modules/lchmod.
19824         * doc/posix-functions/chmod.texi: Mention the new module and the
19825         problems on IRIX and Windows.
19827 2022-06-21  Bruno Haible  <bruno@clisp.org>
19829         lchmod: Simplify.
19830         * lib/lchmod.c: Remove unnecessary include, obsolete since 2020-02-23.
19832 2022-06-20  Bruno Haible  <bruno@clisp.org>
19834         javacomp-script, javaexec-script: Add support for disabling Java.
19835         * m4/javacomp.m4 (gt_JAVACOMP_DISABLED): New macro.
19836         * m4/javaexec.m4 (gt_JAVAEXEC_DISABLED): New macro.
19838 2022-06-19  Paul Eggert  <eggert@cs.ucla.edu>
19840         lchmod: port back to AIX 7.2
19841         Problem reported by Bruno Haible in:
19842         https://lists.gnu.org/r/bug-gnulib/2022-06/msg00075.html
19843         * lib/lchmod.c: Include string.h, for strlen.
19844         (lchmod): Do not depend on HAVE_READLINK since we now depend on
19845         the readlink module.  Check for AIX 7.2 bug.
19846         * m4/lchmod.m4 (gl_PREREQ_LCHMOD): Do not check for readlink
19847         since we now depend on the readlink module.
19848         * modules/lchmod (Depends-on): Depend on readlink.
19850         fchmodat: pacify gcc -Wunused-variable
19851         Problem reported by Bruno Haible in:
19852         https://lists.gnu.org/r/bug-gnulib/2022-06/msg00075.html
19853         * lib/fchmodat.c (fchmodat): Remove unused local.
19855 2022-06-19  Bruno Haible  <bruno@clisp.org>
19857         getlogin, getlogin_r tests: Really avoid test failure.
19858         Reported by Letu Ren <fantasquex@gmail.com> in
19859         <https://lists.gnu.org/archive/html/bug-gnulib/2022-06/msg00037.html>.
19860         * tests/test-getlogin.h (test_getlogin_result): Parse the contents of
19861         /proc/self/loginuid as an unsigned integer.
19863 2022-06-12  Paul Eggert  <eggert@cs.ucla.edu>
19865         fchmodat: port better to MS-Windows etc.
19866         MS-Windows problem reported by Bruno Haible in:
19867         https://lists.gnu.org/r/bug-gnulib/2022-06/msg00041.html
19868         Although I don’t use MS-Windows I see some related fstatat etc.
19869         problems and am trying to fix them with this further patch.
19870         * lib/fchmodat.c (fchmodat):
19871         * lib/lchmod.c (lchmod):
19872         * lib/lchown.c (lchown)
19873         [!HAVE_LCHOWN && HAVE_CHOWN && !CHOWN_MODIFIES_SYMLINK]:
19874         * lib/renameatu.c (renameatu)
19875         [HAVE_RENAME && RENAME_TRAILING_SLASH_SOURCE_BUG]:
19876         Use readlinkat/readlink instead of fstatat/lstat to test merely
19877         whether a string names a symlink, as this avoids problems
19878         with EOVERFLOW.  Also, I hope it works around the MS-Windows
19879         issues that Bruno noted.
19880         * m4/fchmodat.m4 (gl_PREREQ_FCHMODAT):
19881         Check for readlinkat, not lchmod.
19882         * m4/lchmod.m4 (gl_FUNC_LCHMOD): Do not require AC_CANONICAL_HOST
19883         or check for lstat.
19884         (gl_PREREQ_LCHMOD): Check for readlink.
19885         * modules/lchown (Depends-on): Add readlink.  Do not depend on
19886         lstat merely because !HAVE_LCHOWN.
19887         * modules/renameatu (Depends-on): Add fstatat, readlinkat.
19889 2022-06-12  Bruno Haible  <bruno@clisp.org>
19891         doc: Update O_PATH platforms list.
19892         * doc/posix-headers/fcntl.texi: Update O_PATH platforms list.
19894 2022-06-11  Paul Eggert  <eggert@cs.ucla.edu>
19896         fcntl: document O_PATH
19897         * doc/posix-headers/fcntl.texi: Mention O_PATH.
19899         fchmodat: port to old Linux kernel + newer headers
19900         Problem reported by Lance Fredrickson in:
19901         https://lists.gnu.org/r/bug-gnulib/2022-06/msg00038.html
19902         * lib/fchmodat.c (fchmodat):
19903         * lib/lchmod.c (lchmod): Do not rely on AT_EMPTY_PATH as to
19904         whether syscalls work on ""; instead, if a call fails with
19905         ENOENT assume that those syscalls do not work.
19906         Do not use fstatat to determine whether a file is a symlink,
19907         as this has problems with EOVERFLOW.  Use readlinkat instead,
19908         and if it fails with EINVAL then the file is not a symlink.
19909         Remove #if tests on __linux__ || __ANDROID__ || __CYGWIN__
19910         as this has been a maintenance hassle and it’s unlikely
19911         these days that a new platform would #define O_PATH without also
19912         either supporting /proc or keeping it absent.
19913         * modules/fchmodat (Depends-on): Remove fstatat.
19914         There should be no need for either fchmodat or lchmod to depend on
19915         readlinkat, since they use readlinkat only in contexts where it
19916         should work without Gnulib intervention.
19918 2022-06-06  Bruno Haible  <bruno@clisp.org>
19920         fopen-gnu: Make this module work again (regression 2022-01-03).
19921         Reported by Nelson H. F. Beebe <beebe@math.utah.edu> in
19922         <https://lists.gnu.org/archive/html/platform-testers/2022-04/msg00005.html>.
19923         * modules/fopen-gnu (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
19925 2022-06-06  Bruno Haible  <bruno@clisp.org>
19927         getlogin, getlogin_r tests: Avoid test failure in specific environments.
19928         Reported by Letu Ren <fantasquex@gmail.com> in
19929         <https://lists.gnu.org/archive/html/bug-gnulib/2022-06/msg00001.html>.
19930         * modules/getlogin-tests (Depends-on): Add stdbool.
19931         * modules/getlogin_r-tests (Depends-on): Likewise.
19932         * tests/test-getlogin.h: Include stdbool.h.
19933         (test_getlogin_result): On Linux, skip the test if /proc/self/loginuid
19934         contains "-1".
19936 2022-06-05  Bruno Haible  <bruno@clisp.org>
19938         doc: Add section to attract more people towards the GNU project.
19939         Inspired by a suggestion from José E. Marchesi <jemarch@gnu.org> on
19940         the gnu-prog-discuss mailing list.
19941         * doc/join-gnu.texi: New file.
19942         * doc/gnulib-readme.texi: Include it.
19944 2022-06-05  Bruno Haible  <bruno@clisp.org>
19946         doc: Fix warnings about regex chapter structure (regression 2022-05-15).
19947         * doc/regex.texi (GNU Operators): Fix menu.
19949 2022-06-04  Paul Eggert  <eggert@cs.ucla.edu>
19951         regex-quote: \} -> } in EREs
19952         * lib/regex-quote.c (ere_special): Don’t use \} in EREs,
19953         as POSIX says the interpretation is undefined.
19954         * tests/test-regex-quote.c (test_bre, test_ere):
19955         Add tests for }.
19957         dfa: do not warn about \] and \}
19958         * lib/dfa.c (lex): Do not warn about \] and \}, since they’re
19959         surely universally supported even though POSIX says their
19960         interpretation is undefined.
19962 2022-06-03  Paul Eggert  <eggert@cs.ucla.edu>
19964         regex-quote: \] -> ] in EREs and BREs
19965         * build-aux/bootstrap:
19966         * build-aux/bootstrap.conf (gettext_external):
19967         * check-AC_LIBOBJ:
19968         * lib/regex-quote.c (bre_special, ere_special):
19969         * gnulib-tool (func_modules_transitive_closure)
19970         (func_emit_autoconf_snippet, func_import, func_create_testdir):
19971         * tests/test-regex-quote.c (test_bre, test_ere):
19972         * top/maint.mk (longopt_re, gpg_key_ID):
19973         Don’t use \] in BREs and EREs, as POSIX says the interpretation is
19974         undefined.
19976         filevercmp: don’t treat entire filename as suffix
19977         Problem reported by Artém S. Tashkinóv in:
19978         https://lists.gnu.org/r/bug-gnulib/2022-06/msg00012.html
19979         * lib/filevercmp.c (file_prefixlen): When stripping
19980         (\.[A-Za-z~][A-Za-z0-9~]*)*$ suffixes, do not strip
19981         the entire file name.
19982         * tests/test-filevercmp.c (examples): Adjust to match new behavior.
19984 2022-06-03  Bruno Haible  <bruno@clisp.org>
19986         setlocale: Update after Turkey changed its name.
19987         * lib/setlocale.c: Update comments.
19989 2022-05-25  Karl Berry  <karl@freefriends.org>
19991         doc: regex.texi deleted the node GNU Emacs Operators
19992         * doc/gnulib.texi (Regular expression): remove "GNU Emacs Operators"
19993         from the @menu, since the node no longer exists in regex.texi.
19995 2022-05-24  Paul Eggert  <eggert@cs.ucla.edu>
19997         dfa: new options DFA_STAR_WARN, DFA_PLUS_WARN
19998         This lets ‘grep -E '(*a|+b)'’ warn about the * and the +.
19999         * lib/dfa.h (DFA_STAR_WARN, DFA_PLUS_WARN): New flags.
20000         * lib/dfa.c (lex): Support them.
20002 2022-05-23  Paul Eggert  <eggert@cs.ucla.edu>
20004         dfa: '\n' is not governed by RE_LIMITED_OPS
20005         * lib/dfa.c (lex): Pay no attention to RE_LIMITED_OPS when
20006         deciding how to parse '\n', since regcomp.c doesn’t.
20008         dfa: new option DFA_STRAY_BACKSLASH_WARN
20009         This is for grep, which wants to warn about stray backslashes that
20010         lead to unspecified behavior.  For example, "grep -oi '\a'"
20011         surprisingly is not equivalent to "grep -oi 'a'", so the stray
20012         backslash should be warned about.
20013         * lib/dfa.c: Include wctype.h, for iswprint and iswspace.
20014         (lex): Add support for DFA_STRAY_BACKSLASH_WARN.
20015         * lib/dfa.h (DFA_STRAY_BACKSLASH_WARN): New constant.
20017         dfa: new option DFA_CONFUSING_BRACKETS_ERROR
20018         This is for grep, which wants [:alpha:] to be an error
20019         at the top level.
20020         * lib/dfa.c (struct regex_syntax): New member dfaopts,
20021         replacing anchor.  All uses changed.
20022         (parse_bracket_exp): Error, not warn, if DFA_CONFUSING_BRACKETS_ERROR.
20023         * lib/dfa.h (DFA_CONFUSING_BRACKETS_ERROR): New constant.
20025 2022-05-21  Paul Eggert  <eggert@cs.ucla.edu>
20027         strstr-simple: pacify GCC 12.1
20028         * lib/str-two-way.h (two_way_long_needle): Pacify GCC 12.1
20029         -Wsuggest-attribute=pure (x86-64, -O2).
20031 2022-05-20  Paul Eggert  <eggert@cs.ucla.edu>
20033         dfa: steer cleer of POSIX-reserved symbols
20034         * lib/dfa.c (str_eq): Rename from streq.  All uses changed.
20035         (c_isdigit): Rename from isasciidigit.  The function worked in
20036         EBCDIC so it wasn’t ASCII-specific anyway.  All uses changed.
20038 2022-05-17  Paul Eggert  <eggert@cs.ucla.edu>
20040         parse-datetime: support 'J' military time zone
20041         Requested by Brian Inglis in:
20042         https://savannah.gnu.org/support/?110644
20043         * lib/parse-datetime.y (parser_control): New member J_zones_seen.
20044         (item): New item 'J'.
20045         (military_table): Add 'J'.
20046         (parse_datetime_body): Set and use J_zones_seen.
20047         * tests/test-parse-datetime.c (main): Test "J".
20049 2022-05-15  Reuben Thomas  <rrt@sc3d.org>
20051         doc: Update regex documentation to match implementation.
20052         * doc/regex.texi: remove Emacs-specific documentation; match code.
20053         Remove mention of both Emacs and non-Emacs syntax tables, as these
20054         are no longer supported by the code.  Document the word character
20055         class (alnum + _).  Add documentation for \s and \S.  Replace
20056         mentions of #defining emacs with RE_NO_GNU_OPS (which takes effect
20057         in the opposite sense); merge the node “GNU Emacs Operators” into
20058         “GNU Operators”.  For \` and \', refer to the “whole string” rather
20059         than the (Emacs) “buffer”.
20061 2022-05-15  Bruno Haible  <bruno@clisp.org>
20063         string, wchar: Fix compilation error on MSVC (regression 2021-09-07).
20064         * lib/string.in.h (free): For MSVC, add the dllimport specification if
20065         the MSVC headers have it.
20066         * lib/wchar.in.h (free): Likewise.
20068 2022-05-14  Bruno Haible  <bruno@clisp.org>
20070         glob tests: Fix a warning (regression from 2022-03-23).
20071         * tests/test-glob.c: Include <fcntl.h>.
20072         * modules/glob-tests (Depends-on): Add fcntl-h.
20074 2022-05-14  Bruno Haible  <bruno@clisp.org>
20076         termcap: Fix link error when no suitable library is found.
20077         * m4/termcap.m4 (gl_TERMCAP_BODY): If no suitable library is found,
20078         set LIBTERMCAP and LTLIBTERMCAP to empty.
20080 2022-05-13  Paul Eggert  <eggert@cs.ucla.edu>
20082         dfa: fix bug with ‘.’ and UTF-8 Hangul Syllables
20083         This fixes a bug introduced in 2019-12-18T05:41:27Z!eggert@cs.ucla.edu,
20084         an earlier patch that fixed dfa.c to not match invalid UTF-8.
20085         Unfortunately that patch had a couple of typos when dfa.c is
20086         matching against the regular expression ‘.’ (dot).  One typo
20087         caused dfa.c to incorrectly reject the valid UTF-8 sequences
20088         (ED)(90-9F)(80-BF) corresponding to U+D400 through U+D7FF, which
20089         are some Hangul Syllables and Hangul Jamo Extended-B.  The other
20090         typo caused dfa.c to incorrectly reject the valid sequences
20091         (F4)(88-8F)(80-BF)(80-BF) which correspond to U+108000 through
20092         U+10FFFF (Supplemental Private Use Area plane B).
20093         * lib/dfa.c (utf8_classes): Fix typos.
20094         * tests/test-dfa-match.sh: Test the fix.
20096 2022-05-12  Paul Eggert  <eggert@cs.ucla.edu>
20098         manywarnings: update C warnings for GCC 12
20099         Adjust for C programs compiled by GCC 12.
20100         (A C++ expert still needs to look at manywarnings-c++.m4.)
20101         * build-aux/gcc-warning.spec: Add warnings introduced in GCC 12.
20102         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -Wbidi-chars=any,ucn
20103         and -Wuse-after-free=3.  Although not enabled by -Wall or -Wextra
20104         they seem suitable for Gnulib-using C code.
20106 2022-05-11  Paul Eggert  <eggert@cs.ucla.edu>
20108         parse-datetime: remove Emacs cruft
20109         * lib/parse-datetime.y: Remove an ‘ifdef emacs’.  Emacs has never
20110         used this module.  The module is derived from code taken from
20111         Emacs, but that code was removed from Emacs in the 1990s.
20113 2022-05-11  Bruno Haible  <bruno@clisp.org>
20115         alloca: Remove old code for Emacs, unused since 2009.
20116         Reported by Reuben Thomas <rrt@sc3d.org> in
20117         <https://lists.gnu.org/archive/html/bug-gnulib/2022-05/msg00032.html>.
20118         * lib/alloca.c: Remove Emacs specific code.
20120 2022-05-05  Paul Eggert  <eggert@cs.ucla.edu>
20122         libc-config: update to match cdefs
20123         * lib/libc-config.h (__attribute_alloc_align__)
20124         (__attribute_maybe_unused, __fortified_attr_access)
20125         (__glibc_fortify, __glibc_fortify_n, __glibc_likely)
20126         (__glibc_safe_len_cond, __glibc_safe_or_unknown_len)
20127         (__glibc_unsafe_len, __glibc_unsigned_or_positive, __wur):
20128         Undef these too, since lib/cdefs.h now defines them
20129         unconditionally.
20131         cdefs: merge from glibc
20132         * lib/cdefs.h (__glibc_safe_or_unknown_len):
20133         Use glibc’s newer version.
20135 2022-05-02  Paul Eggert  <eggert@cs.ucla.edu>
20137         gettime-res: help the compiler
20138         * lib/gettime-res.c (gettime_res): Pacify GCC versions that
20139         incorrectly complain about earlier.tv_sec not being initialized.
20140         Let GCC know that gcd args are always positive.
20142         af_alg: port to Ubuntu 22.04
20143         Without this patch, maintainer builds of coreutils fail on Ubuntu
20144         22.04 with diagnostics like "./lib/gl_openssl.h:79:1: error:
20145         'MD5_Init' is deprecated: Since OpenSSL 3.0
20146         [-Werror=deprecated-declarations]".  From
20147         <https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes>
20148         it appears that Gnulib needs to either define OPENSSL_API_COMPAT
20149         to a version less than 3.0, or use a compatibility layer, or
20150         assume OpenSSL 1.1.0 or later.  The simplest workaround is to
20151         define OPENSSL_API_COMPAT for 1.1.1, the oldest OpenSSL release
20152         still supported.  A better fix would be to rewrite the code to
20153         assume OpenSSL 1.1.1 or later, and stop using the older API.
20154         * lib/md5.h, lib/sha1.h, lib/sha256.h, lib/sha512.h, lib/sm3.h:
20155         Define OPENSSL_API_COMPAT to 0x10101000L to suppress
20156         the deprecation warnings on Ubuntu 22.04.
20158 2022-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20160         vasnprintf: Simplify. Reduce binary code size.
20161         * lib/vasnprintf.c (VASNPRINTF): Coalesce cleanup code.
20163         vasnprintf: Simplify 'result' variable.
20164         * lib/vasnprintf.c (VASNPRINTF): Simplify initialization and test of
20165         'result' variable.
20167         vasnprintf: Simplify a free() call.
20168         * lib/vasnprintf.c (divide): Just call
20169         free (x) instead of doing ‘if (x != NULL) free (x);’.
20171 2022-04-30  Bruno Haible  <bruno@clisp.org>
20173         string: Avoid syntax error on glibc systems with GCC 11.
20174         Reported by Tom Tromey <tromey@adacore.com> in
20175         <https://lists.gnu.org/archive/html/bug-gnulib/2022-04/msg00075.html>
20176         and by Satadru Pramanik <satadru@umich.edu> in
20177         <https://lists.gnu.org/archive/html/bug-gnulib/2022-04/msg00076.html>.
20178         * lib/string.in.h (strndup): Don't rededeclare strndup if it is defined
20179         as a macro.
20181 2022-04-28  Simon Marchi  <simon.marchi@efficios.com>  (tiny change)
20183         stdlib: Fix error in C++ mode on glibc systems (regr. 2022-04-13).
20184         * lib/stdlib.in.h (free): Add exception specification like glibc does.
20186 2022-04-28  Paul Eggert  <eggert@cs.ucla.edu>
20188         glob: improve config and test cleanup
20189         Config problem reported by Benno Schulenberg in:
20190         https://lists.gnu.org/r/bug-gnulib/2022-04/msg00071.html
20191         * m4/glob.m4 (gl_GLOB): Clean up temporary file.
20192         Also, name it conf$$-file not conf-file, so it’s cleaned
20193         up on interrupt.
20194         * modules/glob-tests (MOSTLYCLEANFILES):
20195         Append test-glob.tglobfile, test-glob.tgloblink[123].
20197 2022-04-26  Paul Eggert  <eggert@cs.ucla.edu>
20199         glob: port to NetBSD 9.2
20200         Problem reported by Benno Schulenberg in:
20201         https://lists.gnu.org/r/bug-gnulib/2022-04/msg00052.html
20202         * doc/posix-functions/dirfd.texi: Document NetBSD 9.2 portability
20203         bugs.  Remove an old comment about errno that is no longer true
20204         of POSIX 2018.
20205         * lib/glob.c (glob_in_dir): Convert dirfd arg from void *
20206         to DIR * before passing it to dirfd.
20208 2022-04-21  Paul Eggert  <eggert@cs.ucla.edu>
20210         regex: match [...---...] like V7 grep
20211         Problem reported by Arnold Robbins in:
20212         https://bugs.gnu.org/20657
20213         https://lists.gnu.org/r/bug-gnulib/2022-04/msg00053.html
20214         * lib/regcomp.c (peek_token_bracket): Let [...---...] match '-'.
20215         This is an extension to POSIX, and matches V7 Unix grep.
20217 2022-04-20  Paul Eggert  <eggert@cs.ucla.edu>
20219         backupfile: fix bug when renaming simple backups
20220         * lib/backupfile.c (backupfile_internal): Fix bug when RENAME
20221         and when doing simple backups.  Problem reported by Steve Ward in:
20222         https://bugs.gnu.org/55029
20224         gettime-res: more-robust sampling
20225         * lib/gettime-res.c (gettime_res): If adjacent timestamps are
20226         identical search for a differing timestamp.  Also, stop collecting
20227         samples thereafter since they surely won’t help.
20229 2022-04-19  Paul Eggert  <eggert@cs.ucla.edu>
20231         Port _GL_HAS_C_ATTRIBUTE to pedantic gcc -std=c99
20232         * m4/gnulib-common.m4 (_GL_HAS_C_ATTRIBUTE):
20233         Disable -Wpedantic if using __has_c_attribute and this is not C2x.
20235         verify: port to pedantic gcc -std=c99
20236         * lib/verify.h (_GL_VERIFY): If we lack both _Static_assert and
20237         static_assert, suppress -Wnexted-externs.
20239         gettime-res: add tests
20240         * modules/gettime-res-tests, tests/test-gettime-res.c: New files.
20242 2022-04-16  Paul Eggert  <eggert@cs.ucla.edu>
20244         verify: port to Mac OS 10.7.5
20245         Mac OS 10.7.5 clang sets __clang_major__ to 4 even though it was
20246         derived from Clang 3.2.  Problem reported by Werner Lemberg in:
20247         https://lists.gnu.org/r/emacs-devel/2022-04/msg00779.html
20248         * lib/verify.h (_GL_HAVE__STATIC_ASSERT): Don’t define to 1
20249         when __clang_major__ == 4 && !__cplusplus
20250         && __STDC_VERSION__ < 201112L && !defined __STRICT_ANSI__.
20252 2022-04-15  Bruno Haible  <bruno@clisp.org>
20254         sigsegv: Fix compilation error on arceb CPUs.
20255         Reported by Fabrice Fontaine <fontaine.fabrice@gmail.com> in
20256         <https://lists.gnu.org/archive/html/bug-gnulib/2022-04/msg00028.html>.
20257         * m4/stack-direction.m4 (SV_STACK_DIRECTION): Treat the 'arc' variants
20258         like 'arc'.
20260 2022-04-13  Bruno Haible  <bruno@clisp.org>
20262         string, wchar: Fix error in C++ mode on glibc systems with clang.
20263         * lib/string.in.h (free): Add exception specification like glibc does.
20264         * lib/wchar.in.h (free): Likewise.
20266 2022-04-13  Bruno Haible  <bruno@clisp.org>
20268         string: Fix errors in C++ mode on glibc systems with clang.
20269         * lib/string.in.h (memchr, memrchr, rawmemchr, strchrnul, strpbrk,
20270         strstr, strcasestr): Use _GL_CXXALIASWARN1 also with clang, and add
20271         exception specification.
20273 2022-04-13  Bruno Haible  <bruno@clisp.org>
20275         math: Fix errors in C++ mode on glibc systems with clang.
20276         * lib/math.in.h (GNULIB_NAMESPACE_LACKS_ISFINITE,
20277         GNULIB_NAMESPACE_LACKS_ISINF, GNULIB_NAMESPACE_LACKS_ISNAN,
20278         GNULIB_NAMESPACE_LACKS_SIGNBIT): New macros.
20279         * tests/test-math-c++.cc (isfinite): Skip test if
20280         GNULIB_NAMESPACE_LACKS_ISFINITE is 1.
20281         (isinf): Skip test if GNULIB_NAMESPACE_LACKS_ISINF is 1.
20282         (isnan): Skip test if GNULIB_NAMESPACE_LACKS_ISNAN is 1.
20283         (signbit): Skip test if GNULIB_NAMESPACE_LACKS_SIGNBIT is 1.
20285 2022-04-08  Paul Eggert  <eggert@cs.ucla.edu>
20287         libgmp: pacify Clang too
20288         * lib/mini-gmp-gnulib.c [NDEBUG]: Also use -Wunused-variable if clang.
20289         Problem reported for Emacs by Mattias Engdegård.
20291 2022-04-04  Paul Eggert  <eggert@cs.ucla.edu>
20293         init.sh: don’t assume gzip
20294         * tests/init.sh (rand_bytes_): Don’t assume gzip is installed.
20295         I found this while testing gzip installation on a platform where I
20296         had removed the installed gzip.  gzip is executed only on
20297         platforms lacking mktemp and /dev/urandom so this code is rarely
20298         used; however, these platforms might also lack gzip since gzip
20299         is neither specified by POSIX or required by the GNU Coding Standards.
20301 2022-03-30  Paul Eggert  <eggert@cs.ucla.edu>
20303         glob: sync better with glibc
20304         * lib/glob.c (dirfd) [_LIBC]: Use #undef instead of #ifdef.
20305         Problem reported by DJ Delorie.
20307 2022-03-23  Paul Eggert  <eggert@cs.ucla.edu>
20309         glob: test for glibc bug 25659
20310         https://sourceware.org/bugzilla/show_bug.cgi?id=25659
20311         * m4/glob.m4 (gl_GLOB): Replace glob if it has bug 25659.
20312         * tests/test-glob.c (main): Test for glibc bug 25659.
20314         glob: fix symlink and // issues; improve speed
20315         * lib/glob.c: Include fcntl.h.
20316         (dirfd) [_LIBC]: New macro.
20317         (GLOB_STAT64, GLOB_LSTAT64): Remove.  Replace all uses with ...
20318         (GLOB_FSTATAT64): ... this new macro.
20319         (glob_in_dir): Treat DT_LNK like DT_UNKNOWN.
20320         Use directory-relative fstatat unless GLOB_ALTDIRFUNC, or dirfd fails.
20321         Avoid duplicate strlen (directory).
20322         Work even if directory is "/", without turning it into "//".
20323         Use a scratch buffer instead of by-hand alloca stuff.
20324         Use mempcpy and memcpy instead of stpcpy and strcpy.
20325         * modules/glob (Depends-on): Add dirfd, fstatat.  Remove stat.
20326         (License): Change from LGPLv2+ to GPL, since it depends on
20327         fstatat.
20329 2022-03-23  DJ Delorie  <dj@redhat.com>
20331         glob: resolve DT_UNKNOWN via is_dir
20333         The DT_* values returned by getdents (readdir) are only hints and
20334         not required.  In fact, some Linux filesystems return DT_UNKNOWN
20335         for most entries, regardless of actual type.  This causes make
20336         to mis-match patterns with a trailing slash (via GLOB_ONLYDIR)
20337         (see make's functions/wildcard test case).  Thus, this patch
20338         detects that case and uses is_dir() to make the type known enough
20339         for proper operation.
20341         Performance in non-DT_UNKNOWN cases is not affected.
20343         The lack of DT_* is a well known issue on older XFS installations
20344         (for example, RHEL 7 and 8, Fedora 28) but can be recreated by
20345         creating an XFS filesystem with flags that mimic older behavior:
20347         $ fallocate -l 10G /xfs.fs
20348         $ mkfs.xfs -n ftype=0 -m crc=0 -f /xfs.fs
20349         $ mkdir /xfs
20350         $ mount -o loop /xfs.fs /xfs
20352 2022-03-20  Jim Meyering  <meyering@fb.com>
20354         maint: bootstrap: split a too-long line
20355         * build-aux/bootstrap (git_modules_config): Split longer-than-80 line.
20357 2022-03-14  Simon Josefsson  <simon@josefsson.org>
20359         announce-gen: Modernize GnuPG key retrieval suggestions.  Based on
20360         patch by Darshit Shah in:
20361         https://lists.gnu.org/archive/html/bug-gnulib/2022-03/msg00022.html
20362         * build-aux/announce-gen (usage): Add --gpg-key-email and
20363         --gpg-keyring-url.
20364         (main): Support the new options.
20365         (main): Don't suggest 'gpg --keyserver' since the situation with
20366         public key servers is complicated and GnuPG version dependent.
20368         maintainer-makefile: Improve GnuPG announce-gen options.
20369         * top/maint.mk (gpg_key_emil): New variable.
20370         (gpg_keyring_url): New variable.
20371         (announcement): Pass them as --gpg-key-email and
20372         --gpg-keyring-url.
20374 2022-03-13  Ben Pfaff  <blp@cs.stanford.edu>
20376         Document Automake 1.14 requirement in NEWS, too, since it had been
20377         documented there before for the Automake 1.11 requirement.
20378         * NEWS: Mention the change.
20380 2022-03-13  Bruno Haible  <bruno@clisp.org>
20382         sigsegv: Add support for Linux/PowerPC (32-bit) with musl libc.
20383         Reported by Khem Raj <raj.khem@gmail.com> in
20384         <https://lists.gnu.org/archive/html/m4-patches/2022-03/msg00000.html>.
20385         * src/sigsegv.c (SIGSEGV_FAULT_STACKPOINTER): In the Linux/PowerPC
20386         32-bit case, handle musl libc differently.
20387         * modules/sigsegv (Files): Add m4/musl.m4.
20388         (configure.ac): Invoke gl_MUSL_LIBC.
20390 2022-03-11  Paul Eggert  <eggert@cs.ucla.edu>
20392         regex: fix double-free
20393         * lib/regex_internal.c (re_dfa_add_node): Don’t free storage
20394         twice if an allocation fails.
20396         regex: fix minor over-allocation
20397         * lib/regexec.c (push_fail_stack): Fix off-by-one error that
20398         over-allocated the stack.
20400         regex: fix free_fail_stack undefined behavior
20401         * lib/regexec.c (push_fail_stack): Don’t increment number of
20402         re_fail_stack_t entries until after successful allocation.  This
20403         prevents a crash if re_realloc or re_malloc fails here, and a
20404         later free_fail_stack examines regs or a later pop_fail_stack
20405         examines node.  Problem discovered by Coverity scan sent
20406         2022-03-11 11:03:52Z.
20408 2022-03-10  Paul Eggert  <eggert@cs.ucla.edu>
20410         fts: revert change to use AT_NO_AUTOMOUNT
20411         * NEWS: Don’t mention AT_NO_AUTOMOUNT.
20412         * lib/fts.c (fts_stat): Don’t use AT_NO_AUTOMOUNT, as
20413         it has no effect with fstatat.
20415 2022-03-09  Paul Eggert  <eggert@cs.ucla.edu>
20417         statat: now obsolete
20418         * lib/openat.h (statat, lstatat): Now deprecated.
20419         All uses removed, and replaced with fstatat.
20420         * modules/statat: Mark as obsolete, because it’s confusing:
20421         it’s not clear whether it should use AT_NO_AUTOMOUNT,
20422         which is implied by stat and by lstat, but not by fstatat.
20423         * tests/test-statat.c: Disable deprecated-declarations warnings.
20425         fts: be consistent about AT_NO_AUTOMOUNT
20426         * lib/fts.c (fts_stat): Use fstatat with AT_NO_AUTOMOUNT
20427         consistently, instead of sometimes using stat (which implies
20428         AT_NO_AUTOMOUNT) and sometimes using fstatat without AT_NO_AUTOMOUNT.
20429         Remove a goto while we’re at it.
20431 2022-03-07  Pádraig Brady  <P@draigBrady.com>
20433         fcntl-h: add AT_NO_AUTOMOUNT
20434         * lib/fcntl.in.h: Define AT_NO_AUTOMOUNT to 0 where not defined.
20435         This is available on Linux since 2.6.38.
20437 2022-03-01  Paul Eggert  <eggert@cs.ucla.edu>
20439         Create lib/Makefile.am after gnulib-comp.m4
20440         * gnulib-tool (func_import): Create library makefile after
20441         creating gnulib-comp.m4.  With --gnu-make, the latter depends on
20442         the former.  See <https://bugs.gnu.org/32452#109>.
20444 2022-02-26  Paul Eggert  <eggert@cs.ucla.edu>
20446         gettime-res: fix unlikely overflow bug
20447         * lib/gettime-res.c (gettime_res): Fix bug when hz * tv_sec overflows.
20448         With 64-bit ‘long’ and nanosecond resolution the bug can occur
20449         starting in the year 2262, with probability about 2e-9.
20450         With 32-bit ‘long’ the bug can occur now, with same probability.
20451         The probability goes up on hosts with worse timestamp resolution.
20453         Document clang -fsanitize=undefined glitch
20454         * doc/gnulib-intro.texi (Unsupported Platforms):
20455         Document incompatibility of ‘clang -fsanitize=undefined’
20456         with Gnulib, and how to work around it by also using
20457         ‘-fno-sanitize=pointer-overflow’.
20459 2022-02-25  Darshit Shah  <darnir@gnu.org>
20461         modules/unicase/special-casing: Fix compilation error
20462         * modules/unicase/special-casing: Don't prepend $(AM_V_at) to the
20463         second part of a compound command.  It causes make to try and
20464         execute the command "@sed" which doesn't exist.
20466 2022-02-25  Paul Eggert  <eggert@cs.ucla.edu>
20468         Port __has_attribute to Apple’s Clang renumbering
20469         Problem reported by Kirill A. Korinsky in:
20470         https://lists.gnu.org/r/bug-gnulib/2022-02/msg00034.html
20471         * config/srclist.txt: Comment out sys/cdefs.h for now.
20472         * lib/cdefs.h (__glibc_has_attribute):
20473         * m4/gnulib-common.m4 (gl_COMMON_BODY):
20474         Port to Apple’s renumbering of Clang versions.
20476         nanosleep: simplify by using pselect
20477         GNU Emacs avoids Gnulib’s ‘select’ module and uses only pselect,
20478         which it implements in a special way on MS-DOS.
20479         Unfortunately, though, nanosleep uses ‘select’;
20480         problem reported by Lars Ingebrigtsen (Bug#32452#74).
20481         As far as I can tell, Gnulib nanosleep's use of
20482         ‘select’ with signals is only for ancient platforms
20483         that Gnulib no longer cares about, so remove that use of ‘select’.
20484         I don’t know of any platforms that still need this fallback code,
20485         but just in case, fall back to pselect instead, while removing
20486         signal handling that it shouldn’t be needed nowadays.
20487         * lib/nanosleep.c: Do not include sig-handler.h, sys/time.h.
20488         (SIGCONT, suspended, sighandler, my_usleep): Remove.
20489         (nanosleep) [!HAVE_BUG_BIG_NANOSLEEP && !(_WIN32 && !__CYGWIN__)]:
20490         Just call pselect.
20491         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Do not check for sys/time.h
20492         or call gl_FUNC_SELECT.  Do not include sys/time.h or worry
20493         about LIBSOCKET.
20494         (gl_PREREQ_NANOSLEEP): Remove as it’s no longer needed.
20495         All uses removed.
20496         * modules/nanosleep (Depends-on): Add pselect.
20497         Remove select, sigaction, sys_time.
20499 2022-02-24  Paul Eggert  <eggert@cs.ucla.edu>
20501         userspec: warn about '.' separator
20502         Problem reported by Dan Jacobson (Bug#44770).
20503         * lib/userspec.c: Don’t include stdbool.h since it’s now in our API.
20504         (parse_user_spec_warn): New function, broken out of parse_user_spec
20505         and with a new PWARN arg.
20506         (parse_user_spec): Use it.
20507         * lib/userspec.h: Include stdbool.h and declare new function.
20508         * tests/test-userspec.c (struct test.in): Now a char array
20509         so that it can be modified.
20510         (T): Make the placeholder a valid test, as that simplifies
20511         the code.  Omit NULL placeholder at the end, likewise.
20512         (main): Set up T in the new way, and test that the "."  separator
20513         acts like the ":" separator except with a warning if it works.
20515         userspec: no need for static vars
20516         * lib/userspec.c (parse_with_separator): Simplify.
20518 2022-02-22  Benno Schulenberg  <bensberg@telfort.nl>  (tiny change)
20520         doc: add two missing closing parentheses
20521         * doc/regex.texi (Syntax Bits): Add missing closing parenthesis.
20522         * doc/regex.texi (BSD Regular Expression Compiling): Likewise.
20524 2022-02-22  Simon Josefsson  <simon@josefsson.org>
20526         gnulib-tool: Bump automake dependency.
20527         * gnulib-tool (func_emit_lib_Makefile_am)
20528         (func_emit_tests_Makefile_am): Demand Automake ≥ 1.14, for
20529         %reldir%.
20531 2022-02-21  Paul Eggert  <eggert@cs.ucla.edu>
20533         close-stream: don't depend on fclose
20534         This reverts 2022-01-26T17:33:03Z!eggert@cs.ucla.edu.
20535         Depending on fclose broke Emacs, and since this dependency didn't
20536         help GNU m4 let's remove it for now.  Problem reported by
20537         Lars Ingebrigtsen <https://bugs.gnu.org/32452#47>.
20538         * modules/close-stream (Depends-on): Remove fclose.
20540 2022-02-20  Bruno Haible  <bruno@clisp.org>
20542         Document that Automake ≥ 1.14 is needed (regression 2021-12-15).
20543         Reported by Simon Josefsson and Mike Frysinger in
20544         <https://lists.gnu.org/archive/html/bug-gnulib/2022-02/msg00010.html>.
20545         * DEPENDENCIES (Automake): Require version 1.14 or newer.
20547 2022-02-19  Paul Eggert  <eggert@cs.ucla.edu>
20549         mktime: improve heuristic for ca-1986 Indiana DST
20550         Problem reported by Mark Krenz <https://bugs.gnu.org/48085>.
20551         * lib/mktime.c (__mktime_internal): Be more generous about
20552         accepting arguments with the wrong value of tm_isdst, by falling
20553         back to a one-hour DST difference if we find no nearby DST that is
20554         unusual.  This fixes a problem where "1986-04-28 00:00 EDT" was
20555         rejected when TZ="America/Indianapolis" because the nearest DST
20556         timestamp occurred in 1970, a temporal distance too great for the
20557         old heuristic.  This also also narrows the search a bit, which
20558         is a minor performance win.
20559         * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS):
20560         Check for putenv failures and for Bug#48085.
20561         * tests/test-parse-datetime.c (main):
20562         Test for setenv failures and for Bug#48085.
20564 2022-02-12  Paul Eggert  <eggert@cs.ucla.edu>
20566         filevercmp: fix several unexpected results
20567         Problems reported by Michael Debertol in <https://bugs.gnu.org/49239>.
20568         While looking into this, I spotted some more areas where the
20569         code and documentation did not agree, or where the documentation
20570         was unclear.  The biggest change needed by coreutils is a new
20571         function filenvercmp that can compare byte strings containing NUL.
20572         * lib/filevercmp.c: Do not include sys/types.h, stdlib.h, string.h.
20573         Include idx.h, verify.h.
20574         (match_suffix): Remove, replacing all uses with calls to ...
20575         (file_prefixlen): ... this new function.  Simplify it by
20576         avoiding the need for a confusing READ_ALPHA state variable.
20577         Change its API to something more useful, with a *LEN arg.
20578         it with a new *LEN arg.
20579         (file_prefixlen, verrevcmp):
20580         Prefer idx_t to size_t where either will do.
20581         (order): Change args to S, POS, LEN instead of just S[POS].
20582         This lets us handle NUL bytes correctly.  Callers changed.
20583         Verify that ints are sufficiently wide for its API.
20584         (verrevcmp): Don't assume that S1[S1_LEN] is a non-digit,
20585         and likewise for S2[S2_LEN].  The byte might not be accessible
20586         if filenvercmp is being called.
20587         (filevercmp): Reimplement by calling filenvercmp.
20588         (filenvercmp): New function, rewritten without the assumption
20589         that the inputs are null-terminated.
20590         Remove "easy comparison to see if strings are identical", as the
20591         use of it later (a) was undocumented, and (b) caused sort -V to be
20592         unstable.  When both strings start with ".", do not skip past
20593         the "."s before looking for suffixes, as this disagreed
20594         with the documentation.
20595         * lib/filevercmp.h: Fix comments, which had many mistakes.
20596         (filenvercmp): New decl.
20597         * modules/filevercmp (Depends-on): Add idx, verify.  Remove string.
20598         * tests/test-filevercmp.c: Include string.h.
20599         (examples): Reorder examples ".0" and ".9" that matched the code
20600         but not the documentation.  The code has been fixed to match the
20601         documentation.  Add some examples involving \1 so that they
20602         can be tried with both \1 and \0.  Add some other examples
20603         taken from the bug report.
20604         (equals): New set of test cases.
20605         (sign, test_filevercmp): New functions.
20606         (main): Remove test case where the fixed filevercmp disagrees with
20607         strverscmp.  Use test_filevercmp instead of filevercmp, so that
20608         we also test filenvercmp.  Test the newly-introduced EQUALS cases.
20610 2022-02-09  Bruno Haible  <bruno@clisp.org>
20612         string: Fix "mismatched allocation function" warnings regarding strndup.
20613         * lib/string.in.h (strndup): Mark with _GL_ATTRIBUTE_MALLOC and
20614         _GL_ATTRIBUTE_DEALLOC_FREE. For GCC >= 11: Declare also when the
20615         platform already declares the function or when the module 'strndup' is
20616         not in use.
20618 2022-02-09  Bruno Haible  <bruno@clisp.org>
20620         unictype/category-byname: Fix test failure.
20621         * modules/unictype/category-byname (configure.ac): Bump required
20622         libunistring version.
20624 2022-02-06  Bruno Haible  <bruno@clisp.org>
20626         termcap, termcap-h: Deprecate.
20627         * modules/termcap (Status, Notice): Add deprecation.
20628         * modules/termcap-h (Status, Notice): Likewise.
20630 2022-02-05  Paul Eggert  <eggert@cs.ucla.edu>
20632         parse-datetime: allow calculations to yield -1
20633         Problem reported by Jeremy Cantrell <https://bugs.gnu.org/50115>.
20634         * lib/parse-datetime.y (parse_datetime_body): When calling mktime,
20635         use an unmodifed and negative tm_wday or tm_yday to detect an error,
20636         as a (time_t) -1 return value is valid on most hosts.
20637         * tests/test-parse-datetime.c (main): Add a test for the bug.
20639 2022-02-04  Paul Eggert  <eggert@cs.ucla.edu>
20641         userspec: help fix GNU ‘id’ incompatibility
20642         * lib/userspec.c (parse_with_separator):
20643         Don’t set *username to a numeric string that is not a user name,
20644         and similarly for *groupname.  Needed to fix Bug#53631.
20646 2022-01-30  Pádraig Brady  <P@draigBrady.com>
20648         argmatch: add variants that only match full argument
20649         * lib/argmatch.h (argmatch_exact, [X]ARGMATCH_EXACT): New interfaces
20650         that don't allow abbreviations.
20651         * lib/argmatch.c (argmatch_exact): Likewise.
20652         (__xargmatch_internal): Add a bool parameter to disable abbreviations.
20653         * tests/test-argmatch.c: Add tests.
20655 2022-01-30  Bruno Haible  <bruno@clisp.org>
20657         tests: Fix interpretation of setupterm's return code.
20658         * tests/test-terminfo.c (main): Test the value of err when setupterm
20659         fails, not when it succeeds.
20660         * tests/test-termcap.c (main): Likewise.
20662 2022-01-30  Bruno Haible  <bruno@clisp.org>
20664         terminfo: Add tests.
20665         * tests/test-terminfo.c: New file.
20666         * modules/terminfo-tests: New file.
20668         terminfo, terminfo-h: New modules.
20669         * lib/terminfo.h: New file, from GNU gettext.
20670         * m4/terminfo.m4: New file, from GNU gettext.
20671         * modules/terminfo: New file, from GNU gettext.
20672         * modules/terminfo-h: New file, from GNU gettext.
20674 2022-01-30  Bruno Haible  <bruno@clisp.org>
20676         termcap: Add tests.
20677         * tests/test-termcap.c: New file.
20678         * modules/termcap-tests: New file.
20680         termcap, termcap-h: New modules.
20681         * lib/termcap.h: New file, from GNU gettext.
20682         * lib/tparm.c: New file, from GNU gettext.
20683         * lib/tputs.c: New file, from GNU gettext.
20684         * m4/termcap.m4: New file, from GNU gettext.
20685         * m4/curses.m4: New file, from GNU gettext.
20686         * modules/termcap: New file, from GNU gettext.
20687         * modules/termcap-h: New file, from GNU gettext.
20689 2022-01-29  Bruno Haible  <bruno@clisp.org>
20691         doc: Clarify MSVC support.
20692         * doc/gnulib-intro.texi (Supported Platforms): Document that "debug"
20693         builds are unsupported.
20695 2022-01-28  Pádraig Brady  <P@draigBrady.com>
20697         maintainer-makefile: fix sc_error_message_uppercase false failure
20698         * top/maint.mk (sc_error_message_uppercase): Don't trigger for
20699         any of the PRI... defines.
20701 2022-01-27  Paul Eggert  <eggert@cs.ucla.edu>
20703         alignalloc: work around AddressSanitizer bug
20704         * doc/posix-functions/aligned_alloc.texi (aligned_alloc):
20705         Mention AddressSanitizer bug.
20706         * lib/alignalloc.h (ALIGNALLOC_VIA_ALIGNED_ALLOC):
20707         Define to 0 if AddressSanitizer is in use.
20708         * tests/test-alignalloc.c (test_alignalloc): New function,
20709         which tests for non-aligned sizes too.
20710         (main): Use it.  Don’t bother checking for alignments
20711         greater than 16 MiB, as this flummoxes AddressSanitizer
20712         and there seems little point to testing them.
20714         doc: use UTF-8 encoding
20715         * doc/gnulib.texi: Use ‘@documentencoding UTF-8’.
20716         Partly this is because there are a few UTF-8 characters
20717         in the .texi files and there seems little point nowadays
20718         to @U-ifiying them.  And partly it is so that the .info
20719         output uses nicer UTF-8 characters, e.g., it single-quotes
20720         ‘like this’ instead of 'like this'.
20722         maint: Update copyright notices
20723         * build-aux/announce-gen, build-aux/declared.sh:
20724         * build-aux/git-version-gen, build-aux/gitlog-to-changelog:
20725         * build-aux/gnu-web-doc-update, build-aux/gnupload:
20726         * build-aux/increment-serial, build-aux/libtool-next-version:
20727         * build-aux/useless-if-before-free:
20728         Update some copyright notices by hand, that were not
20729         updated automatically.
20731 2022-01-26  Paul Eggert  <eggert@cs.ucla.edu>
20733         calloc-gnu: fix misspelling in 2022-01-03 patch
20734         Problem reported by Thien-Thi Nguyen in:
20735         https://lists.gnu.org/r/bug-gnulib/2022-01/msg00170.html
20736         * modules/calloc-gnu (Depends-on):
20737         * modules/calloc-posix (Depends-on):
20738         Fix misspelling of REPLACE_CALLOC_FOR_CALLOC_POSIX.
20740         close-stream: avoid crash on MSVC Debug mode
20741         Problem reported by Julien Marrec in:
20742         https://lists.gnu.org/r/bug-m4/2022-01/msg00000.html
20743         * modules/close-stream (Depends-on): Depend on fclose.
20745 2022-01-23  Paul Eggert  <eggert@cs.ucla.edu>
20747         xstrtoimax, xstrtoumax: depend on inttypes-incomplete
20748         This fixes a call to strtoimax without declaring it,
20749         and similarly for strtoumax.
20750         * lib/xstrtoimax.c, lib/xstrtoumax.c (XSTRTOL_INCLUDE_INTTYPES_H):
20751         Define, so that strtoimax and strtoumax are declared.
20752         * lib/xstrtol.c [XSTRTOL_INCLUDE_INTTYPES_H]: Include inttypes.h.
20753         * modules/xstrtoimax, modules/xstrtoumax (Depends-on):
20754         Add inttypes-incomplete.
20756         alignalloc, xalignalloc: new modules
20757         * lib/alignalloc.c, lib/alignalloc.h, lib/xalignalloc.c:
20758         * m4/alignalloc.m4, modules/alignalloc, modules/alignalloc-tests:
20759         * modules/xalignalloc, tests/test-alignalloc.c:
20760         New files.
20762 2022-01-17  Paul Eggert  <eggert@cs.ucla.edu>
20764         extern-inline: improve macOS port
20765         * m4/extern-inline.m4 (gl_EXTERN_INLINE):
20766         Define HAVE___HEADER_INLINE at configure-time, so that config.h
20767         knows the workaround is not needed even though ctype.h has not yet
20768         been included.  This lets the compiler use extern inline functions
20769         on newer macOS platforms, instead of static inline.
20770         Problem reported by Reuben Thomas in:
20771         https://lists.gnu.org/r/bug-gnulib/2022-01/msg00130.html
20773 2022-01-17  Bruno Haible  <bruno@clisp.org>
20775         xstrtol: Trim dependencies.
20776         * lib/xstrtol.h: Include <stdint.h>, not <inttypes.h>.
20777         * modules/xstrtol (Depends-on): Add stdint. Remove inttypes-incomplete.
20779 2022-01-17  Bruno Haible  <bruno@clisp.org>
20781         xstrtol: Fix compilation error (regression 2022-01-16).
20782         * modules/xstrtol (Depends-on): Add intprops.
20784 2022-01-17  Jim Meyering  <meyering@fb.com>
20786         xstrtol: remove unnecessary else after return
20787         * lib/xstrtol.c (bkm_scale): Drop "else" after return.
20789 2022-01-16  Paul Eggert  <eggert@cs.ucla.edu>
20791         xstrtol: simplify integer overflow checking
20792         * lib/xstrtol.c: Include intprops.h.
20793         (TYPE_SIGNED): Remove, as intprops.h defines that for us now.
20794         (bkm_scale): Use INT_MULTIPLY_WRAPV instead of checking for
20795         overflow by hand.
20797         xstrtoll-tests: use %lld for long long
20798         * tests/test-xstrtoll.c, tests/test-xstrtoull.c (__spec):
20799         Do not assume long long is 64 bits, or that exact-width
20800         64-bit types exist.  Although these assumptions are true
20801         on current Gnulib platforms they are not true in general.
20802         Also, GCC warns if PRId64 is "ld" but intmax_t is long long
20803         even when long and long long are both 64 bits.
20805 2022-01-15  Bruno Haible  <bruno@clisp.org>
20807         Don't pass unknown warning option to clang.
20808         Reported by Assaf Gordon via Paul Eggert in
20809         <https://lists.gnu.org/archive/html/coreutils/2022-01/msg00018.html>.
20810         * m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): Don't use
20811         -Wno-unsuffixed-float-constants with clang.
20813 2022-01-15  Bruno Haible  <bruno@clisp.org>
20815         log tests: Avoid test failure with nvc 22.1.
20816         * tests/test-log.h (test_function): With nvc, expect up to 4 ulps error.
20818 2022-01-15  Bruno Haible  <bruno@clisp.org>
20820         havelib: Recognize ELF platform despite nvc 22.1.
20821         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Recognize Linux as an ELF
20822         platform, even with a compiler that does not define __ELF__.
20824 2022-01-15  Bruno Haible  <bruno@clisp.org>
20826         oset-c++: Avoid compilation error with nvc++ 22.1.
20827         * lib/gl_oset.hh: With EDG C++ compilers, avoid 'friend'.
20829 2022-01-14  Paul Eggert  <eggert@cs.ucla.edu>
20831         nstrftime: pacify nvc 22.1 unreachable statement
20832         * lib/nstrftime.c (__strftime_internal):
20833         Omit unreachable ‘break;’.
20835         tests: pacify nvc 22.1 unreachable statement
20836         * tests/test-sys_wait.h (test_sys_wait_macros):
20837         Widen scope of ‘#if 0’ so that there is not an unreachable ‘break;’.
20839         tests: pacify nvc 22.1 set-but-not-used
20840         * tests/test-fnmatch.c (main): Don’t set a var without using it.
20841         * tests/test-sched.c (f1): Now extern.
20843         intprops: work around nvc 22.1 bug
20844         Problem reported by Olivier Cessenat (Bug#53256).
20845         * lib/intprops.h (_GL_HAS_BUILTIN_ADD_OVERFLOW) [__EDG__]:
20846         Define to 0, since __builtin_add_overflow doesn’t work
20847         on NVIDIA HPC SDK 22.1.
20849         copy-file-range: work around Linux kernel bug
20850         This workaround is adapted from Coreutils.
20851         * lib/copy-file-range.c [__linux__ && HAVE_COPY_FILE_RANGE]:
20852         Include <sys/utsname.h>.
20853         (copy_file_range): Use a stub to replace the copy_file_range of
20854         Linux kernel versions 4.5 through 5.2.
20855         * lib/unistd.in.h (copy_file_range):
20856         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS):
20857         * modules/copy-file-range (configure.ac):
20858         * modules/unistd (unistd.h):
20859         Support replacement of copy_file_range.
20860         * m4/copy-file-range.m4 (gl_FUNC_COPY_FILE_RANGE):
20861         Define HAVE_COPY_FILE_RANGE if the system has copy_file_range,
20862         and on Linux check whether the system’s is known to work.
20864 2022-01-14  Bruno Haible  <bruno@clisp.org>
20866         Avoid error "conditional LIBUNISTRING_COMPILE_... was never defined"
20867         when option --conditional-dependencies is used (regression 2022-01-09).
20868         Reported by Gavin Smith <gavinsmith0123@gmail.com> in
20869         <https://lists.gnu.org/archive/html/bug-gnulib/2022-01/msg00099.html>.
20870         * m4/libunistring-base.m4 (gl_LIBUNISTRING_MODULE): Use gl_CONDITIONAL
20871         instead of AM_CONDITIONAL.
20873 2022-01-13  Bruno Haible  <bruno@clisp.org>
20875         Avoid warning "_GL_ATTRIBUTE_DEALLOC_FREE redefined" (regr. 2022-01-04).
20876         Reported by Werner Lemberg <wl@gnu.org> in
20877         <https://lists.gnu.org/archive/html/bug-gnulib/2022-01/msg00094.html>.
20878         * m4/gnulib-common.m4 (gl_COMMON_BODY): Avoid redefining
20879         _GL_ATTRIBUTE_DEALLOC_FREE.
20881 2022-01-10  Paul Eggert  <eggert@cs.ucla.edu>
20883         backupfile: fix bug when renaming not from wd
20884         * lib/backupfile.c (backupfile_internal): Fix bug when DIR_FD
20885         does not specify the working directory, and when RENAME.
20886         Without the bug fix, FILE is treated as relative to the working
20887         directory, not relative to DIR_FD, when renaming FILE.
20888         This bug was introduced when DIR_FD and RENAME were introduced,
20889         in 2018-10-24T02:10:21Z!eggert@cs.ucla.edu.
20890         While we’re at it, when SDIR is nonnegative improve performance a
20891         bit by passing an SDIR-relative old name to renameatu.
20893 2022-01-09  Bruno Haible  <bruno@clisp.org>
20895         host-cpu-c-abi: Add support for LoongArch64 CPU.
20896         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Define __loongarch64__. (GCC
20897         and clang predefine only __loongarch__, __loongarch64.)
20899 2022-01-09  Bruno Haible  <bruno@clisp.org>
20901         stdio: Fix "missing file" errors (regression from today).
20902         * modules/stdio (Files): Add stdio-read.c, stdio-write.c.
20903         * m4/stdio_h.m4 (gl_STDIO_H): Update comments.
20905 2022-01-09  Bruno Haible  <bruno@clisp.org>
20907         Use the GL_CFLAG_GNULIB_WARNINGS for most AC_LIBOBJ compilation units.
20908         * modules/_Exit (configure.ac): Define an Automake conditional. Remove
20909         the AC_LIBOBJ invocation.
20910         (Makefile.am): Augment lib_SOURCES, guarded by that Automake
20911         conditional.
20912         * modules/accept: Likewise.
20913         * modules/access: Likewise.
20914         * modules/acosf: Likewise.
20915         * modules/acosl: Likewise.
20916         * modules/aligned_alloc: Likewise.
20917         * modules/alphasort: Likewise.
20918         * modules/argz: Likewise.
20919         * modules/asinf: Likewise.
20920         * modules/asinl: Likewise.
20921         * modules/atan2f: Likewise.
20922         * modules/atanf: Likewise.
20923         * modules/atanl: Likewise.
20924         * modules/atexit: Likewise.
20925         * modules/atoll: Likewise.
20926         * modules/bind: Likewise.
20927         * modules/btowc: Likewise.
20928         * modules/c32rtomb: Likewise.
20929         * modules/canonicalize-lgpl: Likewise.
20930         * modules/cbrt: Likewise.
20931         * modules/cbrtf: Likewise.
20932         * modules/cbrtl: Likewise.
20933         * modules/ceil: Likewise.
20934         * modules/ceilf: Likewise.
20935         * modules/ceill: Likewise.
20936         * modules/chdir-long: Likewise.
20937         * modules/chown: Likewise.
20938         * modules/close: Likewise.
20939         * modules/closedir: Likewise.
20940         * modules/cnd: Likewise.
20941         * modules/connect: Likewise.
20942         * modules/copy-file-range: Likewise.
20943         * modules/copysign: Likewise.
20944         * modules/copysignf: Likewise.
20945         * modules/copysignl: Likewise.
20946         * modules/cosf: Likewise.
20947         * modules/coshf: Likewise.
20948         * modules/cosl: Likewise.
20949         * modules/creat: Likewise.
20950         * modules/crypto/gc: Likewise.
20951         * modules/ctime: Likewise.
20952         * modules/dirfd: Likewise.
20953         * modules/dup: Likewise.
20954         * modules/dup2: Likewise.
20955         * modules/duplocale: Likewise.
20956         * modules/error: Likewise.
20957         * modules/euidaccess: Likewise.
20958         * modules/execinfo: Likewise.
20959         * modules/execl: Likewise.
20960         * modules/execle: Likewise.
20961         * modules/execlp: Likewise.
20962         * modules/execv: Likewise.
20963         * modules/execve: Likewise.
20964         * modules/execvp: Likewise.
20965         * modules/execvpe: Likewise.
20966         * modules/exp2: Likewise.
20967         * modules/exp2f: Likewise.
20968         * modules/exp2l: Likewise.
20969         * modules/expf: Likewise.
20970         * modules/expl: Likewise.
20971         * modules/explicit_bzero: Likewise.
20972         * modules/expm1: Likewise.
20973         * modules/expm1f: Likewise.
20974         * modules/expm1l: Likewise.
20975         * modules/fabsf: Likewise.
20976         * modules/fabsl: Likewise.
20977         * modules/faccessat: Likewise.
20978         * modules/fchdir: Likewise.
20979         * modules/fchmodat: Likewise.
20980         * modules/fchownat: Likewise.
20981         * modules/fclose: Likewise.
20982         * modules/fcntl: Likewise.
20983         * modules/fdatasync: Likewise.
20984         * modules/fdopen: Likewise.
20985         * modules/fdopendir: Likewise.
20986         * modules/fflush: Likewise.
20987         * modules/ffs: Likewise.
20988         * modules/ffsl: Likewise.
20989         * modules/ffsll: Likewise.
20990         * modules/fileblocks: Likewise.
20991         * modules/float: Likewise.
20992         * modules/flock: Likewise.
20993         * modules/floor: Likewise.
20994         * modules/floorf: Likewise.
20995         * modules/floorl: Likewise.
20996         * modules/fma: Likewise.
20997         * modules/fmaf: Likewise.
20998         * modules/fmal: Likewise.
20999         * modules/fmod: Likewise.
21000         * modules/fmodf: Likewise.
21001         * modules/fmodl: Likewise.
21002         * modules/forkpty: Likewise.
21003         * modules/fpending: Likewise.
21004         * modules/fpurge: Likewise.
21005         * modules/freadable: Likewise.
21006         * modules/freadahead: Likewise.
21007         * modules/freadptr: Likewise.
21008         * modules/free-posix: Likewise.
21009         * modules/freopen: Likewise.
21010         * modules/frexpf: Likewise.
21011         * modules/fseek: Likewise.
21012         * modules/fseeko: Likewise.
21013         * modules/fseterr: Likewise.
21014         * modules/fstat: Likewise.
21015         * modules/fstatat: Likewise.
21016         * modules/fsusage: Likewise.
21017         * modules/fsync: Likewise.
21018         * modules/ftell: Likewise.
21019         * modules/ftello: Likewise.
21020         * modules/ftruncate: Likewise.
21021         * modules/fts: Likewise.
21022         * modules/futimens: Likewise.
21023         * modules/fwritable: Likewise.
21024         * modules/fwriting: Likewise.
21025         * modules/getaddrinfo: Likewise.
21026         * modules/getcwd: Likewise.
21027         * modules/getcwd-lgpl: Likewise.
21028         * modules/getdelim: Likewise.
21029         * modules/getdomainname: Likewise.
21030         * modules/getdtablesize: Likewise.
21031         * modules/getentropy: Likewise.
21032         * modules/getgroups: Likewise.
21033         * modules/gethostname: Likewise.
21034         * modules/getline: Likewise.
21035         * modules/getloadavg: Likewise.
21036         * modules/getlogin: Likewise.
21037         * modules/getlogin_r: Likewise.
21038         * modules/getopt-posix: Likewise.
21039         * modules/getpagesize: Likewise.
21040         * modules/getpeername: Likewise.
21041         * modules/getrandom: Likewise.
21042         * modules/getrusage: Likewise.
21043         * modules/getsockname: Likewise.
21044         * modules/getsockopt: Likewise.
21045         * modules/getsubopt: Likewise.
21046         * modules/gettimeofday: Likewise.
21047         * modules/getumask: Likewise.
21048         * modules/getusershell: Likewise.
21049         * modules/glob: Likewise.
21050         * modules/grantpt: Likewise.
21051         * modules/group-member: Likewise.
21052         * modules/hypot: Likewise.
21053         * modules/hypotf: Likewise.
21054         * modules/hypotl: Likewise.
21055         * modules/iconv_open: Likewise.
21056         * modules/ilogb: Likewise.
21057         * modules/ilogbf: Likewise.
21058         * modules/ilogbl: Likewise.
21059         * modules/imaxabs: Likewise.
21060         * modules/imaxdiv: Likewise.
21061         * modules/inet_ntop: Likewise.
21062         * modules/inet_pton: Likewise.
21063         * modules/ioctl: Likewise.
21064         * modules/isapipe: Likewise.
21065         * modules/isatty: Likewise.
21066         * modules/isblank: Likewise.
21067         * modules/isfinite: Likewise.
21068         * modules/isinf: Likewise.
21069         * modules/iswblank: Likewise.
21070         * modules/iswctype: Likewise.
21071         * modules/iswdigit: Likewise.
21072         * modules/iswxdigit: Likewise.
21073         * modules/lchmod: Likewise.
21074         * modules/lchown: Likewise.
21075         * modules/ldexpf: Likewise.
21076         * modules/ldexpl: Likewise.
21077         * modules/libgmp: Likewise.
21078         * modules/link: Likewise.
21079         * modules/linkat: Likewise.
21080         * modules/listen: Likewise.
21081         * modules/localeconv: Likewise.
21082         * modules/localtime: Likewise.
21083         * modules/log: Likewise.
21084         * modules/log10: Likewise.
21085         * modules/log10f: Likewise.
21086         * modules/log10l: Likewise.
21087         * modules/log1p: Likewise.
21088         * modules/log1pf: Likewise.
21089         * modules/log1pl: Likewise.
21090         * modules/log2: Likewise.
21091         * modules/log2f: Likewise.
21092         * modules/log2l: Likewise.
21093         * modules/logb: Likewise.
21094         * modules/logbf: Likewise.
21095         * modules/logbl: Likewise.
21096         * modules/logf: Likewise.
21097         * modules/login_tty: Likewise.
21098         * modules/logl: Likewise.
21099         * modules/lseek: Likewise.
21100         * modules/lstat: Likewise.
21101         * modules/mbrlen: Likewise.
21102         * modules/mbrtoc32: Likewise.
21103         * modules/mbrtowc: Likewise.
21104         * modules/mbsinit: Likewise.
21105         * modules/mbsnrtowcs: Likewise.
21106         * modules/mbsrtowcs: Likewise.
21107         * modules/mbtowc: Likewise.
21108         * modules/memalign: Likewise.
21109         * modules/memchr: Likewise.
21110         * modules/memcmp: Likewise.
21111         * modules/memcpy: Likewise.
21112         * modules/memmove: Likewise.
21113         * modules/mempcpy: Likewise.
21114         * modules/memrchr: Likewise.
21115         * modules/memset: Likewise.
21116         * modules/mkdir: Likewise.
21117         * modules/mkdirat: Likewise.
21118         * modules/mkdtemp: Likewise.
21119         * modules/mkfifo: Likewise.
21120         * modules/mkfifoat: Likewise.
21121         * modules/mknod: Likewise.
21122         * modules/mkostemp: Likewise.
21123         * modules/mkostemps: Likewise.
21124         * modules/mkstemp: Likewise.
21125         * modules/mkstemps: Likewise.
21126         * modules/modf: Likewise.
21127         * modules/modff: Likewise.
21128         * modules/modfl: Likewise.
21129         * modules/mountlist: Likewise.
21130         * modules/msvc-inval: Likewise.
21131         * modules/msvc-nothrow: Likewise.
21132         * modules/mtx: Likewise.
21133         * modules/nanosleep: Likewise.
21134         * modules/nl_langinfo: Likewise.
21135         * modules/obstack: Likewise.
21136         * modules/open: Likewise.
21137         * modules/openat: Likewise.
21138         * modules/opendir: Likewise.
21139         * modules/openpty: Likewise.
21140         * modules/pclose: Likewise.
21141         * modules/perror: Likewise.
21142         * modules/pipe-posix: Likewise.
21143         * modules/poll: Likewise.
21144         * modules/popen: Likewise.
21145         * modules/posix_memalign: Likewise.
21146         * modules/posix_openpt: Likewise.
21147         * modules/posix_spawn: Likewise.
21148         * modules/posix_spawn-internal: Likewise.
21149         * modules/posix_spawn_file_actions_addchdir: Likewise.
21150         * modules/posix_spawn_file_actions_addclose: Likewise.
21151         * modules/posix_spawn_file_actions_adddup2: Likewise.
21152         * modules/posix_spawn_file_actions_addfchdir: Likewise.
21153         * modules/posix_spawn_file_actions_addopen: Likewise.
21154         * modules/posix_spawn_file_actions_destroy: Likewise.
21155         * modules/posix_spawn_file_actions_init: Likewise.
21156         * modules/posix_spawnattr_destroy: Likewise.
21157         * modules/posix_spawnattr_getflags: Likewise.
21158         * modules/posix_spawnattr_getpgroup: Likewise.
21159         * modules/posix_spawnattr_getschedparam: Likewise.
21160         * modules/posix_spawnattr_getschedpolicy: Likewise.
21161         * modules/posix_spawnattr_getsigdefault: Likewise.
21162         * modules/posix_spawnattr_getsigmask: Likewise.
21163         * modules/posix_spawnattr_init: Likewise.
21164         * modules/posix_spawnattr_setflags: Likewise.
21165         * modules/posix_spawnattr_setpgroup: Likewise.
21166         * modules/posix_spawnattr_setschedparam: Likewise.
21167         * modules/posix_spawnattr_setschedpolicy: Likewise.
21168         * modules/posix_spawnattr_setsigdefault: Likewise.
21169         * modules/posix_spawnattr_setsigmask: Likewise.
21170         * modules/posix_spawnp: Likewise.
21171         * modules/powf: Likewise.
21172         * modules/pread: Likewise.
21173         * modules/pselect: Likewise.
21174         * modules/pthread-cond: Likewise.
21175         * modules/pthread-mutex: Likewise.
21176         * modules/pthread-once: Likewise.
21177         * modules/pthread-rwlock: Likewise.
21178         * modules/pthread-spin: Likewise.
21179         * modules/pthread-thread: Likewise.
21180         * modules/pthread-tss: Likewise.
21181         * modules/pthread_mutex_timedlock: Likewise.
21182         * modules/pthread_sigmask: Likewise.
21183         * modules/ptsname: Likewise.
21184         * modules/ptsname_r: Likewise.
21185         * modules/putenv: Likewise.
21186         * modules/pwrite: Likewise.
21187         * modules/qsort_r: Likewise.
21188         * modules/raise: Likewise.
21189         * modules/random: Likewise.
21190         * modules/random_r: Likewise.
21191         * modules/rawmemchr: Likewise.
21192         * modules/read: Likewise.
21193         * modules/readdir: Likewise.
21194         * modules/readline: Likewise.
21195         * modules/readlink: Likewise.
21196         * modules/readlinkat: Likewise.
21197         * modules/readutmp: Likewise.
21198         * modules/reallocarray: Likewise.
21199         * modules/recv: Likewise.
21200         * modules/recvfrom: Likewise.
21201         * modules/regex: Likewise.
21202         * modules/relocatable-prog: Likewise.
21203         * modules/remainder: Likewise.
21204         * modules/remainderf: Likewise.
21205         * modules/remainderl: Likewise.
21206         * modules/remove: Likewise.
21207         * modules/rename: Likewise.
21208         * modules/renameat: Likewise.
21209         * modules/rewinddir: Likewise.
21210         * modules/rint: Likewise.
21211         * modules/rintf: Likewise.
21212         * modules/rintl: Likewise.
21213         * modules/rmdir: Likewise.
21214         * modules/round: Likewise.
21215         * modules/roundf: Likewise.
21216         * modules/roundl: Likewise.
21217         * modules/rpmatch: Likewise.
21218         * modules/scandir: Likewise.
21219         * modules/sched_yield: Likewise.
21220         * modules/secure_getenv: Likewise.
21221         * modules/select: Likewise.
21222         * modules/selinux-h: Likewise.
21223         * modules/send: Likewise.
21224         * modules/sendto: Likewise.
21225         * modules/setenv: Likewise.
21226         * modules/sethostname: Likewise.
21227         * modules/setlocale: Likewise.
21228         * modules/setlocale-null: Likewise.
21229         * modules/setsockopt: Likewise.
21230         * modules/shutdown: Likewise.
21231         * modules/sig2str: Likewise.
21232         * modules/sigabbrev_np: Likewise.
21233         * modules/sigaction: Likewise.
21234         * modules/sigdescr_np: Likewise.
21235         * modules/signbit: Likewise.
21236         * modules/sigprocmask: Likewise.
21237         * modules/sinf: Likewise.
21238         * modules/sinhf: Likewise.
21239         * modules/sinl: Likewise.
21240         * modules/sleep: Likewise.
21241         * modules/socket: Likewise.
21242         * modules/spawn-pipe: Likewise.
21243         * modules/sqrtf: Likewise.
21244         * modules/sqrtl: Likewise.
21245         * modules/stat: Likewise.
21246         * modules/stdio: Likewise.
21247         * modules/stpcpy: Likewise.
21248         * modules/stpncpy: Likewise.
21249         * modules/strcase: Likewise.
21250         * modules/strchrnul: Likewise.
21251         * modules/strcspn: Likewise.
21252         * modules/strdup-posix: Likewise.
21253         * modules/strerror: Likewise.
21254         * modules/strerror-override: Likewise.
21255         * modules/strerrorname_np: Likewise.
21256         * modules/strfmon_l: Likewise.
21257         * modules/strftime-fixes: Likewise.
21258         * modules/strncat: Likewise.
21259         * modules/strndup: Likewise.
21260         * modules/strnlen: Likewise.
21261         * modules/strpbrk: Likewise.
21262         * modules/strptime: Likewise.
21263         * modules/strsep: Likewise.
21264         * modules/strsignal: Likewise.
21265         * modules/strtod: Likewise.
21266         * modules/strtoimax: Likewise.
21267         * modules/strtok_r: Likewise.
21268         * modules/strtol: Likewise.
21269         * modules/strtold: Likewise.
21270         * modules/strtoll: Likewise.
21271         * modules/strtoul: Likewise.
21272         * modules/strtoull: Likewise.
21273         * modules/strtoumax: Likewise.
21274         * modules/strverscmp: Likewise.
21275         * modules/symlink: Likewise.
21276         * modules/symlinkat: Likewise.
21277         * modules/tanf: Likewise.
21278         * modules/tanhf: Likewise.
21279         * modules/tanl: Likewise.
21280         * modules/tcgetsid: Likewise.
21281         * modules/thrd: Likewise.
21282         * modules/time_r: Likewise.
21283         * modules/time_rz: Likewise.
21284         * modules/timegm: Likewise.
21285         * modules/times: Likewise.
21286         * modules/timespec_get: Likewise.
21287         * modules/timespec_getres: Likewise.
21288         * modules/tmpfile: Likewise.
21289         * modules/towctrans: Likewise.
21290         * modules/trunc: Likewise.
21291         * modules/truncate: Likewise.
21292         * modules/truncf: Likewise.
21293         * modules/truncl: Likewise.
21294         * modules/tsearch: Likewise.
21295         * modules/tss: Likewise.
21296         * modules/ttyname_r: Likewise.
21297         * modules/tzset: Likewise.
21298         * modules/uname: Likewise.
21299         * modules/unlink: Likewise.
21300         * modules/unlinkat: Likewise.
21301         * modules/unlockpt: Likewise.
21302         * modules/unsetenv: Likewise.
21303         * modules/usleep: Likewise.
21304         * modules/utime: Likewise.
21305         * modules/utimensat: Likewise.
21306         * modules/waitpid: Likewise.
21307         * modules/wcpcpy: Likewise.
21308         * modules/wcpncpy: Likewise.
21309         * modules/wcrtomb: Likewise.
21310         * modules/wcscasecmp: Likewise.
21311         * modules/wcscat: Likewise.
21312         * modules/wcschr: Likewise.
21313         * modules/wcscmp: Likewise.
21314         * modules/wcscoll: Likewise.
21315         * modules/wcscpy: Likewise.
21316         * modules/wcscspn: Likewise.
21317         * modules/wcsdup: Likewise.
21318         * modules/wcsftime: Likewise.
21319         * modules/wcslen: Likewise.
21320         * modules/wcsncasecmp: Likewise.
21321         * modules/wcsncat: Likewise.
21322         * modules/wcsncmp: Likewise.
21323         * modules/wcsncpy: Likewise.
21324         * modules/wcsnlen: Likewise.
21325         * modules/wcsnrtombs: Likewise.
21326         * modules/wcspbrk: Likewise.
21327         * modules/wcsrchr: Likewise.
21328         * modules/wcsrtombs: Likewise.
21329         * modules/wcsspn: Likewise.
21330         * modules/wcsstr: Likewise.
21331         * modules/wcstok: Likewise.
21332         * modules/wcswidth: Likewise.
21333         * modules/wcsxfrm: Likewise.
21334         * modules/wctob: Likewise.
21335         * modules/wctomb: Likewise.
21336         * modules/wctrans: Likewise.
21337         * modules/wctype: Likewise.
21338         * modules/wcwidth: Likewise.
21339         * modules/windows-cond: Likewise.
21340         * modules/windows-mutex: Likewise.
21341         * modules/windows-once: Likewise.
21342         * modules/windows-recmutex: Likewise.
21343         * modules/windows-rwlock: Likewise.
21344         * modules/windows-spawn: Likewise.
21345         * modules/windows-spin: Likewise.
21346         * modules/windows-thread: Likewise.
21347         * modules/windows-timedmutex: Likewise.
21348         * modules/windows-timedrecmutex: Likewise.
21349         * modules/windows-timedrwlock: Likewise.
21350         * modules/windows-tls: Likewise.
21351         * modules/wmemchr: Likewise.
21352         * modules/wmemcmp: Likewise.
21353         * modules/wmemcpy: Likewise.
21354         * modules/wmemmove: Likewise.
21355         * modules/wmempcpy: Likewise.
21356         * modules/wmemset: Likewise.
21357         * modules/write: Likewise.
21359 2022-01-09  Bruno Haible  <bruno@clisp.org>
21361         obstack: Move AC_LIBOBJ invocation to the module description.
21362         * m4/obstack.m4 (gl_FUNC_OBSTACK): Renamed from AC_FUNC_OBSTACK. Don't
21363         invoke AC_LIBSOURCES nor AC_LIBOBJ.
21364         * modules/obstack (configure.ac): Update. Invoke AC_LIBOBJ here.
21366 2022-01-09  Bruno Haible  <bruno@clisp.org>
21368         stdio: Move AC_LIBOBJ invocations to the module description.
21369         * m4/stdio_h.m4 (gl_STDIO_H): Don't invoke AC_LIBOBJ.
21370         * modules/stdio (configure.ac): Invoke AC_LIBOBJ here.
21372 2022-01-09  Bruno Haible  <bruno@clisp.org>
21374         fchdir: Move AC_LIBOBJ invocation to the module description.
21375         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't invoke AC_LIBOBJ and
21376         gl_PREREQ_FCHDIR.
21377         * modules/fchdir (configure.ac): Invoke AC_LIBOBJ and gl_PREREQ_FCHDIR.
21379 2022-01-09  Bruno Haible  <bruno@clisp.org>
21381         Remove influence of Automake conditionals on conditional dependencies.
21382         * m4/gnulib-common.m4 (gl_CONDITIONAL): New macro.
21383         (gl_CONDITIONAL_HEADER): Use it instead of AM_CONDITIONAL.
21384         * m4/libgmp.m4 (gl_LIBGMP): Likewise.
21385         * modules/posix_spawn_file_actions_addfchdir-tests (configure.ac):
21386         Likewise.
21387         * modules/uchar-c++-tests (configure.ac): Likewise.
21388         * gnulib-tool (func_modules_transitive_closure): Don't inhibit
21389         conditional dependencies processing on a module that uses an Automake
21390         conditional.
21392 2022-01-08  Bruno Haible  <bruno@clisp.org>
21394         gnulib-tool: Fix "Don't forget" messages (regression 2021-12-12).
21395         * gnulib-tool (func_import): Fix variable references in "Don't forget"
21396         messages.
21398 2022-01-08  Bruno Haible  <bruno@clisp.org>
21400         gnulib-tool: Remove all *.Po files upon distclean (regr. 2022-01-05).
21401         Reported by Mohammad Akhlaghi <mohammad@akhlaghi.org> in
21402         <https://lists.gnu.org/archive/html/bug-gnulib/2022-01/msg00061.html>.
21403         * gnulib-tool (func_emit_initmacro_end): Collect the *.Po or *.Plo files
21404         to remove into an AC_SUBSTed variable gl_LIBOBJDEPS.
21405         (func_emit_lib_Makefile_am): Extend the distclean and maintainer-clean
21406         rules.
21408 2022-01-08  Bruno Haible  <bruno@clisp.org>
21410         Add another example.
21411         * examples/hello-c-gnulib-conddeps: New directory.
21413 2022-01-08  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
21415         c-stack: Adapt header file for use in C++ applications.
21416         * lib/c-stack.h: Add extern "C" block.
21418 2022-01-08  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
21420         version-etc: Adapt header file for use in C++ applications.
21421         * lib/version-etc.h: Add extern "C" block.
21423 2022-01-07  Bruno Haible  <bruno@clisp.org>
21425         sigsegv: Improve support for Linux/LoongArch64.
21426         * lib/sigsegv.c (SIGSEGV_FAULT_STACKPOINTER): Add special case for
21427         Linux/LoongArch.
21429 2022-01-05  Glenn Washburn  <development@efficientek.com>
21431         bootstrap: When a commit is specified, do a shallow fetch if possible.
21432         Rationale and explanation:
21433         <https://lists.gnu.org/archive/html/bug-gnulib/2021-10/msg00073.html>.
21434         * bootstrap: When a commit hash is specified, ask for this specific
21435         commit on fetch, and fallback to fetching the entire repository if
21436         fetching by commit hash fails.
21438 2022-01-05  Paul Eggert  <eggert@cs.ucla.edu>
21440         stack: pacify gcc -Wsign-compare
21441         * lib/stack.h (_GL_STACK_TYPE): Use idx_t for size too.
21442         Suggested by Bruno Haible in:
21443         https://lists.gnu.org/r/bug-gnulib/2022-01/msg00035.html
21444         (_GL_STACK_PREFIX (size)): Return idx_t, not size_t.
21446 2022-01-05  Bruno Haible  <bruno@clisp.org>
21448         Fix last commit.
21449         Based on a patch by José E. Marchesi <jemarch@gnu.org>, reported in
21450         <https://lists.gnu.org/archive/html/bug-gnulib/2022-01/msg00036.html>.
21451         * m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): Don't enable
21452         -Wimplicit-fallthrough for GCC < 7.
21454 2022-01-05  Bruno Haible  <bruno@clisp.org>
21456         gnulib-tool: Avoid known warnings that reflect Gnulib's coding style.
21457         * m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): New macro.
21458         * gnulib-tool (func_emit_lib_Makefile_am): Add the
21459         GL_CFLAG_GNULIB_WARNINGS to the CFLAGS of all the compilation units of
21460         the library.
21461         (func_emit_tests_Makefile_am): Add the GL_CFLAG_GNULIB_WARNINGS to the
21462         CFLAGS.
21463         (func_import): Emit an invocation of gl_CC_GNULIB_WARNINGS.
21465 2022-01-04  Bernhard Voelker  <mail@bernhard-voelker.de>
21467         license: fix GPLv3 texts to use a comma instead of semicolon.
21468         See: https://www.gnu.org/licenses/gpl-3.0.html#howto
21469         Run:
21470           $ git grep -l 'Foundation; either version 3' \
21471               | xargs sed -i '/Foundation; either version 3/ s/n; e/n, e/'
21472         * All files using GPLv3: Adjust via the above command.
21474 2022-01-04  Bruno Haible  <bruno@clisp.org>
21476         string, wchar: Fix compilation error on MSVC (regression 2021-09-07).
21477         * lib/string.in.h (free): Don't redeclare as rpl_free. Instead, redefine
21478         _GL_ATTRIBUTE_DEALLOC_FREE to reference rpl_free directly.
21479         * lib/wchar.in.h (free): Likewise.
21481 2022-01-03  Bruno Haible  <bruno@clisp.org>
21483         getpass-gnu: Allow use as dependency from test modules.
21484         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): Set
21485         REPLACE_GETPASS_FOR_GETPASS_GNU instead of REPLACE_GETPASS.
21486         * m4/unistd_h.m4 (gl_UNISTD_H_REQUIRE_DEFAULTS): Initialize the
21487         getpass-gnu module indicator.
21488         (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_GETPASS_FOR_GETPASS_GNU.
21489         * modules/unistd (Makefile.am): Substitute GNULIB_GETPASS_GNU,
21490         REPLACE_GETPASS_FOR_GETPASS_GNU.
21491         * modules/getpass-gnu (configure.ac): Test
21492         REPLACE_GETPASS_FOR_GETPASS_GNU instead of REPLACE_GETPASS. Set a module
21493         indicator.
21494         * lib/unistd.in.h (getpass): Test REPLACE_GETPASS,
21495         REPLACE_GETPASS_FOR_GETPASS_GNU, and the respective module indicators
21496         instead of just REPLACE_GETPASS.
21498 2022-01-03  Bruno Haible  <bruno@clisp.org>
21500         fopen-gnu: Allow use as dependency from test modules.
21501         * m4/fopen.m4 (gl_FUNC_FOPEN_GNU): Set REPLACE_FOPEN_FOR_FOPEN_GNU
21502         instead of REPLACE_FOPEN.
21503         * m4/stdio_h.m4 (gl_STDIO_H_REQUIRE_DEFAULTS): Initialize the fopen-gnu
21504         module indicator.
21505         (gl_STDIO_H_DEFAULTS): Initialize REPLACE_FOPEN_FOR_FOPEN_GNU.
21506         * modules/stdio (Makefile.am): Substitute GNULIB_FOPEN_GNU,
21507         REPLACE_FOPEN_FOR_FOPEN_GNU.
21508         * modules/fopen-gnu (Depends-on): Add more dependencies.
21509         (configure.ac): Test REPLACE_FOPEN_FOR_FOPEN_GNU instead of
21510         REPLACE_FOPEN.
21511         * lib/stdio.in.h (fopen): Test REPLACE_FOPEN,
21512         REPLACE_FOPEN_FOR_FOPEN_GNU, and the respective module indicators
21513         instead of just REPLACE_FOPEN.
21515 2022-01-03  Bruno Haible  <bruno@clisp.org>
21517         realloc-gnu: Allow use as dependency from test modules.
21518         * m4/realloc.m4 (gl_FUNC_REALLOC_GNU): Set
21519         REPLACE_REALLOC_FOR_REALLOC_GNU instead of REPLACE_REALLOC.
21520         (gl_FUNC_REALLOC_POSIX): Set REPLACE_REALLOC_FOR_REALLOC_POSIX instead
21521         of REPLACE_REALLOC.
21522         * m4/stdlib_h.m4 (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize the
21523         realloc-gnu module indicator.
21524         (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_REALLOC_FOR_REALLOC_GNU,
21525         REPLACE_REALLOC_FOR_REALLOC_POSIX, not REPLACE_REALLOC.
21526         * modules/stdlib (Makefile.am): Substitute GNULIB_REALLOC_GNU,
21527         REPLACE_REALLOC_FOR_REALLOC_GNU, REPLACE_REALLOC_FOR_REALLOC_POSIX, not
21528         REPLACE_REALLOC.
21529         * modules/realloc-posix (Depends-on, configure.ac): Test
21530         REPLACE_REALLOC_FOR_REALLOC_POSIX instead of REPLACE_REALLOC.
21531         * modules/realloc-gnu (Comment): Remove section.
21532         (Depends-on): Add free-posix, malloc-gnu, xalloc-oversized.
21533         (configure.ac): Test REPLACE_REALLOC_FOR_REALLOC_GNU instead of
21534         REPLACE_REALLOC. Set a module indicator.
21535         * lib/stdlib.in.h (realloc): Test REPLACE_REALLOC_FOR_REALLOC_POSIX,
21536         REPLACE_REALLOC_FOR_REALLOC_GNU, and the respective module indicators
21537         instead of just REPLACE_REALLOC.
21539 2022-01-03  Bruno Haible  <bruno@clisp.org>
21541         calloc-gnu: Allow use as dependency from test modules.
21542         * m4/calloc.m4 (gl_FUNC_CALLOC_GNU): Set REPLACE_CALLOC_FOR_CALLOC_GNU
21543         instead of REPLACE_CALLOC.
21544         (gl_FUNC_CALLOC_POSIX): Set REPLACE_CALLOC_FOR_CALLOC_POSIX instead of
21545         REPLACE_CALLOC.
21546         * m4/stdlib_h.m4 (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize the
21547         calloc-gnu module indicator.
21548         (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_CALLOC_FOR_CALLOC_GNU,
21549         REPLACE_CALLOC_FOR_CALLOC_POSIX, not REPLACE_CALLOC.
21550         * modules/stdlib (Makefile.am): Substitute GNULIB_CALLOC_GNU,
21551         REPLACE_CALLOC_FOR_CALLOC_GNU, REPLACE_CALLOC_FOR_CALLOC_POSIX, not
21552         REPLACE_CALLOC.
21553         * modules/calloc-posix (Depends-on, configure.ac): Test
21554         REPLACE_CALLOC_FOR_CALLOC_POSIX instead of REPLACE_CALLOC.
21555         * modules/calloc-gnu (Depends-on): Add xalloc-oversized.
21556         (configure.ac): Test REPLACE_CALLOC_FOR_CALLOC_GNU instead of
21557         REPLACE_CALLOC. Set a module indicator.
21558         * lib/stdlib.in.h (calloc): Test REPLACE_CALLOC_FOR_CALLOC_POSIX,
21559         REPLACE_CALLOC_FOR_CALLOC_GNU, and the respective module indicators
21560         instead of just REPLACE_CALLOC.
21562 2022-01-03  Bruno Haible  <bruno@clisp.org>
21564         malloc-gnu: Allow use as dependency from test modules.
21565         * m4/malloc.m4 (gl_FUNC_MALLOC_GNU): Set REPLACE_MALLOC_FOR_MALLOC_GNU
21566         instead of REPLACE_MALLOC.
21567         (gl_FUNC_MALLOC_PTRDIFF, gl_FUNC_MALLOC_POSIX): Set
21568         REPLACE_MALLOC_FOR_MALLOC_POSIX instead of REPLACE_MALLOC.
21569         * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): Test
21570         REPLACE_MALLOC_FOR_MALLOC_POSIX instead of REPLACE_MALLOC.
21571         * m4/realloc.m4 (gl_FUNC_REALLOC_POSIX): Likewise.
21572         * m4/stdlib_h.m4 (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize the
21573         malloc-gnu module indicator.
21574         (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_MALLOC_FOR_MALLOC_GNU,
21575         REPLACE_MALLOC_FOR_MALLOC_POSIX, not REPLACE_MALLOC.
21576         * modules/stdlib (Makefile.am): Substitute GNULIB_MALLOC_GNU,
21577         REPLACE_MALLOC_FOR_MALLOC_GNU, REPLACE_MALLOC_FOR_MALLOC_POSIX, not
21578         REPLACE_MALLOC.
21579         * modules/malloc-posix (Depends-on, configure.ac): Test
21580         REPLACE_MALLOC_FOR_MALLOC_POSIX instead of REPLACE_MALLOC.
21581         * modules/malloc-gnu (Comment): Remove section.
21582         (Depends-on): Add xalloc-oversized.
21583         (configure.ac): Test REPLACE_MALLOC_FOR_MALLOC_GNU instead of
21584         REPLACE_MALLOC. Set a module indicator.
21585         * lib/stdlib.in.h (malloc): Test REPLACE_MALLOC_FOR_MALLOC_POSIX,
21586         REPLACE_MALLOC_FOR_MALLOC_GNU, and the respective module indicators
21587         instead of just REPLACE_MALLOC.
21589 2022-01-02  Bruno Haible  <bruno@clisp.org>
21591         striconveh: Make the last change also work on Solaris 11.
21592         * lib/striconveh.c (mem_cd_iconveh_internal): Tweak last commit.
21594         striconveh: Make the last change also work on musl libc.
21595         * lib/striconveh.c (mem_cd_iconveh_internal): Make the U+FFFD conversion
21596         also work with non-GNU iconv() implementations.
21598 2022-01-01  Paul Eggert  <eggert@cs.ucla.edu>
21600         gen-header: port to BusyBox ‘sed’
21601         Problem reported by Tim Rühsen in:
21602         https://lists.gnu.org/r/bug-gnulib/2022-01/msg00004.html
21603         * modules/gen-header (SED_HEADER_NOEDIT): Replace instead of prepend.
21604         (SED_HEADER_STDOUT, SED_HEADER_TO_AT_t): Adjust to that change.
21605         Do not use ‘w foo’ twice in the same script, as BusyBox ‘sed’
21606         mistakenly opens ‘foo’ for output twice, thus losing some output.
21608 2022-01-01  Bruno Haible  <bruno@clisp.org>
21610         striconveh: Support an error handler that produces a Unicode U+FFFD.
21611         Suggested by Marc Nieper-Wißkirchen in
21612         <https://lists.gnu.org/archive/html/bug-gnulib/2021-12/msg00175.html>.
21613         * lib/iconveh.h (iconveh_replacement_character): New enum value.
21614         * lib/striconveh.c (mem_cd_iconveh_internal): When the handler is
21615         iconveh_replacement_character, try to produce U+FFFD when possible,
21616         instead of '?'.
21617         * tests/test-striconveh.c (main): Add GB18030 tests. Test also
21618         iconveh_replacement_character.
21620 2022-01-01  Bruno Haible  <bruno@clisp.org>
21622         maint: Update copyright notices.
21623         * build-aux/declared.sh (func_version): Bump year.
21625 2022-01-01  Bruno Haible  <bruno@clisp.org>
21627         maint: Update copyright notices in code generating programs.
21628         * lib/gen-uni-tables.c (output_predicate_test, output_predicate,
21629         output_category, output_combclass, output_bidi_category,
21630         output_decimal_digit_test, output_decimal_digit, output_digit_test,
21631         output_digit, output_numeric_test, output_numeric, output_mirror,
21632         output_joining_type_test, output_joining_type,
21633         output_joining_group_test, output_joining_group, output_scripts,
21634         output_scripts_byname, output_blocks, output_ident_category,
21635         output_nonspacing_property, output_lbrk_tables,
21636         output_lbrk_rules_as_tables, output_wbrk_tables, output_gbp_test,
21637         output_gbp_table, output_decomposition_tables,
21638         output_composition_tables, output_simple_mapping_test,
21639         output_simple_mapping, output_casing_rules): Extend copyright year of
21640         generated file to 2022.
21641         * lib/uniname/gen-uninames.lisp (main): Likewise. Produce license notice
21642         that is consistent with the gnulib/etc/license-notices/ files.
21643         * All files regenerated.
21645 2022-01-01  Paul Eggert  <eggert@cs.ucla.edu>
21647         maint: fix ‘make update-copyright’ on symlinks
21648         After running ‘make update-copyright’ I noticed that it
21649         incorrectly replaced a couple of symlinks with their contents.
21650         * Makefile (update-copyright): Do not update symlinks.
21651         * etc/license-notices/GPL, etc/license-notices/LGPL:
21652         Change these back to symlinks.
21654 2021-12-31  Bruno Haible  <bruno@clisp.org>
21656         unistdio: Prefer newer version to older, buggy one.
21657         * modules/unistdio/ulc-vasnprintf (configure.ac): Bump required
21658         libunistring version. This is needed because of the heap overrun fix
21659         (2018-09-23) and the need to avoid %n on more platforms (2020-10-04).
21660         * modules/unistdio/ulc-asnprintf (configure.ac): Likewise.
21661         * modules/unistdio/ulc-asprintf (configure.ac): Likewise.
21662         * modules/unistdio/ulc-fprintf (configure.ac): Likewise.
21663         * modules/unistdio/ulc-snprintf (configure.ac): Likewise.
21664         * modules/unistdio/ulc-sprintf (configure.ac): Likewise.
21665         * modules/unistdio/ulc-vasprintf (configure.ac): Likewise.
21666         * modules/unistdio/ulc-vfprintf (configure.ac): Likewise.
21667         * modules/unistdio/ulc-vsnprintf (configure.ac): Likewise.
21668         * modules/unistdio/ulc-vsprintf (configure.ac): Likewise.
21670 2021-12-31  Bruno Haible  <bruno@clisp.org>
21672         uniwidth: Optimize.
21673         * lib/gen-uni-tables.c (output_nonspacing_property): Add version
21674         parameter. Emit the usual boilerplate header for generated files.
21675         (is_width2): New function, based on lib/uniwidth/width.c.
21676         (output_width2_property): New function.
21677         (main): Create uniwidth/width0.h instead of uniwidth/width.c.part.
21678         Create uniwidth/width2.h.
21679         * lib/uniwidth/width.c: Include width0.h, width2.h, bitmap.h.
21680         (nonspacing_table_data, nonspacing_table_ind): Remove here.
21681         (uc_width): Replace the double-width character with an u_width2 bitmap
21682         lookup.
21683         * modules/uniwidth/width (Files): Add lib/uniwidth/width0.h,
21684         lib/uniwidth/width2.h, lib/unictype/bitmap.h.
21686 2021-12-31  Bruno Haible  <bruno@clisp.org>
21688         Update to Unicode 14.0.0.
21690         * lib/gen-uni-tables.c (UC_JOINING_GROUP_THIN_YEH,
21691         UC_JOINING_GROUP_VERTICAL_TAIL): New enum values.
21692         (fill_arabicshaping, joining_group_as_c_identifier): Recognize these
21693         joining groups.
21694         * lib/unictype.in.h (UC_JOINING_GROUP_THIN_YEH,
21695         UC_JOINING_GROUP_VERTICAL_TAIL): New enum values.
21696         * lib/unictype/joininggroup_name.h: Add the THIN_YEH, VERTICAL_TAIL
21697         joining groups.
21698         * lib/unictype/joininggroup_byname.gperf: Likewise.
21700         * lib/gen-uni-tables.c (LBP_ID1, LBP_ID2): New enum values.
21701         (LBP_ID): Assign artificial value.
21702         (get_lbp): Use the extended_pictographic property to assign LBP_ID1,
21703         LBP_ID2 instead of LBP_ID. Update such that unilbrk/lbrkprop.txt comes
21704         out as expected.
21705         (debug_output_lbp): Print either LBP_ID1 or LBP_ID2 as LBP_ID.
21706         (lbp_value_to_string): Handle LBP_ID1, LBP_ID2 instead of LBP_ID.
21707         (output_lbrk_rules_as_tables): Treat LBP_ID as macro that maps to two
21708         table rows/columns. In rule LB30b, use LBP_ID2 in addition to LBP_EB.
21709         Remove redundant part of rule LB27.
21710         * lib/unilbrk/lbrktables.h (LBP_ID1, LBP_ID2): New enum values.
21711         (LBP_ID): Remove enum value.
21712         (unilbrk_table): Update declaration.
21713         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks_loop):
21714         Use LBP_ID1 instead of LBP_ID.
21715         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks_loop):
21716         Likewise.
21717         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks_loop):
21718         Likewise.
21719         * tests/unilbrk/test-u8-possible-linebreaks.c (test_function): Add a
21720         test of potential future emoji.
21721         * tests/unilbrk/test-u16-possible-linebreaks.c (test_function):
21722         Likewise.
21723         * tests/unilbrk/test-u32-possible-linebreaks.c (test_function):
21724         Likewise.
21726         * lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind):
21727         Update.
21728         (uc_width): Assign width 2 to the characters 0x1AFF0..0x1AFF3,
21729         0x1AFF5..0x1AFFB, 0x1AFFD..0x1AFFE, 0x1B120..0x1B122, 0x1F6DD..0x1F6DF,
21730         0x1F7F0, 0x1FA7B..0x1FA7C, 0x1FAA9..0x1FAAC, 0x1FAB7..0x1FABA,
21731         0x1FAC3..0x1FAC5, 0x1FAD7..0x1FAD9, 0x1FAE0..0x1FAE7, 0x1FAF0..0x1FAF6.
21732         * tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
21733         0x0890..0x0891, 0x0898..0x089F, 0x08CA..0x0902, 0x0C3C, 0x180F,
21734         0x1AC1..0x1ACE, 0x1DFA, 0x10F82..0x10F85, 0x11070, 0x11073..0x11074,
21735         0x110C2, 0x1CF00..0x1CF2D, 0x1CF30..0x1CF46, 0x1E2AE. Expect ambiguous
21736         width for the character 0x1734. Expect width 2 for the characters
21737         0x1AFF0..0x1AFF3, 0x1AFF5..0x1AFFB, 0x1AFFD..0x1AFFE, 0x1B120..0x1B122,
21738         0x1F6DD..0x1F6DF, 0x1F7F0, 0x1FA7B..0x1FA7C, 0x1FAA9..0x1FAAC,
21739         0x1FAB7..0x1FABA, 0x1FAC3..0x1FAC5, 0x1FAD7..0x1FAD9, 0x1FAE0..0x1FAE7,
21740         0x1FAF0..0x1FAF6.
21742         * All generated files under lib/uni* and tests/uni*: Regenerate.
21743         * tests/uniname/NameAliases.txt: Update.
21744         * tests/uniname/UnicodeData.txt: Update.
21745         * tests/uninorm/NormalizationTest.txt: Update.
21746         * tests/unigbrk/GraphemeBreakTest.txt: Update.
21747         * tests/uniwbrk/WordBreakTest.txt: Update.
21749         * All the affected modules: Bump required libunistring version.
21751 2021-12-31  Bruno Haible  <bruno@clisp.org>
21753         Update to Unicode 13.0.0.
21755         * lib/gen-uni-tables.c (is_WBP_MIDLETTER): Add character 0x055F.
21756         (get_wbp): Assign value WBP_ALETTER to the characters 0x02E5..0x02EB,
21757         0x055A, 0x058A, 0xA708..0xA716.
21759         * lib/gen-uni-tables.c (LBP_CP1, LBP_CP2, LBP_OP1, LBP_OP2): New enum
21760         values.
21761         (LBP_OP, LBP_CP): Assign artificial values.
21762         (get_lbp): Use the unicode_width[] table to assign LBP_CP1, LBP_CP2
21763         instead of LBP_CP, and LBP_OP1, LBP_OP2 instead of LBP_OP. Update such
21764         that unilbrk/lbrkprop.txt comes out as expected.
21765         (debug_output_lbp): Print either LBP_CP1 or LBP_CP2 as LBP_CP. Print
21766         either LBP_OP1 or LBP_OP2 as LBP_OP.
21767         (lbp_value_to_string): Handle LBP_CP1, LBP_CP2, LBP_OP1, LBP_OP2 instead
21768         of LBP_CP, LBP_OP.
21769         (output_lbrk_rules_as_tables): Treat LBP_CP and LBP_OP as macros that
21770         map to two table rows/columns. In rule LB30, use only LBP_OP1 instead of
21771         LBP_OP, and only LBP_CP1 instead of LBP_CP. Simplify rule LB22.
21772         * lib/unilbrk/lbrktables.h (LBP_CP1, LBP_CP2, LBP_OP1, LBP_OP2): New
21773         enum values.
21774         (LBP_OP, LBP_CP): Remove enum values.
21775         (unilbrk_table): Update declaration.
21776         * tests/unilbrk/test-u8-possible-linebreaks.c (test_function): Add a
21777         test for East Asian opening parenthesis.
21778         * tests/unilbrk/test-u16-possible-linebreaks.c (test_function):
21779         Likewise.
21780         * tests/unilbrk/test-u32-possible-linebreaks.c (test_function):
21781         Likewise.
21783         * lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind):
21784         Update.
21785         (uc_width): Assign width 2 to the characters 0x16FF0..0x16FF1,
21786         0x18AF3..0x18CD5, 0x18D00..0x18D08, 0x1F6D6..0x1F6D7, 0x1F6FB..0x1F6FC,
21787         0x1F90C, 0x1FA74, 0x1FA83..0x1FA86, 0x1FA96..0x1FAA8, 0x1FAB0..0x1FAB6,
21788         0x1FAC0..0x1FAC2, 0x1FAD0..0x1FAD6.
21789         Assign width 1 to the characters 0x1F93B, 0x1F946.
21790         * tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
21791         0x0B55, 0x0D81, 0x1ABF..0x1AC0, 0xA82C, 0x10EAB..0x10EAC, 0x111CF,
21792         0x1193B..0x1193C, 0x1193E, 0x11943, 0x16FE4. Expect width 2 for the
21793         characters 0x16FF0..0x16FF1, 0x18AF3..0x18CD5, 0x18D00..0x18D08,
21794         0x1F6D6..0x1F6D7, 0x1F6FB..0x1F6FC, 0x1F90C, 0x1FA74, 0x1FA83..0x1FA86,
21795         0x1FA96..0x1FAA8, 0x1FAB0..0x1FAB6, 0x1FAC0..0x1FAC2, 0x1FAD0..0x1FAD6.
21796         Expect width 1 for the characters 0x1F93B, 0x1F946.
21798         * All generated files under lib/uni* and tests/uni*: Regenerate.
21799         * tests/uniname/NameAliases.txt: Update.
21800         * tests/uniname/UnicodeData.txt: Update.
21801         * tests/uninorm/NormalizationTest.txt: Update.
21802         * tests/unigbrk/GraphemeBreakTest.txt: Update.
21803         * tests/uniwbrk/WordBreakTest.txt: Update.
21805         * All the affected modules: Bump required libunistring version.
21807 2021-12-30  Bruno Haible  <bruno@clisp.org>
21809         uniwbrk: Correction of Unicode 10.0.0 support.
21810         * lib/gen-uni-tables.c (is_WBP_MIDLETTER): Remove character 0x02D7.
21811         The generated files are not affected.
21813 2021-12-30  Bruno Haible  <bruno@clisp.org>
21815         Update to Unicode 12.1.0.
21817         * lib/gen-uni-tables.c: Update comments.
21819         * All generated files under lib/uni* and tests/uni*: Regenerate.
21820         * tests/uniname/NameAliases.txt: Update.
21821         * tests/uniname/UnicodeData.txt: Update.
21822         * tests/uninorm/NormalizationTest.txt: Update.
21823         * tests/unigbrk/GraphemeBreakTest.txt: Update.
21824         * tests/uniwbrk/WordBreakTest.txt: Update.
21826         * All the affected modules: Bump required libunistring version.
21828 2021-12-30  Bruno Haible  <bruno@clisp.org>
21830         Update to Unicode 12.0.0.
21832         * lib/gen-uni-tables.c (is_property_default_ignorable_code_point):
21833         Exclude 0x13430..0x13438.
21834         (get_lbp): Update such that unilbrk/lbrkprop.txt comes out as expected.
21835         (get_wbp): Map 0xFF10..0xFF19 to WBP_NUMERIC.
21837         * lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind):
21838         Update.
21839         (uc_width): Assign width 2 to the characters 0x16FE2..0x16FE3,
21840         0x187F2..0x187F7, 0x1B150..0x1B152, 0x1B164..0x1B167, 0x1F6D5, 0x1F6FA,
21841         0x1F7E0..0x1F7EB, 0x1F90D..0x1F90F, 0x1FA70..0x1FA73, 0x1FA78..0x1FA7A,
21842         0x1FA80..0x1FA82, 0x1FA90..0x1FA95.
21843         * tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
21844         0x0EBA, 0xA9BD, 0x119D4..0x119D7, 0x119DA..0x119DB, 0x119E0,
21845         0x13430..0x13438, 0x16F4F, 0x1E130..0x1E136, 0x1E2EC..0x1E2EF. Expect
21846         width 2 for the characters 0x16FE2..0x16FE3, 0x187F2..0x187F7,
21847         0x1B150..0x1B152, 0x1B164..0x1B167, 0x1F6D5, 0x1F6FA, 0x1F7E0..0x1F7EB,
21848         0x1F90D..0x1F90F, 0x1FA70..0x1FA73, 0x1FA78..0x1FA7A, 0x1FA80..0x1FA82,
21849         0x1FA90..0x1FA95.
21851         * All generated files under lib/uni* and tests/uni*: Regenerate.
21852         * tests/uniname/NameAliases.txt: Update.
21853         * tests/uniname/UnicodeData.txt: Update.
21854         * tests/uninorm/NormalizationTest.txt: Update.
21855         * tests/unigbrk/GraphemeBreakTest.txt: Update.
21856         * tests/uniwbrk/WordBreakTest.txt: Update.
21858         * All the affected modules: Bump required libunistring version.
21860 2021-12-30  Paul Eggert  <eggert@cs.ucla.edu>
21862         crypto/sm3-buffer: fix C99 conformance bug
21863         * lib/sm3.c (sm3_process_block): Call varargs macro with enough
21864         arguments.  Problem found by IBM XL/C 12.1.0.0 for AIX.
21866 2021-12-30  Bruno Haible  <bruno@clisp.org>
21868         Update to Unicode 11.0.0.
21870         * lib/gen-uni-tables.c (is_property_default_ignorable_code_point):
21871         Simplify by use of PROP_PREPENDED_CONCATENATION_MARK.
21872         (UC_JOINING_GROUP_HANIFI_ROHINGYA_PA,
21873         UC_JOINING_GROUP_HANIFI_ROHINGYA_KINNA_YA): New enum values.
21874         (fill_arabicshaping, joining_group_as_c_identifier): Recognize these
21875         joining groups.
21876         (get_lbp): Update such that unilbrk/lbrkprop.txt comes out as expected.
21877         (WBP_EB, WBP_EM, WBP_GAZ, WBP_EBG): Remove enum values.
21878         (WBP_WSS): New enum value.
21879         (get_wbp): Update such that uniwbrk/wbrkprop.txt comes out as expected.
21880         (debug_output_wbp, fill_org_wbp, debug_output_org_wbp, output_wbp):
21881         Update for changed enum values.
21883         * lib/unictype.in.h (UC_JOINING_GROUP_HANIFI_ROHINGYA_*): New enum
21884         values.
21885         * lib/unictype/joininggroup_name.h: Add the HANIFI_ROHINGYA_* joining
21886         groups.
21887         * lib/unictype/joininggroup_byname.gperf: Likewise.
21889         * lib/unigbrk.in.h: Mark 4 enum values as obsolete.
21890         * lib/unigbrk/u-grapheme-breaks.h (FUNC): Handle emoji modifier sequence
21891         according to Unicode 11.0.0.
21892         * lib/unigbrk/u8-grapheme-breaks.c: Include <stdbool.h>, unictype.h.
21893         * lib/unigbrk/u16-grapheme-breaks.c: Likewise.
21894         * lib/unigbrk/u32-grapheme-breaks.c: Likewise.
21895         * lib/unigbrk/uc-grapheme-breaks.c: Likewise.
21896         * modules/unigbrk/u8-grapheme-breaks (Depends-on): Add
21897         unictype/property-extended-pictographic, stdbool.
21898         * modules/unigbrk/u16-grapheme-breaks (Depends-on): Likewise.
21899         * modules/unigbrk/u32-grapheme-breaks (Depends-on): Likewise.
21900         * modules/unigbrk/uc-grapheme-breaks (Depends-on): Likewise.
21901         * tests/unigbrk/test-u8-grapheme-breaks.c (main): Add test for emoji
21902         modifier / ZWJ sequence.
21903         * tests/unigbrk/test-u16-grapheme-breaks.c (main): Likewise.
21904         * tests/unigbrk/test-u32-grapheme-breaks.c (main): Likewise.
21905         * tests/unigbrk/test-uc-is-grapheme-break.c: Include <stdbool.h>,
21906         unictype.h.
21907         (main): Update workaround logic to match the one in
21908         lib/unigbrk/u-grapheme-breaks.h.
21909         * modules/unigbrk/uc-is-grapheme-break-tests (Depends-on): Add
21910         unictype/property-extended-pictographic, stdbool.
21912         * lib/uniwbrk.in.h: Mark 4 enum values as obsolete.
21913         (WBP_WSS): New enum value.
21914         * lib/uniwbrk/u-wordbreaks.h (FUNC): Handle emoji ZWJ sequences and
21915         horizontal whitespace according to Unicode 11.0.0.
21916         * lib/uniwbrk/u8-wordbreaks.c: Include unictype.h.
21917         * lib/uniwbrk/u16-wordbreaks.c: Likewise.
21918         * lib/uniwbrk/u32-wordbreaks.c: Likewise.
21919         * lib/uniwbrk/wbrktable.c (uniwbrk_prop_index, uniwbrk_table): Add a row
21920         and column for WBP_WSS.
21921         * lib/uniwbrk/wbrktable.h (uniwbrk_prop_index, uniwbrk_table): Update
21922         declarations.
21923         * modules/uniwbrk/u8-wordbreaks (Depends-on): Add
21924         unictype/property-extended-pictographic.
21925         * modules/uniwbrk/u16-wordbreaks (Depends-on): Likewise.
21926         * modules/uniwbrk/u32-wordbreaks (Depends-on): Likewise.
21927         * tests/uniwbrk/test-u8-wordbreaks.c (main): Update expected results.
21928         * tests/uniwbrk/test-u16-wordbreaks.c (main): Likewise.
21929         * tests/uniwbrk/test-u32-wordbreaks.c (main): Likewise.
21930         * tests/uniwbrk/test-uc-wordbreaks.c (wordbreakproperty_to_string):
21931         Update.
21933         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks_loop):
21934         Handle ZWJ according to Unicode 11.0.0.
21935         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks_loop):
21936         Likewise.
21937         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks_loop):
21938         Likewise.
21940         * lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind):
21941         Update.
21942         (uc_width): Assign width 2 to the characters 0x187ED..0x187F1, 0x1F6F9,
21943         0x1F9E7..0x1F9FF.
21944         * tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
21945         0x07FD, 0x08D3, 0x09FE, 0x0C04, 0xA8FF, 0x10D24..0x10D27,
21946         0x10F46..0x10F50, 0x110CD, 0x111C9, 0x1133B, 0x1145E, 0x1182F..0x11837,
21947         0x11839..0x1183A, 0x11D90..0x11D91, 0x11D95, 0x11D97, 0x11EF3..0x11EF4.
21948         Expect width 2 for the characters 0x187ED..0x187F1, 0x1F6F9,
21949         0x1F9E7..0x1F9FF.
21951         * All generated files under lib/uni* and tests/uni*: Regenerate.
21952         * tests/uniname/NameAliases.txt: Update.
21953         * tests/uniname/UnicodeData.txt: Update.
21954         * tests/uninorm/NormalizationTest.txt: Update.
21955         * tests/unigbrk/GraphemeBreakTest.txt: Update.
21956         * tests/uniwbrk/WordBreakTest.txt: Update.
21958         * All the affected modules: Bump required libunistring version.
21960 2021-12-30  Bruno Haible  <bruno@clisp.org>
21962         unictype: Add Emoji properties from Unicode 11.0.0.
21963         * lib/gen-uni-tables.c (PROP_EMOJI*, PROP_EXTENDED_PICTOGRAPHIC): New
21964         enum values.
21965         (fill_properties): Don't require a space between the property name and
21966         the comment. Handle the property names from emoji-data.txt.
21967         (is_property_emoji, is_property_emoji_presentation,
21968         is_property_emoji_modifier, is_property_emoji_modifier_base,
21969         is_property_emoji_component, is_property_extended_pictographic): New
21970         declarations.
21971         (output_properties): Emit the properties emoji, emoji_presentation,
21972         emoji_modifier, emoji_modifier_base, emoji_component,
21973         extended_pictographic.
21974         (get_lbp): Use the emoji_modifier property.
21975         (main): Expect one more argument, for the emoji-data.txt file.
21976         * lib/unictype.in.h (UC_PROPERTY_EMOJI, UC_PROPERTY_EMOJI_PRESENTATION,
21977         UC_PROPERTY_EMOJI_MODIFIER, UC_PROPERTY_EMOJI_MODIFIER_BASE,
21978         UC_PROPERTY_EMOJI_COMPONENT, UC_PROPERTY_EXTENDED_PICTOGRAPHIC,
21979         uc_is_property_emoji, uc_is_property_emoji_presentation,
21980         uc_is_property_emoji_modifier, uc_is_property_emoji_modifier_base,
21981         uc_is_property_emoji_component, uc_is_property_extended_pictographic):
21982         New declarations.
21983         * lib/unictype/pr_emoji.c: New file.
21984         * lib/unictype/pr_emoji_presentation.c: New file.
21985         * lib/unictype/pr_emoji_modifier.c: New file.
21986         * lib/unictype/pr_emoji_modifier_base.c: New file.
21987         * lib/unictype/pr_emoji_component.c: New file.
21988         * lib/unictype/pr_extended_pictographic.c: New file.
21989         * modules/unictype/property-emoji: New file.
21990         * modules/unictype/property-emoji-tests: New file.
21991         * modules/unictype/property-emoji-presentation: New file.
21992         * modules/unictype/property-emoji-presentation-tests: New file.
21993         * modules/unictype/property-emoji-modifier: New file.
21994         * modules/unictype/property-emoji-modifier-tests: New file.
21995         * modules/unictype/property-emoji-modifier-base: New file.
21996         * modules/unictype/property-emoji-modifier-base-tests: New file.
21997         * modules/unictype/property-emoji-component: New file.
21998         * modules/unictype/property-emoji-component-tests: New file.
21999         * modules/unictype/property-extended-pictographic: New file.
22000         * modules/unictype/property-extended-pictographic-tests: New file.
22001         * modules/unictype/property-all (Depends-on): Depend on the new modules.
22003 2021-12-29  Bruno Haible  <bruno@clisp.org>
22005         uniwidth: Give width 0 to conjoining Hangul Jamo jungseong, jongseong.
22006         Reported by Luis Javier Merino <ninjalj@gmail.com> in
22007         <https://lists.gnu.org/archive/html/bug-libunistring/2021-12/msg00006.html>.
22008         * lib/gen-uni-tables.c (is_nonspacing): Return true for the conjoining
22009         Hangul Jamo jungseong and jongseong characters.
22010         * lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind):
22011         Regenerated.
22012         * tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
22013         0x1160..0x11FF, 0xD7B0..0xD7C6, 0xD7CB..0xD7FB.
22015 2021-12-29  Bruno Haible  <bruno@clisp.org>
22017         uniwidth: Update to Unicode 10.0.0.
22018         * lib/uniwidth/width.c (uc_width): Assign width 2 to the characters
22019         0x231A..0x231B, 0x23E9..0x23EC, 0x23F0, 0x23F3, 0x25FD..0x25FE,
22020         0x2614..0x2615, 0x2648..0x2653, 0x267F, 0x2693, 0x26A1, 0x26AA..0x26AB,
22021         0x26BD..0x26BE, 0x26C4..0x26C5, 0x26CE, 0x26D4, 0x26EA, 0x26F2..0x26F3,
22022         0x26F5, 0x26FA, 0x26FD, 0x2705, 0x270A..0x270B, 0x2728, 0x274C, 0x274E,
22023         0x2753..0x2755, 0x2757, 0x2795..0x2797, 0x27B0, 0x27BF, 0x2B1B..0x2B1C,
22024         0x2B50, 0x2B55, 0xA960..0xA97C, 0x16FE0..0x16FE1, 0x17000..0x187EC,
22025         0x18800..0x18AF2, 0x1B000..0x1B11F, 0x1B170..0x1B2FB, 0x1F004, 0x1F0CF,
22026         0x1F18E, 0x1F191..0x1F19A, 0x1F200..0x1F320, 0x1F32D..0x1F335,
22027         0x1F337..0x1F37C, 0x1F37E..0x1F393, 0x1F3A0..0x1F3CA, 0x1F3CF..0x1F3D3,
22028         0x1F3E0..0x1F3F0, 0x1F3F4, 0x1F3F8..0x1F43E, 0x1F440, 0x1F442..0x1F4FC,
22029         0x1F4FF..0x1F53D, 0x1F54B..0x1F54E, 0x1F550..0x1F567, 0x1F57A,
22030         0x1F595..0x1F596, 0x1F5A4, 0x1F5FB..0x1F64F, 0x1F680..0x1F6C5, 0x1F6CC,
22031         0x1F6D0..0x1F6D2, 0x1F6EB..0x1F6EC, 0x1F6F4..0x1F6F8, 0x1F910..0x1F9E6.
22032         Assign ambiguous width to the characters 0x3248..0x324F.
22033         * tests/uniwidth/test-uc_width2.sh: Expect these changes.
22035 2021-12-29  Bruno Haible  <bruno@clisp.org>
22037         unilbrk: Improve support for strings that contain CR-LF sequences.
22038         * lib/gen-uni-tables.c (LBP_CR, LBP_LF): New enum values.
22039         (get_lbp): For '\r' and '\n', return LBP_CR and LBP_LF, respectively,
22040         instead of LBP_BK.
22041         (debug_output_lbp, fill_org_lbp, debug_output_org_lbp,
22042         lbp_value_to_string): Handle LBP_CR, LBP_LF.
22043         * lib/unilbrk/lbrkprop2.h: Regenerated.
22044         * lib/unilbrk/lbrktables.h (LBP_CR, LBP_LF): New enum values.
22045         * lib/unilbrk.in.h (UC_BREAK_CR_BEFORE_LF): New enum value.
22046         (u8_possible_linebreaks, u16_possible_linebreaks,
22047         u32_possible_linebreaks, ulc_possible_linebreaks, u8_width_linebreaks,
22048         u16_width_linebreaks, u32_width_linebreaks, ulc_width_linebreaks):
22049         Declare also a _v2 variant, and use a C macro to activate it by default.
22050         * lib/unilbrk/internal.h: New file.
22051         * lib/unilbrk/u8-possible-linebreaks.c: Include unilbrk/internal.h.
22052         (u8_possible_linebreaks_loop): Renamed from u8_possible_linebreaks. Add
22053         'cr' parameter.
22054         (u8_possible_linebreaks, u8_possible_linebreaks_v2): New functions.
22055         (main): Update.
22056         * lib/unilbrk/u16-possible-linebreaks.c: Include unilbrk/internal.h.
22057         (u16_possible_linebreaks_loop): Renamed from u16_possible_linebreaks.
22058         Add 'cr' parameter.
22059         (u16_possible_linebreaks, u16_possible_linebreaks_v2): New functions.
22060         * lib/unilbrk/u32-possible-linebreaks.c: Include unilbrk/internal.h.
22061         (u32_possible_linebreaks_loop): Renamed from u32_possible_linebreaks.
22062         Add 'cr' parameter.
22063         (u32_possible_linebreaks, u32_possible_linebreaks_v2): New functions.
22064         * lib/unilbrk/ulc-possible-linebreaks.c: Include unilbrk/internal.h,
22065         unilbrk/lbrktables.h.
22066         (ulc_possible_linebreaks_internal): Renamed from
22067         ulc_possible_linebreaks. Add 'cr' parameter.
22068         (ulc_possible_linebreaks, ulc_possible_linebreaks_v2): New functions.
22069         (main): Update.
22070         * lib/unilbrk/u8-width-linebreaks.c: Include unilbrk/internal.h,
22071         unilbrk/lbrktables.h.
22072         (u8_width_linebreaks_internal): Renamed from u8_width_linebreaks. Add
22073         'cr' parameter.
22074         (u8_width_linebreaks, u8_width_linebreaks_v2): New functions.
22075         (main): Update.
22076         * lib/unilbrk/u16-width-linebreaks.c: Include unilbrk/internal.h,
22077         unilbrk/lbrktables.h.
22078         (u16_width_linebreaks_internal): Renamed from u16_width_linebreaks. Add
22079         'cr' parameter.
22080         (u16_width_linebreaks, u16_width_linebreaks_v2): New functions.
22081         * lib/unilbrk/u32-width-linebreaks.c: Include unilbrk/internal.h,
22082         unilbrk/lbrktables.h.
22083         (u32_width_linebreaks_internal): Renamed from u32_width_linebreaks. Add
22084         'cr' parameter.
22085         (u32_width_linebreaks, u32_width_linebreaks_v2): New functions.
22086         * lib/unilbrk/ulc-width-linebreaks.c: Include unilbrk/internal.h,
22087         unilbrk/lbrktables.h.
22088         (ulc_width_linebreaks_internal): Renamed from ulc_width_linebreaks. Add
22089         'cr' parameter.
22090         (ulc_width_linebreaks, ulc_width_linebreaks_v2): New functions.
22091         (main): Update.
22092         * modules/unilbrk/u8-possible-linebreaks (Files): Add
22093         lib/unilbrk/internal.h.
22094         * modules/unilbrk/u16-possible-linebreaks (Files): Likewise.
22095         * modules/unilbrk/u32-possible-linebreaks (Files): Likewise.
22096         * modules/unilbrk/u8-width-linebreaks (Files): Likewise.
22097         * tests/unilbrk/test-u8-possible-linebreaks.c (test_function): New
22098         function, extracted from main. Add a test of CR-LF handling.
22099         (main): Invoke it twice.
22100         * tests/unilbrk/test-u16-possible-linebreaks.c (test_function): New
22101         function, extracted from main. Add a test of CR-LF handling.
22102         (main): Invoke it twice.
22103         * tests/unilbrk/test-u32-possible-linebreaks.c (test_function): New
22104         function, extracted from main. Add a test of CR-LF handling.
22105         (main): Invoke it twice.
22106         * tests/unilbrk/test-ulc-possible-linebreaks.c (test_function): New
22107         function, extracted from main.
22108         (main): Invoke it twice.
22109         * tests/unilbrk/test-u8-width-linebreaks.c (test_function): New
22110         function, extracted from main.
22111         (main): Invoke it twice.
22112         * tests/unilbrk/test-u16-width-linebreaks.c (test_function): New
22113         function, extracted from main.
22114         (main): Invoke it twice.
22115         * tests/unilbrk/test-u32-width-linebreaks.c (test_function): New
22116         function, extracted from main.
22117         (main): Invoke it twice.
22118         * tests/unilbrk/test-ulc-width-linebreaks.c (test_function): New
22119         function, extracted from main.
22120         (main): Invoke it twice.
22122 2021-12-29  Bruno Haible  <bruno@clisp.org>
22124         uniwbrk: Add unit tests of CR-LF sequences.
22125         * tests/uniwbrk/test-u8-wordbreaks.c (main): Add test of a string with
22126         CR-LF.
22127         * tests/uniwbrk/test-u16-wordbreaks.c (main): Likewise.
22128         * tests/uniwbrk/test-u32-wordbreaks.c (main): Likewise.
22130 2021-12-29  Bruno Haible  <bruno@clisp.org>
22132         unigbrk: Add unit tests of CR-LF sequences.
22133         * tests/unigbrk/test-u8-grapheme-breaks.c (main): Add test of a string
22134         with CR-LF.
22135         * tests/unigbrk/test-u16-grapheme-breaks.c (main): Likewise.
22136         * tests/unigbrk/test-u32-grapheme-breaks.c (main): Likewise.
22138 2021-12-29  Bruno Haible  <bruno@clisp.org>
22140         unilbrk: Update handling of Hebrew letter + hyphen for Unicode 10.0.0.
22141         * lib/unilbrk/lbrktables.h (LBP_HL_BA): New enum value.
22142         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks): Add
22143         code for handling break-after character after Hebrew letter.
22144         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks):
22145         Likewise.
22146         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks):
22147         Likewise.
22148         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Add a test
22149         regarding break-after character after Hebrew letter.
22150         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
22151         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
22153 2021-12-28  Paul Eggert  <eggert@cs.ucla.edu>
22155         nstrftime: improve handling of invalid formats
22156         * lib/nstrftime.c (__strftime_internal): Without this change,
22157         ‘date +'%0_-+^#1%A'’ would output ‘%A’; with it, it outputs
22158         something like ‘%0_-+^#1Tuesday’ which is easier to debug and to
22159         write wrappers for (such as the nstrftime/fprintftime usage in GNU
22160         ‘date’).
22162 2021-12-28  Bruno Haible  <bruno@clisp.org>
22164         unilbrk: Update handling of regional indicators for Unicode 10.0.0.
22165         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks): Add
22166         code for handling regional indicators.
22167         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks):
22168         Likewise.
22169         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks):
22170         Likewise.
22171         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Add a test
22172         regarding regional indicators.
22173         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
22174         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
22176 2021-12-28  Bruno Haible  <bruno@clisp.org>
22178         unilbrk: Update handling of zero-width joiner for Unicode 10.0.0.
22179         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks): Update
22180         code for zero-width joiner handling to match UAX #14 for Unicode 10.0.0.
22181         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks):
22182         Likewise.
22183         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks):
22184         Likewise.
22185         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Add a test
22186         regarding zero-width joiner.
22187         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
22188         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
22190 2021-12-28  Bruno Haible  <bruno@clisp.org>
22192         unilbrk: Update handling of combining marks for Unicode 10.0.0.
22193         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks): Update
22194         code for combining characters to match UAX #14 for Unicode 10.0.0.
22195         Remove legacy support for space + combining mark.
22196         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks):
22197         Likewise.
22198         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks):
22199         Likewise.
22200         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Add a test
22201         regarding combining characters.
22202         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
22203         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
22205 2021-12-28  Bruno Haible  <bruno@clisp.org>
22207         unilbrk: Restore deviation for (IS,AL) pair.
22208         * lib/gen-uni-tables.c (output_lbrk_rules_as_tables): Disable rule LB29.
22209         * lib/unilbrk/lbrktables.c: Regenerated.
22210         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Add test case with
22211         HTML markup.
22212         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
22213         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
22214         * tests/unilbrk/test-ulc-possible-linebreaks.c (main): Likewise.
22216 2021-12-28  Bruno Haible  <bruno@clisp.org>
22218         unilbrk: Change algorithm to be closer to Unicode Standard Annex #14.
22219         * lib/gen-uni-tables.c (lbp_value_to_string): New function, extracted
22220         from output_lbp.
22221         (output_lbp): Invoke it.
22222         (output_lbrk_rules_as_tables): New function.
22223         (main): Invoke it.
22224         * lib/unilbrk/lbrktables.c: Now automatically generated.
22225         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Update expected
22226         result.
22227         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
22228         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
22229         * tests/unilbrk/test-ulc-possible-linebreaks.c (main): Likewise.
22230         * tests/unilbrk/test-ulc-width-linebreaks.c (main): Likewise.
22232 2021-12-28  Bruno Haible  <bruno@clisp.org>
22234         uniwbrk: Add unit tests of regional indicators.
22235         * tests/uniwbrk/test-u8-wordbreaks.c (main): Add test of regional
22236         indicators.
22237         * tests/uniwbrk/test-u16-wordbreaks.c (main): Likewise.
22238         * tests/uniwbrk/test-u32-wordbreaks.c (main): Likewise.
22240 2021-12-28  Bruno Haible  <bruno@clisp.org>
22242         unigbrk: Simplify code for regional indicators.
22243         * lib/unigbrk/u-grapheme-breaks.h (FUNC): Make code for regional
22244         indicators more future-proof.
22245         * tests/unigbrk/test-u8-grapheme-breaks.c (main): Add test of regional
22246         indicators.
22247         * tests/unigbrk/test-u16-grapheme-breaks.c (main): Likewise.
22248         * tests/unigbrk/test-u32-grapheme-breaks.c (main): Likewise.
22250 2021-12-28  Paul Eggert  <eggert@cs.ucla.edu>
22252         clock_getres: document portability issues better
22253         * doc/posix-functions/clock_getres.texi:
22254         * doc/posix-functions/timespec_getres.texi:
22255         Document problems with timestamp resolution.
22257         timespec_getres: new module
22258         * lib/time.in.h (timespec_getres): New decl.
22259         * lib/timespec_getres.c, m4/timespec_getres.m4:
22260         * modules/timespec_getres, modules/timespec_getres-tests:
22261         * tests/test-timespec_getres.c:
22262         New files.
22263         * m4/time_h.m4 (gl_TIME_H_REQUIRE_DEFAULTS, gl_TIME_H_DEFAULTS):
22264         * modules/time (time.h):
22265         Support timespec_getres.
22267         gettime-res: new module
22268         * lib/gettime-res.c, modules/gettime-res: New files.
22269         * lib/timespec.h (gettime_res): New decl.
22270         * m4/clock_time.m4 (gl_CLOCK_TIME): Also check for clock_getres.
22271         * m4/gettime.m4 (gl_GETTIME_RES): New macro.
22273         gettime: port better to non-POSIX C2x
22274         C2x requires a function timespec_get; prefer that to
22275         gettimeofday, since it has better resolution.
22276         * lib/gettime.c (gettime): Prefer timespec_get to gettimeofday.
22277         * m4/gettime.m4 (gl_GETTIME): Check for timespec_get.
22278         Omit a check for gettimeofday; not needed because
22279         the gettime module depends on the gettimeofday module.
22281 2021-12-28  Bruno Haible  <bruno@clisp.org>
22283         gen-uni-tables: Produce license notices suitable for Gnulib.
22284         * lib/gen-uni-tables.c (output_library_license, output_tests_license):
22285         Produce license notices that are consistent with the
22286         gnulib/etc/license-notices/ files.
22287         * All generated files under lib/uni* and tests/uni*: Regenerate.
22289 2021-12-28  Bruno Haible  <bruno@clisp.org>
22291         unigbrk, uniwbrk: No-op tweaks.
22292         * lib/unigbrk/u-grapheme-breaks.h: Comment tweaks.
22293         * lib/uniwbrk/u-wordbreaks.h: Coding style and comment tweaks.
22294         * lib/uniwbrk/wbrktable.c: Comment tweaks.
22296 2021-12-28  Paul Eggert  <eggert@cs.ucla.edu>
22298         perl: let caller see whether perl was found
22299         Problem reported for coreutils by Serge Belyshev (Bug#52844).
22300         * m4/perl.m4 (gl_PERL): Use AC_CACHE_CHECK, so that
22301         an invoker of gl_PERL can later inspect gl_cv_prog_perl
22302         to see whether perl was found.
22304 2021-12-28  Bruno Haible  <bruno@clisp.org>
22306         Fix --automake-subdir breakage (regression 2021-12-24).
22307         Reported by Bjarni Ingi Gislason <bjarniig@rhi.hi.is> in
22308         <https://lists.gnu.org/archive/html/bug-gnulib/2021-12/msg00156.html>.
22309         * build-aux/prefix-gnulib-mk (prefix_assignment): Don't change
22310         SED_HEADER_* variables.
22312 2021-12-26  Bruno Haible  <bruno@clisp.org>
22314         Update to Unicode 10.0.0.
22316         * lib/gen-uni-tables.c (PROP_REGIONAL_INDICATOR): New enum value.
22317         (fill_properties): Recognize property "Regional_Indicator".
22318         (is_property_regional_indicator): New function.
22319         (output_properties): Also output the data for regional_indicator.
22320         (get_lbp): Update such that unilbrk/lbrkprop.txt comes out as expected.
22321         Use is_property_regional_indicator.
22322         (get_wbp): Update such that uniwbrk/wbrkprop.txt comes out as expected.
22323         Use is_property_regional_indicator.
22324         (UC_JOINING_GROUP_MALAYALAM_*): New enum values.
22325         (fill_arabicshaping, joining_group_as_c_identifier): Recognize these
22326         joining groups.
22328         * lib/uniname/gen-uninames.lisp (main): Ignore empty lines and comment
22329         lines in the aliases file. Needed because since 2015-06-20, we use the
22330         unmodified Unicode NameAliases.txt file. Remove reference to undefined
22331         variable. Correct indentation.
22333         * lib/unictype.in.h (UC_PROPERTY_REGIONAL_INDICATOR,
22334         uc_is_property_regional_indicator): New declarations.
22335         * lib/unictype/pr_regional_indicator.c: New file.
22336         * modules/unictype/property-regional-indicator: New file.
22337         * modules/unictype/property-regional-indicator-tests: New file.
22338         * modules/unictype/property-all (Depends-on): Add
22339         unictype/property-regional-indicator.
22341         * lib/unictype.in.h (UC_JOINING_GROUP_MALAYALAM_*): New enum values.
22342         * lib/unictype/joininggroup_name.h: Add the MALAYALAM_* joining groups.
22343         * lib/unictype/joininggroup_byname.gperf: Likewise.
22345         * lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind):
22346         Update.
22347         * tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
22348         0x0AFA..0x0AFF, 0x0D00, 0x0D3B..0x0D3C, 0x1DF6..0x1DF9,
22349         0x11A01..0x11A06, 0x11A09..0x11A0A, 0x11A33..0x11A38, 0x11A3B..0x11A3E,
22350         0x11A47, 0x11A51..0x11A56, 0x11A59..0x11A5B, 0x11A8A..0x11A96,
22351         0x11A98..0x11A99, 0x11D31..0x11D36, 0x11D3A, 0x11D3C..0x11D3D,
22352         0x11D3F..0x11D45, 0x11D47.
22354         * All generated files under lib/uni* and tests/uni*: Regenerate.
22355         * tests/uniname/NameAliases.txt: Update.
22356         * tests/uniname/UnicodeData.txt: Update.
22357         * tests/uninorm/NormalizationTest.txt: Update.
22358         * tests/unigbrk/GraphemeBreakTest.txt: Update.
22359         * tests/uniwbrk/WordBreakTest.txt: Update.
22361         * All the affected modules: Bump required libunistring version.
22363 2021-12-26  Bruno Haible  <bruno@clisp.org>
22365         pselect: Fix compilation error in C++ mode on AIX 7.
22366         * lib/sys_select.in.h (pselect): Use _GL_CXXALIAS_SYS_CAST instead of
22367         _GL_CXXALIAS_SYS.
22368         * doc/posix-functions/pselect.texi: Mention the AIX problem.
22370 2021-12-25  Bruno Haible  <bruno@clisp.org>
22372         gnulib-tool: Fix handling of module libtextstyle-optional.
22373         Reported by Paul Eggert in
22374         <https://lists.gnu.org/archive/html/bug-gnulib/2021-12/msg00152.html>.
22375         * gnulib-tool (func_repeat_module_in_tests): New function.
22376         (func_emit_tests_Makefile_am, func_create_testdir): Use it for the file
22377         list and when creating tests/Makefile.am.
22379 2021-12-25  Bruno Haible  <bruno@clisp.org>
22381         gnulib-tool: Respect applicability 'all' without --single-configure.
22382         * gnulib-tool (func_verify_tests_module): Treat modules with
22383         applicability 'all' like 'tests' modules, not like 'main' modules.
22385 2021-12-24  Paul Eggert  <eggert@cs.ucla.edu>
22387         maint: avoid empty lines in recipes
22388         AIX 7.2 ‘make’ complains about recipe lines that are empty after
22389         macro expansion, and I suppose there’s a good chance some
22390         non-POSIX ‘make’ would prohibit them.  Rework macros so
22391         that we can avoid them.
22392         * gnulib-tool (func_emit_lib_Makefile_am)
22393         (func_emit_tests_Makefile_am): Support @!NMD@ too.
22394         * modules/gen-header (@gl_V_at): New macro.
22395         * modules/alloca-opt, modules/argz, modules/assert-h:
22396         * modules/byteswap, modules/configmake, modules/ctype:
22397         * modules/dirent, modules/errno, modules/execinfo, modules/fcntl-h:
22398         * modules/float, modules/fnmatch-h, modules/getopt-posix:
22399         * modules/glob-h, modules/iconv-h, modules/ieee754-h:
22400         * modules/inttypes-incomplete, modules/langinfo:
22401         * modules/libtextstyle-optional, modules/limits-h, modules/locale:
22402         * modules/malloc-h, modules/math, modules/monetary, modules/netdb:
22403         * modules/openmp-init, modules/poll-h, modules/posix-shell:
22404         * modules/pthread-h, modules/pty, modules/sched, modules/search:
22405         * modules/signal-h, modules/sigsegv, modules/snippet/link-warning:
22406         * modules/spawn, modules/stdalign, modules/stdarg, modules/stdbool:
22407         * modules/stddef, modules/stdint, modules/stdio, modules/stdlib:
22408         * modules/stdnoreturn, modules/string, modules/strings:
22409         * modules/sysexits, modules/termios, modules/threads-h:
22410         * modules/time, modules/uchar, modules/unicase/base:
22411         * modules/uniconv/base, modules/unictype/base, modules/unigbrk/base:
22412         * modules/unilbrk/base, modules/uniname/base, modules/uninorm/base:
22413         * modules/unistd, modules/unistdio/base, modules/unistr/base:
22414         * modules/unitypes, modules/uniwbrk/base, modules/uniwidth/base:
22415         * modules/utime-h, modules/wchar, modules/wctype-h:
22416         Use it.
22418         maint: tight-scope.mk need not be read-only
22419         * top/maint.mk (tight-scope.mk): Don’t bother to make
22420         tight-scope.mk read-only either.
22422         maint: break out '&& mv $@-t $@'
22423         * build-aux/git-version-gen, config/argz.mk, modules/configmake:
22424         * modules/posix_spawnp-tests, modules/snippet/link-warning:
22425         * top/maint.mk:
22426         Break out '&& mv $@-t $@' to a separate line in the Make recipe,
22427         as this makes things a bit easier to debug.
22429         gen-header: new module
22430         Simplify header generation by using Makefile variables
22431         defined by a new gen-header module.
22432         * modules/gen-header: New module.
22433         * modules/alloca-opt, modules/argz, modules/arpa_inet:
22434         * modules/assert-h, modules/byteswap:
22435         * modules/ctype, modules/dirent, modules/dynarray, modules/errno:
22436         * modules/execinfo, modules/fcntl-h, modules/float:
22437         * modules/fnmatch-h, modules/getopt-posix, modules/glob-h:
22438         * modules/iconv-h, modules/ieee754-h, modules/inttypes-incomplete:
22439         * modules/langinfo, modules/libtextstyle-optional, modules/limits-h:
22440         * modules/locale, modules/malloc-h, modules/math, modules/monetary:
22441         * modules/net_if, modules/netdb, modules/netinet_in:
22442         * modules/openmp-init, modules/poll-h:
22443         * modules/pthread-h, modules/pty, modules/sched:
22444         * modules/scratch_buffer, modules/search, modules/selinux-h:
22445         * modules/signal-h, modules/sigsegv:
22446         * modules/spawn, modules/stdalign, modules/stdarg, modules/stdbool:
22447         * modules/stddef, modules/stdint, modules/stdio, modules/stdlib:
22448         * modules/stdnoreturn, modules/string, modules/strings:
22449         * modules/sys_file, modules/sys_ioctl, modules/sys_random:
22450         * modules/sys_resource, modules/sys_select, modules/sys_socket:
22451         * modules/sys_stat, modules/sys_time, modules/sys_times:
22452         * modules/sys_types, modules/sys_uio, modules/sys_utsname:
22453         * modules/sys_wait, modules/sysexits, modules/termios:
22454         * modules/threads-h, modules/time, modules/uchar:
22455         * modules/unicase/base, modules/unicase/special-casing:
22456         * modules/uniconv/base, modules/unictype/base, modules/unigbrk/base:
22457         * modules/unilbrk/base, modules/uniname/base, modules/uninorm/base:
22458         * modules/unistd, modules/unistdio/base, modules/unistr/base:
22459         * modules/unitypes, modules/uniwbrk/base, modules/uniwidth/base:
22460         * modules/utime-h, modules/wchar, modules/wctype-h:
22461         Depend on gen-header, and use its macros to simplify
22462         header generation.
22464 2021-12-24  Bruno Haible  <bruno@clisp.org>
22466         passfd: Fix compilation error on IRIX.
22467         * lib/passfd.c (sendfd): On IRIX, ignore CMSG_FIRSTHDR.
22468         (recvfd): Likewise. Produce a fake error ENOTCONN.
22470 2021-12-24  Bruno Haible  <bruno@clisp.org>
22472         tests: Fix link errors on AIX.
22473         * modules/fnmatch-h-c++-tests (Makefile.am): Link test-fnmatch-h-c++
22474         with $(LIB_MBRTOWC).
22475         * modules/glob-h-c++-tests (Makefile.am): Link test-glob-h-c++ with
22476         $(LIB_MBRTOWC).
22477         * modules/stdlib-c++-tests (Makefile.am): Link test-stdlib-c++ with
22478         $(GETLOADAVG_LIBS).
22479         * modules/sys_stat-c++-tests (Makefile.am): Link test-sys_stat-c++ with
22480         $(LIB_MBRTOWC).
22481         * modules/uchar-c++-tests (Makefile.am): Link test-uchar-c++ with
22482         $(LIBUNISTRING).
22484 2021-12-24  Bruno Haible  <bruno@clisp.org>
22486         hamt tests: Fix compilation error with AIX xlc.
22487         * tests/test-hamt.c (test_iterator): Don't use compound initializer.
22489 2021-12-24  Bruno Haible  <bruno@clisp.org>
22491         strerrorname_np: Fix compilation error on IRIX.
22492         * lib/strerrorname_np.c (strerrorname_np): Handle conflict between
22493         EDIRCORRUPTED and EFSCORRUPTED.
22494         * tests/test-strerrorname_np.c (main): Likewise.
22496 2021-12-24  Bruno Haible  <bruno@clisp.org>
22498         hamt: Fix compilation error on NetBSD 7.
22499         * lib/hamt.h (GL_HAMT_THREAD_SAFE): Define to 0 if the compiler is a
22500         GCC version < 4.9.
22502 2021-12-24  Bruno Haible  <bruno@clisp.org>
22504         search: Fix compilation errors with SunPRO C++ on Solaris 10.
22505         * lib/search.in.h (_gl_lsearch_compar_fn): New type.
22506         (lfind, lsearch): Use it.
22508 2021-12-24  Bruno Haible  <bruno@clisp.org>
22510         qsort_r: Fix compilation error with SunPRO C++ on Solaris 10.
22511         * lib/stdlib.in.h (_gl_qsort_r_compar_fn): New type.
22512         (qsort_r): Use it.
22513         * tests/test-stdlib-c++.cc (qsort_r): Don't test with SunPRO C++.
22515 2021-12-24  Bruno Haible  <bruno@clisp.org>
22517         threads-h tests: Avoid clang warnings.
22518         * tests/test-threads.c (main): Add 'default' to switch statements.
22520 2021-12-24  Bruno Haible  <bruno@clisp.org>
22522         doc: Small updates.
22523         * doc/glibc-functions/ptsname_r.texi: Update info regarding Mac OS X.
22524         * doc/posix-functions/getlogin_r.texi: Update info regarding FreeBSD.
22526 2021-12-22  Paul Eggert  <eggert@cs.ucla.edu>
22528         libgmp: omit redundant 'mkdir -p .'
22529         * modules/libgmp: Mark $(MKDIR) with @NMD@; this was missed
22530         in a previous pass.
22532         maint: omit unnecessary ‘rm -f $@-t $@’
22533         * modules/alloca-opt, modules/argz, modules/arpa_inet:
22534         * modules/assert-h, modules/byteswap, modules/configmake:
22535         * modules/ctype, modules/dirent, modules/dynarray, modules/errno:
22536         * modules/execinfo, modules/fcntl-h, modules/float:
22537         * modules/fnmatch-h, modules/getopt-posix, modules/glob-h:
22538         * modules/iconv-h, modules/ieee754-h, modules/inttypes-incomplete:
22539         * modules/langinfo, modules/libtextstyle-optional:
22540         * modules/limits-h, modules/langinfo, modules/libgmp, modules/limits-h:
22541         * modules/locale, modules/malloc-h, modules/math, modules/monetary:
22542         * modules/net_if, modules/netdb, modules/netinet_in:
22543         * modules/openmp-init, modules/poll-h, modules/posix-shell:
22544         * modules/posix_spawnp-tests, modules/pthread-h, modules/pty:
22545         * modules/sched, modules/scratch_buffer, modules/search:
22546         * modules/selinux-h, modules/signal-h, modules/sigsegv:
22547         * modules/snippet/link-warning, modules/spawn, modules/stdalign:
22548         * modules/stdarg, modules/stdbool, modules/stddef, modules/stdint:
22549         * modules/stdio, modules/stdlib, modules/stdnoreturn:
22550         * modules/string, modules/strings, modules/sys_file:
22551         * modules/sys_ioctl, modules/sys_random, modules/sys_resource:
22552         * modules/sys_select, modules/sys_socket, modules/sys_stat:
22553         * modules/sys_time, modules/sys_times, modules/sys_types:
22554         * modules/sys_uio, modules/sys_utsname, modules/sys_wait:
22555         * modules/sysexits, modules/termios, modules/threads-h:
22556         * modules/time, modules/uchar, modules/unicase/base:
22557         * modules/unicase/special-casing, modules/uniconv/base:
22558         * modules/unictype/base, modules/unigbrk/base, modules/unilbrk/base:
22559         * modules/uniname/base, modules/uninorm/base, modules/unistd:
22560         * modules/unistdio/base, modules/unistr/base, modules/unitypes:
22561         * modules/uniwbrk/base, modules/uniwidth/base, modules/utime-h:
22562         * modules/wchar, modules/wctype-h:
22563         Don’t bother to do a ‘rm -f $@-t $@’ at the start of recipes that
22564         create .h and similar files.  This is a revenant of a style in
22565         which the files were created read-only.  Also, consistently use
22566         use plain ‘mv $@-t $@’ afterwards, instead of usually using
22567         ‘mv -f’ but sometimes plain ‘mv’.
22569 2021-12-21  Paul Eggert  <eggert@cs.ucla.edu>
22571         maint: fix __clang_major__ misspellings
22572         The intprops.h typo fix should fix a bug in Emacs on Debian testing
22573         with clang <https://bugs.gnu.org/52711>.
22574         * lib/asyncsafe-spin.c, lib/intprops.h, lib/pthread-spin.c:
22575         Fix some misspellings of ‘__clang_major__’.
22576         I left one misspelling alone, in lib/cdefs.h,
22577         and instead reported that bug upstream here:
22578         https://sourceware.org/pipermail/libc-alpha/2021-December/134512.html
22580 2021-12-21  Bruno Haible  <bruno@clisp.org>
22582         get_ppid_of, get_progname_of: Fix runtime error on Mac OS X < 10.5.
22583         Reported by Evan Miller <emmiller@gmail.com>
22584         <https://lists.gnu.org/archive/html/bug-gnulib/2021-12/msg00081.html>.
22585         * lib/get_ppid_of.c (proc_pidinfo): Declare with WEAK_IMPORT_ATTRIBUTE.
22586         (get_ppid_of): Test whether the symbol declared weak evaluates to
22587         non-NULL before invoking it.
22588         * lib/get_progname_of (proc_pidinfo): Declare with
22589         WEAK_IMPORT_ATTRIBUTE.
22590         (get_progname_of): Test whether the symbol declared weak evaluates to
22591         non-NULL before invoking it.
22593 2021-12-21  Paul Eggert  <eggert@cs.ucla.edu>
22595         Move AM_V_GEN to recipe start
22596         This is especially needed when building Emacs, as it uses
22597         ‘AM_V_GEN=@$(info GEN $@)', which means the GEN line is output by
22598         GNU make just before the recipe runs, regardless of where AM_V_GEN
22599         appears in the recipe.  And it’s also good practice even if the
22600         default Automake ‘AM_V_GEN=@echo GEN $@;’ is used, as it’s better
22601         to output the GEN line consistently at the start of every recipe,
22602         even if this precedes a preparatory command that almost always
22603         works silently.
22604         * modules/arpa_inet, modules/dynarray, modules/net_if:
22605         * modules/netinet_in, modules/scratch_buffer, modules/selinux-h:
22606         * modules/sys_file, modules/sys_ioctl, modules/sys_random:
22607         * modules/sys_resource, modules/sys_select, modules/sys_socket:
22608         * modules/sys_stat, modules/sys_time, modules/sys_times:
22609         * modules/sys_types, modules/sys_uio, modules/sys_utsname:
22610         * modules/sys_wait, modules/unicase/special-casing, top/maint.mk:
22611         Use AM_V_GEN only at the start of each recipe.
22613 2021-12-21  Bruno Haible  <bruno@clisp.org>
22615         c-xvasprintf: Fix declarations (regression 2021-08-07).
22616         * lib/c-xvasprintf.h (c_xasprintf, c_xvasprintf): Remove
22617         _GL_ATTRIBUTE_RETURNS_NONNULL attribute.
22619 2021-12-21  Bruno Haible  <bruno@clisp.org>
22621         snippet/warn-on-use: Fix compilation error in C++ mode on OpenBSD 7.0.
22622         * lib/warn-on-use.h (_GL_WARN_ON_USE): In C++ mode, declare function
22623         with "C" linkage.
22625 2021-12-21  Bruno Haible  <bruno@clisp.org>
22627         Optimize redundant 'mkdir -p .' invocations.
22628         Reported by Paul Eggert.
22629         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
22630         Eliminate @NMD@ tokens.
22631         * modules/alloca-opt (Makefile.am): Prefix the "$(MKDIR_P) '%reldir%'"
22632         line with @NMD@.
22633         * modules/argz (Makefile.am): Likewise.
22634         * modules/assert-h (Makefile.am): Likewise.
22635         * modules/byteswap (Makefile.am): Likewise.
22636         * modules/configmake (Makefile.am): Likewise.
22637         * modules/ctype (Makefile.am): Likewise.
22638         * modules/dirent (Makefile.am): Likewise.
22639         * modules/errno (Makefile.am): Likewise.
22640         * modules/execinfo (Makefile.am): Likewise.
22641         * modules/fcntl-h (Makefile.am): Likewise.
22642         * modules/float (Makefile.am): Likewise.
22643         * modules/fnmatch-h (Makefile.am): Likewise.
22644         * modules/getopt-posix (Makefile.am): Likewise.
22645         * modules/glob-h (Makefile.am): Likewise.
22646         * modules/iconv-h (Makefile.am): Likewise.
22647         * modules/ieee754-h (Makefile.am): Likewise.
22648         * modules/inttypes-incomplete (Makefile.am): Likewise.
22649         * modules/langinfo (Makefile.am): Likewise.
22650         * modules/libtextstyle-optional (Makefile.am): Likewise.
22651         * modules/limits-h (Makefile.am): Likewise.
22652         * modules/locale (Makefile.am): Likewise.
22653         * modules/malloc-h (Makefile.am): Likewise.
22654         * modules/math (Makefile.am): Likewise.
22655         * modules/monetary (Makefile.am): Likewise.
22656         * modules/netdb (Makefile.am): Likewise.
22657         * modules/openmp-init (Makefile.am): Likewise.
22658         * modules/poll-h (Makefile.am): Likewise.
22659         * modules/posix-shell (Makefile.am): Likewise.
22660         * modules/pthread-h (Makefile.am): Likewise.
22661         * modules/pty (Makefile.am): Likewise.
22662         * modules/sched (Makefile.am): Likewise.
22663         * modules/search (Makefile.am): Likewise.
22664         * modules/signal-h (Makefile.am): Likewise.
22665         * modules/sigsegv (Makefile.am): Likewise.
22666         * modules/snippet/link-warning (Makefile.am): Likewise.
22667         * modules/spawn (Makefile.am): Likewise.
22668         * modules/stdalign (Makefile.am): Likewise.
22669         * modules/stdarg (Makefile.am): Likewise.
22670         * modules/stdbool (Makefile.am): Likewise.
22671         * modules/stddef (Makefile.am): Likewise.
22672         * modules/stdint (Makefile.am): Likewise.
22673         * modules/stdio (Makefile.am): Likewise.
22674         * modules/stdlib (Makefile.am): Likewise.
22675         * modules/stdnoreturn (Makefile.am): Likewise.
22676         * modules/string (Makefile.am): Likewise.
22677         * modules/strings (Makefile.am): Likewise.
22678         * modules/sysexits (Makefile.am): Likewise.
22679         * modules/termios (Makefile.am): Likewise.
22680         * modules/threads-h (Makefile.am): Likewise.
22681         * modules/time (Makefile.am): Likewise.
22682         * modules/uchar (Makefile.am): Likewise.
22683         * modules/unicase/base (Makefile.am): Likewise.
22684         * modules/uniconv/base (Makefile.am): Likewise.
22685         * modules/unictype/base (Makefile.am): Likewise.
22686         * modules/unigbrk/base (Makefile.am): Likewise.
22687         * modules/unilbrk/base (Makefile.am): Likewise.
22688         * modules/uniname/base (Makefile.am): Likewise.
22689         * modules/uninorm/base (Makefile.am): Likewise.
22690         * modules/unistd (Makefile.am): Likewise.
22691         * modules/unistdio/base (Makefile.am): Likewise.
22692         * modules/unistr/base (Makefile.am): Likewise.
22693         * modules/unitypes (Makefile.am): Likewise.
22694         * modules/uniwbrk/base (Makefile.am): Likewise.
22695         * modules/uniwidth/base (Makefile.am): Likewise.
22696         * modules/utime-h (Makefile.am): Likewise.
22697         * modules/wchar (Makefile.am): Likewise.
22698         * modules/wctype-h (Makefile.am): Likewise.
22700 2021-12-19  Bruno Haible  <bruno@clisp.org>
22702         non-recursive-gnulib-prefix-hack: Deprecate module.
22703         * modules/non-recursive-gnulib-prefix-hack (Status, Notice): New
22704         sections.
22706 2021-12-19  Bruno Haible  <bruno@clisp.org>
22708         gnulib-tool: Don't insist on ACLOCAL_AMFLAGS.
22709         Reported by Bjarni Ingi Gislason <bjarniig@rhi.hi.is> in
22710         <https://lists.gnu.org/archive/html/bug-gnulib/2021-12/msg00112.html>.
22711         * gnulib-tool (func_import): Mention an AC_CONFIG_MACRO_DIRS invocation
22712         as an alternative to augmenting ACLOCAL_AMFLAGS.
22713         (--import, --add-import, --remove-import, --update): To find the m4
22714         directories, look also for AC_CONFIG_MACRO_DIR and AC_CONFIG_MACRO_DIRS
22715         invocations in configure.ac.
22717 2021-12-18  Bruno Haible  <bruno@clisp.org>
22719         nstrftime: Update meta info.
22720         * config/srclist.txt: Fix typo from 2017-07-23.
22722 2021-12-18  Bruno Haible  <bruno@clisp.org>
22724         stdint: Fix handling of limits.h (regression 2021-12-16).
22725         * modules/stdint (configure.ac): Revert last change.
22726         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
22727         If --gnu-make is used, assume that AC_SUBSTed variables for conditionals
22728         are constructed by appending the suffix '_CONDITION'.
22730 2021-12-18  Paul Eggert  <eggert@cs.ucla.edu>
22732         nstrftime: simplify by using libc-config.h.
22733         * lib/nstrftime.c [!_LIBC]: Include libc-config.h
22734         instead of config.h.
22735         (iso_week_days): Simplify via libc-config.h’s __inline.
22736         (my_strftime): Simplify via libc-config.h’s libc_hidden_def.
22737         * modules/nstrftime (Depends-on): Add libc-config.
22739 2021-12-18  Bruno Haible  <bruno@clisp.org>
22741         libtextstyle-optional: Fix generation of textstyle.h (regr. 2021-12-15).
22742         * m4/libtextstyle-optional.m4 (gl_LIBTEXTSTYLE_OPTIONAL): Invoke
22743         gl_CONDITIONAL_HEADER.
22745 2021-12-18  Bruno Haible  <bruno@clisp.org>
22747         Fix support for --gnu-make in tests (regression 2021-12-15).
22748         * gnulib-tool (func_emit_tests_Makefile_am): When producing output for
22749         GNU make, eliminate %reldir% tokens.
22751 2021-12-17  Bruno Haible  <bruno@clisp.org>
22753         getopt-posix: Fix build on AIX (regression 2021-12-15).
22754         * modules/getopt-posix (configure.ac): Arrange to generate
22755         getopt-cdefs.h.
22756         (Makefile.am): Separate the rules for getopt.h and getopt-cdefs.h.
22758 2021-12-16  Paul Eggert  <eggert@cs.ucla.edu>
22760         getopt-posix: omit unnessary building of getopt.h
22761         * modules/getopt-posix (getopt.h, getopt-cdefs.h):
22762         Build only if GL_GENERATE_GETOPT_H.
22764         stdint: omit duplicate gl_CONFIGURE_HEADER calls
22765         * modules/stdint (configure.ac): Omit
22766         ‘gl_CONDITIONAL_HEADER([limits.h])’, since stdint depends on
22767         limits-h and doing gl_CONDITIONAL_HEADER twice can result in
22768         ‘configure’ failing with “*** GL_GENERATE_LIMITS_H is not set
22769         correctly”.
22771 2021-12-15  Bruno Haible  <bruno@clisp.org>
22773         automake-subdir support: Support the libunistring modules.
22774         * m4/libunistring-base.m4 (gl_LIBUNISTRING_LIBHEADER): Use the value of
22775         the gl_source_base_prefix variable.
22777 2021-12-15  Bruno Haible  <bruno@clisp.org>
22779         automake-subdir support: Support arbitrary --source-base value.
22780         Reported by Marc Nieper-Wißkirchen in
22781         <https://lists.gnu.org/archive/html/bug-gnulib/2021-12/msg00066.html>.
22782         * build-aux/prefix-gnulib-mk ($canon_prefix): New variable.
22783         (prefix): Initialize it.
22784         (prefix_assignment): Use it.
22786 2021-12-15  Bruno Haible  <bruno@clisp.org>
22788         automake-subdir support: Look for 'subdir-objects' also in configure.ac.
22789         * gnulib-tool: Look for the automake options also in the first argument
22790         of the AM_INIT_AUTOMAKE invocation in configure.ac.
22792 2021-12-15  Bruno Haible  <bruno@clisp.org>
22794         Add simple examples.
22795         * examples: New directory.
22797 2021-12-15  Bruno Haible  <bruno@clisp.org>
22799         Accommodate non-recursive Automake in a less hacky way.
22800         * gnulib-tool: New option --automake-subdir.
22801         (automake_subdir): New variable.
22802         (func_emit_initmacro_end): Add a second argument. Use it to prefix each
22803         object file name in *_LIBOBJS and *_LTLIBOBJS.
22804         (func_emit_shellvars_init): New function.
22805         (func_import): Add support for --automake-subdir. Invoke
22806         prefix-gnulib-mk. Update calls to func_emit_initmacro_end. Call
22807         func_emit_shellvars_init.
22808         (func_create_testdir): Update calls to func_emit_initmacro_end. Call
22809         func_emit_shellvars_init.
22810         * m4/gnulib-tool.m4 (gl_AUTOMAKE_SUBDIR): New macro.
22811         * m4/gnulib-common.m4 (gl_CONDITIONAL_HEADER): Use the value of the
22812         gl_source_base_prefix variable.
22813         * build-aux/prefix-gnulib-mk: New options --from-gnulib-tool, --prefix.
22814         (contents_of_file): Renamed from contents.
22815         (contents_of_stdin): New function.
22816         (process): Inline and remove function.
22817         * doc/gnulib-tool.texi (Non-recursive make): New section.
22819 2021-12-15  Bruno Haible  <bruno@clisp.org>
22821         Move .h file names out of the *.m4 files.
22822         This is useful because Autoconf macros defined in *.m4 files can be
22823         AC_REQUIREd. In the configure file, they are then expanded before
22824         gl_INIT, i.e. at a place where it is not known whether they are required
22825         for the lib/ or for the tests/ directory (or both).
22826         * m4/gnulib-common.m4 (gl_CONDITIONAL_HEADER): New macro.
22827         * m4/alloca.m4 (gl_FUNC_ALLOCA): Set GL_GENERATE_ALLOCA_H instead of
22828         ALLOCA_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
22829         * modules/alloca-opt (configure.ac): Invoke gl_CONDITIONAL_HEADER.
22830         * m4/argz.m4 (gl_FUNC_ARGZ): Set GL_GENERATE_ARGZ_H instead of ARGZ_H.
22831         Drop AC_SUBST and AM_CONDITIONAL invocations.
22832         * modules/argz (configure.ac): Invoke gl_CONDITIONAL_HEADER.
22833         * m4/assert_h.m4 (gl_ASSERT_H): Set GL_GENERATE_ASSERT_H instead of
22834         ASSERT_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
22835         * modules/assert-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
22836         * m4/byteswap.m4 (gl_BYTESWAP): Set GL_GENERATE_BYTESWAP_H instead of
22837         BYTESWAP_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
22838         * modules/byteswap (configure.ac): Invoke gl_CONDITIONAL_HEADER.
22839         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Set GL_GENERATE_ERRNO_H instead of
22840         ERRNO_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
22841         (gl_REPLACE_ERRNO_VALUE): Update.
22842         * m4/perror.m4 (gl_FUNC_PERROR): Update.
22843         * m4/strerror.m4 (gl_FUNC_STRERROR): Update.
22844         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R, gl_FUNC_STRERROR_R_WORKS):
22845         Update.
22846         * modules/errno (configure.ac): Invoke gl_CONDITIONAL_HEADER.
22847         * m4/execinfo.m4 (gl_EXECINFO_H): Set GL_GENERATE_EXECINFO_H instead of
22848         EXECINFO_H. Drop AC_SUBST and AM_CONDITIONAL invocations. Drop AC_LIBOBJ
22849         invocation.
22850         * modules/execinfo (configure.ac): Invoke gl_CONDITIONAL_HEADER and
22851         AC_LIBOBJ.
22852         * m4/float_h.m4 (gl_FLOAT_H): Set GL_GENERATE_FLOAT_H instead of
22853         FLOAT_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
22854         * modules/float (configure.ac): Invoke gl_CONDITIONAL_HEADER.
22855         * m4/fnmatch_h.m4 (gl_FNMATCH_H, gl_REPLACE_FNMATCH_H): Set
22856         GL_GENERATE_FNMATCH_H instead of FNMATCH_H. Drop AC_SUBST and
22857         AM_CONDITIONAL invocations.
22858         * modules/fnmatch-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
22859         * modules/fnmatch (configure.ac): Likewise.
22860         * m4/getopt.m4 (gl_FUNC_GETOPT_POSIX, gl_GETOPT_SUBSTITUTE_HEADER): Set
22861         GL_GENERATE_GETOPT_H instead of GETOPT_H. Set GL_GENERATE_GETOPT_CDEFS_H
22862         instead of GETOPT_CDEFS_H. Drop AC_SUBST invocations.
22863         * modules/getopt-posix (configure.ac): Invoke gl_CONDITIONAL_HEADER.
22864         * m4/glob_h.m4 (gl_GLOB_H, gl_REPLACE_GLOB_H): Set GL_GENERATE_GLOB_H
22865         instead of GLOB_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
22866         * modules/glob-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
22867         * modules/glob (configure.ac): Likewise.
22868         * m4/iconv_h.m4 (gl_ICONV_H_DEFAULTS, gl_REPLACE_ICONV_H): Set
22869         GL_GENERATE_ICONV_H instead of ICONV_H. Drop AC_SUBST and AM_CONDITIONAL
22870         invocations.
22871         (gl_ICONV_H): Update.
22872         * modules/iconv-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
22873         * modules/iconv_open (configure.ac): Likewise.
22874         * m4/ieee754-h.m4 (gl_IEEE754_H): Set GL_GENERATE_IEEE754_H instead of
22875         IEEE754_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
22876         * modules/ieee754-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
22877         * m4/libgmp.m4 (gl_LIBGMP): Set GL_GENERATE_GMP_H instead of GMP_H. Drop
22878         AC_SUBST invocation.
22879         * modules/libgmp (configure.ac): Invoke gl_CONDITIONAL_HEADER.
22880         (Makefile.am): Use GL_GENERATE_GMP_H.
22881         * m4/libtextstyle-optional.m4 (gl_LIBTEXTSTYLE_OPTIONAL): Set
22882         GL_GENERATE_TEXTSTYLE_H instead of TEXTSTYLE_H. Drop AC_SUBST and
22883         AM_CONDITIONAL invocations.
22884         * modules/libtextstyle-optional (configure.ac): Invoke
22885         gl_CONDITIONAL_HEADER.
22886         * m4/limits-h.m4 (gl_LIMITS_H, gl_REPLACE_LIMITS_H): Set
22887         GL_GENERATE_LIMITS_H instead of LIMITS_H. Drop AC_SUBST and
22888         AM_CONDITIONAL invocations.
22889         * modules/limits-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
22890         * m4/monetary_h.m4 (gl_MONETARY_H): Set GL_GENERATE_MONETARY_H instead
22891         of MONETARY_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
22892         * modules/monetary (configure.ac): Invoke gl_CONDITIONAL_HEADER.
22893         * m4/net_if_h.m4 (gl_HEADER_NET_IF): Set GL_GENERATE_NET_IF_H instead of
22894         NET_IF_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
22895         * modules/net_if (configure.ac): Invoke gl_CONDITIONAL_HEADER.
22896         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Set
22897         GL_GENERATE_NETINET_IN_H instead of NETINET_IN_H. Drop AC_SUBST and
22898         AM_CONDITIONAL invocations.
22899         * modules/netinet_in (configure.ac): Invoke gl_CONDITIONAL_HEADER.
22900         * m4/selinux-context-h.m4 (gl_HEADERS_SELINUX_CONTEXT_H): Set
22901         GL_GENERATE_SELINUX_CONTEXT_H instead of SELINUX_CONTEXT_H. Drop
22902         AC_SUBST and AM_CONDITIONAL invocations.
22903         * m4/selinux-label-h.m4 (gl_HEADERS_SELINUX_LABEL_H): Set
22904         GL_GENERATE_SELINUX_LABEL_H instead of SELINUX_LABEL_H. Drop AC_SUBST
22905         and AM_CONDITIONAL invocations.
22906         * modules/selinux-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
22907         * m4/stdalign.m4 (gl_STDALIGN_H): Set GL_GENERATE_STDALIGN_H instead of
22908         STDALIGN_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
22909         * modules/stdalign (configure.ac): Invoke gl_CONDITIONAL_HEADER.
22910         * m4/stdarg.m4 (gl_STDARG_H): Set GL_GENERATE_STDARG_H instead of
22911         STDARG_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
22912         * modules/stdarg (configure.ac): Invoke gl_CONDITIONAL_HEADER.
22913         * m4/stdbool.m4 (gl_STDBOOL_H): Renamed from AM_STDBOOL_H. Set
22914         GL_GENERATE_STDBOOL_H instead of STDBOOL_H. Drop AC_SUBST and
22915         AM_CONDITIONAL invocations.
22916         * m4/parse-datetime.m4 (gl_PARSE_DATETIME): Don't require AM_STDBOOL_H.
22917         * modules/stdbool (configure.ac): Invoke gl_STDBOOL_H instead of
22918         AM_STDBOOL_H. Invoke gl_CONDITIONAL_HEADER.
22919         * m4/stddef_h.m4 (gl_STDDEF_H): Set GL_GENERATE_STDDEF_H instead of
22920         STDDEF_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
22921         * modules/stddef (configure.ac): Invoke gl_CONDITIONAL_HEADER.
22922         * m4/stdint.m4 (gl_STDINT_H): Set GL_GENERATE_STDINT_H instead of
22923         STDINT_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
22924         * m4/inttypes.m4 (gl_INTTYPES_PRI_SCN): Update.
22925         * modules/stdint (configure.ac): Invoke gl_CONDITIONAL_HEADER.
22926         * m4/stdnoreturn.m4 (gl_STDNORETURN_H): Set GL_GENERATE_STDNORETURN_H
22927         instead of STDNORETURN_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
22928         * modules/stdnoreturn (configure.ac): Invoke gl_CONDITIONAL_HEADER.
22929         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_H): Set GL_GENERATE_SYS_SOCKET_H
22930         instead of SYS_SOCKET_H.
22931         * m4/sysexits.m4 (gl_SYSEXITS): Set GL_GENERATE_SYSEXITS_H instead of
22932         SYSEXITS_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
22933         * modules/sysexits (configure.ac): Invoke gl_CONDITIONAL_HEADER.
22934         * modules/sigsegv (configure.ac): Set GL_GENERATE_SIGSEGV_H instead of
22935         SIGSEGV_H. Drop AC_SUBST and AM_CONDITIONAL invocations. Invoke
22936         gl_CONDITIONAL_HEADER.
22938 2021-12-15  Bruno Haible  <bruno@clisp.org>
22940         Fix creation of build directories with non-recursive-gnulib-prefix-hack.
22941         This is necessary for executing "make" in a VPATH build of a package
22942         that uses prefix-gnulib-mk and a module such as alloca-opt.
22943         * modules/alloca-opt (Makefile.am): Before generating the .h-t file,
22944         ensure that the directory in which we want to create it exists.
22945         (configure.ac): Invoke AC_PROG_MKDIR_P.
22946         * modules/argz: Likewise.
22947         * modules/arpa_inet: Likewise.
22948         * modules/assert-h: Likewise.
22949         * modules/byteswap: Likewise.
22950         * modules/configmake: Likewise.
22951         * modules/ctype: Likewise.
22952         * modules/dirent: Likewise.
22953         * modules/dynarray: Likewise.
22954         * modules/errno: Likewise.
22955         * modules/execinfo: Likewise.
22956         * modules/fcntl-h: Likewise.
22957         * modules/float: Likewise.
22958         * modules/fnmatch-h: Likewise.
22959         * modules/getopt-posix: Likewise.
22960         * modules/glob-h: Likewise.
22961         * modules/iconv-h: Likewise.
22962         * modules/ieee754-h: Likewise.
22963         * modules/inttypes-incomplete: Likewise.
22964         * modules/langinfo: Likewise.
22965         * modules/libgmp: Likewise.
22966         * modules/libtextstyle-optional: Likewise.
22967         * modules/limits-h: Likewise.
22968         * modules/locale: Likewise.
22969         * modules/malloc-h: Likewise.
22970         * modules/math: Likewise.
22971         * modules/monetary: Likewise.
22972         * modules/net_if: Likewise.
22973         * modules/netdb: Likewise.
22974         * modules/netinet_in: Likewise.
22975         * modules/openmp-init: Likewise.
22976         * modules/poll-h: Likewise.
22977         * modules/posix-shell: Likewise.
22978         * modules/pthread-h: Likewise.
22979         * modules/pty: Likewise.
22980         * modules/sched: Likewise.
22981         * modules/scratch_buffer: Likewise.
22982         * modules/search: Likewise.
22983         * modules/selinux-h: Likewise.
22984         * modules/signal-h: Likewise.
22985         * modules/sigsegv: Likewise.
22986         * modules/snippet/link-warning: Likewise.
22987         * modules/spawn: Likewise.
22988         * modules/stdalign: Likewise.
22989         * modules/stdarg: Likewise.
22990         * modules/stdbool: Likewise.
22991         * modules/stddef: Likewise.
22992         * modules/stdint: Likewise.
22993         * modules/stdio: Likewise.
22994         * modules/stdlib: Likewise.
22995         * modules/stdnoreturn: Likewise.
22996         * modules/string: Likewise.
22997         * modules/strings: Likewise.
22998         * modules/sys_file: Likewise.
22999         * modules/sys_ioctl: Likewise.
23000         * modules/sys_random: Likewise.
23001         * modules/sys_resource: Likewise.
23002         * modules/sys_select: Likewise.
23003         * modules/sys_socket: Likewise.
23004         * modules/sys_stat: Likewise.
23005         * modules/sys_time: Likewise.
23006         * modules/sys_times: Likewise.
23007         * modules/sys_types: Likewise.
23008         * modules/sys_uio: Likewise.
23009         * modules/sys_utsname: Likewise.
23010         * modules/sys_wait: Likewise.
23011         * modules/sysexits: Likewise.
23012         * modules/termios: Likewise.
23013         * modules/threads-h: Likewise.
23014         * modules/time: Likewise.
23015         * modules/uchar: Likewise.
23016         * modules/unicase/base: Likewise.
23017         * modules/unicase/special-casing: Likewise.
23018         * modules/uniconv/base: Likewise.
23019         * modules/unictype/base: Likewise.
23020         * modules/unigbrk/base: Likewise.
23021         * modules/unilbrk/base: Likewise.
23022         * modules/uniname/base: Likewise.
23023         * modules/uninorm/base: Likewise.
23024         * modules/unistd: Likewise.
23025         * modules/unistdio/base: Likewise.
23026         * modules/unistr/base: Likewise.
23027         * modules/unitypes: Likewise.
23028         * modules/uniwbrk/base: Likewise.
23029         * modules/uniwidth/base: Likewise.
23030         * modules/utime-h: Likewise.
23031         * modules/wchar: Likewise.
23032         * modules/wctype-h: Likewise.
23033         * gnulib-tool (func_emit_lib_Makefile_am): When producing output for
23034         GNU make, eliminate %reldir% tokens.
23036 2021-12-15  Bruno Haible  <bruno@clisp.org>
23038         non-recursive-gnulib-prefix-hack: Remove obsolete code.
23039         * build-aux/prefix-gnulib-mk (prefix): Remove handling of t-$@ pattern.
23041 2021-12-15  Bruno Haible  <bruno@clisp.org>
23043         Indentation fix.
23044         * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Correct indentation.
23046 2021-12-14  Paul Eggert  <eggert@cs.ucla.edu>
23048         renameatu: port to macOS tmpfs
23049         Problem reported by Sudhip Nashi (Bug#52193).
23050         * lib/renameatu.c (renameat2ish) [HAVE_RENAMEAT]: New function.
23051         (renameatu): Use the new function, to avoid a bug when
23052         renameatx_np fails with errno == ENOTSUP.  Don’t try to support
23053         RENAME_EXCHANGE; the old code didn’t work and nobody using using
23054         RENAME_EXCHANGE anyway.
23056 2021-12-12  Bruno Haible  <bruno@clisp.org>
23058         gnulib-tool: Try to support non-recursive-gnulib-prefix-hack with tests.
23059         * gnulib-tool (func_import): Synthesize an AC_CONFIG_LIBOBJ_DIR
23060         invocation.
23061         * m4/non-recursive-gnulib-prefix-hack.m4
23062         (gl_NON_RECURSIVE_GNULIB_PREFIX_HACK): Don't invoke
23063         AC_CONFIG_LIBOBJ_DIR.
23065 2021-12-12  Paul Eggert  <eggert@cs.ucla.edu>
23067         bootstrap: refactor for GNU tar
23068         * build-aux/bootstrap (gitignore_entries, insert_if_absent)
23069         (insert_vc_ignore, symlink_to_dir): Define these shell functions
23070         before including bootstrap.conf.  This is for GNU tar, whose
23071         bootstrap.conf uses symlink_to_dir.
23073 2021-12-12  Bruno Haible  <bruno@clisp.org>
23075         gnulib-tool: Support different basenames for the lib/,tests/ Makefiles.
23076         * gnulib-tool: New option --tests-makefile-name.
23077         (tests_makefile_name): New variable.
23078         (func_import): Add support for --tests-makefile-name. Replace local
23079         variable makefile_am with two local variables source_makefile_am,
23080         tests_makefile_am.
23081         * m4/gnulib-tool.m4 (gl_TESTS_MAKEFILE_NAME): New macro.
23083 2021-12-11  Bruno Haible  <bruno@clisp.org>
23085         get_ppid_of, get_progname_of: Fix compilation error on Mac OS X < 10.5.
23086         Reported by Ryan Schmidt <gnulib@ryandesign.com> in
23087         <https://lists.gnu.org/archive/html/bug-gnulib/2021-12/msg00011.html>.
23088         * lib/get_ppid_of.c: Include AvailabilityMacros.h
23089         (get_ppid_of): Use MAC_OS_X_VERSION_MAX_ALLOWED and
23090         MAC_OS_X_VERSION_MIN_REQUIRED.
23091         * lib/get_progname_of: Include AvailabilityMacros.h
23092         (get_progname_of): Use MAC_OS_X_VERSION_MAX_ALLOWED and
23093         MAC_OS_X_VERSION_MIN_REQUIRED.
23095 2021-12-10  Paul Eggert  <eggert@cs.ucla.edu>
23097         backupfile: assume C99 decls
23098         * lib/backupfile.c: Use C99-style decls after statements.
23100         backupfile: prefer signed integers
23101         * lib/backupfile.c: Include ialloc.h instead of idx.h.
23102         Prefer idx_t to size_t where either will do.
23103         Use imalloc and irealloc instead of malloc and realloc.
23105         * modules/backupfile, modules/backup-rename (Depends-on):
23106         Depend on ialloc not idx.
23108         backupfile: fix numbered backups for XXX/
23109         * lib/backupfile.c (check_extension): Return a bool indicating
23110         whether the original extension was OK.  Caller changed.
23111         (numbered_backup): Require that FILELEN does not count
23112         trailing slashes after a non-slash, and don’t require
23113         that *BUF be null-terminated.  Caller changed.
23114         This fixes a bug where the numbered backup file name for X/ was
23115         incorrectly computed because the slash messed up the code
23116         looking for X.~1~, X.~2~, etc., and this caused numbered_backup
23117         to loop forever.  Also, check that check_extension doesn’t
23118         truncate a file name leading to an infloop.
23120 2021-12-07  Paul Eggert  <eggert@cs.ucla.edu>
23122         regex: pacify Coverity clean_state_log_if_needed
23123         Problem reported by Robbie Harwood in:
23124         https://lists.gnu.org/r/bug-gnulib/2021-12/msg00005.html
23125         * lib/regexec.c (clean_state_log_if_needed):
23126         Add a DEBUG_ASSERT; this both pacifies Coverity and
23127         will help to debug in case some other change mistakenly
23128         causes the assertion to become false.
23130 2021-12-07  Bruno Haible  <bruno@clisp.org>
23132         gettext-h: Optimize also for clang.
23133         * lib/gettext.h (pgettext_aux, npgettext_aux, dcpgettext_expr,
23134         dcnpgettext_expr): Inline also on clang.
23136 2021-12-06  Bruno Haible  <bruno@clisp.org>
23138         intprops: Break sync with glibc.
23139         * config/srclist.txt: Comment out intprops.h.
23141 2021-12-06  Paul Eggert  <eggert@cs.ucla.edu>
23143         intprops: streamline and get ready for Clang 14
23144         * lib/intprops.h (_GL_HAS_BUILTIN_ADD_OVERFLOW):
23145         Rely on __has_builtin first, since GCC didn’t introduce it until
23146         GCC 9 so we don’t need to special-case GCC first.
23147         (_GL_HAS_BUILTIN_ADD_OVERFLOW, _GL_HAS_BUILTIN_OVERFLOW_P):
23148         Look at __EDG__ rather than __ICC, since icc defines __EDG__ too.
23149         (_GL_HAS_BUILTIN_MUL_OVERFLOW): Define to 1 in Clang 14 and later,
23150         as a bug fix is scheduled for Clang 14.
23151         (_GL_HAS_BUILTIN_OVERFLOW_P): Do not bother to special-case
23152         __clang__, since __has_builtin should do the right thing anyway.
23154 2021-12-06  Bruno Haible  <bruno@clisp.org>
23156         intprops: Treat EDG-based compilers like Intel compilers.
23157         Reported by Ilya Kurdyukov <ilyakurdyukov@altlinux.org> in
23158         <https://lists.gnu.org/archive/html/bug-gnulib/2021-12/msg00028.html>.
23159         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW_P): Define to 0 on EDG-based
23160         compilers.
23162 2021-12-05  Bruno Haible  <bruno@clisp.org>
23164         sigsegv: Fix build on some more embedded CPUs.
23165         * m4/stack-direction.m4 (SV_STACK_DIRECTION): Assume the stack grows
23166         negative, when the GCC 11 sources say so.
23168 2021-11-30  Paul Eggert  <eggert@cs.ucla.edu>
23170         sys_random: port better to uClibc < 1.0.35
23171         Problem reported by Fabrice Fontaine in:
23172         https://lists.gnu.org/r/bug-gnulib/2021-11/msg00043.html
23173         * lib/sys_random.in.h [HAVE_SYS_RANDOM_H && !__GLIBC__ && __UCLIBC__]:
23174         Include <stddef.h>, in case this file is included before
23175         __UCLIBC__ is defined.
23177 2021-11-27  Paul Eggert  <eggert@cs.ucla.edu>
23179         gettext-h: document GNULIB_NO_VLA
23180         * doc/gnulib-readme.texi (C99 features avoided):
23181         Document GNULIB_NO_VLA.
23183         gettext-h: use VLA test similar to regex
23184         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Assuming
23185         GNULIB_NO_VLA, define if (defined __STDC_VERSION__ && 199901L <=
23186         __STDC_VERSION__ \ + && !defined __STDC_NO_VLA___), not if
23187         ((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__).
23188         This is more consistent with what the regex module does.
23189         * modules/gettext-h (Depends-on): Depend on vararrays, since
23190         lib/gettext.h uses __STDC_NO_VLA__.
23192         regex: port to tcc
23193         Problem reported by Benno Schulenberg in:
23194         https://lists.gnu.org/r/bug-gnulib/2021-11/msg00038.html
23195         * modules/regex (Depends-on): Depend on vararrays, since
23196         lib/regex.h uses __STDC_NO_VLA__.
23197         * modules/vararrays: Change license from LGPL to LGPLv2+.
23199 2021-11-25  Bernhard Voelker  <mail@bernhard-voelker.de>
23201         test-framework-sh: remove unsafe entries from PATH
23202         Running tests with '.' in the PATH may yield unspecified results,
23203         and is deemed unsafe per se.  This includes empty entries as well
23204         which are treated like a '.' entry as per POSIX.
23205         * tests/init.sh (setup_): Add snippet to remove relative and non-
23206         accessible entries from the PATH environment variable.
23208 2021-11-24  Paul Eggert  <eggert@cs.ucla.edu>
23210         regex: merge from glibc
23211         The main change here, imported from Glibc, is for the regex
23212         code to stop using nested functions when _LIBC is defined.
23213         The intent is for the result to be copied back to Glibc
23214         so that the two implementations can resync.
23215         * lib/regcomp.c (re_set_fastmap, seek_collating_symbol_entry)
23216         (lookup_collation_sequence_value, build_range_exp)
23217         (build_collating_symbol):
23218         * lib/regexec.c (acquire_init_state_context):
23219         Declare with __always_inline instead of with
23220         ‘inline __attribute__ ((always_inline))’.
23221         * lib/regexec.c (init_word_char):
23222         Move uint64_t comment to regex_internal.h.
23223         (parse_byte): Change multibyte-detecting arg from re_charset_t *
23224         to re_dfa_t const *.  All callers changed.
23225         (build_range_exp, build_collating_symbol) [!_LIBC]:
23226         Change signature to match _LIBC well enough so that the caller can
23227         be simplified to assume _LIBC.
23228         (parse_bracket_exp): Pull its nested functions
23229         seek_collating_symbol_entry, lookup_collation_sequence_value,
23230         build_range_exp, build_collating_symbol out to the top level,
23231         adding args to pass the information instead of having them access
23232         nonlocal vars.  Use types in local vars that do not assume glibc.
23233         * lib/regex_internal.h: Explain uint64_t etc. here.
23235 2021-11-23  Paul Eggert  <eggert@cs.ucla.edu>
23237         regex: assume RE_ENABLE_I18N
23238         These days there is no longer any need to port to platforms
23239         lacking iswctype etc., since Gnulib now has substitutes.
23240         * config/srclist.txt: Comment out regex_internal.c and
23241         regex_internal.h for now, since they no longer match glibc.
23242         The intent is to merge them again soon.
23243         * lib/regex_internal.h (RE_ENABLE_I18N): Remove.
23244         All uses changed to assume that RE_ENABLE_I18N is 1.
23245         * modules/regex (Depends-on): Add iswctype.
23247 2021-11-15  Paul Eggert  <eggert@cs.ucla.edu>
23249         lseek: port around macOS SEEK_HOLE glitch
23250         Problem reported by Sudhip Nashi (Bug#51857#47).
23251         * lib/lseek.c (rpl_lseek): Work around macOS lseek+SEEK_HOLE
23252         returning -1 with ENXIO if there are no holes before EOF,
23253         contrary to the macOS documentation.
23255         lseek: port around macOS SEEK_DATA glitch
23256         Problem reported by Sudhip Nashi (Bug#51857).
23257         * doc/posix-functions/lseek.texi (lseek): Mention macOS SEEK_DATA
23258         issue.
23259         * lib/lseek.c (rpl_lseek): Work around macOS portability glitch.
23260         * m4/lseek.m4 (gl_FUNC_LSEEK): Replace lseek on Darwin.
23261         * modules/lseek (Depends-on): Depend on msvc-nothrow
23262         and fstat only if needed.
23264 2021-11-11  Fabrice Fontaine  <fontaine.fabrice@gmail.com>  (tiny change)
23266         sigsegv: fix builds on microblazeel, or1k
23267         * m4/stack-direction.m4 (SV_STACK_DIRECTION):
23268         Assume it grows negative on microblaze* and or1k.
23270 2021-11-09  Paul Eggert  <eggert@cs.ucla.edu>
23272         exclude: yield proper errno on failure
23273         * lib/exclude.c (add_exclude_file): Do not assume that fclose
23274         preserves errno on success.
23276 2021-11-07  Paul Eggert  <eggert@cs.ucla.edu>
23278         regex: break regcomp.c link with glibc
23279         Problem reported by Bruno Haible in:
23280         https://lists.gnu.org/r/bug-gnulib/2021-11/msg00005.html
23281         * config/srclist.txt: Comment out regcomp.c for now.
23282         * lib/regcomp.c: Revert previous change.
23284 2021-10-24  Bruno Haible  <bruno@clisp.org>
23286         string: Avoid syntax error re strdup in string.in.h (regr. 2021-09-07).
23287         Reported by Jan Engelhardt <jengelh@inai.de>
23288         and by Arash Esbati <arash@gnu.org> via Andy Moreton in
23289         <https://lists.gnu.org/archive/html/bug-gnulib/2021-10/msg00058.html>.
23290         * lib/string.in.h (_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_DEALLOC_FREE,
23291         _GL_ATTRIBUTE_MALLOC): Add fallback declarations, like in
23292         lib/stdlib.in.h.
23293         * lib/wchar.in.h (_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_DEALLOC_FREE,
23294         _GL_ATTRIBUTE_MALLOC): Likewise.
23296 2021-10-19  Paul Eggert  <eggert@cs.ucla.edu>
23298         xalloc: new function xinmalloc
23299         * lib/xmalloc.c (xinmalloc): New function, which is like
23300         xnmalloc but for idx_t instead of size_t.
23302 2021-10-18  Paul Eggert  <eggert@cs.ucla.edu>
23304         regex: fix buffer read overrrun
23305         * lib/regexec.c (re_search_internal):
23306         Fix buffer read overrun reported by Benno Schulenberg in:
23307         https://lists.gnu.org/r/bug-gnulib/2021-10/msg00035.html
23309 2021-10-15  Paul Eggert  <eggert@cs.ucla.edu>
23311         nproc: port better to macOS 10.14
23312         * lib/nproc.c (num_processors_ignoring_omp)
23313         [HAVE_SYSCTL && !defined __GLIBC__ && defined HW_NCPU]:
23314         Do not use a const mib, as macOS 10.14 rejects this.
23316 2021-10-13  Paul Eggert  <eggert@cs.ucla.edu>
23318         sigsegv: fix quoting problem
23319         Problem reported for FreeBSD ports by Alexey Dokuchaev in:
23320         https://bugs.gnu.org/51144
23321         * m4/stack-direction.m4 (SV_STACK_DIRECTION): Quote brackets.
23323 2021-10-10  Paul Eggert  <eggert@cs.ucla.edu>
23325         nproc: port better to OpenBSD
23326         Problem reported by Omar Polo in:
23327         https://lists.gnu.org/r/emacs-devel/2021-10/msg00692.html
23328         * lib/nproc.c (num_processors_ignoring_omp): Prefer HW_NCPUONLINE
23329         to HW_NCPU, for OpenBSD.  Also, make mib const.
23331 2021-10-02  Paul Eggert  <eggert@cs.ucla.edu>
23333         timer-time: port better to OpenBSD 6.9
23334         * m4/timer_time.m4 (gl_TIMER_TIME): Also require timer_settime to
23335         be declared, as it exists in OpenBSD but always fails with ENOSYS.
23337         sys_select: port better to OpenBSD 6.9
23338         OpenBSD 6.9’s <sys/time.h> includes <sys/select.h> which then
23339         includes <signal.h>, which caused coreutils/lib/nproc.c compiles
23340         to fail with "/usr/include/signal.h:57: warning: 'struct
23341         sigaction' declared inside parameter list".  Fix this.
23342         * lib/sys_select.in.h [__OpenBSD__]: Simply delegate to the system
23343         header if being included from <sys/time.h>.
23345 2021-09-22  Bruno Haible  <bruno@clisp.org>
23347         doc: Fix outdated statement about Spanish collation.
23348         Reported by Dietmar Schindler in
23349         <https://lists.gnu.org/archive/html/bug-gnulib/2021-09/msg00095.html>.
23350         * doc/regex.texi (Collating Elements vs. Characters): Choose another
23351         example of a digraph with special collation.
23353         doc: Don't assume that the output format is TeX-based or info.
23354         Reported by Dietmar Schindler in
23355         <https://lists.gnu.org/archive/html/bug-gnulib/2021-09/msg00095.html>.
23356         * doc/regex.texi (Collating Elements vs. Characters): Assume a texinfo
23357         version that groks UTF-8 encoded ISO-8859-1 characters.
23359 2021-09-21  Paul Eggert  <eggert@cs.ucla.edu>
23361         regex: sync with glibc
23362         * config/srclist.txt: Uncomment-out posix/regex.c and related
23363         files, as the Gnulib versions have now been copied to glibc.
23364         * lib/intprops.h: Remove authorship comment, as per glibc guidelines.
23366 2021-09-20  Simon Josefsson  <simon@josefsson.org>
23368         maint: Avoid syntax-check failure for empty gnulib submodule.
23369         * top/maint.mk (gnulib_dir): Fall back to GNULIB_SRCDIR if
23370         submodule is not checked out.
23372 2021-09-19  Bruno Haible  <bruno@clisp.org>
23374         Relicense qemu.h under LGPLv2+.
23375         * tests/qemu.h: Change license header.
23377 2021-09-19  Bruno Haible  <bruno@clisp.org>
23379         ialloc: Update license headers after license change from 2021-08-29.
23380         * lib/ialloc.h: Update license header.
23381         * lib/ialloc.c: Likewise.
23383 2021-09-19  Bruno Haible  <bruno@clisp.org>
23385         Improve 'configure --help' output for crypto modules.
23386         * m4/af_alg.m4 (gl_AF_ALG): List the hash functions for which we use the
23387         Linux crypto. Also mention that we use it on files only.
23388         * m4/gl-openssl.m4 (gl_CRYPTO_CHECK): Use manual line breaking, not the
23389         line-filling style of AS_HELP_STRING. Show that --with-openssl takes an
23390         optional argument. List the hash functions for which we use the OpenSSL
23391         library. Don't mention --with-linux-crypto if the af_alg module is not
23392         in use. Mention that --with-linux-crypto applies only to the Linux
23393         kernel. Mention that it gets used only when available. Mention that it
23394         takes precedence only for files. In the error or warning, mention the
23395         pre-built package name that people can install.
23397 2021-09-18  Bruno Haible  <bruno@clisp.org>
23399         string, wchar: Don't require undefined m4 macros (regr. today).
23400         Reported by Colin Watson <cjwatson@debian.org> in
23401         <https://lists.gnu.org/archive/html/bug-gnulib/2021-09/msg00078.html>.
23402         * m4/string_h.m4 (gl_STRING_H_REQUIRE_DEFAULTS): Don't use m4_require
23403         directly. Instead, invoke gl_STDLIB_H_REQUIRE_DEFAULTS.
23404         * m4/wchar_h.m4 (gl_WCHAR_H_REQUIRE_DEFAULTS): Likewise.
23406 2021-09-18  Bruno Haible  <bruno@clisp.org>
23408         sm3-buffer tests: New module.
23409         * tests/test-sm3-buffer.c: Renamed from tests/test-sm3.c.
23410         * modules/crypto/sm3-buffer-tests: Renamed from
23411         modules/crypto/sm3-tests. Test tests/test-sm3-buffer.c instead of
23412         tests/test-sm3.c.
23414         sm3-buffer: New module.
23415         * lib/sm3-stream.c: New file, extracted from lib/sm3.c.
23416         * lib/sm3.c: Don't include stdlib.h, unlocked-io.h.
23417         (BLOCKSIZE, sm3_stream): Moved to sm3-stream.c.
23418         * lib/sm3.h: Tweak.
23419         * modules/crypto/sm3-buffer: New file, based on modules/crypto/sm3.
23420         * modules/crypto/sm3: Rewritten.
23422 2021-09-18  Bruno Haible  <bruno@clisp.org>
23424         sha512-buffer tests: New module.
23425         * tests/test-sha512-stream.c: Renamed from tests/test-sha512.c.
23426         * modules/crypto/sha512-buffer-tests: New file, based on
23427         modules/crypto/sha512-tests.
23428         * modules/crypto/sha512-tests: Remove tests that are now in
23429         modules/crypto/sha512-buffer-tests. Test tests/test-sha512-stream.c
23430         instead of tests/test-sha512.c.
23432         sha512: Clarify module to source relation.
23433         * lib/sha512-stream.c: New file, extracted from lib/sha512.c.
23434         * lib/sha512.c: Don't include stdlib.h, unlocked-io.h.
23435         (BLOCKSIZE, shaxxx_stream, sha512_stream, sha384_stream): Moved to
23436         sha512-stream.c.
23437         * lib/sha512.h: Tweak.
23438         * modules/crypto/sha512 (Files): Add lib/sha512-stream.c.
23439         (configure.ac): Don't define GL_COMPILE_CRYPTO_STREAM.
23440         (Makefile.am): Arrange to compile sha512-stream.c.
23441         (Link): Mention $(LIB_CRYPTO).
23443 2021-09-18  Bruno Haible  <bruno@clisp.org>
23445         sha256-buffer tests: New module.
23446         * tests/test-sha256-stream.c: Renamed from tests/test-sha256.c.
23447         * modules/crypto/sha256-buffer-tests: New file, based on
23448         modules/crypto/sha256-tests.
23449         * modules/crypto/sha256-tests: Remove tests that are now in
23450         modules/crypto/sha256-buffer-tests. Test tests/test-sha256-stream.c
23451         instead of tests/test-sha256.c.
23453         sha256: Clarify module to source relation.
23454         * lib/sha256-stream.c: New file, extracted from lib/sha256.c.
23455         * lib/sha256.c: Don't include stdlib.h, unlocked-io.h.
23456         (BLOCKSIZE, shaxxx_stream, sha256_stream, sha224_stream): Moved to
23457         sha256-stream.c.
23458         * lib/sha256.h: Tweak.
23459         * modules/crypto/sha256 (Files): Add lib/sha256-stream.c.
23460         (configure.ac): Don't define GL_COMPILE_CRYPTO_STREAM.
23461         (Makefile.am): Arrange to compile sha256-stream.c.
23462         (Link): Mention $(LIB_CRYPTO).
23464 2021-09-18  Bruno Haible  <bruno@clisp.org>
23466         sha1-buffer tests: New module.
23467         * tests/test-sha1-buffer.c: New file, based on tests/test-sha1.c.
23468         * tests/test-sha1-stream.c: Renamed from tests/test-sha1.c.
23469         (main): Remove sha1-buffer tests.
23470         * modules/crypto/sha1-buffer-tests: New file, based on
23471         modules/crypto/sha1-tests.
23472         * modules/crypto/sha1-tests: Remove tests that are now in
23473         modules/crypto/sha1-buffer-tests. Test tests/test-sha1-stream.c instead
23474         of tests/test-sha1.c.
23476         sha1: Clarify module to source relation.
23477         * lib/sha1-stream.c: New file, extracted from lib/sha1.c.
23478         * lib/sha1.c: Don't include stdlib.h, unlocked-io.h.
23479         (BLOCKSIZE, sha1_stream): Moved to sha1-stream.c.
23480         * lib/sha1.h: Correct indentation.
23481         * modules/crypto/sha1 (Files): Add lib/sha1-stream.c.
23482         (configure.ac): Don't define GL_COMPILE_CRYPTO_STREAM.
23483         (Makefile.am): Arrange to compile sha1-stream.c.
23484         (Link): Mention $(LIB_CRYPTO).
23486 2021-09-18  Bruno Haible  <bruno@clisp.org>
23488         md5-buffer tests: New module.
23489         * tests/test-md5-buffer.c: New file, based on tests/test-md5.c.
23490         * tests/test-md5-stream.c: Renamed from tests/test-md5.c.
23491         (main): Remove md5-buffer tests.
23492         * modules/crypto/md5-buffer-tests: New file, based on
23493         modules/crypto/md5-tests.
23494         * modules/crypto/md5-tests: Remove tests that are now in
23495         modules/crypto/md5-buffer-tests. Test tests/test-md5-stream.c instead
23496         of tests/test-md5.c.
23498         md5: Clarify module to source relation.
23499         * lib/md5-stream.c: New file, extracted from lib/md5.c.
23500         * lib/md5.c: Don't include stdlib.h, unlocked-io.h.
23501         (BLOCKSIZE, md5_stream): Moved to md5-stream.c.
23502         * lib/md5.h: Tweak.
23503         * modules/crypto/md5 (Files): Add lib/md5-stream.c.
23504         (configure.ac): Don't define GL_COMPILE_CRYPTO_STREAM.
23505         (Makefile.am): Arrange to compile md5-stream.c.
23506         (Link): Mention $(LIB_CRYPTO).
23508 2021-09-18  Bruno Haible  <bruno@clisp.org>
23510         md4-buffer tests: New module.
23511         * tests/test-md4-buffer.c: Renamed from tests/test-md4.c.
23512         * modules/crypto/md4-buffer-tests: Renamed from
23513         modules/crypto/md4-tests. Test tests/test-md4-buffer.c instead of
23514         tests/test-md4.c.
23516         md4-buffer: New module.
23517         * lib/md4-stream.c: New file, extracted from lib/md4.c.
23518         * lib/md4.c: Don't include stdlib.h, unlocked-io.h.
23519         (BLOCKSIZE, md4_stream): Moved to md4-stream.c.
23520         * lib/md4.h: Reorder declarations.
23521         * modules/crypto/md4-buffer: New file, based on modules/crypto/md4.
23522         * modules/crypto/md4: Rewritten.
23524 2021-09-18  Bruno Haible  <bruno@clisp.org>
23526         md2-buffer tests: New module.
23527         * tests/test-md2-buffer.c: Renamed from tests/test-md2.c.
23528         * modules/crypto/md2-buffer-tests: Renamed from
23529         modules/crypto/md2-tests. Test tests/test-md2-buffer.c instead of
23530         tests/test-md2.c.
23532         md2-buffer: New module.
23533         * lib/md2-stream.c: New file, extracted from lib/md2.c.
23534         * lib/md2.c: Don't include stdlib.h, unlocked-io.h.
23535         (BLOCKSIZE, md2_stream): Moved to md2-stream.c.
23536         * lib/md2.h: Reorder declarations.
23537         * modules/crypto/md2-buffer: New file, based on modules/crypto/md2.
23538         * modules/crypto/md2: Rewritten.
23540 2021-09-18  Bruno Haible  <bruno@clisp.org>
23542         string, wchar: Don't cause link errors for rpl_free (regr. 2021-09-07).
23543         Reported by Simon Josefsson in
23544         <https://lists.gnu.org/archive/html/bug-gnulib/2021-09/msg00042.html>.
23545         * lib/string.in.h (free, rpl_free): Consider GNULIB_FREE_POSIX variable.
23546         * lib/wchar.in.h (free, rpl_free): Likewise.
23547         * m4/string_h.m4 (gl_STRING_H_REQUIRE_DEFAULTS): Require module
23548         indicator variable initializations from the stdlib module.
23549         * m4/wchar_h.m4 (gl_WCHAR_H_REQUIRE_DEFAULTS): Likewise.
23550         * modules/string (Makefile.am): Substitute GNULIB_FREE_POSIX in string.h.
23551         * modules/wchar (Makefile.am): Substitute GNULIB_FREE_POSIX in wchar.h.
23553 2021-09-17  Bruno Haible  <bruno@clisp.org>
23555         threadlib: Avoid crashes in thread-related functions on Cygwin 3.2.0.
23556         Reported by Brian Inglis via Akim Demaille in
23557         <https://lists.gnu.org/archive/html/bug-gnulib/2021-09/msg00063.html>.
23558         * m4/threadlib.m4 (gl_WEAK_SYMBOLS): Force a "guessing no" result on
23559         Cygwin.
23561 2021-09-13  Bruno Haible  <bruno@clisp.org>
23563         simple-atomic: Port to Oracle Studio 12.6.
23564         * lib/simple-atomic.c (asm) [0x590 <= __SUNPRO_C && __STDC__]:
23565         #define to __asm.
23567 2021-09-13  Paul Eggert  <eggert@cs.ucla.edu>
23569         asyncsafe-spin: port to Oracle Studio 12.6 sparc
23570         Problem reported by Dennis Clarke via Eric Blake in:
23571         https://lists.gnu.org/r/bug-gnulib/2021-09/msg00056.html
23572         * lib/asyncsafe-spin.c (asm) [0x590 <= __SUNPRO_C && __STDC__]:
23573         #define to __asm.
23575 2021-09-12  Paul Eggert  <eggert@cs.ucla.edu>
23577         stdint-tests: long long preproc on recent Sun C
23578         * tests/test-stdint.c: Test long long preprocessor constants on
23579         Oracle Developer Studio 12.6, where they should work.
23581 2021-09-13  Bruno Haible  <bruno@clisp.org>
23583         extern-inline: Fix syntax error on macOS with GCC 11 (regr. 2021-08-22).
23584         Reported by Akim Demaille in
23585         <https://lists.gnu.org/archive/html/bug-gnulib/2021-09/msg00052.html>.
23586         * m4/extern-inline.m4 (_GL_INLINE, _GL_EXTERN_INLINE): Put _GL_UNUSED
23587         before, not after, 'static'.
23589 2021-09-11  Christian Weisgerber  <naddy@mips.inka.de>  (tiny change)
23591         sigsegv: port to OpenBSD 6.8+ powerpc64
23592         * lib/sigsegv.c (SIGSEGV_FAULT_STACKPOINTER):
23593         Special case for __OpenBSD__ && __powerpc64__, needed due to:
23594         https://github.com/openbsd/src/commit/5e649a8714ba05cf482011b7b7d1e5437b7c17db
23595         which is part of the oldest currently-supported OpenBSD (6.8),
23596         so we needn’t worry about older versions.
23598 2021-09-09  Pádraig Brady  <P@draigBrady.com>
23600         maintainer-makefile: add 'can' to sc_prohibit_doubled_word
23601         * top/maint.mk (sc_prohibit_doubled_word): Check for "can can".
23603 2021-09-08  Paul Eggert  <eggert@cs.ucla.edu>
23605         strerror_r-posix: port even better to Android
23606         * lib/strerror_r.c: Use STRERROR_R_CHAR_P to decide whether the
23607         system strerror_r returns char *, and HAVE_DECL_STRERROR_R to
23608         decide whether it either does that or returns an integer.  In the
23609         former case, use the system strerror_r even on platforms like
23610         Android API level 23 that don’t have __xpg_strerror_r; also
23611         check for strerror_r failure just in case.
23612         * m4/error.m4 (gl_PREREQ_ERROR):
23613         * m4/strerror_r.m4 (gl_PREREQ_STRERROR_R):
23614         Use system extensions on Android, to avoid mishandling strerror_r
23615         on API level 23 and later.
23616         * modules/error, modules/strerror_r-posix (configure.ac):
23617         Surround gl_PREREQ_ERROR with AS_IF instead of plain if, so that
23618         AC_REQUIREs are propagated out.
23620         strerror_r-posix: port better to Android
23621         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Move requirement of
23622         gl_USE_SYSTEM_EXTENSIONS from here ...
23623         (gl_FUNC_STRERROR_R_WORKS): ... to here, which is the macro that
23624         actually needs it.  This avoids a bug where 'configure' tests
23625         whether strerror_r has the POSIX API before enabling GNU
23626         extensions.  On Android, enabling GNU extensions switches from the
23627         POSIX to the GNU API.  Problem reported by Lucy Phipps in:
23628         https://lists.gnu.org/r/bug-gnulib/2021-09/msg00026.html
23630         string, wchar: port rpl_free decl to Android
23631         * lib/string.in.h, lib/wchar.in.h:
23632         (free): When replacing it, declare the unreplaced version too.
23633         Problem reported by Lucy Phipps in:
23634         https://lists.gnu.org/r/bug-gnulib/2021-09/msg00026.html
23636 2021-09-07  Paul Eggert  <eggert@cs.ucla.edu>
23638         string, wchar: avoid some namespace pollution
23639         * lib/string.in.h, lib/wchar.in.h:
23640         (free): Declare by hand instead of including stdlib.h.
23641         This avoids some namespace pollution.  It should also avoid some
23642         nested-include problems described by Lucy Phipps in:
23643         https://lists.gnu.org/r/bug-gnulib/2021-09/msg00018.html
23644         * modules/string, modules/wchar:
23645         (Depends-on): Add stdlib, so that REPLACE_FREE has the right value.
23646         (Makefile.am): Replace @REPLACE_FREE@ when creating the include file.
23648 2021-09-04  Paul Eggert  <eggert@cs.ucla.edu>
23650         idx: break copying from glibc
23651         * config/srclist.txt: Comment out idx.h, and bring back recent change.
23653 2021-09-04  Sun Haiyong  <youbest@sina.com>  (tiny change)
23655         sigsegv: Improve cross-compilation support for LoongArch CPU.
23656         * m4/stack-direction.m4 (SV_STACK_DIRECTION): Assume the stack grows
23657         down on LoongArch.
23659 2021-09-04  Simon Josefsson  <simon@josefsson.org>
23661         doc: Improve help related to bootstrap script.
23662         * doc/gnulib-tool.texi (VCS Issues): Make title more positive,
23663         s/Issues/Integration/.  Some more bootstrap-related hints,
23664         including changing suggested submodule path from .gnulib to gnulib
23665         as this seems to be more wide-spread.
23667 2021-09-04  Paul Eggert  <eggert@cs.ucla.edu>
23669         intprops: fix minor doc glitches
23670         * doc/intprops.texi (Integer Properties): Fix doc glitches.
23672 2021-09-04  Simon Josefsson  <simon@josefsson.org>
23674         doc: Add suggestions on FDL texinfo usage.
23675         * doc/licenses-texi.texi (License Texinfo sources): Add texinfo
23676         examples.
23678 2021-09-03  Simon Josefsson  <simon@josefsson.org>
23680         maintainer-makefile: Add indentation syntax-check rule.
23681         * top/maint.mk (indent): Use AM_V_GEN and indent_args.
23682         (sc_indent): New rule.
23683         (indent_args): New variable.
23684         (C_SOURCES): New variable, initialized to reasonable C files.
23685         (exclude_file_name_regexp--indent): New variable.
23687 2021-08-30  Paul Eggert  <eggert@cs.ucla.edu>
23689         idx: add commentary
23690         * lib/idx.h: Add comments about ssize_t and strlen, in
23691         response to comments from Simon Josefsson in:
23692         https://lists.gnu.org/r/bug-gnulib/2021-08/msg00196.html
23694 2021-08-29  Paul Eggert  <eggert@cs.ucla.edu>
23696         attribute: keep up with gnulib-common.m4
23697         * lib/attribute.h (ATTRIBUTE_DEALLOC, ATTRIBUTE_DEALLOC_FREE):
23698         New macros, aliases for the _GL_-prefixed macros added
23699         to gnulib-common.m4 last month.
23701 2021-08-29  Bruno Haible  <bruno@clisp.org>
23703         supersede: Fix test failure under QEMU user-mode for Linux/mips.
23704         * tests/test-supersede-open.h (test_open_supersede): Copy statbuf.st_dev
23705         into a local variable of type dev_t.
23706         * tests/test-supersede-fopen.h (test_fopen_supersede): Likewise.
23708 2021-08-29  Bruno Haible  <bruno@clisp.org>
23710         spawn-pipe: Fix test failure when running under QEMU user-mode.
23711         * tests/test-spawn-pipe-child.c: Include <stdbool.h>, <string.h>,
23712         qemu.h.
23713         (main): Under QEMU user-mode, allow fd 2 or fd 3 to be open.
23714         * modules/spawn-pipe-tests (Files): Add qemu.h.
23715         (Depends-on): Add stdbool.
23717 2021-08-29  Bruno Haible  <bruno@clisp.org>
23719         execute: Fix test failure when running under QEMU user-mode.
23720         * tests/test-execute-child.c: Include <stdbool.h>, qemu.h.
23721         (main): Under QEMU user-mode, allow fd 3 to be open.
23722         * modules/execute-tests (Files): Add qemu.h.
23723         (Depends-on): Add stdbool.
23725 2021-08-29  Bruno Haible  <bruno@clisp.org>
23727         posix_spawn_file_actions_addfchdir: Avoid test failure under QEMU.
23728         * tests/test-posix_spawn-fchdir.c: Include qemu.h.
23729         (is_qemu): New variable.
23730         (test): Under QEMU user-mode, don't expect that "pwd" produces the
23731         result "/".
23732         (main): Initialize is_qemu. Under QEMU user-mode, skip the relative file
23733         name test.
23734         * modules/posix_spawn_file_actions_addfchdir-tests (Files): Add qemu.h.
23735         (Depends-on): Add stdbool.
23737 2021-08-29  Bruno Haible  <bruno@clisp.org>
23739         getcwd tests: Avoid test failure when running under QEMU user-mode.
23740         * modules/getcwd-tests (Files): Add qemu.h.
23741         (Depends-on): Add stdbool.
23742         * tests/test-getcwd.c: Include qemu.h.
23743         (test_long_name): Skip this test when running under QEMU user-mode.
23744         (main): Consider return code 77 from test_long_name.
23746 2021-08-29  Paul Eggert  <eggert@cs.ucla.edu>
23748         base32, base64: treat negative sizes as overflows
23749         * lib/base64.c (base64_encode_alloc):
23750         * lib/base32.c (base32_encode_alloc):
23751         Treat negative sizes as overflows, for better compatibility
23752         with previous API.
23754 2021-08-29  Bruno Haible  <bruno@clisp.org>
23756         explicit_bzero test: Fix test failure due to GCC optimizations.
23757         * tests/test-explicit_bzero.c (do_secret_stuff): Use static variable
23758         'last_stackbuf'.
23759         (main): Use an 'if' to combine the two do_secret_stuff invocations.
23761 2021-08-29  Paul Eggert  <eggert@cs.ucla.edu>
23763         dfa: port to non-gnulib
23764         Suggested by Arnold Robbins in:
23765         https://lists.gnu.org/r/bug-gnulib/2021-08/msg00181.html
23766         * lib/dfa.h (_GL_ATTRIBUTE_DEALLOC) [!_GL_ATTRIBUTE_MALLOC]:
23767         Add missing definition.
23769 2021-08-29  Paul Eggert  <eggert@cs.ucla.edu>
23771         base32, base64: fix broken tests
23772         Problem reported by Bruno Haible in:
23773         https://lists.gnu.org/r/bug-gnulib/2021-08/msg00170.html
23774         * lib/base32.c, lib/base64.c: Do not include verify.h,
23775         and omit all uses of ‘assume’.
23776         * modules/base32, modules/base64 (Depends-on): Remove verify.
23777         * tests/test-base32.c, tests/test-base64.c:
23778         Don’t pass out-of-range values to allocator,
23779         as converting them to idx_t relies on implementation-defined
23780         behavior that could trap.
23782         ialloc: relicense
23783         * modules/ialloc (License): Change from LGPL to LGPLv2+.
23785 2021-08-28  Bruno Haible  <bruno@clisp.org>
23787         fma: Fix compilation error on Linux/sh4.
23788         * lib/fma.c (FUNC): Don't test for FE_DOWNWARD or FE_UPWARD when these
23789         rounding modes are not defined.
23791 2021-08-28  Bruno Haible  <bruno@clisp.org>
23793         Skip some tests when running under QEMU user-mode.
23794         * tests/qemu.h: New file.
23795         * tests/test-get-rusage-as.c: Include qemu.h.
23796         (main): Skip the test when running under QEMU.
23797         * tests/test-get-rusage-data.c: Include qemu.h.
23798         (main): Skip the test when running under QEMU.
23799         * tests/test-printf-posix2.c: Include qemu.h.
23800         (main): Return with code 77 when running under QEMU.
23801         * tests/test-fprintf-posix2.c: Include qemu.h.
23802         (main): Return with code 77 when running under QEMU.
23803         * tests/test-fprintf-posix3.c: Include qemu.h.
23804         (main): Return with code 79 when running under QEMU.
23805         * tests/test-fprintf-posix3.sh: Skip the test when the return code was
23806         79.
23807         * tests/test-dprintf-posix2.c: Include qemu.h.
23808         (main): Return with code 79 when running under QEMU. Use return code 80
23809         instead of 78.
23810         * tests/test-dprintf-posix2.sh: Skip the test when the return code was
23811         79. Update for changed return code.
23812         * modules/get-rusage-as-tests (Files): Add qemu.h.
23813         (Depends-on): Add stdbool.
23814         * modules/get-rusage-data-tests (Files): Add qemu.h.
23815         (Depends-on): Add stdbool.
23816         * modules/fprintf-posix-tests (Files): Add qemu.h.
23817         (Depends-on): Add stdbool.
23818         * modules/dprintf-posix-tests (Files): Add qemu.h.
23819         (Depends-on): Add stdbool.
23821 2021-08-28  Bruno Haible  <bruno@clisp.org>
23823         sigabbrev_np, sigdescr_np: Fix compilation error on Linux/alpha.
23824         * lib/sigabbrev_np.c (sigabbrev_np): When SIGINFO and SIGPWR have the
23825         same value, give precendence to SIGPWR.
23826         * lib/sigdescr_np.c (sigdescr_np): Likewise.
23827         * tests/test-sigabbrev_np.c (main): Likewise.
23828         * tests/test-sigdescr_np.c (main): Likewise.
23830 2021-08-28  Bruno Haible  <bruno@clisp.org>
23832         execle, execve, execvpe tests: Fix test failures under qemu user-mode.
23833         * test-execle-main.c: Include <string.h>.
23834         (get_environ_assignment, create_minimal_env): New functions.
23835         (main): Call create_minimal_env.
23836         * test-execve-main.c: Likewise.
23837         * test-execvpe-main.c: Likewise.
23839 2021-08-27  Paul Eggert  <eggert@cs.ucla.edu>
23841         base32, base64: prefer signed to unsigned integers
23842         * lib/base32.c, lib/base64.c: Include ialloc.h instad of stdlib.h.
23843         Include intprops.h, verify.h.
23844         * lib/base32.c (base32_encode, base32_encode_alloc, get_8, decode_8)
23845         (base32_decode_ctx, base32_decode_alloc_ctx):
23846         * lib/base32.h (struct base32_decode_context):
23847         * lib/base64.c (base64_encode_fast, base64_encode)
23848         (base64_encode_alloc, get_4, decode_4, base64_decode_ctx)
23849         (base64_decode_alloc_ctx):
23850         * lib/base64.h (struct base64_decode_context):
23851         * tests/test-base32.c (main):
23852         * tests/test-base64.c (main):
23853         Prefer signed to unsigned integers.
23854         * lib/base32.c (base32_encode_alloc):
23855         * lib/base64.c (base64_encode_alloc):
23856         Use simpler and more-direct check for overflow, removing a TODO.
23857         * lib/base32.h, lib/base64.h: Include idx.h instead of stddef.h.
23858         * modules/base32, modules/base64 (Depends-on): Add ialloc, verify.
23860 2021-08-26  Paul Eggert  <eggert@cs.ucla.edu>
23862         regex: use __attr_access and C99-style array arg
23863         This should help with some static checking.
23864         Derived from a suggestion by Martin Sebor in:
23865         https://sourceware.org/pipermail/libc-alpha/2021-August/130336.html
23866         * config/srclist.txt: Remove lib/regex.c for now.
23867         * lib/regex.c: Ignore -Wvla for the whole file.
23868         * lib/regex.h (_REGEX_NELTS, _Attr_access_): New macros.
23869         Ignore -Wvla when declaring regexec.
23870         (re_compile_pattern, re_search, re_search2, re_match, re_match_2)
23871         (regerror): Mark with _Attr_access_, as glibc does.
23872         * lib/regex.h (regexec):
23873         * lib/regexec.c (regexec, __compat_regexec):
23874         Use _REGEX_NELTS for each array parameter whose size is another arg
23875         but with an access pattern that cannot be captured with __attr_access.
23877 2021-08-25  Bruno Haible  <bruno@clisp.org>
23879         execute tests: Fix test failure when libtool is in use.
23880         * modules/execute-tests (Makefile.am): Link test-execute-child without
23881         using libtool.
23882         * modules/spawn-pipe-tests (Makefile.am): Link test-spawn-pipe-child
23883         without using libtool.
23884         * modules/system-quote-tests (Makefile.am): Link test-system-quote-child
23885         without using libtool.
23887 2021-08-24  Paul Eggert  <eggert@cs.ucla.edu>
23889         dfa: prefer idx_t to ptrdiff_t for nonnegative
23890         * lib/dfa.c (struct dfa, dfaexec_main, dfaexec_mb, dfaexec_sb)
23891         (dfaexec_noop, dfaexec):
23892         * lib/dfa.h (dfaparse, dfacomp, dfaexec):
23893         Prefer idx_t to ptrdiff_t for counts, which should be nonnegative.
23894         * lib/dfa.h: Include idx.h.
23896 2021-08-22  Bruno Haible  <bruno@clisp.org>
23898         snippet/unused-parameter: Mark unused module obsolete.
23899         * modules/snippet/unused-parameter (Status, Notice): Mark as obsolete.
23901 2021-08-22  Bruno Haible  <bruno@clisp.org>
23903         Make generated .in.h files as standalone as possible.
23904         Reported by Jan Engelhardt <jengelh@inai.de>.
23905         * lib/stdlib.in.h (_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_DEALLOC_FREE,
23906         _GL_ATTRIBUTE_MALLOC): Add fallback definitions.
23907         * lib/dirent.in.h (_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC): Add
23908         fallback definitions.
23909         * lib/stdio.in.h (_GL_ATTRIBUTE_DEALLOC): Add fallback definition.
23910         * lib/math.in.h (_GL_ATTRIBUTE_CONST): Add fallback definition.
23911         * lib/pthread.in.h (_GL_ATTRIBUTE_PURE): Add fallback definition.
23912         * lib/threads.in.h (_GL_ATTRIBUTE_PURE): Likewise.
23913         * lib/uchar.in.h (_GL_ATTRIBUTE_PURE): Likewise.
23914         * lib/string.in.h (_GL_ATTRIBUTE_PURE): Move definition, for consistency
23915         with the other *.in.h files.
23916         * lib/se-context.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Add fallback
23917         definition.
23918         * lib/se-label.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Likewise.
23919         * lib/se-selinux.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Likewise.
23920         * lib/textstyle.in.h: Use _GL_ATTRIBUTE_MAYBE_UNUSED instead of
23921         _GL_UNUSED.
23922         (_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, _GL_ATTRIBUTE_MAYBE_UNUSED): Add
23923         fallback definitions.
23925 2021-08-22  Bruno Haible  <bruno@clisp.org>
23927         gnulib-common.m4: Clarify logic behind _GL_UNUSED_LABEL.
23928         Reported by Paul Eggert.
23929         * m4/gnulib-common.m4 (gl_COMMON_BODY): Add comment and write the
23930         condition in a way that is close to the comment.
23932 2021-08-22  Paul Eggert  <eggert@cs.ucla.edu>
23934         c-stack: depend on inttypes, mempcpy
23935         * modules/c-stack (Depends-on): Add inttypes, mempcpy.
23936         mempcpy problem reported by Evan Miller in:
23937         https://debbugs.gnu.org/50098#31
23939 2021-08-22  Bruno Haible  <bruno@clisp.org>
23941         mountlist: Use recommended syntax for _GL_UNUSED_LABEL.
23942         * lib/mountlist.c (read_file_system_list): Add semicolon after
23943         _GL_UNUSED_LABEL.
23945 2021-08-22  Bruno Haible  <bruno@clisp.org>
23947         gnulib-common.m4: Make _GL_UNUSED_LABEL effective for clang.
23948         * m4/gnulib-common.m4 (gl_COMMON_BODY): Make _GL_UNUSED_LABEL use
23949         _GL_ATTRIBUTE_UNUSED also for clang.
23951 2021-08-22  Bruno Haible  <bruno@clisp.org>
23953         gnulib-common.m4: Use C2x [[maybe_unused]] when possible.
23954         * m4/gnulib-common.m4 (gl_COMMON_BODY): Define _GL_UNUSED as an alias of
23955         _GL_ATTRIBUTE_MAYBE_UNUSED, not of _GL_ATTRIBUTE_UNUSED.
23956         * lib/binary-io.h (__gl_setmode): Put _GL_UNUSED before, not after, the
23957         declaration.
23958         * lib/c-stack.c (null_action, segv_handler, overflow_handler,
23959         c_stack_action): Likewise.
23960         * lib/chown.c (chown): Likewise.
23961         * lib/clean-temp-simple.c (cleanup_action): Likewise.
23962         * lib/fts.c (dirent_inode_sort_may_be_useful, leaf_optimization,
23963         fts_set): Likewise.
23964         * lib/getgroups.c (getgroups): Likewise.
23965         * lib/getopt.c (_getopt_initialize): Likewise.
23966         * lib/getugroups.c (getugroups): Likewise.
23967         * lib/localename.c (gl_locale_name_thread_unsafe, gl_locale_name_thread,
23968         gl_locale_name_posix, gl_locale_name_environ): Likewise.
23969         * lib/mkdir.c (rpl_mkdir): Likewise.
23970         * lib/mkfifo.c (mkfifo): Likewise.
23971         * lib/mkfifoat.c (mkfifoat): Likewise.
23972         * lib/mknod.c (mknod): Likewise.
23973         * lib/mknodat.c (mknodat): Likewise.
23974         * lib/mountlist.c (me_remote): Likewise.
23975         * lib/openpty.c (openpty): Likewise.
23976         * lib/parse-datetime.y (yyerror): Likewise.
23977         * lib/passfd.c (sendfd, recvfd): Likewise.
23978         * lib/pthread-cond.c (pthread_condattr_destroy, pthread_cond_init,
23979         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
23980         pthread_cond_broadcast, pthread_cond_destroy): Likewise.
23981         * lib/pthread-mutex.c (pthread_mutexattr_destroy, pthread_mutex_init,
23982         pthread_mutex_lock, pthread_mutex_trylock, pthread_mutex_timedlock,
23983         pthread_mutex_unlock, pthread_mutex_destroy): Likewise.
23984         * lib/pthread-rwlock.c (pthread_rwlockattr_destroy, pthread_rwlock_init,
23985         pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock): Likewise.
23986         * lib/pthread-spin.c (pthread_spin_init, pthread_spin_lock,
23987         pthread_spin_trylock, pthread_spin_unlock, pthread_spin_destroy):
23988         Likewise.
23989         * lib/pthread-thread.c (pthread_attr_destroy): Likewise.
23990         * lib/readlink.c (readlink): Likewise.
23991         * lib/rename.c (rpl_rename): Likewise.
23992         * lib/set-permissions.c (set_permissions): Likewise.
23993         * lib/sockets.c (gl_sockets_startup): Likewise.
23994         * lib/stat-time.h (get_stat_birthtime_ns, get_stat_birthtime,
23995         stat_time_normalize): Likewise.
23996         * lib/strptime.c (__strptime_internal): Likewise.
23997         * lib/strtod.c (LDEXP): Likewise.
23998         * lib/symlink.c (symlink): Likewise.
23999         * lib/symlinkat.c (symlinkat): Likewise.
24000         * lib/tempname.c (try_dir, try_nocreate): Likewise.
24001         * lib/textstyle.in.h (styled_ostream_begin_use_class,
24002         styled_ostream_end_use_class, styled_ostream_get_hyperlink_ref,
24003         styled_ostream_get_hyperlink_id, styled_ostream_set_hyperlink,
24004         styled_ostream_flush_to_current_style, fd_ostream_create,
24005         term_ostream_get_color, term_ostream_set_color,
24006         term_ostream_get_bgcolor, term_ostream_set_bgcolor,
24007         term_ostream_get_weight, term_ostream_set_weight,
24008         term_ostream_get_posture, term_ostream_set_posture,
24009         term_ostream_get_underline, term_ostream_set_underline,
24010         term_ostream_get_hyperlink_ref, term_ostream_get_hyperlink_id,
24011         term_ostream_set_hyperlink, term_ostream_create,
24012         term_styled_ostream_create, html_styled_ostream_create,
24013         handle_color_option, handle_style_option, style_file_prepare,
24014         styled_ostream_create, libtextstyle_set_failure_exit_code): Likewise.
24015         * lib/unicodeio.c (exit_failure_callback, fallback_failure_callback):
24016         Likewise.
24017         * lib/wait-process.c (cleanup_slaves_action): Likewise.
24018         * tests/signature.h (SIGNATURE_CHECK2): Likewise.
24019         * tests/test-areadlink.c (do_areadlink): Likewise.
24020         * tests/test-areadlinkat.c (do_areadlinkat): Likewise.
24021         * tests/test-ceilf-ieee.c (main): Likewise.
24022         * tests/test-ceilf1.c (main): Likewise.
24023         * tests/test-dirent.c (dir): Likewise.
24024         * tests/test-fchownat.c (main): Likewise.
24025         * tests/test-fdopendir.c (main): Likewise.
24026         * tests/test-filenamecat.c (main): Likewise.
24027         * tests/test-floor1.c (main): Likewise.
24028         * tests/test-floorf-ieee.c (main): Likewise.
24029         * tests/test-floorf1.c (main): Likewise.
24030         * tests/test-fseeko.c (main): Likewise.
24031         * tests/test-fstatat.c (main): Likewise.
24032         * tests/test-ftello.c (main): Likewise.
24033         * tests/test-getdomainname.c (main): Likewise.
24034         * tests/test-getgroups.c (main): Likewise.
24035         * tests/test-gethostname.c (main): Likewise.
24036         * tests/test-math-c++.cc (OVERLOADED_CHECK): Likewise.
24037         * tests/test-mkdirat.c (main): Likewise.
24038         * tests/test-openat.c (main): Likewise.
24039         * tests/test-parse-datetime.c (main): Likewise.
24040         * tests/test-quotearg-simple.c (main): Likewise.
24041         * tests/test-quotearg.c (main): Likewise.
24042         * tests/test-sethostname2.c (main): Likewise.
24043         * tests/test-unlinkat.c (main): Likewise.
24044         * tests/test-version-etc.c (main): Likewise.
24045         * tests/test-xalloc-die.c (main): Likewise.
24046         * tests/test-xfprintf-posix.c (main): Likewise.
24047         * tests/test-xprintf-posix.c (main): Likewise.
24048         * tests/test-xvasprintf.c (main): Likewise.
24050 2021-08-22  Bruno Haible  <bruno@clisp.org>
24052         gnulib-common.m4: Document the gnulib-internal _GL_ATTRIBUTE_* macros.
24053         * m4/gnulib-common.m4 (gl_COMMON_BODY): Add comments to the
24054         _GL_ATTRIBUTE_* macros, based on lib/attribute.h.
24056 2021-08-22  Bernhard Voelker  <mail@bernhard-voelker.de>
24058         doc: fix order of stdlib functions
24059         * doc/gnulib.texi (node Glibc stdlib.h): Move mrand48_r after mkstemps.
24060         Reported by Benno Schulenberg.
24062 2021-08-21  Bruno Haible  <bruno@clisp.org>
24064         c-stack: Test for libsigsegv once, not twice.
24065         * m4/sigsegv.m4: New file, based on modules/sigsegv.
24066         * modules/sigsegv (Files): Add it.
24067         (configure.ac): Require gl_SIGSEGV. Test gl_sigsegv_uses_libsigsegv
24068         instead of with_libsigsegv and gl_cv_lib_sigsegv.
24069         * m4/c-stack.m4 (gl_C_STACK): Likewise.
24071 2021-08-21  Bruno Haible  <bruno@clisp.org>
24073         rawmemchr: Fix use in relocatable-prog-wrapper (regression 2021-08-20).
24074         * lib/rawmemchr.c: Restore test of HAVE_RAWMEMCHR.
24075         * modules/relocatable-prog-wrapper (Depends-on): Add stdalign.
24077 2021-08-20  Paul Eggert  <eggert@cs.ucla.edu>
24079         rawmemchr: modernize and simplify
24080         * lib/rawmemchr.c (HAVE_RAWMEMCHR): Assume it’s not defined;
24081         otherwise this file would not be compiled.  Include limits.h,
24082         stdalign.h, stdint.h, verify.h.
24083         (rawmemchr): Prefer uintptr_t to unsigned long and to size_t when
24084         it’s the better type.  Verify that longword lacks padding.  Use
24085         alignof rather than sizeof when checking alignment.  Simplify by
24086         assuming C99 decl-after-statement, and by using multiplication
24087         rather than repeated shifting and OR (modern compilers can
24088         optimize the multiplication if needed).  Avoid unnecessary casts.
24089         Don’t assume CHAR_WIDTH is 8.  Convert back and forth between void *
24090         to suppress bogus GCC warnings about alignment.  Omit a
24091         duplicate assignment to char_ptr.
24092         * modules/rawmemchr (Depends-on): Add stdalign, stdint, verify.
24094 2021-08-17  Paul Eggert  <eggert@cs.ucla.edu>
24096         c-stack: fix libsigsegv dependency (regression 2021-05-18)
24097         Problem reported for GNU grep by Evan Miller (Bug#50098).
24098         * m4/c-stack.m4 (gl_C_STACK): Call gl_LIBSIGSEGV before
24099         testing gl_cv_lib_sigsegv.
24101 2021-08-14  Bruno Haible  <bruno@clisp.org>
24103         doc: Update for glibc 2.34.
24104         * doc/posix-functions/timespec_getres.texi: New file.
24105         * doc/glibc-functions/_Fork.texi: New file.
24106         * doc/glibc-functions/closefrom.texi: New file.
24107         * doc/glibc-functions/dn_comp.texi: New file.
24108         * doc/glibc-functions/dn_skipname.texi: New file.
24109         * doc/glibc-functions/execveat.texi: New file.
24110         * doc/glibc-functions/posix_spawn_file_actions_addclosefrom_np.texi: New
24111         file.
24112         * doc/glibc-functions/res_dnok.texi: New file.
24113         * doc/glibc-functions/res_hnok.texi: New file.
24114         * doc/glibc-functions/res_mailok.texi: New file.
24115         * doc/glibc-functions/res_nmkquery.texi: New file.
24116         * doc/glibc-functions/res_nquery.texi: New file.
24117         * doc/glibc-functions/res_nquerydomain.texi: New file.
24118         * doc/glibc-functions/res_nsearch.texi: New file.
24119         * doc/glibc-functions/res_nsend.texi: New file.
24120         * doc/glibc-functions/res_ownok.texi: New file.
24121         * doc/glibc-functions/res_send.texi: New file.
24122         * doc/gnulib.texi: Include them.
24123         * doc/glibc-functions/inet_neta.texi: Remove file.
24124         * doc/glibc-functions/malloc_get_state.texi: Remove file.
24125         * doc/glibc-functions/malloc_set_state.texi: Remove file.
24126         * doc/glibc-functions/pthread_mutex_consistent_np.texi: Remove file.
24127         * doc/glibc-functions/pthread_mutexattr_getrobust_np.texi: Remove file.
24128         * doc/glibc-functions/pthread_mutexattr_setrobust_np.texi: Remove file.
24129         * doc/glibc-functions/pthread_yield.texi: Remove file.
24130         * doc/gnulib.texi: Don't include them.
24131         * doc/glibc-headers/resolv.texi: Update.
24132         * doc/pastposix-functions/h_errno.texi: Likewise.
24133         * doc/posix-functions/*.texi: Likewise.
24134         * doc/glibc-functions/*.texi: Likewise.
24136 2021-08-12  Paul Eggert  <eggert@cs.ucla.edu>
24138         memrchr-tests: port to GCC 12
24139         * tests/test-memrchr.c: Bug#101494 is fixed in GCC 12.
24141 2021-08-12  Akim Demaille  <akim@lrde.epita.fr>
24143         snippet/_Noreturn: Fix typo
24144         * lib/_Noreturn.h: Fix spelling of 4.
24146 2021-08-11  Paul Eggert  <eggert@cs.ucla.edu>
24148         dynarray: merge from glibc
24149         This also helps document glibc’s direction in using GCC’s
24150         memory-allocation checking.
24151         * lib/cdefs.h: Omit comments that glibc rejected.
24152         (__returns_nonnull, __attr_access_none, __attr_dealloc)
24153         (__attr_dealloc_free): New macros.
24154         * lib/libc-config.h: Undef the new macros that are defined
24155         unconditionally.
24156         * lib/malloc/dynarray_at_failure.c [_LIBC]: Do not include stdlib.h.
24157         (__libc_dynarray_at_failure) [_LIBC]: Call __libc_fatal,
24158         fixing a bad merge previously.
24160 2021-08-08  Bruno Haible  <bruno@clisp.org>
24162         canonicalize-lgpl: Fix conflict with z/OS <sys/stat.h>.
24163         Reported by Mike Fulton <mikefultonpersonal@gmail.com> in
24164         <https://lists.gnu.org/archive/html/m4-discuss/2021-08/msg00000.html>
24165         via Eric Blake.
24166         * lib/canonicalize-lgpl.c (__stat): Remove macro.
24167         (file_accessible): Use 'stat' instead.
24169 2021-08-08  Bruno Haible  <bruno@clisp.org>
24171         ptsname_r: Drop sync with glibc.
24172         * lib/ptsname_r.c: Drop _LIBC code.
24173         (__set_errno, __isatty, __stat, __ttyname_r, __ptsname_r): Remove
24174         macros.
24175         (ptsname_r): Rename local variable 'save_errno'.
24177 2021-08-08  Bruno Haible  <bruno@clisp.org>
24179         config: Update after glibc changed.
24180         * config/srclist.txt: Remove two files that glibc dropped on 2013-12-17.
24182 2021-08-08  Bruno Haible  <bruno@clisp.org>
24184         relocatable-lib-lgpl: Fix a memory leak related to a Windows DLL.
24185         Reported by Jonathan Boeing <jonathan@claws-mail.org> in
24186         <https://lists.gnu.org/archive/html/bug-gnulib/2021-08/msg00048.html>.
24187         * lib/relocatable.c (DllMain): Avoid memory leak in a special case
24188         of repeated attach/detach.
24190 2021-08-08  Bruno Haible  <bruno@clisp.org>
24192         fopen: Fix link error on native Windows.
24193         * modules/fopen (Depends-on): Add close.
24195 2021-08-08  Bruno Haible  <bruno@clisp.org>
24197         fopen: Fix compilation error on AIX (regression from 2020-05-28).
24198         * modules/fopen (Depends-on): Add fcntl-h.
24200 2021-08-08  Bruno Haible  <bruno@clisp.org>
24202         stdio: Improve GCC 11 allocation-deallocation checking.
24203         * lib/stdio.in.h (fdopen, fopen, tmpfile): For GCC >= 11: Declare nearly
24204         always.
24205         (popen): For GCC >= 11: Declare also when the platform already declares
24206         the function or when the module 'popen' is not in use.
24208 2021-08-08  Bruno Haible  <bruno@clisp.org>
24210         dirent: Improve GCC 11 allocation-deallocation checking.
24211         * lib/dirent.in.h (opendir): For GCC >= 11: Declare also when the
24212         platform already declares the function or when the module 'opendir' is
24213         not in use.
24214         (fdopendir): For GCC >= 11: Declare also when the platform already
24215         declares the function or when the module 'fdopendir' is not in use.
24217 2021-08-08  Bruno Haible  <bruno@clisp.org>
24219         stdlib, string, wchar: Improve GCC 11 allocation-deallocation checking.
24220         * lib/stdlib.in.h (aligned_alloc): For GCC >= 11: Declare also when the
24221         platform already declares the function or when the module
24222         'aligned_alloc' is not in use.
24223         (calloc): For GCC >= 11: Declare nearly always.
24224         (canonicalize_file_name): For GCC >= 11: Declare also when the platform
24225         already declares the function or when the module 'canonicalize-lgpl' is
24226         not in use.
24227         (malloc, realloc): For GCC >= 11: Declare nearly always.
24228         * lib/malloc.in.h: Remove redundant include.
24229         (memalign): For GCC >= 11: Declare also when the platform already
24230         declares the function or when the module 'memalign' is not in use.
24231         * lib/string.in.h: Include <stdlib.h> always.
24232         (strdup): For GCC >= 11: Declare also when the platform already declares
24233         the function or when the module 'strdup' or 'strdup-posix' is not in
24234         use.
24235         * lib/wchar.in.h: Include <stdlib.h> always.
24236         (wcsdup): For GCC >= 11: Declare also when the platform already declares
24237         the function or when the module 'wcsdup' is not in use.
24238         * modules/free-posix (Depends-on): Add string, wchar.
24240 2021-08-07  Bruno Haible  <bruno@clisp.org>
24242         gnulib-tool: Add support for Automake 1.16.4.
24243         Reported by <shoober420@gmail.com> in
24244         <https://lists.gnu.org/archive/html/bug-libunistring/2021-08/msg00000.html>.
24245         * build-aux/test-driver-1.16.3.diff: Renamed from
24246         build-aux/test-driver.diff.
24247         * build-aux/test-driver.diff: Update to match Automake 1.16.4.
24248         * gnulib-tool (func_create_testdir, func_create_megatestdir): Try both
24249         .diff files.
24251 2021-08-07  Bruno Haible  <bruno@clisp.org>
24253         gnulib-common.m4: Minor style fix.
24254         * m4/gnulib-common.m4 (gl_COMMON_BODY): Keep list of attributes sorted
24255         alphabetically.
24257 2021-08-07  Bruno Haible  <bruno@clisp.org>
24259         uninorm, unistr: Improve GCC 11 allocation-deallocation checking.
24260         * lib/uninorm.in.h (uninorm_filter_free): Move declaration up.
24261         (uninorm_filter_create): Declare that deallocation must happen through
24262         'uninorm_filter_free'.
24263         * lib/unistr.in.h: Include <stdlib.h>.
24264         (u8_strdup, u16_strdup, u32_strdup): Declare that deallocation must
24265         happen through 'free'.
24267 2021-08-07  Bruno Haible  <bruno@clisp.org>
24269         ialloc: Prepare for allocation-deallocation checking.
24270         * lib/ialloc.h (imalloc, irealloc, icalloc): Add comment that
24271         deallocation must happen through 'free'.
24273 2021-08-07  Bruno Haible  <bruno@clisp.org>
24275         aligned-malloc: Prepare for allocation-deallocation checking.
24276         * lib/aligned-malloc.h (aligned_free): Move declaration up.
24277         (aligned_malloc): Add comment that deallocation must happen through
24278         'aligned_free'.
24280 2021-08-07  Bruno Haible  <bruno@clisp.org>
24282         list, set, oset, map, omap: Prepare allocation-deallocation checking.
24283         * lib/gl_list.h (gl_list_create_empty, gl_list_nx_create_empty,
24284         gl_list_create, gl_list_nx_create): Add comment that deallocation must
24285         happen through 'gl_list_free'.
24286         * lib/gl_xlist.h (gl_list_create_empty, gl_list_create): Likewise.
24287         * lib/gl_sublist.h (gl_sublist_create, gl_sublist_nx_create): Likewise.
24288         * lib/gl_xsublist.h (gl_sublist_create): Likewise.
24289         * lib/gl_set.h (gl_set_create_empty, gl_set_nx_create_empty): Add
24290         comment that deallocation must happen through 'gl_set_free'.
24291         * lib/gl_xset.h (gl_set_create_empty): Likewise.
24292         * lib/gl_oset.h (gl_oset_create_empty, gl_oset_nx_create_empty): Add
24293         comment that deallocation must happen through 'gl_oset_free'.
24294         * lib/gl_xoset.h (gl_oset_create_empty): Likewise.
24295         * lib/gl_map.h (gl_map_create_empty, gl_map_nx_create_empty): Add
24296         comment that deallocation must happen through 'gl_map_free'.
24297         * lib/gl_xmap.h (gl_map_create_empty): Likewise.
24298         * lib/gl_omap.h (gl_omap_create_empty, gl_omap_nx_create_empty): Add
24299         comment that deallocation must happen through 'gl_omap_free'.
24300         * lib/gl_xomap.h (gl_omap_create_empty): Likewise.
24302 2021-08-07  Bruno Haible  <bruno@clisp.org>
24304         xgetdomainname: Improve GCC 11 allocation-deallocation checking.
24305         * lib/xgetdomainname.h: Include <stdlib.h>.
24306         (xgetdomainname): Declare that deallocation must happen through 'free'.
24308 2021-08-07  Bruno Haible  <bruno@clisp.org>
24310         xgetdomainname: Ensure .c file starts with '#include <config.h>'.
24311         * lib/xgetaname-impl.h: New file, based on lib/xgethostname.c.
24312         * lib/xgethostname.c: Move implementation to lib/xgetaname-impl.h.
24313         * lib/xgetdomainname.c: Include <config.h>. Include xgetaname-impl.h
24314         instead of xgethostname.c.
24315         * modules/xgethostname (Files): Add lib/xgetaname-impl.h.
24316         * modules/xgetdomainname (Files): Likewise.
24317         (Depends-on): Remove xgethostname. Add free-posix, xalloc.
24319 2021-08-07  Bruno Haible  <bruno@clisp.org>
24321         xstrndup: Improve GCC 11 allocation-deallocation checking.
24322         * lib/xstrndup.h: Include <stdlib.h> instead of <stddef.h>.
24323         (xstrndup): Declare that deallocation must happen through 'free'.
24325 2021-08-07  Bruno Haible  <bruno@clisp.org>
24327         xstriconveh: Improve GCC 11 allocation-deallocation checking.
24328         * lib/xstriconveh.h: Include <stdlib.h> instead of <stddef.h>.
24329         (xstr_cd_iconveh, xstr_iconveh): Declare that deallocation must happen
24330         through 'free'.
24332 2021-08-07  Bruno Haible  <bruno@clisp.org>
24334         xmemdup0: Improve GCC 11 allocation-deallocation checking.
24335         * lib/xmemdup0.h: Include <stdlib.h> instead of <stddef.h>.
24336         (xmemdup0): Declare that deallocation must happen through 'free'.
24338 2021-08-07  Bruno Haible  <bruno@clisp.org>
24340         windows-spawn: Improve GCC 11 allocation-deallocation checking.
24341         * lib/windows-spawn.h: Include <stdlib.h>.
24342         (compose_command, compose_envblock): Declare that deallocation must
24343         happen through 'free'.
24345 2021-08-07  Bruno Haible  <bruno@clisp.org>
24347         string-buffer: Improve GCC 11 allocation-deallocation checking.
24348         * lib/string-buffer.h: Include <stdlib.h> instead of <stddef.h>.
24349         (sb_dupfree): Declare that deallocation must happen through 'free'.
24351 2021-08-07  Bruno Haible  <bruno@clisp.org>
24353         striconveha: Improve GCC 11 allocation-deallocation checking.
24354         * lib/striconveha.h: Include <stdlib.h> instead of <stddef.h>.
24355         (str_iconveha): Declare that deallocation must happen through 'free'.
24357 2021-08-07  Bruno Haible  <bruno@clisp.org>
24359         striconveh: Improve GCC 11 allocation-deallocation checking.
24360         * lib/striconveh.h: Include <stdlib.h> instead of <stddef.h>.
24361         (str_cd_iconveh, str_iconveh): Declare that deallocation must happen
24362         through 'free'.
24364 2021-08-07  Bruno Haible  <bruno@clisp.org>
24366         striconv: Improve GCC 11 allocation-deallocation checking.
24367         * lib/striconv.h: Include <stdlib.h> instead of <stddef.h>.
24368         (str_cd_iconv, str_iconv): Declare that deallocation must happen through
24369         'free'.
24371 2021-08-07  Bruno Haible  <bruno@clisp.org>
24373         relocatable-lib-lgpl: Improve GCC 11 allocation-deallocation checking.
24374         * lib/relocatable.h: Include <stdlib.h>.
24375         (compute_curr_prefix): Declare that deallocation must happen through
24376         'free'.
24378 2021-08-07  Bruno Haible  <bruno@clisp.org>
24380         regex-quote: Improve GCC 11 allocation-deallocation checking.
24381         * lib/regex-quote.h: Include <stdlib.h> instead of <stddef.h>.
24382         (regex_quote): Declare that deallocation must happen through 'free'.
24384 2021-08-07  Bruno Haible  <bruno@clisp.org>
24386         readline: Improve GCC 11 allocation-deallocation checking.
24387         * lib/readline.h: Include <stdlib.h>.
24388         (readline): Declare that deallocation must happen through 'free'.
24390 2021-08-07  Bruno Haible  <bruno@clisp.org>
24392         read-file: Improve GCC 11 allocation-deallocation checking.
24393         * lib/read-file.h: Include <stdlib.h> instead of <stddef.h>.
24394         (fread_file, read_file): Declare that deallocation must happen through
24395         'free'.
24397 2021-08-07  Bruno Haible  <bruno@clisp.org>
24399         pipe-filter-gi: Improve GCC 11 allocation-deallocation checking.
24400         * lib/pipe-filter.h (pipe_filter_gi_close): Move declaration up.
24401         (pipe_filter_gi_create): Declare that deallocation must happen through
24402         'pipe_filter_gi_close'.
24404 2021-08-07  Bruno Haible  <bruno@clisp.org>
24406         javaversion: Improve GCC 11 allocation-deallocation checking.
24407         * lib/javaversion.h: Include <stdlib.h>.
24408         (javaexec_version): Declare that deallocation must happen through
24409         'free'.
24411 2021-08-07  Bruno Haible  <bruno@clisp.org>
24413         ino-map: Improve GCC 11 allocation-deallocation checking.
24414         * lib/ino-map.h (ino_map_free): Move declaration up.
24415         (ino_map_alloc): Declare that deallocation must happen through
24416         'ino_map_free'.
24418 2021-08-07  Bruno Haible  <bruno@clisp.org>
24420         hash: Improve GCC 11 allocation-deallocation checking.
24421         * lib/hash.h (hash_free): Move declaration up.
24422         (hash_initialize, hash_xinitialize): Declare that deallocation must
24423         happen through 'hash_free'.
24425 2021-08-07  Bruno Haible  <bruno@clisp.org>
24427         hamt: Improve GCC 11 allocation-deallocation checking.
24428         * lib/hamt.h (hamt_free): Move declaration up.
24429         (hamt_create, hamt_copy): Declare that deallocation must happen through
24430         'hamt_free'.
24432 2021-08-07  Bruno Haible  <bruno@clisp.org>
24434         get_progname_of: Improve GCC 11 allocation-deallocation checking.
24435         * lib/get_progname_of.h: Include <stdlib.h>.
24436         (get_progname_of): Declare that deallocation must happen through 'free'.
24438 2021-08-07  Bruno Haible  <bruno@clisp.org>
24440         fts: Improve GCC 11 allocation-deallocation checking.
24441         * lib/fts_.h (fts_open): Declare that deallocation must happen through
24442         'fts_close'.
24444 2021-08-07  Bruno Haible  <bruno@clisp.org>
24446         eealloc: Improve GCC 11 allocation-deallocation checking.
24447         * lib/eealloc.h (eemalloc): Declare that deallocation must happen
24448         through 'free'.
24450 2021-08-07  Bruno Haible  <bruno@clisp.org>
24452         di-set: Improve GCC 11 allocation-deallocation checking.
24453         * lib/di-set.h (di_set_free): Move declaration up.
24454         (di_set_alloc): Declare that deallocation must happen through
24455         'di_set_free'.
24457 2021-08-07  Bruno Haible  <bruno@clisp.org>
24459         [x]concat-filename: Improve GCC 11 allocation-deallocation checking.
24460         * lib/concat-filename.h: Include <stdlib.h>.
24461         (concatenated_filename, xconcatenated_filename): Declare that
24462         deallocation must happen through 'free'.
24464 2021-08-07  Bruno Haible  <bruno@clisp.org>
24466         clean-temp: Improve GCC 11 allocation-deallocation checking.
24467         * lib/clean-temp.h (cleanup_temp_dir): Move declaration up.
24468         (create_temp_dir): Declare that deallocation must happen through
24469         'cleanup_temp_dir'.
24471 2021-08-07  Bruno Haible  <bruno@clisp.org>
24473         canon-host: Improve GCC 11 allocation-deallocation checking.
24474         * lib/canon-host.h: Include <stdlib.h>.
24475         (canon_host, canon_host_r): Declare that deallocation must happen
24476         through 'free'.
24478 2021-08-07  Bruno Haible  <bruno@clisp.org>
24480         c-xvasprintf: Improve GCC 11 allocation-deallocation checking.
24481         * lib/c-xvasprintf.h: Include <stdlib.h>.
24482         (c_xasprintf, c_xvasprintf): Declare that deallocation must happen
24483         through 'free'.
24485 2021-08-07  Bruno Haible  <bruno@clisp.org>
24487         bitsetv: Improve GCC 11 allocation-deallocation checking.
24488         * lib/bitsetv.h (bitsetv_free): Move declaration up.
24489         (bitsetv_alloc, bitsetv_create): Declare that deallocation must happen
24490         through 'bitsetv_free'.
24492         bitset: Improve GCC 11 allocation-deallocation checking.
24493         * lib/bitset.h (bitset_free): Move declaration up.
24494         (bitset_alloc, bitset_create): Declare that deallocation must happen
24495         through 'bitset_free'.
24496         (bitset_obstack_free): Move declaration up.
24497         (bitset_obstack_alloc): Declare that deallocation must happen through
24498         'bitset_obstack_free'.
24500 2021-08-07  Bruno Haible  <bruno@clisp.org>
24502         argv-iter: Improve GCC 11 allocation-deallocation checking.
24503         * lib/argv-iter.h (argv_iter_free): Move declaration up.
24504         (argv_iter_init_argv, argv_iter_init_stream): Declare that deallocation
24505         must happen through 'argv_iter_free'.
24507 2021-08-07  Bruno Haible  <bruno@clisp.org>
24509         argp: Improve GCC 11 allocation-deallocation checking.
24510         * lib/argp-fmtstream.h (__argp_fmtstream_free, argp_fmtstream_free):
24511         Move declarations up.
24512         (__argp_make_fmtstream): Declare that deallocation must happen through
24513         '__argp_fmtstream_free'.
24514         (argp_make_fmtstream): Declare that deallocation must happen through
24515         'argp_fmtstream_free'.
24517 2021-08-07  Bruno Haible  <bruno@clisp.org>
24519         areadlink, areadlinkat: Improve GCC 11 allocation-deallocation checking.
24520         * lib/areadlink.h: Include <stdlib.h> instead of <stddef.h>.
24521         (areadlink, areadlink_with_size, areadlinkat, areadlinkat_with_size):
24522         Declare that deallocation must happen through 'free'.
24524 2021-08-07  Bruno Haible  <bruno@clisp.org>
24526         stdio: Improve GCC 11 allocation-deallocation checking.
24527         * lib/stdio.in.h (fdopen, fopen, tmpfile): Declare that deallocation
24528         must happen through 'fclose'.
24529         (popen): Declare that deallocation must happen through 'pclose'.
24530         * lib/stdio-safer.h (fopen_safer, tmpfile_safer): Declare that
24531         deallocation must happen through 'fclose'.
24532         (popen_safer): Declare that deallocation must happen through 'pclose'.
24533         (freopen_safer): Declare that arguments must be non-NULL.
24535 2021-08-07  Bruno Haible  <bruno@clisp.org>
24537         dirent: Improve GCC 11 allocation-deallocation checking.
24538         * lib/dirent.in.h (closedir): Move declaration up.
24539         (opendir, fdopendir): Declare that deallocation must happen through
24540         'closedir'.
24541         * lib/dirent-safer.h (opendir_safer): Likewise.
24542         * lib/opendirat.h (opendirat): Likewise.
24544 2021-08-07  Bruno Haible  <bruno@clisp.org>
24546         stdlib, string, wchar: Improve GCC 11 allocation-deallocation checking.
24547         * lib/stdlib.in.h (free): Move declaration up.
24548         (aligned_alloc, calloc, canonicalize_file_name, malloc, realloc):
24549         Declare that deallocation must happen through 'free' (which may actually
24550         be 'rpl_free').
24551         * lib/string.in.h: Include <stdlib.h>.
24552         (strdup): Declare deallocation.
24553         * lib/wchar.in.h: Include <stdlib.h>.
24554         (wcsdup): Declare deallocation.
24555         * lib/malloc.in.h: Include <stdlib.h>.
24556         (memalign): Declare deallocation.
24558 2021-08-07  Bruno Haible  <bruno@clisp.org>
24560         year2038: Fix recommendation regarding -m64 flag.
24561         * m4/year2038.m4 (gl_YEAR2038_BODY): Recommend to put option --m64 in
24562         CC, not in CPPFLAGS and LDFLAGS.
24564 2021-08-07  Bruno Haible  <bruno@clisp.org>
24566         quotearg: Tweak last commit.
24567         * lib/quotearg.h: Don't include <stddef.h>. Remove stray semicolon.
24569 2021-08-07  Bruno Haible  <bruno@clisp.org>
24571         malloca: Tweak last commit.
24572         * lib/malloca.h: Keep use and declaration of mmalloca close together.
24574 2021-08-07  Bruno Haible  <bruno@clisp.org>
24576         dirname-lgpl, sh-quote, system-quote, xstriconv: Clean up includes.
24577         * lib/dirname.h: Don't include <stddef.h>.
24578         * lib/sh-quote.h: Likewise.
24579         * lib/system-quote.h: Likewise.
24580         * lib/xstriconv.h: Likewise.
24582 2021-08-07  Bruno Haible  <bruno@clisp.org>
24584         dfa: Improve GCC 11 allocation-deallocation checking.
24585         * lib/dfa.h (dfamust): Declare that deallocation must happen through
24586         dfamustfree.
24588 2021-08-06  Paul Eggert  <eggert@cs.ucla.edu>
24590         glob: merge from glibc
24591         * lib/glob-libc.h, lib/glob.c: Merge changes from glibc 2.34.
24592         The result should be copyable directly into glibc.
24593         * modules/glob-h (glob-libc.gl.h): Also omit __THROWNL.
24595 2021-08-03  Simon Josefsson  <simon@josefsson.org>
24597         announce-gen: Print SHA1/B64(SHA256) instead of MD5/SHA1.
24598         * build-aux/announce-gen (%digest_classes): Removed.
24599         (usage): Doc fix.
24600         (print_checksums): Instead of MD5/SHA1, print SHA1 and
24601         B64(SHA256), inspired by OpenSSH announcements.
24603         maintainer-makefile: Print checksums by default.
24604         * top/maint.mk (announcement): Drop --no-print-checksums.
24606 2021-08-02  Paul Eggert  <eggert@cs.ucla.edu>
24608         manywarnings: enable some malloc warnings
24609         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Stop adding
24610         -Wno-analyzer-double-free, -Wno-analyzer-null-dereference, and
24611         -Wno-analyzer-use-after-free, as these false alarms don’t seem
24612         to be as much of an issue now that we’ve pacified a couple
24613         of individual modules and GCC has some bug fixes.
24615         dfa: omit unneeded malloc+free
24616         Problem indirectly found by Coverity.
24617         * lib/dfa.c (enlistnew): New function, with most of the body of
24618         the old ‘enlist’.  It assumes its arg NEW has been malloced and
24619         can be freed eventually.
24620         (enlist, addlists, dfamust): Use it.
24621         (dfamust): Omit an unnecessary malloc+free.
24623         year2038: port to unusual time_t platforms
24624         * m4/year2038.m4 (gl_YEAR2038_TEST_INCLUDES): Check that time_t
24625         can go to 2**32 - 1, not to 2**63 - 1, as the former is enough to
24626         be year 2038 safe.  Unsigned 32-bit time_t (AmigaOS) and signed
24627         40-bit time_t (Unisys ClearPath) have occurred in the wild, and
24628         even if Gnulib code is rarely or never ported to them there’s no
24629         need to exclude them merely because of year 2038 issues.
24630         (gl_YEAR2038_BODY): Adjust messages to match.  Use 2**32 - 1,
24631         not 2**32, as the test timestamp, to allow unsigned 32-bit time_t.
24633 2021-08-01  Paul Eggert  <eggert@cs.ucla.edu>
24635         xalloc: no attribute (malloc (free)) on inline
24636         The GCC manual says you can’t use __attribute__ ((__malloc__
24637         (free, 1))) on inline functions.  Problem discovered when
24638         compiling diffutils 3.8 on RHEL 8.4 using a GCC 11.2.0 that I
24639         built myself.  Perhaps the problem was not discovered earlier
24640         because the attribute works with ‘free’ (which is what I was
24641         seeing before on Fedora 34) but not with ‘rpl_free’ (seen on RHEL
24642         8.4).  Anyway, the GCC manual says it shouldn’t work at all, so
24643         don’t use it.
24644         * lib/xalloc.h (xnmalloc, xcharalloc): No longer inline.
24645         * lib/xmalloc.c (xcharalloc, xnmalloc): Move function bodies here.
24646         * m4/gnulib-common.m4 (_GL_ATTRIBUTE_DEALLOC)
24647         (_GL_ATTRIBUTE_DEALLOC_FREE): Document that these cannot be
24648         used on inline functions, as per the GCC 11.2.1 manual.
24650         sigsegv-tests: make more things static
24651         * tests/test-sigsegv-catch-segv1.c:
24652         * tests/test-sigsegv-catch-stackoverflow1.c:
24653         * tests/test-sigsegv-catch-stackoverflow2.c:
24654         Declare some functions and variables static, to pacify GCC when
24655         warning about external functions missing declarations.
24657         maint: improve -fanalyzer malloc checking
24658         * lib/backup-internal.h, lib/backupfile.h:
24659         * lib/canonicalize.h, lib/dfa.h, lib/dirname.h, lib/exclude.h:
24660         * lib/filenamecat.h, lib/malloca.h, lib/modechange.h:
24661         * lib/mountlist.h, lib/pagealign_alloc.h, lib/quotearg.h:
24662         * lib/readutmp.h, lib/savedir.h, lib/sh-quote.h, lib/system-quote.h:
24663         * lib/trim.h, lib/xgetcwd.h, lib/xgethostname.h, lib/xmalloca.h:
24664         * lib/xreadlink.h, lib/xstriconv.h, lib/xvasprintf.h:
24665         Add malloc-related attributes and include stdlib.h as needed.
24666         * lib/dfa.c: Include verify.h.
24667         (assume_nonnull): New macro.
24668         (dfamust): Use it to pacify GCC.
24669         * lib/malloca.c (mmalloca): Redo to pacify GCC, to cut down on the
24670         number of casts, and to avoid signed integer overflow on
24671         theoretical platforms.
24672         * lib/vasnprintf.c, tests/test-argmatch.c:
24673         Disable -Wanalyzer-null-argument here.
24674         * m4/manywarnings.m4: Update GCC bug report number in comment.
24676 2021-08-01  Jim Meyering  <meyering@fb.com>
24678         regex: pacify GCC 11.2.1's -fanalyzer
24679         * lib/regex_internal.c (re_node_set_merge):
24680         Add a debug assertion to pacify GCC 11.2.1's -fanalyzer.
24682 2021-08-01  Bruno Haible  <bruno@clisp.org>
24684         limits-h tests: Add tests for BOOL_MAX and BOOL_WIDTH.
24685         * tests/test-limits-h.c (bool_attrs): New variable.
24686         Check value of BOOL_MAX.
24688 2021-07-31  Paul Eggert  <eggert@cs.ucla.edu>
24690         regex: pacify GCC 11.2 -fanalyzer
24691         * lib/regex_internal.c (re_node_set_insert):
24692         Add a debug assertion to pacify GCC 11.2 -fanalyzer.
24694         maint: pacify GCC 11.2 -fanalyzer in crypto tests
24695         * tests/bench-digest.h (main): Report an error after memory
24696         exhaustion, instead of using a null pointer.
24698 2021-07-30  Paul Eggert  <eggert@cs.ucla.edu>
24700         xalloc: add malloc-related function attributes
24701         * lib/quotearg.h, lib/xalloc.h: Include stdlib.h, for
24702         the benefit of _GL_ATTRIBUTE_RETURNS_NONNULL.
24703         * lib/quotearg.h (clone_quoting_options):
24704         * lib/xalloc.h (xmalloc, ximalloc, xzalloc, xizalloc, xcalloc)
24705         (xicalloc, xrealloc, xirealloc, xireallocarray, x2realloc)
24706         (x2nrealloc, xmemdup, ximemdup, xstrdup, xnmalloc, xcharalloc):
24707         Add _GL_ATTRIBUTE_DALLOC_FREE and _GL_ATTRIBUTE_RETURNS_NONNULL
24708         attributes as appropriate.
24710         gnulib-common: update for gcc -Wmismatched-dealloc
24711         * m4/gnulib-common.m4 (gl_COMMON_BODY): Define the macros
24712         _GL_ATTRIBUTE_DEALLOC and _GL_ATTRIBUTE_DEALLOC_FREE.  These can
24713         be useful with gcc -Wmismatched-dealloc.
24715         gnulib-common: update for C2x 2020-12-11 draft
24716         Use blessed-by-draft-standard way to test for [[__deprecated__]]
24717         etc.; this is supported by GCC 11 and the fallback code should
24718         work fine with GCC 10 and earlier.
24719         * m4/gnulib-common.m4 (gl_COMMON_BODY): Define the macro
24720         _GL_HAS_C_ATTRIBUTE, and use it instead of __STDC_VERSION__ in
24721         deciding whether to use C2x attributes like [[__deprecated__]].
24723         manywarnings: document GCC 11 warnings
24724         * build-aux/gcc-warning.spec: Add warnings introduced in GCC 11.
24725         None of them require Gnulib code changes, so this is just
24726         a documentation change.
24728         limits-h: add BOOL_MAX, BOOL_WIDTH
24729         * doc/posix-headers/limits.texi (limits.h): Document them.
24730         * lib/limits.in.h: Also define CHAR_WIDTH etc. if C2x.
24731         (BOOL_MAX, BOOL_WIDTH): New macros, from C2x.
24732         * m4/limits-h.m4 (gl_LIMITS_H): Also check BOOL_WIDTH.
24734 2021-07-28  Simon Josefsson  <simon@josefsson.org>
24736         maintainer-makefile: Respect cfg.mk setting announcement_Cc_,
24737         reverting most of the previous patch.
24738         * top/maint.mk (announcement_mail_Cc_stable): Rename back to
24739         announcement_Cc_stable.
24740         (announcement_Cc_alpha): Rename back to
24741         announcement_mail_Cc_alpha.
24742         (announcement_Cc_): Renamed from announcement_mail_Cc_.
24743         (announcement_mail_headers_stable)
24744         (announcement_mail_headers_alpha): Use announcement_Cc_ again.
24746 2021-07-28  Simon Josefsson  <simon@josefsson.org>
24748         maintainer-makefile: Fix announcement mail CC's.
24749         * top/maint.mk (announcement_Cc_stable): Rename to
24750         announcement_mail_Cc_stable.
24751         (announcement_Cc_alpha): Rename to announcement_mail_Cc_alpha.
24752         (announcement_mail_headers_stable)
24753         (announcement_mail_headers_alpha): Use announcement_mail_Cc_
24754         instead of announcement_Cc_.
24756 2021-07-25  Bruno Haible  <bruno@clisp.org>
24758         Assume GNU gettext >= 0.17.
24759         * modules/vasprintf (Notice): Remove.
24760         * modules/xvasprintf (Notice): Remove.
24761         * modules/xprintf (Notice): Remove.
24762         * modules/error (Notice): Remove.
24763         * modules/verror (Notice): Remove.
24764         * modules/argp (Notice): Remove.
24765         * modules/propername (Notice): Remove.
24766         * lib/propername.h: Remove outdated comment.
24768 2021-07-19  Simon Josefsson  <simon@josefsson.org>
24770         gendocs.sh: Fix local rendering of HTML manuals.
24771         * build-aux/gendocs.sh (htmlarg): Don't use relative URLs.
24773 2021-07-18  Paul Eggert  <eggert@cs.ucla.edu>
24775         explicit_bzero-tests: pacify GCC better
24776         Problem reported by Bruno Haible in:
24777         https://lists.gnu.org/r/bug-gnulib/2021-07/msg00039.html
24778         * tests/test-explicit_bzero.c: Ignore -Wmaybe-uninitialized.
24779         (stackbuf): Remove this static pointer, reverting recent change.
24780         (do_secret_stuff, test_stack): Revert these related changes too.
24782 2021-07-17  Paul Eggert  <eggert@cs.ucla.edu>
24784         memrchr-tests: pacify GCC
24785         Pacify GCC 11.1.1 20210531 (Red Hat 11.1.1-3) x86-64.
24786         * tests/test-memrchr.c: Disable -Wmaybe-uninitialized.
24788         explicit_bzero-tests: pacify GCC
24789         Redo to pacify -Wmaybe-uninitialized with
24790         GCC 11.1.1 20210531 (Red Hat 11.1.1-3) x86-64.
24791         * tests/test-explicit_bzero.c (stackbuf): New static pointer.
24792         (do_secret_stuff): Use it.
24793         (test_stack): Set it to a local buffer.
24795         posixtm: pacify latest GCC
24796         Also, modernize while I’m at it.
24797         * lib/posixtm.c: Include c-ctype.h, idx.h, intprops.h, verify.h
24798         instead of stdlib.h.
24799         (ISDIGIT): Remove.  All uses replaced by c_isdigit.
24800         (year, posix_time_parse): Prefer idx_t to size_t.  Use assume
24801         instead of abort.
24802         (posixtime): Do not parse twice; once is enough.  That way, we
24803         needn’t worry about a bogus warning about strcpy overrunning a
24804         buffer from GCC 11.1.1 20210531 (Red Hat 11.1.1-3) x86-64
24805         when coreutils is configured with --enable-gcc-warnings.
24806         * modules/posixtm (Depends-on): Add c-ctype, intprops, verify.
24807         Remove stpcpy.
24809 2021-07-17  Bruno Haible  <bruno@clisp.org>
24811         Don't use '#pragma weak' for thread functions in Linux/glibc>=2.34.
24812         Suggested by Florian Weimer <fweimer@redhat.com> in
24813         <https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00211.html>.
24814         * m4/threadlib.m4 (gl_PTHREADLIB_BODY): Set gl_pthread_in_glibc and set
24815         LIBPMULTITHREAD accordingly.
24816         (gl_STDTHREADLIB_BODY): Update comments.
24817         (gl_THREADLIB_BODY): Define USE_POSIX_THREADS_FROM_LIBC.
24818         * lib/glthread/thread.h (c11_threads_in_use): Define to 1 if all POSIX
24819         thread functions are in libc.
24820         * lib/glthread/lock.h (c11_threads_in_use): Likewise.
24821         * lib/glthread/cond.h (c11_threads_in_use): Likewise.
24822         * lib/glthread/tls.h (c11_threads_in_use): Likewise.
24824 2021-07-17  Bruno Haible  <bruno@clisp.org>
24826         Fix cross-compilation test results.
24827         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): When cross-compiling, include
24828         <string.h> before testing __GNU_LIBRARY__.
24829         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE): Likewise.
24830         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Likewise.
24832 2021-07-14  Paul Eggert  <eggert@cs.ucla.edu>
24834         regex: modernize to newer regex bugset
24835         Problem reported by Hiroo Hayashi in:
24836         https://lists.gnu.org/r/bug-gnulib/2021-07/msg00024.html
24837         * m4/regex.m4 (gl_REGEX): Allow newer glibc behavior for ()0|\1,
24838         behavior where the regex compiles but does not match.
24839         Test for glibc bug 11053.
24840         * tests/test-regex.c (bug_regex11, main): Add casts needed
24841         for printf portability.
24842         (main): Allow newer glibc behavior for ()0|\1.
24844         regex: fix shell quoting problem in configuration
24845         * m4/regex.m4 (gl_REGEX): Fix quoting problems.
24846         These C programs are put into unquoted here-documents,
24847         so $ and \ need to be quoted.
24849 2021-07-08  Paul Eggert  <eggert@cs.ucla.edu>
24851         select: port better to MinGW
24852         Problem reported by Eli Zaretskii in:
24853         https://lists.gnu.org/r/bug-gnulib/2021-07/msg00017.html
24854         * lib/select.c (rpl_select) [_WIN32 && !__CYGWIN__]:
24855         Pass a SOCKET, not a HANDLE, to FD_ISSET.
24857 2021-07-06  Paul Eggert  <eggert@cs.ucla.edu>
24859         year2038: Add --disable-year2038 option
24860         Also, document this stuff better.  Suggested by Bruno Haible in:
24861         https://lists.gnu.org/r/bug-gnulib/2021-07/msg00011.html
24862         * doc/year2038.texi: Document --disable-year2038.
24863         * m4/year2038.m4 (gl_YEAR2038_BODY): Support ‘./configure
24864         --disable-year2038’ to disable 64-bit time_t when that is not the
24865         default.  Arg is now either empty or nonempty (not a shell
24866         command) and is evaluated at m4 expansion time instead of at
24867         runtime; all callers changed.
24869         doc: clarify which module fixes 32-bit time_t
24870         * doc/posix-headers/time.texi: Make it clear that the 32-bit
24871         time_t problem is addressed by the year2038 module, not
24872         by the time module.
24874 2021-07-01  Paul Eggert  <eggert@cs.ucla.edu>
24876         year2038: support glibc 2.34 _TIME_BITS=64
24877         In glibc 2.34 on Linux kernels where time_t is traditionally 32-bit,
24878         defining _FILE_OFFSET_BITS=64 and _TIME_BITS=64 makes time_t 64-bit.
24879         Apps must define both macros.  Gnulib applications that use either
24880         the largefile or the year2038 modules will want this behavior;
24881         largefile because it deals with the off_t and ino_t components of
24882         struct stat already, and so should also deal with time_t.
24883         * NEWS, doc/largefile.texi, doc/posix-headers/time.texi:
24884         Mention this.
24885         * m4/largefile.m4: Override two macros even in Autoconf 2.70 and later.
24886         (_AC_SYS_LARGEFILE_MACRO_VALUE): #undef $1 before #defining it, in
24887         case some other Gnulib macro has #defined it.
24888         (AC_SYS_LARGEFILE): Use AS_IF and AS_CASE to propagate AC_REQUIREs.
24889         Invoke gl_YEAR2038_BODY if we need to set _FILE_OFFSET_BITS=64.
24890         * m4/year2038.m4 (gl_YEAR2038_TEST_INCLUDES): New macro.
24891         (gl_YEAR2038_BODY): New macro, with gl_YEAR2038’s old body; this
24892         macro is designed to be used directly instead of being
24893         AC_REQUIREd.  It takes an argument specifying whether 64-bit is
24894         required.  Set _TIME_BITS=64 if this makes a difference in time_t
24895         width when setting _FILE_OFFSET_BITS=64.  Do not warn about
24896         32-bit time_t more than once.
24897         * modules/largefile (Files): Add year2038.m4.
24898         (Depends-on): Require gl_YEAR2038_EARLY.
24900         relocatable-prog-wrapper: add m4 files
24901         Add .m4 files needed for standalone relocatable-prog-wrapper, so
24902         that ‘./gnulib-tool --test relocatable-prog-wrapper’ does not fail
24903         with diagnostics like ‘configure.ac:63: error: possibly undefined
24904         macro: gl_FUNC_MALLOC_POSIX’.
24905         * modules/relocatable-prog-wrapper (Files): Add m4/free.m4,
24906         m4/malloc.m4, m4/mempcpy.m4, m4/rawmemchr.m4, m4/realloc.m4.
24908 2021-06-28  Bruno Haible  <bruno@clisp.org>
24910         strerror-override: Fix possible compilation error.
24911         Reported by Thomas Klausner <wiz@netbsd.org>.
24912         * lib/strerror-override.h (GNULIB_defined_strerror_override_macro): New
24913         macro.
24914         * lib/strerror-override.c (strerror_override): Don't define if
24915         GNULIB_defined_strerror_override_macro is set.
24917 2021-06-27  Bruno Haible  <bruno@clisp.org>
24919         environ: Fix wrong autoconf test result in C++ mode.
24920         * m4/environ.m4 (gt_CHECK_VAR_DECL): Use a typedef'ed type, not an
24921         anonymous type.
24923 2021-06-22  Egor Ignatov  <egori@altlinux.org>  (tiny change)
24925         regex: fix undefined behavior
24926         Problem reported by Paul Eggert in:
24927         https://lists.gnu.org/r/bug-gnulib/2021-06/msg00115.html
24928         * lib/regexec.c (proceed_next_node):
24929         Don’t insert already-inserted node.
24931 2021-06-21  Eric Blake  <eblake@redhat.com>
24933         sigsegv, sigsegv-tests: Assign my contributions to the FSF.
24934         * m4/sigaltstack.m4: Change copyright notice: Write "Copyright (C) FSF"
24935         instead of "Copyright (C) Eric Blake".
24936         * tests/altstack-util.h: Likewise.
24937         * tests/test-sigsegv-catch-stackoverflow1.c: Likewise.
24938         * tests/test-sigsegv-catch-stackoverflow2.c: Likewise.
24940 2021-06-20  Bruno Haible  <bruno@clisp.org>
24942         unistd: Avoid compilation error in C++ mode on Solaris, HP-UX, mingw.
24943         Reported by Eli Zaretskii <eliz@gnu.org> in
24944         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00135.html>.
24945         * lib/unistd.in.h (swab): Consider different declarations on Solaris,
24946         HP-UX, and old mingw.
24948 2021-06-20  Bruno Haible  <bruno@clisp.org>
24950         Sync with GNU gettext.
24951         * lib/printf-parse.c: Ignore IN_LIBINTL and IN_LIBASPRINTF.
24952         * lib/vasnprintf.c: Ignore IN_LIBINTL.
24954 2021-06-19  Bruno Haible  <bruno@clisp.org>
24956         Sync with GNU gettext.
24957         * lib/tsearch.c: Ignore IN_LIBINTL.
24958         * lib/localename-table.h: Likewise.
24959         * lib/localename.c: Ignore IN_LIBINTL in some places.
24961 2021-06-19  Bruno Haible  <bruno@clisp.org>
24963         unistd: Improve conflict resolution between gnulib and textstyle.h.
24964         * lib/unistd.in.h (GNULIB_overrides_isatty): New macro.
24966 2021-06-19  Bruno Haible  <bruno@clisp.org>
24968         stdio: Improve conflict resolution between gnulib and libintl.h.
24969         * lib/stdio.in.h (GNULIB_overrides_snprintf, GNULIB_overrides_sprintf,
24970         GNULIB_overrides_asprintf, GNULIB_overrides_vasprintf,
24971         GNULIB_overrides_vsnprintf, GNULIB_overrides_vsprintf): New macros.
24973 2021-06-19  Bruno Haible  <bruno@clisp.org>
24975         declared.sh: Allow parsing 'extern "C"' lines.
24976         * build-aux/declared.sh: Don't concatenate lines to an 'extern "C" {'
24977         line.
24979 2021-06-19  Bruno Haible  <bruno@clisp.org>
24981         unitypes: Fix trouble caused by installed older versions of unitypes.h.
24982         * modules/unitypes (configure.ac): Define _UC_RESTRICT through config.h.
24984 2021-06-19  Bruno Haible  <bruno@clisp.org>
24986         sigsegv, sigsegv-tests: Assign my contributions to the FSF.
24987         * lib/sigsegv.in.h: Change copyright notice: Write "Copyright (C) FSF"
24988         instead of "Copyright (C) Bruno Haible".
24989         * lib/sigsegv.c: Likewise.
24990         * lib/stackvma.h: Likewise.
24991         * lib/stackvma.c: Likewise.
24992         * m4/sigaltstack.m4: Likewise.
24993         * m4/stack-direction.m4: Likewise.
24994         * tests/altstack-util.h: Likewise.
24995         * tests/mmap-anon-util.h: Likewise.
24996         * tests/test-sigsegv-catch-segv1.c: Likewise.
24997         * tests/test-sigsegv-catch-segv2.c: Likewise.
24998         * tests/test-sigsegv-catch-stackoverflow1.c: Likewise.
24999         * tests/test-sigsegv-catch-stackoverflow2.c: Likewise.
25001 2021-06-18  Darren Kenny  <darren.kenny@oracle.com>  (tiny change)
25003         argp: Avoid possible NULL access in argp_help.
25004         Reported by Coverity. The invocation chain is:
25005         argp_help -> _help -> fill_in_uparams -> validate_uparams.
25006         * lib/argp-help.c (validate_uparams): Don't crash if state == NULL.
25008 2021-06-16  Bruno Haible  <bruno@clisp.org>
25010         tsearch: Relicense under LGPLv2+.
25011         * modules/tsearch (License): Change to LGPLv2+.
25012         * lib/tsearch.c: Update license notice.
25014 2021-06-15  Bruno Haible  <bruno@clisp.org>
25016         pipe-filter-ii tests: Fix long-standing failure on native Windows.
25017         * tests/test-pipe-filter-ii2-main.c: Include binary-io.h.
25018         (main): Avoid NL to CRLF conversion on standard output.
25019         * tests/test-pipe-filter-ii2-child.c: Include <unistd.h>, binary-io.h.
25020         (main): Avoid NL to CRLF conversion on standard output.
25022 2021-06-15  Bruno Haible  <bruno@clisp.org>
25024         xnanosleep: Improve module description.
25025         * modules/xnanosleep (Description): Improve.
25026         * lib/xnanosleep.h: Add comment. Make includable from C++.
25027         * lib/xnanosleep.c: Update comment.
25029 2021-06-15  Bruno Haible  <bruno@clisp.org>
25031         xfreopen: Improve module description.
25032         * modules/xfreopen (Description): Improve.
25033         * lib/xfreopen.h: Add comments. Make includable from C++.
25034         * lib/xfreopen.c: Update comment.
25036 2021-06-14  Paul Eggert  <eggert@cs.ucla.edu>
25038         idx: new printf/scanf length modifier macro
25039         * lib/idx.h (pIDX): New macro.
25041 2021-06-13  Bruno Haible  <bruno@clisp.org>
25043         Align 2011-11-26 patch to 2021-04-11 patch (regression from 2021-04-11).
25044         Reported by Paul Eggert.
25045         * m4/unistd_h.m4 (gl_UNISTD_H_REQUIRE_DEFAULTS): Also initialize
25046         GNULIB_UNISTD_H_GETOPT variable.
25047         * modules/getopt-posix (configure.ac): Set GNULIB_UNISTD_H_GETOPT
25048         variable.
25049         * modules/unistd (Makefile.am): Rely on ${gl_include_guard_prefix}
25050         processing done by gnulib-tool since 2021-04-11.
25051         * gnulib-tool: Revert last change.
25052         * pygnulib/GLEmiter.py: Likewise.
25054 2021-06-13  Paul Eggert  <eggert@cs.ucla.edu>
25056         * lib/stack.h (_GL_STACK_PREFIX): Omit stray semicolon.
25058         getopt-gnu: port back to Solaris 10
25059         * gnulib-tool (func_emit_lib_Makefile_am)
25060         (func_emit_tests_Makefile_am): Don’t substitute things like
25061         $(GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT),
25062         as this mishandles unistd and getopt-gnu, which breaks
25063         ‘make check’ on Solaris 10 with getopt-gnu.
25064         * pygnulib/GLEmiter.py (lib_Makefile_am, tests_Makefile_am):
25065         Likewise, albeit hackier since I did not test this and
25066         so went with a trivial hack instead.
25068 2021-06-13  Bruno Haible  <bruno@clisp.org>
25070         ialloc: Put appropriate license notice in source files.
25071         * lib/ialloc.h: Use LGPLv3+ notice.
25072         * lib/ialloc.c: Likewise.
25074 2021-06-11  Paul Eggert  <eggert@cs.ucla.edu>
25076         xalloc: new idx_t-based allocators
25077         This is for code that prefers to use idx_t for sizes.
25078         * lib/basename.c (base_name):
25079         * lib/dfa.c (mbs_to_wchar, state_index, dfaoptimize, dfaanalyze)
25080         (icatalloc, enlist, allocmust, dfamust):
25081         * lib/exclude.c (struct exclude_pattern, free_exclude_segment)
25082         (file_pattern_matches, add_exclude, add_exclude_fp):
25083         * lib/getusershell.c (line_size, readname):
25084         * lib/linebuffer.c (readlinebuffer_delim):
25085         * lib/linebuffer.h (struct linebuffer):
25086         * lib/readtokens.c (readtoken, readtokens):
25087         * lib/readutmp.c (read_utmp):
25088         * lib/savedir.c (streamsavedir):
25089         * lib/stack.h (_GL_STACK_TYPE, _GL_STACK_PREFIX):
25090         * lib/userspec.c (parse_with_separator):
25091         * lib/xgethostname.c (XGETANAME):
25092         Prefer idx_t to size_t for indexes, and use idx_t-related allocators.
25093         * lib/basename.c: Do not include xstrndup.h.
25094         (basename): Simplify by always using memcpy.
25095         * lib/xalloc.h (ximalloc, xizalloc, xicalloc, xirealloc)
25096         (xireallocarray, ximemdup, ximemdup0) [GNULIB_XALLOC]:
25097         New decls.
25098         (x2nrealloc): Now just a decl, as the body is moved into xmalloc.c.
25099         * lib/xmalloc.c: Include ialloc.h.
25100         Rename some local parameters to be consistent with the .h files.
25101         (nonnull): New static function.
25102         (xmalloc, xcalloc): Simplify by using nonnull.
25103         (ximalloc, xirealloc, xireallocarray, xizalloc, xicalloc)
25104         (ximemdup, ximemdup0): New functions.
25105         (x2nrealloc): Moved here from xalloc.h.
25106         * modules/xalloc (Depends-on): Add ialloc.
25107         * modules/dirname (Depends-on): Removbe xstrndup.
25108         * modules/linebuffer (Depends-on): Add idx.
25110         ialloc: new module
25111         * lib/ialloc.c, lib/ialloc.h, modules/ialloc: New files.
25113         exclude: improve wide-character hashing
25114         * lib/exclude.c (string_hasher_ci): Take the modulo at the end
25115         rather than each time a wide character is retrieved; this should
25116         be more efficient and should hash better.
25118 2021-06-11  Bruno Haible  <bruno@clisp.org>
25120         Make message in last commit more precise.
25121         Suggested by Eric Blake.
25122         * gnulib-tool (func_emit_tests_Makefile_am): Add more precision to
25123         'check-notice' message.
25125 2021-06-10  Bruno Haible  <bruno@clisp.org>
25127         Clarify where to report test failures from Gnulib tests.
25128         * gnulib-tool (func_emit_tests_Makefile_am): Emit a dependency of
25129         'check-am' on 'check-notice' that prints a notice.
25131 2021-06-10  Bruno Haible  <bruno@clisp.org>
25133         Clarify that compiler warnings in the Gnulib tests can be ignored.
25134         * gnulib-tool (func_emit_tests_Makefile_am): Emit overrides for CFLAGS
25135         and CXXFLAGS. Emit a dependency of 'all' on 'all-notice' that prints a
25136         notice.
25137         (func_emit_initmacro_start): Add a second argument. If it is true, emit
25138         code to require gl_CC_ALLOW_WARNINGS and gl_CXX_ALLOW_WARNINGS.
25139         (func_import, func_create_testdir): All callers updated.
25140         * m4/gnulib-common.m4 (gl_CC_ALLOW_WARNINGS, gl_CXX_ALLOW_WARNINGS): New
25141         macros.
25143 2021-06-09  Bruno Haible  <bruno@clisp.org>
25145         sigsegv tests: Hide a null pointer from the compiler's optimizations.
25146         Patch by Paul Eggert.
25147         * tests/test-sigsegv-catch-stackoverflow2.c
25148         (null_pointer_to_volatile_int): New variable.
25149         (main): Use it.
25151 2021-06-07  Bruno Haible  <bruno@clisp.org>
25153         get_ppid_of: Add support for DragonFly BSD.
25154         * lib/get_ppid_of.c: Treat DragonFly BSD like FreeBSD.
25156 2021-06-07  Bruno Haible  <bruno@clisp.org>
25158         sigsegv: Document context type for DragonFly BSD.
25159         * lib/sigsegv.in.h (stackoverflow_context_t): On DragonFly BSD, it is a
25160         pointer to 'struct sigcontext'.
25162 2021-06-07  Bruno Haible  <bruno@clisp.org>
25164         dynarray, scratch_buffer: Fix VPATH builds (regression from yesterday).
25165         * modules/dynarray (configure.ac): Invoke AC_PROG_MKDIR_P.
25166         (Makefile.am): Create malloc/ directory before creating
25167         malloc/dynarray.gl.h and malloc/dynarray-skeleton.gl.h.
25168         * modules/scratch_buffer (configure.ac): Invoke AC_PROG_MKDIR_P.
25169         (Makefile.am): Create malloc/ directory before creating
25170         malloc/scratch_buffer.gl.h.
25172 2021-06-07  Bruno Haible  <bruno@clisp.org>
25174         ptsname_r: Add support for DragonFly BSD 6.0.
25175         * lib/ptsname_r.c (__ptsname_r): Add implementation for DragonFly BSD.
25176         * tests/test-ptsname_r.c (main): Treat Dragonfly BSD like Solaris.
25178 2021-06-07  Bruno Haible  <bruno@clisp.org>
25180         Avoid some test failures on DragonFly BSD 6.0.
25181         * tests/test-c32isalnum.c (main): On Dragonfly BSD, disable tests that
25182         fail.
25183         * tests/test-c32isalpha.c (main): Likewise.
25184         * tests/test-c32islower.c (main): Likewise.
25185         * tests/test-c32isupper.c (main): Likewise.
25186         * tests/test-ptsname.c (main): Treat Dragonfly BSD like Solaris.
25188 2021-06-07  Kamil Dudka  <kdudka@redhat.com>
25190         mountlist: recognize fuse.portal as dummy file system
25191         * lib/mountlist.c [ME_DUMMY_0]: Add "fuse.portal" as
25192         a dummy file system (used in flatpak implementations).
25194 2021-06-07  Bruno Haible  <bruno@clisp.org>
25196         host-os: Add support for DragonFly BSD.
25197         * m4/host-os.m4 (gl_HOST_OS): On DragonFly BSD, set
25198         HOST_OPERATING_SYSTEM to "DragonFly BSD", not "Dragonfly".
25200 2021-06-07  Bruno Haible  <bruno@clisp.org>
25202         thread: Fix test link error on DragonFly BSD 6.0.
25203         * lib/glthread/thread.c (gl_thread_create): Moved to here...
25204         * lib/glthread/thread.h (gl_thread_create): ...from here.
25205         (_GLTHREAD_THREAD_INLINE): Remove macro.
25206         Remove _GL_INLINE_HEADER_BEGIN/END invocations.
25208 2021-06-06  Bruno Haible  <bruno@clisp.org>
25210         sigsegv: Avoid a gcc warning "declaration of 'sig' shadows a parameter".
25211         Reported by Dmitry V. Levin <ldv@altlinux.org> in
25212         <https://lists.gnu.org/archive/html/bug-gnulib/2021-06/msg00018.html>.
25213         * lib/sigsegv.c (sigsegv_handler): Use a different local variable name
25214         than 'sig'.
25216 2021-06-06  Bruno Haible  <bruno@clisp.org>
25218         scratch_buffer: Avoid conflict with prepr. macros owned by the system.
25219         * lib/scratch_buffer.h: Don't include <libc-config.h>. Define
25220         _GL_LIKELY, _GL_UNLIKELY. Include malloc/scratch_buffer.gl.h instead of
25221         malloc/scratch_buffer.h.
25222         * modules/scratch_buffer (Depends-on): Add builtin-expect.
25223         (Makefile.am): Arrange to create malloc/scratch_buffer.gl.h from
25224         malloc/scratch_buffer.h.
25226 2021-06-06  Bruno Haible  <bruno@clisp.org>
25228         dynarray: Avoid conflict with preprocessor macros owned by the system.
25229         * lib/dynarray.h: Don't include <libc-config.h>. Define _GL_LIKELY,
25230         _GL_UNLIKELY. Include malloc/dynarray.gl.h instead of malloc/dynarray.h.
25231         Include malloc/dynarray-skeleton.gl.h instead of
25232         malloc/dynarray-skeleton.c.
25233         * modules/dynarray (Depends-on): Add builtin-expect.
25234         (Makefile.am): Arrange to create malloc/dynarray.gl.h from
25235         malloc/dynarray.h and malloc/dynarray-skeleton.gl.h from
25236         malloc/dynarray-skeleton.c.
25238 2021-06-06  Bruno Haible  <bruno@clisp.org>
25240         glob-h: Avoid conflict with preprocessor macros owned by the system.
25241         This fixes a compilation error on DragonFly BSD 6.0.
25242         * lib/glob.in.h: Don't include <libc-config.h>. Don't define __USE_GNU.
25243         Include glob-libc.gl.h instead of glob-libc.h.
25244         * modules/glob-h (Makefile.am): Arrange to create glob-libc.gl.h from
25245         glob-libc.h.
25246         * lib/libc-config.h: Add comment.
25248 2021-06-06  Dmitry V. Levin  <ldv@altlinux.org>
25250         * tests/test-regex.c (tests): Add test cases for *+ and ** regressions
25251         fixed by the previous commit.
25253         * tests/test-regex.c (tests): Remove the comment saying that some tests
25254         are not used.  That comment was copied along with tests from glibc
25255         where some of these tests are commented out.
25257 2021-06-06  Egor Ignatov  <egori@altlinux.org>  (tiny change)
25259         * lib/regexec.c (set_regs): Pop if CUR_NODE has already been checked
25260         only when we have a fail stack.
25262 2021-06-05  Bruno Haible  <bruno@clisp.org>
25264         lib-symbol-visibility: Make configure check work for newer GCC.
25265         Reported by Ozkan Sezer <sezeroz@gmail.com> in
25266         <https://lists.gnu.org/archive/html/bug-gnulib/2021-05/msg00117.html>.
25267         * m4/visibility.m4 (gl_VISIBILITY): Add a function definition for each
25268         declaration in the test program.
25270 2021-06-05  Bruno Haible  <bruno@clisp.org>
25272         vasnprintf: Don't leak memory when memory allocation fails.
25273         Found by Coverity. Reported by Mike Fabian <mfabian@redhat.com> in
25274         <https://lists.gnu.org/archive/html/bug-libunistring/2021-06/msg00000.html>.
25275         * lib/vasnprintf.c (VASNPRINTF): In places where a local variable points
25276         to heap-allocated storage, free that storage before doing
25277         'goto out_of_memory;'.
25279 2021-06-04  Bruno Haible  <bruno@clisp.org>
25281         gnulib-tool: Stop doing license notice replacements.
25282         * gnulib-tool: Don't document --more-symlinks and --more-hardlinks any
25283         more.
25284         (do_copyrights): Remove variable.
25285         (func_import): Don't perform license updates on imported files any more.
25286         * pygnulib/GLInfo.py: Don't document --more-symlinks any more.
25287         * doc/gnulib-intro.texi (Copyright): Document the new situation.
25288         * doc/gnulib.texi (Module description): Likewise.
25289         * NEWS: Mention the change.
25291 2021-06-04  Bruno Haible  <bruno@clisp.org>
25293         git-merge-changelog: Fix license.
25294         * modules/git-merge-changelog (License): Change back to GPL.
25295         * lib/git-merge-changelog.c: Use a GPLv3+ notice.
25297 2021-06-04  Bruno Haible  <bruno@clisp.org>
25299         Put GPLv3+ notices in source files where appropriate.
25300         * lib/*.{h,c}: Use GPLv3+ notice whenever the module description says
25301         so.
25302         * build-aux/pmccabe.css: Likewise.
25304 2021-06-04  Bruno Haible  <bruno@clisp.org>
25306         Put LGPLv3+ notices in source files where appropriate.
25307         * lib/*.{h,c}: Use LGPLv3+ notice whenever the module description says
25308         so.
25310 2021-06-04  Bruno Haible  <bruno@clisp.org>
25312         Put "LGPLv3+ or GPLv2+" notices in source files where appropriate.
25313         * lib/**.{h,c,gperf}: Use "LGPLv3+ or GPLv2+" notice whenever the module
25314         description says so.
25316 2021-06-04  Bruno Haible  <bruno@clisp.org>
25318         Generate correct license notices in libunistring files.
25319         * lib/gen-uni-tables.c (output_library_license, output_tests_license):
25320         New functions.
25321         (output_predicate, output_category, output_combclass,
25322         output_bidi_category, output_decimal_digit, output_digit,
25323         output_numeric, output_mirror, output_joining_type,
25324         output_joining_group, output_scripts, output_scripts_byname,
25325         output_blocks, output_ident_category, output_lbrk_tables,
25326         output_wbrk_tables, output_gbp_table, output_decomposition_tables,
25327         output_composition_tables, output_simple_mapping, output_casing_rules):
25328         Invoke output_library_license.
25329         (output_predicate_test, output_decimal_digit_test, output_digit_test,
25330         output_numeric_test, output_joining_type_test,
25331         output_joining_group_test, output_gbp_test, output_simple_mapping_test):
25332         Invoke output_tests_license.
25333         * lib/uni*/*.h, lib/uni*/*.gperf: Regenerated.
25334         * tests/uni*/*.h: Likewise.
25336 2021-06-04  Bruno Haible  <bruno@clisp.org>
25338         Generate correct license notices in libunistring files.
25339         * lib/uniname/gen-uninames.lisp (main): Emit a copyright and license
25340         notice.
25341         * lib/uniname/uninames.h: Regenerated.
25343 2021-06-04  Bruno Haible  <bruno@clisp.org>
25345         Put LGPLv2+ notices in source files where appropriate.
25346         * lib/**.{h,c,gperf}: Use LGPLv2+ notice whenever the module description
25347         says so.
25349 2021-06-04  Bruno Haible  <bruno@clisp.org>
25351         Put "unlimited" notices in source files where appropriate.
25352         * build-aux/prefix-gnulib-mk: Use "unlimited" notice, since the module
25353         description says so.
25355 2021-06-04  Bruno Haible  <bruno@clisp.org>
25357         Put public domain notices in source files where appropriate.
25358         * lib/{alloca.c,atexit.c,memmove.c}: Use public domain notice.
25360 2021-06-04  Bruno Haible  <bruno@clisp.org>
25362         Revamp check-copyright script.
25363         * check-copyright: Search only the first 50 lines of each file.
25364         Recognize 'LGPLv3+ or GPLv2+', 'unlimited', and 'public domain' license
25365         notices. For files that are part of several modules, consider the
25366         weakest among the licenses. Allocate more room for the first output
25367         column.
25369 2021-06-04  Bruno Haible  <bruno@clisp.org>
25371         gnupload, git-merge-changelog: Fix module description.
25372         * gnulib-tool (func_import, func_create_testdir): Treat
25373         'GPLv2+ build tool' like 'GPLed build tool'.
25374         * pygnulib/GLImport.py (prepare): Likewise.
25375         * modules/gnupload (License): Change to 'GPLv2+ build tool'.
25376         * modules/git-merge-changelog (License): Change to GPLv2+.
25378 2021-06-04  Bruno Haible  <bruno@clisp.org>
25380         New directory with license notices.
25381         * etc/license-notices/*: New files.
25383 2021-05-30  Paul Eggert  <eggert@cs.ucla.edu>
25385         reallocarray-tests: port to weird platforms
25386         * tests/test-reallocarray.c (main): Don’t assume that
25387         PTRDIFF_MAX / 2 + 1 <= SIZE_MAX.  POSIX allows platforms
25388         where this isn’t true, though I don’t know of any examples.
25390         dfa, etc.: prefer xreallocarray to older name
25391         * lib/dfa.c (addtok_mb, realloc_trans_if_necessary, enlist):
25392         * lib/readtokens.c (readtokens):
25393         * tests/uninorm/test-u32-normalize-big.c:
25394         (read_normalization_test_file):
25395         Prefer xreallocarray to the equivalent xnrealloc.
25396         The newer name follows the glibc lead of ‘reallocarray’.
25398 2021-05-30  Bruno Haible  <bruno@clisp.org>
25400         Write 'LGPLv3+ or GPLv2+' instead of 'LGPLv3+ or GPLv2'.
25401         * modules/* (License): Change.
25402         * gnulib-tool (func_import, func_create_testdir): Likewise.
25404 2021-05-29  Paul Eggert  <eggert@cs.ucla.edu>
25406         sigsegv: Port to Solaris 11
25407         Problem reported by Kiyoshi KANAZAWA in:
25408         https://lists.gnu.org/r/bug-m4/2021-05/msg00020.html
25409         * lib/stackvma.c (_FILE_OFFSET_BITS): #undef on Solaris and Android.
25411 2021-05-24  Bruno Haible  <bruno@clisp.org>
25413         c-stack: Document another restriction.
25414         Triggered by a discussion with Paul Eggert.
25415         * lib/c-stack.h: Mention that ACTION should not use nested functions.
25417 2021-05-22  Bruno Haible  <bruno@clisp.org>
25419         stdio: Fix compilation error on DragonFly BSD.
25420         * lib/stdio.in.h (fcloseall): Treat DragonFly BSD like FreeBSD.
25422 2021-05-22  Larkin Nickle  <me@larbob.org>  (tiny change)
25424         getprogname: port to Tru64
25425         * lib/getprogname.c: Treat __osf__ like __sgi, except
25426         with /proc/123 instead of /proc/pinfo/123.
25428 2021-05-21  Paul Eggert  <eggert@cs.ucla.edu>
25430         sigsegv: don’t assume SIGSTKSZ is a constant
25431         * m4/sigaltstack.m4 (SV_SIGALTSTACK): Don’t attempt to override
25432         SIGSTKSZ.  Instead, use an array that is plenty large, while
25433         checking that it’s large enough.  Also, be consistent about
25434         putting that array in static storage rather than on the stack.
25435         * tests/altstack-util.h (SIGSTKSZ): Don’t define.
25436         (MYSTACK_SIZE): New macro, used instead of SIGSTKSZ.
25437         (mystack_storage, mystack): Now static.
25438         (prepare_alternate_stack) [SIGSTKSZ]:
25439         Check that MYSTACK_SIZE is large enough.
25441 2021-05-20  Paul Eggert  <eggert@cs.ucla.edu>
25443         fstatat: doc improvement
25444         * doc/posix-functions/fstatat.texi (fstatat):
25445         Mention AT_EMPTY_PATH when talking about empty strings.
25447 2021-05-18  Bruno Haible  <bruno@clisp.org>
25449         c-stack: Support catching stack overflow on most platforms without libsigsegv.
25450         * lib/c-stack.c: Remove all Solaris-specific code. Include <sigsegv.h>
25451         always.
25452         * m4/c-stack.m4: Remove all Solaris-specific code.
25453         (gl_C_STACK): Test $with_libsigsegv from module 'sigsegv'.
25454         * modules/c-stack (Files): Remove m4/libsigsegv.m4.
25455         (Depends-on): Add sigsegv. Remove havelib, intprops, inttypes, mempcpy,
25456         sigaction, stdbool.
25458 2021-05-16  Bruno Haible  <bruno@clisp.org>
25460         sigsegv, c-stack: Avoid compilation error with glibc >= 2.34.
25461         * lib/sigsegv.in.h (SIGSTKSZ): On glibc systems, redefine to a suitable
25462         constant.
25463         * m4/sigaltstack.m4 (SV_SIGALTSTACK): Likewise.
25464         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Likewise.
25466 2021-05-16  Bruno Haible  <bruno@clisp.org>
25468         sigsegv: Add tests.
25469         * tests/test-sigsegv-catch-segv1.c: New file, from GNU libsigsegv with
25470         modifications.
25471         * tests/test-sigsegv-catch-segv2.c: Likewise.
25472         * tests/test-sigsegv-catch-stackoverflow1.c: Likewise.
25473         * tests/test-sigsegv-catch-stackoverflow2.c: Likewise.
25474         * tests/altstack-util.h: Likewise.
25475         * tests/mmap-anon-util.h: Likewise.
25476         * modules/sigsegv-tests: New file.
25478         sigsegv: New module.
25479         * lib/sigsegv.in.h: New file, from GNU libsigsegv with modifications.
25480         * lib/sigsegv.c: Likewise.
25481         * lib/stackvma.h: Likewise.
25482         * lib/stackvma.c: Likewise.
25483         * m4/sigaltstack.m4: Likewise.
25484         * m4/stack-direction.m4: Likewise.
25485         * modules/sigsegv: New file.
25487 2021-05-15  Pádraig Brady  <P@draigBrady.com>
25489         realloc-gnu: avoid glibc MALLOC_CHECK_ issue
25490         * tests/test-realloc-gnu.c (main): if MALLOC_CHECK_ env var
25491         is set then don't check ENOMEM is returned from realloc().
25492         See https://sourceware.org/bugzilla/show_bug.cgi?id=27870
25493         Note it doesn't suffice to unsetenv() this var within the program,
25494         as the hooks have already been set up at that stage.
25496 2021-05-14  Paul Eggert  <eggert@cs.ucla.edu>
25498         c-stack: work around Solaris 11 bugs
25499         Problem reported by Bruno Haible in:
25500         https://lists.gnu.org/r/bug-gnulib/2021-05/msg00062.html
25501         * lib/c-stack.c: Always include sigsegv.h if HAVE_LIBSIGSEGV.
25502         (USE_LIBSIGSEGV): Do not use libsigsegv if the kernel
25503         has the si_addr bug and libsigsegv is too old to work
25504         around it.
25505         (segv_handler) [!USE_LIBSIGSEGV]: Do not trust si_addr
25506         if BOGUS_SI_ADDR_UPON_STACK_OVERFLOW.
25507         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
25508         Define BOGUS_SI_ADDR_UPON_STACK_OVERFLOW on Solaris 2.11 SPARC.
25509         And do not define HAVE_XSI_STACK_OVERFLOW_HEURISTIC.
25511 2021-05-14  Bruno Haible  <bruno@clisp.org>
25513         fcntl tests: Avoid failure in MacPorts.
25514         Reported by Nicholas Gaya <nicholasgaya@gmail.com> in
25515         <https://lists.gnu.org/archive/html/bug-gnulib/2021-05/msg00014.html>.
25516         * tests/test-fcntl.c (main): Close fd 10 before assuming that it is
25517         closed.
25518         * tests/test-execute-main.c: Update comment.
25520 2021-05-14  Bruno Haible  <bruno@clisp.org>
25522         linked-list-unportable-test: New module.
25523         * modules/linked-list-unportable-tests: New file, based on
25524         modules/linked-list-tests.
25525         * modules/linked-list-tests: Remove the unportable tests from here.
25526         Depend on linked-list-unportable-tests.
25528 2021-05-14  Simon Josefsson  <simon@josefsson.org>
25530         valgrind-tests: Doc fix and introduce AM_VALGRINDFLAGS.
25531         * doc/valgrind-tests.texi (Using valgrind automatically): Clarify
25532         when the parallel vs serial test harness is used, suggested by
25533         Bruno Haible <bruno@clisp.org>.
25534         * m4/valgrind-tests.m4: Add VALGRIND_PROGRAM and AM_VALGRINDFLAGS.
25536 2021-05-14  Bruno Haible  <bruno@clisp.org>
25538         malloc-gnu, realloc-gnu, calloc-gnu: Ensure errno gets set to ENOMEM.
25539         * m4/malloc.m4 (gl_CHECK_MALLOC_POSIX): Set gl_cv_func_malloc_posix to
25540         'no' also on Solaris.
25542 2021-05-14  Bruno Haible  <bruno@clisp.org>
25544         DEPENDENCIES: Mention the requirement for 'join'.
25545         Reported by Simon Josefsson <simon@josefsson.org> in
25546         <https://lists.gnu.org/archive/html/bug-gnulib/2021-05/msg00047.html>.
25547         * DEPENDENCIES: Mention 'join' among the core POSIX utilities.
25549 2021-05-14  Bruno Haible  <bruno@clisp.org>
25551         *alloc-gnu tests: Use ASSERT macro.
25552         * tests/test-malloc-gnu.c: Include "macros.h".
25553         (main): Use ASSERT.
25554         * tests/test-calloc-gnu.c: Include "macros.h".
25555         (main): Use ASSERT.
25556         * tests/test-realloc-gnu.c: Include "macros.h".
25557         (main): Use ASSERT.
25558         * tests/test-reallocarray.c: Include "macros.h".
25559         (main): Use ASSERT.
25560         * modules/malloc-gnu-tests (Files): Add tests/macros.h.
25561         * modules/calloc-gnu-tests (Files): Likewise.
25562         * modules/realloc-gnu-tests (Files): Likewise.
25563         * modules/reallocarray-tests (Files): Likewise.
25565 2021-05-14  Simon Josefsson  <simon@josefsson.org>
25567         valgrind-tests: Fix 'sh: yes: unknown operand' error.
25568         * m4/valgrind-tests.m4: Protect variable usage.
25570 2021-05-14  Simon Josefsson  <simon@josefsson.org>
25572         valgrind-tests: Fix LOG_VALGRIND when valgrind is missing.
25573         * m4/valgrind-tests.m4: Clear all variables when missing.
25575 2021-05-14  Simon Josefsson  <simon@josefsson.org>
25577         valgrind-tests: Better option handling.
25578         * m4/valgrind-tests.m4: Support new variables VALGRINDFLAGS and
25579         DEFAULT_VALGRINDFLAGS.
25580         * doc/valgrind-tests.texi (Running self-tests under valgrind):
25581         Improve.
25583 2021-05-14  Markus Mützel  <markus.muetzel@gmx.de>  (tiny change)
25585         windows-spawn: Don't assume that UNICODE is not defined.
25586         * lib/windows-spawn.h (compose_handles_block): Use type STARTUPINFOA.
25588 2021-05-13  Bruno Haible  <bruno@clisp.org>
25590         getrandom: Produce a better error code.
25591         Reported by Paul Eggert in
25592         <https://lists.gnu.org/archive/html/bug-gnulib/2021-05/msg00025.html>.
25593         * lib/getrandom.c (getrandom): When open() fails with an error that does
25594         not indicate the absence of the file, fail with that error code, not
25595         with ENOSYS.
25597 2021-05-13  Bruno Haible  <bruno@clisp.org>
25599         fstatat: Document a glibc 2.7 bug.
25600         * doc/posix-functions/fstatat.texi: Document an old glibc 2.7 bug.
25602 2021-05-13  Bruno Haible  <bruno@clisp.org>
25604         posix_spawn, posix_spawnp: Fix build error on Minix 3.3.
25605         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): If posix_spawn does not exist
25606         but is declared, set REPLACE_POSIX_SPAWN.
25607         * doc/posix-functions/posix_spawn.texi: Update platforms list.
25608         * doc/posix-functions/posix_spawnp.texi: Likewise.
25610 2021-05-13  Bruno Haible  <bruno@clisp.org>
25612         reallocarray tests: Avoid test failure on NetBSD.
25613         * tests/test-reallocarray.c (main): Accept EOVERFLOW error code.
25615 2021-05-12  Bruno Haible  <bruno@clisp.org>
25617         gnulib-tool: Fail properly if the 'join' program is not found.
25618         Reported by Simon Josefsson <simon@josefsson.org> in
25619         <https://lists.gnu.org/archive/html/bug-gnulib/2021-05/msg00029.html>.
25620         * gnulib-tool: Bail out early of the 'join' program is not found.
25622 2021-05-09  Bruno Haible  <bruno@clisp.org>
25624         {realloc,calloc}-gnu: Fix autoconf macro (regression 2021-04-18).
25625         * m4/realloc.m4 (gl_FUNC_REALLOC_POSIX): Don't reset REPLACE_REALLOC
25626         to 0 if it is already 1 after gl_FUNC_REALLOC_GNU was executed.
25627         * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): Don't reset REPLACE_CALLOC
25628         to 0 if it is already 1 after gl_FUNC_CALLOC_GNU was executed.
25630         {malloc,realloc,calloc}-gnu: Fix autoconf macro (regression 2021-04-18).
25631         * m4/malloc.m4 (gl_FUNC_MALLOC_GNU): Don't assume that
25632         _AC_FUNC_MALLOC_IF expands to a single shell statement.
25633         * m4/realloc.m4 (gl_FUNC_REALLOC_GNU): Don't assume that
25634         _AC_FUNC_REALLOC_IF expands to a single shell statement.
25635         * m4/calloc.m4 (gl_FUNC_CALLOC_GNU): Don't assume that
25636         _AC_FUNC_CALLOC_IF expands to a single shell statement.
25638 2021-05-09  Bruno Haible  <bruno@clisp.org>
25640         malloc-gnu, realloc-gnu, calloc-gnu: Ensure errno gets set on IRIX.
25641         * m4/malloc.m4 (gl_CHECK_MALLOC_POSIX): Require AC_CANONICAL_HOST. Set
25642         gl_cv_func_malloc_posix to 'no' also on IRIX.
25644         malloc-gnu, realloc-gnu, calloc-gnu tests: Verify errno is set.
25645         * tests/test-malloc-gnu.c: Include <errno.h>.
25646         (main): Verify that, when an allocation larger than PTRDIFF_MAX failed,
25647         errno is ENOMEM.
25648         * tests/test-realloc-gnu.c: Likewise.
25649         * tests/test-calloc-gnu.c: Likewise.
25651 2021-05-09  Bruno Haible  <bruno@clisp.org>
25653         getrandom: Fail with ENOSYS when the system has no randomness source.
25654         * lib/getrandom.c (getrandom): When open() fails, set errno to ENOSYS.
25656 2021-05-09  Bruno Haible  <bruno@clisp.org>
25658         free tests: Avoid test failure on glibc < 2.15.
25659         * tests/test-free.c (main): Skip the hairy test on glibc < 2.15.
25661 2021-05-08  Bruno Haible  <bruno@clisp.org>
25663         Fix build error when libintl is installed.
25664         * modules/posix_spawn_file_actions_addchdir-tests (Makefile.am): Link
25665         test-posix_spawn-chdir with libintl.
25666         * modules/posix_spawn_file_actions_addfchdir-tests (Makefile.am): Link
25667         test-posix_spawn-fchdir with libintl.
25669 2021-05-07  Bruno Haible  <bruno@clisp.org>
25671         Fix build when an older libunistring is installed (regr. 2020-02-23).
25672         * modules/unitypes (configure.ac): Arrange to generate the .h file if
25673         the installed one is from a version < 0.9.11.
25674         * modules/unicase/base (configure.ac): Likewise.
25675         * modules/uniconv/base (configure.ac): Likewise.
25676         * modules/unilbrk/base (configure.ac): Likewise.
25677         * modules/uninorm/base (configure.ac): Likewise.
25678         * modules/unistdio/base (configure.ac): Likewise.
25679         * modules/unistr/base (configure.ac): Likewise.
25680         * modules/uniwbrk/base (configure.ac): Likewise.
25681         * modules/uniwidth/base (configure.ac): Likewise.
25682         * modules/unictype/base (configure.ac): Arrange to generate the .h file
25683         if the installed one is from a version < 0.9.8.
25684         * modules/unigbrk/base (configure.ac): Likewise.
25686 2021-04-30  Bruno Haible  <bruno@clisp.org>
25688         immutable: Fix crash when immmalloc() fails.
25689         Found by GCC 11 '-fanalyzer'.
25690         * lib/immutable.c (immstrdup): Don't crash when immmalloc() fails.
25692 2021-04-30  Bruno Haible  <bruno@clisp.org>
25694         supersede: Fix crash when malloc() fails.
25695         Found by GCC 11 '-fanalyzer'.
25696         * lib/supersede.c (create_temp_file): Don't crash when malloc() fails.
25698 2021-04-27  Paul Eggert  <eggert@cs.ucla.edu>
25700         libc-config: fix include problem on older Debian
25701         https://lists.gnu.org/r/bug-gnulib/2021-04/msg00198.html
25702         * lib/cdefs.h: Use __GNULIB_CDEFS, not __GLIBC__,
25703         to determine whether to include the bits/* files.
25704         * lib/libc-config.h (__WORDSIZE): Remove.
25705         (__GNULIB_CDEFS): New macro.
25707 2021-04-26  Paul Eggert  <eggert@cs.ucla.edu>
25709         gnulib-tool: port better to current Autoconf
25710         * doc/gnulib-tool.texi (Initial import): Don’t mention
25711         AC_PROG_CC_STDC as it’s deprecated in current Autoconf.
25712         * gnulib-tool (func_done_dir): Suggest replacing
25713         AC_PROG_CC_STDC and AC_PROG_CC_C99, as per current Autoconf.
25715 2021-04-25  Paul Eggert  <eggert@cs.ucla.edu>
25717         reallocarray: a bit more tuning
25718         * lib/reallocarray.c: Include intprops.h.
25719         (reallocarray): Use INT_MULTIPLY_WRAPV instead of
25720         xalloc_oversized, as it now suffices and is likely a bit more
25721         efficient (five fewer machine insns on Ubuntu 20.10 x86-64).
25722         * modules/reallocarray (Depends-on): Depend on intprops, not
25723         xalloc-oversized.  Use conditional dependencies to avoid building
25724         realloc-gnu when not needed.
25726         reallocarray: don’t crash if item size is 0
25727         This problem affects only platforms where xalloc_oversized
25728         divides a number by the size arg.  Fix this by defining
25729         xalloc_oversized (n, s) to work even if s == 0.
25730         * lib/malloca.h, lib/xalloc-oversized.h: Document new behavior.
25731         * lib/xalloc-oversized.h (__xalloc_oversized): Do not crash if S==0.
25732         * tests/test-reallocarray.c (main): Test for the bug.
25734 2021-04-24  Paul Eggert  <eggert@cs.ucla.edu>
25736         xmalloca, etc.: avoid unlikely trap
25737         * lib/malloca.h (nmalloca):
25738         * lib/xmalloca.h (xnmalloca):
25739         Use size_t, not ptrdiff_t, to avoid implementation-defined
25740         behavior (which could include a trap) if N is 0 and S exceeds
25741         PTRDIFF_MAX.
25742         * lib/xalloc-oversized.h: Adjust comment to match.
25744         xmalloca, etc.: fix some xalloc-oversized issues
25745         * lib/malloca.h (nmalloca):
25746         * lib/xmalloca.h (xnmalloca): Convert S to ptrdiff_t to avoid
25747         arithmetic overflow if N and S are both narrower than ptrdiff_t.
25748         * lib/xalloc-oversized.h (xalloc_oversized):
25749         Don’t say that args must be ptrdiff_t or size_t or wider.
25750         The macro returns the correct answer even when that is not
25751         the case, and it’s the caller’s responsibility to avoid
25752         howlers like (xalloc_oversized (n, s) ? NULL : malloc (n * s))
25753         when N and S are both narrower than ptrdiff_t and size_t.
25754         Add a comment to that effect.
25755         * lib/xmalloca.h: Include xalloc-oversized.h, since this file uses
25756         xalloc_oversized.  Add comments about side effects and avoid
25757         unnecessary parens.
25758         * modules/xmalloca (Depends-on): Add xalloc-oversized.
25760         reallocarray: check for ptrdiff_t overflow
25761         * doc/glibc-functions/reallocarray.texi (reallocarray):
25762         Mention ptrdiff_t overflow.
25763         * lib/reallocarray.c (reallocarray): Reindent as per usual GNU.
25764         * lib/stdlib.in.h (reallocarray): Allow reallocarray to be replaced.
25765         * m4/reallocarray.m4 (gl_FUNC_REALLOCARRAY):
25766         Check for ptrdiff_t overflow.
25767         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Set up REPLACE_REALLOCARRAY.
25768         * modules/reallocarray (Files): Add malloc.m4.
25769         (configure.ac): Also test REPLACE_REALLOCARRAY.
25770         * modules/reallocarray-tests (Depends-on): Add stdint.
25771         * modules/stdlib (stdlib.h): Substitute REPLACE_REALLOCARRAY.
25772         * tests/test-reallocarray.c: Include stdint.h.
25773         (main): Check for ptrdiff_t overflow.
25775         calloc-gnu-tests: add overflow tests
25776         * tests/test-calloc-gnu.c (identity): New function, replacing ‘eight’.
25777         (main): Do 2 * log2(SIZE_MAX) tests instead of just two tests.
25778         Don’t bother to free on failure.
25780 2021-04-22  Paul Eggert  <eggert@cs.ucla.edu>
25782         libc-config: port better to Fedora Rawhide
25783         Problem reported by Eric Blake in:
25784         https://lists.gnu.org/r/bug-gnulib/2021-04/msg00181.html
25785         * lib/cdefs.h: Make this closer to glibc, so that we can
25786         merge Gnulib into glibc here.
25787         (__attribute_maybe_unused__): Make identical to glibc’s
25788         definition, though with an additional comment.
25789         (__attribute_nonnull__): Add clarifying comment.
25790         Make inclusion of bits/wordsize.h, bits/long-double.h
25791         dependent on __GLIBC__, not on !__WORDSIZE.
25792         * lib/libc-config.h: Use __attribute_nonnull__,
25793         not __attribute_maybe_unused__, to detect whether
25794         to include sys/cdefs.h.
25796 2021-04-21  Paul Eggert  <eggert@cs.ucla.edu>
25798         realloc: port to AIX 7.1
25799         * lib/realloc.c (_GL_USE_STDLIB_ALLOC): Do not define.  This
25800         module relies on GNU malloc.  This fixes a test failure on AIX 7.1.
25802         malloc: simplify
25803         * lib/malloc.c: Omit unnecessary "#undef malloc".
25804         I recently introduced it by mistake.  This module defines
25805         _GL_USE_STDLIB_ALLOC and so malloc isn’t redefined to rpl_malloc.
25807         malloca: avoid ptrdiff_t overflow
25808         * lib/malloca.c: Include idx.h, intprops.h.
25809         (mmalloca): Check for ptrdiff_t overflow.  Since this module uses
25810         _GL_USE_STDLIB_ALLOC, it cannot assume GNU malloc semantics.
25811         * modules/malloca (Depends-on): Add idx, intprops.
25813         careadlinkat: avoid ptrdiff_t overflow
25814         * lib/careadlinkat.c: Include idx.h, minmax.h.
25815         (readlink_stk): Avoid ptrdiff_t overflow in object allocation.
25816         Since this module uses arbitrary allocators (including
25817         stdlib_allocator), it cannot assume GNU malloc semantics.
25818         * modules/careadlinkat (Depends-on): Add idx, minmax.
25820         execute-tests: pacify compiler
25821         * tests/test-execute-main.c (main): Use 0x7DEADBEE rather than
25822         0xDEADBEEF for nonces, to avoid provoking AIX XLC compiler warning
25823         that the latter is out of int range.
25825 2021-04-20  Paul Eggert  <eggert@cs.ucla.edu>
25827         malloc-gnu-tests, etc.: use volatile for clang
25828         In some more test locations, store the result of malloc etc. into
25829         a volatile pointer so that clang doesn’t optimize away the malloc
25830         and thus bypass the test.  This fixes a malloc-gnu test failure on
25831         macOS 11.2.3 with clang 12.0.0 on ARM.
25832         * tests/test-alloca-opt.c (do_allocation):
25833         * tests/test-malloc-gnu.c (main):
25834         * tests/test-malloca.c (do_allocation):
25835         * tests/test-realloc-gnu.c (main):
25836         * tests/test-reallocarray.c (main):
25837         * tests/test-aligned-malloc.c (main):
25838         * tests/test-aligned_alloc.c (main):
25839         Store malloc etc. results into a volatile pointer.
25841 2021-04-18  Paul Eggert  <eggert@cs.ucla.edu>
25843         malloc-gnu-tests: pacify -Walloc-size-larger-than
25844         * tests/test-malloc-gnu.c (main):
25845         * tests/test-realloc-gnu.c (main): Hide true intentions from GCC,
25846         to prevent diagnostics like “warning: argument 1 value
25847         ‘9223372036854775808’ exceeds maximum object size
25848         9223372036854775807 [-Walloc-size-larger-than=]”.
25850         safe-alloc: fix pointer implementation
25851         The old implementation assumed that all pointers use the same
25852         internal representation, but the C standard doesn’t guarantee
25853         this.  Use void * (pointer) not void ** (pointer-to-pointer) for
25854         the internal functions’ API.  The internal functions now return
25855         NULL if and only if they failed, and the macros translate that
25856         into -1 or 0 to satisfy the existing API.
25857         * doc/safe-alloc.texi (Safe Allocation Macros): Mention overflow.
25858         * lib/safe-alloc.c: Major rewrite.  Now this simply
25859         defines SAFE_ALLOC_INLINE and includes safe-alloc.h.
25860         * lib/safe-alloc.h: Include stddef.h, not stdlib.h.
25861         (SAFE_ALLOC_INLINE): New macro; use Gnulib inline function style.
25862         (safe_alloc_realloc_n): New API, which passes and returns
25863         the pointer, and which returns NULL if and only if failure occurs.
25864         (safe_alloc_check): New function.
25865         (ALLOC, ALLOC_N, ALLOC_N_UNINITIALIZED, REALLOC_N):
25866         Redo using the new API for internal functions, and using calloc
25867         which is good enough since it’s GNU-compatible now.
25868         (FREE): Expand to an expression rather than merely to something
25869         that needs a following ‘;’ to become a statement.
25870         * modules/safe-alloc (Depends-on): Add calloc-gnu.
25872         calloc-gnu: now LGPLv2+
25873         * modules/calloc-gnu (License): Change from GPL to LGPLv2+.
25874         The old value was evidently a longstanding typo, and calloc
25875         will be needed by LGPLv2+ modules that will want to rely
25876         on GNU behavior.
25878         safe-alloc: simplify via reallocarray
25879         * lib/safe-alloc.c: Do not include xalloc-oversized.h.
25880         (safe_alloc_alloc_n, safe_alloc_realloc_n):
25881         Use reallocarray to check for size or ptrdiff_t overflow.
25882         * modules/reallocarray (License): Switch from LGPL to LGPLv2+, as
25883         this is needed for safe-alloc and anyway is more appropriate for
25884         this library function common with BSD.
25885         * modules/safe-alloc (Depends-on): Depend on reallocarray
25886         rather than xalloc-oversized.
25888         xalloc-oversized: fix SIZE_MAX optimization bug
25889         * lib/xalloc-oversized.h (xalloc_count_t): Remove; no longer
25890         needed and was evidently error-prone anyway.
25891         (xalloc_oversized): Omit some over-optimization that caused
25892         SIZE_MAX to not be treated as too large (the Gnulib convention) on
25893         unusual platforms where PTRDIFF_MAX == SIZE_MAX.  This change
25894         should not affect typical platforms where PTRDIFF_MAX < SIZE_MAX.
25895         When optimizing, simply use ptrdiff_t instead of xalloc_count_t.
25897         xalloc: new function xreallocarray
25898         This is the same as xnrealloc, which perhaps should be deprecated.
25899         The name xreallocarray should be easier to remember now that
25900         reallocarray is a standard GNU function.
25901         * lib/xalloc.h [GNULIB_XALLOC]: Do not include xalloc-oversized.h.
25902         (xnmalloc, xnrealloc, x2nrealloc): Simplify by using xreallocarray.
25903         * lib/xmalloc.c (xreallocarray): New function.
25904         * modules/xalloc (Depends-on): Add reallocarray;
25905         remove xalloc-oversized.
25907         group-member: simplify via realloc-gnu
25908         * lib/group-member.c, modules/group-member:
25909         Simplify similarly to backupfile.
25911         backupfile: simplify via realloc-gnu
25912         * lib/backupfile.c: Do not include xalloc-oversized.h.
25913         (numbered_backup): Simplify now that realloc will do the right
25914         thing about ptrdiff_t overflow.
25915         * modules/backupfile (Depends-on): Add realloc-gnu;
25916         remove xalloc-oversized.
25918         safe-alloc: improve doc
25919         * doc/safe-alloc.texi: Clarify that reallocating an array appends
25920         uninitialized storage.  Say ‘sizeof *p’ rather than ‘sizeof(*p)’
25921         which would need a space before the paren to follow GNU style.
25923         malloc-gnu-tests, etc.: test ptrdiff_t overflow
25924         * modules/calloc-gnu-tests (Depends-on):
25925         * modules/malloc-gnu-tests (Depends-on):
25926         * modules/realloc-gnu-tests (Depends-on): Add stdint.
25927         * tests/test-calloc-gnu.c (main):
25928         * tests/test-malloc-gnu.c (main):,
25929         * tests/test-realloc-gnu.c (main): Test for ptrdiff_t overflow.
25931         malloc-gnu, etc.: prefer AS_CASE to woolly AS_IF
25932         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF):
25933         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF):
25934         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Use AS_CASE.
25936         malloc-gnu, etc.: sync better with Autoconf
25937         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF):
25938         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF):
25939         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF):
25940         Avoid some unnecessary differences from Autoconf’s versions.
25941         Separate our platforms into a different line so that it’s easier
25942         to diff.  Use AS_IF in case the args use AC_REQUIRE.
25943         However, don’t bother with omitting the first newline, as
25944         omitting the newline is not Gnulib style and the difference
25945         doesn’t seem to matter here.
25947 2021-04-18  Bruno Haible  <bruno@clisp.org>
25949         malloc-posix, realloc-posix, calloc-posix: Document affected platforms.
25950         * doc/posix-functions/malloc.texi: Re-add platforms list.
25951         * doc/posix-functions/realloc.texi: Likewise.
25952         * doc/posix-functions/calloc.texi: Likewise.
25954 2021-04-18  Bruno Haible  <bruno@clisp.org>
25956         More systematic file naming.
25957         * m4/ctype_h.m4: Renamed from m4/ctype.m4.
25958         * m4/threads_h.m4: Renamed from m4/threads.m4.
25959         * m4/uchar_h.m4: Renamed from m4/uchar.m4.
25961 2021-04-18  Bruno Haible  <bruno@clisp.org>
25963         Add comments after 2021-04-11 change.
25964         * m4/*_h.m4: Add comments regarding *_REQUIRE_DEFAULTS and
25965         *_MODULE_INDICATOR macros.
25967 2021-04-18  Bruno Haible  <bruno@clisp.org>
25969         doc: Update for FreeBSD 13.0/arm64.
25970         * doc/posix-headers/stdint.texi: Mention FreeBSD 13 bug.
25971         * m4/stdint.m4: Update comment.
25973 2021-04-17  Paul Eggert  <eggert@cs.ucla.edu>
25975         xalloc: adjust to malloc ptrdiff_t change
25976         * lib/xmalloc.c (HAVE_GNU_CALLOC, HAVE_GNU_MALLOC, HAVE_GNU_REALLOC):
25977         Remove.
25978         (xmalloc, xrealloc, xcalloc): Simplify by assuming GNU behavior.
25979         * modules/xalloc (Depends-on): Add calloc-gnu, malloc-gnu,
25980         realloc-gnu.
25982         malloc, etc.: check for ptrdiff_t overflow
25983         In glibc 2.30 and later, malloc, realloc and calloc reject
25984         attempts to create objects larger than PTRDIFF_MAX bytes.
25985         This patch changes malloc-gnu etc. to support this behavior
25986         on non-GNU hosts.  It also makes this change for malloc-posix etc.
25987         since it’s a safety measure that ought to be in POSIX (perhaps
25988         we can talk them into that...).
25990         In writing this patch I found a complicated set of code that had
25991         accumulated over the years, some written by yours truly.  I got
25992         rid of the code I couldn’t see the need for nowadays.  Among other
25993         things, the GNU realloc behavior is no longer incompatible with
25994         the C standard, because in C17 the latter was relaxed to allow the
25995         former.  If I went too far in cleaning up, the old stuff can be
25996         resurrected.
25998         This change is mostly for 32-bit platforms, since practical 64-bit
25999         platforms cannot create objects larger than PTRDIFF_MAX bytes anyway.
26000         * doc/posix-functions/calloc.texi:
26001         * doc/posix-functions/malloc.texi:
26002         * doc/posix-functions/realloc.texi:
26003         Mention ptrdiff_t issues, and go into more detail about what
26004         the gnu extension module does.
26005         * doc/posix-functions/realloc.texi: Fix now-obsolete commentary
26006         about C99 vs glibc, as C17 allows the glibc behavior and POSIX
26007         will follow suit when it gets around to it.
26008         * lib/calloc.c, lib/malloc.c, lib/realloc.c:
26009         Simplify by always supplying a GNU-compatible version,
26010         as that suffices for correctness and is good enough for performance.
26011         Include xalloc-oversized.h, and use xalloc_oversized to
26012         check for ptrdiff_t overflow.
26013         (NEED_CALLOC_GNU, NEED_MALLOC_GNU, NEED_REALLOC_GNU): Remove.
26014         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF):
26015         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF):
26016         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF):
26017         Don’t start with a newline.  Fix message to match behavior.
26018         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don’t test for size_t overflow,
26019         as the ptrdiff_t test is good enough.
26020         * m4/calloc.m4 (gl_FUNC_CALLOC_GNU):
26021         * m4/malloc.m4 (gl_FUNC_MALLOC_GNU):
26022         * m4/realloc.m4 (gl_FUNC_REALLOC_GNU):
26023         Do not define HAVE_CALLOC_GNU, HAVE_MALLOC_GNU, HAVE_REALLOC_GNU.
26024         It’s not worth the aggravation of maintaining these, as they
26025         are confusing (they don’t really mean GNU-compatible anyway).
26026         Don’t bother testing for GNU behavior if we have already decided
26027         to replace the function, since the replacement is always GNUish.
26028         * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX):
26029         * m4/realloc.m4 (gl_FUNC_REALLOC_POSIX):
26030         Defer to gl_FUNC_MALLOC_POSIX.
26031         * m4/malloc.m4 (gl_FUNC_MALLOC_PTRDIFF, gl_CHECK_MALLOC_PTRDIFF):
26032         New macros.
26033         (gl_FUNC_MALLOC_POSIX): Use them to check for ptrdiff_t overflow.
26034         * modules/calloc-gnu, modules/malloc-gnu, modules/realloc-gnu:
26035         Remove no-longer-needed module indicators.
26036         * modules/calloc-posix, modules/malloc-posix, modules/realloc-posix:
26037         Depend on xalloc-oversized.
26038         * modules/malloc-posix: Require gl_FUNC_MALLOC_POSIX instead of
26039         calling it directly, so that other code can require it.
26040         * modules/realloc-posix: Depend on free-posix and malloc-posix.
26042 2021-04-17  Bruno Haible  <bruno@clisp.org>
26044         stdio: Fix build error in some configurations (regression 2021-04-11).
26045         * m4/stdio_h.m4 (gl_STDIO_H): Move gl_STDIO_MODULE_INDICATOR and
26046         gl_MODULE_INDICATOR invocations from here...
26047         * modules/stdio (configure.ac): ... to here.
26049 2021-04-17  Bruno Haible  <bruno@clisp.org>
26051         doc: Update for FreeBSD 11.0, 12.0, 13.0.
26052         * doc/posix-headers/*.texi: Update.
26053         * doc/glibc-headers/*.texi: Update.
26054         * doc/posix-functions/*.texi: Likewise.
26055         * doc/pastposix-functions/*.texi: Likewise.
26056         * doc/glibc-functions/*.texi: Likewise.
26057         * m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): Update cross-compilation guess.
26059 2021-04-16  Paul Eggert  <eggert@cs.ucla.edu>
26061         malloc, realloc: fix recently-introduced #undef typos
26062         * lib/malloc.c (malloc):
26063         * lib/realloc.c (malloc, realloc): #undef before using.
26065 2021-04-14  Bruno Haible  <bruno@clisp.org>
26067         hamt tests: Fix link error.
26068         * modules/hamt-tests (Makefile.am): Link test-hamt against @LIBINTL@.
26070 2021-04-14  Bruno Haible  <bruno@clisp.org>
26072         c-stack: Don't use an undefined C macro (regression from 2020-10-04).
26073         * lib/c-stack.c: Test GNU C version directly, without __GNUC_PREREQ.
26075 2021-04-12  Bruno Haible  <bruno@clisp.org>
26077         doc: Fix confusion between LIBADD and LDADD.
26078         Reported by Reuben Thomas <rrt@sc3d.org> in
26079         <https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00102.html>.
26080         * doc/gnulib-tool.texi (Multiple instances): For programs, use LDADD,
26081         not LIBADD.
26083 2021-04-11  Bruno Haible  <bruno@clisp.org>
26085         malloc, realloc, calloc: Support restricted library symbols on AIX.
26086         Suggested by Paul Eggert in
26087         <https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00119.html>.
26088         * lib/malloc.c: Drop the code that intends to collaborate with
26089         AC_FUNC_MALLOC.
26090         * lib/realloc.c: Drop the code that intends to collaborate with
26091         AC_FUNC_REALLOC.
26092         * lib/calloc.c: Drop the code that intends to collaborate with the
26093         nonexistent macro AC_FUNC_CALLOC.
26095 2021-04-11  Bruno Haible  <bruno@clisp.org>
26097         Support several gnulib-tool invocations under the same configure.ac.
26098         Reported by Reuben Thomas <rrt@sc3d.org> in
26099         <https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00104.html>.
26100         This is done by defining the Gnulib module indicator variables per
26101         gnulib-tool invocation. So that a generated .h file is no longer
26102         influenced by the set of modules used in other gnulib-tool invocations.
26103         * gnulib-tool (func_compute_include_guard_prefix): Set
26104         module_indicator_prefix.
26105         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use it to
26106         modify $(GNULIB_*) variable references in the Automake snippets.
26107         (func_emit_initmacro_start): Push macro definitions for GL_MACRO_PREFIX
26108         and GL_MODULE_INDICATOR_PREFIX.
26109         (func_emit_initmacro_end): Pop these macro definitions.
26110         * pygnulib/GLConfig.py (GLConfig.getIncludeGuardPrefix): New method.
26111         * pygnulib/GLEmiter.py (GLEmiter.initmacro_start): Push macro
26112         definitions for GL_MACRO_PREFIX and GL_MODULE_INDICATOR_PREFIX.
26113         (GLEmiter.initmacro_end): Pop these macro definitions.
26114         (GLEmiter.lib_Makefile_am, GLEmiter.tests_Makefile_am): Use the module
26115         indicator prefix to modify $(GNULIB_*) variable references in the
26116         Automake snippets.
26117         * m4/gnulib-common.m4 (gl_MODULE_INDICATOR_INIT_VARIABLE,
26118         gl_MODULE_INDICATOR_SET_VARIABLE): Use the value of
26119         GL_MODULE_INDICATOR_PREFIX.
26120         * m4/arpa_inet_h.m4: Use new idiom for header files that contain
26121         references to Gnulib module indicator variables:
26122         - Define the main macro through AC_DEFUN_ONCE.
26123         - Define a macro gl_*_H_REQUIRE_DEFAULTS that initializes the Gnulib
26124           module indicator variables (each prefixed with
26125           GL_MODULE_INDICATOR_PREFIX).
26126         - Invoke this macro in the gl_*_MODULE_INDICATOR macro.
26127         * m4/ctype.m4: Likewise.
26128         * m4/dirent_h.m4: Likewise.
26129         * m4/fcntl_h.m4: Likewise.
26130         * m4/fnmatch_h.m4: Likewise.
26131         * m4/glob_h.m4: Likewise.
26132         * m4/iconv_h.m4: Likewise.
26133         * m4/inttypes.m4: Likewise.
26134         * m4/langinfo_h.m4: Likewise.
26135         * m4/locale_h.m4: Likewise.
26136         * m4/malloc_h.m4: Likewise.
26137         * m4/math_h.m4: Likewise.
26138         * m4/monetary_h.m4: Likewise.
26139         * m4/netdb_h.m4: Likewise.
26140         * m4/poll_h.m4: Likewise.
26141         * m4/pthread_h.m4: Likewise.
26142         * m4/pty_h.m4: Likewise.
26143         * m4/sched_h.m4: Likewise.
26144         * m4/search_h.m4: Likewise.
26145         * m4/signal_h.m4: Likewise.
26146         * m4/spawn_h.m4: Likewise.
26147         * m4/stddef_h.m4: Likewise.
26148         * m4/stdio_h.m4: Likewise.
26149         * m4/stdlib_h.m4: Likewise.
26150         * m4/string_h.m4: Likewise.
26151         * m4/strings_h.m4: Likewise.
26152         * m4/sys_file_h.m4: Likewise.
26153         * m4/sys_ioctl_h.m4: Likewise.
26154         * m4/sys_random_h.m4: Likewise.
26155         * m4/sys_resource_h.m4: Likewise.
26156         * m4/sys_select_h.m4: Likewise.
26157         * m4/sys_socket_h.m4: Likewise.
26158         * m4/sys_stat_h.m4: Likewise.
26159         * m4/sys_time_h.m4: Likewise.
26160         * m4/sys_times_h.m4: Likewise.
26161         * m4/sys_types_h.m4: Likewise.
26162         * m4/sys_uio_h.m4: Likewise.
26163         * m4/sys_utsname_h.m4: Likewise.
26164         * m4/sys_wait_h.m4: Likewise.
26165         * m4/termios_h.m4: Likewise.
26166         * m4/threads.m4: Likewise.
26167         * m4/time_h.m4: Likewise.
26168         * m4/uchar.m4: Likewise.
26169         * m4/unistd_h.m4: Likewise.
26170         * m4/utime_h.m4: Likewise.
26171         * m4/wchar_h.m4: Likewise.
26172         * m4/wctype_h.m4: Likewise.
26173         * modules/arpa_inet (configure.ac): Invoke the macro
26174         gl_*_H_REQUIRE_DEFAULTS explicitly.
26175         * modules/ctype (configure.ac): Likewise.
26176         * modules/dirent (configure.ac): Likewise.
26177         * modules/fcntl-h (configure.ac): Likewise.
26178         * modules/fnmatch-h (configure.ac): Likewise.
26179         * modules/glob-h (configure.ac): Likewise.
26180         * modules/iconv-h (configure.ac): Likewise.
26181         * modules/inttypes-incomplete (configure.ac): Likewise.
26182         * modules/langinfo (configure.ac): Likewise.
26183         * modules/locale (configure.ac): Likewise.
26184         * modules/malloc-h (configure.ac): Likewise.
26185         * modules/math (configure.ac): Likewise.
26186         * modules/monetary (configure.ac): Likewise.
26187         * modules/netdb (configure.ac): Likewise.
26188         * modules/poll-h (configure.ac): Likewise.
26189         * modules/pthread-h (configure.ac): Likewise.
26190         * modules/pty (configure.ac): Likewise.
26191         * modules/sched (configure.ac): Likewise.
26192         * modules/search (configure.ac): Likewise.
26193         * modules/signal-h (configure.ac): Likewise.
26194         * modules/spawn (configure.ac): Likewise.
26195         * modules/stddef (configure.ac): Likewise.
26196         * modules/stdio (configure.ac): Likewise.
26197         * modules/stdlib (configure.ac): Likewise.
26198         * modules/string (configure.ac): Likewise.
26199         * modules/strings (configure.ac): Likewise.
26200         * modules/sys_file (configure.ac): Likewise.
26201         * modules/sys_ioctl (configure.ac): Likewise.
26202         * modules/sys_random (configure.ac): Likewise.
26203         * modules/sys_resource (configure.ac): Likewise.
26204         * modules/sys_select (configure.ac): Likewise.
26205         * modules/sys_socket (configure.ac): Likewise.
26206         * modules/sys_stat (configure.ac): Likewise.
26207         * modules/sys_time (configure.ac): Likewise.
26208         * modules/sys_times (configure.ac): Likewise.
26209         * modules/sys_types (configure.ac): Likewise.
26210         * modules/sys_uio (configure.ac): Likewise.
26211         * modules/sys_utsname (configure.ac): Likewise.
26212         * modules/sys_wait (configure.ac): Likewise.
26213         * modules/termios (configure.ac): Likewise.
26214         * modules/threads-h (configure.ac): Likewise.
26215         * modules/time (configure.ac): Likewise.
26216         * modules/uchar (configure.ac): Likewise.
26217         * modules/unistd (configure.ac): Likewise.
26218         * modules/utime-h (configure.ac): Likewise.
26219         * modules/wchar (configure.ac): Likewise.
26220         * modules/wctype-h (configure.ac): Likewise.
26221         * m4/af_alg.m4: Update after a macro name changed.
26222         * m4/ctime.m4: Likewise.
26223         * m4/explicit_bzero.m4: Likewise.
26224         * m4/ffs.m4: Likewise.
26225         * m4/ffsl.m4: Likewise.
26226         * m4/ffsll.m4: Likewise.
26227         * m4/flock.m4: Likewise.
26228         * m4/fstat.m4: Likewise.
26229         * m4/getaddrinfo.m4: Likewise.
26230         * m4/getdomainname.m4: Likewise.
26231         * m4/gettimeofday.m4: Likewise.
26232         * m4/hostent.m4: Likewise.
26233         * m4/ioctl.m4: Likewise.
26234         * m4/localtime.m4: Likewise.
26235         * m4/mbslen.m4: Likewise.
26236         * m4/memchr.m4: Likewise.
26237         * m4/memmem.m4: Likewise.
26238         * m4/mempcpy.m4: Likewise.
26239         * m4/memrchr.m4: Likewise.
26240         * m4/mktime.m4: Likewise.
26241         * m4/nanosleep.m4: Likewise.
26242         * m4/passfd.m4: Likewise.
26243         * m4/pselect.m4: Likewise.
26244         * m4/rawmemchr.m4: Likewise.
26245         * m4/select.m4: Likewise.
26246         * m4/servent.m4: Likewise.
26247         * m4/sigabbrev_np.m4: Likewise.
26248         * m4/sigdescr_np.m4: Likewise.
26249         * m4/sockpfaf.m4: Likewise.
26250         * m4/stat.m4: Likewise.
26251         * m4/stpcpy.m4: Likewise.
26252         * m4/stpncpy.m4: Likewise.
26253         * m4/strcase.m4: Likewise.
26254         * m4/strcasestr.m4: Likewise.
26255         * m4/strchrnul.m4: Likewise.
26256         * m4/strdup.m4: Likewise.
26257         * m4/strerror.m4: Likewise.
26258         * m4/strerror_r.m4: Likewise.
26259         * m4/strerrorname_np.m4: Likewise.
26260         * m4/strftime-fixes.m4: Likewise.
26261         * m4/strncat.m4: Likewise.
26262         * m4/strndup.m4: Likewise.
26263         * m4/strnlen.m4: Likewise.
26264         * m4/strpbrk.m4: Likewise.
26265         * m4/strptime.m4: Likewise.
26266         * m4/strsep.m4: Likewise.
26267         * m4/strsignal.m4: Likewise.
26268         * m4/strstr.m4: Likewise.
26269         * m4/strtok_r.m4: Likewise.
26270         * m4/strverscmp.m4: Likewise.
26271         * m4/time_r.m4: Likewise.
26272         * m4/time_rz.m4: Likewise.
26273         * m4/timegm.m4: Likewise.
26274         * m4/timespec_get.m4: Likewise.
26275         * m4/tzset.m4: Likewise.
26276         * modules/accept (configure.ac): Likewise.
26277         * modules/bind (configure.ac): Likewise.
26278         * modules/connect (configure.ac): Likewise.
26279         * modules/flock (configure.ac): Likewise.
26280         * modules/getpeername (configure.ac): Likewise.
26281         * modules/getsockname (configure.ac): Likewise.
26282         * modules/getsockopt (configure.ac): Likewise.
26283         * modules/listen (configure.ac): Likewise.
26284         * modules/recv (configure.ac): Likewise.
26285         * modules/recvfrom (configure.ac): Likewise.
26286         * modules/send (configure.ac): Likewise.
26287         * modules/sendto (configure.ac): Likewise.
26288         * modules/setsockopt (configure.ac): Likewise.
26289         * modules/shutdown (configure.ac): Likewise.
26290         * modules/socket (configure.ac): Likewise. Use the
26291         gl_*_H_REQUIRE_DEFAULTS macros.
26292         * modules/nonblocking (configure.ac): Use the gl_*_H_REQUIRE_DEFAULTS
26293         and gl_MODULE_INDICATOR_INIT_VARIABLE macros.
26294         * modules/sigpipe (configure.ac): Likewise.
26295         * modules/windows-stat-override (configure.ac): Likewise.
26296         * m4/nonblocking.m4: Update a comment.
26297         * m4/sigpipe.m4: Likewise.
26299 2021-04-11  Bruno Haible  <bruno@clisp.org>
26301         Rename GNULIB_OVERRIDES_CHAR16_T, GNULIB_OVERRIDES_CHAR32_T.
26302         * GNULIBHEADERS_OVERRIDE_CHAR16_T: Renamed from
26303         GNULIB_OVERRIDES_CHAR16_T.
26304         * GNULIBHEADERS_OVERRIDE_CHAR32_T: Renamed from
26305         GNULIB_OVERRIDES_CHAR32_T.
26307         Rename GNULIB_OVERRIDES_WINT_T.
26308         * GNULIBHEADERS_OVERRIDE_WINT_T: Renamed from GNULIB_OVERRIDES_WINT_T.
26310 2021-04-11  Bruno Haible  <bruno@clisp.org>
26312         increment-serial: New program.
26313         * build-aux/increment-serial: New file.
26315 2021-04-11  Bruno Haible  <bruno@clisp.org>
26317         useless-if-before-free: Implement --version option according to GCS.
26318         * build-aux/useless-if-before-free (copyright_year): New variable.
26319         (GetOptions): Print also a short copyright and license notice and
26320         author statement.
26322         libtool-next-version: Implement --version option according to GCS.
26323         * build-aux/libtool-next-version (scriptversion): New variable.
26324         (func_version): Deduce the copyright year from it. Terminate sentences
26325         with '.'.
26327         gnupload: Implement --version option according to GCS.
26328         * build-aux/gnupload (copyright_year, copyright): New variables.
26329         (--version): Print also a short copyright and license notice.
26331         git-version-gen: Implement --version option according to GCS.
26332         * build-aux/git-version-gen (version): State the license. Use wording
26333         from GCS.
26335         bootstrap: Implement --version option according to GCS.
26336         * build-aux/bootstrap (copyright_year, copyright): New variables.
26337         (--version): New option processing.
26339         announce-gen: Implement --version option according to GCS.
26340         * build-aux/announce-gen (copyright_year): New variable.
26341         (GetOptions): Print also a short copyright and license notice and
26342         author statement.
26344 2021-04-10  Bruno Haible  <bruno@clisp.org>
26346         Simplify GNULIB_* variable initializations.
26347         * modules/gnulib-common.m4 (gl_MODULE_INDICATOR_INIT_VARIABLE): New
26348         macro.
26349         * m4/arpa_inet_h.m4 (gl_ARPA_INET_H_DEFAULTS): Use it.
26350         * m4/ctype.m4 (gl_CTYPE_H_DEFAULTS): Likewise.
26351         * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): Likewise.
26352         * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Likewise.
26353         * m4/fnmatch_h.m4 (gl_FNMATCH_H_DEFAULTS): Likewise.
26354         * m4/glob_h.m4 (gl_GLOB_H_DEFAULTS): Likewise.
26355         * m4/iconv_h.m4 (gl_ICONV_H_DEFAULTS): Likewise.
26356         * m4/inttypes.m4 (gl_INTTYPES_H_DEFAULTS): Likewise.
26357         * m4/langinfo_h.m4 (gl_LANGINFO_H_DEFAULTS): Likewise.
26358         * m4/locale_h.m4 (gl_LOCALE_H_DEFAULTS): Likewise.
26359         * m4/malloc_h.m4 (gl_MALLOC_H_DEFAULTS): Likewise.
26360         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Likewise.
26361         * m4/monetary_h.m4 (gl_MONETARY_H_DEFAULTS): Likewise.
26362         * m4/netdb_h.m4 (gl_NETDB_H_DEFAULTS): Likewise.
26363         * m4/poll_h.m4 (gl_POLL_H_DEFAULTS): Likewise.
26364         * m4/pthread_h.m4 (gl_PTHREAD_H_DEFAULTS): Likewise.
26365         * m4/pty_h.m4 (gl_PTY_H_DEFAULTS): Likewise.
26366         * m4/sched_h.m4 (gl_SCHED_H_DEFAULTS): Likewise.
26367         * m4/search_h.m4 (gl_SEARCH_H_DEFAULTS): Likewise.
26368         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Likewise.
26369         * m4/spawn_h.m4 (gl_SPAWN_H_DEFAULTS): Likewise.
26370         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
26371         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Likewise.
26372         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Likewise.
26373         * m4/strings_h.m4 (gl_HEADER_STRINGS_H_DEFAULTS): Likewise.
26374         * m4/sys_file_h.m4 (gl_HEADER_SYS_FILE_H_DEFAULTS): Likewise.
26375         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H_DEFAULTS): Likewise.
26376         * m4/sys_random_h.m4 (gl_SYS_RANDOM_H_DEFAULTS): Likewise.
26377         * m4/sys_resource_h.m4 (gl_SYS_RESOURCE_H_DEFAULTS): Likewise.
26378         * m4/sys_select_h.m4 (gl_SYS_SELECT_H_DEFAULTS): Likewise.
26379         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_H_DEFAULTS): Likewise.
26380         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Likewise.
26381         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_DEFAULTS): Likewise.
26382         * m4/sys_times_h.m4 (gl_SYS_TIMES_H_DEFAULTS): Likewise.
26383         * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H_DEFAULTS): Likewise.
26384         * m4/sys_wait_h.m4 (gl_SYS_WAIT_H_DEFAULTS): Likewise.
26385         * m4/termios_h.m4 (gl_TERMIOS_H_DEFAULTS): Likewise.
26386         * m4/threads.m4 (gl_THREADS_H_DEFAULTS): Likewise.
26387         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Likewise.
26388         * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Likewise.
26389         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Likewise.
26390         * m4/utime_h.m4 (gl_UTIME_H_DEFAULTS): Likewise.
26391         * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Likewise.
26392         * m4/wctype_h.m4 (gl_WCTYPE_H_DEFAULTS): Likewise.
26394 2021-04-10  Paul Eggert  <eggert@cs.ucla.edu>
26396         realloc: fix undef typo
26397         * lib/realloc.c: #undef realloc if config.h defines it.
26398         This fixes a typo that I introduced in
26399         2011-04-08T18:39:01Z!eggert@cs.ucla.edu.
26400         Apparently nobody uses Gnulib realloc in that way?
26402 2021-04-07  Bruno Haible  <bruno@clisp.org>
26404         execute tests: Avoid test failure in certain environments.
26405         Reported by Dmitry V. Levin <ldv@altlinux.org> in
26406         <https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00082.html>.
26407         * tests/test-execute-main.c (main): Close file descriptors 3..19.
26408         * tests/test-execute-child.c (main): Remove NetBSD workaround.
26409         * modules/execute-tests (configure.ac): Test for close_range function.
26411 2021-04-07  Paul Eggert  <eggert@cs.ucla.edu>
26413         utimens: fix confusing arg type in internal func
26414         Although the old code was technically correct, this was accidental
26415         and it confused a GCC 11 prerelease.  Reported by Ondrej Dubaj in:
26416         https://lists.gnu.org/r/bug-tar/2021-04/msg00000.html
26417         * lib/utimens.c (update_timespec): Change arg type from ‘struct
26418         timespec *[2]’ (pointer to array of 2 pointers to timespecs) to
26419         ‘struct timespec **’ (pointer to pointer to the first timespec in
26420         an array of 2 timespecs).  Although the old code happened to be
26421         technically correct, it was misleading and confused Coverity.
26422         And though the type ‘struct timespec (**)[2]’ (pointer to pointer
26423         to array of 2 timespecs) would perhaps be more technically
26424         correct, it would be almost as confusing and would require changes
26425         elsewhere in this file; let’s quit while we’re ahead.
26427         xalloc: simplify integer overflow test
26428         * lib/xalloc.h (x2nrealloc): Simplify integer overflow detection.
26429         This is easier to maintain, and (unlike the old code) exact.
26431 2021-04-06  Paul Eggert  <eggert@cs.ucla.edu>
26433         group-member: minor tweak to omit a *
26434         * lib/group-member.c: Include intprops.h.
26435         (get_group_info): Use INT_MULTIPLY_WRAPV instead of
26436         xalloc_oversized (which does a multiplication) followed by the
26437         same multiplication.  The code was OK as-is; this is just
26438         conceptual simplification, possible now that we have xalloc_count_t.
26439         * modules/group-member: Depend on intprops.
26441         backupfile: less-aggressive buffer growth
26442         * lib/backupfile.c: Include intprops.h.
26443         (numbered_backup): Grow buffer by the usual 50%, not 100%.
26444         This is easier to do now that we have xalloc_count_t.
26445         * modules/backup-rename, modules/backupfile: Depend on intprops.
26447         xalloc-oversized: export xalloc_count_t
26448         * lib/xalloc-oversized.h (__xalloc_oversized, xalloc_oversized):
26449         * lib/xmalloca.h (nmalloca):
26450         Comment re restrictions on arg types.
26451         * lib/xalloc-oversized.h (xalloc_count_t): Rename from
26452         __xalloc_count_type; all uses changed.  This publicizes the type.
26454 2021-04-05  Paul Eggert  <eggert@cs.ucla.edu>
26456         xalloc: try to pacify gcc -Wsign-compare
26457         Problem reported by Marc Nieper-Wißkirchen in:
26458         https://lists.gnu.org/r/bug-gnulib/2021-04/msg00034.html
26459         * lib/xmalloc.c (xpalloc): For odd platforms where SIZE_MAX < IDX_MAX,
26460         use a tricky destination for INT_MULTIPLY_WRAPV instead of an
26461         explicit comparison to SIZE_MAX.  This should be more likely to
26462         pacify gcc -Wsign-compare.
26464 2021-04-05  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
26466         hamt: Fix coding errors.
26467         Reported by Bruno Haible in
26468         <https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00047.html>
26469         after a Coverity run.
26470         * lib/hamt.c (bucket_do_while, hamt_iterator): Add missing
26471         derefencing operator and silence a bogus warning on uninitialized
26472         variables.
26473         * tests/test-hamt.c (test_general): Replace two errorneous
26474         assignment operators with comparison operators.
26476 2021-04-05  Fabrice Fontaine  <fontaine.fabrice@gmail.com>
26478         pthread-cond: Fix compilation error.
26479         * lib/pthread-cond.c (pthread_cond_wait): Use tv.nsec instead of
26480         tv.usec.
26482 2021-04-04  Fabrice Fontaine  <fontaine.fabrice@gmail.com>
26484         pthread-cond: Fix wrong configure results when <pthread.h> is absent.
26485         * m4/pthread-cond.m4 (gl_PTHREAD_COND): When <pthread.h> does not exist,
26486         set HAVE_PTHREAD_COND_* to 0, not to 1.
26488 2021-04-04  Bruno Haible  <bruno@clisp.org>
26490         backupfile, backup-rename: Trim dependencies.
26491         * lib/backupfile.h: Add comment.
26492         * lib/backupfile.c: Include <dirent.h>, for readdir() declaration.
26493         * modules/backup-rename (Depends-on): Remove dirent-safer, fcntl. Add
26494         fcntl-h.
26495         * modules/backupfile (Depends-on): Likewise. Remove xalloc. Add
26496         xalloc-die.
26498 2021-04-04  Bruno Haible  <bruno@clisp.org>
26500         doc: Fix syntax error (regression from 2021-04-02).
26501         * doc/posix-functions/strtol.texi: Put @item inside @itemize block.
26503 2021-04-04  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
26505         hamt: Document the module in the Gnulib manual.
26506         Suggested by Bruno Haible in
26507         <https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00026.html>.
26508         * doc/containers.texi: Add a subsection to section 15.11 Container
26509         data types.
26510         * lib/hamt.h: Improve documentation on how Hamt_entry is supposed
26511         to be used.
26513 2021-04-03  Paul Eggert  <eggert@cs.ucla.edu>
26515         savedir: avoid unlikely undefined behavior
26516         * lib/savedir.c (streamsavedir): Prefer idx_to size_t where
26517         either will do.  Simplify reallocation of entries.
26518         Use xpalloc to reallocate name_space, to avoid some unlikely
26519         integer overflows.
26521         quotearg: avoid undefined and/or O(N**2)
26522         Avoid undefined and O(N**2) behavior in some very unlikely cases.
26523         * lib/quotearg.c (quotearg_n_options): Document that N must
26524         be less than MIN (INT_MAX, IDX_MAX), and add this to the
26525         abort test; this also avoids a conditional branch.
26526         Use xpalloc instead of xrealloc, to avoid O(N**2) behavior in
26527         very-unlikely cases.
26529         xgethostname: reorganize / simplify
26530         xgethostname and xgetdomainname were essentially copies long
26531         ago, but they’ve diverged.  Bring them back together again
26532         by implementing the (rarely used) latter in terms of the former.
26533         And avoid some unnecessary realloc calls while we’re at it.
26534         * lib/xgetdomainname.c: Rewrite from scratch so that it merely
26535         includes xgethostname.c with a few preliminaries.
26536         * lib/xgethostname.c: Generalize so that it can be included
26537         from xgetdomainname.c.
26538         (GETANAME, XGETANAME): New macros.
26539         (INITIAL_HOSTNAME_LENGTH): Remove.  No need for this parameter.
26540         Use 100 instead, as few hostnames are longer than that.
26541         (XGETANAME): Try getting the hostname into the stack first,
26542         as that avoids a malloc call in the usual case.
26543         Check for both POSIX-style truncation and SunOS 5.5 bug
26544         in a cleaner way, by simply checking string length.
26545         Don’t use x2realloc, which wastes time preserving buffer garbage;
26546         use xpalloc with NULL instead.  Don’t bother shrinking buffer
26547         in the very rare case where the hostname is longer than sizeof
26548         buf; it’s not worth the aggravation.
26549         * modules/xgetdomainname (Depends-on): Remove free-posix, xalloc.
26550         Add xgethostname.
26552 2021-04-03  Bruno Haible  <bruno@clisp.org>
26554         *-list tests: Add more tests.
26555         * tests/test-array_list.c (check_equals_by_forward_iteration,
26556         check_equals_by_backward_iteration): New functions.
26557         (main): Invoke them.
26558         * tests/test-carray_list.c: Likewise.
26559         * tests/test-linked_list.c: Likewise.
26560         * tests/test-linkedhash_list.c: Likewise.
26561         * tests/test-avltree_list.c: Likewise.
26562         * tests/test-avltreehash_list.c: Likewise.
26563         * tests/test-rbtree_list.c: Likewise.
26564         * tests/test-rbtreehash_list.c: Likewise.
26566         list: Add operations first_node, last_node.
26567         Reported by Marc Nieper-Wißkirchen in
26568         <https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00005.html>.
26569         * lib/gl_list.h (gl_list_first_node, gl_list_last_node): New functions.
26570         (struct gl_list_implementation): Add members first_node, last_node.
26571         * lib/gl_array_list.c (gl_array_first_node, gl_array_last_node): New
26572         functions.
26573         (gl_array_list_implementation): Add the new operations.
26574         * lib/gl_carray_list.c (gl_carray_first_node, gl_carray_last_node): New
26575         functions.
26576         (gl_carray_list_implementation): Add the new operations.
26577         * lib/gl_anylinked_list2.h (gl_linked_first_node, gl_linked_last_node):
26578         New functions.
26579         * lib/gl_linked_list.c (gl_linked_list_implementation): Add the new
26580         operations.
26581         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation):
26582         Likewise.
26583         * lib/gl_anytree_list2.h (gl_tree_first_node, gl_tree_last_node): New
26584         functions.
26585         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Add the new
26586         operations.
26587         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
26588         Likewise.
26589         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Likewise.
26590         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation):
26591         Likewise.
26592         * lib/gl_sublist.c (gl_sublist_first_node, gl_sublist_last_node): New
26593         functions.
26594         (gl_sublist_list_implementation): Add the new operations.
26595         * lib/gl_list.hh (class gl_List): Add member functions first_node,
26596         last_node.
26597         * doc/containers.texi: Update table.
26599 2021-04-03  Bruno Haible  <bruno@clisp.org>
26601         xalloc-die: Fix compilation error (regression from 2021-03-28).
26602         * lib/xalloc.h: Don't include idx.h and xalloc-oversized.h if the module
26603         'xalloc' is not in use.
26604         * modules/xalloc-die (Depends-on): Remove xalloc-oversized.
26606 2020-04-03  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
26608         hamt: New module.
26609         This module provides (persistent) hash array mapped tries.
26610         * MODULES.html.sh: Add hamt.
26611         * lib/hamt.c: New file.
26612         * lib/hamt.h: New file.
26613         * modules/hamt: New file.
26614         * modules/hamt-tests: New file.
26615         * tests/test-hamt.c: New file.
26617 2021-04-02  Bruno Haible  <bruno@clisp.org>
26619         strtoul, strtoll, strtoull: Fix compilation warning.
26620         * lib/strtol.c (strtol): Undefine before defining as a macro.
26622 2021-04-02  Bruno Haible  <bruno@clisp.org>
26624         strtoll: Work around a bug on native Windows and Minix.
26625         * lib/stdlib.in.h (strtoll): Override if REPLACE_STRTOLL is 1.
26626         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_STRTOLL.
26627         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Test whether strtoll works. Set
26628         REPLACE_STRTOLL.
26629         * modules/stdlib (Makefile.am): Substitute REPLACE_STRTOLL.
26630         * modules/strtoll (configure.ac): Test REPLACE_STRTOLL.
26631         * tests/test-strtoll.c (main): Add tests of hexadecimal integer syntax.
26632         * doc/posix-functions/strtoll.texi: Mention the bug.
26634 2021-04-02  Bruno Haible  <bruno@clisp.org>
26636         strtol: Work around a bug on native Windows and Minix.
26637         * lib/stdlib.in.h (strtol): New declaration.
26638         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether strtol is declared.
26639         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_STRTOL, HAVE_STRTOL,
26640         REPLACE_STRTOL.
26641         * m4/strtol.m4 (gl_FUNC_STRTOL): Require gl_STDLIB_H_DEFAULTS. Test
26642         whether strtol works. Set REPLACE_STRTOL.
26643         * modules/stdlib (Makefile.am): Substitute GNULIB_STRTOL, HAVE_STRTOL,
26644         REPLACE_STRTOL.
26645         * modules/strtol (Status, Notice): Remove.
26646         (Depends-on): Add stdlib.
26647         (configure.ac): Test HAVE_STRTOL and REPLACE_STRTOL. Invoke
26648         gl_STDLIB_MODULE_INDICATOR.
26649         * tests/test-strtol.c (main): Add tests of hexadecimal integer syntax.
26650         * doc/posix-functions/strtol.texi: Mention the bug.
26652 2021-04-02  Bruno Haible  <bruno@clisp.org>
26654         strtoull: Work around a bug on native Windows and Minix.
26655         * lib/stdlib.in.h (strtoull): Override if REPLACE_STRTOULL is 1.
26656         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_STRTOULL.
26657         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Test whether strtoull works. Set
26658         REPLACE_STRTOULL.
26659         * modules/stdlib (Makefile.am): Substitute REPLACE_STRTOULL.
26660         * modules/strtoull (configure.ac): Test REPLACE_STRTOULL.
26661         * tests/test-strtoull.c (main): Add tests of hexadecimal integer syntax.
26662         * doc/posix-functions/strtoull.texi: Mention the bug.
26664 2021-04-02  Bruno Haible  <bruno@clisp.org>
26666         strtoul: Work around a bug on native Windows and Minix.
26667         Reported by Eric Blake <eblake@redhat.com> in
26668         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00082.html>.
26669         * lib/stdlib.in.h (strtoul): New declaration.
26670         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether strtoul is declared.
26671         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_STRTOUL, HAVE_STRTOUL,
26672         REPLACE_STRTOUL.
26673         * m4/strtoul.m4 (gl_FUNC_STRTOUL): Require gl_STDLIB_H_DEFAULTS. Test
26674         whether strtoul works. Set REPLACE_STRTOUL.
26675         * modules/stdlib (Makefile.am): Substitute GNULIB_STRTOUL, HAVE_STRTOUL,
26676         REPLACE_STRTOUL.
26677         * modules/strtoul (Status, Notice): Remove.
26678         (Depends-on): Add stdlib.
26679         (configure.ac): Test HAVE_STRTOUL and REPLACE_STRTOUL. Invoke
26680         gl_STDLIB_MODULE_INDICATOR.
26681         * tests/test-strtoul.c (main): Add tests of hexadecimal integer syntax.
26682         * doc/posix-functions/strtoul.texi: Mention the bug.
26684 2021-04-02  Bruno Haible  <bruno@clisp.org>
26686         strtol, strtoul, strtoll, strtoull: Optimize.
26687         * lib/strtol.c (GROUP_PARAM_PROTO): New macro.
26688         (INTERNAL): Define differently if !USE_NUMBER_GROUPING.
26689         (INTERNAL (strtol)): Define without 'int group' parameter if
26690         !USE_NUMBER_GROUPING.
26691         (strtol): Don't define if !USE_NUMBER_GROUPING.
26693 2021-04-02  Bruno Haible  <bruno@clisp.org>
26695         strto*l: Don't pass invalid arguments to isspace, isalnum, toupper.
26696         * lib/strtol.c (ISSPACE, ISALPHA, TOUPPER): Cast argument to
26697         'unsigned char' before passing it to the functions isspace(), isalpha(),
26698         toupper().
26700 2021-04-02  Bruno Haible  <bruno@clisp.org>
26702         glob: Reject ~user syntax, when flag GLOB_TILDE_CHECK is given.
26703         Reported and patch suggested by Eli Zaretskii <eliz@gnu.org> in
26704         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00136.html>.
26705         * lib/glob.c (__glob) [WINDOWS32]: If flag GLOB_TILDE_CHECK is given, do
26706         error handling like when ~user is allowed by the user is unknown.
26708 2021-03-31  Paul Eggert  <eggert@cs.ucla.edu>
26710         xalloc: delay setting size until success
26711         * lib/xalloc.h (x2nrealloc): Don’t change *PN until after xrealloc
26712         succeeds, in case xalloc_die or one of its callees or longjmp
26713         targets uses *PN.  Similar code in xpalloc already does this.
26715 2021-03-28  Paul Eggert  <eggert@cs.ucla.edu>
26717         xalloc: new function xpalloc, from dfa
26718         Move xpalloc from dfa.c to xmalloc.c and change it from static to
26719         extern.  The function is useful in other contexts; I’m about to
26720         use it in coreutils.
26721         * lib/dfa.c: Include idx.h, instead of rolling our own idx_t and
26722         IDX_MAX.  Do not include intprops.h; no longer needed.
26723         (xpalloc): Move from here ...
26724         * lib/xmalloc.c (xpalloc): ... to here, and make it extern.
26725         Include intprops.h and minmax.h, needed by xpalloc.
26726         * lib/xalloc.h: Include idx.h, for idx_t.
26727         * modules/dfa (Depends-on): Add idx; remove intprops.
26728         * modules/xalloc (Depends-on): Add idx, intprops, minmax.
26730 2021-03-28  Bruno Haible  <bruno@clisp.org>
26732         linked-list tests: Add another test for SIGNAL_SAFE_LIST.
26733         * tests/test-asyncsafe-linked_list-strong.c: Renamed from
26734         tests/test-asyncsafe-linked_list.c.
26735         * tests/test-asyncsafe-linked_list-strong.sh: Renamed from
26736         tests/test-asyncsafe-linked_list.sh.
26737         * tests/test-asyncsafe-linked_list-weak.c: New file, based on
26738         tests/test-asyncsafe-linked_list.c.
26739         * tests/test-asyncsafe-linked_list-weak.sh: New file, based on
26740         tests/test-asyncsafe-linked_list.sh.
26741         * modules/linked-list-tests (Files): Add
26742         tests/test-asyncsafe-linked_list-weak.*,
26743         tests/test-asyncsafe-linked_list-strong.*.
26744         (Makefile.am): Arrange to test also
26745         tests/test-asyncsafe-linked_list-weak.sh. Mark
26746         test-asyncsafe-linked_list-weak.sh and
26747         test-asyncsafe-linked_list-strong.sh as expected failures.
26749 2021-03-27  Bruno Haible  <bruno@clisp.org>
26751         renameatu tests: Add unit test for bug found on macOS.
26752         * tests/test-renameatu.c (main): Add test for identical rename with
26753         RENAME_NOREPLACE.
26755 2021-03-26  Bruno Haible  <bruno@clisp.org>
26757         unistdio/*-vasnprintf: Fix errno value (regression from yesterday).
26758         * modules/unistdio/u8-vasnprintf (Depends-on): Add free-posix.
26759         * modules/unistdio/u8-u8-vasnprintf (Depends-on): Likewise.
26760         * modules/unistdio/u16-vasnprintf (Depends-on): Likewise.
26761         * modules/unistdio/u16-u16-vasnprintf (Depends-on): Likewise.
26762         * modules/unistdio/u32-vasnprintf (Depends-on): Likewise.
26763         * modules/unistdio/u32-u32-vasnprintf (Depends-on): Likewise.
26764         * modules/unistdio/ulc-vasnprintf (Depends-on): Likewise.
26766 2021-03-26  Bruno Haible  <bruno@clisp.org>
26768         vasnprintf: Fix memory leak (regression from yesterday).
26769         * lib/vasnprintf.c (VASNPRINTF): Restore omitted CLEANUP invocation.
26770         Some more simplifications of errno around free().
26772 2021-03-26  Akim Demaille  <akim@lrde.epita.fr>
26774         fprintf-posix: fix typo
26775         * modules/fprintf-posix (Depends-on): Fix typo.
26777 2021-03-25  Paul Eggert  <eggert@cs.ucla.edu>
26779         free-posix: use more often in other modules
26780         This lets us simplify cleanup code that calls ‘free’.
26781         * lib/amemxfrm.c (amemxfrm):
26782         * lib/areadlink-with-size.c (areadlink_with_size):
26783         * lib/areadlinkat-with-size.c (areadlinkat_with_size):
26784         * lib/astrxfrm.c (astrxfrm):
26785         * lib/dprintf.c (dprintf):
26786         * lib/execute.c (execute):
26787         * lib/execvpe.c (execvpe):
26788         * lib/fchdir.c (get_name):
26789         * lib/file-has-acl.c (file_has_acl):
26790         * lib/fprintf.c (fprintf):
26791         * lib/getcwd-lgpl.c (rpl_getcwd):
26792         * lib/getgroups.c (rpl_getgroups):
26793         * lib/link.c (link, rpl_link):
26794         * lib/linkat.c (link_immediate, link_follow, linkat_follow):
26795         * lib/localename.c (newlocale, duplocale):
26796         * lib/mgetgroups.c (mgetgroups):
26797         * lib/mountlist.c (read_file_system_list):
26798         * lib/pipe-filter-gi.c (pipe_filter_gi_close):
26799         * lib/putenv.c (_unsetenv, putenv):
26800         * lib/read-file.c (read_file):
26801         * lib/rename.c (rpl_rename):
26802         * lib/savedir.c (streamsavedir, savedir):
26803         * lib/spawni.c (do_open, __spawni):
26804         * lib/spawn-pipe.c (create_pipe):
26805         * lib/striconv.c (mem_cd_iconv, str_cd_iconv, str_iconv):
26806         * lib/striconveh.c (mem_cd_iconveh_internal, str_cd_iconveh)
26807         (mem_iconveh, str_iconveh):
26808         * lib/supersede.c (open_supersede, close_supersede):
26809         * lib/vasnprintf.c (VASNPRINTF):
26810         * lib/vdprintf.c (vdprintf):
26811         * lib/vfprintf.c (vfprintf):
26812         * lib/wcscoll-impl.h (wcscoll):
26813         * lib/wcsxfrm-impl.h (wcsxfrm):
26814         * lib/xgetdomainname.c (xgetdomainname):
26815         * lib/xgethostname.c (xgethostname):
26816         Simplify by assuming that ‘free’ preserves errno.
26817         * lib/localename.c: Do not include errno.h.
26818         * modules/amemxfrm, modules/areadlink-with-size:
26819         * modules/areadlinkat-with-size, modules/astrxfrm:
26820         * modules/c-vasnprintf, modules/dprintf, modules/execute:
26821         * modules/execvpe, modules/fchdir, modules/file-has-acl:
26822         * modules/fprintf-posix, modules/getcwd-lgpl, modules/getgroups:
26823         * modules/link, modules/linkat, modules/localename:
26824         * modules/mgetgroups, modules/mountlist, modules/pipe-filter-gi:
26825         * modules/posix_spawn-internal, modules/putenv, modules/read-file:
26826         * modules/rename, modules/savedir, modules/spawn-pipe:
26827         * modules/striconv, modules/striconveh, modules/supersede:
26828         * modules/vasnprintf, modules/vdprintf, modules/vfprintf-posix:
26829         * modules/wcscoll, modules/wcsxfrm, modules/xgetdomainname:
26830         * modules/xgethostname:
26831         Depend on free-posix.
26833 2021-03-24  Paul Eggert  <eggert@cs.ucla.edu>
26835         renameatu: work around macOS 11.2 renameatx_np bug
26836         * lib/renameatu.c (renameatu) [RENAME_EXCL]: Use lstatat test here too.
26838 2021-03-22  Bruno Haible  <bruno@clisp.org>
26840         clean-temp-simple: Fix a rare memory leak.
26841         * lib/clean-temp-simple.c (register_temporary_file): Fix cleanup code.
26843 2021-03-22  Bruno Haible  <bruno@clisp.org>
26845         clean-temp-simple: Relicense under LGPLv2+.
26846         * modules/clean-temp-simple (License): Change to LGPLv2+.
26848 2021-03-22  Bruno Haible  <bruno@clisp.org>
26850         clean-temp-simple: Remove dependency upon xalloc, xalloc-die, xlist.
26851         * lib/clean-temp-private.h (clean_temp_init): Change return type to
26852         'int'.
26853         * lib/clean-temp-simple.h (register_temporary_file): Change return type
26854         to 'int'.
26855         * lib/clean-temp-simple.c: Don't include xalloc.h, gl_xlist.h. Include
26856         gl_list.h instead.
26857         (init_failed): New variable.
26858         (do_clean_temp_init): Set it.
26859         (clean_temp_init): Return an error indicator.
26860         (register_temporary_file): Invoke gl_list_nx_create_empty instead of
26861         gl_list_create_empty. Invoke strdup instead of xstrdup. Invoke
26862         gl_list_nx_add_first instead of gl_list_add_first. Return an error
26863         indicator.
26864         * lib/clean-temp.c (create_temp_dir, gen_register_open_temp): Call
26865         xalloc_die() if clean_temp_init or register_temporary_file failed.
26866         * modules/clean-temp-simple (Depends-on): Remove xalloc, xalloc-die,
26867         xlist.
26869 2021-03-22  Bruno Haible  <bruno@clisp.org>
26871         clean-temp-simple: New module.
26872         * lib/clean-temp-simple.h: New file, based on lib/clean-temp.h.
26873         * lib/clean-temp-private.h: New file, based on lib/clean-temp.c.
26874         * lib/clean-temp-simple.c: New file, based on lib/clean-temp.c.
26875         * lib/clean-temp.h: Include clean-temp-simple.h.
26876         (register_temporary_file, unregister_temporary_file,
26877         cleanup_temporary_file): Remove declarations.
26878         * lib/clean-temp.c: Don't include <limits.h>, <stdint.h>. Include
26879         <signal.h>, <stdio.h>, clean-temp-simple.h, clean-temp-private.h.
26880         (file_cleanup_list_lock, file_cleanup_list): Moved to
26881         clean-temp-simple.c.
26882         (struct tempdir, dir_cleanup_list, struct closeable_fd, descriptors):
26883         Moved to clean-temp-private.h.
26884         (string_equals, SIZE_BITS, string_hash, fatal_signal_set,
26885         init_fatal_signal_set, asyncsafe_close): Moved to clean-temp-simple.c.
26886         (asyncsafe_fclose_variant): Use get_fatal_signal_set() here.
26887         (cleanup_action, do_init_clean_temp, clean_temp_once, init_clean_temp,
26888         register_temporary_file, unregister_temporary_file, do_unlink,
26889         cleanup_temporary_file): Moved to clean-temp-simple.c.
26890         (create_temp_dir, cleanup_temp_file, cleanup_temp_dir_contents,
26891         gen_register_open_temp, close_temp): Update for changed function names.
26892         (fclose_variant_temp): Don't call init_fatal_signal_set().
26893         * modules/clean-temp-simple: New file, based on modules/clean-temp.
26894         * modules/clean-temp (Depends-on): Add clean-temp-simple, list. Remove
26895         stdint.
26896         (configure.ac): Don't define SIGNAL_SAFE_LIST here.
26898 2021-03-22  Bruno Haible  <bruno@clisp.org>
26900         error: Relicense under LGPLv2+.
26901         Pino Toscano's approval is in
26902         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00109.html>.
26903         Paul Eggert's approval is in
26904         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00110.html>.
26905         * modules/error (License): Change to LGPLv2+.
26907 2021-03-22  Bruno Haible  <bruno@clisp.org>
26909         getprogname: Relicense under LGPLv2+.
26910         Pino Toscano's approval is in
26911         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00109.html>.
26912         Paul Eggert's approval is in
26913         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00110.html>.
26914         Jim Meyering's approval is in
26915         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00107.html>.
26916         Gisle Vanem's approval is in
26917         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00115.html>.
26918         Daniel Richard G's approval is in
26919         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00112.html>.
26920         John David Anglin's approval is in
26921         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00108.html>.
26922         Benji Wiebe's approval is in
26923         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00114.html>.
26924         * modules/getprogname (License): Change to LGPLv2+.
26926 2021-03-22  Bruno Haible  <bruno@clisp.org>
26928         fatal-signal: Relicense under LGPLv2+.
26929         Eric Blake's approval is in
26930         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00111.html>.
26931         * modules/fatal-signal (License): Change to LGPLv2+.
26933 2021-03-22  Bruno Haible  <bruno@clisp.org>
26935         doc: Mention an open glibc bug.
26936         * doc/posix-functions/mbrtowc.texi: Mention the possible out-of-range
26937         wchar_t values returned by this function on glibc.
26938         * doc/posix-functions/mbtowc.texi: Likewise.
26940 2021-03-22  Benno Schulenberg  <bensberg@telfort.nl>  (tiny change)
26942         mbrtowc: Remove a redundant condition.
26943         * lib/mbrtowc-impl-utf8.h: There is no need to check for c == 0xf4
26944         when !(c < 0xf4), as ten lines earlier c <= 0xf4 was established.
26946 2021-03-22  Bruno Haible  <bruno@clisp.org>
26948         linkedhash-list: Relicense under LGPLv2+.
26949         Paul Eggert's approval is in
26950         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00102.html>.
26951         * modules/linkedhash-list (License): Change to LGPLv2+.
26953 2021-03-21  Bruno Haible  <bruno@clisp.org>
26955         fatal-signal: Remove dependency upon xalloc.
26956         * lib/fatal-signal.h (at_fatal_signal): Change return type to 'int'.
26957         * lib/fatal-signal.c: Don't include xalloc.h.
26958         (at_fatal_signal): Return an error indicator.
26959         * modules/fatal-signal (Depends-on): Remove xalloc.
26960         * NEWS: Mention the change.
26961         * lib/term-style-control.c: Include xalloc.h.
26962         (ensure_other_signal_handlers): Test return value of at_fatal_signal.
26963         * lib/clean-temp.c (do_init_clean_temp): Likewise.
26964         * lib/wait-process.c (register_slave_subprocess): Likewise.
26965         * modules/term-style-control (Depends-on): Add xalloc-die.
26966         * modules/clean-temp (Depends-on): Likewise.
26967         * modules/wait-process (Depends-on): Likewise.
26969 2021-03-21  Paul Eggert  <eggert@cs.ucla.edu>
26971         diacrit: remove
26972         * MODULES.html.sh (func_all_modules), NEWS: Remove diacrit.
26973         * lib/diacrit.c, lib/diacrit.h, modules/diacrit: Remove.
26975         tests: fix signed overflow issues
26976         * tests/test-dynarray.c (value_at): Avoid undefined behavior
26977         in signed integer multiplication.
26978         * tests/test-scratch-buffer.c (byte_at): Likewise, for the
26979         theoretically-possible case where size_t is narrower than int.
26981 2021-03-21  Bruno Haible  <bruno@clisp.org>
26983         doc: More updates.
26984         * doc/glibc-functions/sethostname.texi: Update regarding macOS.
26985         * doc/glibc-functions/sethostname.texi: List the affected platforms.
26987         doc: Update for macOS 11.1.
26988         * doc/posix-headers/*.texi: Update.
26989         * doc/glibc-headers/*.texi: Update.
26990         * doc/posix-functions/*.texi: Likewise.
26991         * doc/pastposix-functions/*.texi: Likewise.
26992         * doc/glibc-functions/*.texi: Likewise.
26993         * m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Update cross-compilation
26994         guess.
26996 2021-03-21  Bruno Haible  <bruno@clisp.org>
26998         ftell: Document bug in macOS >= 10.15.
26999         * doc/posix-functions/ftell.texi: Mention the macOS bug.
27001 2021-03-20  Bruno Haible  <bruno@clisp.org>
27003         ftello: Work around bug in macOS >= 10.15.
27004         Reported by Martin Storsjö <martin@martin.st> in
27005         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00002.html>.
27006         * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): On macOS, don't define
27007         FUNC_UNGETC_BROKEN. Instead, set gl_ftello_broken_after_ungetc to yes.
27008         * m4/ftello.m4 (gl_FUNC_FTELLO): Invoke gl_FUNC_UNGETC_WORKS, and
27009         arrange to provide the workaround if ftello is broken after ungetc.
27010         * lib/ftello.c: Include <errno.h>, intprops.h.
27011         (ftello) [FTELLO_BROKEN_AFTER_UNGETC]: Implement from scratch.
27012         * modules/ftello (Files): Add m4/ungetc.m4.
27013         (Depends-on): Add intprops.
27014         * doc/posix-functions/ftello.texi: Mention the macOS bug.
27016 2021-03-20  Bruno Haible  <bruno@clisp.org>
27018         math C++ tests: Fix compilation error on macOS 11.2.
27019         * lib/math.in.h (isnan): For clang >= 12 on macOS, declare 'rpl_isnan',
27020         not 'isnan'.
27022 2021-03-18  Bruno Haible  <bruno@clisp.org>
27024         simple-atomic tests: Fix compilation error on Solaris 10.
27025         Reported by Tom G. Christensen <tgc@jupiterrise.com> in
27026         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00085.html>.
27027         * tests/test-simple-atomic.c (yield): Define only after all #includes.
27029 2021-03-18  Bruno Haible  <bruno@clisp.org>
27031         simple-atomic: Fix compilation error on Solaris 10/x86_64 with cc.
27032         * lib/simple-atomic.c (atomic_compare_and_swap_ptr): Correct asm
27033         instruction.
27035 2021-03-18  Paul Eggert  <eggert@cs.ucla.edu>
27037         argmatch: fix testing typo
27038         Problem and fix reported by Gisle Vanem in:
27039         https://lists.gnu.org/r/bug-gnulib/2021-03/msg00083.html
27040         * lib/argmatch.c (main) [TEST]: Fix address-of typo.
27042 2021-03-14  Paul Eggert  <eggert@cs.ucla.edu>
27044         intprops: improve commentary
27045         * lib/intprops.h: Improve comments about promotion etc.
27047 2021-03-14  Bruno Haible  <bruno@clisp.org>
27049         time_rz: Put reference documentation into the .h file.
27050         * lib/time.in.h (timezone_t, tzalloc, tzfree, localtime_rz, mktime_z):
27051         Add comments, based on modules/time_rz.
27052         * modules/time_rz (Comment): Remove section.
27054 2021-03-14  Bruno Haible  <bruno@clisp.org>
27056         parse-datetime tests: Avoid a test failure on NetBSD.
27057         Reported by Thomas Klausner <tk@giga.or.at> in
27058         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00069.html>.
27059         * tests/test-parse-datetime.c (main): Skip two tests on NetBSD.
27061 2021-03-10  Paul Eggert  <eggert@cs.ucla.edu>
27063         libc-config: port to DragonFlyBSD 5.9
27064         DragonFlyBSD defines __nonnull incompatibly with glibc,
27065         so avoid the use of __nonnull in Gnulib code.
27066         Problem reported by Gavin Smith in:
27067         https://lists.gnu.org/r/bug-gnulib/2021-03/msg00066.html
27068         * lib/cdefs.h (__attribute_nonnull__): Rename from __nonnull.
27069         All uses in Gnulib changed.  There should be no need to change
27070         glibc code that is not shared with Gnulib.
27071         (__nonnull): New macro, defined in terms of __attribute_nonnull__,
27072         and which can be used in glibc code that is not shared with Gnulib.
27074 2021-03-07  Paul Eggert  <eggert@cs.ucla.edu>
27076         manywarnings: modernize documentation
27077         Problem reported by Reuben Thomas in:
27078         https://lists.gnu.org/r/bug-gnulib/2021-03/msg00046.html
27079         * doc/manywarnings.texi (manywarnings): Update in
27080         the light of recent changes to the manywarnings module.
27082 2021-03-07  Bruno Haible  <bruno@clisp.org>
27084         sysexits: Fix for Haiku.
27085         * lib/sysexits.in.h: Don't assume that <sysexits.h>, when it exists,
27086         defines anything.
27087         * doc/glibc-headers/sysexits.texi: Mention the Haiku bug.
27089 2021-03-07  Bruno Haible  <bruno@clisp.org>
27091         Rename GNULIB_WCHAR_SINGLE to GNULIB_WCHAR_SINGLE_LOCALE.
27092         * lib/lc-charset-dispatch.c: Test GNULIB_WCHAR_SINGLE_LOCALE instead of
27093         GNULIB_WCHAR_SINGLE.
27094         * lib/wcwidth.c: Likewise.
27095         * tests/test-wcwidth.c: Likewise.
27096         * doc/multithread.texi: Document GNULIB_WCHAR_SINGLE_LOCALE instead of
27097         GNULIB_WCHAR_SINGLE.
27098         * NEWS: Document the change.
27100 2021-03-06  Bruno Haible  <bruno@clisp.org>
27102         mbrtowc: Allow locking optimization independently of 'unlocked-io'.
27103         * lib/mbtowc-lock.h: Test GNULIB_MBRTOWC_SINGLE_THREAD instead of
27104         USE_UNLOCKED_IO.
27105         * doc/multithread.texi: Document GNULIB_MBRTOWC_SINGLE_THREAD.
27107 2021-03-06  Bruno Haible  <bruno@clisp.org>
27109         regex: Allow locking optimization independently of 'unlocked-io'.
27110         * lib/regex_internal.h: Test GNULIB_REGEX_SINGLE_THREAD instead of
27111         USE_UNLOCKED_IO.
27112         * doc/multithread.texi: Document GNULIB_REGEX_SINGLE_THREAD.
27114 2021-03-06  Bruno Haible  <bruno@clisp.org>
27116         exclude: Allow stdio optimization independently of 'unlocked-io'.
27117         * lib/exclude.c: Test GNULIB_EXCLUDE_SINGLE_THREAD instead of
27118         USE_UNLOCKED_IO.
27119         * modules/exclude (Depends-on): Add unlocked-io-internal.
27120         * doc/multithread.texi: Document GNULIB_EXCLUDE_SINGLE_THREAD.
27122 2021-03-06  Bruno Haible  <bruno@clisp.org>
27124         readutmp: Optimize stdio accesses.
27125         * lib/readutmp.c: Include unlocked-io.h unconditionally.
27126         * modules/readutmp (Depends-on): Add unlocked-io-internal.
27128 2021-03-06  Bruno Haible  <bruno@clisp.org>
27130         mountlist: Optimize stdio accesses.
27131         * lib/mountlist.c: Include unlocked-io.h unconditionally.
27132         * modules/mountlist (Depends-on): Add unlocked-io-internal.
27134 2021-03-06  Bruno Haible  <bruno@clisp.org>
27136         getusershell: Optimize stdio accesses when possible.
27137         * lib/getusershell.c: Test GNULIB_GETUSERSHELL_SINGLE_THREAD instead of
27138         USE_UNLOCKED_IO.
27139         * modules/getusershell (Depends-on): Add unlocked-io-internal.
27140         * doc/multithread.texi: Document GNULIB_GETUSERSHELL_SINGLE_THREAD.
27142 2021-03-06  Bruno Haible  <bruno@clisp.org>
27144         unlocked-io-internal: New module.
27145         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Don't define
27146         USE_UNLOCKED_IO here.
27147         * modules/unlocked-io-internal: New file, based on modules/unlocked-io.
27148         * modules/unlocked-io (Description): Clarify.
27149         (Files, Depends-on): Just use the unlocked-io-internal module.
27150         (configure.ac): Define GNULIB_STDIO_SINGLE_THREAD and USE_UNLOCKED_IO
27151         here.
27152         * doc/multithread.texi: Clarify when the 'unlocked-io' module can be
27153         used.
27155 2021-03-06  Bruno Haible  <bruno@clisp.org>
27157         posixtm: Remove unused includes.
27158         * lib/posixtm.c: Don't include <stdio.h>, <sys/types.h>, unlocked-io.h.
27160 2021-03-06  Bruno Haible  <bruno@clisp.org>
27162         dynarray: Add tests.
27163         * tests/test-dynarray.c: New file.
27164         * modules/dynarray-tests: New file.
27166         dynarray: Make the module usable on its own.
27167         * lib/dynarray.h: Document the exported API. Comments taken from
27168         lib/malloc/dynarray-skeleton.c and lib/malloc/dynarray.h.
27169         Distinguish an internal include from an include for instantiation.
27170         In the latter case, include <libc-config.h> and
27171         <malloc/dynarray-skeleton.c>.
27172         * modules/dynarray (Depends-on): Add intprops.
27173         (Include): Reduce to just "dynarray.h".
27175 2021-03-06  Bruno Haible  <bruno@clisp.org>
27177         scratch_buffer: Add comment.
27178         * lib/scratch_buffer.h: Add comment.
27180 2021-03-06  Paul Eggert  <eggert@cs.ucla.edu>
27182         parse-datetime2: fix licensing
27183         Problem reported by Bruno Haible in:
27184         https://lists.gnu.org/r/bug-gnulib/2021-03/msg00017.html
27185         * gnulib-tool (func_get_license): Treat parse-datetime2
27186         (actually, anything starting with "parse-datetime")
27187         like parse-datetime, as far as licenses go.
27189 2021-03-06  Bruno Haible  <bruno@clisp.org>
27191         free-posix: Update documentation.
27192         * doc/posix-functions/free.texi: Add platform details.
27194 2021-03-06  Bruno Haible  <bruno@clisp.org>
27196         doc: Update for glibc 2.33.
27197         * doc/glibc-functions/mallinfo2.texi: New file.
27198         * doc/gnulib.texi: Include it.
27199         (Glibc sys/vtimes.h): Remove section.
27200         * doc/glibc-functions/vtimes.texi: Remove file.
27201         * doc/pastposix-functions/h_errno.texi: Update.
27202         * doc/posix-functions/*.texi: Likewise.
27203         * doc/glibc-functions/*.texi: Likewise.
27205 2021-03-04  Bruno Haible  <bruno@clisp.org>
27207         stddef: Generalize tcc workaround to other compilers.
27208         Suggested by Paul Eggert in
27209         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00027.html>.
27210         * lib/stddef.in.h: Undefine the __need_* macros with all compilers.
27211         * doc/posix-headers/stddef.texi: Mention that the TinyCC bug also exists
27212         on macOS.
27214 2021-03-04  Paul Eggert  <eggert@cs.ucla.edu>
27216         stdalign: port to tcc + glibc
27217         * lib/stdalign.in.h (_Alignas): Do not define using __attribute__
27218         if __attribute__ is defined as a macro, as __attribute__ surely a
27219         no-op in that case and this is an area where __attribute__ cannot
27220         simply be ignored.
27221         * m4/stdalign.m4 (gl_STDALIGN_H): Include <stdint.h> so that
27222         it #defines __attribute__(x) to nothing on glibc-based systems
27223         when non-GNU-C-compatible compilers are used.
27224         This exposes a bug in Tiny C Compiler 0.9.27’s implementation
27225         of _Alignas on glibc platforms.
27227 2021-03-03  Bruno Haible  <bruno@clisp.org>
27229         asyncsafe-spin, simple-atomic: Add support for tcc/x86.
27230         * lib/asyncsafe-spin.c (memory_barrier): With tcc/x86, don't use the
27231         'mfence' instruction.
27232         * lib/simple-atomic.c (memory_barrier): Likewise.
27234         asyncsafe-spin, simple-atomic: Add support for tcc.
27235         * lib/asyncsafe-spin.c (memory_barrier, atomic_compare_and_swap): On
27236         i386 and x86_64, treat tcc like older GCC or clang.
27237         * lib/simple-atomic.c (memory_barrier, atomic_compare_and_swap,
27238         atomic_compare_and_swap_ptr): Likewise.
27240 2021-03-02  Bruno Haible  <bruno@clisp.org>
27242         stddef: Work around an interoperability problem of tcc with glibc.
27243         Reported by Luca Saiu <positron@gnu.org> in
27244         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00011.html>.
27245         * lib/stddef.in.h [__TINYC__]: In case of the special invocation
27246         convention, undefine the macros that TinyCC's <stddef.h> should undefine
27247         but doesn't.
27248         * doc/posix-headers/stddef.texi: Mention the TinyCC bug.
27250 2021-03-02  Paul Eggert  <eggert@cs.ucla.edu>
27252         mbrtowc: port to AIX 7.1 with xlc 12.1
27253         Fix a problem with locks when building GNU Tar (Savannah commit
27254         55f2a0772e08b9febac3ac0de5cb048d4c60d2f5) on AIX 7.1 with IBM XL
27255         C/C++ V12.1 using ‘./configure CC=xlc’.  The link fails due to
27256         missing definitions of pthread_mutex_lock and
27257         pthread_mutex_unlock.  GNU Tar uses unlocked-io and so
27258         should not need to worry about multithreading or locks.
27259         * lib/mbtowc-lock.h (mbtowc_with_lock) [USE_UNLOCKED_IO]:
27260         Don’t bother with locks, since this app is single-threaded.
27261         There may be similar linking problems with lib/nl_langinfo.c and
27262         lib/setlocale_null.c but my GNU Tar build didn’t run into them, so
27263         I left them alone for now.
27265 2021-03-01  Paul Eggert  <eggert@cs.ucla.edu>
27267         unlocked-io: do not redefine getc_unlocked etc.
27268         I ran into this problem on AIX 7.1 with GNU Tar, which
27269         enables visibility of getc_unlocked etc. after testing
27270         whether they’re declared, causing argp-namefrob.h and
27271         unlocked-io.h to redefine the macros.
27272         * lib/argp-namefrob.h, lib/unlocked-io.h:
27273         (clearerr_unlocked, feof_unlocked ferror_unlocked)
27274         (fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked)
27275         (fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked)
27276         (putc_unlocked, putchar_unlocked): Do not define if already defined.
27278         parse-datetime2: new module
27279         This splits the old parse-datetime into two parts; the
27280         first is parse-datetime2 which supports all the new bells
27281         and whistles, the second is parse-datetime, which reverts to
27282         its original intent.  This avoids some bogus diagnostics
27283         when build GNU Tar with gcc -flto -fanalyze and
27284         with --enable-gcc-warnings.  And it slims down the
27285         executable a bit.
27286         * NEWS: Mention this.
27287         * lib/parse-datetime.y (parser_control) [!GNULIB_PARSE_DATETIME2]:
27288         Omit parse_datetime_debug member.
27289         (debugging): New function.  Use it everywhere the old code
27290         would load parse_datetime_debug.
27291         (parse_datetime_body): New static function, with the body
27292         of the old parse_datetime2.  Set pc.parse_datetime_debug
27293         only if GNULIB_PARSE_DATETIME2.
27294         (parse_datetime2, parse_datetime): Use this new function.
27295         (parse_datetime2) [!GNULIB_PARSE_DATETIME2]: Remove.
27296         * modules/parse-datetime2: New file.
27298 2021-02-27  Bruno Haible  <bruno@clisp.org>
27300         string-buffer: Fixes.
27301         * modules/string-buffer (License): Change to LGPL.
27302         * tests/test-string-buffer.c (main): Add another sb_appendf call, that
27303         is more likely to fail.
27305 2021-02-25  Bernhard Voelker  <mail@bernhard-voelker.de>
27307         gitlog-to-changelog: output SHA in "empty commit message" warning
27308         * build-aux/gitlog-to-changelog: Add $sha to above warning diagnostic.
27310 2021-02-24  Paul Eggert  <eggert@cs.ucla.edu>
27312         glob: include libc-config.h in a more-standard way
27313         Inspired by Tom Tromey’s report for RHEL 6 in:
27314         https://lists.gnu.org/r/bug-gnulib/2021-02/msg00088.html
27315         * lib/glob.c [!_LIBC]: Include libc-config.h, not just config.h
27316         * lib/glob.in.h: Include libc-config.h only if needed.
27318 2021-02-21  Bruno Haible  <bruno@clisp.org>
27320         string-buffer: Add tests.
27321         * tests/test-string-buffer.c: New file.
27322         * modules/string-buffer-tests: New file.
27324         string-buffer: New module.
27325         * lib/string-buffer.h: New file.
27326         * lib/string-buffer.c: New file.
27327         * modules/string-buffer: New file.
27328         * doc/posix-functions/open_memstream.texi: Mention the new module.
27330 2021-02-21  Bruno Haible  <bruno@clisp.org>
27332         scratch_buffer: Document the exported API.
27333         * lib/scratch_buffer.h: Add comments, taken from
27334         lib/malloc/scratch_buffer.h.
27336 2021-02-21  Bruno Haible  <bruno@clisp.org>
27338         DEPENDENCIES: Update.
27339         * DEPENDENCIES: Require GCC >= 3.1. Tell where to find working GNU m4
27340         tarballs. Mention awk. Point to pre-built packages for gettext, bison,
27341         gperf, texinfo.
27343 2021-02-20  Bruno Haible  <bruno@clisp.org>
27345         parse-datetime: Fix comment.
27346         * modules/parse-datetime (Makefile.am): Fix comment.
27348 2021-02-16  Bruno Haible  <bruno@clisp.org>
27350         passfd: Fix test failure on FreeBSD >= 12 and NetBSD in 64-bit mode.
27351         * lib/passfd.c (recvfd): Use the CMSG_SPACE macro to compute the value
27352         for msg_controllen.
27354 2021-02-16  Paul Eggert  <eggert@cs.ucla.edu>
27356         Port better to macOS Mojave
27357         Problem reported by Tom Shields in:
27358         https://lists.gnu.org/r/bug-gnulib/2021-02/msg00064.html
27359         * config/srclist.txt: Comment out dynarray_finalize.c.
27360         * lib/dynarray.h (__libc_dynarray_at_failure): Don’t include
27361         libc-config.h here, as that’s the includer’s responsibility.
27362         * lib/malloc/dynarray_at_failure.c:
27363         * lib/malloc/dynarray_emplace_enlarge.c:
27364         * lib/malloc/dynarray_finalize.c:
27365         * lib/malloc/dynarray_resize.c:
27366         * lib/malloc/dynarray_resize_clear.c:
27367         If _LIBC is not defined, include libc-config.h.
27369 2021-02-15  Bruno Haible  <bruno@clisp.org>
27371         linked-list test: Add test for SIGNAL_SAFE_LIST. (It currently fails.)
27372         * tests/test-asyncsafe-linked_list.sh: New file.
27373         * tests/test-asyncsafe-linked_list.c: New file.
27374         * modules/linked-list-tests (Files): Add them.
27375         (Depends-on): Add thread, yield, nanosleep, sigaction, sigprocmask.
27376         (Makefile.am): Arrange to compile test-asyncsafe-linked_list.c and run
27377         test-asyncsafe-linked_list.sh.
27379 2021-02-14  Bruno Haible  <bruno@clisp.org>
27381         simple-atomic: Add tests.
27382         * tests/test-simple-atomic.c: New file.
27383         * modules/simple-atomic-tests: New file.
27385         simple-atomic: New module.
27386         * lib/simple-atomic.h: New file.
27387         * lib/simple-atomic.c: New file, based on lib/asyncsafe-spin.c.
27388         * modules/simple-atomic: New file.
27390 2021-02-14  Bruno Haible  <bruno@clisp.org>
27392         Fix distinction of 32-bit/64-bit mode with xlc 13.1.3 on AIX.
27393         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI, gl_HOST_CPU_C_ABI_32BIT):
27394         Test __LP64__ instead of _ARCH_PPC64.
27395         * m4/lib-ld.m4 (AC_LIB_PROG_LD): Likewise.
27396         * lib/stddef.in.h: Likewise.
27398 2021-02-13  Ozkan Sezer  <sezeroz@gmail.com>
27400         lib-symbol-visibility: Make it work with -Wmissing-prototypes.
27401         * m4/visibility.m4 (gl_VISIBILITY): Avoid error from simultaneous use of
27402         -Wmissing-prototypes and -Werror.
27404 2021-02-08  Bruno Haible  <bruno@clisp.org>
27406         stddef: Fix test-stddef compilation error on MidnightBSD/x86.
27407         * lib/stddef.in.h (_GL_STDDEF_ALIGNAS, rpl_max_align_t, max_align_t):
27408         Don't ignore HAVE_MAX_ALIGN_T if the compiler is clang.
27410 2021-02-08  Bruno Haible  <bruno@clisp.org>
27412         Document non-standard prototypes on MidnightBSD.
27413         * doc/posix-functions/initstate.texi: Mention different prototype on
27414         MidnightBSD 2.0.
27415         * doc/posix-functions/srandom.texi: Likewise.
27416         * doc/posix-functions/getlogin_r.texi: Likewise.
27417         * doc/glibc-functions/sethostname.texi: Likewise.
27419 2021-02-08  Bruno Haible  <bruno@clisp.org>
27421         posixtm tests: Fix warnings seen on MidnightBSD/x86.
27422         * tests/test-posixtm.c (main): Convert two 'time_t' values to 'long' for
27423         printing.
27425 2021-02-07  Bruno Haible  <bruno@clisp.org>
27427         Add cross-compilation guesses for MidnightBSD.
27428         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): When cross-compiling, use the
27429         result from native compilation.
27430         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Likewise.
27431         * m4/mbrtoc32.m4 (gl_MBRTOC32_SANITYCHECK): Likewise.
27432         * m4/mprotect.m4 (gl_FUNC_MPROTECT_WORKS): Likewise.
27433         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_SECURE): Likewise.
27434         * m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_INFINITE,
27435         gl_PRINTF_INFINITE_LONG_DOUBLE, gl_PRINTF_DIRECTIVE_F,
27436         gl_SNPRINTF_TRUNCATION_C99, gl_SNPRINTF_RETVAL_C99,
27437         gl_SNPRINTF_DIRECTIVE_N, gl_VSNPRINTF_ZEROSIZE_C99): Likewise.
27438         * m4/strfmon_l.m4 (gl_FUNC_STRFMON_L): Likewise.
27439         * m4/setlocale_null.m4 (gl_FUNC_SETLOCALE_NULL): Use predetermined
27440         result on MidnightBSD.
27442 2021-02-07  Bruno Haible  <bruno@clisp.org>
27444         threadlib: Add support for MidnightBSD.
27445         * m4/threadlib.m4 (gl_WEAK_SYMBOLS, gl_THREADLIB_BODY): On MidnightBSD,
27446         use the same test as on FreeBSD.
27448 2021-02-07  Bruno Haible  <bruno@clisp.org>
27450         host-os: Add support for MidnightBSD.
27451         * m4/host-os.m4 (gl_HOST_OS): On MidnightBSD, set HOST_OPERATING_SYSTEM
27452         to "MidnightBSD", not "Midnightbsd".
27454 2021-02-07  Bruno Haible  <bruno@clisp.org>
27456         c-stack: Adjust for MidnightBSD.
27457         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): On MidnightBSD,
27458         set FAULT_YIELDS_SIGBUS.
27460 2021-02-07  Bruno Haible  <bruno@clisp.org>
27462         relocatable-prog: Add support for MidnightBSD.
27463         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Use the ELF $ORIGIN trick
27464         also on MidnightBSD >= 1.1.
27465         * build-aux/config.libpath: Treat MidnightBSD like FreeBSD.
27466         * build-aux/reloc-ldflags: Likewise.
27468 2021-02-07  Bruno Haible  <bruno@clisp.org>
27470         havelib: Add support for MidnightBSD.
27471         * build-aux/config.rpath: Treat MidnightBSD like FreeBSD >= 4.
27473 2021-02-07  Bruno Haible  <bruno@clisp.org>
27475         wcwidth: Document MidnightBSD bug.
27476         * doc/posix-functions/wcwidth.texi: Mention MidnightBSD as an affected
27477         platform.
27478         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Update comments.
27480 2021-02-07  Bruno Haible  <bruno@clisp.org>
27482         pthread_sigmask: Document MidnightBSD bug.
27483         * doc/posix-functions/pthread_sigmask.texi: Mention MidnightBSD as an
27484         affected platform.
27485         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Update
27486         cross-compilation guess accordingly.
27488 2021-02-07  Bruno Haible  <bruno@clisp.org>
27490         immutable: Avoid test failures on MidnightBSD.
27491         * tests/test-immutable.c (install_segv_handler): On FreeBSD, install the
27492         handler also for SIGBUS.
27494 2021-02-07  Bruno Haible  <bruno@clisp.org>
27496         c32is*: Avoid test failures on MidnightBSD.
27497         * tests/test-c32isalnum.c (main): On FreeBSD, disable tests that fail on
27498         MidnightBSD 1.1.
27499         * tests/test-c32isalpha.c (main): Likewise.
27500         * tests/test-c32isblank.c (main): Likewise.
27501         * tests/test-c32islower.c (main): Likewise.
27502         * tests/test-c32isupper.c (main): Likewise.
27504 2021-02-05  Paul Eggert  <eggert@cs.ucla.edu>
27506         regex: fix comment location
27507         * lib/regexec.c (update_regs): Move comment.
27509         regex-tests: add bug 11053 test
27510         * tests/test-regex.c (main): New test case for glibc bug 11053.
27512         regex: debug check for set member duplicates
27513         * lib/regex_internal.c (re_node_set_insert): Add a DEBUG_ASSERT
27514         that would have caught some recently-fixed performance bugs
27515         that caused sets to contain duplicate members.
27517         regex: fix longstanding backref match bug
27518         This fixes a longstanding glibc bug concerning backreferences
27519         <https://sourceware.org/11053> (2009-12-04).
27520         * lib/regexec.c (proceed_next_node, push_fail_stack)
27521         (pop_fail_stack): Push and pop the previous registers
27522         as well as the current ones.  All callers changed.
27523         (set_regs): Also pop if CUR_NODE has already been checked,
27524         so that it does not get added as a duplicate set entry.
27525         (update_regs): Fix comment location.
27526         * tests/test-regex.c (tests): New constant.
27527         (bug_regex11): New test function.
27528         (main): Bump alarm value.  Call new test function.
27530         regex: avoid duplicate in espilon closure
27531         * lib/regcomp.c (calc_eclosure_iter): Insert NODE into epsilon
27532         closure first rather than last.  Otherwise, the epsilon closure
27533         might contain a duplicate of NODE.
27535         regex-tests: fix typo
27536         * tests/test-regex.c (main): Fix typo that would have caused an
27537         old test case to report incorrect values on failure.
27539         regex: make it easier to merge into glibc
27540         * lib/regex_internal.h [_LIBC]: Do not include Gnulib’s dynarray.h.
27542         regex: minor refactoring
27543         * lib/regexec.c (proceed_next_node): Use more-local decls.
27545         regex: avoid undefined behavior
27546         * lib/regexec.c (pop_fail_stack): If the stack is empty, return -1
27547         instead of indulging in undefined behavior.  This simplifies
27548         callers, and avoids undefined behavior in some cases (see glibc
27549         bug 11053, though this change does not fix that overall bug).
27551         regex: improve comments
27552         * lib/regexec.c: Add and correct comments about return values.
27554 2021-01-31  Bruno Haible  <bruno@clisp.org>
27556         relocatable-prog-wrapper: Tweak today's patch.
27557         * build-aux/install-reloc (func_create_wrapper): Clean up free.o.
27559 2021-01-31  Bruno Haible  <bruno@clisp.org>
27561         fmaf: Document QEMU bug.
27562         * doc/posix-functions/fmaf.texi: Add note about QEMU bug.
27564 2021-01-31  Bruno Haible  <bruno@clisp.org>
27566         remainderl: Work around musl libc bug.
27567         * doc/posix-functions/remainderl.texi: Document musl libc bug.
27568         * m4/remainderl.m4 (gl_FUNC_REMAINDERL_WORKS): Add more tests. Update
27569         cross compilation guess.
27571 2021-01-31  Bruno Haible  <bruno@clisp.org>
27573         log2l: Work around musl libc bugs.
27574         * doc/posix-functions/log2l.texi: Document musl libc bugs.
27575         * m4/log2l.m4 (gl_FUNC_LOG2L_WORKS): Add more tests. Update cross
27576         compilation guess.
27578 2021-01-31  Bruno Haible  <bruno@clisp.org>
27580         log1pl: Work around musl libc bug.
27581         * doc/posix-functions/log1pl.texi: Document musl libc bug.
27582         * m4/log1pl.m4 (gl_FUNC_LOG1PL_WORKS): New macro.
27583         (gl_FUNC_LOG1PL): Invoke it.
27585 2021-01-31  Bruno Haible  <bruno@clisp.org>
27587         log10l: Document musl libc bug.
27588         * doc/posix-functions/log10l.texi: Document musl libc bug.
27589         * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Update comment and cross
27590         compilation guess.
27592 2021-01-31  Bruno Haible  <bruno@clisp.org>
27594         logl: Document musl libc bug.
27595         * doc/posix-functions/logl.texi: Document musl libc bug.
27596         * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Update comment and cross
27597         compilation guess.
27599 2021-01-31  Bruno Haible  <bruno@clisp.org>
27601         expm1l: Document musl libc bug.
27602         * doc/posix-functions/expm1l.texi: Document musl libc bug.
27603         * m4/expm1l.m4 (gl_FUNC_EXPM1L): Update comment and cross
27604         compilation guess.
27606 2021-01-31  Bruno Haible  <bruno@clisp.org>
27608         expl: Document musl libc bug.
27609         * doc/posix-functions/expl.texi: Document musl libc bug.
27610         * m4/expl.m4 (gl_FUNC_EXPL): Update comment and cross
27611         compilation guess.
27613 2021-01-31  Bruno Haible  <bruno@clisp.org>
27615         relocatable-prog-wrapper: Update after recent changes.
27616         * lib/relocwrapper.c: Update comments.
27617         * modules/relocatable-prog-wrapper (Files): Add lib/scratch_buffer.h,
27618         lib/malloc/scratch_buffer*, lib/malloc.c, lib/realloc.c, lib/free.c,
27619         lib/mempcpy.c, lib/rawmemchr.c, m4/lstat.m4. Remove lib/lstat.c.
27620         (Depends-on): Add c99, eloop-threshold, fcntl-h, idx, intprops,
27621         libc-config, stddef, sys_stat. Remove alloca-opt.
27622         (configure.ac): Invoke gl_FUNC_MALLOC_POSIX, gl_FUNC_REALLOC_POSIX,
27623         gl_FUNC_FREE, gl_FUNC_MEMPCPY, gl_FUNC_RAWMEMCHR.
27624         * lib/canonicalize-lgpl.c (memmove): Undefine in the relocwrapper.
27625         * build-aux/install-reloc (func_create_wrapper): Compile also
27626         malloc/scratch_buffer_*.c, malloc.c, realloc.c, free.c, mempcpy.c,
27627         rawmemchr.c. Don't compile lstat.c.
27629         Make it possible to compile rawmemchr.c separately, unconditionally.
27630         * lib/rawmemchr.c: Don't define rawmemchr if not needed.
27632         Make it possible to compile mempcpy.c separately, unconditionally.
27633         * lib/mempcpy.c: Don't define mempcpy if not needed.
27635         Make it possible to compile free.c separately, unconditionally.
27636         * m4/free.m4 (gl_FUNC_FREE): Define HAVE_FREE_POSIX.
27637         * lib/free.c: Don't define rpl_free if not needed.
27639         Make it possible to compile realloc.c separately, unconditionally.
27640         * modules/realloc-posix (configure.ac): Invoke gl_MODULE_INDICATOR.
27641         * lib/realloc.c: Don't define rpl_realloc if not needed.
27643         Make it possible to compile malloc.c separately, unconditionally.
27644         * modules/malloc-posix (configure.ac): Invoke gl_MODULE_INDICATOR.
27645         * lib/malloc.c: Don't define rpl_malloc if not needed.
27647 2021-01-31  Bruno Haible  <bruno@clisp.org>
27649         canonicalize-lgpl: Simplify.
27650         * lib/canonicalize-lgpl.c (_GL_USE_STDLIB_ALLOC): Remove macro.
27652 2021-01-30  Bruno Haible  <bruno@clisp.org>
27654         canonicalize, canonicalize-lgpl: Straighten dependencies.
27655         * modules/canonicalize-lgpl (Depends-on): Remove free-posix,
27656         malloc-posix. Add unistd.
27657         * modules/canonicalize (Depends-on): Remove free-posix, xalloc.
27658         Add unistd.
27660 2021-01-30  Bruno Haible  <bruno@clisp.org>
27662         scratch_buffer: Fix dependencies.
27663         * modules/scratch_buffer (Depends-on): Add malloc-posix, realloc-posix,
27664         free-posix.
27666 2021-01-26  Bruno Haible  <bruno@clisp.org>
27668         doc: More precise wording.
27669         Reported by Reuben Thomas <rrt@sc3d.org> in
27670         <https://lists.gnu.org/archive/html/bug-gnulib/2021-01/msg00300.html>.
27671         * doc/relocatable.texi (Enabling Relocatability): Talk about package
27672         management systems in general.
27674         doc: Remove obsolete text.
27675         Suggested by Reuben Thomas <rrt@sc3d.org> in
27676         <https://lists.gnu.org/archive/html/bug-gnulib/2021-01/msg00299.html>.
27677         * doc/relocatable.texi (Enabling Relocatability): Stop mentioning an
27678         issue of libtool 1.5.x.
27680 2021-01-26  Simon Josefsson  <simon@josefsson.org>
27682         maintainer-makefile: Mimic bootstrap's gnulib-srcdir guessing.
27683         * top/maint.mk (gnulib_dir): If $(srcdir)/gnulib doesn't exist,
27684         fall back to $GNULIB_SRCDIR.
27686 2021-01-25  Bruno Haible  <bruno@clisp.org>
27688         posix_spawn_file_actions_* tests: Fix module dependencies.
27689         * modules/posix_spawn_file_actions_addclose-tests (Depends-on): Add
27690         posix_spawn_file_actions_destroy.
27691         * modules/posix_spawn_file_actions_addopen-tests (Depends-on): Likewise.
27692         * modules/posix_spawn_file_actions_adddup2-tests (Depends-on): Likewise.
27693         * modules/posix_spawn_file_actions_addchdir-tests (Depends-on):
27694         Likewise.
27695         * modules/posix_spawn_file_actions_addfchdir-tests (Depends-on):
27696         Likewise.
27698 2021-01-25  Bruno Haible  <bruno@clisp.org>
27700         posix_spawn_file_actions_addclose: Relax configure test.
27701         * m4/posix_spawn.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE): Test a
27702         negative file descriptor, not an out-of-range file descriptor.
27703         * tests/test-posix_spawn_file_actions_addclose.c (main): Add comment.
27704         * doc/posix-functions/posix_spawn_file_actions_addclose.texi: Update.
27706 2021-01-25  Simon Josefsson  <simon@josefsson.org>
27708         getaddrinfo: Doc fix.
27709         * doc/posix-functions/getaddrinfo.texi (getaddrinfo): Gnulib does
27710         not support IDN.
27712 2021-01-24  Bruno Haible  <bruno@clisp.org>
27714         getcwd: Fix cross-compilation guess for musl libc.
27715         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Guess no also on
27716         musl libc.
27717         * doc/posix-functions/getcwd.texi: Update platform info.
27719 2021-01-24  Bruno Haible  <bruno@clisp.org>
27721         expm1l: Fix configure test result with GCC 10 on powerpc64le.
27722         * m4/expm1l.m4 (gl_FUNC_EXPM1L): Change test to avoid GCC optimization.
27724 2021-01-23  Bruno Haible  <bruno@clisp.org>
27726         utime: Fix configure test (regression 2020-12-04).
27727         Reported by Ryan Schmidt <wget@ryandesign.com> via Tim Rühsen in
27728         <https://lists.gnu.org/archive/html/bug-gnulib/2021-01/msg00282.html>.
27729         * m4/utime.m4 (gl_FUNC_UTIME): In the test program, include <utime.h>,
27730         not <time.h>.
27732 2021-01-23  Paul Eggert  <eggert@cs.ucla.edu>
27734         libc-config: port to Xcode 7
27735         Problem reported by Mattias Engdegård in:
27736         https://lists.gnu.org/r/emacs-devel/2021-01/msg01089.html
27737         * lib/cdefs.h (__nonnull): If already defined but glibc is not in
27738         use, override the definition with Gnulib’s _GL_ATTRIBUTE_NONNULL.
27739         This is needed for Xcode 7, which has a ‘#define __nonnull
27740         _Nonnull’ builtin for backwards-compatibility with an older Xcode
27741         syntax that GNUish code never uses.
27743 2021-01-23  Bastien Roucariès  <rouca@debian.org>
27745         explicit_bzero: Add fallback for other compilers.
27746         * lib/explicit_bzero.c (explicit_bzero): For other compilers, invoke
27747         memset through a volatile function pointer.
27749         explicit_bzero: Add support for clang.
27750         * lib/explicit_bzero.c (explicit_bzero): Add a compiler barrier for
27751         clang.
27753 2021-01-21  Paul Eggert  <eggert@cs.ucla.edu>
27755         Port FALLTHROUGH to clang 3.4 and earlier
27756         Problem reported by Akim Demaille in:
27757         https://lists.gnu.org/r/bug-gnulib/2021-01/msg00241.html
27758         * lib/cdefs.h (__glibc_has_attribute):
27759         * m4/gnulib-common.m4 (gl_COMMON_BODY):
27760         Do not trust __has_attribute in clang 3.4 and earlier, as
27761         <https://releases.llvm.org/3.5.0/tools/clang/docs/ReleaseNotes.html>
27762         says that __has_attribute is unreliable in these old versions.
27764 2021-01-20  Bruno Haible  <bruno@clisp.org>
27766         gc-random: Fix link error in tests.
27767         * modules/crypto/gc-random (Link): New section.
27768         * modules/crypto/gc-tests (Makefile.am): Link test-gc with
27769         $(LIB_GETRANDOM).
27771 2021-01-20  Simon Josefsson  <simon@josefsson.org>
27773         gc-random: Replace implementation with call to getrandom.
27774         * lib/gc-gnulib.c [GNULIB_GC_RANDOM]: Replace #include's with
27775         those needed for getrandom.
27776         (gc_init): Remove old randomness code.
27777         (gc_done): Likewise.
27778         (randomize): Rewrite using getrandom, inspired by getentropy.
27779         * m4/gc-random.m4: Remove file.
27780         * modules/crypto/gc-random: Drop gc-random.m4, gl_GC_RANDOM, and
27781         LIB_GC_RANDOM.  Add conditional dependency on getrandom.
27782         * modules/crypto/gc-tests (test_gc_LDADD): Drop LIB_GC_RANDOM.
27784 2021-01-20  Bruno Haible  <bruno@clisp.org>
27786         exec*e tests: Avoid test failures on Cygwin.
27787         * tests/test-execle-main.c (main): On Cygwin, add /bin to the new PATH.
27788         * tests/test-execve-main.c (main): Likewise.
27789         * tests/test-execvpe-main.c (main): Likewise.
27791 2021-01-20  Bruno Haible  <bruno@clisp.org>
27793         canonicalize-lgpl: Work around a Cygwin bug.
27794         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Test for lstat. Add a
27795         test case that involves a symbolic link to an existing file.
27796         * doc/posix-functions/realpath.texi: Mention the Cygwin bug.
27798 2021-01-20  Bruno Haible  <bruno@clisp.org>
27800         doc: Document ptsname_r bug on Cygwin.
27801         * doc/glibc-functions/ptsname_r.texi: Mention Cygwin bug.
27803 2021-01-20  Bruno Haible  <bruno@clisp.org>
27805         sethostname tests: Avoid test failure on Cygwin.
27806         * tests/test-sethostname2.c (main): Treat errno EACCESS like EPERM.
27808 2021-01-19  Paul Eggert  <eggert@cs.ucla.edu>
27810         fnmatch, regex, fts: FALLTHROUGH consistency
27811         Be more consistent about how FALLTHROUGH is defined.
27812         For Gnulib, use attribute.h.  For glibc, use __GNUC__ >= 7.
27813         Problem for glibc reported by Vaseeharan Vinayagamoorthy in:
27814         https://sourceware.org/pipermail/libc-alpha/2021-January/121778.html
27815         * lib/fnmatch.c (FALLTHROUGH) [_LIBC]:
27816         * lib/regex_internal.h (FALLTHROUGH) [_LIBC]:
27817         Don’t worry about Clang, as it’s not needed and provokes GCC.
27818         * lib/fts.c (FALLTHROUGH) [!_LIBC]:
27819         * lib/regex_internal.h (FALLTHROUGH) [!_LIBC]:
27820         Rely on attribute.h for FALLTHROUGH
27821         * modules/regex: Depend on attribute module.
27823 2021-01-19  KO Myung-Hun  <komh78@gmail.com>
27825         spawn-pipe: Fix SIGSEGV on OS/2 kLIBC.
27826         * lib/spawn-pipe.c [OS/2 kLIBC]: Check directory correctly if it means
27827         a current directory.
27829 2021-01-19  KO Myung-Hun  <komh78@gmail.com>
27831         dirent: Fix compilation error in C++ mode on OS/2 kLIBC.
27832         * lib/dirent.in.h (dirfd): Redefine dirfd macro as a rpl function
27833         always.
27835 2021-01-19  KO Myung-Hun  <komh78@gmail.com>
27837         zerosize-ptr: Fix compilation on OS/2 kLIBC.
27838         * tests/zerosize-ptr.h [OS/2 kLIBC]: Don't use mmap().
27840 2021-01-19  KO Myung-Hun  <komh78@gmail.com>
27842         stddef: Fix compilation for max_align_t on OS/2 kLIBC.
27843         * lib/stddef.in.h [OS/2 kLIBC]: Include <cstddef> in C++ mode.
27845 2021-01-19  KO Myung-Hun  <komh78@gmail.com>
27847         yield: Implement for OS/2 kLIBC.
27848         * modules/yield (Depends-on): Add sched_yield.
27850         sched_yield: Implement for OS/2 kLIBC.
27851         * lib/sched_yield.c (sched_yield) [OS/2 kLIBC]: New implementation.
27853 2021-01-19  KO Myung-Hun  <komh78@gmail.com>
27855         spawn: Use special invocation for <spawn.h> on OS/2 kLIBC.
27856         * lib/spawn.in.h: Use special invocation to include <spawn.h> properly
27857         on OS/2 kLIBC.
27859 2021-01-18  Bruno Haible  <bruno@clisp.org>
27861         noreturn tests: Avoid test failure on Solaris 10/x86 with cc.
27862         * tests/test-noreturn.c (main): Return 0.
27864 2021-01-18  Bruno Haible  <bruno@clisp.org>
27866         uninorm tests: Fix compilation error on Cygwin.
27867         * tests/uninorm/test-nfc.c (n): Don't define when using a preinstalled
27868         libunistring on Windows.
27869         * tests/uninorm/test-nfd.c (n): Likewise.
27870         * tests/uninorm/test-nfkc.c (n): Likewise.
27871         * tests/uninorm/test-nfkd.c (n): Likewise.
27873 2021-01-17  Bruno Haible  <bruno@clisp.org>
27875         immutable: Implement on native Windows.
27876         * lib/immutable.h (IMMUTABLE_EFFECTIVE): Set to 1 on native Windows.
27877         * lib/immutable.c: Include <windows.h>.
27878         (CreateFileMapping): New macro.
27879         (init_pagesize, init_mmap_file, alloc_pages, free_pages): Add
27880         implementation for native Windows.
27882 2021-01-17  Bruno Haible  <bruno@clisp.org>
27884         canonicalize-lgpl tests: Fix link error.
27885         * modules/canonicalize-lgpl-tests (Makefile.am): Link
27886         test-canonicalize-lgpl with $(LIBINTL).
27888 2021-01-17  Bruno Haible  <bruno@clisp.org>
27890         canonicalize-lgpl: Work around // handling in realpath() of musl 1.2.2.
27891         Reported by Natanael Copa <ncopa@alpinelinux.org> in
27892         <https://lists.gnu.org/archive/html/bug-gettext/2021-01/msg00021.html>.
27893         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Add a test whether // is
27894         the same as /, on Linux only.
27895         * lib/canonicalize-lgpl.c: Correct indentation of preprocessor
27896         directives.
27897         * doc/posix-functions/realpath.texi: Mention the musl 1.2.2 bug.
27899 2021-01-17  Bruno Haible  <bruno@clisp.org>
27901         canonicalize[-lgpl] tests: Add more tests.
27902         * tests/test-canonicalize.c (main): Add detailed tests for // handling.
27903         * tests/test-canonicalize-lgpl.c (main): Likewise.
27905 2021-01-17  Bruno Haible  <bruno@clisp.org>
27907         argp tests: Avoid test failures on Alpine Linux.
27908         * tests/test-argp-2.sh: Use the test framework (init.sh). Use the
27909         'compare' function instead of 'diff -c'.
27910         * tests/test-argp-version-etc-1.sh: Likewise.
27912 2021-01-17  Bruno Haible  <bruno@clisp.org>
27914         get-rusage-data tests: Avoid test failure on musl libc.
27915         * modules/get-rusage-data-tests (Files): Add m4/musl.m4.
27916         (configure.ac): Invoke gl_MUSL_LIBC.
27917         * tests/test-get-rusage-data.c (main): Treat musl libc like glibc.
27919 2021-01-17  Bruno Haible  <bruno@clisp.org>
27921         immutable, get-rusage-data: Fix autoconf warning.
27922         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Define through AC_DEFUN_ONCE.
27924 2021-01-16  Bruno Haible  <bruno@clisp.org>
27926         vma-iter: Port to 64-bit Haiku.
27927         * lib/vma-iter.c (vma_iterate): Adapt to changed signature of
27928         get_next_area_info.
27930 2021-01-15  Bruno Haible  <bruno@clisp.org>
27932         doc: Update doc about realpath.
27933         * doc/posix-functions/realpath.texi: Update info about macOS.
27935 2021-01-13  Paul Eggert  <eggert@cs.ucla.edu>
27937         verify: simplify static_assert configuration
27938         * lib/verify.h (_GL_HAVE__STATIC_ASSERT, _GL_HAVE__STATIC_ASSERT1):
27939         Do not define for C++.  This should be good enough nowadays,
27940         since recent-enough C++ compilers have static_assert.
27941         (_GL_HAVE_STATIC_ASSERT_CXX11, _GL_HAVE_STATIC_ASSERT_CXX17):
27942         Remove.  All uses replaced by simply checking __cpp_static_assert.
27944 2021-01-13  Simon Josefsson  <simon@josefsson.org>
27946         lib-msvc-compat: Update libtool usage recommendation.
27947         * doc/ld-output-def.texi (Visual Studio Compatibility): Install
27948         .def files into libdir, not bindir.  Have libfoo-*.def file depend
27949         on libfoo.la to fix parallell builds.
27951 2021-01-12  Bruno Haible  <bruno@clisp.org>
27953         verify: Use C++11 static_assert when available.
27954         Reported by Alexandre Duret-Lutz <adl@lrde.epita.fr> in
27955         <https://lists.gnu.org/archive/html/bug-gnulib/2021-01/msg00177.html>.
27956         * lib/verify.h (_GL_HAVE_STATIC_ASSERT_CXX11): New macro.
27957         (_GL_HAVE_STATIC_ASSERT_CXX17): Renamed from _GL_HAVE_STATIC_ASSERT1.
27958         (_GL_VERIFY): Use static_assert when available with C++11 syntax.
27960 2021-01-11  Paul Eggert  <eggert@cs.ucla.edu>
27962         tempname: consume less entropy
27963         Derived from a glibc patch proposed by Adhemerval Zanella in:
27964         https://sourceware.org/pipermail/libc-alpha/2021-January/121302.html
27965         * lib/tempname.c: Include stdbool.h.
27966         (random_bits): New arg use_getrandom.
27967         (try_tempname_len): Skip getrandom on the first try,
27968         unless __GT_NOCREATE.
27969         * modules/tempname (Depends-on): Add stdbool.
27971 2021-01-10  Bruno Haible  <bruno@clisp.org>
27973         lchmod-tests: Fix link error.
27974         * modules/lchmod-tests (Makefile.am): Don't assume that LIBINTL is set.
27976 2021-01-10  Simon Josefsson  <simon@josefsson.org>
27978         Correct preceeding change.
27979         * top/gitsub.sh: Update link.
27981 2021-01-09  Bruno Haible  <bruno@clisp.org>
27983         immutable: Add tests.
27984         * tests/test-immutable.sh: New file.
27985         * tests/test-immutable.c: New file.
27986         * modules/immutable-tests: New file.
27988         immutable: New module.
27989         * lib/immutable.h: New file.
27990         * lib/immutable.c: New file.
27991         * m4/immutable.m4: New file.
27992         * m4/mprotect.m4: New file, based on libffcall/m4/codeexec.m4.
27993         * modules/immutable: New file.
27995 2021-01-10  Simon Josefsson  <simon@josefsson.org>
27997         Use https:// instead of git://.
27998         * build-aux/bootstrap (default_gnulib_url): Ditto.
27999         * config/srclistvars.sh: Ditto.
28000         * doc/gnulib-readme.texi (Git Checkout): Ditto.
28001         * doc/gnulib-tool.texi (VCS Issues): Ditto.
28002         * top/gitsub.sh: Update link.
28004 2021-01-09  Paul Eggert  <eggert@cs.ucla.edu>
28006         snippet/_Noreturn: port to pedantic clang
28007         Problem reported by Joe Nelson in:
28008         https://lists.gnu.org/r/bug-gnulib/2021-01/msg00152.html
28009         * doc/noreturn.texi: Improve.
28010         * lib/_Noreturn.h (_Noreturn):
28011         * m4/gnulib-common.m4 (gl_COMMON_BODY):
28012         Do not assume _Noreturn works as-is when __STRICT_ANSI__ is
28013         defined, unless __STDC_VERSION__ indicates C11 or later.
28014         * lib/_Noreturn.h (_Noreturn): Fall back on __attribute__
28015         ((__noreturn__)) if Clang; this merges the
28016         2020-08-10T23:53:13Zbruno@clisp.org patch to m4/gnulib-common.m4.
28018 2021-01-09  Darshit Shah  <darnir@gnu.org>
28020         Allow setting CVS username for gnu-web-doc-update.
28021         * build-aux/gnu-web-doc-update: Introduce new option --user to set the
28022         name of the user on Savannah, when it doesn't match $USER.
28024 2021-01-09  Bruno Haible  <bruno@clisp.org>
28026         exp* tests: Work around clang 6.0.1 optimization bugs on x86.
28027         * tests/test-exp-ieee.h (test_function): Mark some variable as
28028         'volatile'.
28029         * tests/test-exp2-ieee.h (test_function): Likewise.
28031 2021-01-09  Bruno Haible  <bruno@clisp.org>
28033         fchmodat: Work around trailing slash bug in fchmodat() on AIX 7.2.
28034         * m4/fchmodat.m4 (gl_FUNC_FCHMODAT): In the test whether fchmodat works,
28035         also test for the trailing slashes behaviour. Define
28036         HAVE_NEARLY_WORKING_FCHMODAT if this is the only missing feature.
28037         * lib/fchmodat.c (fchmodat): If HAVE_NEARLY_WORKING_FCHMODAT, handle
28038         trailing slashes here.
28039         * modules/fchmodat (Depends-on): Sort by condition, not alphabetically.
28040         * doc/posix-functions/fchmodat.texi: Document the AIX bug.
28042 2021-01-09  Bruno Haible  <bruno@clisp.org>
28044         fchmod-tests, fchmodat tests, lchmod tests: Add more tests.
28045         * tests/test-fchmod.c: Include <fcntl.h>.
28046         (BASE): New macro.
28047         (main): Add more tests.
28048         * tests/test-fchmodat.c (main): Add more tests.
28049         * tests/test-lchmod.c (main): Likewise.
28051 2021-01-09  Bruno Haible  <bruno@clisp.org>
28053         utimensat: Fix typo in last commit.
28054         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Fix typo in macro explanation.
28056 2021-01-09  Bruno Haible  <bruno@clisp.org>
28058         truncate: Document last workaround.
28059         * doc/posix-functions/truncate.texi: Document the AIX bug.
28061 2021-01-08  Paul Eggert  <eggert@cs.ucla.edu>
28063         dynarray: work even if ‘free’ is replaced
28064         Problem reported by Darshit Shah in:
28065         https://lists.gnu.org/r/bug-gnulib/2021-01/msg00140.html
28066         * lib/malloc/dynarray-skeleton.c (DYNARRAY_FREE): New macro.
28067         Use it everywhere instead of DYNARRAY_NAME (free).
28069         tempname: don’t block for minutes
28070         Derived from a patch proposed by Adhemerval Zanella in:
28071         https://sourceware.org/pipermail/libc-alpha/2021-January/121302.html
28072         * lib/tempname.c (random_bits): Use GRND_NONBLOCK.
28074         tempname: sync with proposed glibc patch
28075         This is from Adhemerval Zanella in:
28076         https://sourceware.org/pipermail/libc-alpha/2021-January/121301.html
28077         * lib/tempname.c (__lxstat64): Remove.
28078         (__lstat64, __stat64): New replacement macros.  All uses changed.
28080         regex: stop using alloca
28081         * lib/regex_internal.h: Do not include <alloca.h> or define
28082         __libc_use_alloca or alloca.  Patch written by Adhemerval Zanella:
28083         https://sourceware.org/pipermail/libc-alpha/2021-January/121374.html
28084         * modules/regex (Depends-on): Remove alloca-opt.
28086         regexec: remove alloca usage in build_trtable
28087         Prompted by this different change proposed by Adhemerval Zanella:
28088         https://sourceware.org/pipermail/libc-alpha/2021-January/121373.html
28089         * lib/regexec.c (build_trtable): Prevent inlining,
28090         so that it doesn’t bloat the caller’s stack.
28091         Use auto variables instead of alloca/malloc.
28092         After these changes, build_trtable’s total stack allocation is
28093         only 20 KiB on a 64-bit machine, and this is less than glibc’s 64
28094         KiB cutoff so there’s little point to using alloca to shrink it.
28095         Although Gnulib traditionally has used a 4 KiB cutoff, going to 20
28096         KiB here should not be a significant problem in practice;
28097         Gnulib-using packages concerned about overflow of tiny stacks can
28098         compile with something like gcc -fstack-clash-protection.
28100         scratch_buffer: add scratch_buffer_dupfree macro
28101         * lib/scratch_buffer.h (__libc_scratch_buffer_dupfree):
28102         New macro, needed to support recent changes in this module.
28104         regex: remove alloca usage on regex set_regs
28105         Derived from this patch by Adhemerval Zanella:
28106         https://sourceware.org/pipermail/libc-alpha/2021-January/121372.html
28107         * lib/regex_internal.h: Include dynarray.h, for Gnulib.
28108         * lib/regexec.c (DYNARRAY_STRUCT, DYNARRAY_ELEMENT)
28109         (DYNARRAY_PREFIX): New macros.
28110         Include malloc/dynarray-skeleton.c.
28111         (set_regs): Use dynarray rather than alloca.
28112         * modules/regex (Depends-on): Add dynarray.
28114         dynarray: new module
28115         * config/srclist.txt: Mention the new files.
28116         * lib/cdefs.h (__attribute_maybe_unused__): New macro,
28117         like Gnulib’s _GL_ATTRIBUTE_MAYBE_UNUSED but with glibc
28118         naming conventions.
28119         * lib/libc-config.h: Use it instead of __glibc_likely.
28120         * lib/dynarray.h, modules/dynarray: New files.
28121         * lib/malloc/dynarray-skeleton.c, lib/malloc/dynarray.h:
28122         * lib/malloc/dynarray_at_failure.c:
28123         * lib/malloc/dynarray_emplace_enlarge.c:
28124         * lib/malloc/dynarray_finalize.c, lib/malloc/dynarray_resize.c:
28125         * lib/malloc/dynarray_resize_clear.c, modules/dynarray:
28126         New files, from glibc with the following changes needed for
28127         portability to compilers that are not recent-enough GCC.
28128         * lib/malloc/dynarray_at_failure.c: Include stdlib.h, for abort.
28129         (__libc_dynarray_at_failure) [!_LIBC]: Simply abort.
28130         * lib/malloc/dynarray_emplace_enlarge.c:
28131         * lib/malloc/dynarray_resize.c:
28132         Include intprops.h, and use INT_MULTIPLY_WRAPV instead
28133         of __builtin_mul_overflow.
28134         * lib/malloc/dynarray.h (__libc_dynarray_at_failure):
28135         Use _Noreturn instead of __attribute__ ((noreturn)).
28136         * lib/malloc/dynarray_resize_clear.c: Do not include stdlib.h;
28137         it’s not needed.
28138         (__libc_dynarray_resize_clear): Do not do arithmetic on void *.
28139         * lib/malloc/dynarray-skeleton.c (struct DYNARRAY_STRUCT):
28140         Do not use anonymous unions, as they are not in C99. All uses changed.
28141         Use __nonnull (X) instead of __attribute__ ((nonnull X)),
28142         and __attribute_maybe_unused__ instead of __attribute__ ((unused)).
28144 2021-01-06  Simon Josefsson  <simon@josefsson.org>
28146         bootstrap: Fix parsing of package name.
28147         * build-aux/bootstrap (package): Attempt to use autoconf --trace
28148         to parse AC_INIT before falling back to sed expression.
28150 2021-01-07  Bruno Haible  <bruno@clisp.org>
28152         localename: Fix link error with duplocale on AIX 7.2 (regr. 2019-12-18).
28153         * m4/locale_h.m4 (gl_LOCALE_H_DEFAULTS): Initialize
28154         LOCALENAME_ENHANCE_LOCALE_FUNCS.
28155         * m4/intl-thread-locale.m4 (gt_FUNC_USELOCALE):
28156         Set gt_working_uselocale.
28157         (gt_INTL_THREAD_LOCALE_NAME): Set gt_fake_locales, gt_good_uselocale,
28158         gt_localename_enhances_locale_funcs, LOCALENAME_ENHANCE_LOCALE_FUNCS.
28159         Define HAVE_GOOD_USELOCALE, LOCALENAME_ENHANCE_LOCALE_FUNCS.
28160         * m4/localename.m4 (gl_LOCALENAME): Test
28161         gt_localename_enhances_locale_funcs instead of gt_nameless_locales.
28162         * modules/locale (Makefile.am): Substitute
28163         LOCALENAME_ENHANCE_LOCALE_FUNCS.
28164         * lib/locale.in.h (newlocale, duplocale, freelocale): Don't override if
28165         module 'localename' is in use but LOCALENAME_ENHANCE_LOCALE_FUNCS is 0.
28166         * lib/localename.c (HAVE_GOOD_USELOCALE): Don't define here.
28167         (get_locale_t_name, newlocale, duplocale, freelocale): Define if
28168         LOCALENAME_ENHANCE_LOCALE_FUNCS.
28170 2021-01-06  Bruno Haible  <bruno@clisp.org>
28172         logb: Fix test failure on glibc/powerpc.
28173         * doc/posix-functions/logb.texi: Update platform info.
28174         * m4/logb.m4 (gl_FUNC_LOGB_WORKS): Test against bug with negative
28175         subnormal numbers.
28177 2021-01-06  Paul Eggert  <eggert@cs.ucla.edu>
28179         libc-config: simplify clang __has_* macros
28180         cdefs.h sometimes used names like __glibc_clang_has_attribute and
28181         sometimes __glibc_has_attribute.  There is no need in glibc or
28182         Gnulib to distinguish clang from other compilers here, so be
28183         consistent and use the simpler names.
28184         * lib/cdefs.h (__glibc_has_builtin, __glibc_has_extension):
28185         Rename from __glibc_clang_has_builtin, __glibc_clang_has_extension.
28186         All uses changed.
28187         (__glibc_clang_has_attribute): Remove. All uses replaced
28188         by __glibc_has_attribute.
28189         * lib/libc-config.h [!__glibc_likely]: Undef them here too.
28190         This fixes a problem where __glibc_has_attribute was not undeffed.
28192 2021-01-06  Bruno Haible  <bruno@clisp.org>
28194         flock: Update documentation.
28195         * doc/glibc-functions/flock.texi: Document what to expect on AIX and
28196         Solaris.
28198 2021-01-06  Bruno Haible  <bruno@clisp.org>
28200         ilogbl: Fix compilation error with xlclang on AIX 7.2.
28201         * lib/math.in.h (ilogbl): Undefine macro before declaration.
28203 2021-01-06  Bruno Haible  <bruno@clisp.org>
28205         ilogbl: Fix test failures on AIX 7.1 in 64-bit mode.
28206         * m4/ilogbl.m4 (gl_FUNC_ILOGBL_WORKS): Test also some denormalized
28207         argument.
28208         * doc/posix-functions/ilogbl.texi: Mention the AIX bug.
28210 2021-01-06  Bruno Haible  <bruno@clisp.org>
28212         ilogb: Fix test failures on AIX 7.1 in 64-bit mode.
28213         * m4/ilogb.m4 (gl_FUNC_ILOGB_WORKS): Test also some denormalized
28214         argument.
28215         * doc/posix-functions/ilogb.texi: Mention the AIX bug.
28217 2021-01-05  Bruno Haible  <bruno@clisp.org>
28219         fclose: Fix test failure on AIX 7.2.
28220         * m4/fclose.m4 (gl_FUNC_FCLOSE_STDIN): New macro.
28221         (gl_FUNC_FCLOSE): Invoke it. Set REPLACE_FCLOSE accordingly.
28222         * doc/posix-functions/fclose.texi: Update platform information.
28223         * doc/posix-functions/fflush.texi: Likewise.
28225 2021-01-05  Bruno Haible  <bruno@clisp.org>
28227         pipe-filter-gi: Fix test failure on AIX 7.2.
28228         * lib/pipe-filter-aux.h (SSIZE_MAX) [AIX]: Set to 4096.
28230 2021-01-05  Bruno Haible  <bruno@clisp.org>
28232         utimens, utimensat, fdutimensat: Avoid test failures on AIX 7.2.
28233         * lib/utimecmp.c (utimecmpat): On AIX, declare equality when the two
28234         times differ by less than 0.01 seconds.
28235         * tests/test-futimens.h (test_futimens): Pass UTIMECMP_TRUNCATE_SOURCE
28236         flag.
28238 2021-01-05  Bruno Haible  <bruno@clisp.org>
28240         utimensat: Work around trailing slash bug in utimensat() on AIX 7.2.
28241         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Require AC_CANONICAL_HOST. Add a
28242         test for trailing slash handling. Improve cross-compilation guesses.
28243         Conditionally define HAVE_NEARLY_WORKING_UTIMENSAT.
28244         * lib/utimensat.c (rpl_utimensat): Add alternative implementation when
28245         HAVE_NEARLY_WORKING_UTIMENSAT is defined.
28246         * lib/utimens.c: Use the overridden utimensat when
28247         HAVE_NEARLY_WORKING_UTIMENSAT is defined.
28248         * doc/posix-functions/utimensat.texi: Mention the AIX bug.
28250 2021-01-05  Bruno Haible  <bruno@clisp.org>
28252         ptsname_r, ptsname: Avoid test failures on AIX 7.2.
28253         * tests/test-ptsname_r.c (main): On AIX, set a 20-seconds timer.
28254         * tests/test-ptsname.c (main): Likewise. On AIX, open a pty through
28255         /dev/ptc and don't test the BSD ptys.
28257 2021-01-05  Paul Eggert  <eggert@cs.ucla.edu>
28259         libc-config: merge from glibc
28260         Use a better way of keeping glibc <sys/cdefs.h> and gnulib
28261         lib/cdefs.h mostly in sync, by using lib/cdefs.h only on platforms
28262         where <sys/cdefs.h> does not work well enough for Gnulib.
28263         * lib/cdefs.h: Go back to using _SYS_CDEFS_H rather than
28264         _GL_DEFS_H as an include guard.
28265         (__THROW, __THROWNL, __NTH, __NTHNL):
28266         Define to noexcept for C++11 and later.
28267         (__glibc_objsize, __glibc_objsize0): New, for _FORTIFY_SOURCE=3.
28268         (__warndecl): Remove.
28269         (__attribute_copy__): New macro, for GCC 9 support.
28270         (__LDBL_REDIR, __LDBL_REDIR_DECL, __LDBL_REDIR1)
28271         (__LDBL_REDIR1_DECL, __LDBL_REDIR1_NTH, __REDIRECT_NTH_LDBL)
28272         (__REDIRECT_LDBL, __LDBL_REDIR_NTH):
28273         Redirections for IEEE long double on powerpc64le.
28274         (__LDBL_REDIR2_DECL): New macro.
28275         (__attr_access): New macro, for GCC 10 bounds checking.
28276         (__attribute_returns_twice__): New macro, for setjmp etc.
28277         * lib/libc-config.h: Include <cdefs.h> only if __glibc_likely is
28278         undefined.  The following changes apply only if __glibc_likely
28279         is not defined.
28280         (__LDBL_REDIR2_DECL, __attr_access, __attribute_returns_twice__)
28281         (__glibc_clang_has_attribute, __glibc_clang_has_extension)
28282         (__glibc_objsize, __glibc_objsize0):
28283         Undef these new (or newer) <cdefs.h> macros.
28284         (__P, __PMT, __always_inline): Do not undef, since cdefs.h does that.
28285         (__glibc_likely): Do not undef, since this is inside
28286         ifndef __glibc_likely.
28287         (__warndecl): Do not undef; no longer defined.
28289 2021-01-05  Jim Meyering  <meyering@fb.com>
28291         maintainer-makefile: correct preceding change
28292         * top/maint.mk (syntax-check-rules): Use LC_ALL=C, not LANG=C.
28294 2021-01-05  Paul Eggert  <eggert@cs.ucla.edu>
28296         maint: note syncs to glibc
28297         * config/srclist.txt: filename.h, idx.h, scratch_buffer.h and
28298         scratch_buffer_dupfree.c are now identical to glibc.  Add
28299         commentary about some other syncs we’d like.
28300         * modules/filename, modules/idx (Maintainer): Add glibc.
28302 2021-01-05  Bruno Haible  <bruno@clisp.org>
28304         truncate: Work around trailing slash bug in truncate() on AIX 7.2.
28305         * m4/truncate.m4 (gl_FUNC_TRUNCATE): Add a test whether truncate
28306         rejects trailing slashes. Set REPLACE_TRUNCATE and define
28307         TRUNCATE_TRAILING_SLASH_BUG if not.
28308         * lib/truncate.c (orig_truncate): New function.
28309         (truncate): Add alternative implementation when
28310         TRUNCATE_TRAILING_SLASH_BUG is defined.
28311         * modules/truncate (Depends-on): Add sys_stat, stat.
28313 2021-01-05  Bruno Haible  <bruno@clisp.org>
28315         mkfifoat: Fix cross-compilation guess (regression from 2021-01-04).
28316         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Fix copy-and-paste mistake.
28318 2021-01-05  Bruno Haible  <bruno@clisp.org>
28320         ffsll: Override completely broken implementation on AIX in 32-bit mode.
28321         * m4/ffsll.m4 (gl_FUNC_FFSLL): Test whether ffsll minimally works. If
28322         not, set REPLACE_FFSLL.
28323         * lib/string.in.h (ffsll): Consider REPLACE_FFSLL.
28324         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
28325         REPLACE_FFSLL.
28326         * modules/string (Makefile.am): Substitute REPLACE_FFSLL.
28327         * modules/ffsll (Depends-on, configure.ac): Consider REPLACE_FFSLL.
28328         * doc/glibc-functions/ffsll.texi: Mention the AIX 7.2 bug.
28330 2021-01-04  Bruno Haible  <bruno@clisp.org>
28332         symlinkat: Fix trailing slash handling.
28333         * lib/symlinkat.c (rpl_symlinkat): Don't follow symlinks during the
28334         trailing slash handling.
28335         * modules/symlinkat (Depends-on): Update conditions.
28337 2021-01-04  Bruno Haible  <bruno@clisp.org>
28339         mkfifoat: Update module description.
28340         * modules/mkfifoat (Depends-on): Update conditions after last commits.
28342 2021-01-04  Bruno Haible  <bruno@clisp.org>
28344         link: Improve trailing slash handling on native Windows.
28345         * lib/link.c (link): If stat() fails, provide a better errno.
28347 2021-01-04  Bruno Haible  <bruno@clisp.org>
28349         mkfifoat: Work around trailing slash bug in mknodat() on AIX 7.2.
28350         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Set also REPLACE_MKNODAT.
28351         * lib/sys_stat.in.h (mknodat): Consider REPLACE_MKNODAT.
28352         * lib/mknodat.c: Add an overriding implementation of mknodat().
28353         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize REPLACE_MKNODAT.
28354         * modules/sys_stat (Makefile.am): Substitute REPLACE_MKNODAT.
28355         * modules/mkfifoat (Depends-on, configure.ac): Consider REPLACE_MKNODAT.
28356         * doc/posix-functions/mknodat.texi: Mention the AIX bug.
28358         mkfifoat: Work around trailing slash bug in mkfifoat() on AIX 7.2.
28359         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Add a test whether mkfifoat rejects
28360         trailing slashes. Set REPLACE_MKFIFOAT if not.
28361         * lib/sys_stat.in.h (mkfifoat): Consider REPLACE_MKFIFOAT.
28362         * lib/mkfifoat.c: Add an overriding implementation of mkfifoat().
28363         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize
28364         REPLACE_MKFIFOAT.
28365         * modules/sys_stat (Makefile.am): Substitute REPLACE_MKFIFOAT.
28366         * modules/mkfifoat (Depends-on): Add fstatat.
28367         (configure.ac): Consider REPLACE_MKFIFOAT.
28368         * doc/posix-functions/mkfifoat.texi: Mention the AIX bug.
28370 2021-01-04  Bruno Haible  <bruno@clisp.org>
28372         libc-config: Avoid overriding the headers from an installed newer glibc.
28373         Reported by Paul E Murphy <murphyp@linux.ibm.com> in
28374         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00106.html>.
28375         * lib/cdefs.h: Use a different include guard than glibc's <sys/cdefs.h>.
28376         * lib/libc-config.h: Update accordingly.
28378 2021-01-04  Simon Josefsson  <simon@josefsson.org>
28380         maintainer-makefile: Invoke syntax-checks regardless of locale.
28381         * top/maint.mk (syntax-check-rules): Invoke sed with LANG=C
28382         environment because [a-z] may not include 'w' in all locales.
28384 2021-01-04  Bruno Haible  <bruno@clisp.org>
28386         nstrftime, time_rz: Avoid using an obsolete Autoconf macro.
28387         Reported by Mike Gran <spk121@yahoo.com> in
28388         <https://lists.gnu.org/archive/html/bug-gnulib/2021-01/msg00067.html>.
28389         * lib/time-internal.h: Test HAVE_STRUCT_TM_TM_ZONE, not HAVE_TM_ZONE.
28390         * lib/time_rz.c: Likewise.
28391         * lib/nstrftime.c: Set and test HAVE_STRUCT_TM_TM_ZONE, not
28392         HAVE_TM_ZONE.
28393         * m4/nstrftime.m4 (gl_FUNC_GNU_STRFTIME): Update comments.
28395 2021-01-04  Bruno Haible  <bruno@clisp.org>
28397         expm1f-ieee: Work around AIX 7.2 bug.
28398         * m4/expm1f.m4 (gl_FUNC_EXPM1F): Initialize gl_expm1f_required. If
28399         module 'expm1f-ieee' is in use, check whether expm1f works according to
28400         IEEE.
28401         * m4/expm1f-ieee.m4: New file.
28402         * modules/expm1f-ieee (Files): Add it.
28403         (Depends-on): Update conditions.
28404         (configure.ac): Invoke gl_FUNC_EXPM1F_IEEE.
28405         * doc/posix-functions/expm1f.texi: Mention the AIX bug.
28407 2021-01-04  Bruno Haible  <bruno@clisp.org>
28409         ffsl, ffsll: Work around AIX 7.2 problem.
28410         * lib/string.in.h: On AIX, include <strings.h> for the declarations of
28411         ffsl and ffsll.
28412         * doc/glibc-functions/ffsl.texi: Document the AIX 7.2 problem.
28413         * doc/glibc-functions/ffsll.texi: Likewise.
28415 2021-01-04  Bruno Haible  <bruno@clisp.org>
28417         ssfmalloc: Fix includes.
28418         * lib/ssfmalloc.h: Include <strings.h>, for ffs().
28419         * tests/test-ssfmalloc.c: Include <string.h>, for memset().
28421 2021-01-03  Bruno Haible  <bruno@clisp.org>
28423         quotearg tests: Avoid test failures on Solaris 11.3.
28424         * tests/test-quotearg.sh: Copy the fr/ directory using 'cp -R', not
28425         'cp -a'.
28427 2021-01-03  Bruno Haible  <bruno@clisp.org>
28429         tests: Fix link errors on Solaris, when libunistring-optional is in use.
28430         * modules/wcwidth (Link): New section.
28431         * modules/wcswidth (Link): New section.
28432         * modules/mbchar (Link): New section.
28433         * modules/mbfile (Link): Link against libunistring.
28434         * modules/mbiter (Link): Likewise.
28435         * modules/mbuiter (Link): Likewise.
28436         * modules/mbmemcasecmp (Link): Likewise.
28437         * modules/mbscasecmp (Link): Likewise.
28438         * modules/mbscasestr (Link): Likewise.
28439         * modules/mbschr (Link): Likewise.
28440         * modules/mbscspn (Link): Likewise.
28441         * modules/mbslen (Link): Likewise.
28442         * modules/mbsncasecmp (Link): Likewise.
28443         * modules/mbsnlen (Link): Likewise.
28444         * modules/mbspbrk (Link): Likewise.
28445         * modules/mbspcasecmp (Link): Likewise.
28446         * modules/mbsrchr (Link): Likewise.
28447         * modules/mbssep (Link): Likewise.
28448         * modules/mbsspn (Link): Likewise.
28449         * modules/mbsstr (Link): Likewise.
28450         * modules/mbstok_r (Link): Likewise.
28451         * modules/mbswidth (Link): Likewise.
28452         * modules/exclude (Link): Likewise.
28453         * modules/propername (Link): Likewise.
28454         * modules/regex-quote (Link): Likewise.
28455         * modules/trim (Link): Likewise.
28456         * modules/mbmemcasecmp-tests (Makefile.am): Link the test program
28457         against libunistring.
28458         * modules/mbscasecmp-tests (Makefile.am): Likewise.
28459         * modules/mbscasestr-tests (Makefile.am): Likewise.
28460         * modules/mbschr-tests (Makefile.am): Likewise.
28461         * modules/mbscspn-tests (Makefile.am): Likewise.
28462         * modules/mbsncasecmp-tests (Makefile.am): Likewise.
28463         * modules/mbspbrk-tests (Makefile.am): Likewise.
28464         * modules/mbspcasecmp-tests (Makefile.am): Likewise.
28465         * modules/mbsrchr-tests (Makefile.am): Likewise.
28466         * modules/mbsspn-tests (Makefile.am): Likewise.
28467         * modules/mbsstr-tests (Makefile.am): Likewise.
28468         * modules/exclude-tests (Makefile.am): Likewise.
28469         * modules/regex-quote-tests (Makefile.am): Likewise.
28471 2021-01-03  Bruno Haible  <bruno@clisp.org>
28473         c32ispunct tests: Avoid test failures on FreeBSD.
28474         * tests/test-c32ispunct.c (main): On FreeBSD, disable tests that fail on
28475         FreeBSD 12.1.1.
28477 2021-01-04  Simon Josefsson  <simon@josefsson.org>
28479         doc: Repeat warning that --with-tests cannot be used twice.
28480         * doc/gnulib-tool.texi (Multiple instances): Remind reader of
28481         --with-tests limitation.
28483 2021-01-03  Bruno Haible  <bruno@clisp.org>
28485         iconv, iconv_open: Improve documentation.
28486         Reported by Noah Misch <noah@leadboat.com> in
28487         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00172.html>.
28488         * doc/posix-functions/iconv_open.texi: Add new paragraph "Portability
28489         problems handled by Gnulib".
28490         * doc/posix-functions/iconv.texi: Likewise. Update info about AIX.
28491         * m4/iconv.m4 (AM_ICONV_LINK): Improve comments.
28493 2021-01-03  Bruno Haible  <bruno@clisp.org>
28495         iconv-h: Fix module description.
28496         * modules/iconv-h (Include): Check HAVE_ICONV_H.
28498 2021-01-03  Noah Misch  <noah@leadboat.com>
28500         iconv_open: Fix module description.
28501         * modules/iconv_open (Include): Check HAVE_ICONV, like modules/iconv.
28503 2021-01-03  Bruno Haible  <bruno@clisp.org>
28505         stddef: Override wrong max_align_t on AIX 7 with xlc in 64-bit mode.
28506         * m4/stddef_h.m4 (gl_STDDEF_H): Make check for good max_align_t
28507         stricter: Add tests for offsetof-based alignof.
28508         * lib/stddef.in.h (max_align_t): Override on AIX in 64-bit mode.
28509         * doc/posix-headers/stddef.texi: Document the AIX max_align_t bug.
28511 2021-01-03  Bruno Haible  <bruno@clisp.org>
28513         free-posix: Work around GCC mis-optimization bug.
28514         Code by Bernhard Voelker <mail@bernhard-voelker.de>.
28515         * lib/free.c (rpl_free): Add alternative complicated code for GCC.
28517 2021-01-02  Bruno Haible  <bruno@clisp.org>
28519         valgrind-tests: Disable valgrind if it would cause all tests to fail.
28520         Suggested by Simon Josefsson <simon@josefsson.org> in
28521         <https://lists.gnu.org/archive/html/help-gsasl/2021-01/msg00004.html>.
28522         * m4/valgrind-tests.m4 (gl_VALGRIND_TESTS): Test $VALGRIND on an
28523         executable produced by the current compiler. Set VALGRIND to empty if it
28524         does not work. Don't set VALGRIND to empty if it merely does not accept
28525         the --error-exitcode=1 --leak-check=full options.
28527 2021-01-02  Bruno Haible  <bruno@clisp.org>
28529         valgrind-tests: Really enable the valgrind options test.
28530         * m4/valgrind-tests.m4 (gl_VALGRIND_TESTS): Don't assume that the
28531         valgrind options --error-exitcode=1 --leak-check=full always work.
28533 2021-01-02  Bruno Haible  <bruno@clisp.org>
28535         utimensat: Fix test failures on macOS 10.13.
28536         * lib/utimensat.c: Include <string.h>, <sys/stat.h>.
28537         (rpl_utimensat): Check against invalid tv_nsec values. Before calling
28538         utimensat, recognize a filename ending in a slash that does not point
28539         to a directory.
28541 2021-01-02  Bruno Haible  <bruno@clisp.org>
28543         utimens: Fix test failure on macOS 10.13.
28544         * lib/utimens.c: Include <string.h>.
28546         utimens: Fix test failure on macOS 10.13.
28547         * lib/utimens.c (fdutimens): Before calling utimensat, recognize a
28548         filename ending in a slash that does not point to a directory.
28550 2021-01-02  Bruno Haible  <bruno@clisp.org>
28552         utimens: Avoid test failures on macOS 10.13.
28553         Reported by Martin Storsjö <martin@martin.st> in
28554         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00003.html>.
28555         * tests/test-utimens-common.h (check_ctime): Define to -1 on macOS.
28556         * tests/test-utimens.h (test_utimens): Don't expect a ctime change when
28557         only the atime is requested to change.
28558         * tests/test-futimens.h (test_futimens): Likewise.
28559         * tests/test-lutimens.h (test_lutimens): Likewise.
28561 2021-01-02  Bruno Haible  <bruno@clisp.org>
28563         renameatu: Fix test failures on macOS.
28564         Reported by Martin Storsjö <martin@martin.st> in
28565         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00003.html>.
28566         * lib/renameatu.c (renameatu): Don't call renameatx_np right away.
28567         Instead, treat it as a variant of renameat, with all possible bugs that
28568         renameat might have.
28570 2021-01-02  Bruno Haible  <bruno@clisp.org>
28572         getgroups test: Avoid warning with glibc >= 2.32 and gcc >= 10.
28573         Reported by Bernhard Voelker <mail@bernhard-voelker.de> in
28574         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00090.html>.
28575         * tests/test-getgroups.c: Silence gcc warnings of type
28576         -Wstringop-overflow.
28578 2021-01-02  Bruno Haible  <bruno@clisp.org>
28580         timespec_get: Add tests.
28581         * tests/test-timespec_get.c: New file.
28582         * modules/timespec_get-tests: New file.
28584         timespec_get: New module.
28585         * lib/time.in.h (timespec_get): New declaration.
28586         * lib/timespec_get.c: New file.
28587         * m4/timespec_get.m4: New file.
28588         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize
28589         GNULIB_TIMESPEC_GET, HAVE_TIMESPEC_GET.
28590         * modules/time (Makefile.am): Substitute GNULIB_TIMESPEC_GET,
28591         HAVE_TIMESPEC_GET.
28592         * modules/timespec_get: New file.
28593         * tests/test-time-c++.cc (timespec_get): Check signature.
28594         * doc/glibc-functions/timespec_get.texi: Mention the new module.
28596 2021-01-01  Bruno Haible  <bruno@clisp.org>
28598         time: Define TIME_UTC.
28599         * lib/time.in.h (TIME_UTC, GNULIB_defined_TIME_UTC): New macros.
28600         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Set TIME_H_DEFINES_TIME_UTC.
28601         * modules/time (Makefile.am): Substitute TIME_H_DEFINES_TIME_UTC.
28602         * tests/test-time.c: Check that TIME_UTC is defined and a positive
28603         integer.
28604         * doc/posix-headers/time.texi: Mention TIME_UTC.
28606 2021-01-01  Bruno Haible  <bruno@clisp.org>
28608         stddef: Try harder to get max_align_t defined on OpenBSD, part 2.
28609         * modules/stddef (Depends-on): Add extensions.
28611 2021-01-01  Paul Eggert  <eggert@cs.ucla.edu>
28613         canonicalize: remove NARROW_ADDRESSES optimization
28614         * lib/canonicalize-lgpl.c, lib/canonicalize.c (NARROW_ADDRESSES):
28615         Remove, and remove all uses, as the optimization is arguably not
28616         worth the extra complexity.  Suggested by Adhemerval Zanella in:
28617         https://sourceware.org/pipermail/libc-alpha/2020-December/121203.html
28619 2021-01-01  Bruno Haible  <bruno@clisp.org>
28621         stddef: Try harder to get max_align_t defined on OpenBSD.
28622         * m4/stddef_h.m4 (gl_STDDEF_H): Require gl_USE_SYSTEM_EXTENSIONS.
28624 2021-01-01  Bruno Haible  <bruno@clisp.org>
28626         aligned_alloc: Fix test failure on OpenBSD 6.8.
28627         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): On OpenBSD, define
28628         _ISOC11_SOURCE.
28629         * m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Require it. Update
28630         comment.
28632 2021-01-01  Bruno Haible  <bruno@clisp.org>
28634         posixtm tests: Disable part of the test on plaforms where it fails.
28635         * tests/test-posixtm.c (T): Disable two tests on macOS as well.
28637 2021-01-01  Bruno Haible  <bruno@clisp.org>
28639         c32isgraph/c32isprint/c32ispunct tests: Avoid test failures on OmniOS.
28640         * tests/test-c32isgraph.c (main): On Solaris, disable tests that fail on
28641         Solaris 11 OmniOS.
28642         * tests/test-c32isprint.c (main): Likewise.
28643         * tests/test-c32ispunct.c (main): Likewise.
28645 2021-01-01  Paul Eggert  <eggert@cs.ucla.edu>
28647         libc-config: port to Sun C 5.9
28648         * lib/libc-config.h (libc_hidden_proto): Omit ", ..." in macro
28649         definition.  It’s not needed for Gnulib and elicits a diagnostic
28650         from Sun C 5.9 Patch 124867-12 2009/11/22.
28652 2021-01-01  Bruno Haible  <bruno@clisp.org>
28654         quotearg tests: Avoid test failures on Solaris 11.
28655         * modules/quotearg-tests (Makefile.am): Set host_os in
28656         TESTS_ENVIRONMENT.
28657         * tests/test-quotearg.sh: On Solaris 11 systems, make a copy of the fr/
28658         directory that contains the .mo file.
28660 2021-01-01  Bruno Haible  <bruno@clisp.org>
28662         maint: Update copyright notices in --version output.
28663         List the most recent year in which changes were made, per
28664         <https://www.gnu.org/prep/standards/html_node/_002d_002dversion.html>.
28665         * build-aux/declared.sh (func_version): Say 2019.
28666         * build-aux/libtool-next-version (func_version): Likewise.
28667         * build-aux/run-test (func_version): Likewise.
28668         * check-module (COPYRIGHT_NOTICE): Say 2012.
28669         * lib/git-merge-changelog.c (main): Say 2020.
28671 2020-12-31  Paul Eggert  <eggert@cs.ucla.edu>
28673         filename: change filename.h comment to LGPLv2.1+
28674         * lib/filename.h: Change license notice to match what should be in
28675         glibc, and what modules/filename specifies.  This is to simplify
28676         syncing with glibc.
28678         doc: mention year-0 bugs in Solaris etc.
28679         * doc/posix-functions/gmtime.texi, doc/posix-functions/gmtime_r.texi:
28680         * doc/posix-functions/localtime.texi:
28681         * doc/posix-functions/localtime_r.texi:
28682         * doc/posix-functions/mktime.texi:
28683         Mention year-0 bugs in localtime etc.
28685 2020-12-31  Bruno Haible  <bruno@clisp.org>
28687         ptsname_r: Fix test failure on Solaris.
28688         * lib/ptsname_r.c (__ptsname_r) [__sun]: Don't test the major number of
28689         the device.
28691 2020-12-31  Bruno Haible  <bruno@clisp.org>
28693         posixtm tests: Disable part of the test on plaforms where it fails.
28694         * tests/test-posixtm.c (T): Disable two tests on Solaris.
28696 2020-12-31  Bruno Haible  <bruno@clisp.org>
28698         poll tests: Avoid test failure on AIX.
28699         * tests/test-poll.c (test_pipe): Disable the "expecting POLLHUP after
28700         shutdown" test on AIX.
28701         * doc/posix-functions/poll.texi: Mention the AIX bug.
28703 2020-12-31  Bruno Haible  <bruno@clisp.org>
28705         poll tests: Avoid test failure on BSD and Solaris systems.
28706         * tests/test-poll.c (test_accept_first, test_socket_pair): Disable the
28707         "expecting POLLHUP after shutdown" test on all platforms except Linux.
28709 2020-12-31  Paul Eggert  <eggert@cs.ucla.edu>
28711         fnmatch: merge from glibc + proposal
28712         This merges the change proposed by Adhemerval Zanella in:
28713         https://sourceware.org/pipermail/libc-alpha/2020-December/121212.html
28714         which fixes a Gnulib bug that led to a failed assert.
28715         * lib/fnmatch_loop.c (EXT): Use signed level, not unsigned, and
28716         check that it stays nonnegative.  Use __flexarr instead of
28717         FLEXIBLE_ARRAY_MEMBER, to port better to glibc.
28718         * tests/test-fnmatch.c (main): New test cases, taken from glibc.
28720         glob: merge proposed glibc changes
28721         This merges the change proposed by Adhemerval Zanella in:
28722         https://sourceware.org/pipermail/libc-alpha/2020-December/121211.html
28723         * lib/glob.c (__lstat64, __stat64) [_LIBC]: Remove.
28725 2020-12-31  Bruno Haible  <bruno@clisp.org>
28727         memalign: Work around Solaris bug.
28728         * lib/memalign.c: New file.
28729         * m4/memalign.m4: New file.
28730         * modules/memalign (Files): Add them.
28731         (Depends-on): Add malloc-h.
28732         (configure.ac): Invoke gl_FUNC_MEMALIGN. Conditionally compile
28733         memalign.c. Set module indicator.
28734         (Include): Include <malloc.h> unconditionally.
28735         * doc/glibc-functions/memalign.texi: Mention the Solaris issues.
28737         malloc-h: Add tests.
28738         * tests/test-malloc-h.c: New file.
28739         * modules/malloc-h-tests: New file.
28740         * tests/test-malloc-h-c++.cc: New file.
28741         * modules/malloc-h-c++-tests: New file.
28743         malloc-h: New module.
28744         * lib/malloc.in.h: New file.
28745         * m4/malloc_h.m4: New file.
28746         * modules/malloc-h: New file.
28747         * doc/glibc-headers/malloc.texi: New file.
28748         * doc/gnulib.texi (Glibc Header File Substitutes): Include it.
28750 2020-12-31  Bruno Haible  <bruno@clisp.org>
28752         unistd: Fix portability warnings.
28753         * lib/unistd.in.h (fchownat, unlinkat): Fix module name in warning.
28755 2020-12-31  Bruno Haible  <bruno@clisp.org>
28757         utime: Fix compilation error on macOS and Solaris 9 (regr. 2020-12-24).
28758         Reported by Tom G. Christensen <tgc@jupiterrise.com> in
28759         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00295.html>.
28760         * lib/utime.c: Include <errno.h>.
28762 2020-12-30  Karl Berry  <karl@freefriends.org>
28764         config: srclistvars doc.
28765         * config/srclistvars.sh: doc a couple of unusual source repo urls.
28767 2020-12-30  Bruno Haible  <bruno@clisp.org>
28769         getlogin tests, getlogin_r tests: Avoid failure on Solaris OpenIndiana.
28770         * tests/test-getlogin.c (main): Don't fail if getlogin() returns NULL
28771         with no errno.
28772         * tests/test-getlogin_r.c (main): Don't fail if getlogin_r() returns
28773         EINVAL.
28775 2020-12-29  Jim Meyering  <meyering@fb.com>
28777         regex-tests: tweak to avoid a clang-10 warning
28778         * tests/test-regex.c: Compare with explicit zero, rather than
28779         as boolean to avoid this from clang-10:
28780         test-regex.c:315:9: error: converting the result of '<<' to a \
28781           boolean always evaluates to true \
28782           [-Werror,-Wtautological-constant-compare]
28783         if (! REG_STARTEND)
28785         hash: add casts-to-float to avoid clang-10 warnings
28786         * lib/hash.c (compute_bucket_size): Cast SIZE_MAX to float
28787         to avoid this warning from clang-10 (for use in grep):
28788           hash.c:501:11: error: implicit conversion from 'unsigned long' \
28789             to 'float' changes value from 18446744073709551615 to \
28790             18446744073709551616 [-Werror,-Wimplicit-int-float-conversion]
28791           if (SIZE_MAX <= new_candidate)
28792         (hash_insert_if_absent): Likewise.
28794 2020-12-29  Paul Eggert  <eggert@cs.ucla.edu>
28796         canonicalize: fix size overflow treatment
28797         This also has some minor cleanups.
28798         * lib/canonicalize-lgpl.c, lib/canonicalize.c: No need to include
28799         stddef.h, since the code no longer refers directly to ptrdiff_t.
28800         * lib/canonicalize-lgpl.c (realpath_stk):
28801         * lib/canonicalize.c (canonicalize_filename_mode_stk):
28802         Treat size overflow like other out-of-memory.
28803         * lib/canonicalize.c: No need to include stdlib.h, since
28804         the code no longer refers to stdlib.h functions (other
28805         than those that canonicalize.h must declare).
28806         * lib/canonicalize.c (canonicalize_filename_mode_stk):
28807         Do not bother terminating the string result on error.
28809 2020-12-29  Bruno Haible  <bruno@clisp.org>
28811         list-c++, [o]map-c++, [o]set-c++: Fix conflict with 'free-posix' module.
28812         * lib/gl_list.hh: Include <stdlib.h>.
28813         * lib/gl_map.hh: Likewise.
28814         * lib/gl_omap.hh: Likewise.
28815         * lib/gl_set.hh: Likewise.
28816         * lib/gl_oset.hh: Likewise.
28818 2020-12-29  Paul Eggert  <eggert@cs.ucla.edu>
28820         canonicalize: fix ptrdiff_t overflow bug
28821         Problem reported by Adhemerval Zanella in:
28822         https://sourceware.org/pipermail/libc-alpha/2020-December/121182.html
28823         * lib/canonicalize-lgpl.c, lib/canonicalize.c:
28824         Include intprops.h.
28825         (NARROW_ADDRESSES): New constant.
28826         * lib/canonicalize-lgpl.c (realpath_stk):m
28827         * lib/canonicalize.c (canonicalize_filename_mode_stk):
28828         Work even if strlen (END) does not fit in idx_t, or if adding
28829         N to it overflows.
28830         * modules/canonicalize, modules/canonicalize-lgpl (Depends-on):
28831         Add intprops.
28833 2020-12-28  Bruno Haible  <bruno@clisp.org>
28835         havelib: Fix for Solaris 11 OpenIndiana and Solaris 11 OmniOS.
28836         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): In
28837         acl_is_expected_elfclass, use 'expr', not 'test'.
28839 2020-12-28  Bruno Haible  <bruno@clisp.org>
28841         ptsname_r: Fix a compiler warning on Solaris.
28842         * lib/ptsname_r.c (__ptsname_r): Reduce the scope of variable 'err'.
28844 2020-12-28  Bruno Haible  <bruno@clisp.org>
28846         gnulib-tool: Fix logic whether to add a dummy.c.
28847         * gnulib-tool (func_remove_if_blocks): New function.
28848         (func_modules_add_dummy): Use it to eliminate all conditional statements
28849         from the automake snippet.
28851 2020-12-28  Paul Eggert  <eggert@cs.ucla.edu>
28853         faccessat: revert recent EOVERFLOW change
28854         I misunderstood the glibc source code.  Deduced from
28855         Adhemerval Zanella’s proposed glibc patch in:
28856         https://sourceware.org/pipermail/libc-alpha/2020-December/121131.html
28857         * doc/posix-functions/faccessat.texi: It is not a problem.
28858         * lib/canonicalize-lgpl.c, lib/canonicalize.c, lib/faccessat.c:
28859         (FACCESSAT_NEVER_OVERFLOWS): Remove. All uses removed.
28860         * lib/faccessat.c: Revert to simpler version now that
28861         LSTAT_FOLLOWS_SLASHED_SYMLINK must be false.
28862         * m4/faccessat.m4 (gl_FUNC_FACCESSAT_EOVERFLOW):
28863         Remove.  All uses removed.
28864         * modules/canonicalize, modules/canonicalize-lgpl (Files):
28865         Remove m4/faccessat.m4.
28867         canonicalize-lgpl: accommodate picky cpp
28868         * lib/canonicalize-lgpl.c: Use "defined FUNC_REALPATH_WORKS" in
28869         case preprocessor is picky.  Reported by Adhemerval Zanella in:
28870         https://sourceware.org/pipermail/libc-alpha/2020-December/121130.html
28872         canonicalize: simplify via scratch_buffer_dupfree
28873         * config/srclist.txt: Adjust accordingly.
28874         * lib/canonicalize-lgpl.c (realpath_stk):
28875         * lib/canonicalize.c (canonicalize_filename_mode_stk):
28876         Simplify by using scratch_buffer_dupfree.
28877         * lib/malloc/scratch_buffer.h (scratch_buffer_dupfree): New function.
28878         * lib/malloc/scratch_buffer_dupfree.c: New file.
28879         * modules/scratch_buffer (Files, Depends-on):
28880         Add malloc/scratch_buffer_dupfree.c.
28882 2020-12-27  Paul Eggert  <eggert@cs.ucla.edu>
28884         regex: remove glibc21.m4
28885         It doesn’t seem to be needed any more; at least, I couldn’t
28886         reproduce the circa-2013 problem.  Perhaps the recent
28887         --conditional-dependencies fixes have removed the need for it.
28888         * m4/glibc21.m4: Remove.  All uses removed.
28890 2020-12-26  Bruno Haible  <bruno@clisp.org>
28892         gnulib-tool: Make --conditional-dependencies work with --with-tests.
28893         Reported by Paul Eggert in
28894         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00236.html>.
28895         * gnulib-tool (func_emit_tests_Makefile_am): Handle conditional
28896         dependencies like func_emit_lib_Makefile_am.
28898 2020-12-26  Bruno Haible  <bruno@clisp.org>
28900         execvpe: Make dependency to stdbool explicit.
28901         * lib/execvpe.c: Include <stdbool.h>.
28902         * modules/execvpe (Depends-on): Add stdbool.
28904         execlp: Add tests.
28905         * tests/test-execlp-main.c: New file.
28906         * tests/test-execlp.sh: New file.
28907         * modules/execlp-tests: New file.
28909         execlp: New module.
28910         * lib/execlp.c: New file.
28911         * m4/execlp.m4: New file.
28912         * modules/execlp: New file.
28913         * doc/posix-functions/execlp.texi: Mention more Windows problems and the
28914         new module.
28916         execle: Add tests.
28917         * tests/test-execle-main.c: New file.
28918         * tests/test-execle.sh: New file.
28919         * modules/execle-tests: New file.
28921         execle: New module.
28922         * lib/execle.c: New file.
28923         * m4/execle.m4: New file.
28924         * modules/execle: New file.
28925         * doc/posix-functions/execle.texi: Mention more Windows problems and the
28926         new module.
28928         execl: Add tests.
28929         * tests/test-execl-main.c: New file.
28930         * tests/test-execl.sh: New file.
28931         * modules/execl-tests: New file.
28933         execl: New module.
28934         * lib/execl.c: New file.
28935         * m4/execl.m4: New file.
28936         * modules/execl: New file.
28937         * doc/posix-functions/execl.texi: Mention more Windows problems and the
28938         new module.
28940         execv: Add tests.
28941         * tests/test-execv-main.c: New file.
28942         * tests/test-execv.sh: New file.
28943         * modules/execv-tests: New file.
28945         execv: New module.
28946         * lib/execv.c: New file.
28947         * m4/execv.m4: New file.
28948         * modules/execv: New file.
28949         * doc/posix-functions/execv.texi: Mention more Windows problems and the
28950         new module.
28952         execvp: Add tests.
28953         * tests/test-execvp-main.c: New file.
28954         * tests/test-execvp.sh: New file.
28955         * modules/execvp-tests: New file.
28957         execvp: New module.
28958         * lib/execvp.c: New file.
28959         * m4/execvp.m4: New file.
28960         * modules/execvp: New file.
28961         * doc/posix-functions/execvp.texi: Mention more Windows problems and the
28962         new module.
28964         execvpe: Add tests.
28965         * tests/test-execvpe-main.c: New file.
28966         * tests/test-execvpe.sh: New file.
28967         * modules/execvpe-tests: New file.
28969         execvpe: New module.
28970         * lib/execvpe.c: New file.
28971         * m4/execvpe.m4: New file.
28972         * modules/execvpe: New file.
28973         * doc/glibc-functions/execvpe.texi: Mention the Windows problems and the
28974         new module.
28976         execve: Add tests.
28977         * tests/test-exec-child.c: New file.
28978         * tests/test-execve-main.c: New file.
28979         * tests/test-execve.sh: New file.
28980         * modules/execve-tests: New file.
28982         execve: New module.
28983         * lib/execve.c: New file.
28984         * m4/execve.m4: New file.
28985         * modules/execve: New file.
28986         * doc/posix-functions/execve.texi: Mention more Windows problems and the
28987         new module.
28989         execve, execvpe, execvp, execv, execl, execle, execlp: Prepare modules.
28990         * lib/unistd.in.h (execl, execle, execlp, execv, execve, execvp,
28991         execvpe): Add declarations for the new modules.
28992         * m4/unistd_h.m4 (gl_UNISTD_H): Test whether execl, execle, execlp,
28993         execv, execve, execvp, execvpe are declared.
28994         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_EXEC*, HAVE_EXECVPE,
28995         REPLACE_EXEC*.
28996         * modules/unistd (Makefile.am): Substitute GNULIB_EXEC*, HAVE_EXECVPE,
28997         REPLACE_EXEC*.
28998         * tests/test-unistd-c++.cc: Check the signature of execl, execle,
28999         execlp, execv, execve, execvp, execvpe.
29001 2020-12-26  Bruno Haible  <bruno@clisp.org>
29003         stack: Fix typo in comments.
29004         * lib/stack.h: Fix typo in comments.
29006 2020-12-26  Bruno Haible  <bruno@clisp.org>
29008         bitset: Fix conflict with 'free-posix' module.
29009         * lib/bitset/base.h: Include <stdlib.h>.
29011 2020-12-25  Paul Eggert  <eggert@cs.ucla.edu>
29013         idx: change idx.h comment to LGPLv2.1+
29014         * lib/idx.h: Change license notice to match what should be in glibc.
29015         gnulib-tool will change it as appropriate anyway, so this is just
29016         to simplify syncing with glibc.
29018 2020-12-25  Thien-Thi Nguyen  <ttn@gnu.org>
29020         MODULES.html.sh: Update after 2020-12-19 change.
29021         * MODULES.html.sh (func_all_modules): Do s/free/free-posix/.
29023 2020-12-25  Bruno Haible  <bruno@clisp.org>
29025         Make it possible to turn off the mkdir override on Windows.
29026         * lib/sys_stat.in.h (mkdir): Conditionalize through GNULIB_MKDIR and
29027         GNULIB_MDA_MKDIR. Also support GNULIB_POSIXCHECK.
29028         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize GNULIB_MKDIR,
29029         GNULIB_MDA_MKDIR.
29030         * modules/sys_stat (Makefile.am): Substitute GNULIB_MKDIR,
29031         GNULIB_MDA_MKDIR.
29032         * modules/mkdir (configure.ac): Invoke gl_SYS_STAT_MODULE_INDICATOR.
29033         * doc/posix-functions/mkdir.texi: Mention also the 'sys_stat' module.
29035         Make it possible to turn off each of the Windows oldnames workarounds.
29036         * lib/fcntl.in.h (creat, open):  Conditionalize each of the Windows
29037         oldnames workarounds through a GNULIB_MDA_<func> symbol.
29038         * lib/math.in.h (j0, j1, jn, y0, y1, yn): Likewise.
29039         * lib/search.in.h (lfind, lsearch): Likewise.
29040         * lib/stdio.in.h (fcloseall, fdopen, fileno, getw, putw, tempnam):
29041         Likewise.
29042         * lib/stdlib.in.h (ecvt, fcvt, gcvt, mktemp, putenv): Likewise.
29043         * lib/string.in.h (memccpy, strdup): Likewise.
29044         * lib/sys_stat.in.h (chmod, umask): Likewise.
29045         * lib/time.in.h (tzset): Likewise.
29046         * lib/unistd.in.h (access, chdir, close, dup, dup2, execl, execle,
29047         execlp, execv, execve, execvp, execvpe, getcwd, getpid, isatty, lseek,
29048         read, rmdir, swab, unlink, write): Likewise.
29049         * lib/utime.in.h (utime): Likewise.
29050         * lib/wchar.in.h (wcsdup): Likewise.
29051         * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Initialize these
29052         GNULIB_MDA_<func> symbols.
29053         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Likewise.
29054         * m4/search_h.m4 (gl_SEARCH_H_DEFAULTS): Likewise.
29055         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
29056         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Likewise.
29057         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Likewise.
29058         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Likewise.
29059         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Likewise.
29060         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Likewise.
29061         * m4/utime_h.m4 (gl_UTIME_H_DEFAULTS): Likewise.
29062         * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Likewise.
29063         * modules/fcntl-h (Makefile.am): Substitute these GNULIB_MDA_<func>
29064         symbols.
29065         * modules/math (Makefile.am): Likewise.
29066         * modules/search (Makefile.am): Likewise.
29067         * modules/stdio (Makefile.am): Likewise.
29068         * modules/stdlib (Makefile.am): Likewise.
29069         * modules/string (Makefile.am): Likewise.
29070         * modules/sys_stat (Makefile.am): Likewise.
29071         * modules/time (Makefile.am): Likewise.
29072         * modules/unistd (Makefile.am): Likewise.
29073         * modules/utime-h (Makefile.am): Likewise.
29074         * modules/wchar (Makefile.am): Likewise.
29076 2020-12-24  Paul Eggert  <eggert@cs.ucla.edu>
29078         canonicalize, canonicalize-lgpl: remove lint
29079         Pacify GCC.  Some of these problems were reported by Bruno Haible in:
29080         https://lists.gnu.org/r/bug-gnulib/2020-12/msg00217.html
29081         * lib/canonicalize-lgpl.c, lib/canonicalize.c:
29082         Sort shared include directives, for consistency.
29083         (IF_LINT): New macro.
29084         (suffix_requires_dir_check): Mark with _GL_ATTRIBUTE_PURE.
29085         * lib/canonicalize-lgpl.c (GCC_LINT, _GL_ATTRIBUTE_PURE) [_LIBC]:
29086         New macros.
29087         (realpath_stk): Suppress bogus -Wmaybe-uninitialized warning.
29088         * lib/canonicalize.c (canonicalize_filename_mode_stk):
29089         Omit unused local.  Suppress bogus -Wmaybe-uninitialized warning.
29091 2020-12-24  Bruno Haible  <bruno@clisp.org>
29093         spawn-pipe: Use posix_spawn by default on native Windows.
29094         * lib/spawn-pipe.c (SPAWN_PIPE_IMPL_AVOID_POSIX_SPAWN): New macro.
29095         (create_pipe): Use it to decide among the two possible implementations.
29096         * modules/spawn-pipe (Depends-on): Add posix_spawnattr_setpgroup.
29098 2020-12-24  Bruno Haible  <bruno@clisp.org>
29100         unistd-safer: Implement pipe_safer on native Windows.
29101         * lib/pipe-safer.c (pipe_safer): Don't test HAVE_PIPE.
29102         * modules/unistd-safer (Depends-on): Add pipe-posix.
29104 2020-12-24  Bruno Haible  <bruno@clisp.org>
29106         execute: Use posix_spawn by default on native Windows.
29107         * lib/execute.c (EXECUTE_IMPL_AVOID_POSIX_SPAWN): New macro.
29108         (execute): Use it to decide among the two possible implementations.
29110 2020-12-24  Paul Eggert  <eggert@cs.ucla.edu>
29112         canonicalize-lgpl: merge proposed libc changes
29113         This merges the changes proposed for glibc in:
29114         https://sourceware.org/pipermail/libc-alpha/2020-December/121085.html
29115         https://sourceware.org/pipermail/libc-alpha/2020-December/121086.html
29116         * lib/canonicalize-lgpl.c: Include idx.h and filename.h
29117         unconditionally.
29118         (idx_t, IDX_MAX, FILE_SYSTEM_PREFIX_LEN, IS_ABSOLUTE_FILE_NAME)
29119         (ISSLASH) [_LIBC]: Remove.
29121 2020-12-24  Bruno Haible  <bruno@clisp.org>
29123         posix_spawn-internal: Implement for native Windows.
29124         * lib/spawni.c (grow_inheritable_handles, shrink_inheritable_handles,
29125         close_inheritable_handles, memiszero, sigisempty, open_handle, do_open,
29126         do_dup2, do_close): New functions.
29127         (__spawni): Implement on native Windows.
29128         * modules/posix_spawn-internal (Depends-on): Add filename,
29129         concat-filename, findprog-in, malloca, windows-spawn.
29130         * doc/posix-functions/posix_spawn.texi: Update.
29131         * doc/posix-functions/posix_spawnp.texi: Likewise.
29133 2020-12-24  Bruno Haible  <bruno@clisp.org>
29135         windows-spawn: Export another auxiliary function.
29136         * lib/windows-spawn.h (convert_CreateProcess_error): New declaration.
29137         * lib/windows-spawn.c (convert_CreateProcess_error): New function,
29138         extracted from spawnpvech.
29139         (spawnpvech): Use it.
29141 2020-12-24  Bruno Haible  <bruno@clisp.org>
29143         windows-spawn: Export some more auxiliary functions.
29144         * lib/windows-spawn.h: Include <stdbool.h>.
29145         (struct inheritable_handles): New type.
29146         (init_inheritable_handles, compose_handles_block,
29147         free_inheritable_handles): New declarations.
29148         * lib/windows-spawn.c (init_inheritable_handles, compose_handles_block):
29149         New functions, based on spawnvech.
29150         (free_inheritable_handles): New function.
29151         (spawnpvech): Use them.
29153 2020-12-24  Bruno Haible  <bruno@clisp.org>
29155         windows-spawn: Export another auxiliary function.
29156         * lib/windows-spawn.h (compose_envblock): New declaration.
29157         * lib/windows-spawn.c (compose_envblock): New function, extracted from
29158         spawnpvech.
29159         (spawnpvech): Use it.
29161 2020-12-24  Bruno Haible  <bruno@clisp.org>
29163         windows-spawn: Export an auxiliary function.
29164         * lib/windows-spawn.h (compose_command): New declaration.
29165         * lib/windows-spawn.c (compose_command): New function, extracted from
29166         spawnpvech.
29167         (spawnpvech): Use it.
29169 2020-12-24  Bruno Haible  <bruno@clisp.org>
29171         posix_spawn* tests: Add support for native Windows.
29172         * tests/test-posix_spawn-open1.c (DATA_FILENAME): Treat native Windows
29173         like Cygwin.
29174         * tests/test-posix_spawn-dup2-stdin.c (main): Don't assume the signals
29175         SIGHUP and SIGPIPE. On native Windows, don't call
29176         posix_spawnattr_setsigmask.
29177         * tests/test-posix_spawn-dup2-stdout.c (main): Likewise.
29178         * tests/test-posix_spawn-fchdir.c (main): Likewise.
29179         * tests/test-posix_spawn-chdir.c (test): Likewise. Accept the child
29180         output from Cygwin's 'pwd' program.
29181         * tests/test-posix_spawn-script.c (main): On native Windows, skip the
29182         executable-shell-script part of the test.
29183         * tests/test-posix_spawnp-script.c (main): Likewise.
29184         * modules/posix_spawn-tests (Depends-on): Add freopen, waitpid.
29185         (configure.ac): Don't define the POSIX_SPAWN_PORTED conditional.
29186         (Makefile.am): Don't test the POSIX_SPAWN_PORTED conditional.
29187         * modules/posix_spawnp-tests (Depends-on): Add  waitpid.
29188         (configure.ac): Don't define the POSIX_SPAWN_PORTED conditional.
29189         (Makefile.am): Don't test the POSIX_SPAWN_PORTED conditional.
29190         * modules/posix_spawn_file_actions_addchdir-tests (Makefile.am): Don't
29191         test the POSIX_SPAWN_PORTED conditional.
29192         * modules/posix_spawn_file_actions_addfchdir-tests (configure.ac):
29193         Define the POSIX_SPAWN_PORTED conditional here.
29195 2020-12-24  Bruno Haible  <bruno@clisp.org>
29197         sh-filename: Add support for native Windows.
29198         * m4/sh-filename.m4 (gl_SH_FILENAME): Treat native Windows like Cygwin.
29200 2020-12-24  Paul Eggert  <eggert@cs.ucla.edu>
29202         careadlinkat: improve warning line number
29203         This propagates an idea first used in canonicalize-lgpl.
29204         * lib/careadlinkat.c (GCC_BOGUS_WRETURN_LOCAL_ADDR):
29205         New macro.
29206         (careadlinkat): Use it.
29208         linkat: use eloop-threshold
29209         * lib/linkat.c: Include eloop-threshold.h.
29210         Do not include sys/param.h.
29211         (MAXSYMLINKS): Remove.
29212         (link_follow, linkat_follow): Use __eloop_threshold instead
29213         of MAXSYMLINKS.
29214         * m4/linkat.m4 (gl_FUNC_LINKAT): Omit sys/param.h check.
29215         * modules/linkat (Depends-on): Add eloop-threshold.  Sort.
29217         canonicalize-lgpl: use eloop-threshold
29218         * lib/canonicalize-lgpl.c [!_LIBC]: Include eloop-threshold.h.
29219         (MAXSYMLINKS, __eloop_threshold): Remove.
29220         * modules/canonicalize-lgpl (Depends-on): Add eloop-threshold.
29222         eloop-threshold: new module
29223         * config/srclist.txt: Add a comment about it.
29224         * lib/eloop-threshold.h, modules/eloop-threshold: New files.
29226         canonicalize: prefer faccessat to stat
29227         A proper faccessat doesn't have the EOVERFLOW problem, and can be
29228         more efficient as it needn't gather data from the filesystem to
29229         fill in struct stat.  So use stat only if faccessat is absent,
29230         or when checking for symlink loops in canonicalize.c.
29231         * lib/canonicalize-lgpl.c, lib/canonicalize.c:
29232         Include fcntl.h, for AT_EACCESS.
29233         (FACCESSAT_NEVER_EOVERFLOWS): Default to false.
29234         (file_accessible): New function, based on faccessat but with
29235         a fallback to stat and with an EOVERFLOW workaround.
29236         (dir_check): Use it.
29237         (dir_suffix): New static constant.
29238         * lib/canonicalize-lgpl.c (FACCESSAT_NEVER_EOVERFLOWS) [_LIBC]:
29239         Use __ASSUME_FACCESSAT2 to set FACCESSAT_NEVER_EOVERFLOWS
29240         (__faccessat) [!_LIBC]: Define.
29241         (realpath_stk): Use dir_suffix now.
29242         * lib/canonicalize.c (canonicalize_filename_mode_stk):
29243         If logical, don't check each component's existence; just check
29244         at the end, as that's enough.
29245         * m4/canonicalize.m4 (gl_FUNC_CANONICALIZE_FILENAME_MODE)
29246         (gl_CANONICALIZE_LGPL_SEPARATE):
29247         Require gl_FUNC_FACCESSAT_EOVERFLOW,
29248         gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, and check for faccessat.
29249         (gl_CANONICALIZE_LGPL_SEPARATE): Do not check for readlink,
29250         as the code does not use HAVE_READLINK.
29251         * modules/canonicalize, modules/canonicalize-lgpl (Files):
29252         Add m4/faccessat.m4, m4/lstat.m4.
29253         (Depends-on): Add fcntl-lh.
29255         faccessat: work around F_OK EOVERFLOW bug
29256         * doc/posix-functions/faccessat.texi: Mention the problem.
29257         * lib/faccessat.c (FACCESSAT_NEVER_EOVERFLOWS): Default to 0.
29258         (rpl_faccessat): If !FACCESSAT_NEVER_EOVERFLOWS, check
29259         for F_OK and EOVERFLOW, which means we can return 0.
29260         * m4/faccessat.m4 (gl_FUNC_FACCESSAT_EOVERFLOW): New macro.
29261         (gl_FUNC_FACCESSAT): Use it.
29263         stat failing with EOVERFLOW implies existence
29264         * lib/euidaccess.c (euidaccess):
29265         * lib/file-has-acl.c (file_has_acl):
29266         * lib/link.c (link, rpl_link):
29267         * lib/mkdir.c (rpl_mkdir):
29268         * lib/mkfifo.c (rpl_mkfifo):
29269         * lib/mknod.c (rpl_mknod):
29270         * lib/ptsname_r.c (__ptsname_r):
29271         * lib/symlink.c (rpl_symlink):
29272         * lib/symlinkat.c (rpl_symlinkat):
29273         * lib/unlink.c (rpl_unlink):
29274         * lib/unlinkat.c (rpl_unlinkat):
29275         * lib/utime.c (utime):
29276         If stat fails with EOVERFLOW the file exists, so treat it that way
29277         in file-existence tests that do not need struct stat values.
29279         canonicalize-lgpl: remove freea macro
29280         * lib/canonicalize-lgpl.c (freea) [_LIBC]: Remove; not needed.
29282         canonicalize, canonicalize-lgpl: fix symlink bug
29283         Problem reported by Adhemerval Zanella in:
29284         https://lists.gnu.org/r/bug-gnulib/2020-12/msg00155.html
29285         * lib/canonicalize-lgpl.c, lib/canonicalize.c:
29286         (suffix_requires_dir_check, dir_check): New functions.
29287         (GCC_BOGUS_WRETURN_LOCAL_ADDR): New macro, to put the diagnostic
29288         closer to the related GCC diagnostics.
29289         * lib/canonicalize-lgpl.c (realpath_stk):
29290         * lib/canonicalize.c (canonicalize_file_mode_stk):
29291         Use them to fix a bug with .../symlink-to-regular-file/ etc.
29292         * lib/canonicalize-lgpl.c (__stat) [!_LIBC]: New macro.
29293         (realpath_stk): New function,
29294         with the contents of the old __realpath and a new scratch buffer arg.
29295         This is needed to pacify GCC 10.1, as canonicalize.c is already doing.
29296         (__realpath): Use it.
29297         * tests/test-canonicalize-lgpl.c, tests/test-canonicalize.c:
29298         Add test cases for the bugs.
29300 2020-12-24  Bruno Haible  <bruno@clisp.org>
29302         execute: Treat signalled processes like wait-process does.
29303         * lib/execute.c: Include <sys/types.h>, <sys/wait.h>.
29304         (execute): Recognize the case where the exit code indicates a signalled
29305         child process.
29306         * tests/test-execute-main.c (main): Update expected test result.
29307         * modules/execute (Depends-on): Add sys_wait.
29309 2020-12-24  Bruno Haible  <bruno@clisp.org>
29311         windows-spawn: Improve errno upon failure on native Windows.
29312         * lib/windows-spawn.c (spawnpvech): Map the CreateProcess errors
29313         ERROR_BAD_FORMAT and ERROR_BAD_EXE_FORMAT to ENOEXEC.
29314         * tests/executable-script.sh: New file.
29315         * tests/test-posix_spawn-script.c (main): Also try executing
29316         executable-script.sh.
29317         * tests/test-posix_spawnp-script.c (main): Likewise.
29318         * tests/test-execute-script.c (main): Likewise.
29319         * tests/test-spawn-pipe-script.c (main): Likewise.
29320         * modules/posix_spawn-tests (Files): Add tests/executable-script.sh.
29321         * modules/posix_spawnp-tests (Files): Likewise.
29322         * modules/execute-tests (Files): Likewise.
29323         * modules/spawn-pipe-tests (Files): Likewise.
29325 2020-12-24  Bruno Haible  <bruno@clisp.org>
29327         findprog-in: Improve errno upon failure on native Windows.
29328         * lib/findprog-in.c (find_in_given_path): If the file basename has no
29329         dot and the search with a suffix returned no result, do also a search
29330         without a suffix, and set errno = ENOEXEC if we find a file in this way.
29331         * tests/test-spawn-pipe-script.c (main): Update expected errno.
29333 2020-12-23  Bruno Haible  <bruno@clisp.org>
29335         posix_spawn, posix_spawnp: Fix execution of scripts.
29336         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_SECURE): New macro.
29337         (gl_POSIX_SPAWN_BODY): Invoke it. Set REPLACE_POSIX_SPAWN if posix_spawn
29338         or posix_spawnp allows unsecure execution of scripts.
29339         * doc/posix-functions/posix_spawn.texi: Document the script execution
29340         problem.
29341         * doc/posix-functions/posix_spawnp.texi: Likewise.
29343 2020-12-23  Bruno Haible  <bruno@clisp.org>
29345         Add unit tests regarding execution of scripts.
29346         * tests/executable-script: New file.
29347         * tests/executable-shell-script: New file.
29348         * tests/test-posix_spawn-script.c: New file.
29349         * tests/test-posix_spawnp-script.c: New file.
29350         * tests/test-execute-script.c: New file.
29351         * tests/test-spawn-pipe-script.c: New file.
29352         * modules/posix_spawn-tests (Files): Add
29353         tests/test-posix_spawn-script.c, tests/executable-script,
29354         tests/executable-shell-script.
29355         (Makefile.am): Compile and run test-posix_spawn-script.
29356         * modules/posix_spawnp-tests (Files): Add
29357         tests/test-posix_spawnp-script.c, tests/executable-script,
29358         tests/executable-shell-script.
29359         (Makefile.am): Compile and run test-posix_spawnp-script.
29360         * modules/execute-tests (Files): Add tests/test-execute-script.c,
29361         tests/executable-script, tests/executable-shell-script.
29362         (Makefile.am): Compile and run test-execute-script.
29363         * modules/spawn-pipe-tests (Files): Add tests/test-spawn-pipe-script.c,
29364         tests/executable-script, tests/executable-shell-script.
29365         (Makefile.am): Compile and run test-spawn-pipe-script.
29367 2020-12-23  Bruno Haible  <bruno@clisp.org>
29369         Don't execute scripts without '#!' marker through /bin/sh.
29370         This reflects the change done in glibc through
29371         <https://sourceware.org/bugzilla/show_bug.cgi?id=13134> and
29372         <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=d96de9634a334af16c0ac711074c15ac1762b23c>.
29373         * lib/spawni.c (internal_function): Remove macro.
29374         (script_execute): Remove function.
29375         (__spawni): Don't invoke script_execute.
29376         * lib/execute.c (execute): Disable the ENOEXEC handling.
29377         * lib/spawn-pipe.c (create_pipe): Likewise.
29378         * NEWS: Mention the change.
29380 2020-12-23  Bruno Haible  <bruno@clisp.org>
29382         posix_spawn[p]: Fix compilation error on Windows (regr. 2020-12-14).
29383         Reported by Adrian Ebeling <devl@adrian-ebeling.de> in
29384         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00189.html>.
29385         * lib/spawni.c (__spawni): Update function parameters.
29387 2020-12-23  Bruno Haible  <bruno@clisp.org>
29389         posix_spawn tests: Add two more tests.
29390         * tests/test-posix_spawn-inherit0.c: New file, based on
29391         tests/test-posix_spawn-open2.c.
29392         * tests/test-posix_spawn-inherit1.c: New file, based on
29393         tests/test-posix_spawn-open2.c.
29394         * modules/posix_spawn-tests (Files): Add them.
29395         (Depends-on): Add fflush.
29396         (Makefile.am): Compile and run test-posix_spawn-inherit0 and
29397         test-posix_spawn-inherit1.
29399 2020-12-23  Bruno Haible  <bruno@clisp.org>
29401         posix_spawn tests: Add another test.
29402         * tests/test-posix_spawn-open2.c: New file, based on
29403         tests/test-posix_spawn-open1.c.
29404         * modules/posix_spawn-tests (Files): Add it.
29405         (Makefile.am): Compile and run test-posix_spawn-open1.
29407 2020-12-20  Bruno Haible  <bruno@clisp.org>
29409         Remove support for broken <wchar.h> in AIX 3.
29410         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify test programs.
29412 2020-12-20  Bruno Haible  <bruno@clisp.org>
29414         Remove support for broken <wchar.h> in BSD/OS and OSF/1.
29415         * lib/wchar.in.h: Don't include <stdio.h>, <time.h>.
29416         * lib/mbchar.h: Likewise.
29417         * lib/mbiter.h: Likewise.
29418         * lib/mbuiter.h: Likewise.
29419         * m4/stdint.m4 (gl_STDINT_INCLUDES): Likewise.
29420         * lib/mbfile.h: Don't include <time.h>.
29421         * lib/mbswidth.h: Update comment.
29422         * lib/stdint.in.h: Don't include <stddef.h>, <stdio.h>, <time.h> before
29423         <wchar.h>.
29424         * lib/wctype.in.h: Likewise.
29425         * m4/btowc.m4 (gl_FUNC_BTOWC): Simplify test programs.
29426         * m4/iswblank.m4 (gl_FUNC_ISWBLANK): Likewise.
29427         * m4/iswdigit.m4 (gl_FUNC_ISWDIGIT): Likewise.
29428         * m4/iswxdigit.m4 (gl_FUNC_ISWXDIGIT): Likewise.
29429         * m4/mbrlen.m4 (gl_FUNC_MBRLEN, gl_MBRLEN_INCOMPLETE_STATE,
29430         gl_MBRLEN_RETVAL, gl_MBRLEN_NUL_RETVAL): Likewise.
29431         * m4/mbrtoc32.m4 (gl_MBRTOC32_SANITYCHECK): Likewise.
29432         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC, gl_MBRTOWC_INCOMPLETE_STATE,
29433         gl_MBRTOWC_SANITYCHECK, gl_MBRTOWC_NULL_ARG1, gl_MBRTOWC_NULL_ARG2,
29434         gl_MBRTOWC_RETVAL, gl_MBRTOWC_NUL_RETVAL, gl_MBRTOWC_STORES_INCOMPLETE,
29435         AC_FUNC_MBRTOWC): Likewise.
29436         * m4/mbsinit.m4 (gl_FUNC_MBSINIT): Likewise.
29437         * m4/mbsnrtowcs.m4 (gl_MBSNRTOWCS_WORKS_IN_TRADITIONAL_LOCALE):
29438         Likewise.
29439         * m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS, gl_MBSRTOWCS_WORKS): Likewise.
29440         * m4/mbstate_t.m4 (AC_TYPE_MBSTATE_T): Likewise.
29441         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
29442         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LS): Likewise.
29443         * m4/wchar_h.m4 (gl_WCHAR_H, gl_WCHAR_H_INLINE_OK): Likewise.
29444         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise.
29445         * m4/wcsdup.m4 (gl_FUNC_WCSDUP): Likewise.
29446         * m4/wcsnrtombs.m4 (gl_WCSNRTOMBS_WORKS_IN_TRADITIONAL_LOCALE):
29447         Likewise.
29448         * m4/wcsrtombs.m4 (gl_FUNC_WCSRTOMBS, gl_WCSRTOMBS_TERMINATION,
29449         gl_WCSRTOMBS_NULL): Likewise.
29450         * m4/wcstok.m4 (gl_FUNC_WCSTOK): Likewise.
29451         * m4/wctob.m4 (gl_FUNC_WCTOB): Likewise.
29452         * m4/wctype_h.m4 (gl_WCTYPE_H): Likewise.
29453         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
29454         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
29455         * m4/wmemchr.m4 (gl_FUNC_WMEMCHR): Likewise.
29456         * m4/wmemcmp.m4 (gl_FUNC_WMEMCMP): Likewise.
29457         * m4/wmemcpy.m4 (gl_FUNC_WMEMCPY): Likewise.
29458         * m4/wmemmove.m4 (gl_FUNC_WMEMMOVE): Likewise.
29459         * m4/wmemset.m4 (gl_FUNC_WMEMSET): Likewise.
29461 2020-12-20  Bruno Haible  <bruno@clisp.org>
29463         isnanf: Fix autoconf test.
29464         * m4/isnanf.m4 (gl_ISNANF_WORKS): Fix one of the NaN tests.
29466 2020-12-20  Bruno Haible  <bruno@clisp.org>
29468         Remove some of the support for obsolete IRIX 4 and 5.
29469         * m4/mountlist.m4 (AC_FUNC_GETMNTENT): Don't test for getmntent in
29470         libsun.
29471         * tests/init.sh (setup_): Don't talk about IRIX 5.
29473 2020-12-20  Bruno Haible  <bruno@clisp.org>
29475         filemode: Remove Cray support.
29476         * lib/filemode.c (IS_MIGRATED_FILE): Remove macro.
29477         (filemodestring): Don't produce an 'M' type.
29478         * m4/filemode.m4 (gl_FILEMODE): Don't invoke AC_STRUCT_ST_DM_MODE.
29479         * m4/st_dm_mode.m4: Remove file.
29480         * modules/filemode (Files): Remove it.
29482 2020-12-20  Paul Eggert  <eggert@cs.ucla.edu>
29484         free-posix: assume glibc 2.33 fixes this.
29485         * m4/free.m4 (gl_FUNC_FREE): Assume glibc 2.33+ is fixed.
29486         Use compile-time test rather than guessing for cross-builds.
29488 2020-12-20  Bruno Haible  <bruno@clisp.org>
29490         backupfile: Fix compilation error on native Windows (regr. 2018-10-23).
29491         Reported by Adrian Ebeling <adrianebeling@gmx.de> in
29492         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00156.html>.
29493         * lib/backupfile.c (fpathconf): Define fallback, like for pathconf.
29495 2020-12-20  Bruno Haible  <bruno@clisp.org>
29497         float: Fix compilation error when gnulib's float.h exists twice.
29498         Reported by Santiago Vila <sanvila@unex.es>.
29499         * lib/float.in.h (GNULIB_defined_long_double_union): New macro.
29501 2020-12-19  Bruno Haible  <bruno@clisp.org>
29503         free-posix: Assume future POSIX compliance only on OpenBSD and Solaris.
29504         * m4/free.m4 (gl_FUNC_FREE): Guess yes only on OpenBSD and Solaris.
29505         Don't trust _POSIX_VERSION for this test.
29507 2020-12-19  Paul Eggert  <eggert@cs.ucla.edu>
29509         free-posix: port to GNU/Linux
29510         * m4/free.m4 (gl_FUNC_FREE): Don’t assume GNU hosts are free of
29511         the bug, as it occurs on Ubuntu 20.10 x86-64 and, I assume, on
29512         other GNU/Linux hosts.
29514 2020-12-19  Bruno Haible  <bruno@clisp.org>
29516         free-posix: Add tests.
29517         * tests/test-free.c: New file.
29518         * tests/macros.h (ASSERT_NO_STDIO,
29519         WRITE_MACROEXPANDED_INTEGER_TO_STDERR, WRITE_INTEGER_TO_STDERR,
29520         WRITE_TO_STDERR): New macros.
29521         * modules/free-posix-tests: New file.
29523 2020-12-18  Bruno Haible  <bruno@clisp.org>
29525         free-posix: Add C++ declaration test.
29526         * tests/test-stdlib-c++.cc (free): New declaration.
29528 2020-12-18  Bruno Haible  <bruno@clisp.org>
29530         free-posix: New module, renamed from 'free'.
29531         * modules/free-posix: Renamed from modules/free.
29532         (configure.ac): Update gl_STDLIB_MODULE_INDICATOR invocation.
29533         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_FREE_POSIX,
29534         not GNULIB_FREE.
29535         * modules/stdlib (Makefile.am): Substitute GNULIB_FREE_POSIX, not
29536         GNULIB_FREE.
29537         * lib/stdlib.in.h (free): Test GNULIB_FREE_POSIX, not GNULIB_FREE.
29538         * doc/posix-functions/free.texi: Mention the module 'free-posix' and
29539         what it does.
29540         * NEWS: Mention that module 'free' no longer exists.
29541         * modules/canonicalize (Depends-on): Add free-posix. Remove free.
29542         * modules/canonicalize-lgpl (Depends-on): Likewise.
29544 2020-12-18  Bruno Haible  <bruno@clisp.org>
29546         free: Remove support for obsolete platforms.
29547         * m4/free.m4 (gl_FUNC_FREE): Assume free(NULL) works. Don't define
29548         CANNOT_FREE_NULL.
29549         * lib/free.c (rpl_free): Don't test CANNOT_FREE_NULL.
29550         * modules/free (Description): Update.
29551         * doc/posix-functions/free.texi: Don't mention SunOS 4 any more.
29553 2020-12-18  Paul Eggert  <eggert@cs.ucla.edu>
29555         intprops: port to ICC 2021.1 Beta 20201112
29556         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW_P):
29557         Port to ICC 2021.1, which has a non-working __builtin_mul_overflow_p.
29558         Add a clause for other compilers that claim to support
29559         __builtin_mul_overflow_p, since we might as well find out about
29560         slackers other than Clang and ICC.
29561         (INT_MULTIPLY_WRAPV): ICC 2021 has GCC bug 91450, so treat it
29562         like older GCCs even when it claims to be a newer one.
29564 2020-12-18  Bruno Haible  <bruno@clisp.org>
29566         intprops: Avoid potentially buggy __builtin_add_overflow in GCC 5, 6.
29567         Reported by Stefan Liebler <stli@linux.ibm.com> in
29568         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00152.html>.
29569         * lib/intprops.h (_GL_HAS_BUILTIN_ADD_OVERFLOW): Don't define for
29570         GCC 5.x and 6.x.
29571         * lib/glob.c (size_add_wrapv): Don't use __builtin_add_overflow for
29572         GCC 5.x and 6.x.
29574 2020-12-17  Bruno Haible  <bruno@clisp.org>
29576         free: Fix warning.
29577         Reported by Pádraig Brady <P@draigBrady.com> in
29578         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00148.html>.
29579         * lib/stdlib.in.h (free): New declaration.
29580         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether 'free' is declared.
29581         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_FREE, REPLACE_FREE.
29582         * modules/stdlib (Makefile.am): Substitute GNULIB_FREE, REPLACE_FREE.
29583         * m4/free.m4 (gl_FUNC_FREE): Set REPLACE_FREE, instead of defining
29584         'free' as a macro here.
29585         * modules/free (Depends-on): Add stdlib.
29586         (configure.ac): Test REPLACE_FREE. Invoke gl_STDLIB_MODULE_INDICATOR.
29588 2020-12-17  Paul Eggert  <eggert@cs.ucla.edu>
29590         canonicalize-lgpl: fix AIX test failures
29591         This merges the recent canonicalize.c fix into canonicalize-lgpl.c.
29592         Problem reported by Bruno Haible in:
29593         https://lists.gnu.org/r/bug-gnulib/2020-12/msg00138.html
29594         * lib/canonicalize-lgpl.c: Include sys/stat.h.
29595         (__realpath): When testing a file name ending in '/', use stat
29596         rather than readlink, so that it does the right thing on AIX.
29597         * modules/canonicalize-lgpl (Depends-on): Add stat, sys_stat.
29599         canonicalize: omit second readlink when not needed
29600         * lib/canonicalize.c (canonicalize_filename_mode_stk):
29601         Omit second readlink when (can_exist != CAN_MISSING
29602         && startlen != 0 && !logical).  Simplify.
29604         canonicalize: remove arbitrary 8192-byte limit
29605         Remove canonicalize.c’s arbitrary 8192-byte limit on platforms
29606         like GNU Hurd that do not define the PATH_MAX macro, and similarly
29607         for canonicalize-lgpl.c’s arbitrary 1024-byte limit.  Do this by
29608         using scratch buffers.  Lessen the number of differences between
29609         the two source files, to simplify this and future maintenance.
29610         * lib/canonicalize-lgpl.c (__realpath):
29611         * lib/canonicalize.c (canonicalize_filename_mode_stk):
29612         Use scratch buffers instead of malloc and malloca.  This avoids
29613         the need for alloca, and avoids the need for malloc in most cases.
29614         * lib/canonicalize-lgpl.c, lib/canonicalize.c: Make these files
29615         easier to compare, e.g., by sorting include files and by switching
29616         to the GNU convention of calling file names "file names", not
29617         "path names".  Include stdbool.h, scratch_buffer.h.
29618         * lib/canonicalize-lgpl.c (IDX_MAX) [_LIBC]: New macro.
29619         (malloca) [_LIBC]: Remove.
29620         [!_LIBC]: Do not include malloca.h.
29621         (get_path_max): New function, so that pathconf is called only in
29622         the rare and dubious case when when RESOLVED is not null and
29623         PATH_MAX is not defined.  Invoke pathconf on "/" not the input
29624         file name, as we care about the longest file name starting from
29625         "/" (not from the input file name), and POSIX does not specify
29626         what pathconf does on a non-directory file anyway.  If PATH_MAX is
29627         not defined, do not worry about overriding a path_max of 0, and do
29628         not let path_max exceed IDX_MAX.
29629         (__realpath): Remove an assumption that file name components
29630         cannot exceed 1024 bytes when PATH_MAX is not defined (wrong for
29631         the Hurd, presumably).
29632         When allocating the result, allocate it to just the right size;
29633         this costs nothing when the result is smaller than 1023 bytes,
29634         and for larger results it's probably worth the CPU to call realloc,
29635         as canonicalize.c already does.
29636         * lib/canonicalize.c: Include attribute.h.
29637         Do not include pathmax.h or xgetcwd.h.
29638         (PATH_MAX): Do not define, so file names longer than 8192 bytes
29639         work on platforms with no fixed limit.
29640         (canonicalize_filename_mode_stk): New function, with
29641         the content of the old canonicalize_filename_mode.
29642         Use getcwd instead of xgetcwd, and readlink instead of areadlink,
29643         since the scratch buffers now do memory management for us.
29644         Use rawmemchr instead of adding strlen.
29645         Use mempcpy instead of mempcpy + size.
29646         Assume free preserves errno.
29647         (canonicalize_filename_mode): Use it.
29648         * modules/canonicalize (Depends-on): Remove areadlink, pathmax,
29649         xgetcwd.  Add attribute, free, getcwd, mempcpy, rawmemchr,
29650         scratch_buffer, stdbool, xalloc-die.
29651         * modules/canonicalize-lgpl (Depends-on): Remove alloca-opt,
29652         malloca, realloc-posix.  Add scratch_buffer, stdbool.
29654         canonicalize-lgpl: simplify merge to glibc
29655         This patch lessens the differences between git glibc
29656         stdlib/canonicalize.c and lib/canonicalize-lgpl.c.
29657         The (perhaps wishful) goal is to make them identical.
29658         * lib/canonicalize-lgpl.c [!_LIBC]:
29659         Include <libc-config.h>, not config.h.
29660         Omit an unnecessary (!HAVE_CANONICALIZE_FILE_NAME ||
29661         !FUNC_REALPATH_WORKS || defined _LIBC) #if.
29662         Do not include alloca.h, since we use malloca now.
29663         [_LIBC]: Include <eloop-threshold.h>, and define dummy macros
29664         FILE_SYSTEM_PREFIX_LEN, IS_ABSOLUTE_FILE_NAME, ISSLASH, malloca,
29665         freea so that the mainline code can be kept #ifdef free.
29666         [!_LIBC]: Remove dummy macros for SHLIB_COMPAT, versioned_symbol,
29667         compat_symbol, weak_alias, __set_errno since libc-config.h does that.
29668         Add redirecting macros __mempcpy, __pathconf, __rawmemchr,
29669         __eloop_threshold.  All uses of their definiens changed.
29670         (SIZE_MAX): Remove; no longer needed.
29671         (alloc_failed): Remove, and remove all instances.
29672         No need for alloc_failed now that free preserves errno.
29673         (__realpath): Default path_max to 1024 instead of 8192, as that’s
29674         the glibc tradition and is safer when the 2nd argument is null.
29675         Use __rawmemchr instead of strchr.
29676         Use __mempcpy where appropriate.
29677         Simplify test for overflow so that it does not need SIZE_MAX.
29678         Do not preserve errno around free or freea calls; no longer needed.
29679         Mark __realpath with libc_hidden_def.
29680         * modules/canonicalize-lgpl (Depends-on): Add free, libc-config,
29681         malloc-posix, mempcpy, realloc-posix, rawmemchr.
29682         * modules/free: Now LGPLv2+, for canonicalize-lgpl.
29684         free: preserve errno
29685         * lib/free.c (rpl_free): Preserve errno.  Check for null only if
29686         CANNOT_FREE_NULL is defined, as an optimization for POSIX 2008
29687         platforms that do not preserve errno.
29688         * m4/free.m4 (gl_FUNC_FREE): Check whether free preserves errno.
29689         Also, define CANNOT_FREE_NULL if free cannot free NULL.
29690         * modules/free (configure.ac): Also replace 'free' if
29691         it does not preserve errno.
29693         idx: simplify IDX_MAX, remove IDX_WIDTH
29694         * lib/idx.h (IDX_MAX): Simplify by removing obsolete reference
29695         to UNSIGNED_IDX_T.
29696         (IDX_WIDTH): Remove, since it’s not used and its value
29697         arguably should be PTRDIFF_WIDTH anyway.
29699 2020-12-16  Bruno Haible  <bruno@clisp.org>
29701         posix_spawn_file_actions_addfchdir-tests: Rename test.
29702         * tests/test-posix_spawn-fchdir.c: Renamed from
29703         tests/test-posix_spawn5.c.
29704         * modules/posix_spawn_file_actions_addfchdir-tests (Files, Makefile.am):
29705         Update.
29707         posix_spawn_file_actions_addchdir-tests: Rename test.
29708         * tests/test-posix_spawn-chdir.c: Renamed from
29709         tests/test-posix_spawn4.c.
29710         * modules/posix_spawn_file_actions_addchdir-tests (Files, Makefile.am):
29711         Update.
29713         posix_spawn-tests: Rename test.
29714         * tests/test-posix_spawn-open1.c: Renamed from
29715         tests/test-posix_spawn3.c.
29716         * modules/posix_spawn-tests (Files, Makefile.am): Update.
29718         posix_spawnp-tests: Rename test.
29719         * tests/test-posix_spawn-dup2-stdin.c: Renamed from
29720         tests/test-posix_spawn2.c.
29721         * tests/test-posix_spawn-dup2-stdin.in.sh: Renamed from
29722         tests/test-posix_spawn2.in.sh.
29723         * modules/posix_spawnp-tests (Files, Makefile.am): Update.
29725         posix_spawnp-tests: Rename test.
29726         * tests/test-posix_spawn-dup2-stdout.c: Renamed from
29727         tests/test-posix_spawn1.c.
29728         * tests/test-posix_spawn-dup2-stdout.in.sh: Renamed from
29729         tests/test-posix_spawn1.in.sh.
29730         * modules/posix_spawnp-tests (Files, Makefile.am): Update.
29732 2020-12-14  Bruno Haible  <bruno@clisp.org>
29734         findprog-in: Allow overriding the current directory.
29735         * lib/findprog.h (find_in_given_path): Add directory argument.
29736         * lib/findprog-in.c (find_in_given_path): Likewise.
29737         * lib/execute.c (execute): Update caller.
29738         * lib/spawn-pipe.c (create_pipe): Likewise.
29739         * lib/windows-spawn.c (spawnpvech): Likewise.
29740         * NEWS: Mention the change.
29742 2020-12-14  Bruno Haible  <bruno@clisp.org>
29744         posix_spawn-internal: Make better use of 'const'.
29745         * lib/spawn_int.h (__spawni): Does not need write access to the elements
29746         of argv and envp.
29747         * lib/spawni.c (__spawni, script_execute): Likewise.
29748         * lib/spawn.c (posix_spawn): Update caller.
29749         * lib/spawnp.c (posix_spawnp): Likewise.
29751 2020-12-14  Bruno Haible  <bruno@clisp.org>
29753         spawn: Make it compile on native Windows.
29754         * modules/spawn (Depends-on): Add signal-h.
29756 2020-12-14  Bruno Haible  <bruno@clisp.org>
29758         windows-spawn: Avoid shadowing a variable.
29759         * lib/windows-spawn.c (spawnpvech): Rename local variable 'flags'.
29761 2020-12-13  Paul Eggert  <eggert@cs.ucla.edu>
29763         string: port memchr macro to AIX 7.2 XLC
29764         Its <string.h> defines a memchr macro to help inlining.
29765         * lib/string.in.h (memchr): #undef before #defining.
29767         canonicalize: fix AIX test failures
29768         Problem reported by Bruno Haible in:
29769         https://lists.gnu.org/r/bug-gnulib/2020-12/msg00109.html
29770         * lib/canonicalize.c (canonicalize_filename_mode):
29771         When testing a file name ending in '/', use stat rather than
29772         readlink, so that it does the right thing on AIX.
29773         * modules/canonicalize (Depends-on): Add readlink, to pull in the
29774         recent changes in the Gnulib readlink module.
29776         Assume readlink/readlinkat ERANGE fix
29777         * lib/areadlink-with-size.c (areadlink_with_size):
29778         * lib/areadlinkat-with-size.c (areadlinkat_with_size):
29779         * lib/careadlinkat.c (readlink_stk):
29780         Do not worry about readlink or readlinkat failing with errno == ERANGE,
29781         since the Gnulib readlink and readlinkat modules now fix that.
29783         getcwd: port to AIX
29784         * lib/getcwd.c [!_LIBC]: Undef stat64 before #defining it,
29785         in case our sys/stat.h #defined a function macro with the same name.
29787         readlink, readlinkat: add ERANGE portability
29788         Fix some portability issues with Gnulib's readlink and readlinkat,
29789         notably mostly working around the ERANGE problem in AIX and HP-UX.
29790         * doc/posix-functions/readlink.texi:
29791         * doc/posix-functions/readlinkat.texi:
29792         ERANGE problem is mostly fixed now.  Mention AIX problem with
29793         trailing / and EINVAL.  Lessen differences between these two files.
29794         * lib/readlink.c (rpl_readlink):
29795         * lib/readlinkat.c (rpl_readlinkat):
29796         If stat ("FILE/", ...) reports EOVERFLOW, treat FILE/ as an
29797         existing directory.  Mostly work around READLINK_TRUNCATE BUG.
29798         Lessen spurious differences between the readlink and readlinkat code.
29799         * lib/readlinkat.c (rpl_readlinkat):
29800         Fix bug where stat was used where fstatat was intended.
29801         * m4/readlink.m4 (gl_FUNC_READLINK):
29802         Rename gl_cv_func_readlink_works to gl_cv_func_readlink_trailing_slash
29803         to identify readlink problems more precisely.  All uses changed.
29804         Guess no on AIX or HP-UX for this variable.
29805         Add check for whether readlink truncates results,
29806         and define new macro READLINK_TRUCATE_BUG accordingly.
29807         * m4/readlinkat.m4 (gl_FUNC_READLINKAT):
29808         Also check gl_cv_func_readlink_trailing_slash when deciding
29809         whether to replace readlinkat.
29810         * modules/readlinkat (Depends-on): Most dependencies are also
29811         needed if replacing readlinkat.  fstatat is different, as it
29812         is needed only if replacing an existing readlinkat.
29814 2020-12-13  Bruno Haible  <bruno@clisp.org>
29816         spawn-pipe: Fix hanging processes on Windows (regression 2020-11-30).
29817         * lib/spawn-pipe.c (create_pipe): After spawning the subprocess, close
29818         the stdin_handle and/or stdout_handle.
29820 2020-12-12  Bruno Haible  <bruno@clisp.org>
29822         Fix gnulib-tool error when some modules occur in tests/.
29823         * doc/gnulib.texi (Specification): Update statistics.
29824         (Autoconf macros): Don't suggest to use AC_LIBOBJ in a .m4 file.
29825         (Using AC_LIBOBJ): New section.
29826         * check-AC_LIBOBJ: New file.
29827         * modules/fnmatch-gnu (Files): Add lib/fnmatch.c.
29828         * modules/fopen-gnu (Files): Add lib/fopen.c.
29829         * modules/memmem (Files): Add lib/memmem.c.
29830         * modules/renameat (Files): Add lib/at-func2.c.
29831         * modules/strcasestr (Files): Add lib/strcasestr.c.
29832         * modules/strstr (Files): Add lib/strstr.c.
29834 2020-12-11  Bruno Haible  <bruno@clisp.org>
29836         sh-quote, execute, spawn-pipe, etc.: Make better use of 'const'.
29837         * lib/sh-quote.h (shell_quote_argv): Does not need write access to the
29838         elements of argv.
29839         * lib/sh-quote.c (shell_quote_argv): Likewise.
29840         * lib/windows-spawn.h (prepare_spawn): Add 'const' the argument type and
29841         the return type.
29842         * lib/windows-spawn.c (prepare_spawn): Likewise.
29843         * lib/os2-spawn.h (prepare_spawn): Likewise.
29844         * lib/os2-spawn.c (prepare_spawn): Likewise.
29845         * lib/execute.h (execute): Does not need write access to the elements of
29846         prog_argv.
29847         * lib/execute.c (execute): Likewise.
29848         * lib/spawn-pipe.h (create_pipe_out, create_pipe_in, create_pipe_bidi):
29849         Likewise.
29850         * lib/spawn-pipe.c (create_pipe, create_pipe_bidi, create_pipe_in,
29851         create_pipe_out): Likewise.
29852         * lib/pipe-filter.h (pipe_filter_ii_execute, pipe_filter_gi_create):
29853         Likewise.
29854         * lib/pipe-filter-ii.c (pipe_filter_ii_execute): Likewise.
29855         * lib/pipe-filter-gi.c (pipe_filter_gi_create): Likewise.
29856         * lib/javaexec.h (execute_fn): Does not need write access to the
29857         elements of prog_argv.
29858         * lib/javaexec.c (execute_java_class): Update variable types and remove
29859         casts to 'char *'.
29860         * lib/csharpexec.h (execute_fn): Does not need write access to the
29861         elements of prog_argv.
29862         * lib/csharpexec.c (execute_csharp_using_mono,
29863         execute_csharp_using_sscli): Update variable types and remove casts to
29864         'char *'.
29865         * lib/javacomp.c (compile_using_envjavac, compile_using_gcj,
29866         compile_using_javac, compile_using_jikes, is_envjavac_gcj,
29867         is_envjavac_gcj43, is_gcj_present, is_gcj_43, is_javac_present,
29868         is_jikes_present): Update variable types and remove casts to 'char *'.
29869         * lib/javaversion.c (execute_and_read_line): Does not need write access
29870         to the elements of prog_argv.
29871         * lib/csharpcomp.c (compile_csharp_using_mono,
29872         compile_csharp_using_sscli): Update variable types and remove casts to
29873         'char *'.
29874         * tests/test-sh-quote.c (main): Update variable types and remove casts
29875         to 'char *'.
29876         * tests/test-execute-main.c (main): Update variable types and remove
29877         casts to 'char *'.
29878         * tests/test-spawn-pipe-main.c (test_pipe): Update variable types and
29879         remove casts to 'char *'.
29880         * NEWS: Mention the changes.
29882 2020-12-11  Bruno Haible  <bruno@clisp.org>
29884         execute-tests: Fix compilation error with MSVC.
29885         * tests/test-execute-child.c (is_device): With _fstat, use
29886         'struct _stat', not 'struct stat'.
29888 2020-12-11  Paul Eggert  <eggert@cs.ucla.edu>
29890         vararrays: just use 2.70
29891         * m4/vararrays.m4 (AC_C_VARARRAYS): Do not override Autoconf 2.70
29892         and later, since Autoconf 2.70 matches Gnulib now.
29894         sys_types: just use 2.70
29895         * m4/sys_types_h.m4 (AC_HEADER_MAJOR):
29896         Reindent to match Autoconf sources.
29897         Use Autoconf 2.70 as a prerequisite, not 2.69c.
29899         stdint: port to Autoconf 2.70
29900         * m4/stdint.m4 (gl_STDINT_H): Check for inttypes.h and sys/types.h
29901         instead of assuming that AC_INCLUDES_DEFAULT does it.
29902         The old code relied on AC_INCLUDES_DEFAULT being called
29903         and setting ac_cv_header_inttypes_h and ac_cv_header_sys_types_h,
29904         but this does not occur in Autoconf 2.70.
29906         pid_t.m4: just use 2.70
29907         * m4/pid_t.m4 (AC_TYPE_PID_T):
29908         Use Autoconf 2.70 as a prerequisite, not 2.69c.
29910         largefile: just use 2.70
29911         * m4/largefile.m4 (_AC_SYS_LARGEFILE_TEST_INCLUDES):
29912         Use Autoconf 2.70 as a prerequisite, not 2.69c.
29914         AC_C_RESTRICT: update from Autoconf
29915         * m4/gnulib-common.m4 (gl_PROG_CC_C99): Use Autoconf 2.70
29916         as a prerequisite, not 2.69c, since 2.70 is now out.
29917         (AC_C_RESTRICT): Define only for 2.70 or earlier.
29918         Try __restrict__ before __restrict.
29920         extensions: update from Autoconf
29921         * m4/extensions.m4 (AC_CHECK_INCLUDES_DEFAULT):
29922         Provide a default implementation for Autoconf 2.69 or earlier.
29923         (AC_USE_SYSTEM_EXTENSIONS): Copy from Autoconf git.  Define only
29924         if Autoconf 2.70 or earlier, since 2.70.1 or later should be OK.
29926         alloca: update from Autoconf
29927         * m4/alloca.m4 (gl_PREREQ_ALLOCA):
29928         Trivial update to match Autoconf 2.70.
29930 2020-12-11  Bruno Haible  <bruno@clisp.org>
29932         memchr: Work around memory overrun bug on AIX 7.2.
29933         * m4/memchr.m4 (gl_FUNC_MEMCHR): Test against AIX 7.2 bug.
29934         * doc/posix-functions/memchr.texi: Mention the AIX bug.
29936 2020-12-11  Bruno Haible  <bruno@clisp.org>
29938         execute-tests: Fix compilation error on AIX in 32-bit mode.
29939         * tests/test-execute-child.c: In order to get the original definition of
29940         fstat, don't use '#undef fstat' and '#undef stat'. Instead, arrange to
29941         include the system's <sys/stat.h> and use it before including other
29942         header files.
29944 2020-12-10  Bruno Haible  <bruno@clisp.org>
29946         windows-spawn: Relicense under LGPLv2+.
29947         * modules/windows-spawn (License): Change to LGPLv2+.
29949 2020-12-10  Bruno Haible  <bruno@clisp.org>
29951         execute, spawn-pipe: Fix memory leak on native Windows.
29952         * lib/windows-spawn.h (prepare_spawn): Add a second parameter.
29953         * lib/windows-spawn.c: Don't include xalloc.h.
29954         (quoted_arg_length, quoted_arg_string): New functions, extracted from
29955         prepare_spawn.
29956         (prepare_spawn): Use malloc instead of XNMALLOC. Allocate memory for all
29957         elements of *new_argv together.
29958         * modules/windows-spawn (Depends-on): Remove xalloc. Add malloc-posix.
29959         * lib/os2-spawn.h (prepare_spawn): Add a second parameter.
29960         * lib/os2-spawn.c: Don't include xalloc.h.
29961         (prepare_spawn): Use malloc instead of XNMALLOC. Allocate memory for all
29962         elements of *new_argv together.
29963         * lib/execute.c: Include xalloc.h.
29964         (execute): Check return value of prepare_spawn. Free the memory
29965         allocated by prepare_spawn.
29966         * modules/execute (Depends-on): Add xalloc-die.
29967         * lib/spawn-pipe.c: Include xalloc.h.
29968         (create_pipe): Check return value of prepare_spawn. Free the memory
29969         allocated by prepare_spawn.
29970         * modules/spawn-pipe (Depends-on): Add xalloc-die.
29972 2020-12-10  Bruno Haible  <bruno@clisp.org>
29974         findprog-in: Relicense under LGPLv2+.
29975         Paul Smith's approval is in
29976         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00072.html>.
29977         * modules/findprog-in (License): Change to LGPLv2+.
29979 2020-12-10  Bruno Haible  <bruno@clisp.org>
29981         findprog-in: Don't exit upon out-of-memory.
29982         * lib/findprog.h (find_in_given_path): Document ENOMEM as possible error
29983         code.
29984         * lib/findprog-in.c: Don't include xalloc.h.
29985         (find_in_given_path): Call concatenated_filename, not
29986         xconcatenated_filename. Call strdup, not xstrdup. Upon out-of-memory,
29987         return NULL with errno set.
29988         * modules/findprog-in (Depends-on): Remove xconcat-filename, xalloc. Add
29989         concat-filename, strdup-posix, malloc-posix.
29991 2020-12-09  Bruno Haible  <bruno@clisp.org>
29993         fmaf: Work around a bug on FreeBSD 12.2/arm.
29994         * m4/fmaf.m4 (gl_FUNC_FMAF_WORKS): Add one more test.
29995         * doc/posix-functions/fmaf.texi: Mention the FreeBSD bug.
29997 2020-12-09  Bruno Haible  <bruno@clisp.org>
29999         threadlib: Fix test-fstrcmp failure on FreeBSD 11.
30000         * m4/threadlib.m4 (gl_THREADLIB_BODY): When weak symbols are not present
30001         on FreeBSD, define PTHREAD_IN_USE_DETECTION_HARD.
30002         * lib/glthread/threadlib.c: Include <errno.h>.
30003         (glthread_in_use): For FreeBSD, provide an alternative implementation
30004         that uses pthread_key_create.
30006 2020-12-09  Bruno Haible  <bruno@clisp.org>
30008         math C++ tests: Fix compilation error in with clang >= 7 on FreeBSD.
30009         * lib/math.in.h (isnan): For clang >= 7 on FreeBSD, declare 'rpl_isnan',
30010         not 'isnan'.
30012 2020-12-08  Bruno Haible  <bruno@clisp.org>
30014         std-gnu11: Make compatible with Autoconf 2.70.
30015         * m4/std-gnu11.m4: Disable the entire file if Autoconf >= 2.70 is in
30016         use.
30018 2020-12-08  Bruno Haible  <bruno@clisp.org>
30020         argp: Avoid undefined behaviour when invoking qsort().
30021         This fixes a test-argp-2.sh test failure on macOS and FreeBSD.
30022         Reported by Jeffrey Walton <noloader@gmail.com> in
30023         <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00085.html>.
30024         * lib/argp-help.c (group_cmp): Remove third argument.
30025         (hol_sibling_cluster_cmp, hol_cousin_cluster_cmp): New functions, based
30026         upon hol_cluster_cmp.
30027         (hol_cluster_cmp): Use hol_cousin_cluster_cmp.
30028         (hol_entry_cmp): Rewritten to implement a total order.
30030 2020-12-08  Bruno Haible  <bruno@clisp.org>
30032         argp: Improve comments.
30033         * lib/argp-help.c: Add sectioning comments. Write NULL to designate a
30034         null pointer.
30035         (struct hol_entry): Fix comment regarding sort order of group.
30036         (hol_entry_short_iterate, hol_entry_long_iterate): Add comment.
30037         (until_short, canon_doc_option, hol_entry_qcmp): Improve comment.
30038         (hol_cluster_is_child, argp_hol): Move functions.
30039         (HOL_ENTRY_PTRCMP): Remove unused macro.
30041 2020-12-08  Bruno Haible  <bruno@clisp.org>
30043         argp: Don't pass invalid arguments to isspace() and isalnum().
30044         * lib/argp-help.c (canon_doc_option): Cast character to 'unsigned int'
30045         before passing it to isspace() or isalnum().
30047 2020-12-08  Bruno Haible  <bruno@clisp.org>
30049         argp: Don't rely on undefined behaviour of _tolower().
30050         Patch by Eric Blake
30051         <https://lists.gnu.org/archive/html/bug-gnulib/2009-09/msg00287.html>.
30052         * lib/argp-help.c (hol_entry_cmp): Don't use _tolower on values that are
30053         not upper-case.  Pass correct range to tolower.
30055 2020-12-07  Bruno Haible  <bruno@clisp.org>
30057         unicodeio: Fix wrong result on FreeBSD.
30058         * lib/unicodeio.c (unicode_to_mb): Handle question mark fallback
30059         characters on all platforms.
30061 2020-12-07  Bruno Haible  <bruno@clisp.org>
30063         get-rusage-data tests: Avoid test failure on FreeBSD/x86_64.
30064         * tests/test-get-rusage-data.c (main): Don't expect a strict increase on
30065         FreeBSD systems.
30067 2020-12-07  Bruno Haible  <bruno@clisp.org>
30069         get-rusage-data: Fix link error on FreeBSD 12.2/arm64.
30070         * modules/get-rusage-data (configure.ac): Test whether sbrk exists.
30071         * lib/get-rusage-data.c (get_rusage_data_via_setrlimit): Define
30072         trivially of sbrk is not available.
30073         * doc/glibc-functions/sbrk.texi: Mention that the function does not
30074         exist in FreeBSD 12.2/arm64.
30075         * doc/glibc-functions/brk.texi: Likewise.
30077 2020-12-07  Bruno Haible  <bruno@clisp.org>
30079         Correct interaction between gl_ANSI_CXX and AC_PROG_CXX.
30080         Suggested by Zack Weinberg in
30081         <https://savannah.gnu.org/support/?110294>.
30082         * m4/ansi-c++.m4 (gl_ANSI_CXX): Mark AC_PROG_CXX as provided.
30083         * modules/uchar-c++-tests: Revert the workaround from 2020-08-18.
30085 2020-12-07  Bruno Haible  <bruno@clisp.org>
30087         Tweak the Windows oldnames workaround.
30088         Reported by Daniel R. Hurtmans <Daniel.Hurtmans@ulb.ac.be> in
30089         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00073.html>.
30090         * lib/unistd.in.h: On native Windows, include <io.h> and <direct.h>
30091         always.
30092         (getcwd): Use _GL_CXXALIAS_MDA_CAST.
30093         * lib/stdlib.in.h (putenv): Likewise.
30095 2020-12-06  Paul Eggert  <eggert@cs.ucla.edu>
30097         doc: fix flat address space discussion
30098         * doc/gnulib-readme.texi (Other portability assumptions):
30099         Move the all-bits-zero assumption outside the flat address space
30100         section, since the two issues are independent.
30102         doc: document -static-libubsan more
30103         * doc/gnulib-readme.texi (High Quality): Document pros and cons of
30104         -static-libubsan a bit more.  Mostly cons.
30106 2020-12-06  Bruno Haible  <bruno@clisp.org>
30108         doc: Add more details regarding the undefined behaviour sanitizer.
30109         * doc/gnulib-readme.texi (High Quality): Describe
30110         -fsanitize-undefined-trap-on-error better.
30112 2020-12-06  Bruno Haible  <bruno@clisp.org>
30114         Do the Windows oldnames workaround through the C++ GNULIB_NAMESPACE.
30115         Reported by Daniel R. Hurtmans <Daniel.Hurtmans@ulb.ac.be> in
30116         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00029.html>.
30117         * lib/c++defs.h (_GL_CXXALIAS_MDA_CAST): New macro.
30118         * lib/fcntl.in.h (creat, open):  In C++ mode, when GNULIB_NAMESPACE is
30119         defined: 1. Define a symbol in this namespace. 2. Don't redirect using
30120         a preprocessor #define.
30121         * lib/math.in.h (j0, j1, jn, y0, y1, yn): Likewise.
30122         * lib/search.in.h (lfind, lsearch): Likewise.
30123         * lib/stdio.in.h (fcloseall, fdopen, fileno, getw, putw, tempnam):
30124         Likewise.
30125         * lib/stdlib.in.h (ecvt, fcvt, gcvt, mktemp, putenv): Likewise.
30126         * lib/string.in.h (memccpy, strdup): Likewise.
30127         * lib/sys_stat.in.h (chmod, umask): Likewise.
30128         * lib/time.in.h (tzset): Likewise.
30129         * lib/unistd.in.h (access, chdir, close, dup, dup2, execl, execle,
30130         execlp, execv, execve, execvp, execvpe, getcwd, getpid, isatty, lseek,
30131         read, rmdir, swab, unlink, write): Likewise.
30132         * lib/utime.in.h (utime): Likewise.
30133         * lib/wchar.in.h (wcsdup): Likewise.
30134         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize HAVE_DECL_FCLOSEALL.
30135         (gl_STDIO_H): Set HAVE_DECL_FCLOSEALL.
30136         * modules/stdio (Makefile.am): Substitute HAVE_DECL_FCLOSEALL.
30137         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_DECL_ECVT,
30138         HAVE_DECL_FCVT, HAVE_DECL_GCVT.
30139         (gl_STDLIB_H): Set HAVE_DECL_ECVT, HAVE_DECL_FCVT, HAVE_DECL_GCVT.
30140         * modules/stdlib (Makefile.am): Substitute HAVE_DECL_ECVT,
30141         HAVE_DECL_FCVT, HAVE_DECL_GCVT.
30142         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize HAVE_DECL_EXECVPE.
30143         (gl_UNISTD_H): Set HAVE_DECL_EXECVPE.
30144         * modules/unistd (Makefile.am): Substitute HAVE_DECL_EXECVPE.
30145         * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize HAVE_DECL_WCSDUP.
30146         (gl_WCHAR_H): Set HAVE_DECL_WCSDUP.
30147         * modules/wchar (Makefile.am): Substitute HAVE_DECL_WCSDUP.
30149 2020-12-06  Bruno Haible  <bruno@clisp.org>
30151         doc: Mention some missing function declarations.
30152         * doc/glibc-functions/execvpe.texi: Mention the missing declaration on
30153         AIX.
30154         * doc/glibc-functions/fcloseall.texi: Mention the missing declaration on
30155         FreeBSD.
30156         * doc/pastposix-functions/ecvt.texi: Mention the missing declaration on
30157         Cygwin.
30158         * doc/pastposix-functions/fcvt.texi: Likewise.
30159         * doc/pastposix-functions/gcvt.texi: Likewise.
30161 2020-12-06  Bruno Haible  <bruno@clisp.org>
30163         doc: Tweak example.
30164         * doc/intprops.texi (Checking Integer Overflow): Use 'printf', not
30165         'print'.
30167 2020-12-06  Bruno Haible  <bruno@clisp.org>
30169         filenamecat-tests: Use idx_t for nonnegative ptrdiff_t variables.
30170         * tests/test-filenamecat.c: Include idx.h.
30171         (main): Mark prefixlen as nonnegative.
30172         * modules/filenamecat-tests (Depends-on): Add idx.
30174 2020-12-06  Bruno Haible  <bruno@clisp.org>
30176         time_rz: Use idx_t for nonnegative ptrdiff_t variables.
30177         * lib/time_rz.c: Include idx.h.
30178         (save_abbr): Mark zone_size as nonnegative.
30179         * modules/time_rz (Depends-on): Add idx.
30181 2020-12-06  Bruno Haible  <bruno@clisp.org>
30183         parse-datetime: Use idx_t for nonnegative ptrdiff_t variables.
30184         * lib/parse-datetime.y: Include idx.h.
30185         (textint): Mark digits as nonnegative.
30186         (parser_control): Mark dates_seen, days_seen, local_zones_seen,
30187         dsts_seen, times_seen, zones_seen as nonnegative.
30188         (lookup_word): Mark wordlen as nonnegative.
30189         (yylex): Mark count as nonnegative.
30190         (parse_datetime2): Mark tzsize as nonnegative.
30191         * modules/parse-datetime (Depends-on): Add idx.
30193 2020-12-06  Bruno Haible  <bruno@clisp.org>
30195         fnmatch: Use idx_t for nonnegative ptrdiff_t variables.
30196         * lib/fnmatch.c: Include idx.h. In glibc, define idx_t directly.
30197         * lib/fnmatch_loop.c (EXT): Mark slen, new_used, plensize as
30198         nonnegative.
30199         * modules/fnmatch (Depends-on): Add idx.
30201 2020-12-06  Bruno Haible  <bruno@clisp.org>
30203         c-stack: Use idx_t for nonnegative ptrdiff_t variables.
30204         * lib/c-stack.c: Include idx.h.
30205         (die): Mark buflen as nonnegative.
30206         * modules/c-stack (Depends-on): Add idx.
30208 2020-12-06  Bruno Haible  <bruno@clisp.org>
30210         backupfile: Use idx_t for nonnegative ptrdiff_t variables.
30211         * lib/backupfile.c: Include idx.h.
30212         (numbered_backup): Mark base_offset as nonnegative.
30213         (backupfile_internal): Likewise.
30214         * modules/backup-rename (Depends-on): Add idx.
30215         * modules/backupfile (Depends-on): Likewise.
30217 2020-12-05  Paul Eggert  <eggert@cs.ucla.edu>
30219         doc: fix curved quotes issue
30220         * doc/gnulib.texi: Set txicodequoteundirected and
30221         txicodequotebacktick so that ` and ' in examples do not generate
30222         curved single quotes that do the wrong thing when cut and pasted.
30224         doc: mention static and dynamic checking
30225         * doc/gnulib-readme.texi (High Quality): Add a bit of advice
30226         for static and dynamic checking.
30228         intprops: Add INT_ADD_OK etc.
30229         * doc/intprops.texi (Checking Integer Overflow): New section.
30230         * lib/intprops.h: From a suggestion by Bruno Haible in:
30231         https://lists.gnu.org/r/bug-gnulib/2020-12/msg00051.html
30232         (SAFE_INT_ADD, SAFE_INT_SUBTRACT, SAFE_INT_MULTIPLY): New macros.
30234         doc: move exotic platfroms to Target Platforms
30235         * doc/gnulib-intro.texi (Supported Platforms)
30236         (Formerly Supported Platforms, Unsupported Platforms):
30237         New subsections, split off from Target Platforms.
30238         (Unsupported Platforms): Move the exotic-platform stuff here ...
30239         * doc/gnulib-readme.texi (Exotic platforms): ... from this removed
30240         section.
30242         doc: mention intptr_t etc. and IBM i
30243         * doc/gnulib-readme.texi (Other portability assumptions):
30244         Mention intptr_t and uintptr_t, and that arithmetic on them
30245         works in the usual way.
30246         (Exotic platforms): New section, containing material from
30247         the old 'Integer Portability' section.  Also mention IBM i.
30248         * doc/intprops.texi (Wraparound Arithmetic):
30249         Say that the macros work on unsigned integers too.
30250         (Integer Portability): Remove.
30252 2020-12-04  Bruno Haible  <bruno@clisp.org>
30254         utime: Fix a test failure on macOS 10.13.
30255         Reported by Martin Storsjö <martin@martin.st> in
30256         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00003.html>.
30257         * m4/utime.m4 (gl_FUNC_UTIME): Test whether utime handles trailing
30258         slashes on files.
30259         * lib/utime.c (utime): Add alternative implementation for Unix
30260         platforms.
30261         * modules/utime (Depends-on): Add stat.
30262         * doc/posix-functions/utime.texi: Mention the macOS 10.13 bug.
30263         * doc/posix-functions/lstat.texi: Mention that macOS 10.13 also has the
30264         trailing-slash bug.
30265         * doc/posix-functions/open.texi: Likewise.
30266         * doc/posix-functions/stat.texi: Likewise.
30267         * doc/posix-functions/symlink.texi: Likewise.
30269 2020-12-04  Paul Eggert  <eggert@cs.ucla.edu>
30271         intprops: update doc and mention Unisys
30272         * doc/gnulib-readme.texi (Other portability assumptions):
30273         Also mention ptrdiff_t when talking about widths and overflow.
30274         * doc/intprops.texi (Integer Properties): Summarize new section.
30275         (Arithmetic Type Properties): Document that EXPR_SIGNED no longer
30276         evaluates its argument.
30277         (Integer Bounds): Fix typo.
30278         (Wraparound Arithmetic): Remove obsolete comment about efficiency.
30279         Document that the _WRAPV macros now support pointers to unsigned
30280         integers.
30281         (Integer Range Overflow): Update SEI CERT citation.
30282         (Integer Portability): New subsection, which mentions
30283         the oddball Unisys platforms as non-Gnulib targets.
30285 2020-12-03  Bruno Haible  <bruno@clisp.org>
30287         idx: Clarify that idx_t always behaves like a signed type.
30288         Suggested by Paul Eggert in
30289         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00034.html>.
30290         * lib/idx.h: Clarify that idx_t always behaves like a signed type.
30291         Don't test UNSIGNED_IDX_T.
30293 2020-12-03  Bruno Haible  <bruno@clisp.org>
30295         idx: New module.
30296         * lib/idx.h: New file.
30297         * modules/idx: New file.
30298         * lib/canonicalize-lgpl.c: Include idx.h. Use idx_t instead of
30299         ptrdiff_t.
30300         * lib/canonicalize.c: Likewise.
30301         * modules/canonicalize-lgpl (Depends-on): Add idx.
30302         * modules/canonicalize (Depends-on): Likewise.
30304 2020-12-03  Bruno Haible  <bruno@clisp.org>
30306         fprintf-posix-tests: Avoid a test failure on macOS 10.13.
30307         Reported by Martin Storsjö <martin@martin.st> in
30308         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00003.html>.
30309         * tests/test-fprintf-posix3.c: Skip the test on macOS.
30310         (main): Return a different exit code at each point. Allow 100 KB extra
30311         memory consumption.
30312         * tests/test-fprintf-posix3.sh: Update. Remove the "get_rusage_as()
30313         doesn't work" diagnostic.
30315 2020-12-02  Paul Eggert  <eggert@cs.ucla.edu>
30317         canonicalize: refactor can_mode flag
30318         * lib/canonicalize.c (MULTIPLE_BITS_SET): Remove, replacing with ...
30319         (multiple_bits_set): ... this new static function.  Uses changed.
30320         (canonicalize_filename_mode): Refactor for clarity to avoid
30321         modifying the CAN_MODE argument.
30323         canonicalize: prefer signed integer types
30324         * lib/canonicalize.c: Include stddef.h, for ptrdiff_t.
30325         (seen_triple, canonicalize_filename_mode): Prefer signed to
30326         unsigned types where either will do, as they avoid some glitches
30327         in comparisons and can trap on overflow when debugging.
30329         canonicalize: fix most of another EOVERFLOW issue
30330         * lib/canonicalize.c (canonicalize_filename_mode):
30331         Do not call stat if fewer than 20 symlinks have been traversed.
30332         This avoids EOVERFLOW failure in the common case where there
30333         are not that many symlinks, while continuing to catch loops
30334         (or fail due to EOVERFLOW) in the unusual case when there
30335         are many symlinks to traverse.
30337         canonicalize: do not assume symlinks have st_ino
30338         * lib/canonicalize.c (canonicalize_filename_mode):
30339         When checking for loops, use st_dev and st_ino from the parent
30340         directory not from the symlink, as pre-2017 POSIX says these
30341         members are not reliable for symlinks.  Couple this with START
30342         (the remaining file name to be resolved), not NAME (the whole file
30343         name with START as its suffix).
30344         * modules/canonicalize (Depends-on): Depend on stat, not lstat.
30346         canonicalize: fix EOVERFLOW bug
30347         * lib/canonicalize.c (canonicalize_filename_mode):
30348         When testing whether a directory entry is a symbolic link, or a
30349         directory or other, do not use lstat or stat or
30350         areadlink_with_size.  Just use areadlink, as this suffices and it
30351         avoids the EOVERFLOW problem that lstat and stat have.
30352         * modules/canonicalize (Depends-on): Depend on areadlink instead
30353         of areadlink-with-size and stat.
30355         canonicalize-lgpl: fix EOVERFLOW bug
30356         * lib/canonicalize-lgpl.c: Do not include <sys/stat.h>.
30357         (__realpath): Do not use lstat.  Just use readlink, as this
30358         suffices and it avoids the EOVERFLOW problem that lstat has.
30359         * modules/canonicalize-lgpl (Depends-on): Remove lstat, sys_stat.
30361 2020-12-02  Bruno Haible  <bruno@clisp.org>
30363         strsignal-tests: Fix test failure on macOS 10.13.
30364         Reported by Martin Storsjö <martin@martin.st> in
30365         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00003.html>.
30366         * tests/test-strsignal.c (ASSERT_DESCRIPTION): Allow the actual result
30367         to be longer than the expected result.
30369 2020-12-02  Bruno Haible  <bruno@clisp.org>
30371         Fix compilation errors in test-math-c++.cc on FreeBSD 12.2/arm64.
30372         * lib/math.in.h (_GL_INCLUDING_MATH_H): New macro, to work around
30373         recursive self-include problem on FreeBSD 12.2 in C++ mode.
30375 2020-12-02  Bruno Haible  <bruno@clisp.org>
30377         spawn-pipe: Allow caller to specify directory for the subprocess.
30378         * lib/spawn-pipe.h (create_pipe_out, create_pipe_in, create_pipe_bidi):
30379         Add directory argument.
30380         * lib/spawn-pipe.c: Include canonicalize.h, filename.h, findprog.h.
30381         (create_pipe): Add directory argument. If specified, resolve the program
30382         file name and make it absolute, first. Pass the directory to spawnpvech
30383         and posix_spawn_file_actions_addchdir.
30384         (create_pipe_bidi, create_pipe_in, create_pipe_out): Add directory
30385         argument.
30386         * modules/spawn-pipe (Depends-on): Add canonicalize, filename,
30387         findprog-in, posix_spawn, posix_spawn_file_actions_addchdir.
30388         * tests/test-spawn-pipe-main.c (test_pipe): Update.
30389         * NEWS: Mention the change.
30390         * lib/csharpcomp.c (compile_csharp_using_mono,
30391         compile_csharp_using_sscli): Update.
30392         * lib/javacomp.c (is_envjavac_gcj, is_envjavac_gcj43, is_gcj_present,
30393         is_gcj_43): Update.
30394         * lib/javaversion.c (execute_and_read_line): Update.
30395         * lib/pipe-filter-gi.c (pipe_filter_gi_create): Update.
30396         * lib/pipe-filter-ii.c (pipe_filter_ii_execute): Update.
30398 2020-12-02  Bruno Haible  <bruno@clisp.org>
30400         execute: Allow caller to specify directory for the subprocess.
30401         * lib/execute.h (execute): Add directory argument.
30402         * lib/execute.c: Include canonicalize.h, filename.h, findprog.h.
30403         (execute): Add directory argument. If specified, resolve the program
30404         file name and make it absolute, first. Pass the directory to spawnpvech
30405         and posix_spawn_file_actions_addchdir.
30406         * modules/execute (Depends-on): Add canonicalize, filename, findprog-in,
30407         posix_spawn, posix_spawn_file_actions_addchdir.
30408         * tests/test-execute-main.c: Add test for passing a directory.
30409         * tests/test-execute-child.c: Likewise.
30410         * tests/test-execute.sh: Update.
30411         * modules/execute-tests (Depends-on): Add mkdir.
30412         * NEWS: Mention the change.
30413         * lib/csharpcomp.c (compile_csharp_using_sscli): Update.
30414         * lib/csharpexec.c (execute_csharp_using_mono,
30415         execute_csharp_using_sscli): Update.
30416         * lib/javacomp.c (compile_using_envjavac, compile_using_gcj,
30417         compile_using_javac, compile_using_jikes, is_javac_present,
30418         is_jikes_present): Update.
30419         * lib/javaexec.c (execute_java_class): Update.
30421 2020-12-01  Bruno Haible  <bruno@clisp.org>
30423         vma-iter: Add support for macOS11/arm64.
30424         Patch suggested by Hill Ma <maahiuzeon@gmail.com> in
30425         <https://gitlab.com/gnu-clisp/clisp/-/issues/27>
30426         and by Martin Storsjö <martin@martin.st> in
30427         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00003.html>.
30428         * lib/vma-iter.c (vma_iterate): On arm64, use 64-bit type definitions.
30430 2020-12-01  Bruno Haible  <bruno@clisp.org>
30432         spawn-pipe: Fix handling of OS/2 kLIBC.
30433         Reported by KO Myung-Hun <komh78@gmail.com> in
30434         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00005.html>.
30435         * modules/spawn-pipe (configure.ac): Use the common idiom for
30436         recognizing the OS/2 operating system.
30438 2020-11-30  Bruno Haible  <bruno@clisp.org>
30440         execute: Fix uninitialized use of errno.
30441         * lib/execute.c (execute): Preserve errno across several system calls.
30443 2020-11-30  Bruno Haible  <bruno@clisp.org>
30445         access tests: Fix test failure on native Windows.
30446         * tests/test-access.c (main): Change permissions of f2 file before
30447         attempting to remove it.
30449 2020-11-30  Paul Eggert  <eggert@cs.ucla.edu>
30451         faccessat: link with $(LIB_EACCESS)
30452         * modules/faccessat (Link:): Add $(LIB_EACCESS), since this
30453         module depends on euidaccess.
30455 2020-11-30  Bruno Haible  <bruno@clisp.org>
30457         execute, spawn-pipe: Make multithread-safe on native Windows.
30458         * lib/windows-spawn.h: Include <stdint.h>, <windows.h>.
30459         (dup_safer_noinherit, undup_safer_noinherit): Remove declarations.
30460         (spawnpvech): New declaration.
30461         * lib/windows-spawn.c: Include <stdio.h>, <process.h>, findprog.h.
30462         Don't include <unistd.h>, cloexec.h, error.h, gettext.h.
30463         (_): Remove macro.
30464         (dup_noinherit, fd_safer_noinherit, dup_safer_noinherit,
30465         undup_safer_noinherit): Remove functions.
30466         (spawnpvech): New function.
30467         * modules/windows-spawn (Depends-on): Add findprog-in, stdint. Remove
30468         cloexec, dup2, error, gettext-h.
30469         * lib/execute.c: Include msvc-nothrow.h.
30470         (execute) [WIN32]: Use _get_osfhandle, spawnpvech instead of _spawnvpe.
30471         * lib/spawn-pipe.c: Include msvc-nothrow.h.
30472         (create_pipe) [WIN32]: Use _get_osfhandle, DuplicateHandle, spawnpvech
30473         instead of _spawnvpe.
30474         * modules/execute (Depends-on): Add msvc-nothrow.
30475         * modules/spawn-pipe (Depends-on): Likewise.
30477 2020-11-30  Bruno Haible  <bruno@clisp.org>
30479         execute, spawn-pipe: Improve documentation.
30480         * lib/execute.h: Describe progname, prog_path, prog_argv.
30481         * lib/spawn-pipe.h: Likewise.
30483 2020-11-30  Bruno Haible  <bruno@clisp.org>
30485         execute tests: Add more tests.
30486         * tests/test-execute-main.c: Add tests for reading, writing, isatty on
30487         inherited file descriptors >= 3.
30488         * tests/test-execute-child.c: Likewise.
30489         * tests/test-execute.sh: Update.
30491 2020-11-30  Bruno Haible  <bruno@clisp.org>
30493         havelib: Fix for non-ELF platforms (regression 2019-11-17).
30494         Reported by comex <comexk@gmail.com> in
30495         <https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00188.html>.
30496         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): On non-ELF platforms,
30497         don't expect an ELF header.
30499 2020-11-29  Akim Demaille  <akim@lrde.epita.fr>
30501         bitset: use integer_length in table implementation
30502         * lib/bitset/table.c (tbitset_list_reverse): Use
30503         BITSET_FOR_EACH_BIT_REVERSE.
30505 2020-11-29  Akim Demaille  <akim@lrde.epita.fr>
30507         bitset: use integer_length in list implementation
30508         * lib/bitset/list.c (lbitset_list_reverse): Use
30509         BITSET_FOR_EACH_BIT_REVERSE.
30511 2020-11-29  Akim Demaille  <akim@lrde.epita.fr>
30513         bitset: use integer_length in vector implementation
30514         * lib/bitset/array.c (vbitset_list_reverse): Use
30515         BITSET_FOR_EACH_BIT_REVERSE.
30517 2020-11-29  Akim Demaille  <akim@lrde.epita.fr>
30519         bitset: use integer_length in array implementation
30520         * modules/bitset (Depends-on): Add integer_length_l.
30521         * lib/bitset/base.h (bitset_fls_, BITSET_FOR_EACH_BIT_REVERSE): New.
30522         * lib/bitset/array.c (abitset_list_reverse): Use it.
30524 2020-11-29  Akim Demaille  <akim@lrde.epita.fr>
30526         bitset: style: use consistent names
30527         * bitset/list.c (lbitset_list_reverse): Rename 'bcount' as 'bitcnt',
30528         and 'boffset' as 'bitoff', for consistency with the other
30529         implementations.
30530         * bitset/table.c (tbitset_list_reverse): Likewise.
30532 2020-11-29  Akim Demaille  <akim@lrde.epita.fr>
30534         bitset: style: sort header
30535         * lib/bitset/base.h (bitset_ffs): Rename as...
30536         (bitset_ffs_): this.
30537         (bitset_ffs_, BITSET_FOR_EACH_BIT): Move to better places.
30539 2020-11-29  Akim Demaille  <akim@lrde.epita.fr>
30541         bitset: tests: check BITSET_FOR_EACH_REVERSE
30542         * tests/test-bitset.c (compare, check_zero, check_one_bit, check_ones):
30543         Check BITSET_FOR_EACH_REVERSE.
30545 2020-11-29  Bruno Haible  <bruno@clisp.org>
30547         spawn-pipe tests: Fix test failure with MSVC.
30548         * tests/test-spawn-pipe-child.c: Include <stdint.h>.
30549         (gl_msvc_invalid_parameter_handler): New function.
30550         (main): Set a global invalid-parameter handler.
30551         * modules/spawn-pipe-tests (Depends-on): Add msvc-inval, stdint.
30553 2020-11-29  Bruno Haible  <bruno@clisp.org>
30555         execute: Add tests.
30556         * tests/test-execute.sh: New file.
30557         * tests/test-execute-main.c: New file.
30558         * tests/test-execute-child.c: New file.
30559         * modules/execute-tests: New file.
30561 2020-11-29  Bruno Haible  <bruno@clisp.org>
30563         fcntl: Work around NetBSD bug with F_DUPFD_CLOEXEC.
30564         * m4/fcntl.m4 (gl_FUNC_FCNTL): Test whether F_DUPFD_CLOEXEC actually
30565         works.
30566         * lib/fcntl.c (rpl_fcntl_DUPFD_CLOEXEC): On NetBSD, use the same
30567         fallback implementation as on Haiku.
30568         * tests/test-fcntl.c (main): Add a test whether F_DUPFD_CLOEXEC is
30569         effective.
30570         * doc/posix-functions/fcntl.texi: Mention the NetBSD bug.
30572 2020-11-29  Bruno Haible  <bruno@clisp.org>
30574         spawn-pipe: Fix build on OS/2 kLIBC (regression 2020-11-28).
30575         * lib/os2-spawn.h: New file, based on lib/windows-spawn.h.
30576         * lib/os2-spawn.c: New file, based on lib/windows-spawn.c.
30577         * lib/spawn-pipe.c: On OS/2 kLIBC, include "os2-spawn.h".
30578         * lib/windows-spawn.c: Remove modifications for kLIBC.
30579         * modules/spawn-pipe (Files): Add the new files.
30580         (configure.ac): Arrange to compile os2-spawn.c on OS/2.
30582 2020-11-28  Bruno Haible  <bruno@clisp.org>
30584         asyncsafe-spin: Fix compilation error with GCC on 32-bit SPARC.
30585         Reported by Paul Eggert in
30586         <https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00066.html>.
30587         * m4/sparcv8+.m4: New file.
30588         * modules/sparcv8+: New file.
30589         * modules/asyncsafe-spin (Depends-on): Add sparcv8+.
30591 2020-11-28  Bruno Haible  <bruno@clisp.org>
30593         asyncsafe-spin: Fix build error with GCC on 32-bit SPARC.
30594         * lib/asyncsafe-spin.c: Don't use GCC >= 4.1 primitives on SPARC.
30596 2020-11-28  Bruno Haible  <bruno@clisp.org>
30598         windows-spawn: New module.
30599         * lib/windows-spawn.h: Renamed from lib/w32spawn.h. Remove
30600         implementations.
30601         * lib/windows-spawn.c: Renamed from lib/w32spawn.h.
30602         * modules/windows-spawn: New file.
30603         * lib/execute.c: Include "windows-spawn.h" instead of "w32spawn.h".
30604         * lib/spawn-pipe.c: Likewise.
30605         * modules/execute (Files): Remove lib/w32spawn.h.
30606         (Depends-on): Add windows-spawn. Remove cloexec, msvc-nothrow, strpbrk,
30607         xalloc.
30608         (Makefile.am): Remove w32spawn.h from lib_SOURCES.
30609         * modules/spawn-pipe (Files): Remove lib/w32spawn.h.
30610         (Depends-on): Add windows-spawn. Remove cloexec, msvc-nothrow, strpbrk,
30611         xalloc.
30612         (Makefile.am): Remove w32spawn.h from lib_SOURCES.
30614 2020-11-27  Bruno Haible  <bruno@clisp.org>
30616         ssfmalloc tests: Port to macOS 11.
30617         * tests/test-ssfmalloc.c (PAGESIZE_MAX): Set to 16384, not 8192.
30619 2020-11-26  Bruno Haible  <bruno@clisp.org>
30621         Fix dependencies of modules that use '_exit' on native Windows.
30622         Reported by Jim Meyering in
30623         <https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00159.html>.
30624         * modules/_Exit (Depends-on): Add unistd.
30625         * modules/closein (Depends-on): Likewise.
30626         * modules/closeout (Depends-on): Likewise.
30627         * modules/forkpty (Depends-on): Likewise.
30628         * modules/posix_spawn-internal (Depends-on): Likewise.
30629         * modules/savewd (Depends-on): Likewise.
30630         * modules/stat-time-tests (Depends-on): Likewise.
30632 2020-11-26  Bruno Haible  <bruno@clisp.org>
30634         raise-tests: Fix compilation error on MSVC (regression 2020-11-25).
30635         * modules/raise-tests (Depends-on): Add unistd.
30636         * doc/posix-functions/_exit.texi: Mention the 'unistd' module.
30638 2020-11-25  Jim Meyering  <meyering@fb.com>
30640         setlocale-tests: do not trigger gcc's -Wanalyzer-possible-null-argument
30641         * tests/test-setlocale1.c (main): Assert that each strcmp argument is
30642         non-NULL, since we don't bother handing strdup failure.
30644         raise-tests: avoid GCC 11's new exit-from-signal-handler warning
30645         gcc's -Wanalyzer-unsafe-call-within-signal-handler exposed this.
30646         * tests/test-raise.c: Include unistd.h.
30647         (handler): Use _exit, not exit.
30649 2020-11-23  Bruno Haible  <bruno@clisp.org>
30651         Use the correct printf format attribute for mingw.
30652         Reported by Reuben Thomas <rrt@sc3d.org> in
30653         <https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00133.html>.
30655         * modules/vfprintf-posix (configure.ac): Define GNULIB_VFPRINTF_POSIX.
30656         * modules/vprintf-posix (configure.ac): Define GNULIB_VPRINTF_POSIX.
30658         * lib/stdio.in.h (_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD,
30659         _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM): New macros.
30660         (_GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD): Renamed from
30661         _GL_ATTRIBUTE_FORMAT_PRINTF. Use _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD.
30662         (_GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM): Use
30663         _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM.
30665         * modules/vasnprintf (Depends-on): Add stdio.
30666         * lib/vasnprintf.h: Include <stdio.h>.
30667         (asnprintf, vasnprintf): Use the standard printf format attribute.
30669         * modules/xvasprintf (Depends-on): Add stdio.
30670         * lib/xvasprintf.h: Include <stdio.h>.
30671         (xasprintf, xvasprintf): Use the standard printf format attribute.
30673         * modules/xprintf (Depends-on): List stdio first.
30674         * lib/xprintf.h (xprintf, xvprintf): Use a printf format attribute that
30675         depends on GNULIB_VPRINTF_POSIX.
30676         (xfprintf, xvfprintf): Use a printf format attribute that depends on
30677         GNULIB_VFPRINTF_POSIX.
30679         * modules/c-vasnprintf (Depends-on): Add stdio.
30680         * lib/c-vasnprintf.h: Include <stdio.h>.
30681         (c_vasnprintf): Use the standard printf format attribute.
30683         * modules/c-vasprintf (Depends-on): Add stdio.
30684         * lib/c-vasprintf.h: Include <stdio.h>.
30685         (c_asprintf, c_vasprintf): Use the standard printf format attribute.
30687         * modules/c-vsnprintf (Depends-on): Add stdio.
30688         * lib/c-vsnprintf.h: Include <stdio.h>.
30689         (c_vsnprintf): Use the standard printf format attribute.
30691         * modules/c-snprintf (Depends-on): Add stdio.
30692         * lib/c-snprintf.h: Include <stdio.h>.
30693         (c_snprintf): Use the standard printf format attribute.
30695         * modules/c-xvasprintf (Depends-on): Add stdio.
30696         * lib/c-xvasprintf.h: Include <stdio.h>.
30697         (c_xasprintf, c_xvasprintf): Use the standard printf format attribute.
30699         * modules/error (Depends-on): Depend on stdio always.
30700         * lib/error.h: Include <stdio.h>.
30701         (_GL_ATTRIBUTE_SPEC_PRINTF): Remove macro.
30702         (error, error_at_line): Use a printf format attribute that depends on
30703         GNULIB_VFPRINTF_POSIX.
30704         * lib/error.c (_GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD): Renamed from
30705         _GL_ATTRIBUTE_FORMAT_PRINTF.
30707         * modules/verror (Depends-on): Add stdio.
30708         * lib/verror.h: Include <stdio.h>. Don't include "error.h".
30709         (verror, verror_at_line): Use the standard printf format attribute.
30710         * lib/verror.c: Include "error.h".
30712         * modules/argp (Depends-on): Add stdio.
30713         * lib/argp.h (argp_error, __argp_error, argp_failure, __argp_failure):
30714         Use a printf format attribute that depends on GNULIB_VFPRINTF_POSIX.
30716         * modules/libtextstyle-optional (Depends-on): Add stdio.
30717         * lib/textstyle.in.h (ostream_printf, ostream_vprintf): Use the standard
30718         printf format attribute.
30720         * tests/test-nonblocking-misc.h (dbgfprintf): Use the standard printf
30721         format attribute.
30723 2020-11-23  Pádraig Brady  <P@draigBrady.com>
30725         selinux-at, selinux-h: use const correct declarations
30726         * lib/se-selinux.in.h: Use const for "set" functions,
30727         to match current selinux, and support cleaner user code.
30728         * lib/selinux-at.c: Likewise.
30729         * lib/selinux-at.h: Likewise.
30731 2020-11-22  Paul Eggert  <eggert@cs.ucla.edu>
30733         canonicalize-lgpl: fix memory leak
30734         * lib/canonicalize-lgpl.c (__realpath): Fix unlikely memory leak,
30735         which could have occurred if BUF was so large that malloc was
30736         called.  Do this by allocating EXTRA_BUF and BUF at the same time;
30737         this eliminates the need to free BUF separately.
30739 2020-11-22  Bruno Haible  <bruno@clisp.org>
30741         Fix missing module dependencies to 'xalloc' (regression 2020-10-19).
30742         * modules/xvasprintf (Depends-on): Add xalloc.
30743         * modules/pipe-filter-gi (Depends-on): Likewise.
30744         * modules/execute (Depends-on): Likewise, for w32spawn.h.
30745         * modules/spawn-pipe (Depends-on): Likewise.
30747 2020-11-22  Jose E. Marchesi  <jemarch@gnu.org>
30749         bootstrap: add option hooks
30750         * build-aux/bootstrap (bootstrap_print_option_usage_hook): Define.
30751         (bootstrap_option_hook): Likewise.
30752         (usage): Call bootstrap_print_option_usage_hook.
30754 2020-11-22  Bruno Haible  <bruno@clisp.org>
30756         argp: Don't break getprogname on non-glibc systems.
30757         * m4/argp.m4 (gl_ARGP): Don't expect <argp.h> to exist when testing for
30758         program_invocation_name and program_invocation_short_name.
30760 2020-11-22  Bruno Haible  <bruno@clisp.org>
30762         doc: Document <link.h>.
30763         * doc/glibc-headers/link.texi: New file.
30764         * doc/gnulib.texi: Include it.
30766 2020-11-22  Bruno Haible  <bruno@clisp.org>
30768         doc: Add references to the LSB.
30769         * doc/glibc-functions/*.texi: Add references to LSB 5.0.
30770         * doc/posix-functions/*.texi: Likewise.
30772 2020-11-22  Bruno Haible  <bruno@clisp.org>
30774         doc: Fix a makeinfo warning (regression 2020-11-03).
30775         * doc/posix-functions/aligned_alloc.texi: Add missing @item.
30777 2020-11-21  Paul Eggert  <eggert@cs.ucla.edu>
30779         parse-datetime: fix printf format typo
30780         * lib/parse-datetime.y (parse_datetime2): Fix format typo in
30781         previous patch to this file.  Problem reported by Chris Elvidge in
30782         <https://bugs.gnu.org/44763#32>.
30784         setlocale-null-tests: work around GCC bug 44511
30785         * tests/test-setlocale_null-mt-all.c:
30786         * tests/test-setlocale_null-mt-one.c:
30787         Ignore -Wreturn-type, to work around GCC bug 44511.
30789         nl_langinfo-tests: work around GCC bug 44511
30790         * tests/test-nl_langinfo-mt.c: Ignore -Wreturn-type, to work
30791         around a GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44511>.
30792         Problem reported for GNU grep by Andreas Schwab
30793         <https://bugs.gnu.org/44535>.
30795         selinux-h: add stubs for selabel_open etc.
30796         Coreutils with --enable-gcc-warnings does not build on Ubuntu 20.10
30797         because matchpathcon is deprecated in favor of selabel_open etc.,
30798         so this patch adds stubs for these functions.
30799         * lib/se-label.c, lib/se-label.in.h, m4/selinux-label-h.m4: New files.
30800         * lib/se-selinux.in.h (struct selinux_opt): Add incomplete decl,
30801         as it is needed for selabel_open and selinux/selinux.h declares
30802         this type here.
30803         * modules/selinux-h (Files): Add the new files.
30804         (configure.ac): Add gl_HEADERS_SELINUX_LABEL_H.
30805         (lib_SOURCES): Add se-label.in.h, se-label.c.
30806         (BUILT_SOURCES): Add $(SELINUX_LABEL_H).
30807         (selinux/label.h): New rule, mimicking selinux/context.h.
30808         (MOSTLYCLEANFILES): Add selinux/label.h, selinux/label.h-t.
30809         (Include): Add selinux/label.h.
30811 2020-11-21  Bruno Haible  <bruno@clisp.org>
30813         Update after 'test-driver' in Automake changed.
30814         * build-aux/test-driver.diff: Rebase.
30816 2020-11-21  Daiki Ueno  <ueno@gnu.org>
30818         read-file: remove dead assignment
30819         * lib/read-file.c (fread_file): Remove dead assignment when
30820         RF_SENSITIVE is set, flagged by clang-analyzer.
30822 2020-11-19  Akim Demaille  <akim@lrde.epita.fr>
30824         bitset: tests: exercise the stats too
30826         * tests/test-bitset.c: Display the stats at the end of the test.
30827         * lib/bitset/stats.c (bitset_log_histogram_print): When diplaying the
30828         last bin, display "256-..." rather that "256-511", since the last bin
30829         does count item greater than or equal to 256.
30831 2020-11-19  Akim Demaille  <akim@lrde.epita.fr>
30833         bitset: tests: try harder to break it
30834         * tests/test-bitset.c (compare): Be ready to use bitsets larger than
30835         BITSET_LIST_SIZE.
30836         (main): Likewise.
30837         While at it, also exercise super small bitsets.
30839 2020-11-19  Akim Demaille  <akim@lrde.epita.fr>
30841         bitset: use ffs where possible in the vector implementation
30842         * lib/bitset/vector.c (vbitset_list): Use BITSET_FOR_EACH_BIT.
30844 2020-11-19  Akim Demaille  <akim@lrde.epita.fr>
30846         bitset: use ffs where possible in the table implementation
30847         * lib/bitset/table.c (tbitset_list): Use BITSET_FOR_EACH_BIT.
30849 2020-11-19  Akim Demaille  <akim@lrde.epita.fr>
30851         bitset: check empty and full bitsets
30852         * tests/test-bitset.c (check_zero, check_ones): New.
30853         (check_attributes): Use them.
30855 2020-11-19  Akim Demaille  <akim@lrde.epita.fr>
30857         bitset: be sure to always return a value
30858         * lib/bitset/array.c (abitset_small_list): Always update *next and
30859         return a value.
30861 2020-11-19  Siddhesh Poyarekar  <siddhesh@gotplt.org>
30863         vcs-to-changelog: Expect spaces in file names
30864         Reported by Thierry Bothorel <thierry.bothorel@zaclys.net> in
30865         <https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00040.html>,
30866         * build-aux/vcstocl/vcs_git.py (exec_git_cmd): Do not transform
30867         tabs to spaces.
30868         (list_changes): Use tabs to identify file names.
30870 2020-11-17  Akim Demaille  <akim@lrde.epita.fr>
30872         bitset: strengthen tests
30873         * tests/test-bitset.c (compare): Also check count.
30874         Deal only with random values, move the one-bit tests to...
30875         (check_one_bit): this new function.
30876         (check_attributes): Call it.
30878 2020-11-17  Akim Demaille  <akim@lrde.epita.fr>
30880         bitset: fix iteration over table bitsets
30881         * lib/bitset/table.c (tbitset_list): Update bitno when windex is.
30883 2020-11-17  Akim Demaille  <akim@lrde.epita.fr>
30885         bitset: rename internal details for consistency
30886         * lib/bitset/table.c: Rename all the EBITSET_ symbols as TBITSET_.
30888 2020-11-17  Akim Demaille  <akim@lrde.epita.fr>
30890         bitset: test: run deterministic tests on several bitset sizes
30891         * tests/test-bitset.c (check_attributes): Run it with small and large
30892         sizes.
30894 2020-11-17  Akim Demaille  <akim@lrde.epita.fr>
30896         bitset: use ffs where possible in the list implementation
30897         * lib/bitset/list.c (lbitset_list): Use BITSET_FOR_EACH_BIT.
30899 2020-11-17  Akim Demaille  <akim@lrde.epita.fr>
30901         bitset: use ffs where possible in array implementation
30902         * lib/bitset/array.c (abitset_small_list): Use BITSET_FOR_EACH_BIT.
30904 2020-11-17  Bruno Haible  <bruno@clisp.org>
30906         posixcheck: Don't enable GNULIB_POSIXCHECK in C++ mode.
30907         Reported by Tom G. Christensen <tgc@jupiterrise.com> in
30908         <https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00062.html>.
30909         * m4/posixcheck.m4 (gl_POSIXCHECK): Don't define GNULIB_POSIXCHECK in
30910         C++ mode.
30912 2020-11-17  Bruno Haible  <bruno@clisp.org>
30914         Fix error when GNULIB_POSIXCHECK is enabled (regression 2019-06-04).
30915         * lib/unistd.in.h (copy_file_range): Don't assume that copy_file_range
30916         is always declared.
30917         * m4/unistd_h.m4 (gl_UNISTD_H): Test whether copy_file_range is
30918         declared.
30920 2020-11-17  Bruno Haible  <bruno@clisp.org>
30922         Fix link errors on AIX.
30923         * modules/clean-temp (Link): Link with $(LIBTHREAD).
30924         * modules/getumask (Link): Link with $(LIBTHREAD).
30925         * modules/getumask-tests (Makefile.am): Link test-getumask with
30926         $(LIBTHREAD).
30927         * modules/supersede (Link): Link with $(LIBTHREAD).
30928         * modules/supersede-tests (Makefile.am): Link test-supersede with
30929         $(LIBTHREAD).
30930         * modules/fatal-signal (Link): New section.
30931         * modules/execute (Link): New section.
30932         * modules/csharpexec (Link): Link with $(LIBTHREAD).
30933         * modules/javaexec (Link): Link with $(LIBTHREAD).
30934         * modules/spawn-pipe (Link): New section.
30935         * modules/spawn-pipe-tests (Makefile.am): Link test-spawn-pipe-main with
30936         $(LIBTHREAD).
30937         * modules/csharpcomp (Link): Link with $(LIBTHREAD).
30938         * modules/javacomp (Link): Link with $(LIBTHREAD).
30939         * modules/javaversion (Link): Link with $(LIBTHREAD).
30940         * modules/pipe-filter-gi (Link): New section.
30941         * modules/pipe-filter-gi-tests (Makefile.am): Link test-pipe-filter-gi1,
30942         test-pipe-filter-gi2-main with $(LIBTHREAD).
30943         * modules/pipe-filter-ii (Link): New section.
30944         * modules/pipe-filter-ii-tests (Makefile.am): Link test-pipe-filter-ii1,
30945         test-pipe-filter-ii2-main with $(LIBTHREAD).
30946         * modules/term-style-control (Link): New section.
30947         * modules/term-style-control-tests (Makefile.am): Link
30948         test-term-style-control-hello, test-term-style-control-yes with
30949         $(LIBTHREAD).
30950         * modules/wait-process (Link): New section.
30951         * modules/nonblocking-pipe-tests (Makefile.am): Link
30952         test-nonblocking-pipe-main with $(LIBTHREAD).
30953         * modules/nonblocking-socket-tests (Makefile.am): Link
30954         test-nonblocking-socket-main with $(LIBTHREAD).
30956 2020-11-16  Bruno Haible  <bruno@clisp.org>
30958         Fix link errors on platforms with libunistring.
30959         * modules/c32isalnum (Link): New section.
30960         * modules/c32isalnum-tests (Makefile.am): Link test-c32isalnum with
30961         $(LIBUNISTRING).
30962         * modules/c32isalpha (Link): New section.
30963         * modules/c32isalpha-tests (Makefile.am): Link test-c32isalpha with
30964         $(LIBUNISTRING).
30965         * modules/c32isblank (Link): New section.
30966         * modules/c32isblank-tests (Makefile.am): Link test-c32isblank with
30967         $(LIBUNISTRING).
30968         * modules/c32iscntrl (Link): New section.
30969         * modules/c32iscntrl-tests (Makefile.am): Link test-c32iscntrl with
30970         $(LIBUNISTRING).
30971         * modules/c32isdigit (Link): New section.
30972         * modules/c32isdigit-tests (Makefile.am): Link test-c32isdigit with
30973         $(LIBUNISTRING).
30974         * modules/c32isgraph (Link): New section.
30975         * modules/c32isgraph-tests (Makefile.am): Link test-c32isgraph with
30976         $(LIBUNISTRING).
30977         * modules/c32islower (Link): New section.
30978         * modules/c32islower-tests (Makefile.am): Link test-c32islower with
30979         $(LIBUNISTRING).
30980         * modules/c32isprint (Link): New section.
30981         * modules/c32isprint-tests (Makefile.am): Link test-c32isprint with
30982         $(LIBUNISTRING).
30983         * modules/c32ispunct (Link): New section.
30984         * modules/c32ispunct-tests (Makefile.am): Link test-c32ispunct with
30985         $(LIBUNISTRING).
30986         * modules/c32isspace (Link): New section.
30987         * modules/c32isspace-tests (Makefile.am): Link test-c32isspace with
30988         $(LIBUNISTRING).
30989         * modules/c32isupper (Link): New section.
30990         * modules/c32isupper-tests (Makefile.am): Link test-c32isupper with
30991         $(LIBUNISTRING).
30992         * modules/c32isxdigit (Link): New section.
30993         * modules/c32isxdigit-tests (Makefile.am): Link test-c32isxdigit with
30994         $(LIBUNISTRING).
30995         * modules/unicodeio (Link): Mention $(LIBUNISTRING).
30996         * modules/unicodeio-tests (Makefile.am): Link test-unicodeio with
30997         $(LIBUNISTRING).
30999 2020-11-16  Bruno Haible  <bruno@clisp.org>
31001         Fix link errors on platforms with libintl (e.g. Solaris and AIX).
31002         Reported by Tom G. Christensen <tgc@jupiterrise.com> in
31003         <https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00062.html>.
31004         * modules/getumask-tests (Makefile.am): Link test-getumask with
31005         $(LIBINTL).
31006         * modules/stack-tests (Makefile.am): Link test-stack with $(LIBINTL).
31007         * modules/supersede-tests (Makefile.am): Link test-supersede with
31008         $(LIBINTL).
31009         * modules/unicodeio-tests (Makefile.am): Link test-unicodeio with
31010         $(LIBINTL).
31012 2020-11-16  Bruno Haible  <bruno@clisp.org>
31014         getumask: Document link dependencies.
31015         * modules/getumask (Link): New section.
31017 2020-11-16  Bruno Haible  <bruno@clisp.org>
31019         Update link dependencies in modules after 2020-09-09 change.
31020         * modules/tempname (Link): Add $(LIB_CLOCK_GETTIME).
31021         * modules/mkdtemp (Link): Likewise.
31022         * modules/mkostemp (Link): Likewise.
31023         * modules/mkostemps (Link): Likewise.
31024         * modules/mkstemp (Link): Likewise.
31025         * modules/mkstemps (Link): Likewise.
31026         * modules/supersede (Link): Likewise.
31027         * modules/tmpfile (Link): Likewise.
31028         * modules/tmpfile-safer (Link): Likewise.
31030 2020-11-15  Paul Eggert  <eggert@cs.ucla.edu>
31032         getumask-tests: port to Solaris 10 etc.
31033         Problem reported by Tom Christensen in:
31034         https://lists.gnu.org/r/bug-gnulib/2020-11/msg00062.html
31035         * modules/getumask-tests (test_getumask_LDADD):
31036         Add $(LIB_CLOCK_GETTIME).
31038 2020-11-15  Akim Demaille  <akim@lrde.epita.fr>
31040         bitset: use ffsl to accelerate iterations over set bits
31041         Suggested by Bruno Haible.
31042         * modules/bitset: Depend upon ffsl.
31043         * lib/bitset/base.h (bitset_ffs, BITSET_FOR_EACH_BIT): New.
31044         * lib/bitset/array.c (abitset_list): Use BITSET_FOR_EACH_BIT.
31046 2020-11-15  Akim Demaille  <akim@lrde.epita.fr>
31048         bitset: more tests
31049         * tests/test-bitset.c (compare): Make it clear that the random values
31050         should not be modified.
31051         Check bitset_first, bitset_last and BITSET_FOR_EACH.
31053 2020-11-15  Akim Demaille  <akim@lrde.epita.fr>
31055         bitset: fix the copy from lbitset to other types
31056         * lib/bitset/list.c (lbitset_copy): Rename as...
31057         (lbitset_copy_): this.
31058         (lbitset_copy): New.
31059         Dispatch to heterogeneous/homogeneous copy.
31061 2020-11-15  Akim Demaille  <akim@lrde.epita.fr>
31063         bitset: making debug traces more useful
31064         * lib/bitset.c (bitset_print): Print the bitset type in verbose mode.
31066         bitset: comment changes
31067         * lib/bitset.c: Move some documenting comments to...
31068         * lib/bitset.h: here.
31069         * lib/bitset/array.c: Fix some comments.
31071 2020-11-14  Paul Eggert  <eggert@cs.ucla.edu>
31073         careadlinkat: warn better about GCC bug 93644
31074         * lib/careadlinkat.c (readlink_stk): When --enable-gcc-warnings is
31075         not in effect, use "#warning" to let builders know more clearly
31076         about GCC bug 93644, because the bug triggers even if no -W option
31077         is given to GCC.
31079 2020-11-13  Jim Meyering  <meyering@fb.com>
31081         hard-locale-tests: avoid a -Wstrict-prototypes warning
31082         * tests/locale.c (main): Placate gcc's -Wstrict-prototypes by
31083         changing "main ()" to "main (void)". This was the only case that
31084         triggered a warning when building grep with --enable-gcc-warnings.
31086 2020-11-11  Paul Eggert  <eggert@cs.ucla.edu>
31088         time_rz: simplify CVE-2017-7476 fix
31089         * lib/time_rz.c: Do not include limits.h; I think it was included
31090         under the mistaken impression that limits.h defines SIZE_MAX.
31091         (SIZE_MAX): Remove.
31092         (save_abbr): Put string length into a ptrdiff_t variable,
31093         so that the size comparison works naturally.  This
31094         fixes CVE-2017-7476 in a cleaner way.
31096         parse-datetime: streamline overflow checking
31097         When parse-datetime.y’s overflow code was written, INT_ADD_WRAPV
31098         did not work for unsigned destinations, and since time_t might
31099         be unsigned that meant it did not work for time_t destinations.
31100         This limitation of INT_ADD_WRAPV has been fixed, so we can
31101         now streamline parse-datetime.y a bit.
31102         * lib/parse-datetime.y: Do not include limits.h, as LONG_MAX
31103         has not been used for a while.
31104         (yylex, parse_datetime2): Assume C99 declarations after statements.
31105         (yyles): Use INT_SUBTRACT_WRAPV instead of an explicit comparison
31106         to TYPE_MINIMUM.
31107         (parse_datetime2): No need for time_overflow now that
31108         INT_ADD_WRAPV works for unsigned results.
31110         parse-datetime-tests: port to Alpine Linux 3.12.1
31111         * tests/test-parse-datetime.c: Include errno.h for errno,
31112         and unistd.h for _SC_TZNAME_MAX and sysconf.
31113         (main): In the outlandishly-long time zone abbreviation test,
31114         do not exceed TZNAME_MAX as this has undefined behavior,
31115         and on Alpine Linux 3.12.1 it makes the test fail.
31117 2020-11-09  Pádraig Brady  <P@draigBrady.com>
31119         mgetgroups: avoid warning with clang
31120         * lib/mgetgroups.c: Xcode-12.1 identifies as GCC 4.2.1,
31121         so disable -Wpointer-sign for all clang versions.
31123 2020-11-07  Bruno Haible  <bruno@clisp.org>
31125         gnulib-tool: Fix link error with 'version-etc' (regression 2020-05-29).
31126         Reported by Simon Josefsson in
31127         <https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00032.html>.
31128         * gnulib-tool (func_emit_tests_Makefile_am): Add libtests.a to
31129         LDADD a third time, after the second occurrence of ../lib/libgnu.a.
31130         * pygnulib/GLEmiter.py (tests_Makefile_am): Likewise.
31132 2020-11-04  Paul Eggert  <eggert@cs.ucla.edu>
31134         tests: pacify Sun C 5.9
31135         Without these changes, Sun C 5.9 (2009/11/22) issues complaints like
31136         “"test-nl_langinfo-mt.c", line 75: warning: statement not reached”.
31137         * tests/test-nl_langinfo-mt.c (thread1_func, thread2_func)
31138         (thread3_func, thread4_func, thread5_func, thread6_func, threadN_func):
31139         * tests/test-setlocale_null-mt-all.c (thread1_func, thread2_func):
31140         * tests/test-setlocale_null-mt-one.c (thread1_func, thread2_func):
31141         Remove unreachable ‘return NULL;’s.
31143         tests: port better to XLC 12.01
31144         * tests/test-argmatch.c (CHECK): Do not use -1 as a subscript,
31145         even in code that is not executed, as IBM XLC 12.01 complains "The
31146         subscript -1 is less than zero."
31147         * tests/test-stdint.c (verify_width): Pass an (unused) 3rd
31148         argument to _GL_VERIFY, as ISO C requires.  Otherwise, IBM XLC
31149         12.01 complains "The invocation of macro _GL_VERIFY contains fewer
31150         arguments than are required by the macro definition."
31152 2020-11-03  Bruno Haible  <bruno@clisp.org>
31154         aligned-malloc: Use fixes from the new modules.
31155         * modules/aligned-malloc (Depends-on): Add posix_memalign,
31156         aligned_alloc, memalign.
31157         (configure.ac): Use AC_CHECK_FUNCS_ONCE.
31159 2020-11-03  Bruno Haible  <bruno@clisp.org>
31161         aligned_alloc: Add tests.
31162         * tests/test-aligned_alloc.c: New file.
31163         * modules/aligned_alloc-tests: New file.
31165         aligned_alloc: New module.
31166         * lib/stdlib.in.h (aligned_alloc): New declaration.
31167         * lib/aligned_alloc.c: New file.
31168         * m4/aligned_alloc.m4: New file.
31169         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether aligned_alloc is declared.
31170         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_ALIGNED_ALLOC,
31171         HAVE_ALIGNED_ALLOC, REPLACE_ALIGNED_ALLOC.
31172         * modules/stdlib (Makefile.am): Substitute GNULIB_ALIGNED_ALLOC,
31173         HAVE_ALIGNED_ALLOC, REPLACE_ALIGNED_ALLOC.
31174         * modules/aligned_alloc: New file.
31175         * tests/test-stdlib-c++.cc (aligned_alloc): Check signature.
31176         * doc/posix-functions/aligned_alloc.texi: Mention the new module and the
31177         AIX bug.
31179 2020-11-03  Bruno Haible  <bruno@clisp.org>
31181         posix_memalign: Add tests.
31182         * tests/test-posix_memalign.c: New file.
31183         * modules/posix_memalign-tests: New file.
31185         posix_memalign: New module.
31186         * lib/stdlib.in.h (posix_memalign): New declaration.
31187         * lib/posix_memalign.c: New file.
31188         * m4/posix_memalign.m4: New file.
31189         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether posix_memalign is declared.
31190         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_POSIX_MEMALIGN,
31191         HAVE_POSIX_MEMALIGN, REPLACE_POSIX_MEMALIGN.
31192         * modules/stdlib (Makefile.am): Substitute GNULIB_POSIX_MEMALIGN,
31193         HAVE_POSIX_MEMALIGN, REPLACE_POSIX_MEMALIGN.
31194         * modules/posix_memalign: New file.
31195         * tests/test-stdlib-c++.cc (posix_memalign): Check signature.
31196         * doc/posix-functions/posix_memalign.texi: Mention the new module and
31197         the OpenBSD bug.
31199 2020-11-03  Bruno Haible  <bruno@clisp.org>
31201         memalign: Add tests.
31202         * tests/test-memalign.c: New file.
31203         * modules/memalign-tests: New file.
31205         memalign: New module.
31206         * modules/memalign: New file.
31207         * doc/glibc-functions/memalign.texi: Mention the new module.
31209 2020-11-03  Bruno Haible  <bruno@clisp.org>
31211         verify tests: Fix crash with GCC (regression 2020-11-02).
31212         * tests/test-verify.c (main): Fix initializer of s.
31214 2020-11-03  Pádraig Brady  <P@draigBrady.com>
31216         mountlist: recognize more file system types as remote
31218         * lib/mountlist.c (ME_REMOTE): Sync previously unconsidered
31219         "remote" file systems from stat.c in coreutils.
31221 2020-11-02  Bernhard Voelker  <mail@bernhard-voelker.de>
31223         verify tests: Fix -Wuninitialized warning (regression 2020-10-30).
31224         * tests/test-verify.c (main): Initialize state variable.
31225         Reported by Bruno Haible for GCC 5.4.0.
31227 2020-11-02  Paul Eggert  <eggert@cs.ucla.edu>
31229         dfa.h: support inclusion from C++
31230         * lib/dfa.h: Allow multiple inclusion, and inclusion from
31231         C++ code.  The latter was suggested by Arnold Robbins.
31233 2020-11-01  Bruno Haible  <bruno@clisp.org>
31235         ssfmalloc tests: Portability to Linux/PowerPC and Linux/SPARC.
31236         * tests/test-ssfmalloc.c: Include <limits.h>.
31237         (PAGESIZE_MAX): Set to 65536 on Linux/PowerPC.
31239 2020-11-01  Bruno Haible  <bruno@clisp.org>
31241         verify tests: Fix compilation error with MSVC (regression 2020-10-30).
31242         * tests/test-verify.c (test_assume_noreturn): Fix declaration.
31244 2020-11-01  Jim Meyering  <meyering@fb.com>
31246         dfa-tests: test for today's invalid-merge fix
31247         * tests/test-dfa-invalid-merge.sh: New file.
31248         * modules/dfa-tests (Files): Add it.
31249         (TESTS): Add it.
31251 2020-11-01  Norihiro Tanaka  <noritnk@kcn.ne.jp>
31253         dfa: retain sequences of similar nodes in optimization
31254         DFA was merging similar nodes when it should not.  For example,
31255         it would convert a+a+a to a+a.  Now, a sequence of similar nodes
31256         is not merged.  Problem reported by Gonzalo Padrino in
31257         https://bugs.gnu.org/44351
31258         * lib/dfa.c (merge_nfa_state): Skip the follow for repetition in
31259         optimization.
31261 2020-11-01  Jim Meyering  <meyering@fb.com>
31263         test-dfa-match-aux.c: accept EREs, not BREs
31264         * tests/test-dfa-match-aux.c (main): Specify RE_SYNTAX_EGREP, not
31265         RE_SYNTAX_GREP, so tests can use ERE syntax rather than BRE.
31267 2020-10-30  Bernhard Voelker  <mail@bernhard-voelker.de>
31269         verify tests: avoid -Wmissing-declarations warnings
31270         * tests/test-verify.c (test_assume_expressions): Add declaration.
31271         (test_assume_optimization): Likewise.
31272         (test_assume_noreturn): Likewise.
31273         (main): Move down after all other definitions.  While at it, also
31274         call test_assume_expressions and test_assume_optimization as a
31275         runtime check.
31277 2020-10-26  Paul Eggert  <eggert@cs.ucla.edu>
31279         sys_stat: update comments for S_IRWXUGO, S_IXUGO
31280         * lib/sys_stat.in.h (S_IXUGO, S_IRWXUGO): Update comments.
31281         Perhaps these macros should be removed, as they’re not in either
31282         POSIX or GNU.  They could be moved to stat-macros.h, which would
31283         be cleaner in some sense.
31285 2020-10-25  Bruno Haible  <bruno@clisp.org>
31287         ssfmalloc tests: Small tweaks.
31288         * tests/test-ssfmalloc.c: Add comments.
31289         (alloc_pages): Don't require PROT_EXEC bits.
31290         (block_sizes): Add more small sizes, for better coverage of
31291         ssfmalloc-bitmap.h.
31293         ssfmalloc tests: Portability to Minix.
31294         * modules/ssfmalloc-tests (Files): Add m4/mmap-anon.m4.
31295         (configure.ac): Invoke gl_FUNC_MMAP_ANON.
31296         * m4/mmap-anon.m4: Update comment.
31298         ssfmalloc: Portability to AIX.
31299         * modules/ssfmalloc (Include): Add ssfmalloc.h.
31300         (Link): New section.
31301         * modules/ssfmalloc-tests (Makefile.am): Link test-ssfmalloc with
31302         $(LIBTHREAD).
31304         ssfmalloc: Portability to Cygwin.
31305         * lib/ssfmalloc.h: Add parameter PAGESIZE_MAX.
31306         (pg_offset_t): Define depending on PAGESIZE_MAX.
31307         * tests/test-ssfmalloc.c: Undefine PAGESIZE.
31308         (PAGESIZE_MAX): New macro.
31310         ssfmalloc: Fix buffer overrun in bitmap search.
31311         * lib/ssfmalloc-bitmap.h (find_first_packet_set): Don't access the
31312         word *words_end.
31314 2020-10-24  Paul Eggert  <eggert@cs.ucla.edu>
31316         doc: mention ‘restrict’ and C++
31317         * doc/gnulib-readme.texi (C99 features assumed): Document
31318         that ‘restrict’ should be avoided in C++ code.
31320 2020-10-20  Bernhard Voelker  <mail@bernhard-voelker.de>
31322         selinux-at, selinux-h: port to SELinux 3.1
31323         The new release finally deprecated the typedef 'security_context_t',
31324         see <https://github.com/SELinuxProject/selinux/commit/7a124ca275>.
31325         Use the simpler 'char *' instead.
31326         * lib/getfilecon.c (getfilecon): Adjust type of context parameter.
31327         (lgetfilecon): Likewise.
31328         (fgetfilecon): Likewise.
31329         (map_to_failure): Likewise.
31330         (rpl_getfilecon): Likewise.
31331         (rpl_lgetfilecon): Likewise.
31332         (rpl_fgetfilecon): Likewise.
31333         * lib/se-selinux.in.h (security_context_t): Remove typedef.
31334         (getcon): Adjust type of context parameter.
31335         (freecon): Likewise.
31336         (getfscreatecon): Likewise.
31337         (setfscreatecon): Likewise.
31338         (matchpathcon): Likewise.
31339         (getfilecon): Likewise.
31340         (lgetfilecon): Likewise.
31341         (fgetfilecon): Likewise.
31342         (setfilecon): Likewise.
31343         (lsetfilecon): Likewise.
31344         (fsetfilecon): Likewise.
31345         (security_check_context): Likewise.
31346         (security_check_context_raw): Likewise.
31347         (setexeccon): Likewise.
31348         (security_compute_create): Likewise.
31349         * lib/selinux-at.c (getfileconat): Likewise.
31350         (lgetfileconat): Likewise.
31351         (setfileconat): Likewise.
31352         (lsetfileconat): Likewise.
31353         * lib/selinux-at.h: Likewise.
31355 2020-10-19  Bruno Haible  <bruno@clisp.org>
31357         xalloc-die: Fix link error with Solaris cc (regression 2020-07-27).
31358         * lib/xalloc.h (xalloc_die): Don't declare if GNULIB_XALLOC_DIE is 0.
31359         (xmalloc, xzalloc, xcalloc, xrealloc, x2realloc, xmemdup, xstrdup,
31360         XMALLOC, XNMALLOC, XZALLOC, XCALLOC, xnmalloc, xnrealloc, x2nrealloc,
31361         xcharalloc): Don't declare/define if GNULIB_XALLOC is 0.
31362         * modules/xalloc (configure.ac): Define GNULIB_XALLOC.
31363         * modules/xalloc-die (configure.ac): Define GNULIB_XALLOC_DIE.
31365 2020-10-18  Bruno Haible  <bruno@clisp.org>
31367         ssfmalloc: Add tests.
31368         * tests/test-ssfmalloc.c: New file.
31369         * modules/ssfmalloc-tests: New file.
31371         ssfmalloc: New module.
31372         * lib/ssfmalloc.h: New file.
31373         * lib/ssfmalloc-bitmap.h: New file.
31374         * modules/ssfmalloc: New file.
31376 2020-10-18  Bruno Haible  <bruno@clisp.org>
31378         wchar: Fix configure test result on some versions of AIX.
31379         Reported by Clément Chigot <clement.chigot@atos.net> in
31380         <https://lists.gnu.org/archive/html/bug-gnulib/2020-10/msg00115.html>.
31381         * m4/wchar_h.m4 (gl_WCHAR_H_INLINE_OK): Execute the test only on glibc
31382         systems.
31384 2020-10-18  Bruno Haible  <bruno@clisp.org>
31386         time: Fix warning about asctime when asctime is not used.
31387         * lib/time.in.h (asctime_r, ctime, ctime_r): Fix _GL_WARN_ON_USE
31388         invocation.
31390 2020-10-18  Bruno Haible  <bruno@clisp.org>
31392         *-list, *-oset, *-omap: Avoid a GCC warning (regression 2020-10-10).
31393         * lib/gl_anylinked_list2.h (gl_linked_iterator_free): Remove
31394         '_GL_ATTRIBUTE_CONST'.
31395         * lib/gl_anytree_list2.h (gl_tree_iterator_free): Likewise.
31396         * lib/gl_anytree_omap.h (gl_tree_iterator_free): Likewise.
31397         * lib/gl_anytree_oset.h (gl_tree_iterator_free): Likewise.
31398         * lib/gl_array_list.c (gl_array_iterator_free): Likewise.
31399         * lib/gl_array_omap.c (gl_array_iterator_free): Likewise.
31400         * lib/gl_array_oset.c (gl_array_iterator_free): Likewise.
31401         * lib/gl_carray_list.c (gl_carray_iterator_free): Likewise.
31403 2020-10-18  Bruno Haible  <bruno@clisp.org>
31405         obstack: Fix a clang warning.
31406         * lib/obstack.c (print_and_abort): Mark as __attribute_noreturn__.
31408 2020-10-16  Bruno Haible  <bruno@clisp.org>
31410         hash: Rename hash_delete to hash_remove.
31411         * lib/hash.h (hash_remove): Renamed from hash_delete.
31412         (hash_delete): New declaration.
31413         * lib/hash.c (hash_remove): Renamed from hash_delete.
31414         (hash_delete): New function.
31415         * tests/test-hash.c (main): Update.
31416         * lib/fts-cycle.c (leave_dir): Likewise.
31417         * NEWS: Mention the change.
31419 2020-10-16  Bruno Haible  <bruno@clisp.org>
31421         hash, xhash: Make usable from C++.
31422         * lib/hash.h: Add extern "C".
31424 2020-10-16  Bruno Haible  <bruno@clisp.org>
31426         hash, xhash: Move comments to the .h file.
31427         * lib/hash.c: Move comments meant for the user from here...
31428         * lib/xhash.c: ... and here...
31429         * lib/hash.h: ... to here.
31431 2020-10-13  Philipp Klaus Krause  <pkk@spth.de>  (tiny change)
31433         Don't declare an intention to modify the return value of strerror.
31434         * tests/test-perror2.c (main): Assign the return value of strerror to a
31435         'const char *' variable.
31437 2020-10-11  Bruno Haible  <bruno@clisp.org>
31439         *printf: Avoid "expanded before it was required" warning.
31440         * m4/printf.m4 (gl_SNPRINTF_TRUNCATION_C99): Define through
31441         AC_DEFUN_ONCE.
31443 2020-10-11  Benji Wiebe  <benjiwiebe14@gmail.com>
31445         getprogname: Add support for OpenServer 6 and UnixWare 7.
31446         * lib/getprogname.c: Include <fcntl.h>, <stdlib.h>, <string.h>.
31447         (getprogname): On OpenServer6 and UnixWare, read /proc/<pid>/cmdline.
31449 2020-10-11  Bruno Haible  <bruno@clisp.org>
31451         tests: Avoid a name clash on UnixWare.
31452         Reported by Tim Rice <tim@multitalents.net> in
31453         <https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00025.html>.
31454         * tests/nap.h (nap): Define as gl_nap on OpenServer and UnixWare.
31456 2020-10-11  Bruno Haible  <bruno@clisp.org>
31458         stdioext: Update comments regarding UnixWare.
31459         Reported by Tim Rice <tim@multitalents.net> in
31460         <https://lists.gnu.org/archive/html/bug-gnulib/2020-10/msg00005.html>.
31461         * lib/fbufmode.c: Update comments.
31462         * lib/fflush.c: Likewise.
31463         * lib/fpending.c: Likewise.
31464         * lib/fpurge.c: Likewise.
31465         * lib/freadable.h: Likewise.
31466         * lib/freadable.c: Likewise.
31467         * lib/freadahead.c: Likewise.
31468         * lib/freading.h: Likewise.
31469         * lib/freading.c: Likewise.
31470         * lib/freadptr.c: Likewise.
31471         * lib/freadseek.c: Likewise.
31472         * lib/fseeko.c: Likewise.
31473         * lib/fseterr.c: Likewise.
31474         * lib/fwritable.h: Likewise.
31475         * lib/fwritable.c: Likewise.
31476         * lib/fwriting.h: Likewise.
31477         * lib/fwriting.c: Likewise.
31479 2020-10-11  Bruno Haible  <bruno@clisp.org>
31481         stdioext: Treat OpenServer 6 and UnixWare 7 like OpenServer 5.
31482         Reported by Tim Rice <tim@multitalents.net> in
31483         <https://lists.gnu.org/archive/html/bug-gnulib/2020-10/msg00005.html>.
31484         Uses the info from
31485         <https://lists.gnu.org/archive/html/bug-gnulib/2020-10/msg00028.html>.
31486         * lib/stdio-impl.h: Test also __SCO_VERSION__ and __sysv5__.
31488 2020-10-11  Bruno Haible  <bruno@clisp.org>
31490         stdioext: Avoid compilation errors on UnixWare 7.
31491         Reported by Tim Rice <tim@multitalents.net> in
31492         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00127.html>.
31493         * lib/fbufmode.c: Don't include <stdio_ext.h> if it does not exist.
31494         * lib/fpurge.c: Likewise.
31495         * lib/freadable.h: Likewise.
31496         * lib/freading.h: Likewise.
31497         * lib/fwritable.h: Likewise.
31498         * lib/fwriting.h: Likewise.
31499         * m4/fbufmode.m4 (gl_FUNC_FBUFMODE): Test whether <stdio_ext.h> exists.
31500         * m4/fpurge.m4 (gl_FUNC_FPURGE): Likewise.
31501         * m4/freadable.m4 (gl_FUNC_FREADABLE): Likewise.
31502         * m4/freading.m4 (gl_FUNC_FREADING): Likewise.
31503         * m4/fwritable.m4 (gl_FUNC_FWRITABLE): Likewise.
31504         * m4/fwriting.m4 (gl_FUNC_FWRITING): Likewise.
31506 2020-10-11  Bruno Haible  <bruno@clisp.org>
31508         stdioext: Update comments regarding Cygwin.
31509         * lib/fpending.c: Update comments.
31510         * lib/fpurge.c: Likewise.
31511         * lib/freadable.h: Likewise.
31512         * lib/freadable.c: Likewise.
31513         * lib/freading.h: Likewise.
31514         * lib/freading.c: Likewise.
31515         * lib/fwritable.h: Likewise.
31516         * lib/fwritable.c: Likewise.
31517         * lib/fwriting.h: Likewise.
31518         * lib/fwriting.c: Likewise.
31520 2020-10-11  KO Myung-Hun  <komh78@gmail.com>
31522         Fix "warning: implicit declaration of function 'pthread_sigmask'".
31523         * lib/signal.in.h [__KLIBC__]: Include <pthread.h>.
31524         * lib/sys_select.in.h [__KLIBC__]: Do not include <signal.h>.
31526 2020-10-10  Bruno Haible  <bruno@clisp.org>
31528         *-list, *-oset, *-omap: Avoid possible compiler warnings.
31529         Reported by Marc Nieper-Wißkirchen in
31530         <https://lists.gnu.org/r/bug-gnulib/2020-10/msg00025.html>.
31531         * lib/gl_anylinked_list2.h (gl_linked_iterator,
31532         gl_linked_iterator_from_to): Mark as 'pure'.
31533         (gl_linked_iterator_free): Mark as 'const'.
31534         * lib/gl_anytree_list2.h (gl_tree_size, gl_tree_node_value,
31535         gl_tree_search_from_to, gl_tree_indexof_from_to, gl_tree_iterator,
31536         gl_tree_iterator_from_to, gl_tree_sortedlist_search,
31537         gl_tree_sortedlist_search_from_to, gl_tree_sortedlist_indexof,
31538         gl_tree_sortedlist_indexof_from_to): Mark as 'pure'.
31539         (gl_tree_iterator_free): Mark as 'const'.
31540         * lib/gl_anytree_omap.h (gl_tree_size, gl_tree_iterator): Mark as
31541         'pure'.
31542         (gl_tree_iterator_free): Mark as 'const'.
31543         * lib/gl_anytree_oset.h (gl_tree_size, gl_tree_next_node,
31544         gl_tree_prev_node, gl_tree_iterator): Mark as 'pure'.
31545         (gl_tree_iterator_free): Mark as 'const'.
31546         * lib/gl_anytreehash_list1.h (node_position, compare_by_position,
31547         compare_position_threshold): Mark as 'pure'.
31548         * lib/gl_array_list.c (gl_array_size, gl_array_indexof_from_to,
31549         gl_array_search_from_to, gl_array_iterator, gl_array_iterator_from_to,
31550         gl_array_sortedlist_indexof_from_to, gl_array_sortedlist_indexof,
31551         gl_array_sortedlist_search_from_to, gl_array_sortedlist_search): Mark as
31552         'pure'.
31553         (gl_array_iterator_free): Mark as 'const'.
31554         * lib/gl_array_omap.c (gl_array_size, gl_array_indexof, gl_array_search,
31555         gl_array_search_atleast, gl_array_iterator): Mark as 'pure'.
31556         (gl_array_iterator_free): Mark as 'const'.
31557         * lib/gl_array_oset.c (gl_array_size, gl_array_indexof, gl_array_search,
31558         gl_array_indexof_atleast, gl_array_search_atleast, gl_array_iterator,
31559         gl_array_iterator_atleast): Mark as 'pure'.
31560         (gl_array_iterator_free): Mark as 'const'.
31561         * lib/gl_carray_list.c (gl_carray_size, gl_carray_node_value,
31562         gl_carray_next_node, gl_carray_previous_node, gl_carray_get_at,
31563         gl_carray_indexof_from_to, gl_carray_search_from_to, gl_carray_iterator,
31564         gl_carray_iterator_from_to, gl_carray_sortedlist_indexof_from_to,
31565         gl_carray_sortedlist_indexof, gl_carray_sortedlist_search_from_to,
31566         gl_carray_sortedlist_search): Mark as 'pure'.
31567         (gl_carray_iterator_free): Mark as 'const'.
31569 2020-10-10  Bruno Haible  <bruno@clisp.org>
31571         rbtree-list: Avoid possible compiler warnings.
31572         This mirrors the change of avltree-list on 2014-09-16.
31573         * lib/gl_rbtree_list.c (gl_rbtree_list_check_invariants): Add extern
31574         declaration. Add cast to void for ignored value of check_invariants.
31576 2020-10-10  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
31578         stack: New module.
31579         * MODULES.html.sh: Add entry for the stack module.
31580         * modules/stack: New file.
31581         * modules/stack-tests: New file.
31582         * lib/stack.h: New file.
31583         * tests/test-stack.c: New file.
31585 2020-10-10  Paul Eggert  <eggert@cs.ucla.edu>
31587         attribute: improve const, pure doc
31588         Problem reported by Marc Nieper-Wißkirchen in:
31589         https://lists.gnu.org/r/bug-gnulib/2020-10/msg00035.html
31590         * lib/attribute.h (ATTRIBUTE_CONST, ATTRIBUTE_PURE): Improv doc.  See:
31591         https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51971#c1
31593 2020-10-05  Paul Eggert  <eggert@cs.ucla.edu>
31595         thread: pacify GCC on Solaris 10
31596         Problem reported by Kiyoshi KANAZAWA for grep (Bug#43666#29).
31597         * lib/glthread/thread.h (gl_thread_self): Use ‘(pthread_t) 0’
31598         instead of ‘(pthread_t) NULL’, to pacify GCC on Solaris 10
31599         where pthread_t is unsigned int.
31601 2020-10-04  Paul Eggert  <eggert@cs.ucla.edu>
31603         c-stack: avoid AS_IF
31604         Problem reported by Bruno Haible in:
31605         https://lists.gnu.org/r/bug-gnulib/2020-10/msg00018.html
31606         * m4/c-stack.m4 (gl_PREREQ_C_STACK): No need for AS_IF.
31608         c-stack: pacify GCC 9.3.1 when using libsigsegv
31609         * lib/c-stack.c [USE_LIBSIGSEGV]: Disable --suggest-attribute=pure.
31611 2020-10-04  Bruno Haible  <bruno@clisp.org>
31613         localename: Fix a couple of "unused parameter" warnings.
31614         Reported by Marc Nieper-Wißkirchen <marc@nieper-wisskirchen.de> in
31615         <https://lists.gnu.org/archive/html/bug-gnulib/2020-10/msg00014.html>.
31616         * lib/localename.c (gl_locale_name_thread_unsafe, gl_locale_name_thread,
31617         gl_locale_name_posix, gl_locale_name_environ): Add _GL_UNUSED in
31618         parameter list.
31620 2020-10-04  Bruno Haible  <bruno@clisp.org>
31622         vasnprintf: Don't use %n on modern, ISO C 99 compliant platforms.
31623         Suggested by Jeremie Courreges-Anglas <jca@wxcvbn.org> in
31624         <https://lists.gnu.org/archive/html/bug-gnulib/2020-10/msg00010.html>.
31625         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Define
31626         HAVE_SNPRINTF_TRUNCATION_C99.
31627         * lib/vasnprintf.c (VASNPRINTF): Don't use %n if
31628         HAVE_SNPRINTF_RETVAL_C99 && HAVE_SNPRINTF_TRUNCATION_C99.
31630 2020-10-03  Paul Eggert  <eggert@cs.ucla.edu>
31632         c-stack: streamline Solaris configuration
31633         * lib/c-stack.c: Omit mention of HAVE_SIGALTSTACK, since
31634         the code is used only if a test for sigaltstack worked
31635         in some other way.
31636         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Do not require gl_LIBSIGSEGV;
31637         instead, execute gl_LIBSIGSEGV only if needed (because the XSI
31638         heuristic does not work).
31639         * modules/c-stack (Files): Add m4/libsigsegv.m4, since
31640         we no longer require the libsigsegv module.
31641         (Depends-on): Depend on havelib, not libsigsegv.
31643         c-stack: stop using SIGSTKSZ
31644         It’s been proposed to stop making SIGSTKSZ an integer constant:
31645         https://sourceware.org/pipermail/libc-alpha/2020-September/118028.html
31646         Also, using SIGSTKSZ in #if did not conform to current POSIX.
31647         Also, avoiding SIGSTKSZ makes the code simpler and easier to grok.
31648         * lib/c-stack.c (SIGSTKSZ): Remove.
31649         (alternate_signal_stack): Now a 64 KiB array, for simplicity.
31650         All uses changed.
31652         c-stack: fix libsigsegv typo
31653         Problem reported by Bruno Haible in:
31654         https://lists.gnu.org/r/bug-gnulib/2020-09/msg00175.html
31655         * lib/c-stack.c (USE_LIBSIGSEGV): Fix typo that caused libsigsegv
31656         to be used only on Solaris (exactly where it is not needed!).
31658 2020-10-03  Thien-Thi Nguyen  <ttn@gnuvola.org>
31660         MODULES.html.sh: Fix typo.
31661         * MODULES.html.sh (Numeric conversion functions <stdlib.h>): Fix typo.
31663 2020-09-28  Paul Eggert  <eggert@cs.ucla.edu>
31665         version-etc: pacify Oracle Studio 12.6
31666         Without this patch, it complains: "version-etc.h", line 64:
31667         warning: token-less macro argument (E_TOKENLESS_MACRO)" when in
31668         pedantic mode.
31669         * lib/version-etc.h (version_etc): Port to C89 macro rules.
31671 2020-09-27  Bruno Haible  <bruno@clisp.org>
31673         Avoid "warning: The macro `AC_DECL_SYS_SIGLIST' is obsolete".
31674         Reported by Gavin Smith <gavinsmith0123@gmail.com> in
31675         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00154.html>.
31676         * m4/strsignal.m4 (gl_PREREQ_STRSIGNAL): Check for sys_siglist
31677         ourselves; don't use AC_DECL_SYS_SIGLIST.
31679 2020-09-27  Bruno Haible  <bruno@clisp.org>
31681         Avoid "warning: The macro `_AC_COMPUTE_INT' is obsolete".
31682         Reported by Gavin Smith <gavinsmith0123@gmail.com> in
31683         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00154.html>.
31684         * m4/gethostname.m4 (gl_PREREQ_HOST_NAME_MAX): Use AC_COMPUTE_INT
31685         instead of _AC_COMPUTE_INT.
31687 2020-09-27  Bruno Haible  <bruno@clisp.org>
31689         Avoid "warning: The macro `AC_HEADER_STDC' is obsolete".
31690         Reported by Gavin Smith <gavinsmith0123@gmail.com> in
31691         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00154.html>.
31692         Based on a patch by Paul Eggert.
31693         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Don't require AC_HEADER_STDC. Don't
31694         test STDC_HEADERS. Assume <stdlib.h> exists.
31695         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Likewise.
31697 2020-09-27  Bruno Haible  <bruno@clisp.org>
31699         Enable testing of prereleases of Autoconf 2.70.
31700         Suggested by Paul Eggert in
31701         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00160.html>.
31702         * m4/alloca.m4 (_AC_LIBOBJ_ALLOCA): Test for Autoconf >= 2.69c, not
31703         >= 2.70.
31704         * m4/largefile.m4 (AC_SYS_LARGEFILE): Likewise.
31705         * m4/pid_t.m4 (AC_TYPE_PID_T): Likewise.
31706         * m4/sys_types_h.m4 (AC_HEADER_MAJOR): Likewise.
31708 2020-09-27  Bruno Haible  <bruno@clisp.org>
31710         Avoid "warning: The macro `AC_PROG_CC_STDC' is obsolete".
31711         Reported by Gavin Smith <gavinsmith0123@gmail.com> in
31712         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00151.html>.
31713         * m4/gnulib-common.m4 (gl_PROG_CC_C99): Use AC_PROG_CC_C99 or
31714         AC_PROG_CC, depending on the Autoconf version.
31716 2020-09-27  Gavin Smith  <gavinsmith0123@gmail.com>
31718         Avoid "warning: The macro `AC_HELP_STRING' is obsolete".
31719         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Use AS_HELP_STRING instead
31720         of AC_HELP_STRING.
31721         * m4/libgcrypt.m4 (AM_PATH_LIBGCRYPT): Likewise.
31723 2020-09-27  Bruno Haible  <bruno@clisp.org>
31725         Avoid "warning: $as_echo_n is obsolete" from autoconf 2.69c.
31726         Reported by Gavin Smith <gavinsmith0123@gmail.com> in
31727         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00151.html>.
31728         * m4/gnulib-common.m4 (gl_CACHE_VAL_SILENT): Use gl_SILENT.
31730 2020-09-27  Bruno Haible  <bruno@clisp.org>
31732         extensions: Simplify last commit.
31733         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't require
31734         AC_GNU_SOURCE ever.
31736 2020-09-26  Paul Eggert  <eggert@cs.ucla.edu>
31738         extensions: require AC_GNU_SOURCE only for <=2.63
31739         Problem reported by Gavin Smith in:
31740         https://lists.gnu.org/r/autoconf/2020-09/msg00012.html
31741         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS):
31742         Require AC_GNU_SOURCE only for Autoconf 2.63 and earlier, since it
31743         shouldn’t be needed after that, and Autoconf 2.70 complains about
31744         it being obsolete.
31746 2020-09-26  Bruno Haible  <bruno@clisp.org>
31748         regex-tests: Make test more robust.
31749         * tests/test-regex.c (main): Make sure to revert the locale to "C" after
31750         the test in "tr_TR.UTF-8" locale. Exit if we can't revert it.
31752 2020-09-25  Paul Eggert  <eggert@cs.ucla.edu>
31754         regex-tests: fix possible Turkish false-alarm
31755         * modules/regex-tests (Depends-on): Add wctype-h.
31756         * tests/test-regex.c: Include wctype.h.
31757         (main): Check that ‘i’ uppercases to ‘İ’ in Turkish,
31758         as the Turkish regex test assumes this.
31760         regex-tests: fix test and add debug output
31761         Perhaps this will fix the recent grep test failure reported at:
31762         https://buildfarm.opencsw.org/buildbot/builders/ggrep-solaris10-sparc/builds/199
31763         At least, the debug output should help narrow down the failure.
31764         * tests/test-regex.c: Include stdarg.h, stdio.h.
31765         (exit_status): New var.
31766         (report_error): New function.
31767         (main): Use it to report failures to stdout instead of merely
31768         exiting with some nonzero status.  The status info alone isn’t
31769         enough to do remote debugging.  In the new tr_TR.UTF-8 test, clear
31770         regex before calling re_compile_pattern, fixing a portability bug.
31772         regex: no longer match glibc
31773         * config/srclist.txt: Comment out regex_internal.c for now.
31775 2020-09-23  Paul Eggert  <eggert@cs.ucla.edu>
31777         regex: fix ignore-case Turkish bug
31778         * lib/regex_internal.c (build_wcs_upper_buffer):
31779         Do not assume that converting single-byte character to upper
31780         yields a single-byte character.  This is not true for Turkish,
31781         where towupper (L'i') yields L'İ', which is not single-byte.
31782         * tests/test-regex.c (main): Test for this bug.
31784         regex: port to weird isascii platforms
31785         * lib/regex_internal.h (isascii) [!_LIBC]: Supply glibc version.
31787 2020-09-20  Norihiro Tanaka  <noritnk@kcn.ne.jp>
31789         dfa: make dfasupported a global function
31790         * lib/dfa.c (dfasupported): Rename, and make it global.
31791         Update caller.
31792         * lib/dfa.h (dfasupported): Add prototype.
31794 2020-09-20  Bruno Haible  <bruno@clisp.org>
31796         canonicalize: Add support for UNC file names on native Windows.
31797         Reported and initial patch by Vaclav Slavik <vaclav@slavik.io> in
31798         <https://savannah.gnu.org/bugs/?59079>.
31799         * lib/canonicalize.c (canonicalize_filename_mode): For UNC file names,
31800         extend the prefix to include the server.
31802 2020-09-20  Bruno Haible  <bruno@clisp.org>
31804         supersede: Fix test failures on native Windows.
31805         * lib/supersede.c (open_supersede): Handle non-regular files on native
31806         Windows like on Solaris.
31807         * tests/test-supersede-open.h (test_open_supersede): Use O_BINARY flag.
31809 2020-09-20  Paul Eggert  <eggert@cs.ucla.edu>
31811         test-stdalign: test Oracle Studio better
31812         * doc/posix-headers/stdalign.texi (stdalign.h):
31813         * tests/test-stdalign.c (main):
31814         Sun Studio Bug #2125432 seems to be fixed.
31816         c-stack: output diagnostic in single 'write'
31817         * lib/c-stack.c (die): In the typical case, use just one 'write'
31818         syscall to output the diagnostic, as this lessens interleaving.
31819         (die, c_stack_action): Assume C99.
31820         * modules/c-stack (Depends-on): Add c99, mempcpy.
31822         c-stack: improve checking if !libsigsegv
31823         If SIGINFO_WORKS, do not treat a null pointer dereference as if it
31824         were a stack overflow.  Use uintptr_t and INT_ADD_WRAPV to avoid
31825         unlikely pointer overflow.  Also, fix some obsolete code and typos.
31826         I found these problems while looking into this bug report:
31827         https://lists.gnu.org/r/grep-devel/2020-09/msg00053.html
31828         * lib/c-stack.c: Include c-stack.h first, to test interface.
31829         Include inttypes.h for UINTPTR_MAX, stdbool.h, stddef.h for
31830         max_align_t, intprops.h for INT_ADD_WRAPV.
31831         (USE_LIBSIGSEGV): New macro; use it to simplify later code.
31832         (SIGSTKSZ): Simplify setup.  Work around libsigsegv bug only
31833         for libsigsegv 2.8 and earlier since the bug should be fixed
31834         after that.
31835         (alternate_signal_stack): Use max_align_t instead of doing it by hand.
31836         (segv_handler, overflow_handler, segv_handler) [DEBUG]:
31837         Assume sprintf returns byte count; this assumption is safe now.
31838         (page_size): New static volatile variable, since sysconf isn’t
31839         documented to be async-signal-safe on Solaris.  This variable is
31840         present and used if (!USE_LIBSIGSEGV && HAVE_SIGALTSTACK &&
31841         HAVE_DECL_SIGALTSTACK && HAVE_STACK_OVERFLOW_HANDLING &&
31842         SIGINFO_WORKS).
31843         (segv_handler): Use it if present.  Never report null pointer
31844         dereference as a stack overflow.  Check for (unlikely) unsigned
31845         and/or pointer overflow.
31846         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
31847         Rename cache variables to gl_cv_sys_stack_overflow_works
31848         and gl_cv_sys_xsi_stack_overflow_heuristic.
31849         All uses changed.
31850         (gl_PREREQ_C_STACK): Do not require AC_FUNC_ALLOCA, since
31851         c-stack no longer uses STACK_DIRECTION.
31852         Do not check for unistd.h, since we depend on unistd.
31853         Fix shell typo ‘$"ac_cv_sys_xsi_stack_overflow_heuristic"’.
31854         * modules/c-stack (Depends-on): Sort.  Add intprops, inttypes,
31855         stdbool, stddef.
31857 2020-09-20  Bruno Haible  <bruno@clisp.org>
31859         Revert now-unnecessary override of config.guess on Alpine Linux 3.10.
31860         * m4/musl.m4: Revert 2020-09-19 patch.
31861         * m4/setlocale_null.m4: Likewise.
31862         * modules/setlocale-null: Likewise.
31864 2020-09-19  Ben Pfaff  <blp@cs.stanford.edu>
31865             Bruno Haible  <bruno@clisp.org>
31867         relocatable-prog: Fix for multiple relocatable library directories.
31868         * build-aux/reloc-ldflags: Fix handling of multiple relocatable library
31869         directories.  Each one needs its own -Wl,-rpath,$dir option, instead of
31870         being attached to a single one.
31872 2020-09-19  Jim Meyering  <meyering@fb.com>
31874         test-verify.c: avoid -Wshadow warnings
31875         * tests/test-verify.c (gx): Rename global from "x". Adjust use.
31876         (enum): Capitalize member names. Adjust uses.
31878 2020-09-19  Bruno Haible  <bruno@clisp.org>
31880         havelib: Avoid linking with libc.a on GNU systems.
31881         Reported by Bruce Dubbs <bruce.dubbs@gmail.com> in
31882         <https://lists.gnu.org/archive/html/grep-devel/2020-09/msg00052.html>.
31883         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): When processing the
31884         dependency_libs value of a .la file, ignore '-lc' options on GNU
31885         systems.
31887 2020-09-19  Bruno Haible  <bruno@clisp.org>
31889         Fix recognition of musl libc on Alpine Linux 3.10.
31890         Reported by Jeffrey Walton <noloader@gmail.com> in
31891         <https://lists.gnu.org/archive/html/grep-devel/2020-09/msg00020.html>.
31892         * m4/musl.m4 (gl_MUSL_CANONICAL_HOST): New macro.
31893         (gl_MUSL_LIBC): Require it.
31894         * m4/setlocale_null.m4 (gl_FUNC_SETLOCALE_NULL): Likewise.
31895         * modules/setlocale-null (Files): Add m4/musl.m4.
31897 2020-09-19  Bruno Haible  <bruno@clisp.org>
31899         nl_langinfo: Make multithread-safe on Solaris 10 and Solaris 11.3.
31900         Reported for Solaris 10 by Dagobert Michelsen via Paul Eggert in
31901         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00023.html>
31902         and for Solaris 11.3 by Jeffrey Walton <noloader@gmail.com> in
31903         <https://lists.gnu.org/archive/html/bug-grep/2020-06/msg00013.html>.
31904         * lib/nl_langinfo-lock.c: New file, based on lib/setlocale_null-lock.c.
31905         * lib/nl_langinfo.c: Include <stdlib.h> and <windows.h> or <pthread.h>
31906         or <threads.h>.
31907         (ITEMS, MAX_RESULT_LEN): New macros.
31908         (nl_langinfo_unlocked): New function.
31909         (gl_get_nl_langinfo_lock): New declaration.
31910         (nl_langinfo_with_lock): New function, based on lib/setlocale_null.c.
31911         (rpl_nl_langinfo): Use nl_langinfo_with_lock instead of nl_langinfo.
31912         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Require gl_PTHREADLIB. Define
31913         HAVE_THREADS_H. Set NL_LANGINFO_MTSAFE. If setting it to 0, also set
31914         REPLACE_NL_LANGINFO.
31915         (gl_PREREQ_NL_LANGINFO_LOCK): New macro.
31916         * modules/nl_langinfo (Files): Add lib/nl_langinfo-lock.c,
31917         lib/windows-initguard.h, m4/threadlib.m4, m4/visibility.m4.
31918         (configure.ac): Compile nl_langinfo-lock.c when NL_LANGINFO_MTSAFE is 0.
31919         * doc/posix-functions/nl_langinfo.texi: Mention the Solaris bug.
31921 2020-09-18  Bruno Haible  <bruno@clisp.org>
31923         fsusage, getaddrinfo: Produce more regular configure output.
31924         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Remove AC_MSG_CHECKING without
31925         corresponding AC_MSG_RESULT.
31926         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Likewise.
31928 2020-09-18  Bruno Haible  <bruno@clisp.org>
31930         Add back gl_SILENT.
31931         * m4/gnulib-common.m4 (GL_TMP_FD, gl_SILENT): New macros.
31933 2020-09-18  Paul Eggert  <eggert@cs.ucla.edu>
31935         c-stack-tests: fix -fsanitize=undefined false alarm
31936         * tests/test-c-stack2.sh: Skip the test-harness self-test
31937         if ‘gcc -fsanitize=undefined’ is in use.
31939 2020-09-17  Paul Eggert  <eggert@cs.ucla.edu>
31941         signalblocking: simplify and remove gl_SILENT
31942         gl_SILENT was problematic because if a trap was sprung, stderr
31943         generated during the trap was lost.  Avoid the problem by
31944         removing the need for gl_SILENT.
31945         * m4/gnulib-common.m4 (GL_TMP_FD, gl_SILENT): Remove.
31946         * m4/signalblocking.m4 (gl_SIGNALBLOCKING):
31947         Simplify, avoiding the need for gl_SILENT while preserving the
31948         ability of the user to override the value of the cache variable,
31949         now ac_cv_func_sigprocmask.
31951 2020-09-17  Bruno Haible  <bruno@clisp.org>
31953         sigprocmask: Fix configuration failure on Solaris 10 (regr. 2020-07-25).
31954         * m4/gnulib-common.m4 (GL_TMP_FD): New macro.
31955         (gl_SILENT): Use 'exec', not a compound statement, to redirect
31956         AS_MESSAGE_FD.
31958 2020-09-17  Paul Eggert  <eggert@cs.ucla.edu>
31960         intprops, xalloc: avoid __builtin_mul_overflow_p with Clang
31961         Problem reported by Nelson H. F. Beebe for clang 9.0.1 in:
31962         https://lists.gnu.org/r/grep-devel/2020-09/msg00028.html
31963         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW_P) [__clang__]:
31964         Define to 0.
31965         * lib/xalloc-oversized.h (xalloc_oversized) [__clang__]:
31966         Do not use __builtin_mul_overflow_p.
31968         libc-config: port __THROW to Ubuntu 4
31969         * lib/cdefs.h (__THROW): Do not use __attribute__ ((__nothrow__))
31970         for GCC 3.3.  Problem reported by Jeffrey Walton in:
31971         https://lists.gnu.org/r/bug-gnulib/2019-07/msg00058.html
31972         The GCC 3.3.4 documentation says the attribute should work, but
31973         apparently it does not work on Ubuntu 4’s GCC 3.3.  There seems
31974         little point or desire to research this circa-2004 platform further,
31975         so just avoid the attribute there.
31977 2020-09-17  Jim Meyering  <meyering@fb.com>
31979         test-dfa-match.sh: port timeout work-around to newer Busybox
31980         * tests/test-dfa-match.sh: Update timeout -t portability test to
31981         accommodate Busybox 1.30.0 and newer.
31983 2020-09-16  Paul Eggert  <eggert@cs.ucla.edu>
31985         fnmatch: adjust to match glibc fix
31986         This fixes handling of collating symbols in fnmatch (glibc bug 26620).
31987         This does not affect Gnulib; it merely keeps Gnulib and glibc
31988         closer together, to help with any eventual merge, by incorporating
31989         a recent glibc patch.  The patch and the following commentary is
31990         by Andreas Schwab.
31991         * lib/fnmatch_loop.c (FCT) [WIDE_CHAR_VERSION]: The variable idx
31992         contains the index into the extra array, whereas wextra points
31993         into the extra array at this index, containing the length of the
31994         following collating sequence in the wide character representation.
31996 2020-09-16  Bruno Haible  <bruno@clisp.org>
31998         stat, fstat: Fix compilation error with old mingw headers.
31999         Reported by Eli Zaretskii <eliz@gnu.org> in
32000         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00027.html>.
32001         * lib/stat-w32.c (VOLUME_NAME_NONE): Define if the Windows headers don't
32002         define it.
32004 2020-09-16  Bruno Haible  <bruno@clisp.org>
32006         stat, fstat: Fix when compiling for versions older than Windows Vista.
32007         Reported by Eli Zaretskii <eliz@gnu.org> in
32008         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00027.html>.
32009         * lib/stat-w32.c: Include <sdkddkver.h>. Test the value of _WIN32_WINNT
32010         that was originally set before we redefined it.
32011         * m4/stat.m4 (gl_PREREQ_STAT_W32): New macro.
32012         (gl_PREREQ_STAT): Require it.
32013         * m4/fstat.m4 (gl_PREREQ_FSTAT): Likewise.
32015 2020-09-15  Paul Eggert  <eggert@cs.ucla.edu>
32017         dfa: remove dfa-heap-overrun workaround
32018         * lib/dfa.c (reorder_tokens): Go back to a single pass that
32019         both sets map[*] and does other things.  This reverts
32020         2020-09-14T01:20:01Z!eggert@cs.ucla.edu, which is no longer
32021         neeeded now that 2020-09-14T13:21:05Z!noritnk@kcn.ne.jp
32022         fixed the underlying problem.
32024 2020-09-13  Paul Eggert  <eggert@cs.ucla.edu>
32026         dfa: avoid use of uninitialized constraint
32027         * lib/dfa.c (merge_nfa_state): Do not initialize the constraint
32028         to zero here.
32029         (dfaoptimize): Do it here instead, via xcalloc.  This prevents the
32030         use of an uninitialized constraint by later code when ! (flags[i]
32031         & OPT_QUEUED) means merge_nfa_state was not called to initialize
32032         the constraint.  Problem found by running 'valgrind src/grep -E
32033         '(^| )*(a|b)*(c|d)*( |$)' < /dev/null' on Ubuntu 18.04.5 x86-64.
32035         dfa: assume C99 in reorder_tokens
32036         * lib/dfa.c (reorder_tokens): Assume C99 and simplify.
32038         dfa: fix dfa-heap-overrun failure
32039         * lib/dfa.c (reorder_tokens): When setting
32040         map[d->follows[i].elems[j].index], instead of incorrectly assuming
32041         that (i < d->follows[i].elems[j].index), use two loops, one to set
32042         the map array and the other to use it.  The incorrect assumption
32043         caused some elements to be missed, and this in turn caused grep's
32044         dfa-heap-overrun test to fail on Solaris 10 sparc when compiled
32045         with GCC.  I found this bug while investigating
32046         https://buildfarm.opencsw.org/buildbot/builders/ggrep-solaris10-sparc/builds/183
32047         and I think the bug also occurs on GNU/Linux but with more-subtle
32048         symptoms.  The bug predates the recent dfa.c changes; perhaps the
32049         recent changes make the bug more likely.
32051 2020-09-13  Bruno Haible  <bruno@clisp.org>
32053         parse-datetime: Make the build rule work with parallel 'make'.
32054         Reported by Daiki Ueno <ueno@gnu.org> in
32055         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00036.html>.
32056         * modules/parse-datetime (Makefile.am): Use a phony target and the
32057         general idiom for rules that produce multiple files.
32059 2020-09-13  Ben Pfaff  <blp@cs.stanford.edu>
32061         getpass: Check for nonnull prompt argument while avoiding warnings.
32062         * lib/getpass.c (_GL_ARG_NONNULL): Define to empty.
32063         (getpass) [!_WIN32]: Print prompt only if nonnull.
32065 2020-09-12  Paul Eggert  <eggert@cs.ucla.edu>
32067         dfa: epsilon-closure tweaks (Bug#40634)
32068         Rename BACKWORD to BACKWARD consistently.
32069         * lib/dfa.c (struct dfa): Reorder members to reduce fragmentation.
32070         (addtok_mb): Redo slightly to make it act more like a state machine.
32071         Check depth only when it increases.
32072         (epsclosure): Let the switch test the tokens.
32073         (dfaanalyze): Cache tindex.  Simplify position loops.
32074         Prefer xcalloc to xnmalloc + explicit zeroing.  Free BACKWARD
32075         only if it is not null, since we're testing that anyway.
32076         (dfaanalyze, build_state): Use merge2 instead of doing it by hand.
32078 2020-09-12  Norihiro Tanaka  <noritnk@kcn.ne.jp>
32080         dfa: use backward set in removal of epsilon closure
32081         When removing in epsilon closure, the code searched all nodes
32082         sequentially, and this was slow for some cases.  Build a backward
32083         set before search, and only check previous position with the set.
32084         Problem reported in <https://bugs.gnu.org/40634>.
32085         * lib/dfa.c (struct dfa): New member 'epsilon'.
32086         (addtok_mb): Check whether a pattern has epsilon node or not.
32087         (epsclosure): New arg BACKWORD; caller changed.  When removing
32088         epsilon node and reconnecting, check only previous positions.
32089         Treat BEG as if it were character.
32090         (dfaanalyze): Build backward set.
32092 2020-09-10  Paul Eggert  <eggert@cs.ucla.edu>
32094         canonicalize: fix pointer indexing bugs
32095         Problem reported by Florian Weimer in:
32096         https://lists.gnu.org/r/bug-gnulib/2020-09/msg00025.html
32097         * lib/canonicalize-lgpl.c (__realpath):
32098         * lib/canonicalize.c (canonicalize_filename_mode):
32099         Do not generate a pointer past the end of the array.
32100         * lib/canonicalize.c (canonicalize_filename_mode):
32101         Do not use a pointer after passing it to realloc.
32103 2020-09-09  Paul Eggert  <eggert@cs.ucla.edu>
32105         tempname: help merge with glibc
32106         Inspired by draft patches by Adhemerval Zanella in:
32107         https://sourceware.org/pipermail/libc-alpha/2020-September/117501.html
32108         https://sourceware.org/pipermail/libc-alpha/2020-September/117502.html
32109         * lib/tempname.c: Include stdalign.h, time.h.
32110         If _LIBC, do not include random-bits.h.
32111         (__getrandom, __clock_gettime64, __timespec64) [!_LIBC]: New macros.
32112         (RANDOM_BITS): Remove, replacing with ...
32113         (random_bits): ... this new static function.  All uses changed.
32114         Add entropy each time if getrandom is not supported.
32115         (RANDOM_VALUE, BASE_62_DIGITS, BASE_62_POWER):
32116         Assume 64-bit support a la C99.
32117         (try_tempname_len): Take advantage of ASLR when initializing
32118         random value.
32119         * modules/tempname (Depends-on): Add clock-time, stdalign, time.
32121         getcwd: merge recent glibc changes
32122         * lib/getcwd.c (GETCWD_RETURN_TYPE) [!_LIBC]: New macro.
32123         (__getcwd, getcwd) [_LIBC && !GETCWD_RETURN_TYPE]: Add aliases.
32125 2020-09-06  Bruno Haible  <bruno@clisp.org>
32127         attribute: Clarify which file to include.
32128         * modules/attribute (Include): Add "attribute.h".
32130 2020-09-06  Bruno Haible  <bruno@clisp.org>
32132         pipe-filter-ii, pipe-filter-gi: Fix warnings on native Windows.
32133         * lib/pipe-filter-ii.c: Include <process.h>.
32134         * lib/pipe-filter-gi.c: Likewise.
32136 2020-09-05  Paul Eggert  <eggert@cs.ucla.edu>
32138         verify: avoid __builtin_assume
32139         Our latest attempt to use Clang’s __builtin_assume caused a crash
32140         in GNU Emacs that we spent quite some time tracking down as being
32141         caused by the switch to __builtin_assume.  It’s not known whether
32142         the crash is due is a Clang bug or a portability bug in GNU Emacs.
32143         For now, play it safe and avoid __builtin_assume.
32144         * lib/verify.h (_GL_HAS_BUILTIN_ASSUME): Remove.
32145         (assume): Simplify by not trying to use Clang’s __builtin_assume.
32147 2020-09-05  Bruno Haible  <bruno@clisp.org>
32149         Fix several "warning: no previous prototype for function".
32150         * modules/unicase/locale-language (Makefile.am): Add a 'static' keyword
32151         in front of the declaration of the lookup function in
32152         unicase/locale-languages.h.
32153         * modules/unictype/bidiclass-byname (Makefile.am): Likewise in
32154         unictype/bidi_byname.h.
32155         * modules/unictype/category-byname (Makefile.am): Likewise in
32156         unictype/categ_byname.h.
32157         * modules/unictype/combining-class-byname (Makefile.am): Likewise in
32158         unictype/combiningclass_byname.h.
32159         * modules/unictype/joininggroup-byname (Makefile.am): Likewise in
32160         unictype/joininggroup_byname.h.
32161         * modules/unictype/joiningtype-byname (Makefile.am): Likewise in
32162         unictype/joiningtype_byname.h.
32163         * modules/unictype/property-byname (Makefile.am): Likewise in
32164         unictype/pr_byname.h.
32165         * modules/unictype/scripts (Makefile.am): Likewise in
32166         unictype/scripts_byname.h.
32167         * modules/uninorm/composition (Makefile.am): Likewise in
32168         uninorm/composition-table.h.
32170 2020-09-05  Bruno Haible  <bruno@clisp.org>
32172         select: Fix "warning: no previous prototype for function".
32173         * lib/select.c: Include <sys/select.h>.
32175 2020-09-05  Bruno Haible  <bruno@clisp.org>
32177         Use module 'c99' when needed for variadic macros with '...' syntax.
32178         * modules/crypto/sm3 (Depends-on): Add c99.
32180 2020-09-05  Bruno Haible  <bruno@clisp.org>
32182         Use module 'c99' when needed for subobject initializer syntax.
32183         * modules/tempname (Depends-on): Add c99.
32184         * modules/nstrftime-tests (Depends-on): Likewise.
32186 2020-09-05  Bruno Haible  <bruno@clisp.org>
32188         Use module 'c99' when needed for declaration-after-statement syntax.
32189         * modules/backup-rename (Depends-on): Add c99.
32190         * modules/backupfile (Depends-on): Likewise.
32191         * modules/bitset-tests (Depends-on): Likewise.
32192         * modules/bitsetv (Depends-on): Likewise.
32193         * modules/c-strtod (Depends-on): Likewise.
32194         * modules/c-strtold (Depends-on): Likewise.
32195         * modules/clean-temp (Depends-on): Likewise.
32196         * modules/copy-file (Depends-on): Likewise.
32197         * modules/crypto/hmac-md5-tests (Depends-on): Likewise.
32198         * modules/crypto/hmac-sha1-tests (Depends-on): Likewise.
32199         * modules/crypto/hmac-sha256-tests (Depends-on): Likewise.
32200         * modules/crypto/hmac-sha512-tests (Depends-on): Likewise.
32201         * modules/crypto/md5-buffer (Depends-on): Likewise.
32202         * modules/crypto/md5-tests (Depends-on): Likewise.
32203         * modules/crypto/sha1-buffer (Depends-on): Likewise.
32204         * modules/crypto/sha1-tests (Depends-on): Likewise.
32205         * modules/crypto/sha256-buffer (Depends-on): Likewise.
32206         * modules/crypto/sha256-tests (Depends-on): Likewise.
32207         * modules/crypto/sha512-buffer (Depends-on): Likewise.
32208         * modules/crypto/sha512-tests (Depends-on): Likewise.
32209         * modules/diffseq (Depends-on): Likewise.
32210         * modules/fatal-signal (Depends-on): Likewise.
32211         * modules/fchmodat (Depends-on): Likewise.
32212         * modules/fstrcmp (Depends-on): Likewise.
32213         * modules/fsusage (Depends-on): Likewise.
32214         * modules/fts (Depends-on): Likewise.
32215         * modules/fts-tests (Depends-on): Likewise.
32216         * modules/getumask (Depends-on): Likewise.
32217         * modules/git-merge-changelog (Depends-on): Likewise.
32218         * modules/hash-map (Depends-on): Likewise.
32219         * modules/hash-set (Depends-on): Likewise.
32220         * modules/lchmod (Depends-on): Likewise.
32221         * modules/libgmp-tests (Depends-on): Likewise.
32222         * modules/libtextstyle-optional-tests (Depends-on): Likewise.
32223         * modules/linkedhash-map (Depends-on): Likewise.
32224         * modules/linkedhash-set (Depends-on): Likewise.
32225         * modules/long-options (Depends-on): Likewise.
32226         * modules/mbrtoc32 (Depends-on): Likewise.
32227         * modules/memchr2-tests (Depends-on): Likewise.
32228         * modules/memmem-tests (Depends-on): Likewise.
32229         * modules/memrchr-tests (Depends-on): Likewise.
32230         * modules/mktime-internal (Depends-on): Likewise.
32231         * modules/nstrftime (Depends-on): Likewise.
32232         * modules/opendirat (Depends-on): Likewise.
32233         * modules/parse-datetime (Depends-on): Likewise.
32234         * modules/quotearg-simple-tests (Depends-on): Likewise.
32235         * modules/same (Depends-on): Likewise.
32236         * modules/supersede (Depends-on): Likewise.
32237         * modules/supersede-tests (Depends-on): Likewise.
32238         * modules/time_rz (Depends-on): Likewise.
32239         * modules/unistr/u16-chr-tests (Depends-on): Likewise.
32240         * modules/unistr/u32-chr-tests (Depends-on): Likewise.
32241         * modules/unistr/u8-chr-tests (Depends-on): Likewise.
32242         * modules/xalloc (Depends-on): Likewise.
32243         * modules/xnanosleep (Depends-on): Likewise.
32245 2020-09-05  Bruno Haible  <bruno@clisp.org>
32247         Fix "warning: array initialized from parenthesized string constant".
32248         * tests/test-memmem.c (main): Remove parentheses around string constant.
32249         * tests/test-c-strcasestr.c (main): Likewise.
32250         * tests/test-strcasestr.c (main): Likewise.
32252 2020-09-05  Bruno Haible  <bruno@clisp.org>
32254         argmatch tests: Fix ISO C compliance warning.
32255         * tests/test-argmatch.c: Omit semicolon after ARGMATCH_DEFINE_GROUP
32256         invocation.
32258 2020-09-05  Bruno Haible  <bruno@clisp.org>
32260         uniname/uniname: Fix -Wshadow warning.
32261         * lib/uniname/uniname.c (unicode_name_word): Don't declare i upfront.
32262         * modules/uniname/uniname (Depends-on): Add c99.
32264 2020-09-05  Bruno Haible  <bruno@clisp.org>
32266         uniname/uniname: Fix -Wshorten-64-to-32 warnings.
32267         * lib/uniname/uniname.c (unicode_name_word_lookup): Change type of last
32268         argument to size_t.
32269         (unicode_name_character): Change type of len, n1, n2, n3, words_length,
32270         n to size_t.
32272 2020-09-05  Bruno Haible  <bruno@clisp.org>
32274         unistr/u{8,16,32}-uctomb: Avoid possible trouble with huge strings.
32275         * lib/unistr.in.h (u8_uctomb_aux, u8_uctomb, u16_uctomb_aux, u16_uctomb,
32276         u32_uctomb): Change type of last argument to ptrdiff_t.
32277         * lib/unistr/u8-uctomb.c (u8_uctomb): Likewise.
32278         * lib/unistr/u8-uctomb-aux.c (u8_uctomb_aux): Likewise.
32279         * lib/unistr/u16-uctomb.c (u16_uctomb): Likewise.
32280         * lib/unistr/u16-uctomb-aux.c (u16_uctomb_aux): Likewise.
32281         * lib/unistr/u32-uctomb.c (u32_uctomb): Likewise.
32283 2020-09-01  Paul Eggert  <eggert@cs.ucla.edu>
32285         manywarnings: remove -Wchkp and -Wabi from C++ too
32286         Suggested by Reuben Thomas in:
32287         https://lists.gnu.org/r/bug-gnulib/2020-09/msg00001.html
32288         At some point somebody should merge the many other manywarnings-c.m4
32289         changes into manywarnings-c++.m4 too, e.g.,
32290         2020-07-02T00:00:51Z!eggert@cs.ucla.edu.
32291         * m4/manywarnings-c++.m4 (gl_MANYWARN_ALL_GCC_CXX_IMPL):
32292         Remove -Wchkp, -Wabi.
32294 2020-08-30  Bruno Haible  <bruno@clisp.org>
32296         strerrorname_np: Add tests.
32297         * tests/test-strerrorname_np.c: New file.
32298         * modules/strerrorname_np-tests: New file.
32300         strerrorname_np: New module.
32301         * lib/string.in.h (strerrorname_np): New declaration.
32302         * lib/strerrorname_np.c: New file.
32303         * m4/strerrorname_np.m4: New file.
32304         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Test whether strerrorname_np
32305         is declared.
32306         (gl_HEADER_STRING_H_DEFAULTS): Initialize GNULIB_STRERRORNAME_NP,
32307         HAVE_STRERRORNAME_NP, REPLACE_STRERRORNAME_NP.
32308         * modules/string (Makefile.am): Substitute GNULIB_STRERRORNAME_NP,
32309         HAVE_STRERRORNAME_NP, REPLACE_STRERRORNAME_NP.
32310         * modules/strerrorname_np: New file.
32311         * tests/test-string-c++.cc: Verify the signature of strerrorname_np.
32312         * doc/glibc-functions/strerrorname_np.texi: Mention the new module and
32313         the glibc 2.32 bug.
32315 2020-08-27  Paul Eggert  <eggert@cs.ucla.edu>
32317         perror, strerror_r: remove unportable tests
32318         Problem reported by Florian Weimer in:
32319         https://lists.gnu.org/r/bug-gnulib/2020-08/msg00220.html
32320         * tests/test-perror2.c (main):
32321         * tests/test-strerror_r.c (main): Omit unportable tests.
32323 2020-08-26  Bruno Haible  <bruno@clisp.org>
32325         stdint, wchar, wctype-h: Change configure message.
32326         * m4/wint_t.m4 (gt_TYPE_WINT_T): Say "checking whether wint_t is large
32327         enough..." instead of "checking whether wint_t is too small...".
32329 2020-08-26  Bruno Haible  <bruno@clisp.org>
32331         time_rz: Change configure message.
32332         * m4/time_rz.m4 (gl_TIME_RZ): Say "checking whether localtime works even
32333         near extrema..." instead of "checking whether localtime loops forever
32334         near extrema...".
32336 2020-08-26  Bruno Haible  <bruno@clisp.org>
32338         stdint: Change configure message.
32339         * m4/stdint.m4 (gl_STDINT_H): Say "checking whether stdint.h works
32340         without ISO C predefines..." instead of "checking whether stdint.h
32341         predates C++11...".
32343 2020-08-26  Bruno Haible  <bruno@clisp.org>
32345         socketlib: Change configure message.
32346         * m4/socketlib.m4 (gl_SOCKETLIB): Say "checking for WSAStartup..."
32347         instead of "checking if we need to call WSAStartup in winsock2.h and
32348         -lws2_32...".
32350 2020-08-26  Bruno Haible  <bruno@clisp.org>
32352         include_next: Change configure message.
32353         * m4/include_next.m4 (gl_INCLUDE_NEXT): Say "checking whether source
32354         code line length is unlimited..." instead of "checking whether system
32355         header files limit the line length...".
32357 2020-08-26  Bruno Haible  <bruno@clisp.org>
32359         getcwd: Change configure message.
32360         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Say "checking
32361         whether getcwd succeeds when 4k < cwd_length < 16k..." instead of
32362         "checking whether getcwd aborts when 4k < cwd_length < 16k...".
32364 2020-08-26  Bruno Haible  <bruno@clisp.org>
32366         chdir-long: Change configure message.
32367         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Say "checking whether this
32368         system supports file names of any length..." instead of "checking
32369         whether this system has an arbitrary file name length limit...".
32370         Set gl_cv_have_unlimited_file_name_length instead of
32371         gl_cv_have_arbitrary_file_name_length_limit.
32372         * modules/chdir-long (Depends-on, configure.ac): Update accordingly.
32374 2020-08-26  Bruno Haible  <bruno@clisp.org>
32376         ceill: Change configure message.
32377         * m4/ceill.m4 (gl_FUNC_CEILL): Say "checking whether ceill() works..."
32378         instead of "checking whether ceill() breaks with small values...".
32380 2020-08-26  Bruno Haible  <bruno@clisp.org>
32382         iconv: Change configure message.
32383         * m4/iconv.m4 (AM_ICONV): Say "checking whether iconv is compatible
32384         with its POSIX signature..." instead of "checking for iconv
32385         declaration...". Remove K&R C support.
32387 2020-08-26  Paul Eggert  <eggert@cs.ucla.edu>
32389         getcwd: help the merge back into glibc
32390         This patch was inspired by Adhemerval Zanella’s proposed glibc patches:
32391         https://sourceware.org/pipermail/libc-alpha/2020-August/117294.html
32392         The idea is to make it easier for Gnulib lib/getcwd.c to match
32393         glibc io/getcwd-generic.c.
32394         * lib/getcwd.c [_LIBC]: Do not include pathmax.h.
32395         Include not-cancel.h.
32396         (HAVE_OPENAT, D_INO_IN_DIRENT, HAVE_MSVC_INVALID_PARAMETER_HANDLER)
32397         (HAVE_MINIMALLY_WORKING_GETCWD): Define for the _LIBC case.
32398         (__getcwd, __lstat, __readdir) [!_LIBC]: Remove these macros.
32399         (__close_nocancel_nostatus, __getcwd_generic, stat64, __fstat64)
32400         (__fstatat64, __lstat64, __readdir64, __fdopendir, __openat)
32401         (__rewinddir, __openat64, dirent64) [_LIBC]: New macros.
32402         (__getcwd_generic): Rename from __getcwd.
32403         Use the abovementioned macros for consistency with glibc.
32404         (weak_alias): Remove.
32406 2020-08-25  Bruno Haible  <bruno@clisp.org>
32408         verify: Avoid warnings when assume(0) is used.
32409         Reported by Mattias Engdegård <mattiase@acm.org> via Paul Eggert in
32410         <https://lists.gnu.org/archive/html/emacs-devel/2020-08/msg00838.html>.
32411         * lib/verify.h (assume): Use __builtin_unreachable if the argument is
32412         the constant 0.
32413         * tests/test-verify.c (f): New function.
32414         (state): New type.
32415         (test_assume_expressions, test_assume_optimization,
32416         test_assume_noreturn): New functions.
32418 2020-08-25  Bruno Haible  <bruno@clisp.org>
32420         fstrcmp: Clarification regarding NOTE_ORDERED.
32421         * lib/fstrcmp.c (NOTE_ORDERED): Define to false.
32423 2020-08-24  Paul Eggert  <eggert@cs.ucla.edu>
32425         diffseq: new option NOTE_ORDERED
32426         Problem reported by Phil Sainty <https://bugs.gnu.org/42931>.
32427         * NEWS: Mention this.
32428         * lib/diffseq.h (NOTE_ORDERED): New macro.
32429         (IF_LINT2): Remove; no longer needed.
32430         (compareseq): If (!NOTE_ORDERED), recurse on the smaller
32431         subproblem and iterate to do the larger.
32433 2020-08-23  Paul Eggert  <eggert@cs.ucla.edu>
32435         sys_types: let Autoconf 2.70 do pid_t
32436         * m4/pid_t.m4 (AC_TYPE_PID_T): Redefine this Autoconf macro
32437         only for Autoconf versions 2.69 and earlier, since 2.70
32438         will be fixed.
32440 2020-08-23  Bruno Haible  <bruno@clisp.org>
32442         tests: Don't assume that pid_t fits in an 'int'.
32443         * tests/test-nonblocking-pipe-main.c (main): Use type 'pid_t' instead
32444         of 'int'.
32445         * tests/test-nonblocking-socket-main.c (main): Likewise.
32447         sys_types: Fix definition of pid_t on 64-bit MSVC.
32448         * m4/pid_t.m4: New file.
32449         * modules/sys_types (Files): Add it.
32450         * modules/dirent (Files): Likewise.
32451         * modules/fcntl-h (Files): Likewise.
32452         * modules/sched (Files): Likewise.
32453         * modules/signal-h (Files): Likewise.
32454         * modules/spawn (Files): Likewise.
32455         * modules/sys_stat (Files): Likewise.
32456         * modules/sys_wait (Files): Likewise.
32457         * modules/termios (Files): Likewise.
32458         * modules/unistd (Files): Likewise.
32460 2020-08-23  Bruno Haible  <bruno@clisp.org>
32462         inttypes: Fix {PRI,SCN}*PTR on 32-bit native Windows (regr. 2020-07-21).
32463         * m4/inttypes.m4 (gl_INTTYPES_PRI_SCN): Fix syntax error in test
32464         program.
32466 2020-08-23  Paul Eggert  <eggert@cs.ucla.edu>
32468         intprops: be consistent about +X vs X+0
32469         * lib/intprops.h (_GL_SIGNED_INT_MAXIMUM): Simplify.
32471         intprops: fix INT_MULTIPLY_WRAPV bit-field bug
32472         The bug occurs when using INT_MULTIPLY_WRAPV (a, b, c) where B
32473         is a bit-field, on older GCC or non-GCC compilers where we do
32474         things ourselves instead of using __builtin_mul_overflow.
32475         Without this fix, INT_MULTIPLY_WRAPV would not compile, due
32476         to applying sizeof to a bit-field.
32477         * lib/intprops.h (_GL_INT_MULTIPLY_RANGE_OVERFLOW):
32478         Promote B before giving it to TYPE_WIDTH, in case B is a bit-field.
32480 2020-08-23  Bruno Haible  <bruno@clisp.org>
32482         supersede: Avoid a failure when writing to /dev/null in Solaris zones.
32483         Reported by Jörg Sonnenberger <joerg@netbsd.org>
32484         via Thomas Klausner <tk@giga.or.at> in
32485         <https://pkgsrc.se/files.php?messageId=20200812233110.30230FB28@cvs.NetBSD.org>.
32486         * lib/supersede.c (open_supersede): When opening an existing non-regular
32487         file on Solaris, use O_CREAT although it should not be necessary.
32489 2020-08-23  Bruno Haible  <bruno@clisp.org>
32491         verify: Make assume work on bit field expressions (regr. 2020-08-22).
32492         Reported by Benno Schulenberg <bensberg@telfort.nl> in
32493         <https://lists.gnu.org/archive/html/bug-gnulib/2020-08/msg00202.html>.
32494         * lib/verify.h (assume): Use '_Bool' or 'bool' as type of the temporary
32495         variable.
32497 2020-08-23  Bruno Haible  <bruno@clisp.org>
32499         libc-config: Improve comments.
32500         * lib/cdefs.h (__warndecl, __warnattr, __errordecl): Explain why we
32501         cannot use clang's __diagnose_if__ here.
32503 2020-08-22  Bruno Haible  <bruno@clisp.org>
32505         verify: Do use __builtin_assume on clang.
32506         * lib/verify.h (assume): Use clang’s __builtin_assume, with a temporary
32507         variable in a statement expression.
32509 2020-08-22  Bruno Haible  <bruno@clisp.org>
32511         sig2str: Add more signals.
32512         * lib/sig2str.c (numname_table): Add SIGCPUFAIL, SIGTHR, SIGBREAK.
32514 2020-08-22  Bruno Haible  <bruno@clisp.org>
32516         doc: Update for OpenBSD 6.0, 6.7.
32517         * doc/*/*.texi: Update.
32518         * m4/printf.m4: Update comments and cross-compilation guesses.
32519         * m4/ceill.m4: Update comments.
32520         * m4/getcwd-abort-bug.m4: Likewise.
32521         * m4/ilogb.m4: Likewise.
32522         * m4/ilogbf.m4: Likewise.
32523         * m4/langinfo_h.m4: Likewise.
32524         * m4/modf.m4: Likewise.
32525         * m4/modff.m4: Likewise.
32527 2020-08-22  Bruno Haible  <bruno@clisp.org>
32529         doc: Mention sig2str module.
32530         * doc/glibc-functions/sigabbrev_np.texi: Mention the sig2str module.
32532 2020-08-21  Bruno Haible  <bruno@clisp.org>
32534         sigdescr_np: Add tests.
32535         * tests/test-sigdescr_np.c: New file.
32536         * modules/sigdescr_np-tests: New file.
32538         sigdescr_np: New module.
32539         * lib/string.in.h (sigdescr_np): New declaration.
32540         * lib/sigdescr_np.c: New file.
32541         * m4/sigdescr_np.m4: New file.
32542         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Test whether sigdescr_np is
32543         declared.
32544         (gl_HEADER_STRING_H_DEFAULTS): Initialize GNULIB_SIGDESCR_NP,
32545         HAVE_SIGDESCR_NP.
32546         * modules/string (Makefile.am): Substitute GNULIB_SIGDESCR_NP,
32547         HAVE_SIGDESCR_NP.
32548         * modules/sigdescr_np: New file.
32549         * tests/test-string-c++.cc: Verify the signature of sigdescr_np.
32550         * doc/glibc-functions/sigdescr_np.texi: Mention the new module.
32552 2020-08-20  Bruno Haible  <bruno@clisp.org>
32554         sigabbrev_np: Add tests.
32555         * tests/test-sigabbrev_np.c: New file.
32556         * modules/sigabbrev_np-tests: New file.
32558         sigabbrev_np: New module.
32559         * lib/string.in.h (sigabbrev_np): New declaration.
32560         * lib/sigabbrev_np.c: New file.
32561         * m4/sigabbrev_np.m4: New file.
32562         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Test whether sigabbrev_np is
32563         declared.
32564         (gl_HEADER_STRING_H_DEFAULTS): Initialize GNULIB_SIGABBREV_NP,
32565         HAVE_SIGABBREV_NP.
32566         * modules/string (Makefile.am): Substitute GNULIB_SIGABBREV_NP,
32567         HAVE_SIGABBREV_NP.
32568         * modules/sigabbrev_np: New file.
32569         * tests/test-string-c++.cc: Verify the signature of sigabbrev_np.
32570         * doc/glibc-functions/sigabbrev_np.texi: Mention the new module.
32572 2020-08-20  Bruno Haible  <bruno@clisp.org>
32574         stdalign tests: Skip test with AIX xlclang.
32575         * tests/test-stdalign.c (main): Skip alignas tests with AIX xlclang.
32577 2020-08-20  Bruno Haible  <bruno@clisp.org>
32579         stdalign: Fix test failures on 32-bit platforms with clang versions < 8.
32580         * lib/stdalign.in.h (_Alignof): For clang versions < 8, use the same
32581         workaround as for GCC versions < 4.9.
32583 2020-08-20  Siddhesh Poyarekar  <siddhesh@gotplt.org>
32585         Sync up ProjectQuirks comments and documentation
32586         Transform the ProjectQuirks comments into a docstring so that it can
32587         be accessed from python as ProjectQuirks.__doc__ and harmonize
32588         descriptions with the documentation.
32589         * build-aux/vcstocl/projectquirks.py (ProjectQuirks):
32590         Transform comments into a docstring.
32591         * doc/vcs-to-changelog.texi: Sync up description with comments.
32593         Split ProjectQuirks out into its own file
32594         ProjectQuirks is used by external quirks files and importing it from
32595         vcs-to-changelog.py is broken since it was renamed to use hyphens.  It
32596         is cleaner to put it in its own file anyway.
32597         * build-aux/vcstocl/projectquirks.py: A new file...
32598         * build-aux/vcs-to-changelog.py (ProjectQuirks): ...to which
32599         we move ProjectQuirks and import the file.
32601 2020-08-19  Bruno Haible  <bruno@clisp.org>
32603         uchar: Fix compilation errors in C++ mode on macOS.
32604         * m4/uchar.m4 (gl_UCHAR_H): Require gl_ANSI_CXX if present. Include some
32605         system header file before attempting to use 'char16_t' and 'char32_t'.
32607 2020-08-19  Bruno Haible  <bruno@clisp.org>
32609         ansi-c++-opt: Work around an autoconf macro reordering problem.
32610         * modules/ansi-c++-opt: Require gl_ANSI_CXX already in the early
32611         section.
32613 2020-08-19  Bruno Haible  <bruno@clisp.org>
32615         math C++ tests: Fix compilation error in with GCC 10.
32616         * lib/math.in.h (cbrt, ceil, copysign, exp2, expm1, floor, fma, fmod,
32617         hypot, ilogb, log, log10, log1p, log2, logb, modf, remainder, rint,
32618         round, trunc): Use _GL_CXXALIASWARN1 instead of _GL_CXXALIASWARN.
32620 2020-08-19  Bruno Haible  <bruno@clisp.org>
32622         uchar: Fix compilation errors in C++ mode on OpenBSD.
32623         * lib/uchar.in.h (char16_t, char32_t): Don't define in C++ mode if
32624         CXX_HAS_UCHAR_TYPES is 1.
32625         * m4/uchar.m4 (gl_UCHAR_H): Determine whether the C++ compiler
32626         predefines char16_t and char32_t. Substitute CXX_HAS_UCHAR_TYPES.
32627         * modules/uchar (Makefile.am): Substitute CXX_HAS_UCHAR_TYPES.
32629 2020-08-19  Bruno Haible  <bruno@clisp.org>
32631         Fix compilation errors in C++ mode on OpenBSD.
32632         * lib/math.in.h (isfinite, isinf, isnan, signbit): In C++ mode on
32633         OpenBSD with clang, use the approach without C preprocessor macro.
32635 2020-08-18  Bruno Haible  <bruno@clisp.org>
32637         uchar C++ tests: Fix side effect on math modules (regr. 2020-08-17).
32638         * modules/uchar-c++-tests (configure.ac): Don't use AC_LANG_PUSH and
32639         AC_LANG_POP.
32641 2020-08-17  Paul Eggert  <eggert@cs.ucla.edu>
32643         verify: avoid __built_assume on Clang
32644         * lib/verify.h (assume): Do not use Clang’s __builtin_assume, as
32645         Clang 9 incorrectly diagnoses arguments as having side effects
32646         even when they do not.  I guess Clang 9 considers any function
32647         call as if it had a side effect here.
32649         libc-config: avoid Clang’s __diagnose_if__
32650         * lib/cdefs.h (__warndecl, __warnattr, __errordecl):
32651         For now, do not use __diagnose_if__ here, as this fails
32652         on Fedora 31 with Clang 9.0.1, with diagnostic
32653         "/usr/include/bits/stdio2.h:263:9: error: fgets called with bigger
32654         size than length of destination buffer
32655         [-Werror,-Wuser-defined-warnings]".  I guess Clang 9 warns even
32656         for functions that are not called?
32658         careadlinkat: speedup for GCC 10 with GCC_LINT
32659         Inspired by a suggestion by Bruno Haible in:
32660         https://lists.gnu.org/r/bug-gnulib/2020-08/msg00155.html
32661         * lib/careadlinkat.c (STACK_BUF_SIZE): New constant.
32662         (readlink_stk): New function, with most of the old careadlinkat
32663         contents and with a new STACK_BUF arg.  Inline it in GCC 10
32664         if GCC_LINT.
32665         (careadlinkat): Use the new function for everything but the
32666         stack buffer.
32668         * build-aux/gcc-warning.spec: Update comments.
32670 2020-08-17  Bruno Haible  <bruno@clisp.org>
32672         Assume autoconf >= 2.64.
32673         * m4/std-gnu11.m4 (AC_PROG_CC, AC_PROG_CXX): Use _AC_DO_LIMIT always.
32675 2020-08-17  Bruno Haible  <bruno@clisp.org>
32677         Revert autoupdate's revert.
32678         * config/srclist.txt: Mark regcomp.c as needing sync with glibc.
32680 2020-08-17  Bruno Haible  <bruno@clisp.org>
32682         uchar C++ tests: Fix build error on FreeBSD 12.
32683         * modules/uchar-c++-tests (configure.ac): Test whether <cuchar> exists.
32684         (Makefile.am): Don't include test-uchar-c++2.cc in the compilation if
32685         <cuchar> does not exist.
32687 2020-08-16  Paul Eggert  <eggert@cs.ucla.edu>
32689         time_rz: remove unused functions
32690         * lib/time_rz.c (isdst_differ, equal_tm): Remove; no longer used.
32692         time_rz: fix issues with mktime_z failures
32693         * lib/time_rz.c (mktime_z): Do not update *TM if revert_tz fails.
32694         Use a cheaper tm_yday test for failed mktime.
32696 2020-08-16  Bruno Haible  <bruno@clisp.org>
32698         intprops test: Strengthen on clang.
32699         * tests/test-intprops.c (VERIFY): Use verify_stmt.
32701 2020-08-16  Bruno Haible  <bruno@clisp.org>
32703         nstrftime: Guide inlining also on clang.
32704         * lib/nstrftime.c (iso_week_days): Inline also on clang.
32706 2020-08-16  Bruno Haible  <bruno@clisp.org>
32708         intprops: Avoid bogus "warning: division by zero is undefined" on clang.
32709         * lib/intprops.h (_GL__GENERIC_BOGUS): Define to 1 on clang.
32711 2020-08-16  Bruno Haible  <bruno@clisp.org>
32713         log2l: Disable MSVC workaround on clang.
32714         * lib/log2l.c (log2l): On clang, use the expression 0.0L/0.0L.
32716 2020-08-16  Bruno Haible  <bruno@clisp.org>
32718         argp: Emit a warning also with clang.
32719         * lib/argp-help.c (__argp_short_program_name): Use #warning also on
32720         clang.
32722 2020-08-16  Bruno Haible  <bruno@clisp.org>
32724         libc-config: Enable __REDIRECT macro also on clang.
32725         * lib/cdefs.h (__REDIRECT, __REDIRECT_NTH, __REDIRECT_NTHNL, __ASMNAME,
32726         __ASMNAME2): Define on clang like on GCC.
32728 2020-08-16  Bruno Haible  <bruno@clisp.org>
32730         regex: Use initializer shorthand syntax also with clang.
32731         * lib/regcomp.c (utf8_sb_map): Use the initializer shorthand syntax also
32732         with clang.
32734 2020-08-16  Bruno Haible  <bruno@clisp.org>
32736         regex: Use space optimization also with clang.
32737         * lib/regex_internal.h (re_token_t): Use a single byte for the type also
32738         with clang.
32740 2020-08-16  Bruno Haible  <bruno@clisp.org>
32742         Use _Static_assert and static_assert primitives when present on clang.
32743         * lib/cdefs.h (_Static_assert): Don't define as a macro on clang.
32744         * lib/verify.h (_GL_HAVE__STATIC_ASSERT, _GL_HAVE__STATIC_ASSERT1,
32745         _GL_HAVE_STATIC_ASSERT1): Define as appropriate on clang.
32747 2020-08-16  Bruno Haible  <bruno@clisp.org>
32749         Use 'throw ()' for optimization in C++ mode also on clang.
32750         * lib/cdefs.h (__THROW): Define to 'throw ()' also on clang.
32751         * lib/getopt-cdefs.in.h (__THROW): Likewise.
32752         * lib/md5.h (__THROW): Likewise.
32754 2020-08-16  Bruno Haible  <bruno@clisp.org>
32756         absolute-header: Add support for clang.
32757         * modules/absolute-header (Makefile.am): Include '__clang__' in the
32758         HAVE_INCLUDE_NEXT expression.
32760 2020-08-16  Bruno Haible  <bruno@clisp.org>
32762         Fix "warning: implicitly declaring library function 'strcasecmp'".
32763         * lib/argp-help.c: Include <strings.h>.
32765 2020-08-16  Bruno Haible  <bruno@clisp.org>
32767         stdio: Don't break attribute 'scanf' on clang.
32768         * lib/stdio.in.h (scanf): Treat clang like GCC.
32770 2020-08-16  Bruno Haible  <bruno@clisp.org>
32772         Use __restrict also on clang.
32773         * lib/argp.h (__restrict): Don't define as a macro on clang >= 3.
32774         * lib/glob.in.h (_Restrict_): Use __restrict on clang >= 3.
32775         * lib/unitypes.in.h (_UC_RESTRICT): Likewise.
32777 2020-08-16  Bruno Haible  <bruno@clisp.org>
32779         pthread-spin: Use GCC built-ins also on clang.
32780         * lib/pthread-spin.c (pthread_spin_init, pthread_spin_lock,
32781         pthread_spin_trylock, pthread_spin_unlock): Use the newer GCC built-ins
32782         also on clang.
32784 2020-08-16  Bruno Haible  <bruno@clisp.org>
32786         asyncsafe-spin tests: Update.
32787         * tests/test-asyncsafe-spin2.c: Update to match the change in
32788         lib/asyncsafe-spin.c from 2020-08-11.
32790 2020-08-16  Bruno Haible  <bruno@clisp.org>
32792         setenv: Use tree code also with clang.
32793         * lib/setenv.c (USE_TSEARCH): Treat clang like GCC.
32795 2020-08-16  Bruno Haible  <bruno@clisp.org>
32797         math: Optimize signbit also on clang.
32798         * lib/math.in.h (gl_signbitf, gl_signbitd, gl_signbitl): Optimize also
32799         on clang.
32801 2020-08-16  Bruno Haible  <bruno@clisp.org>
32803         avltreehash-list, rbtreehash-list: Optimize also on clang.
32804         * lib/gl_anytreehash_list1.h (add_nodes_to_buckets): Use
32805         __builtin_expect also on clang.
32807 2020-08-16  Bruno Haible  <bruno@clisp.org>
32809         Fix "warning: 'WSASocketA' is deprecated: Use WSASocketW() instead".
32810         * lib/socket.c: Use WSASocketW, not WSASocketA.
32812         Fix "warning: format specifies type 'unsigned long'".
32813         * tests/test-nonblocking-writer.h (main_writer_loop): Cast dbgfprintf
32814         argument to match the format directive.
32816         Fix "warning: no case matching constant switch condition '0'".
32817         * tests/test-fcntl.c (check_flags): Add a 'default' case.
32819         Fix "warning: integer overflow in expression".
32820         * tests/test-strtol.c (main): Use an 'unsigned long' expression to
32821         remove a 'long' overflow.
32823         Fix "warning: "getpagesize" redefined".
32824         * tests/test-getcwd.c (getpagesize): Don't redefine if defined as a
32825         macro.
32827         Fix "warning: implicitly declaring library function 'strncasecmp'".
32828         * lib/strptime.c: Include <strings.h>.
32830         Fix "warning: 'snprintf' macro redefined".
32831         * lib/strerror_r.c (snprintf): Undefine before redefining.
32833         Fix "warning: address of array 'locale' will always evaluate to 'true'".
32834         * lib/nl_langinfo.c (ctype_codeset): Remove redundant NULL test.
32836         Fix "warning: '__stat64' macro redefined".
32837         * lib/glob.c (__stat64): Undefine also on MSVC/clang.
32839         Fix "warning: 'format' attribute argument not supported: rpl_printf".
32840         * lib/stdio.in.h (printf): Treat clang like GCC.
32842         Fix "warning: attribute declaration must precede definition" with clang.
32843         * lib/math.in.h (acosl, asinl, atanl, ceill, cosl, expl, fabsf, fabsl,
32844         floorl, fmodl, frexpf, frexpl, hypotf, hypotl, ldexpf, ldexpl, logl,
32845         log10l, modfl, sinl, sqrtl, tanl): Disable _GL_CXXALIASWARN invocation
32846         on non-glibc systems.
32847         * lib/netdb.in.h (gai_strerror): Likewise.
32848         * lib/stdio.in.h (snprintf, vfscanf, vscanf, vsnprintf): Likewise.
32849         * lib/sys_stat.in.h (fstat): Likewise.
32850         * lib/utime.in.h (utime): Likewise.
32852         Fix undesired warnings.
32853         * lib/sys_select.in.h: Disable all _GL_WARN_ON_USE invocations with
32854         clang.
32856 2020-08-16  Bruno Haible  <bruno@clisp.org>
32858         C++ tests: Fix link errors on MSVC (regression from 2020-05-31).
32859         * modules/stdio-c++-tests (Makefile.am): Link test-stdio-c++ with
32860         $(LIB_GETRANDOM), needed for the rpl_tmpfile symbol.
32861         * modules/stdlib-c++-tests (Makefile.am): Link test-stdlib-c++ with
32862         $(LIB_GETRANDOM), needed for the mkdtemp and mkstemp symbols.
32864 2020-08-16  Bruno Haible  <bruno@clisp.org>
32866         Don't use Autoconf quadrigraphs.
32867         * m4/alloca.m4 (_AC_LIBOBJ_ALLOCA): Use '#' instead of the corresponding
32868         Autoconf quadrigraph.
32869         * m4/free.m4 (gl_FUNC_FREE): Likewise.
32870         * m4/getloadavg.m4 (gl_PREREQ_GETLOADAVG): Likewise.
32871         * m4/largefile.m4 (_AC_SYS_LARGEFILE_TEST_INCLUDES,
32872         _AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
32873         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
32874         * m4/math_h.m4 (gl_MATH_H): Likewise.
32875         * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Likewise.
32877 2020-08-16  Bruno Haible  <bruno@clisp.org>
32879         Fix quoting of AC_LANG_PROGRAM arguments.
32880         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Quote the AC_LANG_PROGRAM
32881         arguments through [[...]].
32882         * m4/fpending.m4 (gl_FUNC_FPENDING): Likewise.
32883         * m4/fpurge.m4 (gl_FUNC_FPURGE): Likewise.
32884         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Likewise.
32885         * m4/ld-output-def.m4 (gl_LD_OUTPUT_DEF): Likewise.
32886         * m4/ld-version-script.m4 (gl_LD_VERSION_SCRIPT): Likewise.
32887         * m4/linkat.m4 (gl_FUNC_LINKAT): Likewise.
32888         * m4/mountlist.m4 (gl_MOUNTLIST): Likewise.
32889         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H): Likewise.
32890         * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Likewise.
32891         * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Likewise.
32892         * m4/warnings.m4 (gl_COMPILER_OPTION_IF): Likewise.
32893         * m4/wcstok.m4 (gl_FUNC_WCSTOK): Likewise.
32894         * m4/wctype_h.m4 (gl_WCTYPE_H): Likewise.
32896 2020-08-16  Bruno Haible  <bruno@clisp.org>
32898         Assume autoconf >= 2.64.
32899         * gnulib-tool (DEFAULT_AUTOCONF_MINVERSION): Set to 2.64.
32900         * DEPENDENCIES: Require Autoconf 2.64 or newer.
32901         * NEWS: Mention the changed requirement.
32902         * m4/00gnulib.m4 (_m4_divert_diversion, AC_DEFUN_ONCE): Remove macros.
32903         * m4/gnulib-common.m4 (AS_VAR_IF, AS_VAR_COPY): Remove macros.
32904         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Quote pushdef'ed
32905         variables.
32906         * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Likewise.
32907         * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Likewise.
32908         * m4/warnings.m4 (gl_COMPILER_OPTION_IF): Likewise.
32909         (gl_UNKNOWN_WARNINGS_ARE_ERRORS(C), gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++),
32910         gl_UNKNOWN_WARNINGS_ARE_ERRORS(Objective C)): Define through AC_DEFUN.
32911         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C), gl_MANYWARN_ALL_GCC(C++)):
32912         Likewise.
32913         * m4/iconv.m4 (AM_ICONV): Define through AC_DEFUN_ONCE directly.
32914         * m4/libunistring.m4 (gl_LIBUNISTRING): Likewise.
32915         * m4/configmake.m4: Update comment.
32917 2020-08-16  Bruno Haible  <bruno@clisp.org>
32919         sys_ioctl: Simplify.
32920         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H): Remove confusing use of
32921         AC_INCLUDES_DEFAULT.
32923 2020-08-16  Bruno Haible  <bruno@clisp.org>
32925         Fix quoting of AC_LANG_SOURCE arguments.
32926         * m4/printf.m4 (gl_PRINTF_ENOMEM): Fix an m4 quoting bug in the
32927         GL_NOCRASH expansion.
32928         * m4/locale-ar.m4 (gt_LOCALE_AR): Simplify m4 quoting.
32929         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Likewise.
32930         * m4/locale-ja.m4 (gt_LOCALE_JA): Likewise.
32931         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise.
32932         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
32934 2020-08-15  Paul Eggert  <eggert@cs.ucla.edu>
32936         nstrftime: be more predictable about errno
32937         This aligns nstrftime better with draft POSIX 202x strftime.
32938         * lib/nstrftime.c: Include errno.h.
32939         (width_add, __strftime_internal): Set errno on failure,
32940         and preserve it on success.  Check for mktime_z failure.
32941         * modules/nstrftime (Depends-on): Add errno.
32942         * modules/nstrftime-tests (Depends-on): Add atoll, intprops.
32943         * tests/test-nstrftime.c: Include intprops.h, limits.h.
32944         (errno_test): New test function.
32945         (main): Call it.
32947 2020-08-15  Bruno Haible  <bruno@clisp.org>
32949         canonicalize: Fix a problem of the autoconf test on MSVC/clang.
32950         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Remove undesired file
32951         from dependency analysis first.
32953 2020-08-15  Bruno Haible  <bruno@clisp.org>
32955         Determine asm output option and filename suffix for MSVC/clang.
32956         * m4/asm-underscore.m4 (gl_C_ASM): Distinguish clang from cl and
32957         clang-cl.
32959 2020-08-15  Bruno Haible  <bruno@clisp.org>
32961         doc: Update for MSVC/clang.
32962         * doc/*-functions/*printf.texi: Mention that MSVC/clang has two bugs
32963         that MSVC 14 does not have.
32965 2020-08-15  Bruno Haible  <bruno@clisp.org>
32967         Revert autoupdate's revert.
32968         * config/srclist.txt: Mark mktime.c as needing sync with glibc.
32970 2020-08-15  Bruno Haible  <bruno@clisp.org>
32972         frexpl: Fix configuration test result on MSVC.
32973         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Avoid a division by a constant
32974         zero.
32976 2020-08-15  Bruno Haible  <bruno@clisp.org>
32978         Support compiling without -loldnames on native Windows.
32979         * m4/gnulib-common.m4 (GL_MDA_DEFINES, _GL_MDA_DEFINES): New macros.
32980         * m4/chown.m4 (AC_FUNC_CHOWN): In the test programs, use GL_MDA_DEFINES.
32981         (gl_FUNC_CHOWN, gl_FUNC_CHOWN_FOLLOWS_SYMLINK): Likewise.
32982         * m4/dup.m4 (gl_FUNC_DUP): Likewise.
32983         * m4/dup2.m4 (gl_FUNC_DUP2): Likewise.
32984         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
32985         * m4/fchmodat.m4 (gl_FUNC_FCHMODAT): Likewise.
32986         * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG): Likewise.
32987         * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Likewise.
32988         * m4/fcntl.m4 (gl_FUNC_FCNTL): Likewise.
32989         * m4/fdopen.m4 (gl_FUNC_FDOPEN): Likewise.
32990         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Likewise.
32991         * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): Likewise.
32992         * m4/fopen.m4 (gl_FUNC_FOPEN_GNU): Likewise.
32993         * m4/freopen.m4 (gl_FUNC_FREOPEN): Likewise.
32994         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Likewise.
32995         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise.
32996         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
32997         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL, gl_FUNC_GETCWD_SIGNATURE):
32998         Likewise.
32999         * m4/getdtablesize.m4 (gl_FUNC_GETDTABLESIZE): Likewise.
33000         * m4/linkat.m4 (gl_FUNC_LINKAT): Likewise.
33001         * m4/lseek.m4 (gl_FUNC_LSEEK): Likewise.
33002         * m4/mkdir.m4 (gl_FUNC_MKDIR): Likewise.
33003         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Likewise.
33004         * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Likewise.
33005         * m4/open-slash.m4 (gl_OPEN_TRAILING_SLASH_BUG): Likewise.
33006         * m4/poll.m4 (gl_FUNC_POLL): Likewise.
33007         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): Likewise.
33008         * m4/pread.m4 (gl_FUNC_PREAD): Likewise.
33009         * m4/pselect.m4 (gl_FUNC_PSELECT): Likewise.
33010         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Likewise.
33011         * m4/ptsname_r.m4 (gl_PREREQ_PTSNAME_R): Likewise.
33012         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
33013         * m4/pwrite.m4 (gl_FUNC_PWRITE): Likewise.
33014         * m4/rename.m4 (gl_FUNC_RENAME): Likewise.
33015         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
33016         * m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise.
33017         * m4/select.m4 (gl_FUNC_SELECT): Likewise.
33018         * m4/setenv.m4 (gl_FUNC_UNSETENV): Likewise.
33019         * m4/strncat.m4 (gl_FUNC_STRNCAT): Likewise.
33020         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Likewise.
33021         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
33022         * m4/unlink.m4 (gl_FUNC_UNLINK): Likewise.
33023         * m4/utimens.m4 (gl_UTIMENS): Likewise.
33024         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Likewise.
33025         * m4/utimes.m4 (gl_FUNC_UTIMES): Likewise.
33026         * m4/canonicalize.m4 (gl_CANONICALIZE_LGPL): On native Windows, don't
33027         test for getcwd.
33028         * m4/utime.m4 (gl_FUNC_UTIME): On native Windows, don't test for utime.
33029         * m4/wcsdup.m4 (gl_FUNC_WCSDUP): To test for wcsdup, use a test program
33030         with GL_MDA_DEFINES.
33031         * lib/c++defs.h (_GL_CXXALIAS_MDA): New macro.
33032         * lib/fcntl.in.h (creat, open):  On native Windows, use the underscore-
33033         prefixed symbol.
33034         * lib/search.in.h (lfind, lsearch): Likewise.
33035         * lib/stdio.in.h (fcloseall, fdopen, fileno, getw, putw, tempnam):
33036         Likewise.
33037         * lib/stdlib.in.h (ecvt, fcvt, gcvt, mktemp, putenv): Likewise.
33038         * lib/string.in.h (memccpy, strdup): Likewise.
33039         * lib/sys_stat.in.h (chmod, umask): Likewise.
33040         * lib/time.in.h (tzset): Likewise.
33041         * lib/unistd.in.h (access, chdir, close, dup, dup2, execl, execle,
33042         execlp, execv, execve, execvp, execvpe, getcwd, getpid, isatty, lseek,
33043         read, rmdir, swab, unlink, write): Likewise.
33044         * lib/utime.in.h (utime): Likewise.
33045         * lib/wchar.in.h (wcsdup): Likewise.
33046         * lib/math.in.h (j0, j1, jn, y0, y1, yn):  Likewise.
33047         (isfinite, isinf, isnan, signbit): On native Windows, don't define as an
33048         rpl_-prefixed macro.
33049         * lib/canonicalize-lgpl.c (__getcwd): On native Windows, use _getcwd.
33050         * lib/close.c (close_nothrow): On native Windows, use _close.
33051         * lib/creat.c (orig_creat): On native Windows, use _creat.
33052         * lib/dup.c (dup_nothrow): On native Windows, use _dup.
33053         * lib/dup2.c (dup2_nothrow): Use _dup2.
33054         * lib/fdopen.c (fdopen_nothrow): On native Windows, use _fdopen.
33055         * lib/getcwd-lgpl.c: On native Windows, use _getcwd.
33056         * lib/getcwd.c (getcwd_nothrow): Use _getcwd also on mingw.
33057         * lib/open.c (orig_open): On native Windows, use _open.
33058         * lib/read.c (read_nothrow): Use _read.
33059         * lib/rmdir.c: On native Windows, use _rmdir.
33060         * lib/unlink.c: On native Windows, use _unlink.
33061         * lib/write.c (write_nothrow): Use _write.
33062         * lib/sys_select.in.h (close): With clang, don't attach a warning on an
33063         undefined symbol.
33064         * lib/sys_socket.in.h (close): Likewise.
33065         * lib/sys_time.in.h (close): Likewise.
33066         * tests/test-spawn-pipe-child.c: On native Windows, use _fdopen.
33068 2020-08-15  Bruno Haible  <bruno@clisp.org>
33070         Fix "unknown pragma ignored" warnings with clang on native Windows.
33071         * lib/cbrt.c: Don't use '#pragma fenv_access (off)' with clang.
33072         * lib/cbrtf.c: Likewise.
33073         * lib/ceil.c: Likewise.
33074         * lib/floor.c: Likewise.
33075         * lib/fma.c: Likewise.
33076         * lib/fmod.c: Likewise.
33077         * lib/rint.c: Likewise.
33078         * lib/round.c: Likewise.
33079         * lib/trunc.c: Likewise.
33080         * tests/test-ceil2.c: Likewise.
33081         * tests/test-ceilf2.c: Likewise.
33082         * tests/test-floor2.c: Likewise.
33083         * tests/test-floorf2.c: Likewise.
33084         * tests/test-trunc2.c: Likewise.
33085         * tests/test-truncf2.c: Likewise.
33086         * m4/round.m4 (gl_FUNC_ROUND): Likewise.
33087         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
33089 2020-08-15  Bruno Haible  <bruno@clisp.org>
33091         Fix compilation errors in C++ mode with clang on native Windows.
33092         * lib/pthread.in.h (pthread_*): Disable _GL_CXXALIASWARN invocation on
33093         non-glibc systems.
33094         * lib/sched.in.h (sched_yield): Likewise.
33096 2020-08-14  Bruno Haible  <bruno@clisp.org>
33098         stdnoreturn: Work around problem with MSVC/clang.
33099         * m4/stdnoreturn.m4 (gl_STDNORETURN_H): On native Windows, include some
33100         system header after <stdnoreturn.h>.
33101         * doc/posix-headers/stdnoreturn.texi: Mention the issue.
33103 2020-08-14  Bruno Haible  <bruno@clisp.org>
33105         utime-h: Generate an utime.h file always.
33106         * modules/utime-h (Makefile.am): Generate utime.h always.
33107         * m4/utime_h.m4 (gl_UTIME_H): Don't set UTIME_H. Don't define
33108         GL_GENERATE_UTIME_H.
33110 2020-08-14  Bruno Haible  <bruno@clisp.org>
33112         mktime, mktime-internal: Remove obsolete code.
33113         * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Don't #undef putenv.
33115 2020-08-14  Bruno Haible  <bruno@clisp.org>
33117         getcwd: Remove obsolete code.
33118         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Don't #undef mkdir.
33119         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
33121 2020-08-14  Bruno Haible  <bruno@clisp.org>
33123         tzset: Assume the function exists.
33124         * lib/time.in.h (tzset): Assume HAVE_TZSET is 1.
33125         * lib/tzset.c: Define rpl_tzset, not tzset. Assume HAVE_TZSET is 1.
33126         * modules/tzset (configure.ac): Don't test HAVE_TZSET.
33127         * m4/tzset.m4 (gl_FUNC_TZSET): Don't test for tzset. Don't set
33128         HAVE_TZSET.
33129         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Don't initialize HAVE_TZSET.
33130         * modules/time (Makefile.am): Don't substitute HAVE_TZSET.
33132         nstrftime: Assume tzset exists.
33133         * lib/nstrftime.c (HAVE_TZSET): Remove macro.
33134         (__strftime_internal): Test my_strftime, not HAVE_TZSET.
33135         * m4/nstrftime.m4 (gl_FUNC_GNU_STRFTIME): Don't test for tzset.
33137         mktime, mktime-internal: Assume tzset exists.
33138         * lib/mktime.c (my_tzset): Assume HAVE_TZSET is 1.
33139         * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Don't test for tzset.
33141 2020-08-14  Bruno Haible  <bruno@clisp.org>
33143         strdup: Assume the function exists.
33144         * m4/strdup.m4 (gl_FUNC_STRDUP, gl_FUNC_STRDUP_POSIX): Don't test
33145         whether strdup exists.
33146         * modules/strdup (Files): Remove lib/strdup.c.
33147         (configure.ac): Don't compile strdup.c.
33148         * modules/strdup-posix (Depends-on, configure.ac): Don't test
33149         ac_cv_func_strdup.
33150         * doc/posix-functions/strdup.texi: Update.
33151         * lib/unistr/u8-strdup.c: Assume HAVE_STRDUP is 1.
33152         * modules/unistr/u8-strdup (Files): Remove lib/unistr/u-strdup.h.
33153         (Depends-on): Remove unistr/u8-strlen.
33155 2020-08-13  Bruno Haible  <bruno@clisp.org>
33157         sys_random: Work around an uClibc bug.
33158         Reported by akater <nuclearspace@gmail.com>
33159         via Stefan Kangas <stefan@marxist.se>
33160         in <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42236>.
33161         * lib/sys_random.in.h: On uClibc, include <stddef.h> first.
33162         * m4/sys_random_h.m4 (gl_HEADER_SYS_RANDOM): Update comment.
33163         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Likewise.
33164         * doc/glibc-headers/sys_random.texi: Mention the uClibc bug.
33166 2020-08-12  Bruno Haible  <bruno@clisp.org>
33168         Avoid implicit conversion from 'unsigned int' to 'int' in initializers.
33169         Reported by Florian Weimer in
33170         <https://lists.gnu.org/archive/html/bug-gnulib/2020-08/msg00086.html>.
33171         * lib/gen-uni-tables.c (output_predicate): Change the element type of
33172         the level3 array to 'unsigned int'.
33173         * lib/unictype/bitmap.h (bitmap_lookup): Access an 'unsigned int'.
33174         * lib/unictype/categ_*.h: Regenerated.
33175         * lib/unictype/ctype_*.h: Regenerated.
33176         * lib/unictype/pr_*.h: Regenerated.
33177         * lib/unictype/sy_*.h: Regenerated.
33178         * lib/unicase/cased.h: Regenerated.
33179         * lib/unicase/ignorable.h: Regenerated.
33181 2020-08-12  Paul Eggert  <eggert@cs.ucla.edu>
33183         stdint: port intptr_t to more-recent MinGW
33184         Problem reported by Eli Zaretskii in <https://bugs.gnu.org/36597#106>.
33185         * lib/stdint.in.h (intptr_t, uintptr_t): Do not define on MinGW,
33186         even if _INTPTR_T_DEFINED and _UINTPTR_T_DEFINED are not defined.
33187         Apparently those two macros were removed in mingwrt-3.22
33188         dated 2016-07-14.
33190 2020-08-12  Bruno Haible  <bruno@clisp.org>
33192         thread-optim: Export function-like macros only.
33193         Suggested by Paul Eggert.
33194         * lib/thread-optim.h (gl_multithreaded): New macro.
33195         (IF_MT_DECL, IF_MT): Remove macros.
33196         * doc/multithread.texi (Multithreading Optimizations): Add a small
33197         example.
33198         * lib/fatal-signal.c: Update all uses.
33199         * lib/clean-temp.c: Likewise.
33200         * lib/localename.c: Likewise.
33201         * modules/localename (Depends-on): Add stdbool.
33203 2020-08-12  Bruno Haible  <bruno@clisp.org>
33205         Revert autoupdate's revert.
33206         * config/srclist.txt: Mark regex.h as needing sync with glibc.
33208 2020-08-11  Bruno Haible  <bruno@clisp.org>
33210         thread-optim: Fix a compiler warning.
33211         * lib/thread-optim.h (IF_MT_DECL): Define differently.
33213 2020-08-11  Bruno Haible  <bruno@clisp.org>
33215         Use __restrict also on clang.
33216         * lib/cdefs.h (__restrict): Don't define as a macro on clang.
33217         (__restrict_arr): On clang, define like on GCC.
33218         * lib/regex.h (_Restrict_): Use '__restrict' also on clang.
33219         (_Restrict_arr_): Use _Restrict_ also on clang.
33220         * lib/spawn.in.h (_Restrict_): Use '__restrict' also on clang.
33221         (_Restrict_arr_): Use _Restrict_ also on clang.
33223 2020-08-11  Bruno Haible  <bruno@clisp.org>
33225         Use flexible array syntax also on clang.
33226         * lib/cdefs.h (__flexarr, __glibc_c99_flexarr_available): For clang,
33227         define like for GCC 3.
33229 2020-08-11  Bruno Haible  <bruno@clisp.org>
33231         fcntl: On native Windows, use _setmode, not setmode.
33232         * lib/fcntl.c (dupfd): Use _setmode, not setmode.
33233         * lib/binary-io.h: Update comment.
33234         * tests/test-cloexec.c: Call set_binary_mode, not setmode.
33235         * tests/test-dup2.c: Likewise.
33236         * tests/test-dup-safer.c: Likewise.
33237         * tests/test-fcntl.c: Likewise.
33239 2020-08-11  Bruno Haible  <bruno@clisp.org>
33241         execute, spawn-pipe: Use _spawnvpe, not spawnvpe.
33242         * lib/execute.c (execute): Use _spawnvpe, not spawnvpe.
33243         * lib/spawn-pipe.c (create_pipe): Likewise.
33244         * tests/test-nonblocking-pipe-main.c (main): Likewise.
33245         * tests/test-nonblocking-socket-main.c (main): Likewise.
33246         * lib/wait-process.c: Update comment.
33247         * doc/posix-functions/fork.texi: Update.
33249 2020-08-11  Bruno Haible  <bruno@clisp.org>
33251         asyncsafe-spin: Use GCC built-ins also on clang.
33252         * lib/asyncsafe-spin.c (asyncsafe_spin_init, do_lock, do_unlock): Use
33253         the newer GCC built-ins also on clang.
33255 2020-08-11  Bruno Haible  <bruno@clisp.org>
33257         Use expression statements also on clang.
33258         * lib/cdefs.h (__extension__): Don't define to empty on clang.
33259         * lib/obstack.h (__extension__): Likewise.
33260         (obstack_object_size, obstack_room, obstack_make_room, obstack_empty_p,
33261         obstack_grow, obstack_grow0, obstack_1grow, obstack_ptr_grow,
33262         obstack_int_grow, obstack_ptr_grow_fast, obstack_int_grow_fast,
33263         obstack_blank, obstack_alloc, obstack_copy, obstack_copy0,
33264         obstack_finish, obstack_free): Enable as optimized macros also on clang.
33265         * lib/fpucw.h (fpucw_t etc.): Enable the definitions also on clang.
33267 2020-08-10  Bruno Haible  <bruno@clisp.org>
33269         Use many __attribute__s with clang.
33270         * m4/gnulib-common.m4 (_Noreturn): Use __attribute__ __noreturn__ also
33271         on clang.
33272         * lib/cdefs.h (__glibc_clang_has_attribute, __glibc_clang_has_builtin):
33273         New macros.
33274         (__THROW, __THROWNL, __NTH, __NTHNL): Use __attribute__ __nothrow__ also
33275         on clang.
33276         (__warndecl, __warnattr, __errordecl): Use __attribute__ __diagnose_if__
33277         also on older clang versions.
33278         (__attribute__): Don't define to empty on clang.
33279         (__attribute_malloc__): Use __attribute__ __malloc__ also on clang.
33280         (__attribute_pure__): Use __attribute__ __pure__ also on clang.
33281         (__attribute_const__): Use __attribute__ __const__ also on clang.
33282         (__attribute_used__): Use __attribute__ __used__ also on clang.
33283         (__attribute_noinline__): Use __attribute__ __noinline__ also on clang.
33284         (__attribute_deprecated__): Use __attribute__ __deprecated__ also on
33285         clang.
33286         (__attribute_format_arg__): Use __attribute__ __format_arg__ also on
33287         clang.
33288         (__attribute_format_strfmon__): Use __attribute__ __format__ __strfmon__
33289         also on clang.
33290         (__nonnull): Use __attribute__ __nonnull__ also on clang.
33291         (__attribute_warn_unused_result__): Use __attribute__
33292         __warn_unused_result__ also on clang.
33293         (__always_inline): Use __attribute__ __always_inline__ also on clang.
33294         (__attribute_artificial__): Use __attribute__ __artificial__ also on
33295         clang >= 7.
33296         (__glibc_unlikely, __glibc_likely): Use __builtin_expect also on older
33297         clang versions.
33298         (_Noreturn): Don't redefine on clang >= 3.5.
33299         * lib/arg-nonnull.h (_GL_ARG_NONNULL): Use __attribute__ __nonnull__
33300         also on clang.
33301         * lib/dirent.in.h (_GL_ATTRIBUTE_PURE): Use __attribute__ __pure__ also
33302         on clang.
33303         * lib/stdlib.in.h (_GL_ATTRIBUTE_PURE): Likewise.
33304         * lib/string.in.h (_GL_ATTRIBUTE_PURE): Likewise.
33305         * lib/wchar.in.h (_GL_ATTRIBUTE_PURE): Likewise.
33306         * lib/stdio.in.h (_GL_ATTRIBUTE_FORMAT): Use __attribute__ __format__
33307         also on clang.
33308         * lib/monetary.in.h (_GL_ATTRIBUTE_FORMAT): Likewise.
33309         * lib/textstyle.in.h (ostream_printf, ostream_vprintf): Likewise.
33310         * lib/unitypes.in.h (_UC_ATTRIBUTE_CONST): Use __attribute__ __const__
33311         also on clang.
33312         (_UC_ATTRIBUTE_PURE): Use __attribute__ __pure__ also on clang.
33313         * lib/noreturn.h (_GL_NORETURN_FUNC, _GL_NORETURN_FUNCPTR): Use
33314         __attribute__ __noreturn__ also on clang.
33315         * lib/obstack.h (__attribute_noreturn__): Likewise.
33316         * lib/file-set.h (record_file): Use __attribute__ __nonnull__ also on
33317         clang.
33318         * lib/argp-help.c (hol_entry_long_iterate): Use __attribute__
33319         always_inline also on clang.
33320         * tests/test-printf-posix.c (func1, func2, func3, func4): Test also on
33321         clang.
33323 2020-08-10  Bruno Haible  <bruno@clisp.org>
33325         c-ldtoastr tests: Fix test failure.
33326         * tests/test-c-ldtoastr.c (main): Support platforms where 'long double'
33327         is longer than 'double'.
33329 2020-08-10  Bruno Haible  <bruno@clisp.org>
33331         Revert autoupdate's revert.
33332         * config/srclist.txt: Mark intprops.h as needing sync with glibc.
33334 2020-08-09  Bruno Haible  <bruno@clisp.org>
33336         string: Fix build error in C++ mode with clang (regression from today).
33337         * lib/warn-on-use.h (_GL_WARN_ON_USE_CXX): Expect two rettype
33338         parameters, one for GCC, one for clang.
33339         * lib/c++defs.h (_GL_CXXALIASWARN1_2): Update.
33340         * lib/string.in.h (strchr, strpbrk, strrchr): For clang, pass 'char *'
33341         as return type.
33343 2020-08-09  Bruno Haible  <bruno@clisp.org>
33345         ftruncate: Use _chsize, not chsize.
33346         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): Test for _chsize, not chsize.
33347         * lib/ftruncate.c: Test HAVE__CHSIZE.
33348         (chsize_nothrow): Use _chsize, not chsize.
33350 2020-08-09  Bruno Haible  <bruno@clisp.org>
33352         Silence warnings from clang 10 with -Wimplicit-fallthrough.
33353         * lib/dfa.c (FALLTHROUGH): Use __attribute__ __fallthrough__ also on
33354         clang >= 10.
33355         * lib/fnmatch.c (FALLTHROUGH): Likewise.
33356         * lib/fts.c (FALLTHROUGH): Likewise.
33357         * tests/macros.h (FALLTHROUGH): Likewise.
33358         * lib/regex_internal.h (FALLTHROUGH): Likewise.
33359         * config/srclist.txt: Mark it as needing sync with glibc.
33361 2020-08-09  Bruno Haible  <bruno@clisp.org>
33363         stdbool tests: Enable the stricter tests also on clang.
33364         * tests/test-stdbool.c (ADDRESS_CHECK_OKAY): Define also on clang.
33365         (e): Enable the address-to-bool conversion test also on clang.
33367 2020-08-09  Bruno Haible  <bruno@clisp.org>
33369         count-one-bits: Use __builtin_popcount{,l,ll} on clang.
33370         * lib/count-one-bits.h (COUNT_ONE_BITS): Use the GCC built-in.
33372 2020-08-09  Bruno Haible  <bruno@clisp.org>
33374         Use attribute __aligned__ with clang.
33375         * lib/stdalign.in.h (_Alignas): Treat clang like GCC.
33376         * lib/stddef.in.h (_GL_STDDEF_ALIGNAS): Likewise.
33378 2020-08-09  Bruno Haible  <bruno@clisp.org>
33380         Use __alignof__ with clang.
33381         * m4/stddef_h.m4 (gl_STDDEF_H): Test the alignment of max_align_t also
33382         on clang.
33383         * lib/alignof.h (alignof_type): Use __alignof__ also on clang.
33384         * lib/stdalign.in.h (_Alignof): Don't activate the GCC workaround on
33385         clang.
33386         * lib/malloca.h (sa_alignof): Use __alignof__ also on clang.
33387         * lib/bitset/list.c (lbitset_elt_alloc): Use __alignof__ also on clang.
33388         * lib/bitset/table.c (tbitset_elt_alloc): Likewise.
33389         * tests/test-stddef.c: Very the behaviour of __alignof__ also on clang.
33391 2020-08-09  Bruno Haible  <bruno@clisp.org>
33393         ignore-value: Simplify on clang.
33394         * lib/ignore-value.h (ignore_value): With clang, no need to use the GCC
33395         workaround.
33397 2020-08-09  Bruno Haible  <bruno@clisp.org>
33399         Use __typeof__ with clang.
33400         * m4/stdint.m4 (gl_STDINT_H): Check for SIZE_MAX also on
33401         "clang -std=gnu99".
33402         * lib/intprops.h (_GL_HAVE___TYPEOF__): Define to 1 also on clang.
33403         * tests/test-stdint.c (verify_same_types): Enable the check also on
33404         clang.
33406 2020-08-09  Bruno Haible  <bruno@clisp.org>
33408         Add ability to emit user-defined warnings and errors with clang.
33409         * m4/gnulib-common.m4 (gl_COMMON_BODY): Define _GL_ATTRIBUTE_ERROR,
33410         _GL_ATTRIBUTE_WARNING using an attribute for clang.
33411         * lib/warn-on-use.h (_GL_WARN_ON_USE, _GL_WARN_ON_USE_ATTRIBUTE,
33412         _GL_WARN_ON_USE_CXX): Define using an attribute for clang.
33413         * lib/cdefs.h (__warndecl, __warnattr, __errordecl): Define using an
33414         attribute for clang.
33416 2020-08-09  Bruno Haible  <bruno@clisp.org>
33418         intprops: Fix typo in comment.
33419         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW_P): Fix typo in comment.
33421 2020-08-09  Bruno Haible  <bruno@clisp.org>
33423         Use __builtin_signbit* with clang.
33424         * lib/math.in.h (signbit): Use __builtin_signbit{,f,l} also on clang.
33425         * m4/signbit.m4 (gl_SIGNBIT): Use __builtin_signbit{,f,l} also on clang.
33426         Set REPLACE_SIGNBIT_USING_BUILTINS, not REPLACE_SIGNBIT_USING_GCC.
33427         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize
33428         REPLACE_SIGNBIT_USING_BUILTINS, not REPLACE_SIGNBIT_USING_GCC.
33429         * modules/math (Makefile.am): Substitute REPLACE_SIGNBIT_USING_BUILTINS,
33430         not REPLACE_SIGNBIT_USING_GCC.
33432 2020-08-09  Bruno Haible  <bruno@clisp.org>
33434         Use __builtin_isnan with clang.
33435         * lib/isnanf-nolibm.h (isnanf): Use the GCC built-in __builtin_isnan,
33436         not __builtin_isnanf. Also on clang.
33437         * m4/isnanf.m4 (gl_HAVE_ISNANF_NO_LIBM, gl_ISNANF_WORKS): Use the GCC
33438         built-in __builtin_isnan, not __builtin_isnanf. Also on clang.
33439         * lib/isnand-nolibm.h (isnand): With clang, use the GCC built-in.
33440         * m4/isnand.m4 (gl_HAVE_ISNAND_IN_LIBM): With clang, use the GCC
33441         built-in.
33442         * lib/isnanl-nolibm.h (isnanf): Use the GCC built-in __builtin_isnan,
33443         not __builtin_isnanl. Also on clang.
33444         * m4/isnanl.m4 (gl_HAVE_ISNANL_NO_LIBM, gl_FUNC_ISNANL_WORKS): Use the
33445         GCC built-in __builtin_isnan, not __builtin_isnanl. Also on clang.
33446         * lib/math.in.h (__has_builtin): Remove macro.
33447         (isnanf, gl_isnan_f): Use the GCC built-in __builtin_isnan, not
33448         __builtin_isnanf. Also on clang.
33449         (isnand, gl_isnan_d): With clang, use the GCC built-in.
33450         (isnanl, gl_isnan_l): Use the GCC built-in __builtin_isnan, not
33451         __builtin_isnanl. Also on clang.
33452         (isnan): Use the GCC built-in __builtin_isnan in all three cases. Also
33453         on clang.
33455 2020-08-09  Bruno Haible  <bruno@clisp.org>
33457         thread-optim: Fix logic error.
33458         Reported by Paul Eggert.
33459         * lib/thread-optim.h (IF_MT): Fix logic error.
33461 2020-08-08  Bruno Haible  <bruno@clisp.org>
33463         localename: Use module 'thread-optim'.
33464         * lib/localename.c: Include thread-optim.h.
33465         (struniq): Use IF_MT macro.
33466         * modules/localename (Depends-on): Add thread-optim.
33468         clean-temp: Use module 'thread-optim'.
33469         * lib/clean-temp.c: Include thread-optim.h.
33470         (register_temporary_file, unregister_temporary_file, create_temp_dir,
33471         register_temp_file, unregister_temp_file, register_temp_subdir,
33472         unregister_temp_subdir, cleanup_temp_dir_contents, register_fd,
33473         close_temp, fclose_variant_temp): Use IF_MT macro.
33474         * modules/clean-temp (Depends-on): Add thread-optim.
33476         fatal-signal: Use module 'thread-optim'.
33477         * lib/fatal-signal.c: Include thread-optim.h.
33478         (at_fatal_signal, block_fatal_signals, unblock_fatal_signals): Use IF_MT
33479         macro.
33480         * modules/fatal-signal (Depends-on): Add thread-optim.
33482 2020-08-08  Bruno Haible  <bruno@clisp.org>
33484         New module 'thread-optim'.
33485         * lib/thread-optim.h: New file.
33486         * modules/thread-optim: New file.
33487         * doc/multithread.texi (Multithreading Optimizations): New section.
33489 2020-08-07  Paul Eggert  <eggert@cs.ucla.edu>
33491         doc: more updates for glibc 2.32
33492         * doc/glibc-functions/lchmod.texi, doc/posix-functions/faccessat.texi:
33493         * doc/posix-functions/fchmodat.texi: Update.
33495 2020-08-07  Bruno Haible  <bruno@clisp.org>
33497         doc: Update for glibc 2.32.
33498         * doc/glibc-functions/__libc_single_threaded.texi: New file.
33499         * doc/glibc-functions/pthread_attr_getsigmask_np.texi: New file.
33500         * doc/glibc-functions/pthread_attr_setsigmask_np.texi: New file.
33501         * doc/glibc-functions/sigabbrev_np.texi: New file.
33502         * doc/glibc-functions/sigdescr_np.texi: New file.
33503         * doc/glibc-functions/strerrordesc_np.texi: New file.
33504         * doc/glibc-functions/strerrorname_np.texi: New file.
33505         * doc/gnulib.texi: Include them.
33506         (Glibc sys/single_threaded.h): New section.
33507         * doc/pastposix-functions/h_errno.texi: Update.
33508         * doc/posix-functions/*.texi: Likewise.
33509         * doc/glibc-functions/*.texi: Likewise.
33511 2020-08-07  Bruno Haible  <bruno@clisp.org>
33513         alloca: No need to compile alloca.c with clang.
33514         * lib/alloca.c: Skip all code with clang.
33516         Use __builtin_alloca with clang.
33517         * lib/alloca.in.h (alloca): Define as __builtin_alloca on clang.
33519 2020-08-06  Bruno Haible  <bruno@clisp.org>
33521         Use __builtin_assume with clang.
33522         * lib/verify.h (_GL_HAS_BUILTIN_ASSUME): New macro.
33523         (assume): Use __builtin_assume when available.
33525 2020-08-06  Paul Eggert  <eggert@cs.ucla.edu>
33527         libgmp: add <gmp/gmp.h> support
33528         * m4/libgmp.m4 (gl_LIBGMP):
33529         * modules/libgmp (configure.ac, Makefile.am):
33530         Support platforms requiring ‘#include <gmp/gmp.h>’ instead of
33531         ‘#include <gmp.h>’.
33533 2020-08-06  Bruno Haible  <bruno@clisp.org>
33535         Consider that clang defines __OPTIMIZE__ like GCC does.
33536         * lib/streq.h: Define the inline functions also on clang.
33537         * lib/c-strcaseeq.h: Likewise.
33538         * lib/c++defs.h (_GL_CXXALIASWARN_2, _GL_CXXALIASWARN1_2): Don't enable
33539         the GCC workaround to clang.
33541 2020-08-06  Bruno Haible  <bruno@clisp.org>
33543         safe-alloc: Remove unused code.
33544         * lib/safe-alloc.h (__GNUC_PREREQ): Remove macro.
33546 2020-08-06  Bruno Haible  <bruno@clisp.org>
33548         Use __builtin_expect with clang everywhere.
33549         * lib/cdefs.h (__glibc_unlikely, __glibc_likely): Use the GCC built-in
33550         also on clang.
33552 2020-08-05  Bruno Haible  <bruno@clisp.org>
33554         Use __builtin_ctz{,l,ll} and __builtin_ffs{,l,ll} with clang everywhere.
33555         * lib/count-trailing-zeros.h (COUNT_TRAILING_ZEROS): Use the GCC
33556         built-in also on clang.
33557         * lib/ffs.c: With clang, use the GCC built-in, not <intrin.h>.
33558         * lib/ffsl.h: Likewise. Assume GCC_BUILTIN is defined.
33560 2020-08-05  Bruno Haible  <bruno@clisp.org>
33562         Use __builtin_clz{,l,ll} with clang, also on Windows.
33563         * lib/integer_length.c: With clang, use the GCC built-in, not
33564         <intrin.h>.
33565         * lib/integer_length_l.c: Likewise.
33566         * lib/count-leading-zeros.h (COUNT_LEADING_ZEROS): Use the GCC built-in
33567         also on clang.
33568         * lib/vasnprintf.c (divide): Likewise.
33570 2020-08-04  Paul Eggert  <eggert@cs.ucla.edu>
33572         Update srclist.txt as per recent glibc changes
33573         * config/srclist.txt: Uncomment lines to reflect recent merges
33574         from Gnulib to glibc.
33576 2020-08-03  Bruno Haible  <bruno@clisp.org>
33578         Prefer documented autoconf macro 'm4_if' over 'ifelse'.
33579         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Use m4_if instead of ifelse.
33581 2020-08-03  Bruno Haible  <bruno@clisp.org>
33583         integer_length_ll: Optimize for MSVC in 64-bit mode.
33584         * lib/integer_length_l.c (MSVC_BUILTIN): Define for MSVC in 64-bit mode.
33585         (FUNC): On MSVC, use MSVC_BUILTIN if defined.
33587 2020-08-03  Bruno Haible  <bruno@clisp.org>
33589         integer_length_ll: Optimize for MSVC in 32-bit mode.
33590         * lib/integer_length_l.c: Include <intrin.h>.
33591         (integer_length): Define as inline function, like in
33592         lib/integer_length.c.
33594 2020-08-03  Bruno Haible  <bruno@clisp.org>
33596         integer_length: Optimize for MSVC.
33597         * lib/integer_length.c: Include <intrin.h>.
33598         (integer_length): With MSVC, use the _BitScanReverse built-in.
33600 2020-08-03  Bruno Haible  <bruno@clisp.org>
33602         ffsll: Optimize for MSVC in 64-bit mode.
33603         * lib/ffsl.h (FUNC): On MSVC, use MSVC_BUILTIN if defined.
33604         * lib/ffsll.c (MSVC_BUILTIN): Define for MSVC in 64-bit mode.
33605         * lib/ffsl.c (MSVC_BUILTIN): Define for MSVC.
33607 2020-08-03  Bruno Haible  <bruno@clisp.org>
33609         ffsll: Optimize for MSVC in 32-bit mode.
33610         * lib/ffsl.h: Include <intrin.h>.
33611         (ffs): Define as inline function, like in lib/ffs.c.
33613 2020-08-03  Bruno Haible  <bruno@clisp.org>
33615         ffs: Optimize for MSVC.
33616         * lib/ffs.c: Include <intrin.h>.
33617         (ffs): With MSVC, use the _BitScanForward built-in.
33619 2020-08-03  Bruno Haible  <bruno@clisp.org>
33621         sigprocmask: Try to avoid breakage for people who use an Autoconf cache.
33622         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Change the name of the cache
33623         variable.
33625 2020-08-03  Harald van Dijk  <harald@gigawatt.nl>  (tiny change)
33627         fopen: Avoid undesired interactions with glibc headers.
33628         * lib/fopen.c (_GL_ALREADY_INCLUDING_STDIO_H): Define this instead of
33629         __need_FILE, as the latter does not work with glibc.
33631 2020-08-02  Paul Eggert  <eggert@cs.ucla.edu>
33633         fcntl: document some F_SETLK errno variations
33634         * doc/posix-functions/fcntl.texi (fcntl): Document
33635         OpenIndiana, GNU/Linux, FreeBSD on NFS files.
33637 2020-08-02  Bruno Haible  <bruno@clisp.org>
33639         oset: Add an 'iterator_atleast' operation.
33640         * lib/gl_array_oset.c (gl_array_indexof_atleast): New function,
33641         extracted from gl_array_search_atleast.
33642         (gl_array_search_atleast): Use it.
33643         (gl_array_iterator_atleast): New function.
33644         (gl_array_oset_implementation): Use it.
33645         * lib/gl_anytree_oset.h (gl_tree_iterator_atleast): New function.
33646         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Use it.
33647         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Likewise.
33648         * lib/gl_oset.h (struct gl_oset_implementation): Add 'iterator_atleast'
33649         member.
33650         (gl_oset_iterator_atleast): New function.
33651         * lib/gl_oset.hh (gl_OSet): Add 'begin_atleast' member.
33652         (gl_OSet::iterator): Add another auxiliary constructor.
33653         * tests/test-array_oset.c (is_at_least, gl_sortedlist_indexof_atleast):
33654         New functions.
33655         (main): Test also gl_oset_iterator_atleast.
33656         * tests/test-avltree_oset.c (is_at_least): New function.
33657         (main): Test also gl_oset_iterator_atleast.
33658         * tests/test-rbtree_oset.c (is_at_least): New function.
33659         (main): Test also gl_oset_iterator_atleast.
33660         * tests/test-oset-c++.cc (is_at_most): New function.
33661         (main): Test also gl_OSet::begin_atleast.
33663 2020-08-02  Bruno Haible  <bruno@clisp.org>
33665         oset-c++, omap-c++: Remove restriction for search_atleast method.
33666         * lib/gl_oset.hh (gl_OSet::search_atleast): Allow the threshold to be of
33667         a different type than the element.
33668         * lib/gl_omap.hh (gl_OMap::search_atleast): Allow the threshold to be of
33669         a different type than the key.
33671 2020-08-01  Paul Eggert  <eggert@cs.ucla.edu>
33673         gnumakefile: say ‘$(MAKE)’ not ‘make’
33674         * top/GNUmakefile (abort-due-to-no-makefile):
33675         Prefer ‘$(MAKE)’ to ‘make’ in a diagnostic.
33676         This change is backported from Autoconf.
33678 2020-08-01  Bruno Haible  <bruno@clisp.org>
33680         Prefer documented autoconf macro 'm4_if' over 'ifelse'.
33681         * m4/autobuild.m4 (AB_INIT): Use m4_if instead of ifelse.
33682         * m4/csharpexec.m4 (gt_CSHARPEXEC): Likewise.
33683         * m4/javacomp.m4 (gt_JAVACOMP): Likewise.
33684         * m4/javaexec.m4 (gt_JAVAEXEC): Likewise.
33685         * m4/libtextstyle.m4 (gl_LIBTEXTSTYLE): Likewise.
33687 2020-08-01  Bruno Haible  <bruno@clisp.org>
33689         libtextstyle-optional: Update tests.
33690         * modules/libtextstyle-optional-tests (configure.ac): Invoke
33691         gl_LIBTEXTSTYLE_OPTIONAL.
33693 2020-08-01  Bruno Haible  <bruno@clisp.org>
33695         parse-datetime: Fix wrong #line statements.
33696         * modules/parse-datetime (Makefile.am): Correct #line statements also in
33697         parse-datetime-gen.h.
33699 2020-08-01  Bruno Haible  <bruno@clisp.org>
33701         libtextstyle[-optional]: Allow requesting a minimum version.
33702         * m4/libtextstyle.m4 (gl_LIBTEXTSTYLE): Allow an optional argument.
33703         (gl_LIBTEXTSTYLE_NEWEST_VERSION, gl_LIBTEXTSTYLE_INITIALIZE,
33704         gl_LIBTEXTSTYLE_SEARCH): New macros.
33705         * modules/libtextstyle (configure.ac): Don't invoke gl_LIBTEXTSTYLE.
33706         * m4/libtextstyle-optional.m4 (gl_LIBTEXTSTYLE_OPTIONAL): Allow an
33707         optional argument. Invoke, not require, gl_LIBTEXTSTYLE.
33708         * modules/libtextstyle-optional (configure.ac): Don't invoke
33709         gl_LIBTEXTSTYLE_OPTIONAL.
33710         * NEWS: Mention the changes.
33712 2020-07-31  Bruno Haible  <bruno@clisp.org>
33714         _GL_CMP: Improve documentation.
33715         Reported by Paul Eggert in
33716         <https://lists.gnu.org/archive/html/bug-gnulib/2020-07/msg00188.html>.
33717         * m4/gnulib-common.m4 (gl_COMMON_BODY): Clarify what arguments can be
33718         passed.
33720 2020-07-30  Paul Eggert  <eggert@cs.ucla.edu>
33722         largefile: sync with Autoconf master
33723         * m4/largefile.m4 (_AC_SYS_LARGEFILE_TEST_INCLUDES):
33724         Avoid undefined behavior on platforms where off_t is 32 bits.
33725         See: https://bugs.debian.org/742780
33727         alloca: sync with Autoconf master
33728         * m4/alloca.m4 (_AC_LIBOBJ_ALLOCA):
33729         Do not define if Autoconf 2.70 or later, since Autoconf master
33730         now matches us.
33732 2020-07-30  Bruno Haible  <bruno@clisp.org>
33734         unicodeio: Add comment.
33735         * lib/unicodeio.c (unicode_to_mb): Clarify why the code distinguishes
33736         different iconv behaviours.
33738 2020-07-30  Paul Eggert  <eggert@cs.ucla.edu>
33740         Work around some Oracle Studio attribute bugs
33741         These were discovered when building bleeding-edge Emacs with
33742         Oracle Studio.
33743         * m4/gnulib-common.m4 (_GL_ATTRIBUTE_COLD, _GL_ATTRIBUTE_MAY_ALIAS):
33744         Port to Oracle Studio 12.6, which mishandles __attribute__
33745         ((__cold__)) and __attribute__ ((__may_alias__)) even though
33746         __has_attribute says they work.
33748 2020-07-29  Bruno Haible  <bruno@clisp.org>
33750         unicodeio: Fix wrong result on musl libc.
33751         Reported by A. Wilcox <awilfox@adelielinux.org> in
33752         <https://www.openwall.com/lists/musl/2020/07/29/2>.
33753         * lib/unicodeio.c (unicode_to_mb): Handle asterisk fallback characters
33754         on musl libc.
33755         * m4/unicodeio.m4 (gl_UNICODEIO): Invoke gl_MUSL_LIBC.
33756         * modules/unicodeio (Files): Add m4/musl.m4.
33758 2020-07-29  Paul Eggert  <eggert@cs.ucla.edu>
33760         fsusage, regex, stat-size: remove Cray support
33761         As near as I can make out this is actually support for UNICOS/mp,
33762         last released 2005, and Cray hasn’t supported that for years.
33763         * config/srclist.txt: Comment out regex.h for now.
33764         * lib/fsusage.c (get_fs_usage):
33765         * lib/regex.h (re_comp, re_exec):
33766         * lib/stat-size.h (ST_NBLOCKSIZE):
33767         Don’t worry about _CRAY.
33769 2020-07-29  Bruno Haible  <bruno@clisp.org>
33771         parse-datetime: Fix compilation error with bison 3.7.
33772         * modules/parse-datetime (Makefile.am): Create a generated header file
33773         parse-datetime-gen.h in the source directory. Correct #include and
33774         #line statements during preprocessing.
33776 2020-07-28  Bruno Haible  <bruno@clisp.org>
33778         fopen-gnu: Create files correctly (regression from 2020-05-24).
33779         * lib/fopen.c (rpl_open): Pass a third argument to open().
33781 2020-07-27  Paul Eggert  <eggert@cs.ucla.edu>
33783         xalloc-die: don’t depend on xalloc
33784         This removes a circular dependency, as xalloc depends on xalloc-die.
33785         * modules/xalloc-die (Files): Add lib/xalloc.h.
33786         (Depends-on): Remove xalloc.
33787         Add extern-inline, stdint, xalloc-oversized (this is for xalloc.h).
33789         dfa-tests: port to MSVC
33790         Problem reported by Gisle Vanem in:
33791         https://lists.gnu.org/r/bug-gnulib/2020-07/msg00159.html
33792         Also, remove an unnecessary dependency on getprogname.
33793         * modules/dfa-tests (Depends-on): Remove getprogname.
33794         * tests/test-dfa-match-aux.c: Do not include getprogname.h.
33795         (exit_status): New static var.
33796         (dfawarn): Set it instead of exiting.
33797         Do not declare as _Noreturn, to pacify MSVC.
33798         (main): Return exit_status.
33800 2020-07-26  Paul Eggert  <eggert@cs.ucla.edu>
33802         argz: pacify MSVC
33803         * lib/argz.in.h: Avoid "*/*" to pacify MSVC.
33804         Problem reported by Gisle Vanem.
33806         libgmp: remove dependency on havelib
33807         * m4/libgmp.m4 (gl_LIBGMP): If gl_HAVE_MODULE_HAVELIB is not defined,
33808         use the more-traditional AC_SEARCH_LIBS approach.
33809         This should work better with GNU Emacs configuration,
33810         which uses pkg-config instead of a havelib-style approach.
33811         * modules/havelib (gl_HAVE_MODULE_HAVELIB): New witness macro.
33812         * modules/libgmp (Depends-on): Remove havelib.
33814         libgmp: remove HAVE_GMP, LIB_GMP
33815         * m4/libgmp.m4 (gl_LIBGMP): Do not define HAVE_GMP and LIB_GMP, as
33816         they’re redundant.  I’ll adjust GNU Coreutils accordingly.
33818 2020-07-26  Bruno Haible  <bruno@clisp.org>
33820         inttypes: Remove support for AIX 4.
33821         * lib/inttypes.in.h: Assume that PRI_MACROS_BROKEN is 0.
33822         * m4/inttypes-pri.m4: Remove file.
33823         * m4/inttypes.m4 (gl_INTTYPES_PRI_SCN): Don't require gt_INTTYPES_PRI.
33824         (gl_INTTYPES_H_DEFAULTS): Don't initialize PRI_MACROS_BROKEN.
33825         * modules/inttypes-incomplete (Makefile.am): Don't substitute
33826         PRI_MACROS_BROKEN.
33827         * modules/inttypes (Files): Remove m4/inttypes-pri.m4.
33829 2020-07-26  Bruno Haible  <bruno@clisp.org>
33831         gettimeofday: Remove workaround for Mac OS X 10.0.
33832         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY_CLOBBER): Remove macro.
33833         (gl_FUNC_GETTIMEOFDAY): Don't invoke it.
33834         * lib/gettimeofday.c: Don't include localtime-buffer.h.
33835         (gettimeofday): Don't test GETTIMEOFDAY_CLOBBERS_LOCALTIME.
33836         * lib/localtime.c: Don't test GETTIMEOFDAY_CLOBBERS_LOCALTIME.
33837         * modules/gettimeofday (Depends-on): Remove localtime-buffer.
33838         * modules/localtime-buffer: Remove file.
33839         * lib/localtime-buffer.h: Remove file.
33840         * lib/localtime-buffer.c: Remove file.
33841         * m4/localtime-buffer.m4: Remove file.
33842         * MODULES.html.sh (Date and time <time.h>): Remove localtime-buffer.
33844 2020-07-26  Bruno Haible  <bruno@clisp.org>
33846         tzset: Remove workaround for Solaris 2.6.
33847         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Remove macro.
33848         (gl_FUNC_TZSET): Don't invoke it. Don't define TZSET_CLOBBERS_LOCALTIME.
33849         Don't require gl_LOCALTIME_BUFFER_DEFAULTS.
33850         * lib/localtime-buffer.h: Don't test TZSET_CLOBBERS_LOCALTIME.
33851         * lib/localtime-buffer.c: Likewise.
33852         * lib/localtime.c: Likewise.
33853         * lib/tzset.c: Don't include localtime-buffer.h.
33854         (tzset): Don't test TZSET_CLOBBERS_LOCALTIME.
33855         * lib/nstrftime.c (__strftime_internal): Assume HAVE_RUN_TZSET_TEST
33856         is 1.
33857         * modules/tzset (Depends-on): Remove localtime-buffer.
33859 2020-07-26  Bruno Haible  <bruno@clisp.org>
33861         expl: Simplify autoconf test.
33862         * m4/expl.m4 (gl_FUNC_EXPL): Merge the "checking whether expl() breaks
33863         with small values..." test into the "checking whether expl works..."
33864         test.
33866 2020-07-26  Bruno Haible  <bruno@clisp.org>
33868         alloca: Remove Cray-2 and Cray Y-MP support.
33869         * m4/alloca.m4 (_AC_LIBOBJ_ALLOCA): Don't define CRAY_STACKSEG_END.
33870         Enable also on Autoconf >= 2.69.
33871         * lib/alloca.c (ADDRESS_FUNCTION, struct stack_control_header,
33872         struct stack_segment_linkage, struct stk_stat, struct stk_trailer,
33873         i00afunc): Remove.
33875 2020-07-25  Bruno Haible  <bruno@clisp.org>
33877         multiarch: Prepare for x86_64+arm64 universal binaries in macOS 11.
33878         * m4/multiarch.m4 (gl_MULTIARCH): Recognize also the ARM architectures.
33880 2020-07-25  Bruno Haible  <bruno@clisp.org>
33882         sigprocmask: Small autoconf macro improvement.
33883         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Make it possible for the
33884         user to override the value of gl_cv_func_sigprocmask.
33885         * m4/gnulib-common.m4 (gl_SILENT): New macro.
33887 2020-07-25  Bruno Haible  <bruno@clisp.org>
33889         Small autoconf macro improvements.
33890         * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Make it possible for the user to
33891         override the value of gl_cv_func_working_mktime.
33892         * m4/multiarch.m4 (gl_MULTIARCH): Show a line "checking whether the
33893         compiler produces multi-arch binaries..." in the configure output.
33894         * m4/size_max.m4 (gl_SIZE_MAX): When not found, say "no".
33895         * m4/parse-datetime.m4 (gl_C_COMPOUND_LITERALS): Improve indentation.
33897 2020-07-25  Bruno Haible  <bruno@clisp.org>
33899         doc: Update for NetBSD 7.1, 8.0, 9.0.
33900         * doc/*/*.texi: Update.
33901         * m4/exp2l.m4: Update comments.
33902         * m4/expl.m4: Likewise.
33903         * m4/ilogb.m4: Likewise.
33904         * m4/ilogbf.m4: Likewise.
33905         * m4/log10l.m4: Likewise.
33906         * m4/logl.m4: Likewise.
33907         * m4/printf.m4: Likewise.
33908         * m4/rintl.m4: Likewise.
33909         * m4/wcwidth.m4: Likewise.
33911 2020-07-24  Bruno Haible  <bruno@clisp.org>
33913         doc: Update for Mac OS X 10.13.
33914         * doc/*/*.texi: Update.
33915         * m4/expm1l.m4: Update comments.
33916         * m4/getgroups.m4: Likewise.
33917         * m4/getlogin_r.m4: Likewise.
33918         * m4/linkat.m4: Likewise.
33919         * m4/printf.m4: Likewise.
33921 2020-07-24  Bruno Haible  <bruno@clisp.org>
33923         doc: Update for Cygwin 2.9.0.
33924         * doc/*/*.texi: Update.
33926 2020-07-24  Paul Eggert  <eggert@cs.ucla.edu>
33928         parse-datetime: modernize doc
33929         * doc/parse-datetime.texi: Use more-current examples.
33930         Don’t lead with 32-bit time_t, as it’s on its way out.
33931         Capitalize “Epoch” to be consistent with POSIX.
33933         timespec: remove dependence on ‘verify’
33934         * lib/timespec.h: Do not include verify.h; no longer needed.
33935         * modules/timespec (Depends-on): Remove ‘verify’.
33937         Optimize a few more three-valued comparisons
33938         * lib/timespec.h (timespec_cmp, timespec_sign):
33939         * lib/utimecmp.c (utimecmpat):
33940         Avoid conditional branches by using _GL_CMP.
33942         Fix _GL_CMP parenthesization typo
33943         * m4/gnulib-common.m4 (_GL_CMP): Properly parenthesize.
33945 2020-07-24  Bruno Haible  <bruno@clisp.org>
33947         dfa: Revert breaking gawk.
33948         Reported by Arnold Robbins <arnold@skeeve.com>.
33949         * lib/dfa.c (compare): Don't reference the _GL_CMP macro.
33951 2020-07-23  Bruno Haible  <bruno@clisp.org>
33953         Optimize three-valued comparison between integers.
33954         (a > b ? 1 : a < b ? -1 : 0) is the same as (a > b) - (a < b).
33955         * m4/gnulib-common.m4 (gl_COMMON): Define _GL_CMP.
33956         * lib/c-strcasecmp.c (c_strcasecmp): Use _GL_CMP.
33957         * lib/c-strncasecmp.c (c_strncasecmp): Likewise.
33958         * lib/dfa.c (compare): Likewise.
33959         * lib/fts.c (fts_compare_ino): Likewise.
33960         * lib/mbmemcasecmp.c (mbmemcasecmp): Likewise.
33961         * lib/mbscasecmp.c (mbscasecmp): Likewise.
33962         * lib/mbsncasecmp.c (mbsncasecmp): Likewise.
33963         * lib/memcasecmp.c (memcasecmp): Likewise.
33964         * lib/memcmp2.c (memcmp2): Likewise.
33965         * lib/savedir.c (direntry_cmp_inode): Likewise.
33966         * lib/strcasecmp.c (strcasecmp): Likewise.
33967         * lib/strncasecmp.c (strncasecmp): Likewise.
33968         * lib/unistr/u-cmp2.h (FUNC): Likewise.
33970 2020-07-23  Bruno Haible  <bruno@clisp.org>
33972         lchmod: Use /proc on Cygwin.
33973         * lib/lchmod.c (lchmod): Use /proc on Cygwin.
33975 2020-07-23  Ken Brown  <kbrown@cornell.edu>
33977         fchmodat: Use /proc on Cygwin
33978         * lib/fchmodat.c (fchmodat): Use /proc on Cygwin.
33980 2020-07-21  Bruno Haible  <bruno@clisp.org>
33982         aligned-malloc: Optionally use aligned_alloc.
33983         * lib/aligned-malloc.h: Verify the alignment.
33984         (aligned_malloc): Use aligned_alloc as an alternative.
33985         * modules/aligned-malloc (configure.ac): Test for aligned_alloc.
33986         * doc/posix-functions/aligned_alloc.texi: Mention the modules
33987         'aligned-malloc' and 'pagealign_alloc'.
33989 2020-07-21  Bruno Haible  <bruno@clisp.org>
33991         aligned-malloc: Add tests.
33992         * tests/test-aligned-malloc.c: New file.
33993         * modules/aligned-malloc-tests: New file.
33995         aligned-malloc: New module.
33996         * lib/aligned-malloc.h: New file.
33997         * m4/malloc-align.m4: New file.
33998         * modules/aligned-malloc: New file.
33999         * doc/posix-functions/posix_memalign.texi: Mention the new module.
34000         * doc/glibc-functions/memalign.texi: Likewise.
34002 2020-07-21  Bruno Haible  <bruno@clisp.org>
34004         inttypes: Fix PRI*PTR and SCN*PTR on 64-bit native Windows.
34005         * m4/inttypes.m4 (gl_INTTYPES_PRI_SCN): On 64-bit native Windows, make
34006         sure PRIPTR_PREFIX is defined to "ll", not "l".
34008 2020-07-21  Bruno Haible  <bruno@clisp.org>
34010         printf-posix: Make an autoconf test more future-proof.
34011         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_N): Include <inttypes.h> before
34012         using uintptr_t.
34014 2020-07-20  Bruno Haible  <bruno@clisp.org>
34016         list, oset, omap: Relicense some of the container modules under LGPLv2+.
34017         * modules/list (License): Change to LGPLv2+.
34018         * modules/array-list (License): Likewise.
34019         * modules/carray-list (License): Likewise.
34020         * modules/linked-list (License): Likewise.
34021         * modules/avltree-list (License): Likewise.
34022         * modules/rbtree-list (License): Likewise.
34023         * modules/oset (License): Likewise.
34024         * modules/array-oset (License): Likewise.
34025         * modules/avltree-oset (License): Likewise.
34026         * modules/rbtree-oset (License): Likewise.
34027         * modules/omap (License): Likewise.
34028         * modules/array-omap (License): Likewise.
34029         * modules/avltree-omap (License): Likewise.
34030         * modules/rbtree-omap (License): Likewise.
34032 2020-07-20  Bruno Haible  <bruno@clisp.org>
34034         oset: Add an 'update' operation.
34035         * lib/gl_array_oset.c (gl_array_update): New function.
34036         (gl_array_oset_implementation): Use it.
34037         * lib/gl_avltree_omap.c (NODE_PAYLOAD_DISPOSE): Add parameters.
34038         * lib/gl_rbtree_omap.c (NODE_PAYLOAD_DISPOSE): Add parameters.
34039         * lib/gl_avltree_ordered.h (gl_tree_add_node_before): New function,
34040         extracted from gl_tree_nx_add_before.
34041         (gl_tree_nx_add_before): Invoke it.
34042         (gl_tree_add_node_after): New function, extracted from
34043         gl_tree_nx_add_after.
34044         (gl_tree_nx_add_after): Invoke it.
34045         (gl_tree_remove_node_no_free): New function, extracted from
34046         gl_tree_remove_node.
34047         (gl_tree_remove_node): Invoke it.
34048         * lib/gl_rbtree_ordered.h (gl_tree_add_node_before): New function,
34049         extracted from gl_tree_nx_add_before.
34050         (gl_tree_nx_add_before): Invoke it.
34051         (gl_tree_add_node_after): New function, extracted from
34052         gl_tree_nx_add_after.
34053         (gl_tree_nx_add_after): Invoke it.
34054         (gl_tree_remove_node_no_free): New function, extracted from
34055         gl_tree_remove_node.
34056         (gl_tree_remove_node): Invoke it.
34057         * lib/gl_anytree_oset.h (gl_tree_next_node): New function, extracted
34058         from gl_tree_iterator_next.
34059         (gl_tree_iterator_next): Invoke it.
34060         (gl_tree_prev_node, gl_tree_update): New functions.
34061         * lib/gl_avltree_oset.c (NODE_PAYLOAD_DISPOSE): Add parameters.
34062         (gl_avltree_oset_implementation): Use gl_tree_update.
34063         * lib/gl_rbtree_oset.c (NODE_PAYLOAD_DISPOSE): Add parameters.
34064         (gl_rbtree_oset_implementation): Use gl_tree_update.
34065         * lib/gl_oset.h (struct gl_oset_implementation): Add 'update' member.
34066         (gl_oset_update): New function.
34067         * lib/gl_oset.hh (gl_OSet): Add 'update' member.
34068         * modules/avltree-oset (configure.ac): Require AC_C_INLINE.
34069         * modules/rbtree-oset (configure.ac): Likewise.
34070         * tests/test-oset-update.h: New file.
34071         * tests/test-array_oset.c: Include test-oset-update.h.
34072         (main): Invoke test_update.
34073         * tests/test-avltree_oset.c: Likewise.
34074         * tests/test-rbtree_oset.c: Likewise.
34075         * modules/array-oset-tests (Files): Add tests/test-oset-update.h.
34076         * modules/avltree-oset-tests (Files): Likewise.
34077         * modules/rbtree-oset-tests (Files): Likewise.
34078         * tests/test-oset-c++.cc (action): New function.
34079         (main): Test the 'update' member function.
34081 2020-07-15  Paul Eggert  <eggert@cs.ucla.edu>
34083         md5, sha1, sha256, sha512: pacify Autoconf 2.70
34084         * m4/gl-openssl.m4 (gl_CRYPTO_CHECK): Use m4_if rather than a
34085         shell if, so that the argument to AC_CHECK_HEADERS is
34086         a simple string that does not require shell evaluation.
34087         This fixes a warning generated by Autoconf 2.69b.
34089 2020-07-12  Bruno Haible  <bruno@clisp.org>
34091         libgmp: Avoid warning when --without-libgmp is used.
34092         * lib/mini-gmp-gnulib.c: Ignore -Wsuggest-attribute=malloc only for
34093         GCC >= 8, not for GCC >= 4.6.
34095 2020-07-12  Bruno Haible  <bruno@clisp.org>
34097         libgmp: Link to the correct shared library.
34098         * m4/libgmp.m4 (gl_LIBGMP): Invoke AC_LIB_HAVE_LINKFLAGS.
34099         * modules/libgmp (Depends-on): Add havelib.
34100         (Link): Mention $(LIBGMP) and $(LTLIBGMP).
34101         * modules/libgmp-tests (Makefile.am): Link test-libgmp with $(LIBGMP).
34103 2020-07-12  Bruno Haible  <bruno@clisp.org>
34105         libgmp tests: Add some safety checks.
34106         * modules/libgmp-tests (Depends-on): Add verify.
34107         * tests/test-libgmp.c: Verify GMP_NUMB_BITS value.
34108         (main): Verify that gmp.h and libgmp versions match.
34110 2020-07-10  Bruno Haible  <bruno@clisp.org>
34112         unicodeio: Fix wrong result on NetBSD.
34113         * lib/unicodeio.c (unicode_to_mb): Handle question mark fallback
34114         characters also on NetBSD.
34116 2020-07-09  Bruno Haible  <bruno@clisp.org>
34118         unicodeio: Fix wrong result on Solaris 11.
34119         Reported by Kiyoshi Kanazawa <yoi_no_myoujou@yahoo.co.jp>
34120         via Akim Demaille <akim.demaille@gmail.com> in
34121         <https://lists.gnu.org/archive/html/bug-gnulib/2020-07/msg00036.html>.
34122         * lib/unicodeio.c (unicode_to_mb): Handle question mark fallback
34123         characters on Solaris.
34124         * tests/test-unicodeio.c (main): In the "C" locale, expect either the
34125         UTF-8 output or the specified fallback.
34127 2020-07-08  Bruno Haible  <bruno@clisp.org>
34129         unicodeio: Add tests.
34130         * tests/test-unicodeio.c: New file.
34131         * tests/test-unicodeio1.sh: New file.
34132         * tests/test-unicodeio2.sh: New file.
34133         * tests/test-unicodeio3.sh: New file.
34134         * modules/unicodeio-tests: New file.
34136 2020-07-08  Bruno Haible  <bruno@clisp.org>
34138         unicodeio: Document link requirements.
34139         * modules/unicodeio (Link): New section.
34141 2020-07-07  Bruno Haible  <bruno@clisp.org>
34143         doc: Remove support for some very old platforms.
34144         * doc/posix-functions/memcmp.texi: Don't mention "older platforms".
34145         * doc/posix-functions/memcpy.texi: Likewise.
34146         * doc/posix-functions/memmove.texi: Likewise.
34147         * doc/posix-functions/memset.texi: Likewise.
34148         * doc/posix-functions/getcwd.texi: Likewise.
34150         memchr: Remove support for some very old platforms.
34151         * m4/memchr-obsolete.m4: Remove file.
34152         * modules/memchr-obsolete: Remove file.
34153         * m4/memchr.m4 (gl_FUNC_MEMCHR): Assume module 'memchr-obsolete' is
34154         absent. Don't define HAVE_MEMCHR.
34155         * lib/string.in.h (memchr): Assume HAVE_MEMCHR is 1.
34156         * modules/memchr (Depends-on): Remove memchr-obsolete.
34157         (configure.ac): Assume HAVE_MEMCHR is 1.
34158         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
34159         HAVE_MEMCHR.
34160         * modules/string (Makefile.am): Don't substitute HAVE_MEMCHR.
34161         * doc/posix-functions/memchr.texi: Don't mention module
34162         'memchr-obsolete'.
34163         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Assume HAVE_MEMCHR is 1.
34164         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE): Assume HAVE_MEMCHR is 1.
34165         * modules/strnlen (Depends-on): Remove memchr-obsolete.
34167         dup2: Remove support for some very old platforms.
34168         * m4/dup2-obsolete.m4: Remove file.
34169         * modules/dup2-obsolete: Remove file.
34170         * m4/dup2.m4 (gl_FUNC_DUP2): Assume module 'dup2-obsolete' is absent.
34171         Don't define HAVE_DUP2.
34172         * lib/unistd.in.h (dup2): Assume HAVE_DUP2 is 1.
34173         * lib/dup2.c: Likewise.
34174         * modules/dup2 (Depends-on, configure.ac): Likewise.
34175         (Depends-on): Remove dup2-obsolete.
34176         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Don't initialize HAVE_DUP2.
34177         * modules/unistd (Makefile.am): Don't substitute HAVE_DUP2.
34178         * doc/posix-functions/dup2.texi: Don't mention module 'dup2-obsolete'.
34180 2020-07-07  Bruno Haible  <bruno@clisp.org>
34182         canonicalize: Trim module dependencies.
34183         * lib/hash-triple.h: Group declarations.
34184         * lib/hash-triple-simple.c: New file, extracted from lib/hash-triple.c.
34185         * lib/hash-triple.c: Don't include <stdlib.h>, <string.h>, hash-pjw.h.
34186         (STREQ): Remove macro.
34187         (triple_hash, triple_compare_ino_str, triple_free): Remove functions.
34188         * modules/hash-triple-simple: New file, based on modules/hash-triple.
34189         * modules/hash-triple (Files): Remove lib/hash-triple.h.
34190         (Depends-on): Add hash-triple-simple. Remove hash-pjw.
34191         * modules/canonicalize (Depends-on): Remove hash-triple. Add
34192         hash-triple-simple.
34193         * modules/file-set (Depends-on): Likewise.
34195 2020-07-07  Bruno Haible  <bruno@clisp.org>
34197         Clarify dependencies to double-slash-root.
34198         * modules/canonicalize (Files): Remove m4/double-slash-root.m4.
34199         (Depends-on): Add double-slash-root.
34200         * modules/canonicalize-lgpl (Depends-on): Add double-slash-root.
34201         * modules/dirname-lgpl (Depends-on): Add double-slash-root.
34203 2020-07-06  Paul Eggert  <eggert@cs.ucla.edu>
34205         libgmp: new module
34206         The idea is to let programs simply include <gmp.h>, and
34207         so long as they live within the mini-gmp subset they need
34208         not worry about whether the GMP libraries are installed.
34209         * MODULES.html.sh: Mention it.
34210         * config/srclist.txt: Mention files copied from GMP source.
34211         * config/srclistvars.sh (GMP): New var.
34212         * lib/mini-gmp-gnulib.c, m4/libgmp.m4, modules/libgmp:
34213         * modules/libgmp-tests, tests/test-libgmp.c: New files.
34214         * lib/mini-gmp.c, lib/mini-gmp.h: New files, copied from GMP.
34216 2020-07-05  Bruno Haible  <bruno@clisp.org>
34218         mkancesdirs: Trim module dependencies.
34219         * lib/mkancesdirs.c: Include filename.h instead of dirname.h.
34220         * modules/mkancesdirs (Depends-on): Remove dirname-lgpl. Add filename.
34222 2020-07-05  Bruno Haible  <bruno@clisp.org>
34224         getprogname: Trim module dependencies.
34225         * lib/getprogname.c: Include basename-lgpl.h instead of dirname.h.
34226         * modules/getprogname (Depends-on): Remove dirname-lgpl. Add
34227         basename-lgpl.
34229 2020-07-05  Bruno Haible  <bruno@clisp.org>
34231         filenamecat-lgpl: Trim module dependencies.
34232         * lib/filenamecat-lgpl.c: Include basename-lgpl.h, filename.h instead of
34233         dirname.h.
34234         * modules/filenamecat-lgpl (Depends-on): Remove dirname-lgpl. Add
34235         basename-lgpl, filename.
34237 2020-07-05  Bruno Haible  <bruno@clisp.org>
34239         backupfile, backup-rename: Trim module dependencies.
34240         * lib/backupfile.c: Include basename-lgpl.h instead of dirname.h.
34241         * modules/backupfile (Depends-on): Remove dirname-lgpl. Add
34242         basename-lgpl.
34243         * modules/backup-rename (Depends-on): Likewise.
34245 2020-07-05  Bruno Haible  <bruno@clisp.org>
34247         argp: Trim module dependencies.
34248         * lib/argp-namefrob.h: Include basename-lgpl.h instead of dirname.h.
34249         * modules/argp (Depends-on): Remove dirname-lgpl. Add basename-lgpl.
34251 2020-07-05  Bruno Haible  <bruno@clisp.org>
34253         basename-lgpl: New module.
34254         * lib/basename-lgpl.h: New file, based on lib/dirname.h and
34255         lib/basename-lgpl.c.
34256         * lib/basename-lgpl.c: Include basename-lgpl.h, not dirname.h. Include
34257         <stdbool.h>, filename.h.
34258         (last_component): Rename a local variable.
34259         * lib/dirname.h: Include basename-lgpl.h.
34260         (DOUBLE_SLASH_IS_DISTINCT_ROOT): Remove macro.
34261         (last_component, base_len): Remove declarations.
34262         * modules/basename-lgpl: New file.
34263         * modules/dirname-lgpl (Files): Remove lib/basename-lgpl.c.
34264         (Depends-on): Add basename-lgpl. Remove double-slash-root.
34265         (Makefile.am): Don't compile basename-lgpl.c.
34266         * doc/posix-functions/basename.texi: Mention the module 'basename-lgpl',
34267         not 'dirname'.
34269 2020-07-05  Bruno Haible  <bruno@clisp.org>
34271         dirname, dirname-lgpl: Simplify.
34272         * m4/dirname.m4: Remove file.
34273         * modules/dirname (configure.ac): Don't invoke gl_DIRNAME.
34274         * modules/dirname-lgpl (Files): Remove m4/dirname.m4.
34275         (configure.ac): Don't invoke gl_DIRNAME_LGPL.
34277 2020-07-05  Bernhard Voelker  <mail@bernhard-voelker.de>
34279         tests: avoid shadowing warning
34280         * tests/test-memchr.c (main): Give page_boundary variable a tight scope.
34282 2020-07-05  Bruno Haible  <bruno@clisp.org>
34284         supersede: Add tests.
34285         * tests/test-supersede.c: New file.
34286         * tests/test-supersede-open.h: New file.
34287         * tests/test-supersede-fopen.h: New file.
34288         * modules/supersede-tests: New file.
34290         supersede: New module.
34291         * lib/supersede.h: New file.
34292         * lib/supersede.c: New file.
34293         * m4/supersede.m4: New file.
34294         * modules/supersede: New file.
34296 2020-07-05  Bruno Haible  <bruno@clisp.org>
34298         Add some copyright headers.
34299         * lib/dev-ino.h: Add copyright header.
34300         * lib/di-set.h: Likewise.
34301         * lib/fchown-stub.c: Likewise.
34302         * lib/file-set.h: Likewise.
34303         * lib/hash-triple.h: Likewise.
34304         * lib/idcache.h: Likewise.
34305         * lib/ino-map.h: Likewise.
34306         * lib/mkancesdirs.h: Likewise.
34307         * lib/scratch_buffer.h: Likewise.
34308         * lib/se-context.in.h: Likewise.
34309         * lib/stdopen.h: Likewise.
34310         * lib/userspec.h: Likewise.
34312 2020-07-04  Bruno Haible  <bruno@clisp.org>
34314         getrandom: Relicense under LGPLv2+.
34315         Paul Eggert's approval is in
34316         <https://lists.gnu.org/archive/html/bug-gnulib/2020-07/msg00023.html>.
34317         * modules/getrandom (License): Change to LGPLv2+.
34319 2020-07-04  Bruno Haible  <bruno@clisp.org>
34321         getumask: Add tests.
34322         * tests/test-getumask.c: New file.
34323         * modules/getumask-tests: New file.
34325         getumask: New module.
34326         * lib/sys_stat.in.h (getumask): New declaration.
34327         * lib/getumask.c: New file.
34328         * m4/getumask.m4: New file.
34329         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Test whether getumask is
34330         declared.
34331         (gl_SYS_STAT_H_DEFAULTS): Initialize GNULIB_GETUMASK, HAVE_GETUMASK.
34332         * modules/sys_stat (Makefile.am): Substitute GNULIB_GETUMASK,
34333         HAVE_GETUMASK.
34334         * modules/getumask: New file.
34335         * tests/test-sys_stat-c++.cc (getumask): Check signature.
34336         * doc/glibc-functions/getumask.texi: New file.
34337         * doc/gnulib.texi (Glibc sys/stat.h): Include it.
34339 2020-07-04  Bruno Haible  <bruno@clisp.org>
34341         clean-temp: Add support for temporary files with given mode.
34342         * lib/clean-temp.h (gen_register_open_temp): Add mode argument.
34343         * lib/clean-temp.c (struct try_create_file_params): New type.
34344         (try_create_file): New function.
34345         (gen_register_open_temp): Add mode argument. Use try_tempname instead of
34346         gen_tempname.
34348 2020-07-04  Bruno Haible  <bruno@clisp.org>
34350         clean-temp: Document limitations.
34351         * lib/clean-temp.h: Document limitations.
34353 2020-07-04  Bruno Haible  <bruno@clisp.org>
34355         clean-temp: Add support for temporary files with unpredictable names.
34356         * lib/clean-temp.h (gen_register_open_temp): New declaration.
34357         * lib/clean-temp.c: Include tempname.h.
34358         (gen_register_open_temp): New function.
34359         * modules/tempname (configure.ac): Define a module indicator.
34361 2020-07-04  Bruno Haible  <bruno@clisp.org>
34363         clean-temp: Add support for temporary files anywhere in the file system.
34364         * lib/clean-temp.h (register_temporary_file, unregister_temporary_file,
34365         cleanup_temporary_file): New declarations.
34366         * lib/clean-temp.c (file_cleanup_list_lock, file_cleanup_list): New
34367         variables.
34368         (dir_cleanup_list_lock): Renamed from cleanup_list_lock.
34369         (dir_cleanup_list): Renamed from cleanup_list.
34370         (cleanup_action): Process the file_cleanup_list as well.
34371         (do_init_clean_temp): New function.
34372         (clean_temp_once): New variable.
34373         (init_clean_temp): New function.
34374         (create_temp_dir): Invoke it.
34375         (register_temporary_file, unregister_temporary_file,
34376         cleanup_temporary_file): New functions.
34377         (do_unlink, do_rmdir): Remove 'dir' argument. Add 'cleanup_verbose'
34378         argument.
34380 2020-07-04  Bruno Haible  <bruno@clisp.org>
34382         clean-temp: Improve comments.
34383         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
34384         fwriteerror_temp, close_stream_temp): Clarify intended use.
34385         * lib/clean-temp.c: Likewise.
34387 2020-07-04  Bruno Haible  <bruno@clisp.org>
34389         clean-temp: Make multithread-safe, part 2.
34390         * lib/fatal-signal.h: Include <signal.h>.
34391         (get_fatal_signal_set): New declaration.
34392         * lib/fatal-signal.c (get_fatal_signal_set): New function.
34393         * lib/clean-temp.c: Include asyncsafe-spin.h, gl_linked_list.h.
34394         (struct closeable_fd): New type.
34395         (fatal_signal_set): New variable.
34396         (init_fatal_signal_set): New function.
34397         (asyncsafe_close, asyncsafe_fclose_variant): New functions.
34398         (cleanup_action): Invoke asyncsafe_close instead of close.
34399         (create_temp_dir): Invoke init_fatal_signal_set.
34400         (register_fd): Use a plain linked list. Add a 'struct closeable_fd *'
34401         element.
34402         (unregister_fd): Remove function.
34403         (close_temp): Cleanup descriptors list on the fly. Invoke
34404         init_fatal_signal_set. Invoke asyncsafe_close instead of close.
34405         (fclose_variant_temp): New function.
34406         (fclose_temp, fwriteerror_temp, close_stream_temp): Use it.
34407         * modules/clean-temp (Depends-on): Add asyncsafe-spin, linked-list.
34409 2020-07-04  Bruno Haible  <bruno@clisp.org>
34411         clean-temp: Make multithread-safe, part 1.
34412         * lib/clean-temp.c: Include glthread/lock.h.
34413         (cleanup_list_lock): New variable.
34414         (register_temp_file, unregister_temp_file, register_temp_subdir,
34415         unregister_temp_subdir, cleanup_temp_dir_contents): Use it.
34416         (create_temp_dir): Likewise. Don't free the old array.
34417         (descriptors_lock): New variable.
34418         (register_fd, unregister_fd): Use it.
34419         * modules/clean-temp (Depends-on): Add lock.
34421 2020-07-04  Bruno Haible  <bruno@clisp.org>
34423         fatal-signal: Make multithread-safe.
34424         * lib/fatal-signal.c (init_fatal_signals): Add comment.
34425         (do_init_fatal_signal_set): New function, extracted from
34426         init_fatal_signal_set.
34427         (fatal_signal_set_once): New variable.
34428         (init_fatal_signal_set): Use gl_once.
34430 2020-07-03  Bruno Haible  <bruno@clisp.org>
34432         getrandom: Fix compilation error on native Windows (regr. 2020-06-28).
34433         * lib/getrandom.c: Don't include <ntdef.h>. Instead, define NTSTATUS.
34434         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Include <windows.h> before
34435         <bcrypt.h>.
34437 2020-07-03  Bruno Haible  <bruno@clisp.org>
34439         dfa tests: Follow common file naming conventions.
34440         * tests/test-dfa-match-aux.c: Renamed from tests/dfa-match-aux.c.
34441         * tests/test-dfa-match.sh: Renamed from tests/dfa-match.sh. Update.
34442         * tests/test-dfa-invalid-char-class.sh: Renamed from
34443         tests/dfa-invalid-char-class.sh. Update.
34444         * modules/dfa-tests (Files, Makefile.am): Update.
34446 2020-07-03  Bruno Haible  <bruno@clisp.org>
34448         asyncsafe-spin: Use GCC extended asm syntax for SunStudio 12 compiler.
34449         * lib/asyncsafe-spin.c (memory_barrier, atomic_compare_and_swap): Use
34450         the GCC extended asm syntax also for the Sun Studio 12 compilers.
34452 2020-07-03  Bruno Haible  <bruno@clisp.org>
34454         asyncsafe-spin: Reduce code duplication.
34455         * lib/asyncsafe-spin.c (do_lock, do_unlock): New functions.
34456         (asyncsafe_spin_lock, asyncsafe_spin_unlock): Use them.
34457         * modules/asyncsafe-spin (configure.ac): Require AC_C_INLINE.
34459 2020-07-03  Bruno Haible  <bruno@clisp.org>
34461         lchmod: Simplify after 2020-02-22 change.
34462         * m4/lchmod.m4 (gl_FUNC_LCHMOD): Don't require AC_C_INLINE.
34464 2020-07-03  Bruno Haible  <bruno@clisp.org>
34466         gen-uni-tables: Make sure the compiler does not barf on 'inline'.
34467         * modules/gen-uni-tables (configure.ac): Require AC_C_INLINE.
34469 2020-07-03  Bruno Haible  <bruno@clisp.org>
34471         dfa: Make sure the compiler does not barf on 'inline'.
34472         * modules/dfa (configure.ac): Require AC_C_INLINE.
34474 2020-07-03  Bruno Haible  <bruno@clisp.org>
34476         bitset: Make sure the compiler does not barf on 'inline'.
34477         * modules/bitset (configure.ac): New section.
34479 2020-07-01  Paul Eggert  <eggert@cs.ucla.edu>
34481         manywarnings: improve port to GCC 10.1
34482         * build-aux/gcc-warning.spec: Also list warnings that are default
34483         or are enabled by already-given flags.  This lets us speed up
34484         checking for attributes, and makes the generated compilation
34485         commands shorter.  Add -Wanalyzer-too-complex (too much noise).
34486         * m4/manywarnings.m4 (gl_MANYWARN_COMPLEMENT)
34487         (gl_MANYWARN_ALL_GCC): Use gl_AS_VAR_APPEND to append
34488         to shell variables that may have long values.
34489         (gl_MANYWARN_ALL_GCC): Omit flags that are default or are
34490         consequences of other flags, to speed up checking and
34491         shorten commands.
34493         tests: pacify gcc -fanalyzer on zerosize_ptr
34494         * tests/test-memcasecmp.c (main):
34495         * tests/test-memchr.c (main):
34496         * tests/test-memchr2.c (main):
34497         * tests/test-memcmp.c (main):
34498         * tests/test-memmem.c (main):
34499         * tests/test-memrchr.c (main):
34500         * tests/unistr/test-chr.h (main):
34501         * tests/unistr/test-cmp.h (test_cmp):
34502         Check whether zerosize_ptr returns NULL before using it.
34503         This pacifies GCC 10.1’s new fanalyzer option, and matches
34504         other uses of zerosize_ptr.
34506 2020-07-01  Bruno Haible  <bruno@clisp.org>
34508         asyncsafe-spin: Add tests.
34509         * tests/test-asyncsafe-spin1.c: New file.
34510         * tests/test-asyncsafe-spin2.c: New file, based on tests/test-lock.c and
34511         tests/test-pthread-spin.c.
34512         * modules/asyncsafe-spin-tests: New file.
34514 2020-07-01  Bruno Haible  <bruno@clisp.org>
34516         asyncsafe-spin: New module.
34517         * lib/asyncsafe-spin.h: New file.
34518         * lib/asyncsafe-spin.c: New file, based on lib/pthread-spin.c.
34519         * modules/asyncsafe-spin: New file.
34521 2020-07-01  Bruno Haible  <bruno@clisp.org>
34523         windows-spin: Fix race condition on multiprocessor systems.
34524         * lib/windows-spin.c (glwthread_spin_init): Add a memory barrier.
34526 2020-07-01  Bruno Haible  <bruno@clisp.org>
34528         pthread-spin: Add optimized fallback for GCC versions >= 4.1, < 4.7.
34529         * lib/pthread-spin.c (pthread_spin_init, pthread_spin_lock,
34530         pthread_spin_trylock, pthread_spin_unlock): For GCC >= 4.1, < 4.7, use
34531         an implementation based on other GCC built-ins.
34533 2020-07-01  Bruno Haible  <bruno@clisp.org>
34535         pthread-spin: Optimize fallback for GCC versions >= 4.7.
34536         * lib/pthread-spin.c (pthread_spin_init, pthread_spin_lock,
34537         pthread_spin_trylock, pthread_spin_unlock): Use a lock word instead of a
34538         lock byte.
34540 2020-07-01  Bruno Haible  <bruno@clisp.org>
34542         pthread-spin: Add error checking.
34543         * lib/pthread-spin.c: Include <stdbool.h>.
34544         (pthread_spin_init, pthread_spin_lock, pthread_spin_trylock,
34545         pthread_spin_unlock) [GCC>=4.7]: Prefer an implementation that verifies
34546         the unlocks.
34547         * modules/pthread-spin (Depends-on): Add stdbool.
34549 2020-07-01  Bruno Haible  <bruno@clisp.org>
34551         pthread-spin: Add tests.
34552         * tests/test-pthread-spin.c: New file, based on tests/test-lock.c.
34553         * modules/pthread-spin-tests: New file.
34555 2020-07-01  Bruno Haible  <bruno@clisp.org>
34557         tests: Reduce code duplication.
34558         * tests/atomic-int-posix.h: New file, extracted from
34559         tests/test-pthread-mutex.c.
34560         * tests/test-pthread-mutex.c: Include it. Remove the corresponding code.
34561         * tests/test-pthread-rwlock.c: Likewise.
34562         * modules/pthread-mutex-tests (Files): Add tests/atomic-int-posix.h.
34563         * modules/pthread-rwlock-tests (Files): Likewise.
34565 2020-07-01  Bruno Haible  <bruno@clisp.org>
34567         tests: Refactor.
34568         * tests/atomic-int-isoc.h: New file, extracted from tests/test-mtx.c.
34569         * tests/test-mtx.c: Include it. Remove the corresponding code.
34570         * modules/mtx-tests (Files): Add tests/atomic-int-isoc.h.
34572 2020-07-01  Bruno Haible  <bruno@clisp.org>
34574         tests: Refactor.
34575         * tests/atomic-int-gnulib.h: New file, extracted from tests/test-lock.c.
34576         * tests/test-lock.c: Include it. Remove the corresponding code.
34577         * modules/lock-tests (Files): Add tests/atomic-int-gnulib.h.
34579 2020-06-29  Bruno Haible  <bruno@clisp.org>
34581         sys_socket: Don't define socklen_t if it is already defined on mingw.
34582         Reported by Keith Marshall <keith.d.marshall@ntlworld.com> in
34583         <https://savannah.gnu.org/bugs/?57725>,
34584         by Rahul Das <bokul_4u@yahoo.com> in
34585         <https://lists.gnu.org/archive/html/bug-gnulib/2020-04/msg00081.html>,
34586         and by Eli Zaretskii <eliz@gnu.org> in
34587         <https://lists.gnu.org/archive/html/bug-gnulib/2020-06/msg00068.html>.
34588         * lib/sys_socket.in.h (socklen_t): Remove definition.
34590 2020-06-29  Bruno Haible  <bruno@clisp.org>
34592         alloca-opt: Fix warning on mingw.
34593         Reported and solution by Eli Zaretskii <eliz@gnu.org> in
34594         <https://lists.gnu.org/archive/html/bug-gnulib/2020-06/msg00069.html>.
34595         * lib/alloca.in.h: On mingw, include <alloca.h> and then test again
34596         whether alloca is defined.
34598 2020-06-28  Paul Eggert  <eggert@cs.ucla.edu>
34600         getrandom: do not depend on ‘open’ on mingw
34601         Similarly for at-internal, getloadavg.  These modules do not call
34602         the ‘open’ function when they are compiled on mingw.  On mingw,
34603         this avoids having to compile open.c when building Emacs, which
34604         does its own thing with ‘open’.
34605         * modules/at-internal, modules/getloadavg, modules/getrandom:
34606         (Depends-on): Don’t depend on ‘open’ on mingw.
34607         (Depends-on): Require AC_CANONICAL_HOST, for host_os.
34608         * modules/getloadavg (Depends-on):
34609         Depend on intprops, open, stdbool, stdlib only if compiling
34610         getloadavg.c.
34612 2020-06-28  Bruno Haible  <bruno@clisp.org>
34614         doc: Add a note about sigprocmask vs. pthread_sigmask.
34615         * doc/posix-functions/sigprocmask.texi: Add note.
34617 2020-06-28  Bruno Haible  <bruno@clisp.org>
34619         getrandom: Fix compilation errors on older versions of mingw.
34620         Reported by Eli Zaretskii <eliz@gnu.org> in
34621         <https://lists.gnu.org/archive/html/bug-gnulib/2020-06/msg00059.html>.
34622         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Test whether <bcrypt.h> exists.
34623         * lib/getrandom.c: If <bcrypt.h> is not available, include <ntdef.h> and
34624         define/declare BCRYPT_ALG_HANDLE, BCRYPT_USE_SYSTEM_PREFERRED_RNG,
34625         BCryptGenRandom ourselves.
34627 2020-06-28  Bruno Haible  <bruno@clisp.org>
34629         clean-temp: Fix wrong errno in error message.
34630         * lib/clean-temp.c (create_temp_dir): Save errno around
34631         unblock_fatal_signals call.
34633 2020-06-27  Bruno Haible  <bruno@clisp.org>
34635         fatal-signal: Make multithread-safe.
34636         * lib/fatal-signal.c (at_fatal_signal): Don't free the old actions array.
34638 2020-06-27  Bruno Haible  <bruno@clisp.org>
34640         clean-temp: Don't force deletion of temporary files on native Windows.
34641         * lib/clean-temp.h (open_temp, fopen_temp): Add delete_on_close
34642         argument.
34643         * lib/clean-temp.c (open_temp, fopen_temp): Likewise.
34644         * NEWS: Mention the change.
34645         * lib/javacomp.c (write_temp_file): Update.
34647 2020-06-27  Bruno Haible  <bruno@clisp.org>
34649         fatal-signal: Make multithread-safe.
34650         * lib/fatal-signal.c: Include glthread/lock.h.
34651         (at_fatal_signal_lock): New variable.
34652         (at_fatal_signal): Use it.
34653         (fatal_signals_block_lock, fatal_signals_block_counter): New variables.
34654         (block_fatal_signals, unblock_fatal_signals): Use them.
34655         * modules/fatal-signal (Depends-on): Add lock.
34657 2020-06-27  Paul Eggert  <eggert@cs.ucla.edu>
34659         getloadavg: don’t depend on fopen-gnu
34660         This is for Emacs, which does not need fopen-gnu for anything else,
34661         and which would need it only on a NetBSD platform where getloadavg
34662         does not work (does that even happen?).
34663         * lib/getloadavg.c (getloadavg) [__NetBSD__]: Use open, not fopen.
34664         * modules/getloadavg (Depends-on): Remove fopen-gnu.
34666         * tests/test-getloadavg.c (main): Fix typo.
34668 2020-06-27  Bruno Haible  <bruno@clisp.org>
34670         tempname et al.: Fix link errors on MSVC (regression from 2020-05-31).
34671         * modules/tempname (Link): New section.
34672         * modules/mkdtemp (Link): Likewise.
34673         * modules/clean-temp (Link): Likewise.
34674         * modules/mkstemp (Link): Likewise.
34675         * modules/stdlib-safer (Link): Likewise.
34676         * modules/mkstemps (Link): Likewise.
34677         * modules/mkostemp (Link): Likewise.
34678         * modules/mkostemps (Link): Likewise.
34679         * modules/tmpfile (Link): Likewise.
34680         * modules/tmpfile-safer (Link): Likewise.
34681         * modules/javacomp (Link): Add $(LIB_GETRANDOM).
34682         * modules/argv-iter-tests (Makefile.am): Link test-argv-iter with
34683         $(LIB_GETRANDOM).
34684         * NEWS: Mention the changes.
34686 2020-06-27  Bruno Haible  <bruno@clisp.org>
34688         fopen-gnu: Simplify code.
34689         * lib/fopen.c: Include <stdbool.h>.
34690         (rpl_fopen): Use a single variable open_flags instead of
34691         open_flags_standard and open_flags_gnu. Make open_flags_gnu a bool.
34692         * modules/fopen (Depends-on): Add stdbool.
34694 2020-06-26  Bruno Haible  <bruno@clisp.org>
34696         canonicalize: Improve documentation.
34697         * lib/canonicalize.h (canonicalize_filename_mode): Document the failure
34698         return convention.
34700 2020-06-26  Bruno Haible  <bruno@clisp.org>
34702         xgetcwd: Improve documentation.
34703         * lib/xgetcwd.c (xgetcwd): Document the failure return convention.
34705 2020-06-26  Bruno Haible  <bruno@clisp.org>
34707         getcwd: Improve documentation.
34708         * lib/getcwd.c (__getcwd): Document the failure return convention.
34710 2020-06-26  Bruno Haible  <bruno@clisp.org>
34712         fchdir: Improve documentation.
34713         * lib/fchdir.c (get_name, _gl_register_fd): Document the failure return
34714         convention.
34716 2020-06-26  Bruno Haible  <bruno@clisp.org>
34718         filenamecat-lgpl: Set errno upon failure.
34719         * lib/filenamecat-lgpl.c (mfile_name_concat): Document the failure
34720         return convention.
34721         * modules/filenamecat-lgpl (Depends-on): Add malloc-posix.
34723 2020-06-26  Bruno Haible  <bruno@clisp.org>
34725         areadlink-with-size: Set errno upon failure.
34726         * lib/areadlink-with-size.c (areadlink_with_size): Set errno when malloc
34727         fails.
34728         * lib/areadlinkat-with-size.c (areadlinkat_with_size): Add comment.
34730 2020-06-26  Bruno Haible  <bruno@clisp.org>
34732         copy-file: Shrink dependencies.
34733         * modules/copy-file (Depends-on): Remove acl. Add acl-permissions,
34734         qcopy-acl.
34736 2020-06-26  Bruno Haible  <bruno@clisp.org>
34738         doc: Mention declaration fixes implemented by some modules.
34739         * doc/posix-functions/chdir.texi: Mention the module 'chdir'.
34740         * doc/posix-functions/close.texi: Mention that Gnulib makes the function
34741         declaration appear in <unistd.h>.
34742         * doc/posix-functions/dup.texi: Likewise.
34743         * doc/posix-functions/dup2.texi: Likewise.
34744         * doc/posix-functions/gethostname.texi: Likewise.
34745         * doc/posix-functions/isatty.texi: Likewise.
34746         * doc/posix-functions/lseek.texi: Likewise.
34747         * doc/posix-functions/unlink.texi: Likewise.
34748         * doc/posix-functions/read.texi: Mention the module 'read'.
34749         * doc/posix-functions/write.texi: Mention the effects of the module
34750         'write'.
34752 2020-06-25  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
34754         c-dtoastr, c-ldtoastr: new modules
34755         These modules provide the same functionality as the modules
34756         dtoastr and ldtoastr except for the formatting taking place in the
34757         C locale.
34758         * MODULES.html.sh: Add c-dtoastr and c-ldtoastr.
34759         * lib/c-dtoastr.c, lib/c-ldtoastr.c: New files.
34760         * lib/ftoastr.c: Prefix exported functions when the macro C_LOCALE is
34761         defined.  Use c_snprintf and c_strtod/c_strtold instead of
34762         snprintf and strtod/strtold whhen the macro C_LOCALE is defined.
34763         * lib/ftoastr.h: Add prototypes for c_dtoastr and c_ldtoastr.
34764         * modules/c-dtoastr, modules/c-dtoastr-tests, modules/c-ldtoastr,
34765         modules/c-ldtoastr-tests: New files.
34766         * tests/test-c-dtoastr.c, tests/test-c-dtoastr.sh,
34767         tests-c-ldtoastr.c tests-c-ldtoastr.sh: New files.
34769 2020-06-21  Bruno Haible  <bruno@clisp.org>
34771         tzset: Fix compilation warnings on mingw (regression from 2017-05-01).
34772         * lib/tzset.c: Include <stdlib.h>, <string.h>.
34774 2020-06-16  Bruno Haible  <bruno@clisp.org>
34776         thread: Avoid possible compiler warnings in uses of gl_thread_exit.
34777         * lib/glthread/thread.h (gl_thread_exit): Add a cast to void.
34779 2020-06-16  Bruno Haible  <bruno@clisp.org>
34781         thread, thrd: Avoid a compiler warning.
34782         * lib/windows-thread.h (glwthread_thread_exit): Mark as non-returning.
34784 2020-06-16  Biswapriyo Nath  <nathbappai@gmail.com>  (tiny change)
34786         windows-thread: Avoid a compiler warning.
34787         * lib/windows-thread.h (glwthread_thread_exit): Change return type to
34788         void.
34789         * lib/windows-thread.c (glwthread_thread_exit): Likewise.
34791 2020-06-15  Bruno Haible  <bruno@clisp.org>
34793         unictype/joininggroup-name: Fix warning on 64-bit mingw.
34794         Reported by Biswapriyo Nath <nathbappai@gmail.com> in
34795         <https://lists.gnu.org/archive/html/bug-gnulib/2020-06/msg00036.html>.
34796         * lib/unictype/joininggroup_name.c (ELEM): Cast struct offset to size_t
34797         first.
34799 2020-06-06  Bruno Haible  <bruno@clisp.org>
34801         calloc-gnu tests: Avoid a test failure with clang.
34802         * tests/test-calloc-gnu.c (main): Mark the pointer variable as
34803         'volatile', to defeat compiler optimizations.
34805 2020-06-01  Paul Eggert  <eggert@cs.ucla.edu>
34807         getloadavg: fix double-increment bug
34808         * lib/getloadavg.c (getloadavg): Fix double-increment typo on
34809         Linux without glibc, Android, Cygwin.  This fixes a bug I
34810         introduced in 2011-02-08T20:23:29Z!eggert@cs.ucla.edu.
34811         Problem and fix reported by Semen Verchenko in:
34812         https://lists.gnu.org/r/bug-gnulib/2020-06/msg00007.html
34814         tempname: use getrandom, not getentropy
34815         This removes a dependency, as getentropy depends on getrandom.
34816         * lib/tempname.c: Include sys/random.h instead of unistd.h.
34817         (RANDOM_BITS) [!_LIBC]: Use getrandom, not getentropy.
34818         * modules/tempname (Depends-on): Depend on getrandom, not getentropy.
34820 2020-06-01  Bruno Haible  <bruno@clisp.org>
34822         doc: New chapter 'Multithreading'.
34823         * doc/multithread.texi: New file.
34824         * doc/gnulib.texi: Include it.
34826 2020-06-01  Bruno Haible  <bruno@clisp.org>
34828         doc: Move 'Running self-tests under valgrind' section.
34829         * doc/gnulib.texi (Build Infrastructure Modules): Include
34830         valgrind-tests.texi here...
34831         (Miscellaneous Notes): ... not here.
34833 2020-06-01  Bruno Haible  <bruno@clisp.org>
34835         doc: Move 'Visual Studio Compatibility' section.
34836         * doc/gnulib.texi (Native Windows Support): Include ld-output-def.texi
34837         here...
34838         (Build Infrastructure Modules): ... not here.
34840 2020-06-01  Paul Eggert  <eggert@cs.ucla.edu>
34842         doc: improve randomness discussion
34843         Inspired by comments from Jeffrey Walton in:
34844         https://lists.gnu.org/r/bug-gnulib/2020-06/msg00002.html
34845         * doc/glibc-functions/getentropy.texi (getentropy):
34846         * doc/glibc-functions/getrandom.texi (getrandom):
34847         Improve discussion of problems with "random" data,
34848         and cite Ristenpart & Yilek.  Also, mention GRND_INSECURE.
34850 2020-06-01  Bruno Haible  <bruno@clisp.org>
34852         doc: Fix Texinfo syntax error.
34853         * doc/glibc-functions/getrandom.texi: Add missing '@item'.
34855 2020-06-01  Asher Gordon  <AsDaGo@posteo.net>
34857         doc: Change '.' to '@.' where appropriate.
34858         * doc/c-ctype.texi: Change '.' to '@.' where appropriate.
34859         * doc/glibc-functions/fstatfs.texi: Likewise.
34860         * doc/glibc-functions/fts_children.texi: Likewise.
34861         * doc/glibc-functions/fts_read.texi: Likewise.
34862         * doc/glibc-functions/getdirentries.texi: Likewise.
34863         * doc/glibc-functions/mkostemp.texi: Likewise.
34864         * doc/glibc-functions/mkostemps.texi: Likewise.
34865         * doc/glibc-functions/mkstemps.texi: Likewise.
34866         * doc/glibc-functions/preadv.texi: Likewise.
34867         * doc/glibc-functions/pwritev.texi: Likewise.
34868         * doc/glibc-functions/sendfile.texi: Likewise.
34869         * doc/glibc-functions/statfs.texi: Likewise.
34870         * doc/gnulib-intro.texi: Likewise.
34871         * doc/gnulib-tool.texi: Likewise.
34872         * doc/intprops.texi: Likewise.
34873         * doc/lib-symbol-visibility.texi: Likewise.
34874         * doc/licenses-texi.texi: Likewise.
34875         * doc/pastposix-functions/bcmp.texi: Likewise.
34876         * doc/pastposix-functions/bcopy.texi: Likewise.
34877         * doc/pastposix-functions/bzero.texi: Likewise.
34878         * doc/pastposix-functions/ecvt.texi: Likewise.
34879         * doc/pastposix-functions/fcvt.texi: Likewise.
34880         * doc/pastposix-functions/ftime.texi: Likewise.
34881         * doc/pastposix-functions/gcvt.texi: Likewise.
34882         * doc/pastposix-functions/getwd.texi: Likewise.
34883         * doc/pastposix-functions/index.texi: Likewise.
34884         * doc/pastposix-functions/mktemp.texi: Likewise.
34885         * doc/pastposix-functions/rindex.texi: Likewise.
34886         * doc/pastposix-functions/wcswcs.texi: Likewise.
34887         * doc/posix-functions/aio_cancel.texi: Likewise.
34888         * doc/posix-functions/aio_error.texi: Likewise.
34889         * doc/posix-functions/aio_fsync.texi: Likewise.
34890         * doc/posix-functions/aio_read.texi: Likewise.
34891         * doc/posix-functions/aio_return.texi: Likewise.
34892         * doc/posix-functions/aio_suspend.texi: Likewise.
34893         * doc/posix-functions/aio_write.texi: Likewise.
34894         * doc/posix-functions/creat.texi: Likewise.
34895         * doc/posix-functions/ctime.texi: Likewise.
34896         * doc/posix-functions/daylight.texi: Likewise.
34897         * doc/posix-functions/fgetpos.texi: Likewise.
34898         * doc/posix-functions/fopen.texi: Likewise.
34899         * doc/posix-functions/freopen.texi: Likewise.
34900         * doc/posix-functions/fseeko.texi: Likewise.
34901         * doc/posix-functions/fsetpos.texi: Likewise.
34902         * doc/posix-functions/fstatat.texi: Likewise.
34903         * doc/posix-functions/fstatvfs.texi: Likewise.
34904         * doc/posix-functions/ftello.texi: Likewise.
34905         * doc/posix-functions/ftruncate.texi: Likewise.
34906         * doc/posix-functions/getrlimit.texi: Likewise.
34907         * doc/posix-functions/lio_listio.texi: Likewise.
34908         * doc/posix-functions/localtime.texi: Likewise.
34909         * doc/posix-functions/lseek.texi: Likewise.
34910         * doc/posix-functions/mkstemp.texi: Likewise.
34911         * doc/posix-functions/mktime.texi: Likewise.
34912         * doc/posix-functions/open.texi: Likewise.
34913         * doc/posix-functions/openat.texi: Likewise.
34914         * doc/posix-functions/opendir.texi: Likewise.
34915         * doc/posix-functions/pread.texi: Likewise.
34916         * doc/posix-functions/pwrite.texi: Likewise.
34917         * doc/posix-functions/readdir.texi: Likewise.
34918         * doc/posix-functions/readdir_r.texi: Likewise.
34919         * doc/posix-functions/scandir.texi: Likewise.
34920         * doc/posix-functions/seekdir.texi: Likewise.
34921         * doc/posix-functions/setrlimit.texi: Likewise.
34922         * doc/posix-functions/statvfs.texi: Likewise.
34923         * doc/posix-functions/strftime.texi: Likewise.
34924         * doc/posix-functions/telldir.texi: Likewise.
34925         * doc/posix-functions/timezone.texi: Likewise.
34926         * doc/posix-functions/tmpfile.texi: Likewise.
34927         * doc/posix-functions/truncate.texi: Likewise.
34928         * doc/posix-functions/tzname.texi: Likewise.
34929         * doc/posix-functions/wcsftime.texi: Likewise.
34930         * doc/windows-sockets.texi: Likewise.
34932 2020-05-31  Paul Eggert  <eggert@cs.ucla.edu>
34934         getrandom-tests: do not assume GRND_RANDOM yields short read
34935         * tests/test-getrandom.c (main): Omit assertion that
34936         getrandom (b, sizeof b, GRND_RANDOM | GRND_NONBLOCK) < sizeof b
34937         when b’s size is 100000.  This assertion fails with Linux kernel
34938         5.6.13, as that kernel ignores the GRND_RANDOM flag.
34939         The separate blocking pool is going away in the Linux kernel, and
34940         they’ve added a flag GRND_INSECURE instead; see:
34941         https://lore.kernel.org/linux-api/705c5a091b63cc5da70c99304bb97e0109be0a26.1577088521.git.luto@kernel.org/
34942         The assertion was iffy anyway; what’s to prevent a kernel from
34943         lazily filling a large buffer with random bytes?
34945         read-file-test: pacify --enable-gcc-warnings
34946         * tests/test-read-file.c (test_read_file): Now static.
34948         tempname: merge from glibc and coreutils
34949         Also, merge in Gnulib’s more-recent methods of making it easier
34950         to share between Gnulib and glibc, and fix a few randomness
34951         glitches.
34952         * lib/tempname.c: Include libc-config.h, not config.h, if !_LIBC.
34953         (__set_errno): Remove; libc-config.h does that for us.
34954         Do not include <sys/time.h>.
34955         (__secure_getenv) [_LIBC]: New macro.
34956         (__try_tempname, __getpid, __gettimeofday) [!_LIBC]: Remove macros.
34957         (RANDOM_BITS): Rewrite.
34958         (RANDOM_VALUE_MAX, BASE_62_DIGITS, BASE_62_POWER): New macros.
34959         (random_value): New typedef.
34960         (try_file, try_dir, try_nocreate): Move up.
34961         (gen_tempname_len, try_tempname_len): New functions.
34962         (gen_tempname_len): Use a constant array rather than a switch.
34963         (try_tempname_len): Don’t assume string length fits in int.
34964         Generalize use of RANDOM_BITS.  If _LIBC, don’t assume RANDOM_BITS
34965         has enough entropy (it’s a bit short).
34966         (__gen_tempname): Rewrite in terms of gen_tempname_len.
34967         (__try_tempname): Rewrite in terms of try_tempname_len.
34968         * lib/tempname.h (gen_tempname_len, try_tempname_len): New decls.
34969         * modules/tempname (Depends-on): Remove gettimeofday, sys_time.
34970         Add getentropy, libc-config.
34972 2020-05-31  Bruno Haible  <bruno@clisp.org>
34974         getrandom, getentropy: Mention the crypto/gc-random module.
34975         Suggested by Simon Josefsson in
34976         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00400.html>.
34977         * doc/glibc-functions/getrandom.texi: Mention the quality issues and the
34978         crypto/gc-random module.
34979         * doc/glibc-functions/getentropy.texi: Likewise.
34981 2020-05-31  Bruno Haible  <bruno@clisp.org>
34983         getentropy: Enhance tests.
34984         * tests/test-getentropy.c (main): Add one more test.
34985         * tests/test-unistd-c++.cc: Check the signature of getentropy.
34987 2020-05-31  Bruno Haible  <bruno@clisp.org>
34989         getentropy: Work around a macOS and Solaris problem.
34990         * lib/unistd.in.h: Include <sys/random.h>, when needed for the
34991         'getentropy' module.
34992         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
34993         UNISTD_H_HAVE_SYS_RANDOM_H.
34994         * m4/sys_random_h.m4 (gl_HEADER_SYS_RANDOM): Set
34995         UNISTD_H_HAVE_SYS_RANDOM_H.
34996         * modules/unistd (Makefile.am): Substitute UNISTD_H_HAVE_SYS_RANDOM_H.
34997         * doc/glibc-functions/getentropy.texi: Document the macOS and Solaris
34998         problem. List more platforms.
35000 2020-05-31  Paul Eggert  <eggert@cs.ucla.edu>
35002         fnmatch: merge from glibc
35003         Also, merge in Gnulib’s more-recent methods of making it easier
35004         to share between Gnulib and glibc.
35005         * lib/fnmatch.c: Reorder includes to match glibc better.
35006         Include libc-config.h instead of config.h.
35007         Include alloca.h only if _LIBC || HAVE_ALLOCA.
35008         Do not include "../locale/elem-hash.h" if _LIBC.
35009         Define macros for btowc, etc. if _LIBC.  All uses simplified.
35010         Define FALLTHROUGH if _LIBC, instead of including attribute.h.
35011         Include intprops.h, since glibc has it now.
35012         (SIZE_MAX): Remove; use (size_t) -1 instead.
35013         Omit the "Comment out all this code" ifdef, since Gnulib
35014         has never really needed it.
35015         (STREQ): Remove; no longer used.
35016         (__libc_use_alloca, alloca, alloca_account): Define as
35017         needed if !_LIBC.
35018         (ISWCTYPE): Remove; all uses replaced by iswctype.
35019         (HANDLE_MULTIBYTE): Remove.  All uses removed by assuming true.
35020         (internal_function): Remove.  All uses removed.
35021         (STRUCT): New macro.
35022         (WIDE_CHAR_VERSION): Define to 0 instead of leaving undefined.
35023         (WMEMCMP): New macro.
35024         (FINDIDX): Define if _LIBC, and include <locale/weight.h>
35025         and <locale/weightwc.h>.
35026         (fnmatch): Prefer __glibc_likely and __glibc_unlikely to
35027         __builtin_expect.  Check for integer overflow more
35028         systematically.  Account for alloca storage better when
35029         recursive.  Use strnlen instead of strlen for efficiency.
35030         * lib/fnmatch_loop.c: Include stdint.h if _LIBC, for int32_t etc.
35031         (struct STRUCT): New type.
35032         (FCT, EXT): New ENDS and ALLOCA_USED args.
35033         All callers changed.
35034         (FCT): Prefer __glibc_unlikely to __builtin_expect.
35035         Simplify by assuming WIDE_CHAR_SUPPORT.
35036         Copy _LIBC code from glibc without worrying Gnulib compatibility.
35037         Cast cold to UCHAR to avoid signedness warning.
35038         (END): Check for invalid pattern.
35039         (EXT): Improve alloca/malloc checking (taken from glibc),
35040         and improve it some more by using intprops.h and checking
35041         for integer overflow and using bool for booleans.
35042         * lib/libc-config.h (compat_symbol): New macro.
35043         (versioned_symbol): Make it ‘extern int dummy’ so that it’s
35044         acceptable to non-GCC when a trailing semicolon is added.
35045         * modules/fnmatch (Depends-on): Add alloca-opt, intprops,
35046         libc-config, strnlen.  Remove alloca.
35048 2020-05-31  Bruno Haible  <bruno@clisp.org>
35050         getrandom: Doc and test tweaks.
35051         * lib/getrandom.c (getrandom): Mention that it never returns 0, and that
35052         it sets errno when failing.
35053         * tests/test-getrandom.c (main): Disable the high-quality check on those
35054         platforms on which it fails.
35055         * doc/glibc-functions/getrandom.texi: Add Minix, AIX, HP-UX, IRIX,
35056         Cygwin to the list of platforms that don't have the function. Add a note
35057         about the quality of the result.
35058         * doc/glibc-headers/sys_random.texi: Don't mention the 'getrandom'
35059         declaration; this is fixed by module 'getrandom'.
35061 2020-05-31  Bruno Haible  <bruno@clisp.org>
35063         getrandom: Add support for native Windows.
35064         * lib/getrandom.c: Include <errno.h>, <windows.h>, <bcrypt.h>,
35065         <wincrypt.h>.
35066         (CRYPT_VERIFY_CONTEXT): New macro.
35067         (LoadLibrary, CryptAcquireContext): Redirect to the variant with suffix
35068         'A'.
35069         (GetProcAddress): New macro.
35070         (BCryptGenRandomFuncType): New type.
35071         (BCryptGenRandomFunc, initialized): New variables.
35072         (initialize): New function.
35073         (getrandom): On native Windows, use <bcrypt.h> API when available, and
35074         <wincrypt.h> API as fallback.
35075         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Set LIB_GETRANDOM.
35076         * modules/getrandom (Link): New section.
35077         * modules/getentropy (Link): Likewise.
35078         * modules/getrandom-tests (Makefile.am): Link test-getrandom against
35079         $(LIB_GETRANDOM).
35080         * modules/getentropy-tests (Makefile.am): Link test-getentropy against
35081         $(LIB_GETRANDOM).
35082         * modules/sys_random-c++-tests (Makefile.am): Link test-sys_random-c++
35083         against $(LIB_GETRANDOM).
35084         * doc/glibc-functions/getrandom.texi: Mention the native Windows
35085         support.
35087 2020-05-31  Bruno Haible  <bruno@clisp.org>
35089         getrandom: Simplify the determination of the random number devices.
35090         Suggested by Paul Eggert in
35091         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00383.html>.
35092         * lib/getrandom.c (NAME_OF_RANDOM_DEVICE, NAME_OF_NONCE_DEVICE): New
35093         macros.
35094         * modules/getrandom (Depends-on): Remove crypto/gc-random.
35096 2020-05-31  Bruno Haible  <bruno@clisp.org>
35098         crypto/gc-random: Fix list of crypto devices for Solaris.
35099         * m4/gc-random.m4 (gl_GC_RANDOM): Don't special-case Solaris.
35101 2020-05-31  Akim Demaille  <akim@lrde.epita.fr>
35103         list: fix GCC warnings
35104         * lib/gl_anytree_list2.h (gl_tree_iterator_free)
35105         (gl_tree_next_node, gl_tree_node_nx_set_value)
35106         (gl_tree_previous_node, gl_tree_next_node):
35107         Mark unused arguments.
35108         * lib/gl_anytree_oset.h (gl_tree_iterator_free): Likewise.
35109         * lib/gl_anylinked_list2.h (gl_linked_node_value)
35110         (gl_linked_node_nx_set_value, gl_linked_iterator_free): Likewise.
35112         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Avoid using
35113         the same variable name in nested scopes.
35115 2020-05-31  Bruno Haible  <bruno@clisp.org>
35117         list-c++, set-c++, oset-c++, map-c++, omap-c++: Don't fool the compiler.
35118         Reported by Akim Demaille in
35119         <https://lists.gnu.org/archive/html/bug-bison/2020-05/msg00102.html>.
35120         * lib/gl_list.hh (gl_List::iterator::next): Avoid a reinterpret_cast.
35121         * lib/gl_set.hh (gl_Set::iterator::next): Likewise.
35122         * lib/gl_oset.hh (gl_OSet::iterator::next): Likewise.
35123         * lib/gl_map.hh (gl_Map::iterator::next): Likewise.
35124         * lib/gl_omap.hh (gl_OMap::iterator::next): Likewise.
35126 2020-05-30  Bruno Haible  <bruno@clisp.org>
35128         wmemchr: Relicense under LGPLv2+.
35129         * modules/wmemchr (License): Set to LGPLv2+.
35131 2020-05-30  Bruno Haible  <bruno@clisp.org>
35133         wmempcpy: New module.
35134         Reported by Paul Eggert in
35135         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00387.html>.
35136         * lib/wchar.in.h (wmempcpy): New declaration.
35137         * lib/wmempcpy.c: New file.
35138         * m4/wmempcpy.m4: New file.
35139         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wmempcpy is declared.
35140         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WMEMPCPY, HAVE_WMEMPCPY.
35141         * modules/wchar (Makefile.am): Substitute GNULIB_WMEMPCPY,
35142         HAVE_WMEMPCPY.
35143         * modules/wmempcpy: New file.
35144         * tests/test-wchar-c++.cc: Check the signature of wmempcpy.
35145         * doc/glibc-functions/wmempcpy.texi: Mention the new module.
35146         * modules/mempcpy (Description): Fix typo.
35148 2020-05-30  Bruno Haible  <bruno@clisp.org>
35150         crypto/gc-random: Fix list of crypto devices for NetBSD, OpenBSD.
35151         * m4/gc-random.m4 (gl_GC_RANDOM): Don't special-case NetBSD and OpenBSD.
35153 2020-05-30  Bruno Haible  <bruno@clisp.org>
35155         sys_random: Work around macOS bug.
35156         * m4/sys_random_h.m4 (gl_HEADER_SYS_RANDOM): Include <sys/types.h> and
35157         <stdlib.h> before <sys/random.h>.
35158         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Likewise.
35159         * lib/sys_random.in.h: On macOS, include <sys/types.h> and <stdlib.h>
35160         first.
35161         * doc/glibc-headers/sys_random.texi: Mention the macOS problem.
35163 2020-05-30  Bruno Haible  <bruno@clisp.org>
35165         getrandom: Override incompatible system function on Solaris 11.
35166         * lib/sys_random.in.h (getrandom): Override if REPLACE_GETRANDOM is 1.
35167         * lib/getrandom.c (getrandom): When the system has getrandom, just
35168         invoke it.
35169         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Set REPLACE_GETRANDOM if the
35170         system's getrandom function's prototype is not the expected one.
35171         * m4/sys_random_h.m4 (gl_SYS_RANDOM_H_DEFAULTS): Initialize
35172         REPLACE_GETRANDOM.
35173         * modules/sys_random (Makefile.am): Substitute REPLACE_GETRANDOM.
35174         * modules/getrandom (modules/getrandom): Consider REPLACE_GETRANDOM.
35175         * tests/test-getrandom.c (main): Allow error EINVAL as an alternative to
35176         EAGAIN.
35177         * doc/glibc-functions/getrandom.texi: Mention the new module and the
35178         Solaris problem.
35180 2020-05-30  Bruno Haible  <bruno@clisp.org>
35182         sys_random: Add C++ tests.
35183         * tests/test-sys_random-c++.cc: New file.
35184         * modules/sys_random-c++-tests: New file.
35185         * modules/sys_random-tests (Depends-on): Depend on it.
35187         sys_random: Add tests.
35188         * tests/test-sys_random.c: New file.
35189         * modules/sys_random-tests: New file.
35191         sys_random: New module.
35192         * lib/sys_random.in.h: Use the common idioms for overridable header
35193         files.
35194         * m4/sys_random_h.m4: New file.
35195         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Require gl_SYS_RANDOM_H_DEFAULTS.
35196         * modules/sys_random: New file.
35197         * modules/getrandom (Files): Remove lib/sys_random.in.h.
35198         (Depends-on): Add sys_random.
35199         (configure.ac): Use gl_SYS_RANDOM_MODULE_INDICATOR, not
35200         gl_UNISTD_MODULE_INDICATOR.
35201         (Makefile.am): Don't generate sys/random.h here.
35202         * doc/glibc-headers/sys_random.texi: New file.
35203         * doc/gnulib.texi: Include it.
35205 2020-05-30  Bruno Haible  <bruno@clisp.org>
35207         unistd: Remove conflicting declaration of getrandom().
35208         * lib/unistd.in.h (getrandom): Remove declaration.
35209         * m4/unistd_h.m4 (gl_UNISTD_H): Don't test whether getrandom is
35210         declared.
35211         (gl_UNISTD_H_DEFAULTS): Don't initialize GNULIB_GETRANDOM,
35212         HAVE_GETRANDOM.
35213         * modules/unistd (Makefile.am): Don't substitute GNULIB_GETRANDOM,
35214         HAVE_GETRANDOM.
35216 2020-05-30  Bruno Haible  <bruno@clisp.org>
35218         getrandom: Add tests.
35219         * tests/test-getrandom.c: New file.
35220         * modules/getrandom-tests: New file.
35222 2020-05-30  Bruno Haible  <bruno@clisp.org>
35224         crypto/gc-random: Fix link error on MSVC.
35225         * m4/gc-random.m4 (gl_GC_RANDOM): Set LIB_GC_RANDOM.
35226         * modules/crypto/gc-random (Link): New section.
35227         * modules/crypto/gc-tests (Makefile.am): Link test-gc against
35228         $(LIB_GC_RANDOM).
35230 2020-05-30  Bruno Haible  <bruno@clisp.org>
35232         Don't assume that UNICODE is not defined.
35233         Many Windows API functions are defined differently (redirecting to a
35234         function with suffix 'W') if the application defines the macro UNICODE
35235         than by default (redirecting to a function with suffix 'A').
35236         * lib/clean-temp.c (OSVERSIONINFO, GetVersionEx): Redirect to the
35237         variant with suffix 'A'.
35238         * lib/dirent-private.h (WIN32_FIND_DATA): Likewise.
35239         * lib/gc-gnulib.c (CryptAcquireContext): Likewise.
35240         * lib/getaddrinfo.c (GetModuleHandle): Likewise.
35241         * lib/getlogin.c (GetUserName): Likewise.
35242         * lib/getlogin_r.c (GetUserName): Likewise.
35243         * lib/gettimeofday.c (LoadLibrary): Likewise.
35244         * lib/isatty.c (LoadLibrary, QueryFullProcessImageName): Likewise.
35245         * lib/link.c (GetModuleHandle, CreateHardLink): Likewise.
35246         * lib/localename.c (GetLocaleInfo, EnumSystemLocales): Likewise.
35247         * lib/mountlist.c (GetDriveType): Likewise.
35248         * lib/nonblocking.c (GetNamedPipeHandleState): Likewise.
35249         * lib/opendir.c (WIN32_FIND_DATA, GetFullPathName, FindFirstFile):
35250         Likewise.
35251         * lib/physmem.c (GetModuleHandle): Likewise.
35252         * lib/poll.c (GetModuleHandle, PeekConsoleInput, CreateEvent,
35253         PeekMessage, DispatchMessage): Likewise.
35254         * lib/progreloc.c (GetModuleFileName): Likewise.
35255         * lib/putenv.c (SetEnvironmentVariable): Likewise.
35256         * lib/read.c (GetNamedPipeHandleState): Likewise.
35257         * lib/readdir.c (FindNextFile): Likewise.
35258         * lib/relocatable.c (GetModuleFileName): Likewise.
35259         * lib/rename.c (MoveFileEx): Likewise.
35260         * lib/rewinddir.c (FindFirstFile): Likewise.
35261         * lib/select.c (GetModuleHandle, PeekConsoleInput, CreateEvent,
35262         PeekMessage, DispatchMessage): Likewise.
35263         * lib/sethostname.c (GetComputerNameEx, SetComputerNameEx): Likewise.
35264         * lib/socket.c (WSASocket): Likewise.
35265         * lib/stat-w32.c (LoadLibrary, GetFinalPathNameByHandle): Likewise.
35266         * lib/stat.c (WIN32_FIND_DATA, CreateFile, FindFirstFile): Likewise.
35267         * lib/stdio-read.c (GetNamedPipeHandleState): Likewise.
35268         * lib/stdio-write.c (GetNamedPipeHandleState): Likewise.
35269         * lib/tmpdir.c (GetTempPath): Likewise.
35270         * lib/tmpfile.c (OSVERSIONINFO, GetVersionEx, GetTempPath): Likewise.
35271         * lib/uname.c (OSVERSIONINFO, GetVersionEx): Likewise.
35272         * lib/utime.c (CreateFile, GetFileAttributes): Likewise.
35273         * lib/windows-cond.c (CreateEvent): Likewise.
35274         * lib/windows-rwlock.c (CreateEvent): Likewise.
35275         * lib/windows-timedmutex.c (CreateEvent): Likewise.
35276         * lib/windows-timedrecmutex.c (CreateEvent): Likewise.
35277         * lib/windows-timedrwlock.c (CreateEvent): Likewise.
35278         * lib/write.c (GetNamedPipeHandleState): Likewise.
35280 2020-05-30  Bruno Haible  <bruno@clisp.org>
35282         physmem: Fix compilation errors on MSVC.
35283         * lib/physmem.c (PFN_MS_EX): Use BOOL, not WINBOOL.
35284         * modules/physmem (Depends-on): Add unistd.
35286 2020-05-29  Bruno Haible  <bruno@clisp.org>
35288         gnulib-tool: Fix link errors with a particular set of modules on mingw.
35289         * gnulib-tool (func_emit_tests_Makefile_am): Add ../lib/libgnu.a to
35290         LDADD a second time, after the second occurrence of libtests.a.
35291         * pygnulib/GLEmiter.py (tests_Makefile_am): Likewise.
35293 2020-05-29  Bruno Haible  <bruno@clisp.org>
35295         fnmatch: Rely on more gnulib modules.
35296         * modules/fnmatch (Depends-on): Add btowc, isblank, iswctype, wmemchr,
35297         wmempcpy, mempcpy.
35298         * lib/fnmatch.c: Assume that HAVE_WCTYPE_H, HAVE_BTOWC, HAVE_ISWCTYPE,
35299         HAVE_WMEMCHR, HAVE_WMEMPCPY, HAVE_ISBLANK, HAVE_DECL_ISBLANK,
35300         HAVE_MEMPCPY are all 1.
35301         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH): Don't test for btowc, isblank,
35302         iswctype, mempcpy, wmemchr, wmemcpy, wmempcpy, <wctype.h>.
35304 2020-05-29  Bruno Haible  <bruno@clisp.org>
35306         Avoid dynamic lookup of Windows API functions when possible.
35307         * lib/getaddrinfo.c (GetProcAddress, getaddrinfo_func,
35308         freeaddrinfo_func, getnameinfo_func, getaddrinfo_ptr, freeaddrinfo_ptr,
35309         getnameinfo_ptr): Don't define in a build for Windows XP or higher.
35310         (use_win32_p): Define differently.
35311         * lib/link.c (GetProcAddress, CreateHardLinkFuncType,
35312         CreateHardLinkFunc, initialized, initialize): Don't define in a build
35313         for Windows XP or higher.
35315 2020-05-29  Daiki Ueno  <ueno@gnu.org>
35317         read-file: disable buffering if RF_SENSITIVE is set
35318         * lib/read-file.c (read_file): Call setvbuf if RF_SENSITIVE.
35319         Suggested by Glenn Strauss.
35320         (fread_file): Suggest calling setvbuf before calling this
35321         function.  Suggested by Bruno Haible.
35323 2020-05-29  Bruno Haible  <bruno@clisp.org>
35325         wmemchr, wmemcmp, wmemcpy, wmemmove, wmemset: Fix autoconf test.
35326         * m4/wmemchr.m4 (gl_FUNC_WMEMCHR): Link, not only compile, the test
35327         program.
35328         * m4/wmemcmp.m4 (gl_FUNC_WMEMCMP): Likewise.
35329         * m4/wmemcpy.m4 (gl_FUNC_WMEMCPY): Likewise.
35330         * m4/wmemmove.m4 (gl_FUNC_WMEMMOVE): Likewise.
35331         * m4/wmemset.m4 (gl_FUNC_WMEMSET): Likewise.
35333 2020-05-29  Bruno Haible  <bruno@clisp.org>
35335         Fix compilation error on native Windows (regression from 2020-05-28).
35336         Reported by Daiki Ueno.
35337         * lib/gettimeofday.c (GetSystemTimePreciseAsFileTimeFunc): Define as
35338         macro when not using dynamic loading.
35339         * lib/isatty.c (GetNamedPipeClientProcessIdFunc,
35340         QueryFullProcessImageNameFunc): Likewise.
35341         * lib/stat-w32.c (GetFileInformationByHandleExFunc,
35342         GetFinalPathNameByHandleFunc): Likewise.
35344 2020-05-29  Daiki Ueno  <ueno@gnu.org>
35346         fopen-gnu-tests: fix "\x" escape usage
35347         * tests/test-fopen-gnu.c (DATA): Use safer escape sequence.
35349 2020-05-28  Bruno Haible  <bruno@clisp.org>
35351         Avoid dynamic loading of Windows API functions when possible.
35352         Reported by Steve Lhomme <robux4@ycbcr.xyz> in
35353         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00182.html>.
35354         * lib/gettimeofday.c (GetProcAddress,
35355         GetSystemTimePreciseAsFileTimeFuncType,
35356         GetSystemTimePreciseAsFileTimeFunc, initialized, initialize): Don't
35357         define in a build for Windows 8 or higher.
35358         * lib/isatty.c (GetProcAddress, GetNamedPipeClientProcessIdFuncType,
35359         GetNamedPipeClientProcessIdFunc, QueryFullProcessImageNameFuncType,
35360         QueryFullProcessImageNameFunc, initialized, initialize): Don't define
35361         in a build for Windows Vista or higher.
35362         * lib/stat-w32.c (GetProcAddress, GetFileInformationByHandleExFuncType,
35363         GetFileInformationByHandleExFunc, GetFinalPathNameByHandleFuncType,
35364         GetFinalPathNameByHandleFunc, initialized, initialize): Likewise.
35366 2020-05-28  Paul Eggert  <eggert@cs.ucla.edu>
35368         explicit_bzero-tests: improve -Wmissing-declarations pacification
35369         * tests/test-explicit_bzero.c: Now noinline.
35370         Suggested by Bruno Haible in:
35371         https://lists.gnu.org/r/bug-gnulib/2020-05/msg00300.html
35373 2020-05-28  Bruno Haible  <bruno@clisp.org>
35375         Fix build errors due to read-file changes (regression from 2020-05-27).
35376         * lib/git-merge-changelog.c (read_changelog_file): Update read_file
35377         invocation.
35378         * tests/test-sameacls.c (main): Likewise.
35379         * tests/test-pipe-filter-gi1.c (main): Call read_file instead of
35380         read_binary_file.
35381         * tests/test-pipe-filter-ii1.c (main): Likewise.
35383 2020-05-28  Bruno Haible  <bruno@clisp.org>
35385         fts: Make more robust in multithreaded applications.
35386         * lib/fts.c (fts_open): Pass an O_CLOEXEC flag to open().
35387         * modules/fts (Depends-on): Add 'open'.
35389 2020-05-28  Bruno Haible  <bruno@clisp.org>
35391         relocatable-prog: Make more robust in multithreaded applications.
35392         * lib/progreloc.c (O_CLOEXEC): Define fallback to 0 when use from module
35393         relocatable-prog-wrapper.
35394         (find_executable): Pass an O_CLOEXEC flag to open().
35395         * modules/relocatable-prog (Depends-on): Add 'open'.
35397 2020-05-28  Bruno Haible  <bruno@clisp.org>
35399         getloadavg: Make more robust in multithreaded applications.
35400         * lib/getloadavg.c (getloadavg): Pass an O_CLOEXEC flag to open().
35401         Simplify use of O_CLOEXEC.
35402         * modules/getloadavg (Depends-on): Add 'open'.
35404 2020-05-28  Bruno Haible  <bruno@clisp.org>
35406         vma-iter: Make more robust in multithreaded applications.
35407         * lib/vma-iter.c (rof_open, vma_iterate): Pass an O_CLOEXEC flag to
35408         open().
35409         * modules/vma-iter (Depends-on): Add 'open'.
35411 2020-05-28  Bruno Haible  <bruno@clisp.org>
35413         truncate: Make more robust in multithreaded applications.
35414         * lib/truncate.c (truncate): Pass an O_CLOEXEC flag to open().
35416 2020-05-28  Bruno Haible  <bruno@clisp.org>
35418         pagealign_alloc: Make more robust in multithreaded applications.
35419         * lib/pagealign_alloc.c (pagealign_alloc): Pass an O_CLOEXEC flag to
35420         open().
35421         * modules/pagealign_alloc (Depends-on): Add 'open'.
35423 2020-05-28  Bruno Haible  <bruno@clisp.org>
35425         openat: Make more robust in multithreaded applications.
35426         * lib/openat.c (openat_needs_fchdir): Pass an O_CLOEXEC flag to open().
35428 2020-05-28  Bruno Haible  <bruno@clisp.org>
35430         at-internal: Make more robust in multithreaded applications.
35431         * lib/openat-proc.c (openat_proc_name): Pass an O_CLOEXEC flag to
35432         open().
35434 2020-05-28  Bruno Haible  <bruno@clisp.org>
35436         mountlist: Make more robust in multithreaded applications.
35437         * lib/mountlist.c (read_file_system_list): Pass an O_CLOEXEC flag to
35438         open().
35439         * modules/mountlist (Depends-on): Add 'open'.
35441 2020-05-28  Bruno Haible  <bruno@clisp.org>
35443         login_tty: Make more robust in multithreaded applications.
35444         * lib/login_tty.c (login_tty): Pass an O_CLOEXEC flag to open().
35445         * modules/login_tty (Depends-on): Add 'open'.
35447 2020-05-28  Bruno Haible  <bruno@clisp.org>
35449         javacomp: Make more robust in multithreaded applications.
35450         * lib/javacomp.c (get_classfile_version): Pass an O_CLOEXEC flag to
35451         open().
35452         * modules/javacomp (Depends-on): Add 'open'.
35454 2020-05-28  Bruno Haible  <bruno@clisp.org>
35456         getprogname: Make more robust in multithreaded applications.
35457         * lib/getprogname.c (getprogname): Pass an O_CLOEXEC flag to open().
35458         * modules/getprogname (Depends-on): Add 'open'.
35460 2020-05-28  Bruno Haible  <bruno@clisp.org>
35462         get_progname_of: Make more robust in multithreaded applications.
35463         * lib/get_progname_of.c (get_progname_of): Pass an O_CLOEXEC flag to
35464         open().
35465         * modules/get_progname_of (Depends-on): Add 'open'.
35467 2020-05-28  Bruno Haible  <bruno@clisp.org>
35469         get_ppid_of: Make more robust in multithreaded applications.
35470         * lib/get_ppid_of.c (get_ppid_of): Pass an O_CLOEXEC flag to open().
35471         * modules/get_ppid_of (Depends-on): Add 'open'.
35473 2020-05-28  Bruno Haible  <bruno@clisp.org>
35475         get-rusage-as: Make more robust in multithreaded applications.
35476         * lib/get-rusage-as.c (get_rusage_as_via_setrlimit): Pass an O_CLOEXEC
35477         flag to open().
35478         * modules/get-rusage-as (Depends-on): Add 'open'.
35480 2020-05-28  Bruno Haible  <bruno@clisp.org>
35482         crypto/gc: Make more robust in multithreaded applications.
35483         * lib/gc-gnulib.c (randomize): Pass an O_CLOEXEC flag to open().
35484         * modules/crypto/gc (Depends-on): Add 'open'.
35486 2020-05-28  Bruno Haible  <bruno@clisp.org>
35488         copy-file: Make more robust in multithreaded applications.
35489         * lib/copy-file.c (qcopy_file_preserving): Pass an O_CLOEXEC flag to
35490         open().
35492 2020-05-28  Bruno Haible  <bruno@clisp.org>
35494         chown: Make more robust in multithreaded applications.
35495         * lib/chown.c (rpl_chown): Pass an O_CLOEXEC flag to open().
35497 2020-05-28  Bruno Haible  <bruno@clisp.org>
35499         doc: Fix statement about O_CLOEXEC (wrong since 2017-08-14).
35500         * doc/posix-headers/fcntl.texi: Gnulib no longer defines O_CLOEXEC to 0.
35502 2020-05-28  Daiki Ueno  <ueno@gnu.org>
35504         fopen-gnu: make 'b' flag can be used with 'e' on Windows
35505         * lib/fopen.c (rpl_fopen): Pass O_BINARY to open, if a 'b' flag is
35506         specified on Windows.
35507         * tests/test-fopen-gnu.c (DATA): New define.
35508         (main): Add test for reading binary files with an 'e' flag.
35510 2020-05-27  Bruno Haible  <bruno@clisp.org>
35512         Don't assume that UNICODE is not defined.
35513         Some Windows types, such as TCHAR, LPTSTR, LPCTSTR, are defined
35514         differently if the application defines the macro UNICODE.
35515         Reported by Steve Lhomme <robux4@ycbcr.xyz> in
35516         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00184.html>.
35517         * lib/link.c (CreateHardLinkFuncType): Use LPCSTR, not LPCTSTR.
35518         * lib/localename.c (enum_locales_fn): Use LPSTR, not LPTSTR.
35519         * lib/stat-w32.c (GetFinalPathNameByHandleFuncType): Likewise.
35521 2020-05-27  Bruno Haible  <bruno@clisp.org>
35523         Improve pattern for defining _WIN32_WINNT.
35524         Newer versions of the Windows API may not only add, but also remove API
35525         functions. Therefore, when the user is e.g. building for Windows 10, we
35526         should not set _WIN32_WINNT to e.g. Windows 8, as this may enable the
35527         use of APIs that were present in Windows 8 but removed in Windows 10.
35528         Suggested by Steve Lhomme <robux4@ycbcr.xyz> in
35529         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00318.html>.
35530         * lib/ftruncate.c (_WIN32_WINNT): Don't set to a smaller value.
35531         * lib/sethostname.c (_WIN32_WINNT): Likewise.
35532         * lib/stat-w32.c (_WIN32_WINNT): Likewise.
35534 2020-05-27  Bruno Haible  <bruno@clisp.org>
35536         javacomp: Make more robust in multithreaded applications.
35537         * lib/javacomp.c (write_temp_file): Pass an 'e' flag to fopen_temp.
35538         * modules/javacomp (Depends-on): Add fopen-gnu.
35540 2020-05-27  Bruno Haible  <bruno@clisp.org>
35542         mountlist: Make more robust in multithreaded applications.
35543         * lib/mountlist.c (setmntent, read_file_system_list): Pass an 'e' flag
35544         to fopen.
35545         * modules/mountlist (Depends-on): Add fopen-gnu.
35547 2020-05-27  Bruno Haible  <bruno@clisp.org>
35549         sethostname: Make more robust in multithreaded applications.
35550         * lib/sethostname.c (sethostname): Pass an 'e' flag to fopen.
35551         * modules/sethostname (Depends-on): Add fopen-gnu.
35553 2020-05-27  Bruno Haible  <bruno@clisp.org>
35555         readutmp: Make more robust in multithreaded applications.
35556         * lib/readutmp.c (read_utmp): Pass an 'e' flag to fopen.
35557         * modules/readutmp (Depends-on): Add fopen-gnu.
35559 2020-05-27  Bruno Haible  <bruno@clisp.org>
35561         getpass: Make more robust in multithreaded applications.
35562         * lib/getpass.c (getpass): Pass an 'e' flag to fopen.
35563         * modules/getpass (Depends-on): Add fopen-gnu.
35565 2020-05-27  Bruno Haible  <bruno@clisp.org>
35567         getloadavg: Make more robust in multithreaded applications.
35568         * lib/getloadavg.c (getloadavg): Pass an 'e' flag to fopen.
35569         * modules/getloadavg (Depends-on): Add fopen-gnu.
35571 2020-05-27  Bruno Haible  <bruno@clisp.org>
35573         exclude: Make more robust in multithreaded applications.
35574         * lib/exclude.c (add_exclude_file): Pass an 'e' flag to fopen.
35575         * modules/exclude (Depends-on): Add fopen-gnu.
35577 2020-05-27  Bruno Haible  <bruno@clisp.org>
35579         bitset: Make more robust in multithreaded applications.
35580         * lib/bitset/stats.c (bitset_stats_read, bitset_stats_write): Pass an
35581         'e' flag to fopen.
35582         * modules/bitset (Depends-on): Add fopen-gnu.
35584 2020-05-27  Daiki Ueno  <ueno@gnu.org>
35586         read-file: add RF_SENSITIVE flag
35587         * lib/read-file.h (RF_SENSITIVE): New define.
35588         * lib/read-file.c (fread_file, read_file): Take into account of
35589         RF_SENSITIVE flag.
35590         * modules/read-file (Depends-on): Add explicit_bzero.
35591         This adds an alternative behavior of those functions to explicitly
35592         clear the internal memory block when it becomes unused.  This is
35593         useful for reading sensitive information from a file.
35595 2020-05-27  Daiki Ueno  <ueno@gnu.org>
35597         read-file: add flags to modify reading behavior
35598         * lib/read-file.h (RF_BINARY): New define.
35599         (fread_file, read_file): Take FLAGS argument.
35600         (read_binary_file): Remove.
35601         * lib/read-file.c (internal_read_file): Merge into ...
35602         (read_file): ... here.
35603         * modules/read-file-tests (Files): Add "tests/macros.h".
35604         * tests/test-read-file.c (main): Refactor using ASSERT macro.
35605         * NEWS: Mention this change.
35607 2020-05-26  Bernhard Voelker  <mail@bernhard-voelker.de>
35609         doc/gnulib-intro.texi: add missing "to" in sentence
35610         Reported by Bjarni Ingi Gislason <bjarniig@rhi.hi.is> in
35611         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00316.html>.
35612         * doc/gnulib-intro.texi (Collaborative Development): Add "to".
35614 2020-05-26  Bruno Haible  <bruno@clisp.org>
35616         count-one-bits: Fix MSVC specific code.
35617         Reported by Gisle Vanem <gisle.vanem@gmail.com> in
35618         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00309.html>.
35619         * lib/count-one-bits.h (COUNT_ONE_BITS_GENERIC): Don't define if we're
35620         using GCC.
35621         [_MSC_VER]: Use correct syntax for #pragma intrinsic.
35622         (__popcnt64): In 32-bit mode, define as an inline function.
35623         (COUNT_ONE_BITS): Rename first argument to GCC_BUILTIN.
35625 2020-05-26  Bruno Haible  <bruno@clisp.org>
35627         argz: Avoid name clashes through argz.h.
35628         Reported by Gisle Vanem <gisle.vanem@gmail.com> in
35629         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00308.html>.
35630         * lib/argz.h: Don't use __ prefixed identifiers.
35631         (const): Remove definition.
35632         (argz_next): Remove inline definitions.
35634 2020-05-26  Daiki Ueno  <ueno@gnu.org>
35636         read-file: make use of fopen-gnu
35637         * lib/read-file.c (read_file): Pass an 'e' flag to fopen.
35638         (read_binary_file): Likewise.
35639         * modules/read-file (Depends-on): Add fopen-gnu.
35641 2020-05-25  Paul Eggert  <eggert@cs.ucla.edu>
35643         getentropy, getrandom: new modules
35644         * MODULES.html.sh (func_all_modules):
35645         * lib/unistd.in.h (getentropy, getrandom):
35646         * m4/unistd_h.m4 (gl_UNISTD_H, gl_UNISTD_H_DEFAULTS):
35647         * modules/unistd (unistd.h):
35648         Add support for getentropy, getrandom.
35649         * doc/glibc-functions/getentropy.texi (getentropy):
35650         * doc/glibc-functions/getrandom.texi (getrandom):
35651         These are now fixed on some platforms.
35652         * lib/getentropy.c, lib/getrandom.c, lib/sys_random.in.h:
35653         * m4/getentropy.m4, m4/getrandom.m4:
35654         * modules/getentropy, modules/getentropy-tests:
35655         * modules/getrandom, modules/getrandom-tests:
35656         * tests/test-getentropy.c, tests/test-getrandom.c:
35657         New files.
35659 2020-05-25  Bruno Haible  <bruno@clisp.org>
35661         Add missing C99 dependencies.
35662         Reported by Paul Smith <psmith@gnu.org> in
35663         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00290.html>.
35664         * modules/assert (Depends-on): Add c99.
35665         * modules/filenamecat-lgpl (Depends-on): Likewise.
35666         * modules/libc-config (Depends-on): Likewise.
35667         * modules/mktime (Depends-on): Likewise.
35668         * modules/random_r (Depends-on): Likewise.
35669         * modules/regex (Depends-on): Likewise.
35670         * modules/scratch_buffer (Depends-on): Likewise.
35671         * modules/timespec-add (Depends-on): Likewise.
35672         * modules/timespec-sub (Depends-on): Likewise.
35673         * modules/verify (Depends-on): Likewise.
35675 2020-05-24  Paul Eggert  <eggert@cs.ucla.edu>
35677         explicit_bzero-tests: pacify -Wmissing-declarations
35678         * tests/test-explicit_bzero.c (do_secret_stuff, test_stack):
35679         Now static.
35681 2020-05-24  Bruno Haible  <bruno@clisp.org>
35683         fopen-gnu: Add tests.
35684         * tests/test-fopen-gnu.c: New file.
35685         * modules/fopen-gnu-tests: New file.
35687         fopen-gnu: New module.
35688         Suggested by Tim Rühsen <tim.ruehsen@gmx.de> in
35689         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00119.html>.
35690         * lib/fopen.c (rpl_fopen): When the fopen-gnu module is enabled and the
35691         mode contains an 'x' or 'e' flag, use open() followed by fdopen().
35692         * m4/fopen.m4 (gl_FUNC_FOPEN_GNU): New macro.
35693         * modules/fopen-gnu: New file.
35694         * doc/posix-functions/fopen.texi: Document the 'fopen-gnu' module.
35696 2020-05-24  Bruno Haible  <bruno@clisp.org>
35698         open, openat: Really support O_CLOEXEC.
35699         * lib/open.c (open): When have_cloexec is still undecided, do pass a
35700         O_CLOEXEC flag to orig_open.
35701         * lib/openat.c (rpl_openat): When have_cloexec is still undecided, do
35702         pass a O_CLOEXEC flag to orig_openat.
35703         * tests/test-open.h (test_open): Verify that O_CLOEXEC is honoured.
35704         * modules/open-tests (Depends-on): Add fcntl.
35705         * modules/openat-tests (Depends-on): Likewise.
35706         * modules/fcntl-safer-tests (Depends-on): Likewise.
35708 2020-05-24  Bruno Haible  <bruno@clisp.org>
35710         fopen: Fix the trailing slash workaround.
35711         * lib/fopen.c (rpl_fopen): Parse the mode string. Recognize "r+" as a
35712         write access. Pass the right flags to open().
35713         * tests/test-fopen.h (test_fopen): Add a few more tests on directories.
35715 2020-05-23  Paul Eggert  <eggert@cs.ucla.edu>
35717         assure: new macro ‘affirm’
35718         * lib/assure.h: Include verify.h.
35719         (affirm): New macro, after a suggestion by Marc Nieper-Wißkirchen in:
35720         https://lists.gnu.org/r/bug-gnulib/2020-05/msg00263.html
35721         and commentary by Bruno Haible in:
35722         https://lists.gnu.org/r/bug-gnulib/2020-05/msg00278.html
35723         * modules/assure (Depends-on:): Add verify.
35725 2020-05-23  Bruno Haible  <bruno@clisp.org>
35727         calloc-gnu: Make test work in non-flat address spaces.
35728         Uses code by Paul Eggert.
35729         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Allow a calloc() implementation
35730         to return more than SIZE_MAX bytes, but only without wrap-around bugs.
35732 2020-05-23  Bruno Haible  <bruno@clisp.org>
35734         calloc-gnu: Avoid wrong configure results with GCC's AddressSanitizer.
35735         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Split the AC_RUN_IFELSE into two
35736         AC_RUN_IFELSE invocations.
35738 2020-05-23  Bruno Haible  <bruno@clisp.org>
35740         isnanf, isnanl, isnan: Don't use nonexistent builtins with clang.
35741         * m4/isnanf.m4 (gl_HAVE_ISNANF_NO_LIBM, gl_HAVE_ISNANF_IN_LIBM,
35742         gl_ISNANF_WORKS): Don't use __builtin_isnanf on clang versions that
35743         don't have it.
35744         * m4/isnanl.m4 (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM,
35745         gl_FUNC_ISNANL_WORKS): Don't use __builtin_isnanl on clang versions that
35746         don't have it.
35747         * lib/isnanf-nolibm.h (__has_builtin): New macro.
35748         (isnanf): Don't use __builtin_isnanf on clang versions that don't have
35749         it.
35750         * lib/isnanl-nolibm.h (__has_builtin): New macro.
35751         (isnanl): Don't use __builtin_isnanl on clang versions that don't have
35752         it.
35753         * lib/math.in.h (__has_builtin): New macro.
35754         (isnanf): Don't use __builtin_isnanf on clang versions that don't have
35755         it.
35756         (isnanl): Don't use __builtin_isnanl on clang versions that don't have
35757         it.
35758         (isnan): Don't use the builtins on clang versions that don't have
35759         __builtin_isnanf and __builtin_isnanl.
35761 2020-05-23  Bruno Haible  <bruno@clisp.org>
35763         calloc-gnu: Avoid wrong configure results with clang.
35764         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Mark the pointer variable as
35765         'volatile', to defeat compiler optimizations.
35767 2020-05-23  Bruno Haible  <bruno@clisp.org>
35769         isnanl, isnanl-nolibm: Make a test work better with "gcc -O2" on x86_64.
35770         * m4/exponentl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Pass the
35771         'long double' values by reference, with values taken from a statically
35772         allocated array.
35774 2020-05-23  Bruno Haible  <bruno@clisp.org>
35776         findprog-in: Ignore directories.
35777         Reported by Frederick Eaton via Dmitry Goncharov in
35778         <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00003.html>.
35779         * lib/findprog-in.c (find_in_given_path): When the file found is a
35780         directory, set errno to EACCES and, during a PATH search, continue
35781         searching.
35782         * modules/findprog-in (Depends-on): Add sys_stat, stat.
35784 2020-05-23  Paul Eggert  <eggert@cs.ucla.edu>
35786         verify: document ‘assume’ better
35787         * lib/verify.h (assume): Say it’s for static analysis, not dynamic.
35789 2020-05-22  Asher Gordon  <AsDaGo@posteo.net>
35791         gendocs: Clarify licenses for templates.
35792         * doc/gendocs_template: Add a GNU All-Permissive license notice
35793         and bump Parent-Version.
35794         * doc/gendocs_template_min: Add a GNU All-Permissive license
35795         notice and copy the explanatory comment about the license notice
35796         at the bottom from gendocs_template.
35798 2020-05-21  Bruno Haible  <bruno@clisp.org>
35800         group-member: Relicense under LGPLv2+.
35801         Jim Meyering's approval is in
35802         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00218.html>.
35803         Paul Eggert's approval is in
35804         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00225.html>.
35805         Eric Blake's approval is in
35806         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00217.html>.
35807         * modules/group-member (License): Change to LGPLv2+.
35809 2020-05-21  Bruno Haible  <bruno@clisp.org>
35811         memmem: Avoid wrong configure results with "clang -fsanitize=undefined".
35812         Reported by Tim Rühsen in
35813         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00207.html>.
35814         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): Use NULL + 1, not NULL.
35816 2020-05-21  Bruno Haible  <bruno@clisp.org>
35818         regex: Avoid wrong configure results with "clang -fsanitize=leak".
35819         Reported by Tim Rühsen in
35820         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00207.html>.
35821         * m4/regex.m4 (gl_REGEX): Free compiled regexes and allocated registers
35822         before returning with status 0.
35824 2020-05-21  Bruno Haible  <bruno@clisp.org>
35826         glob: Avoid wrong configure results with "clang -fsanitize=leak".
35827         Reported by Tim Rühsen in
35828         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00207.html>.
35829         * m4/glob.m4 (gl_GLOB): Free allocated memory before returning.
35831 2020-05-21  Bruno Haible  <bruno@clisp.org>
35833         fchownat: Support clang -fsanitize=implicit-integer-sign-change better.
35834         Reported by Tim Rühsen in
35835         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00207.html>.
35836         * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG,
35837         gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG): Cast -1 to uid_t or git_t,
35838         respectively.
35840 2020-05-18  Tim Rühsen  <tim.ruehsenqgmx.de>
35842         getdelim: Avoid wrong configure results with gcc -fsanitize=address.
35843         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Fix memleak.
35845 2020-05-19  Paul Eggert  <eggert@cs.ucla.edu>
35847         ftoastr: fix ifndef typo
35848         * lib/ftoastr.h (_GL_FTOASTR_H): Define.
35850 2020-05-19  Bruno Haible  <bruno@clisp.org>
35852         havelib: Tweak documentation.
35853         * doc/havelib.texi (Searching for Libraries): Fix typo.
35855 2020-05-18  Siddhesh Poyarekar  <siddhesh@gotplt.org>
35857         vcs-to-changelog: Rename vcs_to_changelog.py to use hyphens.
35858         This was needed earlier because modules had to import the main script,
35859         but that is no longer true.  Rename the script so that it is
35860         consistent with all other scripts in gnulib and uses hyphens.
35861         * build-aux/vcs_to_changelog.py: Rename to...
35862         * build-aux/vcs-to-changelog.py: ... this.
35863         * doc/vcs-to-changelog.texi (VCS To ChangeLog): Update reference.
35864         * modules/vcs-to-changelog: Likewise.
35866 2020-05-17  Bruno Haible  <bruno@clisp.org>
35868         Clarify intended usage of the license file modules.
35869         Reported by Asher Gordon <AsDaGo@posteo.net> in
35870         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00126.html>.
35871         * doc/licenses-texi.texi (License Texinfo sources): Mention the
35872         GNU AGPL. Explain the intended usage of the modules.
35873         * modules/fdl (Notice): Discourage use as a module.
35874         * modules/fdl-1.3 (Notice): Likewise.
35876 2020-05-17  Akim Demaille  <akim@lrde.epita.fr>
35878         hash: add hash_xinsert
35879         * lib/hash.h, lib/xhash.c (hash_xinsert): New.
35881 2020-05-16  Bruno Haible  <bruno@clisp.org>
35883         findprog-lgpl: Fix link error (existing since 2008-09-02).
35884         * modules/findprog-lgpl (Makefile.am): Arrange to compile
35885         findprog-lgpl.c, not findprog.c.
35886         * lib/findprog.c (find_in_path): Add LGPLed replacement code for
35887         XNMALLOC.
35889 2020-05-15  Paul Eggert  <eggert@cs.ucla.edu>
35891         c-stack: pacify -Wunused-result when DEBUG
35892         Problem reported by Marc Nieper-Wißkirchen in:
35893         https://lists.gnu.org/r/bug-gnulib/2020-05/msg00132.html
35894         * lib/c-stack.c (segv_handler, overflow_handler, segv_handler) [DEBUG]:
35895         Explicitly ignore write failures.
35897 2020-05-13  Jim Meyering  <meyering@fb.com>
35899         announce-gen: improve a comment
35900         * build-aux/announce-gen: Improve comment.
35902 2020-05-12  Paul Eggert  <eggert@cs.ucla.edu>
35904         xalloc: pacify -Wanalyzer-possible-null-argument
35905         Problem reported for GCC 10.1.0 by Bruno Haible in:
35906         https://lists.gnu.org/r/bug-gnulib/2020-05/msg00118.html
35907         * lib/xmalloc.c (HAVE_GNU_MALLOC, HAVE_GNU_REALLOC): New constants.
35908         (xmalloc): Suppress unnecessary check if HAVE_GNU_MALLOC.
35909         (xrealloc): Suppress unnecssary check if HAVE_GNU_REALLOC.
35911 2020-05-11  Paul Eggert  <eggert@cs.ucla.edu>
35913         careadlinkat: fix GCC 10 workaround
35914         * lib/careadlinkat.c (careadlinkat) [GCC_LINT]:
35915         Massage the code so that it’s closer to what it was before
35916         the GCC 10.1.0 workaround was introduced.  This fixes
35917         a loop when !buffer and the bug workaround is in effect.
35918         Remove unnecessary casts.  Defend in a different way
35919         against (buffer && !buffer_size), by adding at least 1
35920         to buf_size each time through the loop.
35922 2020-05-10  Bruno Haible  <bruno@clisp.org>
35924         doc: Mark HP-UX as unsupported.
35925         * doc/gnulib-intro.texi (Target Platforms): List HP-UX as unsupported.
35927 2020-05-10  Paul Eggert  <eggert@cs.ucla.edu>
35929         careadlinkat: limit GCC workaround
35930         * lib/careadlinkat.c (careadlinkat): Limit workaround to GCC
35931         10.1.0 and later, since the workaround is pretty bad and the GCC
35932         bug should get fixed.
35934 2020-05-10  Bruno Haible  <bruno@clisp.org>
35936         havelib: Enhance documentation.
35937         * doc/havelib.texi (Searching for Libraries): Mention the bad
35938         consequences of using LIBxxx instead of LTLIBxxx and vice versa.
35940 2020-05-10  Bruno Haible  <bruno@clisp.org>
35942         attribute: Clarify list of attributes.
35943         * lib/attribute.h: Reorder the list of attributes, and group them by
35944         purpose.
35946 2020-05-10  Bruno Haible  <bruno@clisp.org>
35948         string: Fix compilation error in C++ mode.
35949         * lib/warn-on-use.h (_GL_WARN_ON_USE_CXX): In C mode, use plain
35950         _GL_WARN_ON_USE.
35951         * lib/string.in.h (strchr, strpbrk, strrchr): Use _GL_WARN_ON_USE_CXX
35952         instead of _GL_WARN_ON_USE.
35954 2020-05-10  Akim Demaille  <akim@lrde.epita.fr>
35956         announce-gen: add support for dist-lzip
35957         * build-aux/announce-gen (@archive_suffixes): Add tar.lz.
35959 2020-05-09  Paul Eggert  <eggert@cs.ucla.edu>
35961         manywarnings: port to GCC 10.1
35962         * build-aux/gcc-warning.spec:
35963         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)):
35964         Add GCC 10.1.0 warnings.
35966         careadlinkat: pacify -Wreturn-local-addr
35967         * lib/careadlinkat.c (careadlinkat) [GCC_LINT]:
35968         Pacify gcc 10’s -Wreturn-local-addr option.
35969         Simplify some of the later code.
35971 2020-05-09  Paul Eggert  <eggert@cs.ucla.edu>
35973         attribute: remove ATTRIBUTE_DEPRECATED
35974         * lib/attribute.h: Improve recently-added comments, mostly
35975         by shortening them (use active voice, etc.).
35976         (ATTRIBUTE_DEPRECATED): Remove, as it duplicates DEPRECATED.
35977         Problem reported by Bruno Haible in:
35978         https://lists.gnu.org/r/bug-gnulib/2020-05/msg00089.html
35980 2020-05-09  Bruno Haible  <bruno@clisp.org>
35982         attribute: Add comments.
35983         * lib/attribute.h: Document each macro.
35985 2020-05-09  Akim Demaille  <akim@lrde.epita.fr>
35987         bitset: use the attribute module
35988         * modules/bitset: Depend on 'attribute'.
35989         * lib/bitset/base.h (ATTRIBUTE_UNUSED): Remove.
35990         * lib/bitset.c, lib/bitset/array.c, lib/bitset/list.c,
35991         * lib/bitset/stats.c, lib/bitset/table.c, lib/bitset/vector.c:
35992         Use MAYBE_UNUSED instead of ATTRIBUTE_UNUSED.
35994 2020-05-09  Bruno Haible  <bruno@clisp.org>
35996         c-stack: Fix warning when DEBUG is enabled.
35997         Patch suggested by Marc Nieper-Wißkirchen <marc.nieper+gnu@gmail.com> in
35998         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00081.html>.
35999         * lib/c-stack.c: Include <stdio.h>.
36001 2020-05-09  Bruno Haible  <bruno@clisp.org>
36003         Remove redundant definitions of _GL_ATTRIBUTE_FORMAT.
36004         * lib/argp.h (_GL_ATTRIBUTE_FORMAT): Remove macro.
36005         * lib/argp-fmtstream.h (_GL_ATTRIBUTE_FORMAT): Likewise.
36006         * lib/c-snprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
36007         * lib/c-vasnprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
36008         * lib/c-vasprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
36009         * lib/c-vsnprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
36010         * lib/c-xvasprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
36011         * lib/error.h (_GL_ATTRIBUTE_FORMAT): Likewise.
36012         * lib/parse-datetime.y (_GL_ATTRIBUTE_FORMAT): Likewise.
36013         * lib/vasnprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
36014         * lib/xprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
36015         * lib/xvasprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
36017 2020-05-09  Bruno Haible  <bruno@clisp.org>
36019         Remove redundant definitions of _GL_ATTRIBUTE_ALLOC_SIZE.
36020         Reported by Akim Demaille in
36021         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00077.html>.
36022         * lib/eealloc.h (_GL_ATTRIBUTE_ALLOC_SIZE): Remove macro.
36023         * lib/pagealign_alloc.h (_GL_ATTRIBUTE_ALLOC_SIZE): Likewise.
36024         * lib/xalloc.h (_GL_ATTRIBUTE_ALLOC_SIZE): Likewise.
36026 2020-05-09  Bruno Haible  <bruno@clisp.org>
36028         stdio, monetary: Don't redefine _GL_ATTRIBUTE_FORMAT.
36029         * lib/stdio.in.h (_GL_ATTRIBUTE_FORMAT): Don't override the definition
36030         that usually comes from m4/gnulib-common.m4.
36031         * lib/monetary.in.h (_GL_ATTRIBUTE_FORMAT): Likewise.
36033 2020-05-09  Bruno Haible  <bruno@clisp.org>
36035         dirent, stdlib, wchar, string: Don't redefine _GL_ATTRIBUTE_PURE.
36036         * lib/dirent.in.h (_GL_ATTRIBUTE_PURE): Don't override the definition
36037         that usually comes from m4/gnulib-common.m4.
36038         * lib/stdlib.in.h (_GL_ATTRIBUTE_PURE): Likewise.
36039         * lib/string.in.h (_GL_ATTRIBUTE_PURE): Likewise.
36040         * lib/wchar.in.h (_GL_ATTRIBUTE_PURE): Likewise.
36042 2020-05-09  Bruno Haible  <bruno@clisp.org>
36044         uchar: Work around incorrect char16_t, char32_t types on Haiku 2020.
36045         * lib/uchar.in.h (char16_t): Define as macro if
36046         GNULIB_OVERRIDES_CHAR16_T.
36047         (char32_t): Define as macro if GNULIB_OVERRIDES_CHAR32_T.
36048         * m4/uchar.m4 (gl_TYPE_CHAR16_T, gl_TYPE_CHAR32_T): New macros.
36049         (gl_UCHAR_H): Invoke them.
36050         (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_OVERRIDES_CHAR16_T,
36051         GNULIB_OVERRIDES_CHAR32_T.
36052         * m4/mbrtoc32.m4 (gl_FUNC_MBRTOC32, gl_MBRTOC32_SANITYCHECK): Require
36053         gl_TYPE_CHAR32_T and test GNULIB_OVERRIDES_CHAR32_T.
36054         * modules/uchar (Makefile.am): Substitute GNULIB_OVERRIDES_CHAR16_T,
36055         GNULIB_OVERRIDES_CHAR32_T.
36057 2020-05-09  Bruno Haible  <bruno@clisp.org>
36059         Macro tweaks.
36060         * m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): Correct config.h comment.
36061         * m4/wint_t.m4 (gt_TYPE_WINT_T): Correct indentation.
36063 2020-05-08  Bruno Haible  <bruno@clisp.org>
36065         c32rtomb: Avoid compilation failure on Haiku.
36066         * m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): Test for c32rtomb without excluding
36067         inline definitions.
36068         * doc/posix-functions/c32rtomb.texi: Mention the Haiku problem.
36070 2020-05-08  Bruno Haible  <bruno@clisp.org>
36072         mbrtoc32: Avoid compilation failure on Haiku.
36073         * m4/mbrtoc32.m4 (gl_CHECK_FUNC_MBRTOC32): New macro.
36074         (gl_FUNC_MBRTOC32, gl_MBRTOC32_SANITYCHECK): Use it instead of
36075         AC_CHECK_FUNCS_ONCE.
36076         * doc/posix-functions/mbrtoc32.texi: Mention the Haiku problem.
36078 2020-05-08  Bruno Haible  <bruno@clisp.org>
36080         limits-h: Define LONG_BIT correctly on Haiku/x86_64.
36081         * lib/limits.in.h: Define and test _GL_ALREADY_INCLUDING_LIMITS_H.
36083 2020-05-08  Bruno Haible  <bruno@clisp.org>
36085         list: Update documentation.
36086         Reported by Marc Nieper-Wißkirchen <marc.nieper+gnu@gmail.com> in
36087         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00062.html>.
36088         * doc/containers.texi (Container data types): Document the new list
36089         operations and their complexity.
36091 2020-05-08  Bruno Haible  <bruno@clisp.org>
36093         ignore-value tests: Use module 'attribute'.
36094         * m4/gnulib-common.m4 (gl_COMMON_BODY): Fix a typo.
36095         * tests/test-ignore-value.c: Include attribute.h.
36096         (_GL_ATTRIBUTE_RETURN_CHECK): Remove macro. Use NODISCARD instead.
36097         * modules/ignore-value-tests (Depends-on): Add attribute.
36099 2020-05-08  Bruno Haible  <bruno@clisp.org>
36101         uniname/uniname: Use module 'attribute'.
36102         * lib/uniname/gen-uninames.lisp: Emit a reference to ATTRIBUTE_PACKED.
36103         * lib/uniname/uninames.h: Regenerated.
36104         * lib/uniname/uniname.c: Include attribute.h.
36105         * modules/uniname/uniname (Depends-on): Add attribute.
36107 2020-05-08  Bruno Haible  <bruno@clisp.org>
36109         c32rtomb: Use module 'attribute'.
36110         * lib/c32rtomb.c: Include attribute.h.
36111         (FALLTHROUGH): Remove macro.
36112         * modules/c32rtomb (Depends-on): Add attribute.
36114 2020-05-08  Bruno Haible  <bruno@clisp.org>
36116         xsize: Use module 'attribute'.
36117         * lib/xsize.h: Include attribute.h. Use ATTRIBUTE_PURE.
36118         * modules/xsize (Depends-on): Add attribute.
36120 2020-05-06  Paul Eggert  <eggert@cs.ucla.edu>
36122         * m4/gnulib-common.m4 (gl_COMMON_BODY): Minor style fixes.
36124         * lib/attribute.h: Minor style fixes.
36126         Fix version-etc glitch on OpenIndiana
36127         Problem reported by Mats Erik Andersson in:
36128         https://lists.gnu.org/r/bug-gnulib/2020-05/msg00067.html
36129         * lib/version-etc.h (_GL_ATTRIBUTE_SENTINEL): Remove defn
36130         that now clashes with gnulib-common.h.  All uses changed.
36132 2020-05-03  Paul Eggert  <eggert@cs.ucla.edu>
36134         attribute: new module
36135         This simplifies use of GCC and C2x attributes like ‘deprecated’.
36136         * MODULES.html.sh: Add attribute.
36137         * doc/attribute.texi, lib/attribute.h, modules/attribute: New files.
36138         * doc/gnulib.texi (Particular Modules): Add Attributes.
36139         * lib/backupfile.c, lib/fnmatch.c, lib/freopen-safer.c:
36140         * lib/mbrtoc32.c, lib/mbrtowc.c, lib/nstrftime.c, lib/quotearg.c:
36141         * lib/savewd.c, lib/unistr/u8-uctomb-aux.c, lib/unistr/u8-uctomb.c:
36142         * lib/vasnprintf.c:
36143         Include attribute.h, and let it define FALLTHROUGH.
36144         * lib/bitset/base.h, lib/c-stack.c (__attribute__): Remove macro.
36145         * lib/bitset/base.h (ATTRIBUTE_UNUSED): Define in terms of
36146         _GL_ATTRIBUTE_MAYBE_UNUSED, for forwards compatibility to C2x.
36147         * lib/dfa.c (FALLTHROUGH): Define consistently with gl_COMMON_BODY.
36148         This is a copy since Gawk doesn’t use Gnulib.
36149         * lib/di-set.h (_GL_ATTRIBUTE_NONNULL): Remove definition that
36150         is incompatible with gl_COMMON_BODY’s.  All uses changed.
36151         * lib/fts.c: Include attribte.h, for FALLTHROUGH.
36152         Keep the existing FALLTHROUGH definition since Glibc might use it,
36153         and it does no harm to Gnulib’s FALLTHROUGH.
36154         * lib/fts_.h, lib/inttostr.h:
36155         (__GNUC_PREREQ): Remove; no longer needed.
36156         (__attribute_warn_unused_result__): Remove.  All uses
36157         replaced by _GL_ATTRIBUTE_NODISCARD.
36158         * lib/gl_list.h, lib/gl_map.h, lib/gl_omap.h, lib/gl_oset.h:
36159         * lib/gl_set.h: Prefer _GL_ATTRIBUTE_NODISCARD to an ifdeffed
36160         __attribute__ ((__warn_unused_result__)), for forward
36161         compatibility to C2x.
36162         * lib/hash.h (_GL_ATTRIBUTE_WUR): Remove.  All uses replaced by
36163         _GL_ATTRIBUTE_NODISCARD.
36164         (_GL_ATTRIBUTE_DEPRECATED): Remove, since gl_COMMON_BODY defines it.
36165         * lib/ino-map.h (_GL_ATTRIBUTE_NONNULL): Remove.  All uses
36166         replaced by gl_COMMON_BODY’s implementation, which has a
36167         slightly different signature.
36168         * lib/safe-alloc.h (_GL_ATTRIBUTE_RETURN_CHECK):
36169         Remove.  All uses replaced by _GL_ATTRIBUTE_NODISCARD.
36170         * lib/unused-parameter.h (_GL_UNUSED_PARAMETER):
36171         Define in terms of _GL_ATTRIBUTE_MAYBE_UNUSED.
36172         No doubt all uses should be replaced, at some point.
36173         * m4/gnulib-common.m4 (_GL_GNUC_PREREQ): New macro.
36174         (_Noreturn): Use it.
36175         (_GL_HAS_ATTRIBUTE, _GL_ATTRIBUTE_ALLOC_SIZE)
36176         (_GL_ATTRIBUTE_ALWAYS_INLINE, _GL_ATTRIBUTE_ARTIFICIAL)
36177         (_GL_ATTRIBUTE_COLD)
36178         (_GL_ATTRIBUTE_DEPRECATED, _GL_ATTRIBUTE_ERROR)
36179         (_GL_ATTRIBUTE_WARNING, _GL_ATTRIBUTE_EXTERNALLY_VISIBLE)
36180         (_GL_ATTRIBUTE_FALLTHROUGH, _GL_ATTRIBUTE_FORMAT)
36181         (_GL_ATTRIBUTE_LEAF, _GL_ATTRIBUTE_MAY_ALIAS)
36182         (_GL_ATTRIBUTE_MAYBE_UNUSED)
36183         (_GL_ATTRIBUTE_NODISCARD, _GL_ATTRIBUTE_NOINLINE)
36184         (_GL_ATTRIBUTE_NONNULL, _GL_ATTRIBUTE_NONSTRING)
36185         (_GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PACKED, _GL_ATTRIBUTE_PURE)
36186         (_GL_ATTRIBUTE_RETURNS_NONNULL)
36187         (_GL_ATTRIBUTE_SENTINEL): New macros.
36188         * modules/backup-rename, modules/backupfile, modules/c-vasnprintf:
36189         * modules/fnmatch, modules/freopen-safer, modules/fts:
36190         * modules/mbrtoc32, modules/mbrtowc, modules/nstrftime:
36191         * modules/quotearg, modules/savewd:
36192         * modules/unistdio/u16-u16-vasnprintf:
36193         * modules/unistdio/u16-vasnprintf:
36194         * modules/unistdio/u32-u32-vasnprintf:
36195         * modules/unistdio/u32-vasnprintf:
36196         * modules/unistdio/u8-u8-vasnprintf:
36197         * modules/unistdio/u8-vasnprintf:
36198         * modules/unistdio/ulc-vasnprintf:
36199         * modules/unistr/u8-uctomb, modules/vasnprintf:
36200         (Depends-on:): Add attribute module.
36202 2020-05-03  Bruno Haible  <bruno@clisp.org>
36204         bison: Fix today's commit.
36205         * m4/bison.m4 (gl_PROG_BISON): Set ac_verc_fail to 'yes', not 'true'.
36207 2020-05-03  Bruno Haible  <bruno@clisp.org>
36209         list-c++: Add get_first, get_last, set_first, set_last operations.
36210         * lib/gl_list.hh (class gl_List): Add methods get_first, get_last,
36211         set_first, set_last.
36212         * lib/gl_list.h: Tweak comments.
36214 2020-05-03  Akim Demaille  <akim@lrde.epita.fr>
36216         bison: rely on bison's %require to check a version requirement
36217         See https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00021.html.
36218         * m4/bison.m4 (gl_PROG_BISON): Let bison itself decide if it it recent
36219         enough of not.
36220         So far it is the only know Yacc tool that supports '%require'.
36221         Other yaccs will actually even choke on seeing the -o option after the
36222         input file name.
36223         * m4/parse-datetime.m4: Simplify gl_PROG_BISON invocation.
36225 2020-05-02  Bruno Haible  <bruno@clisp.org>
36227         list: Add get_first, get_last, set_first, set_last operations.
36228         * lib/gl_list.h (gl_list_get_first, gl_list_get_last,
36229         gl_list_nx_set_first, gl_list_nx_set_last): New functions.
36230         * lib/gl_xlist.h (gl_list_set_first, gl_list_set_last): New functions.
36232 2020-05-02  Bruno Haible  <bruno@clisp.org>
36234         list: Remove redundant code for remove_first and remove_last operations.
36235         * lib/gl_list.h (struct gl_list_implementation): Remove fields
36236         remove_first, remove_last.
36237         (gl_list_remove_first, gl_list_remove_last): Implement in a generic way.
36238         * lib/gl_array_list.c: Revert last change.
36239         * lib/gl_carray_list.c: Likewise.
36240         * lib/gl_anylinked_list2.h: Likewise.
36241         * lib/gl_linked_list.c: Likewise.
36242         * lib/gl_linkedhash_list.c: Likewise.
36243         * lib/gl_anytree_list2.h: Likewise.
36244         * lib/gl_avltree_list.c: Likewise.
36245         * lib/gl_avltreehash_list.c: Likewise.
36246         * lib/gl_rbtree_list.c: Likewise.
36247         * lib/gl_rbtreehash_list.c: Likewise.
36248         * lib/gl_sublist.c: Likewise.
36250 2020-05-02  Bruno Haible  <bruno@clisp.org>
36252         bison-i18n: Add support for cross-compilation.
36253         Reported by Hongxu Jia <hongxu.jia@windriver.com> in
36254         <https://lists.gnu.org/archive/html/bison-patches/2016-02/msg00000.html>
36255         via Akim Demaille <akim@lrde.epita.fr>.
36256         * m4/bison-i18n.m4 (BISON_I18N): Accept a configure option
36257         --with-bison-prefix=PREFIX and use it to determine BISON_LOCALEDIR.
36258         Don't use bison's --print-localedir option when cross-compiling.
36259         Also, fix an error message and a comment.
36261 2020-05-01  Bruno Haible  <bruno@clisp.org>
36263         list: Add remove_first and remove_last operations.
36264         Suggested by Marc Nieper-Wißkirchen <marc.nieper+gnu@gmail.com> in
36265         <https://lists.gnu.org/archive/html/bug-gnulib/2020-04/msg00092.html>.
36266         * lib/gl_list.h (struct gl_list_implementation): Add fields
36267         remove_first, remove_last.
36268         (gl_list_remove_first, gl_list_remove_last): New functions.
36269         * lib/gl_array_list.c (gl_array_remove_first, gl_array_remove_last): New
36270         functions, based on gl_array_remove_at.
36271         (gl_array_list_implementation): Implement the new operations.
36272         * lib/gl_carray_list.c (gl_carray_remove_first, gl_carray_remove_last):
36273         New functions, based on gl_carray_remove_at.
36274         (gl_carray_list_implementation): Implement the new operations.
36275         * lib/gl_anylinked_list2.h (gl_linked_remove_first,
36276         gl_linked_remove_last): New functions, based on gl_linked_remove_at.
36277         * lib/gl_linked_list.c (gl_linked_list_implementation): Implement the
36278         new operations.
36279         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation):
36280         Likewise.
36281         * lib/gl_anytree_list2.h (gl_tree_remove_first, gl_tree_remove_last):
36282         New functions, based on gl_tree_remove_at.
36283         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Implement the
36284         new operations.
36285         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
36286         Likewise.
36287         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Likewise.
36288         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation):
36289         Likewise.
36290         * lib/gl_sublist.c (gl_sublist_remove_first, gl_sublist_remove_last):
36291         New functions, based on gl_sublist_remove_at.
36292         (gl_sublist_list_implementation): Implement the new operations.
36293         * lib/gl_list.hh (class gl_List): Add methods remove_first,
36294         remove_last.
36295         * tests/test-array_list.c (main): Test also gl_list_remove_first and
36296         gl_list_remove_last.
36297         * tests/test-avltree_list.c (main): Likewise.
36298         * tests/test-avltreehash_list.c (main): Likewise.
36299         * tests/test-carray_list.c (main): Likewise.
36300         * tests/test-linked_list.c (main): Likewise.
36301         * tests/test-linkedhash_list.c (main): Likewise.
36302         * tests/test-rbtree_list.c (main): Likewise.
36303         * tests/test-rbtreehash_list.c (main): Likewise.
36305 2020-05-01  Bruno Haible  <bruno@clisp.org>
36307         parse-datetime: Fix a build failure with an older bison version.
36308         * modules/parse-datetime (Makefile.am): Don't do the post-processing of
36309         parse-datetime.tab.c if a suitable version of bison was not found.
36311 2020-05-01  Bruno Haible  <bruno@clisp.org>
36313         bison: New module.
36314         * m4/bison.m4 (gl_PROG_BISON): New macro, extracted from
36315         m4/parse-datetime.m4.
36316         * m4/parse-datetime.m4 (gl_PARSE_DATETIME): Invoke gl_PROG_BISON.
36317         * modules/bison: New file.
36318         * modules/parse-datetime (Files): Remove m4/bison.m4.
36319         (Depends-on): Add bison.
36321 2020-05-01  Jose E. Marchesi  <jemarch@gnu.org>
36323         Update users.txt.
36324         * users.txt: Add poke.
36326 2020-04-28  Bruno Haible  <bruno@clisp.org>
36328         posix_spawn_file_actions_addfchdir tests: Enhance test.
36329         * tests/test-posix_spawn5.c: Include findprog.h.
36330         (test): New function, extracted from main.
36331         (main): Invoke it. Also, invoke it with a program name such as
36332         "bin/pwd".
36333         * modules/posix_spawn_file_actions_addfchdir-tests (Depends-on): Add
36334         findprog.
36336 2020-04-28  Bruno Haible  <bruno@clisp.org>
36338         posix_spawn_file_actions_addchdir tests: Enhance test.
36339         * tests/test-posix_spawn4.c: Include findprog.h.
36340         (test): New function, extracted from main.
36341         (main): Invoke it. Also, invoke it with a program name such as
36342         "bin/pwd".
36343         * modules/posix_spawn_file_actions_addchdir-tests (Depends-on): Add
36344         findprog.
36346 2020-04-28  Bruno Haible  <bruno@clisp.org>
36348         posix_spawn_file_actions_destroy: Fix a crash (bug from 2019-06-10).
36349         * lib/spawn_faction_destroy.c (posix_spawn_file_actions_destroy): Don't
36350         access elements of the wrong union member.
36352 2020-04-27  Bruno Haible  <bruno@clisp.org>
36354         getdate: Remove deprecated module.
36355         * modules/getdate: Remove file.
36356         * doc/getdate.texi: Remove file.
36357         * lib/getdate.h: Remove file.
36358         * NEWS: Mention the removal.
36360 2020-04-27  Bruno Haible  <bruno@clisp.org>
36362         realloc: Remove deprecated module.
36363         * modules/realloc: Remove file.
36364         * NEWS: Mention the removal.
36366 2020-04-27  Bruno Haible  <bruno@clisp.org>
36368         calloc: Remove deprecated module.
36369         * modules/calloc: Remove file.
36370         * NEWS: Mention the removal.
36372 2020-04-27  Bruno Haible  <bruno@clisp.org>
36374         malloc: Remove deprecated module.
36375         * modules/malloc: Remove file.
36376         * NEWS: Mention the removal.
36378 2020-04-27  Bruno Haible  <bruno@clisp.org>
36380         fnmatch-posix: Remove deprecated module.
36381         * modules/fnmatch-posix: Remove file.
36382         * MODULES.html.sh (Enhancements for POSIX:2008 functions): Update.
36383         * NEWS: Mention the removal.
36385 2020-04-27  Bruno Haible  <bruno@clisp.org>
36387         pipe: Remove deprecated module.
36388         * modules/pipe: Remove file.
36389         * lib/pipe.h: Remove file.
36390         * NEWS: Mention the removal.
36392 2020-04-27  Bruno Haible  <bruno@clisp.org>
36394         getopt: Remove deprecated module.
36395         * modules/getopt: Remove file.
36396         * NEWS: Mention the removal.
36398 2020-04-27  Bruno Haible  <bruno@clisp.org>
36400         remove-dest-slash: Remove deprecated module.
36401         * modules/rename-dest-slash: Remove file.
36402         * MODULES.html.sh (Compatibility checks for POSIX:2008 functions):
36403         Update.
36404         * NEWS: Mention the removal.
36406 2020-04-27  Bruno Haible  <bruno@clisp.org>
36408         unictype/bidicategory-*: Remove deprecated modules.
36409         * modules/unictype/bidicategory-all: Remove file.
36410         * modules/unictype/bidicategory-byname: Remove file.
36411         * modules/unictype/bidicategory-name: Remove file.
36412         * modules/unictype/bidicategory-of: Remove file.
36413         * modules/unictype/bidicategory-test: Remove file.
36414         * MODULES.html.sh (Unicode string functions): Update.
36415         * NEWS: Mention the removals.
36417 2020-04-25  Paul Eggert  <eggert@cs.ucla.edu>
36419         Tune fts for FTS_LOGICAL+FTS_NOSTAT
36420         From a suggestion by Askar Safin in:
36421         https://lists.gnu.org/r/bug-gnulib/2020-04/msg00074.html
36422         * lib/fts.c (fts_build): If file types are known, optimize
36423         FTS_LOGICAL+FTS_NOSTAT for non-symlinks and non-directories the
36424         same way that we already optimize FTS_PHYSICAL+FTS_NOSTAT for
36425         non-directories.
36427 2020-04-19  Bruno Haible  <bruno@clisp.org>
36429         vasnprintf: Add support for printing wide characters using escapes.
36430         * lib/vasnprintf.c (ENABLE_WCHAR_FALLBACK): Document optional macro.
36431         (wctomb_fallback): New function.
36432         (local_wctomb): New function.
36433         (local_wcrtomb): New function or macro.
36434         (MAX_ROOM_NEEDED): Adjust estimate for %lc.
36435         (VASNPRINTF): Simplify %ls code by use of local_wcrtomb. Add code for
36436         %lc.
36438 2020-04-15  Paul Eggert  <eggert@cs.ucla.edu>
36440         fts: remove NOSTAT_LEAF_OPTIMIZATION
36441         It caused ‘find’ and ‘du’ to dump core, and it was useful
36442         only for obsolescent Linux filesystems anyway.  Problem reported in:
36443         https://lists.gnu.org/r/bug-gnulib/2020-04/msg00068.html
36444         Quite possibly there is still a serious underlying fts bug with
36445         tight-loop-check and mutating file systems, but if so this patch
36446         should cause the bug to be triggered less often.
36447         * lib/fts.c (enum leaf_optimization): Remove
36448         NOSTAT_LEAF_OPTIMIZATION, as it’s problematic.
36449         (S_MAGIC_REISERFS, S_MAGIC_XFS): Remove; no longer needed.
36450         (leaf_optimization): Remove special cases for ReiserFS and XFS.
36451         (fts_read): Remove NOSTAT_LEAF_OPTIMIZATION code.
36452         * lib/fts_.h (struct _ftsent.fts_n_dirs_remaining):
36453         Remove.  All uses removed.
36455 2020-04-13  Bastien Roucariès  <rouca@debian.org>
36457         explicit_bzero: Improve code style.
36458         * lib/explicit_bzero.c (explicit_bzero): Use '\0' instead of 0.
36460 2020-04-13  Bastien Roucariès  <rouca@debian.org>
36462         explicit_bzero: On native Windows, use SecureZeroMemory().
36463         * lib/explicit_bzero.c: Include <windows.h>.
36464         (explicit_bzero): On native Windows, use SecureZeroMemory.
36466 2020-04-13  Bastien Roucariès  <rouca@debian.org>
36468         explicit_bzero: Use memset_s() when available.
36469         * lib/explicit_bzero.c (__STDC_WANT_LIB_EXT1__): Define.
36470         (explicit_bzero): Use memset_s when available.
36471         * m4/explicit_bzero.m4 (gl_PREREQ_EXPLICIT_BZERO): Test for memset_s.
36473 2020-04-13  Bastien Roucariès  <rouca@debian.org>
36475         explicit_bzero tests: Fix test failure on OpenBSD 6.5.
36476         * tests/test-explicit_bzero.c (test_heap): Handle implementations of
36477         free() that overwrite the memory with canaries.
36479 2020-04-13  Akim Demaille  <akim@lrde.epita.fr>
36481         bootstrap: recommend git submodule update --init
36482         Reported by Bruno Haible.
36483         <https://lists.gnu.org/r/bug-gnulib/2020-03/msg00101.html>
36484         * build-aux/bootstrap: recommand "git submodule update --init"
36485         rather than "git submodule init".
36487 2020-04-12  Bruno Haible  <bruno@clisp.org>
36489         explicit_bzero: Add tests.
36490         * tests/test-explicit_bzero.c: New file.
36491         * modules/explicit_bzero-tests: New file.
36493 2020-04-11  Bruno Haible  <bruno@clisp.org>
36495         explicit_bzero: Relicense under LGPLv2+.
36496         Approved by Paul Eggert.
36497         * modules/explicit_bzero (License): Change to LGPLv2+.
36499 2020-04-10  Bruno Haible  <bruno@clisp.org>
36501         findprog, relocatable-prog: Ignore directories during PATH search.
36502         Reported by Frederick Eaton via Dmitry Goncharov in
36503         <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00003.html>.
36505         * lib/findprog.c (find_in_path): When the file found in a PATH element
36506         is a directory, continue searching.
36507         * modules/findprog (Depends-on): Add sys_stat, stat.
36508         * modules/findprog-lgpl (Depends-on): Likewise.
36510         * lib/progreloc.c (maybe_executable): When the file found in a PATH
36511         element is a directory, continue searching.
36512         * lib/relocwrapper.c: Update comments.
36513         * modules/relocatable-prog-wrapper (Files): Add m4/largefile.m4.
36514         (configure.ac-early): New section.
36516 2020-04-10  Bruno Haible  <bruno@clisp.org>
36518         MODULES.html.sh: Support for reproducible builds from git-less tarballs.
36519         Reported by Bernhard M. Wiedemann <bwiedemann@suse.de> in
36520         <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00061.html>.
36521         * MODULES.html.sh: In a git-less tarball, use the date of the first
36522         ChangeLog entry.
36524 2020-04-04  Bruno Haible  <bruno@clisp.org>
36526         Fix comments: The gettext library is under LGPL 2.1, not LGPL 2.0.
36527         * m4/gettext.m4: Fix comments regarding the gettext library.
36528         * m4/intl-thread-locale.m4: Likewise.
36529         * m4/intlmacosx.m4: Likewise.
36530         * m4/lcmessage.m4: Likewise.
36531         * m4/nls.m4: Likewise.
36532         * m4/po.m4: Likewise.
36533         * m4/progtest.m4: Likewise.
36535 2020-04-04  Jim Meyering  <meyering@fb.com>
36537         maint: remove a stray inter-word space in a 6x-repeated comment
36538         Induce the changes by running this:
36539           re='by  perl'; git grep -l "$re"|xargs perl -pi -e "s/$re/by perl/"
36540         * build-aux/announce-gen: Change "by  perl" to "by perl".
36541         * build-aux/gitlog-to-changelog: Likewise.
36542         * build-aux/prefix-gnulib-mk: Likewise.
36543         * build-aux/update-copyright: Likewise.
36544         * build-aux/useless-if-before-free: Likewise.
36545         * tests/test-update-copyright.sh: Likewise.
36547 2020-03-28  Bruno Haible  <bruno@clisp.org>
36549         Use module 'filename' instead of module 'dosname'.
36551         * lib/at-func.c: Include filename.h instead of dosname.h.
36552         * lib/unlinkat.c: Likewise.
36553         * modules/areadlinkat (Depends-on): Add filename. Remove dosname.
36554         * modules/areadlinkat-with-size (Depends-on): Likewise.
36555         * modules/faccessat (Depends-on): Likewise.
36556         * modules/fchmodat (Depends-on): Likewise.
36557         * modules/fchownat (Depends-on): Likewise.
36558         * modules/fstatat (Depends-on): Likewise.
36559         * modules/mkdirat (Depends-on): Likewise.
36560         * modules/mkfifoat (Depends-on): Likewise.
36561         * modules/readlinkat (Depends-on): Likewise.
36562         * modules/selinux-at (Depends-on): Likewise.
36563         * modules/symlinkat (Depends-on): Likewise.
36564         * modules/unlinkat (Depends-on): Likewise.
36565         * modules/utimensat (Depends-on): Likewise.
36567         * lib/at-func2.c: Include filename.h instead of dosname.h.
36568         * modules/linkat (Depends-on): Add filename. Remove dosname.
36569         * modules/renameatu (Depends-on): Likewise.
36571         * lib/canonicalize.c: Include filename.h instead of dosname.h.
36572         * lib/canonicalize-lgpl.c: Likewise.
36573         * modules/canonicalize (Depends-on): Add filename.
36574         * modules/canonicalize-lgpl (Depends-on): Likewise.
36576         * lib/dirname.h: Include filename.h instead of dosname.h.
36577         * modules/dirname-lgpl (Depends-on): Add filename. Remove dosname.
36579         * lib/fchdir.c: Include filename.h instead of dosname.h.
36580         * modules/fchdir (Depends-on): Add filename. Remove dosname.
36582         * lib/openat.c: Include filename.h instead of dosname.h.
36583         * modules/openat (Depends-on): Add filename. Remove dosname.
36585         * lib/rmdir.c: Include filename.h instead of dosname.h.
36586         * modules/rmdir (Depends-on): Add filename. Remove dosname.
36588         * lib/savewd.c: Include filename.h instead of dosname.h.
36589         * modules/savewd (Depends-on): Add filename. Remove dosname.
36591         * lib/unlink.c: Include filename.h instead of dosname.h.
36592         * modules/unlink (Depends-on): Add filename. Remove dosname.
36594         * modules/relocatable-prog-wrapper (Depends-on): Add filename.
36595         * lib/relocwrapper.c: Update comments.
36597         * modules/lstat (Depends-on): Remove dosname.
36599 2020-03-28  Bruno Haible  <bruno@clisp.org>
36601         dosname: Redirect to 'filename'.
36602         Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
36603         <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00042.html>.
36604         * lib/dosname.h: Remove all definitions. Just include filename.h.
36605         * modules/dosname (Status, Notice): Mark as deprecated.
36606         (Depends-on): Add 'filename'.
36608 2020-03-28  Bruno Haible  <bruno@clisp.org>
36610         dosname: Change IS_RELATIVE_FILE_NAME.
36611         * lib/dosname.h (IS_RELATIVE_FILE_NAME): On native Windows, OS/2, DOS,
36612         change the definition so that IS_RELATIVE_FILE_NAME("c:") is false.
36613         * NEWS: Mention the change.
36615 2020-03-28  Bruno Haible  <bruno@clisp.org>
36617         filename: Copy some definitions from module 'dosname'.
36618         * lib/filename.h: Include <string.h>, for IS_FILE_NAME_WITH_DIR.
36619         (HAS_DEVICE): Document macro.
36620         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New macro.
36621         (IS_ABSOLUTE_FILE_NAME): Consider
36622         FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE.
36623         (IS_RELATIVE_FILE_NAME, IS_FILE_NAME_WITH_DIR): New macros.
36624         (IS_ABSOLUTE_PATH, IS_PATH_WITH_DIR): Define as deprecated aliases.
36625         * lib/relocatable.c (IS_FILE_NAME_WITH_DIR): Renamed from
36626         IS_PATH_WITH_DIR.
36627         (DllMain): Update.
36628         * lib/progreloc.c (IS_FILE_NAME_WITH_DIR): Renamed from
36629         IS_PATH_WITH_DIR.
36630         (find_executable): Update.
36631         * NEWS: Document the deprecations.
36633 2020-03-25  Paul Eggert  <eggert@cs.ucla.edu>
36635         getopt-posix: port __GETOPT_PREFIX to macOS
36636         * lib/getopt-pfx-core.h (_GETOPT) [__APPLE__ && __GETOPT_PREFIX]:
36637         Define to work around a problem with asm on macOS (Bug#40205).
36639 2020-03-22  Bruno Haible  <bruno@clisp.org>
36641         MODULES.html.sh: Add support for reproducible builds.
36642         Reported by Bernhard M. Wiedemann <bwiedemann@suse.de> in
36643         <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00024.html>.
36644         * MODULES.html.sh: Print the date of the last gnulib commit, not the
36645         current date.
36647 2020-03-22  Bruno Haible  <bruno@clisp.org>
36649         Several modules: Depend on stat.
36650         * modules/acl-permissions (Depends-on): Add stat.
36651         * modules/canonicalize (Depends-on): Likewise.
36652         * modules/file-has-acl (Depends-on): Likewise.
36653         * modules/fstat (Depends-on): Likewise.
36654         * modules/fstatat (Depends-on): Likewise.
36655         * modules/glob (Depends-on): Likewise.
36656         * modules/javacomp (Depends-on): Likewise.
36657         * modules/linkat (Depends-on): Likewise.
36658         * modules/mkdir (Depends-on): Likewise.
36659         * modules/pt_chown (Depends-on): Likewise.
36660         * modules/ptsname_r (Depends-on): Likewise.
36661         * modules/readlinkat (Depends-on): Likewise.
36662         * modules/rename (Depends-on): Likewise.
36663         * modules/renameatu (Depends-on): Likewise.
36664         * modules/tmpdir (Depends-on): Likewise.
36665         * modules/utimens (Depends-on): Likewise.
36666         * modules/relocatable-prog-wrapper (Depends-on): Add largefile.
36667         * modules/same (Depends-on): Remove stat.
36669 2020-03-22  Bruno Haible  <bruno@clisp.org>
36671         acl-permissions: Improve autoconf macro.
36672         * m4/acl.m4 (gl_FUNC_ACL): Test the value of gl_need_lib_has_acl
36673         more reliably.
36675 2020-03-22  Bruno Haible  <bruno@clisp.org>
36677         file-has-acl: Fix module description.
36678         * modules/file-has-acl (Files): Add lib/acl-internal.h, m4/acl.m4.
36679         (Depends-on): Depend on acl-permissions unconditionally.
36681 2020-03-21  Bruno Haible  <bruno@clisp.org>
36683         unlink: Ensure errno also on native Windows.
36684         * modules/unlink (Depends-on): Add malloc-posix.
36686 2020-03-21  Paul Eggert  <eggert@cs.ucla.edu>
36688         unlink: fix malloc errno typo
36689         Problem reported by Tim Rühsen in:
36690         https://lists.gnu.org/r/bug-gnulib/2020-03/msg00044.html
36691         * lib/unlink.c (rpl_unlink): Don’t mask malloc errno.
36693 2020-03-16  Bruno Haible  <bruno@clisp.org>
36695         *printf-posix: Fix m4 error (regression from 2020-03-08).
36696         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): Enable interpretation of
36697         brackets in AC_COMPILE_IFELSE invocation.
36699 2020-03-08  Bruno Haible  <bruno@clisp.org>
36701         crypto/af_alg, renameatu, same, term-style-control: Depend on fstat.
36702         * modules/crypto/af_alg (Depends-on): Add fstat.
36703         * modules/renameatu (Depends-on): Likewise.
36704         * modules/same (Depends-on): Likewise.
36705         * modules/term-style-control (Depends-on): Likewise.
36707 2020-03-08  Bruno Haible  <bruno@clisp.org>
36709         *printf-posix: Document why it's overridden on some glibc systems.
36710         Reported by Adrian Bunk <bunk@stusta.de> in
36711         <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00011.html>.
36712         * doc/posix-functions/*printf.texi: Document the problem with the %n
36713         directive on some glibc systems.
36714         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_N, gl_SNPRINTF_DIRECTIVE_N): Adjust
36715         the cross-compilation guesses accordingly.
36717 2020-03-07  Paul Eggert  <eggert@cs.ucla.edu>
36719         open, openat: port to (O_RDWR | O_RDONLY) != 0
36720         Potential portability problem reported by Dan Gohman in:
36721         https://lists.gnu.org/r/bug-gnulib/2020-03/msg00000.html
36722         * lib/open.c (open):
36723         * lib/openat.c (rpl_openat):
36724         Don’t assume O_RDONLY is disjoint from O_RDWR.
36726 2020-03-07  Bruno Haible  <bruno@clisp.org>
36728         openat: Fix theoretically possible issue on GNU/Hurd.
36729         Reported by Dan Gohman <sunfish@mozilla.com> in
36730         <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00000.html>.
36731         * lib/openat.c (rpl_openat): When testing whether flags contains O_RDWR,
36732         ignore the bits that are also set in O_RDONLY.
36734 2020-02-24  Bruno Haible  <bruno@clisp.org>
36736         getloadavg: Don't use /usr/local when cross-compiling on AIX.
36737         Reported by Jens Rehsack <sno@netbsd.org> in
36738         <https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00136.html>.
36739         * m4/getloadavg.m4 (gl_GETLOADAVG): Don't look in /usr/local/lib when
36740         cross-compiling.
36742 2020-02-24  Bruno Haible  <bruno@clisp.org>
36744         fcntl: Add witness of gnulib override.
36745         Reported by Jens Rehsack <sno@netbsd.org> in
36746         <https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00137.html>.
36747         * lib/fcntl.in.h (GNULIB_defined_rpl_fcntl, GNULIB_defined_fcntl): New
36748         macros.
36750 2020-02-23  Assaf Gordon  <assafgordon@gmail.com>
36752         Update users.txt.
36753         * users.txt: Add datamash, time.
36755 2020-02-23  Bruno Haible  <bruno@clisp.org>
36757         uni*/base: Use 'restrict'.
36758         * lib/unitypes.in.h (_UC_RESTRICT): New macro, based on '_Restrict_'
36759         from lib/regex.h.
36760         * lib/unistr.in.h (u8_cpy, u16_cpy, u32_cpy, u8_strcpy, u16_strcpy,
36761         u32_strcpy, u8_stpcpy, u16_stpcpy, u32_stpcpy, u8_strncpy, u16_strncpy,
36762         u32_strncpy, u8_stpncpy, u16_stpncpy, u32_stpncpy, u8_strcat,
36763         u16_strcat, u32_strcat, u8_strncat, u16_strncat, u32_strncat, u8_strtok,
36764         u16_strtok, u32_strtok): Use '_UC_RESTRICT'.
36765         * lib/uninorm.in.h (u8_normalize, u16_normalize, u32_normalize): Use
36766         '_UC_RESTRICT'.
36767         * lib/uniconv.in.h (u8_conv_to_encoding, u16_conv_to_encoding,
36768         u32_conv_to_encoding): Use '_UC_RESTRICT'.
36769         * lib/unicase.in.h (u8_toupper, u16_toupper, u32_toupper, u8_tolower,
36770         u16_tolower, u32_tolower, u8_totitle, u16_totitle, u32_totitle,
36771         u8_ct_toupper, u16_ct_toupper, u32_ct_toupper, u8_ct_tolower,
36772         u16_ct_tolower, u32_ct_tolower, u8_ct_totitle, u16_ct_totitle,
36773         u32_ct_totitle, u8_casefold, u16_casefold, u32_casefold, u8_ct_casefold,
36774         u16_ct_casefold, u32_ct_casefold, u8_casexfrm, u16_casexfrm,
36775         u32_casexfrm, ulc_casexfrm): Use '_UC_RESTRICT'.
36776         * lib/unilbrk.in.h (u8_possible_linebreaks, u16_possible_linebreaks,
36777         u32_possible_linebreaks, ulc_possible_linebreaks, u8_width_linebreaks,
36778         u16_width_linebreaks, u32_width_linebreaks, ulc_width_linebreaks): Use
36779         '_UC_RESTRICT'.
36780         * lib/uniwbrk.in.h (ulc_wordbreaks): Use '_UC_RESTRICT'.
36781         * lib/unistdio.in.h (ulc_sprintf, ulc_snprintf, ulc_asnprintf,
36782         ulc_vsprintf, ulc_vsnprintf, ulc_vasnprintf, u8_u8_sprintf,
36783         u8_u8_snprintf, u8_u8_asnprintf, u8_u8_vsprintf, u8_u8_vsnprintf,
36784         u8_u8_vasnprintf, u16_u16_sprintf, u16_u16_snprintf, u16_u16_asnprintf,
36785         u16_u16_vsprintf, u16_u16_vsnprintf, u16_u16_vasnprintf,
36786         u32_u32_sprintf, u32_u32_snprintf, u32_u32_asnprintf, u32_u32_vsprintf,
36787         u32_u32_vsnprintf, u32_u32_vasnprintf): Use '_UC_RESTRICT'.
36789 2020-02-23  Bruno Haible  <bruno@clisp.org>
36791         glob, spawn: Use improved '_Restrict_' definition.
36792         * lib/glob.in.h (_Restrict_): Use same definition as in lib/regex.h.
36793         * lib/spawn.in.h (_Restrict_, _Restrict_arr_): Likewise.
36795 2020-02-23  Bruno Haible  <bruno@clisp.org>
36797         crypto/gc: Use 'restrict'.
36798         * lib/gc.h (gc_pbkdf2_hmac, gc_pbkdf2_sha1): Use 'restrict'.
36799         * m4/gc.m4 (gl_GC): Require AC_C_RESTRICT.
36801         crypto/hmac-*: Use 'restrict'.
36802         * lib/hmac.h (hmac_md5, hmac_sha1, hmac_sha256, hmac_sha512): Use
36803         'restrict'.
36804         * modules/crypto/hmac-md5 (configure.ac): Require AC_C_RESTRICT.
36805         * modules/crypto/hmac-sha1 (configure.ac): Likewise.
36806         * modules/crypto/hmac-sha256 (configure.ac): Likewise.
36807         * modules/crypto/hmac-sha512 (configure.ac): Likewise.
36809         crypto/sm3: Use 'restrict'.
36810         * lib/sm3.h (sm3_finish_ctx, sm3_read_ctx, sm3_buffer): Use 'restrict'.
36811         * m4/sm3.m4 (gl_SM3): Require AC_C_RESTRICT.
36813         crypto/*-buffer: Use 'restrict'.
36814         * lib/gl_openssl.h (GL_CRYPTO_FN (_finish_ctx), GL_CRYPTO_FN (_buffer),
36815         GL_CRYPTO_FN (_read_ctx)): Use 'restrict'.
36817         crypto/sha512-buffer: Use 'restrict'.
36818         * lib/sha512.h (sha512_finish_ctx, sha384_finish_ctx, sha512_read_ctx,
36819         sha384_read_ctx, sha512_buffer, sha384_buffer): Use 'restrict'.
36820         * modules/crypto/sha512-buffer (configure.ac): Require AC_C_RESTRICT.
36822         crypto/sha256-buffer: Use 'restrict'.
36823         * lib/sha256.h (sha256_finish_ctx, sha224_finish_ctx, sha256_read_ctx,
36824         sha224_read_ctx, sha256_buffer, sha224_buffer): Use 'restrict'.
36825         * modules/crypto/sha256-buffer (configure.ac): Require AC_C_RESTRICT.
36827         crypto/sha1-buffer: Use 'restrict'.
36828         * lib/sha1.h (sha1_finish_ctx, sha1_read_ctx, sha1_buffer): Use
36829         'restrict'.
36830         * modules/crypto/sha1-buffer (configure.ac): Require AC_C_RESTRICT.
36832         crypto/md5-buffer: Use 'restrict'.
36833         * lib/md5.h (__md5_finish_ctx, __md5_read_ctx, __md5_buffer): Use
36834         'restrict'.
36835         * modules/crypto/md5-buffer (configure.ac): Require AC_C_RESTRICT.
36837         crypto/md4: Use 'restrict'.
36838         * lib/md4.h (md4_finish_ctx, md4_read_ctx, md4_buffer): Use 'restrict'.
36839         * modules/crypto/md4 (configure.ac): Require AC_C_RESTRICT.
36841         crypto/md2: Use 'restrict'.
36842         * lib/md2.h (md2_finish_ctx, md2_read_ctx, md2_buffer): Use 'restrict'.
36843         * modules/crypto/md2 (configure.ac): Require AC_C_RESTRICT.
36845         crypto/rijndael: Use 'restrict'.
36846         * lib/rijndael-api-fst.h (rijndaelBlockEncrypt, rijndaelPadEncrypt,
36847         rijndaelBlockDecrypt, rijndaelPadDecrypt): Use 'restrict'.
36848         * modules/crypto/rijndael (configure.ac): Require AC_C_RESTRICT.
36850         crypto/arctwo: Use 'restrict'.
36851         * lib/arctwo.h (arctwo_encrypt, arctwo_decrypt): Use 'restrict'.
36852         * modules/crypto/arctwo (configure.ac): Require AC_C_RESTRICT.
36854         crypto/arcfour: Use 'restrict'.
36855         * lib/arcfour.h (arcfour_stream): Use 'restrict'.
36856         * modules/crypto/arcfour (configure.ac): Require AC_C_RESTRICT.
36858         careadlinkat: Use 'restrict'.
36859         * lib/careadlinkat.h (careadlinkat): Use 'restrict'.
36860         * modules/careadlinkat (configure.ac): Require AC_C_RESTRICT.
36861         * modules/relocatable-prog-wrapper (configure.ac): Likewise.
36863         regex-quote: Use 'restrict'.
36864         * lib/regex-quote.h (regex_quote_copy): Use 'restrict'.
36865         * modules/regex-quote (configure.ac): Require AC_C_RESTRICT.
36867         system-quote: Use 'restrict'.
36868         * lib/system-quote.h (system_quote_copy): Use 'restrict'.
36869         * modules/system-quote (configure.ac): Require AC_C_RESTRICT.
36871         sh-quote: Use 'restrict'.
36872         * lib/sh-quote.h (shell_quote_copy): Use 'restrict'.
36873         * modules/sh-quote (configure.ac): Require AC_C_RESTRICT.
36875         quotearg: Use 'restrict'.
36876         * lib/quotearg.h (quotearg_buffer): Use 'restrict'.
36877         * m4/quotearg.m4 (gl_QUOTEARG): Require AC_C_RESTRICT.
36879         parse-datetime: Use 'restrict'.
36880         * lib/parse-datetime.h (parse_datetime, parse_datetime2): Use
36881         'restrict'.
36882         * m4/parse-datetime.m4 (gl_PARSE_DATETIME): Require AC_C_RESTRICT.
36884         nstrftime: Use 'restrict'.
36885         * lib/strftime.h (nstrftime): Use 'restrict'.
36886         * m4/nstrftime.m4 (gl_FUNC_GNU_STRFTIME): Require AC_C_RESTRICT.
36888         mbstok_r: Use 'restrict'.
36889         * lib/string.in.h (mbstok_r): Use 'restrict'.
36891         xmemcoll: Use 'restrict'.
36892         * lib/xmemcoll.h (xmemcoll): Use 'restrict'.
36893         * modules/xmemcoll (configure.ac): Require AC_C_RESTRICT.
36895         memcoll: Use 'restrict'.
36896         * lib/memcoll.h (memcoll): Use 'restrict'.
36897         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_C_RESTRICT.
36899         vasnprintf: Use 'restrict'.
36900         * lib/vasnprintf.h (asnprintf, vasnprintf): Use 'restrict'.
36901         * modules/vasnprintf (configure.ac): Require AC_C_RESTRICT.
36903         c-vasnprintf: Use 'restrict'.
36904         * lib/c-vasnprintf.h (c_vasnprintf): Use 'restrict'.
36905         * modules/c-vasnprintf (configure.ac): Require AC_C_RESTRICT.
36907         c-vsnprintf: Use 'restrict'.
36908         * lib/c-vsnprintf.h (c_vsnprintf): Use 'restrict'.
36909         * modules/c-vsnprintf (configure.ac): Require AC_C_RESTRICT.
36911         c-snprintf: Use 'restrict'.
36912         * lib/c-snprintf.h (c_snprintf): Use 'restrict'.
36913         * modules/c-snprintf (configure.ac): Require AC_C_RESTRICT.
36915         astrxfrm: Use 'restrict'.
36916         * lib/astrxfrm.h (astrxfrm): Use 'restrict'.
36917         * modules/astrxfrm (configure.ac): Require AC_C_RESTRICT.
36919         amemxfrm: Use 'restrict'.
36920         * lib/amemxfrm.h (amemxfrm): Use 'restrict'.
36921         * modules/amemxfrm (configure.ac): Require AC_C_RESTRICT.
36923 2020-02-22  Paul Eggert  <eggert@cs.ucla.edu>
36925         fchmodat, lchmod: simplify
36926         It appears that we may have overengineered lchmod and fchmodat,
36927         in that the code was prepared for some hypothetical platforms but
36928         was so complicated that it was hard to understand.  I attempted to
36929         improve the situation by simplifying the code when this
36930         simplification should not hurt on real platforms; we can re-add
36931         complexity later to port to platforms I didn’t know about.
36932         * lib/fchmodat.c (fchmodat):
36933         * lib/lchmod.c (lchmod):
36934         Put the ‘defined __linux__ || defined __ANDROID__’ #ifdef only
36935         around the /proc code that needs it.
36936         * lib/fchmodat.c (fchmodat): Coalese calls to orig_fchmodat.
36937         * lib/lchmod.c (__need_system_sys_stat_h): Omit; no longer needed.
36938         Do not include <config.h> twice.
36939         (orig_lchmod) [HAVE_LCHMOD]: Remove, since we need not wrap
36940         lchmod on any known hosts.
36941         (lchmod): Do not defer to fchmodat, so that the lchmod module
36942         need not depend on the fchmodat module (which is a circular
36943         dependency).  Do not use openat, since ‘open’ suffices.
36944         Coalesce calls to lchmod/chmod.
36945         * lib/lchmod.c, lib/sys_stat.in.h (lchmod):
36946         * m4/sys_stat_h.m4 (REPLACE_FSTAT):
36947         * modules/lchmod (Depends-on, configure.ac):
36948         * modules/sys_stat (Depends-on):
36949         Do not worry about replacing lchmod, since that shouldn’t happen.
36950         * m4/lchmod.m4 (gl_FUNC_LCHMOD): Do not check for fchmodat.
36951         Do not worry about whether lchmod works on non-symlinks,
36952         since every known lchmod works on non-symlinks.
36953         * modules/lchmod (Depends-on):
36954         Remove circular dependency on fchmodat.
36956 2020-02-22  Bruno Haible  <bruno@clisp.org>
36958         lchmod: Fix link error on Solaris 10 (regression from 2020-02-16).
36959         * lib/lchmod.c (lchmod): Use the code with lstat and chmod also when
36960         NEED_LCHMOD_NONSYMLINK_FIX is not defined.
36962 2020-02-22  Bruno Haible  <bruno@clisp.org>
36964         Use 'restrict' in all POSIX function declarations.
36965         * lib/iconv.in.h (iconv): Use 'restrict'.
36966         * lib/inttypes.in.h (strtoimax, strtoumax): Likewise.
36967         * lib/monetary.in.h (strfmon_l): Likewise.
36968         * lib/pthread.in.h (pthread_create, pthread_mutex_init,
36969         pthread_mutexattr_gettype, pthread_mutexattr_getrobust,
36970         pthread_mutex_timedlock, pthread_rwlock_init,
36971         pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock,
36972         pthread_cond_init, pthread_cond_wait, pthread_cond_timedwait): Likewise.
36973         * lib/search.in.h (tdelete): Likewise.
36974         * lib/signal.in.h (pthread_sigmask, sigprocmask): Likewise.
36975         * lib/stdio.in.h (dprintf, fgets, fopen, fprintf, fputs, fread, freopen,
36976         fscanf, fwrite, getdelim, getline, printf, scanf, snprintf, sprintf,
36977         vdprintf, vfprintf, vfscanf, vprintf, vscanf, vsnprintf, vsprintf):
36978         Likewise.
36979         * lib/stdlib.in.h (mbtowc, realpath, strtod, strtold, strtoll,
36980         strtoull): Likewise.
36981         * lib/string.in.h (strncat): Likewise.
36982         * lib/sys_socket.in.h (accept, getpeername, getsockname, getsockopt,
36983         recvfrom): Likewise.
36984         * lib/sys_stat.in.h (fstatat, lstat, stat): Likewise.
36985         * lib/time.in.h (strftime): Likewise.
36986         * lib/unistd.in.h (readlink, readlinkat): Likewise.
36987         * lib/wchar.in.h (mbrtowc, mbrlen, mbsrtowcs, mbsnrtowcs, wcrtomb,
36988         wcsrtombs, wcsnrtombs, wmemcpy, wcscpy, wcpcpy, wcsncpy, wcpncpy,
36989         wcscat, wcsncat, wcsxfrm, wcsstr, wcstok, wcsftime): Likewise.
36990         * m4/iconv_h.m4 (gl_ICONV_H): Require AC_C_RESTRICT.
36991         * m4/inttypes.m4 (gl_INTTYPES_INCOMPLETE): Likewise.
36992         * m4/monetary_h.m4 (gl_MONETARY_H): Likewise.
36993         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
36994         * m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
36995         * m4/stdio_h.m4 (gl_STDIO_H): Likewise.
36996         * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
36997         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
36998         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
36999         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
37000         * m4/wchar_h.m4 (gl_WCHAR_H): Likewise.
37001         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Make consistent with the
37002         other *_h.m4 files.
37003         * m4/time_h.m4 (gl_HEADER_TIME_H): Likewise.
37005 2020-02-22  Bruno Haible  <bruno@clisp.org>
37007         Update NEWS.
37008         * NEWS: Mention the last change.
37010 2020-02-22  Paul Eggert  <eggert@cs.ucla.edu>
37012         chmodat, chownat: new modules
37013         These are split from fchmodat, fchownat.  GNU Emacs needs the
37014         POSIX-specified fchmodat, but not the gnulib-specified chmodat and
37015         lchmodat.  Split the latter two into a new module chmodat.
37016         Similarly for fchownat.  This the same basic idea for why statat
37017         was split from fstatat on 2013-01-23.
37018         * lib/chmodat.c, lib/openat.h (CHMODAT_INLINE):
37019         Rename from FCHMODAT_INLINE.  All uses changed.
37020         * lib/chownat.c, lib/openat.h (CHOWNAT_INLINE):
37021         Rename from FCHOWNAT_INLINE.  All uses changed.
37022         * lib/openat.h:
37023         (chownat, lchownat): Define if GNULIB_CHOWNAT, not GNULIB_FCHOWNAT.
37024         (chmodat, lchmodat): Define if GNULIB_CHMODAT, not GNULIB_FCHMODAT.
37025         * modules/chmodat, modules/chownat, tests/test-chownat.c: New files.
37026         * modules/fchmodat (Files:): Remove lib/fchmodat.c.
37027         (configure.ac): Remove fchmodat module indicator.
37028         (Makefile.am): Omit chmodat.c.
37029         (Maintainer): Add self.
37030         * modules/fchownat: Similarly, but for chown.
37031         * tests/test-fchownat.c (BASE): Don't define if already defined.
37032         (do_chown, do_lchown) [!TEST_CHOWNAT]: Test fchownat instead.
37034 2020-02-22  Bruno Haible  <bruno@clisp.org>
37036         users.txt: Add groff.
37037         Reported by Bjarni Ingi Gislason <bjarniig@rhi.hi.is>.
37038         * users.txt: Add groff.
37040 2020-02-22  Bruno Haible  <bruno@clisp.org>
37042         gnulib-tool: Ensure copied files are writable.
37043         Reported by Benno Fünfstück <benno.fuenfstueck@gmail.com> in
37044         <https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00101.html>.
37045         * gnulib-tool (func_ensure_writable): New function.
37046         (func_ln_s, func_hardlink, func_lookup_file, func_import,
37047         func_create_testdir, copy-file): Invoke it after copying a file.
37049 2020-02-22  Bruno Haible  <bruno@clisp.org>
37051         users.txt: Update.
37052         * users.txt: Update URLs to projects that have moved or switched to git.
37053         Use canonical host names. Prefer gitweb over cgit. Prefer the tree view
37054         over the summary view. Add gawk.
37056 2020-02-21  Paul Eggert  <eggert@cs.ucla.edu>
37058         largefile: remove _DARWIN_USE_64_BIT_INODE
37059         It’s not needed in currently-supported macOS versions, and was
37060         problematic anyway in MacOS X 10.5 which was the only version that
37061         could use it.  Problem reported by Peter Eisentraut in:
37062         https://lists.gnu.org/r/bug-autoconf/2020-02/msg00004.html
37063         * m4/largefile.m4 (AC_SYS_LARGEFILE):
37064         Don’t define _DARWIN_USE_64_BIT_INODE.
37065         This syncs with Autoconf master.
37067         Add ‘extern "C"’ to count-one-bits.h etc.
37068         This ports these .h files to C++.
37069         Problem reported by Simon Marchi in:
37070         https://lists.gnu.org/r/bug-gnulib/2020-02/msg00110.html
37071         * lib/count-leading-zeros.h, lib/count-one-bits.h:
37072         * lib/count-trailing-zeros.h: Add ‘extern "C"’.
37074 2020-02-19  Bruno Haible  <bruno@clisp.org>
37076         uninorm/decompose-internal: Avoid "no previous prototype" warning.
37077         Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
37078         <https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00105.html>.
37079         * lib/array-mergesort.h: Accept an optional macro definition
37080         STATIC_FROMTO.
37081         * lib/uninorm/decompose-internal.c (STATIC_FROMTO): New macro.
37083 2020-02-16  Bruno Haible  <bruno@clisp.org>
37085         fchmodat: Make more future-proof.
37086         * m4/fchmodat.m4 (gl_FUNC_FCHMODAT): Define
37087         NEED_FCHMODAT_NONSYMLINK_FIX.
37088         (gl_PREREQ_FCHMODAT): New macro.
37089         * lib/fchmodat.c (fchmodat): Test NEED_FCHMODAT_NONSYMLINK_FIX. Access
37090         /proc only on Linux. Return EOPNOTSUPP only on Linux and on platforms
37091         without lchmod function.
37092         * modules/fchmodat (configure.ac): Invoke gl_PREREQ_FCHMODAT.
37094 2020-02-16  Bruno Haible  <bruno@clisp.org>
37096         lchmod: Make more future-proof.
37097         * m4/lchmod.m4 (gl_FUNC_LCHMOD): Define NEED_LCHMOD_NONSYMLINK_FIX.
37098         (gl_PREREQ_LCHMOD): New macro.
37099         * lib/lchmod.c (orig_lchmod): New function.
37100         (lchmod): Test NEED_LCHMOD_NONSYMLINK_FIX. Access /proc only on Linux.
37101         Return EOPNOTSUPP only on Linux and on platforms without lchmod
37102         function.
37103         * modules/lchmod (configure.ac): Invoke gl_PREREQ_LCHMOD.
37105         lchmod: Fix buggy override on macOS, HP-UX (regression from 2020-02-08).
37106         * modules/lchmod (Makefile.am): Don't add lchmod.c to lib_SOURCES.
37108 2020-02-16  Paul Eggert  <eggert@cs.ucla.edu>
37110         xnanosleep: prefer pause, and get remaining time
37111         Problem reported by Vladimir Panteleev in:
37112         https://lists.gnu.org/r/bug-gnulib/2020-02/msg00052.html
37113         * lib/xnanosleep.c: Include intprops.h, unistd.h.
37114         (xnanosleep) [HAVE_PAUSE]: Prefer pause when sleeping infinitely.
37115         (xnanosleep): Obtain remaining time when nanosleep is interrupted.
37116         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Check for 'pause'.
37117         * modules/xnanosleep (Depends-on): Add intprops, unistd.
37119 2020-02-16  Bruno Haible  <bruno@clisp.org>
37121         lchmod: Improve cross-compilation guess.
37122         * m4/lchmod.m4 (gl_FUNC_LCHMOD): Require AC_CANONICAL_HOST. When
37123         cross-compiling, guess depending on the platform.
37125 2020-02-16  Bruno Haible  <bruno@clisp.org>
37127         fstrcmp: Add API to clean up resources.
37128         Reported by Akim Demaille <akim@lrde.epita.fr> in
37129         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00080.html>.
37130         * lib/fstrcmp.h (fstrcmp_free_resources): New declaration.
37131         * lib/fstrcmp.c (fstrcmp_free_resources): New function.
37133 2020-02-14  Bruno Haible  <bruno@clisp.org>
37135         wctype-h: Fix compilation errors in C++ (regression from 2020-01-25).
37136         Reported by Christian Biesinger in
37137         <https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00064.html>.
37138         * lib/wctype.in.h (iswdigit, iswxdigit): Don't declare if the
37139         corresponding module is not enabled.
37140         * tests/test-wctype-h-c++.cc (iswdigit, iswxdigit): Don't check the
37141         prototype if the corresponding module is not enabled.
37143 2020-02-13  Paul Eggert  <eggert@cs.ucla.edu>
37145         fchmodat, lchmod: port to buggy Linux filesystems
37146         Problem reported by Florian Weimer in:
37147         https://www.sourceware.org/ml/libc-alpha/2020-02/msg00534.html
37148         * lib/fchmodat.c (fchmodat):
37149         * lib/lchmod.c (lchmod):
37150         Don’t assume that chmod on the O_PATH-opened fd will do
37151         the right thing on a symbolic link.
37152         * lib/fchmodat.c (fchmodat):
37153         Don’t attempt to special-case
37154         any flag value other than AT_SYMLINK_NOFOLLOW.
37156 2020-02-11  Paul Eggert  <eggert@cs.ucla.edu>
37158         lchmod: pacify Coverity CID 1491216
37159         * lib/lchmod.c (lchmod): Redo #if nesting so that Coverity does
37160         not complain about unreachable code at the ‘struct stat st;’
37161         declaration.
37163 2020-02-10  Bruno Haible  <bruno@clisp.org>
37165         copysignf: Fix link error on HP-UX with cc.
37166         * m4/copysignf.m4 (gl_FUNC_COPYSIGNF): Require AC_CANONICAL_HOST. On
37167         HP-UX, set COPYSIGNF_LIBM to -lm.
37169 2020-02-10  Bruno Haible  <bruno@clisp.org>
37171         pthread-mutex-tests, pthread-rwlock-tests: Fix link errors on HP-UX.
37172         * modules/pthread-mutex-tests (Makefile.am): Link test-pthread-mutex
37173         with $(LIB_SEMAPHORE).
37174         * modules/pthread-rwlock-tests (Makefile.am): Link test-pthread-rwlock
37175         with $(LIB_SEMAPHORE).
37177 2020-02-10  Bruno Haible  <bruno@clisp.org>
37179         ptsname_r-tests: Avoid unused function warning.
37180         * tests/test-ptsname_r.c: Don't include null-ptr.h if we don't need it.
37182 2020-02-08  Bruno Haible  <bruno@clisp.org>
37184         lchmod: Add tests.
37185         * tests/test-lchmod.c: New file.
37186         * modules/lchmod-tests: New file.
37188 2020-02-08  Bruno Haible  <bruno@clisp.org>
37190         lchmod: Ensure declaration on HP-UX.
37191         * lib/sys_stat.in.h (lchown): Declare also on HP-UX.
37192         * doc/glibc-functions/lchmod.texi: Mention the HP-UX problem.
37194 2020-02-08  Bruno Haible  <bruno@clisp.org>
37196         fchmodat: Strengthen tests.
37197         * tests/test-fchmodat.c (BASE): New macro.
37198         (main): Use it, to avoid conflicts with other unit tests. Verify that
37199         fchmodat changed the file permission bits.
37201 2020-02-08  Bruno Haible  <bruno@clisp.org>
37203         fchmodat: Fix endless recursion on Cygwin (regression from 2020-02-07).
37204         * lib/fchmodat.c (orig_fchmodat): Move definition to immediately after
37205         '#undef __need_system_sys_stat_h'.
37207 2020-02-08  Bruno Haible  <bruno@clisp.org>
37209         fchmodat: Improve cross-compilation guesses.
37210         * m4/fchmodat.m4 (gl_FUNC_FCHMODAT): Require AC_CANONICAL_HOST. When
37211         cross-compiling, guess depending on the platform.
37212         * doc/posix-functions/fchmodat.texi: Clarify.
37214 2020-02-08  Bruno Haible  <bruno@clisp.org>
37216         Fix compilation errors in a testdir created with --with-c++-tests.
37217         * lib/c++defs.h (_GL_CXXALIASWARN1_2): Do not use __typeof__ (func),
37218         since it does not work any more with g++ >= 4.4.
37220 2020-02-08  Bruno Haible  <bruno@clisp.org>
37222         doc: Update for glibc 2.31.
37223         * doc/glibc-functions/pthread_clockjoin_np.texi: New file.
37224         * doc/gnulib.texi: Include it.
37225         * doc/pastposix-functions/h_errno.texi: Update.
37226         * doc/posix-functions/*.texi: Likewise.
37228 2020-02-08  Kenneth D'souza  <kdsouza@redhat.com>
37230         mountlist: consider smb3 file systems as remote
37231         * lib/mountlist.c (ME_REMOTE): Recognize file systems of type
37232         "smb3" as remote.
37234 2020-02-07  Paul Eggert  <eggert@cs.ucla.edu>
37236         fchmodat: AT_SYMLINK_NOFOLLOW fix for non-symlinks
37237         Fix lchmod, and fchmodat with AT_SYMLINK_NOFOLLOW, so that
37238         they act like chmod on non-symlinks.
37239         * NEWS:
37240         * doc/glibc-functions/lchmod.texi (lchmod):
37241         * doc/posix-functions/fchmodat.texi (fchmodat):
37242         Mention this.
37243         * lib/fchmodat.c: Define __need_system_sys_stat_h before including
37244         config.h, and undef it after including sys/stat.h the first time.
37245         Include fcntl.h, stdio.h, unistd.h, intprops.h, and include
37246         sys/stat.h a second time after defining orig_fchmodat.
37247         (orig_fchmodat) [HAVE_FCHMODAT]: New function.
37248         (fchmodat) [HAVE_FCHMODAT]: Work around the AT_SYMLINK_NOFOLLOW bug.
37249         * lib/lchmod.c: New file.
37250         * lib/sys_stat.in.h (fchmodat, lchmod):
37251         Support replacing these functions.
37252         * m4/fchmodat.m4 (gl_FUNC_FCHMODAT): If fchmodat exists,
37253         test that AT_SYMLINK_NOFOLLOW works on non-symlinks.
37254         * m4/lchmod.m4 (gl_FUNC_LCHMOD): Check for lstat.
37255         Test that lchmod works on non-symlinks.
37256         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS):
37257         Default REPLACE_FCHMODAT and REPLACE_LCHMOD to 0.
37258         * modules/fchmodat (Depends-on): Add fstatat, intprops, lchmod, unistd.
37259         (Depends-on, configure.ac): Check REPLACE_FCHMODAT too.
37260         * modules/lchmod (Files): Add lib/lchmod.c.
37261         (Depends-on): Add errno, fcntl-h, fchmodat, intprops, lstat, unistd.
37262         (configure.ac): Compile lchmod.c if needed.
37263         (lib_SOURCES): Add lchmod.c.
37264         * modules/sys_stat (sys/stat.h): Substitute REPLACE_FCHMODAT
37265         and REPLACE_LCHMOD.
37266         * tests/test-fchmodat.c: Include fcntl.h, sys/stat.h.
37267         (main): Test fchmodat with AT_SYMLINK_NOFOLLOW on non-symlinks.
37269 2020-02-05  Marc Dionne  <marc.dionne@auristor.com>  (tiny change)
37271         mountlist: Consider AFS filesystems as remote
37272         df --local relies on the ME_REMOTE macro to determine if a given
37273         mount entry should be considered "local".  There is special logic
37274         for nfs and smb/cifs mounts, but /afs as mounted by OpenAFS, the
37275         kernel's kafs module or AuriStorFS is treated as a local mount.
37276         * lib/mountlist.c (ME_REMOTE): Treat mounts of type 'afs'
37277         (OpenAFS, kernel kafs) and 'auristorfs' (AuriStorFS) as remote.
37279 2020-02-04  Paul Eggert  <eggert@cs.ucla.edu>
37281         Port _Noreturn to older Clang
37282         Problem reported by Jeffery Walton in:
37283         https://lists.gnu.org/r/bug-gnulib/2020-02/msg00013.html
37284         * lib/_Noreturn.h (_Noreturn):
37285         * m4/gnulib-common.m4 (gl_COMMON_BODY):
37286         Assume _Noreturn works in Clang 3.5 and later.
37287         It is documented to work in Clang 3.5:
37288         http://releases.llvm.org/3.5.0/tools/clang/docs/AttributeReference.html
37289         and is not documented in Clang 3.4:
37290         https://releases.llvm.org/3.4/tools/clang/docs/LanguageExtensions.html
37291         Apple sets __clang_version__ to a different value, so use
37292         __apple_build_version__ there.  See:
37293         https://lists.gnu.org/r/bug-gnulib/2020-02/msg00017.html
37295 2020-02-04  Pádraig Brady  <P@draigBrady.com>
37297         test-canonicalize: avoid unused function warning
37298         * tests/test-canonicalize.c: Protect the inclusion of null-ptr.h
37299         with the same guard as that used to protect usage of the null_ptr
37300         function, so that one doesn't get a -Wunused warning.
37301         * tests/test-canonicalize-lgpl.c: Likewise.
37303 2020-02-03  Paul Eggert  <eggert@cs.ucla.edu>
37305         libc-config: port to Apple’s Clang variant
37306         * lib/libc-config.h (__glibc_clang_prereq):
37307         Port to Apple’s Clang variant, which uses a different
37308         numbering scheme for __clang_major__.
37310 2020-02-02  Bruno Haible  <bruno@clisp.org>
37312         Document the new modules list-c++, set-c++, oset-c++, map-c++, omap-c++.
37313         * doc/containers.texi: Document these new modules.
37315 2020-02-02  Bruno Haible  <bruno@clisp.org>
37317         omap-c++: Add tests.
37318         * tests/test-omap-c++.cc: New file.
37319         * modules/omap-c++-tests: New file.
37321         omap-c++: New module.
37322         * lib/gl_omap.hh: New file, based on lib/gl_omap.h.
37323         * modules/omap-c++: New file.
37325 2020-02-02  Bruno Haible  <bruno@clisp.org>
37327         map-c++: Add tests.
37328         * tests/test-map-c++.cc: New file.
37329         * modules/map-c++-tests: New file.
37331         map-c++: New module.
37332         * lib/gl_map.hh: New file, based on lib/gl_map.h.
37333         * modules/map-c++: New file.
37335 2020-02-02  Bruno Haible  <bruno@clisp.org>
37337         oset-c++: Add tests.
37338         * tests/test-oset-c++.cc: New file.
37339         * modules/oset-c++-tests: New file.
37341         oset-c++: New module.
37342         * lib/gl_oset.hh: New file, based on lib/gl_oset.h.
37343         * modules/oset-c++: New file.
37345 2020-02-02  Bruno Haible  <bruno@clisp.org>
37347         set-c++: Add tests.
37348         * tests/test-set-c++.cc: New file.
37349         * modules/set-c++-tests: New file.
37351         set-c++: New module.
37352         * lib/gl_set.hh: New file, based on lib/gl_set.h.
37353         * modules/set-c++: New file.
37355 2020-02-02  Bruno Haible  <bruno@clisp.org>
37357         list-c++: Add tests.
37358         * tests/test-list-c++.cc: New file.
37359         * modules/list-c++-tests: New file.
37361         list-c++: New module.
37362         * lib/gl_list.hh: New file, based on lib/gl_list.h.
37363         * modules/list-c++: New file.
37365 2020-02-02  Bruno Haible  <bruno@clisp.org>
37367         xalloc: Fix compilation error in C++ mode on FreeBSD 12.
37368         * lib/xalloc.h (xalloc_die): Comment out 'extern' keyword before
37369         '_Noreturn'.
37370         * lib/sigpipe-die.h (sigpipe_die): Likewise.
37372 2020-02-02  Pádraig Brady  <P@draigBrady.com>
37374         read-file: reduce max size from SIZE_MAX to PTRDIFF_MAX
37375         On x86_64 with glibc-2.30, gcc 9.2 is giving:
37376           error: argument 2 value '18446744073709551615'
37377           exceeds maximum object size 9223372036854775807
37378           [-Werror=alloc-size-larger-than=]
37379         The details of this restriction are discussed at:
37380         https://stackoverflow.com/q/42574890/4421
37381         * lib/read-file.c: s/SIZE_MAX/PTRDIFF_MAX/
37383 2020-02-02  Pádraig Brady  <P@draigBrady.com>
37385         sysctl.h: avoid including on glibc
37386         * lib/nproc.c: Avoid including deprecated and unneeded header on GLIBC.
37387         * lib/physmem.c: Likewise.
37389 2020-02-02  Bruno Haible  <bruno@clisp.org>
37391         list, set, oset, map, omap: Avoid imperative voice in documentation.
37392         * lib/gl_list.h: Use descriptive sentences instead of imperative voice
37393         in the specification of functions.
37394         * lib/gl_set.h: Likewise.
37395         * lib/gl_oset.h: Likewise.
37396         * lib/gl_map.h: Likewise.
37397         * lib/gl_omap.h: Likewise.
37398         * lib/gl_*.h: Likewise.
37400 2020-02-01  Bruno Haible  <bruno@clisp.org>
37402         ansi-c++-opt: Set CXXFLAGS to "-g -O2" by default.
37403         * m4/ansi-c++.m4 (gl_PROG_ANSI_CXX): Determine CXXFLAGS like AC_PROG_CXX
37404         does.
37406 2020-01-29  Bruno Haible  <bruno@clisp.org>
37408         array-map, hash-map, linkedhash-map: Fix module description.
37409         * modules/array-map (Description): Fix description.
37410         * modules/hash-map (Description): Likewise.
37411         * modules/linkedhash-map (Description): Likewise.
37413 2020-01-29  Paul Eggert  <eggert@cs.ucla.edu>
37415         dfa: do not depend on isblank
37416         This removes a difference between Gawk dfa.c and Gnulib dfa.c.
37417         * lib/dfa.c (isblank): Define if neither system nor Gnulib does.
37418         * modules/dfa (Depends-on): Remove isblank.
37419         * modules/isblank: Add a module indicator, for lib/dfa.c.
37421         dfa: do not assume 64-bit int
37422         Problem reported for VAX/VMS C (!) by Arnold Robbins in:
37423         https://lists.gnu.org/r/bug-gnulib/2020-01/msg00173.html
37424         * lib/dfa.c (CHARCLASS_PAIR): Bring back this macro.
37425         (CHARCLASS_WORD_BITS, charclass_word) [!UINT_LEAST64_MAX]:
37426         Fall back to 32-bit words.
37427         (CHARCLASS_INIT): Go back to having 8 32-bit args instead
37428         of 4 64-bit args.  All uses changed.
37430 2020-01-27  Paul Eggert  <eggert@cs.ucla.edu>
37432         regex: remove limits-h dependency
37433         * modules/regex (Depends-on): Remove limits-h, since the
37434         code no longer depends on ULONG_WIDTH already being defined.
37436         regex: port to non-GCC pre-IEC-60559
37437         Problem reported by Arnold Robbins in:
37438         https://lists.gnu.org/r/bug-gnulib/2020-01/msg00154.html
37439         * lib/regex_internal.h (ULONG_WIDTH): Make this usable in #if.
37441 2020-01-25  Bruno Haible  <bruno@clisp.org>
37443         c32isxdigit: Add tests.
37444         * tests/test-c32isxdigit.c: New file, based on tests/test-iswxdigit.c.
37445         * tests/test-c32isxdigit.sh: New file.
37446         * modules/c32isxdigit-tests: New file.
37448         c32isxdigit: New module.
37449         * lib/c32isxdigit.c: New file.
37450         * modules/c32isxdigit: New file.
37451         * doc/posix-functions/iswxdigit.texi: Mention the new module.
37453 2020-01-25  Bruno Haible  <bruno@clisp.org>
37455         c32isupper: Add tests.
37456         * tests/test-c32isupper.c: New file.
37457         * tests/test-c32isupper.sh: New file.
37458         * modules/c32isupper-tests: New file.
37460         c32isupper: New module.
37461         * lib/c32isupper.c: New file.
37462         * modules/c32isupper: New file.
37463         * doc/posix-functions/iswupper.texi: Mention the new module.
37465 2020-01-25  Bruno Haible  <bruno@clisp.org>
37467         c32isspace: Add tests.
37468         * tests/test-c32isspace.c: New file.
37469         * tests/test-c32isspace.sh: New file.
37470         * modules/c32isspace-tests: New file.
37472         c32isspace: New module.
37473         * lib/c32isspace.c: New file.
37474         * modules/c32isspace: New file.
37475         * doc/posix-functions/iswspace.texi: Mention the new module.
37477 2020-01-25  Bruno Haible  <bruno@clisp.org>
37479         c32ispunct: Add tests.
37480         * tests/test-c32ispunct.c: New file.
37481         * tests/test-c32ispunct.sh: New file.
37482         * modules/c32ispunct-tests: New file.
37484         c32ispunct: New module.
37485         * lib/c32ispunct.c: New file.
37486         * modules/c32ispunct: New file.
37487         * doc/posix-functions/iswpunct.texi: Mention the new module.
37489 2020-01-25  Bruno Haible  <bruno@clisp.org>
37491         c32isprint: Add tests.
37492         * tests/test-c32isprint.c: New file.
37493         * tests/test-c32isprint.sh: New file.
37494         * modules/c32isprint-tests: New file.
37496         c32isprint: New module.
37497         * lib/c32isprint.c: New file.
37498         * modules/c32isprint: New file.
37499         * doc/posix-functions/iswprint.texi: Mention the new module.
37501 2020-01-25  Bruno Haible  <bruno@clisp.org>
37503         c32islower: Add tests.
37504         * tests/test-c32islower.c: New file.
37505         * tests/test-c32islower.sh: New file.
37506         * modules/c32islower-tests: New file.
37508         c32islower: New module.
37509         * lib/c32islower.c: New file.
37510         * modules/c32islower: New file.
37511         * doc/posix-functions/iswlower.texi: Mention the new module.
37513 2020-01-25  Bruno Haible  <bruno@clisp.org>
37515         c32isgraph: Add tests.
37516         * tests/test-c32isgraph.c: New file.
37517         * tests/test-c32isgraph.sh: New file.
37518         * modules/c32isgraph-tests: New file.
37520         c32isgraph: New module.
37521         * lib/c32isgraph.c: New file.
37522         * modules/c32isgraph: New file.
37523         * doc/posix-functions/iswgraph.texi: Mention the new module.
37525 2020-01-25  Bruno Haible  <bruno@clisp.org>
37527         c32isdigit: Add tests.
37528         * tests/test-c32isdigit.c: New file, based on tests/test-iswdigit.c.
37529         * tests/test-c32isdigit.sh: New file.
37530         * modules/c32isdigit-tests: New file.
37532         c32isdigit: New module.
37533         * lib/c32isdigit.c: New file.
37534         * modules/c32isdigit: New file.
37535         * doc/posix-functions/iswdigit.texi: Mention the new module.
37537 2020-01-25  Bruno Haible  <bruno@clisp.org>
37539         c32iscntrl: Add tests.
37540         * tests/test-c32iscntrl.c: New file.
37541         * tests/test-c32iscntrl.sh: New file.
37542         * modules/c32iscntrl-tests: New file.
37544         c32iscntrl: New module.
37545         * lib/c32iscntrl.c: New file.
37546         * modules/c32iscntrl: New file.
37547         * doc/posix-functions/iswcntrl.texi: Mention the new module.
37549 2020-01-25  Bruno Haible  <bruno@clisp.org>
37551         c32isblank: Add tests.
37552         * tests/test-c32isblank.c: New file.
37553         * tests/test-c32isblank.sh: New file.
37554         * modules/c32isblank-tests: New file.
37556         c32isblank: New module.
37557         * lib/c32isblank.c: New file.
37558         * modules/c32isblank: New file.
37559         * doc/posix-functions/iswblank.texi: Mention the new module.
37561 2020-01-25  Bruno Haible  <bruno@clisp.org>
37563         c32isalpha: Add tests.
37564         * tests/test-c32isalpha.c: New file.
37565         * tests/test-c32isalpha.sh: New file.
37566         * modules/c32isalpha-tests: New file.
37568         c32isalpha: New module.
37569         * lib/c32isalpha.c: New file.
37570         * modules/c32isalpha: New file.
37571         * doc/posix-functions/iswalpha.texi: Mention the new module.
37573 2020-01-25  Bruno Haible  <bruno@clisp.org>
37575         c32isalnum: Add tests.
37576         * tests/test-c32isalnum.c: New file.
37577         * tests/test-c32isalnum.sh: New file.
37578         * modules/c32isalnum-tests: New file.
37580         c32isalnum: New module.
37581         * lib/c32isalnum.c: New file.
37582         * lib/c32is-impl.h: New file.
37583         * modules/c32isalnum: New file.
37584         * doc/posix-functions/iswalnum.texi: Mention the new module.
37586 2020-01-25  Bruno Haible  <bruno@clisp.org>
37588         uchar: Preparations for modules c32isalnum, ..., c32isxdigit.
37589         * lib/uchar.in.h (c32isalnum, c32isalpha, c32isblank, c32iscntrl,
37590         c32isdigit, c32isgraph, c32islower, c32isprint, c32ispunct, c32isspace,
37591         c32isupper, c32isxdigit): New declarations.
37592         * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_C32ISALNUM,
37593         GNULIB_C32ISALPHA, GNULIB_C32ISBLANK, GNULIB_C32ISCNTRL,
37594         GNULIB_C32ISDIGIT, GNULIB_C32ISGRAPH, GNULIB_C32ISLOWER,
37595         GNULIB_C32ISPRINT, GNULIB_C32ISPUNCT, GNULIB_C32ISSPACE,
37596         GNULIB_C32ISUPPER, GNULIB_C32ISXDIGIT.
37597         * modules/uchar (Makefile.am): Substitute GNULIB_C32ISALNUM,
37598         GNULIB_C32ISALPHA, GNULIB_C32ISBLANK, GNULIB_C32ISCNTRL,
37599         GNULIB_C32ISDIGIT, GNULIB_C32ISGRAPH, GNULIB_C32ISLOWER,
37600         GNULIB_C32ISPRINT, GNULIB_C32ISPUNCT, GNULIB_C32ISSPACE,
37601         GNULIB_C32ISUPPER, GNULIB_C32ISXDIGIT.
37602         * tests/test-uchar-c++.cc: Test the signature of c32isalnum, c32isalpha,
37603         c32isblank, c32iscntrl, c32isdigit, c32isgraph, c32islower, c32isprint,
37604         c32ispunct, c32isspace, c32isupper, c32isxdigit.
37606 2020-01-25  Bruno Haible  <bruno@clisp.org>
37608         mbchar, wctype: Use the corrected iswxdigit function.
37609         * modules/mbchar (Depends-on): Add iswxdigit.
37610         * modules/wctype (Depends-on): Likewise.
37612         iswxdigit: Add tests.
37613         * tests/test-iswxdigit.c: New file.
37614         * tests/test-iswxdigit.sh: New file.
37615         * modules/iswxdigit-tests: New file.
37617         iswxdigit: New module.
37618         * m4/iswxdigit.m4: New file.
37619         * lib/wctype.in.h (iswxdigit): Potentially override.
37620         (iswxdigit, rpl_iswxdigit): Test REPLACE_ISWXDIGIT, not
37621         REPLACE_ISWCNTRL. Rely on ISO C compliant definition.
37622         * lib/iswxdigit.c: New file.
37623         * m4/wctype_h.m4 (gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_ISWXDIGIT,
37624         REPLACE_ISWXDIGIT.
37625         * modules/wctype-h (Makefile.am): Substitute GNULIB_ISWXDIGIT,
37626         REPLACE_ISWXDIGIT.
37627         * modules/iswxdigit: New file.
37628         * doc/posix-functions/iswxdigit.texi: Mention the portability problem.
37630 2020-01-25  Bruno Haible  <bruno@clisp.org>
37632         lseek: Fix the override to not undo the effects of AC_SYS_LARGEFILE.
37633         Reported by John Donoghue <john.david.donoghue@gmail.com> in
37634         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00146.html>.
37635         * lib/lseek.c (rpl_lseek): When AC_SYS_LARGEFILE has enabled a 64-bit
37636         off_t on mingw, invoke _lseeki64 instead of lseek.
37638 2020-01-25  Bruno Haible  <bruno@clisp.org>
37640         iswdigit tests: Avoid test failure on Cygwin.
37641         * tests/test-iswdigit.c (for_character): If mbrtowc cannot convert the
37642         byte sequence, return 0.
37644         iswdigit: Fix test failure on native Windows.
37645         * lib/wctype.in.h (rpl_iswdigit): Rely on ISO C compliant definition.
37647         mbchar, wctype: Use the corrected iswdigit function.
37648         * modules/mbchar (Depends-on): Add iswdigit.
37649         * modules/wctype (Depends-on): Likewise.
37651         iswdigit: Add tests.
37652         * tests/test-iswdigit.c: New file.
37653         * tests/test-iswdigit.sh: New file.
37654         * modules/iswdigit-tests: New file.
37656         iswdigit: New module.
37657         * m4/iswdigit.m4: New file.
37658         * lib/wctype.in.h (iswdigit): Potentially override.
37659         (iswdigit, rpl_iswdigit): Test REPLACE_ISWDIGIT, not REPLACE_ISWCNTRL.
37660         * lib/iswdigit.c: New file.
37661         * m4/wctype_h.m4 (gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_ISWDIGIT,
37662         REPLACE_ISWDIGIT.
37663         * modules/wctype-h (Makefile.am): Substitute GNULIB_ISWDIGIT,
37664         REPLACE_ISWDIGIT.
37665         * modules/iswdigit: New file.
37666         * doc/posix-functions/iswdigit.texi: Mention the portability problem.
37668 2020-01-25  Bruno Haible  <bruno@clisp.org>
37670         hard-locale tests: Make it easy to reuse the musl test.
37671         * m4/musl.m4: New file, extracted from modules/hard-locale-tests.
37672         * modules/hard-locale-tests (Files): Add it.
37673         (configure.ac): Invoke gl_MUSL_LIBC.
37675 2020-01-24  Paul Eggert  <eggert@cs.ucla.edu>
37677         regex: port to Gawk on nonstandard platforms
37678         * lib/regex_internal.h (ULONG_WIDTH): Define if not already defined.
37679         This is useful for Gawk, which does not use the Gnulib stdlib-h
37680         module.  Problem reported by Arnold Robbins in:
37681         https://lists.gnu.org/r/bug-gnulib/2020-01/msg00138.html
37683 2020-01-21  Paul Eggert  <eggert@cs.ucla.edu>
37685         regex: fix bug with >=16 subexpressions
37686         * lib/regex_internal.h (struct re_backref_cache_entry):
37687         Use bitset_word_t as the type of eps_reachable_subexps_map,
37688         instead of unsigned short int.  This fixes a bug I introduced
37689         to glibc in 2005-09-28T17:33:18Z!drepper@redhat.com (glibc commit
37690         2c05d33f90861d074dc12808dafbde30f487b1a0, BZ #1302).
37691         Remove unused member 'unused'.
37693         regex: simplify definition of BITSET_WORD_BITS
37694         * config/srclist.txt: Remove regex.c, regex_internal.h temporarily.
37695         * lib/regex.c (__STDC_WANT_IEC_60559_BFP_EXT__): Define.
37696         * lib/regex_internal.h (BITSET_WORD_BITS):
37697         * modules/regex (Depends-on): Add limits-h.
37698         Simplify now that we can use ULONG_WIDTH.
37700 2020-01-20  Bruno Haible  <bruno@clisp.org>
37702         mbrtoc32: Add note about FreeBSD 12.
37703         * m4/mbrtoc32.m4 (gl_MBRTOC32_SANITYCHECK): Guess no also on FreeBSD.
37704         * doc/posix-functions/mbrtoc32.texi: Mention that FreeBSD 12 is also
37705         affected.
37707 2020-01-20  Bruno Haible  <bruno@clisp.org>
37709         unistr/u8-uctomb: Fix warning.
37710         Reported by Andreas Schwab <schwab@suse.de> in
37711         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00127.html>.
37712         * lib/unistr/u8-uctomb.c (FALLTHROUGH): New macro.
37713         (u8_uctomb): Add FALLTHROUGH markers.
37715 2020-01-20  Bruno Haible  <bruno@clisp.org>
37717         lock: Fix test-once1 failure on FreeBSD 11 (regression from 2020-01-19).
37718         * lib/glthread/lock.c (glthread_once_multithreaded): New function.
37719         * lib/glthread/lock.h (glthread_once_multithreaded): New declaration.
37720         (glthread_once): Use it.
37722 2020-01-19  Bruno Haible  <bruno@clisp.org>
37724         threadlib: Disable use of weak symbols on FreeBSD 11.
37725         Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
37726         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00061.html>.
37727         * m4/threadlib.m4 (gl_WEAK_SYMBOLS): Require AC_CANONICAL_HOST. Test
37728         against a bug in FreeBSD 11.
37730 2020-01-19  Bruno Haible  <bruno@clisp.org>
37732         iconv_open: Improve z/OS support.
37733         * lib/iconv_open-zos.gperf: Choose better aliases. Add mapping for
37734         ISO-8859-3, KOI8-R, KOI8-U, CP775, CP857, CP865, CP1129, CP1131, CP1257.
37735         Remove mapping for EUC-TW.
37737 2020-01-18  Bruno Haible  <bruno@clisp.org>
37739         Rename ~~gnulib.m4 to zzgnulib.m4.
37740         Suggested by Paul Eggert.
37741         * m4/zzgnulib.m4: Renamed from m4/~~gnulib.m4.
37742         * gnulib-tool (func_get_filelist): Update.
37743         * pygnulib/GLModuleSystem.py (getFiles): Likewise.
37745 2020-01-18  Bruno Haible  <bruno@clisp.org>
37747         doc: Update license notices.
37748         * doc/*.texi: Reference the GFDL 1.3 through a URL, rather than by
37749         reference to a section or to a "file as part of this distribution".
37751 2020-01-18  Bruno Haible  <bruno@clisp.org>
37753         Avoid error "m4_require: circular dependency of AC_LANG_COMPILER(C)".
37754         Reported by Mats Erik Andersson <mats.andersson@gisladisker.se> in
37755         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00109.html>.
37756         * m4/00gnulib.m4 (gl_COMPILER_CLANG): Use _AC_COMPILE_IFELSE, not
37757         AC_EGREP_CPP.
37759 2020-01-18  Bruno Haible  <bruno@clisp.org>
37761         Ensure Automake does not drop ~~gnulib.m4.
37762         * m4/~~gnulib.m4 (gl_ZZGNULIB): New macro.
37763         * m4/gnulib-common.m4 (gl_COMMON): Require it.
37765 2020-01-18  Bruno Haible  <bruno@clisp.org>
37767         Fix major regression from 2020-01-10.
37768         Reported by Paul Eggert in
37769         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00079.html>.
37770         * m4/00gnulib.m4 (gl_COMPILER_CLANG, gl_COMPILER_PREPARE_CHECK_DECL):
37771         Don't AC_REQUIRE anything.
37772         (gl_COMPILER_PREPARE_CHECK_DECL): Define through AC_DEFUN, not
37773         AC_DEFUN_ONCE. Use _AC_COMPILE_IFELSE, not AC_COMPILE_IFELSE.
37774         (_AC_CHECK_DECL_BODY): If ac_compile_for_check_decl has not been set,
37775         use ac_compile instead.
37776         (AC_CHECK_DECL): Remove override.
37777         * m4/~~gnulib.m4: New file.
37778         * gnulib-tool (func_get_filelist): Add also ~~gnulib.m4.
37779         * pygnulib/GLModuleSystem.py (getFiles): Likewise.
37781 2020-01-17  Bruno Haible  <bruno@clisp.org>
37782             Paul Eggert  <eggert@cs.ucla.edu>
37784         glob: Fix use-after-free bug.
37785         Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
37786         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00102.html>.
37787         * lib/glob.c (__glob): Delay freeing dirname until after the use of
37788         end_name.
37790 2020-01-16  Siddhesh Poyarekar  <siddhesh@gotplt.org>
37792         vcs-to-changelog: Fix parsing of fndecl without args.
37793         * build-aux/vcstocl/frontend_c.py (FNDECL_RE): Fix regular expression
37794         for empty arguments.
37796 2020-01-16  Siddhesh Poyarekar  <siddhesh@gotplt.org>
37798         vcs-to-changelog: Add documentation.
37799         * doc/vcs-to-changelog.texi: New file.
37800         * doc/gnulib.texi (Build Infrastructure Modules): Add vcs-to-changelog
37801         section.
37803 2020-01-16  Siddhesh Poyarekar  <siddhesh@gotplt.org>
37805         vcs-to-changelog: Allow loading of custom quirks file.
37806         * build-aux/vcs_to_changelog.py: New commandline option -q.
37808 2020-01-16  Siddhesh Poyarekar  <siddhesh@gotplt.org>
37810         vcs-to-changelog: Fix formatting of ChangeLog output.
37811         * build-aux/vcstocl/vcs_git.py (list_changes): Add newline in print
37812         output.
37814 2020-01-16  Siddhesh Poyarekar  <siddhesh@gotplt.org>
37816         vcs-to-changelog: Drop python3 shebang from frontend_c.py.
37817         Reported in
37818         <https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00050.html>.
37819         * build-aux/vcstocl/frontend_c.py: Remove shebang.
37821 2020-01-15  Simon Josefsson  <simon@josefsson.org>
37823         crypto/gc-pbkdf2: New module.
37824         * MODULES.html.sh (func_all_modules): Add gc-pbkdf2.
37825         * NEWS: Deprecated gc-pbkdf2-sha1 in favor of gc-pbkdf2.
37826         * lib/gc-pbkdf2.c: New file.
37827         * lib/gc-pbkdf2-sha1.c: Use new interface.
37828         * lib/gc.h (GC_MAX_DIGEST_SIZE, gc_pbkdf2_hmac): Add.
37829         * modules/crypto/gc-pbkdf2: New file.
37830         * modules/crypto/gc-pbkdf2-tests: New file.
37831         * tests/test-gc-pbkdf2.c: New file.
37833 2020-01-12  Bruno Haible  <bruno@clisp.org>
37835         c32stombs: Add tests.
37836         * tests/test-c32stombs.c: New file, based on tests/test-c32srtombs.c.
37837         * tests/test-c32stombs-1.sh: New file, based on
37838         tests/test-c32srtombs-1.sh.
37839         * tests/test-c32stombs-2.sh: New file, based on
37840         tests/test-c32srtombs-2.sh.
37841         * tests/test-c32stombs-3.sh: New file, based on
37842         tests/test-c32srtombs-3.sh.
37843         * tests/test-c32stombs-4.sh: New file, based on
37844         tests/test-c32srtombs-4.sh.
37845         * modules/c32stombs-tests: New file, based on modules/c32srtombs-tests.
37847         c32stombs: New module.
37848         * lib/uchar.in.h (c32stombs): New declaration.
37849         * lib/c32stombs.c: New file.
37850         * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_C32STOMBS.
37851         * modules/uchar (Makefile.am): Substitute GNULIB_C32STOMBS.
37852         * modules/c32stombs: New file.
37853         * tests/test-uchar-c++.cc: Test the signature of c32stombs.
37854         * doc/posix-functions/wcstombs.texi: Mention the new module.
37856 2020-01-11  Jim Meyering  <meyering@fb.com>
37858         perl: require the "warnings" module
37859         * m4/perl.m4: Also "use warnings", so we reject the perl found
37860         on at least one IRIX 6.5 system. Reported by Bruno Haible in
37861         https://lists.gnu.org/r/sed-devel/2020-01/msg00004.html
37863 2020-01-10  Bruno Haible  <bruno@clisp.org>
37865         Fix major regression from 2020-01-04.
37866         Reported by Mats Erik Andersson <mats.andersson@gisladisker.se> in
37867         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00072.html>.
37868         * m4/00gnulib.m4 (gl_COMPILER_PREPARE_CHECK_DECL): Define through
37869         AC_DEFUN_ONCE.
37870         (AC_CHECK_DECL): Invoke, not require, it.
37872 2020-01-10  Bruno Haible  <bruno@clisp.org>
37874         c32snrtombs: Add tests.
37875         * tests/test-c32snrtombs.c: New file, based on tests/test-wcsnrtombs.c.
37876         * tests/test-c32snrtombs-1.sh: New file, based on
37877         tests/test-wcsnrtombs1.sh.
37878         * tests/test-c32snrtombs-2.sh: New file, based on
37879         tests/test-wcsnrtombs2.sh.
37880         * tests/test-c32snrtombs-3.sh: New file, based on
37881         tests/test-wcsnrtombs3.sh.
37882         * tests/test-c32snrtombs-4.sh: New file, based on
37883         tests/test-wcsnrtombs4.sh.
37884         * modules/c32snrtombs-tests: New file, based on
37885         modules/wcsnrtombs-tests.
37887         c32snrtombs: New module.
37888         * lib/uchar.in.h (c32snrtombs): New declaration.
37889         * lib/wcsnrtombs-impl.h: Parameterize: Use macros FUNC, SCHAR_T,
37890         INTERNAL_STATE, WCRTOMB.
37891         * lib/wcsnrtombs.c (FUNC, SCHAR_T, INTERNAL_STATE, WCRTOMB): New macros.
37892         * lib/c32snrtombs.c: New file.
37893         * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_C32SNRTOMBS.
37894         * modules/uchar (Makefile.am): Substitute GNULIB_C32SNRTOMBS.
37895         * modules/c32snrtombs: New file.
37896         * tests/test-uchar-c++.cc: Test the signature of c32snrtombs.
37897         * doc/posix-functions/wcsnrtombs.texi: Mention the new module.
37899 2020-01-09  Bruno Haible  <bruno@clisp.org>
37901         c32srtombs: Add tests.
37902         * tests/test-c32srtombs.c: New file, based on tests/test-wcsrtombs.c.
37903         * tests/test-c32srtombs-1.sh: New file, based on
37904         tests/test-wcsrtombs1.sh.
37905         * tests/test-c32srtombs-2.sh: New file, based on
37906         tests/test-wcsrtombs2.sh.
37907         * tests/test-c32srtombs-3.sh: New file, based on
37908         tests/test-wcsrtombs3.sh.
37909         * tests/test-c32srtombs-4.sh: New file, based on
37910         tests/test-wcsrtombs4.sh.
37911         * modules/c32srtombs-tests: New file, based on modules/wcsrtombs-tests.
37913         c32srtombs: New module.
37914         * lib/uchar.in.h (c32srtombs): New declaration.
37915         * lib/wcsrtombs-impl.h: Parameterize: Use macros FUNC, SCHAR_T,
37916         INTERNAL_STATE, WCRTOMB.
37917         * lib/wcsrtombs.c (FUNC, SCHAR_T, INTERNAL_STATE, WCRTOMB): New macros.
37918         * lib/c32srtombs.c: New file.
37919         * lib/c32srtombs-state.c: New file, based on lib/wcsrtombs-state.c.
37920         * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_C32SRTOMBS.
37921         * modules/uchar (Makefile.am): Substitute GNULIB_C32SRTOMBS.
37922         * modules/c32srtombs: New file.
37923         * tests/test-uchar-c++.cc: Test the signature of c32srtombs.
37924         * doc/posix-functions/wcsrtombs.texi: Mention the new module.
37926 2020-01-08  Bruno Haible  <bruno@clisp.org>
37928         c32tob: Make consistent with mbrtoc32.
37929         * lib/c32tob.c: Include <stdio.h>, <string.h>, <wchar.h>.
37930         (c32tob): If the char32_t encoding and the wchar_t encoding may differ,
37931         use c32rtomb, not wctob.
37932         * modules/c32tob (Files): Add m4/mbrtoc32.m4.
37933         (Depends-on): Add c32rtomb.
37934         (configure.ac): Require gl_MBRTOC32_SANITYCHECK.
37936 2020-01-08  Bruno Haible  <bruno@clisp.org>
37938         c32rtomb: Add tests.
37939         * tests/test-c32rtomb.c: New file, based on tests/test-wcrtomb.c.
37940         * tests/test-c32rtomb.sh: New file, based on tests/test-wcrtomb.sh.
37941         * tests/test-c32rtomb-w32.c: New file, based on
37942         tests/test-wcrtomb-w32.c.
37943         * tests/test-c32rtomb-w32-1.sh: New file, based on
37944         tests/test-wcrtomb-w32-1.sh.
37945         * tests/test-c32rtomb-w32-2.sh: New file, based on
37946         tests/test-wcrtomb-w32-2.sh.
37947         * tests/test-c32rtomb-w32-3.sh: New file, based on
37948         tests/test-wcrtomb-w32-3.sh.
37949         * tests/test-c32rtomb-w32-4.sh: New file, based on
37950         tests/test-wcrtomb-w32-4.sh.
37951         * tests/test-c32rtomb-w32-5.sh: New file, based on
37952         tests/test-wcrtomb-w32-5.sh.
37953         * tests/test-c32rtomb-w32-6.sh: New file, based on
37954         tests/test-wcrtomb-w32-6.sh.
37955         * tests/test-c32rtomb-w32-7.sh: New file, based on
37956         tests/test-wcrtomb-w32-7.sh.
37957         * modules/c32rtomb-tests: New file.
37959         c32rtomb: New module.
37960         * lib/uchar.in.h (c32rtomb): New declaration.
37961         * lib/c32rtomb.c: New file, based on lib/unistr/u8-uctomb-aux.c.
37962         * m4/c32rtomb.m4: New file.
37963         * m4/uchar.m4 (gl_UCHAR_H): Test whether c32rtomb is declared.
37964         (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_C32RTOMB, HAVE_C32RTOMB,
37965         REPLACE_C32RTOMB.
37966         * modules/uchar (Makefile.am): Substitute GNULIB_C32RTOMB,
37967         HAVE_C32RTOMB, REPLACE_C32RTOMB.
37968         * modules/c32rtomb: New file.
37969         * tests/test-uchar-c++.cc: Test the signature of c32rtomb.
37970         * doc/posix-functions/c32rtomb.texi: Document the new module.
37971         * doc/posix-functions/wcrtomb.texi: Mention the new module.
37973 2020-01-08  Bruno Haible  <bruno@clisp.org>
37975         mbrtoc32: Use the system's mbrtoc32 if it exists and basically works.
37976         * m4/mbrtoc32.m4 (gl_MBRTOC32_SANITYCHECK): New macro.
37977         (gl_FUNC_MBRTOC32): Require it. Set REPLACE_MBRTOC32 if mbrtoc32 exists
37978         but is not working.
37979         * lib/mbrtoc32.c: Include hard-locale.h, <locale.h>.
37980         (mbrtoc32): If the char32_t encoding and the wchar_t encoding may
37981         differ, use the system's mbrtoc32, adding workarounds.
37982         * modules/mbrtoc32 (Depends-on): Add hard-locale.
37983         * doc/posix-functions/mbrtoc32.texi: Mention the Solaris and native
37984         Windows problem.
37985         * lib/btoc32.c: Include <stdio.h>, <string.h>.
37986         (btoc32): If the char32_t encoding and the wchar_t encoding may differ,
37987         use mbrtoc32, not btowc.
37988         * modules/btoc32 (Depends-on): Add mbrtoc32.
37989         * lib/mbsrtoc32s.c (mbsrtoc32s): If the char32_t encoding and the
37990         wchar_t encoding may differ, use mbrtoc32, not mbsrtowcs.
37991         * modules/mbsrtoc32s (Depends-on): Update conditions.
37992         (configure.ac): Compile mbsrtoc32s-state.c unconditionally.
37993         * lib/mbsnrtoc32s.c (mbsnrtoc32s): If the char32_t encoding and the
37994         wchar_t encoding may differ, use mbrtoc32, not mbsnrtowcs.
37995         * modules/mbsnrtoc32s (Depends-on): Update conditions.
37996         (configure.ac): Compile mbsrtoc32s-state.c unconditionally.
37998 2020-01-07  Bruno Haible  <bruno@clisp.org>
38000         wcrtomb: Make multithread-safe, except possibly on IRIX.
38001         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Don't set REPLACE_WCRTOMB to 1 when
38002         REPLACE_MBSTATE_T is set. Define WCRTOMB_C_LOCALE_BUG and
38003         WCRTOMB_RETVAL_BUG.
38004         * lib/wcrtomb.c (wcrtomb): Use original wcrtomb whenever available. Use
38005         wctomb only on IRIX.
38007 2020-01-05  Jim Meyering  <meyering@fb.com>
38009         tests: skip thread-using tests when threading is disabled
38010         sed's configure.ac specifies gl_DISABLE_THREADS, and that caused three
38011         thread-using gnulib tests to fail. Add an #if-guarded exit (77) to each
38012         of those, so they are skipped in this case.
38013         * tests/test-nl_langinfo-mt.c (main): Exit 77 when threading is disabled.
38014         * tests/test-setlocale_null-mt-all.c (main): Likewise.
38015         * tests/test-setlocale_null-mt-one.c (main): Likewise.
38017 2020-01-05  Bruno Haible  <bruno@clisp.org>
38019         tests: Avoid GCC over-optimization caused by _GL_ARG_NONNULL attributes.
38020         Reported by Jim Meyering in
38021         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00040.html>.
38022         * lib/stdlib.in.h (GNULIB_defined_canonicalize_file_name): New macro.
38023         (GNULIB_defined_ptsname_r): New macro.
38024         * tests/test-canonicalize.c (_GL_ARG_NONNULL): Define to empty.
38025         (main): Disable the NULL argument test if canonicalize_file_name does
38026         not come from gnulib.
38027         * tests/test-canonicalize-lgpl.c (_GL_ARG_NONNULL): Define to empty.
38028         (main): Disable the NULL argument test if canonicalize_file_name does
38029         not come from gnulib.
38030         * tests/test-ptsname_r.c (_GL_ARG_NONNULL): Define to empty.
38031         (test_errors): Disable the NULL argument test if ptsname_r does not come
38032         from gnulib.
38034 2020-01-04  Jim Meyering  <meyering@fb.com>
38036         update-copyright: reenable its always-skipped test
38037         * tests/test-update-copyright.sh: Restore the "-pi" options removed
38038         on 2019-06-15. Without those, an internal preliminary test would
38039         fail, causing this test always to be skipped.
38040         Verify that the test is now run and passes via this:
38041           ./gnulib-tool --test --dir /tmp/x --with-tests update-copyright
38043 2020-01-05  Bruno Haible  <bruno@clisp.org>
38045         mbstoc32s: Add tests.
38046         * tests/test-mbstoc32s.c: New file, based on tests/test-mbsrtoc32s.c.
38047         * tests/test-mbstoc32s-1.sh: New file, based on
38048         tests/test-mbsrtoc32s-1.sh.
38049         * tests/test-mbstoc32s-2.sh: New file, based on
38050         tests/test-mbsrtoc32s-2.sh.
38051         * tests/test-mbstoc32s-3.sh: New file, based on
38052         tests/test-mbsrtoc32s-3.sh.
38053         * tests/test-mbstoc32s-4.sh: New file, based on
38054         tests/test-mbsrtoc32s-4.sh.
38055         * modules/mbstoc32s-tests: New file, based on modules/mbsrtoc32s-tests.
38057         mbstoc32s: New module.
38058         * lib/uchar.in.h (mbstoc32s): New declaration.
38059         * lib/mbstoc32s.c: New file.
38060         * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_MBSTOC32S.
38061         * modules/uchar (Makefile.am): Substitute GNULIB_MBSTOC32S.
38062         * modules/mbstoc32s: New file.
38063         * tests/test-uchar-c++.cc: Test the signature of mbstoc32s.
38064         * doc/posix-functions/mbstowcs.texi: Mention the new module.
38066 2020-01-05  Bruno Haible  <bruno@clisp.org>
38068         Tweak recently added tests.
38069         * tests/test-mbrtoc32.c: Make signature consistent with uchar.in.h.
38070         * tests/test-mbsrtoc32s.c: Likewise.
38071         * tests/test-mbsnrtoc32s.c: Likewise.
38073 2020-01-04  Bruno Haible  <bruno@clisp.org>
38075         mbsnrtoc32s: Add tests.
38076         * tests/test-mbsnrtoc32s.c: New file, based on tests/test-mbsnrtowcs.c.
38077         * tests/test-mbsnrtoc32s-1.sh: New file, based on
38078         tests/test-mbsnrtowcs1.sh.
38079         * tests/test-mbsnrtoc32s-2.sh: New file, based on
38080         tests/test-mbsnrtowcs2.sh.
38081         * tests/test-mbsnrtoc32s-3.sh: New file, based on
38082         tests/test-mbsnrtowcs3.sh.
38083         * tests/test-mbsnrtoc32s-4.sh: New file, based on
38084         tests/test-mbsnrtowcs4.sh.
38085         * modules/mbsnrtoc32s-tests: New file, based on
38086         modules/mbsnrtowcs-tests.
38088         mbsnrtoc32s: New module.
38089         * lib/uchar.in.h (mbsnrtoc32s): New declaration.
38090         * lib/mbsnrtowcs-impl.h: Parameterize: Use macros FUNC, DCHAR_T,
38091         INTERNAL_STATE, MBRTOWC.
38092         * lib/mbsnrtowcs.c (FUNC, DCHAR_T, INTERNAL_STATE, MBRTOWC): New macros.
38093         * lib/mbsnrtoc32s.c: New file.
38094         * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_MBSNRTOC32S.
38095         * modules/uchar (Makefile.am): Substitute GNULIB_MBSNRTOC32S.
38096         * modules/mbsnrtoc32s: New file.
38097         * tests/test-uchar-c++.cc: Test the signature of mbsnrtoc32s.
38098         * doc/posix-functions/mbsnrtowcs.texi: Mention the new module.
38100 2020-01-04  Bruno Haible  <bruno@clisp.org>
38102         mbsrtoc32s tests: Enhance test.
38103         * tests/test-mbsrtoc32s.c (main): Include a non-BMP character in the
38104         test strings for UTF-8 and GB18030.
38106 2020-01-04  Bruno Haible  <bruno@clisp.org>
38108         mbsrtoc32s: Fix bug.
38109         * modules/mbsrtoc32s (configure.ac): Require gl_UCHAR_H, to make sure
38110         that SMALL_WCHAR_T is defined.
38112 2020-01-04  Bruno Haible  <bruno@clisp.org>
38114         mbsrtoc32s: Add tests.
38115         * tests/test-mbsrtoc32s.c: New file, based on tests/test-mbsrtowcs.c.
38116         * tests/test-mbsrtoc32s-1.sh: New file, based on
38117         tests/test-mbsrtowcs1.sh.
38118         * tests/test-mbsrtoc32s-2.sh: New file, based on
38119         tests/test-mbsrtowcs2.sh.
38120         * tests/test-mbsrtoc32s-3.sh: New file, based on
38121         tests/test-mbsrtowcs3.sh.
38122         * tests/test-mbsrtoc32s-4.sh: New file, based on
38123         tests/test-mbsrtowcs4.sh.
38124         * modules/mbsrtoc32s-tests: New file, based on modules/mbsrtowcs-tests.
38126         mbsrtoc32s: New module.
38127         * lib/uchar.in.h (mbsrtoc32s): New declaration.
38128         * lib/mbsrtowcs-impl.h: Parameterize: Use macros FUNC, DCHAR_T,
38129         INTERNAL_STATE, MBRTOWC.
38130         * lib/mbsrtowcs.c (FUNC, DCHAR_T, INTERNAL_STATE, MBRTOWC): New macros.
38131         * lib/mbsrtoc32s.c: New file.
38132         * lib/mbsrtoc32s-state.c: New file, based on lib/mbsrtowcs-state.c.
38133         * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_MBSRTOC32S.
38134         * modules/uchar (Makefile.am): Substitute GNULIB_MBSRTOC32S.
38135         * modules/mbsrtoc32s: New file.
38136         * tests/test-uchar-c++.cc: Test the signature of mbsrtoc32s.
38137         * doc/posix-functions/mbsrtowcs.texi: Mention the new module.
38139 2020-01-04  Bruno Haible  <bruno@clisp.org>
38141         mbrtowc, mbrtoc32: Tighten dependendies.
38142         * modules/mbrtowc (Depends-on): Disable hard-locale, mbsinit if
38143         REPLACE_MBSTATE_T is 1.
38144         (configure.ac): Don't compile lc-charset-dispatch.c and mbtowc-lock.c if
38145         REPLACE_MBSTATE_T is 0.
38146         * modules/mbrtoc32 (Depends-on): Remove hard-locale, mbsinit. Disable
38147         mbrtowc dependency if REPLACE_MBSTATE_T is 1.
38148         (configure.ac): Don't compile lc-charset-dispatch.c and mbtowc-lock.c if
38149         REPLACE_MBSTATE_T is 0.
38151 2020-01-04  Bruno Haible  <bruno@clisp.org>
38153         uchar: Decide about _GL_LARGE_CHAR32_T at configure time.
38154         * m4/uchar.m4 (gl_UCHAR_H): Set SMALL_WCHAR_T.
38155         * modules/uchar (Files): Add stdint.m4.
38156         (Makefile.am): Substitute SMALL_WCHAR_T.
38157         * lib/uchar.in.h (_GL_LARGE_CHAR32_T): Rely on SMALL_WCHAR_T.
38159 2020-01-04  Bruno Haible  <bruno@clisp.org>
38161         Fix AC_CHECK_DECL so that it deactivates clang's built-in declarations.
38162         Reported by Martin Storsjö <martin@martin.st> in
38163         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00016.html>.
38164         * m4/00gnulib.m4 (gl_COMPILER_CLANG, gl_COMPILER_PREPARE_CHECK_DECL):
38165         New macros.
38166         (_AC_CHECK_DECL_BODY, AC_CHECK_DECL): Augment.
38168 2020-01-04  Bruno Haible  <bruno@clisp.org>
38170         btoc32: Add tests.
38171         * tests/test-btoc32.c: New file, based on tests/test-btowc.c.
38172         * tests/test-btoc32-1.sh: New file, based on tests/test-btowc1.sh.
38173         * tests/test-btoc32-2.sh: New file, based on tests/test-btowc2.sh.
38174         * modules/btoc32-tests: New file, based on modules/btowc-tests.
38176         btoc32: New module.
38177         * lib/uchar.in.h (btoc32): New declaration.
38178         * lib/btoc32.c: New file.
38179         * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_BTOC32.
38180         * modules/uchar (Makefile.am): Substitute GNULIB_BTOC32.
38181         * modules/btoc32: New file.
38182         * tests/test-uchar-c++.cc: Test the signature of btoc32.
38183         * doc/posix-functions/btowc.texi: Mention the new module.
38185 2020-01-03  Bruno Haible  <bruno@clisp.org>
38187         uchar tests: Avoid compilation error with HP cc.
38188         * tests/test-uchar.c: Disable a test when HP cc is in use.
38190 2020-01-03  Bruno Haible  <bruno@clisp.org>
38192         mbrtoc32: Add tests.
38193         * tests/test-mbrtoc32.c: New file, based on tests/test-mbrtowc.c.
38194         * tests/test-mbrtoc32-1.sh: New file, based on tests/test-mbrtowc1.sh.
38195         * tests/test-mbrtoc32-2.sh: New file, based on tests/test-mbrtowc2.sh.
38196         * tests/test-mbrtoc32-3.sh: New file, based on tests/test-mbrtowc3.sh.
38197         * tests/test-mbrtoc32-4.sh: New file, based on tests/test-mbrtowc4.sh.
38198         * tests/test-mbrtoc32-5.sh: New file, based on tests/test-mbrtowc5.sh.
38199         * tests/test-mbrtoc32-w32.c: New file, based on tests/test-mbrtowc-w32.c.
38200         * tests/test-mbrtoc32-w32-1.sh: New file, based on
38201         tests/test-mbrtowc-w32-1.sh.
38202         * tests/test-mbrtoc32-w32-2.sh: New file, based on
38203         tests/test-mbrtowc-w32-2.sh.
38204         * tests/test-mbrtoc32-w32-3.sh: New file, based on
38205         tests/test-mbrtowc-w32-3.sh.
38206         * tests/test-mbrtoc32-w32-4.sh: New file, based on
38207         tests/test-mbrtowc-w32-4.sh.
38208         * tests/test-mbrtoc32-w32-5.sh: New file, based on
38209         tests/test-mbrtowc-w32-5.sh.
38210         * tests/test-mbrtoc32-w32-6.sh: New file, based on
38211         tests/test-mbrtowc-w32-6.sh.
38212         * tests/test-mbrtoc32-w32-7.sh: New file, based on
38213         tests/test-mbrtowc-w32-7.sh.
38214         * modules/mbrtoc32-tests: New file, based on modules/mbrtowc-tests.
38216         mbrtoc32: New module.
38217         * lib/uchar.in.h (mbrtoc32): New declaration.
38218         * lib/mbrtoc32.c: New file, based on lib/mbrtowc.c.
38219         * m4/mbrtoc32.m4: New file, based on m4/mbrtowc.m4.
38220         * m4/uchar.m4 (gl_UCHAR_H): Test whether mbrtoc32 is declared.
38221         (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_MBRTOC32, HAVE_MBRTOC32,
38222         REPLACE_MBRTOC32.
38223         * modules/uchar (Makefile.am): Substitute GNULIB_MBRTOC32,
38224         HAVE_MBRTOC32, REPLACE_MBRTOC32.
38225         * modules/mbrtoc32: New file, based on modules/mbrtowc.
38226         * tests/test-uchar-c++.cc (mbrtoc32): Verify the signature.
38227         * modules/uchar-c++-tests (Makefile.am): Link test-uchar-c++ with
38228         $(LIB_MBRTOWC).
38229         * doc/posix-functions/mbrtoc32.texi: Document the new module.
38230         * doc/posix-functions/mbrtowc.texi: Mention the new module.
38232 2020-01-03  Bruno Haible  <bruno@clisp.org>
38234         mbrtowc: Refactor to share code with mbrtoc32.
38235         * lib/mbrtowc-impl.h: New file, extracted from lib/mbrtowc.c.
38236         * lib/mbrtowc-impl-utf8.h: Likewise.
38237         * lib/mbrtowc.c (mbrtowc): Define macro FITS_IN_CHAR_TYPE. Include
38238         mbrtowc-impl.h.
38239         * modules/mbrtowc (Files): Add the new files.
38241 2020-01-03  Jim Meyering  <meyering@fb.com>
38243         doc: fix time.texi wording
38244         * doc/posix-headers/time.texi (time.h): Typo.
38246 2020-01-03  Bruno Haible  <bruno@clisp.org>
38248         mbrtowc: Refactor locale charset dispatching.
38249         * lib/lc-charset-dispatch.h: New file, extracted from lib/mbrtowc.c.
38250         * lib/lc-charset-dispatch.c: New file, extracted from lib/mbrtowc.c.
38251         * lib/mbrtowc.c: Include lc-charset-dispatch.h. Don't include
38252         localcharset.h, streq.h.
38253         (enc_t): Remove type.
38254         (locale_enc): Remove function.
38255         (cached_locale_enc): Remove variable.
38256         (locale_enc_cached): Remove function.
38257         (mbrtowc): Invoke locale_encoding_classification.
38258         * m4/mbrtowc.m4 (gl_PREREQ_MBRTOWC): Update comment.
38259         * modules/mbrtowc (Files): Add lc-charset-dispatch.h,
38260         lc-charset-dispatch.c.
38261         (configure.ac): Arrange to compile lc-charset-dispatch.c.
38263 2020-01-03  Paul Eggert  <eggert@cs.ucla.edu>
38265         doc: mention 32-bit time_t issue
38266         * doc/posix-headers/sys_stat.texi (sys/stat.h):
38267         * doc/posix-headers/time.texi (time.h): Mention 2038.
38269 2020-01-03  Bruno Haible  <bruno@clisp.org>
38271         mbrtowc: Ensure the mbtowc_lock is unique.
38272         * lib/mbtowc-lock.c: New file, based on lib/setlocale-lock.c.
38273         * lib/mbtowc-lock.h: New file, extracted from lib/mbrtowc.c and
38274         lib/setlocale_null.c.
38275         * lib/mbrtowc.c: Include headers needed for mbtowc-lock.h. Don't include
38276         glthread/lock.h. Include mbtowc-lock.h.
38277         (mbtowc_lock): Remove declaration.
38278         (mbrtowc): Use mbtowc_with_lock.
38279         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Require gl_PTHREADLIB. Check for
38280         threads.h. Set LIB_MBRTOWC.
38281         (gl_PREREQ_MBTOWC_LOCK): New macro.
38282         * modules/mbrtowc (Files): Add lib/mbtowc-lock.h, lib/mbtowc-lock.c,
38283         lib/windows-initguard.h, m4/threadlib.m4, m4/visibility.m4.
38284         (Depends-on): Remove lock.
38285         (configure.ac): Arrange to compile mbtowc-lock.c.
38286         (Link): Mention $(LIB_MBRTOWC) instead of $(LIBTHREAD).
38287         * modules/acl (Link): Likewise.
38288         * modules/argmatch (Link): Likewise.
38289         * modules/backup-rename (Link): Likewise.
38290         * modules/backupfile (Link): Likewise.
38291         * modules/closein (Link): Likewise.
38292         * modules/closeout (Link): Likewise.
38293         * modules/copy-file (Link): Likewise.
38294         * modules/csharpcomp (Link): Likewise.
38295         * modules/csharpexec (Link): Likewise.
38296         * modules/dfa (Link): Likewise.
38297         * modules/exclude (Link): Likewise.
38298         * modules/fnmatch (Link): Likewise.
38299         * modules/fnmatch-gnu (Link): Likewise.
38300         * modules/fnmatch-posix (Link): Likewise.
38301         * modules/glob (Link): Likewise.
38302         * modules/human (Link): Likewise.
38303         * modules/javacomp (Link): Likewise.
38304         * modules/javaexec (Link): Likewise.
38305         * modules/javaversion (Link): Likewise.
38306         * modules/mbfile (Link): Likewise.
38307         * modules/mbiter (Link): Likewise.
38308         * modules/mbmemcasecmp (Link): Likewise.
38309         * modules/mbmemcasecoll (Link): Likewise.
38310         * modules/mbrlen (Link): Likewise.
38311         * modules/mbscasecmp (Link): Likewise.
38312         * modules/mbscasestr (Link): Likewise.
38313         * modules/mbschr (Link): Likewise.
38314         * modules/mbscspn (Link): Likewise.
38315         * modules/mbsinit (Link): Likewise.
38316         * modules/mbslen (Link): Likewise.
38317         * modules/mbsncasecmp (Link): Likewise.
38318         * modules/mbsnlen (Link): Likewise.
38319         * modules/mbsnrtowcs (Link): Likewise.
38320         * modules/mbspbrk (Link): Likewise.
38321         * modules/mbspcasecmp (Link): Likewise.
38322         * modules/mbsrchr (Link): Likewise.
38323         * modules/mbsrtowcs (Link): Likewise.
38324         * modules/mbssep (Link): Likewise.
38325         * modules/mbsspn (Link): Likewise.
38326         * modules/mbsstr (Link): Likewise.
38327         * modules/mbstok_r (Link): Likewise.
38328         * modules/mbswidth (Link): Likewise.
38329         * modules/mbuiter (Link): Likewise.
38330         * modules/mkdir-p (Link): Likewise.
38331         * modules/propername (Link): Likewise.
38332         * modules/quote (Link): Likewise.
38333         * modules/quotearg (Link): Likewise.
38334         * modules/quotearg-simple (Link): Likewise.
38335         * modules/regex-quote (Link): Likewise.
38336         * modules/rpmatch (Link): Likewise.
38337         * modules/sh-quote (Link): Likewise.
38338         * modules/system-quote (Link): Likewise.
38339         * modules/trim (Link): Likewise.
38340         * modules/unistdio/ulc-asnprintf (Link): Likewise.
38341         * modules/unistdio/ulc-fprintf (Link): Likewise.
38342         * modules/unistdio/ulc-vasnprintf (Link): Likewise.
38343         * modules/unistdio/ulc-vasprintf (Link): Likewise.
38344         * modules/unistdio/ulc-vfprintf (Link): Likewise.
38345         * modules/unistdio/ulc-vsnprintf (Link): Likewise.
38346         * modules/unistdio/ulc-vsprintf (Link): Likewise.
38347         * modules/xfreopen (Link): Likewise.
38348         * modules/xmemcoll (Link): Likewise.
38349         * modules/yesno (Link): Likewise.
38350         * modules/regex (Link): Add $(LIB_MBRTOWC).
38351         * modules/acl-tests (Makefile.am): Link the programs with $(LIB_MBRTOWC)
38352         instead of $(LIBTHREAD).
38353         * modules/argmatch-tests (Makefile.am): Likewise.
38354         * modules/closein-tests (Makefile.am): Likewise.
38355         * modules/copy-file-tests (Makefile.am): Likewise.
38356         * modules/dfa-tests (Makefile.am): Likewise.
38357         * modules/fnmatch-tests (Makefile.am): Likewise.
38358         * modules/glob-tests (Makefile.am): Likewise.
38359         * modules/mbmemcasecmp-tests (Makefile.am): Likewise.
38360         * modules/mbmemcasecoll-tests (Makefile.am): Likewise.
38361         * modules/mbrtowc-tests (Makefile.am): Likewise.
38362         * modules/mbscasecmp-tests (Makefile.am): Likewise.
38363         * modules/mbscasestr-tests (Makefile.am): Likewise.
38364         * modules/mbschr-tests (Makefile.am): Likewise.
38365         * modules/mbscspn-tests (Makefile.am): Likewise.
38366         * modules/mbsinit-tests (Makefile.am): Likewise.
38367         * modules/mbsncasecmp-tests (Makefile.am): Likewise.
38368         * modules/mbsnrtowcs-tests (Makefile.am): Likewise.
38369         * modules/mbspbrk-tests (Makefile.am): Likewise.
38370         * modules/mbspcasecmp-tests (Makefile.am): Likewise.
38371         * modules/mbsrchr-tests (Makefile.am): Likewise.
38372         * modules/mbsrtowcs-tests (Makefile.am): Likewise.
38373         * modules/mbsspn-tests (Makefile.am): Likewise.
38374         * modules/mbsstr-tests (Makefile.am): Likewise.
38375         * modules/quotearg-simple-tests (Makefile.am): Likewise.
38376         * modules/quotearg-tests (Makefile.am): Likewise.
38377         * modules/readtokens-tests (Makefile.am): Likewise.
38378         * modules/sh-quote-tests (Makefile.am): Likewise.
38379         * modules/system-quote-tests (Makefile.am): Likewise.
38380         * modules/unistdio/ulc-asnprintf-tests (Makefile.am): Likewise.
38381         * modules/unistdio/ulc-vasnprintf-tests (Makefile.am): Likewise.
38382         * modules/unistdio/ulc-vasprintf-tests (Makefile.am): Likewise.
38383         * modules/unistdio/ulc-vsnprintf-tests (Makefile.am): Likewise.
38384         * modules/unistdio/ulc-vsprintf-tests (Makefile.am): Likewise.
38385         * modules/yesno-tests (Makefile.am): Likewise.
38386         * modules/exclude-tests (Makefile.am): Link the programs with
38387         $(LIB_MBRTOWC).
38388         * modules/regex-tests (Makefile.am): Likewise.
38389         * modules/regex-quote-tests (Makefile.am): Likewise.
38391 2020-01-03  Bruno Haible  <bruno@clisp.org>
38393         getopt-posix: Fix compilation failure in testdirs.
38394         * lib/unistd.in.h: Include <getopt-cdefs.h> and <getopt-pfx-core.h> only
38395         when the gnulib module 'getopt-posix' is enabled.
38396         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_GETOPT_POSIX.
38397         * modules/getopt-posix (configure.ac): Set GNULIB_GETOPT_POSIX as a
38398         module indicator.
38399         * modules/unistd (Makefile.am): Substitute GNULIB_GETOPT_POSIX.
38401 2020-01-03  Bruno Haible  <bruno@clisp.org>
38403         doc: Mention the 64-bit inode number problem.
38404         * m4/largefile.m4 (AC_SYS_LARGEFILE): Mention that this macro fixes the
38405         64-bit inode number problem.
38406         * doc/posix-functions/stat.texi: Mention that this module fixes the
38407         64-bit inode number problem.
38408         * doc/posix-functions/lstat.texi: Likewise.
38409         * doc/posix-functions/fstat.texi: Likewise.
38410         * doc/posix-functions/readdir.texi: Add more details.
38411         * doc/posix-functions/readdir_r.texi: Likewise.
38413 2020-01-02  Bruno Haible  <bruno@clisp.org>
38415         wcrtomb: Add more tests.
38416         * tests/test-wcrtomb-w32.c: Include localcharset.h.
38417         (test_one_locale): For the GB18030 and UTF-8 tests, verify that
38418         locale_charset() returns the expected value; otherwise, skip the test.
38419         * tests/test-wcrtomb-w32-6.sh: Remove old comment.
38420         * tests/test-wcrtomb-w32-7.sh: Likewise.
38421         * modules/wcrtomb-tests (Files): Add these files.
38422         (Depends-on): Add localcharset.
38423         (TESTS): Add test-wcrtomb-w32-6.sh, test-wcrtomb-w32-7.sh.
38425 2020-01-02  Bruno Haible  <bruno@clisp.org>
38427         mbrtowc: Add more tests.
38428         * tests/test-mbrtowc-w32.c: Include localcharset.h.
38429         (test_one_locale): For the GB18030 and UTF-8 tests, verify that
38430         locale_charset() returns the expected value; otherwise, skip the test.
38431         * tests/test-mbrtowc-w32-6.sh: Remove old comment.
38432         * tests/test-mbrtowc-w32-7.sh: Likewise.
38433         * modules/mbrtowc-tests (Files): Add these files.
38434         (Depends-on): Add localcharset.
38435         (TESTS): Add test-mbrtowc-w32-6.sh, test-mbrtowc-w32-7.sh.
38437 2020-01-02  Bruno Haible  <bruno@clisp.org>
38439         mbrtowc: Fix test failures on MSVC (regression by previous commit).
38440         * m4/mbrtowc.m4 (gl_MBRTOWC_STORES_INCOMPLETE): New macro.
38441         (gl_FUNC_MBRTOWC): Invoke it. Define MBRTOWC_STORES_INCOMPLETE_BUG.
38442         * lib/mbrtowc.c (rpl_mbrtowc): Add workaround for
38443         MBRTOWC_STORES_INCOMPLETE_BUG.
38444         * doc/posix-functions/mbrtowc.texi: Mention the MSVC bug.
38446 2020-01-02  Paul Eggert  <eggert@cs.ucla.edu>
38448         doc: mention glibc bug 24269
38449         * doc/regex.texi (Back-reference Operator): Add glibc bug 24269.
38450         Reformat slightly so that it looks nicer in the Grep manual.
38452 2020-01-02  Bruno Haible  <bruno@clisp.org>
38454         mbrtowc: Don't replace mbstate_t on MSVC.
38455         * m4/mbrtowc.m4 (gl_MBSTATE_T_BROKEN): Require AC_CANONICAL_HOST. Ignore
38456         a missing mbsinit function on native Windows.
38457         * lib/wchar.in.h (GNULIB_defined_mbstate_t): Likewise.
38458         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Strengthen the test, to detect an
38459         MSVC bug.
38460         * doc/posix-functions/wcrtomb.texi: Mention the MSVC bug.
38462 2020-01-02  Bruno Haible  <bruno@clisp.org>
38464         setlocale-null: Avoid crashing the MSVC linker.
38465         * lib/setlocale-lock.c: Don't define IMP(gl_get_setlocale_null_lock) on
38466         MSVC.
38468 2020-01-02  Bruno Haible  <bruno@clisp.org>
38470         wchar: Make the HP-UX workaround work on HP-UX 11.31.
38471         * modules/wchar (Depends-on): Add inttypes-incomplete.
38472         * lib/inttypes.in.h: Define _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H.
38473         * lib/wchar.in.h: Test _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H instead
38474         of strtoimax.
38476 2020-01-02  Bruno Haible  <bruno@clisp.org>
38478         mbrtowc: Fix compilation error on IRIX (regression from 2019-12-26).
38479         * lib/mbrtowc.c: Include <stdint.h>.
38480         * modules/mbrtowc (Depends-on): Add stdint.
38482 2020-01-01  Pádraig Brady  <P@draigBrady.com>
38484         md5, sha1, sha256, sha512: support --with-openssl=auto-gpl-compat
38485         * m4/gl-openssl.m4: Add a new "auto-gpl-compat" mode,
38486         which will auto enable use of openssl, only for >= version 3,
38487         which is newly licensed under the Apache Software License.
38489 2020-01-01  Bruno Haible  <bruno@clisp.org>
38491         mbrtowc: Include function name in macro names.
38492         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Define
38493         MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ, not C_LOCALE_MAYBE_EILSEQ.
38494         (gl_MBRTOWC_C_LOCALE): Change cache variable name to
38495         gl_cv_func_mbrtowc_C_locale_sans_EILSEQ.
38496         * lib/mbrtowc.c: Test MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ, not
38497         C_LOCALE_MAYBE_EILSEQ.
38499 2020-01-01  Bruno Haible  <bruno@clisp.org>
38501         c32tob: New module.
38502         * lib/uchar.in.h (_GL_LARGE_CHAR32_T): New macro.
38503         (c32tob): New declaration.
38504         * lib/c32tob.c: New file.
38505         * m4/uchar.m4 (gl_UCHAR_MODULE_INDICATOR, gl_UCHAR_H_DEFAULTS): New
38506         macros.
38507         (gl_UCHAR_H): Require gl_UCHAR_H_DEFAULTS.
38508         * modules/uchar (Depends-on): Add snippet/c++defs.
38509         (Makefile.am): Include c++defs.h and substitute GNULIB_C32TOB in
38510         uchar.h.
38511         * modules/c32tob: New file.
38512         * tests/test-uchar.c: Verify that _GL_LARGE_CHAR32_T is correctly
38513         defined.
38514         * tests/test-uchar-c++.cc: Include signature.h. Test the signature of
38515         c32tob.
38516         * modules/uchar-c++-tests (Files): Add tests/signature.h.
38517         * doc/posix-functions/wctob.texi: Mention the new module.
38519 2020-01-01  Bruno Haible  <bruno@clisp.org>
38521         locale C++ tests: Fix link error on AIX (regression from 2019-12-18).
38522         * modules/locale-c++-tests (Makefile.am): Link test-locale-c++ with
38523         $(LIB_SETLOCALE).
38525 2020-01-01  Bruno Haible  <bruno@clisp.org>
38527         hard-locale tests: Fix a conflict with the C++ tests.
38528         * modules/hard-locale-tests (Makefile.am): Build a program named
38529         'current-locale', not 'locale'.
38531 2020-01-01  Bruno Haible  <bruno@clisp.org>
38533         doc: Update documentation about wchar_t.
38534         * doc/*/*wc*.texi: Clarify that 64-bit AIX does not have a too small
38535         wchar_t type.
38537 2020-01-01  Bruno Haible  <bruno@clisp.org>
38539         mbrtowc tests: Fix typos.
38540         * tests/test-mbrtowc.c (main): Fix typo.
38541         * tests/test-mbrtowc-w32.c (test_one_locale): Likewise.
38543 2019-12-31  Paul Eggert  <eggert@cs.ucla.edu>
38545         maint: update copyright notices
38546         Before doing the following changes done by hand, I also ran ‘make
38547         update-copyright’ and ‘config/srclist-update <config/srclist.txt’
38548         to do most of the copyright years automatically.  A few upstream
38549         sources are still in 2019 but these should eventually be changed
38550         automatically too.
38551         * build-aux/declared.sh (func_version):
38552         * build-aux/libtool-next-version (func_version):
38553         * build-aux/run-test (func_version):
38554         Update these notices by hand.  Put just the last year
38555         in output of programs, as per GNU coding standards.
38557 2019-12-31  Bruno Haible  <bruno@clisp.org>
38559         uchar: Add C++ tests.
38560         * tests/test-uchar-c++.cc: New file.
38561         * tests/test-uchar-c++2.cc: New file.
38562         * modules/uchar-c++-tests: New file.
38564         uchar: Add tests.
38565         * tests/test-uchar.c: New file.
38566         * modules/uchar-tests: New file.
38568         uchar: New module.
38569         * lib/uchar.in.h: New file.
38570         * m4/uchar.m4: New file.
38571         * modules/uchar: New file.
38572         * doc/posix-headers/uchar.texi: Mention the new module.
38574 2019-12-30  Jim Meyering  <meyering@fb.com>
38576         localeinfo: ->simple would be wrong for LC_ALL=C
38577         That would lead to using unnecessary and expensive code paths in dfa.c.
38578         * lib/localeinfo.c (using_simple_locale): Fix recently-introduced logic
38579         error that would have made grep many times slower in the C locale.
38580         With this change, and a file created like this:
38581           yes 00 | head -10000000 > in
38582         Running grep as follows becomes more than 40 times faster:
38583           LC_ALL=C grep -Fw 0 in
38585 2019-12-30  Paul Eggert  <eggert@cs.ucla.edu>
38587         doc: document trouble with back-references
38588         * doc/regex.texi (Back-reference Operator): Mention bugs etc.
38590 2019-12-29  Paul Eggert  <eggert@cs.ucla.edu>
38592         doc: use “back-reference” for \1 etc.
38593         * doc/regex.texi: Consistently spell “back-reference” with
38594         a hyphen, since that’s how POSIX does it.
38596 2019-12-26  Jim Meyering  <meyering@fb.com>
38598         test-framework-sh: tighten an internal grep regexp
38599         * tests/init.sh (gl_shell_test_script_): Tighten the grep regexp
38600         that helps test for a working printf.
38602 2019-12-26  Bruno Haible  <bruno@clisp.org>
38604         test-framework-sh: Avoid /bin/sh on AIX 7.2 due to its printf built-in.
38605         Reported by Paul Eggert in
38606         <https://lists.gnu.org/archive/html/grep-devel/2019-12/msg00020.html>.
38607         Simplification by Jim Meyering.
38608         * tests/init.sh (gl_shell_test_script_): Add a test of printf of an
38609         octal escape sequence in a UTF-8 locale.
38611 2019-12-26  Paul Eggert  <eggert@cs.ucla.edu>
38613         mbrtowc: port better to narrow-wchar_t platforms
38614         * lib/mbrtowc.c (mbrtowc): On platforms like AIX 7.2, where
38615         wchar_t is too narrow to represent all the Unicode characters,
38616         consider a byte sequence for an out-of-wchar_t-range character to
38617         be an encoding error.  This fixes grep’s surrogate-pair test
38618         failure on AIX 7.2.
38620 2019-12-24  Bruno Haible  <bruno@clisp.org>
38622         localcharset: Avoid referencing rpl_setlocale on native Windows.
38623         * lib/localcharset.c (setlocale): Undefine.
38625 2019-12-24  Bruno Haible  <bruno@clisp.org>
38627         lock tests: Fix link error on HP-UX/hppa (regression from 2019-12-21).
38628         * m4/semaphore.m4: New file.
38629         * modules/lock-tests (Files): Add it.
38630         (configure.ac): Require gl_SEMAPHORE.
38631         (Makefile.am): Link test-lock with $(LIB_SEMAPHORE).
38633 2019-12-24  Paul Eggert  <eggert@cs.ucla.edu>
38635         strptime: fix typo in previous patch
38636         Problem and fix reported by Bruno Haible in:
38637         https://lists.gnu.org/r/bug-gnulib/2019-12/msg00202.html
38638         * lib/strptime.c (day_of_the_week): Fix paren bug.
38640 2019-12-24  Bruno Haible  <bruno@clisp.org>
38642         setlocale-null: Make it easy to rely on the lock in another library.
38643         * lib/setlocale-lock.c: Do not define anything if OMIT_SETLOCALE_LOCK is
38644         defined.
38646 2019-12-23  Paul Eggert  <eggert@cs.ucla.edu>
38648         gethrxtime, mktime, nstrftime, strptime: tweak division performance
38649         Performanced analyzed by Bruno Haible in:
38650         https://lists.gnu.org/r/bug-gnulib/2019-12/msg00200.html
38651         * config/srclist.txt: Do not sync mktime.c for now.
38652         * lib/mktime.c (shr, ydhms_diff):
38653         * lib/nstrftime.c (SHR, tm_diff, __strftime_internal):
38654         * lib/strptime.c (day_of_the_week):
38655         * lib/xtime.h (xtime_sec):
38656         Redo with neither ‘%’ nor conditional branches.
38658 2019-12-23  Bruno Haible  <bruno@clisp.org>
38660         setlocale-null: Export the lock function also on non-Windows platforms.
38661         * lib/setlocale-lock.c (DLL_EXPORTED): New macro.
38662         (gl_get_setlocale_null_lock): Declare as DLL_EXPORTED.
38663         * m4/setlocale_null.m4 (gl_PREREQ_SETLOCALE_LOCK): New macro.
38664         * modules/setlocale-null (configure.ac): Invoke it.
38665         (Files): Add m4/visibility.m4.
38667 2019-12-22  Paul Eggert  <eggert@cs.ucla.edu>
38669         gethrxtime: fix rounding bug with negative args
38670         Problem reported by Bruno Haible in:
38671         https://lists.gnu.org/r/bug-gnulib/2019-12/msg00192.html
38672         * lib/xtime.h (xtime_sec): Simplify calculation and correct bug
38673         with negative rounding.  Common platforms can compute / and % with
38674         a single instruction, so the simplified code should be shorter and
38675         faster on these platforms anyway.
38677 2019-12-22  Bruno Haible  <bruno@clisp.org>
38679         gethrxtime: remove incorrect overflow detection
38680         * lib/xtime.h (xtime_make): Remove attempt to prevent internal
38681         integer overflow, as it didn’t suffice.  This reverts the xtime.h
38682         part of 2018-10-12T04:46:09Z!akim.demaille@gmail.com, which I
38683         cannot now see the need for anyway (even in cases where it works),
38684         as the patch is helpful only when the signs of S and NS disagree,
38685         and all callers pass nonnegative values for S and NS.
38687 2019-12-22  Bruno Haible  <bruno@clisp.org>
38689         setlocale-null: Add standalone include file.
38690         * lib/setlocale_null.h: New file, extracted from lib/locale.in.h.
38691         * lib/locale.in.h: Include setlocale_null.h.
38692         (SETLOCALE_NULL_MAX, SETLOCALE_NULL_ALL_MAX, setlocale_null_r,
38693         setlocale_null): Remove declarations.
38694         * lib/setlocale_null.c: Include setlocale_null.h.
38695         * lib/localename.c: Likewise.
38696         * modules/setlocale-null (Files): Add lib/setlocale_null.h.
38697         (Depends-on): Add snippet/arg-nonnull.
38698         (Include): Allow either "setlocale_null.h" or <locale.h>.
38700 2019-12-22  Bruno Haible  <bruno@clisp.org>
38702         strfmon_l: Fix test failures on FreeBSD and Cygwin.
38703         * m4/strfmon_l.m4 (gl_FUNC_STRFMON_L): Require gt_LOCALE_FR_UTF8. Add an
38704         AC_RUN_IFELSE test.
38705         * modules/strfmon_l (Files): Add locale-fr.m4, codeset.m4.
38706         * doc/posix-functions/strfmon_l.texi: Mention the FreeBSD and Cygwin
38707         problem.
38709 2019-12-22  Bruno Haible  <bruno@clisp.org>
38711         Prefer lib_SOURCES to unconditional AC_LIBOBJ.
38712         * modules/at-internal: Prefer a lib_SOURCES augmentation to an
38713         unconditional AC_LIBOBJ.
38714         * modules/selinux-at: Likewise.
38715         * modules/xmemdup0: Likewise.
38716         * modules/xstrtoll: Likewise.
38718 2019-12-22  Bruno Haible  <bruno@clisp.org>
38720         longlong: Mark module obsolete.
38721         * modules/longlong (Status, Notice): New sections.
38723         stdint: Assume that the compiler supports 'long long'.
38724         * lib/stdint.in.h (int64_t, uint64_t, intmax_t, uintmax_t, INT64_C,
38725         UINT64_C, INTMAX_C, UINTMAX_C): Assume HAVE_LONG_LONG_INT and
38726         HAVE_UNSIGNED_LONG_LONG_INT to be 1.
38727         * m4/stdint.m4 (gl_STDINT_H): Don't require AC_TYPE_LONG_LONG_INT,
38728         AC_TYPE_UNSIGNED_LONG_LONG_INT.
38729         * modules/stdint (Files): Remove longlong.m4.
38730         (Makefile.am): Don't substitute HAVE_LONG_LONG_INT,
38731         HAVE_UNSIGNED_LONG_LONG_INT.
38733         inttypes-incomplete: Assume that the compiler supports 'long long'.
38734         * lib/inttypes.in.h (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX,
38735         _SCNu64_PREFIX): Assume HAVE_LONG_LONG_INT and
38736         HAVE_UNSIGNED_LONG_LONG_INT to be 1.
38737         * m4/inttypes.m4 (gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION): Assume
38738         HAVE_LONG_LONG_INT to be 1.
38739         * modules/inttypes-incomplete (Makefile.am): Don't substitute
38740         HAVE_LONG_LONG_INT, HAVE_UNSIGNED_LONG_LONG_INT.
38742         malloca: Assume that the compiler supports 'long long'.
38743         * lib/malloca.h: Assume HAVE_LONG_LONG_INT to be 1.
38744         * m4/malloca.m4 (gl_MALLOCA): Don't require AC_TYPE_LONG_LONG_INT.
38745         * modules/malloca (Files): Remove longlong.m4.
38746         * modules/relocatable-prog-wrapper (Files): Likewise.
38748         atoll: Assume that the compiler supports 'long long'.
38749         * m4/atoll.m4 (gl_FUNC_ATOLL): Don't require AC_TYPE_LONG_LONG_INT.
38750         * modules/atoll (Files): Remove longlong.m4.
38752         strtoll: Assume that the compiler supports 'long long'.
38753         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Don't require AC_TYPE_LONG_LONG_INT.
38754         * modules/strtoll (Files): Remove longlong.m4.
38756         strtoull: Assume that the compiler supports 'long long'.
38757         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Don't require
38758         AC_TYPE_UNSIGNED_LONG_LONG_INT.
38759         * modules/strtoull (Files): Remove longlong.m4.
38761         strtoimax, strtoumax: Assume that the compiler supports 'long long'.
38762         * lib/strtoimax.c: Assume HAVE_LONG_LONG_INT and
38763         HAVE_UNSIGNED_LONG_LONG_INT to be 1.
38764         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Don't require
38765         AC_TYPE_LONG_LONG_INT.
38766         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't require
38767         AC_TYPE_UNSIGNED_LONG_LONG_INT.
38768         * modules/strtoimax (Files): Remove longlong.m4.
38769         * modules/strtoumax (Files): Likewise.
38771         xstrtoll: Assume that the compiler supports 'long long'.
38772         * lib/xstrtol.h (xstrtoll, xstrtoull): Declare unconditionally.
38773         * modules/xstrtoll (configure.ac): Don't invoke AC_TYPE_LONG_LONG_INT.
38775         vasnprintf: Assume that the compiler supports 'long long'.
38776         * lib/printf-args.h: Assume HAVE_LONG_LONG_INT to be 1.
38777         * lib/printf-args.c (PRINTF_FETCHARGS): Likewise.
38778         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
38779         * lib/vasnprintf.c (MAX_ROOM_NEEDED, VASNPRINTF): Likewise.
38780         * m4/intmax_t.m4 (gl_AC_TYPE_INTMAX_T, gt_AC_TYPE_INTMAX_T): Don't
38781         require AC_TYPE_LONG_LONG_INT.
38782         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
38783         gl_PREREQ_VASNPRINTF): Likewise.
38784         * modules/vasnprintf (Files): Remove longlong.m4.
38785         * modules/c-vasnprintf (Files): Likewise.
38786         * modules/unistdio/u8-vasnprintf (Files): Likewise.
38787         * modules/unistdio/u8-u8-vasnprintf (Files): Likewise.
38788         * modules/unistdio/u16-vasnprintf (Files): Likewise.
38789         * modules/unistdio/u16-u16-vasnprintf (Files): Likewise.
38790         * modules/unistdio/u32-vasnprintf (Files): Likewise.
38791         * modules/unistdio/u32-u32-vasnprintf (Files): Likewise.
38792         * modules/unistdio/ulc-vasnprintf (Files): Likewise.
38794         gethrxtime: Assume that the compiler supports 'long long'.
38795         * lib/xtime.h (xtime_t): Define to 'long long int' always.
38796         (XTIME_PRECISION): Define to 1000000000 always.
38797         (xtime_make, xtime_sec): Optimize accordingly.
38798         * m4/gethrxtime.m4 (gl_XTIME): Don't require AC_TYPE_LONG_LONG_INT.
38799         * modules/gethrxtime (Files): Remove longlong.m4.
38801         integer_length*: Assume that the compiler supports 'long long'.
38802         * lib/integer_length.h (integer_length_ll): Declare unconditionally.
38803         * modules/integer_length (Files): Remove longlong.m4.
38804         (configure.ac): Don't require AC_TYPE_UNSIGNED_LONG_LONG_INT.
38805         * modules/integer_length_l (Files): Remove longlong.m4.
38806         (configure.ac): Don't require AC_TYPE_UNSIGNED_LONG_LONG_INT.
38807         * modules/integer_length_ll (Files): Remove longlong.m4.
38808         (configure.ac): Don't require AC_TYPE_UNSIGNED_LONG_LONG_INT.
38810         count-one-bits: Assume that the compiler supports 'long long'.
38811         * lib/count-one-bits.h (count_one_bits_ll): Define unconditionally.
38812         * m4/count-one-bits.m4: Remove file.
38813         * modules/count-one-bits (Files): Remove it.
38814         (configure.ac): Don't invoke gl_COUNT_ONE_BITS.
38815         * tests/test-count-one-bits.c (main): Test count_one_bits_ll
38816         unconditionally.
38818         count-trailing-zeros: Assume that the compiler supports 'long long'.
38819         * lib/count-trailing-zeros.h (count_trailing_zeros_ll): Define
38820         unconditionally.
38821         * m4/count-trailing-zeros.m4: Remove file.
38822         * modules/count-trailing-zeros (Files): Remove it.
38823         (configure.ac): Don't invoke gl_COUNT_TRAILING_ZEROS.
38824         * tests/test-count-trailing-zeros.c (main): Test count_trailing_zeros_ll
38825         unconditionally.
38827         count-leading-zeros: Assume that the compiler supports 'long long'.
38828         * lib/count-leading-zeros.h (count_leading_zeros_ll): Define
38829         unconditionally.
38830         * m4/count-leading-zeros.m4: Remove file.
38831         * modules/count-leading-zeros (Files): Remove it.
38832         (configure.ac): Don't invoke gl_COUNT_LEADING_ZEROS.
38833         * tests/test-count-leading-zeros.c (main): Test count_leading_zeros_ll
38834         unconditionally.
38836 2019-12-22  Bruno Haible  <bruno@clisp.org>
38838         localcharset: Update support for OpenBSD.
38839         * lib/localcharset.c (alias_table): Map "US-ASCII" to "ASCII".
38841 2019-12-21  Bruno Haible  <bruno@clisp.org>
38843         pthread_sigmask: Avoid test failure on NetBSD 8.0.
38844         * tests/test-pthread_sigmask2.c (main): Skip the error handling test on
38845         NetBSD.
38846         * doc/posix-functions/pthread_sigmask.texi: Mention the NetBSD problem.
38848 2019-12-21  Bruno Haible  <bruno@clisp.org>
38850         threadlib: Improve code structure.
38851         * m4/threadlib.m4: Reorder macros. Add comments.
38853 2019-12-21  Bruno Haible  <bruno@clisp.org>
38855         threadlib: Fix LIBMULTITHREAD on FreeBSD with --enable-threads=isoc.
38856         * m4/threadlib.m4 (gl_STDTHREADLIB_BODY): New macro (some code moved
38857         here from m4/threads.m4).
38858         (gl_THREADLIB_BODY): Don't test whether mtx_lock and cnd_timedwait exist
38859         in libc. Instead, rely on gl_STDTHREADLIB_BODY.
38860         (gl_STDTHREADLIB): New macro.
38861         * m4/threads.m4 (gl_THREADS_H): Require gl_STDTHREADLIB instead of
38862         gl_THREADLIB_BODY and gl_YIELD. Don't set LIBSTDTHREAD here.
38864 2019-12-21  Bruno Haible  <bruno@clisp.org>
38866         sched_yield: Don't depend on threadlib and yield.
38867         * m4/threadlib.m4 (gl_PTHREADLIB): Document that it sets
38868         LIB_SCHED_YIELD.
38869         (gl_PTHREADLIB_BODY): Set LIB_SCHED_YIELD (code moved here from
38870         m4/yield.m4).
38871         * m4/sched_yield.m4 (gl_FUNC_SCHED_YIELD): Require gl_PTHREADLIB, not
38872         gl_THREADLIB and gl_YIELD.
38873         * m4/yield.m4 (gl_YIELD): Require gl_PTHREADLIB. Determine YIELD_LIB
38874         based on $(LIB_SCHED_YIELD).
38875         * m4/threads.m4 (gl_THREADS_H): Don't require gl_YIELD. Use
38876         $(LIB_SCHED_YIELD), not $(YIELD_LIB).
38877         * modules/sched_yield (Files): Remove yield.m4. Add threadlib.m4.
38878         (Depends-on): Remove threadlib.
38879         (Link): Mention $(LIB_SCHED_YIELD), not $(YIELD_LIB).
38880         * modules/threads-h (Files): Remove m4/yield.m4.
38881         * modules/pthread-cond-tests (Makefile.am): Link the programs against
38882         $(LIB_SCHED_YIELD), not $(YIELD_LIB).
38883         * modules/pthread-mutex-tests (Makefile.am): Likewise.
38884         * modules/pthread-once-tests (Makefile.am): Likewise.
38885         * modules/pthread-rwlock-tests (Makefile.am): Likewise.
38886         * modules/pthread-tss-tests (Makefile.am): Likewise.
38888 2019-12-21  Bruno Haible  <bruno@clisp.org>
38890         threads-h: Don't depend on threadlib.
38891         * modules/threads-h (configure.ac-early): Invoke gl_ANYTHREADLIB_EARLY,
38892         not gl_THREADLIB_EARLY.
38894 2019-12-21  Bruno Haible  <bruno@clisp.org>
38896         nl_langinfo tests: Fix link error (regression from 2019-12-18).
38897         * modules/nl_langinfo-tests (Makefile.am): Link also test-nl_langinfo
38898         with $(LIB_SETLOCALE).
38900 2019-12-21  Bruno Haible  <bruno@clisp.org>
38902         threadlib: Remove unused dependency (left over from 2019-07-06).
38903         * modules/threadlib (Depends-on): Remove havelib.
38905 2019-12-21  Bruno Haible  <bruno@clisp.org>
38907         New convention for multithread-safety tests.
38908         * tests/test-setlocale_null-mt-one.c: Renamed from
38909         tests/test-setlocale_null-one.c.
38910         * tests/test-setlocale_null-mt-all.c: Renamed from
38911         tests/test-setlocale_null-all.c.
38912         * modules/setlocale-null-tests (Files, Makefile.am): Update.
38914 2019-12-21  Bruno Haible  <bruno@clisp.org>
38916         quotearg tests: Fix conflict with hard-locale tests.
38917         * tests/testlocale: Renamed from tests/locale.
38918         * modules/quotearg-tests (Files): Update.
38919         * tests/test-quotearg.sh (LOCALEDIR): Likewise.
38921 2019-12-21  Bruno Haible  <bruno@clisp.org>
38923         pthread-thread, lock: On z/OS, use PTHREAD_RWLOCK_INITIALIZER_NP.
38924         Reported by Daniel Richard G. in
38925         <https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00001.html>
38926         <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00167.html>
38927         * lib/pthread.in.h (PTHREAD_RWLOCK_INITIALIZER): Define to
38928         PTHREAD_RWLOCK_INITIALIZER_NP when possible.
38929         * lib/glthread/lock.h: Allow PTHREAD_RWLOCK_INITIALIZER_NP as an
38930         alternative to PTHREAD_RWLOCK_INITIALIZER.
38931         * lib/glthread/lock.c: Likewise.
38933 2019-12-21  Bruno Haible  <bruno@clisp.org>
38935         memcmp tests: Work around the clang bug.
38936         * tests/test-memcmp.c (main): Use a volatile function pointer to disable
38937         the clang optimization.
38939 2019-12-20  Bruno Haible  <bruno@clisp.org>
38941         localcharset: Add support for z/OS encoding names.
38942         * lib/localcharset.h: Mention which encodings are used as locale
38943         encodings on z/OS.
38945 2019-12-20  Bruno Haible  <bruno@clisp.org>
38947         iconv_open: Add support for z/OS encoding names.
38948         Reported by Daniel Richard G. in
38949         <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00172.html>.
38950         * lib/iconv_open-zos.gperf: New file.
38951         * modules/iconv_open (Files): Add iconv_open-zos.gperf.
38952         (Makefile.am): Add rules for generating iconv_open-zos.h from it.
38953         * lib/iconv_open.c (ICONV_FLAVOR_ZOS): New macro.
38954         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): On z/OS, use ICONV_FLAVOR_ZOS.
38955         * doc/posix-functions/iconv_open.texi: Mention z/OS.
38957 2019-12-20  Bruno Haible  <bruno@clisp.org>
38959         doc: Document the problem of the per-thread locale functions on z/OS.
38960         * doc/posix-functions/uselocale.texi: Document the z/OS problem.
38961         * doc/posix-functions/newlocale.texi: Likewise.
38962         * doc/posix-functions/duplocale.texi: Likewise.
38963         * doc/posix-functions/freelocale.texi: Likewise.
38965 2019-12-20  Bruno Haible  <bruno@clisp.org>
38967         localename, gettext: Fix host_os value for z/OS.
38968         * m4/intl-thread-locale.m4 (gt_FUNC_USELOCALE): Fix host_os value in
38969         cross-configuration code.
38971 2019-12-19  Jim Meyering  <meyering@fb.com>
38973         nstrftime: avoid a shadowing warning
38974         * lib/nstrftime.c (libc_hidden_def): Rename inner "i" to "j",
38975         to avoid shadowing an "i" declared hundreds of lines above.
38977 2019-12-19  Paul Eggert  <eggert@cs.ucla.edu>
38979         dfa: struct dfamust now uses flexible array
38980         * lib/dfa.c: Include flexmember.h.
38981         (dfamust, dfamustfree): Adjust to struct dfamust change.
38982         This saves a call to malloc+free.
38983         * lib/dfa.h (struct dfamust): Make the final member a
38984         flexible array member.
38985         * modules/dfa (Depends-on): Add flexmember.
38987         dfa: fast->small for array elements
38988         * lib/dfa.c (charclass_word): Use uint_least64_t not uint_fast64_t,
38989         since this type is used in arrays.  This change is more for
38990         documentation than for any practical effect, since the two types
38991         are the same on all known platforms.
38993 2019-12-19  Bruno Haible  <bruno@clisp.org>
38995         iconv tests: Test canonicalized, not system-dependent, encoding names.
38996         * tests/test-iconv.c (main): Revert part of the 2016-08-17 patch.
38997         * modules/iconv-tests (Depends-on): Add iconv_open.
38999 2019-12-18  Bruno Haible  <bruno@clisp.org>
39001         localename: Fix test failure on AIX 7.2.
39002         * m4/intl-thread-locale.m4 (gt_INTL_THREAD_LOCALE_NAME): Enable nameless
39003         locales on AIX.
39004         * lib/localename.c (gl_locale_name_thread_unsafe): Handle nameless
39005         locales on AIX.
39007 2019-12-18  Paul Eggert  <eggert@cs.ucla.edu>
39009         Improve port of AC_C_RESTRICT to Oracle C++
39010         Problem reported by Christian Biesinger in:
39011         https://lists.gnu.org/r/bug-gnulib/2019-12/msg00159.html
39012         * m4/gnulib-common.m4 (AC_C_RESTRICT): Port better to
39013         Oracle Developer Studio C++ 12.5 or later.
39015 2019-12-18  Bruno Haible  <bruno@clisp.org>
39017         wchar: Fix test failures on AIX and MSVC (regression from 2019-12-07).
39018         * lib/wchar.in.h (GNULIB_defined_mbstate_t): Do define on AIX and MSVC.
39020 2019-12-18  Bruno Haible  <bruno@clisp.org>
39022         localename: Ensure multithread-safety in future changes.
39023         * lib/localename.c (setlocale): Reference the system's setlocale().
39024         (get_locale_t_name): Invoke setlocale_null instead of setlocale.
39025         (gl_locale_name_posix): Likewise.
39026         * modules/localename (Depends-on): Add setlocale-null.
39028 2019-12-18  Bruno Haible  <bruno@clisp.org>
39030         setlocale-null: Make API more useful.
39031         * lib/locale.in.h (setlocale_null_r): Renamed from setlocale_null. All
39032         callers changed.
39033         (setlocale_null): New declaration.
39034         * lib/setlocale_null.c (setlocale_null_androidfix): New function,
39035         extracted from setlocale_null_unlocked.
39036         (setlocale_null_unlocked): Invoke it.
39037         (setlocale_null_r): Renamed from setlocale_null.
39038         (setlocale_null): New function, extracted from setlocale_mtsafe in
39039         setlocale.c.
39040         * lib/setlocale.c: Don't include <errno.h>.
39041         (setlocale_mtsafe): Invoke setlocale_null.
39042         * lib/setlocale-lock.c: Update comments.
39043         * doc/posix-functions/setlocale.texi: Mention both functions.
39045 2019-12-18  Bruno Haible  <bruno@clisp.org>
39047         localename: Optimize code for native Windows.
39048         * lib/localename.c (gl_locale_name_posix): Remove handling of LC_ALL
39049         category (not allowed here).
39051 2019-12-18  Bruno Haible  <bruno@clisp.org>
39053         setlocale: Make calls with NULL argument multithread-safe.
39054         * lib/setlocale.c: Include <errno.h>.
39055         (setlocale_mtsafe): New function.
39056         (setlocale_unixlike): Invoke setlocale_mtsafe instead of setlocale.
39057         (setlocale_improved): Renamed from rpl_setlocale.
39058         * m4/setlocale.m4 (gl_FUNC_SETLOCALE): Require gl_FUNC_SETLOCALE_NULL.
39059         Set and define NEED_SETLOCALE_IMPROVED and NEED_SETLOCALE_MTSAFE. Set
39060         LIB_SETLOCALE.
39061         * modules/setlocale (Depends-on): Add setlocale-null. Update conditions.
39062         (Link): New section.
39063         * tests/locale.c: Undefine setlocale.
39064         * tests/test-setlocale_null-one.c: Likewise.
39065         * tests/test-setlocale_null-all.c: Likewise.
39066         * modules/setlocale-tests (Makefile.am): Link the test programs with
39067         $(LIB_SETLOCALE).
39068         * modules/astrxfrm-tests (Makefile.am): Likewise.
39069         * modules/btowc-tests (Makefile.am): Likewise.
39070         * modules/c-ctype-tests (Makefile.am): Likewise.
39071         * modules/c-snprintf-tests (Makefile.am): Likewise.
39072         * modules/c-strcase-tests (Makefile.am): Likewise.
39073         * modules/c-vasprintf-tests (Makefile.am): Likewise.
39074         * modules/c-vsnprintf-tests (Makefile.am): Likewise.
39075         * modules/c-xvasprintf-tests (Makefile.am): Likewise.
39076         * modules/dfa-tests (Makefile.am): Likewise.
39077         * modules/duplocale-tests (Makefile.am): Likewise.
39078         * modules/hard-locale-tests (Makefile.am): Likewise.
39079         * modules/localcharset-tests (Makefile.am): Likewise.
39080         * modules/localename-tests (Makefile.am): Likewise.
39081         * modules/mbmemcasecmp-tests (Makefile.am): Likewise.
39082         * modules/mbmemcasecoll-tests (Makefile.am): Likewise.
39083         * modules/mbrtowc-tests (Makefile.am): Likewise.
39084         * modules/mbscasecmp-tests (Makefile.am): Likewise.
39085         * modules/mbscasestr-tests (Makefile.am): Likewise.
39086         * modules/mbschr-tests (Makefile.am): Likewise.
39087         * modules/mbscspn-tests (Makefile.am): Likewise.
39088         * modules/mbsinit-tests (Makefile.am): Likewise.
39089         * modules/mbsncasecmp-tests (Makefile.am): Likewise.
39090         * modules/mbsnrtowcs-tests (Makefile.am): Likewise.
39091         * modules/mbspbrk-tests (Makefile.am): Likewise.
39092         * modules/mbspcasecmp-tests (Makefile.am): Likewise.
39093         * modules/mbsrchr-tests (Makefile.am): Likewise.
39094         * modules/mbsrtowcs-tests (Makefile.am): Likewise.
39095         * modules/mbsspn-tests (Makefile.am): Likewise.
39096         * modules/mbsstr-tests (Makefile.am): Likewise.
39097         * modules/nl_langinfo-tests (Makefile.am): Likewise.
39098         * modules/quotearg-tests (Makefile.am): Likewise.
39099         * modules/regex-tests (Makefile.am): Likewise.
39100         * modules/strfmon_l-tests (Makefile.am): Likewise.
39101         * modules/strtod-tests (Makefile.am): Likewise.
39102         * modules/strtold-tests (Makefile.am): Likewise.
39103         * modules/unicase/locale-language-tests (Makefile.am): Likewise.
39104         * modules/unicase/ulc-casecmp-tests (Makefile.am): Likewise.
39105         * modules/unicase/ulc-casecoll-tests (Makefile.am): Likewise.
39106         * modules/unigbrk/ulc-grapheme-breaks-tests (Makefile.am): Likewise.
39107         * modules/unistdio/u8-vasnprintf-tests (Makefile.am): Likewise.
39108         * modules/unistdio/u16-vasnprintf-tests (Makefile.am): Likewise.
39109         * modules/unistdio/u32-vasnprintf-tests (Makefile.am): Likewise.
39110         * modules/unistdio/ulc-vasnprintf-tests (Makefile.am): Likewise.
39111         * modules/uniwbrk/ulc-wordbreaks-tests (Makefile.am): Likewise.
39112         * modules/vasnprintf-posix-tests (Makefile.am): Likewise.
39113         * modules/wcrtomb-tests (Makefile.am): Likewise.
39114         * modules/wcsnrtombs-tests (Makefile.am): Likewise.
39115         * modules/wcsrtombs-tests (Makefile.am): Likewise.
39116         * modules/wcwidth-tests (Makefile.am): Likewise.
39117         * doc/posix-functions/setlocale.texi: Mention that the multithread-
39118         safety fix is also available in module 'setlocale'.
39120 2019-12-18  Bruno Haible  <bruno@clisp.org>
39122         hard-locale: Make multithread-safe.
39123         * lib/hard-locale.h (hard_locale): Move documentation to here.
39124         * lib/hard-locale.c: Don't include <stdlib.h>.
39125         (GLIBC_VERSION): Remove macro.
39126         (hard_locale): Assume that all systems name the "C" and "POSIX" locales
39127         "C" or "POSIX". Invoke setlocale_null instead of setlocale.
39128         * modules/hard-locale (Depends-on): Remove strdup. Add setlocale-null.
39129         (configure.ac): Require gl_FUNC_SETLOCALE_NULL. Set LIB_HARD_LOCALE.
39130         (Link): New section.
39131         * modules/hard-locale-tests (Makefile.am): Link test-hard-locale against
39132         $(LIB_HARD_LOCALE).
39134 2019-12-18  Bruno Haible  <bruno@clisp.org>
39136         hard-locale: Avoid test failure on Haiku.
39137         * tests/test-hard-locale.c (test_one): Treat Haiku like recent OpenBSD.
39139 2019-12-18  Bruno Haible  <bruno@clisp.org>
39141         setlocale-null: Handle NULL result from setlocale.
39142         * lib/locale.in.h (setlocale_null): Document EINVAL return value.
39143         * lib/setlocale_null.c (setlocale_null_unlocked): Handle NULL result
39144         from setlocale or _wsetlocale.
39146 2019-12-18  Bruno Haible  <bruno@clisp.org>
39148         hard-locale: Add test.
39149         * tests/test-hard-locale.c: New file.
39150         * tests/locale.c: New file.
39151         * modules/hard-locale-tests: New file.
39153 2019-12-17  Paul Eggert  <eggert@cs.ucla.edu>
39155         dfa: do not match invalid UTF-8
39156         * lib/dfa.c (struct dfa): Grow utf8_anychar_classes member array
39157         from 5 to 9 tokens; this is needed due to the changes to
39158         add_utf8_anychar.
39159         (charclass_index): 2nd arg is now pointer-to-const.
39160         (add_utf8_anychar): Match only valid UTF-8 byte sequences
39161         instead of allowing overlong encodings or surrogate halves.
39163         dfa: simplify charclass by assuming C99
39164         * lib/dfa.c (CHARCLASS_WORD_BITS): Now always 64.
39165         (charclass_word): Now always uint_fast64_t.
39166         (CHARCLASS_PAIR): Remove.
39167         (CHARCLASS_INIT): Take 4 arguments instead of 8.  All uses changed.
39169         fts: tune via calloc
39170         * lib/fts.c (fts_open): Prefer calloc to malloc + memset.
39172         dfa: tune via xzalloc
39173         * lib/dfa.c (dfaoptimize): Prefer xzalloc to xmalloc + memset.
39175 2019-12-17  Bruno Haible  <bruno@clisp.org>
39177         localcharset: Fix multithread-safety bug on Windows and OS/2.
39178         * lib/localcharset.h (locale_charset): Clarify when the result becomes
39179         invalid.
39180         * lib/localcharset.c (locale_charset): Use a stack-allocated buffer to
39181         assemble the result.
39183 2019-12-17  Bruno Haible  <bruno@clisp.org>
39185         localcharset: Optimize code for native Windows.
39186         * lib/localcharset.c (locale_charset): Don't bother calling
39187         setlocale (LC_ALL, NULL) since we're not interested in its result.
39189 2019-12-17  Bruno Haible  <bruno@clisp.org>
39191         nl_langinfo: Fix multithread-safety bug on OpenBSD 3.8.
39192         * lib/nl_langinfo.c (ctype_codeset): Invoke setlocale_null instead of
39193         setlocale.
39194         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Require
39195         gl_FUNC_SETLOCALE_NULL. Set LIB_NL_LANGINFO.
39196         * modules/nl_langinfo (Depends-on): Add setlocale-null.
39198 2019-12-17  Bruno Haible  <bruno@clisp.org>
39200         nl_langinfo: Fix multithread-safety bug on mingw and MSVC.
39201         * lib/nl_langinfo.c (ctype_codeset, rpl_nl_langinfo): Use a
39202         stack-allocated buffer to assemble each result and different static
39203         buffers to return it.
39204         * tests/test-nl_langinfo-mt.c: New file.
39205         * modules/nl_langinfo-tests (Files): Add it.
39206         (Depends-on): Add thread, nanosleep.
39207         (Makefile.am): Build test-nl_langinfo-mt test.
39209 2019-12-17  Bruno Haible  <bruno@clisp.org>
39211         langinfo: Document more details.
39212         * doc/posix-headers/langinfo.texi: List platform details.
39213         * doc/posix-functions/nl_langinfo.texi: Likewise.
39215 2019-12-17  Bruno Haible  <bruno@clisp.org>
39217         mbsinit: Fix compilation error in mingw-w64 7.0 with _UCRT defined.
39218         Reported by Tom Kacvinsky <tom.kacvinsky@vector.com>
39219         and Martin Storsjö <martin@martin.st>
39220         in <https://savannah.gnu.org/bugs/?57406>.
39221         * lib/mbsinit.c: Accommodate an MSVC-like mbstate_t definition with
39222         mingw.
39224 2019-12-17  Bruno Haible  <bruno@clisp.org>
39226         glob: Avoid warning on mingw.
39227         Reported by Christian Biesinger <cbiesinger@google.com> in
39228         <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00122.html>.
39229         * lib/glob.c (__stat64): Undefine first.
39231 2019-12-17  Paul Eggert  <eggert@cs.ucla.edu>
39233         xalloc: tune xzalloc for fresh allocations
39234         * lib/xmalloc.c (xzalloc): Use xcalloc rather than xmalloc+memset,
39235         because when the memory is freshly allocated from the OS via sbrk
39236         or mmap, calloc can avoid doing the memset.
39238         dfa: new function dfacopysyntax
39239         * lib/dfa.c (struct dfa): Move syntax member later so
39240         that dfacopysyntax can easily clear earlier members.
39241         (dfacopysyntax): New function, used by Gawk.
39243 2019-12-16  Paul Eggert  <eggert@cs.ucla.edu>
39245         dfa: port _GL_ATTRIBUTE_MALLOC to Gawk
39246         Gawk does not use Gnulib, and does not define _GL_ATTRIBUTE_MALLOC.
39247         * lib/dfa.h (_GL_ATTRIBUTE_MALLOC): Define to empty
39248         if not already defined.
39250         dfa: remove one dependency on MB_CUR_MAX
39251         * lib/dfa.c (dfamust): No need to refer to MB_CUR_MAX here.
39253         dfa: remove struct lexer_state.cur_mb_len
39254         * lib/dfa.c (struct lexer_state): Remove cur_mb_len member,
39255         as it’s not needed and the code is simpler without it.
39256         All uses removed.
39258 2019-12-16  Bruno Haible  <bruno@clisp.org>
39260         setlocale-null: Remove need for -lpthread on musl libc, *BSD, Haiku.
39261         Reported by Arnold Robbins <arnold@skeeve.com>.
39262         * lib/setlocale_null.c (c11_threads_in_use, pthread_in_use): New macros,
39263         copied from lib/glthread/lock.h.
39264         (pthread_mutex_lock, pthread_mutex_unlock): Mark as weak.
39265         (setlocale_null_with_lock): If pthread_in_use() is false, use
39266         setlocale_null_unlocked directly.
39267         * m4/threadlib.m4 (gl_WEAK_SYMBOLS): New macro, extracted from
39268         gl_THREADLIB_BODY. Define HAVE_WEAK_SYMBOLS.
39269         (gl_THREADLIB_BODY): Invoke gl_WEAK_SYMBOLS.
39270         * m4/setlocale_null.m4 (gl_FUNC_SETLOCALE_NULL): Invoke gl_WEAK_SYMBOLS.
39271         Set LIB_SETLOCALE_NULL to empty if weak symbols are supported.
39272         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Add comment.
39274 2019-12-16  Paul Eggert  <eggert@cs.ucla.edu>
39276         dfa: make dfasyntax thread-safe
39277         Problem reported by Bruno Haible in:
39278         https://lists.gnu.org/r/bug-gnulib/2019-12/msg00099.html
39279         * lib/dfa.c: Do not include locale.h.
39280         (struct dfa): Remove simple_locale member.
39281         All uses replaced by localeinfo.simple.
39282         (using_simple_locale): Remove; now present (with some
39283         changes) in localeinfo.c.
39284         (dfasyntax): No need to initialize removed member.
39286         localeinfo: record whether locale is simple
39287         * lib/localeinfo.c (using_simple_locale): New function,
39288         copied here from lib/dfa.c but with a change: it uses
39289         strcoll for its heuristic, instead of using setlocale.
39290         This lets it be thread-safe.
39291         * lib/localeinfo.h (struct localeinfo): New member ‘simple’.
39293 2019-12-15  Bruno Haible  <bruno@clisp.org>
39295         duplocale: Fix multithread-safety bug on AIX.
39296         * lib/duplocale.c: Don't include <stdlib.h>.
39297         (rpl_duplocale): Invoke setlocale_null instead of setlocale.
39298         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Require gl_FUNC_SETLOCALE_NULL.
39299         Set LIB_DUPLOCALE.
39300         * modules/duplocale (Depends-on): Add setlocale-null.
39301         (Link): New section.
39302         * modules/duplocale-tests (Makefile.am): Link test-duplocale with
39303         $(LIB_DUPLOCALE).
39305 2019-12-15  Bruno Haible  <bruno@clisp.org>
39307         setlocale-null: Add tests.
39308         * tests/test-setlocale_null.c: New file.
39309         * tests/test-setlocale_null-one.c: New file.
39310         * tests/test-setlocale_null-all.c: New file.
39311         * modules/setlocale-null-tests: New file.
39313         setlocale-null: New module.
39314         * lib/locale.in.h (SETLOCALE_NULL_MAX, SETLOCALE_NULL_ALL_MAX,
39315         setlocale_null): New declarations.
39316         * lib/setlocale_null.c: New file.
39317         * lib/setlocale-lock.c: New file.
39318         * m4/threadlib.m4 (gl_PTHREADLIB_BODY): Define C macro HAVE_PTHREAD_API.
39319         * m4/setlocale_null.m4: New file.
39320         * m4/locale_h.m4 (gl_LOCALE_H_DEFAULTS): Initialize
39321         GNULIB_SETLOCALE_NULL.
39322         * modules/locale (Makefile.am): Substitute GNULIB_SETLOCALE_NULL.
39323         * modules/setlocale-null: New file.
39324         * doc/posix-functions/setlocale.texi: Mention the new module.
39326 2019-12-15  Bruno Haible  <bruno@clisp.org>
39328         lock tests: Skip test when no multithreading is enabled.
39329         * tests/test-rwlock1.c: Skip the test when no multithreading is enabled.
39331 2019-12-14  Bruno Haible  <bruno@clisp.org>
39333         locale, duplocale, localename: Fix last patch.
39334         Reported by Daniel Richard G. in
39335         <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00093.html>.
39336         * lib/locale.in.h (HAVE_WORKING_NEWLOCALE, HAVE_WORKING_DUPLOCALE):
39337         Don't define if locale_t does not exist.
39339 2019-12-13  Bruno Haible  <bruno@clisp.org>
39341         locale, duplocale, localename: Fix errors if locale_t does not exist.
39342         Reported by Daniel Richard G. in
39343         <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00078.html>.
39344         * lib/locale.in.h (HAVE_WORKING_NEWLOCALE, HAVE_WORKING_DUPLOCALE): New
39345         macros.
39346         * tests/test-locale.c: Test HAVE_WORKING_NEWLOCALE instead of
39347         HAVE_NEWLOCALE.
39348         * tests/test-localename.c: Likewise.
39349         * tests/test-duplocale.c: Test HAVE_WORKING_DUPLOCALE instead of
39350         HAVE_DUPLOCALE.
39351         * tests/test-locale-c++.cc: Likewise.
39353 2019-12-13  Bruno Haible  <bruno@clisp.org>
39355         wcstok: Fix test failure on HP-UX.
39356         * m4/wcstok.m4 (gl_FUNC_WCSTOK): Set REPLACE_WCSTOK to 1 on HP-UX.
39357         * doc/posix-functions/wcstok.texi: Mention the HP-UX bug.
39359 2019-12-12  Bruno Haible  <bruno@clisp.org>
39361         strtod, strtold tests: Avoid test failure on AIX 7.2.
39362         * tests/test-strtod1.c (main): Allow implementations in which ',' and
39363         '.' both are radix characters.
39364         * tests/test-strtold1.c (main): Likewise.
39366 2019-12-12  Paul Eggert  <eggert@cs.ucla.edu>
39368         dfa: prefer ptrdiff_t for API, too
39369         Also, use ‘idx_t’ for ptrdiff_t values that must be nonnegative,
39370         but do this only for internal use for now.
39371         * NEWS: Mention the API change.
39372         * lib/dfa.c (idx_t, IDX_MAX): New type and max value, for internal
39373         use for now.  Use them instead of ptrdiff_t and PTRDIFF_MAX for
39374         values known to be nonnegative.
39375         (dfaparse, dfaexec_mb, dfaexec_sb, dfaexec_noop, dfaexec):
39376         Prefer idx_t or ptrdiff_t to size_t for API.
39377         * lib/dfa.h (dfaparse, dfacomp, dfaexec):
39378         Prefer ptrdiff_t to size_t for API.
39380         stdalign: port to xlclang 16.01
39381         Problem reportd by Bruno Haible in:
39382         https://lists.gnu.org/r/bug-gnulib/2019-12/msg00064.html
39383         * lib/stdalign.in.h (_Alignas): Do not use __attribute__
39384         ((__aligned__ (...))) with xlclang, as a top-level
39385         ‘char __attribute__ ((__aligned__ (8))) c;’ does not work with
39386         xlclang version 16.01.0000.0001; the alignment directive is ignored.
39388 2019-12-12  Bruno Haible  <bruno@clisp.org>
39390         duplocale: Fix test failure on AIX 7.2 with xlclang.
39391         * lib/duplocale.c: Include <stdlib.h>.
39392         (rpl_duplocale): Use a heap-allocated copy of the first setlocale return
39393         value.
39395 2019-12-12  Bruno Haible  <bruno@clisp.org>
39397         stddef: Document the AIX xlc issue.
39398         * doc/posix-headers/stddef.texi: Document the NULL issue with AIX xlc.
39400 2019-12-12  Bruno Haible  <bruno@clisp.org>
39402         duplocale: Don't attempt to override if locale_t does not exist.
39403         Reported by Daniel Richard G. in
39404         <https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00039.html>.
39405         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): If locale_t does not exist, set
39406         HAVE_DUPLOCALE to 0.
39408 2019-12-12  Bruno Haible  <bruno@clisp.org>
39410         wcwidth: Avoid test failure on AIX 7.2.
39411         * tests/test-wcwidth.c (main): Don't fail if wcwidth(0x200B) is
39412         negative.
39413         * doc/posix-functions/wcwidth.texi: Mention the AIX issue.
39415 2019-12-12  Bruno Haible  <bruno@clisp.org>
39417         ilogbl: Work around Cygwin bug.
39418         * m4/ilogbl.m4 (gl_FUNC_ILOGBL_WORKS): Test whether ilogbl(0.0L) is
39419         correct.
39420         * doc/posix-functions/ilogbl.texi: Mention the Cygwin bug.
39422 2019-12-12  Bruno Haible  <bruno@clisp.org>
39424         strtold: Work around Cygwin bug.
39425         * m4/strtold.m4 (gl_FUNC_STRTOLD): Add test for the underflow problem.
39426         If it is present, define STRTOLD_HAS_UNDERFLOW_BUG.
39427         * lib/strtod.c (HAVE_UNDERLYING_STRTOD): Set to 0 if
39428         STRTOLD_HAS_UNDERFLOW_BUG is defined.
39429         * doc/posix-functions/strtold.texi: Mention the Cygwin bug.
39431 2019-12-12  Bruno Haible  <bruno@clisp.org>
39433         strtold: Fix autoconf test.
39434         * m4/strtold.m4 (gl_FUNC_STRTOLD): Test strtold, not strtod.
39436 2019-12-11  Bruno Haible  <bruno@clisp.org>
39438         fsync tests: Skip test that is known to fail.
39439         * doc/posix-functions/fsync.texi: Update list of platforms.
39440         * tests/test-fsync.c (main): Skip test with read-only file descriptors
39441         that is known to fail on AIX and Cygwin.
39443 2019-12-11  Bruno Haible  <bruno@clisp.org>
39445         getaddrinfo: Fix calling convention in 32-bit mode on native Windows.
39446         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Test whether getaddrinfo has a
39447         non-POSIX signature. If so, set REPLACE_GETADDRINFO. Define
39448         HAVE_GETADDRINFO as a C macro.
39449         * lib/netdb.in.h (getaddrinfo, freeaddrinfo): If REPLACE_GETADDRINFO,
39450         declare as replacement functions.
39451         * lib/getaddrinfo.c (getaddrinfo, freeaddrinfo): If HAVE_GETADDRINFO,
39452         define as no-op overrides.
39453         * m4/netdb_h.m4 (gl_NETDB_H_DEFAULTS): Initialize REPLACE_GETADDRINFO.
39454         * modules/netdb (Makefile.am): Substitute REPLACE_GETADDRINFO.
39455         * modules/getaddrinfo (Depends-on, configure.ac): Test
39456         REPLACE_GETADDRINFO.
39457         * doc/posix-functions/getaddrinfo.texi: Mention calling convention
39458         problem.
39459         * doc/posix-functions/freeaddrinfo.texi: Mention header file and calling
39460         convention problems.
39462 2019-12-11  Paul Eggert  <eggert@cs.ucla.edu>
39464         dfa: prefer signed integers for internals
39465         Signed integers can be checked more easily for integer overflow.
39466         * lib/dfa.c (position, struct lexer_state, struct parser_state)
39467         (struct dfa, mbs_to_wchar, fetch_wc, parse_bracket_exp)
39468         (struct lexptr, lex, addtok_mb, add_utf8_anychar, atom)
39469         (nsubtoks, copytoks, closure, alloc_position_set, delete)
39470         (replace, state_index, epsclosure, charclass_context)
39471         (state_separate_contexts, merge_nfa_state, dfaoptimize)
39472         (dfaanalyze, build_state, dfaexec_main, dfa_supported)
39473         (maybe_disable_superset_dfa, dfassbuild, dfafree, enlist)
39474         (comsubs, inboth, allocmust):
39475         Prefer a signed to an unsigned integer when calculating indexes,
39476         unless the integer is part of the external API (a bigger deal,
39477         and to be done later).
39479         dfa: fix index overflow
39480         * lib/dfa.c (compare): Avoid integer overflow when analyzing
39481         very large regular expressions.
39483         dfa: update commentary for previous change
39484         * NEWS: Mention the change.
39485         * lib/dfa.c, lib/dfa.h (dfaparse, dfamust, dfacomp): Update comments.
39487 2019-12-11  Norihiro Tanaka  <noritnk@kcn.ne.jp>
39489         dfa: separate parse and compile phase
39490         ‘dfamust’ must be called after parsing and before tokens are
39491         reordered, but both are executed in the compilation phase.
39492         Token reordering was introduced in Gnulib commit
39493         2018-10-22T15:01:08Z!noritnk@kcn.ne.jp
39494         (5c7a0371823876cca7a1347fa09ca26bbbff0c98).
39495         * lib/dfa.c (dfaparse): Change it to global function.
39496         (dfacomp): If first argument is NULL, skip parse.
39497         * lib/dfa.h: (dfaparse): Add a prototype.
39499 2019-12-11  Bruno Haible  <bruno@clisp.org>
39501         unistd tests: Fix link error on MSVC.
39502         * modules/unistd-c++-tests (Makefile.am): Link test-unistd-c++ against
39503         $(LIB_GETLOGIN).
39505 2019-12-11  Bruno Haible  <bruno@clisp.org>
39507         doc: Document that ISO C or POSIX substitutes are supported in C++ mode.
39508         * doc/gnulib-intro.texi (Various Kinds of Modules): Document that ISO C
39509         and POSIX substitutes are supported in C++ mode.
39510         * NEWS: Likewise.
39512 2019-12-11  Bruno Haible  <bruno@clisp.org>
39514         stddef: Fix compilation error in C++ mode on MSVC.
39515         * lib/stddef.in.h (max_align_t): With MSVC in C++ mode, don't define it;
39516         instead, include <cstddef>.
39518 2019-12-11  Bruno Haible  <bruno@clisp.org>
39520         unistd: Fix compilation error in C++ mode on MSVC.
39521         * lib/unistd.in.h: Don't do include[_next] <unistd.h> if the platform
39522         does not have <unistd.h>.
39524 2019-12-11  Bruno Haible  <bruno@clisp.org>
39526         locale: Fix compilation error in C++ mode on MSVC.
39527         * m4/locale_h.m4 (gl_LOCALE_H): Don't set REPLACE_STRUCT_LCONV on MSVC.
39528         * lib/locale.in.h (int_p_cs_precedes, int_p_sign_posn,
39529         int_p_sep_by_space, int_n_cs_precedes, int_n_sign_posn,
39530         int_n_sep_by_space): Define as macros on MSVC.
39532 2019-12-11  Bruno Haible  <bruno@clisp.org>
39534         wchar: Fix compilation error in C++ mode on MSVC.
39535         * lib/wchar.in.h (mbstate_t): Don't override on MSVC.
39537 2019-12-11  Bruno Haible  <bruno@clisp.org>
39539         pthread-thread: Fix compilation error in C++ mode on MSVC.
39540         * lib/pthread.in.h (pthread_exit): Don't use _Noreturn in the
39541         _GL_CXXALIAS_RPL invocation.
39543 2019-12-08  Bruno Haible  <bruno@clisp.org>
39545         Fix compilation errors in C++ mode on Haiku.
39546         * lib/stdio.in.h (vdprintf): Disable _GL_CXXALIASWARN invocation on
39547         non-glibc systems.
39548         * lib/spawn.in.h (posix_spawnattr_getschedpolicy,
39549         posix_spawnattr_setschedpolicy, posix_spawnattr_getschedparam,
39550         posix_spawnattr_setschedparam): Likewise.
39551         * lib/stdlib.in.h (random, initstate_r, setstate_r): Use
39552         _GL_CXXALIAS_SYS_CAST instead of _GL_CXXALIAS_SYS.
39553         * lib/unistd.in.h (usleep): Likewise.
39555 2019-12-08  Bruno Haible  <bruno@clisp.org>
39557         Fix compilation errors in 32-bit C++ mode on HP-UX 11/ia64.
39558         * m4/largefile.m4 (gl_SET_LARGEFILE_SOURCE): New macro.
39559         * modules/fseeko (configure.ac-early): Require it instead of
39560         AC_FUNC_FSEEKO.
39561         * modules/ftello (configure.ac-early): Likewise.
39562         * modules/fflush (configure.ac-early): Likewise.
39564 2019-12-08  Bruno Haible  <bruno@clisp.org>
39566         Fix compilation error in C++ mode on HP-UX 11.
39567         * lib/unistd.in.h (getpagesize): Declare on HP-UX.
39568         * doc/glibc-functions/getpagesize.texi: Mention the HP-UX problem.
39570 2019-12-08  Bruno Haible  <bruno@clisp.org>
39572         Fix compilation errors on HP-UX 11/ia64.
39573         * lib/math.in.h (copysignf, fmaf, fma): Undefine before
39574         _GL_FUNCDECL_SYS.
39576 2019-12-08  Bruno Haible  <bruno@clisp.org>
39578         Fix compilation error in C++ mode on OpenBSD.
39579         * lib/signal.in.h (signal): Declare on OpenBSD.
39581 2019-12-08  Bruno Haible  <bruno@clisp.org>
39583         math tests: Don't fail if isfinite, isinf, isnan, signbit is a macro.
39584         * tests/test-math-c++.cc (isfinite, isinf, isnan, signbit): Use #warning
39585         instead of #error.
39587 2019-12-08  Bruno Haible  <bruno@clisp.org>
39589         Fix compilation errors in C++ mode on FreeBSD.
39590         * lib/pthread.in.h (pthread_exit): Remove _Noreturn from prototype.
39591         * tests/test-pthread-c++.cc (GNULIB_NAMESPACE::pthread_exit): Likewise.
39592         * lib/threads.in.h (thrd_exit): Likewise.
39593         * tests/test-threads-c++.cc (GNULIB_NAMESPACE::thrd_exit): Likewise.
39595 2019-12-08  Bruno Haible  <bruno@clisp.org>
39597         Fix compilation errors in C++ mode on macOS and FreeBSD.
39598         * lib/math.in.h (isfinite, isinf, isnan, signbit): In C++ mode on macOS
39599         or FreeBSD with clang, use the approach without C preprocessor macro.
39601 2019-12-07  Bruno Haible  <bruno@clisp.org>
39603         Fix compilation errors in C++ mode on AIX with xlclang++.
39604         Reported by Christian Biesinger <cbiesinger@google.com> in
39605         <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00009.html>.
39606         * lib/wchar.in.h (mbstate_t): Don't override on AIX.
39608 2019-12-07  Bruno Haible  <bruno@clisp.org>
39610         Document compilation error in C++ mode on NetBSD 8.0.
39611         * doc/posix-headers/monetary.texi: Mention the NetBSD bug.
39613 2019-12-07  Bruno Haible  <bruno@clisp.org>
39615         Fix compilation errors in C++ mode on Solaris 10.
39616         * m4/stdbool.m4 (AM_STDBOOL_H): Require AC_CANONICAL_HOST. Set STDBOOL_H
39617         to non-empty on Solaris with a non-GCC compiler.
39618         * doc/posix-headers/stdbool.texi: Mention the Solaris issue.
39620 2019-12-07  Bruno Haible  <bruno@clisp.org>
39622         Reword NEWS entry.
39623         * NEWS: Reword the latest NEWS entry.
39625 2019-12-05  Pino Toscano  <ptoscano@redhat.com>
39627         Move xstrtol_fatal to a new xstrtol-error module.
39628         * lib/xstrtol.h: Stop including <getopt.h>.
39629         (xstrtol_fatal): Move ...
39630         * lib/xstrtol-error.h: ... here.  New file.
39631         * lib/xstrtol-error.c: Include xstrtol-error.h instead of xstrtol.h.
39632         * tests/test-xstrtol.c: Likewise.
39633         * modules/xstrtol (Files): Remove lib/xstrtol-error.c.
39634         (Depends-on): Remove exitfail, error, getopt-gnu, and gettext-h.
39635         (Makefile.am): Remove xstrtol-error.c from lib_SOURCES.
39636         * modules/xstrtol-error: New file.
39637         * modules/xstrtol-tests (Depends-on): Add xstrtol-error.
39638         * MODULES.html.sh: Add xstrtol-error.
39639         * NEWS: Document the change.
39641 2019-12-06  Paul Eggert  <eggert@cs.ucla.edu>
39643         nstrftime: better width support for %N, %z
39644         * lib/nstrftime.c (width_add, width_add1, width_cpy):
39645         New macros, which generalize ‘add’, ‘add1’, ‘cpy’ by adding
39646         a new WIDTH parameter.
39647         (add, add1, cpy): Use these macros.
39648         (width_add): Do not treat digits == 0 as a special case,
39649         do not pad if padding is ‘-’, and do not use a negative width.
39650         (__strftime_internal): Redo formatting of nanoseconds and numeric
39651         timezones to avoid buffer misuse in unusual cases, and so that
39652         widths make more sense.  Add support for widths greater than 9 to
39653         the %N format; they are zero filled on the right.
39654         * tests/test-nstrftime.c (posixtm_test): Add a %12N test.
39656 2019-12-05  Bruno Haible  <bruno@clisp.org>
39658         Fix compilation errors in C++ mode on Solaris 10 and Solaris 11.
39659         * m4/isfinite.m4 (gl_ISFINITE): Require AC_CANONICAL_HOST. On Solaris,
39660         set REPLACE_ISFINITE to 1.
39661         * m4/isinf.m4 (gl_ISINF): Require AC_CANONICAL_HOST. On Solaris, set
39662         REPLACE_ISINF to 1.
39663         * m4/signbit.m4 (gl_SIGNBIT): On Solaris, set REPLACE_SIGNBIT to 1.
39664         * lib/pthread.in.h (pthread_create, pthread_once, pthread_key_create):
39665         Use _GL_CXXALIAS_SYS_CAST instead of _GL_CXXALIAS_SYS.
39666         * lib/threads.in.h (call_once): Likewise.
39667         * lib/iconv.in.h (iconv): Likewise.
39669 2019-12-05  Bruno Haible  <bruno@clisp.org>
39671         wchar: Add more C++ tests.
39672         Reported by Christian Biesinger <cbiesinger@google.com> in
39673         <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00009.html>.
39674         * tests/test-wchar-c++3.cc: New file.
39675         * modules/wchar-c++-tests (Files): Add it.
39676         (Makefile.am): Compile it.
39678 2019-12-05  Bruno Haible  <bruno@clisp.org>
39680         Add more C++ tests.
39682         assert-h: Add C++ tests.
39683         * tests/test-assert-h-c++.cc: New file.
39684         * tests/test-assert-h-c++2.cc: New file.
39685         * modules/assert-h-c++-tests: New file.
39686         * modules/assert-h-tests: New file.
39688         ctype: Add C++ tests.
39689         * tests/test-ctype-c++.cc: New file.
39690         * tests/test-ctype-c++2.cc: New file.
39691         * modules/ctype-c++-tests: New file.
39692         * modules/ctype-tests (Depends-on): Add ctype-c++-tests.
39694         errno: Add C++ tests.
39695         * tests/test-errno-c++.cc: New file.
39696         * tests/test-errno-c++2.cc: New file.
39697         * modules/errno-c++-tests: New file.
39698         * modules/errno-tests (Depends-on): Add errno-c++-tests.
39700         float: Add C++ tests.
39701         * tests/test-float-c++.cc: New file.
39702         * tests/test-float-c++2.cc: New file.
39703         * modules/float-c++-tests: New file.
39704         * modules/float-tests (Depends-on): Add float-c++-tests.
39706         inttypes: Add more C++ tests.
39707         * tests/test-inttypes-c++2.cc: New file.
39708         * modules/inttypes-c++-tests (Files): Add it.
39709         (Makefile.am): Compile it.
39711         limits-h: Add C++ tests.
39712         * tests/test-limits-h-c++.cc: New file.
39713         * tests/test-limits-h-c++2.cc: New file.
39714         * modules/limits-h-c++-tests: New file.
39715         * modules/limits-h-tests (Depends-on): Add limits-h-c++-tests.
39717         stdarg: Add C++ tests.
39718         * tests/test-stdarg-c++.cc: New file.
39719         * tests/test-stdarg-c++2.cc: New file.
39720         * modules/stdarg-c++-tests: New file.
39721         * modules/stdarg-tests: New file.
39723         stdbool: Add C++ tests.
39724         * tests/test-stdbool-c++.cc: New file.
39725         * tests/test-stdbool-c++2.cc: New file.
39726         * modules/stdbool-c++-tests: New file.
39727         * modules/stdbool-tests (Depends-on): Add stdbool-c++-tests.
39729         stddef: Add C++ tests.
39730         * tests/test-stddef-c++.cc: New file.
39731         * tests/test-stddef-c++2.cc: New file.
39732         * modules/stddef-c++-tests: New file.
39733         * modules/stddef-tests (Depends-on): Add stddef-c++-tests.
39735         stdint: Add C++ tests.
39736         * tests/test-stdint-c++.cc: New file.
39737         * tests/test-stdint-c++2.cc: New file.
39738         * modules/stdint-c++-tests: New file.
39739         * modules/stdint-tests (Depends-on): Add stdint-c++-tests.
39741         wchar: Add more C++ tests.
39742         * tests/test-wchar-c++2.cc: New file.
39743         * modules/wchar-c++-tests (Files): Add it.
39744         (Makefile.am): Compile it.
39746         wctype-h: Add more C++ tests.
39747         * tests/test-wctype-h-c++2.cc: New file.
39748         * modules/wctype-h-c++-tests (Files): Add it.
39749         (Makefile.am): Compile it.
39751 2019-12-04  Bruno Haible  <bruno@clisp.org>
39753         Fix compilation errors in C++ mode with xlclang++ on AIX.
39754         * lib/math.in.h (expm1l, fmal, remainderl, roundl): Don't redeclare in
39755         C++ mode on AIX.
39756         (isfinite, signbit): In C++ mode on AIX with clang, use the approach
39757         without C preprocessor macro.
39758         * lib/pthread.in.h (pthread_exit): Use _GL_CXXALIAS_SYS_CAST instead of
39759         _GL_CXXALIAS_SYS.
39760         * lib/threads.in.h (thrd_exit): Likewise.
39762 2019-12-04  Bruno Haible  <bruno@clisp.org>
39764         Fix compilation error in C++ mode on Solaris 11 OpenIndiana.
39765         * lib/wchar.in.h (wcsnrtombs): Force declaration in C++ mode on Solaris.
39766         * doc/posix-functions/wcsnrtombs.texi: Mention the issue.
39768 2019-12-04  Bruno Haible  <bruno@clisp.org>
39770         Disable more _GL_CXXALIASWARN on all platforms other than glibc systems.
39771         * lib/wchar.in.h (wcsnrtombs, wcwidth, wcswidth): Disable
39772         _GL_CXXALIASWARN invocation on non-glibc systems.
39773         * lib/wctype.in.h (iswalnum, iswalpha, iswcntrl, iswdigit, iswgraph,
39774         iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit, wctype,
39775         iswctype, towlower, towupper): Likewise.
39777 2019-12-03  Bruno Haible  <bruno@clisp.org>
39779         Avoid hassles caused by [[noreturn]] in C++.
39780         Reported by Christian Biesinger <cbiesinger@google.com> in
39781         <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00010.html>.
39782         * m4/gnulib-common.m4 (gl_COMMON_BODY): Disable the use of [[noreturn]].
39783         * lib/_Noreturn.h: Likewise.
39785 2019-12-02  Bruno Haible  <bruno@clisp.org>
39787         Fix mistakes in --enable-threads=isoc fixes from 2019-12-01.
39788         * m4/pthread-mutex.m4 (gl_PTHREAD_MUTEX): Use LIBPMULTITHREAD, not
39789         LIBMULTITHREAD.
39790         * m4/pthread-rwlock.m4 (gl_PTHREAD_RWLOCK): Likewise.
39791         * m4/pthread-thread.m4 (gl_PTHREAD_THREAD): Likewise.
39792         * m4/timer_time.m4 (gl_TIMER_TIME): Likewise. Require gl_PTHREADLIB, not
39793         gl_THREADLIB.
39794         * modules/timer-time (Depends-on): Add pthread-h. Remove threadlib.
39796 2019-12-02  Bruno Haible  <bruno@clisp.org>
39798         Fix some more link errors with --enable-threads=isoc.
39799         * modules/pthread-mutex (Depends-on): Test $gl_threads_api differently.
39800         * modules/pthread-rwlock (Depends-on): Likewise.
39802 2019-12-02  Bruno Haible  <bruno@clisp.org>
39804         Fix link errors with --enable-threads=posix on AIX.
39805         * modules/string-c++-tests (Makefile.am): Link the test-string-c++
39806         program with $(LIBTHREAD).
39807         * modules/wchar-c++-tests (Makefile.am): Link the test-wchar-c++
39808         program with $(LIBTHREAD).
39810 2019-12-02  Bruno Haible  <bruno@clisp.org>
39812         Fix link errors with --enable-threads=posix on AIX.
39813         * modules/mbrtowc (Link): New section.
39814         * modules/acl (Link): Likewise.
39815         * modules/argmatch (Link): Likewise.
39816         * modules/backup-rename (Link): Likewise.
39817         * modules/backupfile (Link): Likewise.
39818         * modules/closein (Link): Likewise.
39819         * modules/closeout (Link): Likewise.
39820         * modules/copy-file (Link): Likewise.
39821         * modules/csharpcomp (Link): Likewise.
39822         * modules/csharpexec (Link): Likewise.
39823         * modules/dfa (Link): Likewise.
39824         * modules/exclude (Link): Likewise.
39825         * modules/fnmatch (Link): Likewise.
39826         * modules/fnmatch-gnu (Link): Likewise.
39827         * modules/fnmatch-posix (Link): Likewise.
39828         * modules/glob (Link): Likewise.
39829         * modules/human (Link): Likewise.
39830         * modules/javacomp (Link): Likewise.
39831         * modules/javaexec (Link): Likewise.
39832         * modules/javaversion (Link): Likewise.
39833         * modules/mbfile (Link): Likewise.
39834         * modules/mbiter (Link): Likewise.
39835         * modules/mbmemcasecmp (Link): Likewise.
39836         * modules/mbmemcasecoll (Link): Likewise.
39837         * modules/mbrlen (Link): Likewise.
39838         * modules/mbscasecmp (Link): Likewise.
39839         * modules/mbscasestr (Link): Likewise.
39840         * modules/mbschr (Link): Likewise.
39841         * modules/mbscspn (Link): Likewise.
39842         * modules/mbsinit (Link): Likewise.
39843         * modules/mbslen (Link): Likewise.
39844         * modules/mbsncasecmp (Link): Likewise.
39845         * modules/mbsnlen (Link): Likewise.
39846         * modules/mbsnrtowcs (Link): Likewise.
39847         * modules/mbspbrk (Link): Likewise.
39848         * modules/mbspcasecmp (Link): Likewise.
39849         * modules/mbsrchr (Link): Likewise.
39850         * modules/mbsrtowcs (Link): Likewise.
39851         * modules/mbssep (Link): Likewise.
39852         * modules/mbsspn (Link): Likewise.
39853         * modules/mbsstr (Link): Likewise.
39854         * modules/mbstok_r (Link): Likewise.
39855         * modules/mbswidth (Link): Likewise.
39856         * modules/mbuiter (Link): Likewise.
39857         * modules/mkdir-p (Link): Likewise.
39858         * modules/propername (Link): Likewise.
39859         * modules/quote (Link): Likewise.
39860         * modules/quotearg (Link): Likewise.
39861         * modules/quotearg-simple (Link): Likewise.
39862         * modules/regex-quote (Link): Likewise.
39863         * modules/rpmatch (Link): Likewise.
39864         * modules/sh-quote (Link): Likewise.
39865         * modules/system-quote (Link): Likewise.
39866         * modules/trim (Link): Likewise.
39867         * modules/unistdio/ulc-asnprintf (Link): Likewise.
39868         * modules/unistdio/ulc-fprintf (Link): Likewise.
39869         * modules/unistdio/ulc-vasnprintf (Link): Likewise.
39870         * modules/unistdio/ulc-vasprintf (Link): Likewise.
39871         * modules/unistdio/ulc-vfprintf (Link): Likewise.
39872         * modules/unistdio/ulc-vsnprintf (Link): Likewise.
39873         * modules/unistdio/ulc-vsprintf (Link): Likewise.
39874         * modules/xfreopen (Link): Likewise.
39875         * modules/xmemcoll (Link): Likewise.
39876         * modules/yesno (Link): Likewise.
39877         * modules/acl-tests (Makefile.am): Link the programs with $(LIBTHREAD).
39878         * modules/argmatch-tests (Makefile.am): Likewise.
39879         * modules/closein-tests (Makefile.am): Likewise.
39880         * modules/copy-file-tests (Makefile.am): Likewise.
39881         * modules/dfa-tests (Makefile.am): Likewise.
39882         * modules/fnmatch-tests (Makefile.am): Likewise.
39883         * modules/glob-tests (Makefile.am): Likewise.
39884         * modules/mbmemcasecmp-tests (Makefile.am): Likewise.
39885         * modules/mbmemcasecoll-tests (Makefile.am): Likewise.
39886         * modules/mbrtowc-tests (Makefile.am): Likewise.
39887         * modules/mbscasecmp-tests (Makefile.am): Likewise.
39888         * modules/mbscasestr-tests (Makefile.am): Likewise.
39889         * modules/mbschr-tests (Makefile.am): Likewise.
39890         * modules/mbscspn-tests (Makefile.am): Likewise.
39891         * modules/mbsinit-tests (Makefile.am): Likewise.
39892         * modules/mbsncasecmp-tests (Makefile.am): Likewise.
39893         * modules/mbsnrtowcs-tests (Makefile.am): Likewise.
39894         * modules/mbspbrk-tests (Makefile.am): Likewise.
39895         * modules/mbspcasecmp-tests (Makefile.am): Likewise.
39896         * modules/mbsrchr-tests (Makefile.am): Likewise.
39897         * modules/mbsrtowcs-tests (Makefile.am): Likewise.
39898         * modules/mbsspn-tests (Makefile.am): Likewise.
39899         * modules/mbsstr-tests (Makefile.am): Likewise.
39900         * modules/quotearg-tests (Makefile.am): Likewise.
39901         * modules/quotearg-simple-tests (Makefile.am): Likewise.
39902         * modules/readtokens-tests (Makefile.am): Likewise.
39903         * modules/regex-quote-tests (Makefile.am): Likewise.
39904         * modules/sh-quote-tests (Makefile.am): Likewise.
39905         * modules/system-quote-tests (Makefile.am): Likewise.
39906         * modules/unistdio/ulc-asnprintf-tests (Makefile.am): Likewise.
39907         * modules/unistdio/ulc-vasnprintf-tests (Makefile.am): Likewise.
39908         * modules/unistdio/ulc-vasprintf-tests (Makefile.am): Likewise.
39909         * modules/unistdio/ulc-vsnprintf-tests (Makefile.am): Likewise.
39910         * modules/unistdio/ulc-vsprintf-tests (Makefile.am): Likewise.
39911         * modules/yesno-tests (Makefile.am): Likewise.
39913 2019-12-02  Bruno Haible  <bruno@clisp.org>
39915         Simplify link sections.
39916         * modules/threadlib (Link): Stop mentioning LTLIBTHREAD.
39917         * modules/lock (Link): Likewise.
39918         * modules/cond (Link): Likewise.
39919         * modules/tls (Link): Likewise.
39920         * modules/yield (Link): Likewise.
39921         * modules/regex (Link): Likewise.
39922         * modules/localename (Link): Likewise.
39923         * modules/unicase/locale-language (Link): Likewise.
39924         * modules/thread (Link): Stop mentioning LTLIBMULTITHREAD.
39926 2019-12-02  Bruno Haible  <bruno@clisp.org>
39928         thread tests: Avoid link error with --enable-threads=isoc+posix on AIX.
39929         * tests/test-thread_self.c (main): Disable test on AIX.
39931 2019-12-01  Bruno Haible  <bruno@clisp.org>
39933         pthread-h: Fix link errors with --enable-threads=isoc on AIX.
39934         * m4/threadlib.m4 (gl_ANYTHREADLIB_EARLY): New macro, extracted from
39935         gl_THREADLIB_EARLY_BODY.
39936         (gl_THREADLIB_EARLY_BODY): Invoke it.
39937         (gl_PTHREADLIB_BODY): New macro, extracted from gl_THREADLIB_BODY.
39938         (gl_THREADLIB_BODY): Invoke it.
39939         (gl_PTHREADLIB): New macro.
39940         * m4/pthread_h.m4 (gl_PTHREAD_H): Require gl_PTHREADLIB. Require
39941         gl_THREADLIB and test $gl_threads_api only if module 'threadlib' is
39942         present. Define LIB_PTHREAD using LIBPMULTITHREAD, not LIBMULTITHREAD.
39943         * modules/pthread-h (Files): Add threadlib.m4.
39944         (Depends-on): Remove threadlib.
39945         (configure.ac-early): Invoke gl_ANYTHREADLIB_EARLY. Don't set _REENTRANT
39946         and _THREAD_SAFE here.
39947         (Link): Use LIBPTHREAD, not LIBTHREAD.
39948         * modules/pthread-thread (Link): Use LIBPMULTITHREAD, not
39949         LIBMULTITHREAD.
39950         * modules/pthread-once (Link): Likewise.
39951         * modules/pthread-mutex (Link): Likewise.
39952         * modules/pthread-rwlock (Link): Likewise.
39953         * modules/pthread-cond (Link): Likewise.
39954         * modules/pthread-tss (Link): Likewise.
39955         * modules/pthread-spin (Link): Likewise.
39956         * modules/pthread (Link): Likewise.
39957         * modules/pthread-h-c++-tests (test_pthread_c___LDADD): Likewise.
39958         * modules/pthread-thread-tests (test_pthread_thread_LDADD): Likewise.
39959         * modules/pthread-once-tests (test_pthread_once1_LDADD,
39960         test_pthread_once2_LDADD): Likewise.
39961         * modules/pthread-mutex-tests (test_pthread_mutex_LDADD): Likewise.
39962         * modules/pthread-rwlock-tests (test_pthread_rwlock_LDADD): Likewise.
39963         * modules/pthread-cond-tests (test_pthread_cond_LDADD): Likewise.
39964         * modules/pthread-tss-tests (test_pthread_tss_LDADD): Likewise.
39966 2019-12-01  Bruno Haible  <bruno@clisp.org>
39968         cond: State linking requirements.
39969         * modules/cond (Link): New section.
39971 2019-12-01  Bruno Haible  <bruno@clisp.org>
39973         threadlib: Remove unnecessary file (left over from 2019-07-06).
39974         * modules/threadlib (Files): Remove config.rpath.
39976 2019-11-29  Tim Rühsen  <tim.ruehsen@gmx.de>
39978         gnulib-tool.py: Fix libgnu_la_LDFLAGS section in generated Makefile.am.
39979         Reported by Dagobert Michelsen <dam@opencsw.org> in
39980         <https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00086.html>.
39981         * pygnulib/GLModuleSystem.py (getLink): Don't join the parts. Return a
39982         list of strings instead of one string.
39983         * pygnulib/GLEmiter.py (lib_Makefile_am): Adapt accordingly.
39984         * pygnulib/GLImport.py (execute): Likewise.
39986 2019-11-27  Bruno Haible  <bruno@clisp.org>
39988         openpty, forkpty: Fix build error on Solaris 11.4.
39989         * m4/pty_h.m4 (gl_PTY_H): Test for termios.h. Look for the declarations
39990         also in <termios.h>.
39991         * m4/pty.m4 (gl_FUNC_FORKPTY, gl_FUNC_OPENPTY): Look for the declaration
39992         of the function also in <termios.h>.
39993         * doc/glibc-functions/openpty.texi: Mention the Solaris 11.4 problems.
39994         * doc/glibc-functions/forkpty.texi: Likewise.
39996 2019-11-27  Bruno Haible  <bruno@clisp.org>
39998         New options --enable-threads=isoc and --enable-threads=isoc+posix.
39999         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Accept the options
40000         --enable-threads=isoc and --enable-threads=isoc+posix.
40001         (gl_THREADLIB_BODY): Test whether the ISO C threads API is available.
40002         When both the ISO C and the POSIX threads API are available, choose
40003         USE_ISOC_AND_POSIX_THREADS instead of USE_POSIX_THREADS if
40004         --enable-threads=isoc+posix was specified. When only the ISO C threads
40005         API is available and --enable-threads=iso was specified, choose
40006         USE_ISOC_THREADS.
40007         * lib/glthread/lock.h: Add new code for USE_ISOC_THREADS ||
40008         USE_ISOC_AND_POSIX_THREADS.
40009         * lib/glthread/lock.c: Likewise.
40010         * lib/glthread/cond.h: Likewise.
40011         * lib/glthread/cond.c: Likewise.
40012         * lib/glthread/tls.h: Likewise.
40013         * lib/glthread/tls.c: Likewise.
40014         * lib/glthread/yield.h: Likewise.
40015         * lib/glthread/thread.h: Add new code for USE_ISOC_THREADS. Treat
40016         USE_ISOC_AND_POSIX_THREADS like USE_POSIX_THREADS.
40017         * lib/glthread/thread.c: Likewise.
40018         * lib/glthread/threadlib.c: Likewise.
40019         * tests/test-lock.c: Save and restore the values of USE_ISOC_THREADS and
40020         USE_ISOC_AND_POSIX_THREADS.
40021         * tests/test-cond.c: Consider USE_ISOC_THREADS and
40022         USE_ISOC_AND_POSIX_THREADS.
40023         * tests/test-tls.c: Likewise.
40024         * tests/test-thread_create.c (main): Likewise.
40025         * tests/test-pthread-cond.c: Likewise.
40026         * tests/test-pthread-mutex.c: Likewise.
40027         * tests/test-pthread-once2.c: Likewise.
40028         * tests/test-pthread-rwlock.c: Likewise.
40029         * tests/test-pthread-tss.c: Likewise.
40030         * tests/test-pthread_sigmask2.c: Treat USE_ISOC_AND_POSIX_THREADS like
40031         USE_POSIX_THREADS.
40033 2019-11-24  Bruno Haible  <bruno@clisp.org>
40035         mbrtowc: Modernize autoconf test.
40036         * m4/mbrtowc.m4 (gl_MBRTOWC_INCOMPLETE_STATE): Require
40037         gt_LOCALE_FR_UTF8. If a traditional Japanese locale is not available,
40038         try a UTF-8 locale.
40039         * doc/posix-functions/mbrtowc.texi: Update info about AIX.
40041 2019-11-24  Bruno Haible  <bruno@clisp.org>
40043         Fix errors in C++ mode on mingw.
40044         * lib/arpa_inet.in.h (inet_ntop, inet_pton): Use _GL_CXXALIAS_SYS_CAST
40045         instead of _GL_CXXALIAS_SYS.
40046         * lib/signal.in.h (pthread_sigmask): Likewise.
40047         * lib/spawn.in.h (posix_spawn_file_actions_addopen,
40048         posix_spawn_file_actions_addclose, posix_spawn_file_actions_adddup2):
40049         Likewise.
40050         * lib/wchar.in.h (btowc): Likewise.
40052 2019-11-24  Bruno Haible  <bruno@clisp.org>
40054         sys_time: Fix errors in C++ mode on mingw.
40055         * lib/sys_time.in.h (timeval): Restore the redirection
40056         '#define timeval rpl_timeval', for when the symbol timeval is being used
40057         outside the 'gnulib' namespace.
40058         * lib/sys_select.in.h (select): In C++, write 'timeval', not
40059         'struct timeval'.
40061 2019-11-24  Bruno Haible  <bruno@clisp.org>
40063         iswctype: Fix errors in C++ mode on mingw.
40064         * lib/wctype.in.h (rpl_iswctype): Override if GNULIB_OVERRIDES_WINT_T
40065         is 1.
40066         * lib/iswctype.c (iswctype): Add another implementation, for the
40067         GNULIB_defined_wint_t case.
40068         * modules/iswctype (configure.ac): Compile iswctype.c also if
40069         GNULIB_OVERRIDES_WINT_T is 1.
40071 2019-11-24  Bruno Haible  <bruno@clisp.org>
40073         windows-timedmutex: Fix errors in C++ mode on mingw.
40074         * lib/windows-timedmutex.h: Add closing brace.
40076 2019-11-24  Bruno Haible  <bruno@clisp.org>
40078         Fix errors in C++ mode on Cygwin.
40079         * lib/sys_wait.in.h (waitpid): Use _GL_CXXALIAS_SYS_CAST instead of
40080         _GL_CXXALIAS_SYS.
40082 2019-11-24  Bruno Haible  <bruno@clisp.org>
40084         time_r: Fix for mingw (regression from 2019-11-16).
40085         * m4/time_r.m4 (gl_TIME_R): Revert to using AC_CHECK_FUNCS_ONCE. Use the
40086         AC_LINK_IFELSE test only if the function does not appear to exist.
40088 2019-11-24  Bruno Haible  <bruno@clisp.org>
40090         wcstok: Add tests.
40091         * tests/test-wcstok.c: New file.
40092         * modules/wcstok-tests: New file.
40094 2019-11-24  Bruno Haible  <bruno@clisp.org>
40096         wcstok: Work around wrong signature on native Windows.
40097         * lib/wchar.in.h (wcstok): Override when REPLACE_WCSTOK is 1.
40098         * m4/wcstok.m4 (gl_FUNC_WCSTOK): Check for signature of wcstok. Set
40099         REPLACE_WCSTOK.
40100         * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WCSTOK.
40101         * modules/wchar (Makefile.am): Substitute REPLACE_WCSTOK.
40102         * modules/wcstok (Depends-on, configure.ac): Consider REPLACE_WCSTOK.
40103         * doc/posix-functions/wcstok.texi: Mention the problem.
40105 2019-11-22  Paul Eggert  <eggert@cs.ucla.edu>
40107         intprops: INT_MULTIPLY_WRAPV speedup for GCC 8.4+
40108         * lib/intprops.h (INT_MULTIPLY_WRAPV): If GCC 8.x where 4 <= x,
40109         remove workaround for GCC bug 91450 as the bug should be fixed
40110         there too.
40112 2019-11-21  Bruno Haible  <bruno@clisp.org>
40114         Disable many _GL_CXXALIASWARN on all platforms other than glibc systems.
40115         Reported by Christian Biesinger <cbiesinger@google.com> in
40116         <https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00066.html>.
40117         * lib/fnmatch.in.h (fnmatch): Disable _GL_CXXALIASWARN invocation on
40118         non-glibc systems.
40119         * lib/locale.in.h (localeconv, setlocale): Likewise.
40120         * lib/math.in.h (cbrt, ceil, copysign, exp2, expm1, floor, fma, fmod,
40121         frexp, hypot, ilogb, log, log10, log1p, log2, logb, modf, remainder,
40122         rint, round, trunc): Likewise.
40123         * lib/monetary.in.h (strfmon_l): Likewise.
40124         * lib/pthread.in.h (pthread_mutexattr_getrobust,
40125         pthread_mutexattr_setrobust, pthread_mutex_lock, pthread_spin_init,
40126         pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock,
40127         pthread_spin_destroy): Likewise.
40128         * lib/signal.in.h (raise, signal): Likewise.
40129         * lib/stdio.in.h (fclose, fflush, fgetc, fgets, fopen, fprintf, fputc,
40130         fputs, fread, freopen, fscanf, fseek, ftell, fwrite, getc, getchar,
40131         perror, printf, putc, putchar, puts, remove, rename, scanf, sprintf,
40132         tmpfile, vfprintf, vprintf, vsprintf): Likewise.
40133         * lib/stdlib.in.h (calloc, malloc, mbtowc, realloc, strtod, wctomb):
40134         Likewise.
40135         * lib/string.in.h (memchr, strncat, strpbrk, strstr, strerror):
40136         Likewise.
40137         * lib/time.in.h (mktime, localtime, ctime, strftime): Likewise.
40138         * lib/wchar.in.h (btowc, wctob, mbsinit, mbrtowc, mbrlen, mbsrtowcs,
40139         wcrtomb, wcsrtombs, wmemchr, wmemcmp, wmemcpy, wmemmove, wmemset,
40140         wcslen, wcscpy, wcsncpy, wcscat, wcsncat, wcscmp, wcsncmp, wcscoll,
40141         wcsxfrm, wcschr, wcsrchr, wcscspn, wcsspn, wcspbrk, wcsstr, wcstok,
40142         wcsftime): Likewise.
40143         * lib/wctype.in.h (iswblank, wctrans, towctrans): Likewise.
40145 2019-11-21  Bruno Haible  <bruno@clisp.org>
40147         Fix various errors in _GL_CXXALIAS_SYS invocations.
40148         * lib/locale.in.h (freelocale): Use _GL_CXXALIAS_SYS_CAST instead of
40149         _GL_CXXALIAS_SYS.
40150         * lib/pthread.in.h (pthread_mutexattr_gettype,
40151         pthread_mutexattr_getrobust): Likewise.
40152         * lib/stdlib.in.h (srandom, initstate, setstate): Likewise.
40153         * lib/sys_socket.in.h (recv, send): Likewise.
40154         * lib/unistd.in.h (getdtablesize): Likewise.
40155         * lib/sys_select.in.h (select): In C++, write 'timeval' instead of
40156         'struct timeval'.
40158 2019-11-21  Bruno Haible  <bruno@clisp.org>
40160         math tests: Update after 2019-08-28 change.
40161         * tests/test-math-c++.cc (isfinite, isinf, isnan, signbit): Expect a
40162         return type of 'bool', not 'int'.
40164 2019-11-21  Bruno Haible  <bruno@clisp.org>
40166         pthread-spin: Fix errors in C++ mode.
40167         * m4/pthread-spin.m4 (gl_PTHREAD_SPIN): Mark the pthread_spin_*
40168         functions as nonexistent when <pthread.h> exists but does not define
40169         the pthread_spinlock_t type.
40171 2019-11-21  Bruno Haible  <bruno@clisp.org>
40173         pthread-mutex: Fix errors in C++ mode.
40174         * m4/pthread-mutex.m4 (gl_PTHREAD_MUTEX): Test whether
40175         pthread_mutexattr_getrobust exists. If not, define
40176         PTHREAD_MUTEXATTR_ROBUST_UNIMPLEMENTED.
40177         * lib/pthread-mutex.c (pthread_mutexattr_getrobust,
40178         pthread_mutexattr_setrobust): Define also if <pthread.h> exists but
40179         PTHREAD_MUTEXATTR_ROBUST_UNIMPLEMENTED.
40180         * modules/pthread-mutex (configure.ac): Compile pthread-mutex.c also
40181         when <pthread.h> exists but pthread_mutexattr_getrobust needs a gnulib
40182         definition.
40184 2019-11-19  Bruno Haible  <bruno@clisp.org>
40186         threads-h tests: Fix typo.
40187         * tests/test-threads-c++.cc: Fix references to undefined type 'mtx'.
40189 2019-11-19  Bruno Haible  <bruno@clisp.org>
40191         pthread-thread: Fix prototype of pthread_attr_getdetachstate.
40192         * lib/pthread.in.h (pthread_attr_getdetachstate): Change first parameter
40193         to 'const pthread_attr_t *'.
40194         * lib/pthread-thread.c (pthread_attr_getdetachstate): Likewise.
40195         * tests/test-pthread-c++.cc (pthread_attr_getdetachstate): Likewise.
40197 2019-11-19  Paul Eggert  <eggert@cs.ucla.edu>
40199         intprops: speed up INT_MULTIPLY_WRAPV in GCC 9.3
40200         * lib/intprops.h (INT_MULTIPLY_WRAPV): If GCC 9.3 or later, do not
40201         work around GCC bug 91450 as the bug should be fixed there.
40203 2019-11-18  Paul Eggert  <eggert@cs.ucla.edu>
40205         glob: get closer to glibc glob.c
40206         Omit differences from glibc when the differences don’t matter.
40207         * lib/glob.c [_LIBC]: Include shlib-compat.h.
40208         (__glob) [!_LIBC]: New macro.  All uses of glob changed to __glob.
40209         (glob_lstat): New function.
40210         (glob_in_dir): Use it.
40211         (GLOB_ATTRIBUTE): Define to empty if not already defined.
40212         Use changed.
40214 2019-11-18  Bruno Haible  <bruno@clisp.org>
40216         stdint: Define [u]intptr_t correctly on 64-bit native Windows.
40217         * lib/stdint.in.h (gl_intptr_t, gl_uintptr_t, INTPTR_MIN, INTPTR_MAX,
40218         UINTPTR_MAX): Consider _WIN64.
40219         * tests/test-stdint.c: Verify that [u]intptr_t is large enough to hold
40220         a pointer.
40222 2019-11-18  Bruno Haible  <bruno@clisp.org>
40224         stdint: Fix value of WINT_MAX when we override wint_t.
40225         * lib/stdint.in.h (WINT_MIN, WINT_MAX): Don't override a second time
40226         when GNULIB_OVERRIDES_WINT_T is 1.
40228 2019-11-18  Bruno Haible  <bruno@clisp.org>
40230         vcs-to-changelog: New module.
40231         * modules/vcs-to-changelog: New file.
40232         * MODULES.html.sh (func_all_modules): Add it.
40234 2019-11-01  Siddhesh Poyarekar  <siddhesh@gotplt.org>
40236         vcs-to-changelog: New script to generate ChangeLog-like output.
40237         Discussion:
40238         <https://lists.gnu.org/archive/html/bug-gnulib/2019-10/msg00062.html>
40239         * build-aux/vcs_to_changelog.py: New file.
40240         * build-aux/vcstocl/frontend_c.py: New file.
40241         * build-aux/vcstocl/misc_util.py: New file.
40242         * build-aux/vcstocl/vcs_git.py: New file.
40244 2019-11-18  Bruno Haible  <bruno@clisp.org>
40246         stdint: Avoid triggering a "conflicting types" error on mingw 5.22.
40247         Reported by Keith Marshall <keith@users.osdn.me> in
40248         <https://lists.gnu.org/archive/html/bug-gnulib/2019-10/msg00044.html>
40249         and <https://osdn.net/projects/mingw/ticket/39677>.
40250         * lib/stdint.in.h (intptr_t, uintptr_t): Don't define if the types have
40251         already been defined by mingw's <crtdefs.h>.
40253 2019-11-18  Bruno Haible  <bruno@clisp.org>
40255         gnulib-tool: Fix build error on macOS with --conditional-dependencies.
40256         * gnulib-tool (func_modules_add_dummy): Ignore modules that are
40257         conditionally enabled.
40259 2019-11-18  Bruno Haible  <bruno@clisp.org>
40261         gc: Mirror libgcrypt.m4 from libgcrypt.
40262         * config/srclistvars.sh (LIBGCRYPT): New variable.
40263         * config/srclist.txt: Use it to fetch m4/libgcrypt.m4.
40265 2019-11-17  Bruno Haible  <bruno@clisp.org>
40267         locale, localename: Improve z/OS support.
40268         Reported by Daniel Richard G. in
40269         <https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00001.html>.
40270         * m4/locale_h.m4 (gl_LOCALE_T): New macro, partially extracted from
40271         gl_LOCALE_H.
40272         (gl_LOCALE_H): Require it.
40273         * m4/localename.m4 (gl_LOCALENAME): Likewise. If locale_t is not
40274         defined, don't even check for newlocale, duplocale, freelocale.
40275         * m4/intl-thread-locale.m4 (gt_FUNC_USELOCALE): Make the test fail when
40276         locale_t is not defined.
40278 2019-11-17  Bruno Haible  <bruno@clisp.org>
40280         havelib: Make libdirstems processing more flexible.
40281         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Set 3 libdirstem
40282         variables: Consider 'lib' always, also on Solaris. Look for lib32 in
40283         addition to lib64. Don't invoke /usr/bin/gcc (reverting the second
40284         patch from 2017-02-19).
40285         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Consider up to 3 additional
40286         libdirs, even when the first one exists as a directory.
40288 2019-11-17  Bruno Haible  <bruno@clisp.org>
40290         havelib: Match the bitness when searching for libraries.
40291         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Define a function
40292         acl_is_expected_elfclass.
40293         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): When testing whether a library
40294         file exists, in ELF, also test whether it has the ELF class that
40295         corresponds to the host's bitness.
40297 2019-11-17  Bruno Haible  <bruno@clisp.org>
40299         host-cpu-c-abi: Add support for unknown CPUs.
40300         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI_32BIT): Set
40301         gl_cv_host_cpu_c_abi_32bit to 'unknown' if we don't know whether it's
40302         32-bit or 64-bit.
40304 2019-11-17  Bruno Haible  <bruno@clisp.org>
40306         havelib: Remove redundant code.
40307         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Remove Solaris specific
40308         test for 64-bit host. Use gl_HOST_CPU_C_ABI_32BIT result instead.
40310 2019-11-17  Bruno Haible  <bruno@clisp.org>
40312         havelib: Fix a bug in dependency processing.
40313         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): During dependency processing
40314         of .la files, don't overwrite the value of additional_libdir for the
40315         next rounds.
40317 2019-11-16  Bruno Haible  <bruno@clisp.org>
40319         wctype-h: When overriding wint_t, override also the related functions.
40320         Reported by Christian Biesinger <cbiesinger@google.com> in
40321         <https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00027.html>.
40322         * m4/wctype_h.m4 (gl_WCTYPE_H): When GNULIB_OVERRIDES_WINT_T is 1, set
40323         REPLACE_ISWCNTRL to 1.
40324         * lib/wctype.in.h (rpl_iswalnum, rpl_iswalpha, rpl_iswblank,
40325         rpl_iswcntrl, rpl_iswdigit, rpl_iswgraph, rpl_iswlower, rpl_iswprint,
40326         rpl_iswpunct, rpl_iswspace, rpl_iswupper, rpl_iswxdigit, rpl_towlower,
40327         rpl_towupper): New definitions when GNULIB_OVERRIDES_WINT_T is 1.
40328         * doc/posix-headers/wchar.texi: Mention that wint_t is also overridden
40329         on mingw.
40330         * doc/posix-headers/wctype.texi: Likewise.
40332 2019-11-16  Bruno Haible  <bruno@clisp.org>
40334         time_r: Fix for mingw.
40335         Reported by Christian Biesinger <cbiesinger@google.com> in
40336         <https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00014.html>.
40337         * lib/time.in.h: On mingw, include <unistd.h>.
40338         * m4/time_r.m4 (gl_TIME_R): On mingw, include <unistd.h> before
40339         <time.h>. Test for localtime_r in a way that works when it is defined
40340         as an inline function.
40342 2019-11-13  Bruno Haible  <bruno@clisp.org>
40344         havelib: Revert last change.
40345         * build-aux/config.rpath: Revert last change. We can add msys2 support
40346         when it has been added to libtool.m4 upstream.
40348 2019-11-09  Paul Eggert  <eggert@cs.ucla.edu>
40350         config: add msys support
40351         Requested by Arnold Robbins in:
40352         https://lists.gnu.org/r/bug-gnulib/2019-11/msg00008.html
40353         He also requested a change to config.guess, which I’ll forward
40354         upstream.
40355         * build-aux/ar-lib (func_file_conv):
40356         * build-aux/compile (func_file_conv):
40357         * build-aux/config.rpath (wl, with_gnu_ld)
40358         (hardcode_libdir_flag_spec, libext, shrext, library_names_spec):
40359         Treat msys like cygwin.
40361 2019-11-06  Paul Eggert  <eggert@cs.ucla.edu>
40363         regex: now back in sync with glibc
40364         * config/srclist.txt: regcomp.c, regex_internal.c, regex_internal.h,
40365         regexec.c got merged into glibc and are now copies again.
40367 2019-10-27  Bruno Haible  <bruno@clisp.org>
40369         host-cpu-c-abi: Recognize i386 and a couple of other CPUs as 32-bit.
40370         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Include i386 in the case
40371         statement.
40372         (gl_HOST_CPU_C_ABI_32BIT): Likewise. Also recognize a couple of other
40373         32-bit CPUs.
40375 2019-10-24  Paul Eggert  <eggert@cs.ucla.edu>
40377         timespec-add, timespec-sub: simplify
40378         * lib/timespec-add.c (timespec_add):
40379         * lib/timespec-sub.c (timespec_sub):
40380         Simplify, now that INT_ADD_WRAPV and INT_SUBTRACT_WRAPV
40381         work on unsigned integers.
40383 2019-10-23  Paul Eggert  <eggert@cs.ucla.edu>
40385         nstrftime: speed up integer overflow checking
40386         * lib/nstrftime.c: Include intprops.h.
40387         (INT_STRLEN_BOUND): Remove, as we can use intprops.h’s defn.
40388         (__strftime_internal): Use INT_MULTIPLY_WRAPV and INT_ADD_WRAPV
40389         instead of doing it by hand.
40390         * modules/nstrftime (Depends-on): Add intprops.
40392         Port better to GCC under macOS
40393         Work around macOS header that has ‘#define __has_builtin(x) 0’
40394         when compiled by GCC.  Apple really, really doesn’t want you to
40395         use GCC, apparently.  Rroblem reported by Akim Demaille in:
40396         https://lists.gnu.org/r/bug-bison/2019-10/msg00071.html
40397         The fix is to not trust __has_builtin when being compiled by
40398         recent-enough GCC.
40399         * lib/intprops.h (__has_builtin)
40400         (_GL_HAS___builtin_add_overflow, _GL_TEMPDEF___has_builtin):
40401         * lib/verify.h (__has_builtin, _GL_HAS___builtin_unreachable)
40402         (_GL_HAS___builtin_trap, _GL_TEMPDEF___has_builtin):
40403         Remove.  All uses removed.
40404         * lib/intprops.h (_GL_HAS_BUILTIN_ADD_OVERFLOW): Use __has_builtin
40405         directly, if defined and if not newer GCC.
40406         * lib/verify.h (_GL_HAS_BUILTIN_TRAP, _GL_HAS_BUILTIN_UNREACHABLE):
40407         New macro, that use __has_builtin directly, if defined and if
40408         not newer GCC.
40409         (assume): Use them.
40411 2019-10-22  Akim Demaille  <akim@lrde.epita.fr>
40413         maintainer-makefile: update rule for argmatch.
40414         * top/maint.mk (sc_prohibit_argmatch_without_use): Add ARGMATCH_DEFINE_GROUP.
40416 2019-10-21  Akim Demaille  <akim@lrde.epita.fr>
40418         bitset: let freeing functions accept NULL.
40419         * lib/bitset.c (bitset_free, bitset_obstack_free): Do nothing if
40420         given NULL.
40421         * lib/bitset.h: Document that.
40422         * doc/bitset.texi: Fix the example, and demonstrate bitset_free.
40424 2019-10-15  Paul Eggert  <eggert@cs.ucla.edu>
40426         inttypes: use more-robust test for int range
40427         This fixes Bison 3.4.2 when built with Oracle Solaris Studio 12.3.
40428         Problem reported by Dagobert Michelsen in:
40429         https://lists.gnu.org/r/bug-gnulib/2019-10/msg00042.html
40430         * lib/inttypes.in.h: Rely only on limits.h when checking
40431         int range.
40433 2019-10-15  Bruno Haible  <bruno@clisp.org>
40435         libtextstyle-optional: Sync with current not-yet-released libtextstyle.
40436         * libtextstyle-optional (styled_ostream_get_hyperlink_ref,
40437         styled_ostream_get_hyperlink_id, styled_ostream_set_hyperlink,
40438         term_ostream_get_hyperlink_ref, term_ostream_get_hyperlink_id,
40439         term_ostream_set_hyperlink): New functions.
40440         (term_styled_ostream_get_hyperlink_ref,
40441         term_styled_ostream_get_hyperlink_id,
40442         term_styled_ostream_set_hyperlink): New function aliases.
40444 2019-10-14  Paul Eggert  <eggert@cs.ucla.edu>
40446         update-copyright: use en dashes in .texi ranges
40447         * build-aux/update-copyright: Match year ranges like "1998--2019",
40448         which are used in the Autoconf manual.  Also, update ranges in
40449         .tex, .texi, and .texinfo files to use en dashes instead of
40450         hyphens.
40452 2019-10-13  Paul Eggert  <eggert@cs.ucla.edu>
40454         * config/srclist.txt: Remove posix/regex_internal.c for now.
40456 2019-10-13  Bruno Haible  <bruno@clisp.org>
40458         git-version-gen: Allow 'snapshot' as .tarball-version contents.
40459         * build-aux/git-version-gen: Don't map non-numeric .tarball-version
40460         contents to the empty string.
40462 2019-10-12  Bruno Haible  <bruno@clisp.org>
40464         intprops tests: Fix compilation errors on HP-UX/ia64 with cc.
40465         * tests/test-intprops.c (main): Disable two more tests when using
40466         HP-UX cc.
40468 2019-10-11  Paul Eggert  <eggert@cs.ucla.edu>
40470         Simplify and regularize regex use of ‘assert’
40471         Also, tell GCC about the asserts even when compiling without
40472         debugging, to give it further optimization opportunities.
40473         * lib/regex_internal.h (DEBUG_ASSERT): New macro.
40474         * lib/regcomp.c (link_nfa_nodes, calc_eclosure)
40475         (parse_expression, parse_bracket_exp):
40476         * lib/regex_internal.c (build_wcs_buffer)
40477         (build_wcs_upper_buffer, re_string_reconstruct)
40478         (re_string_context_at):
40479         * lib/regexec.c (re_search_stub, re_copy_regs)
40480         (re_search_internal, prune_impossible_nodes, check_matching)
40481         (check_halt_state_context, set_regs, sift_states_backward)
40482         (build_sifted_states, transit_state_mb, transit_state_bkref)
40483         (check_arrival_add_next_nodes, check_arrival_expand_ecl)
40484         (match_ctx_add_subtop):
40485         Use it instead of plain ‘assert’.
40487 2019-10-09  Paul Eggert  <eggert@cs.ucla.edu>
40489         regex: omit debug assignment when not debugging
40490         * lib/regexec.c (re_search_internal) [!DEBUG]:
40491         Remove unnecessary assignment.
40493         regex: tell compiler there’s at most 256 arcs out
40494         Partly this is to help the reader (and maybe help GCC);
40495         partly this is to pacify Coverity.
40496         * lib/regex_internal.h: Include verify.h.
40497         * lib/regexec.c (group_nodes_into_DFAstates):
40498         Tell the compiler that ndests cannot exceed SBC_MAX.
40499         * modules/regex (Depends-on): Add ‘verify’.
40501         regex: simplify by assuming C99
40502         * config/srclist.txt: Comment out regex_internal.h and regexec.c
40503         temporarily.
40504         * lib/regex_internal.h (lock_define, re_match_context_t):
40505         Simplify by assuming C99 macros and const.
40506         * lib/regexec.c (re_search_internal): Simplify by assuming C99
40507         initializers.  Remove unnecessary assignment, as mctx is now
40508         safely initialized earlier.
40510         regex: avoid copying of uninitialized storage
40511         * config/srclist.txt: Comment out regcomp.c temporarily.
40512         * lib/regcomp.c (build_charclass_op, create_tree) [! (GCC_LINT||lint)]:
40513         Initialize even when not checking for lint, as the behavior is
40514         arguably undefined otherwise and Coverity warns about it.
40516 2019-10-06  Bruno Haible  <bruno@clisp.org>
40518         access tests: Fix test failure when run as root.
40519         * tests/test-access.c: Include root-uid.h.
40520         (geteuid): Define fallback.
40521         (main): Don't expect that writing to a read-only file would fail when
40522         running as root. Also, remove the created files at the end.
40523         * modules/access-tests (Depends-on): Add root-uid.
40524         (configure.ac): Test whether geteuid exists.
40526 2019-10-06  Benno Schulenberg  <bensberg@telfort.nl>  (tiny change)
40528         users.txt: add GNU nano
40529         Nano has been making use of gnulib since March 2017, version 2.8.0.
40531 2019-10-05  Paul Eggert  <eggert@cs.ucla.edu>
40533         bootstrap: simplify debugging of wget failures
40534         Problem reported by Tim Rühsen in:
40535         https://lists.gnu.org/r/bug-gnulib/2019-10/msg00000.html
40536         * build-aux/bootstrap (po_download_command_format):
40537         Invoke wget with -nv instead of -q, to make debugging easier.
40539 2019-09-29  Bruno Haible  <bruno@clisp.org>
40541         avltree-list: Fix compilation warning (introduced on 2014-09-16).
40542         * lib/gl_avltree_list.c (gl_avltree_list_check_invariants): Remove
40543         'const' attribute.
40545 2019-09-29  Bruno Haible  <bruno@clisp.org>
40547         fbufmode: Fix compilation error on glibc >= 2.28 systems.
40548         * lib/stdio-impl.h (_IO_UNBUFFERED): Define fallback on glibc >= 2.28.
40550 2019-09-28  Bruno Haible  <bruno@clisp.org>
40552         Update comments that refer to POSIX.
40553         * lib/creat.c, lib/fopen.c, lib/open.c, lib/openat.c: Cite the relevant
40554         sentence about trailing slashes.
40555         * lib/fflush.c: Clarify the reasoning.
40556         * tests/test-fflush2.c: Cite the relevant sentence.
40558 2019-09-28  Bruno Haible  <bruno@clisp.org>
40560         access: Document limitations on Windows.
40561         Suggested by Zaretskii <eliz@gnu.org>.
40562         * doc/posix-functions/access.texi: Mention two limitations on Windows.
40564 2019-09-28  Bruno Haible  <bruno@clisp.org>
40566         findprog-in: Fix comment.
40567         Reported by Eli Zaretskii <eliz@gnu.org>.
40568         * lib/findprog.h (find_in_given_path): Extend description of EACCES
40569         condition.
40570         * lib/stat.c (rpl_stat): Fix typo in comment.
40571         * lib/utime.c (_gl_utimens_windows): Likewise.
40573 2019-09-23  Paul Eggert  <eggert@cs.ucla.edu>
40575         Update URLs and associated text
40576         (Thanks to Bruno Haible for proofreading this patch.)
40577         Prefer https: to http: in URLs where either will do, for the usual
40578         security reasons.  I also updated broken and/or moved URLs
40579         discovered during the process. In a few places I had to resort to
40580         archive.org, since I didn't find the originals elsewhere.
40582 2019-09-15  Paul Smith  <psmith@gnu.org>
40583             Bruno Haible  <bruno@clisp.org>
40585         findprog-in: Set errno when the search fails.
40586         * lib/findprog-in.c: Include <errno.h>.
40587         (find_in_given_path): Set errno before returning NULL.
40588         * lib/findprog.h (find_in_given_path): Update comment accordingly.
40589         Define the term "slash".
40591 2019-09-15  Bruno Haible  <bruno@clisp.org>
40593         findprog, findprog-lgpl, findprog-in: Fix crash on MSVC.
40594         * modules/findprog (Depends-on): Add access.
40595         * modules/findprog-lgpl (Depends-on): Likewise.
40596         * modules/findprog-in (Depends-on): Likewise.
40598 2019-09-15  Bruno Haible  <bruno@clisp.org>
40600         access: Add tests.
40601         * tests/test-access.c: New file.
40602         * modules/access-tests: New file.
40604         access: New module.
40605         * lib/unistd.in.h (access): New declaration.
40606         * lib/access.c: New file.
40607         * m4/access.m4: New file.
40608         * m4/unistd_h.m4 (gl_UNISTD_H): Test whether access is declared.
40609         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_ACCESS, REPLACE_ACCESS.
40610         * modules/unistd (Makefile.am): Substitute GNULIB_ACCESS,
40611         REPLACE_ACCESS.
40612         * modules/access: New file.
40613         * tests/test-unistd-c++.cc (access): Check signature.
40614         * doc/posix-functions/access.texi: Mention the new module.
40616 2019-09-15  Bruno Haible  <bruno@clisp.org>
40618         fcntl-h: Fix compilation error of creat.c on MSVC.
40619         * lib/fcntl.in.h: Include <io.h> also when __need_system_fcntl_h is
40620         defined.
40622 2019-09-15  Bruno Haible  <bruno@clisp.org>
40624         creat: Add tests.
40625         * tests/test-creat.c: New file, based on tests/test-open.h.
40626         * modules/creat-tests: New file.
40628         creat: New module.
40629         * lib/fcntl.in.h (creat): New declaration.
40630         * lib/creat.c: New file, based on lib/open.c.
40631         * m4/creat.m4: New file.
40632         * m4/open-slash.m4: New file, extracted from m4/open.m4.
40633         * m4/open.m4 (gl_FUNC_OPEN): Move trailing-slash test to open-slash.m4.
40634         Invoke gl_OPEN_TRAILING_SLASH_BUG.
40635         * modules/open (Files): Add m4/open-slash.m4.
40636         * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Initialize GNULIB_CREAT,
40637         REPLACE_CREAT.
40638         * modules/fcntl-h (Makefile.am): Substitute GNULIB_CREAT, REPLACE_CREAT.
40639         * modules/creat: New file.
40640         * tests/test-fcntl-h-c++.cc (creat): Check signature.
40641         * doc/posix-functions/creat.texi: Mention the new module.
40643 2019-09-15  Bruno Haible  <bruno@clisp.org>
40645         open tests: Enhance test.
40646         * tests/test-open.h (test_open): Test the creation of an executable
40647         regular file. Also improve initial cleanup.
40649 2019-09-15  Bruno Haible  <bruno@clisp.org>
40651         intprops tests: Avoid build failure with HP-UX cc.
40652         * tests/test-intprops.c: Disable a check that makes HP cc choke with
40653         "error 4018: Macro param too large after substitution - use -H option.".
40655 2019-09-14  Bruno Haible  <bruno@clisp.org>
40657         Make autoconf tests work with -Werror=implicit-function-declaration.
40658         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Include <wctype.h>, for
40659         towupper() declaration.
40660         * m4/ptsname.m4 (gl_FUNC_PTSNAME): Include <stdlib.h>, for ptsname()
40661         declaration.
40663 2019-09-14  Bruno Haible  <bruno@clisp.org>
40665         findprog-in: Better mimic the system on native Windows.
40666         Reported by Paul Smith <psmith@gnu.org>.
40667         * lib/findprog-in.c (find_in_given_path): On native Windows, don't try
40668         non-empty suffixes when the file name already contains a '.'.
40670 2019-09-10  Bruno Haible  <bruno@clisp.org>
40672         wctob: Fix autoconf test.
40673         Based on patch by Florian Weimer <fweimer@redhat.com>.
40674         * m4/wctob.m4 (gl_FUNC_WCTOB): Include <stdlib.h> before using mbtowc.
40676 2019-09-09  Akim Demaille  <akim@lrde.epita.fr>
40678         xhash: provide hash_xinitialize.
40679         Suggested by Egor Pugin <egor.pugin@gmail.com>
40680         https://lists.gnu.org/archive/html/bison-patches/2019-09/msg00026.html
40681         * modules/xhash, lib/xhash.c: New.
40682         * lib/hash.h (hash_xinitialize): New.
40684 2019-09-09  Bruno Haible  <bruno@clisp.org>
40686         findprog-in: Make exec optimization optional.
40687         * lib/findprog.h: Add double-inclusion guard. Include <stdbool.h>.
40688         (find_in_given_path): Add optimize_for_exec parameter.
40689         * lib/findprog-in.c (find_in_given_path): Likewise.
40691 2019-09-08  Bruno Haible  <bruno@clisp.org>
40693         Add option to assume the best, not the worst, when cross-compiling.
40694         Suggested by Jonas Termansen <sortie@maxsi.org>.
40695         * m4/gnulib-common.m4 (gl_COMMON_BODY): Add --enable-cross-guesses=...
40696         option. Set gl_cross_guess_normal and gl_cross_guess_inverted.
40697         * m4/argz.m4 (gl_FUNC_ARGZ): Obey --enable-cross-guesses for
40698         lt_cv_sys_argz_works.
40699         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Obey --enable-cross-guesses for
40700         ac_cv_func_calloc_0_nonnull.
40701         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Obey
40702         --enable-cross-guesses for gl_cv_func_realpath_works.
40703         * m4/cbrtl.m4 (gl_FUNC_CBRTL): Obey --enable-cross-guesses for
40704         gl_cv_func_cbrtl_ieee.
40705         * m4/ceil.m4 (gl_FUNC_CEIL): Obey --enable-cross-guesses for
40706         gl_cv_func_ceil_ieee.
40707         * m4/ceilf.m4 (gl_FUNC_CEILF): Obey --enable-cross-guesses for
40708         gl_cv_func_ceilf_ieee.
40709         * m4/ceill.m4 (gl_FUNC_CEILL): Obey --enable-cross-guesses for
40710         gl_cv_func_ceill_ieee.
40711         * m4/chown.m4 (AC_FUNC_CHOWN): Obey --enable-cross-guesses for
40712         ac_cv_func_chown_works.
40713         (gl_FUNC_CHOWN): Obey --enable-cross-guesses for
40714         gl_cv_func_chown_slash_works, gl_cv_func_chown_ctime_works.
40715         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Obey
40716         --enable-cross-guesses for gl_cv_struct_dirent_d_ino.
40717         * m4/exp2l.m4 (gl_FUNC_EXP2L): Obey --enable-cross-guesses for
40718         gl_cv_func_exp2l_works, gl_cv_func_exp2l_ieee.
40719         * m4/expl.m4 (gl_FUNC_EXPL): Obey --enable-cross-guesses for
40720         gl_cv_func_expl_works.
40721         * m4/expm1.m4 (gl_FUNC_EXPM1): Obey --enable-cross-guesses for
40722         gl_cv_func_expm1_ieee.
40723         * m4/expm1l.m4 (gl_FUNC_EXPM1L): Obey --enable-cross-guesses for
40724         gl_cv_func_expm1l_works.
40725         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Obey --enable-cross-guesses for
40726         gl_cv_func_open_directory_works.
40727         * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Obey
40728         --enable-cross-guesses for gl_cv_func_fchownat_nofollow_works.
40729         (gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG): Obey --enable-cross-guesses for
40730         gl_cv_func_fchownat_empty_filename_works.
40731         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Obey --enable-cross-guesses for
40732         gl_cv_func_fdopendir_works.
40733         * m4/floor.m4 (gl_FUNC_FLOOR): Obey --enable-cross-guesses for
40734         gl_cv_func_floor_ieee.
40735         * m4/floorf.m4 (gl_FUNC_FLOORF): Obey --enable-cross-guesses for
40736         gl_cv_func_floorf_ieee.
40737         * m4/fma.m4 (gl_FUNC_FMA_WORKS): Obey --enable-cross-guesses for
40738         gl_cv_func_fma_works.
40739         * m4/fmaf.m4 (gl_FUNC_FMAF_WORKS): Obey --enable-cross-guesses for
40740         gl_cv_func_fmaf_works.
40741         * m4/fmal.m4 (gl_FUNC_FMAL_WORKS): Obey --enable-cross-guesses for
40742         gl_cv_func_fmal_works.
40743         * m4/fmod.m4 (gl_FUNC_FMOD): Obey --enable-cross-guesses for
40744         gl_cv_func_fmod_ieee.
40745         * m4/fmodf.m4 (gl_FUNC_FMODF): Obey --enable-cross-guesses for
40746         gl_cv_func_fmodf_ieee.
40747         * m4/fmodl.m4 (gl_FUNC_FMODL): Obey --enable-cross-guesses for
40748         gl_cv_func_fmodl_ieee.
40749         * m4/fpurge.m4 (gl_FUNC_FPURGE): Obey --enable-cross-guesses for
40750         gl_cv_func_fpurge_works.
40751         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Obey
40752         --enable-cross-guesses for gl_cv_func_getcwd_path_max.
40753         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Obey --enable-cross-guesses for
40754         gl_cv_func_getcwd_null.
40755         (gl_FUNC_GETCWD): Update for getcwd-path-max.m4 change.
40756         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Obey --enable-cross-guesses for
40757         gl_cv_func_working_getdelim.
40758         * m4/getgroups.m4 (AC_FUNC_GETGROUPS): Obey --enable-cross-guesses for
40759         ac_cv_func_getgroups_works. Keep this macro also in Autoconf >= 2.70.
40760         (gl_FUNC_GETGROUPS): Obey --enable-cross-guesses for
40761         gl_cv_func_getgroups_works.
40762         * m4/getline.m4 (gl_FUNC_GETLINE): Obey --enable-cross-guesses for
40763         am_cv_func_working_getline.
40764         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Obey --enable-cross-guesses
40765         for gl_cv_func_getopt_gnu.
40766         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY_CLOBBER): Obey
40767         --enable-cross-guesses for gl_cv_func_gettimeofday_clobber.
40768         * m4/hypot.m4 (gl_FUNC_HYPOT): Obey --enable-cross-guesses for
40769         gl_cv_func_hypot_ieee.
40770         * m4/hypotf.m4 (gl_FUNC_HYPOTF): Obey --enable-cross-guesses for
40771         gl_cv_func_hypotf_ieee.
40772         * m4/hypotl.m4 (gl_FUNC_HYPOTL): Obey --enable-cross-guesses for
40773         gl_cv_func_hypotl_ieee.
40774         * m4/iconv_open-utf.m4 (gl_FUNC_ICONV_OPEN_UTF_SUPPORT): Obey
40775         --enable-cross-guesses for gl_cv_func_iconv_supports_utf.
40776         * m4/link.m4 (gl_FUNC_LINK): Obey --enable-cross-guesses for
40777         gl_cv_func_link_works.
40778         * m4/linkat.m4 (gl_FUNC_LINKAT): Obey --enable-cross-guesses for
40779         gl_cv_func_linkat_slash.
40780         * m4/log.m4 (gl_FUNC_LOG): Obey --enable-cross-guesses for
40781         gl_cv_func_log_ieee.
40782         * m4/logf.m4 (gl_FUNC_LOGF): Obey --enable-cross-guesses for
40783         gl_cv_func_logf_ieee.
40784         * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Obey --enable-cross-guesses for
40785         gl_cv_func_logl_works.
40786         * m4/log10.m4 (gl_FUNC_LOG10): Obey --enable-cross-guesses for
40787         gl_cv_func_log10_ieee.
40788         * m4/log10f.m4 (gl_FUNC_LOG10F): Obey --enable-cross-guesses for
40789         gl_cv_func_log10f_ieee.
40790         * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Obey --enable-cross-guesses for
40791         gl_cv_func_log10l_works.
40792         * m4/log1p.m4 (gl_FUNC_LOG1P): Obey --enable-cross-guesses for
40793         gl_cv_func_log1p_ieee.
40794         * m4/log1pf.m4 (gl_FUNC_LOG1PF): Obey --enable-cross-guesses for
40795         gl_cv_func_log1pf_ieee.
40796         * m4/log1pl.m4 (gl_FUNC_LOG1PL): Obey --enable-cross-guesses for
40797         gl_cv_func_log1pl_ieee.
40798         * m4/log2.m4 (gl_FUNC_LOG2): Obey --enable-cross-guesses for
40799         gl_cv_func_log2_ieee.
40800         * m4/log2f.m4 (gl_FUNC_LOG2F): Obey --enable-cross-guesses for
40801         gl_cv_func_log2f_ieee.
40802         * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Obey
40803         --enable-cross-guesses for
40804         gl_cv_func_lstat_dereferences_slashed_symlink.
40805         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Obey --enable-cross-guesses for
40806         ac_cv_func_malloc_0_nonnull. Keep this macro also in Autoconf >= 2.70.
40807         * m4/mbrtowc.m4 (gl_MBRTOWC_C_LOCALE): Obey --enable-cross-guesses for
40808         gl_cv_C_locale_sans_EILSEQ.
40809         * m4/memchr.m4 (gl_FUNC_MEMCHR): Obey --enable-cross-guesses for
40810         gl_cv_func_memchr_works.
40811         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): Obey --enable-cross-guesses for
40812         gl_cv_func_memmem_works_always.
40813         (gl_FUNC_MEMMEM): Obey --enable-cross-guesses for
40814         gl_cv_func_memmem_works_fast.
40815         * m4/mkdir.m4 (gl_FUNC_MKDIR): Obey --enable-cross-guesses for
40816         gl_cv_func_mkdir_trailing_slash_works,
40817         gl_cv_func_mkdir_trailing_dot_works.
40818         * m4/mkfifo.m4 (gl_FUNC_MKFIFO): Obey --enable-cross-guesses for
40819         gl_cv_func_mkfifo_works.
40820         * m4/mknod.m4 (gl_FUNC_MKNOD): Obey --enable-cross-guesses for
40821         gl_cv_func_mknod_works.
40822         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Obey --enable-cross-guesses for
40823         gl_cv_func_working_mkstemp.
40824         * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Obey --enable-cross-guesses for
40825         gl_cv_func_working_mktime.
40826         * m4/modf.m4 (gl_FUNC_MODF): Obey --enable-cross-guesses for
40827         gl_cv_func_modf_ieee.
40828         * m4/modff.m4 (gl_FUNC_MODFF): Obey --enable-cross-guesses for
40829         gl_cv_func_modff_ieee.
40830         * m4/modfl.m4 (gl_FUNC_MODFL): Obey --enable-cross-guesses for
40831         gl_cv_func_modfl_ieee.
40832         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Obey --enable-cross-guesses for
40833         gl_cv_func_nanosleep.
40834         * m4/perror.m4 (gl_FUNC_PERROR): Obey --enable-cross-guesses for
40835         gl_cv_func_perror_works.
40836         * m4/printf.m4 (gl_PRINTF_SIZES_C99): Obey --enable-cross-guesses for
40837         gl_cv_func_printf_sizes_c99.
40838         (gl_PRINTF_INFINITE): Obey --enable-cross-guesses for
40839         gl_cv_func_printf_infinite.
40840         (gl_PRINTF_INFINITE_LONG_DOUBLE): Obey --enable-cross-guesses for
40841         gl_cv_func_printf_infinite_long_double.
40842         (gl_PRINTF_DIRECTIVE_A): Obey --enable-cross-guesses for
40843         gl_cv_func_printf_directive_a.
40844         (gl_PRINTF_DIRECTIVE_F): Obey --enable-cross-guesses for
40845         gl_cv_func_printf_directive_f.
40846         (gl_PRINTF_FLAG_ZERO): Obey --enable-cross-guesses for
40847         gl_cv_func_printf_flag_zero.
40848         (gl_PRINTF_ENOMEM): Obey --enable-cross-guesses for
40849         gl_cv_func_printf_enomem.
40850         (gl_SNPRINTF_TRUNCATION_C99): Obey --enable-cross-guesses for
40851         gl_cv_func_snprintf_truncation_c99.
40852         (gl_SNPRINTF_RETVAL_C99): Obey --enable-cross-guesses for
40853         gl_cv_func_snprintf_retval_c99.
40854         (gl_SNPRINTF_DIRECTIVE_N): Obey --enable-cross-guesses for
40855         gl_cv_func_snprintf_directive_n.
40856         (gl_VSNPRINTF_ZEROSIZE_C99): Obey --enable-cross-guesses for
40857         gl_cv_func_vsnprintf_zerosize_c99.
40858         * m4/pselect.m4 (gl_FUNC_PSELECT): Obey --enable-cross-guesses for
40859         gl_cv_func_pselect_detects_ebadf.
40860         * m4/pthread_rwlock_rdlock.m4 (gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER):
40861         Obey --enable-cross-guesses for
40862         gl_cv_pthread_rwlock_rdlock_prefer_writer.
40863         * m4/ptsname.m4 (gl_FUNC_PTSNAME): Obey --enable-cross-guesses for
40864         gl_cv_func_ptsname_sets_errno.
40865         * m4/putenv.m4 (gl_FUNC_PUTENV): Obey --enable-cross-guesses for
40866         gl_cv_func_svid_putenv.
40867         * m4/readlink.m4 (gl_FUNC_READLINK): Obey --enable-cross-guesses for
40868         gl_cv_func_readlink_works.
40869         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Obey --enable-cross-guesses for
40870         ac_cv_func_realloc_0_nonnull. Keep this macro also in Autoconf >= 2.70.
40871         * m4/regex.m4 (gl_REGEX): Obey --enable-cross-guesses for
40872         gl_cv_func_re_compile_pattern_working.
40873         * m4/remainder.m4 (gl_FUNC_REMAINDER): Obey --enable-cross-guesses for
40874         gl_cv_func_remainder_ieee.
40875         * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Obey --enable-cross-guesses for
40876         gl_cv_func_remainderf_ieee.
40877         * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Obey --enable-cross-guesses for
40878         gl_cv_func_remainderl_ieee.
40879         * m4/rintl.m4 (gl_FUNC_RINTL): Obey --enable-cross-guesses for
40880         gl_cv_func_rintl_works.
40881         * m4/rmdir.m4 (gl_FUNC_RMDIR): Obey --enable-cross-guesses for
40882         gl_cv_func_rmdir_works.
40883         * m4/round.m4 (gl_FUNC_ROUND): Obey --enable-cross-guesses for
40884         gl_cv_func_round_ieee.
40885         * m4/roundf.m4 (gl_FUNC_ROUNDF): Obey --enable-cross-guesses for
40886         gl_cv_func_roundf_ieee.
40887         * m4/roundl.m4 (gl_FUNC_ROUNDL): Obey --enable-cross-guesses for
40888         gl_cv_func_roundl_ieee.
40889         * m4/select.m4 (gl_FUNC_SELECT): Obey --enable-cross-guesses for
40890         gl_cv_func_select_detects_ebadf.
40891         * m4/setenv.m4 (gl_FUNC_SETENV): Obey --enable-cross-guesses for
40892         gl_cv_func_setenv_works.
40893         (gl_FUNC_UNSETENV): Obey --enable-cross-guesses for
40894         gl_cv_func_unsetenv_works.
40895         * m4/signbit.m4 (gl_SIGNBIT): Obey --enable-cross-guesses for
40896         gl_cv_func_signbit, gl_cv_func_signbit_gcc.
40897         * m4/sleep.m4 (gl_FUNC_SLEEP): Obey --enable-cross-guesses for
40898         gl_cv_func_sleep_works.
40899         * m4/stat.m4 (gl_FUNC_STAT): Obey --enable-cross-guesses for
40900         gl_cv_func_stat_file_slash.
40901         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Obey --enable-cross-guesses for
40902         gl_cv_func_stpncpy.
40903         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Obey
40904         --enable-cross-guesses for gl_cv_func_strcasestr_works_always.
40905         (gl_FUNC_STRCASESTR): Obey --enable-cross-guesses for
40906         gl_cv_func_strcasestr_linear.
40907         * m4/strerror.m4 (gl_FUNC_STRERROR): Obey --enable-cross-guesses for
40908         gl_cv_func_working_strerror.
40909         (gl_FUNC_STRERROR_0): Obey --enable-cross-guesses for
40910         gl_cv_func_strerror_0_works.
40911         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R_WORKS): Obey
40912         --enable-cross-guesses for gl_cv_func_strerror_r_works.
40913         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE): Obey --enable-cross-guesses for
40914         gl_cv_func_strstr_works_always.
40915         (gl_FUNC_STRSTR): Obey --enable-cross-guesses for
40916         gl_cv_func_strstr_linear.
40917         * m4/strtod.m4 (gl_FUNC_STRTOD): Obey --enable-cross-guesses for
40918         gl_cv_func_strtod_works.
40919         * m4/strtold.m4 (gl_FUNC_STRTOLD): Obey --enable-cross-guesses for
40920         gl_cv_func_strtold_works.
40921         * m4/symlink.m4 (gl_FUNC_SYMLINK): Obey --enable-cross-guesses for
40922         gl_cv_func_symlink_works.
40923         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Obey --enable-cross-guesses for
40924         gl_cv_func_symlinkat_works.
40925         * m4/trunc.m4 (gl_FUNC_TRUNC): Obey --enable-cross-guesses for
40926         gl_cv_func_trunc_ieee.
40927         * m4/truncf.m4 (gl_FUNC_TRUNCF): Obey --enable-cross-guesses for
40928         gl_cv_func_truncf_ieee.
40929         * m4/truncl.m4 (gl_FUNC_TRUNCL): Obey --enable-cross-guesses for
40930         gl_cv_func_truncl_ieee.
40931         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Obey --enable-cross-guesses for
40932         gl_cv_func_tzset_clobber.
40933         * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Obey --enable-cross-guesses for
40934         gl_cv_func_ungetc_works.
40935         * m4/unlink.m4 (gl_FUNC_UNLINK): Obey --enable-cross-guesses for
40936         gl_cv_func_unlink_honors_slashes, gl_cv_func_unlink_parent_fails.
40937         * m4/usleep.m4 (gl_FUNC_USLEEP): Obey --enable-cross-guesses for
40938         gl_cv_func_usleep_works.
40939         * m4/utimens.m4 (gl_UTIMENS): Obey --enable-cross-guesses for
40940         gl_cv_func_futimesat_works.
40941         * m4/utimes.m4 (gl_FUNC_UTIMES): Obey --enable-cross-guesses for
40942         gl_cv_func_working_utimes.
40943         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Obey --enable-cross-guesses for
40944         gl_cv_func_wcwidth_works.
40945         * m4/glob.m4 (gl_GLOB): When cross-compiling, don't create symlinks for
40946         testing. Obey --enable-cross-guesses for gl_cv_glob_lists_symlinks.
40947         * m4/rename.m4 (gl_FUNC_RENAME): When cross-compiling, don't create
40948         links for testing. Obey --enable-cross-guesses for
40949         gl_cv_func_rename_slash_dst_works, gl_cv_func_rename_slash_src_works,
40950         gl_cv_func_rename_link_works, gl_cv_func_rename_dest_works.
40952 2019-09-08  Bruno Haible  <bruno@clisp.org>
40954         Clarify that cross-compilation guesses are guesses.
40955         * m4/threads.m4 (gl_THREADS_H): Say "guessing yes" or "guessing no" when
40956         cross-compiling.
40958 2019-09-08  Bruno Haible  <bruno@clisp.org>
40960         chown: Fix configure output (regression from 2019-03-23).
40961         * m4/chown.m4 (gl_FUNC_CHOWN): Fix reference to
40962         gl_cv_func_chown_follows_symlink variable.
40964 2019-09-08  Bruno Haible  <bruno@clisp.org>
40966         findprog-in: New module.
40967         Suggested by Paul Smith <psmith@gnu.org>.
40968         * lib/findprog.h (find_in_given_path): New declaration.
40969         * lib/findprog-in.c: New file, based on lib/findprog.c.
40970         * m4/findprog-in.m4: New file, based on m4/findprog.m4.
40971         * modules/findprog-in: New file.
40973 2019-09-08  Bruno Haible  <bruno@clisp.org>
40975         findprog: Remove unused dependency.
40976         * modules/findprog (Depends-on): Remove strdup.
40978 2019-09-08  Bruno Haible  <bruno@clisp.org>
40980         findprog: Remove test that is obsolete since 2006-04-24.
40981         * m4/findprog.m4 (gl_FINDPROG): Don't test for unistd.h.
40983 2019-09-06  Akim Demaille  <akim@lrde.epita.fr>
40985         bitset: style changes
40986         * lib/bitset/vector.c (vbitset_resize): Factor computation.
40987         * lib/bitset.c, lib/bitset/stats.c, lib/bitsetv.c: Prefer
40988         xzalloc to xcalloc.
40989         Suggested by Paul Eggert.
40991 2019-09-06  Akim Demaille  <akim@lrde.epita.fr>
40993         bitset: check memory allocation
40994         Reported by 江 祖铭 (Zu-Ming Jiang).
40995         With help from Paul Eggert.
40996         https://lists.gnu.org/archive/html/bug-bison/2019-08/msg00016.html
40997         * lib/bitset/table.c (tbitset_resize): When growing, use xrealloc
40998         instead of realloc.
40999         When shrinking, accept failures.
41000         * lib/bitset/vector.c (vbitset_resize): Likewise.
41002 2019-09-07  Paul Eggert  <eggert@cs.ucla.edu>
41004         scratch_buffer: sync from glibc
41005         * config/srclist.txt: Add the scratch_buffer source
41006         code from glibc, since these should be in sync.
41007         Autoupdate.
41009 2019-09-07  Bruno Haible  <bruno@clisp.org>
41011         doc: Update for glibc 2.30.
41012         * doc/glibc-functions/gettid.texi: New file.
41013         * doc/glibc-functions/pthread_cond_clockwait.texi: New file.
41014         * doc/glibc-functions/pthread_mutex_clocklock.texi: New file.
41015         * doc/glibc-functions/pthread_rwlock_clockrdlock.texi: New file.
41016         * doc/glibc-functions/pthread_rwlock_clockwrlock.texi: New file.
41017         * doc/glibc-functions/sem_clockwait.texi: New file.
41018         * doc/glibc-functions/tgkill.texi: New file.
41019         * doc/glibc-functions/twalk_r.texi: New file.
41020         * doc/gnulib.texi: Include them.
41021         (Glibc semaphore.h): New section.
41022         * doc/pastposix-functions/h_errno.texi: Update.
41023         * doc/posix-functions/*.texi: Likewise.
41025 2019-09-06  Bruno Haible  <bruno@clisp.org>
41027         symlink tests: Avoid test failure on Linux with Lustre file system.
41028         Reported by Thomas C Oppe <Thomas.C.Oppe@erdc.dren.mil>
41029         at <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37312>.
41030         * tests/test-symlink.h (test_symlink): Accept errno value ENOENT.
41032 2019-09-01  Bruno Haible  <bruno@clisp.org>
41034         gitsub.sh: Add support for shallow-cloning of subdirectories.
41035         * top/gitsub.sh (func_usage): Document allowed git options with
41036         'git pull'.
41037         (func_pull): Accept GIT_OPTIONS argument.
41038         (pull): Parse git options before complaining about too many arguments.
41039         Pass the git options to func_pull.
41041 2019-08-29  Bruno Haible  <bruno@clisp.org>
41043         lock: Fix cross-compilation guesses.
41044         * m4/pthread_rwlock_rdlock.m4 (gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER):
41045         Require AC_CANONICAL_HOST. When cross-compiling, guess no on most
41046         platforms.
41048 2019-08-28  Bruno Haible  <bruno@clisp.org>
41050         isfinite, isinf, isnan, signbit: Fix error in C++ mode on mingw.
41051         Reported by Martin Storsjö <martin@martin.st> in
41052         <https://lists.gnu.org/archive/html/bug-gnulib/2019-08/msg00075.html>.
41053         * lib/math.in.h (_GL_MATH_CXX_REAL_FLOATING_DECL_2): Add more arguments.
41054         (isfinite, isinf, isnan, signbit): On platforms that use C++ include
41055         files from GCC 6 or newer, use an override through '#define', because
41056         the inline definitions in the platform's <cmath> cannot be overridden
41057         in another way.
41059 2019-08-27  Paul Eggert  <eggert@cs.ucla.edu>
41061         Revert macOS INT_MULTIPLY_WRAPV patch
41062         Problem reported by Bruno Haible in:
41063         https://lists.gnu.org/r/bug-gnulib/2019-08/msg00076.html
41064         * lib/intprops.h (_GL_HAS___builtin_mul_overflow): Remove.
41065         (_GL_HAS_BUILTIN_MUL_OVERFLOW):
41066         Go back to working around the Clang bug on macOS.
41068 2019-08-27  Bruno Haible  <bruno@clisp.org>
41070         libtool-next-version: Fix error output.
41071         * build-aux/libtool-next-version (func_fatal_error): Fix the program
41072         name.
41074 2019-08-27  Paul Eggert  <eggert@cs.ucla.edu>
41076         Speed up INT_MULTIPLY_WRAPV on macOS
41077         Assume that __builtin_mul_overflow works OK with Clang on macOS.
41078         Mattias Engdegård says it’s safe to assume the relevant library
41079         is always available there.
41080         * lib/intprops.h (_GL_HAS___builtin_mul_overflow):
41081         New temporary internal macro.
41082         (_GL_HAS_BUILTIN_MUL_OVERFLOW):
41083         No need to work around the Clang bug on macOS.
41085 2019-08-25  Paul Eggert  <eggert@cs.ucla.edu>
41087         intprops.h, verify.h: port better to clang
41088         Improve code generated by INT_ADD_WRAPV and INT_SUBTRACT_WRAPV
41089         with Clang.  Problem reported privately by Mattias Engdegård.
41090         Also, insulate intprops.h and verify.h better against each other’s
41091         definitions of __has_builtin on non-Clang hosts.
41092         * lib/intprops.h (__has_builtin): Define a temporary substitute
41093         if __has_builtin is not already defined.
41094         (_GL_HAS___builtin_add_overflow, _GL_TEMPDEF___has_builtin):
41095         New temporary internal macros.
41096         (_GL_HAS_BUILTIN_ADD_OVERFLOW, _GL_HAS_BUILTIN_MUL_OVERFLOW):
41097         Now two separate macros, replacing the old
41098         _GL_HAS_BUILTIN_OVERFLOW, since we no longer assume that
41099         __builtin_mul_overflow is like the rest.  All uses changed.
41100         (INT_ADD_WRAPV, INT_SUBTRACT_WRAPV, INT_MULTIPLY_WRAPV):
41101         Adjust to above changes.
41102         (_GL_INT_OP_WRAPV): Remove ‘builtin’ arg, since it’s no
41103         longer relevant.  All uses changed.
41104         * lib/verify.h (__has_builtin): Treat like intprops.h,
41105         so that the two .h files do not collide with each other.
41106         (_GL_HAS___builtin_unreachable, _GL_HAS___builtin_trap)
41107         (_GL_TEMPDEF___has_builtin): New temporary internal macros.
41109 2019-08-24  Paul Eggert  <eggert@cs.ucla.edu>
41111         intprops: say why not Clang __builtin_add_overflow
41112         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW):
41113         Mention Clang in comment, responding to a query from
41114         Mattias Engdegård.
41116 2019-08-24  Bruno Haible  <bruno@clisp.org>
41118         doc: Document most of the files outside of modules.
41119         * doc/gnulib.texi (Build Infrastructure Files,
41120         Release Management Files): New chapters.
41122 2019-08-24  Bruno Haible  <bruno@clisp.org>
41124         bootstrap: Keep in sync with the 'gettext' module.
41125         Reported by Assaf Gordon in
41126         <https://lists.gnu.org/archive/html/bug-gnulib/2019-08/msg00045.html>.
41127         * build-aux/po/Makefile.in.in: Update to gettext 0.20.
41128         * build-aux/po/remove-potcdate.sin: Likewise.
41130 2019-08-24  Bruno Haible  <bruno@clisp.org>
41132         crypto/gc-sha512: Add tests.
41133         * tests/test-gc-sha512.c: New file, based on tests/test-gc-sha1.c.
41134         * modules/crypto/gc-sha512-tests: New file.
41136         crypto/gc-sha256: Add tests.
41137         * tests/test-gc-sha256.c: New file, based on tests/test-gc-sha1.c.
41138         * modules/crypto/gc-sha256-tests: New file.
41140         crypto/gc-sha256, crypto/gc-sha512: New modules.
41141         * lib/gc.h (gc_sha256, gc_sha512): New declarations.
41142         * lib/gc-gnulib.c: Include sha256.h, sha512.h.
41143         (MAX_DIGEST_SIZE): Set to 64.
41144         (_gc_hash_ctx, gc_hash_open, gc_hash_digest_length, gc_hash_write,
41145         gc_hash_read, gc_hash_buffer): Add support for sha256 and sha512.
41146         (gc_sha256, gc_sha512): New functions.
41147         * lib/gc-libgcrypt.c (gc_sha256, gc_sha512): New functions.
41148         * modules/crypto/gc-sha256: New file, based on modules/crypto/gc-sha1.
41149         * modules/crypto/gc-sha512: New file, based on modules/crypto/gc-sha1.
41151 2019-08-24  Bruno Haible  <bruno@clisp.org>
41153         crypto/gc-sha1 tests: Improve output when the test fails.
41154         * tests/test-gc-sha1.c (main): In case of mismatch, print the entire
41155         output.
41157 2019-08-24  Bruno Haible  <bruno@clisp.org>
41159         crypto/gc-sm3: Fix compilation error with --with-libgcrypt.
41160         * m4/gc-sm3.m4 (gl_GC_SM3): Test whether libgcrypt supports SM3. Define
41161         LIBGCRYPT_HAS_MD_SM3.
41162         * lib/gc-libgcrypt.c: Include sm3.h.
41163         (_gc_hash_ctx, gc_hash_open, gc_hash_hmac_setkey, gc_hash_write,
41164         gc_hash_read, gc_hash_close, gc_hash_buffer, gc_sm3): Use the gnulib
41165         implementation if libgcrypt does not support SM3.
41167 2019-08-24  Bruno Haible  <bruno@clisp.org>
41169         crypto/gc-md2: Optimize and clarify code.
41170         * lib/gc-gnulib.c (gc_hash_open): Comment out md2_init_ctx invocation.
41171         * lib/gc-libgcrypt.c (gc_hash_open): Clarify why md2_init_ctx invocation
41172         is not needed.
41174 2019-08-24  Bruno Haible  <bruno@clisp.org>
41176         crypto/gc-md2: Add comment.
41177         * lib/gc-libgcrypt.c: Add comment.
41179 2019-08-24  Bruno Haible  <bruno@clisp.org>
41181         crypto/gc-{md[24],rijndael} tests: Fix link error with --with-libgcrypt.
41182         * modules/crypto/gc-md2-tests (test_gc_md2_LDADD): New variable.
41183         * modules/crypto/gc-md4-tests (test_gc_md4_LDADD): New variable.
41184         * modules/crypto/gc-rijndael-tests (test_gc_rijndael_LDADD): New
41185         variable.
41187 2019-08-24  Bruno Haible  <bruno@clisp.org>
41189         crypto/gc: Fix link error with --with-libgcrypt.
41190         * m4/gc.m4 (gl_GC): Set LIB_CRYPTO to the value found by the
41191         AC_LIB_HAVE_LINKFLAGS invocation.
41193 2019-08-24  Bruno Haible  <bruno@clisp.org>
41195         crypto/gc: Access the module indicators correctly.
41196         * lib/gc-gnulib.c: Use '#if GNULIB_GC_*', not '#ifdef GNULIB_GC_*'.
41197         * lib/gc-libgcrypt.c: Likewise.
41199 2019-08-24  Bruno Haible  <bruno@clisp.org>
41201         crypto/gc: Fix configuration with --with-libgcrypt.
41202         * m4/libgcrypt.m4: New file, copied from libgcrypt/src/libgcrypt.m4.
41203         * modules/crypto/gc (Files): Add it.
41204         * m4/gc.m4 (gl_GC): Assume AM_PATH_LIBGCRYPT is defined.
41206 2019-08-24  Bruno Haible  <bruno@clisp.org>
41208         Remove unused file.
41209         * m4/stat-macros.m4: Remove file.
41211 2019-08-21  Paul Eggert  <eggert@cs.ucla.edu>
41213         New strip-trailing-space option for srclist-update
41214         * config/srclist-update (fixfile): Support new option.
41215         * config/srclist.txt (texinfo.tex, maintain.texi, standards.texi):
41216         Use it.
41218 2019-08-20  Eric Blake  <eblake@redhat.com>
41220         accept4: Support SOCK_NONBLOCK, if defined
41221         * lib/accept4.c (accept4): If SOCK_NONBLOCK is defined, honor it.
41223         accept4: Fix compilation when native accept4() exists.
41224         Reported by Richard W.M. Jones <rjones@redhat.com> in
41225         https://lists.gnu.org/archive/html/bug-gnulib/2019-08/msg00029.html
41226         * lib/accept4.c (accept4): Match witness symbol to m4 file update.
41228 2019-08-18  Bruno Haible  <bruno@clisp.org>
41230         Defeat -flto GCC optimization in math autoconf tests.
41231         Reported by Tomasz Kłoczko <kloczko.tomasz@gmail.com>
41232         at <https://savannah.gnu.org/bugs/?56109>.
41233         * m4/mathfunc.m4 (gl_MATHFUNC): Mark function pointer as 'volatile'.
41234         * m4/acosl.m4 (gl_FUNC_ACOSL): Likewise.
41235         * m4/asinl.m4 (gl_FUNC_ASINL): Likewise.
41236         * m4/atanl.m4 (gl_FUNC_ATANL): Likewise.
41237         * m4/cosl.m4 (gl_FUNC_COSL): Likewise.
41238         * m4/exp2.m4 (gl_FUNC_EXP2): Likewise.
41239         * m4/expl.m4 (gl_FUNC_EXPL): Likewise.
41240         * m4/expm1.m4 (gl_FUNC_EXPM1): Likewise.
41241         * m4/expm1l.m4 (gl_FUNC_EXPM1L): Likewise.
41242         * m4/sinl.m4 (gl_FUNC_SINL): Likewise.
41243         * m4/sqrtl.m4 (gl_FUNC_SQRTL): Likewise.
41244         * m4/tanl.m4 (gl_FUNC_TANL): Likewise.
41246 2019-08-17  Bruno Haible  <bruno@clisp.org>
41248         windows-spin: Implement declared functions.
41249         Reported by Gisle Vanem <gisle.vanem@gmail.com> in
41250         <https://lists.gnu.org/archive/html/bug-gnulib/2019-08/msg00024.html>.
41251         * lib/windows-spin.c (glwthread_spin_trylock): Fix typo in function
41252         name.
41254 2019-08-17  Paul Eggert  <eggert@cs.ucla.edu>
41256         intprops: port to Oracle Developer Studio 12.6
41257         * lib/intprops.h (_GL_INT_OP_WRAPV): Fix recently-introduced
41258         typos that were in a section not compiled by GCC.
41260 2019-08-14  Paul Eggert  <eggert@cs.ucla.edu>
41262         intprops: support uchar, ushort _WRAPV dests
41263         * lib/intprops.h (_GL_INT_OP_WRAPV_SMALLISH): New macro, defined
41264         when __builtin_add_overflow etc. and _Generic are not used.
41265         (_GL_INT_OP_WRAPV): Use it to support destinations that
41266         are unsigned char or unsigned short, even in compilers
41267         that lack __typeof__ and are not C11-compatible.
41269         intprops: pacify picky GCC
41270         * lib/intprops.h (_GL_BUILTIN_MUL_OVERFLOW):
41271         Pacify GCC’s complaints about ignoring __builtin_mul_overflow’s
41272         possibly-incorrect result.
41273         (_GL_INT_MULTIPLY_RANGE_OVERFLOW): Pacify GCC’s complaints
41274         about (A) used as a boolean, when A is an expression like 3 * 4.
41276         intprops: support unsigned *_WRAPV results
41277         Add support for unsigned, unsigned long, and unsigned long long
41278         results to INT_ADD_WRAPV, INT_SUBTRACT_WRAPV, and
41279         INT_MULTIPLY_WRAPV.  Also, work around GCC bug 91450, and fix a
41280         bug with unsigned inputs reported by Eli Zaretskii in:
41281         https://lists.gnu.org/r/bug-gnulib/2019-08/msg00012.html
41282         * config/srclist.txt: Break the glibc connection for intprops.h
41283         temporarily, while more testing is done in Gnulib-using apps.
41284         * lib/intprops.h (INT_ADD_WRAPV, INT_SUBTRACT_WRAPV)
41285         (INT_MULTIPLY_WRAPV, _GL_INT_OP_WRAPV, _GL_INT_OP_WRAPV_LONGISH):
41286         Support unsigned results no narrower than unsigned int.  Report
41287         overflow correctly if some arguments are unsigned.
41288         (_GL_BUILTIN_MUL_OVERFLOW): New macro, to work around GCC bug 91450.
41289         (_GL_INT_OP_CALC): Simplify now that the OVERFLOW argument does
41290         the right thing with narrow args.
41291         (_GL_INT_OP_CALC1): Remove.  All callers removed.
41292         (_GL_INT_ADD_RANGE_OVERFLOW, _GL_INT_SUBTRACT_RANGE_OVERFLOW)
41293         (_GL_INT_MULTIPLY_RANGE_OVERFLOW): New macros.
41294         * tests/test-intprops.c: Check for bugs and test new behavior.
41296 2019-08-14  Bruno Haible  <bruno@clisp.org>
41298         get_progname_of: New module.
41299         * lib/get_progname_of.h: New file.
41300         * lib/get_progname_of.c: New file, based on lib/getprogname.c.
41301         * lib/getprogname.c (getprogname): Tweak coding style.
41302         * lib/vma-iter.c (vma_iterate_bsd): Update comment.
41303         * modules/get_progname_of: New file.
41305 2019-08-14  Bruno Haible  <bruno@clisp.org>
41307         get_ppid_of: New module.
41308         * lib/get_ppid_of.h: New file.
41309         * lib/get_ppid_of.c: New file.
41310         * modules/get_ppid_of: New file.
41312 2019-08-13  Bruno Haible  <bruno@clisp.org>
41314         libtextstyle-optional tests: Support the NO_COLOR environment variable.
41315         * tests/test-libtextstyle.c (main): Do not emit styling when the
41316         environment variable NO_COLOR is set.
41318 2019-08-12  Paul Eggert  <eggert@cs.ucla.edu>
41320         verify: improve diagnostic quality in recent GCC
41321         If ‘verify’ fails in a deeply-nested macro, GCC does not output a
41322         useful line number containing the top-level caller of the macro.
41323         So, bring back the older way of issuing a diagnostic containing
41324         the top-level call’s arg, so that it is easier to diagnose
41325         ‘verify’ failures with recent GCC.
41326         * lib/verify.h (_GL_VERIFY_TRUE, _GL_VERIFY_TYPE):
41327         Bring back DIAGNOSTIC arg.  All callers changed.
41328         (verify): Just use _GL_VERIFY.
41330 2019-08-11  Bruno Haible  <bruno@clisp.org>
41332         localcharset: Add more aliases for OS/2.
41333         Based on patch by KO Myung-Hun <komh78@gmail.com> in
41334         <https://lists.gnu.org/archive/html/bug-gnu-libiconv/2019-08/msg00004.html>.
41335         * lib/localcharset.c (alias_table) [OS2]: Add more aliases.
41337 2019-08-10  Eric Blake  <eblake@redhat.com>
41339         configmake: Update advice on usage.
41340         * modules/configmake (Include): No longer necessary to include
41341         last, since configmake.h itself worries about collision avoidance.
41343 2019-08-10  Assaf Gordon <assafgordon@gmail.com>
41345         parse-datetime: fix 'T' military timezone handling
41346         * lib/parse-datetime.y (zone):
41347         follow-up to the previous commit: the 'T' case is handled outside the
41348         conversion table (used as either military timezone UTC-7 or ISO8601
41349         separator). Change it from "HOUR(7)" to "-HOUR(7)" to match other
41350         timezone letters.
41352 2019-08-09  Paul Eggert  <eggert@cs.ucla.edu>
41354         parse-datetime: fix military timezone letters
41355         Problem and trivial fix reported by Neil Hoggarth in:
41356         https://lists.gnu.org/r/bug-gnulib/2019-08/msg00005.html
41357         * lib/parse-datetime.y (military_table):
41358         Do it the right way, not the RFC 822 way.
41360 2019-08-08  Eric Blake  <eblake@redhat.com>
41362         configmake: Avoid namespace pollution issue on mingw.
41363         * modules/configmake (Makefile.am): If the project uses
41364         <winsock2.h>, include that header before defining DATADIR.
41366 2019-07-28  Bruno Haible  <bruno@clisp.org>
41368         mbrtowc tests: Fix regression on mingw (regression from 2018-02-24).
41369         * tests/test-mbrtowc.c (main): Fix expected value of wc.
41371 2019-07-24  Bruno Haible  <bruno@clisp.org>
41373         pthread-h: Fix definitions of types and macros on mingw.
41374         * lib/pthread.in.h (pthread_t, pthread_attr_t, PTHREAD_CREATE_JOINABLE,
41375         PTHREAD_CREATE_DETACHED): Define also when module 'pthread-thread' is
41376         not in use.
41377         (pthread_once_t, PTHREAD_ONCE_INIT): Define also when module
41378         'pthread-once' is not in use.
41379         (pthread_mutex_t, pthread_mutexattr_t, PTHREAD_MUTEX_INITIALIZER,
41380         PTHREAD_MUTEX_DEFAULT, PTHREAD_MUTEX_NORMAL, PTHREAD_MUTEX_ERRORCHECK,
41381         PTHREAD_MUTEX_RECURSIVE): Define also when module 'pthread-mutex' is not
41382         in use.
41383         (pthread_rwlock_t, pthread_rwlockattr_t, PTHREAD_RWLOCK_INITIALIZER):
41384         Define also when module 'pthread-rwlock' is not in use.
41385         (pthread_cond_t, pthread_condattr_t, PTHREAD_COND_INITIALIZER): Define
41386         also when module 'pthread-cond' is not in use.
41387         (pthread_key_t, PTHREAD_DESTRUCTOR_ITERATIONS): Define also when module
41388         'pthread-tss' is not in use.
41389         (pthread_spinlock_t): Define also when module 'pthread-spin' is not in
41390         use.
41392 2019-07-24  Simon Josefsson  <simon@josefsson.org>
41394         crypto/gc: Cope with libgcrypt without SM3.
41395         * lib/gc-libgcrypt.c (gc_hash_open): Guard SM3 usage.
41397 2019-07-23  Paul Eggert  <eggert@cs.ucla.edu>
41399         backupfile: fix resource leak on memory failure
41400         Problem found by Coverity (CID 1484214).
41401         * lib/backupfile.c (backupfile_internal): Don’t leak dirp.
41403 2019-07-22  Bruno Haible  <bruno@clisp.org>
41405         Avoid missing-declarations warning in various tests.
41406         * tests/test-argp.c (fail, test1, test2, test_file, test3, test4, test5,
41407         test6, test_optional, test7, test8, test9, test10, test11, test12,
41408         test13, test14, test15, test_fun): Declare static.
41409         * tests/test-cnd.c (test_cnd_wait): Likewise.
41410         * tests/test-cond.c (test_cond): Likewise.
41412 2019-07-22  Bernhard Voelker  <mail@bernhard-voelker.de>
41414         pthread tests: Avoid missing-declarations warning.
41415         * tests/test-pthread-cond.c (test_pthread_cond_wait): Declare static.
41417 2019-07-19  Bruno Haible  <bruno@clisp.org>
41419         parse-datetime: Avoid warnings from bison versions >= 3.3.
41420         Reported by Bernhard Voelker <mail@bernhard-voelker.de>.
41421         * modules/parse-datetime (Makefile.am): Don't pass option '-y' to bison.
41423 2019-07-19  Bruno Haible  <bruno@clisp.org>
41425         parse-datetime: Require Bison 2.4 or newer.
41426         * m4/parse-datetime.m4 (gl_PARSE_DATETIME): Set PARSE_DATETIME_BISON.
41427         Code taken from gettext's intl.m4.
41428         * modules/parse-datetime (Makefile.am): Use PARSE_DATETIME_BISON instead
41429         of YACC.
41431 2019-07-19  Bruno Haible  <bruno@clisp.org>
41433         areadlink-with-size, xgethostname, xgetdomainname: Fix GCC warning.
41434         * lib/areadlink-with-size.c: Include <string.h>.
41435         * lib/areadlinkat-with-size.c: Likewise.
41436         * lib/xgethostname.c: Likewise.
41437         * lib/xgetdomainname.c: Likewise.
41439 2019-07-19  Bernhard Voelker  <mail@bernhard-voelker.de>
41441         parse-datetime: avoid "%pure-parser" deprecation warning from Bison 3.4
41442         * lib/parse-datetime.y: Use "%define api.pure" rather than obsolescent
41443         "%pure-parser".  The former is available since Bison 2.3b (2008),
41444         while the latter is marked as obsolete since version 3.4 (May 2019).
41446 2019-07-16  Bruno Haible  <bruno@clisp.org>
41448         update-copyright: Make it work again (regression from 2019-06-15).
41449         Reported by Brian C. Lane <bcl@redhat.com>.
41450         * build-aux/update-copyright: Add back the -0777, -p, -i options.
41452 2019-07-14  Bruno Haible  <bruno@clisp.org>
41454         doc: Update info about <pthread.h>.
41455         * doc/posix-headers/pthread.texi: Mention the module 'pthread-h' instead
41456         of 'pthread'.
41458 2019-07-14  Bruno Haible  <bruno@clisp.org>
41460         pthread_sigmask tests: Use new multithread modules.
41461         * tests/test-pthread_sigmask2.c: Include <pthread.h> instead of
41462         glthread/thread.h.
41463         (main_thread, killer_thread): Change type to pthread_t.
41464         (main): Update accordingly.
41465         * modules/pthread_sigmask-tests (Depends-on): Add pthread-thread. Remove
41466         thread.
41468 2019-07-14  Bruno Haible  <bruno@clisp.org>
41470         pthread-tss: Add tests.
41471         * tests/test-pthread-tss.c: New file, based on tests/test-tls.c and
41472         tests/test-tss.c.
41473         * modules/pthread-tss-tests: New file.
41475 2019-07-14  Bruno Haible  <bruno@clisp.org>
41477         pthread-cond: Add tests.
41478         * tests/test-pthread-cond.c: New file, based on tests/test-cond.c and
41479         tests/test-cnd.c.
41480         * modules/pthread-cond-tests: New file.
41482 2019-07-14  Bruno Haible  <bruno@clisp.org>
41484         pthread-rwlock: Add tests.
41485         * tests/test-pthread-rwlock.c: New file, based on tests/test-lock.c.
41486         * modules/pthread-rwlock-tests: New file.
41488 2019-07-14  Bruno Haible  <bruno@clisp.org>
41490         pthread-mutex: Add tests.
41491         * tests/test-pthread-mutex.c: New file, based on tests/test-lock.c and
41492         tests/test-mtx.c.
41493         * modules/pthread-mutex-tests: New file.
41495 2019-07-14  Bruno Haible  <bruno@clisp.org>
41497         pthread-once: Add tests.
41498         * tests/test-pthread-once1.c: New file, based on tests/test-once.c and
41499         tests/test-call_once.c.
41500         * tests/test-pthread-once2.c: New file, based on tests/test-lock.c and
41501         tests/test-mtx.c.
41502         * modules/pthread-once-tests: New file.
41504 2019-07-14  Bruno Haible  <bruno@clisp.org>
41506         pthread-thread: Add tests.
41507         * tests/test-pthread-thread.c: New file, based on
41508         tests/test-thread_create.c and tests/test-thrd_create.c.
41509         * modules/pthread-thread-tests: New file.
41511 2019-07-14  Bruno Haible  <bruno@clisp.org>
41513         pthread: Turn into a convenience module.
41514         * lib/pthread.in.h: Remove declarations for extern inline functions.
41515         * lib/pthread.c: Remove file.
41516         * modules/pthread (Files): Remove it.
41517         (Depends-on): Add pthread-thread, pthread-once, pthread-mutex,
41518         pthread-rwlock, pthread-cond, pthread-tss, pthread-spin.
41519         (configure.ac): Don't compile lib/pthread.c. Don't set GNULIB_PTHREAD.
41520         * m4/pthread_h.m4 (gl_PTHREAD_H_DEFAULTS): Don't initialize
41521         GNULIB_PTHREAD.
41522         * modules/pthread-h (Makefile.am): Don't substitute GNULIB_PTHREAD.
41524 2019-07-14  Bruno Haible  <bruno@clisp.org>
41526         pthread-spin: New module.
41527         * lib/pthread.in.h (pthread_spin_init, pthread_spin_destroy,
41528         pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock): Remove
41529         inline definitions.
41530         * lib/pthread-spin.c: New file.
41531         * m4/pthread-spin.m4: New file.
41532         * modules/pthread-spin: New file.
41533         * doc/posix-functions/pthread_spin_init.texi: Mention the new module.
41534         * doc/posix-functions/pthread_spin_lock.texi: Likewise.
41535         * doc/posix-functions/pthread_spin_trylock.texi: Likewise.
41536         * doc/posix-functions/pthread_spin_unlock.texi: Likewise.
41537         * doc/posix-functions/pthread_spin_destroy.texi: Likewise.
41539 2019-07-14  Bruno Haible  <bruno@clisp.org>
41541         pthread-tss: New module.
41542         * lib/pthread-tss.c: New file.
41543         * m4/pthread-tss.m4: New file.
41544         * modules/pthread-tss: New file.
41545         * doc/posix-functions/pthread_key_create.texi: Mention the new module.
41546         * doc/posix-functions/pthread_setspecific.texi: Likewise.
41547         * doc/posix-functions/pthread_getspecific.texi: Likewise.
41548         * doc/posix-functions/pthread_key_delete.texi: Likewise.
41550 2019-07-14  Bruno Haible  <bruno@clisp.org>
41552         pthread-cond: New module.
41553         * lib/pthread.in.h (pthread_cond_destroy, pthread_cond_init,
41554         pthread_cond_signal, pthread_cond_wait): Remove inline definitions.
41555         * lib/pthread-cond.c: New file.
41556         * m4/pthread-cond.m4: New file.
41557         * modules/pthread-cond: New file.
41558         * doc/posix-functions/pthread_cond_init.texi: Mention the new module.
41559         * doc/posix-functions/pthread_condattr_init.texi: Likewise.
41560         * doc/posix-functions/pthread_condattr_destroy.texi: Likewise.
41561         * doc/posix-functions/pthread_cond_wait.texi: Likewise.
41562         * doc/posix-functions/pthread_cond_timedwait.texi: Likewise.
41563         * doc/posix-functions/pthread_cond_signal.texi: Likewise.
41564         * doc/posix-functions/pthread_cond_broadcast.texi: Likewise.
41565         * doc/posix-functions/pthread_cond_destroy.texi: Likewise.
41567 2019-07-14  Bruno Haible  <bruno@clisp.org>
41569         pthread-rwlock: New module.
41570         * lib/pthread-rwlock.c: New file, based on lib/glthread/lock.c.
41571         * m4/pthread-rwlock.m4: New file.
41572         * modules/pthread-rwlock: New file.
41573         * doc/posix-functions/pthread_rwlock_init.texi: Mention the new module
41574         and the Android problem.
41575         * doc/posix-functions/pthread_rwlockattr_init.texi: Likewise.
41576         * doc/posix-functions/pthread_rwlockattr_destroy.texi: Likewise.
41577         * doc/posix-functions/pthread_rwlock_rdlock.texi: Likewise.
41578         * doc/posix-functions/pthread_rwlock_wrlock.texi: Likewise.
41579         * doc/posix-functions/pthread_rwlock_tryrdlock.texi: Likewise.
41580         * doc/posix-functions/pthread_rwlock_trywrlock.texi: Likewise.
41581         * doc/posix-functions/pthread_rwlock_timedrdlock.texi: Likewise.
41582         * doc/posix-functions/pthread_rwlock_timedwrlock.texi: Likewise.
41583         * doc/posix-functions/pthread_rwlock_unlock.texi: Likewise.
41584         * doc/posix-functions/pthread_rwlock_destroy.texi: Likewise.
41586 2019-07-14  Bruno Haible  <bruno@clisp.org>
41588         pthread-mutex: New module.
41589         * lib/pthread.in.h (pthread_mutexattr_destroy, pthread_mutexattr_init,
41590         pthread_mutexattr_settype, pthread_mutex_destroy, pthread_mutex_init,
41591         pthread_mutex_lock, pthread_mutex_trylock, pthread_mutex_timedlock,
41592         pthread_mutex_unlock): Remove inline definitions.
41593         * lib/pthread-mutex.c: New file.
41594         * m4/pthread-mutex.m4: New file.
41595         * modules/pthread-mutex: New file.
41596         * doc/posix-functions/pthread_mutex_init.texi: Mention the new module.
41597         * doc/posix-functions/pthread_mutexattr_init.texi: Likewise.
41598         * doc/posix-functions/pthread_mutexattr_gettype.texi: Likewise.
41599         * doc/posix-functions/pthread_mutexattr_settype.texi: Likewise.
41600         * doc/posix-functions/pthread_mutexattr_getrobust.texi: Likewise.
41601         * doc/posix-functions/pthread_mutexattr_setrobust.texi: Likewise.
41602         * doc/posix-functions/pthread_mutexattr_destroy.texi: Likewise.
41603         * doc/posix-functions/pthread_mutex_lock.texi: Likewise.
41604         * doc/posix-functions/pthread_mutex_trylock.texi: Likewise.
41605         * doc/posix-functions/pthread_mutex_timedlock.texi: Likewise.
41606         * doc/posix-functions/pthread_mutex_unlock.texi: Likewise.
41607         * doc/posix-functions/pthread_mutex_destroy.texi: Likewise.
41609 2019-07-14  Bruno Haible  <bruno@clisp.org>
41611         pthread-once: New module.
41612         * lib/pthread-once.c: New file.
41613         * m4/pthread-once.m4: New file.
41614         * modules/pthread-once: New file.
41615         * doc/posix-functions/pthread_once.texi: Mention the new module.
41617 2019-07-14  Bruno Haible  <bruno@clisp.org>
41619         pthread-thread: New module.
41620         * lib/pthread.in.h (pthread_create, pthread_exit, pthread_join): Remove
41621         inline definitions.
41622         * lib/pthread-thread.c: New file.
41623         * m4/pthread-thread.m4: New file.
41624         * modules/pthread-thread: New file.
41625         * doc/posix-functions/pthread_create.texi: Mention the new module.
41626         * doc/posix-functions/pthread_attr_init.texi: Likewise.
41627         * doc/posix-functions/pthread_attr_getdetachstate.texi: Likewise.
41628         * doc/posix-functions/pthread_attr_setdetachstate.texi: Likewise.
41629         * doc/posix-functions/pthread_attr_destroy.texi: Likewise.
41630         * doc/posix-functions/pthread_self.texi: Likewise.
41631         * doc/posix-functions/pthread_equal.texi: Likewise.
41632         * doc/posix-functions/pthread_detach.texi: Likewise.
41633         * doc/posix-functions/pthread_join.texi: Likewise.
41634         * doc/posix-functions/pthread_exit.texi: Likewise.
41636 2019-07-14  Bruno Haible  <bruno@clisp.org>
41638         pthread-h: Prepare for adding new modules.
41639         * lib/pthread.in.h: Define the types and macros for each of the
41640         facilities separately.
41641         * m4/pthread_h.m4 (gl_PTHREAD_H): Set HAVE_PTHREAD_CREATE_DETACHED,
41642         HAVE_PTHREAD_MUTEX_RECURSIVE, HAVE_PTHREAD_MUTEX_ROBUST,
41643         HAVE_PTHREAD_PROCESS_SHARED.
41644         (gl_PTHREAD_H_DEFAULTS): Initialize HAVE_PTHREAD_CREATE_DETACHED,
41645         HAVE_PTHREAD_MUTEX_RECURSIVE, HAVE_PTHREAD_MUTEX_ROBUST,
41646         HAVE_PTHREAD_PROCESS_SHARED.
41647         * modules/pthread-h (Makefile.am): Substitute
41648         HAVE_PTHREAD_CREATE_DETACHED, HAVE_PTHREAD_MUTEX_RECURSIVE,
41649         HAVE_PTHREAD_MUTEX_ROBUST, HAVE_PTHREAD_PROCESS_SHARED.
41651 2019-07-14  Bruno Haible  <bruno@clisp.org>
41653         pthread-h: Add declarations of essential pthread functions.
41654         * lib/pthread.in.h: Include snippets.
41655         (pthread_create, pthread_attr_init, pthread_attr_getdetachstate,
41656         pthread_attr_setdetachstate, pthread_attr_destroy, pthread_self,
41657         pthread_equal, pthread_detach, pthread_join, pthread_exit, pthread_once,
41658         pthread_mutex_init, pthread_mutexattr_init, pthread_mutexattr_gettype,
41659         pthread_mutexattr_settype, pthread_mutexattr_getrobust,
41660         pthread_mutexattr_setrobust, pthread_mutexattr_destroy,
41661         pthread_mutex_lock, pthread_mutex_trylock, pthread_mutex_unlock,
41662         pthread_mutex_destroy, pthread_rwlock_init, pthread_rwlockattr_init,
41663         pthread_rwlockattr_destroy, pthread_rwlock_rdlock,
41664         pthread_rwlock_wrlock, pthread_rwlock_tryrdlock,
41665         pthread_rwlock_trywrlock, pthread_rwlock_timedrdlock,
41666         pthread_rwlock_timedwrlock, pthread_rwlock_unlock,
41667         pthread_rwlock_destroy, pthread_cond_init, pthread_condattr_init,
41668         pthread_condattr_destroy, pthread_cond_wait, pthread_cond_timedwait,
41669         pthread_cond_signal, pthread_cond_broadcast, pthread_cond_destroy,
41670         pthread_key_create, pthread_setspecific, pthread_getspecific,
41671         pthread_key_delete, pthread_spin_init, pthread_spin_lock,
41672         pthread_spin_trylock, pthread_spin_unlock, pthread_spin_destroy): New
41673         declarations.
41674         (pthread_mutex_timedlock): Move declaration.
41675         * m4/pthread_h.m4 (gl_PTHREAD_H): Check whether the new functions are
41676         declared.
41677         (gl_PTHREAD_H_DEFAULTS): Initialize GNULIB_PTHREAD_THREAD,
41678         GNULIB_PTHREAD_ONCE, GNULIB_PTHREAD_MUTEX, GNULIB_PTHREAD_RWLOCK,
41679         GNULIB_PTHREAD_COND, GNULIB_PTHREAD_TSS, GNULIB_PTHREAD_SPIN and the
41680         HAVE_* and REPLACE_* variables for the new functions.
41681         * modules/pthread-h (Depends-on): Add snippet/c++defs,
41682         snippet/_Noreturn, snippet/arg-nonnull, snippet/warn-on-use.
41683         (Makefile.am): Substitute GNULIB_PTHREAD_THREAD, GNULIB_PTHREAD_ONCE,
41684         GNULIB_PTHREAD_MUTEX, GNULIB_PTHREAD_RWLOCK, GNULIB_PTHREAD_COND,
41685         GNULIB_PTHREAD_TSS, GNULIB_PTHREAD_SPIN and the HAVE_* and REPLACE_*
41686         variables for the new functions. Split the sed script, to avoid the
41687         limit of 99 commands of HP-UX sed.
41688         * tests/test-pthread-c++.cc: Check the signature of the new functions.
41690 2019-07-14  Bruno Haible  <bruno@clisp.org>
41692         pthread-h: Respect --enable-threads={posix|windows} option on mingw.
41693         * m4/pthread_h.m4 (gl_PTHREAD_H): Require gl_THREADLIB. Set
41694         HAVE_PTHREAD_H if gl_threads_api is 'windows'.
41695         (LIB_PTHREAD): Rely on $LIBMULTITHREAD from threadlib.m4.
41696         * modules/pthread (Link): Change to $(LIBMULTITHREAD).
41697         * modules/pthread-h (Depends-on): Add threadlib.
41698         (Link): Change to $(LIBTHREAD).
41699         * modules/pthread-h-c++-tests (test_pthread_c___LDADD): Use
41700         $(LIBMULTITHREAD) instead of $(LIB_PTHREAD).
41702 2019-07-14  Bruno Haible  <bruno@clisp.org>
41704         pthread-h: Add C++ tests.
41705         * tests/test-pthread-c++.cc: New file.
41706         * modules/pthread-h-c++-tests: New file.
41708 2019-07-14  Bruno Haible  <bruno@clisp.org>
41710         pthread-h: Add tests.
41711         * tests/test-pthread.c: New file.
41712         * modules/pthread-h-tests: New file.
41714 2019-07-14  Bruno Haible  <bruno@clisp.org>
41716         pthread-h: New module.
41717         * lib/pthread.in.h: Define replacement functions only if GNULIB_PTHREAD
41718         is 1.
41719         * m4/pthread_h.m4: Renamed from m4/pthread.m4.
41720         (gl_PTHREAD_H): Renamed from gl_PTHREAD_CHECK. Don't test whether
41721         <pthread.h> pollutes the namespace; instead, prepare for generating a
41722         pthread.h always. Substitute HAVE_PTHREAD_H here.
41723         (gl_PTHREAD_H_DEFAULTS): Renamed from gl_PTHREAD_DEFAULTS. Initialize
41724         GNULIB_PTHREAD. Don't initialize HAVE_PTHREAD_H here.
41725         * modules/pthread-h: New file, based on modules/pthread.
41726         * modules/pthread: Rely on 'pthread-h'.
41727         * m4/pthread_mutex_timedlock.m4 (gl_FUNC_PTHREAD_MUTEX_TIMEDLOCK):
41728         Update.
41729         * modules/pthread_mutex_timedlock (Depends-on): Add pthread-h. Remove
41730         pthread.
41732 2019-07-14  Bruno Haible  <bruno@clisp.org>
41734         sched_yield: New module.
41735         * lib/sched.in.h: Add _GL_FUNCDECL_RPL, _GL_WARN_ON_USE placeholders.
41736         (sched_yield): New declaration.
41737         * lib/sched_yield.c: New file.
41738         * m4/sched_yield.m4: New file.
41739         * m4/sched_h.m4 (gl_SCHED_H): Require gl_SCHED_H_DEFAULTS. Arrange to
41740         provide a replacement sched.h always. Test whether sched_yield is
41741         declared.
41742         (gl_SCHED_MODULE_INDICATOR, gl_SCHED_H_DEFAULTS): New macros.
41743         * modules/sched (Depends-on): Add snippet/c++defs, snippet/warn-on-use.
41744         (Makefile.am): Provide a replacement sched.h always. Substitute
41745         GNULIB_SCHED_YIELD, HAVE_SCHED_YIELD, REPLACE_SCHED_YIELD,
41746         _GL_FUNCDECL_RPL, _GL_WARN_ON_USE.
41747         * modules/sched_yield: New file.
41748         * doc/posix-functions/sched_yield.texi: Mention the new module.
41750 2019-07-14  Bruno Haible  <bruno@clisp.org>
41752         windows-spin: New module.
41753         * lib/windows-spin.h: New file.
41754         * lib/windows-spin.c: New file.
41755         * modules/windows-spin: New file.
41757 2019-07-14  Bruno Haible  <bruno@clisp.org>
41759         windows-timedrwlock: New module.
41760         * lib/windows-timedrwlock.h: New file, based on windows-rwlock.h.
41761         * lib/windows-timedrwlock.c: New file, based on windows-rwlock.c and
41762         windows-cond.c.
41763         * lib/windows-cond.h (struct glwthread_waitqueue_link): Protect against
41764         redefinition conflict with windows-timedrwlock.h.
41765         * modules/windows-timedrwlock: New file.
41767 2019-07-14  Bruno Haible  <bruno@clisp.org>
41769         windows-rwlock: New module.
41770         * lib/windows-rwlock.h: New file, extracted from lib/glthread/lock.h.
41771         * lib/windows-rwlock.c: New file, extracted from lib/glthread/lock.c.
41772         * lib/glthread/lock.h: Include windows-rwlock.h. Don't include
41773         windows-initguard.h.
41774         (gl_rwlock_t): Define using glwthread_rwlock_t.
41775         (gl_rwlock_initializer): Define using GLWTHREAD_RWLOCK_INIT.
41776         (glthread_rwlock_init): Define using glwthread_rwlock_init.
41777         (glthread_rwlock_rdlock): Define using glwthread_rwlock_rdlock.
41778         (glthread_rwlock_wrlock): Define using glwthread_rwlock_wrlock.
41779         (glthread_rwlock_unlock): Define using glwthread_rwlock_unlock.
41780         (glthread_rwlock_destroy): Define using glwthread_rwlock_destroy.
41781         (glthread_rwlock_init_func, glthread_rwlock_rdlock_func,
41782         glthread_rwlock_wrlock_func, glthread_rwlock_unlock_func,
41783         glthread_rwlock_destroy_func): Remove declarations.
41784         * lib/glthread/lock.c (gl_waitqueue_t): Remove type.
41785         (gl_waitqueue_init, gl_waitqueue_add, gl_waitqueue_notify_first,
41786         gl_waitqueue_notify_all, glthread_rwlock_init_func,
41787         glthread_rwlock_rdlock_func, glthread_rwlock_wrlock_func,
41788         glthread_rwlock_unlock_func, glthread_rwlock_destroy_func): Remove
41789         functions.
41790         * modules/windows-rwlock: New file.
41791         * modules/lock (Depends-on): Add windows-rwlock.
41793 2019-07-14  Bruno Haible  <bruno@clisp.org>
41795         windows-thread: Add support for creating a thread in detached state.
41796         * lib/windows-thread.h (GLWTHREAD_ATTR_DETACHED): New macro.
41797         (glwthread_thread_create): Add attr argument.
41798         * lib/windows-thread.c (glwthread_thread_create): Likewise.
41799         * lib/glthread/thread.h (glthread_create): Update.
41800         * lib/thrd.c (thrd_create): Update.
41802 2019-07-14  Bruno Haible  <bruno@clisp.org>
41804         windows-*: Rename glwthread_spinlock_t to glwthread_initguard_t.
41805         * lib/windows-initguard.h: Renamed from lib/windows-spinlock.h.
41806         (glwthread_initguard_t): Renamed from glwthread_spinlock_t.
41807         (GLWTHREAD_INITGUARD_INIT): Renamed from GLWTHREAD_SPINLOCK_INIT.
41808         * lib/windows-mutex.h: Update.
41809         * lib/windows-recmutex.h: Likewise.
41810         * lib/windows-timedmutex.h: Likewise.
41811         * lib/windows-timedrecmutex.h: Likewise.
41812         * lib/windows-cond.h: Likewise.
41813         * lib/glthread/lock.h: Likewise.
41814         * modules/windows-mutex (Files): Add lib/windows-initguard.h. Remove
41815         lib/windows-spinlock.h.
41816         * modules/windows-recmutex (Files): Likewise.
41817         * modules/windows-timedmutex (Files): Likewise.
41818         * modules/windows-timedrecmutex (Files): Likewise.
41819         * modules/windows-cond (Files): Likewise.
41820         * modules/threads-h (Files): Likewise.
41822 2019-07-14  Bruno Haible  <bruno@clisp.org>
41824         doc: Fix info about pthread API in HP-UX.
41825         * doc/posix-functions/pthread_*.texi: Fix info about HP-UX 11.
41827 2019-07-14  Bruno Haible  <bruno@clisp.org>
41829         threads-h: Fix generation of threads.h.
41830         * modules/threads-h (Makefile.am): Insert the required header file
41831         snippets.
41833 2019-07-09  Bruno Haible  <bruno@clisp.org>
41835         striconveh test: Fix a compilation failure when iconv is not available.
41836         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
41837         * tests/test-striconveh.c (main): Move iconv_close invocations inside
41838         HAVE_ICONV.
41840 2019-07-07  Akim Demaille  <akim@lrde.epita.fr>
41842         argmatch: adjust columns for help2man.
41843         * lib/argmatch.h (argmatch_##Name##_doc_col): If some argument
41844         requires column 20 or more, return 20.
41846 2019-07-06  Paul Eggert  <eggert@cs.ucla.edu>
41848         areadlink-with-size: avoid realloc when size==0
41849         * lib/areadlink-with-size.c (areadlink_with_size):
41850         * lib/areadlinkat-with-size.c (areadlinkat_with_size):
41851         Reallocate at the end to the actual size, to avoid memory waste,
41852         as suggested by Bruno Haible.  But when the guessed size is zero -
41853         useful when the size is unknown - do the initial small readlink
41854         into the stack, to avoid that realloc in the usual case.
41856 2019-07-06  Pádraig Brady  <P@draigBrady.com>
41858         areadlink-with-size: guess a buffer size with 0 size
41859         The size is usually taken from st_size, which can be zero,
41860         resulting in inefficient operation.
41861         Instead let zero select an initial memory allocation
41862         of 128 bytes, which most symlinks fit within.
41863         * lib/areadlink-with-size.c (areadlink_with_size):
41864         Start with a 128 byte buffer, for SIZE == 0.
41865         * lib/areadlinkat-with-size.c (areadlinkat_with_size): Likewise.
41867 2019-07-06  Konstantin Kharlamov  <Hi-Angel@yandex.ru>
41869         Replace manually crafted hex regexes with [:xdigit:]
41870         * build-aux/gitlog-to-changelog (parse_amend_file)
41871         (git_dir_option):
41872         Replace various combinations of [0-9a-fA-F] with [[:xdigit:]].
41873         This patch is backported from Emacs (Bug#36167).
41875 2019-07-06  Bruno Haible  <bruno@clisp.org>
41877         error: Fix documentation.
41878         * doc/glibc-functions/error_at_line.texi: Document what the 'error'
41879         module provides.
41880         * doc/glibc-functions/error_message_count.texi: Likewise.
41881         * doc/glibc-functions/error_one_per_line.texi: Likewise.
41882         * doc/glibc-functions/error_print_progname.texi: Likewise.
41884 2019-07-06  Bruno Haible  <bruno@clisp.org>
41886         doc: Remove documentation of glibc <= 2.1.x as a supported platform.
41887         * doc/gnulib-intro.texi (Target Platforms): Mention that glibc 2.1.x
41888         and older is unsupported.
41889         * doc/**/*.texi: Update.
41891 2019-07-06  Bruno Haible  <bruno@clisp.org>
41893         doc: Remove documentation of Linux libc5 as a supported platform.
41894         * doc/posix-functions/iswalnum.texi: Don't mention workarounds specific
41895         to Linux libc5.
41896         * doc/posix-functions/iswalpha.texi: Likewise.
41897         * doc/posix-functions/iswblank.texi: Likewise.
41898         * doc/posix-functions/iswcntrl.texi: Likewise.
41899         * doc/posix-functions/iswdigit.texi: Likewise.
41900         * doc/posix-functions/iswgraph.texi: Likewise.
41901         * doc/posix-functions/iswlower.texi: Likewise.
41902         * doc/posix-functions/iswprint.texi: Likewise.
41903         * doc/posix-functions/iswpunct.texi: Likewise.
41904         * doc/posix-functions/iswspace.texi: Likewise.
41905         * doc/posix-functions/iswupper.texi: Likewise.
41906         * doc/posix-functions/iswxdigit.texi: Likewise.
41907         * doc/posix-functions/snprintf.texi: Likewise.
41908         * doc/posix-functions/vsnprintf.texi: Likewise.
41910 2019-07-06  Bruno Haible  <bruno@clisp.org>
41912         doc: Remove documentation of Tandem/NSK as a supported platform.
41913         * doc/posix-headers/stdlib.texi: Don't mention workarounds specific to
41914         Tandem/NSK.
41915         * doc/**/*.texi: Update.
41917 2019-07-06  Bruno Haible  <bruno@clisp.org>
41919         doc: Remove documentation of Mac OS X <= 10.4 as a supported platform.
41920         * doc/gnulib-intro.texi (Target Platforms): Mention that Mac OS X 10.4
41921         and older is unsupported.
41922         * doc/posix-functions/acosl.texi: Don't mention workarounds specific to
41923         Mac OS X 10.4 and older.
41924         * doc/posix-functions/asinl.texi: Likewise.
41925         * doc/posix-functions/atanl.texi: Likewise.
41926         * doc/posix-functions/cosl.texi: Likewise.
41927         * doc/posix-functions/expl.texi: Likewise.
41928         * doc/posix-functions/frexpl.texi: Likewise.
41929         * doc/posix-functions/gettimeofday.texi: Likewise.
41930         * doc/posix-functions/logl.texi: Likewise.
41931         * doc/posix-functions/mkstemp.texi: Likewise.
41932         * doc/posix-functions/sinl.texi: Likewise.
41933         * doc/posix-functions/sqrtl.texi: Likewise.
41934         * doc/posix-functions/tanl.texi: Likewise.
41935         * doc/posix-functions/wcswidth.texi: Likewise.
41936         * doc/**/*.texi: Update.
41938 2019-07-06  Bruno Haible  <bruno@clisp.org>
41940         doc: Remove documentation of AIX 4 as a supported platform.
41941         * doc/gnulib-intro.texi (Target Platforms): Mention that AIX 4 is
41942         unsupported.
41943         * doc/posix-functions/nanosleep.texi: Don't mention AIX 4 specific
41944         workarounds.
41945         * doc/posix-functions/strnlen.texi: Likewise.
41946         * doc/posix-headers/inttypes.texi: Likewise.
41947         * doc/**/*.texi: Update.
41949 2019-07-06  Bruno Haible  <bruno@clisp.org>
41951         doc: Remove documentation of HP-UX 10 as a supported platform.
41952         * doc/gnulib-intro.texi (Target Platforms): Mention that HP-UX 10 is
41953         unsupported.
41954         * doc/*-functions/*printf.texi: Don't mention HP-UX 10 specific
41955         workarounds.
41956         * doc/posix-functions/gmtime_r.texi: Likewise.
41957         * doc/posix-functions/localtime_r.texi: Likewise.
41958         * doc/posix-functions/mkstemp.texi: Likewise.
41959         * doc/**/*.texi: Update.
41961 2019-07-06  Bruno Haible  <bruno@clisp.org>
41963         doc: Remove documentation of Interix 3.5 as a supported platform.
41964         * doc/gnulib-intro.texi (Target Platforms): Mention that Interix is
41965         unsupported.
41966         * doc/posix-functions/select.texi: Don't mention Interix specific
41967         workarounds.
41968         * doc/posix-headers/signal.texi: Likewise.
41969         * doc/**/*.texi: Update.
41971 2019-07-06  Bruno Haible  <bruno@clisp.org>
41973         doc: Remove documentation of IRIX 6.4 and older as supported platforms.
41974         * doc/gnulib-intro.texi (Target Platforms): Mention that IRIX <= 6.4 is
41975         unsupported.
41976         * doc/pastposix-functions/usleep.texi: Don't mention IRIX specific
41977         workarounds.
41978         * doc/posix-functions/nl_langinfo.texi: Likewise.
41979         * doc/posix-functions/remainder.texi: Likewise.
41980         * doc/posix-functions/towlower.texi: Likewise.
41981         * doc/posix-functions/towupper.texi: Likewise.
41982         * doc/posix-functions/vsnprintf.texi: Likewise.
41983         * doc/posix-functions/wcscat.texi: Likewise.
41984         * doc/posix-functions/wcschr.texi: Likewise.
41985         * doc/posix-functions/wcscmp.texi: Likewise.
41986         * doc/posix-functions/wcscpy.texi: Likewise.
41987         * doc/posix-functions/wcscspn.texi: Likewise.
41988         * doc/posix-functions/wcslen.texi: Likewise.
41989         * doc/posix-functions/wcsncat.texi: Likewise.
41990         * doc/posix-functions/wcsncmp.texi: Likewise.
41991         * doc/posix-functions/wcsncpy.texi: Likewise.
41992         * doc/posix-functions/wcspbrk.texi: Likewise.
41993         * doc/posix-functions/wcsrchr.texi: Likewise.
41994         * doc/posix-functions/wcsspn.texi: Likewise.
41995         * doc/posix-headers/langinfo.texi: Likewise.
41996         * doc/posix-headers/signal.texi: Likewise.
41997         * doc/posix-headers/wchar.texi: Likewise.
41998         * doc/posix-headers/wctype.texi: Likewise.
41999         * doc/**/*.texi: Update.
42001 2019-07-05  Bruno Haible  <bruno@clisp.org>
42003         doc: Remove documentation of OSF/1 as supported platform.
42004         * doc/gnulib-intro.texi (Target Platforms): Mention that OSF/1 is
42005         unsupported.
42006         * doc/glibc-functions/getdomainname.texi: Don't mention OSF/1 specific
42007         workarounds.
42008         * doc/glibc-functions/pthread_setname_np.texi: Likewise.
42009         * doc/glibc-functions/ptsname_r.texi: Likewise.
42010         * doc/posix-functions/ceil.texi: Likewise.
42011         * doc/posix-functions/ceilf.texi: Likewise.
42012         * doc/posix-functions/ceill.texi: Likewise.
42013         * doc/posix-functions/fchdir.texi: Likewise.
42014         * doc/posix-functions/floor.texi: Likewise.
42015         * doc/posix-functions/floorf.texi: Likewise.
42016         * doc/posix-functions/fmod.texi: Likewise.
42017         * doc/posix-functions/fmodf.texi: Likewise.
42018         * doc/posix-functions/fmodl.texi: Likewise.
42019         * doc/posix-functions/log.texi: Likewise.
42020         * doc/posix-functions/logf.texi: Likewise.
42021         * doc/posix-functions/logl.texi: Likewise.
42022         * doc/posix-functions/log10.texi: Likewise.
42023         * doc/posix-functions/log10f.texi: Likewise.
42024         * doc/posix-functions/log10l.texi: Likewise.
42025         * doc/posix-functions/log2.texi: Likewise.
42026         * doc/posix-functions/log2f.texi: Likewise.
42027         * doc/posix-functions/log2l.texi: Likewise.
42028         * doc/posix-functions/mbrtowc.texi: Likewise.
42029         * doc/posix-functions/recv.texi: Likewise.
42030         * doc/posix-functions/recvfrom.texi: Likewise.
42031         * doc/posix-functions/remainder.texi: Likewise.
42032         * doc/posix-functions/remainderf.texi: Likewise.
42033         * doc/posix-functions/remainderl.texi: Likewise.
42034         * doc/posix-functions/round.texi: Likewise.
42035         * doc/posix-functions/roundf.texi: Likewise.
42036         * doc/posix-functions/roundl.texi: Likewise.
42037         * doc/posix-functions/send.texi: Likewise.
42038         * doc/posix-functions/sendto.texi: Likewise.
42039         * doc/posix-functions/setenv.texi: Likewise.
42040         * doc/posix-functions/snprintf.texi: Likewise.
42041         * doc/posix-functions/tcgetsid.texi: Likewise.
42042         * doc/posix-functions/trunc.texi: Likewise.
42043         * doc/posix-functions/truncf.texi: Likewise.
42044         * doc/posix-functions/truncl.texi: Likewise.
42045         * doc/posix-functions/ttyname_r.texi: Likewise.
42046         * doc/posix-functions/unsetenv.texi: Likewise.
42047         * doc/posix-functions/wcsrtombs.texi: Likewise.
42048         * doc/posix-headers/sys_select.texi: Likewise.
42049         * doc/posix-headers/wchar.texi: Likewise.
42050         * doc/posix-headers/wctype.texi: Likewise.
42051         * doc/**/*.texi: Update.
42053 2019-07-05  Bruno Haible  <bruno@clisp.org>
42055         doc: Remove documentation of BSDI and BSD/OS as supported platforms.
42056         * doc/**/*.texi: Update.
42058 2019-07-05  Bruno Haible  <bruno@clisp.org>
42060         doc: Remove documentation of Solaris 8 and older as supported platforms.
42061         * doc/gnulib-intro.texi (Target Platforms): Mention that Solaris <= 8 is
42062         unsupported.
42063         * doc/posix-functions/mbrtowc.texi: Don't mention Solaris specific
42064         workarounds.
42065         * doc/posix-functions/memcmp.texi: Likewise.
42066         * doc/posix-functions/rename.texi: Likewise.
42067         * doc/posix-functions/tzset.texi: Likewise.
42068         * doc/posix-headers/wctype.texi: Likewise.
42069         * doc/**/*.texi: Update.
42071 2019-07-05  Bruno Haible  <bruno@clisp.org>
42073         doc: Remove documentation of Interix 3.5 as a supported platform.
42074         * doc/**/*.texi: Update.
42076 2019-07-05  Bruno Haible  <bruno@clisp.org>
42078         doc: Remove documentation of BeOS as a supported platform.
42079         * doc/gnulib-intro.texi (Target Platforms): Mention that BeOS is
42080         unsupported.
42081         * doc/*-functions/*printf.texi: Don't mention BeOS specific workarounds.
42082         * doc/posix-functions/getdelim.texi: Likewise.
42083         * doc/**/*.texi: Update.
42085 2019-07-05  Bruno Haible  <bruno@clisp.org>
42087         thread, lock, cond, tls: Remove support for Pth threads.
42088         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Don't document
42089         --enable-threads=pth any more.
42090         (gl_THREADLIB_BODY): Don't set USE_PTH_THREADS any more.
42091         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Update comment.
42092         * m4/threads.m4 (gl_THREADS_H): Remove test for conflict between Pth
42093         threads and ISO C11 threads.
42094         * lib/glthread/thread.h: Remove code for USE_PTH_THREADS.
42095         * lib/glthread/lock.h: Likewise.
42096         * lib/glthread/lock.c: Likewise.
42097         * lib/glthread/cond.h: Likewise.
42098         * lib/glthread/cond.c: Likewise.
42099         * lib/glthread/tls.h: Likewise.
42100         * lib/glthread/tls.c: Likewise.
42101         * lib/glthread/yield.h: Likewise.
42102         * lib/regex_internal.h: Likewise.
42103         * tests/test-thread_create.c: Likewise.
42104         * tests/test-lock.c: Likewise.
42105         * tests/test-cond.c: Likewise.
42106         * tests/test-tls.c: Likewise.
42107         * tests/test-rwlock1.c: Don't include glthread/yield.h.
42108         (main): Sleep without calling gl_thread_yield.
42110 2019-07-05  Bruno Haible  <bruno@clisp.org>
42112         thread, lock, cond, tls: Remove support for old Solaris threads.
42113         Solaris >= 2.5.1 has POSIX threads.
42114         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Don't document
42115         --enable-threads=solaris any more.
42116         (gl_THREADLIB_BODY): Don't set USE_SOLARIS_THREADS any more.
42117         * lib/glthread/thread.c: Update comment.
42118         * lib/glthread/thread.h: Remove code for USE_SOLARIS_THREADS.
42119         * lib/glthread/lock.h: Likewise.
42120         * lib/glthread/lock.c: Likewise.
42121         * lib/glthread/cond.h: Likewise.
42122         * lib/glthread/cond.c: Likewise.
42123         * lib/glthread/tls.h: Likewise.
42124         * lib/glthread/tls.c: Likewise.
42125         * lib/glthread/yield.h: Likewise.
42126         * lib/regex_internal.h: Likewise.
42127         * tests/test-thread_create.c: Likewise.
42128         * tests/test-lock.c: Likewise.
42129         * tests/test-cond.c: Likewise.
42130         * tests/test-tls.c: Likewise.
42132 2019-07-05  Bruno Haible  <bruno@clisp.org>
42134         getcwd-lgpl, getcwd: Don't call realloc when it is pointless.
42135         * lib/getcwd-lgpl.c (rpl_getcwd): Don't call realloc if the result's
42136         needed size is equal to the allocated size.
42137         * lib/getcwd.c (__getcwd): Likewise.
42139 2019-07-05  Bruno Haible  <bruno@clisp.org>
42141         xgetdomainname: Don't return an excessive memory allocation.
42142         * lib/xgetdomainname.c (xgetdomainname): Shrink the domainname buffer
42143         before returning it.
42145 2019-07-05  Bruno Haible  <bruno@clisp.org>
42147         xgethostname: Don't return an excessive memory allocation.
42148         * lib/xgethostname.c (xgethostname): Shrink the hostname buffer before
42149         returning it.
42151 2019-07-05  Bruno Haible  <bruno@clisp.org>
42153         areadlinkat-with-size: Don't return an excessive memory allocation.
42154         * lib/areadlinkat-with-size.c (areadlinkat_with_size): Shrink the buffer
42155         before returning it.
42157 2019-07-05  Bruno Haible  <bruno@clisp.org>
42159         areadlink-with-size: Don't return an excessive memory allocation.
42160         Reported by Andreas Dilger <adilger@whamcloud.com>.
42161         * lib/areadlink-with-size.c (areadlink_with_size): Shrink the buffer
42162         before returning it.
42164 2019-07-03  Bruno Haible  <bruno@clisp.org>
42166         renameatu: Fix test failure on MSVC.
42167         * lib/at-func2.c (at_func2): Fail with ENOENT if file1 or file2 is the
42168         empty string.
42170 2019-07-03  Bruno Haible  <bruno@clisp.org>
42172         mbrtowc: Fix invalid use of mbtowc() on MSVC.
42173         * lib/mbrtowc.c: Include glthread/lock.h.
42174         (mbtowc_lock): New variable.
42175         (mbrtowc): Treat UTF-8 encoding without locking. For the other
42176         encodings, explicitly reset the internal state of mbtowc, and protect
42177         this through a lock.
42178         * modules/mbrtowc (Depends-on): Add lock.
42180 2019-07-03  Akim Demaille  <akim@lrde.epita.fr>
42182         argmatch: don't define _ in the header.
42183         Reported by Jim Meyering.
42184         * lib/argmatch.h (N_, _): Don't define.
42185         Use gettext instead.
42186         * lib/argmatch.h (_): Define.
42187         * tests/test-argmatch.c (N_): Define.
42189 2019-07-02  Paul Eggert  <eggert@cs.ucla.edu>
42191         verify: document ‘assume’ better
42192         * lib/verify.h: Reword doc (Bug#36370).
42194 2019-07-02  Bruno Haible  <bruno@clisp.org>
42196         localcharset, nl_langinfo: Fix return value for UTF-8 locales on MSVC.
42197         * lib/localcharset.c (locale_charset): Return "UTF-8" instead of
42198         "CPutf8".
42199         * lib/nl_langinfo.c (ctype_codeset): Likewise.
42201 2019-07-02  Bruno Haible  <bruno@clisp.org>
42203         getcwd: Fix crash when invoked with size = 0 on MSVC.
42204         * lib/getcwd.c: Include msvc-inval.h.
42205         (getcwd_nothrow): New function/macro.
42206         (getcwd_system): New macro.
42207         (__getcwd): Use it instead of getcwd.
42208         * modules/getcwd (Depends-on): Add msvc-inval.
42209         * doc/posix-functions/getcwd.texi: Mention the MSVC issue.
42211 2019-07-02  Bruno Haible  <bruno@clisp.org>
42213         nonblocking-pipe tests: Fix test failure on MSVC.
42214         * tests/test-nonblocking-pipe.h (PIPE_DATA_BLOCK_SIZE): Set to 10000 on
42215         native Windows.
42217 2019-07-02  Bruno Haible  <bruno@clisp.org>
42219         usleep: Implement with millisecond resolution on native Windows.
42220         * lib/usleep.c (usleep): On native Windows, implement using Sleep().
42221         * doc/pastposix-functions/usleep.texi: Update accordingly.
42223 2019-07-02  Bruno Haible  <bruno@clisp.org>
42225         lstat tests: Fix test failure on MSVC.
42226         * tests/test-lstat.h (test_lstat_func): Don't test SAME_INODE values on
42227         native Windows, unless _GL_WINDOWS_STAT_INODES is defined.
42229 2019-07-02  Bruno Haible  <bruno@clisp.org>
42231         stat tests: Fix test failure on MSVC.
42232         * tests/test-stat.h (test_stat_func): Don't test SAME_INODE values on
42233         native Windows, unless _GL_WINDOWS_STAT_INODES is defined.
42235 2019-07-02  Bruno Haible  <bruno@clisp.org>
42237         getaddrinfo tests: Fix test failure on MSVC.
42238         * tests/test-getaddrinfo.c: Include sockets.h.
42239         (main): Invoke gl_sockets_startup.
42240         * modules/getaddrinfo-tests (Depends-on): Add sockets.
42242 2019-07-01  Hannes Müller  <h.c.f.mueller@gmx.de>
42244         poll: Fix type of timeout pointer passed to select() on mingw x86_64.
42245         * lib/poll.c: Call Windows native select() with Windows native timeval.
42247 2019-06-30  Bruno Haible  <bruno@clisp.org>
42249         argmatch: Fix compilation errors.
42250         * lib/argmatch.h: Include <limits.h>, for INT_MAX.
42251         * tests/test-argmatch.c (main): Update after last-minute function names
42252         change.
42254 2019-06-30  Bruno Haible  <bruno@clisp.org>
42256         Include <stdlib.h> when needed.
42257         * lib/cnd.c: Include <stdlib.h>, needed for abort().
42258         * lib/fcntl.c: Likewise.
42259         * lib/mbscasestr.c: Likewise.
42260         * lib/mbssep.c: Likewise.
42261         * lib/mbsstr.c: Likewise.
42262         * lib/openat.c: Include <stdlib.h>, needed for free().
42263         * lib/windows-tls.c: Include <stdlib.h>, needed for malloc(), free(),
42264         abort().
42266 2019-06-30  Bruno Haible  <bruno@clisp.org>
42268         Include <stdlib.h> when needed.
42269         * lib/areadlinkat.c: Include <stdlib.h>, needed for free() in at-func.c.
42270         * lib/faccessat.c: Likewise.
42271         * lib/fchmodat.c: Likewise.
42272         * lib/fchownat.c: Likewise.
42273         * lib/fstatat.c: Likewise.
42274         * lib/mkfifoat.c: Likewise.
42275         * lib/mknodat.c: Likewise.
42276         * lib/readlinkat.c: Likewise.
42277         * lib/symlinkat.c: Likewise.
42278         * lib/utimensat.c: Likewise.
42279         * lib/mkdirat.c: Likewise. Include also the specification header.
42281 2019-06-30  Bruno Haible  <bruno@clisp.org>
42283         inet_ntop, inet_pton: Avoid conflict with native Windows functions.
42284         * m4/sys_socket_h.m4 (gl_PREREQ_SYS_H_WS2TCPIP): New macro, extracted
42285         from gl_PREREQ_SYS_H_SOCKET.
42286         (gl_PREREQ_SYS_H_SOCKET): Invoke it.
42287         * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET): Invoke
42288         gl_PREREQ_SYS_H_WS2TCPIP.
42289         * modules/arpa_inet (Files): Add m4/sys_socket_h.m4, m4/socklen.m4.
42290         (Makefile.am): Substitute HAVE_WS2TCPIP_H.
42291         * lib/arpa_inet.in.h: Include <ws2tcpip.h>.
42293 2019-06-30  Bruno Haible  <bruno@clisp.org>
42295         inet_ntop, inet_pton: Forward-compatibility with newer Windows versions.
42296         * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): On native Windows, set
42297         REPLACE_INET_NTOP to 1 always.
42298         * m4/inet_pton.m4 (gl_FUNC_INET_PTON): On native Windows, set
42299         REPLACE_INET_PTON to 1 always.
42301 2019-06-30  Bruno Haible  <bruno@clisp.org>
42303         inet_pton: Fix link error on mingw with _WIN32_WINNT >= 0x0600.
42304         * modules/inet_pton (Depends-on, configure.ac): Test REPLACE_INET_PTON,
42305         not REPLACE_INET_NTOP.
42307 2019-06-30  Bruno Haible  <bruno@clisp.org>
42309         poll: Add comment.
42310         * lib/poll.c: Add comment about WSAPoll.
42312 2019-06-30  Bruno Haible  <bruno@clisp.org>
42314         poll-h: Fix compilation error on mingw with _WIN32_WINNT >= 0x0600.
42315         Reported by Hannes Müller <h.c.f.mueller@gmx.de>.
42316         * lib/poll.in.h: Include <winsock2.h>.
42317         (POLL*, pollfd): Override on native Windows.
42318         * m4/poll_h.m4 (gl_POLL_H): Invoke gl_PREREQ_SYS_H_WINSOCK2.
42319         * modules/poll-h (Files): Add m4/sys_socket_h.m4.
42320         (Makefile.am): Substitute HAVE_WINSOCK2_H.
42322 2019-06-28  Bruno Haible  <bruno@clisp.org>
42324         accept4: Fix compilation error on OpenIndiana.
42325         Reported by Michal Nowak <mnowak@startmail.com>
42326         via Mark H Weaver <mhw@netris.org>.
42327         * m4/accept.m4 (gl_FUNC_ACCEPT4): Test whether accept4 is declared, not
42328         whether it exists as a function.
42330 2019-06-26  Paul Eggert  <eggert@cs.ucla.edu>
42332         strverscmp: sync from glibc
42333         * lib/strverscmp.c: Sync from glibc, except use UTF-8 encoding in
42334         comments, include libc-config.h, define __strverscmp to be
42335         strverscmp, and don’t assume types line uint8_t and int8_t that
42336         that C99 doesn’t guarantee.
42337         [!_LIBC]: Include libc-config.h; define __strverscmp.
42338         Include stdint.h.
42339         (__strverscmp): Assume C99.  Use uint_least8_t
42340         and int_least8_t instead of unsigned char and signed char.
42341         * modules/strverscmp (Depends-on): Add libc-config, stdint.
42343 2019-06-25  Bruno Haible  <bruno@clisp.org>
42345         tss tests: Add tests for destructors and races.
42346         * tests/test-tss.c (worker_thread): Fix typo in debug message.
42347         (test_tss_dtorcheck1, test_tss_dtorcheck2, test_tss_racecheck): New
42348         functions.
42349         (main): Invoke them.
42350         * modules/tls-tests (Depends-on): Add mtx.
42352 2019-06-25  Bruno Haible  <bruno@clisp.org>
42354         tls tests: Add tests for destructors and races.
42355         * tests/test-tls.c: Include glthread/lock.h.
42356         (test_tls_dtorcheck1, test_tls_dtorcheck2, test_tls_racecheck): New
42357         functions.
42358         (main): Invoke them.
42359         * modules/tls-tests (Depends-on): Add lock.
42361 2019-06-25  Bruno Haible  <bruno@clisp.org>
42363         windows-tls: Implement TLS key destructors for native Windows.
42364         * lib/windows-tls.h (glwthread_tls_process_destructors): New
42365         declaration.
42366         (GLWTHREAD_DESTRUCTOR_ITERATIONS): New macro.
42367         * lib/windows-tls.c: Include <limits.h>, windows-once.h.
42368         (dtor_table_init_once, dtor_table_lock: New variables.
42369         (struct dtor): New type.
42370         (dtor_table, dtors_count, dtors_used, dtors_allocated,
42371         dtor_processing_threads): New variables.
42372         (dtor_table_initialize, dtor_table_ensure_initialized,
42373         dtor_table_shrink_used, glwthread_tls_process_destructors): New
42374         functions.
42375         (glwthread_tls_key_create, glwthread_tls_key_delete): Rewritten to
42376         handle non-NULL destructors.
42377         * modules/windows-tls (Depends-on): Add windows-once.
42378         * lib/glthread/tls.h (glthread_tls_key_init, glthread_tls_key_destroy):
42379         Use the functions declared in windows-tls.h.
42380         * lib/threads.in.h (TSS_DTOR_ITERATIONS): Define using
42381         GLWTHREAD_DESTRUCTOR_ITERATIONS.
42382         * lib/windows-thread.c: Include windows-tls.h.
42383         (wrapper_func, glwthread_thread_exit): Invoke
42384         glwthread_tls_process_destructors.
42385         * modules/windows-thread (Depends-on): Add windows-tls.
42387 2019-06-25  Bruno Haible  <bruno@clisp.org>
42389         threadlib: Avoid autoconf warning "was expanded before it was required".
42390         * modules/threadlib (configure.ac): Require gl_THREADLIB.
42392 2019-06-25  Akim Demaille  <akim@lrde.epita.fr>
42394         argmatch: remove duplicate const qualifier
42395         * lib/argmatch.h (ARGMATCH_DEFINE_GROUP): Here.
42397 2019-06-24  Paul Eggert  <eggert@cs.ucla.edu>
42399         unistd: stddef.h and sys/types.h namespace cleanup
42400         * lib/unistd.in.h [__GLIBC__]:
42401         Do not include stddef.h or sys/types.h.
42402         [!__GLIBC__]: Always include sys/types.h, since unistd.h is
42403         supposed to declare off_t and ssize_t.  Problem found when looking
42404         at why @GNULIB_PWRITE@ was different from the newly-added
42405         @GNULIB_COPY_FILE_RANGE@ with respect to ssize_t.
42407 2019-06-22  Akim Demaille  <akim@lrde.epita.fr>
42409         maintainer-makefile: restore portability to non-GNU awks
42410         Reported by Tim Rühsen.
42411         * top/maint.mk (AWK): New variable.  Use it.
42412         (sc_prohibit_gnu_make_extensions): Skip if $(AWK) is not gawk.
42414 2019-06-23  Paul Eggert  <eggert@cs.ucla.edu>
42416         Document setvbuf _IOLBF problem
42417         * doc/posix-functions/setvbuf.texi (setvbuf):
42418         Document MS-Windows portability problem with _IOLBF.
42420         Document lseek SEEK_DATA/SEEK_HOLE
42421         * doc/posix-functions/lseek.texi (lseek):
42422         Document some systems that do not support SEEK_DATA and SEEK_HOLE.
42424 2019-06-22  Akim Demaille  <akim@lrde.epita.fr>
42426         argmatch: put all the docs member last.
42427         Reported by Bruno Haible.
42428         * lib/argmatch.h (argmatch_##Name##_group_type): Put the args
42429         member before the docs done.
42430         * doc/argmatch.texi, tests/test-argmatch.c: Adjust.
42432 2019-06-21  Akim Demaille  <akim@lrde.epita.fr>
42434         argmatch: add support to generate the usage message.
42435         * lib/argmatch.c: Move some #includes and gettext support to...
42436         * lib/argmatch.h: here.
42437         (ARGMATCH_DEFINE_GROUP): New macro.
42438         * tests/test-argmatch.c (argmatch_backup_docs, argmatch_backup_args)
42439         (argmatch_backup_group): New.
42440         (CHECK): New.
42441         (main): Check argmatch_backup_value, argmatch_backup_xvalue,
42442         argmatch_backup_argument and argmatch_backup_usage.
42443         * modules/argmatch: We depend on c99.
42444         * doc/argmatch.texi (Recognizing Option Arguments): New.
42445         * doc/gnulib.texi: Use it.
42447 2019-06-21  Bruno Haible  <bruno@clisp.org>
42449         thrd: Add comment.
42450         * lib/thrd.c (pthread_main_func): Add comment.
42452 2019-06-21  Bruno Haible  <bruno@clisp.org>
42454         threads-h: Define 'thread_local' if and only if it actually works.
42455         * m4/threads.m4 (gl_THREAD_LOCAL_DEFINITION): New macro.
42456         (gl_THREADS_H): Define _Thread_local to __thread also for ARM C, IBM C,
42457         Oracle Solaris Studio C. Compile a simple program, to see whether
42458         _Thread_local basically works. Set HAVE_THREAD_LOCAL and LIBTHREADLOCAL.
42459         (gl_THREADS_H_DEFAULTS): Initialize HAVE_THREAD_LOCAL.
42460         * lib/threads.in.h (thread_local): Undefine if it does not work.
42461         * modules/threads-h (Makefile.am): Substitute HAVE_THREAD_LOCAL.
42462         (Link): Mention LIBTHREADLOCAL.
42463         * tests/test-threads.c: Don't check that thread_local is defined.
42464         * tests/test-thread_local.c: New file.
42465         * modules/threads-h-tests (Files): Add it and macros.h.
42466         (Depends-on): Add thrd and stdint.
42467         (configure.ac): Test whether 'alarm' is declared.
42468         (Makefile.am): Arrange to build and link test-thread_local.
42469         * doc/posix-headers/threads.texi: Mention the platforms that don't
42470         support 'thread_local'.
42472 2019-06-20  Bruno Haible  <bruno@clisp.org>
42474         threads-h: Simplify link dependencies.
42475         * m4/threads.m4 (gl_THREADS_H): Bail out if Pth threading is requested.
42476         Don't set LTLIBSTDTHREAD.
42477         * modules/thrd (Link): Simplify accordingly.
42478         * modules/mtx (Link): Likewise.
42479         * modules/cnd (Link): Likewise.
42480         * modules/tss (Link): Likewise.
42481         * modules/threads (Link): Likewise.
42483 2019-06-20  Bruno Haible  <bruno@clisp.org>
42485         threads-h: Fix link error on FreeBSD 11.
42486         * m4/threads.m4 (gl_THREADS_H): When linking with -lstdthreads, link
42487         also with -lpthread.
42489 2019-06-20  Bruno Haible  <bruno@clisp.org>
42491         threadlib: Fix typo (regression from today).
42492         * m4/threadlib.m4 (gl_THREADLIB_BODY): Fix typo in comment marker.
42494 2019-06-20  Bruno Haible  <bruno@clisp.org>
42496         windows-thread, windows-tls: Fix compilation error on 32-bit mingw.
42497         * lib/windows-thread.c: Include <errno.h>.
42498         * lib/windows-tls.c: Likewise.
42500 2019-06-20  Bruno Haible  <bruno@clisp.org>
42502         tss tests: Small improvement.
42503         * tests/test-tss.c (test_tss): Pass a different id to each thread.
42505 2019-06-20  Bruno Haible  <bruno@clisp.org>
42507         threads: New module.
42508         * modules/threads: New file.
42510 2019-06-20  Bruno Haible  <bruno@clisp.org>
42512         tss: Add tests.
42513         * tests/test-tss.c: New file, based on tests/test-tls.c.
42514         * modules/tss-tests: New file.
42516 2019-06-20  Bruno Haible  <bruno@clisp.org>
42518         cnd: Add tests.
42519         * tests/test-cnd.c: New file, based on tests/test-cond.c.
42520         * modules/cnd-tests: New file.
42522 2019-06-20  Bruno Haible  <bruno@clisp.org>
42524         mtx: Add tests.
42525         * tests/test-mtx.c: New file, based on tests/test-lock.c.
42526         * tests/test-call_once.c: New file, based on tests/test-once.c.
42527         * modules/mtx-tests: New file.
42529 2019-06-20  Bruno Haible  <bruno@clisp.org>
42531         thrd: Add tests.
42532         * tests/test-thrd_create.c: New file, based on
42533         tests/test-thread_create.c.
42534         * tests/test-thrd_current.c: New file, based on
42535         tests/test-thread_self.c.
42536         * modules/thrd-tests: New file.
42538 2019-06-20  Bruno Haible  <bruno@clisp.org>
42540         tss: New module.
42541         * lib/tss.c: New file.
42542         * modules/tss: New file.
42543         * doc/posix-functions/tss_create.texi: Mention the new module.
42544         * doc/posix-functions/tss_set.texi: Likewise.
42545         * doc/posix-functions/tss_get.texi: Likewise.
42546         * doc/posix-functions/tss_delete.texi: Likewise.
42548 2019-06-20  Bruno Haible  <bruno@clisp.org>
42550         cnd: New module.
42551         * lib/cnd.c: New file.
42552         * modules/cnd: New file.
42553         * doc/posix-functions/cnd_init.texi: Mention the new module.
42554         * doc/posix-functions/cnd_wait.texi: Likewise.
42555         * doc/posix-functions/cnd_timedwait.texi: Likewise.
42556         * doc/posix-functions/cnd_signal.texi: Likewise.
42557         * doc/posix-functions/cnd_broadcast.texi: Likewise.
42558         * doc/posix-functions/cnd_destroy.texi: Likewise.
42560 2019-06-20  Bruno Haible  <bruno@clisp.org>
42562         mtx: New module.
42563         * lib/mtx.c: New file.
42564         * modules/mtx: New file.
42565         * doc/posix-functions/call_once.texi: Mention the new module.
42566         * doc/posix-functions/mtx_init.texi: Likewise.
42567         * doc/posix-functions/mtx_lock.texi: Likewise.
42568         * doc/posix-functions/mtx_trylock.texi: Likewise.
42569         * doc/posix-functions/mtx_timedlock.texi: Likewise.
42570         * doc/posix-functions/mtx_unlock.texi: Likewise.
42571         * doc/posix-functions/mtx_destroy.texi: Likewise.
42573 2019-06-20  Bruno Haible  <bruno@clisp.org>
42575         thrd: New module.
42576         * lib/thrd.c: New file.
42577         * m4/thrd.m4: New file.
42578         * modules/thrd: New file.
42579         * doc/posix-functions/thrd_current.texi: Mention the new module.
42580         * doc/posix-functions/thrd_detach.texi: Likewise.
42581         * doc/posix-functions/thrd_equal.texi: Likewise.
42582         * doc/posix-functions/thrd_exit.texi: Likewise.
42583         * doc/posix-functions/thrd_sleep.texi: Likewise.
42584         * doc/posix-functions/thrd_yield.texi: Likewise.
42585         * doc/posix-functions/thrd_create.texi: Mention the new module and the
42586         AIX bug.
42587         * doc/posix-functions/thrd_join.texi: Mention the new module and the
42588         AIX and Solaris bugs.
42590 2019-06-20  Bruno Haible  <bruno@clisp.org>
42592         threads-h: Add tests.
42593         * tests/test-threads.c: New file.
42594         * modules/threads-h-tests: New file.
42595         * tests/test-threads-c++.cc: New file.
42596         * modules/threads-h-c++-tests: New file.
42598 2019-06-20  Bruno Haible  <bruno@clisp.org>
42600         threads-h: New module.
42601         * lib/threads.in.h: New file.
42602         * m4/threads.m4: New file.
42603         * m4/yield.m4 (gl_YIELD): Update comment.
42604         * modules/threads-h: New file.
42605         * modules/yields (configure.ac): Use AC_REQUIRE.
42606         * doc/posix-headers/threads.texi: Mention the new module and the AIX
42607         bugs.
42609 2019-06-20  Bruno Haible  <bruno@clisp.org>
42611         windows-thread: New module.
42612         * lib/windows-thread.h: New file, based on lib/glthread/thread.h.
42613         * lib/windows-thread.c: New file, based on lib/glthread/thread.c.
42614         * lib/glthread/thread.h: Include windows-thread.h.
42615         (gl_thread_t): Define using glwthread_thread_t.
42616         (glthread_create): Define using glwthread_thread_create.
42617         (glthread_join): Define using glwthread_thread_join.
42618         (gl_thread_self): Define using glwthread_thread_self.
42619         (gl_thread_exit): Define using glwthread_thread_exit.
42620         (glthread_create_func, glthread_join_func, gl_thread_self_func,
42621         gl_thread_exit_func): Remove declarations.
42622         * lib/glthread/thread.c (self_key): Remove variable.
42623         (do_init_self_key, init_self_key): Remove functions.
42624         (struct gl_thread_struct): Remove type.
42625         (get_current_thread_handle, gl_thread_self_func, wrapper_func,
42626         glthread_create_func, glthread_join_func, gl_thread_exit_func): Remove
42627         functions.
42628         * modules/windows-thread: New file.
42629         * modules/thread (Depends-on): Add windows-thread.
42631 2019-06-20  Bruno Haible  <bruno@clisp.org>
42633         windows-tls: New module.
42634         * lib/windows-tls.h: New file, based on lib/glthread/tls.h.
42635         * lib/windows-tls.c: New file, based on lib/glthread/tls.h.
42636         * lib/glthread/tls.h: Include windows-tls.h.
42637         (gl_tls_key_t): Define using glwthread_tls_key_t.
42638         * modules/windows-tls: New file.
42639         * modules/tls (Depends-on): Add windows-tls.
42641 2019-06-20  Bruno Haible  <bruno@clisp.org>
42643         windows-cond: New module.
42644         * lib/windows-cond.h: New file, based on lib/glthread/cond.h.
42645         * lib/windows-cond.c: New file, based on lib/glthread/cond.c.
42646         * lib/glthread/cond.h: Include windows-cond.h.
42647         (struct gl_waitqueue_link, gl_linked_waitqueue_t): Remove types.
42648         (gl_cond_t): Define using glwthread_cond_t.
42649         (gl_cond_initializer): Define using GLWTHREAD_COND_INIT.
42650         (glthread_cond_init): Define using glwthread_cond_init.
42651         (glthread_cond_wait): Define using glwthread_cond_wait.
42652         (glthread_cond_timedwait): Define using glwthread_cond_timedwait.
42653         (glthread_cond_signal): Define using glwthread_cond_signal.
42654         (glthread_cond_broadcast): Define using glwthread_cond_broadcast.
42655         (glthread_cond_destroy): Define using glwthread_cond_destroy.
42656         (glthread_cond_init_func, glthread_cond_wait_func,
42657         glthread_cond_timedwait_func, glthread_cond_signal_func,
42658         glthread_cond_broadcast_func, glthread_cond_destroy_func): Remove
42659         declarations.
42660         * lib/glthread/cond.c (gl_waitqueue_t, gl_waitqueue_element): Remove
42661         types.
42662         (gl_waitqueue_init, gl_waitqueue_add, gl_waitqueue_remove,
42663         gl_waitqueue_notify_first, gl_waitqueue_notify_all,
42664         glthread_cond_init_func, glthread_cond_wait_func,
42665         glthread_cond_timedwait_func, glthread_cond_signal_func,
42666         glthread_cond_broadcast_func, glthread_cond_destroy_func): Remove
42667         functions.
42668         * modules/windows-cond: New file.
42669         * modules/cond (Depends-on): Add windows-cond. Remove gettimeofday.
42671 2019-06-20  Bruno Haible  <bruno@clisp.org>
42673         windows-timedrecmutex: New module.
42674         * lib/windows-timedrecmutex.h: New file, based on windows-recmutex.h.
42675         * lib/windows-timedrecmutex.c: New file, based on windows-recmutex.c.
42676         * modules/windows-timedrecmutex: New file.
42678 2019-06-20  Bruno Haible  <bruno@clisp.org>
42680         windows-timedmutex: New module.
42681         * lib/windows-timedmutex.h: New file, based on windows-mutex.h.
42682         * lib/windows-timedmutex.c: New file, based on windows-mutex.c.
42683         * modules/windows-timedmutex: New file.
42685 2019-06-20  Bruno Haible  <bruno@clisp.org>
42687         windows-recmutex: New module.
42688         * lib/windows-recmutex.h: New file, extracted from lib/glthread/lock.h.
42689         * lib/windows-recmutex.c: New file, extracted from lib/glthread/lock.c.
42690         * lib/glthread/lock.h: Include windows-recmutex.h.
42691         (gl_recursive_lock_t): Define using glwthread_recmutex_t.
42692         (gl_recursive_lock_initializer): Define using GLWTHREAD_RECMUTEX_INIT.
42693         (glthread_recursive_lock_init): Define using glwthread_recmutex_init.
42694         (glthread_recursive_lock_lock): Define using glwthread_recmutex_lock.
42695         (glthread_recursive_lock_unlock): Define using
42696         glwthread_recmutex_unlock.
42697         (glthread_recursive_lock_destroy): Define using
42698         glwthread_recmutex_destroy.
42699         (glthread_recursive_lock_init_func, glthread_recursive_lock_lock_func,
42700         glthread_recursive_lock_unlock_func,
42701         glthread_recursive_lock_destroy_func): Remove declarations.
42702         * lib/glthread/lock.c (glthread_recursive_lock_init_func,
42703         glthread_recursive_lock_lock_func, glthread_recursive_lock_unlock_func,
42704         glthread_recursive_lock_destroy_func): Remove functions.
42705         * modules/windows-recmutex: New file.
42706         * modules/lock (Depends-on): Add windows-recmutex.
42708 2019-06-20  Bruno Haible  <bruno@clisp.org>
42710         windows-mutex: New module.
42711         * lib/windows-mutex.h: New file, extracted from lib/glthread/lock.h.
42712         * lib/windows-mutex.c: New file, extracted from lib/glthread/lock.c.
42713         * lib/windows-spinlock.h: New file, extracted from lib/glthread/lock.h.
42714         * lib/glthread/lock.h: Include windows-spinlock.h, windows-mutex.h.
42715         (gl_spinlock_t): Remove type.
42716         (gl_lock_t): Define using glwthread_mutex_t.
42717         (gl_lock_initializer): Define using GLWTHREAD_MUTEX_INIT.
42718         (glthread_lock_init): Define using glwthread_mutex_init.
42719         (glthread_lock_lock): Define using glwthread_mutex_lock.
42720         (glthread_lock_unlock): Define using glwthread_mutex_unlock.
42721         (glthread_lock_destroy): Define using glwthread_mutex_destroy.
42722         (glthread_lock_init_func, glthread_lock_lock_func,
42723         glthread_lock_unlock_func, glthread_lock_destroy_func): Remove
42724         declarations.
42725         Use glwthread_spinlock_t instead of gl_spinlock_t.
42726         (gl_rwlock_initializer, gl_recursive_lock_initializer): Define using
42727         GLWTHREAD_SPINLOCK_INIT.
42728         * lib/glthread/lock.c (glthread_lock_init_func, glthread_lock_lock_func,
42729         glthread_lock_unlock_func, glthread_lock_destroy_func): Remove
42730         functions.
42731         * lib/glthread/cond.h: Use glwthread_spinlock_t instead of
42732         gl_spinlock_t.
42733         * modules/windows-mutex: New file.
42734         * modules/lock (Depends-on): Add windows-mutex.
42736 2019-06-20  Bruno Haible  <bruno@clisp.org>
42738         windows-once: New module.
42739         * lib/windows-once.h: New file, extracted from lib/glthread/lock.h.
42740         * lib/windows-once.c: New file, extracted from lib/glthread/lock.c.
42741         * lib/glthread/lock.h: Include windows-once.h.
42742         (gl_once_t): Define using glwthread_once_t.
42743         (gl_once_define): Define using GLWTHREAD_ONCE_INIT.
42744         (glthread_once): Define using glwthread_once.
42745         (glthread_once_func): Remove declaration.
42746         * lib/glthread/lock.c (glthread_once_func): Remove function.
42747         * modules/windows-once: New file.
42748         * modules/lock (Depends-on): Add windows-once.
42750 2019-06-20  Bruno Haible  <bruno@clisp.org>
42752         lock, cond: Avoid possible counter wraparound on Windows.
42753         * lib/glthread/lock.c (glthread_lock_lock_func): Leave the 'started'
42754         field of the guard unchanged if it was already positive.
42755         (glthread_rwlock_rdlock_func): Likewise.
42756         (glthread_rwlock_wrlock_func): Likewise.
42757         (glthread_recursive_lock_lock_func): Likewise.
42758         * lib/glthread/cond.c (glthread_cond_wait_func): Likewise.
42759         (glthread_cond_timedwait_func): Likewise.
42761 2019-06-20  Bruno Haible  <bruno@clisp.org>
42763         cond: Make glthread_cond_timedwait more reliable on Windows.
42764         * lib/glthread/cond.c (glthread_cond_timedwait_func): Initialize the
42765         condition variable before looking at the current time.
42767 2019-06-20  Bruno Haible  <bruno@clisp.org>
42769         pthread_mutex_timedlock: New module.
42770         * lib/pthread.in.h (pthread_mutex_timedlock): New dummy function and
42771         new declaration.
42772         * lib/pthread_mutex_timedlock.c: New file.
42773         * m4/pthread_mutex_timedlock.m4: New file.
42774         * m4/pthread.m4 (gl_PTHREAD_CHECK): Don't call AC_LIBOBJ here. Test
42775         whether pthread_mutex_timedlock is declared.
42776         (gl_PTHREAD_MODULE_INDICATOR): New macro.
42777         (gl_PTHREAD_DEFAULTS): Initialize GNULIB_PTHREAD_MUTEX_TIMEDLOCK,
42778         HAVE_PTHREAD_MUTEX_TIMEDLOCK.
42779         * modules/pthread (configure.ac): Call AC_LIBOBJ here.
42780         (Makefile.am): Substitute GNULIB_PTHREAD_MUTEX_TIMEDLOCK,
42781         HAVE_PTHREAD_MUTEX_TIMEDLOCK.
42782         * modules/pthread_mutex_timedlock: New file.
42783         * doc/posix-functions/pthread_mutex_timedlock.texi: Mention the new
42784         module.
42786 2019-06-20  Bruno Haible  <bruno@clisp.org>
42788         thread, lock, cond, tls: Recognize C11 multithreaded applications.
42789         * m4/threadlib.m4 (gl_THREADLIB_BODY): Test for <threads.h>.
42790         * lib/glthread/thread.h (c11_threads_in_use): New macro.
42791         (pthread_in_use, pth_in_use, thread_in_use): Use it.
42792         * lib/glthread/lock.h (c11_threads_in_use): New macro.
42793         (pthread_in_use, pth_in_use, thread_in_use): Use it.
42794         * lib/glthread/cond.h (c11_threads_in_use): New macro.
42795         (pthread_in_use, pth_in_use, thread_in_use): Use it.
42796         * lib/glthread/tls.h (c11_threads_in_use): New macro.
42797         (pthread_in_use, pth_in_use, thread_in_use): Use it.
42799 2019-06-20  Bruno Haible  <bruno@clisp.org>
42801         tls tests: Small improvements.
42802         * tests/test-tls.c: Include <stdint.h>.
42803         (worker_thread): Avoid gcc warning on 64-bit mingw.
42804         (test_tls): Pass a different id to each thread.
42805         * modules/tls-tests (Depends-on): Add stdint.
42807 2019-06-20  Bruno Haible  <bruno@clisp.org>
42809         cond tests: Simplify.
42810         * tests/test-cond.c (test_timedcond): Remove redundant assignment.
42812 2019-06-20  Bruno Haible  <bruno@clisp.org>
42814         lock tests: Avoid reference to undefined variable if !ENABLE_LOCKING.
42815         * tests/test-lock.c (test_once): Don't reference fire_signal if
42816         !ENABLE_LOCKING.
42818 2019-06-19  Bruno Haible  <bruno@clisp.org>
42820         nanosleep: Relicense under LGPLv2+.
42821         Approved by Jim Meyering, Paul Eggert, Eric Blake, Pádraig Brady.
42822         * modules/nanosleep (License): Change to LGPLv2+.
42824 2019-06-19  Bruno Haible  <bruno@clisp.org>
42826         Reorder pieces of header in perl scripts.
42827         The desired order is
42828         - Prologue part 1 (2 lines with #!)
42829         - Program short description
42830         - Copyright and license notice
42831         - Written-by notice
42832         - Program short description (optional)
42833         - Program long description (optional)
42834         - Prologue part 2
42835         - Time stamp
42836         - Code
42837         Reported by Paul Eggert.
42838         * build-aux/announce-gen: Reorder header.
42839         * build-aux/gitlog-to-changelog: Likewise.
42840         * build-aux/useless-if-before-free: Likewise.
42841         * build-aux/prefix-gnulib-mk: Add copyright notice and short
42842         description.
42843         * build-aux/update-copyright: Likewise. Add short description. Bump
42844         time-stamp-line-limit to 200.
42846 2019-06-18  Paul Eggert  <eggert@cs.ucla.edu>
42848         verify-tests: work around xlc bug
42849         Problem reported by Bruno Haible in:
42850         https://lists.gnu.org/r/bug-gnulib/2019-06/msg00049.html
42851         * tests/test-verify.c (item): Move the arithmetic inside the
42852         verify_expr, to avoid tickling a bug in IBM AIX xlc V12.1.
42854 2019-06-16  Bruno Haible  <bruno@clisp.org>
42856         Restore Emacs time-stamp hook applicability.
42857         Reported by Darshit Shah <darnir@gnu.org>.
42858         * build-aux/useless-if-before-free: Bump time-stamp-line-limit to 50.
42859         * build-aux/announce-gen: Likewise.
42860         * build-aux/gitlog-to-changelog: Likewise.
42861         * build-aux/prefix-gnulib-mk: Likewise.
42862         * build-aux/update-copyright: Likewise.
42864 2019-06-15  Bruno Haible  <bruno@clisp.org>
42866         Fix scripts to have valid executable format on Alpine Linux.
42867         Reported by Tim Rühsen <tim.ruehsen@gmx.de>.
42868         Idea by Paul Eggert.
42869         * build-aux/useless-if-before-free: Use a prologue that starts with
42870         '#!/bin/sh'.
42871         * build-aux/announce-gen: Likewise.
42872         * build-aux/gitlog-to-changelog: Likewise.
42873         * build-aux/prefix-gnulib-mk: Likewise.
42874         * build-aux/update-copyright: Likewise.
42875         * tests/test-update-copyright.sh: Update test program accordingly.
42877 2019-06-10  Bruno Haible  <bruno@clisp.org>
42879         nproc: Ensure nproc(NPROC_ALL) ≥ nproc(NPROC_CURRENT) with glibc ≥ 2.26.
42880         Reported by Nikita Ermakov <arei@altlinux.org> in
42881         <https://lists.gnu.org/archive/html/bug-gnulib/2019-06/msg00003.html>.
42882         * lib/nproc.c (num_processors_ignoring_omp): Treat a return value of
42883         sysconf (_SC_NPROCESSORS_CONF) == 2 like a return value == 1.
42885 2019-06-10  Bruno Haible  <bruno@clisp.org>
42887         posix_spawn_file_actions_addchdir: Fix possible use-after-free bug.
42888         * lib/spawn_int.h (struct __spawn_action): Remove 'const' from path.
42889         * lib/spawn_faction_addchdir.c (posix_spawn_file_actions_addchdir): Make
42890         a copy of the path argument.
42891         * lib/spawn_faction_destroy.c (posix_spawn_file_actions_destroy): Free
42892         it.
42894 2019-06-10  Bruno Haible  <bruno@clisp.org>
42896         posix_spawn_file_actions_addopen: Fix possible use-after-free bug.
42897         Reported at <https://sourceware.org/bugzilla/show_bug.cgi?id=17048>.
42898         * lib/spawn_int.h (struct __spawn_action): Remove 'const' from path.
42899         * lib/spawn_faction_addopen.c (posix_spawn_file_actions_addopen): Make
42900         a copy of the path argument.
42901         * lib/spawn_faction_destroy.c (posix_spawn_file_actions_destroy): Free
42902         it.
42904 2019-06-10  Bruno Haible  <bruno@clisp.org>
42906         posix_spawn_file_actions_addfchdir: Add tests.
42907         * tests/test-posix_spawn_file_actions_addfchdir.c: New file.
42908         * tests/test-posix_spawn5.c: New file.
42909         * modules/posix_spawn_file_actions_addfchdir-tests: New file.
42911 2019-06-10  Bruno Haible  <bruno@clisp.org>
42913         posix_spawn_file_actions_addfchdir: New module.
42914         * lib/spawn.in.h (posix_spawn_file_actions_addfchdir): New declaration.
42915         * lib/spawn_int.h (struct __spawn_action): Add tag 'spawn_do_fchdir' and
42916         union member 'fchdir_action'.
42917         * lib/spawn_faction_addfchdir.c: New file.
42918         * lib/spawni.c (__spawni): Implement the spawn_do_fchdir action.
42919         * m4/posix_spawn_faction_addfchdir.m4: New file.
42920         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): Test whether module
42921         'posix_spawn_file_actions_addfchdir' is present and whether
42922         posix_spawn_file_actions_addfchdir_np exists. Set REPLACE_POSIX_SPAWN.
42923         * m4/spawn_h.m4 (gl_SPAWN_H): Test whether
42924         posix_spawn_file_actions_addfchdir is declared.
42925         (gl_SPAWN_H_DEFAULTS): Initialize
42926         GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR,
42927         HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR,
42928         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR.
42929         * modules/spawn (Makefile.am): Substitute
42930         GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR,
42931         HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR,
42932         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR.
42933         * modules/posix_spawn_file_actions_addfchdir: New file.
42934         * tests/test-spawn-c++.cc (posix_spawn_file_actions_addfchdir): Check
42935         signature.
42936         * doc/posix-functions/posix_spawn.texi: Mention the new module.
42937         * doc/posix-functions/posix_spawnp.texi: Likewise.
42938         * doc/glibc-functions/posix_spawn_file_actions_addfchdir_np.texi:
42939         Likewise.
42941 2019-06-10  Bruno Haible  <bruno@clisp.org>
42943         doc: Document existence of posix_spawn_file_actions_addchdir module.
42944         * doc/glibc-functions/posix_spawn_file_actions_addchdir_np.texi: Mention
42945         the posix_spawn_file_actions_addchdir module.
42947 2019-06-10  Bruno Haible  <bruno@clisp.org>
42949         posix_spawn-internal: Fix module description.
42950         * modules/posix_spawn (configure.ac): Move request to compile spawni.c
42951         from here...
42952         * modules/posix_spawnp (configure.ac): ... and here...
42953         * modules/posix_spawn-internal (configure.ac): ... to here.
42955 2019-06-10  Bruno Haible  <bruno@clisp.org>
42957         doc: Update and improve documentation of glibc functions.
42958         This is a series of commits that
42959         - updates the documentation to the state of glibc 2.29,
42960         - adds references to Linux man pages and glibc documentation,
42961         - marks Linux specific functions as such.
42962         These are the commits:
42963         doc: Update after removal of crypt functions from glibc 2.28.
42964         doc: Remove mention of function vm86 (does not exist on x86_64).
42965         doc: Remove mention of functions that are gone from glibc.
42966         doc: Mention that glibc no longer provides h_errno.
42967         doc: Mention the availability of specific functions in glibc versions.
42968         doc: Mention eaccess.
42969         doc: Add references to Linux man pages.
42970         doc: Add references to glibc documentation.
42971         doc: Mention inotify_* functions.
42972         doc: Mention ppoll.
42973         doc: Mention sched_getcpu.
42974         doc: Mention sync_file_range.
42975         doc: Mention epoll_pwait.
42976         doc: Mention eventfd, eventfd_read, eventfd_write.
42977         doc: Mention signalfd.
42978         doc: Mention timerfd_create, timerfd_gettime, timerfd_settime.
42979         doc: Mention epoll_create1.
42980         doc: Mention getauxval.
42981         doc: Mention pthread_getattr_default_np, pthread_setattr_default_np.
42982         doc: Mention nextdown, nextup.
42983         doc: Mention more ISO TS 18661-1 <math.h> functions.
42984         doc: Mention ISO TS 18661-1 <fenv.h> functions.
42985         doc: Mention getrandom, getentropy.
42986         doc: Mention strfromf, strfromd, strfroml.
42987         doc: Mention preadv2, pwritev2.
42988         doc: Mention copy_file_range.
42989         doc: Mention memfd_create.
42990         doc: Mention mlock2.
42991         doc: Mention pkey_alloc, pkey_set, pkey_get, pkey_free, pkey_mprotect.
42992         doc: Mention more ISO TS 18661-1 <math.h> functions.
42993         doc: Mention renameat2.
42994         doc: Mention statx.
42995         doc: Mention the ISO C11 multithreading header and functions.
42996         doc: Mention getcpu.
42997         doc: Mention posix_spawn_file_actions_add[f]chdir_np.
42998         doc: Some glibc functions also exist on IRIX 6.5 in 32-bit mode.
42999         doc: Some glibc functions also exist on FreeBSD, AIX, HP-UX, Solaris 11.
43000         doc: Some glibc functions also exist on FreeBSD, Solaris 11.
43001         doc: Some glibc functions also exist on Solaris 11.
43002         doc: Some glibc functions also exist on Solaris 11.4.
43003         doc: Some glibc functions also exist on FreeBSD.
43004         doc: Some glibc functions also exist on BeOS.
43005         doc: Some glibc functions also exist on Haiku.
43006         doc: Mark functions which exist only on Linux.
43007         doc: Mark functions which exist only on Linux and illumos.
43009 2019-06-06  Paul Eggert  <eggert@cs.ucla.edu>
43011         copy-file: fix typo
43012         * lib/copy-file.c (qcopy_file_preserving): Remove unused label.
43014         copy-file-range: simplify into a stub
43015         Based on a comment by Florian Weimer in:
43016         https://lists.gnu.org/r/bug-gnulib/2019-06/msg00007.html
43017         It turns out that Emacs (which will use this module) won’t need an
43018         emulation and I suspect other programs won’t either, because these
43019         programs will need to fall back on read+write anyway.  Perhaps I
43020         am wrong and other programs will be able to use an emulation; if
43021         so, this patch can be reverted.
43022         * lib/copy-file-range.c (COPY_FILE_RANGE): Replace with a stub.
43023         Just call it copy_file_range.
43024         * m4/copy-file-range.m4 (gl_FUNC_COPY_FILE_RANGE):
43025         Check via AC_LINK_IFELSE.
43026         * modules/copy-file-range (Depends-on): Remove modules no longer used.
43028 2019-06-04  Paul Eggert  <eggert@cs.ucla.edu>
43030         copy-file: prefer copy_file_range
43031         * lib/copy-file.c: Do not include xalloc.h.
43032         (qcopy_file_preserving): Allocate a buffer only if
43033         copy_file_range does not suffice.  If the allocation fails
43034         don't give up; just use a small stack-based buffer.
43035         Prefer copy_file_range if it works.
43036         * modules/copy-file (Depends-on): Add copy-file-range.
43037         Remove xalloc.
43039         copy-file-range: new module
43040         * MODULES.html.sh: Add copy-file-range.
43041         * lib/copy-file-range.c, m4/copy-file-range.m4:
43042         * modules/copy-file-range: New files.
43043         * lib/unistd.in.h (copy_file_range): Declare.
43044         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS):
43045         Set up GNULIB_COPY_FILE_RANGE and HAVE_COPY_FILE_RANGE.
43046         * modules/unistd (unistd.h): Substitute them.
43048 2019-05-28  Bruno Haible  <bruno@clisp.org>
43050         binary-io: Attempted use of O_BINARY on consoles no longer fails.
43051         Reported by KO Myung-Hun <komh78@gmail.com> in
43052         <https://lists.gnu.org/archive/html/bug-gnulib/2019-05/msg00124.html>.
43053         * lib/binary-io.h (__gl_setmode_check): Remove function.
43054         (set_binary_mode): Declare as notinline on DJGPP and EMX.
43055         * lib/binary-io.c (__gl_setmode_check): Remove function.
43056         (set_binary_mode): Define here on DJGPP and EMX. Inline
43057         __gl_setmode_check. In case of a tty, don't return an error code.
43059 2019-05-28  James Youngman  <jay@gnu.org>
43061         dirent-safer: Make opendir_safer usable from C++.
43062         * lib/dirent-safer.h: use extern "C".
43064 2019-05-28  James Youngman  <jay@gnu.org>
43066         canonicalize: Make canonicalize_filename_mode usable from C++.
43067         * lib/canonicalize.h: use extern "C".
43069 2019-05-26  Akim Demaille  <akim@lrde.epita.fr>
43071         prefix-gnulib-mk: Fix CPPFLAGS migration.
43072         * build-aux/prefix-gnulib-mk (prefix_assignment): Don't forget the
43073         _a part of the library name.
43075 2019-05-24  Paul Eggert  <eggert@cs.ucla.edu>
43077         flexmember: update comments again
43078         * lib/flexmember.h, m4/flexmember.m4: Improve comments further.
43080         flexmember: update comment
43081         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER): Improve comment.
43083 2019-05-20  Bruno Haible  <bruno@clisp.org>
43085         setlocale: Improve fallback on macOS.
43086         * lib/setlocale.c (search): Optimize away a redundant strcmp()
43087         invocation.
43088         (locales_with_principal_territory): New array.
43089         (langcmp, get_main_locale_with_same_language): New functions.
43090         (locales_with_principal_language): New array.
43091         (terrcmp, get_main_locale_with_same_territory): New functions.
43092         (rpl_setlocale): When setlocale_single failed, try again with a locale
43093         that is more likely to exist. Don't warn if the environment variable
43094         SETLOCALE_VERBOSE is not set.
43096 2019-05-19  Bruno Haible  <bruno@clisp.org>
43098         localename: Fix default on macOS.
43099         * m4/intlmacosx.m4 (gt_INTL_MACOSX): Don't test for CFLocaleCopyCurrent.
43100         * lib/localename.c: Remove includes for HAVE_CFLOCALECOPYCURRENT.
43101         (gl_locale_name_environ, gl_locale_name_default): Remove code for
43102         HAVE_CFLOCALECOPYCURRENT.
43103         * lib/localename.h (gl_locale_name_default): Update.
43105 2019-05-19  Karl Berry  <karl@freefriends.org>
43107         * config/srclistvars.sh (TEXINFOTEX): make ftp.gnu.org be the
43108         source for texinfo.tex, replacing TEXINFOSRC, per Texinfo maintainer.
43109         * config/srclist.txt (texinfo.tex): use it. (Also doc changes.)
43111 2019-05-18  Akim Demaille  <akim@lrde.epita.fr>
43113         maintainer-makefile: catch uses of $< in non-implicit rules
43114         * top/maint.mk (sc_prohibit_magic_number_exit): New.
43116 2019-05-18  Bruno Haible  <bruno@clisp.org>
43118         threadlib: Provide an easy way to avoid mingw's winpthreads library.
43119         * m4/threadlib.m4 (gl_AVOID_WINPTHREAD): New macro.
43120         (gl_THREADLIB_EARLY_BODY): Recognize when it was invoked, and set
43121         gl_use_threads accordingly.
43123 2019-05-18  Bruno Haible  <bruno@clisp.org>
43125         pthread_sigmask: Fix compilation error with --enable-threads=windows.
43126         Reported by Tim Rühsen in
43127         <https://lists.gnu.org/archive/html/bug-gnulib/2018-01/msg00018.html>
43128         and Michele Locati in
43129         <https://lists.gnu.org/archive/html/bug-gettext/2019-04/msg00057.html>.
43130         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Revert change from
43131         2015-06-01. Test whether pthread_sigmask is a macro, regardless of
43132         $LIBMULTITHREAD. Consider it regardless whether module 'threadlib' is
43133         in use and regardless which threads API is chosen.
43135 2019-05-14  Paul Eggert  <eggert@cs.ucla.edu>
43137         close-stream, closein, closeout: simplify
43138         I noticed this opportunity for simplification while drafting a
43139         new, related module that I haven’t had time to finish yet.
43140         * m4/close-stream.m4, m4/closein.m4, m4/closeout.m4: Remove.
43141         * modules/close-stream (Files): Remove m4/close-stream.m4.
43142         (configure.ac): Omit gl_CLOSE_STREAM.
43143         * modules/closein (Files): Remove m4/closein.m4
43144         (configure.ac): Omit gl_CLOSEIN.
43145         * modules/closeout (Files): Remove m4/closeout.m4.
43146         (configure.ac): Omit gl_CLOSEOUT.
43148 2019-05-12  Bruno Haible  <bruno@clisp.org>
43150         libtool-next-version: New program.
43151         * build-aux/libtool-next-version: New file.
43153 2019-05-11  John Darrington  <john@darrington.wattle.id.au>
43154             Bruno Haible  <bruno@clisp.org>
43156         version-etc: Ease translation.
43157         * lib/version-etc.c (version_etc_arn, emit_bug_reporting_address): Move
43158         URLs and formatting newlines out of translatable string.
43160 2019-05-11  Bruno Haible  <bruno@clisp.org>
43162         gnupload: Explain how to create symlinks.
43163         * build-aux/gnupload (usage): Add an example that creates symlinks.
43165 2019-05-11  Paul Eggert  <eggert@cs.ucla.edu>
43167         fpucw: port to gcc -pedantic
43168         * lib/fpucw.h (GET_FPUCW, SET_FPUCW):
43169         Use __extension__ if using ({ ... }).
43171         crypto/af_alg: port to strict C compilers
43172         * lib/af_alg.c: Include af_alg.h regardless, so that the
43173         compilation unit is nonempty.
43175 2019-05-10  Bruno Haible  <bruno@clisp.org>
43177         base64: Avoid false positive warning from Coverity.
43178         Reported by Kamil Dudka <kdudka@redhat.com>.
43179         Idea by Paul Eggert.
43180         * lib/base64.c (base64_encode_fast, base64_encode): Add a no-op
43181         '& 0x3f' to the array index expressions. This convinces Coverity that
43182         there is no out-of-bounds array reference, regardless of the input.
43184 2019-05-09  Bruno Haible  <bruno@clisp.org>
43186         gettext: Update to gettext 0.20.
43187         * modules/gettext (Files): Remove m4/codeset.m4, m4/fcntl-o.m4,
43188         m4/glibc2.m4, m4/glibc21.m4, m4/intdiv0.m4, m4/intl.m4, m4/intldir.m4,
43189         m4/intmax.m4, m4/inttypes_h.m4, m4/inttypes-pri.m4, m4/lcmessage.m4,
43190         m4/lock.m4, m4/longlong.m4, m4/printf-posix.m4, m4/size_max.m4,
43191         m4/stdint_h.m4, m4/threadlib.m4, m4/uintmax_t.m4, m4/visibility.m4,
43192         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4. Add m4/host-cpu-c-abi.m4.
43193         (configure.ac): Request infrastructure compatible with gettext 0.20.
43194         * m4/glibc2.m4: Remove file.
43195         * m4/intdiv0.m4: Remove file.
43196         * m4/intl.m4: Remove file.
43197         * m4/intldir.m4: Remove file.
43198         * m4/intmax.m4: Remove file.
43199         * m4/printf-posix.m4: Remove file.
43200         * m4/uintmax_t.m4: Remove file.
43201         * m4/gettext.m4: Update from gettext 0.20.
43202         * m4/po.m4: Likewise.
43204 2019-05-09  Paul Eggert  <eggert@cs.ucla.edu>
43206         verify: remove verify_true
43207         * NEWS: Mention this.
43208         * lib/verify.h (verify_true): Remove.
43209         * tests/test-verify.c (item): Test verify_expr, not verify_true.
43211         Support C2x and C++17 static_assert
43212         C2x and C++17 finally added support for a simple, single-argument
43213         ‘static_assert’ that implements what the Gnulib ‘verify’ macro was
43214         doing back in 2005.  Implement static_assert on older platforms.
43215         The only remaining advantage of ‘verify’ is a shorter name.
43216         * doc/posix-headers/assert.texi (assert.h):
43217         * doc/verify.texi (Compile-time Assertions):
43218         Modernize for C2x and C++17.
43219         * lib/verify.h (_GL_HAVE__STATIC_ASSERT1, _GL_HAVE_STATIC_ASSERT1):
43220         New macros.
43221         (_GL_HAVE__STATIC_ASSERT): Remove.
43222         (_GL_HAVE__STATIC_ASSERT): Rely more heavily on __STDC_VERSION__.
43223         (_GL_VERIFY_TRUE, _GL_VERIFY_TYPE): Remove 2nd arg, the diagnostic
43224         string.  All callers changed.
43225         (_GL_VERIFY): Require 3 or more args, of which only the first 2
43226         are used.  All callers changed.
43227         (_Static_assert): Allow either 1 or 2 args, and define if
43228         !_GL_HAVE__STATIC_ASSERT1 instead of defining if
43229         !_GL_HAVE__STATIC_ASSERT.
43230         (static_assert): Define if !_GL_HAVE_STATIC_ASSERT1 instead
43231         of defining if !_GL_HAVE_STATIC_ASSERT.
43232         (verify_expr, verify): Don’t bother trying to copy the expression
43233         into the diagnostic, since 1-argument static_assert doesn’t.
43234         (verify): Prefer 1-argument _Static_assert if it works.
43235         * m4/assert_h.m4 (gl_ASSERT_H): Check for 1-argument static_assert.
43237 2019-05-08  Paul Eggert  <eggert@cs.ucla.edu>
43239         Fix _GL_HAVE__STATIC_ASSERT typo
43240         * lib/verify.h (_Static_assert): For the FreeBSD workaround,
43241         use _GL_HAVE__STATIC_ASSERT, not _GL_HAVE_STATIC_ASSERT.
43243 2019-05-05  Bruno Haible  <bruno@clisp.org>
43245         wcwidth: Ensure width 1, not 2, for ambiguous characters.
43246         Reported by Kiyoshi KANAZAWA <yoi_no_myoujou@yahoo.co.jp>
43247         via Akim Demaille <akim.demaille@gmail.com>.
43248         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Check the width of U+2202. Use an
43249         en_US.UTF-8 locale, since that is more likely to be present than an
43250         fr_FR.UTF-8 locale.
43251         * tests/test-wcwidth.c (main): Check the width of U+2202.
43252         * doc/posix-functions/wcwidth.texi: Mention the issue.
43254 2019-05-03  Paul Eggert  <eggert@cs.ucla.edu>
43256         Port manywarnings to GCC 9
43257         * build-aux/gcc-warning.spec: Sort.  Add -Wattribute-alias,
43258         -Wc11-c2x-compat, -Wcast-result (for the D programming language),
43259         -Wclass-conversion, -Wdeprecated-copy, -Wdeprecated-copy-dtor,
43260         -Winit-list-lifetime, -Wpessimizing-move, -Wprio-ctor-dtor,
43261         -Wredundant-move.  Adjust to minor wording changes in GCC 9’s
43262         --help=warnings output.
43263         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -Wabsolute-value,
43264         -Waddress-of-packed-member, -Wattribute-warning, -Wcannot-profile,
43265         -Wmissing-profile.  Change -Wattribute-alias to -Wattribute-alias=2.
43267 2019-04-30  Paul Eggert  <eggert@cs.ucla.edu>
43269         Sync lib/mktime-internal.h from glibc
43270         * config/srclist.txt: Add entry for lib/mktime-internal.h.
43271         * lib/mktime-internal.h: Autoupdate.
43273 2019-04-28  Bruno Haible  <bruno@clisp.org>
43275         tls tests: Prevent that the test takes too long.
43276         * tests/test-tls.c: Include <signal.h>, <unistd.h>.
43277         (main): Let the test fail if it takes more than 10 minutes.
43278         * modules/tls-tests (configure.ac): Test whether 'alarm' is declared.
43280 2019-04-27  Bruno Haible  <bruno@clisp.org>
43282         lock tests: Prevent that the test takes too long.
43283         * tests/test-lock.c: Include <signal.h>, <unistd.h>.
43284         (main): Let the test fail if it takes more than 10 minutes.
43285         * modules/lock-tests (configure.ac): Test whether 'alarm' is declared.
43287 2019-04-27  Bruno Haible  <bruno@clisp.org>
43289         localename: Fix crash on mingw (regression from 2018-11-23).
43290         * lib/localename.c (gl_locale_name_posix): Don't attempt to convert a
43291         locale name that is null.
43293 2019-04-27  Bruno Haible  <bruno@clisp.org>
43295         Fix gcc warnings on 64-bit mode mingw.
43296         * lib/clean-temp.c: Include <stdint.h> instead of defining uintptr_t.
43297         * lib/gl_array_list.c: Likewise.
43298         * lib/gl_array_map.c: Likewise.
43299         * lib/gl_array_set.c: Likewise.
43300         * lib/gl_carray_list.c: Likewise.
43301         * lib/gl_sublist.c: Likewise.
43302         * lib/gl_avltreehash_list.c (uintptr_t): Remove definition.
43303         * lib/gl_rbtreehash_list.c (uintptr_t): Likewise.
43304         * lib/gl_hash_map.c (uintptr_t): Likewise.
43305         * lib/gl_hash_set.c (uintptr_t): Likewise.
43306         * lib/gl_linkedhash_list.c (uintptr_t): Likewise.
43307         * lib/gl_linkedhash_map.c (uintptr_t): Likewise.
43308         * lib/gl_linkedhash_set.c (uintptr_t): Likewise.
43309         * lib/iconv.c (uintptr_t): Likewise.
43310         * lib/iconv_close.c (uintptr_t): Likewise.
43311         * tests/test-lock.c: Include <stdint.h>.
43312         (once_contender_thread, test_once): Cast through 'intptr_t' instead of
43313         'long'.
43314         * modules/clean-temp (Depends-on): Add stdint.
43315         * modules/array-list (Depends-on): Likewise.
43316         * modules/array-map (Depends-on): Likewise.
43317         * modules/array-set (Depends-on): Likewise.
43318         * modules/carray-list (Depends-on): Likewise.
43319         * modules/sublist (Depends-on): Likewise.
43320         * modules/lock-tests (Depends-on): Likewise.
43322 2019-04-27  Bruno Haible  <bruno@clisp.org>
43324         error: Tweak indentation.
43325         * lib/error.c: Correct indentation.
43327 2019-04-27  Bruno Haible  <bruno@clisp.org>
43329         term-style-control: Fix gcc warning on mingw.
43330         * lib/term-style-control.c (ensure_other_signal_handlers): Reduce scope
43331         of i.
43333 2019-04-26  Bruno Haible  <bruno@clisp.org>
43335         pipe-filter-gi, pipe-filter-ii: Fix gcc warning.
43336         * lib/pipe-filter-aux.h (read): Undefine before redefinition.
43338 2019-04-26  Bruno Haible  <bruno@clisp.org>
43340         relocatable-prog: Fix gcc warning on mingw.
43341         * lib/progreloc.c (maybe_executable): Don't define on native Windows and
43342         on EMX.
43344 2019-04-02  Bruno Haible  <bruno@clisp.org>
43346         gitsub.sh: New file.
43347         * top/gitsub.sh: New file.
43349 2019-04-18  Akim Demaille  <akim@lrde.epita.fr>
43351         argmatch: use void* for raw memory pointers
43352         * lib/argmatch.h, lib/argmatch.c (argmatch, argmatch_valid)
43353         (__xargmatch_internal, argmatch_to_argument): Use void* for pointers
43354         to "values", keep char* for strings.
43356 2019-04-21  Akim Demaille  <akim@lrde.epita.fr>
43358         prefix-gnulib-mk: fix the support for gnulib-po
43359         * build-aux/prefix-gnulib-mk (prefix_assignment): Remove useless $res.
43360         Don't touch HAVE_* variables.
43361         Map AM_CPPFLAGS and AM_CPPFLAGS to the library's corresponding variables.
43363 2019-04-18  Bernhard Voelker  <mail@bernhard-voelker.de>
43365         di-set: allow free with 'ino_map' being NULL.
43366         * lib/di-set.c (di_set_free): Avoid ino_map_free() when dis->ino_map
43367         is NULL.  Bug introduced in commit 3703dbbe88dd.
43368         * tests/test-di-set.c: Add di_set_free() right after di_set_alloc()
43369         as a test.
43371 2019-04-14  Paul Eggert  <eggert@cs.ucla.edu>
43373         * lib/str-two-way.h: Fix comment typo.
43375 2019-04-13  Bruno Haible  <bruno@clisp.org>
43377         x-to-1: Restore ability to use original calling convention.
43378         * build-aux/x-to-1.in: Add comments. Accept the original form of
43379         HELP2MAN argument as well as the form expected since 2012-12-12.
43381 2019-04-13  Bruno Haible  <bruno@clisp.org>
43383         x-to-1: Avoid failure due to missing perl modules.
43384         * build-aux/x-to-1.in: Test whether all the perl modules that help2man
43385         needs are installed.
43387 2019-04-13  Bruno Haible  <bruno@clisp.org>
43389         openmp-init: New module.
43390         * modules/openmp-init: New file.
43391         * modules/openmp: (Files, Depends-on, configure.ac, Makefile.am): Revert
43392         the changes from 2019-04-09.
43394 2019-04-12  Bruno Haible  <bruno@clisp.org>
43396         signbit: Fix compilation error when gnulib's math.h exists twice.
43397         * lib/math.in.h (GNULIB_defined_signbit): New macro.
43399 2019-04-12  Bruno Haible  <bruno@clisp.org>
43401         openmp: Fix compilation error on platforms without OpenMP.
43402         * lib/omp-init.c: Include <omp.h> only if _OPENMP.
43404 2019-04-09  Bernhard Voelker  <mail@bernhard-voelker.de>
43406         mountlist: make parsing /proc/self/mountinfo more robust
43407         Cater for the following issues with mountinfo parsing (the first
43408         one was reported by Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
43409         in <https://bugs.gnu.org/35137>).
43410         1. The fields source, target, mntroot and fstype may contain characters
43411         like '\r'; sscanf(3) fails to read such values with the %s format
43412         specifier because it would stop at such characters.
43413         Example: "mount -t tmpfs tmpfs /foo^Mbar".
43414         The only true separator in that file is the ' ' character.
43415         2. The source field may be an empty string, which happens e.g. with
43416         "mount -t tmpfs '' /target".
43417         3. The fstype field may contain mangled characters as well which need
43418         unescaping.
43419         * lib/mountlist.c (terminate_at_blank): Add utility function.
43420         (read_file_system_list): In the block trying to read the mountinfo file,
43421         avoid using sscanf(3) with %s format; instead, parse the above fields
43422         separated by spaces one by one.
43423         This also handles the case when the source field is an empty string.
43424         Unescape the fstype field.
43426 2019-04-09  Bruno Haible  <bruno@clisp.org>
43428         openmp: Add workaround for 32-bit programs on AIX.
43429         * lib/omp.in.h: New file.
43430         * lib/omp-init.c: New file, based on lib/nproc.c.
43431         * m4/omp_h.m4: New file.
43432         * modules/openmp (Files): Add them.
43433         (Depends-on): Add include_next, c-ctype, setenv.
43434         (configure.ac): Invoke gl_OMP_H.
43435         (Makefile.am): Add rules to create omp.h and compile omp-init.c.
43436         (Include): Mention <omp.h>.
43438 2019-04-09  Bruno Haible  <bruno@clisp.org>
43440         nproc: Fix return value for privileged processes.
43441         * lib/nproc.c (num_processors_ignoring_omp): Test getuid(), not
43442         getpid().
43444 2019-04-07  Bruno Haible  <bruno@clisp.org>
43446         Add copyright notices in several files.
43447         Reported by <ineiev@gnu.org> in <https://savannah.gnu.org/bugs/?54809>.
43448         * lib/_Noreturn.h: Add LGPLv2+ copyright notice.
43449         * lib/libunistring.valgrind: Likewise.
43450         * lib/iconv_open-*.gperf: Add GPLv2+ copyright notice.
43451         * lib/uniname/gen-uninames.lisp: Add GPLv3+ copyright notice.
43452         * lib/memchr.valgrind: Likewise.
43453         * lib/memchr2.valgrind: Likewise.
43454         * lib/rawmemchr.valgrind: Likewise.
43455         * lib/relocatable.valgrind: Likewise.
43456         * lib/strchrnul.valgrind: Likewise.
43458 2019-03-25  Bruno Haible  <bruno@clisp.org>
43460         term-style-control tests: Fix link error.
43461         Reported by Tom G. Christensen in
43462         <https://lists.gnu.org/archive/html/bug-gnulib/2019-03/msg00108.html>.
43463         * modules/term-style-control-tests (Makefile.am): Link
43464         test-term-style-control-hello and test-term-style-control-yes against
43465         LIBINTL.
43467 2019-03-24  Bruno Haible  <bruno@clisp.org>
43469         term-style-control: Add tests.
43470         * tests/test-term-style-control-hello.c: New file.
43471         * tests/test-term-style-control-yes.c: New file.
43472         * modules/term-style-control-tests: New file.
43474         term-style-control: New module.
43475         * lib/term-style-control.h: New file, based on libtextstyle's
43476         term-ostream.oo.h and term-ostream.oo.c.
43477         * lib/term-style-control.c: New file, based on libtextstyle's
43478         term-ostream.oo.c.
43479         * modules/term-style-control: New file.
43481 2019-03-22  Akim Demaille  <akim@lrde.epita.fr>
43483         _Noreturn: beware of C's _Noreturn in C++ pre C++11.
43484         * lib/_Noreturn.h, m4/gnulib-common.m4: Using C's _Noreturn in
43485         C++98 appears to be supported by Clang, but not by GCC nor ICC.
43487 2019-03-23  Bruno Haible  <bruno@clisp.org>
43489         Support cross-compilation to musl libc.
43490         Reported by Necktwi Ozfguah <necktwi@ferryfair.com>.
43491         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Add cross-compilation guesses for
43492         musl libc.
43493         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Likewise.
43494         * m4/cbrtl.m4 (gl_FUNC_CBRTL): Likewise.
43495         * m4/ceil.m4 (gl_FUNC_CEIL): Likewise.
43496         * m4/ceilf.m4 (gl_FUNC_CEILF): Likewise.
43497         * m4/ceill.m4 (gl_FUNC_CEILL): Likewise.
43498         * m4/chown.m4 (gl_FUNC_CHOWN): Likewise.
43499         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
43500         * m4/exp2l.m4 (gl_FUNC_EXP2L): Likewise.
43501         * m4/expl.m4 (gl_FUNC_EXPL): Likewise.
43502         * m4/expm1.m4 (gl_FUNC_EXPM1): Likewise.
43503         * m4/expm1l.m4 (gl_FUNC_EXPM1L): Likewise.
43504         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Likewise.
43505         * m4/floor.m4 (gl_FUNC_FLOOR): Likewise.
43506         * m4/floorf.m4 (gl_FUNC_FLOORF): Likewise.
43507         * m4/fmod.m4 (gl_FUNC_FMOD): Likewise.
43508         * m4/fmodf.m4 (gl_FUNC_FMODF): Likewise.
43509         * m4/fmodl.m4 (gl_FUNC_FMODL): Likewise.
43510         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Likewise.
43511         * m4/fpurge.m4 (gl_FUNC_FPURGE): Likewise.
43512         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Likewise.
43513         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise.
43514         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise.
43515         * m4/getgroups.m4 (AC_FUNC_GETGROUPS, gl_FUNC_GETGROUPS): Likewise.
43516         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
43517         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY_CLOBBER): Likewise.
43518         * m4/hypot.m4 (gl_FUNC_HYPOT): Likewise.
43519         * m4/hypotf.m4 (gl_FUNC_HYPOTF): Likewise.
43520         * m4/hypotl.m4 (gl_FUNC_HYPOTL): Likewise.
43521         * m4/iconv_open-utf.m4 (gl_FUNC_ICONV_OPEN_UTF_SUPPORT): Likewise.
43522         * m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): Likewise.
43523         * m4/log.m4 (gl_FUNC_LOG): Likewise.
43524         * m4/logf.m4 (gl_FUNC_LOGF): Likewise.
43525         * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Likewise.
43526         * m4/log10.m4 (gl_FUNC_LOG10): Likewise.
43527         * m4/log10f.m4 (gl_FUNC_LOG10F): Likewise.
43528         * m4/log10l.m4 (gl_FUNC_LOG10L): Likewise.
43529         * m4/log1p.m4 (gl_FUNC_LOG1P): Likewise.
43530         * m4/log1pf.m4 (gl_FUNC_LOG1PF): Likewise.
43531         * m4/log1pl.m4 (gl_FUNC_LOG1PL): Likewise.
43532         * m4/log2.m4 (gl_FUNC_LOG2): Likewise.
43533         * m4/log2f.m4 (gl_FUNC_LOG2F): Likewise.
43534         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Likewise.
43535         * m4/mkdir.m4 (gl_FUNC_MKDIR): Likewise.
43536         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Likewise.
43537         * m4/modf.m4 (gl_FUNC_MODF): Likewise.
43538         * m4/modff.m4 (gl_FUNC_MODFF): Likewise.
43539         * m4/modfl.m4 (gl_FUNC_MODFL): Likewise.
43540         * m4/perror.m4 (gl_FUNC_PERROR): Likewise.
43541         * m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_INFINITE,
43542         gl_PRINTF_INFINITE_LONG_DOUBLE, gl_PRINTF_DIRECTIVE_A,
43543         gl_PRINTF_DIRECTIVE_F, gl_PRINTF_FLAG_ZERO, gl_SNPRINTF_TRUNCATION_C99,
43544         gl_SNPRINTF_RETVAL_C99, gl_SNPRINTF_DIRECTIVE_N,
43545         gl_VSNPRINTF_ZEROSIZE_C99): Likewise.
43546         * m4/ptsname.m4 (gl_FUNC_PTSNAME): Likewise.
43547         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
43548         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Likewise.
43549         * m4/remainder.m4 (gl_FUNC_REMAINDER): Likewise.
43550         * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Likewise.
43551         * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Likewise.
43552         * m4/rintl.m4 (gl_FUNC_RINTL): Likewise.
43553         * m4/round.m4 (gl_FUNC_ROUND): Likewise.
43554         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
43555         * m4/roundl.m4 (gl_FUNC_ROUNDL): Likewise.
43556         * m4/setenv.m4 (gl_FUNC_SETENV): Likewise.
43557         * m4/signbit.m4 (gl_SIGNBIT): Likewise.
43558         * m4/sleep.m4 (gl_FUNC_SLEEP): Likewise.
43559         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
43560         * m4/strerror.m4 (gl_FUNC_STRERROR, gl_FUNC_STRERROR_0): Likewise.
43561         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
43562         * m4/strtold.m4 (gl_FUNC_STRTOLD): Likewise.
43563         * m4/trunc.m4 (gl_FUNC_TRUNC): Likewise.
43564         * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
43565         * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
43566         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
43567         * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Likewise.
43568         * m4/usleep.m4 (gl_FUNC_USLEEP): Likewise.
43569         * m4/utimes.m4 (gl_FUNC_UTIMES): Likewise.
43570         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
43572 2019-03-23  Bruno Haible  <bruno@clisp.org>
43574         posix_spawn_file_actions_*: Document musl libc bugs.
43575         * doc/posix-functions/posix_spawn_file_actions_addclose.texi: Mention
43576         the bug.
43577         * doc/posix-functions/posix_spawn_file_actions_adddup2.texi: Likewise.
43578         * doc/posix-functions/posix_spawn_file_actions_addopen.texi: Likewise.
43579         * m4/posix_spawn.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE): When
43580         cross-compiling to a musl system, guess no.
43581         (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2): Likewise.
43582         (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN): Likewise.
43584 2019-03-23  Bruno Haible  <bruno@clisp.org>
43586         futimens: Document musl libc bug.
43587         * doc/posix-functions/futimens.texi: Mention the bug.
43588         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Require AC_CANONICAL_HOST. When
43589         cross-compiling, guess no on glibc and musl systems.
43591 2019-03-23  Bruno Haible  <bruno@clisp.org>
43593         Clarify that cross-compilation guesses are guesses.
43594         * m4/chown.m4 (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): When cross-compiling, add
43595         prefix 'guessing ' to gl_cv_func_chown_follows_symlink.
43596         * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): When cross-compiling, add
43597         prefix 'guessing ' to gl_cv_func_fchownat_nofollow_works.
43598         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): When
43599         cross-compiling, add prefix 'guessing ' to gl_cv_func_getcwd_abort_bug.
43600         * m4/glob.m4 (gl_GLOB): When cross-compiling, add prefix 'guessing ' to
43601         gl_cv_glob_lists_symlinks.
43602         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): When cross-compiling, add prefix
43603         'guessing ' to ac_cv_func_malloc_0_nonnull.
43604         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): When cross-compiling, add prefix
43605         'guessing ' to ac_cv_func_realloc_0_nonnull.
43606         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, add prefix
43607         'guessing ' to gl_cv_func_poll.
43608         * m4/iconv_open-utf.m4 (gl_FUNC_ICONV_OPEN_UTF_SUPPORT): When cross-
43609         compiling, add prefix 'guessing ' to gl_cv_func_iconv_supports_utf.
43610         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): Update accordingly.
43612 2019-03-23  Bruno Haible  <bruno@clisp.org>
43614         strtold: Fix typo.
43615         * m4/strtold.m4 (gl_FUNC_STRTOLD): Fix typo in variable name.
43617 2019-03-23  Bruno Haible  <bruno@clisp.org>
43619         noreturn: In C++ mode with clang, use _Noreturn as fallback.
43620         Reported by Akim Demaille.
43621         * lib/noreturn.h (_GL_NORETURN_FUNC): In C++ mode with clang, when
43622         [[noreturn]] would not work, use _Noreturn instead.
43624 2019-03-22  Akim Demaille  <akim@lrde.epita.fr>
43626         libtextstyle-optional: Fix compiler warnings.
43627         * lib/textstyle.in.h (html_styled_ostream_create): Flag arguments
43628         as unused.
43630 2019-03-19  Akim Demaille  <akim@lrde.epita.fr>
43632         bitset: fix memory leaks
43633         Reported by Bruno Haible.
43634         https://lists.gnu.org/archive/html/bug-gnulib/2019-03/msg00027.html
43635         * lib/bitset/vector.c (vbitset_free): New.
43636         (vbitset_vtable): Use it.
43638 2019-03-19  Akim Demaille  <akim@lrde.epita.fr>
43640         bitset: minor changes
43641         * lib/bitset/base.h (bitset_alloc_type): Remove, unused.
43642         * lib/bitset/table.c: Formatting changes.
43643         Remove useless braces.
43644         Prefer using else in cascades of if/else-if with returns.
43645         * lib/bitset/vector.c: Reduce scopes.
43647 2019-03-19  Akim Demaille  <akim@lrde.epita.fr>
43649         bitset: expose bitset_resize
43650         * lib/bitset.h (bitset_resize): Bounce on the polymorphic implementation.
43651         * tests/test-bitset.c (check_attributes): Check bitset_resize.
43652         (main): Use a variable bitset as reference, since fixed does not support resize.
43654 2019-03-19  Bruno Haible  <bruno@clisp.org>
43656         doc: Document the 'stdnoreturn' and 'noreturn' modules.
43657         Reported by Akim Demaille.
43658         * doc/noreturn.texi: New file.
43659         * doc/gnulib.texi: Include it.
43661 2019-03-19  Bruno Haible  <bruno@clisp.org>
43663         doc: Document how to use 'static inline'.
43664         * doc/static-inline.texi: New file.
43665         * doc/gnulib.texi: Include it.
43667 2019-03-19  Bruno Haible  <bruno@clisp.org>
43669         libtextstyle-optional: Add tests.
43670         * tests/test-libtextstyle.c: New file, based on libtextstyle's
43671         adhoc-tests/hello.c.
43672         * tests/test-libtextstyle-default.css: New file, copied from
43673         libtextstyle's adhoc-tests/hello-default.css.
43674         * modules/libtextstyle-optional-tests: New file.
43676         libtextstyle-optional: New module.
43677         * lib/textstyle.in.h: New file, based on libtextstyle's textstyle.h.
43678         * m4/libtextstyle-optional.m4: New file, based on m4/libtextstyle.m4.
43679         * modules/libtextstyle-optional: New file.
43681 2019-03-19  Bruno Haible  <bruno@clisp.org>
43683         c-stack: Make signal handlers more reliable.
43684         * lib/c-stack.c (progname): New variable.
43685         (die): Use it.
43686         (c_stack_action): Initialize it.
43687         (segv_handler): Save and restore errno.
43689 2019-03-19  Bruno Haible  <bruno@clisp.org>
43691         Help making signal handlers more reliable.
43692         * m4/gnulib-common.m4 (gl_COMMON_BODY): Emit definition of
43693         _GL_ASYNC_SAFE into config.h.
43694         * lib/nanosleep.c (sighandler): Mark as _GL_ASYNC_SAFE.
43695         * lib/fatal-signal.h (at_fatal_signal): Add _GL_ASYNC_SAFE marker to
43696         argument.
43697         * lib/fatal-signal.c (action_t, uninstall_handlers,
43698         fatal_signal_handler): Mark as _GL_ASYNC_SAFE.
43699         * lib/clean-temp.c (cleanup_action): Mark as _GL_ASYNC_SAFE.
43700         * lib/wait-process.c (cleanup_slaves, cleanup_slaves_action): Mark as
43701         _GL_ASYNC_SAFE.
43702         * lib/c-stack.h (c_stack_action): Add _GL_ASYNC_SAFE marker to argument.
43703         * lib/c-stack.c: Add _GL_ASYNC_SAFE markers.
43705 2019-03-18  Bruno Haible  <bruno@clisp.org>
43707         _Noreturn: clang and MSVC do support [[noreturn]] in C++11 mode.
43708         * lib/_Noreturn.h: Use [[noreturn]] if __GNUC__ and __GNUC_MINOR__
43709         indicate clang, or if _MSC_VER indicates MSVC++ 14.0 or newer.
43711 2019-03-17  Akim Demaille  <akim@lrde.epita.fr>
43713         _Noreturn: GCC 4.7 does not support [[noreturn]] in C++11 mode
43714         * lib/_Noreturn.h, m4/gnulib-common.m4: Don't use [[noreturn]] before
43715         GCC 4.8.
43717 2019-03-17  Paul Eggert  <eggert@cs.ucla.edu>
43719         fts: minor simplification
43720         * lib/fts.c (fts_safe_changedir): Remove redundant assignment.
43722 2019-03-17  Akim Demaille  <akim@lrde.epita.fr>
43724         bitset, timevar: Depend on c99.
43725         Reported by Bruno Haible.
43726         * modules/bitset, modules/timevar (Depends-on): Add c99.
43728 2019-03-16  Akim Demaille  <akim@lrde.epita.fr>
43730         bitset: a bit (...) more tests
43731         * tests/test-bitset.c (check_attributes): Check zero and ones.
43733 2019-03-16  Akim Demaille  <akim@lrde.epita.fr>
43735         bitset: fix overflows.
43736         Reported by Bruno Haible.
43737         https://lists.gnu.org/archive/html/bug-gnulib/2019-03/msg00017.html
43738         * lib/bitset/table.c (tbitset_test): last_bit is the position of
43739         the bit in the array of bitset_word, so be sure to take its modulo
43740         number-of-bits-in-bitset-word (i.e., EBITSET_ELT_WORDS).
43741         * lib/bitset/list.c (lbitset_unused_clear): Likewise.
43743 2019-03-14  Akim Demaille  <akim@lrde.epita.fr>
43745         bitset: style changes.
43746         * lib/bitset/table.c: Use NULL, not 0, for pointers.
43747         Formatting changes.
43748         (tbitset_list): Reduce scopes.
43750 2019-03-16  Bruno Haible  <bruno@clisp.org>
43752         fatal-signal: Pass the signal number to the action.
43753         * lib/fatal-signal.h (at_fatal_signal): Change the signature.
43754         * lib/fatal-signal.c (action_t): Take the signal number as parameter.
43755         (fatal_signal_handler): Pass the signal number to the action.
43756         * lib/clean-temp.c (cleanup_action): Renamed from cleanup. Take the
43757         signal number as parameter.
43758         (create_temp_dir): Update.
43759         * lib/wait-process.c (cleanup_slaves_action): New function.
43760         (register_slave_subprocess): Update at_fatal_signal invocation.
43761         * NEWS: Mention the change.
43763 2019-03-16  Bruno Haible  <bruno@clisp.org>
43765         fatal-signal: Add function that lists the fatal signals.
43766         * lib/fatal-signal.h (get_fatal_signals): New declaration.
43767         * lib/fatal-signal.c (get_fatal_signals): New function.
43769 2019-03-14  Bruno Haible  <bruno@clisp.org>
43771         isatty: Make it return true in Cygwin consoles on native Windows.
43772         * lib/isatty.c: Include <string.h>.
43773         (GetProcAddress): New macro.
43774         (GetNamedPipeClientProcessIdFuncType): New type.
43775         (GetNamedPipeClientProcessIdFunc): New variable.
43776         (QueryFullProcessImageNameFuncType): New type.
43777         (QueryFullProcessImageNameFunc): New variable.
43778         (initialized): New variable.
43779         (initialize): New function.
43780         (IsCygwinConsoleHandle): New function.
43781         (isatty): Invoke it.
43782         * doc/posix-functions/isatty.texi: Mention the issue.
43784 2019-03-14  Bruno Haible  <bruno@clisp.org>
43786         all: Update URLs to msdn.microsoft.com.
43787         * lib/stat-w32.c et al.: Update URLs after most of msdn.microsoft.com
43788         was moved to docs.microsoft.com.
43790 2019-03-13  Bruno Haible  <bruno@clisp.org>
43792         gnulib-tool: Clarify the coding style.
43793         Suggested by Pavel Raiskup <praiskup@redhat.com>.
43794         * gnulib-tool: Add comment about coding style.
43796 2019-03-11  Paul Eggert  <eggert@cs.ucla.edu>
43798         strtod: fix clash with strtold
43799         Problem reported for RHEL 5 by Jesse Caldwell (Bug#34817).
43800         * lib/strtod.c (compute_minus_zero, minus_zero):
43801         Simplify by remving the macro / external variable,
43802         and having just a function.  User changed.  This avoids
43803         the need for an external variable that might clash.
43805 2019-03-10  Bruno Haible  <bruno@clisp.org>
43807         alloca-opt: Fix conflict mingw's new <alloca.h> file.
43808         Reported by Eli Zaretskii <eliz@gnu.org>.
43809         * lib/alloca.in.h: On mingw systems that have <alloca.h>, include that.
43810         * m4/alloca.m4 (gl_FUNC_ALLOCA): Set HAVE_ALLOCA_H.
43811         * modules/alloca-opt (Makefile.am): Substitute HAVE_ALLOCA_H.
43813 2019-03-10  Bruno Haible  <bruno@clisp.org>
43815         tests: Avoid havoc with "gcc -fcheck-pointer-bounds".
43816         * tests/test-fprintf-posix2.c: Skip the test when -fcheck-pointer-bounds
43817         is in use.
43818         * tests/test-printf-posix2.c: Likewise.
43820 2019-03-10  Bruno Haible  <bruno@clisp.org>
43822         uninorm tests: Free allocated memory.
43823         * tests/uninorm/test-u32-normalize-big.h
43824         (struct normalization_test_file): Remove 'const' from allocated member.
43825         (free_normalization_test_file): New declaration.
43826         * tests/uninorm/test-u32-normalize-big.c (test_other): Free allocated
43827         memory.
43828         (free_normalization_test_file): New function.
43829         * tests/uninorm/test-u32-nfc-big.c (main): Free allocated
43830         'struct normalization_test_file' contents.
43831         * tests/uninorm/test-u32-nfd-big.c (main): Likewise.
43832         * tests/uninorm/test-u32-nfkc-big.c (main): Likewise.
43833         * tests/uninorm/test-u32-nfkd-big.c (main): Likewise.
43835 2019-03-10  Bruno Haible  <bruno@clisp.org>
43837         di-set: Fix memory leak.
43838         * lib/di-set.c (di_set_free): Free the ino_map through ino_map_free(),
43839         not free().
43841 2019-03-10  Bruno Haible  <bruno@clisp.org>
43843         tests: Free allocated memory.
43844         Reported by <deltatau@protonmail.com> via Assaf Gordon.
43845         * tests/test-astrxfrm.c (main): Free allocated memory.
43846         * tests/test-bitset.c (compare, check_attributes): Free allocated
43847         bitsets.
43848         * tests/test-filenamecat.c (main): Free allocated memory.
43849         * tests/test-freadahead.c (main): Free allocated memory and close stdin.
43850         * tests/test-freadptr.c (main): Likewise.
43851         * tests/test-freadptr2.c (main): Free allocated memory.
43852         * tests/test-freadseek.c (main): Likewise.
43853         * tests/test-gc-arcfour.c (main): Close allocated context.
43854         * tests/test-gc-arctwo.c (main): Likewise.
43855         * tests/test-gc-des.c (main): Close all allocated contexts.
43856         * tests/test-pipe-filter-gi1.c (main): Free allocated memory.
43857         * tests/test-pipe-filter-ii1.c (main): Likewise.
43858         * tests/test-posix_spawn_file_actions_addchdir.c (main): Destroy the
43859         allocated file actions.
43860         * tests/test-posix_spawn_file_actions_addclose.c (main): Likewise.
43861         * tests/test-posix_spawn_file_actions_adddup2.c (main): Likewise.
43862         * tests/test-posix_spawn_file_actions_addopen.c (main): Likewise.
43863         * tests/test-sameacls.c (main): Free allocated memory and ACLs.
43864         * tests/test-strfmon_l.c (main): Free allocated locales.
43865         * tests/test-striconveh.c (main): Free allocated iconv_t objects.
43866         * tests/uniconv/test-u8-conv-to-enc.c (main): Free allocated memory.
43867         * tests/uniconv/test-u16-conv-to-enc.c (main): Likewise.
43868         * tests/uniconv/test-u32-conv-to-enc.c (main): Likewise.
43869         * tests/unistr/test-chr.h (main): Free input32.
43870         * tests/unistr/test-strchr.h (test_strchr): Likewise.
43872 2019-03-10  Bruno Haible  <bruno@clisp.org>
43874         tests: Prepare for using valgrind.
43875         * tests/*.sh: Invoke all test programs through ${CHECKER}.
43876         * tests/*/*.sh: Likewise.
43877         * tests/test-freadptr.c (main): Update accordingly.
43878         * tests/test-freadseek.c (main): Likewise.
43880 2019-03-09  Bruno Haible  <bruno@clisp.org>
43882         get-rusage-as, pthread_sigmask tests: Fix -fsanitize=thread findings.
43883         * lib/get-rusage-as.c (get_rusage_as): When compiled by
43884         "gcc -fsanitize=thread", don't try get_rusage_as_via_setrlimit.
43885         * tests/test-pthread_sigmask2.c (main): Clean up the killer_thread
43886         before exiting.
43888 2019-03-09  Jim Meyering  <meyering@fb.com>
43890         test-userspec.c: don't print NULL
43891         * tests/test-userspec.c (main): A test release of gcc,
43892         9.0.1 20190310, warned that this test would attempt to
43893         print a NULL pointer via a %s printf format.  Fix that
43894         and remove the unnecessary preceding "!diag" conjunct.
43895         Also add a comment.
43897 2019-03-03  Bruno Haible  <bruno@clisp.org>
43899         getloadavg: Write NULL for the null pointer.
43900         Reported by Michal Privoznik <mprivozn@redhat.com>.
43901         * lib/getloadavg.c (getloadavg): Write NULL instead of 0.
43903 2019-02-28  Michal Privoznik  <mprivozn@redhat.com>
43905         alloca, tsearch-tests: Write NULL for the null pointer.
43906         * lib/alloca.c (i00afunc): Write NULL instead of 0.
43907         * tests/test-tsearch.c (mangle_tree): Likewise.
43909 2019-03-09  Bruno Haible  <bruno@clisp.org>
43911         strfmon_l: Fix -fsanitize=address finding.
43912         * lib/strfmon_l.c: Include <errno.h>, <stdbool.h>, <stdlib.h>,
43913         <string.h>.
43914         (MAX_ARGS): Renamed from MAX_ARG_WORDS.
43915         (directive_t, directives_t): New types.
43916         (fmon_parse): New function.
43917         (rpl_strfmon_l): Don't call va_arg more often than needed for the
43918         format string. Consume 'long double' arguments in places where the
43919         format string indicates so.
43920         * modules/strfmon_l (Depends-on): Add 'stdbool'.
43922 2019-03-09  Bruno Haible  <bruno@clisp.org>
43924         crypto/des: Fix undefined behaviour.
43925         * lib/des.c (READ_64BIT_DATA): Cast bytes to 'unsigned int', to avoid
43926         shift operations on 'int'.
43928 2019-03-09  Bruno Haible  <bruno@clisp.org>
43930         Fix undefined behaviour.
43931         * lib/bitrotate.h (rotl16, rotr16, rotl8, rotr8): Cast x to
43932         'unsigned int', to avoid shift operations on 'int'.
43933         * lib/xmemdup0.c (xmemdup0): Don't invoke memcpy with a zero size.
43934         * tests/test-count-leading-zeros.c (main): Use a random number that has
43935         as many bits as TYPE, not only 2*15 or 2*31 bits.
43936         * tests/test-count-trailing-zeros.c (main): Likewise.
43937         * tests/test-count-one-bits.c (main): Likewise.
43938         * tests/test-memmem.c: Don't include "null-ptr.h".
43939         (main): Use zerosize_ptr() instead of null_ptr().
43940         * modules/memmem-tests (Files): Remove tests/null-ptr.h.
43942 2019-03-08  Bruno Haible  <bruno@clisp.org>
43944         unilbrk/u*-possible-linebreaks: Fix undefined behaviour.
43945         Reported by Jeffrey Walton <noloader@gmail.com>.
43946         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks): Don't
43947         invoke memset with a zero size.
43948         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks):
43949         Likewise.
43950         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks):
43951         Adjust accordingly.
43953 2019-03-08  Bruno Haible  <bruno@clisp.org>
43955         unistr/*, uniconv/*: Fix undefined behaviour.
43956         Reported by Jeffrey Walton <noloader@gmail.com>.
43957         * lib/unistr/u-cpy.h (FUNC): Don't invoke memcpy with a zero size.
43958         * lib/unistr/u-cpy-alloc.h (FUNC): Likewise.
43959         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Likewise.
43960         * lib/uniconv/u8-conv-to-enc.c (u8_conv_to_encoding): Likewise.
43962 2019-03-08  Bruno Haible  <bruno@clisp.org>
43964         unistr/u8-cmp: Fix undefined behaviour.
43965         Reported by Jeffrey Walton <noloader@gmail.com>.
43966         * lib/unistr/u8-cmp.c (u8_cmp): Don't invoke memcmp if n is zero.
43968 2019-03-08  Bruno Haible  <bruno@clisp.org>
43970         unictype/numeric: Fix undefined behaviour.
43971         Reported by Jeffrey Walton <noloader@gmail.com>.
43972         * lib/unictype/numeric.c (uc_numeric_value): Avoid undefined behaviour
43973         on shift overflow, caught by "gcc -fsanitize=undefined".
43974         * lib/unictype/bidi_of.c (uc_bidi_class): Add cast, for clarity.
43975         * lib/unictype/categ_of.c (lookup_withtable): Likewise.
43976         * lib/unictype/joininggroup_of.c (uc_joining_group): Likewise.
43978 2019-03-05  Paul Eggert  <eggert@cs.ucla.edu>
43980         git-version-gen: fix --version copyright year
43981         * build-aux/git-version-gen, build-aux/move-if-change (version):
43982         --version output copyright year is now taken from script year,
43983         so that it no longer needs to be updated by hand.
43985 2019-03-04  Bruno Haible  <bruno@clisp.org>
43987         relocatable-prog: Use wrapper-free installation on Mac OS X, take 2.
43988         This approach supports relocatable installation of shared libraries
43989         which depend on other shared libraries from the same package.
43990         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Determine use_macos_tools.
43991         If use_macos_tools is true, use reloc-ldflags and set LIBTOOL to be a
43992         wrapper around the original LIBTOOL.
43993         * build-aux/reloc-ldflags: Add support for Mac OS X, which uses the
43994         token '@loader_path' instead of '$ORIGIN'.
43995         * build-aux/libtool-reloc: New file.
43996         * modules/relocatable-prog (Files): Add it.
43997         * doc/relocatable-maint.texi (Supporting Relocation): Update to match
43998         the recent changes. Document the need to set the *_LDFLAGS of libraries.
43999         RELOCATABLE_LIBRARY_PATH and RELOCATABLE_CONFIG_H_DIR should be set in
44000         Makefile.am, not in configure.ac.
44002 2019-03-04  Bruno Haible  <bruno@clisp.org>
44004         relocatable-prog: Revert "Use wrapper-free installation on Mac OS X."
44005         * build-aux/install-reloc: Revert change.
44006         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Likewise.
44008 2019-02-24  Paul Eggert  <eggert@cs.ucla.edu>
44010         nstrftime: support the ‘+’ flag
44011         * lib/nstrftime.c (add, __strftime_internal):
44012         Add support for the ‘+’ flag introduced in POSIX.1-2017.
44013         (__strftime_internal): New arg ‘width’.  All uses changed.
44014         (DO_YEARISH, DO_MAYBE_SIGNED_NUMBER): New macros.
44016 2019-02-24  Bruno Haible  <bruno@clisp.org>
44018         relocatable-prog: Improve verbose output.
44019         * build-aux/install-reloc (func_verbose): Escape characters that would
44020         be interpreted by the shell.
44022 2019-02-24  Bruno Haible  <bruno@clisp.org>
44024         stat, lstat: Fix conflict with relocatable-prog-wrapper module.
44025         * lib/stat.c: On platforms other than OSF/1, include <sys/stat.h>, not
44026         "sys/stat.h".
44027         * lib/lstat.c: Likewise.
44028         * lib/fstat.c: Likewise.
44029         * lib/fstatat.c: Likewise.
44031 2019-02-23  Bernhard Voelker  <mail@bernhard-voelker.de>
44033         long-options: add parse_gnu_standard_options_only
44034         Discussed in https://bugs.gnu.org/33468 .
44036         * lib/long-options.c (parse_long_options): Use EXIT_SUCCESS instead of 0
44037         (parse_gnu_standard_options_only): Add function to process
44038         the GNU default options --help and --version and fail for
44039         any other unknown long or short option. See
44040         https://gnu.org/prep/standards/html_node/Command_002dLine-Interfaces.html
44041         * lib/long-options.h (parse_gnu_standard_options_only): Declare it.
44042         * modules/long-options (depends-on): Add stdbool, exitfail.
44043         * top/maint.mk (sc_prohibit_long_options_without_use): Update
44044         syntax-check rule, add new function name.
44046 2019-02-23  Bruno Haible  <bruno@clisp.org>
44048         relocatable-prog: Update documentation.
44049         * doc/relocatable-maint.texi (Supporting Relocation): Update to match
44050         the recent changes.
44052 2019-02-23  Paul Eggert  <eggert@cs.ucla.edu>
44054         nstrftime: tweak arg order
44055         * lib/nstrftime.c (__strftime_internal): Interchange arg order.
44056         All callers changed.  Suggested by TAMUKI Shoichi in:
44057         https://lists.gnu.org/r/bug-gnulib/2019-02/msg00052.html
44059 2019-02-23  Bruno Haible  <bruno@clisp.org>
44061         relocatable-prog: Use wrapper-free installation also on Mac OS X.
44062         Reported by Paul Smith <psmith@gnu.org>.
44063         * build-aux/install-reloc: Accept a 'mode' argument as first argument.
44064         (func_relativize): New function, from gnulib-tool.
44065         Handle mode 'macosx' through invocations of 'otool' and
44066         'install_name_tool'.
44067         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Determine use_macos_tools.
44068         If use_macos_tools is true, set INSTALL_PROGRAM_ENV to an
44069         'install-reloc' invocation with mode 'macosx'.
44071 2019-02-23  Bruno Haible  <bruno@clisp.org>
44073         relocatable-prog: Use $ORIGIN trick also on GNU/Hurd.
44074         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Use $ORIGIN trick also on
44075         Hurd with glibc >= 2.27.
44077 2019-02-21  Paul Eggert  <eggert@cs.ucla.edu>
44079         nstrftime: merge glibc strftime changes
44080         This incorporates:
44081         2019-02-11 Fix a few whitespace arrangement inconsistencies
44082         2019-01-24 strftime: Pass flags from "%EY" to "%Ey" [BZ #24096]
44083         2019-01-24 Set the default width of "%Ey" to 2 [BZ #23758]
44084         2019-01-11 strftime: use the "L_" macro with character literals
44085         * lib/nstrftime.c (__strftime_internal): New arg yr_spec.  All
44086         callers changed.  Default width of %Ey is now 2.  This is needed
44087         for proper handling of Japanese dates starting on 2019-05-01.
44089 2019-02-19  Bruno Haible  <bruno@clisp.org>
44091         relocatable-prog: Use $ORIGIN trick on more platforms.
44092         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Use $ORIGIN trick also on
44093         FreeBSD >= 7.3, DragonFly >= 3.0, NetBSD >= 8.0, OpenBSD >= 5.4,
44094         Solaris >= 10, Haiku. But don't use it on Android.
44095         * build-aux/reloc-ldflags: Allow the use of the $ORIGIN trick also on
44096         Hurd, FreeBSD, DragonFly, NetBSD, OpenBSD, Solaris, Haiku.
44098 2019-02-19  Bruno Haible  <bruno@clisp.org>
44100         progreloc: Speed up executable lookup on various platforms.
44101         * lib/progreloc.c: Include <errno.h>.
44102         (safe_read, full_read): New functions.
44103         (find_executable): On GNU/kFreeBSD, FreeBSD, DragonFly, NetBSD, Solaris,
44104         prefer the information from the /proc file system to a PATH search.
44106 2019-02-19  Bruno Haible  <bruno@clisp.org>
44108         progreloc: Simplify code for Android.
44109         * lib/progreloc.c (executable_fd): Don't define on Android.
44110         (maybe_executable, find_executable): Don't use executable_fd on Android.
44112 2019-02-15  Bruno Haible  <bruno@clisp.org>
44114         gnulib-tool: Support --import with just a few tests, not --with-tests.
44115         * gnulib-tool (func_import): New variable 'gentests'. Use it instead of
44116         'inctests' when generating files; use 'inctests' only for computing the
44117         transitive closure.
44119 2019-02-14  Bruno Haible  <bruno@clisp.org>
44121         gnulib-tool: Improve handling of multiple --local-dir options.
44122         * doc/gnulib.texi (Extending Gnulib): Explain how multiple --local-dir
44123         options work.
44124         * gnulib-tool (func_path_prepend): Remove function.
44125         (func_path_foreach): Make IFS handling more robust.
44126         (local_gnulib_path): Collect --local-dir values using func_path_append,
44127         not func_path_prepend.
44128         (func_determine_path_separator): Make IFS handling more robust.
44129         (func_lookup_file_cb): New function.
44130         (func_lookup_file): Rewritten to use func_lookup_file_cb instead of
44131         func_lookup_local_file. Apply the patches in the reverse order of their
44132         origin in $local_gnulib_path.
44133         (func_count_relative_local_gnulib_path): Make IFS handling more robust.
44134         * NEWS: Mention that the first --local-dir option is the one with
44135         highest priority.
44137 2019-02-10  Bruno Haible  <bruno@clisp.org>
44139         libtextstyle: New module.
44140         * m4/libtextstyle.m4: New file.
44141         * modules/libtextstyle: New file.
44143 2019-02-05  Bruno Haible  <bruno@clisp.org>
44145         declared.sh: Fix bug with variables of pointer type.
44146         * build-aux/declared.sh (sed_extract_extern_declared): Allow the space
44147         before the symbol to be omitted if the preceding character is a '*'.
44149 2019-02-04  Bruno Haible  <bruno@clisp.org>
44151         Add script for running tests under valgrind.
44152         * build-aux/run-test: New file, from GNU libunistring.
44153         * doc/valgrind-tests.texi: Rewritten to mention alternative approaches
44154         as well.
44156 2019-02-04  Bruno Haible  <bruno@clisp.org>
44158         declared.sh: Fix --version output.
44159         * build-aux/declared.sh (func_version): Update package name.
44161 2019-02-03  Bruno Haible  <bruno@clisp.org>
44163         Add script for determining the set of symbols to export from a library.
44164         * build-aux/declared.sh: New file, from GNU libunistring.
44165         * doc/lib-symbol-visibility.texi (Exported Symbols of Shared Libraries):
44166         Mention it.
44168 2019-02-02  Paul Eggert  <eggert@cs.ucla.edu>
44170         vla: add commentary about VLA_ELEMS
44171         * lib/vla.h (VLA_ELEMS): Add commentary,
44172         some inspired by Bruno Haible’s proposal in:
44173         https://lists.gnu.org/r/bug-gnulib/2019-01/msg00109.html
44175         dtoastr,ftoastr,ldtoastr: port to c-strtod changes
44176         Decouple these modules from c-strtod.  Nowadays it’s reasonable to
44177         assume the C99 signatures for strtod and strtold.  Programs that
44178         require stricter adherence to C99 should also use the strtod and
44179         strtold modules as needed, and we no longer need the
44180         HAVE_C99_STRTOLD macro.
44181         * NEWS: Mention this.
44182         * lib/ftoastr.c (STRTOF) [LENGTH == 3]: Assume strtold.
44183         * m4/c-strtod.m4 (gl_C_STRTOLD): Do not define HAVE_C99_STRTOLD.
44184         * modules/dtoastr, modules/ftoastr, modules/ldtoastr:
44185         (Files): Remove m4/c-strtod.m4.
44186         (configure.ac): Do not require gl_C99_STRTOLD, which no longer
44187         exists.
44189 2019-02-02  Bruno Haible  <bruno@clisp.org>
44191         fma: Improve code style.
44192         * lib/fma.c: Include <limits.h>, for CHAR_BIT.
44194 2019-02-02  Colin Watson  <cjwatson@debian.org>
44196         *-map tests: Fix compilation error.
44197         * tests/test-array_map.c: Include <limits.h>, for CHAR_BIT.
44198         * tests/test-hash_map.c: Likewise.
44199         * tests/test-linkedhash_map.c: Likewise.
44201 2019-01-31  Bruno Haible  <bruno@clisp.org>
44203         c-strtod, c-strtold: Use the bug fixes for strtod, strtold.
44204         * lib/stdlib.in.h (GNULIB_defined_strtod_function,
44205         GNULIB_defined_strtold_function): New macros.
44206         * lib/c-strtod.c (HAVE_GOOD_STRTOD_L): New macro.
44207         (STRTOD): Ignore HAVE_C99_STRTOLD.
44208         (c_locale): Don't define it on platforms where strtod_l/strtold_l is
44209         deemed buggy. But do use it on platforms where uselocale exists and is
44210         usable.
44211         (C_STRTOD): Don't use STRTOD_L on platforms where strtod_l/strtold_l is
44212         deemed buggy. On platforms where uselocale exists and is usable, use
44213         uselocale and strtod/strtold.
44214         * m4/c-strtod.m4 (gl_C99_STRTOLD): Remove macro.
44215         (gl_C_STRTOD): Require gt_FUNC_USELOCALE.
44216         (gl_C_STRTOLD): Likewise. Define HAVE_C99_STRTOLD unconditionally.
44217         * modules/c-strtod (Files): Add m4/intl-thread-locale.m4.
44218         (Depends-on): Add strtod.
44219         * modules/c-strtold (Files): Add m4/intl-thread-locale.m4.
44220         (Depends-on): Add strtold.
44222 2019-01-31  Bruno Haible  <bruno@clisp.org>
44224         strtod, strtold: Use the locale's decimal point.
44225         * lib/strtod.c: Include <locale.h>, <stdio.h>, <langinfo.h>.
44226         (decimal_point_char): New function, copied from lib/vasnprintf.c.
44227         (parse_number): Add a radixchar argument. Use it instead of '.'.
44228         (STRTOD): Invoke decimal_point_char and pass the result to parse_number.
44229         * m4/strtod.m4 (gl_PREREQ_STRTOD): Test whether nl_langinfo exists.
44230         * m4/strtold.m4 (gl_PREREQ_STRTOLD): Likewise.
44231         * tests/test-strtod1.c: New file.
44232         * tests/test-strtod1.sh: New file.
44233         * modules/strtod-tests (Files): Add test-strtod1.{sh,c}. Add
44234         locale-fr.m4 and its dependencies.
44235         (configure.ac): Invoke gt_LOCALE_FR, gt_LOCALE_FR_UTF8.
44236         (Makefile.am): Arrange to compile test-strtod1.c and run
44237         test-strtod1.sh.
44238         * tests/test-strtold1.c: New file.
44239         * tests/test-strtold1.sh: New file.
44240         * modules/strtold-tests (Files): Add test-strtold1.{sh,c}. Add
44241         locale-fr.m4 and its dependencies.
44242         (configure.ac): Invoke gt_LOCALE_FR, gt_LOCALE_FR_UTF8.
44243         (Makefile.am): Arrange to compile test-strtold1.c and run
44244         test-strtold1.sh.
44246 2019-01-31  Bruno Haible  <bruno@clisp.org>
44248         strtod, strtold tests: Simplify tests.
44249         * tests/test-strtod.c (main): Assume no rounding errors for 0.5.
44250         * tests/test-strtold.c (main): Likewise.
44252 2019-01-31  Bruno Haible  <bruno@clisp.org>
44254         strtod, strtold: Avoid unnecessary rounding errors.
44255         * lib/strtod.c (parse_number): Drop trailing zeroes before doing the
44256         decimal to DOUBLE conversion.
44258 2019-01-31  Bruno Haible  <bruno@clisp.org>
44260         strtod, strtold: Work around HP-UX 11.31/ia64 bug.
44261         * lib/strtod.c (STRTOD): When there is an extra character after the
44262         exponent marker 'p', reparse the number.
44263         * doc/posix-functions/strtod.texi: Document the HP-UX 11.31 bug.
44264         * doc/posix-functions/strtold.texi: Likewise.
44266 2019-01-29  Bruno Haible  <bruno@clisp.org>
44268         strtold: Add tests.
44269         * tests/test-strtold.c: New file, based on tests/test-strtod.c.
44270         * modules/strtold-tests: New file.
44272 2019-01-29  Bruno Haible  <bruno@clisp.org>
44274         strtold: New module.
44275         * lib/stdlib.in.h (strtold): New declaration.
44276         * lib/strtold.c: New file.
44277         * lib/strtod.c: Consider USE_LONG_DOUBLE.
44278         (STRTOD, LDEXP, HAVE_UNDERLYING_STRTOD, DOUBLE, MIN, MAX, L_,
44279         USE_LDEXP): New macros.
44280         (LDEXP, scale_radix_exp, parse_number, STRTOD): Adapt for
44281         USE_LONG_DOUBLE.
44282         (underlying_strtod): Remove function. Replace with some macros.
44283         Re-add the code for a missing underlying function that was removed on
44284         2013-02-19.
44285         * m4/strtold.m4: New file.
44286         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether strtold is declared.
44287         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_STRTOLD, HAVE_STRTOLD,
44288         REPLACE_STRTOLD.
44289         * modules/stdlib (Makefile.am): Substitute GNULIB_STRTOLD, HAVE_STRTOLD,
44290         REPLACE_STRTOLD.
44291         * modules/strtold: New file.
44292         * doc/posix-functions/strtold.texi: Document the new module.
44294 2019-01-29  Bruno Haible  <bruno@clisp.org>
44296         strtod: Fix compilation error on IRIX 6.5.
44297         * modules/strtod (Depends-on): Add 'math'.
44299 2019-01-28  Bruno Haible  <bruno@clisp.org>
44301         Fix build error when building a shared libunistring on Android.
44302         * tests/uninorm/test-nfc.c (n): Don't define on Android.
44303         (main): Add 'volatile', to defeat a GCC optimization that would
44304         eliminate the reference.
44305         * tests/uninorm/test-nfd.c (n): Don't define on Android.
44306         (main): Add 'volatile', to defeat a GCC optimization that would
44307         eliminate the reference.
44308         * tests/uninorm/test-nfkc.c (n): Don't define on Android.
44309         (main): Add 'volatile', to defeat a GCC optimization that would
44310         eliminate the reference.
44311         * tests/uninorm/test-nfkd.c (n): Don't define on Android.
44312         (main): Add 'volatile', to defeat a GCC optimization that would
44313         eliminate the reference.
44315 2019-01-27  Bruno Haible  <bruno@clisp.org>
44317         Avoid build errors due to wrong references between modules.
44318         * lib/uninorm/canonical-decomposition.c: Include
44319         "uninorm/decomposition-table.h", not "decomposition-table.h".
44320         * lib/uninorm/decomposition.c: Likewise.
44321         * lib/uninorm/u8-normalize.c: Include "uninorm/decompose-internal.h",
44322         not "decompose-internal.h".
44323         * lib/uninorm/u16-normalize.c: Likewise.
44324         * lib/uninorm/u32-normalize.c: Likewise.
44325         * lib/uninorm/uninorm-filter.c: Likewise.
44326         * lib/uninorm/nfkc.c: Likewise.
44327         * lib/uninorm/nfkd.c: Likewise.
44328         * lib/unicase/u8-casemap.c: Include "unicase/caseprop.h", not
44329         "caseprop.h".
44330         * lib/unicase/u8-ct-totitle.c: Likewise.
44331         * lib/unicase/u8-prefix-context.c: Likewise.
44332         * lib/unicase/u8-suffix-context.c: Likewise.
44333         * lib/unicase/u16-casemap.c: Likewise.
44334         * lib/unicase/u16-ct-totitle.c: Likewise.
44335         * lib/unicase/u16-prefix-context.c: Likewise.
44336         * lib/unicase/u16-suffix-context.c: Likewise.
44337         * lib/unicase/u32-casemap.c: Likewise.
44338         * lib/unicase/u32-ct-totitle.c: Likewise.
44339         * lib/unicase/u32-prefix-context.c: Likewise.
44340         * lib/unicase/u32-suffix-context.c: Likewise.
44341         * lib/unicase/u8-tolower.c: Include "unicase/unicasemap.h", not
44342         "unicasemap.h".
44343         * lib/unicase/u8-toupper.c: Likewise.
44344         * lib/unicase/u8-ct-tolower.c: Likewise.
44345         * lib/unicase/u8-ct-toupper.c: Likewise.
44346         * lib/unicase/u16-tolower.c: Likewise.
44347         * lib/unicase/u16-toupper.c: Likewise.
44348         * lib/unicase/u16-ct-tolower.c: Likewise.
44349         * lib/unicase/u16-ct-toupper.c: Likewise.
44350         * lib/unicase/u32-tolower.c: Likewise.
44351         * lib/unicase/u32-toupper.c: Likewise.
44352         * lib/unicase/u32-ct-tolower.c: Likewise.
44353         * lib/unicase/u32-ct-toupper.c: Likewise.
44354         * lib/unicase/u8-ct-casefold.c: Include "unicase/unicasemap.h", not
44355         "unicasemap.h", and "unicase/casefold.h", not "casefold.h".
44356         * lib/unicase/u16-ct-casefold.c: Likewise.
44357         * lib/unicase/u32-ct-casefold.c: Likewise.
44359 2019-01-27  Bruno Haible  <bruno@clisp.org>
44361         gperf: Fix error when this module is required by some test module.
44362         * modules/gperf (Applicability): Set to 'all'.
44364 2019-01-27  Bruno Haible  <bruno@clisp.org>
44366         tmpfile: Add support for Android.
44367         * m4/tmpfile.m4 (gl_FUNC_TMPFILE): Add a runtime test whether tmpfile()
44368         works.
44369         * lib/tmpfile.c (tmpfile): Add an alternative implementation for
44370         Android.
44371         * modules/tmpfile (Depends-on): Add 'stdbool'.
44372         * doc/posix-functions/tmpfile.texi: Mention the Android bug.
44373         * modules/argv-iter-tests (Depends-on): Add 'tmpfile'.
44375 2019-01-27  Akim Demaille  <akim@lrde.epita.fr>
44377         bitsetv: allow free on NULL.
44378         * lib/bitsetv.c (bitsetv_free): Do nothing when the bitsetv is NULL.
44380 2019-01-27  Bruno Haible  <bruno@clisp.org>
44382         test-framework-sh: Improve maintainability.
44383         * tests/init.sh: Clarify what belongs together. Reorder definitions.
44385 2019-01-27  Bruno Haible  <bruno@clisp.org>
44387         tests: Don't assume that /tmp exists.
44388         * tests/test-set-mode-acl-1.sh: Skip the test if /tmp does not exist.
44389         * tests/test-copy-acl-1.sh: Likewise.
44390         * tests/test-file-has-acl-1.sh: Likewise.
44391         * tests/test-copy-file-1.sh: Likewise.
44393 2019-01-27  Bruno Haible  <bruno@clisp.org>
44395         tests: Accommodate a shell that is not in /bin/sh.
44396         * tests/init.sh (setup_): Set srcdir and builddir.
44397         (BOURNE_SHELL): New variable.
44398         * modules/acl-tests (Depends-on): Add 'test-framework-sh'.
44399         * modules/file-has-acl-tests (Depends-on): Likewise.
44400         * modules/copy-file-tests (Depends-on): Likewise.
44401         * tests/test-set-mode-acl-1.sh: Use the test framework. Invoke shell
44402         scripts through $BOURNE_SHELL.
44403         * tests/test-set-mode-acl-2.sh: Likewise.
44404         * tests/test-copy-acl-1.sh: Likewise.
44405         * tests/test-copy-acl-2.sh: Likewise.
44406         * tests/test-file-has-acl-1.sh: Likewise.
44407         * tests/test-file-has-acl-2.sh: Likewise.
44408         * tests/test-copy-file-1.sh: Likewise.
44409         * tests/test-copy-file-2.sh: Likewise.
44410         * tests/test-set-mode-acl.sh (builddir): Consider value set by the
44411         invoker.
44412         * tests/test-copy-acl.sh (builddir): Likewise.
44413         * tests/test-file-has-acl.sh (builddir): Likewise.
44414         * tests/test-copy-file.sh (builddir): Likewise.
44415         * tests/test-vc-list-files-cvs.sh: Don't create shims for executables in
44416         build-aux/. Instead, invoke shell scripts through $BOURNE_SHELL.
44417         * tests/test-vc-list-files-git.sh: Likewise.
44419 2019-01-27  Bruno Haible  <bruno@clisp.org>
44421         tests: Fix some "unused variable" warnings.
44422         * tests/test-fts.c (fts_dealloc): Remove unused variable.
44423         * tests/unigbrk/test-uc-grapheme-breaks.c (main): Likewise.
44424         * tests/test-striconveh.c (main): Move some variable into the
44425         '#if HAVE_ICONV'.
44426         * tests/test-striconveha.c (main): Likewise.
44427         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
44428         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
44429         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
44430         * tests/uniconv/test-u8-conv-to-enc.c (main): Likewise.
44431         * tests/uniconv/test-u16-conv-to-enc.c (main): Likewise.
44432         * tests/uniconv/test-u32-conv-to-enc.c (main): Likewise.
44433         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
44434         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
44435         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
44436         * tests/uniconv/test-u8-strconv-to-enc.c (main): Likewise.
44437         * tests/uniconv/test-u16-strconv-to-enc.c (main): Likewise.
44438         * tests/uniconv/test-u32-strconv-to-enc.c (main): Likewise.
44439         * tests/test-tsearch.c (main): Move some variable into the
44440         '#if HAVE_INITSTATE'.
44442 2019-01-27  Bruno Haible  <bruno@clisp.org>
44444         unigbrk/uc-grapheme-breaks: Fix build failure.
44445         * lib/unigbrk/uc-grapheme-breaks.c: Don't include unistr.h.
44446         * modules/unigbrk/uc-grapheme-breaks (Makefile.am): Fix typo.
44448 2019-01-27  Bruno Haible  <bruno@clisp.org>
44450         mountlist: Merge two .m4 files.
44451         * m4/mountlist.m4 (gl_MOUNTLIST): Inline gl_LIST_MOUNTED_FILE_SYSTEMS.
44452         (AC_FUNC_GETMNTENT): Move to here, from m4/ls-mntd-fs.m4.
44453         * m4/ls-mntd-fs.m4: Remove file.
44454         * modules/mountlist (Files): Remove m4/ls-mntd-fs.m4.
44456 2019-01-27  Bruno Haible  <bruno@clisp.org>
44458         tests: Enable Linux specific tests on Android.
44459         * tests/test-flock.c (main): Treat Android like Linux.
44460         * tests/test-openat-safer.c (main): Likewise.
44462 2019-01-27  Bruno Haible  <bruno@clisp.org>
44464         relocatable-prog: Use Linux code on Android.
44465         * lib/progreloc.c: Treat Android like Linux.
44467 2019-01-26  Bruno Haible  <bruno@clisp.org>
44469         getloadavg: Add support for Android.
44470         * lib/getloadavg.c: Treat Android like Linux.
44472 2019-01-26  Bruno Haible  <bruno@clisp.org>
44474         vma-iter: Add support for Android.
44475         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define on Android as well.
44476         * lib/vma-iter.c: Treat Android like Linux.
44477         * lib/get-rusage-data.c (get_rusage_data): Likewise.
44479 2019-01-26  Bruno Haible  <bruno@clisp.org>
44481         fts: Optimize on Android.
44482         * lib/fts.c: Treat Android like Linux.
44484 2019-01-26  Bruno Haible  <bruno@clisp.org>
44486         fts: Add support for Android.
44487         * m4/fts.m4 (gl_FUNC_FTS_CORE): Avoid conflicts between the symbols
44488         defined by this module and the ones in libc.
44489         * tests/test-fts.c (main): Treat mkdir error EMLINK like EMFILE.
44491 2019-01-26  Bruno Haible  <bruno@clisp.org>
44493         mountlist: Use Linux code on Android.
44494         * lib/mountlist.c (setmntent, endmntent): Define fallbacks.
44495         (unescape_tab, read_file_system_list): Enable Linux code on Android
44496         as well.
44497         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Test for setmntent
44498         and endmntent.
44499         * modules/mountlist (Depends-on): Add 'getline'.
44501 2019-01-26  Bruno Haible  <bruno@clisp.org>
44503         localename tests: Fix test failure on Android.
44504         * modules/localename-tests (Depends-on): Add 'setlocale'.
44506 2019-01-26  Bruno Haible  <bruno@clisp.org>
44508         mountlist: Port better to Android.
44509         * lib/mountlist.c (MOUNTED): Redefine on Android.
44510         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Redefine MOUNTED on
44511         Android.
44513 2019-01-26  Bruno Haible  <bruno@clisp.org>
44515         striconveh: Fix use of uninitialized iconv_t.
44516         Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
44517         <https://lists.gnu.org/archive/html/bug-libunistring/2019-01/msg00000.html>.
44518         * lib/striconveh.c (iconveh_open): Correct the iconv_close argument.
44520 2019-01-26  Bruno Haible  <bruno@clisp.org>
44522         nonblocking-socket-tests: Fix test failure on Android 4.3.
44523         * tests/test-nonblocking-socket.h (SOCKET_HAS_LARGE_BUFFER): Define to 1
44524         also on Android.
44526 2019-01-26  Bruno Haible  <bruno@clisp.org>
44528         sh-filename: Add support for Android 4.3.
44529         * m4/sh-filename.m4 (gl_SH_FILENAME): Set to "sh" on Android.
44531 2019-01-26  Bruno Haible  <bruno@clisp.org>
44533         ptsname_r: Work around bug on Android 4.3.
44534         * m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): Define
44535         HAVE_ESSENTIALLY_WORKING_PTSNAME_R. Test whether the return value is
44536         correct.
44537         * lib/ptsname_r.c (__ptsname_r): If HAVE_ESSENTIALLY_WORKING_PTSNAME_R
44538         is defined, just fix the return value.
44539         * doc/glibc-functions/ptsname_r.texi: Mention the Android bug. Reword:
44540         The behaviour of musl libc is nothing to be "fixed", since it is
44541         compliant with the next POSIX standard.
44543 2019-01-26  Bruno Haible  <bruno@clisp.org>
44545         ttyname_r: Work around bug on Android 4.3.
44546         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Test whether ttyname_r is a stub.
44547         * lib/ttyname_r.c (ttyname_r): Implement for Android.
44548         * doc/posix-functions/ttyname_r.texi: Mention the Android bug.
44549         * doc/posix-functions/ttyname.texi: Likewise.
44551 2019-01-25  Bruno Haible  <bruno@clisp.org>
44553         getprogname: Port to Android 4.3.
44554         * lib/getprogname.c (getprogname): On Android, take only the last
44555         component of __progname.
44557 2019-01-25  Bruno Haible  <bruno@clisp.org>
44559         wcrtomb: Work around bug on Android 4.3.
44560         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Test also whether wcrtomb works in
44561         the C locale.
44562         * lib/wcrtomb.c (wcrtomb): Provide alternate implementation for Android,
44563         which does not have the 'wctomb' function.
44564         * doc/posix-functions/wcrtomb.texi: Mention the Android bug.
44565         * tests/test-wcrtomb.c (main): Accept argument '5'.
44566         * tests/test-wcrtomb.sh: Add tests in the POSIX locale.
44568 2019-01-25  Bruno Haible  <bruno@clisp.org>
44570         setlocale: Work around bug on Android 4.3.
44571         * m4/setlocale.m4 (gl_FUNC_SETLOCALE): Test whether setlocale supports
44572         the "C" locale.
44573         * lib/setlocale.c (setlocale_unixlike): New wrapper for Android.
44574         * doc/posix-functions/setlocale.texi: Mention the Android bug.
44576 2019-01-24  Bruno Haible  <bruno@clisp.org>
44578         memchr: Work around bug on Android <= 5.0.
44579         * m4/memchr.m4 (gl_FUNC_MEMCHR): Add test against the Android bug.
44580         * doc/posix-functions/memchr.texi: Mention the Android bug.
44582 2019-01-24  Bruno Haible  <bruno@clisp.org>
44584         random: Fix compilation error on Android 4.3.
44585         * lib/stdlib.in.h (random, srandom): Test also REPLACE_RANDOM.
44586         (initstate): Test REPLACE_INITSTATE and HAVE_INITSTATE, not HAVE_RANDOM.
44587         (setstate): Test REPLACE_SETSTATE and HAVE_SETSTATE, not HAVE_RANDOM.
44588         * m4/random.m4 (gl_FUNC_RANDOM): Set HAVE_INITSTATE, HAVE_SETSTATE,
44589         REPLACE_RANDOM, REPLACE_INITSTATE, REPLACE_SETSTATE.
44590         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_INITSTATE,
44591         HAVE_SETSTATE, REPLACE_RANDOM, REPLACE_INITSTATE, REPLACE_SETSTATE.
44592         * modules/stdlib (Makefile.am): Substitute HAVE_INITSTATE, HAVE_SETSTATE,
44593         REPLACE_RANDOM, REPLACE_INITSTATE, REPLACE_SETSTATE.
44594         * modules/random (Depends-on, configure.ac): Test also REPLACE_RANDOM,
44595         REPLACE_INITSTATE, REPLACE_SETSTATE.
44596         * doc/posix-functions/random.texi: Correct the description of the
44597         situation on Android.
44598         * doc/posix-functions/srandom.texi: Likewise.
44599         * doc/posix-functions/rand.texi: Likewise.
44600         * doc/posix-functions/srand.texi: Likewise.
44602 2019-01-24  Bruno Haible  <bruno@clisp.org>
44604         mbtowc: Fix compilation error on Android 4.3.
44605         * lib/stdlib.in.h (mbtowc): Test also HAVE_MBTOWC.
44606         * m4/mbtowc.m4 (gl_FUNC_MBTOWC): Test whether mbtowc exists. Set
44607         HAVE_MBTOWC.
44608         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether mbtowc is declared.
44609         (gl_STDLIB_H_DEFAULTS): Initialize HAVE_MBTOWC.
44610         * modules/stdlib (Makefile.am): Substitute HAVE_MBTOWC.
44611         * modules/mbtowc (Depends-on, configure.ac): Test also HAVE_MBTOWC.
44612         * doc/posix-functions/mbtowc.texi: Mention the change.
44614 2019-01-24  Bruno Haible  <bruno@clisp.org>
44616         fdatasync: Fix compilation error on Android 4.3.
44617         * m4/fdatasync.m4 (gl_FUNC_FDATASYNC): On platforms other than Solaris,
44618         test whether fdatasync() exists.
44620 2019-01-24  Bruno Haible  <bruno@clisp.org>
44622         unlinkat: Fix compilation error on Android 4.3.
44623         * lib/unistd.in.h: Include <fcntl.h> when module 'unlinkat' is in use
44624         also on Android.
44625         * doc/posix-functions/unlinkat.texi: Mention the issue.
44627 2019-01-24  Bruno Haible  <bruno@clisp.org>
44629         renameat: Fix compilation error on Android 4.3.
44630         * lib/stdio.in.h: Include <sys/stat.h> when module 'renameat' is in use.
44631         * doc/posix-functions/renameat.texi: Mention the issue.
44633 2019-01-24  Bruno Haible  <bruno@clisp.org>
44635         fchownat: Fix compilation error on Android 4.3.
44636         * lib/unistd.in.h: Include <sys/stat.h> when module 'fchownat' is in
44637         use.
44638         * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG,
44639         gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG): Include also <sys/stat.h>.
44640         * doc/posix-functions/fchownat.texi: Mention the issue.
44642 2019-01-23  Bruno Haible  <bruno@clisp.org>
44644         gnulib-tool: Support running testdirs on Android.
44645         * build-aux/test-driver.diff: New file.
44646         * gnulib-tool (func_create_testdir, func_create_megatestdir): Patch
44647         build-aux/test-driver after running automake.
44649 2019-01-23  Akim Demaille  <akim@lrde.epita.fr>
44651         relocatable-prog: avoid warnings from Automake
44652         * modules/relocatable-prog: Don't declare PHONY dependencies in
44653         Automake conditionals.
44655 2019-01-23  Akim Demaille  <akim@lrde.epita.fr>
44657         array-list: Pacify warnings about unused arguments (-Wunused-parameter).
44658         * lib/gl_array_list.c (gl_array_iterator_free): "Use" the argument.
44660 2019-01-23  Bruno Haible  <bruno@clisp.org>
44662         threadlib: Revert commit from 2018-06-25. We now have a better fix.
44663         * m4/threadlib.m4 (gl_THREADLIB_BODY): Don't attempt to defeat a
44664         preceding -Wl,--as-needed option. Don't check whether the linker
44665         supports --as-needed/--no-as-needed and --push-state/--pop-state.
44667 2019-01-23  Bruno Haible  <bruno@clisp.org>
44669         thread: Force linking with -lpthread, even when --as-needed is in use.
44670         Reported by Richard W.M. Jones <rjones@redhat.com> in
44671         <https://lists.gnu.org/archive/html/bug-gnulib/2019-01/msg00123.html>.
44672         * lib/glthread/thread.h (pthread_create): Don't declare weak.
44674 2019-01-23  Akim Demaille  <akim.demaille@gmail.com>
44675             Bruno Haible  <bruno@clisp.org>
44677         relocatable: avoid compiler warnings (-Wshadow)
44678         * lib/relocatable.c (compute_curr_prefix): Rename local variables
44679         to avoid name collisions with global variables.
44681 2019-01-22  Bruno Haible  <bruno@clisp.org>
44683         vasnprintf: Don't use %n on Android.
44684         Reported and fix suggested by Hugo Beauzée-Luyssen <hugo@beauzee.fr> in
44685         <https://lists.gnu.org/archive/html/bug-gnulib/2018-12/msg00123.html>.
44686         * lib/vasnprintf.c (VASNPRINTF): Don’t use %n on Android.
44688 2019-01-22  Bruno Haible  <bruno@clisp.org>
44690         *printf: Support cross-compilation to Android.
44691         * m4/printf.m4: Add cross-compilation guesses for Android.
44693 2019-01-21  Bruno Haible  <bruno@clisp.org>
44695         diacrit: Mark deprecated.
44696         * modules/diacrit (Status, Notice): Mark as deprecated.
44697         * NEWS: Mention it.
44699 2019-01-20  Bruno Haible  <bruno@clisp.org>
44701         rintl: Override broken implementation on NetBSD.
44702         * lib/math.in.h (rintl): Test also REPLACE_RINTL.
44703         * m4/rintl.m4 (gl_FUNC_RINTL): Add test for negative arguments. Set
44704         REPLACE_RINTL.
44705         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_RINTL.
44706         * modules/math (Makefile.in): Substitute REPLACE_RINTL.
44707         * modules/rintl (Depends-on, configure.ac): Test REPLACE_RINTL.
44708         * doc/posix-functions/rintl.texi: Mention the NetBSD bug.
44710 2019-01-20  Bruno Haible  <bruno@clisp.org>
44712         log10l: Work around inaccurate implementation on NetBSD.
44713         * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Add test for a certain accuracy.
44714         * lib/log10l.c: Comment out too simplistic override.
44715         * doc/posix-functions/log10l.texi: Mention the NetBSD bug.
44717 2019-01-20  Bruno Haible  <bruno@clisp.org>
44719         logl: Work around inaccurate implementation on NetBSD.
44720         * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Add test for a certain accuracy.
44721         * lib/logl.c: Comment out unused code.
44722         * doc/posix-functions/logl.texi: Mention the NetBSD bug.
44724 2019-01-20  Bruno Haible  <bruno@clisp.org>
44726         expm1l: Work around inaccurate implementation on NetBSD.
44727         * lib/math.in.h (expm1l): Test also REPLACE_EXPM1L.
44728         * m4/expm1l.m4 (gl_FUNC_EXPM1L): Add test for a certain accuracy. Set
44729         REPLACE_EXPM1L.
44730         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXPM1L.
44731         * modules/math (Makefile.in): Substitute REPLACE_EXPM1L.
44732         * modules/expm1l (Depends-on, configure.ac): Test REPLACE_EXPM1L.
44733         * doc/posix-functions/expm1l.texi: Mention the NetBSD bug.
44735 2019-01-20  Bruno Haible  <bruno@clisp.org>
44737         expl: Work around inaccurate implementation on NetBSD.
44738         * lib/math.in.h (expl): Test also REPLACE_EXPL.
44739         * m4/expl.m4 (gl_FUNC_EXPL): Add test for a certain accuracy. Set
44740         REPLACE_EXPL.
44741         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXPL.
44742         * modules/math (Makefile.in): Substitute REPLACE_EXPL.
44743         * modules/expl (Depends-on, configure.ac): Test REPLACE_EXPL.
44744         * doc/posix-functions/expl.texi: Mention the NetBSD bug.
44746 2019-01-20  Bruno Haible  <bruno@clisp.org>
44748         exp2l: Work around inaccurate implementation on NetBSD.
44749         * m4/exp2l.m4 (gl_FUNC_EXP2L): Add test for a certain accuracy.
44750         * doc/posix-functions/exp2l.texi: Mention the NetBSD bug.
44752 2019-01-20  Bruno Haible  <bruno@clisp.org>
44754         floor, floorl: Avoid autoconf warnings.
44755         * modules/floor (configure.ac): Use AC_REQUIRE.
44756         * modules/floorl (configure.ac): Likewise.
44758 2019-01-20  Bruno Haible  <bruno@clisp.org>
44760         Defeat current GCC optimizations in math autoconf tests.
44761         * m4/cbrtl.m4 (gl_FUNC_CBRTL): Mark function pointer as 'volatile'.
44762         * m4/ceil.m4 (gl_FUNC_CEIL): Likewise.
44763         * m4/ceilf.m4 (gl_FUNC_CEILF): Likewise.
44764         * m4/ceill.m4 (gl_FUNC_CEILL): Likewise.
44765         * m4/exp2l.m4 (gl_FUNC_EXP2L): Likewise.
44766         * m4/expm1.m4 (gl_FUNC_EXPM1): Likewise.
44767         * m4/floor.m4 (gl_FUNC_FLOOR): Likewise.
44768         * m4/floorf.m4 (gl_FUNC_FLOORF): Likewise.
44769         * m4/fmod.m4 (gl_FUNC_FMOD): Likewise.
44770         * m4/fmodf.m4 (gl_FUNC_FMODF): Likewise.
44771         * m4/fmodl.m4 (gl_FUNC_FMODL): Likewise.
44772         * m4/hypot.m4 (gl_FUNC_HYPOT): Likewise.
44773         * m4/hypotf.m4 (gl_FUNC_HYPOTF): Likewise.
44774         * m4/hypotl.m4 (gl_FUNC_HYPOTL): Likewise.
44775         * m4/ilogb.m4 (gl_FUNC_ILOGB_WORKS): Likewise.
44776         * m4/ilogbf.m4 (gl_FUNC_ILOGBF_WORKS): Likewise.
44777         * m4/ilogbl.m4 (gl_FUNC_ILOGBL_WORKS): Likewise.
44778         * m4/log.m4 (gl_FUNC_LOG): Likewise.
44779         * m4/logf.m4 (gl_FUNC_LOGF): Likewise.
44780         * m4/log10.m4 (gl_FUNC_LOG10): Likewise.
44781         * m4/log10f.m4 (gl_FUNC_LOG10F): Likewise.
44782         * m4/log1p.m4 (gl_FUNC_LOG1P): Likewise.
44783         * m4/log1pf.m4 (gl_FUNC_LOG1PF): Likewise.
44784         * m4/log1pl.m4 (gl_FUNC_LOG1PL): Likewise.
44785         * m4/log2.m4 (gl_FUNC_LOG2): Likewise.
44786         * m4/log2f.m4 (gl_FUNC_LOG2F): Likewise.
44787         * m4/modf.m4 (gl_FUNC_MODF): Likewise.
44788         * m4/modff.m4 (gl_FUNC_MODFF): Likewise.
44789         * m4/modfl.m4 (gl_FUNC_MODFL): Likewise.
44790         * m4/remainder.m4 (gl_FUNC_REMAINDER): Likewise.
44791         * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Likewise.
44792         * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Likewise.
44793         * m4/round.m4 (gl_FUNC_ROUND): Likewise.
44794         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
44795         * m4/roundl.m4 (gl_FUNC_ROUNDL): Likewise.
44796         * m4/trunc.m4 (gl_FUNC_TRUNC): Likewise.
44797         * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
44798         * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
44800 2019-01-19  Pádraig Brady  <P@draigBrady.com>
44802         gettext: support disabling use of VLAs
44803         * lib/gettext.h: Disable use of VLAs if GNULIB_NO_VLA is defined
44805 2019-01-17  KO Myung-Hun  <komh78@gmail.com>
44807         sys_stat: Fix 'implicit declaration of function' warning on OS/2 kLIBC.
44808         * lib/sys_stat.in.h [kLIBC]: Include <unistd.h>.
44810 2019-01-17  KO Myung-Hun  <komh78@gmail.com>
44812         fcntl: Fix syntax error (regression from 2018-10-05).
44813         * lib/fcntl.c (klibc_fcntl): Remove mis-placed ';'.
44815 2019-01-13  Akim Demaille  <akim@lrde.epita.fr>
44817         relocatable: improve documentation.
44818         * doc/relocatable-maint.texi (Supporting Relocation): For
44819         substitutions performed by config.status, we need more variables
44820         (for instance datarootdir defaults to '${prefix}/share' so we need
44821         prefix).
44823 2019-01-13  Akim Demaille  <akim@lrde.epita.fr>
44825         backup: update dependencies
44826         * modules/backup-rename (Depends-on): It now depends on opendirat
44827         instead of opendir.  It also uses stdint, and xalloc-oversized.
44828         But no longer dirfd.
44829         * modules/backupfile (Depends-on): Add xalloc-oversized.
44831 2019-01-13  Bruno Haible  <bruno@clisp.org>
44833         getcwd: Fix test failure when building on a Linux 9p file system.
44834         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): On Linux, treat error
44835         EINVAL from mkdir like ENAMETOOLONG.
44836         * tests/test-getcwd.c (test_long_name): Likewise.
44838 2019-01-12  Tim Rühsen  <tim.ruehsen@gmx.de>
44840         Fix typos found by codespell.
44841         * lib/*.[hc]: Fix typos in comments.
44842         * pygnulib/*.py: Fix typos in error messages and comments.
44844 2019-01-12  Bruno Haible  <bruno@clisp.org>
44846         doc: Fix documentation about container data types.
44847         Reported by Werner Lemberg <wl@gnu.org>.
44848         * doc/containers.texi (Container data types): Fix typo.
44850 2019-01-10  Bruno Haible  <bruno@clisp.org>
44852         verify: Enable _GL_HAVE_STATIC_ASSERT for recent G++ versions.
44853         Reported by Reuben Thomas <rrt@sc3d.org>.
44854         * lib/verify.h (_GL_HAVE_STATIC_ASSERT): Define for g++ versions >= 6.
44856 2019-01-06  Bruno Haible  <bruno@clisp.org>
44858         maintainer-makefile: Make the configure.ac section optional.
44859         * top/maint.mk (GREP, SED): Define if not defined.
44861 2019-01-06  Bruno Haible  <bruno@clisp.org>
44863         localename: Assume setlocale function.
44864         * lib/localename.c (gl_locale_name_posix): Assume setlocale exists.
44865         * m4/localename.m4 (gl_LOCALENAME): Don't test whether setlocale exists.
44867 2019-01-06  Bruno Haible  <bruno@clisp.org>
44869         doc: Add documentation about container data types.
44870         * doc/containers.texi: New file.
44871         * doc/gnulib.texi (Particular Modules): Include it.
44873 2019-01-06  Bruno Haible  <bruno@clisp.org>
44875         doc: Update documentation about 'progname' module.
44876         * doc/progname.texi: Rename from doc/error.texi. Change node name and
44877         title. Rewrite.
44878         * doc/gnulib.texi (Particular Modules): Update.
44880 2019-01-06  Bruno Haible  <bruno@clisp.org>
44882         doc: Document the xstdopen and *-safer modules.
44883         * doc/xstdopen.texi: New file.
44884         * doc/gnulib.texi (Particular Modules): Include it.
44886 2019-01-06  Bruno Haible  <bruno@clisp.org>
44888         xstdopen: Add tests.
44889         * tests/test-xstdopen.c: New file.
44890         * tests/test-xstdopen.sh: New file.
44891         * modules/xstdopen-tests: New file.
44893         xstdopen: New module.
44894         * lib/xstdopen.h: New file.
44895         * lib/xstdopen.c: New file.
44896         * modules/xstdopen: New file.
44898 2019-01-06  Bruno Haible  <bruno@clisp.org>
44900         stdopen: Fix compilation error with IRIX cc.
44901         * lib/stdopen.c (stdopen): Do not use C99-style decl in loop.
44903 2019-01-05  Paul Eggert  <eggert@cs.ucla.edu>
44905         xfreopen need not include stdio--.h
44906         * lib/xfreopen.c: Do not include stdio--.h.
44908         xfreopen need not depend on freopen-safer
44909         * modules/xfreopen (Depends-on):
44910         Depend on freopen, not freopen-safer.
44912         stdopen: modernize and simplify
44913         * lib/stdopen.c: Update copyright date
44914         Do not include sys/types.h; no longer needed these days.
44915         (stdopen): Use C99-style decl in loop.  Return int errno
44916         value, rather than just a bool.  Do not worry about fd mismatches,
44917         since the caller cares only if 0, 1, 2 are occupied.
44918         * lib/stdopen.h: No need to include <stdbool.h>.
44919         * m4/stdopen.m4: Remove.
44920         * modules/stdopen: New file.
44922         stdopen: copy from last use in coreutils
44923         * lib/stdopen.c, lib/stdopen.h, m4/stdopen.m4:
44924         New files, taken from their last commit in coreutils
44925         2007-07-23T12:35:58Z!jim@meyering.net
44926         71aa3ea88084d17bcb4fc1031ad7b66f8647115e.
44928 2019-01-05  Bruno Haible  <bruno@clisp.org>
44930         argp: Don't pass an invalid argument to dgettext().
44931         Reported by He X <xw897002528@gmail.com>.
44932         * lib/argp-help.c (print_header, argp_doc): Don't pass a NULL doc to
44933         dgettext().
44935 2019-01-05  Bruno Haible  <bruno@clisp.org>
44937         argp: Don't pass an invalid argument to dgettext().
44938         Reported by He X <xw897002528@gmail.com>.
44939         * lib/argp.h (struct argp): Clarify that the args_doc field may be NULL.
44940         * lib/argp-help.c (argp_args_usage): Don't pass a NULL args_doc to
44941         dgettext().
44943 2018-12-22  Paul Eggert  <eggert@cs.ucla.edu>
44945         stdioext: port to newer 32-bit Android
44946         Problem reported by Tom Yan in:
44947         https://lists.gnu.org/archive/html/bug-gnulib/2018-07/msg00014.html
44948         * lib/stdio-impl.h (_gl_FILE_flags_t) [__ANDROID__]: New macro.
44949         (fp_) [__ANDROID__]: Use it.
44951 2019-01-04  Bruno Haible  <bruno@clisp.org>
44953         lock: Fix link error with --enable-threads=pth.
44954         * lib/glthread/lock.h (pth_cond_init, pth_cond_await, pth_cond_notify):
44955         Mark as weak.
44957 2019-01-04  Bruno Haible  <bruno@clisp.org>
44959         Fix link errors in unit tests.
44960         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
44961         * modules/bitset-tests (Makefile.am): Link test-bitset against libintl.
44962         * modules/array-map-tests (Makefile.am): Link test-array_map against
44963         libintl.
44964         * modules/array-set-tests (Makefile.am): Link test-array_set against
44965         libintl.
44966         * modules/hash-map-tests (Makefile.am): Link test-hash_map against
44967         libintl.
44968         * modules/hash-set-tests (Makefile.am): Link test-hash_set against
44969         libintl.
44970         * modules/linkedhash-map-tests (Makefile.am): Link test-linkedhash_map
44971         against libintl.
44972         * modules/linkedhash-set-tests (Makefile.am): Link test-linkedhash_set
44973         against libintl.
44975 2019-01-04  Bruno Haible  <bruno@clisp.org>
44977         Fix incorrect 'Link' sections.
44978         * modules/regex (Link): Mention the link requirement of module 'lock'.
44979         * modules/regex-tests (Makefile.am): Don't use LIB_PTHREAD.
44981 2019-01-04  Bruno Haible  <bruno@clisp.org>
44983         Fix some 'Link' sections.
44984         * modules/c-stack (Link): Add link directive from the 'gettext-h'
44985         dependency.
44986         * modules/getaddrinfo (Link): Likewise.
44988 2019-01-04  Bruno Haible  <bruno@clisp.org>
44990         Remove redundant 'Link' sections.
44991         * modules/canon-host (Link): Remove section.
44992         * modules/timevar (Link): Likewise.
44994 2019-01-04  Bruno Haible  <bruno@clisp.org>
44996         Remove incorrect 'Link' sections.
44997         * modules/acl (Link): Remove section. Use combined 'Link' sections from
44998         the dependencies instead.
44999         * modules/crypto/md5 (Link): Likewise.
45000         * modules/crypto/sha1 (Link): Likewise.
45001         * modules/crypto/sha256 (Link): Likewise.
45002         * modules/crypto/sha512 (Link): Likewise.
45003         * modules/faccessat (Link): Likewise.
45004         * modules/fdutimensat (Link): Likewise.
45005         * modules/iconv_open-utf (Link): Likewise.
45006         * modules/propername (Link): Likewise.
45007         * modules/qacl (Link): Likewise.
45008         * modules/unicodeio (Link): Likewise.
45009         * modules/utimecmp (Link): Likewise.
45010         * modules/utimensat (Link): Likewise.
45011         * modules/xstriconv (Link): Likewise.
45012         * modules/xstriconveh (Link): Likewise.
45014 2019-01-04  Bruno Haible  <bruno@clisp.org>
45016         gnulib-tool: New option --extract-recursive-link-directive.
45017         * gnulib-tool (func_usage): Document the new options
45018         --extract-recursive-dependencies, --extract-recursive-link-directive.
45019         (func_verify_module): Document output variables.
45020         (func_get_dependencies_recursively): New function.
45021         (func_get_link_directive_recursively): New function.
45022         Use them to implement the new options
45023         --extract-recursive-dependencies, --extract-recursive-link-directive.
45024         * doc/gnulib-tool.texi (Link-time requirements): New section.
45026 2019-01-04  Bruno Haible  <bruno@clisp.org>
45028         Clarify meaning of 'Link' section in module description.
45029         * doc/gnulib.texi (Module description): Clarify the meaning of the
45030         'Link' section versus the one of the dependencies.
45031         * NEWS: Mention the change.
45033 2019-01-04  Bruno Haible  <bruno@clisp.org>
45035         pselect: Fix module description.
45036         * modules/pselect (Link): Put one link option per line.
45038 2019-01-04  Bruno Haible  <bruno@clisp.org>
45040         cosl: Fix module description.
45041         * modules/cosl (Link): Fix typo.
45042         * modules/mathl (configure.ac): Likewise.
45044 2019-01-04  Bruno Haible  <bruno@clisp.org>
45046         c-xvasprintf: Fix module dependencies.
45047         * modules/c-xvasprintf (Depends-on): Add 'xalloc-die'.
45049 2019-01-04  Akim Demaille  <akim@lrde.epita.fr>
45051         bootstrap: die when some submodules are not initialized
45052         * build-aux/bootstrap: Make sure all submodules are initialized.
45054 2019-01-04  Bruno Haible  <bruno@clisp.org>
45056         bitsetv: Fix module dependencies.
45057         * lib/bitsetv.c: Include xalloc.h.
45058         * modules/bitsetv (Depends-on): Add 'xalloc'.
45060 2019-01-04  Bruno Haible  <bruno@clisp.org>
45062         xmemdup0: Remove redundant code.
45063         * lib/xmemdup0.h (xalloc_die): Remove declaration.
45065 2019-01-04  Bruno Haible  <bruno@clisp.org>
45067         backupfile: Fix module dependencies.
45068         * modules/backupfile (Depends-on): Add 'xalloc'.
45070 2019-01-03  Paul Eggert  <eggert@cs.ucla.edu>
45072         bitset, crypto/gc: fix conflicts with Solaris 11
45073         * lib/bitset.h (_GL_BITSET_H): Rename from _BITSET_H, to
45074         avoid clash with Solaris 11 <sys/bitset.h>.
45075         * lib/gc.h (_GL_GC_H): Rename from GC_H, to avoid clash
45076         with Solaris 11 <xorg/gc.h>.
45078 2019-01-04  Bruno Haible  <bruno@clisp.org>
45080         safe-read, safe-write: Fix conflict with Illumos-Joyent <sys/limits.h>.
45081         Reported by Andy Fiddaman <andy@omniosce.org>.
45082         * lib/sys-limits.h: Add a '_GL' prefix to the guard symbol.
45084 2019-01-03  Eric Blake  <eblake@redhat.com>
45086         maintainer-makefile: fix typo in previous patch
45087         * top/maint.mk (_sc_search_regexp): Fix my accidental corruption
45088         of Roman's work.
45090 2019-01-02  Roman Bolshakov <r.bolshakov@yadro.com>  (tiny change)
45092         maintainer-makefile: prefer $(GREP) over grep
45093         * modules/maintainer-makefile (configure.ac): Ensure $(GREP) is
45094         defined.
45095         * top/maint.mk: Use it everywhere.
45097         maintainer-makefile: split long argument lines
45098         * top/maint.mk: Use xargs to split $(VC_LIST_EXCEPT) usage where
45099         it would be too long for exec limits on BSD.
45101 2018-12-27  Paul Eggert  <eggert@cs.ucla.edu>
45103         mkfifo: bring back HAVE_MKFIFO macro
45104         * m4/mkfifo.m4 (gl_FUNC_MKFIFO): #define HAVE_MKFIFO as needed.
45105         Problem reported by Andrew Janke in:
45106         https://lists.gnu.org/r/bug-gnulib/2018-12/msg00147.html
45108 2018-12-21  Bruno Haible  <bruno@clisp.org>
45110         Assume Autoconf >= 2.63.
45111         * modules/stdarg (configure.ac-early): Remove comment about Autoconf
45112         versions < 2.60.
45114 2018-12-21  Bruno Haible  <bruno@clisp.org>
45116         memcmp: Mention the clang bug.
45117         * tests/test-memcmp.c: Add comment about a known test failure.
45118         * doc/posix-functions/memcmp.texi: Mention the clang bug.
45120 2018-12-20  Jim Meyering  <meyering@fb.com>
45122         revert v0.1-2213-gae4b73e28 and part of v0.1-2281-g95cd86dd7
45123         v0.1-2213-gae4b73e28 caused a regression in grep-3.2 (no match):
45124           echo '123-x'|LC_ALL=C grep -E '.\bx'
45125         The goal is to revert the first, but reverting it requires to restore
45126         the function deleted in the second. I ran this to restore the deleted
45127         function:
45128           git show v0.1-2281-g95cd86dd7 lib/dfa.c \
45129             | perl -0777 -pe 's/^@@[^\n]*dfaan.*//ms' \
45130             | patch -R -p1
45131         * lib/dfa.c (charclass_context): Restore deleted function.
45132         Reverting the primary commit removes this change:
45133         dfa: Simplify a building state
45134         * lib/dfa.c (build_state): Simplify a building state.
45136 2018-12-20  Paul Eggert  <eggert@cs.ucla.edu>
45138         version-etc: allow zero authors
45139         * lib/version-etc.c (version_etc_arn): If no authors are given,
45140         omit authorship info instead of dumping core.
45142 2018-12-19  Bruno Haible  <bruno@clisp.org>
45144         lchown tests: Be more permissive regarding errno values.
45145         Reported by Ivan Zakharyaschev <imz@altlinux.org>.
45146         * tests/test-lchown.h (test_lchown): Recognize EOPNOTSUPP as an
45147         alternative to ENOSYS.
45148         * modules/lchown-tests (Depends-on): Add 'errno'.
45149         * modules/fchownat-tests (Depends-on): Likewise.
45151 2018-12-18  Bruno Haible  <bruno@clisp.org>
45153         duplocale: Avoid test failure on AIX 7.
45154         * modules/duplocale-tests (Files): Add m4/intl-thread-locale.m4.
45155         (configure.ac): Invoke gt_FUNC_USELOCALE.
45156         * tests/test-duplocale.c: Test HAVE_WORKING_USELOCALE instead of
45157         HAVE_USELOCALE. Assume that nl_langinfo_l only works when uselocale
45158         works.
45160 2018-12-18  Bruno Haible  <bruno@clisp.org>
45162         localename: Fix test failure on AIX 7.
45163         Reported by Assaf Gordon in
45164         <https://lists.gnu.org/archive/html/sed-devel/2018-12/msg00019.html>.
45165         * m4/intl-thread-locale.m4 (gt_FUNC_USELOCALE): New macro.
45166         (gt_INTL_THREAD_LOCALE_NAME): Invoke it. Test gt_cv_func_uselocale_works
45167         instead of ac_cv_func_uselocale.
45168         * lib/localename.c: Test HAVE_WORKING_USELOCALE instead of
45169         HAVE_USELOCALE.
45170         * lib/localename-table.h: Likewise.
45171         * lib/localename-table.c: Likewise.
45172         * tests/test-localename.c: Likewise.
45173         * doc/posix-functions/uselocale.texi: Mention the AIX problem.
45175 2018-12-18  Bruno Haible  <bruno@clisp.org>
45177         localename: Update comments regarding Cygwin.
45178         * lib/localename.c: Update comment.
45179         * doc/posix-functions/uselocale.texi: Update platforms list.
45180         * doc/posix-functions/newlocale.texi: Likewise.
45181         * doc/posix-functions/duplocale.texi: Likewise.
45182         * doc/posix-functions/freelocale.texi: Likewise.
45184 2018-12-16  Bruno Haible  <bruno@clisp.org>
45186         c-stack: Fix for Linux/sparc.
45187         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Set
45188         ac_cv_sys_xsi_stack_overflow_heuristic to 'no' on Linux/sparc.
45190 2018-12-16  Bruno Haible  <bruno@clisp.org>
45192         localename: Avoid test failure on some glibc systems.
45193         * tests/test-localename.c (test_locale_name, test_locale_name_posix):
45194         Unset environment variables that might disturb the first setlocale call,
45195         and verify that this setlocale call succeeds.
45197 2018-12-16  Assaf Gordon  <assafgordon@gmail.com>
45199         random: Fix build error on native Windows (regression from 2018-06-21).
45200         * lib/random.c (__srandom, __initstate, __setstate, __random,
45201         __srandom_r, __initstate_r, __setstate_r, __random_r) [!_LIBC]: Redirect
45202         to the symbols without '__' prefix.
45204 2018-12-16  Bruno Haible  <bruno@clisp.org>
45206         obstack, libc-config: Support HP-UX cc in C99 mode.
45207         * lib/obstack.h (__FLEXIBLE_ARRAY_MEMBER): Treat HP-UX cc as a pre-C99
45208         compiler, even when in C99 mode.
45209         * lib/cdefs.h (__flexarr): Likewise.
45210         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Update comment.
45212 2018-12-16  Bruno Haible  <bruno@clisp.org>
45214         localename: Fix test failure on OpenBSD >= 6.2.
45215         * m4/intl-thread-locale.m4 (gt_INTL_THREAD_LOCALE_NAME): Test for fake
45216         locale system. Define HAVE_FAKE_LOCALES in this case.
45217         * lib/localename.c (HAVE_GOOD_USELOCALE): New macro. Use it instead of
45218         HAVE_USELOCALE.
45219         * tests/test-localename.c (HAVE_GOOD_USELOCALE): New macro. Use it
45220         instead of HAVE_NEWLOCALE && HAVE_USELOCALE.
45221         * doc/posix-functions/uselocale.texi: Mention OpenBSD problem. Update
45222         platforms list.
45223         * doc/posix-functions/newlocale.texi: Likewise.
45224         * doc/posix-functions/duplocale.texi: Update platforms list.
45225         * doc/posix-functions/freelocale.texi: Likewise.
45227 2018-12-16  Bruno Haible  <bruno@clisp.org>
45229         duplocale tests: Re-enable the test on platforms without <monetary.h>.
45230         * tests/test-duplocale.c: Use more fine-grained #ifs to re-enable most
45231         of the test, on platforms without <monetary.h>.
45233 2018-12-16  Bruno Haible  <bruno@clisp.org>
45235         localename: Update comments.
45236         * lib/localename.c (HAVE_USELOCALE): Update list of platforms.
45238 2018-12-15  Jim Meyering  <meyering@fb.com>
45240         regex: fix indentation
45241         * m4/regex.m4 (gl_REGEX): Indent with spaces, not TABs.
45243 2018-12-15  Bruno Haible  <bruno@clisp.org>
45245         openat-safer tests: Avoid test failure on NetBSD 8.
45246         * tests/test-openat-safer.c (main): Execute a Linux specific test only
45247         on Linux.
45249 2018-12-15  Jim Meyering  <meyering@fb.com>
45251         regex: work around a bug in glibc-2.27 and prior
45252         * m4/regex.m4 (gl_REGEX): Reject any system regexp that gets a failed
45253         assertion for /0|()0|\1|0/.
45254         * tests/test-regex.c (main): Add the same test here.
45256 2018-12-15  Bruno Haible  <bruno@clisp.org>
45258         localename: Fix use of uninitialized shell variable.
45259         * m4/intl-thread-locale.m4 (gt_INTL_THREAD_LOCALE_NAME): Initialize
45260         gt_cv_locale_solaris114 always before use. Remove assignment without
45261         effect.
45263 2018-12-15  Bruno Haible  <bruno@clisp.org>
45265         dfa tests: Avoid test failure on Alpine Linux.
45266         * tests/dfa-match.sh (timeout_10): Accommodate the BusyBox 'timeout'
45267         command found on Alpine Linux.
45269 2018-12-15  Jim Meyering  <meyering@fb.com>
45271         dfa: avoid new warnings from gcc
45272         These would prevent building with -Werror and a Dec snapshot of gcc.
45273         * lib/dfa.c (dfaanalyze): Avoid shadowing warnings for "pos".
45274         Rename each inner instance to "p".
45275         (charclass_context): Remove unused static function.
45277 2018-12-14  Paul Eggert  <eggert@cs.ucla.edu>
45279         mkdir-p: improve diagnostic for FUSE mounts
45280         Problem reported by Niklas Hambüchen in:
45281         https://lists.gnu.org/r/bug-gnulib/2018-12/msg00074.html
45282         * lib/mkdir-p.c (make_dir_parents): In diagnostic, prefer stat
45283         errno to mkdir errno if the stat errno is likely more interesting.
45285 2018-12-14  Bruno Haible  <bruno@clisp.org>
45287         hash-map: Add tests.
45288         * tests/test-hash_map.c: New file.
45289         * modules/hash-map-tests: New file.
45291         linkedhash-map: Add tests.
45292         * tests/test-linkedhash_map.c: New file.
45293         * modules/linkedhash-map-tests: New file.
45295         array-map: Add tests.
45296         * tests/test-array_map.c: New file.
45297         * modules/array-map-tests: New file.
45299         xmap: New module.
45300         * lib/gl_xmap.h: New file.
45301         * lib/gl_xmap.c: New file.
45302         * modules/xmap: New file.
45304         hash-map: New module.
45305         * lib/gl_hash_map.h: New file.
45306         * lib/gl_hash_map.c: New file.
45307         * modules/hash-map: New file.
45309         linkedhash-map: New module.
45310         * lib/gl_linkedhash_map.h: New file.
45311         * lib/gl_linkedhash_map.c: New file.
45312         * lib/gl_anyhash1.h: Update comments.
45313         * lib/gl_anyhash2.h: Likewise.
45314         * modules/linkedhash-map: New file.
45316         array-map: New module.
45317         * lib/gl_array_map.h: New file.
45318         * lib/gl_array_map.c: New file.
45319         * modules/array-map: New file.
45321         map: New module.
45322         * lib/gl_map.h: New file.
45323         * lib/gl_map.c: New file.
45324         * lib/gl_omap.h (gl_mapkey_dispose_fn, gl_mapvalue_dispose_fn): Avoid
45325         conflict with gl_map.h.
45326         * modules/map: New file.
45328 2018-12-13  Bruno Haible  <bruno@clisp.org>
45330         select tests: Avoid test failure on Cygwin.
45331         * tests/test-select.h (test_bad_fd): Use an fd < FD_SETSIZE.
45333 2018-12-13  Bruno Haible  <bruno@clisp.org>
45335         localtime-buffer: Avoid endless recursion in localtime and gmtime.
45336         * lib/localtime-buffer.c: Undefine localtime and gmtime before use.
45338 2018-12-13  Bruno Haible  <bruno@clisp.org>
45340         localeconv tests: Avoid test failure on Cygwin.
45341         * tests/test-localeconv.c (main): On Cygwin, skip the 'grouping' and
45342         'mon_grouping' tests.
45344 2018-12-11  Bruno Haible  <bruno@clisp.org>
45346         omap: Don't dispose the old value when the function returns it.
45347         * lib/gl_array_omap.c (gl_array_remove_at): Don't invoke the vdispose_fn
45348         here.
45349         * lib/gl_avltree_omap.c (NODE_PAYLOAD_DISPOSE): Likewise.
45350         * lib/gl_rbtree_omap.c (NODE_PAYLOAD_DISPOSE): Likewise.
45351         * lib/gl_omap.h (gl_omap_nx_put, gl_omap_remove): Invoke the vdispose_fn
45352         here.
45354         array-omap, avltree-omap, rbtree-omap: Tweak style.
45355         * lib/gl_anytree_omap.h (gl_tree_nx_getput): Return 1 or 0, not true or
45356         false.
45357         * lib/gl_array_omap.c (gl_array_nx_getput): Likewise.
45359         rbtree-omap: Add tests.
45360         * tests/test-rbtree_omap.c: New file.
45361         * modules/rbtree-omap-tests: New file.
45363         avltree-omap: Add tests.
45364         * tests/test-avltree_omap.c: New file.
45365         * modules/avltree-omap-tests: New file.
45367         array-omap: Add tests.
45368         * tests/test-array_omap.c: New file.
45369         * modules/array-omap-tests: New file.
45371         xomap: New module.
45372         * lib/gl_xomap.h: New file.
45373         * lib/gl_xomap.c: New file.
45374         * modules/xomap: New file.
45376         rbtree-omap: New module.
45377         * lib/gl_rbtree_omap.h: New file.
45378         * lib/gl_rbtree_omap.c: New file.
45379         * lib/gl_rbtree_ordered.h: Code moved to here from lib/gl_rbtree_oset.c.
45380         Parameterize.
45381         * lib/gl_rbtree_oset.c: Include gl_rbtree_ordered.h.
45382         * modules/rbtree-omap: New file.
45383         * modules/rbtree-oset (Files): Add lib/gl_rbtree_ordered.h.
45384         (Makefile.am): Add gl_rbtree_ordered.h to lib_SOURCES.
45386         avltree-omap: New module.
45387         * lib/gl_avltree_omap.h: New file.
45388         * lib/gl_avltree_omap.c: New file.
45389         * lib/gl_avltree_ordered.h: Code moved to here from
45390         lib/gl_avltree_oset.c. Parameterize.
45391         * lib/gl_avltree_oset.c: Include gl_avltree_ordered.h.
45392         * lib/gl_anytree_omap.h: New file.
45393         * modules/avltree-omap: New file.
45394         * modules/avltree-oset (Files): Add lib/gl_avltree_ordered.h.
45395         (Makefile.am): Add gl_avltree_ordered.h to lib_SOURCES.
45397         array-omap: New module.
45398         * lib/gl_array_omap.h: New file.
45399         * lib/gl_array_omap.c: New file.
45400         * modules/array-omap: New file.
45402         omap: New module.
45403         * lib/gl_omap.h: New file.
45404         * lib/gl_omap.c: New file.
45405         * modules/omap: New file.
45407 2018-12-11  Bruno Haible  <bruno@clisp.org>
45409         hash-set, linkedhash-set: Reduce code duplication.
45410         * lib/gl_anyhash1.h: Rename from lib/gl_anyhash_list1.h and
45411         lib/gl_anyhash_set1.h.
45412         * lib/gl_anyhash2.h: Rename from lib/gl_anyhash_list2.h and
45413         lib/gl_anyhash_set2.h. Parameterize.
45414         (hash_resize_after_add): New function, from lib/gl_anyhash_set2.h.
45415         * lib/gl_anytreehash_list1.h (hash_resize_after_add): Remove function.
45416         * lib/gl_avltreehash_list.c: Include gl_anyhash1.h instead of
45417         gl_anyhash_list1.h. Include gl_anyhash2.h instead of gl_anyhash_list2.h.
45418         * lib/gl_rbtreehash_list.c: Likewise.
45419         * lib/gl_linkedhash_list.c: Likewise.
45420         (hash_resize_after_add): Remove function.
45421         * lib/gl_linkedhash_set.c: Include gl_anyhash1.h instead of
45422         gl_anyhash_set1.h. Include gl_anyhash2.h instead of gl_anyhash_set2.h.
45423         * gl_hash_set.c: Likewise.
45424         * modules/avltreehash-list (Files, Makefile.am): Update file list.
45425         * modules/rbtreehash-list (Files, Makefile.am): Likewise.
45426         * modules/linkedhash-list (Files, Makefile.am): Likewise.
45427         * modules/linkedhash-set (Files, Makefile.am): Likewise.
45428         * modules/hash-set (Files, Makefile.am): Likewise.
45430 2018-12-11  Bruno Haible  <bruno@clisp.org>
45432         array-set: Optimize.
45433         * lib/gl_array_set.c (gl_array_search, gl_array_remove): Test equals_fn
45434         outside the loop, not inside the loop.
45436 2018-12-11  Bruno Haible  <bruno@clisp.org>
45438         times: Fix tests.
45439         * tests/test-times.c (doublecmp): Implement a total order.
45441 2018-12-11  Bruno Haible  <bruno@clisp.org>
45443         array-set, linkedhash-set, hash-set: Fix tests.
45444         * tests/test-array_set.c (cmp_objects_in_array): New function.
45445         (check_equals): Use it.
45446         * tests/test-hash_set.c: Likewise.
45447         * tests/test-linkedhash_set.c: Likewise.
45449 2018-12-08  Bruno Haible  <bruno@clisp.org>
45451         Fix comments.
45452         * lib/gl_list.h (gl_list_free): Clarify what it does.
45453         * lib/gl_oset.h (gl_oset_free): Likewise.
45454         * lib/gl_set.h (gl_set_free): Likewise.
45455         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Fix typo in comment.
45456         * lib/gl_array_oset.c (gl_array_search_atleast): Likewise.
45457         * lib/gl_anyavltree_list1.h (MAXHEIGHT): Likewise.
45458         * lib/gl_avltree_oset.c (MAXHEIGHT): Likewise.
45460 2018-12-03  Bruno Haible  <bruno@clisp.org>
45462         hash-set: Add tests.
45463         * tests/test-hash_set.c: New file.
45464         * modules/hash-set-tests: New file.
45466         linkedhash-set: Add tests.
45467         * tests/test-linkedhash_set.c: New file.
45468         * modules/linkedhash-set-tests: New file.
45470         array-set: Add tests.
45471         * tests/test-array_set.c: New file.
45472         * modules/array-set-tests: New file.
45474         xset: New module.
45475         * lib/gl_xset.h: New file.
45476         * lib/gl_xset.c: New file.
45477         * modules/xset: New file.
45479         hash-set: New module.
45480         * lib/gl_hash_set.h: New file.
45481         * lib/gl_hash_set.c: New file.
45482         * modules/hash-set: New file.
45484         linkedhash-set: New module.
45485         * lib/gl_linkedhash_set.h: New file.
45486         * lib/gl_linkedhash_set.c: New file.
45487         * lib/gl_anyhash_set1.h: New file, based on lib/gl_anyhash_list1.h.
45488         * lib/gl_anyhash_set2.h: New file, based on lib/gl_anyhash_list2.h.
45489         * lib/gl_anyhash_primes.h: New file, extracted from
45490         lib/gl_anyhash_list2.h.
45491         * lib/gl_anyhash_list2.h: Include it.
45492         (primes, next_prime): Remove definitions.
45493         * modules/linkedhash-set: New file.
45494         * modules/avltreehash-list (Files): Add lib/gl_anyhash_primes.h.
45495         (Makefile.am): Add gl_anyhash_primes.h to lib_SOURCES.
45496         * modules/linkedhash-list (Files): Add lib/gl_anyhash_primes.h.
45497         (Makefile.am): Add gl_anyhash_primes.h to lib_SOURCES.
45498         * modules/rbtreehash-list (Files): Add lib/gl_anyhash_primes.h.
45499         (Makefile.am): Add gl_anyhash_primes.h to lib_SOURCES.
45501         array-set: New module.
45502         * lib/gl_array_set.h: New file.
45503         * lib/gl_array_set.c: New file.
45504         * modules/array-set: New file.
45506         set: New module.
45507         * lib/gl_set.h: New file.
45508         * lib/gl_set.c: New file.
45509         * lib/gl_oset.h (gl_setelement_dispose_fn): Avoid conflict with
45510         gl_set.h.
45511         * modules/set: New file.
45513 2018-12-07  Akim Demaille  <akim@lrde.epita.fr>
45515         bison: don't force the Yacc mode
45516         Passing -y forces Bison into POSIX YACC mode.  This includes reporting
45517         errors when Bison features are used in the grammar file.  Some of
45518         these features (such as %expect) were flagged non-yacc recently.  Most
45519         of the time, -y is actually used to please Automake's ylwrap which
45520         expects the output to be y.tab.c.
45521         * m4/bison.m4 (gl_BISON): Use `-o y.tab.c` rather than `-y`.
45523 2018-12-01  Bruno Haible  <bruno@clisp.org>
45525         gnupload: Document short options.
45526         * build-aux/gnupload (usage): Document the short options.
45528 2018-11-28  Ben Elliston  <bje@gnu.org>
45530         gnupload: Support option -h as alias of --help.
45531         * build-aux/gnupload: Support -h.
45533 2018-11-30  Paul Eggert  <eggert@cs.ucla.edu>
45535         memrchr: port better to clang
45536         * lib/memrchr.c (__memrchr): Cast to void * instead of to
45537         longword *, to pacify clang -Wcast-align (Bug#33544).
45539 2018-11-29  Eric Blake  <eblake@redhat.com>
45541         docs: mention printf %m considerations
45542         * doc/glibc-functions/asprintf.texi (asprintf): Document that %m
45543         is not portable, and is easy enough to work around.
45544         * doc/glibc-functions/obstack_printf.texi (obstack_printf): Likewise.
45545         * doc/glibc-functions/obstack_vprintf.texi (obstack_vprintf): Likewise.
45546         * doc/glibc-functions/vasprintf.texi (vasprintf): Likewise.
45547         * doc/posix-functions/dprintf.texi (dprintf): Likewise.
45548         * doc/posix-functions/fprintf.texi (fprintf): Likewise.
45549         * doc/posix-functions/fwprintf.texi (fwprintf): Likewise.
45550         * doc/posix-functions/printf.texi (printf): Likewise.
45551         * doc/posix-functions/snprintf.texi (snprintf): Likewise.
45552         * doc/posix-functions/sprintf.texi (sprintf): Likewise.
45553         * doc/posix-functions/swprintf.texi (swprintf): Likewise.
45554         * doc/posix-functions/vdprintf.texi (vdprintf): Likewise.
45555         * doc/posix-functions/vfprintf.texi (vfprintf): Likewise.
45556         * doc/posix-functions/vfwprintf.texi (vfwprintf): Likewise.
45557         * doc/posix-functions/vprintf.texi (vprintf): Likewise.
45558         * doc/posix-functions/vsnprintf.texi (vsnprintf): Likewise.
45559         * doc/posix-functions/vsprintf.texi (vsprintf): Likewise.
45560         * doc/posix-functions/vswprintf.texi (vswprintf): Likewise.
45561         * doc/posix-functions/vwprintf.texi (vwprintf): Likewise.
45562         * doc/posix-functions/wprintf.texi (wprintf): Likewise.
45564 2018-11-29  Akim Demaille  <akim@lrde.epita.fr>
45566         bitset: rename ebitset/expandable.* as tbitset/table.*
45567         See
45568         https://lists.gnu.org/archive/html/bug-gnulib/2018-11/msg00096.html.
45569         * lib/bitset/expandable.h, lib/bitset/expandable.c: Rename as...
45570         * lib/bitset/table.h, lib/bitset/table.c: these.
45571         Rename all the ebitset* symbols as tbitset*.
45572         Adjust dependencies.
45574 2018-11-28  Akim Demaille  <akim@lrde.epita.fr>
45576         bitset: check the operations
45577         * tests/test-bitset.c (bitset_random): New.
45578         Use it.
45579         * lib/bitset/expandable.c (ebitset_not): Fix typo.
45581 2018-11-28  Akim Demaille  <akim@lrde.epita.fr>
45583         bitset: properly use false/true instead of 0/1 for Booleans
45584         * lib/bitset/expandable.c, lib/bitset/vector.c: Use false/true, not
45585         0/1, as Booleans.
45587 2018-11-28  Akim Demaille  <akim@lrde.epita.fr>
45589         bitset: rename BITSET_VARRAY as BITSET_VECTOR
45590         For consistency with the name of the file.
45591         * doc/bitset.texi, lib/bitset.c, lib/bitset/base.h,
45592         * lib/bitset/stats.c, lib/bitset/vector.c
45593         (BITSET_VARRAY): Rename as...
45594         (BITSET_VECTOR): this.
45596 2018-11-28  Paul Eggert  <eggert@cs.ucla.edu>
45598         strerror_r-posix: memmove, not memcpy
45599         * lib/strerror_r.c (safe_copy): Use memmove, not memcpy,
45600         since the source and destination might overlap in the call
45601         ‘safe_copy (buf, buflen, strerror_r (errnum, buf, buflen))’.
45602         Simplify.
45604 2018-11-25  Akim Demaille  <akim@lrde.epita.fr>
45606         bitsetv: new module
45607         * lib/bitsetv.c, lib/bitsetv.h, modules/bitsetv: New.
45609 2018-11-25  Akim Demaille  <akim@lrde.epita.fr>
45611         bitset: add tests and doc
45612         First stabs at providing a documentation and test for the bitset
45613         module.
45614         * doc/bitset.texi, modules/test-bitset, tests/bitset-tests.c: New.
45616 2018-11-25  Akim Demaille  <akim@lrde.epita.fr>
45618         bitset: new module
45619         * lib/bitset.c, lib/bitset.h, lib/bitset/array.c,
45620         * lib/bitset/array.h, lib/bitset/base.h, lib/bitset/expandable.c,
45621         * lib/bitset/expandable.h, lib/bitset/list.c, lib/bitset/list.h,
45622         * lib/bitset/stats.c, lib/bitset/stats.h, lib/bitset/vector.c,
45623         * lib/bitset/vector.h, modules/bitset:
45624         New.
45626 2018-11-23  Bruno Haible  <bruno@clisp.org>
45628         localename: Fix gettext test failures on mingw.
45629         * lib/localename.c (gl_locale_name_posix): Convert the result of
45630         gl_locale_name_environ to XPG syntax.
45632 2018-11-23  Karl Berry  <karl@freefriends.org>
45634         * config/srclistvars.txt,
45635         * config/srclist.txt: remove all gettext references;
45636         the gettext maintainers will sync as needed.
45638 2018-11-21  Paul Eggert  <eggert@cs.ucla.edu>
45640         mktime: add libc-config dependency
45641         I missed this when we synced from glibc.
45642         * modules/mktime (Depends-on): Add libc-config.
45644 2018-11-13  Paul Eggert  <eggert@cs.ucla.edu>
45646         longlong: fix comment typo
45647         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Fix typo.
45649 2018-11-11  Bruno Haible  <bruno@clisp.org>
45651         havelib: Remove the need to include asm-underscore.m4.
45652         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI_32BIT): New macro.
45653         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Use it instead of
45654         gl_HOST_CPU_C_ABI.
45655         * modules/havelib (Files): Add host-cpu-c-abi.m4.
45656         (Depends-on): Remove host-cpu-c-abi.
45658 2018-11-03  Paul Eggert  <eggert@cs.ucla.edu>
45660         parse-datetime: simplify test for mktime failure
45661         * lib/parse-datetime.y (mktime_ok): Simplify.
45662         Remove args TZ and T; no longer needed.  Callers changed.
45664         posixtm: simplify test for mktime failure
45665         * lib/posixtm.c (posixtime): Simplify.
45667         nstrftime: simplify test for mktime failure
45668         * lib/nstrftime.c (__strftime_internal): Simplify.
45670 2018-11-02  Paul Eggert  <eggert@cs.ucla.edu>
45672         gnulib-common.m4: port _Noreturn to C++
45673         Problem reported by Akim Demaille in:
45674         https://lists.gnu.org/r/bug-bison/2018-10/msg00067.html
45675         * m4/gnulib-common.m4 (gl_COMMON_BODY): If C++, use [[noreturn]].
45676         Merge adjustments from _Noreturn.h and from glibc into the non-C++
45677         version.
45678         * lib/_Noreturn.h: Match gnulib-common.
45680 2018-10-30  Bruno Haible  <bruno@clisp.org>
45682         gnu-make: Fix for NetBSD 8 'make'.
45683         Reported by Reuben Thomas in
45684         <https://lists.gnu.org/archive/html/bug-gnulib/2018-10/msg00135.html>.
45685         * m4/gnu-make.m4 (gl_GNU_MAKE): Use a heuristic based on the --version
45686         output, ignoring exit codes.
45688 2018-10-28  Bernhard Voelker  <mail@bernhard-voelker.de>
45690         maintainer-makefile: fix syntax-check rule for "same.h"
45691         * top/maint.mk (sc_prohibit_same_without_use): Adjust regex to check
45692         for 'same_nameat', too.
45694 2018-10-25  Paul Eggert  <eggert@cs.ucla.edu>
45696         havelib: fix nested ‘configure’ chatter
45697         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Don’t nest
45698         AC_CACHE_CHECK calls, which resulted in confusing output like
45699         “checking for the common suffixes of directories in the library
45700         search path... checking for 64-bit host... no lib,lib”.
45702         backupfile: tweak for better code
45703         * lib/backupfile.c: Sort include directives, and remove
45704         unnecessary <limits.h> include.
45705         (FALLTHROUGH): New macro, copied from other modules.
45706         (backupfile_internal): Use it to avoid code duplication.
45707         This lets GCC 8.2.1 generate better code by inlining the
45708         call to check_extension.
45710 2018-10-23  Paul Eggert  <eggert@cs.ucla.edu>
45712         backupfile: new dir_fd args
45713         New module opendirat with code taken from fts.
45714         Use this module to let backupfile use a directory file descriptor.
45715         * NEWS: Document the incompatible change.
45716         * lib/backup-find.c (find_backup_file_name):
45717         * lib/backup-rename.c (backup_file_rename):
45718         New arg DIR_FD.
45719         * lib/backupfile.c: Include stdint.h, for SIZE_MAX.
45720         (SIZE_MAX): Remove.
45721         Include opendirat.h rather than dirent--.h.
45722         (check_extension): New args DIR_FD and BASE_MAX.  All callers changed.
45723         (numbered_backup): New args DIR_FD and PNEW_FD.  All callers changed.
45724         (backupfile_internal): New arg DIR_FD.  All callers changed.
45725         * lib/fts.c: Include opendirat.h.
45726         (opendirat): Move to opendirat.c.
45727         * lib/opendirat.c, lib/opendirat.h, modules/opendirat: New files.
45728         * modules/backupfile (Depends-on): Remove dirfd, opendir.
45729         Add opendirat.
45730         * modules/fts (Depends-on): Remove fdopendir, openat-safer.
45731         Add opendirat.
45733 2018-10-23  Bruno Haible  <bruno@clisp.org>
45735         localename: Simplify support for per-thread locales on Solaris 11.4.
45736         * m4/intl-thread-locale.m4: Renamed from m4/intlsolaris.m4.
45737         (gt_INTL_THREAD_LOCALE_NAME): Renamed from gt_INTL_SOLARIS. Define
45738         HAVE_SOLARIS114_LOCALES instead of HAVE_NAMELESS_LOCALES.
45739         * lib/localename.c: Handle HAVE_SOLARIS114_LOCALES through Solaris
45740         specific code.
45741         * lib/localename-table.h: Update comments.
45742         * lib/localename-table.c: Update comments.
45743         * m4/localename.m4 (gl_LOCALENAME): Require gt_INTL_THREAD_LOCALE_NAME.
45744         Test for 'uselocale'. Don't invoke gt_INTL_SOLARIS.
45745         * m4/intl.m4 (AM_INTL_SUBDIR): Require gt_INTL_THREAD_LOCALE_NAME. Test
45746         for 'uselocale'. Set HAVE_NAMELESS_LOCALES.
45747         (gt_INTL_SUBDIR_CORE): Don't invoke gt_INTL_SOLARIS. Don't set
45748         HAVE_NAMELESS_LOCALES here.
45749         * modules/localename (Files): Add m4/intl-thread-locale.m4. Remove
45750         m4/intlsolaris.m4.
45751         * modules/gettext (Files): Likewise.
45753 2018-10-22  Bruno Haible  <bruno@clisp.org>
45755         std-gnu11: Support Autoconf versions < 2.64.
45756         * m4/std-gnu11.m4 (AC_PROG_CC, AC_PROG_CXX): Use _AC_DO as fallback
45757         when _AC_DO_LIMIT does not exist.
45759 2018-10-22  Bruno Haible  <bruno@clisp.org>
45761         Assume Autoconf >= 2.63.
45762         * DEPENDENCIES: Mention the requirement.
45764         * gnulib-tool (DEFAULT_AUTOCONF_MINVERSION): Bump to 2.63.
45765         (func_get_filelist): Don't list m4/onceonly.m4 any more.
45766         * pygnulib/GLModuleSystem.py (getFiles): Likewise.
45767         * m4/onceonly.m4: Remove file.
45769         * m4/openmp.m4: Remove file.
45770         * modules/openmp (Files): Remove m4/openmp.m4.
45772         * m4/configmake.m4 (gl_CONFIGMAKE_PREP): Don't set datarootdir, docdir,
45773         htmldir, dvidir, pdfdir, psdir, localedir.
45774         * m4/po.m4 (AM_PO_SUBDIRS): Don't set localedir.
45776         * m4/gnulib-common.m4 (m4_foreach_w): Remove fallback for
45777         Autoconf < 2.60.
45778         (AC_PROG_MKDIR_P): Remove definition for Autoconf < 2.62.
45779         (AC_PROG_SED): Remove fallback for Autoconf < 2.60.
45781         * m4/errno_h.m4 (AC_COMPUTE_INT): Remove fallback for Autoconf < 2.61.
45782         * m4/size_max.m4 (AC_COMPUTE_INT): Likewise.
45783         * m4/stdint.m4 (AC_COMPUTE_INT): Likewise.
45785         * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Assume AC_USE_SYSTEM_EXTENSIONS
45786         exists.
45787         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Likewise,
45789         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Remove workaround for
45790         Autoconf < 2.61.
45792         * m4/lib-prefix.m4 (AC_LIB_ARG_WITH): Remove macro.
45793         (AC_LIB_PREFIX): Use AC_ARG_WITH, assuming semantics of
45794         Autoconf >= 2.52.
45796         * m4/longlong.m4: Require Autoconf >= 2.62. Update comments.
45797         * m4/ls-mntd-fs.m4: Require Autoconf >= 2.60. Update comments.
45798         * m4/gettext.m4 (AM_GNU_GETTEXT): Update comment.
45800 2018-10-22  Bruno Haible  <bruno@clisp.org>
45802         Assume Automake >= 1.11.
45803         * m4/configmake.m4: Update comments.
45804         * m4/lib-link.m4 (AC_LIB_RPATH): Assume AC_REQUIRE_AUX_FILE exists.
45805         * m4/po.m4 (AM_PO_SUBDIRS, AM_POSTPROCESS_PO_MAKEFILE): Eliminate uses
45806         of 'eval'.
45807         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am,
45808         func_create_testdir, func_create_megatestdir): Emit a Makefile.am that
45809         requires Automake >= 1.11.
45811 2018-10-22  Bruno Haible  <bruno@clisp.org>
45813         localename: Fix typo in comment.
45814         * tests/test-locale-c++.cc (newlocale): Fix typo in comment.
45816 2018-10-22  Bruno Haible  <bruno@clisp.org>
45818         Fix failure of 'gnulib-tool --create-testdir' with all modules.
45819         * gnulib-tool (func_create_testdir): Exclude 'timevar' module.
45821 2018-10-21  Bruno Haible  <bruno@clisp.org>
45823         locale: Ease integration with GNU libintl.
45824         * lib/locale.in.h (GNULIB_defined_newlocale, GNULIB_defined_duplocale,
45825         GNULIB_defined_freelocale): New macros.
45827 2018-10-21  Bruno Haible  <bruno@clisp.org>
45829         localename: Fine-tune support for per-thread locales on Solaris 11.4.
45830         * lib/localename-table.h: New file, extracted from lib/localename.c.
45831         * lib/localename-table.c: Likewise.
45832         * lib/localename.c: Include localename-table.h.
45833         (get_locale_t_name, newlocale, duplocale, freelocale): Invoke
45834         locale_hash_function instead of pointer_hash.
45835         * modules/localename (Files): Add lib/localename-table.h,
45836         lib/localename-table.c.
45837         (lib_SOURCES): Add localename-table.c.
45838         * m4/intlsolaris.m4 (gt_INTL_SOLARIS): Require AC_CANONICAL_HOST. Test
45839         for Solaris 11.4 locale system only on Solaris. Test for it
45840         independently whether getlocalename_l exists.
45841         * m4/intl.m4 (gt_INTL_SUBDIR_CORE): Don't test for 'uselocale' and
45842         'getlocalename_l'. Instead, invoke gt_INTL_SOLARIS. Set
45843         HAVE_NAMELESS_LOCALES.
45844         * modules/gettext (Files): Add m4/intlsolaris.m4.
45846 2018-10-21  Bruno Haible  <bruno@clisp.org>
45848         Small update from gettext.
45849         * m4/intl.m4: Update from gettext:
45850         - 2018-01-02: Fix 'ar' invocation when cross-compiling and in 64-bit
45851         mode on AIX.
45852         - 2018-01-02: Don't use -lc explicitly when linking with libtool.
45853         - 2017-05-19: (AM_INTL_SUBDIR): Require AC_C_FLEXIBLE_ARRAY_MEMBER.
45855 2018-10-16  Bruno Haible  <bruno@clisp.org>
45857         mountlist: Remove support for Cray with UNICOS 9.
45858         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't define
45859         MOUNTED_LISTMNTENT.
45860         * lib/mountlist.c: Remove MOUNTED_LISTMNTENT case.
45862 2018-10-16  Bruno Haible  <bruno@clisp.org>
45864         fsusage, mountlist, getloadavg, getgroups: Remove support for Ultrix.
45865         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't define
45866         STAT_STATFS2_FS_DATA.
45867         * lib/fsusage.c: Remove STAT_STATFS2_FS_DATA case.
45868         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't define
45869         MOUNTED_GETMNT.
45870         * lib/mountlist.c: Remove MOUNTED_GETMNT case.
45871         * lib/getloadavg.c (decstation): Remove definition and case.
45872         * m4/getgroups.m4 (AC_FUNC_GETGROUPS): Mention NeXTstep, not Ultrix.
45873         * lib/getgroups.c: Likewise.
45874         * doc/posix-functions/getgroups.texi: Likewise.
45875         * lib/time.in.h: Update comments.
45877 2018-10-16  Bruno Haible  <bruno@clisp.org>
45879         getloadavg: Remove support for ConvexOS.
45880         * lib/getloadavg.c: Remove convex case.
45882 2018-10-16  Bruno Haible  <bruno@clisp.org>
45884         getloadavg: Remove support for Sony NEWS.
45885         * lib/getloadavg.c: Remove sony_news case.
45887 2018-10-16  Bruno Haible  <bruno@clisp.org>
45889         fsusage, mountlist, getloadavg: Remove support for Dynix/ptx.
45890         * lib/fsusage.c: Remove _SEQUENT_ case.
45891         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Update comments.
45892         * lib/mountlist.c: Don't test for MNTTABNAME.
45893         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Don't test for libseq.
45894         (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't test for MNTTABNAME.
45895         * lib/getloadavg.c: Remove _SEQUENT_ and sequent cases.
45896         * lib/stat-size.h: Don't mention the Sequent bug.
45897         * doc/posix-functions/utime.texi: Don't mention the Dynix bug.
45899 2018-10-16  Bruno Haible  <bruno@clisp.org>
45901         fsusage: Remove support for AIX 3.
45902         * lib/fsusage.c: Remove code for AIX 3.
45903         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Update comments.
45905 2018-10-16  Bruno Haible  <bruno@clisp.org>
45907         fsusage, stat-size, getloadavg: Remove support for AIX PS/2.
45908         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for dustat.h.
45909         * lib/fsusage.c: Remove code for AIX PS/2.
45910         * lib/stat-size.h (ST_NBLOCKSIZE): Likewise.
45911         * lib/getloadavg.c: Likewise.
45913 2018-10-16  Bruno Haible  <bruno@clisp.org>
45915         getloadavg: Remove support for HP-UX on m68k.
45916         * lib/getloadavg.c: Remove hp9000s300 case.
45918 2018-10-16  Bruno Haible  <bruno@clisp.org>
45920         fsusage, mountlist: Remove support for DolphinOS (an SVR3 variant).
45921         * lib/fsusage.c: Remove DOLPHIN case.
45922         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Update comments.
45923         * lib/mountlist.c: Remove MOUNTED_GETMNTTBL case.
45925 2018-10-16  Bruno Haible  <bruno@clisp.org>
45927         getloadavg: Remove support for Alliant FX/2800.
45928         * lib/getloadavg.c: Remove alliant case.
45930 2018-10-16  Bruno Haible  <bruno@clisp.org>
45932         getloadavg: Remove support for tek4300.
45933         * lib/getloadavg.c: Remove tek4300 case.
45935 2018-10-16  Bruno Haible  <bruno@clisp.org>
45937         getloadavg: Remove support for Ardent.
45938         * lib/getloadavg.c: Remove ardent case.
45940 2018-10-16  Bruno Haible  <bruno@clisp.org>
45942         mountlist: Remove support for SVR2.
45943         Reported by Andrew Borodin <aborodin@vmail.ru> in
45944         <https://lists.gnu.org/archive/html/bug-gnulib/2018-10/msg00101.html>.
45945         * lib/mountlist.c: Remove MOUNTED_FREAD case.
45946         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't define
45947         MOUNTED_FREAD.
45949 2018-10-15  Paul Eggert  <eggert@cs.ucla.edu>
45951         libc-config: merge from glibc
45952         * lib/cdefs.h (__glibc_has_attribute): New macro.
45954         regex: depend on libc-config
45955         * modules/regex (Depends-on): Add libc-config.
45956         This is needed after the recent autoupdate from glibc.
45958 2018-10-14  Bruno Haible  <bruno@clisp.org>
45960         localename: Add support for per-thread locales on Solaris 11.4.
45961         * lib/locale.in.h (newlocale, freelocale): New declarations.
45962         (duplocale): Declare also when the 'localename' module requests it.
45963         * lib/localename.c (struniq_hash_node): Renamed from hash_node.
45964         (STRUNIQ_HASH_TABLE_SIZE): Renamed from HASH_TABLE_SIZE.
45965         (struniq): Update.
45966         (struct locale_categories_names, struct locale_hash_node): New types.
45967         (LOCALE_HASH_TABLE_SIZE): New constant.
45968         (locale_hash_table, locale_lock): New variables.
45969         (pointer_hash, get_locale_t_name): New functions.
45970         (newlocale, duplocale, freelocale): New overridden functions.
45971         (gl_locale_name_thread_unsafe): Use get_locale_t_name.
45972         * m4/intlsolaris.m4: New file.
45973         * m4/localename.m4 (gl_LOCALENAME): Require gl_LOCALE_H_DEFAULTS. Invoke
45974         gt_INTL_SOLARIS. Set HAVE_NEWLOCALE, HAVE_DUPLOCALE, HAVE_FREELOCALE,
45975         REPLACE_NEWLOCALE, REPLACE_DUPLOCALE, REPLACE_FREELOCALE.
45976         * m4/locale_h.m4 (gl_LOCALE_H): Test whether newlocale, freelocale are
45977         declared.
45978         (gl_LOCALE_H_DEFAULTS): Initialize GNULIB_LOCALENAME, HAVE_NEWLOCALE,
45979         HAVE_FREELOCALE, REPLACE_NEWLOCALE, REPLACE_FREELOCALE.
45980         * modules/locale (Makefile.am): Substitute GNULIB_LOCALENAME,
45981         HAVE_NEWLOCALE, HAVE_FREELOCALE, REPLACE_NEWLOCALE, REPLACE_FREELOCALE.
45982         * modules/localename (Files): Add intlsolaris.m4.
45983         (Depends-on): Add 'locale'.
45984         (configure.ac): Invoke gl_LOCALE_MODULE_INDICATOR.
45985         * tests/test-locale-c++.cc (newlocale, freelocale): Prepare for checking
45986         the signatures.
45988 2018-10-14  Akim Demaille  <akim@lrde.epita.fr>
45990         timevar: use gethrxtime to get wall clock time
45991         clock_gettime is not portable.  gethrxtime takes the best available
45992         option to get the wall clock time, including clock_gettime (monotonic
45993         clock), and gettime (non monotonic).
45994         Also, using xtime_t instead of float preserves the precision.
45995         Suggested by Bruno Haible.
45996         * lib/xtime.h (xtime_make): Handle overflows of nanoseconds.
45997         * modules/timevar (Depends-on): We need gethrxtime.
45998         We no longer use times().
45999         (Link): Update.
46000         * lib/timevar.h (timevar_time_def): Use xtime_t.
46001         * lib/timevar.c (set_to_current_time): Use gethrxtime.
46002         (timevar_print): Instead of checking whether the timings themselves
46003         are large enough for the timevar to be printed, check the percentages.
46005 2018-10-14  Bruno Haible  <bruno@clisp.org>
46007         wcsnrtombs: Work around Solaris 11.4 bug.
46008         * m4/wcsnrtombs.m4 (gl_WCSNRTOMBS_WORKS_IN_TRADITIONAL_LOCALE): New
46009         macro.
46010         (gl_FUNC_WCSNRTOMBS): Invoke it.
46011         * doc/posix-functions/wcsnrtombs.texi: Mention the Solaris bug.
46013 2018-10-14  Bruno Haible  <bruno@clisp.org>
46015         mbsnrtowcs: Work around Solaris 11.4 bug.
46016         * m4/mbsnrtowcs.m4 (gl_MBSNRTOWCS_WORKS_IN_TRADITIONAL_LOCALE): New
46017         macro.
46018         (gl_FUNC_MBSNRTOWCS): Invoke it.
46019         * doc/posix-functions/mbsnrtowcs.texi: Mention the Solaris bug.
46021 2018-10-14  Bruno Haible  <bruno@clisp.org>
46023         doc: Update for Solaris 11.4.
46024         * doc/**/*.texi: For bugs that exist in both Solaris 11.3 and 11.4,
46025         mention Solaris 11.4.
46026         * m4/printf.m4: Update comments about Solaris.
46027         * m4/log.m4: Likewise.
46028         * m4/log10.m4: Likewise.
46029         * m4/logb.m4: Likewise.
46030         * m4/logbf.m4: Likewise.
46031         * m4/logbl.m4: Likewise.
46032         * m4/rename.m4: Likewise.
46033         * m4/wcrtomb.m4: Likewise.
46034         * m4/hostent.m4: Likewise.
46035         * m4/servent.m4: Likewise.
46037 2018-10-14  Bruno Haible  <bruno@clisp.org>
46039         floor, ceil, trunc, truncf, truncl: Defeat GCC optimizations.
46040         * m4/floor.m4 (gl_FUNC_FLOOR_LIBS): Use 'floor' also through a function
46041         pointer.
46042         * m4/ceil.m4 (gl_FUNC_CEIL_LIBS): Use 'ceil' also through a function
46043         pointer.
46044         * m4/trunc.m4 (gl_FUNC_TRUNC): Use 'trunc' also through a function
46045         pointer.
46046         * m4/truncf.m4 (gl_FUNC_TRUNCF): Use 'truncf' also through a function
46047         pointer.
46048         * m4/truncl.m4 (gl_FUNC_TRUNCL): Use 'truncl' also through a function
46049         pointer.
46051 2018-10-13  Akim Demaille  <akim@lrde.epita.fr>
46053         bootstrap: fix wget command for po files.
46054         * build-aux/bootstrap (po_download_command_format): Fix comment,
46055         and adjust callers.
46057 2018-10-13  Akim Demaille  <akim@lrde.epita.fr>
46059         timevar: improve the output format
46060         Suggested by Bruno Haible.
46061         See https://lists.gnu.org/archive/html/bug-gnulib/2018-10/msg00040.html.
46062         * lib/timevar.c (timevar_print): Use %7.3f for usr/sys and %11.6f for
46063         wall, since its resolution is much higher.
46065 2018-10-13  Akim Demaille  <akim@lrde.epita.fr>
46067         timevar: expect that getrusage is available.
46068         Don't keep both times and getrusage as backend: both are guaranteed by
46069         gnulib, a single one suffices.  Using getrusage is open to possibly
46070         tracking other types of resources in the future.
46071         * modules/timevar (Depends-on): Add getrusage.
46072         (configure.ac): Remove gl_TIMEVAR.
46073         (Files): Remove m4/timevar.m4.
46074         * m4/timevar.m4: Remove, rely on gnulib for getrusage.
46075         * lib/timevar.h (timevar_enabled): Clarify documentation.
46076         * lib/timevar.c: Remove all the code about times.
46077         Remove all the CPP guards about getrusage: expect it to be present
46078         (courtesy of gnulib).
46080 2018-10-12  Bruno Haible  <bruno@clisp.org>
46082         mountlist: Improve support for Solaris in 64-bit mode.
46083         Reported by David Wood <David.Wood@deshaw.com> in
46084         <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=6816>.
46085         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): On Solaris 8 or
46086         newer, define MOUNTED_GETEXTMNTENT instead of MOUNTED_GETMNTENT2.
46087         * lib/mountlist.c: Add code for MOUNTED_GETEXTMNTENT case.
46089 2018-10-12  Bruno Haible  <bruno@clisp.org>
46091         mountlist: Add support for Minix.
46092         Reported by Assaf Gordon in
46093         <https://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00074.html>.
46094         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use
46095         AC_CHECK_FUNCS to check for 'getmntinfo'.
46096         * lib/mountlist.c: Update comments.
46098 2018-10-12  Bruno Haible  <bruno@clisp.org>
46100         Make better use of Autoconf.
46101         * m4/environ.m4: Use AC_CACHE_CHECK where possible.
46102         * m4/manywarnings.m4: Likewise.
46103         * m4/manywarnings-c++.m4: Likewise.
46104         * m4/socklen.m4: Likewise.
46105         * m4/sockpfaf.m4: Likewise.
46106         * m4/stdarg.m4: Likewise.
46107         * m4/visibility.m4: Likewise.
46108         * m4/fsusage.m4: Use AC_CACHE_CHECK where possible. Modernize
46109         indentation.
46110         * m4/ls-mntd-fs.m4: Likewise.
46112 2018-10-11  Bruno Haible  <bruno@clisp.org>
46114         mountlist: Modernize platform lists.
46115         * m4/ls-mntd-fs.m4: Clarify which MOUNTED_* symbol applies to which
46116         platforms, deemphasizing the obsolete ones.
46117         * lib/mountlist.c: Likewise.
46119 2018-10-11  Bruno Haible  <bruno@clisp.org>
46121         getprogname: Add support for 32-bit programs on HP-UX.
46122         * lib/getprogname.c (getprogname) [HP-UX]: If pstat_getproc fails,
46123         try the similar functions 32-bit programs on 64-bit HP-UX.
46125 2018-10-11  Bruno Haible  <bruno@clisp.org>
46127         getprogname: Work around program name truncation when possible.
46128         * lib/getprogname.c (getprogname) [HP-UX]: When pst_ucomm is truncated,
46129         possibly use pst_cmd instead.
46131 2018-10-08  Paul Eggert  <eggert@cs.ucla.edu>
46133         fts: cleanup after FTS_NOATIME removal
46134         * lib/fts_.h (FTS_VERBATIM, FTS_OPTIONMASK, FTS_NAMEONLY)
46135         (FTS_STOP): Shrink to minimal values.  We don’t need to
46136         worry about binary compatibility in Gnulib, and the old way
46137         of doing things had a hole in the user options that caused
46138         FTS_OPTIONMASK to not work as desired.
46140 2018-10-08  Bernhard Voelker  <mail@bernhard-voelker.de>
46142         fts: remove FTS_NOATIME
46143         This reverts commit da4d6974013c822af1498941e32db774b2031765.
46144         We cannot guarantee that O_NOATIME works: e.g. openat fails
46145         with EPERM if the effective user ID of the caller does not match
46146         the owner of the file and the caller is not privileged.
46147         Downstream findutils has never picked up FTS_NOATIME.  Discussed at
46148         <https://lists.gnu.org/r/bug-gnulib/2018-09/msg00122.html>.
46149         * lib/fts_.h (FTS_NOATIME): Remove bit flag.
46150         (FTS_OPTIONMASK): Adjust.
46151         * lib/fts.c (diropen, fts_open, fts_build): Likewise.
46152         (fd_ring_check): Likewise.
46154 2018-10-08  Bruno Haible  <bruno@clisp.org>
46156         csharpcomp*, csharpexec*: Remove support for pnet.
46157         * m4/csharpcomp.m4 (gt_CSHARPCOMP): Don't test for cscc. Don't set
46158         HAVE_CSCC.
46159         * build-aux/csharpcomp.sh.in (options_cscc): Remove variable.
46160         Don't test HAVE_CSCC.
46161         * lib/csharpcomp.c (compile_csharp_using_pnet): Remove function.
46162         (compile_csharp_class): Don't invoke it.
46163         * m4/csharpexec.m4 (gt_CSHARPEXEC): Don't test for ilrun. Don't set
46164         HAVE_ILRUN.
46165         * build-aux/csharpexec.sh.in (options_ilrun): Remove variable.
46166         Don't test HAVE_ILRUN.
46167         * lib/csharpexec.c (execute_csharp_using_pnet): Remove function.
46168         (execute_csharp_program): Don't invoke it.
46169         * m4/csharp.m4 (gt_CSHARP_CHOICE): Don't recognize --enable-csharp=pnet
46170         any more.
46172 2018-10-07  Andreas Henriksson  <andreas@fatal.se>  (tiny change)
46174         renameatu: prefer renameat2 to syscall
46175         * lib/renameatu.c (renameatu) [HAVE_RENAMEAT2]:
46176         Use renameat2 instead of syscall (Bug#32796).
46177         * m4/renameat.m4 (gl_FUNC_RENAMEAT): Check for renameat2.
46179 2018-10-07  Benno Schulenberg  <bensberg@telfort.nl>
46181         bootstrap, gnulib-tool: use https instead of insecure rsync
46182         * build-aux/bootstrap (download_po_files, po_download_command_format):
46183         Don't try using rsync; always use wget over https to fetch PO files.
46184         * gnulib-tool (func_import): Likewise.
46185         * pygnulib/GLImport.py (GLImport.execute): Likewise.
46187 2018-10-07  Benno Schulenberg  <bensberg@telfort.nl>
46189         bootstrap, gnulib-tool: correct the translations wget command
46190         * build-aux/bootstrap (po_download_command_format2): Restrict
46191         recursion to a single level.
46192         * gnulib-tool (func_import): Likewise.
46193         * pygnulib/GLImport.py (GLImport.execute): Likewise.
46195 2018-10-07  Akim Demaille  <akim@lrde.epita.fr>
46197         doc: the gnulib snapshots are not maintained
46198         * doc/gnulib-intro.texi (Steady Development): Don't mention them.
46200 2018-10-07  Akim Demaille  <akim@lrde.epita.fr>
46202         timevar: add to lib_SOURCES
46203         * modules/timevar (lib_SOURCES): Add timevar.c and timevar.def.
46205 2018-10-07  Bruno Haible  <bruno@clisp.org>
46207         dirent: Update documentation.
46208         * doc/posix-headers/dirent.texi: The MSVC issue is fixed by Gnulib.
46210 2018-10-05  Bruno Haible  <bruno@clisp.org>
46212         strpbrk: Make it possible to namespace the defined symbol.
46213         * lib/strpbrk.c (strpbrk): Don't undefine outside of glibc.
46215 2018-10-05  Bruno Haible  <bruno@clisp.org>
46217         strcspn: Make it possible to namespace the defined symbol.
46218         * lib/strcspn.c (strcspn): Don't undefine outside of glibc.
46220 2018-10-05  Bruno Haible  <bruno@clisp.org>
46222         raise: Make it possible to namespace the defined symbol.
46223         * lib/raise.c (raise): Undefine only after the replacement function has
46224         been defined.
46225         (raise): Renamed from rpl_raise.
46226         (raise_nothrow): Move to the end of the compilation unit.
46228 2018-10-05  Bruno Haible  <bruno@clisp.org>
46230         memcmp: Make it possible to namespace the defined symbol.
46231         * lib/memcmp.c (memcmp): Don't undefine outside of glibc.
46233 2018-10-05  Bruno Haible  <bruno@clisp.org>
46235         explicit_bzero: Make it possible to namespace the defined symbol.
46236         * lib/explicit_bzero.c (explicit_bzero): Don't undefine outside of
46237         glibc.
46239 2018-10-05  Bruno Haible  <bruno@clisp.org>
46241         mkdir-p: Depend on 'mkdir'.
46242         * modules/mkdir-p (Depends-on): Add 'mkdir'.
46244 2018-10-05  Bruno Haible  <bruno@clisp.org>
46246         tempname: Depend on 'mkdir'.
46247         Reported by Maarten Bosmans <mkbosmans@gmail.com>
46248         at <https://savannah.gnu.org/bugs/?33379>.
46249         * modules/tempname (Depends-on): Add 'mkdir'.
46251 2018-10-05  Akim Demaille  <akim@lrde.epita.fr>
46253         timevar: rely on gnulib modules for time portability.
46254         * modules/timevar (Depends-on): Add sys_time, sys_times, and times.
46255         * m4/timevar.m4: Don't check for clock_t and struct tms,
46256         guaranteed by gnulib.
46257         * lib/timevar.h: Use extern "C" protection.
46258         Include <stdio.h> for FILE.
46259         * lib/timevar.c: Include sys/time.h, sys/times.h unconditionally,
46260         they are guaranteed by gnulib.
46261         Remove uses of clock as (now useless) fallback.
46263 2018-10-04  Bruno Haible  <bruno@clisp.org>
46265         sh-filename: New module.
46266         * m4/sh-filename.m4: New file.
46267         * modules/sh-filename: New file.
46268         * lib/spawni.c (_PATH_BSHELL): Use BOURNE_SHELL instead of hardcoding
46269         "/bin/sh".
46270         * tests/test-posix_spawn1.c (main): Likewise.
46271         * tests/test-posix_spawn2.c (main): Likewise.
46272         * lib/javacomp.c (compile_using_envjavac, is_envjavac_gcj,
46273         is_envjavac_gcj43): Likewise.
46274         * lib/javaexec.c (execute_java_class): Likewise.
46275         * modules/posix_spawn-internal (Depends-on): Add sh-filename.
46276         * modules/posix_spawnp-tests (Depends-on): Likewise.
46277         * modules/javacomp (Depends-on): Likewise.
46278         * modules/javaexec (Depends-on): Likewise.
46280 2018-10-04  Bruno Haible  <bruno@clisp.org>
46282         spawn-pipe tests: Avoid test failure on native Windows.
46283         * tests/test-spawn-pipe-child.c (main): On native Windows, don't expect
46284         that fd 2 is closed.
46286 2018-10-04  Bruno Haible  <bruno@clisp.org>
46288         fcntl: Make it possible to namespace the defined symbol.
46289         * lib/fcntl.c (fcntl): Undefine only after the replacement function has
46290         been defined.
46291         (fcntl): Renamed from rpl_fcntl.
46292         (rpl_fcntl_DUPFD, rpl_fcntl_DUPFD_CLOEXEC): New functions, extracted
46293         from fcntl.
46294         (klibc_fcntl): Move to the end of the compilation unit.
46296 2018-10-02  Bruno Haible  <bruno@clisp.org>
46298         vasnprintf tests: Avoid test failure on HP-UX/hppa and IRIX.
46299         * tests/test-vasnprintf.c (test_function): Change the test added on
46300         2018-09-23 to check only the 18 most significant digits.
46302         vasnprintf tests: Avoid test failure on Cygwin.
46303         * tests/test-vasnprintf.c (test_function): Change the test added on
46304         2018-09-23 to check only the 42 most significant digits.
46306 2018-10-01  Bruno Haible  <bruno@clisp.org>
46308         mkostemp, mkostemps: Update documentation.
46309         * doc/glibc-functions/mkostemp.texi: Mention the Mac OS X issue.
46310         * doc/glibc-functions/mkostemps.texi: Likewise.
46312 2018-10-01  Tom Tromey  <tom@tromey.com>
46314         mkostemp, mkostemps: Fix compilation error in C++ mode on Mac OS X.
46315         * lib/stdlib.in.h: Include <unistd.h> for mkostemp and mkostemps
46316         on OS X.
46318 2018-09-30  Pádraig Brady  <P@draigBrady.com>
46320         hmac-*: refactor to remove repetitive code
46321         * lib/hmac.c: A new parameterized single implementation.
46322         * lib/hmac-md5.c: Define parameters and include implementation.
46323         * lib/hmac-sha1.c: Likewise.
46324         * lib/hmac-sha256.c: Likewise.
46325         * lib/hmac-sha512.c: Likewise.
46326         * modules/crypto/hmac-md5: Reference the new implementation file.
46327         * modules/crypto/hmac-sha1: Likewise.
46328         * modules/crypto/hmac-sha256: Likewise.
46329         * modules/crypto/hmac-sha512: Likewise.
46330         * tests/test-hmac-md5.c: Refactor common code to a single function.
46331         * tests/test-hmac-sha1.c: Likewise.
46332         * tests/test-hmac-sha256.c: Likewise.
46333         * tests/test-hmac-sha512.c: Likewise.
46335 2018-09-30  Zhang Qing  <zhangqingl@126.com>
46337         hmac-sha512: fix hash for keys > blocksize (128 bytes)
46338         * lib/hmac-sha512.c (hmac_sha512): Set the computed/shortened
46339         key length to that output by sha512, not the blocksize.
46340         Otherwise uninitialized data from the stack
46341         is used when computing the hash.
46342         * tests/test-hmac-sha512.c: Add a shortened key test case.
46343         Reported at https://github.com/coreutils/gnulib/pull/5
46345 2018-09-30  Bruno Haible  <bruno@clisp.org>
46347         vasnprintf: Avoid warnings from GCC's -Wsign-compare.
46348         Reported by Bjarni Ingi Gislason <bjarniig@rhi.hi.is> in
46349         <https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00105.html>.
46350         * lib/vasnprintf.c (VASNPRINTF): Cast 'count' from 'int' to
46351         'unsigned int' before comparison with an unsigned value.
46353 2018-09-30  Bruno Haible  <bruno@clisp.org>
46355         grantpt: Remove unnecessary dependency.
46356         * modules/grantpt (Depends-on): Remove 'builtin-expect'.
46358 2018-09-30  Bruno Haible  <bruno@clisp.org>
46360         timevar: Small tweaks.
46361         * lib/timevar.h: Fix comments. Add parameter names to function
46362         declarations.
46363         * lib/timevar.c: Include timevar.h immediately after config.h.
46364         * lib/timevar.def: Fix comments.
46365         * modules/timevar (Maintainer): List Akim Demaille.
46367 2018-09-30  Bruno Haible  <bruno@clisp.org>
46369         timevar: Include documentation in gnulib manual.
46370         * doc/timevar.texi: Change node and section name to 'Profiling of
46371         program phases'.
46372         In the code snippets, tweak the #includes and use GNU coding style.
46373         * doc/gnulib.texi: Include timevar.texi.
46375 2018-09-27  Akim Demaille  <akim@lrde.epita.fr>
46377         timevar: import from Bison.
46378         * m4/timevar.m4, modules/timevar, lib/timevar.h, lib/timevar.c:
46379         New files.
46380         * lib/timevar.def: New file.
46381         * doc/timevar.texi: New file.
46383 2018-09-26  Bruno Haible  <bruno@clisp.org>
46385         javacomp-script, javacomp: Add preliminary support for Java 12..17.
46386         * m4/javacomp.m4 (gt_JAVACOMP): Treat Java versions 12..17 like 11.
46387         * lib/javacomp.c (default_target_version): Likewise.
46389 2018-09-26  Bruno Haible  <bruno@clisp.org>
46391         javacomp-script, javacomp: Add support for Java 11.
46392         * m4/javacomp.m4 (gt_JAVACOMP): Accept source-version 11 and
46393         target-version 11.
46394         * lib/javaversion.h: Update comments.
46395         * lib/javacomp.c (default_target_version, SOURCE_VERSION_BOUND,
46396         source_version_index, get_goodcode_snippet, get_failcode_snippet,
46397         TARGET_VERSION_BOUND, target_version_index,
46398         corresponding_classfile_version): Accept source_version 11 and
46399         target_version 11.
46400         * lib/javacomp.h: Update comments accordingly.
46402 2018-09-23  Bruno Haible  <bruno@clisp.org>
46404         vasnprintf: Fix heap memory overrun bug.
46405         Reported by Ben Pfaff <blp@cs.stanford.edu> in
46406         <https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00107.html>.
46407         * lib/vasnprintf.c (convert_to_decimal): Allocate one more byte of
46408         memory.
46409         * tests/test-vasnprintf.c (test_function): Add another test.
46411 2018-09-19  Paul Eggert  <eggert@cs.ucla.edu>
46413         maint: mktime.c now shared with glibc
46414         * config/srclist.txt: intprops.h, timegm.c and mktime.c
46415         are now the same in Gnulib and glibc.
46417         mktime: fix _LIBC typo
46418         * lib/mktime.c (mktime): Fix typo (misspelled "_LIBC").
46420 2018-09-19  Norihiro Tanaka  <noritnk@kcn.ne.jp>
46422         dfa: optimization for state merge
46423         * lib/dfa.c (merge2): New function.
46424         (merge_nfa_state): Use it.
46426 2018-09-18  Jim Meyering  <meyering@fb.com>
46428         dfa: trivial comment fix: s/is/if/
46429         * lib/dfa.c (maybe_disable_superset_dfa): Fix comment typo.
46431 2018-09-18  Paul Eggert  <eggert@cs.ucla.edu>
46433         dfa: use more-informative function name
46434         * lib/dfa.c (maybe_disable_superset_dfa):
46435         Rename from dfautf8noss.  Use change.
46437         dfa: tweak allocation performance
46438         * lib/dfa.c (merge_nfa_state, dfaoptimize):
46439         Prefer ptrdiff_t for indexes some more.
46440         Use char for flags, as it’s wide enough.
46441         Allocate queue and flags together, with one malloc call.
46442         No need to use xnmalloc since the multiplication and
46443         addition cannot overflow (it’s already been checked by
46444         earlier allocation).  Prefer memset to open-coding.
46446         dfa: prune states as we go
46447         * lib/dfa.c (prune): Remove.
46448         dfa: reorder enum for efficiency
46449         (merge_nfa_state): Prune as we go instead of at the end.
46450         Prefer ptrdiff_t for indexes, as this helps the compiler a bit.
46452         * lib/dfa.c (END): Now -1 again.  Reorder other elements
46453         of the enumeration to make it easier for GCC to generate
46454         efficient code by using fewer comparisons to check for
46455         ranges of values.
46456         (atom): Take advantage of the reordering.
46458 2018-09-18  Norihiro Tanaka  <noritnk@kcn.ne.jp>
46460         dfa: optimize alternation in NFA
46461         Even when similar states exist in alternation, the DFA treats them
46462         as separate items, which may complicate the transition in NFA and
46463         cause slowdown.  This change assembles the states into one.  For
46464         example, ab|ac is changed into a(b|c).  This change speeds-up
46465         matching for many branched patterns.  For example, grep speeds up
46466         more than 30× in:
46468           seq 10000 | sed 's/$/ abcdefghijklmnopqrstuvwxyz/; s/$/./' >in
46469           time -p env LC_ALL=C grep -vf in in
46471         * lib/dfa.c (prune): New function.
46472         (merge_nfa_state): New function.  It merges similar NFA states.
46473         (dfaoptimize): New function.  It seeks merged and removed nodes.
46474         (dfaanalyze): Call new function.
46475         (dfautf8noss): Change name from dfaoptimize because of addition of new
46476         function.
46477         (dfacomp): Update caller.
46479         dfa: simplify initial state
46480         Simplifying the initial state enables easier optimization of the NFA.
46481         * lib/dfa.c (enum token): Add new element BEG.
46482         (prtok): Adjust due to adding element BEG.
46483         (dfaparse): Put BEG at a head of tokens.
46484         (state_index): Adjust due to adding element BEG.
46485         (dfaanalyze): Concatenate BEG to other tokens, and simplify to
46486         build initial state.
46487         (dfamust): Adjust due to adding element BEG.  DFAMUST ignores it.
46489 2018-09-18  Bruno Haible  <bruno@clisp.org>
46491         file-has-acl: Fix test failure on Cygwin 2.9.
46492         * m4/acl.m4 (gl_FUNC_ACL): Update comments regarding Cygwin.
46493         * lib/acl-internal.h: Likewise.
46494         (HAVE_ACL_EXTENDED_FILE): Undefine on Cygwin.
46495         * lib/acl-internal.c: Update comments regarding Cygwin.
46496         * lib/acl_entries.c: Likewise.
46497         * lib/file-has-acl.c: Likewise.
46498         (file_has_acl): For Cygwin, use a different way to determine whether
46499         the "default" ACL of a directory is nontrivial.
46500         * lib/get-permissions.c: Update comments regarding Cygwin.
46501         * lib/set-permissions.c: Likewise.
46503 2018-09-18  Bruno Haible  <bruno@clisp.org>
46505         stat-time tests: Fix test failure on Cygwin.
46506         * tests/nap.h (nap_get_stat): Treat Cygwin like native Windows.
46508 2018-09-18  Paul Eggert  <eggert@cs.ucla.edu>
46510         doc: OS X 10.11 lacked ns time functions
46511         According to <https://github.com/zeromq/libzmq/issues/2175>,
46512         nanosecond-resolution timestamp functions were introduced
46513         in macOS 10.12, so document the last version (OS X 10.11)
46514         where they were absent.
46516         gettime: nanotime never existed
46517         Problem reported by Bruno Haible in:
46518         https://lists.gnu.org/r/bug-gnulib/2018-09/msg00082.html
46519         * lib/gettime.c (gettime) [HAVE_NANOTIME]: Remove unused code.
46520         * m4/gettime.m4 (gl_GETTIME): Don’t check for nanotime.
46522 2018-09-18  Bruno Haible  <bruno@clisp.org>
46524         doc: Update statement about target platforms.
46525         Reported by Simon Sobisch.
46526         * doc/gnulib-intro.texi (Target Platforms): Update. Mention
46527         restrictions on MSVC versions.
46529 2018-09-18  Bruno Haible  <bruno@clisp.org>
46531         posix_spawn tests: Fix link error on 64-bit Cygwin.
46532         * tests/test-posix_spawn1.c (environ): Remove declaration.
46533         * tests/test-posix_spawn2.c (environ): Likewise.
46534         * tests/test-posix_spawn3.c (environ): Likewise.
46535         * tests/test-posix_spawn4.c (environ): Likewise.
46536         * modules/posix_spawn-tests (Depends-on): Add 'environ'.
46537         * modules/posix_spawnp-tests (Depends-on): Likewise.
46539 2018-09-16  Paul Eggert  <eggert@cs.ucla.edu>
46541         timespec: new function current_timespec
46542         * lib/gettime.c (gettime): Prefer clock_gettime to nanotime,
46543         and don’t worry about it failing on a CLOCK_REALTIME arg.
46544         POSIX requires it to succeed and I don’t know of any
46545         counterexamples where the fallbacks would work.
46546         (current_timespec): New function, taken from Emacs.  It is more
46547         convenient than gettime, and can help register allocation.
46548         * lib/timespec.h: Include arg-nonnull.h.
46549         (current_timespec): New declaration.
46550         (gettime, settime): Declare args to be nonnull.
46551         * modules/timespec (Depends-on): Add snippet/arg-nonnull.
46553 2018-09-16  Bruno Haible  <bruno@clisp.org>
46555         setlocale: Improve locale handling on macOS 10.12 or newer.
46556         * lib/setlocale.c: Include header files for CoreFoundation. Declare
46557         gl_locale_name_canonicalize.
46558         (libintl_setlocale): Try harder to set a locale for categories LC_CTYPE
46559         and LC_MESSAGES.
46560         * m4/setlocale.m4 (gl_PREREQ_SETLOCALE): Add comment.
46562 2018-09-16  Bruno Haible  <bruno@clisp.org>
46564         Update list of locale names with scripts on macOS.
46565         * lib/localename.c (gl_locale_name_canonicalize): Update tables to
46566         match Mac OS X 10.13 and recent glibc.
46568 2018-09-16  Bruno Haible  <bruno@clisp.org>
46570         gettext: Use newer macOS APIs when possible.
46571         * m4/intlmacosx.m4 (gt_INTL_MACOSX): Check for
46572         CFLocaleCopyPreferredLanguages.
46574 2018-09-16  Bruno Haible  <bruno@clisp.org>
46576         localename: Revisit macOS specific code.
46577         * lib/localename.c (gl_locale_name_default): Reduce code duplication.
46578         Fix comments about Mac OS X versions.
46580 2018-09-15  Bruno Haible  <bruno@clisp.org>
46582         setlocale: Improve support for locales not supported by libc.
46583         Reported by Dapeng Gao <peter@dpgao.cc> at
46584         <https://savannah.gnu.org/bugs/?54479>.
46585         * gettext-runtime/intl/setlocale.c: Include <stdio.h>.
46586         (libintl_setlocale): Use a more error-tolerant strategy when the locale
46587         to be set is not supported by libc: Emit warnings instead of failing.
46589 2018-09-15  Bruno Haible  <bruno@clisp.org>
46591         strstr, strcasestr: Add workaround against glibc-2.28 bug.
46592         Reported by Michael Brunnbauer via Siddhesh Poyarekar and Eric Blake.
46593         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE): Set
46594         gl_cv_func_strstr_works_always to 'no' on glibc 2.28.
46595         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Set
46596         gl_cv_func_strcasestr_works_always to 'no' on glibc 2.28.
46597         * doc/posix-functions/strstr.texi: Document the glibc 2.28 bug.
46598         * doc/glibc-functions/strcasestr.texi: Likewise.
46600 2018-09-14  Bruno Haible  <bruno@clisp.org>
46602         doc: Fix bottom of top-level page.
46603         Reported by Akim Demaille <akim.demaille@gmail.com> in
46604         <https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00072.html>.
46605         * doc/pastposix-functions/index.texi: Rename node to '_index' in HTML
46606         mode.
46607         * doc/gnulib.texi (Legacy Function Substitutes): Update menu
46608         accordingly.
46610 2018-09-12  Bruno Haible  <bruno@clisp.org>
46612         Add test case from a recent glibc bug.
46613         * tests/test-strstr.c (main): Add test of long needle.
46614         * tests/test-strcasestr.c (main): Likewise.
46615         * tests/test-c-strstr.c (main): Likewise.
46616         * tests/test-c-strcasestr.c (main): Likewise.
46617         * tests/test-memmem.c (main): Likewise.
46619 2018-09-12  Bruno Haible  <bruno@clisp.org>
46621         Apply Eric Blake's improvements from 2011-02-25 to more tests.
46622         * tests/test-c-strstr.c (main): Add the same tests here as well.
46624 2018-09-12  Bruno Haible  <bruno@clisp.org>
46626         Apply Jim Meyering's fix from 2015-01-11 to more tests.
46627         * tests/test-memmem.c (main): Free haystack.
46628         * tests/test-strcasestr.c (main): Likewise.
46629         * tests/test-c-strcasestr.c (main): Likewise.
46631 2018-09-11  Paul Eggert  <eggert@cs.ucla.edu>
46633         xstrtol: fix missing-TYPE_SIGNED typo
46634         * lib/xstrtol.c (TYPE_SIGNED): New macro, duplicating intprops.h.
46636 2018-09-10  Paul Eggert  <eggert@cs.ucla.edu>
46638         timespec: fix resolution confusion
46639         In normal usage, clock resolution is given in seconds, but the
46640         code was mistakenly using inverse seconds and calling it
46641         “resolution”.  Fix this, partly by renaming two identifiers.
46642         The old names will be kept for a bit, to ease transition.
46643         * lib/timespec.h (TIMESPEC_HZ, LOG10_TIMESPEC_HZ):
46644         New constants, replacing TIMESPEC_RESOLUTION and
46645         LOG10_TIMESPEC_RESOLUTION, which are now obsolescent.
46646         All uses changed.
46648 2018-09-09  Paul Eggert  <eggert@cs.ucla.edu>
46650         mktime: simplify in prep for glibc merge
46651         * lib/mktime.c, lib/timegm.c [_LIBC]:
46652         Include mktime-internal.h (a small file just for glibc)
46653         instead of using a typedef.
46655 2018-09-07  Paul Eggert  <eggert@cs.ucla.edu>
46657         intprops: minor clarification of code
46658         * lib/intprops.h (_GL_BINARY_OP_OVERFLOW):
46659         Use _GL_INT_CONVERT rather than reinventing it.
46661 2018-09-07  Bruno Haible  <bruno@clisp.org>
46663         Fix a comment.
46664         * tests/test-posix_spawn3.c (parent_main): Fix typo in comment.
46666 2018-09-07  Bruno Haible  <bruno@clisp.org>
46668         posix_spawn_file_actions_addchdir: Add tests.
46669         * tests/test-posix_spawn_file_actions_addchdir.c: New file.
46670         * tests/test-posix_spawn4.c: New file.
46671         * modules/posix_spawn_file_actions_addchdir-tests: New file.
46673 2018-09-07  Bruno Haible  <bruno@clisp.org>
46675         posix_spawn_file_actions_addchdir: New module.
46676         Suggested by Eric Blake in
46677         <https://lists.gnu.org/archive/html/bug-findutils/2018-09/msg00007.html>.
46678         * lib/spawn.in.h (posix_spawn_file_actions_addchdir): New declaration.
46679         * lib/spawn_int.h (struct __spawn_action): Add tag 'spawn_do_chdir' and
46680         union member 'chdir_action'.
46681         * lib/spawn_faction_addchdir.c: New file.
46682         * lib/spawni.c (__spawni): Implement the spawn_do_chdir action.
46683         * lib/spawn_faction_addclose.c: Test REPLACE_POSIX_SPAWN instead of
46684         HAVE_WORKING_POSIX_SPAWN.
46685         * lib/spawn_faction_adddup2.c: Likewise.
46686         * lib/spawn_faction_addopen.c: Likewise.
46687         * m4/posix_spawn_faction_addchdir.m4: New file.
46688         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): Test whether module
46689         'posix_spawn_file_actions_addchdir' is present and whether
46690         posix_spawn_file_actions_addchdir_np exists. Define REPLACE_POSIX_SPAWN
46691         instead of HAVE_WORKING_POSIX_SPAWN.
46692         * m4/spawn_h.m4 (gl_SPAWN_H): Test whether
46693         posix_spawn_file_actions_addchdir is declared.
46694         (gl_SPAWN_H_DEFAULTS): Initialize
46695         GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR,
46696         HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR,
46697         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR.
46698         * modules/spawn (Makefile.am): Substitute
46699         GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR,
46700         HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR,
46701         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR.
46702         * modules/posix_spawn_file_actions_addchdir: New file.
46703         * modules/posix_spawn_file_actions_addclose (Depends-on,
46704         configure.ac): Test also REPLACE_POSIX_SPAWN.
46705         * modules/posix_spawn_file_actions_adddup2 (Depends-on,
46706         configure.ac): Likewise.
46707         * modules/posix_spawn_file_actions_addopen (Depends-on,
46708         configure.ac): Likewise.
46709         * tests/test-spawn-c++.cc (posix_spawn_file_actions_addchdir): Check
46710         signature.
46711         * doc/posix-functions/posix_spawn.texi: Mention the new module.
46712         * doc/posix-functions/posix_spawnp.texi: Likewise.
46714 2018-09-06  Bruno Haible  <bruno@clisp.org>
46716         stddef: Override max_align_t on NetBSD 8.0/x86.
46717         * m4/stddef_h.m4 (gl_STDDEF_H): When testing for max_align_t, test also
46718         the value of __alignof__ (max_align_t).
46719         * doc/posix-headers/stddef.texi: Mention the issue.
46721 2018-09-06  Bruno Haible  <bruno@clisp.org>
46723         fcntl: Fix F_DUPFD_CLOEXEC behaviour on Haiku.
46724         * lib/fcntl.c (rpl_fcntl): For F_DUPFD_CLOEXEC, don't even try the
46725         system fcntl.
46726         * doc/posix-functions/fcntl.texi: Document the issue.
46728 2018-09-06  Bruno Haible  <bruno@clisp.org>
46730         count-trailing-zeros tests: Rely on limits-h module.
46731         * tests/test-count-trailing-zeros.c (ULLONG_MAX): Remove fallback
46732         definition.
46733         * modules/count-trailing-zeros-tests (Depends-on): Add 'limits-h'.
46735 2018-09-06  Bruno Haible  <bruno@clisp.org>
46737         count-leading-zeros tests: Rely on limits-h module.
46738         * tests/test-count-leading-zeros.c (ULLONG_MAX): Remove fallback
46739         definition.
46740         * modules/count-leading-zeros-tests (Depends-on): Add 'limits-h'.
46742 2018-09-06  Bruno Haible  <bruno@clisp.org>
46744         count-one-bits tests: Rely on limits-h module.
46745         * tests/test-count-one-bits.c (ULLONG_MAX): Remove fallback definition.
46746         * modules/count-one-bits-tests (Depends-on): Add 'limits-h'.
46748 2018-09-06  Bruno Haible  <bruno@clisp.org>
46750         xstrtoll: Rely on limits-h module.
46751         * lib/xstrtol.c: Don't include intprops.h.
46752         (ULLONG_MAX, LLONG_MAX, LLONG_MIN): Remove fallback definitions.
46753         * modules/xstrtol (Depends-on): Remove 'intprops'.
46754         * modules/xstrtoll (Depends-on): Add 'limits-h'.
46756 2018-09-06  Bruno Haible  <bruno@clisp.org>
46758         strtoll, strtoull: Rely on limits-h module.
46759         * lib/strtol.c (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove macros.
46760         (ULLONG_MAX, LLONG_MAX, LLONG_MIN): Remove fallback definitions.
46761         * modules/strtoll (Depends-on): Add limits-h.
46762         * modules/strtoull (Depends-on): Likewise.
46764 2018-09-06  Bruno Haible  <bruno@clisp.org>
46766         intprops tests: Fix compilation error with pre-C99 compiler.
46767         * tests/test-intprops.c (verify_stmt): New macro.
46768         (VERIFY, main): Use it.
46770 2018-09-06  Bruno Haible  <bruno@clisp.org>
46772         limits-h: Provide numerical limits macros.
46773         * lib/limits.in.h (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Define also for
46774         IRIX and for GCC.
46775         (WORD_BIT, LONG_BIT): Define.
46776         * m4/limits-h.m4 (gl_LIMITS_H): Set LIMITS_H to non-empty also when
46777         <limits.h> does not define LLONG_MAX or WORD_BIT.
46778         * tests/test-limits-h.c (TYPE_SIGNED, TYPE_WIDTH, TYPE_MINIMUM,
46779         TYPE_MAXIMUM): New macros, from intprops.h.
46780         Add tests for CHAR_BIT, WORD_BIT, LONG_BIT, <type>_MIN, and <type>_MAX.
46781         * doc/posix-headers/limits.texi: Document what the 'limits-h' module
46782         provides.
46784 2018-09-05  Bruno Haible  <bruno@clisp.org>
46786         fcntl: Don't access nonexistent optional argument.
46787         Reported by Frank Busse <f.busse@imperial.ac.uk> in
46788         <https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00018.html>.
46789         * lib/fcntl.c (rpl_fcntl): For actions that don't take an argument,
46790         don't consume an argument. For actions that take an 'int' argument,
46791         consume an 'int' argument.
46793 2018-09-05  Eric Blake  <eblake@redhat.com>
46795         doc: mention environ pitfall
46796         * doc/posix-functions/environ.texi (environ): Assigning NULL to
46797         environ is a glibc extension.
46799 2018-09-03  Bruno Haible  <bruno@clisp.org>
46801         gnulib-tool: Fix build order when $testsbase is a subdir of $sourcebase.
46802         Reported by Antoine Luong <antoine.luong@c-s.fr> in
46803         <https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00008.html>.
46804         * gnulib-tool (func_import): For the tests, set a dotfirst flag.
46805         (func_emit_lib_Makefile_am): Consider the dotfirst flag.
46806         (func_emit_tests_Makefile_am): Don't consider the dotfirst flag.
46808 2018-09-02  Paul Eggert  <eggert@cs.ucla.edu>
46810         mktime: fix unlikely race+overflow bug
46811         Problem reported by Alexandre Oliva in:
46812         https://sourceware.org/bugzilla/show_bug.cgi?id=16346
46813         * lib/mktime.c (__mktime_internal): Access *OFFSET only once,
46814         to avoid an unlikely race if the compiler delays a load and
46815         if this cascades into a signed integer overflow.
46817 2018-08-31  Paul Eggert  <eggert@cs.ucla.edu>
46819         mktime, timegm: simplify glibc time64_t
46820         * lib/mktime.c, lib/timegm.c (mktime_offset_t) [_LIBC]:
46821         Now long int, not time_t, since long int is the longstanding type
46822         for this in glibc and there is no need to change it even if time_t
46823         becomes 64 bits - even int would do, though this would be a change
46824         to the glibc generated code.  When this change is merged into
46825         glibc, it should simplify the time_t vs time64_t situation.
46827         mktime, timegm: simplify merge to glibc
46828         Move code around to make a merge to glibc easier to audit.
46829         This should not change behavior.
46830         * lib/mktime.c (NEED_MKTIME_INTERNAL, NEED_MKTIME_WINDOWS)
46831         (NEED_MKTIME_WORKING): Give default values to pacify -Wundef,
46832         which glibc uses.  Default NEED_MKTIME_WORKING to DEBUG_MKTIME, to
46833         simplify later conditionals; default the others to zero.  In uses
46834         of these conditionals, explicitly spell out how _LIBC affects
46835         things, so it’s easier to review from a glibc viewpoint.
46836         (my_tzset, __tzset) [!_LIBC]: New function and macro, to better
46837         compartmentalize tzset issues.  Move system-dependent tzsettish
46838         code here from mktime.
46839         (mktime): Move tzsettish code to my_tzset, and move
46840         localtime_offset to within mktime so that it doesn’t
46841         need a separate ifdef.
46843 2018-08-27  Paul Eggert  <eggert@cs.ucla.edu>
46845         intprops: avoid evaluation of some expressions
46846         This makes EXPR_SIGNED (e) easier to use, as it no longer
46847         evaluates the expression E.  Formerly, E was required to be free
46848         of side effects.
46849         * lib/intprops.h (_GL_INT_CONVERT, _GL_INT_NEGATE_CONVERT)
46850         (EXPR_SIGNED, TYPE_WIDTH, _GL_INT_MINIMUM, _GL_INT_MAXIMUM)
46851         (_GL_SIGNED_INT_MAXIMUM): Do not evaluate the expression arg.
46853 2018-08-23  Bruno Haible  <bruno@clisp.org>
46855         getcwd: Add cross-compilation guesses.
46856         Reported by Sergio Durigan Junior <sergiodj@redhat.com> in
46857         <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00130.html>.
46858         Based on a patch by Paul Eggert.
46859         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Add cross-compilation
46860         guesses for all GNU systems.
46862 2018-08-19  Bruno Haible  <bruno@clisp.org>
46864         glob-h: Formalize side effects from other modules.
46865         * m4/glob_h.m4 (gl_REPLACE_GLOB_H): New macro.
46866         * m4/glob.m4 (gl_GLOB): Invoke it.
46868         fnmatch-h: Formalize side effects from other modules.
46869         * m4/fnmatch_h.m4 (gl_REPLACE_FNMATCH_H): New macro.
46870         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Invoke it.
46872         limits-h: Formalize side effects from other modules.
46873         * m4/limits-h.m4 (gl_REPLACE_LIMITS_H): New macro.
46874         * m4/stdint.m4 (gl_STDINT_H): Invoke it.
46876 2018-08-19  Bruno Haible  <bruno@clisp.org>
46878         getpass: Move declaration to <unistd.h>.
46879         * lib/unistd.in.h (getpass): New declaration.
46880         * lib/getpass.h: Replace with a stub that just includes <unistd.h>.
46881         * m4/getpass.m4 (gl_FUNC_GETPASS): Declare through AC_DEFUN_ONCE.
46882         Require gl_UNISTD_H_DEFAULTS. Don't test whether getpass is declared.
46883         (gl_FUNC_GETPASS_GNU): Require gl_UNISTD_H_DEFAULTS and gl_FUNC_GETPASS.
46884         On glibc systems, don't set REPLACE_GETPASS to 1.
46885         * modules/getpass (Depends-on): Add 'unistd'.
46886         (configure.ac): Test also REPLACE_GETPASS. Define a module indicator.
46887         (Include): Specify <unistd.h> instead of "getpass.h".
46888         * modules/getpass-gnu (Depends-on): Merely depend on 'getpass'.
46889         (configure.ac): Sync with the configure.ac section of modules/getpass.
46890         (Include): Specify <unistd.h> instead of "getpass.h".
46891         * m4/unistd_h.m4 (gl_UNISTD_H): Test whether getpass is declared.
46892         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_GETPASS, HAVE_GETPASS,
46893         REPLACE_GETPASS.
46894         * modules/unistd (Makefile.am): Substitute GNULIB_GETPASS, HAVE_GETPASS,
46895         REPLACE_GETPASS.
46896         * tests/test-unistd-c++.cc: Test also the declaration of 'getpass'.
46897         * doc/glibc-functions/getpass.texi: A length limit exists also on uClibc
46898         and musl.
46899         * NEWS: Mention the change.
46901 2018-08-19  Bruno Haible  <bruno@clisp.org>
46903         glob: Fix over-optimization due to attribute __nonnull__.
46904         * lib/glob.c (_GL_ARG_NONNULL): Define to empty.
46906 2018-08-19  Bruno Haible  <bruno@clisp.org>
46908         glob: Fix another compilation error when glob.h is not replaced.
46909         Reported by Reuben Thomas <rrt@sc3d.org> in
46910         <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00112.html>.
46911         * m4/glob.m4 (gl_GLOB): Set GLOB_H to non-empty when needed.
46912         * m4/glob_h.m4 (gl_GLOB_H): Define through AC_DEFUN_ONCE.
46914 2018-08-18  Bruno Haible  <bruno@clisp.org>
46916         fnmatch: Avoid conflicting macro definitions of 'fnmatch'.
46917         Reported by Reuben Thomas <rrt@sc3d.org> in
46918         <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00108.html>.
46919         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH): Don't define 'fnmatch' as a macro
46920         in config.h.
46922 2018-08-18  Bruno Haible  <bruno@clisp.org>
46924         Avoid -Wcast-function-type warnings from casts after GetProcAddress.
46925         Reported by Andy Moreton <andrewjmoreton@gmail.com> in
46926         <https://lists.gnu.org/archive/html/emacs-devel/2018-08/msg00468.html>.
46927         Solution proposed by Eli Zaretskii.
46928         * lib/getaddrinfo.c (GetProcAddress): Cast result to 'void *' first.
46929         * lib/gettimeofday.c (GetProcAddress): Likewise.
46930         * lib/link.c (GetProcAddress): Likewise.
46931         * lib/physmem.c (GetProcAddress): Likewise.
46932         * lib/poll.c (GetProcAddress): Likewise.
46933         * lib/select.c (GetProcAddress): Likewise.
46934         * lib/stat-w32.c (GetProcAddress): Likewise.
46936 2018-08-18  Bruno Haible  <bruno@clisp.org>
46938         glob: Fix another compilation error when glob.h is not replaced.
46939         Reported and fix proposed by Reuben Thomas <rrt@sc3d.org> again.
46940         * lib/globfree.c: Include <libc-config.h>.
46942 2018-08-18  Bruno Haible  <bruno@clisp.org>
46944         glob: Fix compilation error when glob.h is not replaced.
46945         Reported and fix proposed by Reuben Thomas <rrt@sc3d.org> in
46946         <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00096.html>.
46947         * lib/glob_pattern_p.c: Include <libc-config.h>.
46948         * modules/glob (Depends-on): Add libc-config.
46950 2018-08-18  Bruno Haible  <bruno@clisp.org>
46952         scratch_buffer: Add tests.
46953         * tests/test-scratch-buffer.c: New file.
46954         * modules/scratch_buffer-tests: New file.
46956 2018-08-18  Bruno Haible  <bruno@clisp.org>
46958         scratch_buffer: Fix include file.
46959         Reported by Reuben Thomas <rrt@sc3d.org> in
46960         <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00082.html>.
46961         * lib/scratch_buffer.h: Include <libc-config.h> first. Add
46962         double-inclusion guard.
46964 2018-08-18  Bruno Haible  <bruno@clisp.org>
46966         glob-h: Revert Paul Eggert's revert.
46967         * m4/glob_h.m4: Revert to previous state.
46968         * modules/glob-h: Likewise.
46970 2018-08-18  Paul Eggert  <eggert@cs.ucla.edu>
46972         glob-h: always build glob.h
46973         This works around a problem reported by Reuben Thomas in:
46974         http://lists.gnu.org/r/bug-gnulib/2018-08/msg00079.html
46975         This workaround always builds glob.h, even on platforms that
46976         do not need it; perhaps this could be improved someday.
46977         * m4/glob_h.m4 (gl_GLOB_H): Do not set or use GLOB_H, since glob.h
46978         is always created now.
46979         * modules/glob-h (BUILT_SOURCES, glob.h): Always build glob.h.
46981 2018-08-13  Bruno Haible  <bruno@clisp.org>
46983         monetary: Simplify m4 code.
46984         * m4/monetary_h.m4 (gl_MONETARY_H): Define through AC_DEFUN_ONCE.
46985         (gl_MONETARY_H_BODY): Inline into gl_MONETARY_H. Remove macro.
46987 2018-08-13  Bruno Haible  <bruno@clisp.org>
46989         fnmatch, fnmatch-gnu: Fix compilation error on Mac OS X.
46990         Reported by Jeroen Meijer <jjgmeijer@gmail.com> in
46991         <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00046.html>
46992         and by Paul J. Lucas <paul@lucasmail.org> in
46993         <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00069.html>.
46994         * m4/fnmatch_h.m4 (gl_FNMATCH_H): Define through AC_DEFUN_ONCE.
46996 2018-08-11  Bruno Haible  <bruno@clisp.org>
46998         setlocale: Trivial simplification.
46999         * lib/setlocale.c (setlocale_unixlike): Remove redundant #if.
47001 2018-08-11  Paul Eggert  <eggert@cs.ucla.edu>
47003         verify: port 'assume' to traditional tools
47004         * lib/verify.h (assume): Port better to Oracle Studio 12.6
47005         and other tools that use /*NOTREACHED*/ comments.
47007 2018-08-10  Bruno Haible  <bruno@clisp.org>
47009         fnmatch-gnu: Fix compilation error in C++ namespace mode on Mac OS X.
47010         * modules/fnmatch-gnu (configure.ac): Invoke gl_MODULE_INDICATOR.
47011         * lib/fnmatch.in.h (fnmatch): Skip _GL_CXXALIASWARN if module
47012         'fnmatch-gnu' is in use.
47014 2018-08-07  Bruno Haible  <bruno@clisp.org>
47016         glob-h: Add tests.
47017         * tests/test-glob-h.c: New file, partially based on tests/test-glob.c.
47018         * tests/test-glob.c: Reorder #includes. Remove tests that are moved to
47019         tests/test-glob-h.c.
47020         * modules/glob-h-tests: New file.
47021         * tests/test-glob-h-c++.cc: Renamed from tests/test-glob-c++.cc. Add
47022         conditions.
47023         * modules/glob-h-c++-tests: Renamed from modules/glob-c++-tests.
47024         * modules/glob-tests (Depends-on): Remove glob-c++-tests.
47026 2018-08-07  Bruno Haible  <bruno@clisp.org>
47028         glob-h: New module.
47029         * lib/glob.in.h: Use nearly the usual gnulib idioms for header file
47030         replacements.
47031         * lib/glob.c: Include <config.h>.
47032         * m4/glob_h.m4: New file.
47033         * m4/glob.m4 (gl_GLOB): Require gl_GLOB_H. Remove code that is moved to
47034         glob_h.m4. Set HAVE_GLOB, REPLACE_GLOB, HAVE_GLOB_PATTERN_P,
47035         REPLACE_GLOB_PATTERN_P as appropriate.
47036         (gl_PREREQ_GLOB): Don't require AC_C_RESTRICT and
47037         AC_USE_SYSTEM_EXTENSIONS, now done through module 'glob-h'.
47038         * modules/glob-h: New file.
47039         * modules/glob (Files): Remove lib/glob.in.h, lib/glob-libc.h.
47040         (Dependencies): Add glob-h. Remove extensions, snippet/*, libc-config,
47041         lstat, sys_stat. Change conditions.
47042         (configure.ac): Test HAVE_GLOB, REPLACE_GLOB, HAVE_GLOB_PATTERN_P,
47043         REPLACE_GLOB_PATTERN_P. Set module indicator.
47044         (Makefile.am): Remove code that is moved to glob-h.
47045         * doc/posix-headers/glob.texi: Mention the 'glob-h' module.
47046         * modules/posixcheck (Depends-on): Add glob-h.
47048 2018-08-06  Bruno Haible  <bruno@clisp.org>
47050         Force generation of substitute .h file when C++ support is enabled.
47051         * m4/ansi-c++.m4 (gl_ANSI_CXX): New macro.
47052         * modules/ansi-c++-opt (configure.ac): Just require gl_ANSI_CXX.
47053         * m4/fnmatch_h.m4 (gl_FNMATCH_H): If C++ support is enabled, set
47054         FNMATCH_H to non-empty.
47055         * m4/iconv_h.m4 (gl_ICONV_H_DEFAULTS): If C++ support is enabled, set
47056         ICONV_H to non-empty.
47057         * m4/monetary_h.m4 (gl_MONETARY_H_BODY): If C++ support is enabled, set
47058         MONETARY_H to non-empty.
47059         * m4/utime_h.m4 (gl_UTIME_H): If C++ support is enabled, set UTIME_H to
47060         non-empty.
47062 2018-08-06  Bruno Haible  <bruno@clisp.org>
47064         fnmatch-h: Fix test compilation error on mingw (regression from today).
47065         * lib/fnmatch.in.h: Fix conditions.
47067 2018-08-06  Bruno Haible  <bruno@clisp.org>
47069         sys_resource: Relicense under LGPLv2+.
47070         John Malmberg's approval is in
47071         <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00031.html>.
47072         * modules/sys_resource (License): Change to LGPLv2+.
47074 2018-08-06  Bruno Haible  <bruno@clisp.org>
47076         fnmatch-h: Add tests.
47077         * tests/test-fnmatch-h.c: New file.
47078         * modules/fnmatch-h-tests: New file.
47079         * tests/test-fnmatch-h-c++.cc: New file.
47080         * modules/fnmatch-h-c++-tests: New file.
47082 2018-08-06  Bruno Haible  <bruno@clisp.org>
47084         fnmatch-h: New module.
47085         * lib/fnmatch.in.h: Use the usual gnulib idioms for header file
47086         replacements.
47087         (FNM_*): Don't redefine if fnmatch exists and we are not overriding it.
47088         (fnmatch): Use the usual gnulib idiom for function declarations. Enable
47089         'posixcheck' warning.
47090         * m4/fnmatch_h.m4: New file.
47091         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Require gl_FNMATCH_H. Remove
47092         code that is moved to fnmatch_h.m4. When fnmatch does not exist, don't
47093         bother testing whether it is working. Set HAVE_FNMATCH, REPLACE_FNMATCH
47094         as appropriate.
47095         * modules/fnmatch-h: New file.
47096         * modules/fnmatch (Files): Remove lib/fnmatch.in.h.
47097         (Dependencies): Add fnmatch-h. Remove extensions, snippet/*. Change
47098         conditions.
47099         (configure.ac): Test HAVE_FNMATCH and REPLACE_FNMATCH. Set module
47100         indicator.
47101         (Makefile.am): Remove code that is moved to fnmatch-h.
47102         * modules/fnmatch-gnu (configure.ac): Test HAVE_FNMATCH and
47103         REPLACE_FNMATCH.
47104         * doc/posix-headers/fnmatch.texi: Mention the 'fnmatch-h' module.
47105         * modules/posixcheck (Depends-on): Add fnmatch-h.
47107 2018-08-06  Bruno Haible  <bruno@clisp.org>
47109         Enable more C++ tests.
47110         * modules/inttypes-tests (Depends-on): Add inttypes-c++-tests.
47111         * modules/monetary-tests (Depends-on): Add monetary-c++-tests.
47112         * modules/strings-tests (Depends-on): Add strings-c++-tests.
47113         * modules/sys_resource-tests (Depends-on): Add sys_resource-c++-tests.
47114         * modules/utime-h-tests (Depends-on): Add utime-h-c++-tests.
47116 2018-08-06  Bruno Haible  <bruno@clisp.org>
47118         getopt-posix, utime-h: Ensure the .h file gets regenerated when needed.
47119         * modules/getopt-posix (Makefile.am): Add Makefile dependency for
47120         getopt.h.
47121         * modules/utime-h (Makefile.am): Add Makefile dependency for utime.h.
47123 2018-08-05  Bruno Haible  <bruno@clisp.org>
47125         utime-h: Generate header file when module 'posixcheck' is in use.
47126         * m4/utime_h.m4 (gl_UTIME_H): If module 'posixcheck' is in use, set
47127         UTIME_H to non-empty.
47129 2018-08-05  Bruno Haible  <bruno@clisp.org>
47131         monetary: Generate header file when module 'posixcheck' is in use.
47132         * m4/monetary_h.m4 (gl_MONETARY_H_BODY): If module 'posixcheck' is in
47133         use, set MONETARY_H to non-empty.
47135 2018-08-05  Bruno Haible  <bruno@clisp.org>
47137         iconv-h: Generate header file when module 'posixcheck' is in use.
47138         * m4/iconv_h.m4 (gl_ICONV_H_DEFAULTS): If module 'posixcheck' is in use,
47139         set ICONV_H to non-empty.
47141 2018-08-05  Bruno Haible  <bruno@clisp.org>
47143         Optimize the "checking whether ... is declared without a macro" checks.
47144         Suggested by Paul Eggert in
47145         <https://lists.gnu.org/archive/html/bug-gnulib/2011-01/msg00339.html>.
47146         * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Expand to nothing if the
47147         Gnulib module 'posixcheck' is not in use.
47149 2018-08-05  Bruno Haible  <bruno@clisp.org>
47151         iconv-h: Enable 'posixcheck' warnings.
47152         * m4/iconv_h.m4 (gl_ICONV_H): Check for declarations of iconv and
47153         iconv_open.
47154         * lib/iconv.in.h (iconv_open, iconv): Use _GL_WARN_ON_USE.
47156 2018-08-05  Bruno Haible  <bruno@clisp.org>
47158         Fix link error regarding 'rpl_environ' (regression from 2012-11-21).
47159         * m4/extern-inline.m4: Add more comments.
47160         * lib/warn-on-use.h (_GL_WARN_ON_USE_ATTRIBUTE): New macro.
47161         * lib/unistd.in.h (rpl_environ): Use it instead of _GL_WARN_ON_USE.
47162         * lib/math.in.h (_GL_WARN_REAL_FLOATING_DECL): Likewise.
47164 2018-08-04  Bruno Haible  <bruno@clisp.org>
47166         New module 'posixcheck'.
47167         * modules/posixcheck: New file.
47168         * m4/posixcheck.m4: New file.
47169         * doc/gnulib-tool.texi (Finding POSIX substitutes): New section.
47170         (Which modules?): Reference it.
47172 2018-08-01  Assaf Gordon  <assafgordon@gmail.com>
47174         dfa: fix memory leak
47175         * lib/dfa.c (dfafree): Add missing free() on dfa->superset.
47177 2018-08-01  Paul Eggert  <eggert@cs.ucla.edu>
47179         ieee754-h: new module
47180         It looks like Emacs can use this for some NaN processing.
47181         Emacs uses it only on double NaNs so it should be safe.
47182         * MODULES.html.sh (func_all_modules): Add ieee754-h.
47183         * config/srclist.txt: Mention ieee754.h in a comment.
47184         * doc/glibc-headers/ieee754.texi (ieee754.h):
47185         Gnulib now has a substitute that should work
47186         except for long double and for non-IEEE platforms.
47187         * lib/ieee754.in.h, m4/ieee754-h.m4, modules/ieee754-h:
47188         * modules/ieee754-h-tests, tests/test-ieee754-h.c: New files.
47190 2018-07-27  Bruno Haible  <bruno@clisp.org>
47192         iswcntrl: Mention minor problem on macOS.
47193         * doc/posix-functions/iswcntrl.texi: Mention oddity on macOS.
47195 2018-07-26  Colin Watson  <cjwatson@debian.org>
47197         bootstrap, gnulib-tool: fix translations rsync
47198         Previously, we created files such as $pobase/Makefile.in.in and then the
47199         subsequent rsync would immediately delete them.
47200         * build-aux/bootstrap (po_download_command_format): Avoid deleting
47201         non-.po files in target directory when rsyncing translations.
47202         * gnulib-tool (func_import): Likewise.
47203         * pygnulib/GLImport.py (GLImport.execute): Likewise.
47205 2018-07-25  Jim Meyering  <meyering@fb.com>
47207         bootstrap: reinstate definition fo gnulib_mk.
47208         That variable is used at least by cppi.
47209         * build-aux/bootstrap (gnulib_mk): Restore definition.
47210         This reverts the deletion from v0.1-1844-gc66dba9ba.
47212 2018-07-23  Bruno Haible  <bruno@clisp.org>
47214         doc: For module names, use texinfo markup @code{} or @samp{}.
47215         * doc/alloca.texi: Mark gnulib module names with @code.
47216         * doc/alloca-opt.texi: Likewise.
47217         * doc/quote.texi: Likewise.
47218         * doc/posix-functions/freopen.texi: Likewise.
47219         * doc/posix-functions/open.texi: Likewise.
47220         * doc/posix-functions/readlink.texi: Likewise.
47221         * doc/posix-functions/readlinkat.texi: Likewise.
47222         * doc/posix-functions/stdout.texi: Likewise.
47223         * doc/posix-functions/stderr.texi: Likewise.
47224         * doc/posix-functions/unlink.texi: Likewise.
47225         * doc/posix-functions/unlinkat.texi: Likewise.
47226         * doc/posix-functions/utime.texi: Likewise.
47227         * doc/posix-functions/utimensat.texi: Likewise.
47228         * doc/posix-functions/utimes.texi: Likewise.
47229         * doc/posix-headers/stdint.texi: Likewise.
47230         * doc/glibc-functions/futimesat.texi: Likewise.
47231         * doc/glibc-functions/lutimes.texi: Likewise.
47232         * doc/glibc-functions/memmem.texi: Likewise.
47234 2018-07-23  Werner LEMBERG  <wl@gnu.org>
47236         doc: Avoid some overfull lines in the TeX output.
47237         * doc/glibc-functions/futimesat.texi: Replace a long @code with a
47238         @example.
47239         * doc/pastposix-functions/pthread_attr_getstackaddr.texi: Insert a
47240         newline before the long URL.
47241         * doc/pastposix-functions/pthread_attr_setstackaddr.texi: Likewise.
47242         * doc/relocatable-maint.texi: Use @smallexample instead of @example.
47243         Add line breaks in code snippets.
47245 2018-07-17  Paul Eggert  <eggert@cs.ucla.edu>
47247         hard-locale: simplify by removing hard-locale.m4
47248         * m4/hard-locale.m4: Remove.
47249         * modules/hard-locale (Files): Remove m4/hard-locale.m4.
47250         (configure.ac): Do not call gl_HARD_LOCALE.
47252         gnulib-tool: limit line length for git send-email
47253         * gnulib-tool (func_import): Break actioncmd log line
47254         into multiple lines.
47256 2018-07-16  Bruno Haible  <bruno@clisp.org>
47258         ffs: Ensure declaration on mingw.
47259         Reported by Daniel P. Berrangé <berrange@redhat.com>
47260         in https://lists.gnu.org/archive/html/bug-gnulib/2018-07/msg00061.html.
47261         * m4/ffs.m4 (gl_FUNC_FFS): Check whether ffs() not only exists but is
47262         also declared.
47264 2018-07-13  Paul Eggert  <eggert@cs.ucla.edu>
47266         regex-tests: add dependency
47267         * modules/regex-tests (Depends-on): Add gettext-h.
47268         This is needed given the recent changes to regex,
47269         which no longer depends on gettext-h.
47271 2018-07-06  Paul Eggert  <eggert@cs.ucla.edu>
47273         regex: now in sync with glibc
47274         * config/srclist.txt: Gnulib and glibc regex code
47275         are synchronized again.
47277 2018-07-05  Paul Eggert  <eggert@cs.ucla.edu>
47279         renameatu: rename from renameat2
47280         It's looking like Glibc will add a renameat2 function
47281         that is incompatible with Gnulib renameat2; see:
47282         https://sourceware.org/ml/libc-alpha/2018-07/msg00064.html
47283         To help avoid future confusion, rename renameat2 to something else.
47284         Use the name 'renameatu', as the Gnulib function is close to the
47285         Glibc function.  Perhaps someday there will also be a renameat2
47286         Gnulib module, which mimicks the future glibc renameat2, but that
47287         can wait as nobody seems to need such a module now.
47288         * NEWS: Mention this.
47289         * lib/renameatu.c: Rename from lib/renameat2.c.
47290         * lib/renameatu.h: Rename from lib/renameat2.h.
47291         * modules/renameatu: Rename from modules/renameat2.
47292         * modules/renameatu-tests: Rename from modules/renameat2-tests.
47293         All uses of "renameat2" in identifiers or file name
47294         changed to "renameatu", except for two instances in
47295         lib/renameatu.c that deal with the Linux kernel's
47296         renameat2 syscall.
47298 2018-07-04  Paul Eggert  <eggert@cs.ucla.edu>
47300         gnulib-tool: minor tweaks for --gnu-make
47301         * gnulib-tool: Do not allow --gnu-make in test modes,
47302         since they all require automake.
47303         (func_emit_lib_Makefile_am): Don’t emit automake comment
47304         if --gnu-make.
47306         regex: work around conditional-dependencies glitch
47307         * modules/regex (Depends-on): Add langinfo.
47308         Without this change, I had problems building an experimental
47309         version of GNU Emacs.  The symptom of the bug was a message
47310         ‘./configure: line 12726: test: =: unary operator expected’.
47311         This was due to a line in gl_FUNC_NL_LANGINFO that invokes
47312         ‘test $HAVE_LANGINFO_CODESET = 1’ even though HAVE_LANGINFO_CODESET
47313         was unset.  Although gl_FUNC_NL_LANGINFO has
47314         ‘AC_REQUIRE([gl_LANGINFO_H])’ and gl_LANGINFO_H always sets
47315         HAVE_LANGINFO_CODESET to 0 or 1, gnulib-tool with
47316         --conditional-dependencies sometimes arranges for the
47317         gl_FUNC_NL_LANGINFO code to be executed before the gl_LANGINFO_H
47318         code.  Since the regex code includes <langinfo.h> it should be
47319         depending on the langinfo module anyway, and this happens to work
47320         around the bug, so install that as a workaround for now.  To
47321         reproduce the original problem, run the following shell script on
47322         the version of Gnulib just before this patch was installed.
47323                 rm -fr foo
47324                 mkdir foo
47325                 cat >foo/configure.ac <<'EOF'
47326                 AC_INIT(GNU Emacs, 27.0.50, bug-gnu-emacs@gnu.org, , https://www.gnu.org/software/emacs/)
47327                 gl_EARLY
47328                 gl_INIT
47329                 AC_OUTPUT
47330                 EOF
47331                 ./gnulib-tool --import --conditional-dependencies --gnu-make --dir foo regex
47332                 ./gnulib-tool --copy build-aux/install-sh foo/install-sh
47333                 ./gnulib-tool --copy build-aux/config.sub foo/config.sub
47334                 ./gnulib-tool --copy build-aux/config.guess foo/config.guess
47335                 cd foo
47336                 aclocal -I m4
47337                 autoconf
47338                 ./configure --with-included-regex
47340 2018-07-01  Paul Eggert  <eggert@cs.ucla.edu>
47342         wchar: fix bug when checking for ‘inline’
47343         I discovered this when looking into using the regex module
47344         with Emacs.
47345         * m4/wchar_h.m4 (gl_WCHAR_H_INLINE_OK): Fix bug introduced in
47346         2016-08-17T23:09:38Z!skunk@iSKUNK.ORG; the code compiled
47347         conftest1.c and conftest2.c but these files were not created.
47348         As far as I can see, this check never worked and nobody reported
47349         it until now, which is a bit worrisome.
47351 2018-06-30  Jim Meyering  <meyering@fb.com>
47353         bootstrap: s/--option val/--option=val/
47354         * build-aux/bootstrap (gnulib_tool_options): Change the
47355         spelling of "--option val" pairs to "--option=val", for
47356         aesthetics, and also so that this file no longer triggers
47357         a common help2man syntax-check warning when copied into
47358         projects like grep, gzip, etc.
47360 2018-07-01  Paul Eggert  <eggert@cs.ucla.edu>
47362         manywarnings: omit -Wswitch-default
47363         This should make things more consistent, as we already ignore
47364         -Wswitch-enum.  Problem reported by Reuben Thomas; see:
47365         https://lists.gnu.org/r/bug-gnulib/2018-05/msg00179.html
47366         * build-aux/g++-warning.spec, build-aux/gcc-warning.spec:
47367         Add -Wswitch-default.
47368         * m4/manywarnings-c++.m4 (gl_MANYWARN_ALL_GCC_CXX_IMPL):
47369         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC):
47370         Remove -Wswitch-default.
47372         regex: revert most trimming
47373         Problems reported by Bruno Haible in:
47374         https://lists.gnu.org/r/bug-gnulib/2018-07/msg00001.html
47375         * modules/regex (Depends-on): Add lock, memcmp, memmove,
47376         and wctype back in.  lock because regex users shouldn’t
47377         need to know that regex needs locking, and the rest because
47378         gnulib-tool should ordinarily ignore them anyway.
47380 2018-06-30  Paul Eggert  <eggert@cs.ucla.edu>
47382         regex: trim module dependencies
47383         * modules/regex (Depends-on): Remove gettext-h and lock,
47384         since the regex code should work OK without these modules,
47385         and Emacs uses it that way.  Also remove memcmp, memmove,
47386         and wctype, as these modules are obsolete and should not be
47387         needed any more.
47389 2018-06-29  Paul Eggert  <eggert@cs.ucla.edu>
47391         regex: glibc does not use intprops.h
47392         Maybe we can talk glibc into using intprops.h someday, but
47393         now doesn’t seem to be a good time.
47394         * lib/regcomp.c (TYPE_SIGNED): Remove; regex_internal.h now defines.
47395         * lib/regex_internal.h [_LIBC]: Do not include intprops.h.
47396         (TYPE_SIGNED, INT_ADD_WRAPV): New macros.
47398 2018-06-28  Paul Eggert  <eggert@cs.ucla.edu>
47400         regex: port to recently proposed glibc regex merge
47401         This patch is inspired by Adhemerval Zanella's recent proposal
47402         https://www.sourceware.org/ml/libc-alpha/2018-06/msg00905.html
47403         to merge glibc and Gnulib regex.  It aims to simplify the merge on
47404         the glibc side, without keeping Gnulib portable.
47405         * lib/regex.h: Fix a problem with glibc installed-header checking,
47406         as follows:
47407         (_Restrict_): Prefer __restrict if defined or if GCC 2.95 or later.
47408         (_Restrict_arr_): Prefer __restrict_arr if defined,
47409         otherwise prefer _Restrict_ if C99 or GCC 3.1 or later (but not C++).
47410         * lib/regex_internal.c (re_string_realloc_buffers, build_wcs_buffer)
47411         (build_wcs_upper_buffer, build_upper_buffer)
47412         (re_string_translate_buffer, re_string_context_at):
47413         Move decls here from lib/regex_internal.h, for glibc internal tests.
47414         (build_wcs_upper_buffer): Use __wcrtomb, not wcrtomb, fixing
47415         glibc BZ #18496.
47416         * lib/regex_internal.h (lock_fini) [_LIBC]: Cast to 0 to pacify
47417         -Wunused-value.
47418         (bitset_set, bitset_clear, bitset_contain, bitset_empty)
47419         (bitset_set_all, bitset_copy, bitset_not, bitset_merge)
47420         (bitset_mask): Now static inline, and without any __attribute__
47421         ((unused)) decoration, for glibc internal tests.
47423 2018-06-25  Bruno Haible  <bruno@clisp.org>
47425         threadlib: Fix LIBMULTITHREAD on platforms where --as-needed is enabled.
47426         Reported by Erik Auerswald <auerswal@unix-ag.uni-kl.de>
47427         in <https://lists.gnu.org/archive/html/coreutils/2018-06/msg00063.html>.
47428         * m4/threadlib.m4 (gl_THREADLIB_BODY): Check whether the linker supports
47429         --as-needed/--no-as-needed and --push-state/--pop-state. When defining
47430         USE_POSIX_THREADS_WEAK or USE_SOLARIS_THREADS_WEAK or
47431         USE_PTH_THREADS_WEAK, define LIBMULTITHREAD in such a way that -lpthread
47432         / -lthread / -lpth does not get optimized away by a preceding
47433         --as-needed option.
47435 2018-06-25  Bruno Haible  <bruno@clisp.org>
47437         Continue to use spaces for indentation, not tabs.
47438         * MODULES.html.sh: Untabify.
47439         * doc/regex.texi: Likewise.
47440         * lib/acl-internal.c: Likewise.
47441         * lib/dfa.c: Likewise.
47442         * lib/exclude.c: Likewise.
47443         * lib/exclude.h: Likewise.
47444         * lib/get-permissions.c: Likewise.
47445         * lib/gettimeofday.c: Likewise.
47446         * lib/parse-datetime.y: Likewise.
47447         * lib/pselect.c: Likewise.
47448         * lib/set-permissions.c: Likewise.
47449         * lib/time.in.h: Likewise.
47450         * m4/canonicalize.m4: Likewise.
47451         * m4/gc.m4: Likewise.
47452         * m4/gnulib-common.m4: Likewise.
47453         * m4/pthread_sigmask.m4: Likewise.
47454         * m4/vararrays.m4: Likewise.
47455         * tests/test-digest.h: Likewise.
47456         * tests/test-fcntl-h.c: Likewise.
47457         * tests/test-timespec.c: Likewise.
47458         * tests/uniwbrk/test-uc-wordbreaks.c: Likewise.
47460 2018-06-25  Bruno Haible  <bruno@clisp.org>
47462         manywarnings: Don't enable -Wjump-misses-init warnings by default.
47463         * build-aux/gcc-warning.spec: Add -Wjump-misses-init.
47464         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)): Remove
47465         -Wjump-misses-init.
47467 2018-06-25  Jim Meyering  <meyering@fb.com>
47469         acl-internal.h: remove _GL_ATTRIBUTE_CONST on void function
47470         * lib/acl-internal.h (free_permission_context): Remove that
47471         attribute directive.  Otherwise, it would provoke this from GCC 9:
47472         lib/acl-internal.h:300:3: error: 'const' attribute on function \
47473           returning 'void' [-Werror=attributes]
47475 2018-06-24  Jim Meyering  <meyering@fb.com>
47477         parse-datetime: accommodate gcc-4.8.5
47478         Bruno Haible reported the build failure in
47479         https://lists.gnu.org/r/bug-gnulib/2018-06/msg00066.html
47480         * lib/parse-datetime.y (parse_datetime2): Remove leading "static"
47481         on declaration of new local.
47483 2018-06-24  Bruno Haible  <bruno@clisp.org>
47485         af_alg: Fail in continuable manner on Linux/powerpc64le.
47486         Reported by Assaf Gordon <assafgordon@gmail.com>
47487         in <https://lists.gnu.org/archive/html/coreutils/2018-06/msg00034.html>.
47488         * lib/af_alg.c (afalg_stream): On non-seekable streams, try a single-
47489         byte send() as the first round.
47491 2018-06-24  Bruno Haible  <bruno@clisp.org>
47493         af_alg: Fix state of stream after sendfile() succeeds.
47494         * lib/af_alg.c (afalg_stream): Invoke fflush and lseek, to ensure that
47495         the stream is correctly positioned afterwards.
47496         * modules/crypto/af_alg (Depends-on): Add fflush.
47497         * tests/test-digest.h (test_digest_on_files): Verify that after the
47498         operation the stream is positioned at end of file.
47500 2018-06-24  Jim Meyering  <meyering@fb.com>
47502         canon-host: take GCC9's advice rather than ignoring warning
47503         Pádraig Brady suggested not to ignore this GCC9 advice.
47504         * lib/canon-host.c: Undo preceding change.
47505         * lib/canon-host.h: Instead, declare with _GL_ATTRIBUTE_MALLOC.
47507         parse-datetime.y: avoid spurious GCC 9 warning
47508         * lib/parse-datetime.y (parse_datetime2): Save RELATIVE_TIME_0 into
47509         a function local prior to the first "goto fail".  The prior use would
47510         evoke this:
47511         parse-datetime.y: In function 'parse_datetime2':
47512         parse-datetime.y:1791:19: error: jump skips variable initialization \
47513           [-Werror=jump-misses-init]
47514         parse-datetime.y:2385:2: note: label 'fail' defined here
47515         parse-datetime.y:188:43: note: '({anonymous})' declared here
47516         parse-datetime.y:1841:12: note: in expansion of macro 'RELATIVE_TIME_0'
47518         canon-host.c: avoid spurious GCC 9 warning
47519         * lib/canon-host.c: Suppress GCC9's -Wsuggest-attribute=malloc.
47521         manywarnings: accommodate GCC 9.0-pre: remove -Wchkp and -Wabi
47522         * build-aux/gcc-warning.spec: Add them here, each with an explanation.
47523         * m4/manywarnings.m4: Remove them.
47524         Otherwise, building coreutils, I would see this:
47525         cc1: error: deprecated command line option '-Wchkp' [-Werror]
47526         cc1: error: -Wabi won't warn about anything [-Werror=abi]
47527         cc1: note: -Wabi warns about differences from the most up-to-date ABI,\
47528           which is also used by default
47529         cc1: note: use e.g. -Wabi=11 to warn about changes from GCC 7
47531 2018-06-24  Bruno Haible  <bruno@clisp.org>
47533         af_alg tests: Add another test.
47534         * tests/test-digest.h (test_digest_on_files): Also check a large file
47535         with a skipped header.
47536         * tests/test-md5.c: Include macros.h.
47537         * tests/test-sha1.c: Likewise.
47538         * tests/test-sha256.c: Likewise.
47539         * tests/test-sha512.c: Likewise.
47540         * modules/crypto/md5-tests (Files): Add tests/macros.h.
47541         * modules/crypto/sha1-tests (Files): Likewise.
47542         * modules/crypto/sha256-tests (Files): Likewise.
47543         * modules/crypto/sha512-tests (Files): Likewise.
47545 2018-06-24  Pádraig Brady  <P@draigBrady.com>
47547         maint: clarify comments about sticky EOF
47548         * lib/af_alg.c: Be more direct that we can't
47549         assume stickiness of EOF for portability reasons.
47550         * lib/md5.c: Clarify that this isn't just a glibc issue.
47551         * lib/sha1.c: Likewise.
47552         * lib/sha256.c: Likewise.
47553         * lib/sha512.c: Likewise.
47555 2018-06-24  Bruno Haible  <bruno@clisp.org>
47557         af_alg: Comment and style improvements.
47558         * lib/af_alg.c (alg_socket): Use 'size_t' as index into a string.
47559         (afalg_buffer, afalg_stream): Improve comments.
47561 2018-06-24  Pádraig Brady  <P@draigBrady.com>
47563         af_alg: disable kernel hash functions by default
47564         All the kernel routines were seen to be significantly slower
47565         with these relatively recent components on an i3-2310M system:
47566           kernel-4.10.6-200.fc25.x86_64
47567           openssl-1.0.2m-1.fc25.x86_64
47568         sha1 was nearly twice as slow in the kernel for example.
47569         Further considerations why this should not be the default, at:
47570         https://lists.gnu.org/r/coreutils/2018-06/msg00034.html
47572         * m4/af_alg.m4: Require --with-linux-crypto to enable.
47573         * m4/gl-openssl.m4: Tweak accordingly.
47575 2018-06-24  Pádraig Brady  <P@draigBrady.com>
47577         af_alg: avoid hangs when reading from streams
47578         * lib/af_alg.c (afalg_stream): Don't assume EOF is sticky,
47579         and thus avoid doing a fread() when feof() is set.
47580         * lib/md5.c: Ensure feof() is called before fread().
47581         * lib/sha1.c: Likewise.
47582         * lib/sha256.c: Likewise.
47583         * lib/sha512.c: Likewise.
47585 2018-06-24  Pádraig Brady  <P@draigBrady.com>
47587         af_alg: fix error handling when hash not returned
47588         * lib/af_alg.c (afalg_stream): Handle the case where we've
47589         successfully written data to the kernel in the read/write loop,
47590         but the kernel doesn't respond with the hash.
47592 2018-06-24  Paul Eggert  <eggert@cs.ucla.edu>
47594         libc-config: merge from glibc
47595         * lib/cdefs.h (__inline, __restrict):
47596         Copy from current glibc.  This fixes glibc bug 17721,
47597         which Gnulib had already fixed in a different way.
47598         (__nonnull): Lessen the distance from glibc by using the
47599         glibc definition inside an ‘#ifndef __nonnull’.
47600         (__attribute_nonstring__): New macro, copied from
47601         current glibc.
47602         * lib/libc-config.h (__attribute_nonstring__): New undef.
47603         (__restrict): Remove; workaround no longer needed.
47604         Keep the __inline workaround, though, as it uses HAVE___INLINE to
47605         support more compilers than the glibc __inline can.
47607 2018-06-24  Bruno Haible  <bruno@clisp.org>
47609         mbrtowc, wcwidth: Fix MT-safety bug (regression from 2018-06-23).
47610         * lib/mbrtowc.c (enc_t): New enum type.
47611         (locale_enc, locale_enc_cached): New functions.
47612         (mbrtowc): Eliminate static variables. Use locale_enc_cached instead.
47613         * lib/wcwidth.c (is_locale_utf8, is_locale_utf8_cached): New functions.
47614         (wcwidth): Eliminate static variables. Use is_locale_utf8_cached
47615         instead.
47616         * m4/mbrtowc.m4 (gl_PREREQ_MBRTOWC): Require AC_C_INLINE.
47617         * m4/wcwidth.m4 (gl_PREREQ_WCWIDTH): New macro.
47618         * modules/wcwidth (configure.ac): Invoke it.
47620 2018-06-24  Bruno Haible  <bruno@clisp.org>
47622         wchar-single: Fix test failure in wcwidth tests.
47623         * tests/test-wcwidth.c (main): If the wchar-single module is present,
47624         skip the tests in the C locale.
47626 2018-06-23  Pádraig Brady  <P@draigBrady.com>
47628         crypto: mention --without-linux-crypto in --with-openssl --help
47629         * m4/gl-openssl.m4 (gl_CRYPTO_CHECK): Mention that linux crypto
47630         routines take precedence in --with-openssl help output.
47632 2018-06-23  Pádraig Brady  <P@draigBrady.com>
47634         wchar-single: a new module to enable optimizations in wchar replacements
47635         * lib/mbrtowc.c (mbrtowc): Only check locale_charset() once if
47636         GNULIB_WCHAR_SINGLE is enabled.
47637         * lib/wcwidth.c (wcwidth): Likewise.
47639 2018-06-23  Bruno Haible  <bruno@clisp.org>
47641         libc-config: Fix conflict with FreeBSD include files.
47642         * lib/cdefs.h (__nonnull): Remove definition.
47643         * lib/libc-config.h (__nonnull): Remove undefinition.
47645 2018-06-21  Paul Eggert  <eggert@cs.ucla.edu>
47647         random_r: do not crash if state is unaligned
47648         Problem reported by Bruce Korb in:
47649         https://lists.gnu.org/r/bug-gnulib/2018-06/msg00030.html
47650         I reproduced the crash on 32-bit sparc with Oracle Studio 12.6
47651         with 'cc -O2 -xmemalign=8s'.
47652         * lib/random_r.c: Include string.h, for memcpy.
47653         (get_int32, set_int32): New functions.
47654         (__srandom_r, __initstate_r, __setstate_r, __random_r):
47655         Use them to avoid assumption that state pointer is aligned.
47656         (__random_r): Avoid integer overflow if INT_MAX == UINT32_MAX.
47657         * tests/test-random_r.c (test_failed): New function.
47658         (main): Use it, to test for alignment bugs.
47660         random_r: omit unnecessary include
47661         * lib/random_r.c: Do not include limits.h.
47663         random, random_r: merge from glibc
47664         * lib/random.c, lib/random_r.c:
47665         Include libc-config.h if !_LIBC, not config.h unilaterally.
47666         * lib/random.c:
47667         Do not include stdint.h or time.h; not needed.
47668         Include libc-lock.h if _LIBC, and define substitute macros otherwise.
47669         (unsafe_state): Rename from generator.  All uses changed.
47670         Use C99-style initializers.
47671         (__random, __srandom, __initstate, __setstate): Rename from
47672         non-underscored version, but define it to non-underscored version
47673         on Gnulib.  Add a lock.
47674         * lib/random_r.c (__srandom_r, __initstate_r, __setstate_r, __random_r):
47675         Likewise.
47676         Do not include <stdint.h>; not needed since stdlib.h defines int32_t.
47677         (weak_alias, __set_errno) [!_LIBC]: Remove; now done by libc-config.
47678         (__srandom_r): Use int32_t instead of long int where int32_t will do.
47679         (__random_r): Use uint32 to fix glibc bug 17343.
47680         * modules/random, modules/random_r (Depends-on): Add libc-config.
47681         Depend on stdint only if $HAVE_RANDOM = 0.
47683 2018-06-19  Jim Meyering  <meyering@fb.com>
47685         README-release: also run any check-very-expensive tests
47686         * top/README-release: Adjust instructions so they run the
47687         check-very-expensive tests when there is such a target.
47689 2018-06-18  Bruno Haible  <bruno@clisp.org>
47691         pthread_rwlock_rdlock: Add comments regarding glibc behaviour.
47692         * m4/pthread_rwlock_rdlock.m4: Add comment.
47693         * doc/posix-functions/pthread_rwlock_rdlock.texi: Mention that rwlocks
47694         are reader-preferring in glibc.
47695         * doc/posix-functions/pthread_rwlock_tryrdlock.texi: Likwise.
47696         * doc/posix-functions/pthread_rwlock_timedrdlock.texi: Likewise.
47698 2018-06-17  Paul Eggert  <eggert@cs.ucla.edu>
47700         crypto: use byteswap
47701         * lib/md4.c, lib/md5.c, lib/sha1.c, lib/sha256.c, lib/sha512.c:
47702         * lib/sm3.c: Include <byteswap.h>.
47703         (SWAP): Use its macros rather than reinventing the wheel.
47704         * modules/crypto/md4, modules/crypto/md5-buffer:
47705         * modules/crypto/sha1-buffer, modules/crypto/sha256-buffer:
47706         * modules/crypto/sha512-buffer, modules/crypto/sm3:
47707         (Depends-on): Add byteswap.
47709 2018-06-17  Pádraig Brady  <P@draigBrady.com>
47711         gendocs.sh: fix support for legacy --texi2html
47712         * build-aux/gendocs.sh: Restrict use of TOP_NODE_UP_URL
47713         to the default makeinfo invocation.
47714         Reported by Bruce Korb
47716 2018-06-17  Bruno Haible  <bruno@clisp.org>
47718         gettext po infrastructure: Update from current gettext git.
47719         Reported by Akim Demaille <akim@lrde.epita.fr>.
47720         * build-aux/po/Makefile.in.in: Update from current gettext git.
47721         * build-aux/po/remove-potcdate.sin: Likewise.
47722         * config/srclist.txt: Temporarily disable sync for these files.
47724 2018-06-17  Bruno Haible  <bruno@clisp.org>
47726         getloadavg: Return 0 on Windows without Cygwin.
47727         * lib/getloadavg.c: Don't assume that the symbol WINDOWS32 is defined.
47729 2018-06-17  Paul Smith  <psmith@gnu.org>
47731         getloadavg: Allow building on Windows without Cygwin
47732         * lib/getloadavg.c: Reinstate ifdef for HAVE_UNISTD_H.
47733         * m4/getloadavg.m4: Check for unistd.h.
47735 2018-06-03  Paul Eggert  <eggert@cs.ucla.edu>
47737         Port crypto/af_alg to GCC 4.8.4
47738         Problem reported by Peter Simons in:
47739         https://lists.gnu.org/r/bug-gnulib/2018-06/msg00002.html
47740         * modules/crypto/af_alg (Depends-on): Add c99 if USE_AF_ALG.
47742 2018-05-27  Colin Watson  <cjwatson@debian.org>
47744         bootstrap: document source fetching in --help
47745         * build-aux/bootstrap (usage): Document how Gnulib sources are fetched.
47747 2018-04-09  Colin Watson  <cjwatson@debian.org>
47749         bootstrap: allow non-submodule control of gnulib
47750         * build-aux/bootstrap: Honour GNULIB_URL and GNULIB_REVISION in
47751         bootstrap.conf when fetching gnulib using "git clone" or via
47752         GNULIB_SRCDIR.
47754 2018-05-21  Paul Eggert  <eggert@cs.ucla.edu>
47756         crypto: omit stream ops Emacs doesn’t need
47757         * lib/md5.c (md5_stream):
47758         * lib/sha1.c (sha1_stream):
47759         * lib/sha256.c (shaxxx_stream, sha256_stream, sha224_stream):
47760         * lib/sha512.c (shaxxx_stream, sha512_stream, sha384_stream):
47761         Compile stream functions only if GL_COMPILE_CRYPTO_STREAM is
47762         defined.  Emacs needs this, as it does not use the stream
47763         operations and doesn’t need all the af_alg stuff we’ve recently
47764         added.  Perhaps a similar change is needed to the other crypto
47765         modules, but this patch changes only those needed for Emacs.
47766         * modules/crypto/md5-buffer, modules/crypto/sha1-buffer:
47767         * modules/crypto/sha256-buffer, modules/crypto/sha512-buffer:
47768         New modules, used by Emacs.
47769         * modules/crypto/md5, modules/crypto/sha1, modules/crypto/sha256:
47770         * modules/crypto/sha512: Rewrite to depend on the new modules.
47772 2018-05-20  Pádraig Brady  <P@draigBrady.com>
47774         fts: avoid a memory leak edge case
47775         * lib/fts.c (fts_open): Set an appropriate fts_level
47776         so that an immediate fts_close() will free the allocation.
47777         * tests/test-fts.c (fts_dealloc): Add a test case which
47778         will trigger under valgrind or address sanitizer.
47779         Fixes https://bugs.gnu.org/31439
47781 2018-05-20  Bruno Haible  <bruno@clisp.org>
47783         wcwidth tests: Fix link error.
47784         * modules/wcwidth-tests (Makefile.am): Link test-wcwidth against
47785         $(LIBUNISTRING).
47787 2018-05-20  Bruno Haible  <bruno@clisp.org>
47789         regex: Fix "error: possibly undefined macro: gl_GLIBC21".
47790         * modules/regex (Files): Add m4/glibc21.m4.
47792 2018-05-20  Bruno Haible  <bruno@clisp.org>
47794         localcharset: Optimize.
47795         * lib/localcharset.c (alias_table): Comment out no-op mappings for
47796         platforms where these don't matter. This reduces the table size,
47797         which in turn reduces the lookup time.
47799 2018-05-19  Bruno Haible  <bruno@clisp.org>
47801         localcharset: Map the locale encodings found in newer OSes.
47802         * lib/localcharset.c (alias_table): Add mapping for locale encodings
47803         found in FreeBSD 11, NetBSD 7, Solaris 10, Openindiana, HP-UX 11.31,
47804         IRIX 6.5, Minix 3.3.
47805         * lib/localcharset.h: Update comments accordingly. Also for Cygwin 2.9.
47807 2018-05-19  Bruno Haible  <bruno@clisp.org>
47809         localcharset: Move mapping tables into the code. Use a binary search.
47810         * lib/localcharset.h: Document the GNU canonical names for character
47811         encodings here.
47812         * lib/localcharset.c: Don't include <fcntl.h>, <unistd.h>,
47813         relocatable.h, configmake.h.
47814         (O_NOFOLLOW, ISSLASH, DIRECTORY_SEPARATOR, getc, volatile): Remove
47815         macros.
47816         (charset_aliases): Remove variable.
47817         (get_charset_aliases): Remove function.
47818         (struct table_entry): New type.
47819         (alias_table, locale_table): New constants.
47820         (locale_charset): Use the alias_table or locale_table to get the
47821         canonicalized encoding name.
47822         * lib/config.charset: Remove file.
47823         * lib/ref-add.sin: Remove file.
47824         * lib/ref-del.sin: Remove file.
47825         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't require gl_FCNTL_O_FLAGS,
47826         AC_CANONICAL_HOST, gl_GLIBC21. Don't check for getc_unlocked.
47827         * modules/localcharset (Notice): Remove.
47828         (Files): Remove config.charset, ref-add.sin, ref-del.sin, fcntl-o.m4,
47829         glibc21.m4.
47830         (Depends-on): Remove configmake.
47831         (configure.ac): Define LOCALCHARSET_TESTS_ENVIRONMENT to empty.
47832         (Makefile.am): Simplify.
47833         * build-aux/prefix-gnulib-mk: Remove special code for the removed files.
47835 2018-05-19  Bruno Haible  <bruno@clisp.org>
47837         localcharset: Add a manual test.
47838         * tests/test-localcharset.c: New file.
47839         * modules/localcharset-tests: New file.
47841 2018-05-19  Bruno Haible  <bruno@clisp.org>
47843         localcharset: Remove support for obsolete platforms.
47844         * lib/config.charset: Remove support for Linux/libc5, glibc-2.0.x, and
47845         Mac OS X 10.2. Comment out dubious entry for Solaris.
47847 2018-05-19  Jim Meyering  <meyering@fb.com>
47849         gnupload: adjust comment
47850         * build-aux/gnupload: Add FIXME-2020 comment, to make it slightly
47851         more likely we'll remove the just-added code in a year or two.
47853 2018-05-19  Bruno Haible  <bruno@clisp.org>
47855         gnupload: Fix "gpg-agent is not available in this session" error.
47856         * build-aux/gnupload (GPG): Pick the right GNUPG executable to use.
47858 2018-05-16  Paul Eggert  <eggert@cs.ucla.edu>
47860         crypto/af_alg: fix --help
47861         * m4/af_alg.m4: Avoid spurious newline in --help output.
47863 2018-05-13  Bruno Haible  <bruno@clisp.org>
47865         nl_langinfo: Fix compilation error on Android.
47866         * lib/nl_langinfo.c (nl_langinfo): Define values for the items GROUPING,
47867         INT_CURR_SYMBOL, etc. only if these items are defined.
47869 2018-05-13  Bruno Haible  <bruno@clisp.org>
47871         truncate: Fix compilation error on Android.
47872         * m4/truncate.m4 (gl_FUNC_TRUNCATE): Test also whether 'truncate' is
47873         declared. Set HAVE_DECL_TRUNCATE, not HAVE_TRUNCATE.
47874         * lib/unistd.in.h (truncate): Test HAVE_DECL_TRUNCATE, not
47875         HAVE_TRUNCATE.
47876         * modules/truncate: Likewise.
47877         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize HAVE_DECL_TRUNCATE,
47878         not HAVE_TRUNCATE.
47879         * modules/unistd (Makefile.am): Substitute HAVE_DECL_TRUNCATE, not
47880         HAVE_TRUNCATE.
47881         * doc/posix-functions/truncate.texi: Mention the issue.
47883 2018-05-13  Bruno Haible  <bruno@clisp.org>
47885         pthread: Fix compilation error on Android.
47886         * lib/pthread.in.h: Use _GL_ALREADY_INCLUDING_PTHREAD_H to shortcut
47887         recursive inclusion of this file.
47889 2018-05-13  Bruno Haible  <bruno@clisp.org>
47891         posix_spawn: Fix compilation error on Android.
47892         * lib/spawn.in.h (posix_spawnattr_t): Consider also the case
47893         HAVE_POSIX_SPAWNATTR_T = 1 && HAVE_POSIX_SPAWN = 0.
47894         (posix_spawn_file_actions_t): Consider also the case
47895         HAVE_POSIX_SPAWN_FILE_ACTIONS_T = 1 && HAVE_POSIX_SPAWN = 0.
47897 2018-05-13  Bruno Haible  <bruno@clisp.org>
47899         tsearch: Move from K&R C to ANSI C.
47900         * lib/tsearch.c (tfind): Convert definition to ANSI C.
47902 2018-05-13  Bruno Haible  <bruno@clisp.org>
47904         tsearch: Fix compilation error on Android.
47905         * lib/search.in.h (twalk): Declare when HAVE_TWALK, not HAVE_TSEARCH,
47906         is 0.
47907         (GNULIB_defined_tsearch, GNULIB_defined_twalk): New macros.
47908         * lib/tsearch.c (tsearch, tfind, tdelete): Define only if
47909         GNULIB_defined_tsearch is true.
47910         (twalk): Define only if GNULIB_defined_twalk is true.
47911         * modules/tsearch (configure.ac): Compile tsearch.c also if HAVE_TWALK
47912         is 0.
47913         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Set HAVE_TWALK.
47914         * m4/search_h.m4 (gl_SEARCH_H_DEFAULTS): Initialize HAVE_TWALK.
47915         * modules/search (Makefile.am): Substitute HAVE_TWALK.
47917 2018-05-13  Bruno Haible  <bruno@clisp.org>
47919         imaxdiv: Fix compilation error on Android.
47920         * m4/imaxdiv.m4 (gl_FUNC_IMAXDIV): Set HAVE_IMAXDIV_T to 0 if imaxdiv_t
47921         is not defined.
47922         * lib/inttypes.in.h (imaxdiv_t): Define if HAVE_IMAXDIV_T, not
47923         HAVE_DECL_IMAXDIV, is 0.
47924         * m4/inttypes.m4 (gl_INTTYPES_H_DEFAULTS): Initialize HAVE_IMAXDIV_T.
47925         * modules/inttypes-incomplete (Makefile.am): Substitute HAVE_IMAXDIV_T.
47927 2018-05-13  Bruno Haible  <bruno@clisp.org>
47929         Support selective inclusion mechanism of recent mingw.org header files.
47930         Reported by Eli Zaretskii <eliz@gnu.org>.
47931         * lib/sys_types.in.h: On mingw, when __need_off_t, __need___off64_t,
47932         __need_ssize_t, or __need_time_t is defined, just include the system's
47933         <sys/types.h>.
47934         * lib/locale.in.h: On mingw, when __need_locale_t is defined, just
47935         include the system's <locale.h>.
47937 2018-05-13  Bruno Haible  <bruno@clisp.org>
47939         Avoid compilation error due to 'mmap' on Android.
47940         * lib/vma-iter.c (_FILE_OFFSET_BITS): Undefine on Android.
47941         * lib/get-rusage-as.c (_FILE_OFFSET_BITS): Likewise.
47942         * tests/zerosize-ptr.h (_FILE_OFFSET_BITS, __USE_FILE_OFFSET64):
47943         Undefine on Android.
47945 2018-05-13  Bruno Haible  <bruno@clisp.org>
47947         Add cross-compilation guesses for Linux systems without glibc.
47948         * m4/chown.m4 (AC_FUNC_CHOWN): Add cross-compilation guess for Linux.
47949         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
47950         * m4/link.m4 (gl_FUNC_LINK): Likewise.
47951         * m4/linkat.m4 (gl_FUNC_LINKAT): Likewise.
47952         * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Likewise.
47953         * m4/mkdir.m4 (gl_FUNC_MKDIR): Likewise.
47954         * m4/mkfifo.m4 (gl_FUNC_MKFIFO): Likewise.
47955         * m4/mknod.m4 (gl_FUNC_MKNOD): Likewise.
47956         * m4/pselect.m4 (gl_FUNC_PSELECT): Likewise.
47957         * m4/readlink.m4 (gl_FUNC_READLINK): Likewise.
47958         * m4/rename.m4 (gl_FUNC_RENAME): Likewise.
47959         * m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise.
47960         * m4/select.m4 (gl_FUNC_SELECT): Likewise.
47961         * m4/stat.m4 (gl_FUNC_STAT): Likewise.
47962         * m4/symlink.m4 (gl_FUNC_SYMLINK): Likewise.
47963         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Likewise.
47964         * m4/unlink.m4 (gl_FUNC_UNLINK): Likewise.
47965         * m4/utimens.m4 (gl_UTIMENS): Likewise.
47967 2018-05-13  Bruno Haible  <bruno@clisp.org>
47969         getpagesize: Fix compilation error on Android.
47970         * m4/getpagesize.m4 (gl_CHECK_FUNC_GETPAGESIZE): New macro.
47971         (gl_FUNC_GETPAGESIZE): Invoke it instead of AC_CHECK_FUNC.
47972         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Don't invoke
47973         AC_CHECK_FUNC. Instead, invoke gl_CHECK_FUNC_GETPAGESIZE and define
47974         HAVE_GETPAGESIZE accordingly.
47975         * modules/getcwd (Files): Add m4/getpagesize.m4.
47977 2018-05-13  Bruno Haible  <bruno@clisp.org>
47979         tcgetsid: Fix compilation error on Android.
47980         * m4/tcgetsid.m4 (gl_FUNC_TCGETSID): Use AC_LINK_IFELSE instead of
47981         AC_CHECK_FUNC.
47983 2018-05-13  Bruno Haible  <bruno@clisp.org>
47985         getpass: Fix configure test for Android.
47986         * m4/getpass.m4 (gl_PREREQ_GETPASS): Use AC_LINK_IFELSE instead of
47987         AC_CHECK_FUNC.
47989 2018-05-13  Bruno Haible  <bruno@clisp.org>
47991         ffs: Fix compilation error on Android.
47992         * m4/ffs.m4 (gl_FUNC_FFS): Use AC_LINK_IFELSE instead of AC_CHECK_FUNC.
47994 2018-05-13  Bruno Haible  <bruno@clisp.org>
47996         mkfifo: Fix compilation error on Android.
47997         * m4/mkfifo.m4 (gl_FUNC_MKFIFO): Use AC_LINK_IFELSE instead of
47998         AC_CHECK_FUNC.
48000 2018-05-13  Bruno Haible  <bruno@clisp.org>
48002         c-strtod: Fix configure test for Android.
48003         * m4/c-strtod.m4 (gl_C_STRTOD): Use AC_LINK_IFELSE instead of
48004         AC_CHECK_FUNC.
48006 2018-05-13  Bruno Haible  <bruno@clisp.org>
48008         random: Fix compilation error on Android.
48009         * m4/random.m4 (gl_FUNC_RANDOM): Use AC_LINK_IFELSE instead of
48010         AC_CHECK_FUNC.
48012 2018-05-13  Bruno Haible  <bruno@clisp.org>
48014         grantpt: Fix compilation error on Android.
48015         * m4/grantpt.m4 (gl_FUNC_GRANTPT): Use AC_LINK_IFELSE instead of
48016         AC_CHECK_FUNC.
48018 2018-05-13  Bruno Haible  <bruno@clisp.org>
48020         stdioext: Fix compilation errors with newer Android headers.
48021         * lib/stdio-impl.h (fp_, fp_ub): Define differently for Android.
48022         (__SLBF, __SNBF, __SRD, __SWR, __SRW, __SEOF, __SERR, __SOFF): Define
48023         fallbacks for Android.
48024         * lib/fpending.c: Update comments.
48025         * lib/fpurge.c: Likewise.
48026         * lib/freadable.h: Likewise.
48027         * lib/freadable.c: Likewise.
48028         * lib/freadahead.c: Likewise.
48029         * lib/freading.h: Likewise.
48030         * lib/freadptr.c: Likewise.
48031         * lib/fseterr.c: Likewise.
48032         * lib/fwritable.h: Likewise.
48033         * lib/fwritable.c: Likewise.
48034         * lib/fwriting.h: Likewise.
48035         * lib/fwriting.c: Likewise.
48037 2018-05-13  Bruno Haible  <bruno@clisp.org>
48039         doc: Add info about Android versions 2.0 to 8.1.
48040         * doc/**/*.texi: Add info about functions in all released versions of
48041         Bionic.
48043 2018-05-12  Bruno Haible  <bruno@clisp.org>
48045         fseeko: On mingw, don't use the hidden function _fseeki64.
48046         Reported by Eli Zaretskii <eliz@gnu.org>.
48047         * m4/fseeko.m4 (gl_PREREQ_FSEEKO): Test whether _fseeki64 is declared.
48048         * lib/fseeko.c (fseeko): Use _fseeki64 only if it is declared.
48050 2018-05-12  Bruno Haible  <bruno@clisp.org>
48052         glob: Choose 'dirent_type' in a way that works better on mingw.
48053         Reported and suggested by Eli Zaretskii <eliz@gnu.org>.
48054         * lib/glob.c (dirent_type): Define as uint_fast32_t.
48056 2018-05-12  Bruno Haible  <bruno@clisp.org>
48058         execute, spawn-pipe: Avoid warning about redefining 'close'.
48059         Reported by Eli Zaretskii <eliz@gnu.org>.
48060         * lib/execute.c: Undefine 'close' before redefining it.
48061         * lib/spawn-pipe.c: Likewise.
48063 2018-05-12  Bruno Haible  <bruno@clisp.org>
48065         nanosleep: Avoid test failure on mingw when it has nanosleep.
48066         Reported by Eli Zaretskii <eliz@gnu.org>.
48067         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check whether alarm() exists.
48068         If it does not exist, use a simpler test program that does not call
48069         alarm().
48071 2018-05-10  Bruno Haible  <bruno@clisp.org>
48073         lock, cond, thread, tls: Use a different symbol as libpthread witness.
48074         Reported by Devin Hussey <husseydevin@gmail.com>.
48075         Based on a patch by Paul Eggert.
48076         * lib/glthread/lock.h (pthread_in_use): Use 'pthread_mutexattr_gettype'
48077         as witness of libpthread.
48078         * lib/glthread/cond.h (pthread_in_use): Likewise.
48079         * lib/glthread/thread.h (pthread_in_use): Likewise.
48080         * lib/glthread/tls.h (pthread_in_use): Likewise.
48082 2018-05-10  Bruno Haible  <bruno@clisp.org>
48084         cond tests: Fix compilation error on Solaris.
48085         * tests/test-cond.c: Include <unistd.h> before defining 'yield' as a
48086         macro.
48088 2018-05-10  Bruno Haible  <bruno@clisp.org>
48090         doc: Add partial info about Android 4.3.
48091         * doc/*-functions/*.texi: Add info about functions that were added
48092         to Bionic between Android 4.3 and Android 9.0.
48094 2018-05-10  Bruno Haible  <bruno@clisp.org>
48096         doc: Add info about Android 9.0.
48097         * doc/**/*.texi: Add info about functions and headers in Bionic from
48098         Android 9.0.
48100 2018-05-09  Paul Eggert  <eggert@cs.ucla.edu>
48102         af_alg: fix my typo in afalg_buffer
48103         * lib/af_alg.c (afalg_buffer): Fix typo I recently introduced.
48104         (afalg_stream): Simplify and avoid the need for a runtime test
48105         at the end.
48107         af_alg: recover better from crypto failures
48108         * lib/af_alg.c (afalg_stream): Recover from crypto failures if the
48109         input stream is seekable, by repositioning the stream back to
48110         where it was, possibly by just calling sendfile with an offset
48111         arg.  This lets us return -EAFNOSUPPORT instead of -EIO in some
48112         cases, which lets our callers try again with user-mode code.
48113         * modules/crypto/af_alg (Depends-on): Depend on fseeko and ftello
48114         instead of on fflush and lseek.
48116         af_alg: distiguish I/O errors better
48117         * lib/af_alg.c (afalg_buffer, afalg_stream): Return -EAFNOSUPPORT,
48118         not -EIO, if it’s OK for the caller to try again with user-mode code.
48119         (afalg_stream) [!_WIN32 || __CYGWIN__]: Return -EIO (not possibly
48120         some other error number) if fflush fails, as the caller should not
48121         try again that case.
48123         af_alg: avoid gotos
48124         * lib/af_alg.c (afalg_buffer, afalg_stream): Rewrite to avoid
48125         gotos, as they were a source of unreliability and made the code a
48126         bit harder to follow.
48128         af_alg: don’t leak file descriptors into children
48129         * lib/af_alg.c (alg_socket): Use SOCK_CLOEXEC when creating sockets.
48130         This code should be compiled only on recent GNU/Linux platforms
48131         so we shouldn’t have to also depend on the accept4 module.
48133         af_alg: coalesce socket creation
48134         * lib/af_alg.c (alg_socket): New function.
48135         (afalg_buffer, afalg_stream): Use it.  This avoids some
48136         code duplication and gotos.
48138         af_alg: fix file descriptor leak
48139         * lib/af_alg.c (afalg_stream): Close leak.
48141         af_alg: Pacify --enable-gcc-warnings on GCC 8
48142         * lib/af_alg.c (afalg_buffer, afalg_stream): Reorder local decls
48143         and checking to pacify gcc -Wjump-misses-init on GCC 8.
48145 2018-05-07  Paul Eggert  <eggert@cs.ucla.edu>
48147         af_alg: Pacify --enable-gcc-warnings
48148         Problem reported by Assaf Gordon in:
48149         https://lists.gnu.org/r/bug-gnulib/2018-05/msg00041.html
48150         * lib/af_alg.c (afalg_buffer): Move local decls to pacify
48151         gcc -Wjump-misses-init.
48152         * lib/sha512.c (shaxxx_stream): Now static.
48154 2018-05-06  Bruno Haible  <bruno@clisp.org>
48156         af_alg: Add ability to use Linux kernel crypto API on data in memory.
48157         * lib/af_alg.h (afalg_buffer): New declaration.
48158         * lib/af_alg.c (afalg_buffer): New function.
48160 2018-05-06  Bruno Haible  <bruno@clisp.org>
48162         af_alg: Avoid warnings.
48163         * lib/af_alg.h (afalg_stream): Mark fallback declaration as inline.
48164         * m4/af_alg.m4 (gl_AF_ALG): Require AC_C_INLINE.
48166 2018-05-06  Bruno Haible  <bruno@clisp.org>
48168         crypto/{md5,sha1,sha256,sha512} tests: Add benchmarks.
48169         * tests/bench-digest.h: New file.
48170         * tests/bench-md5.c: New file.
48171         * tests/bench-sha1.c: New file.
48172         * tests/bench-sha224.c: New file.
48173         * tests/bench-sha256.c: New file.
48174         * tests/bench-sha384.c: New file.
48175         * tests/bench-sha512.c: New file.
48176         * modules/crypto/md5-tests (Files): Add tests/bench-md5.c,
48177         tests/bench-digest.h.
48178         (Depends-on): Add getrusage, gettimeofday.
48179         (Makefile.am): Add variables to build bench-md5.
48180         * modules/crypto/sha1-tests (Files): Add tests/bench-sha1.c,
48181         tests/bench-digest.h.
48182         (Depends-on): Add getrusage, gettimeofday.
48183         (Makefile.am): Add variables to build bench-sha1.
48184         * modules/crypto/sha256-tests (Files): Add tests/bench-sha224.c,
48185         tests/bench-sha256.c, tests/bench-digest.h.
48186         (Depends-on): Add getrusage, gettimeofday.
48187         (Makefile.am): Add variables to build bench-sha224, bench-sha256.
48188         * modules/crypto/sha512-tests (Files): Add tests/bench-sha384.c,
48189         tests/bench-sha512.c, tests/bench-digest.h.
48190         (Depends-on): Add getrusage, gettimeofday.
48191         (Makefile.am): Add variables to build bench-sha384, bench-sha512.
48193 2018-05-06  Bruno Haible  <bruno@clisp.org>
48195         af_alg: Fix a resource leak.
48196         * lib/af_alg.c (afalg_stream): Close socket before returning -EINVAL.
48197         New local variable 'result'.
48199 2018-05-06  Bruno Haible  <bruno@clisp.org>
48201         af_alg: Fix bug with streams that are not at position 0.
48202         * lib/af_alg.c (afalg_stream): Before sendfile, invoke fflush. Don't
48203         assume that the stream is positioned at position 0.
48204         * lib/af_alg.h (afalg_stream): Mention restriction regarding the state
48205         of the stream.
48206         * lib/md5.h (md5_stream): Likewise.
48207         * lib/sha1.h (sha1_stream): Likewise.
48208         * lib/sha256.h (sha256_stream, sha224_stream): Likewise.
48209         * lib/sha512.h (sha512_stream, sha384_stream): Likewise.
48210         * modules/crypto/af_alg (Depends-on): Add fflush, lseek.
48212         crypto/{md5,sha1,sha256,sha512} tests: Enhance test.
48213         * tests/test-digest.h (test_digest_on_files): Add a test with a FILE
48214         stream that is not positioned at the beginning.
48216 2018-05-06  Bruno Haible  <bruno@clisp.org>
48218         af_alg: Add configure option to enable/disable use of Linux crypto API.
48219         Suggested by Assaf Gordon <assafgordon@gmail.com>.
48220         * m4/af_alg.m4 (gl_AF_ALG): Add AC_ARG_WITH invocation. Define C macro
48221         USE_LINUX_CRYPTO_API.
48222         * lib/af_alg.h: Test USE_LINUX_CRYPTO_API, not HAVE_LINUX_IF_ALG_H.
48223         * lib/af_alg.c: Likewise.
48225 2018-05-06  Bruno Haible  <bruno@clisp.org>
48227         Followup to 'af_alg: New module.'.
48228         * modules/crypto/md5 (Depends-on): Remove sys_socket, sys_stat.
48229         * modules/crypto/sha1 (Depends-on): Likewise.
48230         * modules/crypto/sha256 (Depends-on): Likewise.
48231         * modules/crypto/sha512 (Depends-on): Likewise.
48233 2018-05-05  Paul Eggert  <eggert@cs.ucla.edu>
48235         crypto/{md5,sha1,sha256,sha512}: simplify
48236         * lib/md5.c (md5_stream):
48237         * lib/sha1.c (sha1_stream):
48238         * lib/sha256.c (shaxxx_stream):
48239         Simplify, partly by assuming C99.
48240         * lib/sha256.c (shaxxx_stream):
48241         New function, which implements both sha256 and sha224.
48242         Simplify, partly by assuming C99.
48243         (sha256_stream, sha224_stream):
48244         Use it to avoid code duplication, removing a FIXME.
48245         * lib/sha512.c (shaxxx_stream, sha512_stream, sha384_stream):
48246         Likewise.
48248         af_alg: Improve comments.
48249         * lib/af_alg.h: Use imperatives and tighten up wording.
48251 2018-05-05  Bruno Haible  <bruno@clisp.org>
48253         af_alg: Improve comments.
48254         * lib/af_alg.c (afalg_stream): Improve comment about kernel bug.
48256 2018-05-05  Bruno Haible  <bruno@clisp.org>
48258         af_alg: New module.
48259         * lib/af_alg.h: Test HAVE_* macro through '#if', not '#ifdef'.
48260         * lib/af_alg.c: Include "af_alg.h" before the other header files.
48261         * lib/md5.c: Include "af_alg.h" unconditionally.
48262         (md5_stream): Invoke afalg_stream unconditionally.
48263         * lib/sha1.c: Include "af_alg.h" unconditionally.
48264         (sha1_stream): Invoke afalg_stream unconditionally.
48265         * lib/sha256.c: Include "af_alg.h" unconditionally.
48266         (sha256_stream, sha224_stream): Invoke afalg_stream unconditionally.
48267         * lib/sha512.c: Include "af_alg.h" unconditionally.
48268         (sha512_stream, sha384_stream): Invoke afalg_stream unconditionally.
48269         * m4/af_alg.m4: Renamed from m4/linux-if-alg.m4.
48270         (gl_AF_ALG): Renamed from gl_LINUX_IF_ALG_H.
48271         * modules/crypto/af_alg: New file.
48272         * modules/crypto/md5 (Files): Remove files that are now in the
48273         'crypto/af_alg' module.
48274         (Depends-on): Add crypto/af_alg.
48275         (configure.ac): Remove gl_LINUX_IF_ALG_H invocation.
48276         (Makefile.am): Don't mention af_alg.c here.
48277         * modules/crypto/sha1 (Files): Remove files that are now in the
48278         'crypto/af_alg' module.
48279         (Depends-on): Add crypto/af_alg.
48280         (configure.ac): Remove gl_LINUX_IF_ALG_H invocation.
48281         (Makefile.am): Don't mention af_alg.c here.
48282         * modules/crypto/sha256 (Files): Remove files that are now in the
48283         'crypto/af_alg' module.
48284         (Depends-on): Add crypto/af_alg.
48285         (configure.ac): Remove gl_LINUX_IF_ALG_H invocation.
48286         (Makefile.am): Don't mention af_alg.c here.
48287         * modules/crypto/sha512 (Files): Remove files that are now in the
48288         'crypto/af_alg' module.
48289         (Depends-on): Add crypto/af_alg.
48290         (configure.ac): Remove gl_LINUX_IF_ALG_H invocation.
48291         (Makefile.am): Don't mention af_alg.c here.
48293 2018-05-05  Paul Eggert  <eggert@cs.ucla.edu>
48295         crypto tests: pacify GCC
48296         * tests/test-digest.h (test_digest_on_files):
48297         Don’t assume digest size fits in int (!).
48299         af_alg: minor style improvements
48300         * lib/af_alg.c (afalg_stream): Prefer C99 style
48301         decl-after-statement, since we’re already assuming C99.  Clarify
48302         by strengthening the bind test and omit unnecessary assignment.
48304 2018-05-05  Bruno Haible  <bruno@clisp.org>
48306         af_alg: Fix bug on empty files.
48307         * lib/af_alg.c (afalg_stream): Ignore the kernel's result if the input
48308         stream is empty.
48310 2018-05-05  Paul Eggert  <eggert@cs.ucla.edu>
48312         sys-limits.h: new file for crypto and safe I/O
48313         * lib/af_alg.c: Include sys-limits.h.
48314         (MAX_RW_COUNT): Remove.  Use replaced by SYS_BUFSIZE_MAX.
48315         (afalg_stream): Also reject negative sizes for sendfile; they
48316         should not happen and the code is a bit cleaner and faster this way.
48317         * lib/safe-read.c: Include sys-limits.h.
48318         (BUGGY_READ_MAXIMUM): Remove.  All uses replaced by SYS_BUFSIZE_MAX.
48319         * lib/sys-limits.h: New file, with values and commentary derived
48320         from the old safe-read.c and from GNU Emacs sysdep.c.
48321         * modules/crypto/md5, modules/crypto/sha1, modules/crypto/sha256:
48322         * modules/crypto/sha512, modules/safe-read, modules/safe-write:
48323         Add lib/sys-limits.h to Files section.
48325 2018-05-05  Bruno Haible  <bruno@clisp.org>
48327         af_alg: Improve function signature.
48328         * lib/af_alg.h (afalg_stream): Swap second and third argument.
48329         * lib/af_alg.c (afalg_stream): Likewise.
48330         * lib/md5.c, lib/sha1.c, lib/sha256.c, lib/sha512.c: Callers changed.
48332 2018-05-05  Bruno Haible  <bruno@clisp.org>
48334         crypto/{md5,sha1,sha256,sha512}: Fix compilation error (S_TYPEISTMO).
48335         * modules/crypto/md5 (Depends-on): Add 'sys_stat'.
48336         * modules/crypto/sha1 (Depends-on): Likewise.
48337         * modules/crypto/sha256 (Depends-on): Likewise.
48338         * modules/crypto/sha512 (Depends-on): Likewise.
48340 2018-05-05  Bruno Haible  <bruno@clisp.org>
48342         crypto/{md5,sha1,sha256,sha512}: Fix module description.
48343         * modules/crypto/md5 (Depends-on): Add 'sys_socket'.
48344         * modules/crypto/sha1 (Depends-on): Likewise.
48345         * modules/crypto/sha256 (Depends-on): Likewise.
48346         * modules/crypto/sha512 (Depends-on): Likewise.
48348 2018-05-05  Bruno Haible  <bruno@clisp.org>
48350         af_alg: Add documentation.
48351         * lib/af_alg.h: Add comments.
48353 2018-05-05  Bruno Haible  <bruno@clisp.org>
48355         sha512: Add tests.
48356         * tests/test-sha512.c: New file.
48357         * modules/crypto/sha512-tests: New file.
48359 2018-05-05  Bruno Haible  <bruno@clisp.org>
48361         sha256: Add tests.
48362         * tests/test-sha256.c: New file.
48363         * modules/crypto/sha256-tests: New file.
48365 2018-05-05  Bruno Haible  <bruno@clisp.org>
48367         sha1 tests: Add test for sha1_stream.
48368         * tests/test-sha1.c: Include test-digest.h.
48369         (main): Invoke test_digest_on_files on 'sha1_stream'.
48370         * modules/crypto/sha1-tests (Files): Add tests/test-digest.h.
48372 2018-05-05  Bruno Haible  <bruno@clisp.org>
48374         md5 tests: Add test for md5_stream.
48375         * tests/test-digest.h: New file.
48376         * tests/test-md5.c: Include test-digest.h.
48377         (main): Invoke test_digest_on_files on 'md5_stream'.
48378         * modules/crypto/md5-tests (Files): Add tests/test-digest.h.
48380 2018-04-28  Matteo Croce  <mcroce@redhat.com>
48382         md5sum: Use AF_ALG when available.
48383         * lib/md5.c: Include af_alg.h.
48384         (md5_stream): Use afalg_stream when available.
48385         * modules/crypto/md5 (Files): Add the af_alg files.
48386         (configure.ac): Invoke gl_LINUX_IF_ALG_H.
48387         (Makefile.am): Add af_alg.c.
48389 2018-04-28  Matteo Croce  <mcroce@redhat.com>
48391         sha512sum: Use AF_ALG when available.
48392         * lib/sha512.c: Include af_alg.h.
48393         (sha512_stream, sha384_stream): Use afalg_stream when available.
48394         * modules/crypto/sha512 (Files): Add the af_alg files.
48395         (configure.ac): Invoke gl_LINUX_IF_ALG_H.
48396         (Makefile.am): Add af_alg.c.
48398 2018-04-28  Matteo Croce  <mcroce@redhat.com>
48400         sha256sum: Use AF_ALG when available.
48401         * lib/sha256.c: Include af_alg.h.
48402         (sha256_stream, sha224_stream): Use afalg_stream when available.
48403         * modules/crypto/sha256 (Files): Add the af_alg files.
48404         (configure.ac): Invoke gl_LINUX_IF_ALG_H.
48405         (Makefile.am): Add af_alg.c.
48407 2018-04-28  Matteo Croce  <mcroce@redhat.com>
48409         sha1sum: Use AF_ALG when available.
48410         * lib/af_alg.h: New file.
48411         * lib/af_alg.c: New file.
48412         * lib/sha1.c: Include af_alg.h.
48413         (sha1_stream): Use afalg_stream when available.
48414         * m4/linux-if-alg.m4: New file.
48415         * modules/crypto/sha1 (Files): Add the new files.
48416         (configure.ac): Invoke gl_LINUX_IF_ALG_H.
48417         (Makefile.am): Add af_alg.c.
48419 2018-05-05  Bruno Haible  <bruno@clisp.org>
48421         all: Replace more http URLs by https URLs.
48422         * lib/localename.c: Use https: URL.
48423         * lib/timespec.h: Likewise.
48425 2018-05-03  Paul Eggert  <eggert@cs.ucla.edu>
48427         maint: port more modules to GCC 8
48428         * lib/dirname.h (base_name):
48429         * lib/exclude.h (new_exclude):
48430         * lib/xstrndup.h (xstrndup):
48431         Add malloc attribute.
48432         * lib/readutmp.c: Pacify GCC 8 about safe use of strncpy.
48433         * lib/sig-handler.h (get_handler) [SA_SIGINFO]: Simplify.
48434         This pacifies GCC 8.
48435         * m4/gnulib-common.m4 (gl_COMMON_BODY):
48436         Define _GL_ATTRIBUTE_MALLOC here.  All other definitions removed.
48438 2018-05-03  Bruno Haible  <bruno@clisp.org>
48440         Simplify code. Drop support for Borland C++ on Windows.
48441         Reported by Gisle Vanem <gisle.vanem@gmail.com>.
48442         * lib/accept4.c: Simplify 'defined _WIN32 || defined __WIN32__' to just
48443         'defined _WIN32'.
48444         * lib/canonicalize-lgpl.c: Likewise.
48445         * lib/classpath.c: Likewise.
48446         * lib/clean-temp.c: Likewise.
48447         * lib/csharpexec.c: Likewise.
48448         * lib/ctime.c: Likewise.
48449         * lib/dosname.h: Likewise.
48450         * lib/dup2.c: Likewise.
48451         * lib/errno.in.h: Likewise.
48452         * lib/error.c: Likewise.
48453         * lib/euidaccess.c: Likewise.
48454         * lib/execute.c: Likewise.
48455         * lib/fcntl.in.h: Likewise.
48456         * lib/fcntl.c: Likewise.
48457         * lib/filename.h: Likewise.
48458         * lib/findprog.c: Likewise.
48459         * lib/flock.c: Likewise.
48460         * lib/fopen.c: Likewise.
48461         * lib/freopen.c: Likewise.
48462         * lib/fstat.c: Likewise.
48463         * lib/fsync.c: Likewise.
48464         * lib/gc-gnulib.c: Likewise.
48465         * lib/get-rusage-data.c: Likewise.
48466         * lib/getaddrinfo.c: Likewise.
48467         * lib/getdelim.c: Likewise.
48468         * lib/getdtablesize.c: Likewise.
48469         * lib/gethostname.c: Likewise.
48470         * lib/getlogin.c: Likewise.
48471         * lib/getlogin_r.c: Likewise.
48472         * lib/getopt.c: Likewise.
48473         * lib/getpagesize.c: Likewise.
48474         * lib/getpass.c: Likewise.
48475         * lib/getrusage.c: Likewise.
48476         * lib/gettimeofday.c: Likewise.
48477         * lib/glob.c: Likewise.
48478         * lib/inttypes.in.h: Likewise.
48479         * lib/isapipe.c: Likewise.
48480         * lib/javaexec.c: Likewise.
48481         * lib/link.c: Likewise.
48482         * lib/localcharset.c: Likewise.
48483         * lib/localename.h: Likewise.
48484         * lib/localename.c: Likewise.
48485         * lib/localtime.c: Likewise.
48486         * lib/lseek.c: Likewise.
48487         * lib/mbsinit.c: Likewise.
48488         * lib/mkdir.c: Likewise.
48489         * lib/msvc-nothrow.h: Likewise.
48490         * lib/nanosleep.c: Likewise.
48491         * lib/nl_langinfo.c: Likewise.
48492         * lib/nonblocking.c: Likewise.
48493         * lib/nproc.c: Likewise.
48494         * lib/open.c: Likewise.
48495         * lib/openpty.c: Likewise.
48496         * lib/pathmax.h: Likewise.
48497         * lib/pipe-filter-aux.c: Likewise.
48498         * lib/pipe-filter-gi.c: Likewise.
48499         * lib/pipe-filter-ii.c: Likewise.
48500         * lib/pipe.c: Likewise.
48501         * lib/pipe2.c: Likewise.
48502         * lib/poll.c: Likewise.
48503         * lib/popen.c: Likewise.
48504         * lib/posix_openpt.c: Likewise.
48505         * lib/printf-parse.c: Likewise.
48506         * lib/progreloc.c: Likewise.
48507         * lib/putenv.c: Likewise.
48508         * lib/read.c: Likewise.
48509         * lib/relocatable.c: Likewise.
48510         * lib/rename.c: Likewise.
48511         * lib/same-inode.h: Likewise.
48512         * lib/secure_getenv.c: Likewise.
48513         * lib/select.c: Likewise.
48514         * lib/sethostname.c: Likewise.
48515         * lib/setlocale.c: Likewise.
48516         * lib/sigaction.c: Likewise.
48517         * lib/sigprocmask.c: Likewise.
48518         * lib/sleep.c: Likewise.
48519         * lib/spawn-pipe.h: Likewise.
48520         * lib/spawn-pipe.c: Likewise.
48521         * lib/spawni.c: Likewise.
48522         * lib/stat-time.h: Likewise.
48523         * lib/stat-w32.c: Likewise.
48524         * lib/stat.c: Likewise.
48525         * lib/stdio.in.h: Likewise.
48526         * lib/stdio-impl.h: Likewise.
48527         * lib/stdio-read.c: Likewise.
48528         * lib/stdio-write.c: Likewise.
48529         * lib/stdlib.in.h: Likewise.
48530         * lib/strerror_r.c: Likewise.
48531         * lib/strftime-fixes.c: Likewise.
48532         * lib/sys_stat.in.h: Likewise.
48533         * lib/sys_types.in.h: Likewise.
48534         * lib/sys_wait.in.h : Likewise.
48535         * lib/system-quote.h: Likewise.
48536         * lib/system-quote.c: Likewise.
48537         * lib/tmpdir.c: Likewise.
48538         * lib/tzset.c: Likewise.
48539         * lib/uname.c: Likewise.
48540         * lib/unistd.in.h: Likewise.
48541         * lib/utime.in.h: Likewise.
48542         * lib/utime.c: Likewise.
48543         * lib/utimecmp.c: Likewise.
48544         * lib/utimens.c: Likewise.
48545         * lib/vasnprintf.c: Likewise.
48546         * lib/vma-iter.h: Likewise.
48547         * lib/vma-iter.c: Likewise.
48548         * lib/wait-process.c: Likewise.
48549         * lib/wcsftime.c: Likewise.
48550         * lib/wctype.in.h: Likewise.
48551         * lib/write.c: Likewise.
48552         * tests/nap.h: Likewise.
48553         * tests/test-cloexec.c: Likewise.
48554         * tests/test-dup-safer.c: Likewise.
48555         * tests/test-dup2.c: Likewise.
48556         * tests/test-dup3.c: Likewise.
48557         * tests/test-fcntl.c: Likewise.
48558         * tests/test-get-rusage-data.c: Likewise.
48559         * tests/test-getaddrinfo.c: Likewise.
48560         * tests/test-getlogin.h: Likewise.
48561         * tests/test-isatty.c: Likewise.
48562         * tests/test-localename.c: Likewise.
48563         * tests/test-mbrtowc-w32.c: Likewise.
48564         * tests/test-nonblocking.c: Likewise.
48565         * tests/test-nonblocking-pipe-main.c: Likewise.
48566         * tests/test-nonblocking-socket-main.c: Likewise.
48567         * tests/test-nonblocking-socket.h: Likewise.
48568         * tests/test-pipe.c: Likewise.
48569         * tests/test-pipe2.c: Likewise.
48570         * tests/test-poll.c: Likewise.
48571         * tests/test-pthread_sigmask1.c: Likewise.
48572         * tests/test-select.h: Likewise.
48573         * tests/test-sethostname2.c: Likewise.
48574         * tests/test-sigprocmask.c: Likewise.
48575         * tests/test-spawn-pipe-child.c: Likewise.
48576         * tests/test-stat-time.c: Likewise.
48577         * tests/test-system-quote-main.c: Likewise.
48578         * tests/test-utimens-common.h: Likewise.
48579         * tests/test-wcrtomb-w32.c: Likewise.
48580         * m4/csharpexec.m4 (gt_CSHARPEXEC): Likewise.
48581         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Likewise.
48582         * m4/javacomp.m4 (gt_JAVACOMP): Likewise.
48583         * m4/javaexec.m4 (gt_JAVAEXEC): Likewise.
48584         * m4/locale-ar.m4 (gt_LOCALE_AR): Likewise.
48585         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Likewise.
48586         * m4/locale-ja.m4 (gt_LOCALE_JA): Likewise.
48587         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise.
48588         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
48589         * m4/malloc.m4 (gl_CHECK_MALLOC_POSIX): Likewise.
48590         * m4/nocrash.m4 (GL_NOCRASH): Likewise.
48591         * m4/pathmax.m4 (gl_PATHMAX_SNIPPET): Likewise.
48592         * m4/ptsname_r.m4 (gl_PREREQ_PTSNAME_R): Likewise.
48593         * m4/stdio_h.m4 (gl_STDIO_H): Likewise.
48594         * m4/tmpfile.m4 (gl_FUNC_TMPFILE): Likewise.
48595         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
48597 2018-05-02  Bruno Haible  <bruno@clisp.org>
48599         localename: Fix test failures on mingw.
48600         * lib/localename.c (gl_locale_name_thread): Remove code specific to
48601         native Windows.
48602         (gl_locale_name_posix): Move code specific to native Windows here.
48603         * tests/test-localename.c (test_locale_name, test_locale_name_posix):
48604         Accept result without charset suffix, as it appears on mingw.
48606 2018-04-28  Paul Smith  <psmith@gnu.org>
48608         bootstrap: Avoid gnulib operations if not needed
48609         * build-aux/bootstrap: Remove unused variable gnulib_mk.
48610         Set $gnulib_extra_files early so it can be overridden in .conf.
48611         Remove redundant --import flag from $gnulib_tool_options.
48612         Set $use_gnulib to false if no gnulib modules or files are needed.
48613         If $use_gnulib is false, don't do anything related to gnulib.
48614         A lot of this is just whitespace (indentation) changes.
48616 2018-04-27  Paul Eggert  <eggert@cs.ucla.edu>
48618         manywarnings: port to GCC 8.0
48619         * build-aux/gcc-warning.spec: Add -Wcatch-value,
48620         -Wclass-memaccess, -Wdo-subscript, -Wextra-semi.  Adjust to the
48621         fact that the GCC help message now mentions operands for
48622         -Warray-bounds, -Wformat, -Wformat-overflow, -Wformat-truncation,
48623         -Wimplicit-fallthrough, -Wplacement-new, -Wshift-overflow,
48624         -Wstrict-aliasing, -Wstrict-overflow, -Wstringop-overflow,
48625         and -Wunused-const-variable.
48626         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -Wattribute-alias,
48627         -Wcast-align=strict, -Wcast-function-type, -Wif-not-aligned,
48628         -Wmissing-attributes, -Wmultistatement-macros,
48629         -Wpacked-not-aligned, -Wsizeof-pointer-div, -Wstringop-truncation,
48630         -Wsuggest-attribute=cold, -Wsuggest-attribute=malloc.
48632 2018-04-24  Bruno Haible  <bruno@clisp.org>
48634         sys_socket: Make SO_REUSEPORT available across platforms.
48635         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
48636         * lib/sys_socket.in.h (SO_REUSEPORT): New macro.
48637         * doc/posix-headers/sys_socket.texi: Mention the issue.
48638         * tests/test-poll.c (SO_REUSEPORT): Remove.
48639         * tests/test-select.h: Include <sys/socket.h>.
48640         (SO_REUSEPORT): Remove.
48641         * modules/select-tests (Depends-on): Add 'sys_socket'.
48643 2018-04-21  Benno Schulenberg  <bensberg@telfort.nl>  (tiny change)
48645         localcharset: short-circuit the search for an alias on a Mac
48646         * lib/localcharset.c (get_charset_aliases): Add a tautological
48647         UTF-8 entry to speed up the search for this case.
48648         Most machines default to a UTF-8 locale nowadays, so begin the
48649         list of aliases with a dummy UTF-8 entry so it will be found
48650         immediately and a time-consuming search through the rest of
48651         the list is avoided.
48653 2018-04-11  Paul Eggert  <eggert@cs.ucla.edu>
48655         fts: add comment
48656         * lib/fts.c (fts_build): Explain why ==, not >.
48657         See remark by Bernhard Voelker in:
48658         https://lists.gnu.org/r/bug-gnulib/2018-04/msg00041.html
48660         fts: fix bug in find across filesystems
48661         This fixes a bug I introduced last summer.
48662         Problem reported by Kamil Dudka in:
48663         https://lists.gnu.org/r/bug-gnulib/2018-04/msg00033.html
48664         * lib/fts.c (filesystem_type, dirent_inode_sort_may_be_useful)
48665         (leaf_optimization):
48666         New arg for file descriptor.  All callers changed.
48667         (fts_build): Check for whether inodes should be sorted
48668         before closing the directory.
48670 2018-04-07  Bruno Haible  <bruno@clisp.org>
48672         unicase/u*-context: Fix link errors with libunistring <= 0.9.9.
48673         Reported by Genki Sky <sky@genki.is>.
48674         * modules/unicase/u8-prefix-context (configure.ac): Require libunistring
48675         version 0.9.10 or newer.
48676         * modules/unicase/u8-suffix-context (configure.ac): Likewise.
48677         * modules/unicase/u16-prefix-context (configure.ac): Likewise.
48678         * modules/unicase/u16-suffix-context (configure.ac): Likewise.
48679         * modules/unicase/u32-prefix-context (configure.ac): Likewise.
48680         * modules/unicase/u32-suffix-context (configure.ac): Likewise.
48682 2018-04-07  Bruno Haible  <bruno@clisp.org>
48684         execute: Update comment.
48685         * lib/execute.h (execute): Refer to spawn-pipe.h, not pipe.h.
48687 2018-04-05  Paul Eggert  <eggert@cs.ucla.edu>
48689         fts: treat CIFS like NFS
48690         Problem reported by Kamil Dudka in:
48691         https://lists.gnu.org/r/bug-gnulib/2018-04/msg00015.html
48692         * lib/fts.c (S_MAGIC_CIFS): New macro.
48693         (dirent_inode_sort_may_be_useful, leaf_optimization):
48694         Treat CIFS like NFS.
48696 2018-03-28  Bruno Haible  <bruno@clisp.org>
48698         c-stack: Fix possible build failure on some platforms.
48699         * lib/c-stack.c (die): Define whenever this function is referenced.
48701 2018-03-28  Paul Eggert  <eggert@cs.ucla.edu>
48703         time_rz: fix workaround for Mac OS X 10.6 infloop
48704         Problems reported by Charles A. Roelli (Bug#27736#117).
48705         * m4/time_rz.m4 (gl_TIME_RZ): Use a slightly different timestamp.
48706         Also, discard output, which clutters the 'configure' log.
48708 2018-03-27  Paul Eggert  <eggert@cs.ucla.edu>
48710         havelib: port to Solaris 10 /bin/sh
48711         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Use 'test ! EXPR'
48712         instead of '! test EXPR'.
48714 2018-03-26  Paul Eggert  <eggert@cs.ucla.edu>
48716         time_rz: work around Mac OS X 10.6 infloop
48717         * doc/posix-functions/localtime.texi:
48718         * doc/posix-functions/localtime_r.texi: Mention the bug.
48719         * lib/time_rz.c (localtime_rz): Work around the bug.  It’d be
48720         better to fix localtime and localtime_r instead, but that would be
48721         more work and is not needed to fix the Emacs problem.
48722         * m4/time_rz.m4 (gl_TIME_RZ): Detect the bug.
48724 2018-03-24  Jim Meyering  <meyering@fb.com>
48726         test-version-etc.sh: don't use diff directly: use init.sh's compare
48727         We'd rather not sacrifice readable "diff -u" output even for
48728         "diff -c" output (not supported by busybox) or for even less
48729         readable ed-style "diff" output.  So use init.sh's compare function
48730         * tests/test-version-etc.sh: Source init.sh and add "." to path.
48731         Remove "./" from invocation of test-version-etc, so we use path.
48732         And s/diff/compare/.
48733         * modules/version-etc-tests (Depends-on): Add test-framework-sh,
48734         to get init.sh.
48735         Prompted by Eric Blake's comments in
48736         https://lists.gnu.org/r/sed-devel/2018-03/msg00015.html
48738 2018-03-24  Bruno Haible  <bruno@clisp.org>
48740         javacomp-script, javacomp: Add support for Java 10.
48741         * m4/javacomp.m4 (gt_JAVACOMP): Accept source-version 10 and
48742         target-version 10.
48743         * lib/javaversion.h: Update comments.
48744         * lib/javacomp.c (default_target_version, SOURCE_VERSION_BOUND,
48745         source_version_index, get_goodcode_snippet, get_failcode_snippet,
48746         TARGET_VERSION_BOUND, target_version_index,
48747         corresponding_classfile_version): Accept source_version 10 and
48748         target_version 10.
48749         * lib/javacomp.h: Update comments accordingly.
48751 2018-03-24  Bruno Haible  <bruno@clisp.org>
48753         javacomp-script, javacomp: Update comments.
48754         * m4/javacomp.m4: Update comments regarding gcj.
48755         * lib/javacomp.h: Likewise.
48757 2018-03-24  Bruno Haible  <bruno@clisp.org>
48759         javacomp-script, javacomp: Fix support for Java 7, 8, 9.
48760         * lib/javaversion.h: Update comments.
48761         * lib/javacomp.h: Likewise.
48762         * lib/javacomp.c (default_target_version, source_version_index,
48763         get_goodcode_snippet, get_failcode_snippet): Recognize "9" instead of
48764         "1.9".
48765         (TARGET_VERSION_BOUND): Bump to 9.
48766         (target_version_index, corresponding_classfile_version): Recognize "9"
48767         instead of "1.9".
48768         (get_source_version_for_javac): New function.
48769         (is_envjavac_nongcj_usable, is_javac_usable): Add
48770         source_version_for_javac argument.
48771         (compile_java_class): Determine and pass source_version_for_javac.
48772         * m4/javacomp.m4: Recognize version '9' instead of '1.9'. When invoking
48773         $JAVAC or javac, pass '-source 1.6' instead of '-source 1.5' when
48774         appropriate.
48776 2018-03-23  Jim Meyering  <meyering@fb.com>
48778         test-version-etc.sh: port to diff without -c
48779         * tests/test-version-etc.sh: Don't use diff's -c option.
48780         This caused spurious test failure on Alpine Linux, which
48781         uses busybox's diff. Reported by Assaf Gordon in
48782         https://lists.gnu.org/r/sed-devel/2018-03/msg00013.html
48784 2018-03-23  Paul Eggert  <eggert@cs.ucla.edu>
48786         c-stack: port to recent GCC build
48787         Problem reported by The Fireplace (Bug#30913).
48788         * lib/c-stack.c (die): Define only if used.
48790 2018-03-20  Bruno Haible  <bruno@clisp.org>
48792         euidaccess: Port to native Windows.
48793         * lib/euidaccess.c (euidaccess): On native Windows, just use _access().
48794         * posix-modules (exclude_for_mingw): Remove 'euidaccess'.
48796 2018-03-19  Bruno Haible  <bruno@clisp.org>
48798         javacomp: Add support for Java 7, 8, 9.
48799         * lib/javacomp.c (default_target_version, SOURCE_VERSION_BOUND,
48800         source_version_index, get_goodcode_snippet, get_failcode_snippet,
48801         corresponding_classfile_version): Accept source_version 1,7, 1.8, 1.9
48802         and target_version 1,7, 1.8, 1.9.
48803         * lib/javacomp.h: Update comments accordingly.
48805 2018-03-19  Bruno Haible  <bruno@clisp.org>
48807         javacomp-script: Add support for Java 9.
48808         * m4/javacomp.m4 (gt_JAVACOMP): Accept source-version 1.9 and
48809         target-version 1.9.
48811 2018-03-16  Bruno Haible  <bruno@clisp.org>
48813         glob: Don't compile replacements on recent glibc systems.
48814         * lib/glob.in.h: Use the usual idiom for the double-inclusion guard. If
48815         REPLACE_GLOB is 0, include the system's <glob.h> and use
48816         _GL_CXXALIAS_SYS.
48817         * m4/glob.m4 (gl_GLOB): Set REPLACE_GLOB instead of GLOB_H. Accept
48818         _GNU_GLOB_INTERFACE_VERSION 2 as well. Delete the file conf$$-globtest
48819         inside the AC_RUN_IFELSE block. Remove GL_GENERATE_GLOB_H conditional.
48820         * modules/glob (Dependencies): Test REPLACE_GLOB instead of GLOB_H.
48821         Remove snippet/warn-on-use.
48822         (configure.ac): Test REPLACE_GLOB instead of GLOB_H.
48823         (Makefile.am): Create glob.h always. Update list of substitutions in
48824         glob.h. Don't depend on $(WARN_ON_USE_H).
48826 2018-03-16  Bruno Haible  <bruno@clisp.org>
48828         glob: Fix link error on native Windows.
48829         * modules/glob (Depends-on): Add 'lstat'.
48831 2018-03-15  Bruno Haible  <bruno@clisp.org>
48833         glob: Fix compilation error in C++ mode.
48834         * lib/glob.in.h (_Restrict_): Define, like in regex.h and spawn.in.h.
48836 2018-03-15  Bruno Haible  <bruno@clisp.org>
48838         host-cpu-c-abi: Support for RISC-V CPU.
48839         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Recognize the various
48840         riscv32 and riscv64 ABIs.
48841         References:
48842         https://github.com/riscv/riscv-toolchain-conventions
48843         https://gcc.gnu.org/onlinedocs/gcc-7.3.0/gcc/RISC-V-Options.html
48844         https://gnu-mcu-eclipse.github.io/toolchain/riscv/
48846 2018-03-08  Paul Eggert  <eggert@cs.ucla.edu>
48848         fflush: be more paranoid about libio.h change
48849         Suggested by Eli Zaretskii in:
48850         https://lists.gnu.org/r/emacs-devel/2018-03/msg00270.html
48851         * lib/fbufmode.c (fbufmode):
48852         * lib/fflush.c (clear_ungetc_buffer_preserving_position)
48853         (disable_seek_optimization, rpl_fflush):
48854         * lib/fpending.c (__fpending):
48855         * lib/fpurge.c (fpurge):
48856         * lib/freadable.c (freadable):
48857         * lib/freadahead.c (freadahead):
48858         * lib/freading.c (freading):
48859         * lib/freadptr.c (freadptr):
48860         * lib/freadseek.c (freadptrinc):
48861         * lib/fseeko.c (fseeko):
48862         * lib/fseterr.c (fseterr):
48863         * lib/fwritable.c (fwritable):
48864         * lib/fwriting.c (fwriting):
48865         Look at _IO_ftrylockfile as well as at _IO_EOF_SEEN.
48867 2018-03-07  Paul Eggert  <eggert@cs.ucla.edu>
48869         maint: write-file-hooks -> before-save-hook
48870         write-file-hooks is obsolete since Emacs 22.1 (released June 2007) and
48871         it's time to use the recommended replacement.
48872         Problem reported by Glenn Morris in:
48873         https://lists.gnu.org/r/bug-gnulib/2018-03/msg00008.html
48874         * build-aux/announce-gen, build-aux/bootstrap:
48875         * build-aux/do-release-commit-and-tag, build-aux/gendocs.sh:
48876         * build-aux/git-version-gen, build-aux/gitlog-to-changelog:
48877         * build-aux/gnu-web-doc-update, build-aux/gnupload:
48878         * build-aux/move-if-change, build-aux/prefix-gnulib-mk:
48879         * build-aux/update-copyright, build-aux/useless-if-before-free:
48880         * build-aux/vc-list-files:
48881         Update hook usage for files where Gnulib is the canonical source.
48883 2018-03-05  Paul Eggert  <eggert@cs.ucla.edu>
48885         binary-io: pacify gcc -Wunused-parameter
48886         Problem reported by Reuben Thomas in:
48887         https://lists.gnu.org/r/bug-gnulib/2018-03/msg00005.html
48888         * lib/binary-io.h (__gl_setmode, __gl_setmode_check):
48889         Use _GL_UNUSED where appropriate.
48891         fflush: adjust to glibc 2.28 libio.h removal
48892         Problem reported by Daniel P. Berrangé in:
48893         https://lists.gnu.org/r/bug-gnulib/2018-03/msg00000.html
48894         * lib/fbufmode.c (fbufmode):
48895         * lib/fflush.c (clear_ungetc_buffer_preserving_position)
48896         (disable_seek_optimization, rpl_fflush):
48897         * lib/fpending.c (__fpending):
48898         * lib/fpurge.c (fpurge):
48899         * lib/freadable.c (freadable):
48900         * lib/freadahead.c (freadahead):
48901         * lib/freading.c (freading):
48902         * lib/freadptr.c (freadptr):
48903         * lib/freadseek.c (freadptrinc):
48904         * lib/fseeko.c (fseeko):
48905         * lib/fseterr.c (fseterr):
48906         * lib/fwritable.c (fwritable):
48907         * lib/fwriting.c (fwriting):
48908         Check _IO_EOF_SEEN instead of _IO_ftrylockfile.
48909         * lib/stdio-impl.h (_IO_IN_BACKUP) [_IO_EOF_SEEN]:
48910         Define if not already defined.
48912 2018-02-27  Paul Eggert  <eggert@cs.ucla.edu>
48914         environ: fix link error on 32-bit Cygwin
48915         Problem reported for GNU Emacs by Ken Brown in:
48916         https://lists.gnu.org/r/emacs-devel/2018-02/msg00765.html
48917         * lib/unistd.in.h (environ) [__i386__]: Do not redeclare.
48919 2018-02-24  Bruno Haible  <bruno@clisp.org>
48921         mbrtowc tests: Fix regression on glibc.
48922         Reported by Bernhard Voelker.
48923         * tests/test-mbrtowc.c (main): Fix expected value of wc.
48925 2018-02-24  Bruno Haible  <bruno@clisp.org>
48927         striconveha, uniconv/*: Avoid test failures on musl libc.
48928         * tests/iconvsupport.c: New file.
48929         * tests/test-striconveha.c (main): Skip autodetect_jp tests if iconv()
48930         does not support the ISO-2022-JP-2 encoding.
48931         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
48932         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
48933         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
48934         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
48935         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
48936         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
48937         * modules/striconveha-tests (Files): Add tests/iconvsupport.c.
48938         (Makefile.am): Link test-striconveha with iconvsupport.o.
48939         * modules/uniconv/u8-conv-from-enc-tests (Files): Add
48940         tests/iconvsupport.c.
48941         (Makefile.am): Link test-u8-conv-from-enc with iconvsupport.o.
48942         * modules/uniconv/u8-strconv-from-enc-tests (Files): Add
48943         tests/iconvsupport.c.
48944         (Makefile.am): Link test-u8-strconv-from-enc with iconvsupport.o.
48945         * modules/uniconv/u16-conv-from-enc-tests (Files): Add
48946         tests/iconvsupport.c.
48947         (Makefile.am): Link test-u16-conv-from-enc with iconvsupport.o.
48948         * modules/uniconv/u16-strconv-from-enc-tests (Files): Add
48949         tests/iconvsupport.c.
48950         (Makefile.am): Link test-u16-strconv-from-enc with iconvsupport.o.
48951         * modules/uniconv/u32-conv-from-enc-tests (Files): Add
48952         tests/iconvsupport.c.
48953         (Makefile.am): Link test-u32-conv-from-enc with iconvsupport.o.
48954         * modules/uniconv/u32-strconv-from-enc-tests (Files): Add
48955         tests/iconvsupport.c.
48956         (Makefile.am): Link test-u32-strconv-from-enc with iconvsupport.o.
48958 2018-02-24  Bruno Haible  <bruno@clisp.org>
48960         localename: Add support for musl libc.
48961         * m4/localename.m4 (gl_LOCALENAME): Check for <langinfo.h>.
48962         * lib/localename.c (gl_locale_name_thread_unsafe): Use NL_LOCALE_NAME
48963         on Linux platforms which define NL_LOCALE_NAME.
48965 2018-02-24  Bruno Haible  <bruno@clisp.org>
48967         mbrtowc tests: Don't make assumptions about the charset the C locale.
48968         * tests/test-mbrtowc.c (main): For bytes >= 0x80, don't assume a
48969         particular mapping in the C locale.
48971 2018-02-24  Bruno Haible  <bruno@clisp.org>
48973         ptsname_r: Don't expect that this function sets errno.
48974         * tests/test-ptsname_r.c (test_errors): Don't test errno after return
48975         from ptsname_r().
48976         * doc/glibc-functions/ptsname_r.texi: Mention the issue.
48978 2018-02-23  Bruno Haible  <bruno@clisp.org>
48980         xmalloca: pacify gcc -Wbad-function-cast
48981         * lib/xmalloca.h (xmalloca): Insert intermediate cast here as well.
48983 2018-02-23  Paul Eggert  <eggert@cs.ucla.edu>
48985         nl_langinfo: pacify gcc -Wunused-function
48986         * lib/nl_langinfo.c (ctype_codeset): Do not define if
48987         REPLACE_NL_LANGINFO && !GNULIB_defined_CODESET, as it is unused in
48988         this case.  Without this change, I got a diagnostic when building
48989         coreutils on Fedora 27 with gcc 7.3.1 20180130.
48991         same: pacify gcc -Wunused-variable
48992         * lib/same.c (same_nameat) [!CHECK_TRUNCATION]:
48993         Omit unused variable.
48995         malloca: pacify gcc -Wbad-function-cast
48996         * lib/malloca.h (malloca): Pacify gcc -Wbad-function-cast
48997         diagnostic that I got on Fedora 27 with gcc 7.3.1 20180130.
48998         To pacify GCC, I had to cast alloca’s result to some type other
48999         than void * before casting that to uintptr_t.
49001 2018-02-20  Paul Eggert  <eggert@cs.ucla.edu>
49003         utimecmp: new function utimecmpat
49004         * lib/utimecmp.c: Include fcntl.h, sys/stat.h and dirname.h.
49005         Do not include utimens.h.
49006         (utimecmpat): New function, generalizing utimecmp.
49007         (utimecmp): Now a thin layer around utimecmpat.
49008         * modules/utimecmp (Depends-on): Depend on dirname-lgpl, fstatat,
49009         utimensat instead of on lstat and utimens.
49011         same: new function same_nameat
49012         * lib/same.c: Include fcntl.h.
49013         * lib/same.c (same_nameat): New function, generalizing same_name.
49014         (same_name): Now a thin layer around same_nameat.
49015         * m4/same.m4 (gl_SAME): Check for fpathconf, not pathconf.
49016         * modules/same (Depends-on): Depend on fstatat, openat.
49018 2018-02-18  Eric Gallager  <egall@gwmail.gwu.edu>  (tiny change)
49020         warnings: Add support for Objective C.
49021         * m4/warnings.m4 (gl_UNKNOWN_WARNINGS_ARE_ERRORS(Objective C)): New
49022         macro.
49024 2018-02-17  Bruno Haible  <bruno@clisp.org>
49026         lock: Fix test-once1 crash on FreeBSD11.
49027         * lib/glthread/lock.h: On FreeBSD, test the weak value of the symbol
49028         'pthread_create', not 'pthread_cancel'.
49030 2018-02-17  Bruno Haible  <bruno@clisp.org>
49032         lock: Add test of gl_once.
49033         * tests/test-once.c: New file.
49034         * modules/lock-tests (Files): Add it.
49035         (Makefile.am): Build and test programs 'test-once1' and 'test-once2'.
49037 2018-02-17  Bruno Haible  <bruno@clisp.org>
49039         thread: Fix compilation error on IRIX.
49040         * lib/glthread/thread.h: Include <unistd.h>. Include <signal.h> when
49041         needed; include it outside the C++ extern "C" {} block.
49042         * doc/posix-headers/pthread.texi: Mention the problem with
49043         pthread_atfork on IRIX.
49045 2018-02-04  Bruno Haible  <bruno@clisp.org>
49047         nl_langinfo: Override the system's nl_langinfo() when needed.
49048         Reported by Jim Meyering.
49049         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Set REPLACE_NL_LANGINFO=1
49050         also when HAVE_LANGINFO_T_FMT_AMPM or HAVE_LANGINFO_ALTMON is 0.
49052 2018-02-04  Bruno Haible  <bruno@clisp.org>
49054         signal-h, monetary, strings: Fix build failure in some cases.
49055         Reported by Tim Rühsen <tim.ruehsen@gmx.de>.
49056         * modules/signal-h (Makefile.am): In the GNULIB_* substitutions, use '/'
49057         as delimiter in sed command, not '|'.
49058         * modules/monetary (Makefile.am): Likewise.
49059         * modules/strings (Makefile.am): Likewise.
49061 2018-02-03  Jim Meyering  <meyering@fb.com>
49063         maint.mk: exempt "/proc/filesystems" from "file system" syntax check
49064         * top/maint.mk (sc_file_system): Don't complain about
49065         "/proc/filesystems".
49067 2018-02-03  Bruno Haible  <bruno@clisp.org>
49069         stdlib: Fix compilation error on OpenIndiana.
49070         * lib/stdlib.in.h: Before including <sys/loadavg.h>, include
49071         <sys/time.h>.
49072         * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
49073         * m4/getloadavg.m4 (gl_GETLOADAVG): Likewise.
49075 2018-02-03  Bruno Haible  <bruno@clisp.org>
49077         host-cpu-c-abi: Avoid use of 'grep -E' on OpenIndiana.
49078         * m4/asm-underscore.m4 (gl_ASM_SYMBOL_PREFIX): Require AC_PROG_EGREP,
49079         and use $EGREP instead of 'grep -E'.
49080         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Use 'grep' instead of
49081         'grep -E'.
49083 2018-02-02  Paul Eggert  <eggert@cs.ucla.edu>
49085         malloca: Add a compile-time verification.
49086         * lib/malloca.c (small_t): Verify that it is wide enough.
49087         * modules/malloca (Depends-on): Add verify.
49089 2018-02-02  Bruno Haible  <bruno@clisp.org>
49091         malloca: Add an argument check.
49092         Suggested by Paul Eggert.
49093         * lib/malloca.c (freea): Check against an invalid argument.
49095 2018-02-02  Bruno Haible  <bruno@clisp.org>
49097         localename: Add support for OpenIndiana.
49098         * lib/localename.c (gl_locale_name_thread_unsafe): Add code for
49099         Solaris 11 variants with uselocale() but without getlocalename_l().
49101 2018-02-02  Bruno Haible  <bruno@clisp.org>
49103         malloca, xmalloca: Make multithread-safe.
49104         Reported by Florian Weimer <fweimer@redhat.com>.
49105         Implements an idea by Ondřej Bílka <neleai@seznam.cz>.
49106         * lib/malloca.h (malloca): In the stack allocation case, return a
49107         pointer that is a multiple of 2 * sa_alignment_max.
49108         (sa_increment): Remove enum item.
49109         * lib/xmalloca.h (xmalloca): In the stack allocation case, return
49110         a pointer that is a multiple of 2 * sa_alignment_max.
49111         * lib/malloca.c (NO_SANITIZE_MEMORY): Remove macro.
49112         (MAGIC_NUMBER, MAGIC_SIZE, preliminary_header, HEADER_SIZE, header,
49113         HASH_TABLE_SIZE, mmalloca_results): Remove.
49114         (small_t): New type.
49115         (mmalloca, free): Rewritten.
49116         * lib/malloca.valgrind: Remove file.
49117         * modules/malloca (Files): Remove it.
49118         (Depends-on): Remove verify.
49120 2018-01-31  Bruno Haible  <bruno@clisp.org>
49122         environ: Fix link error on 64-bit Cygwin.
49123         * lib/unistd.in.h (environ): On Cygwin, redeclare with the
49124         __declspec(dllimport) attribute.
49125         * doc/posix-functions/environ.texi: Mention the Cygwin problem.
49127 2018-01-30  Bruno Haible  <bruno@clisp.org>
49129         get-rusage-data: Add support for Minix 3.
49130         * lib/get-rusage-data.c (get_rusage_data): Return 0 on Minix.
49132 2018-01-30  Bruno Haible  <bruno@clisp.org>
49134         vma-iter: Add support for Minix 3.
49135         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define on Minix.
49136         * lib/vma-iter.c: On Minix, read /proc/<pid>/map.
49138 2018-01-27  Bruno Haible  <bruno@clisp.org>
49140         Fix malfunction of socket functions on HP-UX in 64-bit mode.
49141         * m4/socketlib.m4 (gl_SOCKETLIB): Add comment.
49142         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Define
49143         _HPUX_ALT_XOPEN_SOCKET_API.
49144         * modules/accept (Depends-on): Add 'extensions'.
49145         * modules/getpeername (Depends-on): Likewise.
49146         * modules/getsockname (Depends-on): Likewise.
49147         * modules/getsockopt (Depends-on): Likewise.
49148         * modules/recvfrom (Depends-on): Likewise.
49149         * doc/posix-functions/accept.texi: Mention the HP-UX socklen_t problem.
49150         * doc/posix-functions/getpeername.texi: Likewise.
49151         * doc/posix-functions/getsockname.texi: Likewise.
49152         * doc/posix-functions/getsockopt.texi: Likewise.
49153         * doc/posix-functions/recvfrom.texi: Likewise.
49155 2018-01-27  Bruno Haible  <bruno@clisp.org>
49157         getsockname tests: More tests.
49158         * tests/test-getsockname.c (open_server_socket): New function, mostly
49159         copied from test-poll.c.
49160         (main): Check that getsockname fills in addr.
49161         * modules/getsockname-tests (Depends-on): Add the necessary
49162         dependencies.
49163         (test_getsockname_LDADD): Link with $(INET_PTON_LIB).
49165 2018-01-26  Paul Eggert  <eggert@cs.ucla.edu>
49167         manywarnings: fix maintainer comment
49168         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Fix comment so that
49169         it does not mistakenly think that ‘-1)’ is an option.
49171 2018-01-26  Bruno Haible  <bruno@clisp.org>
49173         langinfo: Fix last commit.
49174         Reported by Tim Rühsen <tim.ruehsen@gmx.de>.
49175         * modules/langinfo (Makefile.am): Substitute HAVE_LANGINFO_ALTMON.
49177 2018-01-24  Bruno Haible  <bruno@clisp.org>
49179         langinfo, nl_langinfo: Add support for alternative month names.
49180         * m4/langinfo_h.m4 (gl_LANGINFO_H): Define HAVE_LANGINFO_ALTMON.
49181         * lib/langinfo.in.h (ALTMON_1...ALTMON_12): New macros.
49182         * lib/nl_langinfo.c (rpl_nl_langinfo): Treat ALTMON_i like MON_i.
49183         * tests/test-nl_langinfo.c (main): Test ALTMON_*.
49184         * doc/posix-headers/langinfo.texi: Document support of ALTMON_*.
49185         * doc/posix-functions/nl_langinfo.texi: Likewise.
49187 2018-01-23  Paul Eggert  <eggert@cs.ucla.edu>
49189         Merge strftime.c changes from glibc
49190         This incorporates:
49191         2017-11-14 [BZ #10871] Implement alternative month names
49192         2017-11-14 [BZ #10871] Abbreviated alternative month names (%Ob)
49193         2017-06-20 Use locale_t, not __locale_t, throughout glibc
49194         * lib/nstrftime.c (ABALTMON_1) [!COMPILE_WIDE]: New macro.
49195         (LOCALE_PARAM) [_LIBC && USE_IN_EXTENDED_LOCALE_MODEL]:
49196         Use locale_t, not __locale_t.
49197         (a_altmonth, f_altmonth, aam_len) [_NL_CURRENT]: New macros.
49198         (__strftime_internal): Add support for alternate months.
49200 2018-01-23  Bruno Haible  <bruno@clisp.org>
49202         doc: Mention another prerequisite for using Gnulib.
49203         Reported at <https://stackoverflow.com/questions/48378214/>.
49204         * doc/gnulib-tool.texi (Initial import): Mention requirement to use
49205         AC_CONFIG_HEADERS.
49207 2018-01-22  Mathieu Lirzin  <mthl@gnu.org>
49209         build: GuixSD doesn't have /bin/bash
49210         * Makefile (SHELL): Search 'bash' in the PATH environment variable.
49212 2018-01-21  Bruno Haible  <bruno@clisp.org>
49214         Avoid test failures on Microsoft Windows Subsystem for Linux.
49215         * tests/test-fcntl.c (main): Allow a different errno.
49216         * tests/test-rename.h (test_rename): Likewise.
49217         * tests/test-renameat.c (main): Likewise.
49218         * tests/test-renameat2.c (main): Likewise.
49220 2018-01-14  Paul Eggert  <eggert@cs.ucla.edu>
49222         filenamecat: make base a suffix of result
49223         * lib/filenamecat-lgpl.c (longest_relative_suffix): Remove.
49224         (mfile_name_concat): Always make BASE a suffix of the result, as
49225         cp expects this.  To implement this, separate with '.' instead of
49226         '/' in some rare cases.  Clarify spec to say ./BASE not BASE.
49227         * tests/test-filenamecat.c (main): Adjust tests to match
49228         current behavior.  Check that BASE_IN_RESULT points to
49229         a copy of BASE and is a suffix of the resultk, and that DIR
49230         is a prefix of the result that is no longer than the prefix
49231         indicated by BASE_IN_RESULT.
49233 2018-01-04  Mathieu Lirzin  <mthl@gnu.org>
49235         update-copyright: Handle use of ©
49236         * build-aux/update-copyright ($circle_c_re): Update regex to
49237         handle use of © in headers.
49239 2018-01-04  Tim Rühsen  <tim.ruehsen@gmx.de>
49241         Fix -Wundef warning in user-included header lib/cdefs.h.
49242         * lib/cdefs.h: Check if defined before using __USE_FORTIFY_LEVEL.
49244 2018-01-04  Bruno Haible  <bruno@clisp.org>
49246         pthread_sigmask: Avoid compilation error on mingw.
49247         Reported by Tim Rühsen <tim.ruehsen@gmx.de>.
49248         * lib/signal.in.h (pthread_sigmask): Don't declare it it's defined as a
49249         macro.
49251 2018-01-03  Paul Eggert  <eggert@cs.ucla.edu>
49253         test-framework-sh: ‘ps -ef’, not ‘ps ef’
49254         * tests/init.sh (rand_bytes_): Put ‘-’ before new-style ps options.
49255         Suggested by Bob Proulx (Bug#29968).
49256         * build-aux/mktempd (rand_bytes): Make it like tests/init.sh.
49258 2018-01-02  Eric Blake  <eblake@redhat.com>
49260         stat-time: silence -Wunused-parameter regression
49261         * lib/stat-time.h (get_stat_birthtime_ns, get_stat_birthtime):
49262         Prefer attribute over cast-to-void.
49263         (stat_time_normalize): Mark st as potentially unused.
49265 2018-01-02  Paul Eggert  <eggert@cs.ucla.edu>
49267         test-framework-sh: avoid netstat
49268         Problem reported by Kristýna Streitová (Bug#29947).
49269         * tests/init.sh (rand_bytes_): Stop using netstat, as it's
49270         deprecated on SuSE and it's not that important anyway.
49272 2018-01-01  Jim Meyering  <meyering@fb.com>
49274         update-copyright: add code to handle more special cases
49275         After running "make update-copyright" this year, five files
49276         required additional manual changes.  Automate those adjustments
49277         for next year.
49278         * Makefile (_year_and_prev): Define.
49279         (update-copyright): Add perl commands to induce this year's post-
49280         update-copyright adjustments.
49282 2018-01-01  Paul Eggert  <eggert@cs.ucla.edu>
49284         version-etc: new year
49285         * build-aux/gendocs.sh (version):
49286         * doc/gendocs_template:
49287         * doc/gendocs_template_min:
49288         * doc/gnulib.texi:
49289         * lib/version-etc.c (COPYRIGHT_YEAR):
49290         Update copyright dates by hand in templates and the like.
49292         maint: fix 'make update-copyright'
49293         * Makefile (update-copyright): Adjust to 2016-11-23 change
49294         to config/srclist-update, which changed the format of srclist.txt.
49296 2017-12-30  Paul Eggert  <eggert@cs.ucla.edu>
49298         chdir-safer: remove this module
49299         * MODULES.html.sh (func_all_modules): Remove chdir-safer.
49300         * NEWS: Document removal.
49301         * lib/chdir-safer.c, lib/chdir-safer.h, m4/afs.m4, m4/chdir-safer.m4:
49302         * modules/chdir-safer: Remove these files.
49304 2017-12-29  Samuel Thibault  <samuel.thibault@gnu.org>
49306         Add cross-compilation results for GNU/Hurd.
49307         * m4/calloc.m4: Add GNU/Hurd guess.
49308         * m4/cbrtl.m4: Likewise.
49309         * m4/ceil.m4: Likewise.
49310         * m4/ceilf.m4: Likewise.
49311         * m4/ceill.m4: Likewise.
49312         * m4/chown.m4: Likewise.
49313         * m4/duplocale.m4: Likewise.
49314         * m4/exp2l.m4: Likewise.
49315         * m4/expm1.m4: Likewise.
49316         * m4/fchdir.m4: Likewise.
49317         * m4/floor.m4: Likewise.
49318         * m4/floorf.m4: Likewise.
49319         * m4/fmod.m4: Likewise.
49320         * m4/fmodf.m4: Likewise.
49321         * m4/fmodl.m4: Likewise.
49322         * m4/getcwd.m4: Likewise.
49323         * m4/getgroups.m4: Likewise.
49324         * m4/gettimeofday.m4: Likewise.
49325         * m4/hypot.m4: Likewise.
49326         * m4/hypotf.m4: Likewise.
49327         * m4/hypotl.m4: Likewise.
49328         * m4/link-follow.m4: Likewise.
49329         * m4/link.m4: Likewise.
49330         * m4/linkat.m4: Likewise.
49331         * m4/log.m4: Likewise.
49332         * m4/log10.m4: Likewise.
49333         * m4/log10f.m4: Likewise.
49334         * m4/log1p.m4: Likewise.
49335         * m4/log1pf.m4: Likewise.
49336         * m4/log1pl.m4: Likewise.
49337         * m4/log2.m4: Likewise.
49338         * m4/log2f.m4: Likewise.
49339         * m4/logf.m4: Likewise.
49340         * m4/lstat.m4: Likewise.
49341         * m4/malloc.m4: Likewise.
49342         * m4/mbrlen.m4: Likewise.
49343         * m4/mbrtowc.m4: Likewise.
49344         * m4/mkdir.m4: Likewise.
49345         * m4/mkfifo.m4: Likewise.
49346         * m4/mknod.m4: Likewise.
49347         * m4/mkstemp.m4: Likewise.
49348         * m4/modf.m4: Likewise.
49349         * m4/modff.m4: Likewise.
49350         * m4/modfl.m4: Likewise.
49351         * m4/printf.m4: Likewise.
49352         * m4/pselect.m4: Likewise.
49353         * m4/ptsname.m4: Likewise.
49354         * m4/putenv.m4: Likewise.
49355         * m4/readlink.m4: Likewise.
49356         * m4/realloc.m4: Likewise.
49357         * m4/remainder.m4: Likewise.
49358         * m4/remainderf.m4: Likewise.
49359         * m4/remainderl.m4: Likewise.
49360         * m4/rmdir.m4: Likewise.
49361         * m4/round.m4: Likewise.
49362         * m4/roundf.m4: Likewise.
49363         * m4/roundl.m4: Likewise.
49364         * m4/select.m4: Likewise.
49365         * m4/setenv.m4: Likewise.
49366         * m4/signbit.m4: Likewise.
49367         * m4/sleep.m4: Likewise.
49368         * m4/stat.m4: Likewise.
49369         * m4/strerror.m4: Likewise.
49370         * m4/strtok_r.m4: Likewise.
49371         * m4/symlink.m4: Likewise.
49372         * m4/symlinkat.m4: Likewise.
49373         * m4/trunc.m4: Likewise.
49374         * m4/truncf.m4: Likewise.
49375         * m4/truncl.m4: Likewise.
49376         * m4/tzset.m4: Likewise.
49377         * m4/ungetc.m4: Likewise.
49378         * m4/usleep.m4: Likewise.
49379         * m4/wcwidth.m4: Likewise.
49381 2017-12-28  Bruno Haible  <bruno@clisp.org>
49383         gnulib-tool: Make --conditional-dependencies work better.
49384         Reported by Dmitry Selyutin <ghostman.sd@gmail.com>.
49385         * gnulib-tool (Options): Don't reject the combination of
49386         --conditional-dependencies with --with-tests.
49387         (func_emit_autoconf_snippets): Add argument referenceable_modules.
49388         Don't reference $modules.
49389         (func_import, func_create_testdir): Pass it.
49391 2017-12-19  Paul Eggert  <eggert@cs.ucla.edu>
49393         regex: use re_malloc etc. consistently
49394         Problem and original patch reported by Arnold Robbins in:
49395         https://sourceware.org/ml/libc-alpha/2017-12/msg00241.html
49396         * lib/regcomp.c (re_comp):
49397         * lib/regexec.c (push_fail_stack, build_trtable, match_ctx_clean):
49398         Use re_malloc/re_realloc/re_free instead of malloc/realloc/free.
49400 2017-12-15  Tim Rühsen  <tim.ruehsen@gmx.de>
49401             Paul Eggert  <eggert@cs.ucla.edu>
49403         glob: Silence warning about void pointer arithmetic.
49404         * lib/glob.c (glob): Use a 'char *', not a 'void *', in pointer
49405         arithmetic.
49407 2017-12-15  Bruno Haible  <bruno@clisp.org>
49409         spawn-pipe: Silence a clang warning.
49410         Reported by Tim Rühsen <tim.ruehsen@gmx.de>.
49411         * lib/spawn-pipe.c: Disable clang -Wconditional-uninitialized warnings
49412         in this file.
49414 2017-12-12  Paul Eggert  <eggert@cs.ucla.edu>
49416         explicit_bzero: port to macOS + Clang 9.0.0
49417         Problem reported by Marcus Johnson (Bug#29658).
49418         * lib/explicit_bzero.c (explicit_bzero) [__clang__]:
49419         Don’t use asm.
49421 2017-12-11  Reuben Thomas  <rrt@sc3d.org>
49423         doc: Improve explanation of supporting relocatable libraries.
49424         * doc/relocatable-maint.texi (Supporting Relocation): Explain
49425         properly how to build the relocatable module for
49426         libraries. (Method and example code from Bruno Haible.)
49428 2017-12-11  Reuben Thomas  <rrt@sc3d.org>
49430         doc: Use better texinfo tags in a few cases.
49431         * doc/gnulib.texi (Extending Gnulib): Use @option or @command
49432         instead of @samp in a few places.
49434 2017-12-11  Bruno Haible  <bruno@clisp.org>
49436         unistr/base: Update comment.
49437         * lib/unistr.in.h: Update comment about u*_mbtouc_unsafe functions.
49439 2017-12-10  Pádraig Brady  <P@draigBrady.com>
49441         test-faccessat.c: unlink temp file to avoid subsequent test failure
49442         * tests/test-faccessat.c: Remove the file to avoid failure
49443         to open the file on subsequent runs due to being created
49444         with no permissions.
49446 2017-12-10  Bruno Haible  <bruno@clisp.org>
49448         doc: New sect. "Modifying the build rules of a Gnulib import directory".
49449         * doc/gnulib-tool.texi (Modified build rules): New node.
49451 2017-12-10  Bruno Haible  <bruno@clisp.org>
49453         doc: Tweak wording.
49454         * doc/gnulib-tool.texi (Multiple instances): Talk about "programs", not
49455         "binaries".
49457 2017-12-05  Sam Steingold  <sds@gnu.org>
49458             Bruno Haible  <bruno@clisp.org>
49460         no-c++: Avoid "egrep: repetition-operator operand invalid" error.
49461         * m4/no-c++.m4 (gt_NO_CXX): Don't use '+' characters nor spaces in the
49462         AC_EGREP_CPP pattern.
49464 2017-12-03  Bruno Haible  <bruno@clisp.org>
49466         all: Replace more http URLs by https URLs.
49467         * lib/sm3.h, lib/sm3.c, tests/test-sm3.c: Use https: URL.
49468         * lib/unigbrk/u-grapheme-breaks.h: Likewise.
49469         * lib/unigbrk/uc-grapheme-breaks.c: Likewise.
49470         * tests/unigbrk/test-uc-grapheme-breaks.c: Likewise.
49472 2017-11-28  Paul Eggert  <eggert@cs.ucla.edu>
49474         Port better to CentOS 5
49475         Problems reported by Tom G. Christensen in:
49476         https://lists.gnu.org/r/bug-gnulib/2017-11/msg00053.html
49477         * doc/glibc-functions/strverscmp.texi (strverscmp):
49478         Document strverscmp bug with glibc 2.9 and earlier.
49479         * doc/posix-functions/tzset.texi (tzset):
49480         Document that TZ with angle brackets is POSIX-2001 and later.
49481         * tests/test-nstrftime.c: Include unistd.h.
49482         (TZ_ANGLE_BRACKETS_SHOULD_WORK): New macro.
49483         (TZ): Use it to skip tests with angle brackets in TZ,
49484         for older systems.
49486         stat: add missing module dependencies
49487         * modules/lstat, modules/stat, modules/utimensat (Depends-on):
49488         Add stat-time.
49490 2017-11-28  Benno Schulenberg  <bensberg@telfort.nl>
49492         stat: fix compilation failure on macOS Sierra
49493         Reported by Marius Schamschula <mschamschula@gmail.com> in:
49494         https://savannah.gnu.org/bugs/?52546
49495         * lib/stat.c: Add missing include of stat-time.h.
49497 2017-11-28  Jim Meyering  <meyering@fb.com>
49499         test-faccessat.c: correct BASE definition to avoid parallel test failure
49500         * tests/test-faccessat.c (BASE): Define using this file's name, not
49501         that of test-lstat.c.  Using the latter caused this test to fail
49502         sometimes when run concurrently with test-lstat.
49504 2017-11-27  Daiki Ueno  <ueno@gnu.org>
49506         unicase: fix VPATH build
49507         * modules/unicase/special-casing (Makefile.am): Ensure that the
49508         base directory is created when generating
49509         unicase/special-casing.h.
49511 2017-11-27  Daiki Ueno  <ueno@gnu.org>
49513         libunistring: update to Unicode 9.0.0
49514         * lib/gen-uni-tables.c (fill_properties): Recognize
49515         Sentence_Terminal and Prepended_Concatenation_Mark.
49516         (is_property_default_ignorable_code_point): Exclude U+08E2.
49517         (fill_arabicshaping): Allow missing whitespace when parsing;
49518         recognize "AFRICAN FEH", "AFRICAN QAF", and "AFRICAN MOON".
49519         (output_blocks): Increase the element size of the level1 table to
49520         accommodate more blocks.
49521         (get_lbp): Recognize ZWJ, E_Base, and E_Modifier characters;
49522         Update each class according to the standard.
49523         (get_wbp): Recognize ZWJ, E_Base, E_Modifier, Glue_After_Zwj, and
49524         E_Base_GAZ characters.
49525         (output_gbp_table): Recognize ZWJ, E_Base, E_Modifier,
49526         Glue_After_Zwj, and E_Base_GAZ characters.
49527         * lib/unictype.in.h (UC_JOINING_GROUP_AFRICAN_FEH)
49528         (UC_JOINING_GROUP_AFRICAN_QAF, UC_JOINING_GROUP_AFRICAN_MOON): New
49529         enum value.
49530         * lib/unilbrk/lbrktables.h (LBP_ZWJ, LBP_EB, LBP_EM): New enum
49531         value.
49532         * lib/unilbrk/lbrktables.c (unilbrk_table): Extend the table with
49533         LBP_ZWJ, LBP_EB, and LBP_EM.
49534         * lib/uniwbrk.in.h (WBP_ZWJ, WBP_EB, WBP_EM, WBP_GAZ, WBP_EBG): New
49535         enum value.
49536         * lib/uniwbrk/u-wordbreaks.h: Implement WB3c, WB15, and WB16.
49537         * lib/uniwbrk/wbrktable.h (uniwbrk_prop_index): New variable
49538         declaration.
49539         * lib/uniwbrk/wbrktable.c (uniwbrk_prop_index): New variable.
49540         (uniwbrk_table): Implement WB14.
49541         * tests/uniwbrk/test-uc-wordbreaks.c (wordbreakproperty_to_string):
49542         Check WBP_ZWJ, WBP_EB, WBP_EM, WBP_GAZ, and WBP_EBG.
49543         * modules/unigbrk/u{32,16,8}-grapheme-breaks: No longer depend on
49544         uc-is-grapheme-break.
49545         * modules/unigbrk/uc-grapheme-breaks: New module.
49546         * modules/unigbrk/uc-grapheme-breaks-tests: New module.
49547         * lib/unigbrk.in.h (GBP_ZWJ, GBP_EB, GBP_EM, GBP_GAZ, GBP_EBG): New
49548         enum value.
49549         (uc_grapheme_breaks): New function, replacing uc_is_grapheme_break.
49550         * lib/unigbrk/u-grapheme-breaks.h: New file.
49551         * lib/unigbrk/u{32,16,8}-grapheme-breaks.c: Rewrite using
49552         u-grapheme-breaks.h instead of uc_is_grapheme_break.
49553         * lib/unigbrk/uc-grapheme-breaks.c: New file.
49554         * lib/unigbrk/uc-is-grapheme-break.c: Partially update to TR29 rev
49555         29.
49556         * tests/unigbrk/test-uc-gbrk-prop.c
49557         (graphemebreakproperty_to_string): Check GBP_ZWJ, GBP_EB, GBP_EM,
49558         GBP_GAZ, and GBP_EBG.
49559         * tests/unigbrk/test-uc-grapheme-breaks.c: New test.
49560         * tests/unigbrk/test-uc-is-grapheme-break.c
49561         (graphemebreakproperty_to_string): Check GBP_ZWJ, GBP_EB, GBP_EM,
49562         GBP_GAZ, and GBP_EBG.
49563         (main): Skip unsupported rules involving 3 or more characters,
49564         namely GB10, GB12, and GB13.
49565         * lib/uniwidth/width.c (nonspacing_table_data): Update.
49566         * all generated files under lib/uni* and tests/uni*: Regenerate.
49567         * all the affected modules: Bump version.
49569 2017-11-26  Bruno Haible  <bruno@clisp.org>
49571         strfmon_l: Fix compilation error with glibc 2.5.
49572         Reported by Tom G. Christensen <tgc@jupiterrise.com>
49573         in <https://lists.gnu.org/r/bug-gnulib/2017-11/msg00051.html>.
49574         * lib/monetary.in.h: Include also <locale.h>.
49576 2017-11-24  Paul Eggert  <eggert@cs.ucla.edu>
49578         posixtm: remove PDS_LEADING_YEAR
49579         This changes the API slightly, in a hopefully-innocuous way.
49580         Without this change the code had undefined behavior when a
49581         caller specified neither PDS_LEADING_YEAR nor PDS_TRAILING_YEAR.
49582         Problem reported by Pádraig Brady in:
49583         https://lists.gnu.org/r/bug-gnulib/2017-11/msg00048.html
49584         * NEWS: Mention this.
49585         * lib/posixtm.c (posix_time_parse): Treat the absence of
49586         PDS_TRAILING_YEAR as if PDS_LEADING_YEAR were present.
49587         * lib/posixtm.h (PDS_LEADING_YEAR): Remove (actually, leave it
49588         present, but define it as zero, for compatibility with existing
49589         source code).  All other PDS_* values moved up.
49590         * tests/test-posixtm.c (LY): New macro.
49591         (T): Use it.  Do not expect a particular numeric encoding
49592         for PDS_CENTURY etc.
49594 2017-11-23  Paul Eggert  <eggert@cs.ucla.edu>
49596         stat: work around Solaris bug with tv_nsec < 0
49597         * doc/posix-functions/fstat.texi (fstat):
49598         * doc/posix-functions/fstatat.texi (fstatat):
49599         * doc/posix-functions/lstat.texi (lstat):
49600         * doc/posix-functions/stat.texi (stat):
49601         Mention Solaris 11 bug.
49602         * lib/fstat.c, lib/fstatat.c, lib/lstat.c: Include stat-time.h.
49603         * lib/fstat.c (rpl_fstat) [!WINDOWS_NATIVE]:
49604         * lib/lstat.c (rpl_lstat):
49605         * lib/stat.c (rpl_stat):
49606         Normalize resulting timestamps.
49607         * lib/fstatat.c (normal_fstatat): New function.
49608         (rpl_fstatat): Use it.
49609         * lib/stat-time.h: Include intprops.h, errno.h, stddef.h.
49610         (stat_time_normalize): New function.
49611         * m4/fstat.m4 (gl_FUNC_FSTAT):
49612         * m4/fstatat.m4 (gl_FUNC_FSTATAT):
49613         * m4/lstat.m4 (gl_FUNC_LSTAT):
49614         * m4/stat.m4 (gl_FUNC_STAT):
49615         Replace on Solaris.
49616         * modules/fstat (Depends-on):
49617         * modules/fstatat (Depends-on):
49618         Add stat-time.
49619         * modules/stat-time (Depends-on): Add errno, intprops.
49621 2017-11-22  Paul Eggert  <eggert@cs.ucla.edu>
49623         regex: merge from glibc
49624         * lib/regcomp.c (init_word_char): Add comments.
49626 2017-11-20  Paul Eggert  <eggert@cs.ucla.edu>
49628         regex: merge from glibc
49629         * lib/regcomp.c (__regcomp, __regfree) [_LIBC]: Now hidden.
49630         * lib/regex_internal.h (internal_function): Remove.
49631         All uses removed.
49633 2017-11-20  Bruno Haible  <bruno@clisp.org>
49635         crypto/gc-sm3: Fix buffer overrun.
49636         * lib/gc-gnulib.c (MAX_DIGEST_SIZE): Bump to 32.
49637         Reported by Coverity.
49639 2017-11-12  Jim Meyering  <meyering@fb.com>
49641         maint: shorten https://lists.gnu.org/archive/html/... links
49642         Each /archive/html/ part can be replace with /r/.
49643         Run this to induce the change:
49644         git grep -l archive/html|xargs perl -pi -e 's,/archive/html/,/r/,g'
49645         * ChangeLog: Perform that substitution.
49646         * Makefile: Likewise.
49647         * STATUS-libposix: Likewise.
49648         * build-aux/bootstrap: Likewise.
49649         * doc/maintain.texi: Likewise.
49650         * gnulib-tool: Likewise.
49651         * lib/allocator.h: Likewise.
49652         * lib/argp-ba.c: Likewise.
49653         * lib/argp-pv.c: Likewise.
49654         * lib/canon-host.c: Likewise.
49655         * lib/canonicalize-lgpl.c: Likewise.
49656         * lib/float.in.h: Likewise.
49657         * lib/fstat.c: Likewise.
49658         * lib/getdelim.c: Likewise.
49659         * lib/getprogname.c: Likewise.
49660         * lib/glthread/thread.h: Likewise.
49661         * lib/intprops.h: Likewise.
49662         * lib/mbsrtowcs-state.c: Likewise.
49663         * lib/safe-read.c: Likewise.
49664         * lib/signal.in.h: Likewise.
49665         * lib/stat.c: Likewise.
49666         * lib/stdbool.in.h: Likewise.
49667         * lib/stdio-impl.h: Likewise.
49668         * lib/stdio.in.h: Likewise.
49669         * lib/sysexits.in.h: Likewise.
49670         * lib/timespec.h: Likewise.
49671         * lib/wcsrtombs-state.c: Likewise.
49672         * m4/alloca.m4: Likewise.
49673         * m4/extern-inline.m4: Likewise.
49674         * m4/fstatat.m4: Likewise.
49675         * m4/gnulib-common.m4: Likewise.
49676         * m4/lib-ignore.m4: Likewise.
49677         * m4/printf.m4: Likewise.
49678         * m4/regex.m4: Likewise.
49679         * m4/stat-size.m4: Likewise.
49680         * m4/std-gnu11.m4: Likewise.
49681         * m4/stdbool.m4: Likewise.
49682         * m4/sys_types_h.m4: Likewise.
49683         * m4/threadlib.m4: Likewise.
49684         * m4/vararrays.m4: Likewise.
49685         * pygnulib/GLImport.py: Likewise.
49686         * tests/test-exp.h: Likewise.
49687         * tests/test-exp2.h: Likewise.
49688         * tests/test-expm1.h: Likewise.
49689         * tests/test-fflush2.c: Likewise.
49690         * tests/test-getopt_long.h: Likewise.
49691         * tests/test-intprops.c: Likewise.
49692         * tests/test-log.h: Likewise.
49693         * tests/test-log10.h: Likewise.
49694         * tests/test-log1p.h: Likewise.
49695         * tests/test-log2.h: Likewise.
49696         * tests/test-printf-posix.h: Likewise.
49697         * tests/test-regex.c: Likewise.
49698         * tests/test-snprintf-posix.h: Likewise.
49699         * tests/test-sprintf-posix.h: Likewise.
49700         * tests/test-stdalign.c: Likewise.
49701         * tests/test-stdbool.c: Likewise.
49702         * tests/test-vasnprintf-posix.c: Likewise.
49703         * tests/test-vasprintf-posix.c: Likewise.
49704         * top/maint.mk: Likewise.
49706 2017-11-12  Bruno Haible  <bruno@clisp.org>
49708         faccessat: Make the last change more robust.
49709         * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Require
49710         gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK. Treat "guessing yes" like "yes".
49712 2017-11-11  Paul Eggert  <eggert@cs.ucla.edu>
49714         faccessat: port to macOS (Bug#29231)
49715         macOS faccessat has the same bug that lstat does: if the file
49716         name ends in '/' it ignores the trailing slash.
49717         Problem reported for Emacs by Vincent Zhang.
49718         * doc/posix-functions/faccessat.texi (faccessat): Document this.
49719         * lib/faccessat.c (_GL_INCLUDING_UNISTD_H): Define and undef
49720         around the initial includes.  Include errno.h, string.h, sys/stat.h.
49721         (orig_faccessat) [HAVE_FACCESSAT]: New function.
49722         Include "unistd.h" after defining it.
49723         (rpl_faccessat) [HAVE_FACCESSAT]: New implementation.
49724         * lib/unistd.in.h (faccessat) [REPLACE_FACCESSAT]:
49725         Handle in the usual way.
49726         * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Replace faccessat if
49727         lstat dereferences symlinks, since faccessat is likely to
49728         have the same problem.
49729         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Default REPLACE_ACCESSAT.
49730         * modules/faccessat (Depends-on): Add fstatat.
49731         Depend if REPLACE_FACCESSAT is 1, too.
49732         (configure.ac): Link if REPLACE_FACCESSAT is 1.
49733         * modules/faccessat-tests (Depends-on): Add symlink.
49734         * modules/unistd (unistd.h): Substitute REPLACE_FACCESSAT.
49735         * tests/test-faccessat.c (main): Test for the bug.
49737 2017-11-11  Bruno Haible  <bruno@clisp.org>
49739         getprogname: Fix compilation error on IRIX.
49740         * lib/getprogname.c (getprogname) [__sgi]: Fix type of local variable
49741         'namesize'.
49743 2017-11-11  Bruno Haible  <bruno@clisp.org>
49745         year2038: Tweak last patch.
49746         * m4/year2038.m4 (gl_YEAR2038): Correct indentation.
49748 2017-11-06  Paul Eggert  <eggert@cs.ucla.edu>
49750         year2038: be more insistent about 64-bit time_t
49751         Applications requiring access to arbitrary files should not be
49752         built with 32-bit time_t on hosts that have 64-bit timestamps,
49753         as this can lead to real trouble at runtime.
49754         * m4/year2038.m4 (gl_YEAR2038): Do not require AC_CANONICAL_HOST.
49755         Check on all systems, not just MinGW.  Use a heuristic involving
49756         TIME_T_32_BIT_OK, cross_compiling, and the touch command to
49757         output a failure or just a warning, to make it more likely that
49758         builders will select 64-bit time_t.
49760 2017-11-05  Paul Eggert  <eggert@cs.ucla.edu>
49762         havelib: fix typo in previous change
49763         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Fix typo.
49765         Don’t use AC_EGREP_CPP if affected by CFLAGS
49766         * m4/float_h.m4 (gl_FLOAT_H):
49767         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI):
49768         * m4/lib-ld.m4 (AC_LIB_PROG_LD):
49769         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB):
49770         * m4/year2038.m4 (gl_YEAR2038):
49771         Prefer AC_COMPILE_IFELSE to AC_EGREP_CPP when testing conditions
49772         likely to be affected by the choice of CFLAGS, since CFLAGS are
49773         not used by AC_EGREP_CPP.  Without this patch, ‘./configure
49774         CFLAGS="-m32"’ fails on gzip with GNU/Linux x86-64.
49776         fstatat: pacify GCC on unusual platform
49777         * lib/fstatat.c (orig_fstatat) [!HAVE_WORKING_FSTATAT_ZERO_FLAG]:
49778         Omit, as it’s unused in this case.
49780 2017-10-29  Paul Eggert  <eggert@cs.ucla.edu>
49782         timespec: prefer ‘assume’ to ‘assure’
49783         This avoids some runtime tests.  The rest of the module makes
49784         similar assumptions and there is little point to testing here.
49785         * lib/timespec.h: Include verify.h instead of assure.h.
49786         (timespec_cmp): Use ‘assume’, not ‘assure’.
49787         Also, remove an unnecessary cast to ‘int’, as lots of other
49788         code in this module now causes -Wconversion to complain, and
49789         this is a problem with -Wconversion not with the code.
49791         * modules/timespec (Depends-on): Depend on ‘verify’, not ‘assure’.
49793         Port recent gnulib-tool change to Dash
49794         * gnulib-tool (func_create_testdir): Don't assume that the shell
49795         retokenizes after expanding "$@" inside the call to
49796         func_execute_command.  Dash 0.5.8-2.1ubuntu2 does not.
49798 2017-10-27  Jim Meyering  <meyering@fb.com>
49800         timespec.h: use "assure" to avoid a spurious warning
49801         * lib/timespec.h: Include "assure.h" and use it to help
49802         gcc7's -Wstrict-overflow avoid a false positive warning
49803         for a use in coreutils' ls.c.  Suggested by Paul Eggert in
49804         https://lists.gnu.org/r/bug-gnulib/2017-10/msg00007.html
49805         * modules/timespec (Depends-on): Add assure.
49807 2017-10-29  Bruno Haible  <bruno@clisp.org>
49809         Avoid several test failures with traditional locales on Haiku.
49810         * m4/locale-ar.m4 (gt_LOCALE_AR): On BeOS and Haiku, set LOCALE_AR=none.
49811         * m4/locale-fr.m4 (gt_LOCALE_FR): On BeOS and Haiku, set LOCALE_FR=none.
49812         * m4/locale-ja.m4 (gt_LOCALE_JA): On BeOS and Haiku, set LOCALE_JA-none.
49813         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): On BeOS and Haiku, set
49814         LOCALE_ZH_CN=none.
49816 2017-10-29  Bruno Haible  <bruno@clisp.org>
49818         strerror_r-posix: Fix behaviour and test failure on Haiku.
49819         * lib/strerror_r.c (strerror_r): Don't assume that valid error numbers
49820         are positive. Work around return value 0 instead of ERANGE on Haiku.
49821         For unknown error numbers, use a format string consistent with perror().
49822         * doc/posix-functions/strerror_r.texi: Mention the Haiku problem.
49823         * tests/test-strerror_r.c (main): Don't assume that valid error numbers
49824         are positive.
49826 2017-10-29  Bruno Haible  <bruno@clisp.org>
49828         get-rusage-data: Avoid crash on Haiku.
49829         * lib/get-rusage-data.c: Avoid the setlimit-based implementation.
49831 2017-10-29  Bruno Haible  <bruno@clisp.org>
49833         get-rusage-as: Avoid crash on Haiku.
49834         * lib/get-rusage-as.c: Avoid the setlimit-based implementation.
49836 2017-10-29  Bruno Haible  <bruno@clisp.org>
49838         ilogbl: Ensure replacement on Haiku.
49839         * m4/ilogbl.m4 (gl_FUNC_ILOGBL): Invoke gl_FUNC_ILOGBL_WORKS and set
49840         REPLACE_ILOGBL if ilogbl does not work.
49841         (gl_FUNC_ILOGBL_WORKS): New macro.
49842         * lib/math.in.h (ilogbl): Replace if REPLACE_ILOGBL is 1.
49843         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_ILOGBL.
49844         * modules/math (Makefile.am): Substitute REPLACE_ILOGBL.
49845         * modules/ilogbl (Depends-on, configure.ac): Consider REPLACE_ILOGBL.
49846         * doc/posix-functions/ilogbl.texi: Mention the Haiku problem.
49848 2017-10-29  Bruno Haible  <bruno@clisp.org>
49850         expl: Ensure replacement on Haiku.
49851         * m4/expl.m4 (gl_FUNC_EXPL): Test whether an expl() return value is
49852         zero.
49853         * doc/posix-functions/expl.texi: Mention the Haiku problem.
49855 2017-10-29  Bruno Haible  <bruno@clisp.org>
49857         math: Fix test failure on Haiku.
49858         * lib/math.in.h (FP_ILOGB0, FP_ILOGBNAN): Override on Haiku.
49859         * m4/ilogb.m4 (gl_FUNC_ILOGB_WORKS): Update accordingly.
49860         * m4/ilogbf.m4 (gl_FUNC_ILOGBF_WORKS): Likewise.
49861         * doc/posix-headers/math.texi: Mention the Haiku problem.
49863 2017-10-29  Bruno Haible  <bruno@clisp.org>
49865         gnulib-tool: Avoid unnecessary config.h.in remaking in testdirs.
49866         * gnulib-tool (func_create_testdir): Use workaround against 'autoheader'
49867         bug reported at <https://savannah.gnu.org/support/index.php?109406>.
49869 2017-10-29  Bruno Haible  <bruno@clisp.org>
49871         crypto/*: Verify that the header file is self-contained.
49872         * tests/test-gc-*.c: Include the module's header file immediately after
49873         <config.h>.
49874         * tests/test-hmac-*.c: Likewise.
49875         * tests/test-arcfour.c: Likewise.
49876         * tests/test-arctwo.c: Likewise.
49877         * tests/test-des.c: Likewise.
49878         * tests/test-md2.c: Likewise.
49879         * tests/test-md4.c: Likewise.
49880         * tests/test-md5.c: Likewise.
49881         * tests/test-rijndael.c: Likewise.
49882         * tests/test-sha1.c: Likewise.
49883         * tests/test-sm3.c: Likewise.
49885 2017-10-29  Jia Zhang  <qianyue.zj@alibaba-inc.com>
49886             Bruno Haible  <bruno@clisp.org>
49888         crypto/gc: fix build failure with -Werror=suggest-attribute=const
49889         * lib/gc.h (gc_hash_digest_length): Mark with 'const' attribute.
49891 2017-10-29  Jia Zhang  <qianyue.zj@alibaba-inc.com>
49893         New module: crypto/gc-sm3
49894         * lib/gc.h: Declare SM3-related stuffs.
49895         * lib/gc-gnulib.c: Support sm3 in internal functions.
49896         * lib/gc-libgcrypt.c: Support sm3 with libgcrypt.
49897         * m4/gc-sm3.m4: m4 file for gc-sm3 module.
49898         * modules/crypto/gc-sm3: Define gc-sm3 module.
49899         * tests/test-gc-sm3.c: Implement SM3 test case with libgcrypt.
49900         * modules/crypto/gc-sm3-tests: Define gc-sm3 test module.
49901         * MODULES.html.sh: List gc-sm3 module.
49903 2017-10-29  Bruno Haible  <bruno@clisp.org>
49905         random, random_r: Mention different prototypes on Haiku.
49906         * doc/posix-functions/random.texi: Mention different prototype on Haiku.
49907         * doc/glibc-functions/random_r.texi: Likewise.
49908         * doc/glibc-functions/initstate_r.texi: Likewise.
49909         * doc/glibc-functions/setstate_r.texi: Likewise.
49911 2017-10-28  Bruno Haible  <bruno@clisp.org>
49913         posix_spawn: Avoid spurious message in configure output.
49914         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): Discard stderr output from
49915         'cmp' command.
49917 2017-10-28  Bruno Haible  <bruno@clisp.org>
49919         inet_ntop, inet_pton: Determine needed library correctly on Haiku.
49920         * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): Search also in libnetwork.
49921         * m4/inet_pton.m4 (gl_FUNC_INET_PTON): Likewise.
49923 2017-10-28  Bruno Haible  <bruno@clisp.org>
49925         ioctl: Override non-POSIX declaration on Haiku.
49926         * m4/ioctl.m4 (gl_FUNC_IOCTL): Include also <unistd.h>.
49927         * lib/sys_ioctl.in.h: Add comment about Haiku.
49928         * doc/posix-functions/ioctl.texi: Mention Haiku problem.
49929         * doc/glibc-headers/sys_ioctl.texi: Likewise.
49931 2017-10-28  Bruno Haible  <bruno@clisp.org>
49933         crypto/sm3: Add overview documentation to the .h file.
49934         * lib/sm3.h: Add comments.
49936 2017-10-28  Jia Zhang  <qianyue.zj@alibaba-inc.com>
49938         New module: crypto/sm3
49939         This new module can be used to compute SM3 message digest of files or
49940         memory blocks according to the specification GM/T 004-2012
49941         Cryptographic Hash Algorithm SM3, published by State Cryptography
49942         Administration, China.
49943         The official SM3 cryptographic hash algorithm specification is
49944         available at
49945         http://www.sca.gov.cn/sca/xwdt/2010-12/17/content_1002389.shtml
49946         * lib/sm3.h: Declare the APIs of sm3 module.
49947         * lib/sm3.c: Implement SM3 hash algorithm.
49948         * m4/sm3.m4: m4 file for sm3 module.
49949         * modules/crypto/sm3: Define sm3 module.
49950         * tests/test-sm3.c: Implement SM3 test case.
49951         * modules/crypto/sm3-tests: Define sm3 test module.
49952         * MODULES.html.sh: List sm3 module.
49954 2017-10-28  Jia Zhang  <qianyue.zj@alibaba-inc.com>
49956         gc-libgcrypt: fix undefined enum type in switch statement
49957         Resolve the following build failure:
49958         lib/gc-libgcrypt.c: In function 'gc_hash_open':
49959         lib/gc-libgcrypt.c:317:5: error: case value '0' not in enumerated type
49960         'Gc_hash_mode {aka enum Gc_hash_mode}' [-Werror=switch]
49961              case 0:
49962              ^~~~
49963         * lib/gc.h (enum Gc_hash_mode): Add value GC_NULL.
49964         * lib/gc-libgcrypt.c (gc_hash_open): Use this enum value instead of 0.
49966 2017-10-28  Jia Zhang  <qianyue.zj@alibaba-inc.com>
49968         gc-libgcrypt: fix assignment error due to -Werror=pointer-sign
49969         Resolve the following build failure:
49970         lib/gc-libgcrypt.c: In function 'gc_hash_read':
49971         lib/gc-libgcrypt.c:460:14: error: pointer targets in assignment differ
49972         in signedness [-Werror=pointer-sign]
49973             digest = gcry_md_read (ctx->gch, 0);
49974                    ^
49975         * lib/gc-libgcrypt.c (gc_hash_read): Cast result of gcry_md_read.
49977 2017-10-26  Bruno Haible  <bruno@clisp.org>
49979         havelib: Fix value of LD for 32-bit compilation on NetBSD/sparc64.
49980         * m4/lib-ld.m4 (AC_LIB_PROG_LD): On NetBSD/sparc64 with CC="gcc -m32",
49981         set LD to '/usr/bin/ld -m elf32_sparc', not '/usr/bin/ld'.
49983 2017-10-21  Paul Eggert  <eggert@cs.ucla.edu>
49985         glob: fix another heap buffer overflow
49986         Problem reported by Tim Rühsen in:
49987         https://sourceware.org/bugzilla/show_bug.cgi?id=22332
49988         * lib/glob.c (glob): Avoid buffer overrun when unescaping.
49990 2017-10-19  Paul Eggert  <eggert@cs.ucla.edu>
49992         quotearg: pacify compiler re unsigned
49993         * lib/quotearg.c (quotearg_n_options):
49994         Rewrite to avoid diagnostic from overly-picky compiler.
49995         Problem reported by Sami Kerola in:
49996         https://lists.gnu.org/r/bug-gnulib/2017-10/msg00060.html
49998         glob: fix heap buffer overflow
49999         * lib/glob.c (glob): Fix off-by-one error introduced into
50000         glibc in commit dd7d45e838a42b0ed470c44b55901ea98d0c2bab
50001         dated 1997-10-29 20:33:40.  Problem reported by Tim Rühsen in:
50002         https://sourceware.org/bugzilla/show_bug.cgi?id=22320
50003         Fix suggested by Bruno Haible.
50005 2017-10-18  Paul Eggert  <eggert@cs.ucla.edu>
50007         glob: pacify fuzzer for mempcpy
50008         Problem reported by Tim Rühsen in:
50009         https://lists.gnu.org/r/bug-gnulib/2017-10/msg00054.html
50010         * lib/glob.c (glob): Do not pass NULL to mempcpy.
50012 2017-10-12  Bruno Haible  <bruno@clisp.org>
50014         doc: Fix syntax error (regression from 2017-10-03).
50015         * doc/posix-functions/strncpy.texi: Fix syntax error.
50017 2017-10-12  Bruno Haible  <bruno@clisp.org>
50019         doc: Update for Solaris 11.3.
50020         * doc/**/*.texi: For bugs that exist in both Solaris 11.0 and 11.3,
50021         mention Solaris 11.3.
50022         * m4/log2.m4: Fix comments.
50023         * m4/log2f.m4: Likewise.
50024         * m4/printf.m4: Update comments.
50025         * m4/rename.m4: Likewise.
50026         * m4/strncat.m4: Likewise.
50028         all: Write "Solaris 11.0" instead of "Solaris 11 2011-11".
50030 2017-10-10  Bruno Haible  <bruno@clisp.org>
50032         doc: Improve doc about ioctl.
50033         * doc/posix-functions/ioctl.texi: Fix list of platforms with non-POSIX
50034         prototype.
50036 2017-10-09  Bruno Haible  <bruno@clisp.org>
50038         wcwidth: Don't use obsolete syntax of 'test'.
50039         Reported by Eric Blake.
50040         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Don't optimize two 'test'
50041         invocations into one, as POSIX marks '-a' and '-o' as "obsolescent".
50043 2017-10-09  Bruno Haible  <bruno@clisp.org>
50045         getopt-posix: Fix build failure when using ac_cv_header_getopt_h=no.
50046         Reported by Christian Ehrhardt <christian.ehrhardt@canonical.com>
50047         and Daniel P. Berrange <berrange@redhat.com>.
50048         * lib/unistd.in.h (getopt): Don't attempt to avoid namespace pollution
50049         on glibc systems. The getopt-pfx-core.h file declares exactly what
50050         unistd.h needs, nothing more.
50052 2017-10-08  Bruno Haible  <bruno@clisp.org>
50054         vma-iter: Improve support for FreeBSD.
50055         * lib/vma-iter.c (vma_iterate_proc): New function, extracted from
50056         vma_iterate.
50057         (vma_iterate): Use it. For FreeBSD, try vma_iterate_bsd first.
50059 2017-10-08  Bruno Haible  <bruno@clisp.org>
50061         vma-iter: Fix truncated result on NetBSD (regression from 2017-10-07).
50062         * lib/vma-iter.c (MIN_LEFTOVER): Define to 1, not 0.
50064 2017-10-07  KO Myung-Hun  <komh@chollian.net>
50066         test-framework-sh: Fix 'invalid path dir' error.
50067         On OS/2, a path separator is ';' not ':'. And ':' is used as a
50068         separator between a drive letter and directory parts.
50069         As a result, an absolute path such as x:/path/to/dir on OS/2 is
50070         treated as an invalid path dir.
50071         * tests/init.sh (PATH_SEPARATOR): Set at startup.
50072         (path_prepend_): '?:*' is also an absolute path. Use $PATH_SEPARATOR
50073         instead of hard coded ':'.
50075 2017-10-07  Bruno Haible  <bruno@clisp.org>
50077         vma-iter: Fix truncated result on Linux (regression from 2017-09-26).
50078         * lib/vma-iter.c (MIN_LEFTOVER): New macro.
50079         (STACK_ALLOCATED_BUFFER_SIZE): Set to a minimal value if not needed.
50080         (rof_open): On Linux, do multiple read() calls and make sure
50081         MIN_LEFTOVER bytes are left when read() returns.
50083 2017-10-07  Bruno Haible  <bruno@clisp.org>
50085         vma-iter: Improve support for GNU/Hurd.
50086         * lib/vma-iter.c (vma_iterate): On GNU/Hurd, use the Mach vm_region()
50087         API, not the /proc file system.
50089 2017-10-07  Bruno Haible  <bruno@clisp.org>
50091         test-framework-sh: Don't require bash on Windows and OS/2.
50092         Reported by KO Myung-Hun.
50093         * tests/test-init.sh: Use 'shopt' only when running in bash.
50095 2017-10-06  KO Myung-Hun  <komh@chollian.net>
50097         wcwidth: check a macro version of wcwidth () as well
50098         * lib/wchar.in.h: Revert commit from 2016-01-14.
50099         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Test if wcwidth is a macro.
50101 2017-10-06  Bruno Haible  <bruno@clisp.org>
50103         getopt-posix: Clarify copyright header.
50104         * lib/getopt.in.h: Don't state that gnulib is under LGPL.
50105         * lib/getopt-pfx-core.h: Likewise.
50106         * lib/getopt-pfx-ext.h: Likewise.
50107         * lib/getopt-cdefs.in.h: Likewise.
50109 2017-10-03  Bruno Haible  <bruno@clisp.org>
50111         Fix warning "`gl_HOST_CPU_C_ABI' was expanded before it was required".
50112         * modules/host-cpu-c-abi (configure.ac): Require, don't invoke
50113         gl_HOST_CPU_C_ABI.
50115 2017-10-03  Bruno Haible  <bruno@clisp.org>
50117         doc: warn about misuse of strncpy and wcsncpy.
50118         * doc/posix-functions/strcpy.texi: Describe requirements on prior
50119         memory allocation.
50120         * doc/posix-functions/wcscpy.texi: Likewise.
50121         * doc/posix-functions/strncpy.texi: Describe what this function is not
50122         useful for.
50123         * doc/posix-functions/wcsncpy.texi: Likewise.
50125 2017-10-02  Paul Eggert  <eggert@cs.ucla.edu>
50127         fsuage: fix typo in previous change
50128         * lib/fsusage.c: Remove stray include of full-read.h.
50129         Problem reported by Sam Steingold for macOS (Bug#28669).
50131 2017-10-01  Paul Eggert  <eggert@cs.ucla.edu>
50133         fsusage: remove SVR2 support
50134         SVR2 was obsolete by 1986 and is no longer supported by anybody,
50135         and its code was getting in the way of use of this module by
50136         Emacs, which has its own ‘read’ function anyway.
50137         * lib/fsusage.c: Do not include sys/filsys.h.
50138         (get_fs_usage): Remove SVR2-specific code.
50139         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE):
50140         Do not test for sys/filsys.h or set STAT_READ_FILSYS.
50141         * modules/fsusage (Depends-on): Do not depend on full-read.
50143         Simplify autoupdate of licenses
50144         * config/srclistvars.sh (GNUWWWLICENSES): Move to a more-typical
50145         place.
50147 2017-10-01  Bruno Haible  <bruno@clisp.org>
50149         vma-iter: Add support for GNU/Hurd.
50150         * lib/vma-iter.c: Treat GNU/Hurd like Linux.
50151         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define also on GNU/kFreeBSD.
50153 2017-09-30  Bruno Haible  <bruno@clisp.org>
50155         vma-iter: Make it work on 32-bit Solaris with module 'largefile'.
50156         * modules/vma-iter: Don't test for sys/procfs.h, as this test would
50157         fail when module 'largefile' is in use.
50158         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Don't test HAVE_SYS_PROCFS_H.
50159         * lib/vma-iter.c: Undefine _FILE_OFFSET_BITS early.
50160         Don't test HAVE_SYS_PROCFS_H.
50162 2017-09-30  Bruno Haible  <bruno@clisp.org>
50164         havelib: Make it work for CC="gcc -m32" (regression from 2017-02-19).
50165         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Require gl_HOST_CPU_C_ABI.
50166         When $CC produces 32-bit code, set acl_libdirstem to 'lib', not 'lib64'.
50167         * modules/havelib (Depends-on): Add host-cpu-c-abi.
50169 2017-09-30  Bruno Haible  <bruno@clisp.org>
50171         uniname/uniname: Don't assume C99 compiler (regression from 2015-02-16).
50172         * lib/uniname/uniname.c (unicode_name_character): Add braces around
50173         scope of local variables.
50175 2017-09-28  Bruno Haible  <bruno@clisp.org>
50177         string: code style
50178         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Reorder list of
50179         substitutable variables.
50180         * modules/string (Makefile.am): Likewise.
50182 2017-09-26  Bruno Haible  <bruno@clisp.org>
50184         uniname/uniname-tests: Tighten code.
50185         * tests/uniname/test-uninames.c (fill_names, fill_aliases): Merge two
50186         local variables into one.
50188 2017-09-26  Bruno Haible  <bruno@clisp.org>
50190         vma-iter: Improvements for Linux and BSD platforms.
50191         - Add support for DragonFly BSD.
50192         - Make it more reliable on Linux, GNU/kFreeBSD, FreeBSD, NetBSD.
50193         * lib/vma-iter.c (struct rofile, rof_open, rof_peekchar, rof_close):
50194         Read the entire file into memory in a single system call.
50195         (vma_iterate): Update. Read from /proc on DragonFly BSD like on FreeBSD.
50196         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define also on DragonFly BSD.
50198 2017-09-26  Bruno Haible  <bruno@clisp.org>
50200         vma-iter: Provide the protection flags on FreeBSD.
50201         * lib/vma-iter.c (vma_iterate) [FreeBSD]: When reading from /proc,
50202         skip three fields between the addresses and the protection flags.
50204 2017-09-26  Paul Eggert  <eggert@cs.ucla.edu>
50206         glob: remove bogus extern decl
50207         * lib/glob.c (__glob_pattern_type): Remove now-spurious
50208         extern declaration.  Problem reported by Adhemerval Zanella in:
50209         https://sourceware.org/ml/libc-alpha/2017-09/msg00972.html
50211 2017-09-25  Paul Eggert  <eggert@cs.ucla.edu>
50213         uniname/uniname-tests: integer overflow fix
50214         * tests/uniname/test-uninames.c (fill_names, fill_aliases):
50215         Check for integer overflow.
50217         duplocale-tests: fix unlikely crash
50218         * tests/test-duplocale.c (get_locale_dependent_values):
50219         Don’t crash with absurdly long month names.
50221         maint: fix overflow checking in nap.h
50222         * modules/chown-tests:
50223         * modules/fchownat-tests, modules/fdutimensat-tests:
50224         * modules/futimens-tests, modules/lchown-tests:
50225         * modules/stat-time-tests, modules/utime-tests:
50226         * modules/utimens-tests, modules/utimensat-tests:
50227         Depend on intprops.
50228         * tests/nap.h: Include intprops.h.
50229         (diff_timespec): Handle overflow properly.
50231         sys_types: update URL
50232         * m4/sys_types_h.m4: Use https: URL.
50234         parse-datetime: fix dependency
50235         * modules/parse-datetime (Depends-on): Depend
50236         on nstrftime, not strftime.
50238         parse-datetime, posixtm: avoid uninit access
50239         * lib/parse-datetime.y (parse_datetime2):
50240         * lib/posixtm.c (posixtime):
50241         Do not access uninitialized storage, even though the resulting
50242         value is never used.
50244 2017-09-25  Bruno Haible  <bruno@clisp.org>
50246         vma-iter: Improvements for BSD platforms.
50247         - Add support for GNU/kFreeBSD.
50248         - Make it work on FreeBSD and NetBSD even when /proc is not mounted.
50249         - Speed up on OpenBSD.
50250         * lib/vma-iter.c (struct rofile, rof*): Define also on GNU/kFreeBSD.
50251         (vma_iterate_bsd): New function.
50252         (vma_iterate): Use it as fallback on FreeBSD and NetBSD. Use it as
50253         first choice on OpenBSD. Treat GNU/kFreeBSD like Linux.
50254         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define also on GNU/kFreeBSD.
50255         * modules/vma-iter (configure.ac): Require AC_C_INLINE.
50257 2017-09-23  Bruno Haible  <bruno@clisp.org>
50259         strfmon_l: New module.
50260         * modules/strfmon_l: New file.
50261         * lib/strfmon_l.c: New file.
50262         * m4/strfmon_l.m4: New file.
50263         * doc/posix-functions/strfmon_l.texi: Mention the new module.
50264         * modules/strfmon_l-tests: New file.
50265         * tests/test-strfmon_l.c: New file.
50267         monetary: New module.
50268         * modules/monetary: New file.
50269         * lib/monetary.in.h: New file.
50270         * m4/monetary_h.m4: New file.
50271         * doc/posix-headers/monetary.texi: Mention the new module.
50272         * modules/monetary-tests: New file.
50273         * tests/test-monetary.c: New file.
50274         * modules/monetary-c++-tests: New file.
50275         * tests/test-monetary-c++.cc: New file.
50276         * modules/duplocale-tests (configure.ac): Use AC_CHECK_HEADERS_ONCE.
50278 2017-09-23  Bruno Haible  <bruno@clisp.org>
50280         duplocale tests: Fix test crash on Linux/x86.
50281         * tests/test-duplocale.c (test_with_uselocale): Disconnect the mixed2
50282         locale from the current thread before freeing it.
50284 2017-09-21  Paul Eggert  <eggert@cs.ucla.edu>
50286         mktime: port to OpenVMS
50287         Problem reported by John E. Malmberg in:
50288         https://lists.gnu.org/r/bug-gnulib/2017-09/msg00100.html
50289         * m4/mktime.m4 (TIME_T_IS_SIGNED): Default to 0.
50291 2017-09-16  Paul Eggert  <eggert@cs.ucla.edu>
50293         manywarnings: port to GCC on 64-bit MS-Windows
50294         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Work better if
50295         LONG_MAX < PTRDIFF_MAX.  Problem reported by Richard Copley in:
50296         https://lists.gnu.org/r/emacs-devel/2017-09/msg00392.html
50298 2017-09-13  Bruno Haible  <bruno@clisp.org>
50300         all: Replace many more http URLs by https URLs. Update stale URLs.
50301         * users.txt: Remove mention of 'newts'.
50302         * lib/localename.c: Update comment about LANG_SOTHO.
50304 2017-09-13  Paul Eggert  <eggert@cs.ucla.edu>
50306         all: Replace many http URLs by https URLs.
50308 2017-09-12  Bruno Haible  <bruno@clisp.org>
50310         doc: Prefer https URLs where possible.
50311         * doc/**/*.texi: Use https URLs instead of http URLs where possible.
50312         * doc/ld-output-def.texi: Remove unavailable URL.
50314 2017-09-12  Paul Eggert  <eggert@cs.ucla.edu>
50316         maintainer-makefile: FTP -> HTTPS
50317         * top/maint.mk (url_dir_list, ftp-gnu): Use HTTPS protocol instead
50318         of FTP, which is planned to be decommissioned on 2017-11-01.
50320 2017-09-12  Tim Rühsen  <tim.ruehsen@gmx.de>  (tiny change)
50322         libc-config: Fix __GNUC_PREREQ macro.
50323         * lib/libc-config.h (__GNUC_PREREQ): Use __GNUC_MINOR__, not
50324         __GNUC_MINOR.
50326 2017-09-09  Bruno Haible  <bruno@clisp.org>
50328         gnulib-tool: Simplify commit from 2015-08-20.
50329         * gnulib-tool (func_add_or_update): Remove local variable
50330         is_binary_file.
50332 2017-09-08  Bruno Haible  <bruno@clisp.org>
50334         stddef: Avoid conflict with system-defined max_align_t.
50335         The configure-determined HAVE_MAX_ALIGN_T may not always be accurate.
50336         Reported by Werner Lemberg <wl@gnu.org> in
50337         <https://lists.gnu.org/r/bug-gnulib/2017-08/msg00185.html>.
50338         * lib/stddef.in.h (rpl_max_align_t): Renamed from max_align_t.
50339         (max_align_t): Define as a macro.
50340         (GNULIB_defined_max_align_t): New macro. Guards against multiple
50341         definitions of rpl_max_align_t in different copies of gnulib-generated
50342         <stddef.h>.
50344 2017-09-05  Paul Eggert  <eggert@cs.ucla.edu>
50346         libc-config: port to MSVC
50347         Problems reported by Gisle Vanem in:
50348         http://lists.gnu.org/r/bug-gnulib/2017-09/msg00016.html
50349         * lib/libc-config.h (__inline): Don't define if HAVE___INLINE.
50350         (libc_hidden_proto): Stick to Standard C syntax for varargs macro.
50351         * m4/__inline.m4: New file.
50352         * modules/libc-config (Files): Add it.
50353         (Depends-on): Use it.
50355         glob: Use enum for __glob_pattern_type result
50356         From a patch proposed by Adhemerval Zanella in:
50357         https://sourceware.org/ml/libc-alpha/2017-09/msg00212.html
50358         * lib/glob_internal.h (GLOBPAT_NONE, GLOBPAT_SPECIAL)
50359         (GLOBPAT_BACKSLASH, GLOBPAT_BRACKET): New constants.
50360         * lib/glob_internal.h (__glob_pattern_type):
50361         * lib/glob.c (glob):
50362         * lib/glob_pattern_p.c (__glob_pattern_p):
50363         Use them.
50365         glob: fix for use in glibc
50366         Problem reported by Adhemerval Zanella in:
50367         https://sourceware.org/ml/libc-alpha/2017-09/msg00213.html
50368         * lib/glob.c (DT_UNKNOWN, DT_DIR, DT_LINK):
50369         Do not redefine if _LIBC.
50371 2017-09-02  Paul Eggert  <eggert@cs.ucla.edu>
50373         glob: fix bugs with long login names
50374         Problem reported by Adhemerval Zanella in:
50375         https://sourceware.org/ml/libc-alpha/2017-08/msg00455.html
50376         * lib/glob.c (GET_LOGIN_NAME_MAX): Remove.
50377         (glob): Use the same scratch buffer for both getlogin_r and
50378         getpwnam_r.  Don’t require preallocation of the login name.  This
50379         simplifies storage allocation, and corrects the handling of
50380         long login names.
50382 2017-09-02  Bruno Haible  <bruno@clisp.org>
50384         dirent: Update doc.
50385         * doc/posix-headers/dirent.texi: More concrete list of platforms.
50387 2017-09-02  Paul Eggert  <eggert@cs.ucla.edu>
50389         glob: fix getpwnam_r errno typo
50390         * lib/glob.c (glob): Fix longstanding misuse of errno after
50391         getpwnam_r, which returns an error number rather than setting
50392         errno.
50394         glob: fix typo in recent change
50395         * lib/glob.c (glob) [!HAVE_GETPWNAM_R && !_LIBC]:
50396         Fix recently-introduced typo.
50398 2017-09-02  Paul Eggert  <eggert@cs.ucla.edu>
50400         glob: don't save and restore errno unnecessarily
50401         * lib/glob.c (glob): Don't save and restore errno
50402         merely because we have getpwnam_r.
50404         glob: don't assume getpwnam_r
50405         * lib/glob.c (glob): Port recent patches to platforms
50406         lacking getpwnam_r.
50408         scratch_buffer: don’t use private glibc API
50409         Suggested by Florian Weimer in:
50410         http://lists.gnu.org/r/bug-gnulib/2017-09/msg00004.html
50411         * lib/scratch_buffer.h: Rename to lib/malloc/scratch_buffer.h.
50412         * lib/scratch_buffer_grow.c: Rename to
50413         lib/malloc/scratch_buffer_grow.c.
50414         * lib/scratch_buffer_grow_preserve.c: Rename to
50415         lib/malloc/scratch_buffer_grow_preserve.c.
50416         * lib/scratch_buffer_set_array_size.c: Rename to
50417         lib/malloc/scratch_buffer_set_array_size.c.
50418         * lib/scratch_buffer.h: New file.
50419         * modules/scratch_buffer (Files, Makefile.am):
50420         Adjust to source-file renaming.
50422 2017-09-01  Paul Eggert  <eggert@cs.ucla.edu>
50424         glob: use scratch_buffer instead of extend_alloca
50425         Much of the lib/glob.c part of this patch comes from a glibc patch
50426         proposed by Adhemerval Zanella in:
50427         https://sourceware.org/ml/libc-alpha/2017-08/msg00456.html
50428         * lib/glob.c: Do not include <config.h>, since <libc-config.h>,
50429         included via glob.h, does this for us now.
50430         (__set_errno): Remove, as libc-config does this for us now.
50431         Include <scratch_buffer.h>.
50432         (GETPW_R_SIZE_MAX): Remove.
50433         (glob): Use struct scratch_buffer instead of extend_alloca.
50434         * lib/glob.in.h: Include libc-config.h rather than
50435         including <sys/cdefs.h> conditionally.
50436         (__BEGIN_DECLS, __END_DECLS, __THROW, __THROWNL, attribute_hidden)
50437         (__glibc_unlikely, __restrict, weak_alias):
50438         Remove, as libc-config does this for us now.
50439         * m4/glob.m4 (gl_PREREQ_GLOB):
50440         Remove sys/cdefs.h tests; no longer needed.
50441         * modules/glob (Depends-on): Add libc-config, scratch_buffer.
50442         (glob.h): Do not replace HAVE_SYS_CDEFS_H.
50444         scratch_buffer: new module
50445         * lib/scratch_buffer.h, lib/scratch_buffer_grow.c:
50446         * lib/scratch_buffer_grow_preserve.c:
50447         * lib/scratch_buffer_set_array_size.c:
50448         New files, copied from glibc with very minor changes that can be
50449         copied back.
50450         * modules/scratch_buffer: New file.
50452         libc-config: new module
50453         * MODULES.html.sh: Add libc-config.
50454         * lib/cdefs.h: New file, copied from the GNU C Library with very
50455         minor changes that can be copied back.
50456         * lib/libc-config.h, modules/libc-config: New files.
50458 2017-08-31  Paul Eggert  <eggert@cs.ucla.edu>
50460         glob: match dangling symlinks
50461         This fixes a bug I inadvertently introduced to Gnulib when I
50462         merged glibc glob back into gnulib on 2007-10-16.  This fix is
50463         inspired by a patch proposed for glibc by Adhemerval Zanella in:
50464         https://sourceware.org/ml/libc-alpha/2017-08/msg00446.html
50465         * doc/posix-functions/glob.texi: Update list of affected platforms.
50466         * lib/glob.c (__lstat64): New macro.
50467         (is_dir): New function.
50468         (glob, glob_in_dir): Match symlinks even if they are dangling.
50469         (link_stat, link_exists_p): Remove.  All uses removed.
50470         * lib/glob.in.h (__attribute_noinline__): Remove; no longer used.
50471         * m4/glob.m4 (gl_PREREQ_GLOB): Do not check for fstatat.
50472         * modules/glob-tests (Depends-on): Add symlink.
50473         * tests/test-glob.c: Include errno.h, unistd.h.
50474         (BASE): New macro.
50475         (main): Test dangling symlinks, if symlinks are supported.
50477         glob, backupfile: inode 0 is a valid inode number
50478         * doc/posix-functions/readdir.texi (readdir):
50479         * doc/posix-headers/dirent.texi (dirent.h):
50480         Document more readdir portability issues.
50481         * lib/backupfile.c (REAL_DIR_ENTRY): Remove.
50482         (numbered_backup): Don’t treat inode 0 any differently from
50483         other inode values.
50484         * lib/glob.c (struct readdir_result): Remove skip_entry member.
50485         (readdir_result_skip_entry, D_INO_TO_RESULT): Remove.
50486         All uses removed.
50487         * modules/glob (Depends-on): Remove d-ino.
50489         glob: simplify symlink detection
50490         * lib/glob.c (dirent_type): New type.  Use uint_fast8_t not
50491         uint8_t, as C99 does not require uint8_t.
50492         (struct readdir_result): Use it.  Do not define skip_entry unless
50493         it is needed; this saves a byte on platforms lacking d_ino.
50494         (readdir_result_type, readdir_result_skip_entry):
50495         New functions, replacing ...
50496         (readdir_result_might_be_symlink, readdir_result_might_be_dir):
50497         ... these functions, which were removed.  This makes the callers
50498         easier to read.  All callers changed.
50499         (D_INO_TO_RESULT): Now empty if there is no d_ino.
50501 2017-08-30  Pádraig Brady  <P@draigBrady.com>
50503         fts-tests: tag as a longrunning-test so not included by default
50504         * modules/fts-tests: This test takes about 20s on current systems,
50505         and uses about 285M of space on ext4.
50507 2017-08-30  Pádraig Brady  <P@draigBrady.com>
50509         renameat2: fix compilation on alpine linux
50510         * m4/renameat.m4: Check for <linux/fs.h> presence.
50511         * lib/renameat2.h: Only include <linux/fs.h> if present.
50512         Reported by Assaf Gordon on Alpine Linux.
50514 2017-08-24  Paul Eggert  <eggert@cs.ucla.edu>
50516         glob: try to port recent changes to MS-Windows
50517         Problem reported by Bruno Haible in:
50518         http://lists.gnu.org/r/bug-gnulib/2017-08/msg00170.html
50519         * lib/glob.c (__glob_pattern_p) [!_LIBC]: Move from here ...
50520         * lib/glob.in.h (__glob_pattern_p): ... to here.
50522 2017-08-24  Eric Blake  <eblake@redhat.com>
50524         warnings: fix compilation with old autoconf
50525         * m4/warnings.m4 (gl_UNKNOWN_WARNINGS_ARE_ERRORS(C))
50526         (gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)): Use m4_defun rather than
50527         AC_DEFUN.
50528         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C))
50529         (gl_MANYWARN_ALL_GCC(C++)): Likewise.
50531 2017-08-24  Bruno Haible  <bruno@clisp.org>
50533         glob: Fix compilation error on NetBSD 7.0 and OpenBSD 6.0.
50534         * modules/glob (Depends-on): Add c99.
50536 2017-08-24  Paul Eggert  <eggert@cs.ucla.edu>
50538         glob: fix typo that broke platforms lacking d_ino
50539         This typo also hurt performance on GNU/Linux and similar hosts.
50540         * lib/glob.c (D_INO_TO_RESULT): Fix typo (reversed ifdef)
50541         in previous change.
50543 2017-08-23  Paul Eggert  <eggert@cs.ucla.edu>
50545         glob: merge from glibc with Zanella glob changes
50546         Merge glob from glibc, with changes for glob proposed
50547         by Adhemerval Zanella in the thread starting here:
50548         https://sourceware.org/ml/libc-alpha/2017-08/msg01079.html
50549         plus some fixes for this merge.
50550         * lib/glob_internal.h, lib/glob_pattern_p.c, lib/globfree.c:
50551         New files, ported from glibc.
50552         * lib/glob-libc.h (_Restrict_): Remove.  All uses replaced
50553         with __restrict.
50554         (__size_t): Remove.  All uses replaced by size_t.
50555         (size_t): Define by defining __need_size_t and including <stddef.h>.
50556         This should work even in non-glibc platforms, where any name
50557         pollution is OK.
50558         Use __USE_MISC instead of __USE_BSD || __USE_GNU.
50559         (struct stat64): Don’t worry about __GLOB_GNULIB.
50560         (glob, globfree, glob_pattern_p): Remove macros for
50561         __USE_FILE_OFFSET64 && __GNUC__ < 2 && !defined __GLOB_GNULIB
50562         case.  Remove _GL_ARG_NONNULL as GNU behavior is to accept NULL
50563         but set errno.
50564         * lib/glob.c (_GL_ARG_NONNULL) [!_LIBC]: Remove.  All uses
50565         removed since the glibc behavior works on null pointers.
50566         Do not include stdio.h; old SunOS is irrelevant now.
50567         Do not worry about GLOB_ONLY_P as we now mimic glibc here.
50568         Include glob_internal.h.
50569         (D_INO_TO_RESULT): Depend on (_LIBC || D_INO_IN_DIRENT), not
50570         ((POSIX || WINDOWS32) && !__GNU_LIBRARY__).  The latter probably
50571         worked only coincidentally.
50572         (attribute_hidden, __attribute_noinline__, __glibc_unlikely):
50573         Remove macros; now done in glob.in.h.
50574         (size_add_wrapv): Do not use __builtin_add_overflow if __ICC.
50575         (glob): Properly initialize glob structure with
50576         GLOB_BRACE|GLOB_DOOFFS (bug 20707).
50577         Remove old code using SHELL since Bash no longer
50578         uses this.
50579         (glob, prefix_array): Separate MS code better.
50580         (glob, glob_in_dir): Use C99 decls before statements when glibc
50581         does.
50582         (glob_in_dir): Remove old Amiga and VMS code.
50583         (globfree, __glob_pattern_type, __glob_pattern_p): Move to
50584         separate files.
50585         * lib/glob.in.h (attribute_hidden, __attribute_noinline__)
50586         (__glibc_unlikely):
50587         Move here from glob.c.
50588         (__restrict): New macro here, replacing the _Restrict_ in glob.c.
50589         (weak_alias): New macro.
50590         (__size_t): Remove.  All uses replaced by size_t.
50591         * modules/d-ino (License): Now LGPLv2+, for compatibility with glob.
50592         * modules/glob (Files): Add +lib/glob_internal.h,
50593         lib/glob_pattern_p.c, lib/globfree.c.
50594         (Depends-on): Remove snippet/arg-nonnull.
50596 2017-08-22  Paul Eggert  <eggert@cs.ucla.edu>
50598         glob: port to clang's Undefined Sanitizer
50599         Problem reported by Tim Rühsen in:
50600         http://lists.gnu.org/r/bug-gnulib/2017-08/msg00144.html
50601         * lib/glob.c (FLEXIBLE_ARRAY_MEMBER) [_LIBC]: Define to empty.
50602         (glob_in_dir): Do not rely on undefined behavior in accessing
50603         struct members beyond their bounds.  Use a flexible array member
50604         instead.
50606 2017-08-21  Paul Eggert  <eggert@cs.ucla.edu>
50608         vc-list-files: port to Solaris 10
50609         * build-aux/vc-list-files: Don't assume test -e works.
50611 2017-08-21  Karl Berry  <karl@freefriends.org>
50613         * doc/posix-functions/srandom.texi (srandom): typo }.
50615 2017-08-20  Paul Eggert  <eggert@cs.ucla.edu>
50617         git-version-gen: port to Solaris 10
50618         Problem reported by Dagobert Michelsen in:
50619         http://lists.gnu.org/r/grep-devel/2017-08/msg00002.html
50620         * build-aux/git-version-gen (v_from_git):
50621         Use expr instead of shell substitution.
50623 2017-08-19  Bruno Haible  <bruno@clisp.org>
50625         host-cpu-c-abi: Improve detection of MIPS ABI.
50626         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): For MIPS, test the value of
50627         _MIPS_SIM.
50629 2017-08-17  Bruno Haible  <bruno@clisp.org>
50631         hypot tests: Fix test failure on FreeBSD 11.0/x86.
50632         * tests/test-hypot.h (test_function): Declare z as 'volatile'.
50634 2017-08-17  Bruno Haible  <bruno@clisp.org>
50636         float: Fix LDBL_MIN value on FreeBSD/x86.
50637         * lib/float.in.h (LDBL_MIN) [__FreeBSD__]: Add more precision.
50639 2017-08-17  Bruno Haible  <bruno@clisp.org>
50641         random: Fix test compilation failure on Cygwin 1.5.25.
50642         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_DECL_INITSTATE,
50643         HAVE_DECL_SETSTATE.
50644         * m4/random.m4 (gl_FUNC_RANDOM): Test whether initstate and setstate are
50645         declared.
50646         * modules/stdlib (Makefile.am): Substitute HAVE_DECL_INITSTATE,
50647         HAVE_DECL_SETSTATE.
50648         * lib/stdlib.in.h (initstate): Declare also if HAVE_DECL_INITSTATE is 0.
50649         (setstate): Declare also if HAVE_DECL_SETSTATE is 0.
50650         * doc/posix-functions/initstate.texi: Mention the Cygwin 1.5.x problem.
50651         * doc/posix-functions/random.texi: Likewise.
50652         * doc/posix-functions/setstate.texi: Likewise.
50653         * doc/posix-functions/srandom.texi: Likewise.
50655 2017-08-16  Bruno Haible  <bruno@clisp.org>
50657         stdnoreturn: Fix test compilation failure on Cygwin.
50658         * m4/stdnoreturn.m4 (gl_STDNORETURN_H): On Cygwin, use gnulib's
50659         <stdnoreturn.h> replacement.
50660         * lib/stdnoreturn.in.h (noreturn): Treat Cygwin like MSVC.
50661         * doc/posix-headers/stdnoreturn.texi: Mention the Cygwin problem.
50663 2017-08-16  Bruno Haible  <bruno@clisp.org>
50665         thread: Fix conflict with pthread_sigmask module.
50666         * lib/glthread/thread.h (pthread_sigmask): Don't declare it weak if
50667         it's defined as a macro.
50668         * modules/thread (Depends-on): Add pthread_sigmask.
50670 2017-08-16  Paul Eggert  <eggert@cs.ucla.edu>
50672         rename: port better to NetBSD
50673         * doc/posix-functions/rename.texi (rename): NetBSD 7
50674         does not have the link-count bug.
50675         * m4/rename.m4 (gl_FUNC_RENAME): Don’t consider NetBSD to be
50676         broken merely because rename ("a", "b") removes "a" when the two
50677         names are hard links to the same file.
50679 2017-08-16  Bruno Haible  <bruno@clisp.org>
50681         iconv_open, uni*: Add support for VPATH builds with OpenBSD 'make'.
50682         * modules/iconv_open (Makefile.am): In the rules that use gperf, prefix
50683         the target file names with '$(srcdir)/'.
50684         * modules/unicase/locale-language (Makefile.am): Likewise.
50685         * modules/unicase/special-casing (Makefile.am): Likewise.
50686         * modules/unictype/bidiclass-byname (Makefile.am): Likewise.
50687         * modules/unictype/category-byname (Makefile.am): Likewise.
50688         * modules/unictype/combining-class-byname (Makefile.am): Likewise.
50689         * modules/unictype/joininggroup-byname (Makefile.am): Likewise.
50690         * modules/unictype/joiningtype-byname (Makefile.am): Likewise.
50691         * modules/unictype/property-byname (Makefile.am): Likewise.
50692         * modules/unictype/scripts (Makefile.am): Likewise.
50693         * modules/uninorm/composition (Makefile.am): Likewise.
50695 2017-08-16  Bruno Haible  <bruno@clisp.org>
50697         nonblocking-socket tests: Fix failure on OpenBSD 6.0.
50698         * tests/test-nonblocking-socket.h (SOCKET_DATA_BLOCK_SIZE): Increase
50699         value for OpenBSD.
50701 2017-08-16  Bruno Haible  <bruno@clisp.org>
50703         rename, renameat: Update doc regarding NetBSD.
50704         * doc/posix-functions/rename.texi: Clarify that when using
50705         -D_XOPEN_SOURCE=500 on NetBSD 7.0, the hard link bug is gone.
50706         * doc/posix-functions/renameat.texi: Be more precise about NetBSD
50707         version.
50709 2017-08-15  Paul Eggert  <eggert@cs.ucla.edu>
50711         renameat2: port better to macOS
50712         * lib/renameat2.c (renameat2): Use renameatx_np if available.
50714         futimens: don’t assume struct timespec layout
50715         * m4/futimens.m4 (gl_FUNC_FUTIMENS):
50716         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT):
50717         * tests/test-fdutimensat.c (main):
50718         * tests/test-futimens.h (test_futimens):
50719         * tests/test-lutimens.h (test_lutimens):
50720         * tests/test-utimens.h (test_utimens):
50721         * tests/test-utimensat.c (main):
50722         Don’t assume that struct timespec is a two-member structure in
50723         tv_sec, tv_nsec order.  Although this is true on all platforms we
50724         know about, POSIX does not guarantee it.
50726         rename: document+test NetBSD rename
50727         Test failure reported by Bruno Haible in:
50728         http://lists.gnu.org/r/bug-gnulib/2017-08/msg00104.html
50729         This is an area where NetBSD is better-behaved than POSIX,
50730         so allow the NetBSD behavior in tests.
50731         * doc/posix-functions/rename.texi:
50732         * doc/posix-functions/renameat.texi: Document NetBSD behavior.
50733         * tests/test-rename.h (test_rename): Allow NetBSD behavior.
50735 2017-08-15  Bruno Haible  <bruno@clisp.org>
50737         renameat: Ensure declaration in <stdio.h> on NetBSD.
50738         * lib/stdio.in.h: Include <unistd,h> also on NetBSD.
50739         * doc/posix-functions/renameat.texi: Mention this problem.
50741 2017-08-15  Bruno Haible  <bruno@clisp.org>
50743         duplocale: Work around NetBSD 7.0 bug.
50744         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Test against the NetBSD 7.0 bug.
50745         * lib/duplocale.c: Add comment about NetBSD problem.
50746         * doc/posix-functions/duplocale.texi: Mention the NetBSD problem.
50748 2017-08-15  Bruno Haible  <bruno@clisp.org>
50750         duplocale tests: Verify use with *_l functions.
50751         * modules/duplocale-tests (configure.ac): Test for uselocale and
50752         some *_l functions.
50753         * tests/test-duplocale.c (test_with_uselocale): New function, extracted
50754         from main.
50755         (get_locale_dependent_values_from, test_with_locale_parameter): New
50756         functions.
50757         (main): Test both test_with_uselocale and test_with_locale_parameter.
50759 2017-08-15  Bruno Haible  <bruno@clisp.org>
50761         extensions: Enable NetBSD specific extensions.
50762         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Define _NETBSD_SOURCE.
50764 2017-08-14  Bruno Haible  <bruno@clisp.org>
50766         open, openat: Update doc about O_CLOEXEC.
50767         * doc/posix-functions/open.texi: More concrete list of platforms.
50768         * doc/posix-functions/openat.texi: Likewise.
50770 2017-08-14  Paul Eggert  <eggert@cs.ucla.edu>
50772         open: support O_CLOEXEC
50773         * NEWS, doc/posix-functions/open.texi:
50774         * doc/posix-functions/openat.texi: Document this.
50775         * lib/fcntl.in.h (O_CLOEXEC): Default to a nonzero value.
50776         (GNULIB_defined_O_CLOEXEC): New symbol.
50777         * lib/open.c: Include cloexec.h.
50778         (open): Support O_CLOEXEC.
50779         * lib/openat.c: Include cloexec.h.
50780         (rpl_openat): Support O_CLOEXEC.
50781         * lib/popen-safer.c: Do not include cloexec.h.
50782         (open_noinherit): Remove.
50783         (popen_safer): Use O_CLOEXEC instead of set_cloexec_flag.
50784         * lib/save-cwd.c: Do not include cloexec.h.
50785         (save_cwd): Use O_CLOEXEC instead of set_cloexec_flag.
50786         * m4/open-cloexec.m4: New file.
50787         * m4/open.m4 (gl_FUNC_OPEN): Require gl_PREPROC_O_CLOEXEC.
50788         Replace 'open' if O_CLOEXEC is not present.
50789         * m4/openat.m4 (gl_FUNC_OPENAT): Require gl_PREPROC_O_CLOEXEC.
50790         Replace 'openat' if O_CLOEXEC is not present.
50791         * modules/freopen (Depends-on): Depend on 'open' if replacing freopen.
50792         * modules/open (Files): Add m4/open-cloexec.m4.
50793         (Depends-on): Depend on cloexec if replacing 'open'.
50794         * modules/openat (Files): Add m4/open-cloexec.m4.
50795         (Depends-on): Depend on cloexec if replacing openat.
50796         * modules/popen-safer (Depends-on): Remove cloexec.
50797         * modules/save-cwd (Depends-on): Remove cloexec, and add
50798         fd-safer-flag and 'open'.
50800 2017-08-13  Paul Eggert  <eggert@cs.ucla.edu>
50802         reallocarray: minor fixes
50803         * doc/glibc-functions/reallocarray.texi: Update version numbers.
50804         * m4/reallocarray.m4 (gl_FUNC_REALLOCARRAY): Don't trust _cv_ contents.
50805         * modules/reallocarray (License): Change from GPL to LGPL.
50806         * tests/test-reallocarray.c (main): Fix ENOMEM typo.
50807         Indent properly and don't use tabs.
50809 2017-08-13  Darshit Shah  <darnir@gnu.org>
50811         reallocarray: New module
50812         reallocarray is a new function in glibc 2.26 to safely allocate an array
50813         of memory locations with integer overflow protection.
50814         * MODULES.html.sh: Add reallocarray.
50815         * doc/glibc-functions/reallocarray.texi: Documentation for reallocarray.
50816         * lib/reallocarray.c: New file to implement module reallocarray.
50817         * lib/stdlib.in.h: Add function declarations for reallocarray.
50818         * m4/reallocarray.m4: New file.
50819         * m4/stdlib_h.m4: Declare reallocarray.
50820         * modules/reallocarray: New file.
50821         * modules/reallocarray-test: New file.
50822         * modules/stdlib: Coerce stdlib.h to export reallocarray.
50823         * tests/test-reallocarray.c: New test.
50825 2017-08-12  Paul Eggert  <eggert@cs.ucla.edu>
50827         dirent-safer: fix cloexec race
50828         * lib/opendir-safer.c: Include fcntl.h instead of unistd-safer.h.
50829         (opendir_safer): Use F_DUPFD_CLOEXEC.
50830         * modules/dirent-safer (Depends-on): Add fcntl.  Remove unistd-safer.
50831         * tests/test-dirent-safer.c: Do not include unistd-safer.h,
50832         as it is no longer a prerequisite.  Use F_DUPFD_CLOEXEC
50833         instead of dup_safer.
50835         fts: fix cloexec races
50836         * lib/fts.c [!_LIBC]: Do not include dirent--.h, unistd--.h, cloexec.h.
50837         (opendirat, diropen): Use O_CLOEXEC instead of set_cloexec_flag.
50838         (fts_build): Use F_DUPD_CLOEXEC rinstad of set_cloexec_flag.
50839         (fd_ring_check): Set cloexec flag on new file descriptors.
50840         (fts_build, fd_ring_check): While we’re at it, make sure the
50841         resulting file descriptor is not 0, 1, or 2, since that is easy.
50843 2017-08-11  Bruno Haible  <bruno@clisp.org>
50845         fts tests: Fix link error.
50846         Reported by Tom G. Christensen in
50847         https://lists.gnu.org/r/bug-gnulib/2017-08/msg00078.html
50848         * modules/fts-tests (Makefile.am): Link test-fts against LIBINTL.
50850 2017-08-10  Paul Eggert  <eggert@cs.ucla.edu>
50852         fts: port recent changes to CentOS 6
50853         Problem reported by Tom G. Christensen in:
50854         http://lists.gnu.org/r/bug-gnulib/2017-08/msg00064.html
50855         * lib/fts.c (fsword): New type.
50856         (struct dev_type, filesystem_type): Use it.
50857         * m4/fts.m4 (gl_FUNC_FTS_CORE): Check for __fsword_t.
50858         Also, check for f_type only if fstatfs and sys/vfs.h work.
50860 2017-08-09  Paul Eggert  <eggert@cs.ucla.edu>
50862         tempname: do not depend on secure_getenv
50863         Excess dependency noted by Eli Zaretskii (Bug#28023#17).
50864         * lib/tempname.c (__secure_getenv) [!_LIBC]: Remove; unused.
50865         * modules/tempname (Depends-on): Remove secure_getenv.
50867 2017-08-08  Paul Eggert  <eggert@cs.ucla.edu>
50869         extensions: add _OPENBSD_SOURCE
50870         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Define _OPENBSD_SOURCE.
50872 2017-08-06  Reuben Thomas  <rrt@sc3d.org>
50873             Bruno Haible  <bruno@clisp.org>
50875         manywarnings: Add support for C++.
50876         * build-aux/g++-warning.spec: New file.
50877         * m4/manywarnings-c++.m4: New file.
50878         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C++)): New macro, that
50879         redirects to manywarnings-c++.m4.
50880         * modules/manywarnings (Files): Add m4/manywarnings-c++.m4.
50882 2017-08-06  Paul Eggert  <eggert@cs.ucla.edu>
50884         git-version-gen: another fix for tags with "-"
50885         * build-aux/git-version-gen: Improve fix for tags containing "-".
50886         Suggested by Markus Armbruster in:
50887         http://lists.gnu.org/r/bug-gnulib/2017-08/msg00034.html
50889 2017-08-06  Bruno Haible  <bruno@clisp.org>
50891         warnings, manywarnings: Add support for multiple languages, not just C.
50892         * warnings.m4 (gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL): Renamed from
50893         gl_UNKNOWN_WARNINGS_ARE_ERRORS.
50894         (gl_UNKNOWN_WARNINGS_ARE_ERRORS(C)): New macro.
50895         (gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)): New macro.
50896         (gl_UNKNOWN_WARNINGS_ARE_ERRORS): Dispatch to
50897         gl_UNKNOWN_WARNINGS_ARE_ERRORS(_AC_LANG).
50898         (gl_WARN_ADD): Require the gl_UNKNOWN_WARNINGS_ARE_ERRORS specialization
50899         of the current language. If C++ is the current language, modify
50900         WARN_CXXFLAGS instead of WARN_CFLAGS.
50901         * manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)): New macro, extracted from
50902         gl_MANYWARN_ALL_GCC.
50903         (gl_MANYWARN_ALL_GCC): Dispatch to gl_MANYWARN_ALL_GCC(_AC_LANG).
50905 2017-08-06  Markus Armbruster  <armbru@pond.sub.org>
50907         git-version-gen: Fix for tags containing '-'
50909         Really old versions of git-describe (before v1.5.0, Feb 2007)
50910         don't have the number of commits in their long format output,
50911         i.e. where modern 'git describe --abbrev=4 --match="v*"' prints
50912         "v0.1-1494-g124b9", they print "v0.1-1494-g124b9".  git-version-gen
50913         recognizes both patterns, and normalizes the old format to the new one.
50915         Unfortunately, this normalization code gets confused when the tag
50916         contains '-'.  Reproducer:
50918             $ git-tag -m test v0.2-rc1
50919             $ build-aux/git-version-gen .tarball-version; echo
50920             build-aux/git-version-gen: WARNING: git rev-list failed
50921             UNKNOWN
50923         We take exact tag "v0.2-rc1" for the old format, extract the presumed
50924         tag "v0.2" from it, then run "git rev-list v0.2..HEAD" to count
50925         commits since tha tag.  Fails, because tag "v0.2" does not exist.
50927         * git-version-gen: We could perhaps drop support for versions from
50928         more than a decade ago.  But tightening the pattern match is easy
50929         enough, so do that.  Still breaks when you use version tags ending in
50930         something matching -g????, but you arguably get what you deserve then.
50932 2017-08-05  Paul Eggert  <eggert@cs.ucla.edu>
50934         valgrind-tests: use ls, and cache
50935         * m4/valgrind-tests.m4: Test ls, not bash.
50936         Problem reported by Reuben Thomas.
50937         Also, cache the result so that it can be overridden.
50939 2017-08-04  Paul Eggert  <eggert@cs.ucla.edu>
50941         manywarnings: port to 64-bit GCC builds of Emacs
50942         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Compute max safe
50943         object size rather than hardwiring 2147483647.  This is needed to
50944         build GNU Emacs, which has one conditional (and used
50945         only-in-theory) call to malloc with a literal greater than
50946         2147483647.
50948 2017-08-04  Bruno Haible  <bruno@clisp.org>
50950         Relax the license of some modules with no runtime code.
50951         * modules/std-gnu11 (License): Set to 'unlimited'.
50952         * modules/c99 (License): Likewise.
50953         Reported by Reuben Thomas <rrt@sc3d.org>.
50954         * modules/d-ino (License): Set to 'LGPL'.
50955         * modules/host-os (License): Likewise.
50956         * modules/longlong (License): Likewise.
50958 2017-08-03  Paul Eggert  <eggert@cs.ucla.edu>
50960         renameat2: port to RHEL 7 + NFS
50961         * lib/renameat2.c (renameat2) [SYS_renameat2]:
50962         Port to RHEL 7 + NFS.  Problem reported by Ted Zlatanov in:
50963         http://lists.gnu.org/r/emacs-devel/2017-08/msg00082.html
50965 2017-08-02  Paul Eggert  <eggert@cs.ucla.edu>
50967         renameat2: port to non-renameat platforms
50968         Problem reported for MSVC-2015 by Gisle Vanem in:
50969         http://lists.gnu.org/r/bug-gnulib/2017-08/msg00001.html
50970         * lib/renameat2.c [!HAVE_RENAMEAT]: Include <sys/stat.h> here too.
50971         (renameat2) [!HAVE_RENAMEAT]: Fix typo in arg passing.
50973 2017-08-01  Paul Eggert  <eggert@cs.ucla.edu>
50975         manywarnings: port to 32-bit GCC bug
50976         Problem reported by Pino Toscano in:
50977         http://lists.gnu.org/r/bug-gnulib/2017-07/msg00150.html
50978         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Use 2**31 - 1,
50979         not 2**63 - 1, to work around the following GCC bug:
50980         https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81650
50982 2017-07-30  Paul Eggert  <eggert@cs.ucla.edu>
50984         backupfile: new function to validate backup suffix
50985         * lib/backupfile.c (set_simple_backup_suffix): New function.
50986         (backupfile_internal): Use it.
50988         canonicalize: fix EOVERFLOW commentary
50989         Problem reported by Bruno Haible in:
50990         http://lists.gnu.org/r/bug-gnulib/2017-07/msg00147.html
50991         * lib/canonicalize.c (canonicalize_filename_mode):
50992         * lib/canonicalize-lgpl.c (__realpath): Fix comments.
50994         Don't interpret EOVERFLOW to mean nonexistence
50995         * lib/fts.c (fts_stat): If lstat fails, report its errno, which
50996         may be EOVERFLOW; this is likely more useful than reporting the
50997         stat errno.
50998         * lib/glob.c (link_stat): Rename from link_exists2_p and
50999         return -1/0 instead of 0/1.  Caller changed.
51000         * lib/glob.c (link_exists_p):
51001         * lib/renameat2.c (rename_noreplace, renameat2):
51002         * lib/tempname.c (try_nocreate):
51003         If errno == EOVERFLOW then the directory entry exists, so do not
51004         act as if it does not exist.
51006         backup-rename: new module
51007         It is like backupfile, except it avoids some race conditions,
51008         and it does not output to stderr or exit.
51009         * MODULES.html.sh: Add backup-rename.
51010         * lib/backup-find.c, lib/backup-internal.h, lib/backup-rename.c:
51011         * modules/backup-rename: New files.
51012         * lib/backupfile.c: Turn this into an internals file, which
51013         contains code common to backupfile and backup_rename.  Include
51014         backupfile-internal.h instead of backupfile.h.  Do not include
51015         argmatch.h or xalloc.h: include xalloc-oversized.h.  Include
51016         renameat2.h and fcntl.h.
51017         (BACKUP_NOMEM): New constant.
51018         (numbered_backup): New args BASE_OFFSET and *DIRPP.  Do not exit
51019         on memory exhaustion; just return BACKUP_NOMEM.  Caller changed.
51020         (backupfile_internal): Rename from find_backup_file_name.
51021         Support new arg RENAME.
51022         (backup_args, backup_types, get_version, xget_version):
51023         Move to lib/backup-find.c.
51024         * lib/backupfile.h (backup_file_rename): New decl.
51025         * modules/backupfile (Files): Add lib/backup-internal.h,
51026         lib/backup-find.c.
51027         (Depends-on): Add dirfd, fcntl, renameat2.
51028         (lib_SOURCES): Add backup-find.c.
51030         renameat2: port better to older Solaris
51031         * lib/renameat2.c (renameat2): Set ret_val properly on old Solaris.
51032         Add goto to use a label, to silence picky compilers.
51034         fts-tests: port to gcc -Wwrite-strings
51035         * tests/test-fts.c (base, base_d): New static vars.
51036         (argv, remove_tree, main): Use them.
51038 2017-07-26  Reuben Thomas  <rrt@sc3d.org>
51040         relocatable-lib{,-lgpl}: improve documentation
51041         * doc/relocatable-maint.texi: Document use of relocatable-lib{,-lgpl}.
51042         Various other updates.
51044 2017-07-30  Reuben Thomas  <rrt@sc3d.org>
51045             Bruno Haible  <bruno@clisp.org>
51047         relocatable-lib{,-lgpl}: add Valgrind suppressions
51048         * lib/relocatable.valgrind: New file.
51049         * modules/relocatable-lib (Files): Add relocatable.valgrind.
51050         * modules/relocatable-lib-lgpl: Likewise.
51052 2017-07-26  Reuben Thomas  <rrt@sc3d.org>
51054         relocatable: Make the license on the sources the GPL.
51055         * lib/relocatable.h, lib/relocatable.c: Change the copyright notice from
51056         LGPL, which was a special case so that the relocatable source files
51057         could be used without gnulib-tool, to GPL. They can still be used under
51058         the LGPL, using the --lgpl option to gnulib-tool.
51060 2017-07-30  Bruno Haible  <bruno@clisp.org>
51062         host-cpu-c-abi: Detect ILP32 ABI on IA-64 HP-UX.
51063         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Distinguish ia64-ilp32
51064         from ia64. For arm64, test only __aarch64__, as __ARM_64BIT_STATE and
51065         __ARM_PCS_AAPCS64 are not reliable indicators: they are not defined on
51066         Ubuntu 14.04 (gcc 4.8.4) and Debian 8 (gcc 4.9.2).
51068 2017-07-27  Paul Eggert  <eggert@cs.ucla.edu>
51070         faccessat: document AT_SYMLINK_NOFOLLOW issue
51071         * doc/posix-functions/faccessat.texi: Modernize platform list.
51072         Document AT_SYMLINK_NOFOLLOW limitation.
51074         renameat2: port to Solaris 10
51075         * lib/renameat2.c (rename_noreplace): Use lstat, not faccessat
51076         with AT_SYMLINK_NOFOLLOW (which is not portable).
51077         (renameat): Undef before using, to avoid endless recursion when
51078         the replacement renameat calls renameat2 which calls the
51079         replacement renameat.
51080         (renameat2): Use lstatat, not faccessat with AT_SYMLINK_NOFOLLOW.
51081         * modules/renameat2 (Depends-on): Remove faccessat.
51082         * modules/renameat-tests (test_renameat_LDADD):
51083         * modules/renameat2-tests (test_renameat2_LDADD):
51084         Remove $(LIB_EACCESS).
51086         renameat2: new module
51087         Although the Linux syscall renameat2 is not in glibc (yet?), it is
51088         useful to have access to its RENAME_NOREPLACE flag.
51089         * MODULES.html.sh (func_all_modules): Add renameat2.
51090         * lib/renameat2.c, lib/renameat2.h, modules/renameat2:
51091         * modules/renameat2-tests, tests/test-renameat2.c: New files.
51092         * lib/renameat.c (renameat): Move most of the implementation
51093         to renameat2, and just call renameat2.
51094         * modules/renameat (Files): Remove lib/at-func2.c.
51095         (Depends-on): Depend only on renameat2.
51096         (Include): Remove <fcntl.h>.
51097         * modules/renameat-tests (test_renameat_LDADD): Add $(LIB_EACCESS),
51098         since renameat (via renameat2) might use faccessat.
51100 2017-07-27  Erik Skultety <eskultet@redhat.com>  (tiny change)
51102         vc-list-files: Adjust the script to support git worktrees
51103         * build-aux/vc-list-files: Require existence, not directory.
51105 2017-07-26  Paul Eggert  <eggert@cs.ucla.edu>
51107         doc: bring MODULES.html.sh up to date
51108         Somehow a few months ago we stopped updating MODULES.html.sh.
51109         I don’t recall explicitly deciding this, so I updated it now.
51110         Alternatively I suppose we could remove it.
51111         * MODULES.html.sh: Add builtin-expect, c99, ctime, explicit_bzero,
51112         localtime, localtime-buffer, noreturn, nstrftime, strftime-fixes,
51113         truncate, utime, utime-h, windows-stat-inodes,
51114         windows-stat-override, windows-stat-timespec, year2038.  Sort.
51116 2017-07-26  Jim Meyering  <meyering@fb.com>
51118         fprintftime: fix build-break caused by recent renaming
51119         * lib/fprintftime.c: Include "nstrftime.c", not the now-renamed
51120         "strftime.c".
51121         * modules/fprintftime: Depend directly on nstrftime.
51123 2017-07-26  Paul Eggert  <eggert@cs.ucla.edu>
51125         regex: work with GCC7's -Werror=implicit-fallthrough=
51126         * lib/regex_internal.h (FALLTHROUGH): New macro.
51127         * lib/regcomp.c (peek_token_bracket, parse_expression):
51128         * lib/regexec.c (check_node_accept): Use it.
51130 2017-07-24  Paul Eggert  <eggert@cs.ucla.edu>
51132         fts: simplify fts_build
51133         * lib/fts.c (fts_build): Simplify, and be lazier about
51134         calling leaf_optimization.
51136         fts: three levels of leaf optimization
51137         * lib/fts.c (enum leaf_optimization): New type with three values.
51138         (S_MAGIC_AFS): New macro.  Sort them.
51139         (leaf_optimization): Rename from leaf_optimization_applies, and
51140         return enum leaf_optimization instead of bool.  All uses changed.
51141         Add cases for unknown type and for AFS.
51142         (fts_build): Don’t rely on link counts if NO_LEAF_OPTIMIZATION.
51144         fts: cache dirent_inode_sort_may_be_useful too
51145         * lib/fts.c (struct dev_type): New struct.
51146         (DEV_TYPE_HT_INITIAL_SIZE): New constant.
51147         (dev_type_hash, dev_type_compare, filesystem_type): New functions.
51148         (dirent_inode_sort_may_be_useful, leaf_optimization_applies):
51149         Now takes FTSENT const *, not int.  All uses changed.  Use
51150         filesystem_type to cache.
51151         (link_count_optimize_ok): Remove.  Caller changed to use
51152         leaf_optimization_applies, which now uses shared cache.
51154         fts: introduce MIN_DIR_NLINK
51155         * lib/fts.c (MIN_DIR_NLINK): New constant.
51156         Use it instead of 2, whenever we are talking about link counts.
51158         fts: nlink_t signedness fixups
51159         * lib/fts.c (fts_open): Set rootparent n_dirs_remaining to -1
51160         so that root need not be a special case later.
51161         (fts_read): Remove now-redundant test for fts_level.
51162         Do not assume that nlink_t is signed.
51163         (fts_build): Remove useless decrement of nlinks.
51164         (fts_stat): Avoid unlikely signed integer overflow later, if
51165         nlink_t is signed.
51167         fts-tests: new module
51168         * modules/fts-tests, tests/test-fts.c: New files.
51170 2017-07-23  Bruno Haible  <bruno@clisp.org>
51172         Rename module 'strftime' to 'nstrftime'.
51173         * m4/nstrftime.m4: Renamed from m4/strftime.m4.
51174         * lib/nstrftime.c: Renamed from lib/strftime.c.
51175         * modules/nstrftime: Renamed from modules/strftime.
51176         (Files, Makefile.am): Update.
51177         * tests/test-nstrftime.c: Renamed from tests/test-strftime.c.
51178         Fix comment.
51179         * modules/nstrftime-tests: Renamed from modules/strftime-tests.
51180         (Files, Makefile.am): Update.
51181         * modules/strftime: New file, an obsolete indirection.
51182         * doc/posix-functions/strftime.texi: Update reference.
51183         * config/srclist.txt: Update info.
51184         * NEWS: Mention the change.
51186 2017-07-21  Tim Rühsen  <tim.ruehsen@gmx.de>
51188         malloca: Silence a warning from clang's memory sanitizer.
51189         * lib/malloca.c (NO_SANITIZE_MEMORY): New macro.
51190         (freea): Use it.
51192 2017-07-18  Bruno Haible  <bruno@clisp.org>
51194         host-cpu-c-abi: Fix detection of MIPS ABI.
51195         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): For MIPS, really test the
51196         ABI, not the CPU instruction set.
51198 2017-07-16  Paul Eggert  <eggert@cs.ucla.edu>
51200         explicit_bzero: new module
51201         The explicit_bzero function has been added to glibc.
51202         This module is intended to supports its use in GNU programs.
51203         * doc/glibc-functions/explicit_bzero.texi, lib/explicit_bzero.c:
51204         * m4/explicit_bzero.m4, modules/explicit_bzero:
51205         New files.
51206         * doc/gnulib.texi (Glibc string.h): Link to new doc.
51207         * lib/string.in.h (explicit_bzero): Declare.
51208         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Add defaults for it.
51209         * modules/string (string.h): Substitute its vars.
51211 2017-07-16  Bruno Haible  <bruno@clisp.org>
51213         threadlib: Support static linking.
51214         * m4/threadlib.m4 (gl_THREADLIB_BODY): When static linking is in use,
51215         set gl_cv_have_weak to 'no'.
51217 2017-07-16  Bruno Haible  <bruno@clisp.org>
51219         unicase/locale-language: Fix link dependencies.
51220         * modules/unicase/locale-language (Link): New section.
51221         * modules/unicase/locale-language-tests (Makefile.am): Link
51222         test-locale-language program with $(LIBTHREAD).
51224 2017-07-15  John E. Malmberg  <wb8tyw@gmail.com>
51226         sys_socket: Add support for OpenVMS.
51227         * lib/sys_socket.in.h [__VMS]: Define CMSG_SPACE, CMSG_LEN.
51228         * doc/posix-headers/sys_socket.texi: Mention OpenVMS issues.
51230 2017-07-15  John E. Malmberg  <wb8tyw@gmail.com>
51232         sys_resource: Add support for OpenVMS.
51233         * lib/resource.in.h [__VMS]: Define RUSAGE_SELF, RUSAGE_CHILDREN.
51234         * doc/posix-headers/sys_resource.texi: Mention OpenVMS issues.
51236 2017-07-15  John E. Malmberg  <wb8tyw@gmail.com>
51237             Bruno Haible  <bruno@clisp.org>
51239         math: Add support for OpenVMS.
51240         * lib/math.in.h [__VMS]: Include <fp.h>.
51241         * doc/posix-headers/math.texi: Mention OpenVMS issues.
51243 2017-07-15  Bruno Haible  <bruno@clisp.org>
51245         getdtablesize: Add minimal support for OpenVMS.
51246         Reported by John E. Malmberg <wb8tyw@qsl.net>.
51247         * modules/getdtablesize (Description): Fix.
51248         * lib/getdtablesize.c: Fix comment.
51249         * m4/getdtablesize.m4 (gl_FUNC_GETDTABLESIZE): Don't replace the
51250         getdtablesize() function, even though the test fails.
51251         * doc/glibc-functions/getdtablesize.texi: Reference SUSv2. Describe
51252         limitation on OpenVMS.
51254 2017-07-13  Bruno Haible  <bruno@clisp.org>
51256         Revisit cross-compilation guesses.
51257         * m4/wctype_h.m4 (gl_WCTYPE_H): Add comment.
51259 2017-07-13  Bruno Haible  <bruno@clisp.org>
51261         Improve cross-compilation guesses for native Windows.
51262         * m4/btowc.m4 (gl_FUNC_BTOWC): Add cross-compilation guess for native
51263         Windows.
51264         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Likewise.
51265         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Likewise.
51266         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Likewise.
51267         * m4/cbrtf.m4 (gl_FUNC_CBRTF_WORKS): Likewise.
51268         * m4/cbrtl.m4 (gl_FUNC_CBRTL, gl_FUNC_CBRTL_WORKS): Likewise.
51269         * m4/ceil.m4 (gl_FUNC_CEIL): Likewise.
51270         * m4/ceilf.m4 (gl_FUNC_CEILF): Likewise.
51271         * m4/ceill.m4 (gl_FUNC_CEILL): Likewise.
51272         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
51273         * m4/dup.m4 (gl_FUNC_DUP): Likewise.
51274         * m4/expl.m4 (gl_FUNC_EXPL): Likewise.
51275         * m4/exp2.m4 (gl_FUNC_EXP2_WORKS): Likewise.
51276         * m4/exp2l.m4 (gl_FUNC_EXP2L): Likewise.
51277         * m4/expm1.m4 (gl_FUNC_EXPM1): Likewise.
51278         * m4/expm1f.m4 (gl_FUNC_EXPM1F_WORKS): Likewise.
51279         * m4/exponentl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Likewise.
51280         * m4/fabsl.m4 (gl_FUNC_FABSL_WORKS): Likewise.
51281         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
51282         * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Likewise.
51283         * m4/float_h.m4 (gl_FLOAT_H): Likewise.
51284         * m4/floor.m4 (gl_FUNC_FLOOR): Likewise.
51285         * m4/floorf.m4 (gl_FUNC_FLOORF): Likewise.
51286         * m4/fma.m4 (gl_FUNC_FMA_WORKS): Likewise.
51287         * m4/fmaf.m4 (gl_FUNC_FMAF_WORKS): Likewise.
51288         * m4/fmal.m4 (gl_FUNC_FMAL_WORKS): Likewise.
51289         * m4/fmod.m4 (gl_FUNC_FMOD): Likewise.
51290         * m4/fmodf.m4 (gl_FUNC_FMODF): Likewise.
51291         * m4/fmodl.m4 (gl_FUNC_FMODL): Likewise.
51292         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Likewise.
51293         * m4/frexpf.m4 (gl_FUNC_FREXPF_WORKS): Likewise.
51294         * m4/ftello.m4 (gl_FUNC_FTELLO): Likewise.
51295         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY_CLOBBER): Likewise.
51296         * m4/hypot.m4 (gl_FUNC_HYPOT): Likewise.
51297         * m4/hypotf.m4 (gl_FUNC_HYPOTF, gl_FUNC_HYPOTF_WORKS): Likewise.
51298         * m4/hypotl.m4 (gl_FUNC_HYPOTL, gl_FUNC_HYPOTL_WORKS): Likewise.
51299         * m4/ilogb.m4 (gl_FUNC_ILOGB_WORKS): Likewise.
51300         * m4/ilogbf.m4 (gl_FUNC_ILOGBF_WORKS): Likewise.
51301         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Likewise.
51302         * m4/isinf.m4 (gl_ISINFL_WORKS): Likewise.
51303         * m4/isnanf.m4 (gl_ISNANF_WORKS): Likewise.
51304         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Likewise.
51305         * m4/ldexpl.m4 (gl_FUNC_LDEXPL_WORKS): Likewise.
51306         * m4/log.m4 (gl_FUNC_LOG, gl_FUNC_LOG_WORKS): Likewise.
51307         * m4/logf.m4 (gl_FUNC_LOGF, gl_FUNC_LOGF_WORKS): Likewise.
51308         * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Likewise.
51309         * m4/log10.m4 (gl_FUNC_LOG10, gl_FUNC_LOG10_WORKS): Likewise.
51310         * m4/log10f.m4 (gl_FUNC_LOG10F, gl_FUNC_LOG10F_WORKS): Likewise.
51311         * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Likewise.
51312         * m4/log1p.m4 (gl_FUNC_LOG1P): Likewise.
51313         * m4/log1pf.m4 (gl_FUNC_LOG1PF, gl_FUNC_LOG1PF_WORKS): Likewise.
51314         * m4/log1pl.m4 (gl_FUNC_LOG1PL): Likewise.
51315         * m4/log2.m4 (gl_FUNC_LOG2, gl_FUNC_LOG2_WORKS): Likewise.
51316         * m4/log2f.m4 (gl_FUNC_LOG2F, gl_FUNC_LOG2F_WORKS): Likewise.
51317         * m4/log2l.m4 (gl_FUNC_LOG2L_WORKS): Likewise.
51318         * m4/logb.m4 (gl_FUNC_LOGB_WORKS): Likewise.
51319         * m4/logbf.m4 (gl_FUNC_LOGBF_WORKS): Likewise.
51320         * m4/logbl.m4 (gl_FUNC_LOGBL_WORKS): Likewise.
51321         * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Likewise.
51322         * m4/mbrtowc.m4 (gl_MBRTOWC_EMPTY_INPUT, gl_MBRTOWC_C_LOCALE): Likewise.
51323         * m4/mkdir.m4 (gl_FUNC_MKDIR): Likewise.
51324         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Likewise.
51325         * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Likewise.
51326         * m4/modf.m4 (gl_FUNC_MODF): Likewise.
51327         * m4/modff.m4 (gl_FUNC_MODFF): Likewise.
51328         * m4/modfl.m4 (gl_FUNC_MODFL): Likewise.
51329         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
51330         * m4/perror.m4 (gl_FUNC_PERROR): Likewise.
51331         * m4/popen.m4 (gl_FUNC_POPEN): Likewise.
51332         * m4/posix_spawn.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE,
51333         gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2,
51334         gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN): Likewise.
51335         * m4/ptsname_r.m4 (gl_PREREQ_PTSNAME_R): Likewise.
51336         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
51337         * m4/regex.m4 (gl_REGEX): Likewise.
51338         * m4/remainder.m4 (gl_FUNC_REMAINDER): Likewise.
51339         * m4/remainderf.m4 (gl_FUNC_REMAINDERF,
51340         gl_FUNC_REMAINDERF_WORKS): Likewise.
51341         * m4/remainderl.m4 (gl_FUNC_REMAINDERL,
51342         gl_FUNC_REMAINDERL_WORKS): Likewise.
51343         * m4/rename.m4 (gl_FUNC_RENAME): Likewise.
51344         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
51345         * m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise.
51346         * m4/round.m4 (gl_FUNC_ROUND): Likewise.
51347         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
51348         * m4/roundl.m4 (gl_FUNC_ROUNDL): Likewise.
51349         * m4/signbit.m4 (gl_SIGNBIT): Likewise.
51350         * m4/sleep.m4 (gl_FUNC_SLEEP): Likewise.
51351         * m4/sqrtl.m4 (gl_FUNC_SQRTL_WORKS): Likewise.
51352         * m4/stdint.m4 (gl_STDINT_H): Likewise.
51353         * m4/strerror.m4 (gl_FUNC_STRERROR_0): Likewise.
51354         * m4/strncat.m4 (gl_FUNC_STRNCAT): Likewise.
51355         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
51356         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
51357         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
51358         * m4/trunc.m4 (gl_FUNC_TRUNC): Likewise.
51359         * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
51360         * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
51361         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Likewise.
51362         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
51363         * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Likewise.
51364         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
51365         * m4/unlink.m4 (gl_FUNC_UNLINK): Likewise.
51366         * m4/usleep.m4 (gl_FUNC_USLEEP): Likewise.
51367         * m4/utimes.m4 (gl_FUNC_UTIMES): Likewise.
51368         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise.
51369         * m4/wcsrtombs.m4 (gl_WCSRTOMBS_TERMINATION, gl_WCSRTOMBS_NULL):
51370         Likewise.
51371         * m4/wctob.m4 (gl_FUNC_WCTOB): Likewise.
51372         * m4/chown.m4 (AC_FUNC_CHOWN): Add cross-compilation guess for native
51373         Windows. Enable also on Autoconf 2.70.
51374         * m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_LONG_DOUBLE,
51375         gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE,
51376         gl_PRINTF_DIRECTIVE_A, gl_PRINTF_DIRECTIVE_F, gl_PRINTF_DIRECTIVE_N,
51377         gl_PRINTF_DIRECTIVE_LS, gl_PRINTF_FLAG_LEFTADJUST, gl_PRINTF_FLAG_ZERO,
51378         gl_SNPRINTF_TRUNCATION_C99, gl_SNPRINTF_RETVAL_C99,
51379         gl_SNPRINTF_DIRECTIVE_N, gl_SNPRINTF_SIZE1): Add cross-compilation guess
51380         for native Windows.
51381         (gl_PRINTF_POSITIONS, gl_PRINTF_FLAG_GROUPING,
51382         gl_VSNPRINTF_ZEROSIZE_C99): Add comment.
51384 2017-07-13  Bruno Haible  <bruno@clisp.org>
51386         Improve cross-compilation guesses for native Windows.
51387         * m4/memchr.m4 (gl_FUNC_MEMCHR): Add cross-compilation guess for native
51388         Windows.
51389         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE): Don't use internals of
51390         memchr.m4.
51391         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Likewise.
51393 2017-07-13  Bruno Haible  <bruno@clisp.org>
51395         Improve cross-compilation guesses for native Windows.
51396         * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): Add cross-compilation guess for
51397         native Windows.
51398         (gl_FUNC_FFLUSH): Update accordingly.
51399         * m4/fclose.m4 (gl_FUNC_FCLOSE): Likewise.
51400         * m4/fseeko.m4 (gl_FUNC_FFLUSH_STDIN): Likewise.
51402 2017-07-11  Bruno Haible  <bruno@clisp.org>
51404         More systematic m4 quoting and indentation.
51405         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Quote systematically.
51406         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
51407         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
51408         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
51409         * m4/host-os.m4 (gl_HOST_OS): Likewise.
51410         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H,
51411         gl_WINSIZE_IN_PTEM): Likewise.
51412         * m4/mbrtowc.m4 (AC_FUNC_MBRTOWC): Likewise.
51413         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Likewise.
51414         * m4/pselect.m4 (gl_FUNC_PSELECT): Likewise.
51415         * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Quote systematically.
51416         Correct indentation.
51417         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise.
51418         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
51419         * m4/jm-winsz2.m4 (gl_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL): Likewise.
51420         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
51421         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
51422         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
51424 2017-07-10  Bruno Haible  <bruno@clisp.org>
51426         round, roundf: Avoid compiler warning in configure test.
51427         * m4/round.m4 (gl_FUNC_ROUND): Use 'return' instead of exit().
51428         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
51430 2017-07-10  Bruno Haible  <bruno@clisp.org>
51432         getlogin tests: Avoid #ifdefs when sharing code between modules.
51433         * modules/getlogin_r-tests (Files): Add tests/test-getlogin.h.
51434         * modules/getlogin-tests (Files): Likewise. Remove
51435         tests/test-getlogin_r.c.
51436         * tests/test-getlogin.h: Extracted from tests/test-getlogin_r.c.
51437         * tests/test-getlogin.c: Extracted from tests/test-getlogin_r.c.
51438         * tests/test-getlogin_r.c: Include test-getlogin.h. Omit code that tests
51439         getlogin().
51441 2017-07-10  Paul Eggert  <eggert@cs.ucla.edu>
51443         getlogin: don’t assume one name per uid
51444         Problem reported by Wolfgang F. Muthmann (Bug#27640).
51445         * modules/getlogin-tests (Files): Add tests/test-getlogin_r.c.
51446         (ttyname): Remove test.
51447         * modules/getlogin_r-tests (ttyname): Remove test.
51448         * tests/test-getlogin.c: Replace this near-clone of test-getlogin_r.c
51449         with ‘#define TEST_LOGIN’ followed by ‘#include "test-getlogin_r.c"’.
51450         * tests/test-getlogin_r.c: If TEST_GETLOGIN is defined, test
51451         getlogin rather than getlogin_r.  This avoids code duplication.
51452         (main): Use isatty and fstat rather than ttyname and stat.
51453         Use getpwnam instead of getpwuid, to be portable to test platforms
51454         that have multiple login names for the same uid.
51456 2017-07-10  Tim Rühsen  <tim.ruehsen@gmx.de>
51457             Bruno Haible  <bruno@clisp.org>
51459         glob: Fix more memory leaks.
51460         * lib/glob.c (glob): Use 'goto out' in order to free dirname before
51461         returning.
51462         Reported by Tim Rühsen.
51464 2017-07-10  Bruno Haible  <bruno@clisp.org>
51466         Make sure $host and $host_os are defined when used.
51467         * m4/argz.m4 (gl_FUNC_ARGZ): Require AC_CANONICAL_HOST.
51468         * m4/closedir.m4 (gl_FUNC_CLOSEDIR): Likewise.
51469         * m4/csharpexec.m4 (gt_CSHARPEXEC): Likewise.
51470         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
51471         * m4/expl.m4 (gl_FUNC_EXPL): Likewise.
51472         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Likewise.
51473         * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Likewise.
51474         * m4/opendir.m4 (gl_FUNC_OPENDIR): Likewise.
51475         * m4/poll.m4 (gl_FUNC_POLL): Likewise.
51476         * m4/pselect.m4 (gl_FUNC_PSELECT): Likewise.
51477         * m4/ptsname.m4 (gl_FUNC_PTSNAME): Likewise.
51478         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Likewise.
51479         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Likewise.
51480         * m4/ceill.m4 (gl_FUNC_CEILL): Require AC_CANONICAL_HOST outside the
51481         m4_ifdef block.
51483 2017-07-09  Bruno Haible  <bruno@clisp.org>
51485         *printf: Fix cross-compilation guess for Solaris.
51486         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_F): Fix copy-and-paste mistake from
51487         2010-12-21.
51489 2017-07-07  Paul Eggert  <eggert@cs.ucla.edu>
51490             Bruno Haible  <bruno@clisp.org>
51492         vasnprintf: port to macOS 10.13
51493         Problem reported by comex in:
51494         http://lists.gnu.org/r/bug-gnulib/2017-07/msg00056.html
51495         * lib/vasnprintf.c (VASNPRINTF): Don’t use %n on macOS.
51497 2017-07-06  Bruno Haible  <bruno@clisp.org>
51499         imaxdiv tests: Fix logic.
51500         * tests/test-imaxdiv.c (main): Use == instead of =.
51501         Reported by Coverity.
51503 2017-07-06  Bruno Haible  <bruno@clisp.org>
51505         uninorm/filter: Fix use-after-free bug.
51506         * lib/uninorm/uninorm-filter.c (uninorm_filter_write): Maintain
51507         sortbuf == filter->sortbuf invariant.
51508         Reported by Coverity.
51510 2017-07-06  Bruno Haible  <bruno@clisp.org>
51512         glob: Fix more memory leaks.
51513         * lib/glob.c (glob): Free dirname before returning.
51514         Reported by Coverity and Tim Rühsen.
51516 2017-07-06  Paul Eggert  <eggert@cs.ucla.edu>
51518         parse-datetime: fix uninit var bug
51519         Reported by Bruno Haible in:
51520         http://lists.gnu.org/r/bug-gnulib/2017-07/msg00038.html
51521         * lib/parse-datetime.y (parse_datetime2): Do not use
51522         uninitialized.
51524 2017-07-05  Bruno Haible  <bruno@clisp.org>
51526         doc: Update for MSVC 14.
51527         * doc/posix-headers/*.texi: Add info about MSVC 14.
51528         * doc/posix-functions/*.texi: Likewise.
51529         * doc/pastposix-functions/*.texi: Likewise.
51530         * doc/glibc-headers/*.texi: Likewise.
51531         * doc/glibc-functions/*.texi: Likewise.
51533 2017-07-05  Bruno Haible  <bruno@clisp.org>
51535         sched: Fix build failure on native Windows (regression from 2017-06-19).
51536         * m4/sched_h.m4 (gl_SCHED_H): Set HAVE_STRUCT_SCHED_PARAM always.
51538 2017-07-03  John E. Malmberg  <wb8tyw@gmail.com>
51540         stdioext: Port to OpenVMS.
51541         * lib/stdio-impl.h: OpenVMS uses struct _iobuf for FILE information.
51542         * lib/fpending.c (fpending): Remove non-working VMS specific code.
51543         * lib/fbufmode.c (fbufmode): Fix _IOLBF test to use fp_ macro.
51544         * lib/fflush.c (clear_ungetc_buffer): Add OpenVMS to comments.
51545         * lib/fpurge.c (fpurge): Likewise.
51546         * lib/freadable.c (freadable): Likewise.
51547         * lib/freadahead.c (freadahead): Likewise.
51548         * lib/freading.c (freading): Likewise.
51549         * lib/freadptr.c (freadptr): Likewise.
51550         * lib/freadseek.c (freadseek): Likewise.
51551         * lib/fseeko.c (fseeko): Likewise.
51552         * lib/fseterr.c (fseterr): Likewise.
51553         * lib/fwritable.c (fwriteable): Likewise.
51554         * lib/fwriting.c (fwriting): Likewise.
51556 2017-07-01  Benno Schulenberg  <bensberg@telfort.nl>
51558         glob: Declare variables at the very start of their scope.
51559         * lib/glob.c (convert_dirent, convert_dirent64): Give each fragment
51560         its separate scope, so the functions will compile on Haiku.
51562 2017-07-01  Bruno Haible  <bruno@clisp.org>
51564         logbl: Work around a glibc bug on PowerPC64LE.
51565         * m4/logbl.m4 (gl_FUNC_LOGBL_WORKS): Test also negative subnormal
51566         numbers.
51567         * doc/posix-functions/logbl.texi: Update.
51569 2017-06-29  Bruno Haible  <bruno@clisp.org>
51571         stat, fstat: Compile stat-w32.c only on platforms that need it.
51572         Suggested by Paul Eggert.
51573         * modules/stat (configure.ac): Request stat-w32.o only on native
51574         Windows.
51575         * modules/fstat (configure.ac): Likewise.
51577 2017-06-25  Bruno Haible  <bruno@clisp.org>
51579         stat: Improve last change.
51580         * lib/stat-w32.c: Revert last change. Use generic idiom instead.
51582 2017-06-25  Paul Eggert  <eggert@cs.ucla.edu>
51584         stat: port to xlc 12.01
51585         * lib/stat-w32.c: Always include <sys/types.h>.  Otherwise, xlc
51586         12.01 complains "Compilation unit is empty."
51588 2017-06-24  Paul Eggert  <eggert@cs.ucla.edu>
51590         xalloc-oversized: port to icc
51591         * lib/xalloc-oversized.h (xalloc_oversized): Do not use
51592         __builtin_mul_overflow if ICC is defined, as this results in
51593         "undefined reference to `__builtin_mul_overflow'" with icc 17.0.2
51594         20170213.
51596 2017-06-19  Bruno Haible  <bruno@clisp.org>
51598         classpath: Avoid including config.h twice, as it produces warnings.
51599         Reported by John E. Malmberg <wb8tyw@gmail.com>.
51600         * lib/classpath.h: Conditionalize the include of config.h.
51602 2017-06-19  Bruno Haible  <bruno@clisp.org>
51603             John E. Malmberg  <wb8tyw@gmail.com>  (tiny change)
51605         sched: Fix compilation failure on OpenVMS.
51606         * m4/sched_h.m4 (gl_SCHED_H): Require AC_CANONICAL_HOST. On OpenVMS,
51607         test whether <pthread.h> exists and defines struct sched_param.
51608         * lib/sched.in.h: On OpenVMS, include <pthread.h>.
51610 2017-06-17  Paul Eggert  <eggert@cs.ucla.edu>
51612         diffseq: port to GCC 7 with --enable-gcc-warnings
51613         * lib/diffseq.h (diag): Use an if, not an ifdef, for most of the
51614         heuristic check.  This way, GCC 7 with --enable-gcc-warnings does
51615         not complain about big_snake being defined but not used.
51617 2017-06-15  Bruno Haible  <bruno@clisp.org>
51619         gettext-h: Update theoretical condition for use of variable size arrays.
51620         Reported by Paul Eggert.
51621         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Extend comment
51622         to include the theoretical condition for availability of variable size
51623         arrays, if we could trust the value of __STDC_VERSION__.
51625 2017-06-12  Bruno Haible  <bruno@clisp.org>
51627         Relicense some modules under LGPLv2+.
51628         Daiki Ueno's approval is in
51629         https://lists.gnu.org/r/bug-gnulib/2017-06/msg00058.html.
51630         * modules/uniwidth/base (License): Change to LGPLv2+.
51631         * modules/uniwidth/width (License): Likewise.
51633 2017-06-11  Bruno Haible  <bruno@clisp.org>
51635         localename: Fix test failure on DragonFly BSD.
51636         * lib/localename.c (gl_locale_name_thread_unsafe): Treat DragonFly BSD
51637         like FreeBSD.
51639 2017-06-11  Bruno Haible  <bruno@clisp.org>
51641         float: Fix 'float' and 'isinf' failures on DragonFly BSD.
51642         * m4/float_h.m4 (gl_FLOAT_H): Treat DragonFly BSD like FreeBSD.
51643         * lib/float.in.h: Likewise.
51644         * m4/fmal.m4, m4/frexpl.m4, m4/logbl.m4: Update accordingly.
51646 2017-06-11  Bruno Haible  <bruno@clisp.org>
51648         gnulib-tool: Clean up after autotools.
51649         * gnulib-tool (func_create_testdir, func_create_megatestdir): Remove
51650         useless directory left over by the Autotools.
51652 2017-06-11  Paul Eggert  <eggert@cs.ucla.edu>
51654         getopt-posix: port to glibc 2.25.90
51655         Problem reported by Daniel P. Berrange in:
51656         http://lists.gnu.org/r/bug-gnulib/2017-06/msg00003.html
51657         * lib/getopt-pfx-core.h (_GETOPT_CORE_H):
51658         * lib/getopt-pfx-ext.h (_GETOPT_EXT_H):
51659         #undef if __GETOPT_PREFIX is defined.
51661 2017-06-11  Bruno Haible  <bruno@clisp.org>
51663         strtod-obsolete: Fix license.
51664         * modules/strtod-obsolete (License): Change to LGPL.
51666 2017-06-10  Jim Meyering  <meyering@fb.com>
51668         maint: update to work with GCC7's -Werror=implicit-fallthrough=
51669         * lib/savewd.c (FALLTHROUGH): Define.
51670         (savewd_save, savewd_restore): Use this, rather than a comment,
51671         whenever one switch case falls through into the next.
51673 2017-06-08  Bruno Haible  <bruno@clisp.org>
51675         host-cpu-c-abi: Support for aarch64 ILP32 ABI.
51676         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Recognize the aarch64 ILP32
51677         ABI. Set HOST_CPU_C_ABI=arm64-ilp32 and define __arm64_ilp32__ in this
51678         case.
51680 2017-06-08  Paul Eggert  <eggert@cs.ucla.edu>
51682         doc: remove robots, add prereqs
51683         * doc/build-automation.texi, doc/gnulib.texi: Mention prereqs for
51684         builds.  Simon's robot site does not seem to be up, so remove
51685         mentions of it for now.
51687 2017-06-08  Bruno Haible  <bruno@clisp.org>
51689         gnulib-tool: Fix bug in func_symlink_if_changed, from 2006-11-13.
51690         * gnulib-tool (func_symlink_target): New function, extracted from
51691         func_symlink.
51692         (func_symlink, func_symlink_if_changed): Use it.
51694 2017-06-08  Bruno Haible  <bruno@clisp.org>
51696         gnulib-tool: Fix bug in func_ln_s, from 2016-01-15.
51697         * gnulib-tool (func_ln_s): Determine cp_src correctly.
51699 2017-06-07  Bruno Haible  <bruno@clisp.org>
51701         canonicalize-lgpl: Avoid conflict with gnulib 'getcwd' module on VMS.
51702         Reported by John E. Malmberg <wb8tyw@gmail.com> in
51703         <https://lists.gnu.org/r/bug-gnulib/2017-06/msg00029.html>.
51704         * lib/canonicalize-lgpl.c (__getcwd): On VMS, when using gnulib's getcwd
51705         override, pass 2 arguments to getcwd, not 3.
51707 2017-06-04  Paul Eggert  <eggert@cs.ucla.edu>
51709         same-inode: port better to VMS 8.2 and later
51710         Problem reported by John E. Malmberg in:
51711         http://lists.gnu.org/r/bug-gnulib/2017-06/msg00005.html
51712         * lib/same-inode.h (SAME_INODE) [__VMS && 80200000 <= __CRTL_VER]:
51713         Use the usual POSIX definition.
51714         * m4/sys_types_h.m4 (gl_SYS_TYPES_H): Define _USE_STD_STAT.
51716 2017-06-01  Paul Eggert  <eggert@cs.ucla.edu>
51718         error: fix POSIX violation for va_end
51719         Problem reported by Bruno Haible in:
51720         http://lists.gnu.org/r/bug-gnulib/2017-06/msg00001.html
51721         * lib/error.c (error_tail): Do not call va_end here.
51722         (error, error_at_line): Call it here instead.
51724 2017-05-28  Bruno Haible  <bruno@clisp.org>
51726         c-strtod: Make it usable in C++ mode.
51727         * lib/c-strtod.h: Add 'extern "C"' marker for C++.
51729 2017-05-25  Jim Meyering  <meyering@fb.com>
51731         quotearg: fix compilation failure due to FALLTHROUGH misuse
51732         * lib/quotearg.c (quotearg_buffer_restyled): Revert one FALLTHROUGH
51733         macro back to /* fall through */ comment.  The macro can apply only
51734         to a following case statement.  Reported by Assaf Gordon.
51736 2017-05-25  Paul Eggert  <eggert@cs.ucla.edu>
51738         intprops: port to recent icc
51739         Port to icc (ICC) 17.0.4 20170411, which defines __GNUC__ to be 5
51740         but does not support __builtin_add_overflow etc.
51741         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW) [__ICC]:
51742         Define to 0.
51744 2017-05-23  Karl Berry  <karl@freefriends.org>
51746         * config/srclist.txt (iconv.m4): sync broken, comment out
51747         until (hopefully) the next gettext release.
51749 2017-05-22  Bjarni Ingi Gislason  <bjarniig@rhi.hi.is>
51751         Remove repeated words in comments.
51753 2017-05-22  Bernhard Voelker  <mail@bernhard-voelker.de>
51755         fallthrough: reinstate a FALLTHROUGH instance in quotearg
51756         quotearg.c: Reinstate this instance which is significant
51757         when the if branch is not taken.
51759 2017-05-21  Bruno Haible  <bruno@clisp.org>
51761         gnulib-tool: Add options to create hard links.
51762         * gnulib-tool (func_usage): Document options --hardlink,
51763         --local-hardlink, --more-hardlinks.
51764         (func_symlink): Renamed from func_ln.
51765         (func_symlink_if_changed): Renamed from func_ln_if_changed.
51766         (func_hardlink): New function.
51767         (copymode, lcopymode): New variables.
51768         (symbolic, lsymbolic): Remove variables.
51769         (Options): Implement options --hardlink, --local-hardlink,
51770         --more-hardlinks.
51771         (func_should_link): Renamed from func_should_symlink. Set copyaction.
51772         (func_add_file, func_update_file): Update invocation of
51773         func_should_link. Invoke func_hardlink when appropriate.
51774         (func_import): Update comments.
51775         (func_create_testdir): Update invocation of func_should_link. Invoke
51776         func_hardlink when appropriate.
51777         Finally, invoke 'git update-index --refresh' to mitigate the effects of
51778         the hard links on git.
51780 2017-05-20  Bruno Haible  <bruno@clisp.org>
51782         argp: Simplify bit manipulation.
51783         * lib/argp-parse.c (parser_parse_opt): Use &, |, ~ instead of shifts
51784         on a signed integer type.
51786 2017-05-20  Bruno Haible  <bruno@clisp.org>
51788         Avoid wrong configure results with gcc -fsanitize=address.
51789         This completes the work done on 2016-02-06 on this topic.
51790         * m4/memmem.m4 (gl_FUNC_MEMMEM): Free allocated memory before returning.
51791         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Likewise.
51792         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
51793         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
51794         * m4/fopen.m4 (gl_FUNC_FOPEN): Close allocated FILE streams before
51795         returning.
51796         * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): Likewise.
51797         * m4/fpurge.m4 (gl_FUNC_FPURGE): Likewise.
51798         * m4/ftello.m4 (gl_FUNC_FTELLO): Likewise.
51799         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
51800         * m4/signbit.m4 (gl_FLOATTYPE_SIGN_LOCATION): Likewise.
51801         * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Likewise.
51802         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Close allocated FILE streams and
51803         free allocated memory before returning.
51804         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
51805         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Close allocated DIR
51806         objects before returning.
51807         * m4/iconv.m4 (AM_ICONV_LINK): Close allocated iconv_t handles before
51808         returning.
51810 2017-05-20  Bruno Haible  <bruno@clisp.org>
51812         gnulib-tool: Don't create hard links between gnulib and its testdirs.
51813         * gnulib-tool (func_create_testdir): Don't invoke 'ln'.
51815 2017-05-20  Bruno Haible  <bruno@clisp.org>
51817         argp, tsearch tests: Fix file list.
51818         * modules/argp-tests (Files): Add tests/macros.h.
51819         * modules/tsearch-tests (Files): Likewise.
51821 2017-05-20  Bruno Haible  <bruno@clisp.org>
51823         getopt-posix tests: Remove redundant include.
51824         * tests/test-getopt.h: Don't include "macros.h". It's already included
51825         by tests/test-getopt-main.h.
51827 2017-05-19  Jim Meyering  <meyering@fb.com>
51829         dfa: two small simplifications
51830         * lib/dfa.c (build_state): Avoid repeating longer expressions.
51832 2017-05-18  Jim Meyering  <meyering@fb.com>
51834         fallthrough: update for GCC 7/8
51835         * lib/quotearg.c (FALLTHROUGH): New macro.
51836         Use it whenever one switch case falls through into the next,
51837         replacing "/* Fall through */" comments.  This exposed one
51838         instance of an unwarranted "fall through" comment: unwarranted
51839         because it preceded a "goto" label not a case statement.
51840         * lib/freopen-safer.c (freopen_safer): Likewise.
51841         * lib/fts.c (leaf_optimization_applies): Likewise.
51842         * lib/unistr/u8-uctomb-aux.c (u8_uctomb_aux): Likewise.
51843         * tests/test-getopt_long.h (getopt_long_loop): Likewise.
51844         * tests/test-tsearch.c (mangle_tree): Likewise.  Also include
51845         tests/macros.h for the definition.
51846         * tests/test-argp.c (group1_parser): Likewise.
51847         * tests/test-getopt.h (getopt_loop): Likewise.
51849 2017-05-19  Paul Eggert  <eggert@cs.ucla.edu>
51851         argp: fix shift bug
51852         * lib/argp-parse.c (parser_parse_opt): Rework to avoid undefined
51853         behavior on shift overflow, caught by gcc -fsanitize=undefined.
51855         argp: fix pointer-subtraction bug
51856         * lib/argp-help.c (hol_append): Don’t subtract pointers to
51857         different arrays, as this can run afoul of -fcheck-pointer-bounds.
51858         See the thread containing Bruno Haible’s report in:
51859         http://lists.gnu.org/r/bug-gnulib/2017-05/msg00171.html
51861 2017-05-19  Bruno Haible  <bruno@clisp.org>
51863         printf-posix tests: Avoid test failure with "gcc --coverage".
51864         Reported by Tim Rühsen <tim.ruehsen@gmx.de>.
51865         * tests/test-printf-posix2.c (main): Test a width of 10000000 rather
51866         than 5000000.
51867         * tests/test-fprintf-posix2.c (main): Likewise.
51869 2017-05-19  Paul Eggert  <eggert@cs.ucla.edu>
51871         closeout: don’t close stderr when sanitizing
51872         * NEWS: Document this.
51873         * lib/closeout.c (__has_feature): New macro, if not already defined.
51874         (SANITIZE_ADDRESS): New constant.
51875         (close_stdout): Don’t close stderr if sanitizing addresses.
51877 2017-05-19  Bruno Haible  <bruno@clisp.org>
51879         get-rusage-data tests: Avoid failure on Linux/glibc.
51880         * tests/test-get-rusage-data.c (main): Don't expect a strict increase
51881         on glibc systems.
51883 2017-05-18  Bruno Haible  <bruno@clisp.org>
51885         localename: Include necessary header files on Cygwin.
51886         * lib/localename.c [__CYGWIN__]: Include <langinfo.h>, since this is
51887         where NL_LOCALE_NAME is defined.
51889 2017-05-18  Bruno Haible  <bruno@clisp.org>
51891         gettext: Update macros from gettext git.
51892         * m4/intldir.m4: Require Autoconf >= 2.60.
51893         * m4/progtest.m4: Fix typos in copyright notice.
51895 2017-05-18  Bruno Haible  <bruno@clisp.org>
51897         copy-file tests: Fix link error (regression from 2017-05-01).
51898         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
51899         * modules/copy-file-tests (Makefile.am): Link test-copy-file with
51900         $(LIB_CLOCK_GETTIME).
51902 2017-05-18  Bruno Haible  <bruno@clisp.org>
51904         unicase/special-casing: Fix incompatibility with gperf-3.0.4
51905         (regression from 2017-02-13).
51906         * lib/unicase/special-casing.in.h: Renamed from
51907         lib/unicase/special-casing.h.
51908         * modules/unicase/special-casing (Files): Add
51909         lib/unicase/special-casing.in.h. Remove lib/unicase/special-casing.h.
51910         (Makefile.am): Add rule for generating unicase/special-casing.h.
51911         Update BUILT_SOURCES and MOSTLYCLEANFILES accordingly.
51912         * lib/unicase/special-casing.c: Include "unicase/special-casing.h",
51913         not "special-casing.h".
51914         * lib/unicase/u*.c: Likewise.
51916 2017-05-17  Bruno Haible  <bruno@clisp.org>
51918         README: Don't ask people to read a TeXinfo file.
51919         Reported by Tim Rühsen <tim.ruehsen@gmx.de>.
51920         * README: Tell people how to read the HTML formatted manual.
51922 2017-05-16  Tim Rühsen  <tim.ruehsen@gmx.de>
51924         parse-datetime: Fix memleak
51925         * lib/parse-datetime.y (parse_datetime2): Cleanup on
51926         localtime_rz() failure.
51928 2017-05-16  Bruno Haible  <bruno@clisp.org>
51930         javacomp: Fix handle leak.
51931         Found by Coverity.
51932         * lib/javacomp.c (get_classfile_version): Close fd before returning.
51934 2017-05-16  Bruno Haible  <bruno@clisp.org>
51936         relocate: Make it easier to reclaim allocated memory.
51937         * lib/relocatable.h (relocate2): New declaration/macro.
51938         * lib/relocatable.c (relocate2): New function.
51939         * doc/relocatable-maint.texi (Supporting Relocation): Mention the
51940         relocate2 function.
51941         * lib/localcharset.c (relocate2): Define fallback.
51942         (get_charset_aliases): Invoke relocate2 instead of relocate. Free the
51943         allocated memory.
51944         * lib/javaversion.c (relocate2): Define fallback.
51945         (javaexec_version): Invoke relocate2 instead of relocate. Free the
51946         allocated memory.
51948 2017-05-16  Bruno Haible  <bruno@clisp.org>
51950         relocate: Simplify EMX specific code.
51951         * lib/relocatable.c (relocate): Assume pathname is non-NULL. Use
51952         ISSLASH macro consistently. Avoid dangerous string concatenation idiom.
51954 2017-05-16  Bruno Haible  <bruno@clisp.org>
51956         sigpipe tests: Fix file list.
51957         * modules/sigpipe-tests (Files): Add tests/macros.h.
51959 2017-05-16  Paul Eggert  <eggert@cs.ucla.edu>
51961         manywarnings: update for GCC 7
51962         * build-aux/gcc-warning.spec:
51963         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC):
51964         Add GCC 7 warnings, notably -Wimplicit-fallthrough=5, which
51965         requires a non-comment fallthrough attribute.  This is a bit
51966         cleaner than the comment versions.
51967         * lib/strftime.c, lib/dfa.c, lib/fnmatch.c, lib/mbrtowc.c:
51968         * lib/vasnprintf.c, tests/macros.h (FALLTHROUGH): New macro.
51969         Use it whenever one switch case falls through into the next.
51970         * lib/fnmatch_loop.c, tests/test-mbrtowc.c, tests/test-sigpipe.c:
51971         Use FALLTHROUGH macro.
51973 2017-05-15  Bruno Haible  <bruno@clisp.org>
51975         gnulib-tool: Fix generated code when libtests contains module 'alloca'.
51976         * gnulib-tool (func_emit_tests_Makefile_am): For libtests.a, use
51977         @ALLOCA@, not @LTALLOCA@.
51979 2017-05-15  Bruno Haible  <bruno@clisp.org>
51981         sys_select: Avoid "was expanded before it was required" warning.
51982         * modules/sys_select (configure.ac): Require, not invoke,
51983         gl_HEADER_SYS_SELECT.
51985 2017-05-14  Paul Eggert  <eggert@cs.ucla.edu>
51987         gnulib-tool: improve GNU Make debugging
51988         * gnulib-tool (func_emit_lib_Makefile_am): Omit unnecessary echo.
51989         Report autoconf diagnostics when it fails, in the output makefile.
51991 2017-05-14  Bruno Haible  <bruno@clisp.org>
51993         stat-time tests: Improve comment.
51994         * tests/test-stat-time.c: Add hyperlink, from Paul Eggert.
51996 2017-05-14  Bruno Haible  <bruno@clisp.org>
51998         same-inode: Adapt for windows-stat-inodes.
51999         * lib/same-inode.h: Include <sys/types.h>.
52000         (SAME_INODE) [_GL_WINDOWS_STAT_INODES]: Define specifically.
52001         * modules/same-inode (Depends-on): Add sys_types.
52003 2017-05-14  Bruno Haible  <bruno@clisp.org>
52005         windows-stat-inodes: New module.
52006         * m4/windows-stat-inodes.m4: New file.
52007         * m4/sys_types_h.m4 (gl_SYS_TYPES_H): Set WINDOWS_STAT_INODES.
52008         * modules/sys_types (Makefile.am): Substitute WINDOWS_STAT_INODES.
52009         * lib/sys_types.in.h [WINDOWS_STAT_INODES]: Override dev_t and ino_t.
52010         (_GL_WINDOWS_STAT_INODES): New macro.
52011         * lib/stat-w32.c: Set _WIN32_WINNT. Include <string.h>, verify.h.
52012         (GetFileInformationByHandleExFunc): New variable.
52013         (initialize): Initialize it.
52014         (_gl_fstat_by_handle) [_GL_WINDOWS_STAT_INODES]: Initialize st_dev and
52015         st_ino appropriately.
52016         * lib/stat.c (rpl_stat): Use the directory entry based approach only as
52017         a fallback, because it does not provide st_dev and st_ino values.
52018         * modules/fstat (Depends-on): Add 'verify'.
52019         * modules/windows-stat-inodes: New file.
52020         * doc/windows-stat-inodes.texi: New file.
52021         * doc/gnulib.texi: Include it.
52022         * doc/posix-headers/sys_stat.texi: Mention the new module.
52024 2017-05-14  Bruno Haible  <bruno@clisp.org>
52026         stat-time tests: Workaround for native Windows.
52027         * tests/test-stat-time.c: Include <stdio.h>, <time.h>.
52028         (filename_stamp1, filename_testfile, filename_stamp2, filename_stamp3):
52029         New variables.
52030         (initialize_filenames): New function.
52031         (main): Invoke it.
52032         (cleanup, prepare_test): Update.
52034 2017-05-14  Bruno Haible  <bruno@clisp.org>
52036         stat-time: Adapt for windows-stat-timespec.
52037         * lib/stat-time.h (get_stat_birthtime) [_GL_WINDOWS_STAT_TIMESPEC]: Use
52038         entire st_ctim field.
52040 2017-05-13  Jim Meyering  <meyering@fb.com>
52042         maint.mk: update regex to reflect 2013 addition of "assume" to verify.h
52043         * top/maint.mk (sc_prohibit_verify_without_use): Don't reject a source
52044         file that uses the assume macro, claiming that verify.h is unused.
52046 2017-05-13  Bruno Haible  <bruno@clisp.org>
52048         Use symbolic values for _WIN32_WINNT.
52049         * lib/ftruncate.c (_WIN32_WINNT): Use symbolic value _WIN32_WINNT_WIN2K.
52050         * lib/sethostname.c (_WIN32_WINNT): Likewise.
52052 2017-05-13  Bruno Haible  <bruno@clisp.org>
52054         year2038: New module.
52055         * m4/year2038.m4: New file.
52056         * modules/year2038: New file.
52057         * doc/year2038.texi: New file.
52058         * doc/gnulib.texi: Include it.
52060 2017-05-13  Bruno Haible  <bruno@clisp.org>
52062         largefile: Simplify.
52063         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Remove unused definition
52064         of _GL_WINDOWS_64_BIT_ST_SIZE.
52066 2017-05-13  Bruno Haible  <bruno@clisp.org>
52068         largefile: Improve and document.
52069         * m4/largefile.m4 (gl_LARGEFILE): Set WINDOWS_64_BIT_ST_SIZE to 0 if
52070         the mingw headers already define 'stat' appropriately.
52071         * modules/largefile (Description): Clarify.
52072         * doc/largefile.texi: New file.
52073         * doc/gnulib.texi: Include it.
52074         * doc/posix-headers/sys_types.texi: Update.
52076 2017-05-13  Bruno Haible  <bruno@clisp.org>
52078         truncate: New module.
52079         * lib/unistd.in.h (truncate): New declaration.
52080         * lib/truncate.c: New file.
52081         * m4/truncate.m4: New file.
52082         * m4/unistd_h.m4 (gl_UNISTD_H): Test whether 'truncate' is declared.
52083         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_TRUNCATE, HAVE_TRUNCATE,
52084         REPLACE_TRUNCATE.
52085         * modules/unistd (Makefile.am): Substitute GNULIB_TRUNCATE,
52086         HAVE_TRUNCATE, REPLACE_TRUNCATE.
52087         * modules/truncate: New file.
52088         * tests/test-unistd-c++.cc (truncate): Test signature.
52089         * doc/posix-functions/truncate.texi: Mention the new module.
52091         * tests/test-truncate.c: New file.
52092         * modules/truncate-tests: New file.
52094 2017-05-13  Bruno Haible  <bruno@clisp.org>
52096         windows-stat-timespec: New module.
52097         * modules/windows-stat-timespec: New file.
52098         * m4/windows-stat-timespec.m4: New file.
52099         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Set WINDOWS_STAT_TIMESPEC.
52100         * modules/sys_stat (Makefile.am): Substitute WINDOWS_STAT_TIMESPEC.
52101         * lib/sys_stat.in.h (struct stat) [WINDOWS_STAT_TIMESPEC]: Declare with
52102         fields st_atim, st_mtim, st_ctim.
52103         (st_atime, st_mtime, st_ctime): Define as macros.
52104         (_GL_WINDOWS_STAT_TIMESPEC): New macro.
52105         * lib/stat-w32.h (_gl_convert_FILETIME_to_timespec)
52106         [_GL_WINDOWS_STAT_TIMESPEC]: New declaration.
52107         * lib/stat-w32.c (_gl_convert_FILETIME_to_timespec)
52108         [_GL_WINDOWS_STAT_TIMESPEC]: New function.
52109         (_gl_convert_FILETIME_to_POSIX): Adjust coding style.
52110         (_gl_fstat_by_handle): If _GL_WINDOWS_STAT_TIMESPEC, convert the
52111         FILETIME to 'struct timespec', not 'time_t'.
52112         * lib/stat.c (rpl_stat): If _GL_WINDOWS_STAT_TIMESPEC, convert the
52113         FILETIME to 'struct timespec', not 'time_t'.
52114         * lib/stat-time.h (STAT_TIMESPEC): Define also if
52115         _GL_WINDOWS_STAT_TIMESPEC.
52116         * doc/windows-stat-timespec.texi: New file.
52117         * doc/gnulib.texi: Include it.
52119 2017-05-13  Bruno Haible  <bruno@clisp.org>
52121         windows-stat-override: New module.
52122         * lib/sys_stat.in.h (stat) [GNULIB_OVERRIDES_STRUCT_STAT]: Provide own
52123         definition. Define GNULIB_defined_struct_stat.
52124         (fstat, fstatat, lstat, stat) [GNULIB_OVERRIDES_STRUCT_STAT]: Provoke
52125         link error if this symbol is used and the corresponding module is not
52126         in use.
52127         (_stat64, _stat32i64, _stati64, _stat32, _stat64i32): Don't redefine if
52128         GNULIB_OVERRIDES_STRUCT_STAT.
52129         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize
52130         GNULIB_OVERRIDES_STRUCT_STAT.
52131         * modules/sys_stat (Makefile.am): Substitute
52132         GNULIB_OVERRIDES_STRUCT_STAT.
52133         * modules/windows-stat-override: New file.
52135 2017-05-13  Bruno Haible  <bruno@clisp.org>
52137         fstat: Fix module dependency conditions.
52138         * modules/fstat (Depends-on): Fix typo.
52140 2017-05-13  Bruno Haible  <bruno@clisp.org>
52142         stat, fstat: Complete removal of old native Windows code.
52143         * lib/stat.c: Remove old macrology for WINDOWS_NATIVE.
52144         * lib/fstat.c: Likewise.
52145         * lib/stat-w32.c: Likewise.
52147 2017-05-13  Bruno Haible  <bruno@clisp.org>
52149         stat: Complete removal of REPLACE_FUNC_STAT_DIR code.
52150         * lib/stat.c: Remove all REPLACE_FUNC_STAT_DIR code.
52152 2017-05-11  Paul Eggert  <eggert@cs.ucla.edu>
52154         getopt-posix: port to mingw
52155         * lib/getopt.c (flockfile, funlockfile): Define on mingw.
52156         Problem reported by Daniel P. Berrage in:
52157         http://lists.gnu.org/r/bug-gnulib/2017-05/msg00086.html
52159 2017-05-11  Bruno Haible  <bruno@clisp.org>
52161         gettimeofday: Increase precision on mingw.
52162         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Require AC_CANONICAL_HOST.
52163         Set REPLACE_GETTIMEOFDAY to 1 on mingw.
52164         * lib/gettimeofday.c (gettimeofday): On native Windows, use the
52165         GetSystemTimePreciseAsFileTime based implementation always.
52166         * doc/posix-functions/gettimeofday.texi: Mention precision problem on
52167         mingw.
52169 2017-05-11  Bruno Haible  <bruno@clisp.org>
52171         poll: Fix confusion between SOCKETs and FDs on native Windows.
52172         Fix proposed by Daniel P. Berrange <berrange@redhat.com>.
52173         * lib/poll.c [WINDOWS_NATIVE]: Undefine select.
52175 2017-05-11  Bruno Haible  <bruno@clisp.org>
52177         doc: Clarify doc about socket functions on native Windows.
52178         This reworks doc that was added on 2008-09-29.
52179         * doc/posix-functions/select.texi: Fix copy-and-paste mistake and use
52180         clearer wording.
52181         * doc/posix-functions/accept.texi: Use clearer wording.
52182         * doc/posix-functions/bind.texi: Likewise.
52183         * doc/posix-functions/connect.texi: Likewise.
52184         * doc/posix-functions/getpeername.texi: Likewise.
52185         * doc/posix-functions/getsockname.texi: Likewise.
52186         * doc/posix-functions/getsockopt.texi: Likewise.
52187         * doc/posix-functions/ioctl.texi: Likewise.
52188         * doc/posix-functions/listen.texi: Likewise.
52189         * doc/posix-functions/recv.texi: Likewise.
52190         * doc/posix-functions/recvfrom.texi: Likewise.
52191         * doc/posix-functions/send.texi: Likewise.
52192         * doc/posix-functions/sendto.texi: Likewise.
52193         * doc/posix-functions/setsockopt.texi: Likewise.
52194         * doc/posix-functions/shutdown.texi: Likewise.
52195         * doc/posix-functions/socket.texi: Likewise.
52197 2017-05-10  Bruno Haible  <bruno@clisp.org>
52199         poll: Fix link error on native Windows.
52200         * lib/poll.c [WINDOWS_NATIVE]: Undefine recv.
52202 2017-05-10  Bruno Haible  <bruno@clisp.org>
52204         time: Fix missing initialization of HAVE_TIMEZONE_T.
52205         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize HAVE_TIMEZONE_T
52206         here...
52207         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_DEFAULTS): ... not here.
52208         * m4/time_rz.m4 (gl_TIME_RZ): Require gl_HEADER_TIME_H_DEFAULTS, not
52209         gl_HEADER_SYS_TIME_H_DEFAULTS.
52210         * modules/time_rz (Depends-on): Add 'time'. Remove useless quoting.
52211         (configure.ac): Remove useless quoting.
52213 2017-05-10  Bruno Haible  <bruno@clisp.org>
52215         Implement a way to opt out from MSVC support, part 2.
52216         * modules/msvc-inval (Include): Document recommended idiom.
52217         * modules/msvc-nothrow (Include): Likewise.
52219         Implement a way to opt out from MSVC support.
52220         This is useful for Emacs.
52221         * modules/msvc-nothrow (configure.ac): Invoke gl_MODULE_INDICATOR.
52222         * lib/accept4.c: Include <io.h> as an alternative to msvc-nothrow.h.
52223         * lib/error.c: Likewise.
52224         * lib/fcntl.c: Likewise.
52225         * lib/flock.c: Likewise.
52226         * lib/fstat.c: Likewise.
52227         * lib/fsync.c: Likewise.
52228         * lib/ioctl.c: Likewise.
52229         * lib/isapipe.c: Likewise.
52230         * lib/lseek.c: Likewise.
52231         * lib/nonblocking.c: Likewise.
52232         * lib/poll.c: Likewise.
52233         * lib/select.c: Likewise.
52234         * lib/sockets.h: Likewise.
52235         * lib/sockets.c: Likewise.
52236         * lib/stdio-read.c: Likewise.
52237         * lib/stdio-write.c: Likewise.
52238         * lib/utimens.c: Likewise.
52239         * lib/w32sock.h: Likewise.
52240         * lib/w32spawn.h: Likewise.
52241         * tests/test-cloexec.c: Likewise.
52242         * tests/test-dup-safer.c: Likewise.
52243         * tests/test-dup2.c: Likewise.
52244         * tests/test-dup3.c: Likewise.
52245         * tests/test-fcntl.c: Likewise.
52246         * tests/test-pipe.c: Likewise.
52247         * tests/test-pipe2.c: Likewise.
52248         * lib/ftruncate.c: Likewise.
52249         (chsize_nothrow): Renamed from chsize.
52250         * lib/msvc-nothrow.c: Don't include msvc-inval.h if
52251         HAVE_MSVC_INVALID_PARAMETER_HANDLER is not defined.
52252         * lib/close.c: Likewise.
52253         * lib/dup.c: Likewise.
52254         * lib/fclose.c: Likewise.
52255         * lib/raise.c: Likewise.
52256         * tests/test-fgetc.c: Likewise.
52257         * tests/test-fputc.c: Likewise.
52258         * tests/test-fread.c: Likewise.
52259         * tests/test-fwrite.c: Likewise.
52260         * lib/getdtablesize.c: Likewise.
52261         (_setmaxstdio_nothrow): Renamed from _setmaxstdio.
52262         * lib/isatty.c: Don't include msvc-inval.h if
52263         HAVE_MSVC_INVALID_PARAMETER_HANDLER is not defined.
52264         Include <io.h> as an alternative to msvc-nothrow.h.
52265         * lib/read.c: Likewise.
52266         * lib/write.c: Likewise.
52267         * lib/dup2.c: Likewise.
52268         (dup2_nothrow): New function.
52269         (ms_windows_dup2): Use it.
52270         * m4/close.m4 (gl_FUNC_CLOSE): Invoke gl_MSVC_INVAL and test
52271         HAVE_MSVC_INVALID_PARAMETER_HANDLER only if gl_MSVC_INVAL is defined.
52272         * m4/dup.m4 (gl_FUNC_DUP): Likewise.
52273         * m4/fdopen.m4 (gl_FUNC_FDOPEN): Likewise.
52274         * m4/raise.m4 (gl_FUNC_RAISE): Likewise.
52275         * m4/read.m4 (gl_FUNC_READ): Likewise.
52276         * m4/write.m4 (gl_FUNC_WRITE): Likewise.
52277         * doc/windows-without-msvc.texi: New file.
52278         * doc/gnulib.texi (Native Windows Support without MSVC Support): New
52279         section.
52281 2017-05-10  Bruno Haible  <bruno@clisp.org>
52283         wait-process: Adjust native Windows support.
52284         * lib/wait-process.c: Use the usual condition for recognizing a native
52285         Windows platform.
52287 2017-05-10  Bruno Haible  <bruno@clisp.org>
52289         doc: New chapter "Native Windows Support".
52290         * doc/gnulib.texi (Native Windows Support): New chapter.
52291         * doc/windows-libtool.texi: Small wording changes.
52292         * doc/windows-sockets.texi: Small wording and formatting changes.
52294 2017-05-10  Bruno Haible  <bruno@clisp.org>
52296         doc: Move section "Library version handling".
52297         * doc/gnulib.texi: Move section "Library version handling"
52298         from chapter "Miscellaneous Notes" to chapter "Particular Modules".
52300 2017-05-10  Bruno Haible  <bruno@clisp.org>
52302         doc: Move section "Running self-tests under valgrind".
52303         * doc/gnulib.texi: Move section "Running self-tests under valgrind"
52304         from chapter "Particular Modules" to chapter "Miscellaneous Notes".
52306 2017-05-10  Bruno Haible  <bruno@clisp.org>
52308         doc: New chapter "Build Infrastructure Modules".
52309         * doc/gnulib.texi (Build Infrastructure Modules): New chapter.
52311 2017-05-10  Bruno Haible  <bruno@clisp.org>
52313         Prepare for reordering sections in the manual.
52314         * doc/gnulib.texi: Move several sections to separate files. Include
52315         these files.
52316         * doc/out-of-memory.texi: New file, extracted from doc/gnulib.texi.
52317         * doc/obsolete.texi: Likewise.
52318         * doc/extra-tests.texi: Likewise.
52319         * doc/transversal.texi: Likewise.
52320         * doc/namespace.texi: Likewise.
52321         * doc/check-version.texi: Likewise.
52322         * doc/windows-sockets.texi: Likewise.
52323         * doc/windows-libtool.texi: Likewise.
52324         * doc/licenses-texi.texi: Likewise.
52325         * doc/build-automation.texi: Likewise.
52326         * doc/c-locale.texi: Likewise.
52328 2017-05-10  Bruno Haible  <bruno@clisp.org>
52330         Fix instructions how to update manual on www.gnu.org.
52331         * doc/README: Add -I option, so that texi2dvi finds texinfo.tex.
52333 2017-05-09  Bruno Haible  <bruno@clisp.org>
52335         tzset: Expand comment about TZ problem on native Windows.
52336         * lib/tzset.c (tzset): Elaborate comment, based on explanations by
52337         Paul Eggert.
52338         * lib/ctime.c (rpl_ctime): Likewise.
52339         * lib/localtime.c (rpl_localtime): Likewise.
52340         * lib/mktime.c (mktime): Likewise.
52341         * lib/strftime-fixes.c (rpl_strftime): Likewise.
52342         * lib/wcsftime.c (rpl_wcsftime): Likewise.
52344 2017-05-08  Paul Eggert  <eggert@cs.ucla.edu>
52346         intprops: don’t depend on ‘verify’
52347         Problem reported by Ævar Arnfjörð Bjarmason in:
52348         http://lists.gnu.org/r/bug-gnulib/2017-05/msg00054.html
52349         * lib/intprops.h: Do not include verify.h, and move compile-time
52350         checks from here ...
52351         * tests/test-intprops.c (main): ... to here, if they’re not here
52352         already.  Check widths of other standard integer types.
52353         * modules/intprops (Depends-on): Remove ‘verify’.
52355 2017-05-07  Bruno Haible  <bruno@clisp.org>
52357         utimens: On native Windows, support 100ns resolution also if fd < 0.
52358         * lib/utime.in.h: Include <time.h>.
52359         (_gl_utimens_windows): New declaration.
52360         * lib/utime.c (_gl_utimens_windows): New function, based on utime.
52361         (utime): Invoke it.
52362         * lib/utimens.c (fdutimens): On native Windows, call _gl_utimens_windows
52363         instead of utime.
52364         * modules/utime (Depends-on): Add 'time'.
52366 2017-05-07  Bruno Haible  <bruno@clisp.org>
52368         utimens: Improve error code on native Windows.
52369         * lib/utimens.c (fdutimens): If fd was not opened with O_RDWR, fail with
52370         error code EACCES, not EINVAL.
52372 2017-05-07  Bruno Haible  <bruno@clisp.org>
52374         utime: Handle more Windows error codes.
52375         * lib/utime.c (utime): Handle ERROR_BAD_NETPATH.
52376         Based on explanations by Billy O'Neal.
52378 2017-05-05  Bruno Haible  <bruno@clisp.org>
52380         crypto/rijndael: Fix "strict-aliasing rules" warnings, alignment issues.
52381         * lib/rijndael-api-fst.c (rijndaelBlockEncrypt): Declare 'block' as a
52382         union.
52383         (rijndaelPadEncrypt, rijndaelBlockDecrypt): Likewise.
52384         (rijndaelPadDecrypt): Likewise. Use local variable 'iv' to cache the
52385         value of cipher->IV.
52387 2017-05-05  Bruno Haible  <bruno@clisp.org>
52389         wctype-h-c++-tests: Update.
52390         * tests/test-wctype-h-c++.cc: Reorder to match lib/wchar.in.h.
52392 2017-05-05  Bruno Haible  <bruno@clisp.org>
52394         wchar-c++-tests: Update.
52395         * tests/test-wchar-c++.cc (wcsftime): Declare, missing since 2017-04-30.
52397 2017-05-05  Bruno Haible  <bruno@clisp.org>
52399         utime-h-c++-tests: New module.
52400         * tests/test-utime-h-c++.cc: New file.
52401         (utime): Declare, missing since 2017-04-30.
52402         * modules/utime-h-c++-tests: New file.
52404 2017-05-05  Bruno Haible  <bruno@clisp.org>
52406         unistd-c++-tests: Update.
52407         * tests/test-unistd-c++.cc (isatty): Declare, missing since 2012-01-03.
52408         (read): Declare, missing since 2011-04-15.
52409         (sethostname): Declare, missing since 2011-12-03.
52411 2017-05-05  Bruno Haible  <bruno@clisp.org>
52413         time-c++-tests: Update.
52414         * tests/test-time-c++.cc (tzset): Declare, missing since 2017-05-01.
52415         (localtime, gmtime): Declare, missing since 2017-04-30.
52416         (ctime): Declare, missing since 2017-04-30.
52417         (strftime): Declare, missing since 2017-04-30.
52418         (tzalloc, tzfree, localtime_rz, mktime_z): Declare, missing since
52419         2015-07-24.
52421 2017-05-05  Bruno Haible  <bruno@clisp.org>
52423         sys_resource-c++-tests: New module.
52424         * tests/test-sys_resource-c++.cc: New file.
52425         (getrusage): Declare, missing since 2012-04-13.
52426         * modules/sys_resource-c++-tests: New file.
52428 2017-05-05  Bruno Haible  <bruno@clisp.org>
52430         strings-c++-tests: New module.
52431         * tests/test-strings-c++.cc: New file.
52432         (ffs): Declare, missing since 2011-07-12.
52433         * modules/strings-c++-tests: New file.
52435 2017-05-05  Bruno Haible  <bruno@clisp.org>
52437         string-c++-tests: Update.
52438         * tests/test-string-c++.cc (ffsl): Declare, missing since 2011-07-15.
52439         (ffsll): Declare, missing since 2011-07-15.
52441 2017-05-05  Bruno Haible  <bruno@clisp.org>
52443         stdlib-c++-tests: Update.
52444         * tests/test-stdlib-c++.cc (posix_openpt): Declare, missing since
52445         2011-10-18.
52446         (ptsname_r): Declare, missing since 2011-11-07.
52447         (qsort_r): Declare, missing since 2014-08-29.
52448         (random, srandom, initstate, setstate): Declare, missing since
52449         2012-01-14.
52450         (secure_getenv): Declare, missing since 2013-02-05.
52452 2017-05-05  Bruno Haible  <bruno@clisp.org>
52454         stdio-c++-tests: Update.
52455         * tests/test-stdio-c++.cc (pclose): Declare, missing since 2011-09-18.
52457 2017-05-05  Bruno Haible  <bruno@clisp.org>
52459         signal-h-c++-tests: Update.
52460         * tests/test-signal-h-c++.cc (raise): Remove redundant declaration.
52462 2017-05-05  Bruno Haible  <bruno@clisp.org>
52464         math-c++-tests: Update.
52465         * tests/test-math-c++.cc (fmaf): Declare, missing since 2011-10-17.
52466         (fma): Declare, missing since 2011-10-17.
52467         (fmal): Declare, missing since 2011-10-17.
52469 2017-05-05  Bruno Haible  <bruno@clisp.org>
52471         locale-c++-tests: Update.
52472         * tests/test-locale-c++.cc (localeconv): Declare, missing since
52473         2012-03-25.
52475 2017-05-05  Bruno Haible  <bruno@clisp.org>
52477         inttypes-c++-tests: New module.
52478         * tests/test-inttypes-c++.cc: New file.
52479         (strtoimax): Declare, missing since 2012-01-05.
52480         (strtoumax): Declare, missing since 2012-01-05.
52481         * modules/inttypes-c++-tests: New file.
52483 2017-05-05  Bruno Haible  <bruno@clisp.org>
52485         dirent-c++-tests: Update.
52486         * tests/test-dirent-c++.cc (readdir): Declare, missing since 2011-09-13.
52487         (rewinddir): Declare, missing since 2011-09-13.
52488         (dirfd): Declare, missing since 2010-03-08.
52490 2017-05-04  Bruno Haible  <bruno@clisp.org>
52492         argp: Fix mistake in 2017-04-23 commit.
52493         * lib/argp-help.c (__argp_failure): If GNULIB_STRERROR_R_POSIX is set,
52494         assume that strerror_r returns 'int', not 'char *'.
52496 2017-05-04  Reuben Thomas  <rrt@sc3d.org>
52498         argp: Fix typo.
52499         * lib/argp-help.c (argp_doc): Fix spelling mistake in comment.
52501 2017-05-02  Paul Eggert  <eggert@cs.ucla.edu>
52503         utimens: port to Emacs + MS-Windows
52504         Skip the new MS-Windows-specific code if Emacs.
52505         * lib/utimens.c [EMACS_CONFIGUATION]:
52506         Avoid new MS-Windows-specific code.
52507         (USE_SETFILETIME): New macro.
52508         (fdutimens): Use it.
52510 2017-05-01  Paul Eggert  <eggert@cs.ucla.edu>
52512         tzset: update doc for TZ problems on MS-Windows
52513         * doc/posix-functions/ctime.texi,  doc/posix-functions/daylight.texi:
52514         * doc/posix-functions/localtime.texi, doc/posix-functions/mktime.texi:
52515         * doc/posix-functions/strftime.texi, doc/posix-functions/timezone.texi:
52516         * doc/posix-functions/tzname.texi, doc/posix-functions/tzset.texi:
52517         * doc/posix-functions/wcsftime.texi:
52518         Mention some issues with TZ under MS-Windows.
52520 2017-05-01  Bruno Haible  <bruno@clisp.org>
52522         copy-file: Fix build error on mingw.
52523         * modules/copy-file (Depends-on): Add 'close'.
52525 2017-05-01  Bruno Haible  <bruno@clisp.org>
52527         tzset: Work around TZ problem on native Windows.
52528         * m4/tzset.m4 (gl_FUNC_TZSET): Require AC_CANONICAL_HOST. On native
52529         Windows, set REPLACE_TZSET to 1.
52530         * lib/tzset.c (tzset): On native Windows, fix TZ if necessary, and
52531         invoke '_tzset' instead of 'tzset'.
52532         * doc/posix-functions/tzset.texi: Mention the native Windows workaround.
52534         * modules/time_rz (Depends-on): Add tzset.
52535         * lib/time_rz.c (tzset): Remove fallback definition.
52536         * m4/time_rz.m4 (gl_TIME_RZ): Don't test for tzset.
52538 2017-05-01  Bruno Haible  <bruno@clisp.org>
52540         mktime: Fix dependencies.
52541         * modules/mktime (Depends-on): Add 'time'.
52543 2017-05-01  Bruno Haible  <bruno@clisp.org>
52545         New module 'localtime-buffer', split off from module 'gettimeofday'.
52546         * lib/localtime-buffer.h: New file.
52547         * lib/localtime-buffer.c: New file, extracted from lib/gettimeofday.c.
52548         * lib/time.in.h (tzset): New declaration.
52549         (localtime, gmtime): Don't test GNULIB_GETTIMEOFDAY.
52550         * lib/tzset.c: New file, extracted from lib/gettimeofday.c.
52551         * lib/gettimeofday.c: Include localtime-buffer.h. Remove code that was
52552         moved to lib/localtime-buffer.c or lib/tzset.c.
52553         * m4/localtime-buffer.m4: New file.
52554         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_TZSET,
52555         HAVE_TZSET, REPLACE_TZSET.
52556         * m4/tzset.m4 (gl_FUNC_TZSET): Move code from m4/gettimeofday.m4 to
52557         here, with modifications. Set HAVE_TZSET, REPLACE_TZSET. Invoke
52558         gl_LOCALTIME_BUFFER_NEEDED.
52559         (gl_FUNC_TZSET_CLOBBER): Don't require gl_HEADER_SYS_TIME_H; not needed
52560         since 2007-01-18.
52561         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Remove code that deals with
52562         tzset.
52563         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Require gl_LOCALTIME_BUFFER_DEFAULTS.
52564         Invoke gl_LOCALTIME_BUFFER_NEEDED instead of
52565         gl_GETTIMEOFDAY_REPLACE_LOCALTIME.
52566         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Remove macro.
52567         * modules/localtime-buffer: New file.
52568         * modules/time (Depends-on): Remove 'gettimeofday'.
52569         (Makefile.am): Substitute GNULIB_TZSET, HAVE_TZSET,
52570         REPLACE_TZSET. Don't substitute GNULIB_GETTIMEOFDAY.
52571         * modules/tzset (Description): Enable hyperlink to POSIX spec.
52572         (Files): Add lib/tzset.c.
52573         (Depends-on): Remove gettimeofday. Add localtime-buffer, time.
52574         (configure.ac): Arrange to conditionally compile lib/tzset.c. Invoke
52575         gl_TIME_MODULE_INDICATOR.
52576         * modules/gettimeofday (Depends-on): Add localtime-buffer.
52578 2017-05-01  Bruno Haible  <bruno@clisp.org>
52580         copy-file: Preserve sub-second time stamps.
52581         * lib/copy-file.c: Include stat-time.h, utimens.h instead of <utime.h>.
52582         (qcopy_file_preserving): Use 'struct timespec' and utimens() to
52583         transport the time stamps from the original file to the destination
52584         file.
52585         * m4/copy-file.m4 (gl_COPY_FILE): Don't test for utime, utimes.
52586         * modules/copy-file (Depends-on): Add stat-time, utimns instead of
52587         utime-h.
52589 2017-05-01  Bruno Haible  <bruno@clisp.org>
52591         wctype-t: Fix problems if <wchar.h> gets included after <wctype.h>.
52592         * lib/wctype.in.h: Include not only <ctype.h> but also <wchar.h>. Do so
52593         also on MSVC.
52594         Reported by Eli Zaretskii <eliz@gnu.org>.
52596 2017-05-01  Bruno Haible  <bruno@clisp.org>
52598         wchar: Fix compilation error with the original mingw.org mingw.
52599         * lib/wchar.in.h (rpl_wint_t): If <crtdefs.h> does not exist, include
52600         <stddef.h> instead.
52601         * m4/wint_t.m4 (gl_TYPE_WINT_T_PREREQ): New macro, extracted from
52602         gl_WCTYPE_H.
52603         * m4/wctype_h.m4 (gl_WCTYPE_H): Don't set HAVE_CRTDEFS_H here; require
52604         gl_TYPE_WINT_T_PREREQ instead.
52605         * m4/wchar_h.m4 (gl_WCHAR_H): Require gl_TYPE_WINT_T_PREREQ.
52606         * modules/wchar (Makefile.am): Substitute HAVE_CRTDEFS_H.
52607         Reported by Eli Zaretskii <eliz@gnu.org>.
52609 2017-04-30  Bruno Haible  <bruno@clisp.org>
52611         utimecmp: Add support for native Windows.
52612         * lib/utimecmp.c (SYSCALL_RESOLUTION): Set to 100 on native Windows.
52614 2017-04-30  Bruno Haible  <bruno@clisp.org>
52616         utimens: Add support for native Windows.
52617         * lib/utimens.c: Include <windows.h>, msvc-nothrow.h.
52618         (fdutimens): Provide a native Windows implementation, like utime.c with
52619         added tv_nsec support.
52620         * modules/utimens (Depends-on): Add msvc-nothrow, utime.
52621         Suggested by Tim Rühsen <tim.ruehsen@gmx.de>.
52623 2017-04-30  Bruno Haible  <bruno@clisp.org>
52625         wcsftime: New module.
52626         * lib/wchar.in.h (wcsftime): New declaration.
52627         * lib/wcsftime.c: New file.
52628         * m4/wcsftime.m4: New file.
52629         * m4/wchar_h.m4 (gl_WCHAR_H): Test for wcsftime declaration.
52630         (gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_WCSFTIME,
52631         HAVE_WCSFTIME, REPLACE_WCSFTIME.
52632         * modules/wchar (Makefile.am): Substitute GNULIB_WCSFTIME,
52633         HAVE_WCSFTIME, REPLACE_WCSFTIME.
52634         * modules/wcsftime: New file.
52635         * doc/posix-functions/wcsftime.texi: Mention the new module.
52637 2017-04-30  Bruno Haible  <bruno@clisp.org>
52639         strftime-fixes: New module.
52640         * lib/time.in.h (strftime): New declaration.
52641         * lib/strftime-fixes.c: New file.
52642         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Inline gl_FUNC_STRFTIME macro.
52643         (gl_FUNC_STRFTIME): Remove macro.
52644         * m4/strftime-fixes.m4: New file.
52645         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_STRFTIME,
52646         REPLACE_STRFTIME.
52647         * modules/time (Makefile.am): Substitute GNULIB_STRFTIME,
52648         REPLACE_STRFTIME.
52649         * modules/strftime-fixes: New file.
52650         * doc/posix-functions/strftime.texi: Mention the new module.
52652 2017-04-30  Bruno Haible  <bruno@clisp.org>
52654         mktime: Work around TZ problem on native Windows.
52655         * lib/mktime.c: Add #ifs to make the algorithmic workaround independent
52656         from the native Windows workaround.
52657         * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): New macro, extracted from
52658         gl_FUNC_MKTIME. If guessing, set gl_cv_func_working_mktime to
52659         'guessing no'.
52660         (gl_FUNC_MKTIME): Require it. Require AC_CANONICAL_HOST.
52661         Set REPLACE_MKTIME to 1 on native Windows. Define NEED_MKTIME_WORKING,
52662         NEED_MKTIME_WINDOWS.
52663         (gl_FUNC_MKTIME_INTERNAL): Require gl_FUNC_MKTIME_WORKS, not
52664         gl_FUNC_MKTIME. Set WANT_MKTIME_INTERNAL, not REPLACE_MKTIME. Define
52665         NEED_MKTIME_INTERNAL.
52666         * m4/timegm.m4 (gl_FUNC_TIMEGM): Require gl_FUNC_MKTIME_WORKS, not
52667         gl_FUNC_MKTIME. Cope with 'guessing yes' value.
52668         * modules/mktime-internal (configure.ac): Test WANT_MKTIME_INTERNAL,
52669         not REPLACE_MKTIME.
52670         * doc/posix-functions/mktime.texi: Mention the native Windows
52671         workaround.
52673 2017-04-30  Bruno Haible  <bruno@clisp.org>
52675         localtime: New module.
52676         * lib/time.in.h (localtime): Declare also if requested by module
52677         'localtime'.
52678         * lib/localtime.c: New file.
52679         * m4/localtime.m4: New file.
52680         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_LOCALTIME.
52681         * modules/time (Makefile.am): Substitute GNULIB_LOCALTIME.
52682         * modules/localtime: New file.
52683         * doc/posix-functions/localtime.texi: Mention the new module.
52685 2017-04-30  Bruno Haible  <bruno@clisp.org>
52687         ctime: New module.
52688         * lib/time.in.h (ctime): New declaration.
52689         * lib/ctime.c: New file.
52690         * m4/ctime.m4: New file.
52691         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_CTIME,
52692         REPLACE_CTIME.
52693         * modules/time (Makefile.am): Substitute GNULIB_CTIME, REPLACE_CTIME.
52694         * modules/ctime: New file.
52695         * doc/posix-functions/ctime.texi: Mention the new module.
52697 2017-04-30  Bruno Haible  <bruno@clisp.org>
52699         gettimeofday: Provide higher resolution on native Windows.
52700         * lib/gettimeofday.c: Don't include <sys/timeb.h>.
52701         (GetSystemTimePreciseAsFileTimeFuncType): New variable.
52702         (initialize): Initialize it.
52703         (gettimeofday) [WINDOWS_NATIVE]: Use it, and convert from FILETIME to
52704         'struct timeval'. Don't use _ftime().
52705         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): Don't test for
52706         <sys/timeb.h> and _ftime.
52708 2017-04-30  Bruno Haible  <bruno@clisp.org>
52710         Document the problem with the Cygwin environment variable TZ.
52711         * doc/posix-functions/tzset.texi: Add note about TZ.
52712         * doc/posix-functions/ctime.texi: Likewise.
52713         * doc/posix-functions/localtime.texi: Likewise.
52714         * doc/posix-functions/mktime.texi: Likewise.
52715         * doc/posix-functions/strftime.texi: Likewise.
52716         * doc/posix-functions/wcsftime.texi: Likewise.
52717         * doc/pastposix-functions/ftime.texi: Likewise.
52719 2017-04-30  Bruno Haible  <bruno@clisp.org>
52721         utime-tests: New module.
52722         * tests/test-utime.c: New file, based on tests/test-utimens.h.
52723         * tests/test-utimens-common.h: Include <sys/stat.h>.
52724         * modules/utime-tests: New file.
52726 2017-04-29  Bruno Haible  <bruno@clisp.org>
52728         utime: New module.
52729         * lib/utime.in.h: Add comment for snippets.
52730         (utime): New declaration.
52731         * lib/utime.c: New file.
52732         * m4/utime.m4: New file.
52733         * m4/utime_h.m4 (gl_UTIME_H): Test for utime declaration.
52734         (gl_UTIME_H_DEFAULTS): Initialize GNULIB_UTIME, HAVE_UTIME,
52735         REPLACE_UTIME.
52736         * modules/utime-h (Depends-on): Add snippets.
52737         (Makefile.am): Substitute GNULIB_UTIME, HAVE_UTIME, REPLACE_UTIME.
52738         Insert snippets.
52739         * modules/utime: New file.
52740         * doc/posix-functions/utime.texi: Mention the new module.
52742 2017-04-29  Bruno Haible  <bruno@clisp.org>
52744         utime-h: Modernize handling of 'struct utimbuf'.
52745         * lib/utime.in.h: Include next <utime.h> if it exists.
52746         (utimbuf): Define to _utimbuf on native Windows.
52747         * m4/utime_h.m4 (gl_UTIME_H): Check for prerequisites of include_next.
52748         Set UTIME_H on native Windows.
52749         (gl_UTIME_MODULE_INDICATOR, gl_HEADER_UTIME_H_DEFAULTS): New macros.
52750         * modules/utime-h (Depends-on): Add include_next.
52751         (Makefile.am): Substitute also HAVE_UTIME_H, INCLUDE_NEXT,
52752         PRAGMA_SYSTEM_HEADER, PRAGMA_COLUMNS, NEXT_UTIME_H.
52754         * lib/utimens.c (utimbuf): Remove fallback definition.
52755         * m4/utimens.m4 (gl_UTIMENS): Don't require
52756         gl_CHECK_TYPE_STRUCT_UTIMBUF.
52757         * m4/utimbuf.m4: Remove file.
52758         * modules/utimens (Files): Remove m4/utimbuf.m4.
52760 2017-04-29  Bruno Haible  <bruno@clisp.org>
52762         Make use of module 'utime-h'.
52763         * modules/copy-file (Depends-on): Add utime-h.
52764         * lib/copy-file.c: Assume that <utime.h> exists.
52765         * m4/copy-file.m4 (gl_COPY_FILE): Don't test for <utime.h>.
52767         * modules/utimens (Depends-on): Add utime-h.
52768         * lib/utimens.c: Assume that <utime.h> exists.
52770 2017-04-29  Bruno Haible  <bruno@clisp.org>
52772         utime-h: New module.
52773         * m4/utime_h.m4: New file.
52774         * lib/utime.in.h: New file.
52775         * modules/utime-h: New file.
52776         * doc/posix-headers/utime.texi: Mention the new module.
52778         * tests/test-utime-h.c: New file.
52779         * modules/utime-h-tests: New file.
52781 2017-04-30  Bruno Haible  <bruno@clisp.org>
52783         Fix a few typos.
52784         * m4/fstat.m4 (gl_FUNC_FSTAT): Require AC_CANONICAL_HOST.
52785         * m4/stat.m4 (gl_FUNC_STAT): Fix comment.
52786         * doc/posix-functions/fstat.texi: Fix a plural typo.
52787         * doc/posix-functions/stat.texi: Likewise.
52788         * m4/include_next.m4: Update comments.
52790 2017-04-29  Bruno Haible  <bruno@clisp.org>
52792         error: Fix mistake in 2017-04-23 commit.
52793         * lib/error.c (print_errno_message): If GNULIB_STRERROR_R_POSIX is set,
52794         assume that strerror_r returns 'int', not 'char *'.
52796 2017-04-29  Bruno Haible  <bruno@clisp.org>
52798         stat: Fix time_t values and other problems on native Windows platforms.
52799         * doc/posix-functions/stat.texi: Mention the problem with the Microsoft
52800         implementations of stat().
52801         * lib/stat.c: Include filename.h instead of dosname.h. Include
52802         malloca.h, stat-w32.h.
52803         (is_unc_root): New function.
52804         (rpl_stat): New implementation for native Windows. Remove
52805         REPLACE_FUNC_STAT_DIR code.
52806         * m4/stat.m4 (gl_FUNC_STAT): On native Windows, set REPLACE_STAT always.
52807         Don't define REPLACE_FUNC_STAT_DIR.
52808         (gl_PREREQ_STAT): Require gl_HEADER_SYS_STAT_H.
52809         * modules/stat (Files): Add lib/stat-w32.h, lib/stat-w32.c.
52810         (Depends-on): Remove dosname. Add filename, malloca.
52811         (configure.ac): Also compile lib/stat-w32.c.
52813 2017-04-29  Bruno Haible  <bruno@clisp.org>
52815         fstat: Fix time_t values on native Windows platforms.
52816         * doc/posix-functions/fstat.texi: Mention the problem with st_*time.
52817         * lib/stat-w32.h: New file.
52818         * lib/stat-w32.c: New file.
52819         * lib/fstat.c: Don't include msvc-inval.h. Include msvc-nothrow.h,
52820         stat-w32.h instead.
52821         (fstat_nothrow): Remove function.
52822         (rpl_fstat): Implement by means of _gl_fstat_by_handle.
52823         * m4/fstat.m4 (gl_FUNC_FSTAT): On native Windows, set REPLACE_FSTAT
52824         always.
52825         (gl_PREREQ_FSTAT): Require gl_HEADER_SYS_STAT_H.
52826         * modules/fstat (Files): Add lib/stat-w32.h, lib/stat-w32.c.
52827         (Depends-on): Remove msvc-inval. Add pathmax, msvc-nothrow.
52828         (configure.ac): Also compile lib/stat-w32.c.
52830 2017-04-29  Paul Eggert  <eggert@cs.ucla.edu>
52832         getopt: port to Solaris 10 with circa-1997 glibc getopt.h
52833         Problem reported by Assaf Gordon and Gavin Smith in:
52834         http://lists.gnu.org/r/bug-gnulib/2017-04/msg00157.html
52835         * lib/getopt-pfx-ext.h (_getopt_internal) [__GETOPT_PREFIX]:
52836         #define this, too.
52838 2017-04-29  Bruno Haible  <bruno@clisp.org>
52840         strerror_r-posix: Fixes for MSVC 14.
52841         * lib/strerror_r.c: Include <stdarg.h>.
52842         (strerror_r): Provide error messages for errno values 100...140.
52843         * doc/posix-functions/strerror_r.texi: Mention the MSVC 14 problem.
52845 2017-04-28  Bruno Haible  <bruno@clisp.org>
52847         noreturn: New module.
52848         * lib/noreturn.h: New file.
52849         * modules/noreturn: New file.
52850         * tests/test-noreturn.c: New file.
52851         * modules/noreturn-tests: New file.
52852         * tests/test-noreturn-c++.cc: New file.
52853         * modules/noreturn-c++-tests: New file.
52855 2017-04-27  Bruno Haible  <bruno@clisp.org>
52857         wctype-h: Fix compilation error with the original mingw.org mingw.
52858         * m4/wctype_h.m4 (gl_WCTYPE_H): Test for <crtdefs.h>. Set
52859         HAVE_CRTDEFS_H.
52860         * modules/wctype-h (Makefile.am): Substitute HAVE_CRTDEFS_H.
52861         * lib/wctype.in.h (rpl_wint_t): If <crtdefs.h> does not exist, include
52862         <stddef.h> instead.
52863         Reported and proposed by Eli Zaretskii <eliz@gnu.org>.
52865 2017-04-26  Pádraig Brady  <P@draigBrady.com>
52867         nap.h: Fix compilation on non windows platforms
52868         * tests/nap.h: Move misplaced endif.
52870 2017-04-26  Pádraig Brady  <P@draigBrady.com>
52871         and Paul Eggert  <eggert@cs.ucla.edu>
52873         time_rz: fix heap buffer overflow vulnerability
52874         Reported and analyzed at https://bugzilla.redhat.com/CVE-2017-7476
52875         * lib/time_rz.c (save_abbr): Rearrange the calculation determining
52876         whether there is enough buffer space available, thus avoiding
52877         the problematic promotion of signed to unsigned causing an invalid
52878         comparison when zone_copy is more than ABBR_SIZE_MIN bytes beyond
52879         the start of the buffer.
52880         * tests/test-parse-datetime.c (main): Add a test case written by
52881         Paul Eggert, which overwrites enough of the heap so that
52882         standard glibc will fail with "free(): invalid pointer"
52883         without the patch applied.
52885 2017-04-26  Paul Eggert  <eggert@cs.ucla.edu>
52887         xalloc: add missing integer overflow check
52888         * lib/xalloc.h (x2nrealloc): Also check for multiplication
52889         overflow when P is null.
52891 2017-04-25  Paul Eggert  <eggert@cs.ucla.edu>
52893         parse-datetime: make it standalone
52894         * lib/parse-datetime.y: Include <stdarg.h>, for va_start etc.
52895         (_GL_ATTRIBUTE_FORMAT): New macro.
52896         These are needed to get './gnulib-tool --test parse-datetime' to work.
52898 2017-04-23  Bruno Haible  <bruno@clisp.org>
52900         nap.h: Port to native Windows.
52901         * tests/nap.h (nap_get_stat): Renamed from get_stat. Remove argument fd;
52902         use nap_fd instead. On native Windows, close and reopen nap_fd.
52903         (nap_works): Don't compare the ctimes, because on native Windows, these
52904         are the creation times.
52905         (nap): Update.
52907 2017-04-23  Bruno Haible  <bruno@clisp.org>
52909         nap.h: Fix logic.
52910         * tests/nap.h (nap): Avoid signed integer overflow in loop.
52912 2017-04-23  Bruno Haible  <bruno@clisp.org>
52914         Fix conflict between strerror_r-posix module and AC_FUNC_STRERROR_R.
52915         * modules/strerror_r-posix (configure.ac): Invoke gl_MODULE_INDICATOR.
52916         * lib/error.c: Test GNULIB_STRERROR_R_POSIX before testing
52917         HAVE_DECL_STRERROR_R, HAVE_STRERROR_R, or STRERROR_R_CHAR_P.
52918         * lib/argp-help.c (__argp_failure): Likewise.
52920 2017-04-23  Bruno Haible  <bruno@clisp.org>
52922         strerror_r-posix: Revert commits from 2016-10-16,2016-11-04,2016-11-14.
52923         * m4/strerror_r.m4: Revert changes since 2016-10-16.
52924         * lib/strerror_r.c: Likewise.
52926 2017-04-23  Paul Eggert  <eggert@cs.ucla.edu>
52928         Target a C99 subset, not a C89 subset
52929         For many years Gnulib has targeted C89 and has resisted using C99
52930         features, as some Gnulib-using programs still wanted to target
52931         C89.  As this no longer seems to be the case, relax the porting
52932         requirements to allow some C99 features.  This is merely a change
52933         to the documentation, to give other Gnulib developers a chance to
52934         weigh in on the topic.
52935         * doc/extern-inline.texi (extern inline):
52936         * doc/gnulib-readme.texi (Portability guidelines):
52937         * doc/gnulib-tool.texi (Initial import):
52938         * doc/gnulib.texi (Header files):
52939         Modernize to talk about C99 and C11 instead of C89 and C99.
52940         * doc/gnulib-readme.texi (Portability guidelines):
52941         Now a section, not merely a subsection, so that it
52942         can be split up.  Modernize a bit.
52943         (C language versions, C99 features assumed)
52944         (C99 features avoided):
52945         New sections.
52947 2017-04-23  Bruno Haible  <bruno@clisp.org>
52949         doc: New section "Modules that modify the way other modules work".
52950         * doc/gnulib.texi (Modules that modify the way other modules work): New
52951         section.
52953 2017-04-23  Bruno Haible  <bruno@clisp.org>
52955         stat-time: Update comments.
52956         * lib/stat-time.h: Fix reference regarding st_ctime on Windows.
52957         * tests/test-utimens-common.h: Add reference regarding st_ctime on
52958         Windows.
52960 2017-04-01  Bruno Haible  <bruno@clisp.org>
52962         glob: Fix more memory leaks.
52963         * lib/glob.c (glob): Free allocated memory before returning.
52964         Reported by Coverity via Tim Rühsen.
52966 2017-04-22  Paul Eggert  <eggert@cs.ucla.edu>
52968         poll: improve fast check for out-of-range NFD
52969         * lib/poll.c: Do not include intprops.h.
52970         (poll): Compare NFD to INT_MAX, not to TYPE_MAXIMUM (nfds_t) / 2.
52971         * modules/poll (Depends-on): Remove intprops.
52973         ftoastr: cite a newer paper
52974         * lib/ftoastr.c (FTOASTR): In comment, cite Andrysco et al. 2016
52975         instead of Loitsch 2010.
52977 2017-04-22  Bruno Haible  <bruno@clisp.org>
52979         poll: Enable argument check also in the Windows implementation.
52980         * lib/poll.c (poll) [WINDOWS_NATIVE]: Check value of nfd correctly.
52981         Reported by Paul Eggert.
52983 2017-04-22  Bruno Haible  <bruno@clisp.org>
52985         getlogin_r: Work around bug in Mac OS X 10.12.
52986         * m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Test also against the Mac OS X
52987         bug.
52988         * lib/getlogin_r.c (getlogin_r): When getlogin_r returns a string of the
52989         given size minus 1, call getlogin_r a second time, on a larger buffer.
52990         * modules/getlogin_r (Depends-on): Add malloca.
52991         * doc/posix-functions/getlogin_r.texi: Mention the Mac OS X bug.
52993 2017-04-22  Paul Eggert  <eggert@cs.ucla.edu>
52995         parse-datetime: fix %z and prefer signed int
52996         %z problem reported by Pádraig Brady in:
52997         http://lists.gnu.org/r/bug-gnulib/2017-04/msg00103.html
52998         While fixing it, I decided to prefer signed ints to size_t, as
52999         they are less error-prone (e.g., ubsan catches overflow).
53000         * lib/parse-datetime.y (textint, parser_control, lookup_word, yylex)
53001         (parse_datetime2): Prefer ptrdiff_t to size_t for sizes and object
53002         counts, since signed integers make for better debugging.
53003         (date): Don’t assume %z works in printf formats.
53004         (debug_strfdatetime, debug_strfdate, debug_strftime): Use int for
53005         sizes of buffers known to be small, e.g., because we’re using snprintf.
53006         (parse_datetime2): Simplify call to debug_mktime_not_ok.
53008 2017-04-22  Bruno Haible  <bruno@clisp.org>
53010         *printf: Work around rounding bug on Mac OS X.
53011         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Test for Mac OS X 10.12 bug.
53012         * doc/posix-functions/*printf.texi: Mention the rounding bugs of
53013         Mac OS X and FreeBSD.
53014         * doc/glibc-functions/*printf.texi: Likewise.
53016 2017-04-22  Bruno Haible  <bruno@clisp.org>
53018         vasnprintf tests: Avoid warnings.
53019         * tests/test-vasnprintf-posix3.c (test_function, my_asnprintf,
53020         test_vasnprintf, test_asnprintf): Don't define if there's nothing to
53021         test.
53023 2017-04-22  Bruno Haible  <bruno@clisp.org>
53025         sys_file tests: Avoid warning.
53026         * tests/test-sys_file.c (main): Add a default clause to the switch
53027         statement.
53029 2017-04-22  Bruno Haible  <bruno@clisp.org>
53031         sethostname: Update doc.
53032         * doc/glibc-functions/sethostname.texi: Mention differing prototype on
53033         Mac OS X.
53035 2017-04-22  Bruno Haible  <bruno@clisp.org>
53037         quotearg tests: Avoid warnings.
53038         * tests/test-quotearg.c: Don't include test-quotearg.h if ENABLE_NLS is
53039         false.
53041 2017-04-22  Bruno Haible  <bruno@clisp.org>
53043         poll: Enable argument check.
53044         * lib/poll.c: Include intprops.h.
53045         (poll): Check value of nfd correctly.
53046         * modules/poll (Depends-on): Add intprops.
53048 2017-04-22  Bruno Haible  <bruno@clisp.org>
53050         get-rusage-data: Avoid warnings on Mac OS X.
53051         * lib/get-rusage-data.c: On Mac OS X, don't define
53052         get_rusage_data_via_setrlimit nor get_rusage_data_via_iterator.
53053         (get_rusage_data) [Mac OS X]: Just return 0.
53055 2017-04-22  Bruno Haible  <bruno@clisp.org>
53057         xbinary-io: Fix build error.
53058         * modules/xbinary-io (Depends-on): Add gettext-h.
53059         * lib/xbinary-io.c: Include gettext.h and define _().
53060         Reported by Gisle Vanem <gisle.vanem@gmail.com> in
53061         <https://lists.gnu.org/r/bug-gnulib/2017-04/msg00089.html>.
53063 2017-04-22  Paul Eggert  <eggert@cs.ucla.edu>
53065         parse-datetime: overflow and debug cleanups
53066         This long patch was triggered by this bug report from Ruediger Meier:
53067         http://lists.gnu.org/r/bug-gnulib/2017-04/msg00028.html
53068         I fixed the bug he noted, then found some others nearby, and then
53069         still others.  Oh my goodness, there were a lot of bugs.  I cleaned
53070         up some of the code to follow GNU standards while I was at it.
53071         * lib/parse-datetime.y (ISDIGIT): Remove; all callers changed to
53072         use c_isdigit.
53073         (EPOCH_YEAR): Remove; unused.
53074         (TM_YEAR_BASE): Now an enum rather than a macro.
53075         (HOUR, debug_strfdatetime): Multiply hour by 3600, not 60, to get
53076         time zone offset, since timezones now are in terms of seconds and
53077         not minutes.
53078         (long_time_t): Remove.  All uses replaced by time_t or intmax_t as
53079         appropriate.  Verify that intmax_t is wide enough.
53080         (time_overflow, time_zone_str): New functions, used to deal
53081         more reliably with overflow.
53082         (dbg_printf): Add printf attribute, to help catch integer width errors.
53083         (textint, relative_time, parser_control, time_zone_hhmm, set_hhmmss)
53084         (%union, to_hour, yylex, parse_datetime2):
53085         Use intmax_t instead of long int and/or long_time_t.
53086         All uses changed.
53087         (DBGBUFSIZE): Move earlier.
53088         (relative_time, set_hhmmss, parser_control):
53089         Just use int for nanoseconds and for time zones; that’s wide enough.
53090         (parser_control): Use bool for members like year_seen that can
53091         be booleans instead of counters.  All uses changed.
53092         Remove debug_default_input_timezone; no longer needed.
53093         All uses removed.
53094         (apply_relative_time): Return a bool overflow flag.
53095         All uses changed to check for overflow.
53096         (apply_relative_time, zone, date, relunit, relunit_snumber)
53097         (signed_seconds, unsigned_seconds, yylex, parse_datetime2):
53098         Check for integer overflow portably.
53099         (str_days): Use just int for N, as it’s wide enough.
53100         Prefer 2D char arrays to arrays of char * when it looks like
53101         2D is a win on typical platforms.
53102         Prefer snprintf to strncpy/strncat, for simplicity;
53103         all buffers are smaller than INT_MAX so this is safe.
53104         (TIME_ZONE_BUFSiZE, TM_YEAR_BUFSIZE): New constants.
53105         (debug_print_current_time): Don’t assume tv_nsec is of type long,
53106         as this is not true on x32.  Output "." before any nanoseconds.
53107         (debug_print_current_time, parse_datetime2):
53108         Output local zones using a more-consistent format.
53109         (debug_print_current_time, date, parse_datetime2):
53110         (main) [TEST]:
53111         Don’t assume time_t is the same width as long.
53112         (print_rel_part): New function, replacing ...
53113         (PRINT_REL_PART): ... this macro, which was removed.  All uses changed.
53114         (debug_print_relative_time): Use bool for boolean.
53115         (local_zone): dsts_seen now counts only tDST instances.
53116         (date): Fix printf of size_t to use %z.  Do not assume numeric
53117         tokens have negative values merely because the context suggests
53118         a syntax with "-" separating tokens.
53119         (time_zone_hhmm): Return bool success indicator, which checks for
53120         overflow.  Store result into PC->time_zone instead.  All callers
53121         changed.
53122         (tm_year_str): New function.  Return a bool success indicator and
53123         store the result into a buffer.  All callers changed.  Output the
53124         numerically correct string even if adding 1900 to the year would
53125         overflow.
53126         (to_tm_year): New function, replacing the old to_year.  All
53127         callers changed.
53128         (tm_diff): Sync with glibc.
53129         (lookup_word): Use to_uchar instead of doing it by hand.
53130         (TZBUFSIZE): Now local to the only function that needs it.
53131         (debug_strfdatetime): Simplify now that time zones are int seconds.
53132         (debug_strfdate): Work even if tm_year + 1900 would overflow.
53133         (get_effective_timezone): Remove.  All uses removed.
53134         (parse_datetime2): Use fprintf in pieces instead of snprintfing
53135         to a fixed-size buffer.  Don’t assume that gmtime succeeds iff
53136         localtime succeeds.  Use tm_gmtoff if available.  Simplify how
53137         ‘goto fail;’ works in conjunction with the ‘ok’ flag.
53138         * m4/parse-datetime.m4 (gl_PARSE_DATETIME): Don’t define
53139         TIME_T_FITS_IN_LONG_INT, as it is no longer needed.
53140         * modules/parse-datetime (Depends-on): Add inttypes.
53142 2017-04-21  Bruno Haible  <bruno@clisp.org>
53144         gettext-h: Avoid -Wundef warning.
53145         * lib/gettext.h: Test the value of ENABLE_NLS only if it is defined.
53146         Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
53147         <https://lists.gnu.org/r/bug-gnulib/2017-04/msg00022.html>.
53149 2017-04-05  Tim Rühsen  <tim.ruehsen@gmx.de>
53151         error: Avoid "function declaration isn't a prototype" warning.
53152         * lib/error.c (strerror_r): Turn K&R C prototype to an ANSI C prototype.
53154 2017-04-21  Bruno Haible  <bruno@clisp.org>
53156         vasnprintf: Fix for MSVC 14.
53157         * lib/vasnprintf.c (USE_MSVC__SNPRINTF): New macro.
53158         Everywhere, use !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF instead
53159         of !HAVE_SNPRINTF_RETVAL_C99.
53161 2017-04-21  Bruno Haible  <bruno@clisp.org>
53163         mbrtowc tests: Fix test failures on MSVC 14.
53164         * tests/test-mbrtowc-w32.c (test_one_locale): Accept MSVC's conversion
53165         behaviour for invalid input.
53167 2017-04-21  Bruno Haible  <bruno@clisp.org>
53169         mbsinit: Fix for MSVC 14.
53170         * lib/mbsinit.c (mbsinit): If GNULIB_defined_mbstate_t, provide an
53171         implementation that is in sync with mbrtowc.c. On other platforms, use
53172         an adequate ad-hoc implementation.
53174 2017-04-21  Bruno Haible  <bruno@clisp.org>
53176         Fix test-mbrtowc5.sh failure on native Windows.
53177         * lib/setlocale.c (setlocale_unixlike): Accept "POSIX" as an alias for
53178         "C".
53180 2017-04-21  Bruno Haible  <bruno@clisp.org>
53182         Avoid accidental use of native Windows APIs on Cygwin.
53183         * lib/getaddrinfo.c (WINDOWS_NATIVE): Don't define on Cygwin.
53184         * lib/localcharset.c (WINDOWS_NATIVE): Likewise.
53185         * lib/localename.c (WINDOWS_NATIVE): Likewise.
53187 2017-04-20  Bruno Haible  <bruno@clisp.org>
53189         Remove red warnings from the generated MODULES.html.
53190         * modules/fcntl (Description): Disambiguate function references.
53191         * modules/getcwd-lgpl (Description): Likewise.
53192         * modules/hostent (Description): Likewise.
53193         * modules/servent (Description): Likewise.
53194         * modules/tempname (Description): Likewise.
53196 2017-04-20  Bruno Haible  <bruno@clisp.org>
53198         verify tests: Fix spurious failure with parallel make.
53199         * gnulib-tool (func_emit_tests_Makefile_am): Emit initialization of
53200         EXTRA_PROGRAMS.
53201         * tests/test-verify.sh: Build test-verify-try.o, not test-verify.o.
53202         * tests/test-verify-try.c: New file.
53203         * modules/verify-tests (Files): Add it.
53204         (EXTRA_PROGRAMS): Add test-verify-try.
53205         (MOSTLYCLEANFILES): Update accordingly.
53206         Reported by Adam James Stewart <ajstewart@anl.gov>.
53208 2017-04-18  Bruno Haible  <bruno@clisp.org>
53210         vma-iter: Fix compilation error on Solaris 7.
53211         * lib/vma-iter.c (vma_iterate): Treat missing MAP_ANONYMOUS on Solaris
53212         like on IRIX, OSF/1.
53213         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
53215 2017-04-18  Bruno Haible  <bruno@clisp.org>
53217         vma-iter: Fix conflict with module 'largefile' on 32-bit Solaris 9.
53218         * modules/vma-iter (configure.ac): Test whether <sys/procfs.h> can be
53219         included.
53220         * lib/vma-iter.c: On Solaris, test HAVE_SYS_PROCFS_H before including
53221         <sys/procfs.h>.
53222         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Don't define on Solaris when
53223         <sys/procfs.h> cannot be included.
53224         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
53226 2017-04-18  Bruno Haible  <bruno@clisp.org>
53228         getopt-gnu: Add comments.
53229         * m4/getopt.m4 (gl_FUNC_GETOPT_GNU): Add comments.
53230         * modules/getopt-gnu (configure.ac): Likewise.
53232 2017-04-16  Paul Eggert  <eggert@cs.ucla.edu>
53234         regex: port better to Solaris 10
53235         Solaris 10 <locale.h> includes <libintl.h>, which #defines
53236         gettext, and this causes a double #define.
53237         Problem reported by Gavin Smith in:
53238         http://lists.gnu.org/r/bug-gnulib/2017-04/msg00056.html
53239         * lib/regex_internal.h (gettext): #undef before #defining.
53241 2017-04-15  Paul Eggert  <eggert@Penguin.CS.UCLA.EDU>
53243         intprops: improve comments
53244         * lib/intprops.h: Improve and shorten commentary.
53245         For the record, if we ever run into a pedantic compiler that
53246         behaves differently from GCC when converting an out-of-range value
53247         to a signed integer, we can work around the problem with something
53248         like the following code, where UCT is the signed counterpart of T
53249         (UCT is sometimes narrower than UT) and all callers are changed
53250         accordingly:
53251         #if __SUNPRO_C <= 0x5120
53252         # define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, uct, ut, t) \
53253            ((t) ((ut) (a) op (ut) (b)))
53254         #else
53255         # define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, uct, ut, t) \
53256            (TYPE_MINIMUM (t) <= (uct) ((ut) (a) op (ut) (b)) \
53257             ? ((t) (uct) (((ut) (a) op (ut) (b)) - TYPE_MINIMUM (t)) \
53258                + TYPE_MINIMUM (t)) \
53259             : (t) (uct) ((ut) (a) op (ut) (b)))
53260         #endif
53262 2017-04-14  Paul Eggert  <eggert@Penguin.CS.UCLA.EDU>
53264         intprops: try to avoid tickling similar bugs
53265         * lib/intprops.h (_GL_INT_OP_CALC): Document that UT no longer
53266         needs to be the same width as T; it can be wider.
53267         Change callers so that UT is at least as wide as unsigned int,
53268         as I suspect that this is less likely to run into compiler bugs.
53270         intprops: port to Oracle Studio 12.3 x86
53271         Problem reported by Gavin Smith in:
53272         http://lists.gnu.org/r/bug-gnulib/2017-04/msg00049.html
53273         * lib/intprops.h (_GL_INT_OP_WRAPV_VIA_UNSIGNED):
53274         Convert unsigned to signed via the usual rather than the standard way,
53275         to avoid a compiler bug in Oracle Studio 12.3 x86.
53277 2017-04-08  Paul Eggert  <eggert@cs.ucla.edu>
53279         getopt: prefer - to _ in new file names
53280         * lib/getopt-cdefs.in.h: Rename from lib/getopt_cdefs.in.h.
53281         * lib/getopt-core.h: Rename from lib/getopt_core.h.
53282         * lib/getopt-ext.h: Rename from lib/getopt_ext.h.
53283         * lib/getopt-pfx-core.h: Rename from lib/getopt_pfx_core.h.
53284         * lib/getopt-pfx-ext.h: Rename from lib/getopt_pfx_ext.h.
53285         All uses changed.
53287         getopt: port recent getopt changes to macOS
53288         Problem reported by Harald Maier (Bug#26398).
53289         The macOS C compiler uses __nonnull for its own purposes and that
53290         clashes with glibc's __nonnull.
53291         * lib/getopt.in.h: Add comment for _GL_ARG_NONNULL snippet.
53292         * lib/getopt_cdefs.in.h (__nonnull): Remove.
53293         * lib/getopt_core.h (getopt):
53294         * lib/getopt_ext.h (getopt_long, getopt_long_only):
53295         Use _GL_ARG_NONNULL, not __nonnull.
53296         * lib/unistd.in.h: Move snippet hooks to before where the getopt
53297         .h files are included, so that _GL_ARG_NONNULL is defined in time.
53298         * modules/getopt-posix (Depends-on): Add snippet/arg-nonnull.
53299         (getopt.h): Interpolate _GL_ARG_NONNULL snippet.
53301 2017-04-06  Paul Eggert  <eggert@cs.ucla.edu>
53303         getopt-gnu: omit some duplicate code
53304         * m4/getopt.m4 (gl_FUNC_GETOPT_GNU): Don’t require
53305         gl_FUNC_GETOPT_POSIX, as the configure.ac code generated by
53306         gnulib-tool already does this.
53307         * modules/getopt-gnu (configure.ac): Omit code duplicated from
53308         getopt-posix, which we depend on.
53310         getopt-posix: use angle-bracket include
53311         * lib/getopt1.c: Include <config.h>, not "config.h".
53313 2017-04-06  Zack Weinberg  <zackw@panix.com>
53315         getopt: annotate files with relationship to glibc
53317         As the final act in this patchset, adjust the message at the top of
53318         each file to indicate which files are synced with glibc.  (This has
53319         already been done for most of the headers.)
53321         * lib/getopt.c, lib/getopt1.c, lib/getopt_int.h:
53322         Mention in top-of-file boilerplate that these files are shared
53323         between glibc and gnulib.
53326         getopt: split up getopt.in.h and eliminate __need_getopt
53328         Over in glibc, all of the __need macros are being phased out in favor
53329         of small headers that declare only the necessary components, as this
53330         is much simpler and less prone to bugs.  As getopt is shared with
53331         glibc, gnulib needs to do the same for __need_getopt.
53333         __need_getopt is misnamed; what it really means is "we want only the
53334         getopt features specified in POSIX, not the GNU extensions".  glibc
53335         placed the "meat" of getopt.h into getopt_core.h and getopt_ext.h;
53336         these files can be shared verbatim with gnulib.  The portability
53337         wrapper, on the other hand, they have renounced altogether; glibc's
53338         getopt.h will no longer be shared with gnulib at all.  In exchange,
53339         certain glibc-specific quirks (having to do with __posix_getopt) no
53340         longer need appear in gnulib's headers at all.
53342         This patch merges getopt_core.h and getopt_ext.h from glibc, and
53343         splits up the current gnulib-side portability wrapper into three
53344         additional headers: getopt_pfx_core.h and getopt_pfx_ext.h handle
53345         __GETOPT_PREFIX for their respective headers, getopt_cdefs.in.h
53346         handles things like __BEGIN_DECLS and __THROW, and getopt.in.h and
53347         unistd.in.h just use them.  All new files are clearly marked with
53348         whether they are shared with glibc.
53350         * lib/getopt.in.h: Eliminate __need_getopt.  Break up into ...
53351         * lib/getopt_core.h, lib/getopt_ext.h: ... these new files shared
53352         with glibc, and ...
53353         * lib/getopt_cdefs.in.h, lib/getopt_pfx_core.h
53354         * lib/getopt_pfx_ext.h: ... these new files not shared with glibc.
53355         * lib/unistd.in.h: Include getopt_cdefs.h and getopt_pfx_core.h,
53356         instead of defining __need_getopt and including the full getopt.h.
53358         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): Check for sys/cdefs.h.
53359         Define substitution variables GETOPT_CDEFS_H and HAVE_SYS_CDEFS_H.
53360         * modules/getopt-posix (Files): Add new headers and sort list.
53361         (Depends-on): No longer need snippet/arg-nonnull.
53362         (Makefile.am): Generate getopt_cdefs.h.
53365         getopt: better handling of ambiguous options
53367         glibc's getopt uses alloca to construct a linked list of possibilities
53368         for an "ambiguous" long option.  In gnulib, malloc should be used
53369         instead.  Providing for both cases complicates things a fair bit.
53371         This patch rewrites ambiguous-option handling to use a boolean vector
53372         instead of a linked list.  There is then only one allocation that
53373         might need freeing; in glibc it can honor __libc_use_alloca as usual,
53374         and in gnulib we define __libc_use_alloca to always be false, so we
53375         don't need ifdefs in the middle of the function.  This should also be
53376         slightly more efficient in the normal case of long options being fully
53377         spelled out -- I think most people aren't even aware they _can_
53378         sometimes abbreviate long options.
53380         One interesting consequence is that the list of possibilities is now
53381         printed in exactly the order they appear in the list of long options,
53382         instead of the first possibility being shuffled to the end.
53384         (The patch looks bigger than it really is because there's a fair bit
53385         of reindentation and code rearrangement.)
53387         * lib/getopt.c: When used standalone, define __libc_use_alloca
53388         as always false and alloca to abort if called.
53389         (process_long_option): Rewrite handling of ambiguous long options
53390         to use a single boolean vector, not a linked list; use
53391         __libc_use_alloca to decide whether to allocate this using alloca.
53394         getopt: refactor long-option handling
53396         There were two copies of the bulk of the code to handle long options.
53397         Now there is only one.
53399         This change temporarily removes the logic to avoid using alloca when
53400         standalone; the next patch in the series will restore it.
53402         * lib/getopt.c (process_long_option): New function split out
53403         from _getopt_internal_r.
53404         (_getopt_internal_r): Replace both copies of the long-option
53405         processing code with calls to process_long_option.
53408         getopt: tidy up _getopt_initialize a bit
53410         _getopt_data.__posixly_correct is completely redundant to
53411         _getopt_data.__ordering, and some work that logically belongs in
53412         _getopt_initialize was being done by _getopt_internal_r, making the
53413         code harder to understand.
53415         As a side effect, getenv will no longer be called if the first
53416         character of the options string is '+' or '-', which is probably a
53417         Good Thing.  (Perhaps we should have a flag character that
53418         specifically asks for the permutation behavior?)
53420         * lib/getopt_int.h (_getopt_data): Remove __posixly_correct field.
53421         * lib/getopt.c (_getopt_internal_r): Move some initialization code...
53422         (_getopt_initialize): ...here. Don't set d->__posixly_correct.
53425         getopt: merge from glibc: repetition reduction
53427         The definitions of the entry point functions 'getopt' and
53428         '__posix_getopt' can be made substantially less repetitive with a
53429         helper macro.
53431         While I was merging the const-correctness changes from gnulib into
53432         glibc I noticed there are still some unnecessary casts in
53433         _getopt_internal_r.
53435         * lib/getopt.c (getopt, __posix_getopt): Eliminate repetition with
53436         a macro.  Consistently cast 'argv' to 'char **' when calling
53437         _getopt_internal.
53438         (_getopt_internal_r): Remove unnecessary casts when calling exchange.
53441         getopt: clean up error reporting
53443         getopt can print a whole bunch of error messages, and when used
53444         standalone (from gnulib) it uses fprintf to do that.  But fprintf is a
53445         cancellation point and getopt isn't, and also applying fprintf to a
53446         stream in wide-character mode is not allowed.  So every single error
53447         reporting case has an #ifdef _LIBC block in which it calls internal
53448         libc functions instead.  The counterpart patch series in glibc makes
53449         it possible to simplify all of that down to a set of #defines at the
53450         top of the file; core code is written as if it is safe to just call
53451         fprintf, flockfile, and funlockfile.  (One caveat: it's *not* safe to
53452         call any *other* stdio functions.)
53454         * lib/getopt.c: When _LIBC is defined, define fprintf to
53455         __fxprintf_nocancel, flockfile to _IO_flockfile, and funlockfile
53456         to _IO_funlockfile.  When neither _LIBC nor
53457         _POSIX_THREAD_SAFE_FUNCTIONS is defined, define flockfile and
53458         funlockfile as no-ops.
53459         (_getopt_internal_r): Remove all internal #ifdef _LIBC blocks; the
53460         standalone error-printing code can now be used for libc as well.
53461         Add an flockfile/funlockfile pair around one case where the error
53462         message is printed in several chunks.  Don't use fputc.
53465         getopt: fix fencepost error in ambiguous-W-option handling
53467         getopt_long contains an undocumented (AFAICT) feature in which, if you
53468         put "W;" in the short-options list, then '-W foo' and '-Wfoo' are
53469         treated as equivalent to '--foo'.  This is implemented with a partial
53470         second copy of the code for handling long options, and that code
53471         increments optind one too many times when recovering from an ambiguous
53472         abbreviated option, which can cause the main loop to walk past the end
53473         of argv and crash.
53475         I discovered this while writing a test case that tries to exercise all
53476         of getopt's error reporting paths; I wouldn't be surprised to learn
53477         that this feature is never used by real applications.
53479         * lib/getopt.c (_getopt_internal_r): Don't increment
53480         d->optind a second time when reporting ambiguous -W options.
53483         getopt: clean up getopt.c and getopt1.c file headers
53485         In getopt.c, there is no need to include wchar.h at all, and it is
53486         safe nowadays to assume that stdlib.h does declare getenv (several
53487         other gnulib modules make this assumption).
53489         In getopt1.c, the #ifdef _LIBC block at the top can be simplified
53490         by using "" inclusions consistently, and there is no actual need to
53491         include stdlib.h (except in the #ifdef TEST block, where it should be
53492         unconditional), nor to provide a backup definition of NULL at all.
53494         * lib/getopt1.c: Simplify #ifdeffage at top of file.
53495         Move inclusion of stdlib.h to #ifdef TEST block and make
53496         unconditional.  Do not define NULL.
53497         * lib/getopt.c: Don't include wchar.h. No need to declare getenv.
53498         * m4/getopt.m4 (gl_PREREQ_GETENV): Delete.
53499         * modules/getopt-gnu, modules/getopt-posix: Don't call
53500         gl_PREREQ_GETENV.
53503         getopt: harmonize comments with glibc
53505         The comments explaining how the behavior of 'getopt' varies depending
53506         on whether it's the standalone version and whether there are special
53507         characters at the beginning of the options string were inconsistent
53508         between gnulib and glibc, and also out of sync with the code.
53510         * lib/getopt.c, lib/getopt_int.h: Harmonize comments with glibc.
53513         getopt: remove USE_NONOPTION_FLAGS
53515         getopt includes code to parse an environment variable named
53516         _XXX_GNU_nonoption_argv_flags_ (where XXX is the current process's PID
53517         in decimal); but all of it has been #ifdefed out since 2001, with no
53518         official way to turn it back on.
53520         According to commentary in glibc's config.h.in, bash version 2.0
53521         set this environment variable to indicate argv elements that were
53522         the result of glob expansion and therefore should not be treated
53523         as options, but the feature was "disabled later" because "it
53524         caused problems".  According to bash's CHANGES file, "later" was
53525         release 2.01; it gives no more detail about what the problems
53526         were.
53528         Version 2.0 of bash was released on the last day of 1996, and version
53529         2.01 in June of 1997.  Twenty years later, I think it is safe to
53530         assume that this environment variable isn't coming back.
53532         * lib/getopt_int.h: Remove all #ifdef USE_NONOPTION_FLAGS blocks.
53533         * lib/getopt.c: Likewise. Also remove SWAP_FLAGS and the
53534         __libc_argc and __libc_argv externs, which were only used by
53535         #ifdef USE_NONOPTION_FLAGS blocks.
53538         getopt: tabify, in preparation for merge with glibc
53540         glibc sticks to the GNU default of indenting with a mix of
53541         8-column tabs and spaces; make the gnulib copy match.
53543         getopt.h is not included because it is *not* going to be merged in its
53544         present form.
53546         * getopt.c, getopt1.c, getopt_int.h: Tabify.
53548 2017-04-02  Bruno Haible  <bruno@clisp.org>
53550         relocatable-lib-lgpl: Fix link error (regression from 2011-06-16).
53551         * modules/relocatable-lib-lgpl (configure.ac): Add AC_LIBOBJ invocation,
53552         like it was done in modules/relocatable-lib on 2011-05-21 and in
53553         modules/relocatable-prog on 2011-08-15.
53554         Reported by Reuben Thomas <rrt@sc3d.org>.
53556 2017-03-31  Bruno Haible  <bruno@clisp.org>
53558         glob: Fix invalid free() call.
53559         * lib/glob.c (glob): Reset malloc_home_dir when assigning a pointer to
53560         static storage to home_dir.
53561         Reported by Coverity via Tim Rühsen.
53563 2017-03-31  Bruno Haible  <bruno@clisp.org>
53565         glob: Fix memory leaks.
53566         * lib/glob.c (glob): Free allocated memory before returning.
53567         Reported by Coverity via Tim Rühsen.
53569 2017-03-31  Bruno Haible  <bruno@clisp.org>
53571         md5, sha1, sha256, sha512: Add comments regarding correctness.
53572         * lib/md5.h (buflen): Add comments regarding range.
53573         * lib/sha1.h (buflen): Likewise.
53574         * lib/sha256.h (buflen): Likewise.
53575         * lib/sha512.h (buflen): Likewise.
53576         * lib/md5.c (md5_process_bytes): Add comment why memmove is not needed.
53577         * lib/sha1.c (sha1_process_bytes): Likewise.
53578         * lib/sha256.c (sha256_process_bytes): Likewise.
53579         * lib/sha512.c (sha512_process_bytes): Likewise.
53580         Reported by Coverity via Tim Rühsen.
53582 2017-03-22  Paul Eggert  <eggert@cs.ucla.edu>
53584         getopt: merge from glibc
53585         This does not change anything substantial; it merely simplifies
53586         hypothetical merges back to glibc.
53587         * lib/getopt.c, lib/getopt.in.h, lib/getopt1.c, lib/getopt_int.h:
53588         Change copyright notice to match what is in glibc.
53589         * lib/getopt.c: Reorder includes to match glibc.  Remove uses of
53590         USE_IN_LIBIO.  Remove 'register'.  In __LIBC code, use
53591         __open_memstream rather than open_memstream and __glibc_likely
53592         instead of __builtin_expect.
53593         * lib/getopt.in.h (__posix_getopt) [!__GETOPT_PREFIX]: New decl.
53595 2017-03-21  Paul Eggert  <eggert@cs.ucla.edu>
53597         dfa: make [0-9] faster in non-C locales
53598         Problem reported by John P. Linderman (Bug#26193).
53599         * lib/dfa.c (parse_bracket_exp): Remove redundant assignment.
53600         If both ends of the range are ASCII digits, do not worry about
53601         multi-character collating sequences and the like.  Be consistent
53602         about using isalpha as a precondition for setbit_case_fold_c.
53604 2017-03-19  Bruno Haible  <bruno@clisp.org>
53606         lock: Fix compilation error with HP-UX IA64 cc.
53607         * lib/glthread/lock.h (pthread_rwlockattr_setkind_np): Don't declare
53608         weak on non-glibc platforms.
53610 2017-03-19  Paul Eggert  <eggert@cs.ucla.edu>
53612         stdalign: tweak version# and test for HP-UX IA64
53613         Problems reported by Bruno Haible in:
53614         http://lists.gnu.org/r/bug-gnulib/2017-03/msg00078.html
53615         * lib/stdalign.in.h (_Alignas):
53616         * m4/stdalign.m4 (gl_STDALIGN_H):
53617         Use octal, not decimal, for __HP_cc version.  Perhaps HP formerly
53618         used octal (as that is how they document it), but it is decimal in
53619         practice now and the ancient implementations no longer matter.
53620         * tests/test-stdalign.c (main) [__HP_cc && __ia64]: Skip test.
53622 2017-03-19  Bruno Haible  <bruno@clisp.org>
53624         vma-iter: Add support for Solaris.
53625         * lib/vma-iter.c (vma_iterate): On Solaris, use the /proc filesystem
53626         approach.
53627         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define also on Solaris.
53628         * lib/get-rusage-as.c: Update comment about Solaris.
53629         * lib/get-rusage-data.c: Likewise.
53631 2017-03-19  Bruno Haible  <bruno@clisp.org>
53633         vma-iter: Prefer HP-UX specific API on HP-UX.
53634         * lib/vma-iter.c (vma_iterate): Move HP-UX specific implementation up.
53635         * lib/vma-iter.h: Update.
53636         Just in case HP-UX ever implements mquery().
53638 2017-03-18  Paul Eggert  <eggert@cs.ucla.edu>
53640         stdalign: restore previous behavior for HP-UX IA64
53641         See Bruno Haible's email in:
53642         http://lists.gnu.org/r/bug-gnulib/2017-03/msg00066.html
53643         which cites p 150 of a manual saying that 'aligned' works on Itanium.
53644         * lib/stdalign.in.h (_Alignas):
53645         Assume the '061200' applies to Itanium, not to PA-RISC.
53646         * m4/stdalign.m4 (gl_STDALIGN_H): Adjust to match stdalign.in.h.
53648 2017-03-17  Bruno Haible  <bruno@clisp.org>
53650         stat-time, timespec: Support use of the header files in C++ mode.
53651         * lib/stat-time.h: Add "C" linkage declaration.
53652         * lib/timespec.h: Likewise.
53654 2017-03-17  Bruno Haible  <bruno@clisp.org>
53656         stdalign: Make it work with HP-UX cc.
53657         * lib/stdalign.in.h (_Alignas): Don't define for HP-UX cc.
53658         * m4/stdalign.m4 (gl_STDALIGN_H): No need to enable the extra test
53659         for HP-UX cc.
53661 2017-03-17  Paul Eggert  <eggert@cs.ucla.edu>
53663         flexmember: try to detect HP-UX 11.31 cc bug
53664         Problem reported by Bruno Haible in:
53665         http://lists.gnu.org/r/bug-gnulib/2017-03/msg00066.html
53666         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
53667         Attempt to detect bug in HP-UX 11.31 cc.
53669 2017-03-16  Bruno Haible  <bruno@clisp.org>
53671         stdint: Fix test compilation failure with HP-UX 11 cc.
53672         * lib/stdint.in.h (_STDINT_MIN): Remove macro.
53673         (_STDINT_UNSIGNED_MIN, _STDINT_SIGNED_MIN): New macros.
53674         (PTRDIFF_MIN, SIG_ATOMIC_MIN, WCHAR_MIN, WINT_MIN): Define using
53675         _STDINT_UNSIGNED_MIN, _STDINT_SIGNED_MIN.
53677 2017-03-14  Bruno Haible  <bruno@clisp.org>
53679         gnulib-tool: Don't produce a tests directory with only snippet .h files.
53680         * gnulib-tool (func_modules_transitive_closure_separately): If
53681         testsrelated_modules ends up with no "real" modules, aside from
53682         modules with applicability 'all', set it to empty.
53684 2017-03-14  Bruno Haible  <bruno@clisp.org>
53686         vma-iter: Add support for HP-UX.
53687         * modules/vma-iter (configure.ac): Check for 'pstat_getprocvm'.
53688         * lib/vma-iter.c (vma_iterate): On HP-UX, use pstat_getprocvm().
53689         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define also on HP-UX.
53690         * lib/get-rusage-as.c: Update comment about HP-UX.
53691         * lib/get-rusage-data.c: Likewise.
53692         (get_rusage_data): Use get_rusage_data_via_setrlimit.
53694 2017-03-14  Bruno Haible  <bruno@clisp.org>
53696         limits-h: Make it work with HP-UX cc.
53697         * lib/limits.in.h (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Define if not
53698         defined.
53700 2017-03-14  Bruno Haible  <bruno@clisp.org>
53702         Fix test failures on DragonFlyBSD.
53703         * tests/test-localeconv.c (main): Treat DragonFlyBSD like FreeBSD.
53704         * tests/test-select.h (test_bad_fd): Likewise.
53705         * tests/test-get-rusage-data.c (main): Treat DragonFlyBSD like OpenBSD.
53707 2017-03-14  Bruno Haible  <bruno@clisp.org>
53709         freadahead: Silence warning on DragonFlyBSD.
53710         * lib/freadahead.c (__sreadahead): Declare ourselves.
53712 2017-03-14  Bruno Haible  <bruno@clisp.org>
53714         vma-iter: Add comment about AIX.
53715         * lib/vma-iter.c: Add comment about why this module is not implemented
53716         on AIX.
53718 2017-03-14  Paul Eggert  <eggert@cs.ucla.edu>
53720         snippets: move unadjusted snippet sources to lib
53721         Problem reported by Michal Privoznik in:
53722         http://lists.gnu.org/r/bug-gnulib/2017-03/msg00039.html
53723         * lib/_Noreturn.h: Rename from build-aux/snippet/_Noreturn.h.
53724         * lib/arg-nonnull.h: Rename from build-aux/snippet/arg-nonnull.h.
53725         * lib/c++defs.h: Rename from build-aux/snippet/c++defs.h.
53726         * lib/unused-parameter.h: Rename from
53727         build-aux/snippet/unused-parameter.h.
53728         * lib/warn-on-use.h: Rename from build-aux/snippet/warn-on-use.h.
53729         * modules/snippet/_Noreturn (Files:, _NORETURN_H):
53730         * modules/snippet/arg-nonnull (Files:, ARG_NONNULL_H):
53731         * modules/snippet/c++defs (Files:, CXXDEFS_H):
53732         * modules/snippet/unused-parameter (Files:, UNUSED_PARAMETER_H):
53733         * modules/snippet/warn-on-use (Files: WARN_ON_USE_H):
53734         Adjust to file renamings.
53736 2017-03-14  Mathieu Lirzin  <mthl@gnu.org>
53738         gnulib-tool: don't automatically distribute files from top/
53739         * gnulib-tool (func_get_automake_snippet_unconditional): To be able to
53740         not distribute top/README-release by default, don't distribute files
53741         from top/ unconditionally.
53742         * modules/gnumakefile (Makefile.am): Distribute top/GNUmakefile.
53743         * modules/maintainer-makefile (Makefile.am): Distribute top/maint.mk.
53745 2017-03-14  Paul Eggert  <eggert@cs.ucla.edu>
53747         gnulib-tool: fix typo in comment output
53748         * gnulib-tool (func_import): Fix typo with previous change.
53750         snippets: work around GNU Make 3.82 VPATH
53751         When using 'gnulib-tool --gnu-make' on Emacs, and building
53752         the resulting tarball on Solaris 10 which bundles GNU Make 3.82,
53753         an out-of-source (VPATH) build failed because the sans-copyright
53754         snippet file was not built before the file that used it.
53755         Presumably this is some sort of VPATH thing.  Work around the
53756         problem by using the original snippet, i.e., don’t bother to
53757         remove its copyright notice.
53758         * modules/snippet/_Noreturn, modules/snippet/link-warning:
53759         Don’t assume Automake in comments.  Omit long-incorrect comment.
53760         * modules/snippet/arg-nonnull (BUILT_SOURCES, arg-nonnull.h)
53761         (MOSTLYCLEANFILES):
53762         * modules/snippet/c++defs (BUILT_SOURCES, c++defs.h)
53763         (MOSTLYCLEANFILES):
53764         * modules/snippet/unused-parameter (BUILT_SOURCES, unused-parameter.h)
53765         (MOSTLYCLEANFILES):
53766         * modules/snippet/warn-on-use (BUILT_SOURCES, warn-on-use.h)
53767         (MOSTLYCLEANFILES):
53768         Remove.
53769         * modules/snippet/arg-nonnull (ARG_NONNULL_H):
53770         * modules/snippet/c++defs (CXXDEFS_H):
53771         * modules/snippet/unused-parameter (UNUSED_PARAMETER_H):
53772         * modules/snippet/warn-on-use (WARN_ON_USE_H):
53773         Don’t bother to remove the copyright notice; just use the
53774         original snippet as-is.
53776 2017-03-13  Paul Eggert  <eggert@cs.ucla.edu>
53778         gnulib-tool: minor --gnu-make fixups
53779         * gnulib-tool (func_emit_lib_Makefile_am):
53780         Remove useless code that was a blind alley during implementation.
53781         Problem reported by Thien-Thi Nguyen in:
53782         http://lists.gnu.org/r/bug-gnulib/2017-03/msg00029.html
53783         (func_import): Note the "--gnu-make" option in the output comment.
53785 2017-03-12  Paul Eggert  <eggert@cs.ucla.edu>
53787         gnulib-tool: new option --gnu-make
53788         This is for applications like GNU Emacs that use GNU Make
53789         features instead of Automake.
53790         * doc/gnulib-tool.texi (Initial import): Mention --gnu-make.
53791         * doc/gnulib.texi (Unit test modules, Build robot for gnulib):
53792         Do not assume Automake.
53793         * gnulib-tool (func_determine_path_separator)
53794         (func_modules_transitive_closure, func_update_file)
53795         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am)
53796         (func_import): Add support for --gnu-make.
53798 2017-03-11  Paul Eggert  <eggert@cs.ucla.edu>
53800         gnulib-common.m4: avoid aclocal.m4 bloat
53801         * m4/gnulib-common.m4 (gl_PROG_AR_RANLIB):
53802         Hide AM_PROG_AR from aclocal, so that aclocal does not
53803         install irrelevant macro definitions into aclocal.m4.
53805 2017-03-10  Bruno Haible  <bruno@clisp.org>
53807         vma-iter: Let callers know about error.
53808         * lib/vma-iter.h (vma_iterate): Return 'int', not 'void'.
53809         * lib/vma-iter.c (vma_iterate): Return -1 in case of error.
53811 2017-03-05  Bruno Haible  <bruno@clisp.org>
53813         Fix value of LD for 64-bit compilers on AIX.
53814         * m4/lib-ld.m4 (AC_LIB_PROG_LD): For 64-bit compilers on AIX
53815         ("gcc -maix64" and "xlc -q64"), add option -b64 to $LD.
53817 2017-03-04  Paul Eggert  <eggert@cs.ucla.edu>
53819         dtotimespec: simplify
53820         * lib/dtotimespec.c (dtotimespec): Simplify.
53822 2017-03-04  Bruno Haible  <bruno@clisp.org>
53824         test-calloc-gnu: Reenable test also for GCC 7.
53825         * tests/test-calloc-gnu.c (eight): New function.
53826         (main): Don't skip test; use eight() instead.
53828 2017-03-04  Jim Meyering  <meyering@fb.com>
53830         test-calloc-gnu: port to GCC7
53831         * tests/test-calloc-gnu.c (main) [__GNUC__ >= 7]: Skip a test
53832         that attempts to calloc more than SIZE_MAX bytes, because GCC7
53833         and newer would detect that at compilation time.
53835 2017-03-04  Bruno Haible  <bruno@clisp.org>
53837         tests: Avoid compiler warning about uses of null_ptr.
53838         * tests/null-ptr.h: New file.
53839         * tests/test-canonicalize.c: Include null-ptr.h.
53840         (null_ptr): Remove function.
53841         * tests/test-canonicalize-lgpl.c: Likewise.
53842         * tests/test-memmem.c: Likewise.
53843         * tests/test-ptsname_r.c: Likewise.
53844         * modules/canonicalize-tests (Files): Add tests/null-ptr.h.
53845         * modules/canonicalize-lgpl-tests: Likewise.
53846         * modules/memmem-tests: Likewise.
53847         * modules/ptsname_r-tests: Likewise.
53848         Reported by Jim Meyering.
53850 2017-03-03  Bruno Haible  <bruno@clisp.org>
53852         doc: Mention Mac OS X deficiencies regarding semaphores.
53853         * doc/posix-functions/sem_init.texi: Mention status on Mac OS X.
53854         * doc/posix-functions/sem_destroy.texi: Likewise.
53855         * doc/posix-functions/sem_getvalue.texi: Likewise.
53857 2017-03-03  Bruno Haible  <bruno@clisp.org>
53859         lock tests: Fix test failure on Mac OS X (regression from 2017-01-05).
53860         Reported by Assaf Gordon <assafgordon@gmail.com> via
53861         Pádraig Brady <P@draigBrady.com>.
53862         * tests/test-lock.c: On Mac OS X, use named semaphores, not unnamed
53863         semaphores.
53864         (USE_NAMED_SEMAPHORE, USE_UNNAMED_SEMAPHORE): New macros.
53865         (atomic_int_semaphore): New macro.
53867 2017-02-28  Bruno Haible  <bruno@clisp.org>
53869         perror tests: Tweak for z/OS.
53870         Reported by Daniel Richard G. <skunk@iskunk.org>.
53871         * tests/test-perror.sh: Don't fail z/OS style perror output.
53873 2017-02-26  Bruno Haible  <bruno@clisp.org>
53875         nproc: Refactor large function.
53876         * lib/nproc.c (num_processors_ignoring_omp): New function, extracted
53877         from num_processors.
53878         (num_processors): In this function, only deal with OMP.
53880 2017-02-26  Pádraig Brady  <P@draigBrady.com>
53882         nproc: adjust handling of OpenMP environment variables
53883         to match the return value from omp_get_num_threads(), i.e.:
53884          - honor OMP_THREAD_LIMIT without OMP_NUM_THREADS
53885          - Treat 0 as an invalid value and ignore
53886         Also remove the call to omp_get_num_threads() because
53887         it's ineffective without the omp pragmas in place.
53888         * lib/nproc.c (parse_omp_threads): Return 0 if specified,
53889         so that it can be ignored.
53890         (num_processors): Honor OMP_THREAD_LIMIT even without
53891         OMP_NUM_THREADS being set.  Also fix a typo in the environment
53892         variable being checked, from the previous recent commit.
53894 2017-02-26  Pádraig Brady  <P@draigBrady.com>
53896         nproc: support nested OMP_NUM_THREADS, and OMP_THREAD_LIMIT
53897         * lib/nproc.c (parse_omp_threads): A new function refactored
53898         from num_processors() to support parsing both of the
53899         above environment variables.
53900         (num_processors): Prefer using omp_get_num_threads() with [_OPENMP]
53901         to accurately reflect the current OpenMP nesting level.
53902         Also support the OMP_THREAD_LIMIT environment variable
53903         to limit the max value determined from OMP_NUM_THREADS.
53904         * modules/nproc: Depend on minmax header.
53905         Suggested by Oliver Heimlich.
53907 2017-02-25  Bruno Haible  <bruno@clisp.org>
53909         maintainer-makefile: Fix AC_PROG_SED with autoconf cache.
53910         * m4/gnulib-common.m4 (AC_PROG_SED): Fix AC_CACHE_CHECK invocation.
53912 2017-02-24  Paul Eggert  <eggert@cs.ucla.edu>
53914         ftoastr: port to -Wdouble-promotion
53915         Work around -Wdouble-promotion false alarm in recent GCCs.
53916         * lib/ftoastr.c (PROMOTED_FLOAT): New macro.
53917         (ftoastr_snprintf, FTOASTR): Use it.
53919 2017-02-21  Bruno Haible  <bruno@clisp.org>
53921         lock tests: Fix build failure on GNU/Hurd (regression from 2017-01-05).
53922         Reported by Rene Saavedra <rennes@openmailbox.org> in
53923         https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25821 via Paul Eggert.
53924         * lib/glthread/lock.h: On glibc systems without
53925         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP, use the fallback
53926         implementation of rwlocks.
53927         * lib/glthread/lock.c: Likewise.
53929 2017-02-20  Bruno Haible  <bruno@clisp.org>
53931         lock tests: Fix build failure on z/OS.
53932         Reported by Daniel Richard G. <skunk@iskunk.org>.
53933         * modules/lock-tests (configure.ac): Test for <semaphore.h>.
53934         * tests/test-lock.c (USE_SEMAPHORE): Don't set if <semaphore.h> does not
53935         exist.
53937 2017-02-19  Bruno Haible  <bruno@clisp.org>
53939         havelib: Prefer the search path of /usr/bin/gcc over the one of $CC.
53940         This helps when CC=clang.
53941         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Prefer the search path
53942         of /usr/bin/gcc.
53944         havelib: Support overriding the result of AC_LIB_PREPARE_MULTILIB.
53945         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Use AC_CACHE_CHECK.
53947 2017-02-19  Bruno Haible  <bruno@clisp.org>
53949         gnulib-tool: Avoid conflict of havelib-tests with --single-configure.
53950         * gnulib_tool (func_create_testdir): Avoid havelib-tests when
53951         --with-tests --single-configure is specified.
53953 2017-02-16  Tim Rühsen  <tim.ruehsen@gmx.de>
53955         users.txt: Update links, use HTTPS where possible
53956         * users.txt: Updated to HTTPS where possible,
53957         fixed some links to new locations.
53959 2017-02-16  Bruno Haible  <bruno@clisp.org>
53961         xbinary-io: Fix inlining.
53962         * lib/xbinary-io.c: Set XBINARY_IO_INLINE, not XSETMODE_INLINE.
53964 2017-02-16  Paul Eggert  <eggert@cs.ucla.edu>
53966         xbinary-io: rename from xsetmode
53967         This patch is taken from suggestions by Bruno Haible in:
53968         http://lists.gnu.org/r/bug-gnulib/2017-02/msg00060.html
53969         http://lists.gnu.org/r/bug-gnulib/2017-02/msg00061.html
53970         * lib/binary-io.c (__gl_setmode_check): Set errno to EINVAL,
53971         not ENOTTY, when it is an inappropriate device.
53972         * lib/binary-io.h (SET_BINARY): Resurrect.
53973         * lib/xbinary-io.c: Rename from lib/xsetmode.c.
53974         (xset_binary_mode_error): Rename from xsetmode_error.
53975         * lib/xbinary-io.h: Rename from lib/xsetmode.h.
53976         (xset_binary_mode): Rename from xsetmode.
53977         All uses changed.
53978         * modules/xbinary-io: Rename from modules/xsetmode.
53979         Update file names.
53980         * tests/test-binary-io.sh (tmpfiles): Remove no-longer-used file name.
53981         * NEWS: Update to match revised behavior.
53983 2017-02-15  Paul Eggert  <eggert@cs.ucla.edu>
53985         tests: Adjust to recent SET_BINARY change
53986         * tests/test-binary-io.c (main):
53987         * tests/test-binary-io.sh: Remove test for SET_BINARY.
53988         * tests/test-closein.c, tests/test-fflush2.c, tests/test-ftell.c:
53989         * tests/test-ftello.c, tests/test-nonblocking-pipe-child.c:
53990         * tests/test-yesno.c: Use set_binary_mode, not SET_BINARY.
53992         xsetmode: new module
53993         This is to fix a problem noted by Eric Blake.
53994         Code was using xfreopen to change files to binary mode, but this
53995         fails for stdout when in append mode.  Such code should use
53996         xsetmode instead.
53997         * NEWS: Document incompatible changes to binary-io module.
53998         * lib/binary-io.c (__gl_setmode_check) [__DJGPP__ || __EMX__]:
53999         New function.
54000         * lib/binary-io.h (__gl_setmode): Rename from set_binary_mode.
54001         (set_binary_mode): New function, which also checks for tty.
54002         * lib/xsetmode.c, lib/xsetmode.h, modules/xsetmode: New files.
54004 2017-02-14  Paul Eggert  <eggert@cs.ucla.edu>
54006         headers: fix begin-end typos
54007         * lib/mbfile.h, lib/se-selinux.in.h: Fix typos by replacing
54008         _GL_INLINE_HEADER_BEGIN with _GL_INLINE_HEADER_END.
54010         selinux-h: port to PGI 16.10
54011         * lib/se-selinux.in.h: Don't assume that include_next skips over
54012         duplicate -I DIR options.
54014         argp: port to PGI 16.10
54015         * lib/argp-pin.c (dummy): Declare as needed to make file nonempty.
54017 2017-02-13  Darshit Shah  <darnir@gnu.org>
54019         unicase: Update function protoype to match definition.
54020         * lib/unicase/special-casing.h (gl_unicase_special_lookup): Gperf 3.1
54021         uses 'size_t' as the datatype for the 'len' parameter in the functions
54022         it generates. Update the prototype specified here to match the newly
54023         generated function.
54025 2017-02-12  Bruno Haible  <bruno@clisp.org>
54027         times test: Avoid gcc warnings on Linux/x32.
54028         * tests/test-times.c (main): Really cast printf arguments from clock_t
54029         to 'long int'.
54031 2017-02-12  Paul Eggert  <eggert@cs.ucla.edu>
54033         glob: port better to emscripten
54034         Problem reported by Bruno Haible in:
54035         http://lists.gnu.org/r/bug-gnulib/2017-02/msg00031.html
54036         * lib/glob.c (glob): Don't assume HAVE_GETPWNAM_R || _LIBC.
54038 2017-02-11  Bruno Haible  <bruno@clisp.org>
54040         host-cpu-c-abi: Support for 64-bit AIX, 32-bit armhf on arm64, hppa64.
54041         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Define also HOST_CPU.
54042         For the x32 ABI on x86_64, set HOST_CPU_C_ABI to 'x86_64-x32' and define
54043         both __x86_64__ and __x86_64_x32__. For the ELFv2 ABI on powerpc64,
54044         define both __powerpc64__ and __powerpc64_elfv2__. Recognize 64-bit
54045         compilation on AIX. Recognize 32-bit compilation on arm64/Linux.
54046         Distinguish hppa64 from hppa.
54048 2017-02-10  Bruno Haible  <bruno@clisp.org>
54050         search: Don't assume that tsearch() exists if 'VISIT' is defined.
54051         * m4/search_h.m4 (gl_SEARCH_H): Determine HAVE_TYPE_VISIT.
54052         * modules/search (Makefile.am): Substitute HAVE_TYPE_VISIT.
54053         * lib/search.in.h (VISIT): Define if HAVE_TYPE_VISIT is 0.
54055 2017-02-09  Bruno Haible  <bruno@clisp.org>
54057         doc: Don't mention obsolete AC_LIBTOOL_WIN32_DLL macro.
54058         * doc/gnulib.texi (Libtool and Windows): Recommend
54059         LT_INIT([win32-dll]) instead of AC_LIBTOOL_WIN32_DLL.
54060         Reported by Reuben Thomas <rrt@sc3d.org>.
54062 2017-02-08  Paul Eggert  <eggert@cs.ucla.edu>
54064         stddef-tests: port to SIZE_MAX <= INT_MAX
54065         * tests/test-stddef.c: Include <limits.h>, for INT_MAX.
54066         Do not assume that INT_MAX < SIZE_MAX.
54068 2017-02-01  Bruno Haible  <bruno@clisp.org>
54070         lock tests: Fix link error.
54071         * modules/lock-tests (test_rwlock1_LDADD): Add @YIELD_LIB@.
54072         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
54074 2017-01-31  Bruno Haible  <bruno@clisp.org>
54076         lock: Fix link error (regression from 2017-01-05).
54077         * lib/glthread/lock.h [USE_POSIX_THREADS_WEAK]: Declare also
54078         pthread_rwlockattr_init, pthread_rwlockattr_setkind_np,
54079         pthread_rwlockattr_destroy weak.
54080         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
54082 2017-01-30  Paul Eggert  <eggert@cs.ucla.edu>
54084         Port to PGI 16.10 x86-64
54085         This patch fixes one real bug in gl_anylinked_list2.h, along with
54086         some minor glitches that are not bugs.  It does not silence PGI’s
54087         thousands of bogus warnings when compiling test-intprops.c.
54088         Fortunately, the warnings do not cause a failure.
54089         * lib/c-ctype.h (_C_CTYPE_LOWER_A_THRU_F_N, _C_CTYPE_LOWER_N):
54090         Rename parameter to avoid PGI warning about ‘#define f(n) 'n'’.
54091         My goodness, PGI goes back a long ways - this predates C89!
54092         * lib/gl_anylinked_list2.h (ASYNCSAFE): Fix bug caught by PGI.
54093         For example, ASYNCSAFE (const void *) should expand to
54094         ‘const void *volatile’, not to ‘volatile const void *’.
54095         * lib/spawn.in.h (POSIX_SPAWN_USEVFORK): Don't define if already defined.
54096         * lib/verify.h (verify) [!__GNUC__]:
54097         Use shorter albeit meaningless string to bypass silly compiler limits.
54098         * tests/infinity.h (Infinityf, Infinityd, Infinityl) [__PGI]:
54099         * tests/nan.h (NaNf, NaNd, NaNl):
54100         Use static functions to avoid misguided compiler diagnostics.
54101         Is there some reason we don’t use static functions on all platforms?
54103 2017-01-20  Paul Eggert  <eggert@cs.ucla.edu>
54105         parse-datetime: handle timezones reentrantly
54106         This API change was prompted by a report by Pádraig Brady in:
54107         https://bug.debian.org/851934#10
54108         To help fix the bug, make parse_datetime2 more reentrant.
54109         * NEWS: Document this incompatible change.
54110         * lib/parse-datetime.h, lib/parse-datetime.y (parse_datetime2):
54111         Add two arguments, the timezone and the timezone name.
54112         All callers changed.  If TZ="..." is specified, use it for
54113         calculating defaults.
54114         * lib/parse-datetime.y: Don't include xalloc.h or use xmalloc, as
54115         this code should be usable in a library.
54116         (mktime_ok, get_effective_timezone):
54117         Accept timezone arg too.  All callers changed.
54118         (get_tz): Remove.
54119         (get_effective_timezone): Check for failures.
54121 2017-01-20  Eric Blake  <eblake@redhat.com>
54123         localename: port to cygwin 2.6
54124         * lib/localename.c (gl_locale_name_thread_unsafe): Add clause for
54125         Cygwin.
54126         * modules/localename (Depends-on): Add extensions, since
54127         NL_LOCALE_NAME() is not visible without it.
54129 2017-01-17  Pádraig Brady  <P@draigBrady.com>
54131         parse-datetime: fix dependence on AC_PROG_SED
54132         * modules/parse-datetime: Use `sed` directly like all other modules.
54133         Reported by J William Piggott
54135 2017-01-16  Paul Eggert  <eggert@cs.ucla.edu>
54137         intprops: update doc URLs
54138         * doc/intprops.texi (Integer Range Overflow): Update URLs.
54140 2017-01-16  Bruno Haible  <bruno@clisp.org>
54142         host-cpu-c-abi: Add support for armhf, arm64, x32, s390x.
54143         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Require gl_C_ASM. On x86_64
54144         systems, distinguish x86_64 and x32. On arm systems, distinguish arm,
54145         armhf, arm64, and no longer distinguish arm and armel. On s390x systems,
54146         distinguish s390 and s390x.
54147         * modules/host-cpu-c-abi (Files): Add m4/asm-underscore.m4.
54148         * NEWS: Mention the change regarding 'armel'.
54150 2017-01-15  Paul Eggert  <eggert@cs.ucla.edu>
54152         localeinfo: case_folded_counterparts and WEOF
54153         * NEWS: Document this.
54154         * lib/localeinfo.c (case_folded_counterparts):
54155         First arg is now wint_t, not wchar_t.  This generalizes the
54156         function to also work on WEOF, where it returns 0.
54158         dfa: port to gcc -fsanitize=undefined
54159         * lib/dfa.c (copy): Don’t pass NULL with size 0 to memcpy,
54160         as this runs afoul of gcc -fsanitize=undefined.
54162 2017-01-14  Paul Eggert  <eggert@cs.ucla.edu>
54164         strftime: %z is -00 if unknown
54165         * lib/strftime.c (DO_TZ_OFFSET): Omit arg 'negative'; it's now
54166         the caller's responsibility to set 'negative_number'.  All uses changed.
54167         (__strftime_internal): Put '-' before a zero UTC offset if the time
54168         zone abbreviation starts with "-", which is the recently-introduced
54169         tzdb convention for an unknown UTC offset that is arbitrarily set to 0.
54170         * tests/test-strftime.c: Test for this.
54172 2017-01-10  Paul Eggert  <eggert@cs.ucla.edu>
54174         dfa: port to older GCC
54175         Problem reported by Assaf Gordon in:
54176         http://lists.gnu.org/r/bug-gnulib/2017-01/msg00103.html
54177         * modules/c99: New module.  This merely attempts to use the latest
54178         C version, which should be enough to solve this particular problem.
54179         The idea is to document which Gnulib modules assume C99 or later.
54180         * modules/dfa (Depends-on): Add it.
54182 2017-01-10  Bruno Haible  <bruno@clisp.org>
54184         Update DEPENDENCIES.
54185         * DEPENDENCIES: List only https URLs. Update recommended version for
54186         autoconf, automake, gperf.
54188 2017-01-10  Jim Meyering  <meyering@fb.com>
54190         maint.mk: enforce spelling of "timestamp" (i.e., no space)
54191         * top/maint.mk (prohibit_undesirable_word_seq_RE_): Also
54192         disallow /\btime\s+stamps?\b/.  Prefer "timestamp".
54194 2017-01-10  Paul Eggert  <eggert@cs.ucla.edu>
54196         dfa: minor simplification with emptyset
54197         * lib/dfa.c (build_state): Simplify by using emptyset.
54199 2017-01-09  Paul Eggert  <eggert@cs.ucla.edu>
54201         dfa: shrink constraints from 4 bits to 3
54202         * lib/dfa.c (newline_constraint, letter_constraint)
54203         (other_constraint, prev_newline_dependent)
54204         (prev_letter_dependent, NO_CONSTRAINT, BEGLINE_CONSTRAINT)
54205         (ENDLINE_CONSTRAINT, BEGWORD_CONSTRAINT, ENDWORD_CONSTRAINT)
54206         (LIMWORD_CONSTRAINT, NOTLIMWORD_CONSTRAINT):
54207         Constraints need only 3 bits, not 4.  Using smaller integers
54208         shrinks the code a bit and makes grep a tad faster on x86-64.
54210         dfa: omit unnecessary ptrdiff_t check
54211         * lib/dfa.c (alloc_position_set): Do not worry about ptrdiff_t
54212         overflow, since xnmalloc does that now.
54214         dfa: omit unnecessary allocation
54215         * lib/dfa.c (dfaanalyze): Do not allocate follow set, since
54216         an all-zero follow set works just fine.
54218         dfa: omit unused local
54219         * lib/dfa.c (build_state): Fix up recent change.
54221         maint: remove stray .texi files
54222         Although these were superseded by other files like
54223         doc/posix-functions/ctime.texi, the old files were not removed.
54224         * doc/ctime.texi, doc/inet_ntoa.texi: Remove.
54226 2017-01-08  Paul Eggert  <eggert@cs.ucla.edu>
54228         getprogname: fix port to IRIX
54229         * lib/getprogname.c (getprogname) [__sgi]:
54230         Don't dump core if malloc returns NULL.
54232         dfa: fix reallocation bug when matching newlines
54233         Problem reported for sed by S. Gilles (Bug#25390).
54234         * lib/dfa.c (realloc_trans_if_necessary): Move earlier.
54235         (dfastate): Reallocate before moving any newline transition ...
54236         (build_state): ... instead of reallocating here, where it is too late.
54238 2017-01-07  Tim Rühsen  <tim.ruehsen@gmx.de>  (tiny change)
54240         Avoid -Wundef warning about undefined WINDOWS_SOCKETS.
54241         * lib/sockets.h: Test if WINDOWS_SOCKETS is defined.
54243 2017-01-07  Tim Rühsen  <tim.ruehsen@gmx.de>  (tiny change)
54245         Avoid -Wundef warning about undefined __USE_FILE_OFFSET64.
54246         * lib/glob-libc.h: Test if __USE_FILE_OFFSET64 is defined.
54248 2017-01-07  Bruno Haible  <bruno@clisp.org>
54250         stdioext: Port to Minix 3.2 and newer.
54251         * lib/stdio-impl.h: Treat __minix like the newest NetBSD.
54252         * lib/fseeko.c (fseeko): Likewise.
54253         Reported by Nelson Beebe via Paul Eggert.
54255 2017-01-06  Paul Eggert  <eggert@cs.ucla.edu>
54257         getprogname: port to IRIX
54258         * lib/getprogname.c (getprogname): Port to IRIX.
54259         Based on an idea by Bastien Roucariès at:
54260         http://lists.gnu.org/r/bug-gnulib/2010-12/msg00096.html
54261         via code from Bruno Haible at:
54262         https://lists.gnu.org/r/bug-gnulib/2010-12/msg00249.html
54264         localename-tests: port to NetBSD 7
54265         Problem reported by Nelson H. F. Beebe.
54266         * tests/test-localename.c:
54267         Test newlocale and uselocale only if both exist.
54269         glob, intprops, xalloc: work around Clang bug
54270         Work around LLVM bug 16404, which is still not fixed.
54271         https://llvm.org/bugs/show_bug.cgi?id=16404
54272         Problem reported by Nelson H. F. Beebe.
54273         * lib/glob.c, lib/intprops.h, lib/xalloc-oversized.h (__has_builtin):
54274         Remove.
54275         * lib/glob.c (size_add_wrapv):
54276         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW, _GL_HAS_BUILTIN_OVERFLOW_P):
54277         * lib/xalloc-oversized.h (xalloc_oversized):
54278         Do not use overflow builtins if Clang.
54280         dfa: fix 'return' typo
54281         Problem reported by Nelson H. F. Beebe.
54282         * lib/dfa.c (merge): Fix typo that Sun compilers rejected.
54284 2017-01-05  Pádraig Brady  <P@draigBrady.com>
54286         parse-datetime: fix generated paths for coverage files
54287         * modules/parse-datetime: Adjust the paths for parse-datetime.y
54288         within parse-datetime.c, so that gcc generates appropriate .gcno
54289         files, allowing lcov to proceed without error.  Previously it
54290         would error trying to find "lib/lib/parse-datetime.y".
54292 2017-01-05  Pádraig Brady  <P@draigBrady.com>
54294         maint.mk: support parallel execution of coverage
54295         * top/maint.mk (coverage): Run dependencies serially,
54296         thus supporting parallel processing of each one,
54297         particularly build-coverage, which builds and runs tests.
54299 2017-01-05  Bruno Haible  <bruno@clisp.org>
54301         lock tests: Prefer semaphore over mutex.
54302         * tests/test-lock.c (USE_SEMAPHORE): New constant.
54303         (struct atomic_int, init_atomic_int, get_atomic_int_value,
54304         set_atomic_int_value) [USE_SEMAPHORE]: Define using a POSIX semaphore.
54305         Suggested by Torvald Riegel <triegel@redhat.com>.
54307 2017-01-05  Bruno Haible  <bruno@clisp.org>
54309         lock: Provide guarantee to avoid writer starvation for rwlocks.
54310         The rationale is: 1) Read-preferring read-write locks are prone to
54311         writer starvation if the number of reader threads multiplied by the
54312         percentage of time they have the lock held is too high. 2) Write-
54313         preferring read-write locks are the only reliable way to avoid this.
54314         3) There have been reports of 'test-lock' hanging on glibc systems
54315         http://lists.gnu.org/r/bug-gnulib/2017-01/msg00009.html,
54316         and glibc indeed implements read-preferring rwlocks by default, see
54317         http://man7.org/linux/man-pages/man3/pthread_rwlockattr_setkind_np.3.html
54318         and https://sourceware.org/bugzilla/show_bug.cgi?id=13701 .
54319         * m4/pthread_rwlock_rdlock.m4: New file.
54320         * m4/lock.m4 (gl_LOCK): Invoke gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER.
54321         * lib/glthread/lock.h [USE_POSIX_THREADS]: Test
54322         HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER. Use a different implementation
54323         of rwlock initialization on glibc systems without
54324         HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER. Use a different implementation
54325         of rwlocks altogether on non-glibc systems without
54326         HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER.
54327         [USE_PTH_THREADS]: Use a different implementation of rwlocks altogether.
54328         * lib/glthread/lock.c [USE_POSIX_THREADS]
54329         (glthread_rwlock_init_for_glibc): New function.
54330         [USE_POSIX_THREADS] (glthread_rwlock_rdlock_multithreaded): Update
54331         comment.
54332         [USE_PTH_THREADS]: New implementation of rwlocks.
54333         [USE_WINDOWS_THREADS] (glthread_rwlock_rdlock_func): Prefer writers over
54334         readers.
54335         * modules/lock (Files): Add m4/pthread_rwlock_rdlock.m4.
54336         (Depends-on): Add 'extensions'.
54337         * tests/test-rwlock1.c: New file.
54338         * lock-tests (Files): Add it.
54339         (Depends-on): Add usleep.
54340         (Makefile.am): Add test-rwlock1 to the tests.
54342 2017-01-05  Bruno Haible  <bruno@clisp.org>
54344         thread: Fix pth port.
54345         * lib/glthread/thread.h (pth_init): Declare weak.
54346         (glthread_create, glthread_sigmask, glthread_join, gl_thread_self,
54347         gl_thread_exit): Make sure Pth is initialized before invoking any Pth
54348         function.
54350 2017-01-04  Assaf Gordon  <assafgordon@gmail.com>
54352         parse-datetime: fix debug message on lone year number
54353         Input dates such as
54354           date -d "Apr 11 22:59:00 2011"
54355         are parsed as date (Apr 11, with default year 2016), then time, then a
54356         number (2011). Based on the combination of previously seen tokens,
54357         'digits_to_date_time' determines 2011 to be a year value.
54358         This fixes the debug messages to correctly show the updated year.
54359         Before:
54360             $ date --debug -d 'Apr 11 22:59:00 2011'
54361             date: parsed date part: (Y-M-D) 2016-04-11
54362             date: parsed time part: 22:59:00
54363             date: parsed number part: today/this/now
54364         After:
54365             $ ./src/date --debug -d 'Apr 11 22:59:00 2011'
54366             date: parsed date part: (Y-M-D) 2016-04-11
54367             date: parsed time part: 22:59:00
54368             date: parsed number part: year: 2011
54369         * lib/parse-datetime.y (struct parser_control): Add 'year_seen',
54370         'debug_year_seen' member fields.
54371         (digits_to_date_time): Update 'year_seen' as needed.
54372         (debug_print_current_time): Inform about year updates.
54373         (parse_datetime2): Initialize year_seen,debug_year_seen member fields.
54375         parse-datetime: fix local timezone debug messages
54376         "Local timezones" are strings that affect only DST relative to the
54377         default timezone. The debug messages in parse-datetime.y printed
54378         wrong information when encountering local timezones.
54379         Examples:
54380         Here EET/EEST are time zones ('zone' token, with values +02:00/+03:00):
54381              TZ=Asia/Tokyo ./src/date --debug -d '2011-12-11 EET'
54382              TZ=Asia/Tokyo ./src/date --debug -d '2011-06-11 EEST'
54383         When the default timezone relates to the zone strings, EET/EEST are
54384         parsed as local timezones (tLOCAL_ZONE), and only change the DST
54385         value (0/1, respectively):
54386              TZ=Europe/Helsinki ./src/date --debug -d '2011-12-11 EET'
54387              TZ=Europe/Helsinki ./src/date --debug -d '2011-06-11 EEST'
54388         * lib/parse-datetime.y (debug_print_current_time): If local timezone
54389         was seen, inform about DST change, don't print actual timezone.
54390         (debug_strfdatetime): If local timezone was seen, use default timezone
54391         (and adjust as needed) instead of using incorrect timezone.
54392         (parse_datetime2): Use correct time-zone source string, and adjust
54393         default timezone as needed.
54395         parse-datetime: add debug warning about DST changes
54396         Incorrect date arithmetic due to daylight saving time (DST) are a
54397         common (false) bug report in coreutils.
54398         Detect two such cases and print a warning:
54399         1. year/month/day adjustments (performed on 'struct tm'),
54400            where 'mktime' returns a different isdst value.
54401         2. hour/minute/seconds/ns adjustments (performed on 'time_t'),
54402            where the result of 'localtime(3)' on the value will return a
54403            different isdst value.
54404         Note: DST changes could be harmless or unnoticeable.
54405         Examples (with 'TZ=America/New_York'):
54406         Unnoticeable: result is 2016-Dec-14
54407            $ date -d '2016-06-15 EDT + 6 months' +%b
54408            Dec
54409         Unnoticeable: result is 2016-Dec-15 11:00:00
54410            $ date -d '2016-06-15 12:00:00 EDT + 6 months' +%F
54411            2016-12-15
54412         This is unexpected:
54413            $ date -d '2016-06-01 EDT + 6 months' +%F
54414            2016-11-30
54415         The new debug warnings will show:
54416            $ ./src/date --debug -d '2016-06-01 EDT + 6 months' +%F
54417            ...
54418            date: warning: daylight saving time changed after date adjustment
54419            ...
54420         * lib/parse-datetime.y (parse_datetime2): Detect DST changes, and
54421         print an appropriate warning message.
54423         parse-datetime: add debug warning about date arithmetic
54424         Date arithmetic are done directly on the fields of 'struct tm',
54425         which can result in invalid dates. Normalization with 'mktime(3)'
54426         will then produce a different date - which might cause unexpected
54427         results.
54428         Examples:
54429           '2016-10-31 - 1 month' => 2016-09-31 normalized to 2016-10-01.
54430           '2016-02-29 + 1 year'  => 2017-02-29 normalized to 2017-03-01.
54431         Note that date normalization is not inherently wrong and not rejected,
54432         as it has legitimate uses:
54433           '2016-12-29 + 5 days' => 2016-12-34 noramlized to 2017-01-03.
54434         If the user asked to adjust months but 'mday' changed,
54435         or user asked to adjust years but 'month' changed - warn about it.
54436             $ ./src/date --debug -d '2016-10-31 - 1 month'
54437             ...
54438             date: warning: when adding relative months/years, \
54439                            it is recommended to specify the 15th of the month
54440             ...
54441             date: warning: month/year adjustment resulted in shifted dates:
54442             date:      adjusted Y M D: 2016 09 31
54443             date:    normalized Y M D: 2010 10 01
54444             ...
54445         * lib/parse-datetime.y (parse_datetime2): Detect such cases and print
54446         a warning message. Improve recommendation of when to use 15 of the
54447         month or noon for date arithmetic.
54449         parse-datetime: fix debug message of relative part after timezone
54450         Relative part (e.g '+8 days') after a timezone string was not
54451         reported (was only reported after a timezone number). Due to the
54452         parser's structure, timezone strings with numbers were handled
54453         separately.
54454         before:
54455              # Timezone number + relative part: OK
54456              $ ./src/date --debug +%F -d '2013-10-30 00:00:00 +00:00 -8 days'
54457              ...
54458              date: parsed relative part: -8 day(s)
54459              # Timezone string + relative part: missing
54460              $ ./src/date --debug +%F -d '2013-10-30 00:00:00 UTC -8 days'
54461              [ missing message ]
54462         After: messages are printed in both cases.
54463         * lib/parse-datetime.y ('zone' token): Call debug_print_relative_time.
54465         parse-datetime: fix incorrect debug message on lone number
54466         A lone number is an absolute value, not a relative time part.
54467         before:
54468            $ date --debug -d '20130101'
54469            date: parsed number part: today/this/now
54470         After:
54471            $ ./src/date --debug -d '20130101'
54472            date: parsed number part: (Y-M-D) 2013-01-01
54473         * lib/parse-datetime.y ('item'/'number' tokens): Call
54474         'debug_print_current_time' instead of 'debug_print_relative_time'.
54476 2017-01-02  Paul Eggert  <eggert@cs.ucla.edu>
54478         doc: modernize for C11 etc.
54479         * doc/gnulib-readme.texi (Portability guidelines): Modernize a bit
54480         for C11, MinGW, etc.  This responds to Paul Smith's question in:
54481         http://lists.gnu.org/r/bug-gnulib/2017-01/msg00014.html
54483         dfa: prefer functions to FETCH_WC macro
54484         * lib/dfa.c (FETCH_WC): Remove, replacing with ...
54485         (fetch_wc, bracket_fetch_wc): ... new functions.  These store the
54486         wint_t result into DFA->lex.wctok instead of to a separate arg.
54487         All callers changed.  Move more local decls closer to where
54488         they're used.
54490         dfa: narrow more local var scopes
54491         * lib/dfa.c: Move more local decls to be more local.
54493         dfa: remove duplicate assignment
54494         Problem reported by Bruno Haible in:
54495         http://lists.gnu.org/r/bug-gnulib/2017-01/msg00007.html
54496         * lib/dfa.c (parse_bracket_exp): Simplify.
54498 2017-01-01  Paul Eggert  <eggert@cs.ucla.edu>
54500         dfa: simplify constraint-dependency checking
54501         * lib/dfa.c (prev_newline_constraint, prev_letter_constraint)
54502         (prev_other_constraint): Remove.
54503         (prev_newline_dependent, prev_letter_dependent):
54504         Simplify, to avoid an unnecessary bitwise AND operation.
54506         dfa: prefer functions and constants to macros
54507         * lib/dfa.c: Prefer constants to macros where either will do.
54508         (streq, isasciidigit, newline_constraint)
54509         (letter_constraint, other_constraint, succeeds_in_context)
54510         (prev_newline_constraint, prev_letter_constraint)
54511         (prev_other_constraint, prev_newline_dependent)
54512         (prev_letter_dependent, accepting, accepts_in_context):
54513         Now static functions instead of function-like macros.
54514         Use lower-case names accordingly.  All uses changed.
54516         dfa: narrow more local var scopes
54517         * lib/dfa.c: Move some more local decls down to nearer where
54518         they're needed.
54520 2016-12-31  Jim Meyering  <meyering@fb.com>
54522         dfa: narrow the scope of many local variables
54523         * lib/dfa.c: Now that we are no longer constrained to c89, move
54524         declarations of many variables (often indices) "down" into the
54525         scope(s) where used or to the point of definition.  This is a
54526         no-semantic-change diff.
54528 2017-01-01  Paul Eggert  <eggert@cs.ucla.edu>
54530         version-etc: new year
54531         * build-aux/gendocs.sh (version):
54532         * doc/gendocs_template:
54533         * doc/gendocs_template_min:
54534         * doc/gnulib.texi:
54535         * lib/version-etc.c (COPYRIGHT_YEAR):
54536         Update copyright dates by hand in templates and the like.
54537         * all files: Run 'make update-copyright'.
54539 2016-12-31  Eric Blake  <eblake@redhat.com>
54541         do-release-commit-and-tag: avoid shell syntax error
54542         * build-aux/do-release-commit-and-tag (curr_br): $branch can
54543         contain spaces when rebasing.
54545         maint.mk: hoist gnulib_dir definition earlier
54546         * top/maint.mk (gnulib_dir): Move near top of file.
54548 2016-12-31  Jim Meyering  <meyering@fb.com>
54550         maint.mk: do not always evaluate intprops-related shell
54551         * top/maint.mk (_intprops_names): Change := to just "=" to avoid
54552         using gnulib_dir undefined (gnulib_dir is defined later in the
54553         file, which will be fixed separately), and besides, there is no
54554         need to incur the cost of this shell invocation for every single
54555         use of this .mk file.  Reported by Eric Blake in
54556         https://lists.gnu.org/r/bug-gnulib/2016-12/msg00137.html
54558 2016-12-30  Jim Meyering  <meyering@fb.com>
54560         maint.mk: improve sc_prohibit_intprops_without_use
54561         * top/maint.mk (_intprops_names): Don't hard-code the list of
54562         symbol names.  Instead, derive it on the fly.
54564 2016-12-30  Paul Eggert  <eggert@cs.ucla.edu>
54566         dfa: shorten sbit, success
54567         * lib/dfa.c (struct regex_syntax.sbit):
54568         (struct dfa.success): Use char, not int, for array elements, since
54569         they are all in the range 0..7.
54571         dfa: simplify multibyte_prop etc.
54572         This follows up on a change made when dfa.c was in grep, namely grep
54573         commit c797046c7c13c2647182b919a79a4c5b4ecf82b1
54574         dated 2015-08-12 07:35:03 -0700, which removed unused multibyte support.
54575         That earlier simplification allows for some more simplification
54576         and trimming down here.
54577         * lib/dfa.c (struct mb_char_classes): New member nchars_alloc.
54578         (struct lexer_state): New mamber brack.
54579         (struct dfa, addtok_mb): multibyte_prop elements are now char, not int,
54580         since they must be in the range 0..3 now.
54581         Remove members mbcsets, nmbcsets, mbcsets_alloc, since
54582         the brack member now supersedes them.
54583         (parse_bracket_exp): Update dfa->lex.brack instead of dfa->mbcsets.
54584         (addtok): Use dfa->lex.brack instead of dfa->mbcsets.
54585         (dfaparse): Remove unnecessary initializations of already-0 storage.
54586         (free_mbdata): Free d->lex.brack.chars instead of d->mbcsets.
54587         (dfassbuild): No need to clear sup->mbcsets.
54589         dfa: minor performance tweak
54590         * lib/dfa.c (setbit_wc): Test < 0, not == EOF.
54592         dfa: wrap charclass inside a struct
54593         On my platform (gcc Ubuntu 5.4.0-6ubuntu1~16.04.4 x86-64,
54594         en_US.utf8 locale) this makes 'grep -Fi -f list.txt list.txt >out'
54595         about 5% faster, where list.txt is generated by 'aspell dump
54596         master | head -n 100000 >list.txt'.  See Bug#22239.
54597         * lib/dfa.c (charclass): Wrap inside a struct.  All uses changed.
54598         (CHARCLASS_INIT, tstbit, setbit, clrbit, zeroset, fillset, notset)
54599         (equal, emptyset, charclass_index, setbit_wc, setbit_case_fold_c):
54600         Adjust to this, e.g., by using charclass * rather than charclass.
54601         All callers changed as needed.
54602         (copyset): Remove.  All uses changed to simple assignment.
54603         (parse_bracket_exp): Use zeroset instead of memset.
54605 2016-12-30  Jim Meyering  <meyering@fb.com>
54607         maint.mk: update list of intprops.h symbol names
54608         * top/maint.mk (_intprops_names): Regenerate the list of symbol names.
54609         This avoids a false failure of the sc_prohibit_intprops_without_use
54610         rule in grep.
54612 2016-12-29  Eric Blake  <eblake@redhat.com>
54614         getopt: fix parallel test failure
54615         * tests/test-getopt-posix.c (TEST_GETOPT_TMP_NAME): Set name.
54616         * tests/test-getopt-gnu.c (TEST_GETOPT_TMP_NAME): Likewise.
54617         * tests/test-getopt-main.h (main): Use different file names
54618         in case test-getopt-gnu and test-getopt-posix run in parallel.
54620 2016-12-29  Paul Eggert  <eggert@cs.ucla.edu>
54622         xalloc: x2nrealloc check for ptrdiff_t overflow
54623         * lib/xalloc.h (x2nrealloc): Check for ptrdiff_t overflow, too.
54624         * modules/xalloc, modules/xvasprintf (Depends-on): Add stdint.
54626 2016-12-24  Bruno Haible  <bruno@clisp.org>
54628         lock test: Fix performance problem on multi-core machines.
54629         * tests/test-lock.c (USE_VOLATILE): New macro.
54630         (struct atomic_int): New type.
54631         (init_atomic_int, get_atomic_int_value, set_atomic_int_value): New
54632         functions.
54633         (lock_checker_done, rwlock_checker_done, reclock_checker_done): Define
54634         as 'struct atomic_int'.
54635         (lock_checker_thread, test_lock, rwlock_checker_thread, test_rwlock,
54636         reclock_checker_thread, test_recursive_lock): Use the new functions.
54637         Reported by Eric Blake in
54638         https://www.redhat.com/archives/libvir-list/2012-March/msg00854.html
54639         and by Pádraig Brady in
54640         http://lists.gnu.org/r/bug-gnulib/2016-12/msg00117.html.
54642 2016-12-19  Bruno Haible  <bruno@clisp.org>
54644         vma-iter: Fix endless loop on 64-bit Windows.
54645         * lib/vma-iter.c (vma_iterate): On Windows, use 'uintptr_t' instead of
54646         'unsigned long'.
54648 2016-12-19  Bruno Haible  <bruno@clisp.org>
54650         stdint: Fix WINT_MAX to match the gnulib provided wint_t on minw.
54651         * m4/wint_t.m4 (gt_TYPE_WINT_T): Define GNULIB_OVERRIDES_WINT_T here.
54652         * m4/stdint.m4 (gl_STDINT_H): Don't define GNULIB_OVERRIDES_WINT_T.
54653         Invoke gt_TYPE_WINT_T instead.
54654         (gl_STDINT_TYPE_PROPERTIES): Test GNULIB_OVERRIDES_WINT_T.
54655         * modules/stdint (Files): Add m4/wint_t.m4.
54656         * modules/wchar (Makefile.am): Substitute GNULIB_OVERRIDES_WINT_T.
54657         * modules/wctype-h (Makefile.am): Likewise.
54658         * lib/wchar.in.h (wint_t): Override if GNULIB_OVERRIDES_WINT_T is set,
54659         not only on MSVC.
54660         * lib/wctype.in.h (wint_t): Likewise.
54662 2016-12-19  Paul Eggert  <eggert@cs.ucla.edu>
54664         getopt-posix-tests: fix Makefile typo
54665         * modules/getopt-posix-tests (test_getopt_posix_LDADD):
54666         Fix typo: the last ‘_’ was missing in the name.
54667         I suspect that the typo explains this build failure:
54668         https://buildfarm.opencsw.org/buildbot/builders/ggrep-solaris10-sparc/builds/39
54669         although I can’t reproduce the problem on Solaris 10 sparc.
54671 2016-12-18  Paul Eggert  <eggert@cs.ucla.edu>
54673         dfa: improve worst-case 'replace' performance
54674         See my note in Bug#22357#71.
54675         * lib/dfa.c (insert, delete): Rework to avoid duplicate test.
54676         (merge_constrained): New function, which is like
54677         the old 'merge' function, except with a new argument C2.
54678         Simplify the body by avoiding the need for different sections
54679         of code depending on whether one input is exhausted.
54680         (merge): Use the new function.
54681         (delete): Return the constraint of the deleted position,
54682         not the entire position.  Caller changed.
54683         (replace): Change from O(N*(N + log N)) to O(N log N) algorithm.
54685 2016-12-18  Norihiro Tanaka  <noritnk@kcn.ne.jp>
54687         dfa: performance improvement for removal of epsilon closure
54688         See Bug#22357#32.
54689         * lib/dfa.c (delete): Use binary search to find deleted index.
54690         (replace): New function.  It replaces a position with the followed set.
54691         (epsclosure): Replace it with a new algorithm.  Update caller.
54693 2016-12-18  Bruno Haible  <bruno@clisp.org>
54695         Split tests for getopt-posix and getopt-gnu.
54696         * tests/test-getopt-posix.c: New file.
54697         * tests/test-getopt-gnu.c: New file, with code from test-getopt.c.
54698         * tests/test-getopt-main.h: Renamed from tests/test-getopt.c. Remove
54699         stuff moved to test-getopt-gnu.c. Test TEST_GETOPT_GNU instead of
54700         GNULIB_TEST_GETOPT_GNU.
54701         * modules/getopt-posix-tests (Files): Add test-getopt-posix.c,
54702         test-getopt-main.h. Remove test-getopt.c, test-getopt_long.h.
54703         (Makefile.am): Test test-getopt-posix instead of test-getopt.
54704         * modules/getopt-gnu-tests: New file.
54705         * modules/getopt-gnu (configure.ac): Don't define GNULIB_TEST_GETOPT_GNU.
54707 2016-12-18  Bruno Haible  <bruno@clisp.org>
54709         posix-modules: Add options for specific platforms.
54710         * posix-modules (func_usage): Document options --for-mingw, --for-msvc.
54711         (exclude_for_mingw, exclude_for_msvc, exclude): New variables.
54712         Invoke func_tmpdir. Filter out the excludes.
54714 2016-12-18  Bruno Haible  <bruno@clisp.org>
54716         getopt: Fix link error for users of getopt() in <unistd.h>.
54717         * lib/getopt.in.h (getopt etc.): Do the macro definitions also when
54718         __need_getopt is defined. Undefine all macros before defining them.
54719         * modules/getopt (Include): Clarify that including <unistd.h> is also
54720         OK.
54721         * tests/test-getopt.c: Add comment.
54723 2016-12-17  Bruno Haible  <bruno@clisp.org>
54725         getaddrinfo tests: Avoid compilation error on MSVC.
54726         * tests/test-getaddrinfo.c: Don't check the prototypes of freeaddrinfo,
54727         getaddrinfo on native Windows.
54729 2016-12-17  Bruno Haible  <bruno@clisp.org>
54731         getlogin, getlogin_r: Fix link errors on MSVC.
54732         * m4/getlogin.m4 (gl_LIB_GETLOGIN): New macro.
54733         * modules/getlogin (configure.ac): Require gl_LIB_GETLOGIN.
54734         (Link): New section.
54735         * modules/getlogin_r (Files): Add m4/getlogin.m4.
54736         (configure.ac): Require gl_LIB_GETLOGIN.
54737         (Link): New section.
54738         * NEWS: Mention the new link requirements.
54739         * modules/getlogin-tests (test_getlogin_LDADD): New variable.
54740         * modules/getlogin_r-tests (test_getlogin_r_LDADD): New variable.
54742 2016-12-17  Bruno Haible  <bruno@clisp.org>
54744         Un-deprecate the 'progname' module.
54745         * NEWS: Describe the appropriate use-cases of 'progname' versus
54746         'getprogname'. Based on discussion summary at
54747         http://lists.gnu.org/r/bug-gnulib/2016-10/msg00105.html
54749 2016-12-17  Bruno Haible  <bruno@clisp.org>
54751         Reorganize NEWS a bit.
54752         * NEWS: Move some not so important changes away from section
54753         "Important Notes".
54755 2016-12-17  Bruno Haible  <bruno@clisp.org>
54757         tanhf: Avoid redefinition error on MSVC.
54758         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_TANHF.
54759         * m4/tanhf.m4 (gl_FUNC_TANHF): Set REPLACE_TANHF to 1 if the function
54760         may be defined as an inline function.
54761         * modules/math (Makefile.am): Substitute REPLACE_TANHF.
54762         * lib/math.in.h (tanhf): Override if REPLACE_TANHF is 1.
54764 2016-12-17  Bruno Haible  <bruno@clisp.org>
54766         tanf: Avoid redefinition error on MSVC.
54767         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_TANF.
54768         * m4/tanf.m4 (gl_FUNC_TANF): Set REPLACE_TANF to 1 if the function
54769         may be defined as an inline function.
54770         * modules/math (Makefile.am): Substitute REPLACE_TANF.
54771         * lib/math.in.h (tanf): Override if REPLACE_TANF is 1.
54773 2016-12-17  Bruno Haible  <bruno@clisp.org>
54775         sqrtf: Avoid redefinition error on MSVC.
54776         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_SQRTF.
54777         * m4/sqrtf.m4 (gl_FUNC_SQRTF): Set REPLACE_SQRTF to 1 if the function
54778         may be defined as an inline function.
54779         * modules/math (Makefile.am): Substitute REPLACE_SQRTF.
54780         * lib/math.in.h (sqrtf): Override if REPLACE_SQRTF is 1.
54782 2016-12-17  Bruno Haible  <bruno@clisp.org>
54784         sinhf: Avoid redefinition error on MSVC.
54785         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_SINHF.
54786         * m4/sinhf.m4 (gl_FUNC_SINHF): Set REPLACE_SINHF to 1 if the function
54787         may be defined as an inline function.
54788         * modules/math (Makefile.am): Substitute REPLACE_SINHF.
54789         * lib/math.in.h (sinhf): Override if REPLACE_SINHF is 1.
54791 2016-12-17  Bruno Haible  <bruno@clisp.org>
54793         sinf: Avoid redefinition error on MSVC.
54794         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_SINF.
54795         * m4/sinf.m4 (gl_FUNC_SINF): Set REPLACE_SINF to 1 if the function
54796         may be defined as an inline function.
54797         * modules/math (Makefile.am): Substitute REPLACE_SINF.
54798         * lib/math.in.h (sinf): Override if REPLACE_SINF is 1.
54800 2016-12-17  Bruno Haible  <bruno@clisp.org>
54802         logf: Avoid redefinition error on MSVC.
54803         * m4/logf.m4 (gl_FUNC_LOGF): Set REPLACE_LOGF to 1 if the function
54804         may be defined as an inline function.
54806 2016-12-17  Bruno Haible  <bruno@clisp.org>
54808         log10l: Avoid redefinition error on MSVC.
54809         * m4/log10l.m4 (gl_FUNC_LOG10L): Set REPLACE_LOG10L to 1 if the function
54810         may be defined as an inline function.
54812 2016-12-17  Bruno Haible  <bruno@clisp.org>
54814         log10f: Avoid redefinition error on MSVC.
54815         * m4/log10f.m4 (gl_FUNC_LOG10F): Set REPLACE_LOG10F to 1 if the function
54816         may be defined as an inline function.
54818 2016-12-17  Bruno Haible  <bruno@clisp.org>
54820         hypotl: Avoid redefinition error on MSVC.
54821         * m4/hypotl.m4 (gl_FUNC_HYPOTL): Set REPLACE_HYPOTL to 1 if the function
54822         may be defined as an inline function.
54824 2016-12-17  Bruno Haible  <bruno@clisp.org>
54826         hypotf: Avoid redefinition error on MSVC.
54827         * m4/hypotf.m4 (gl_FUNC_HYPOTF): Set REPLACE_HYPOTF to 1 if the function
54828         may be defined as an inline function.
54830 2016-12-17  Bruno Haible  <bruno@clisp.org>
54832         fmodl: Avoid redefinition error on MSVC.
54833         * m4/fmodl.m4 (gl_FUNC_FMODL): Set REPLACE_FMODL to 1 if the function
54834         may be defined as an inline function.
54836 2016-12-17  Bruno Haible  <bruno@clisp.org>
54838         fmodf: Avoid redefinition error on MSVC.
54839         * m4/fmodf.m4 (gl_FUNC_FMODF): Set REPLACE_FMODF to 1 if the function
54840         may be defined as an inline function.
54842 2016-12-17  Bruno Haible  <bruno@clisp.org>
54844         expf: Avoid redefinition error on MSVC.
54845         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_EXPF.
54846         * m4/expf.m4 (gl_FUNC_EXPF): Set REPLACE_EXPF to 1 if the function
54847         may be defined as an inline function.
54848         * modules/math (Makefile.am): Substitute REPLACE_EXPF.
54849         * lib/math.in.h (expf): Override if REPLACE_EXPF is 1.
54851 2016-12-17  Bruno Haible  <bruno@clisp.org>
54853         coshf: Avoid redefinition error on MSVC.
54854         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_COSHF.
54855         * m4/coshf.m4 (gl_FUNC_COSHF): Set REPLACE_COSHF to 1 if the function
54856         may be defined as an inline function.
54857         * modules/math (Makefile.am): Substitute REPLACE_COSHF.
54858         * lib/math.in.h (coshf): Override if REPLACE_COSHF is 1.
54860 2016-12-17  Bruno Haible  <bruno@clisp.org>
54862         cosf: Avoid redefinition error on MSVC.
54863         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_COSF.
54864         * m4/cosf.m4 (gl_FUNC_COSF): Set REPLACE_COSF to 1 if the function
54865         may be defined as an inline function.
54866         * modules/math (Makefile.am): Substitute REPLACE_COSF.
54867         * lib/math.in.h (cosf): Override if REPLACE_COSF is 1.
54869 2016-12-17  Bruno Haible  <bruno@clisp.org>
54871         atan2f: Avoid redefinition error on MSVC.
54872         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_ATAN2F.
54873         * m4/atan2f.m4 (gl_FUNC_ATAN2F): Set REPLACE_ATAN2F to 1 if the function
54874         may be defined as an inline function.
54875         * modules/math (Makefile.am): Substitute REPLACE_ATAN2F.
54876         * lib/math.in.h (atan2f): Override if REPLACE_ATAN2F is 1.
54878 2016-12-17  Bruno Haible  <bruno@clisp.org>
54880         atanf: Avoid redefinition error on MSVC.
54881         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_ATANF.
54882         * m4/atanf.m4 (gl_FUNC_ATANF): Set REPLACE_ATANF to 1 if the function
54883         may be defined as an inline function.
54884         * modules/math (Makefile.am): Substitute REPLACE_ATANF.
54885         * lib/math.in.h (atanf): Override if REPLACE_ATANF is 1.
54887 2016-12-17  Bruno Haible  <bruno@clisp.org>
54889         asinf: Avoid redefinition error on MSVC.
54890         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_ASINF.
54891         * m4/asinf.m4 (gl_FUNC_ASINF): Set REPLACE_ASINF to 1 if the function
54892         may be defined as an inline function.
54893         * modules/math (Makefile.am): Substitute REPLACE_ASINF.
54894         * lib/math.in.h (asinf): Override if REPLACE_ASINF is 1.
54896 2016-12-17  Bruno Haible  <bruno@clisp.org>
54898         acosf: Avoid redefinition error on MSVC.
54899         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_ACOSF.
54900         * m4/acosf.m4 (gl_FUNC_ACOSF): Set REPLACE_ACOSF to 1 if the function
54901         may be defined as an inline function.
54902         * modules/math (Makefile.am): Substitute REPLACE_ACOSF.
54903         * lib/math.in.h (acosf): Override if REPLACE_ACOSF is 1.
54905 2016-12-17  Bruno Haible  <bruno@clisp.org>
54907         Avoid redefinition errors on MSVC.
54908         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): Set REPLACE_SNPRINTF to 1 if
54909         the function may be defined as an inline function.
54910         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): Set REPLACE_VSNPRINTF to 1 if
54911         the function may be defined as an inline function.
54913 2016-12-17  Bruno Haible  <bruno@clisp.org>
54915         Avoid redefinition errors on MSVC.
54916         * lib/stdio.in.h: Include <stdlib.h> and <io.h> when necessary.
54917         * lib/unistd.in.h: Include <stdio.h> when necessary.
54919 2016-12-17  Bruno Haible  <bruno@clisp.org>
54921         stdint: Fix WINT_MAX to match the gnulib provided wint_t on MSVC.
54922         * m4/stdint.m4 (gl_STDINT_H): Define GNULIB_OVERRIDES_WINT_T.
54923         * modules/stdint (Makefile.am): Substitute GNULIB_OVERRIDES_WINT_T.
54924         * lib/stdint.in.h [GNULIB_OVERRIDES_WINT_T]: Redefine WINT_MIN and
54925         WINT_MAX.
54927 2016-12-17  Bruno Haible  <bruno@clisp.org>
54929         Avoid autoconf warning.
54930         * modules/frexpl (configure.ac): Require, not invoke, gl_FUNC_FREXPL.
54931         * modules/frexp (configure.ac): Require, not invoke, gl_FUNC_FREXP.
54933 2016-12-17  Bruno Haible  <bruno@clisp.org>
54935         fpending: Revert workaround against Emacs bug.
54936         * lib/stdio-impl.h [__MINGW32__]: Revert conditional.
54937         The Emacs bug is fixed by Eli Zaretskii in
54938         http://lists.gnu.org/r/emacs-devel/2016-12/msg00715.html
54940 2016-12-17  Bruno Haible  <bruno@clisp.org>
54942         getlogin_r tests: Port to mingw.
54943         * tests/test-getlogin_r.c: Don't include <pwd.h> on native Windows. Fixes
54944         regression introduced on 2014-05-19.
54946 2016-12-17  Bruno Haible  <bruno@clisp.org>
54948         getlogin: Port to newer mingw.
54949         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize HAVE_DECL_GETLOGIN.
54950         * m4/getlogin.m4 (gl_FUNC_GETLOGIN): Set HAVE_DECL_GETLOGIN.
54951         * modules/unistd (Makefile.am): Substitute HAVE_DECL_GETLOGIN, not
54952         HAVE_GETLOGIN.
54953         * lib/unistd.in.h (getlogin): Test HAVE_DECL_GETLOGIN, not
54954         HAVE_GETLOGIN.
54955         * doc/posix-functions/getlogin.texi: Mention the issue.
54956         * tests/test-getlogin.c: Don't include <pwd.h> on native Windows. Fixes
54957         regression introduced on 2014-05-14.
54959 2016-12-16  Paul Eggert  <eggert@cs.ucla.edu>
54961         builtin-expect: improve port to IBM XL C
54962         Problem reported for z/OS by Daniel Richard G. in:
54963         http://lists.gnu.org/r/bug-gnulib/2016-12/msg00079.html
54964         * m4/builtin-expect.m4 (gl___BUILTIN_EXPECT):
54965         Test for <builtins.h> directly.
54967         builtin-expect: port to IBM XL C
54968         Problem reported for z/OS by Daniel Richard G. in:
54969         http://lists.gnu.org/r/bug-gnulib/2016-12/msg00074.html
54970         * m4/builtin-expect.m4 (gl___BUILTIN_EXPECT):
54971         Also allow __builtin_expect defined via a standard include file.
54973         regex: fix dependency
54974         Problem reported by Bruno Haible in:
54975         http://lists.gnu.org/r/bug-gnulib/2016-12/msg00073.html
54976         * modules/regex: Depend on builtin-expect.
54978         builtin-expect: new module
54979         Fix fnmatch to use it.
54980         Problem reported for z/OS by Daniel Richard G.
54981         * lib/fnmatch.c (__builtin_expect):
54982         * lib/glob.c (__builtin_expect):
54983         * lib/grantpt.c (__builtin_expect) [!_LIBC]:
54984         * lib/memmem.c (__builtin_expect) [!_LIBC]:
54985         * lib/scandir.c (__builtin_expect):
54986         * lib/strstr.c (__builtin_expect) [!_LIBC]:
54987         Remove macro; config.h now does this.
54988         * lib/gl_anytreehash_list1.h (add_to_bucket):
54989         * lib/regex_internal.h (BE):
54990         Assume __builtin_expect.
54991         * m4/builtin-expect.m4, modules/builtin-expect: New files.
54992         * modules/avltreehash-list, modules/fnmatch, modules/glob:
54993         * modules/grantpt, modules/memmem-simple, modules/rbtreehash-list:
54994         * modules/scandir, modules/strstr-simple:
54995         Depend on builtin-expect.
54997 2016-12-15  Bruno Haible  <bruno@clisp.org>
54999         init.sh: Add possibility to not delete temporary files.
55000         * tests/init.sh (remove_tmp_): If the environment variable KEEP is set
55001         to yes, don't erase the temporary directory.
55003 2016-12-16  Paul Eggert  <eggert@cs.ucla.edu>
55005         regex: fix integer-overflow bug in never-used code
55006         Problem reported by Clément Pit–Claudel in:
55007         http://lists.gnu.org/r/emacs-devel/2016-12/msg00654.html
55008         * lib/regex_internal.h: Include intprops.h.
55009         * lib/regexec.c (re_search_2_stub): Use it to avoid undefined
55010         behavior on integer overflow.
55011         * modules/regex (Depends-on): Add intprops.
55013         fpending: fix port to MinGW on Emacs
55014         * lib/stdio-impl.h [__MINGW32__]: Do not include errno.h.
55015         Problem reported by Eli Zaretskii in:
55016         http://lists.gnu.org/r/emacs-devel/2016-12/msg00642.html
55017         Is Plan 9 still a valid porting target, anyway?
55019 2016-12-15  Paul Eggert  <eggert@cs.ucla.edu>
55021         safe-alloc: use xalloc-oversized
55022         * lib/safe-alloc.c: Include xalloc-oversized.h.
55023         (safe_alloc_oversized): Remove.  All uses changed to xalloc_oversized.
55024         * modules/safe-alloc (Depends-on): Add xalloc-oversized.
55026         xalloc: do not exceed PTRDIFF_MAX
55027         * lib/xmalloc.c (xcalloc) [HAVE_GNU_CALLOC]: Do not omit
55028         xalloc_oversized check, since objects larger than PTRDIFF_MAX
55029         bytes have pointer-subtraction problems.
55031         malloca: do not exceed PTRDIFF_MAX
55032         * lib/malloca.h: Include xalloc-oversized.
55033         (nmalloca): Use xalloc_oversized instead of rolling our own.
55034         * modules/malloca (Depends-on):
55035         * modules/relocatable-prog-wrapper (Depends-on):
55036         Add xalloc-oversized.
55038         quotearg: pacify GCC better
55039         * modules/quotearg (Depends-on): Add minmax, stdint.
55040         * lib/quotearg.c: Include minmax.h, stdint.h.
55041         (nslots): Now int, as there seems little point to going to extra
55042         work merely to support the INT_MAX slot, which nobody ever uses.
55043         (quotearg_n_options): Redo size-overflow checks to pacify GCC
55044         and to catch (mostly-theoretical) ptrdiff_t problems too.
55045         This can be done via one comparison.
55047 2016-12-14  Paul Eggert  <eggert@cs.ucla.edu>
55049         xalloc-oversized: check for PTRDIFF_MAX too
55050         This avoids undefined behavior when subtracting pointers to
55051         objects containing more than PTRDIFF_MAX bytes.
55052         * lib/xalloc-oversized.h (__xalloc_oversized, xalloc_oversized):
55053         Also return 1 if the result would exceed PTRDIFF_MAX>
55054         * modules/xalloc-oversized (Depends-on):
55055         Add stdint.
55057         dfa: fix glitches in previous commit
55058         Sorry, I don't know how I managed to commit the wrong version.
55059         * lib/dfa.c (MIN): Move up.
55060         (xpalloc): Now static.
55062         dfa: fix some unlikely integer overflows
55063         I found these while reviewing the recent Coverity-related fix.
55064         This patch changes part of dfa.c to prefer ptrdiff_t instead of
55065         size_t for object counts.  Using ptrdiff_t is the style typically
55066         used in Emacs; although it wastes a sign bit as sizes can never be
55067         negative, it makes -fsanitize=undefined more likely to catch
55068         integer overflows in index calculation, and nowadays the upside is
55069         typically more important than the downside.  Although perhaps the
55070         rest of dfa.c should be changed to prefer ptrdiff_t as well (much
55071         of dfa.c already does, since it uses state_num which is signed),
55072         that is a bigger change and is not needed to fix the bugs I found.
55073         * lib/dfa.c: Include stdint.h and intprops.h.
55074         (TOKEN_MAX): New macro.
55075         (position_set, struct mb_char_classes, struct dfa, maybe_realloc)
55076         (charclass_index, parse_bracket_exp, addtok, insert, merge)
55077         (realloc_trans_if_necessary, free_mbdata):
55078         Use ptrdiff_t instead of size_t for object counts related to xpalloc.
55079         This is safe because xpalloc checks that the sizes do not exceed
55080         either SIZE_MAX or PTRDIFF_MAX.
55081         (xpalloc): New function, mostly taken from Emacs.
55082         (maybe_realloc, copy, realloc_trans_if_necessary): Use it.
55083         (maybe_realloc): Add NITEMS_MAX to signature.  All callers changed.
55084         (charclass_index): Check for integer overflow in computing
55085         charclass index; it must not exceed TOKEN_MAX - CSET, as CSET is
55086         added to it later.
55087         (alloc_position_set): Check for integer overflow.  On typical
55088         platforms this check has zero overhead, since the constant
55089         expression is false.
55090         (realloc_trans_if_necessary):
55091         Remove assertion, which I hope Coverity no longer needs.
55093         * modules/dfa (Depends-on): Add intprops, stdint.
55095 2016-12-12  Jim Meyering  <meyering@fb.com>
55097         dfa: add an assertion to avoid coverity false positive
55098         * lib/dfa.c (realloc_trans_if_necessary): Otherwise, coverity
55099         warned that "newalloc1 - 2" could overflow.
55101 2016-12-13   Arnold D. Robbins  <arnold@skeeve.com>
55103         dfa: remove DFA_CASE_FOLD flag in favor of RE_ICASE
55104         * dfa.h (DFA_CASE_FOLD): Remove.
55105         * dfa.c (dfasyntax): Set dfa->syntax.case_fold based on RE_ICASE.
55107 2016-12-13  John W. Eaton  <gnu@jweaton.org>
55109         link: fix test to declare use of rename()
55110         * m4/link.m4 (gl_FUNC_LINK): Include <stdio.h> needed with
55111         -Werror=implicit-function-declaration
55113 2016-12-12  Bruno Haible  <bruno@clisp.org>
55115         fpending: Port to native Windows with MSVC.
55116         * lib/fpending.c: Include stdio-impl.h.
55117         (__fpending): Include all known implementations. Err out if it's not
55118         ported.
55119         * m4/fpending.m4 (gl_PREREQ_FPENDING): Remove macro.
55120         * modules/fpending (Files): Add lib/stdio-impl.h.
55121         (configure.ac): Don't invoke gl_PREREQ_FPENDING.
55123 2016-12-12  Bruno Haible  <bruno@clisp.org>
55125         stdioext: Port to native Windows with MSVC.
55126         * lib/stdio-impl.h (WINDOWS_OPAQUE_FILE): New macro.
55127         (struct _gl_real_FILE): New type.
55128         (fp_, _IOREAD, _IOWRT, _IORW, _IOEOF, _IOERR): New macros, for native
55129         Windows.
55130         * lib/fbufmode.c (fbufmode): Add code for native Windows.
55131         * lib/fflush.c (clear_ungetc_buffer): Treat native Windows like the
55132         other SystemV derived implementations.
55133         * lib/fpurge.c (fpurge): Likewise.
55134         * lib/freadable.c (freadable): Likewise.
55135         * lib/freadahead.c (freadahead): Likewise.
55136         * lib/freading.c (freading): Likewise.
55137         * lib/freadptr.c (freadptr): Likewise.
55138         * lib/freadseek.c (freadptrinc): Likewise.
55139         * lib/fseeko.c (fseeko): Likewise.
55140         * lib/fseterr.c (fseterr): Likewise.
55141         * lib/fwritable.c (fwritable): Likewise.
55142         * lib/fwriting.c (fwriting): Likewise.
55143         Reported by Gisle Vanem <gvanem@yahoo.no>.
55145 2016-12-11  Jim Meyering  <meyering@fb.com>
55147         non-recursive-gnulib-prefix-hack.m4: remove leading "(" in case stmt
55148         * m4/non-recursive-gnulib-prefix-hack.m4: That leading "(" happens
55149         to work with most shells, but not with the one provided by many
55150         Solaris 10 systems, so running configure with such a /bin/sh evokes
55151         e.g., "./configure: syntax error at line 33602: `(' unexpected".
55152         Reported by Assaf Gordon in
55153         https://lists.gnu.org/r/sed-devel/2016-12/msg00002.html
55155 2016-12-10  Bruno Haible  <bruno@clisp.org>
55157         threadlib: Optimize out runtime test on Solaris >= 10.
55158         * m4/threadlib.m4 (gl_THREADLIB_BODY): Don't set
55159         PTHREAD_IN_USE_DETECTION_HARD if configuring on Solaris 10 or newer.
55160         Reported by Peter Felecan at <https://savannah.gnu.org/bugs/?32087>.
55162 2016-12-10  Bruno Haible  <bruno@clisp.org>
55164         stdint: Update doc about Solaris 9.
55165         * doc/posix-headers/stdint.texi: Add info about Solaris 9.
55167 2016-12-09  Bruno Haible  <bruno@clisp.org>
55169         c-ctype tests: Fix link error on Solaris 9.
55170         * modules/c-ctype-tests (Depends-on): Add 'isblank'.
55171         Reported at <https://savannah.gnu.org/bugs/?46827>.
55173 2016-12-09  Paul Eggert  <eggert@cs.ucla.edu>
55175         dfa: fix performance bug that recomputes trans
55176         * lib/dfa.c (build_state): Fix performance bug introduced in Nov
55177         25 on-demand changes.  The bug caused build_state to reset all
55178         d->trans elements to -2 even when d->trans was already non-null.
55179         Use C99 style decls after statements in this function.
55181         same-inode: port to MinGW
55182         Here st_ino is always 0, so change the definition of SAME_INODE so
55183         that 1 means the two files are the same, 0 with st_ino != 0 means
55184         they differ, and 0 with st_ino == 0 means we don’t know.  Problem
55185         reported by Bruno Haible (Bug#25146).
55186         * doc/posix-headers/sys_stat.texi (sys/stat.h): Update.
55187         * lib/same-inode.h (SAME_INODE): Return 0 on MinGW.
55189 2016-12-04  Bruno Haible  <bruno@clisp.org>
55191         javacomp-script: Support Java 7 and 8.
55192         * m4/javacomp.m4 (gt_JAVACOMP): Accept source-version 1.7, 1.8 and
55193         target-version 1.7, 1.8.
55195 2016-12-02  Daiki Ueno  <ueno@gnu.org>
55197         * gnulib-tool (func_import): Relax the regex used for "LGPLv3+ or
55198         GPLv2" rewriting.
55200 2016-12-02  Nikos Mavrogiannopoulos  <nmav@gnutls.org>
55202         * gnulib-tool (func_import): Adhere to the license guideline when
55203         rewriting the license text to "LGPLv3+ or GPLv2":
55204         https://www.gnu.org/prep/maintain/maintain.html#Licensing-of-GNU-Packages
55206 2016-12-02  Bruno Haible  <bruno@clisp.org>
55208         localcharset: Avoid theoretical buffer overrun.
55209         * lib/localcharset.c (locale_charset) [WINDOWS_NATIVE]: Don't use the
55210         return value from setlocale if it would lead to a buffer overrun.
55212 2016-12-01  Bruno Haible  <bruno@clisp.org>
55214         Relicense some modules under LGPLv2+.
55215         Kevin Cernekee's approval is in
55216         http://lists.gnu.org/r/bug-gnulib/2016-11/msg00090.html.
55217         * modules/fseterr (License): Change to LGPLv2+.
55218         * modules/mbchar (License): Likewise.
55219         * modules/mbiter (License): Likewise.
55220         * modules/mbsnlen (License): Likewise.
55221         * modules/wcwidth (License): Likewise.
55223 2016-12-01  KO Myung-Hun  <komh78@gmail.com>
55225         scandir: Fix _D_ALLOC_NAMLEN() on OS/2 kLIBC
55226         * lib/scandir.c (_D_ALLOC_NAMLEN): Consider the fields after d_name on
55227         OS/2 kLIBC.
55229 2016-12-01  KO Myung-Hun  <komh78@gmail.com>
55231         alphasort, scandir: Port to OS/2 kLIBC
55232         * lib/alphasort.c (alphasort): Implement according to OS/2 kLIBC
55233         declaration.
55234         * lib/scandir.c (scandir): Add declaration for OS/2 kLIBC.
55236 2016-12-01  KO Myung-Hun  <komh78@gmail.com>
55238         relocatable: Fix that /@unixroot prefix is not working on OS/2 kLIBC
55239         * lib/relocatable.c (relocate): Do not touch pathname if it is started
55240         with '/@unixroot'.
55242 2016-12-01  KO Myung-Hun  <komh78@gmail.com>
55244         sys_socket: typedef sa_family_t correctly on OS/2 kLIBC
55245         * lib/sys_socket.in.h (sa_family_t): Typedef to unsigned char on
55246         OS/2 kLIBC unless TCPV40HDRS is defined.
55248 2016-11-29  Jim Meyering  <meyering@fb.com>
55250         dfa: avoid new infinite loop
55251         This would infloop: echo cx | LC_ALL=C grep -E 'c\b[x ]'
55252         * lib/dfa.c (dfastate): When constructing a new state table, we could
55253         initially declare that we had found a match, and later find that
55254         constraints eliminate that possibility, yet continue to use the
55255         now stale "matched" indicator.  That would lead to an infinite loop.
55256         The solution is to update "matched" when necessary.
55257         Introduced by commit v0.1-983-g403adf1.
55259 2016-11-27  Norihiro Tanaka  <noritnk@kcn.ne.jp>
55261         dfa: avoid match middle in multibyte character
55262         * lib/dfa.c (transit_state): If fails in matching single byte characters
55263         on a state including period expression in non-UTF8 multibyte locales,
55264         skip trailing bytes.
55265         (dfa_supported): Revert previous change.
55267 2016-11-27  Jim Meyering  <meyering@fb.com>
55269         dfa: avoid false match in non-UTF8 multibyte locales
55270         * lib/dfa.c (dfa_supported): Treat any non-UTF8 multibyte locale
55271         as "not supported" so that callers will resort to using regex-based
55272         matcher.  This will surely hurt performance, but correctness trumps
55273         performance here, and the affected locales are less and less relevant,
55274         these days.  See grep's bug report https://bugs.gnu.org/24975.
55276 2016-11-27  Mike Frysinger  <vapier@gentoo.org>
55278         ptsname_r: leverage AC_HEADER_MAJOR to provide major()
55279         * lib/ptsname_r.c: Include the appropriate headers.
55280         [__sun]: Delete sys/sysmacros.h include.
55281         [_AIX || __osf__]: Likewise.
55282         * m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): Depend on AC_HEADER_MAJOR.
55284 2016-11-27  Pádraig Brady  <P@draigBrady.com>
55286         md4,md5,sha*: allow _STRING_INLINE_unaligned enable unaligned operation
55287         * lib/md4.c (md4_process_bytes): The existing define is made internal
55288         in recent versions of glibc, so also use this new public define.
55289         * lib/md5.c (md5_process_bytes): Likewise.
55290         * lib/sha1.c (sha1_process_bytes): Likewise.
55291         * lib/sha256.c (sha256_process_bytes): Likewise.
55292         * lib/sha512.c (sha512_process_bytes): Likewise.
55294 2016-11-27  Pádraig Brady  <P@draigBrady.com>
55296         maint: use a more standard return from mbrtowc test
55297         * m4/mbrtowc.m4 (gl_MBRTOWC_C_LOCALE): Don't return 1
55298         from the test program as this often indicates an
55299         unhandled case in the test program.
55300         (gl_MBRTOWC_INCOMPLETE_STATE): Likewise.
55301         (gl_MBRTOWC_SANITYCHECK): Likewise.
55302         (gl_MBRTOWC_NULL_ARG2): Likewise.
55303         (gl_MBRTOWC_NUL_RETVAL): Likewise.
55305 2016-11-26  Paul Eggert  <eggert@cs.ucla.edu>
55307         freopen: work around glibc bug with closed fd
55308         Work around glibc bug#15589, where freopen mishandles the case
55309         where stdin etc. are already closed.
55310         * doc/posix-functions/freopen.texi (freopen): Document the bug.
55311         * lib/freopen.c (_GL_ALREADY_INCLUDING_STDIO_H): Define this
55312         instead of __need_FILE, as the latter does not work with glibc.
55313         Include <fcntl.h>, for open flags.
55314         (rpl_freopen): Work around glibc bug.
55315         * m4/freopen.m4 (gl_FUNC_FREOPEN): Check for bug.
55316         * modules/freopen (Depends-on): Add fcntl-h.
55317         * tests/test-freopen.c (main): Test for bug.
55319 2016-11-25  Paul Eggert  <eggert@cs.ucla.edu>
55321         fnmatch: fix typo introduced on 2016-08-17
55322         This fixes the port to non-GCC compilers that lack __builtin_expect.
55323         * lib/fnmatch.c (__builtin_expect): Change A&&B to !A||B.
55325         dfa: simplify with new function fillset
55326         * lib/dfa.c (fillset): New function.
55327         Use it for clarity when applicable.
55329         dfa: fix glitches with on-demand states
55330         Also, adjust commentary to better match new code.
55331         Some of these glitches predate the recent change.
55332         * lib/dfa.c (dfaanalyze): Clear trcount here, so that it counts
55333         only non-initial states.
55334         (dfastate): Rename locals to better match new roles.
55335         Move them into nested scopes if this is easy.
55336         Omit unnecessary calls to zeroset.
55337         Simplify test for whether to throw in the positions of state 0.
55338         Omit C99-ism (decl after statement) since Gawk still wants C89.
55339         (build_state): Omit unnecessary test and assignment.
55340         Fix some confusion that counted transition tables inaccurately
55341         and could cause a memory leak.
55342         (dfaexec_main): Redo to make it clearer to the compiler that
55343         -1 and -2 are the only negative state numbers here.
55345 2016-11-25  Norihiro Tanaka  <noritnk@kcn.ne.jp>
55347         dfa: addition of new state on demand
55348         * src/dfa.c (dfastate): Add argument UC, the current input character.
55349         Fill only a group including the character in transition table.
55350         (realloc_trans_if_necessary): Add the dummy state which means that a
55351         transition table is assigned but the next state is not assigned.
55352         (build_state): Return the next state.  All callers updated.
55353         (transit_state_singlebyte): If we get the dummy state,
55354         fill the transition table.
55355         (dfaexec_main): Handle the dummy state.
55356         (free_mbdata, dfafree): Consider the dummy state.
55358 2016-11-24  Daiki Ueno  <ueno@gnu.org>
55360         srclist: sync with released gettext
55361         * config/srclist.txt: Set "release" option to the files under
55362         $GETTEXT.
55364 2016-11-24  Daiki Ueno  <ueno@gnu.org>
55366         srclist: add "release" option
55367         * config/srclist.txt: Change the format so that the first column
55368         of each line points to the top-level directory of the source
55369         archive.
55370         * config/srclist-update: Accept "release" option that checks files
55371         from the most recently tagged revision in the source archive.
55373 2016-11-21  Bruno Haible  <bruno@clisp.org>
55375         snippet/c++defs: Simplify _GL_CXXALIAS_* macros.
55376         * build-aux/snippet/c++defs.h [__cplusplus && GNULIB_NAMESPACE]
55377         (_GL_CXXALIAS_RPL_1, _GL_CXXALIAS_RPL_CAST_1,
55378         _GL_CXXALIAS_SYS, _GL_CXXALIAS_SYS_CAST, _GL_CXXALIAS_SYS_CAST2):
55379         Inline and remove member function 'rpl ()' of the wrapper struct.
55381 2016-11-20  Paul Eggert  <eggert@cs.ucla.edu>
55383         dfa: fix logic typo
55384         Problem reported by Stephane Chazelas (Bug#24973).
55385         * lib/dfa.c (using_simple_locale): Fix typo that caused some
55386         non-simple locales like fr_FR to be treated as simple.
55388 2016-11-20  Jim Meyering  <meyering@fb.com>
55390         fix test driver leaks: exclude, malloc, realloc
55391         * tests/test-exclude.c (main): Fix trivial leak.
55392         * tests/test-malloc-gnu.c (main): Likewise.
55393         * tests/test-realloc-gnu.c (main): Likewise.
55394         With these changes, grep's tests are now leak free.
55395         I.e., running them with ASAN elicits no failure:
55396           make CFLAGS='-O0 -ggdb3' AM_CFLAGS=-fsanitize=address \
55397             AM_LDFLAGS='-fsanitize=address -static-libasan' check
55399 2016-11-11  Bruno Haible  <bruno@clisp.org>
55401         libunistring: Relicense under dual "LGPLv3+ or GPLv2" license.
55402         * modules/libunistring: (License): Change from LGPL to
55403         "LGPLv3+ or GPLv2".
55404         * modules/libunistring-optional: Likewise.
55405         * modules/unicase/*: Likewise.
55406         * modules/uniconv/*: Likewise.
55407         * modules/unictype/*: Likewise.
55408         * modules/unigbrk/*: Likewise.
55409         * modules/unilbrk/*: Likewise.
55410         * modules/uniname/*: Likewise.
55411         * modules/uninorm/*: Likewise.
55412         * modules/unistdio/*: Likewise.
55413         * modules/unistr/*: Likewise.
55414         * modules/uniwbrk/*: Likewise.
55415         * modules/uniwidth/*: Likewise.
55417 2016-11-12  Bruno Haible  <bruno@clisp.org>
55419         Relicense some modules under LGPLv2+.
55420         Paul Eggert's approval is in
55421         http://lists.gnu.org/r/bug-gnulib/2016-11/msg00037.html.
55422         Eric Blake's approval is in
55423         http://lists.gnu.org/r/bug-gnulib/2016-11/msg00042.html.
55424         Ludovic Courtès's approval is in
55425         http://lists.gnu.org/r/bug-gnulib/2016-11/msg00038.html.
55426         * modules/isnand-nolibm (License): Change to LGPLv2+.
55427         * modules/isnanf-nolibm (License): Likewise.
55428         * modules/isnanl-nolibm (License): Likewise.
55430 2016-11-19  Bruno Haible  <bruno@clisp.org>
55432         Relicense some modules under LGPLv2+.
55433         lib/float+.h is already under LGPLv2+ since 2007-07-13, per
55434         modules/vasnprintf.
55435         Paolo Bonzini's approval for lib/frexp.c and lib/frexpl.c is in
55436         http://lists.gnu.org/r/bug-gnulib/2016-11/msg00074.html.
55437         All other significant changes to the files in lib/ of these modules
55438         are from me.
55439         * modules/memcmp2 (License): Change to LGPLv2+.
55440         * modules/amemxfrm (License): Likewise.
55441         * modules/fpieee (License): Likewise.
55442         * modules/fpucw (License): Likewise.
55443         * modules/frexp-nolibm (License): Likewise.
55444         * modules/frexpl-nolibm (License): Likewise.
55445         * modules/printf-frexp (License): Likewise.
55446         * modules/printf-frexpl (License): Likewise.
55447         * modules/printf-safe (License): Likewise.
55448         * modules/signbit (License): Likewise.
55450 2016-11-17  Bruno Haible  <bruno@clisp.org>
55452         Enable Unicode decoder safety unconditionally.
55453         * lib/unistr.in.h (u32_mbtouc_unsafe): Assume CONFIG_UNICODE_SAFETY.
55454         * lib/unistr/u8-mblen.c (u8_mblen): Likewise.
55455         * lib/unistr/u8-mbtouc-unsafe.c (u8_mbtouc_unsafe): Likewise.
55456         * lib/unistr/u8-mbtouc-unsafe-aux.c (u8_mbtouc_unsafe_aux): Likewise.
55457         * lib/unistr/u8-prev.c (u8_prev): Likewise.
55458         * lib/unistr/u8-strmblen.c (u8_strmblen): Likewise.
55459         * lib/unistr/u8-strmbtouc.c (u8_strmbtouc): Likewise.
55460         * lib/unistr/u16-mblen.c (u16_mblen): Likewise.
55461         * lib/unistr/u16-mbtouc-unsafe.c (u16_mbtouc_unsafe): Likewise.
55462         * lib/unistr/u16-mbtouc-unsafe-aux.c (u16_mbtouc_unsafe_aux): Likewise.
55463         * lib/unistr/u16-prev.c (u16_prev): Likewise.
55464         * lib/unistr/u16-strmblen.c (u16_strmblen): Likewise.
55465         * lib/unistr/u16-strmbtouc.c (u16_strmbtouc): Likewise.
55466         * lib/unistr/u32-mblen.c (u32_mblen): Likewise.
55467         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Likewise.
55468         * lib/unistr/u32-prev.c (u32_prev): Likewise.
55469         * lib/unistr/u32-next.c (u32_next): Likewise.
55470         * lib/unistr/u32-strmblen.c (u32_strmblen): Likewise.
55471         * lib/unistr/u32-strmbtouc.c (u32_strmbtouc): Likewise.
55472         * lib/uniconv/u8-conv-to-enc.c (u8_conv_to_encoding): Likewise.
55473         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
55474         * tests/unistr/test-u16-prev.c (check_invalid): Enable the
55475         CONFIG_UNICODE_SAFETY tests unconditionally.
55476         * tests/unistr/test-u32-mblen.c (main): Likewise.
55477         * tests/unistr/test-u32-mbtouc.h (test_function): Likewise.
55478         * tests/unistr/test-u32-prev.c (check_invalid): Likewise.
55479         * tests/unistr/test-u32-next.c (main): Likewise.
55480         * tests/unistr/test-u32-strmblen.c (main): Likewise.
55481         * tests/unistr/test-u32-strmbtouc.c (main): Likewise.
55482         * tests/unistr/test-u32-mbtouc.c (FULL_SAFETY): Remove macro.
55483         * lib/unistr/u8-check.c (u8_check): Remove old dead code.
55484         * lib/unistr/u8-mbtouc.c (u8_mbtouc): Likewise.
55485         * lib/unistr/u8-mbtouc-aux.c (u8_mbtouc_aux): Likewise.
55486         * lib/unistr/u8-mbtoucr.c (u8_mbtoucr): Likewise.
55487         * lib/unistr/u8-uctomb.c (u8_uctomb): Likewise.
55488         * lib/unistr/u8-uctomb-aux.c (u8_uctomb_aux): Likewise.
55489         * lib/unistr/u16-check.c (u16_check): Update comment.
55490         * NEWS: Mention the changes that callers should be aware of.
55492 2016-11-19  Bruno Haible  <bruno@clisp.org>
55494         relocatable-prog-wrapper: Fix breakage on Cygwin.
55495         * modules/relocatable-prog-wrapper (Files): Add lib/stat.c, lib/lstat.c.
55496         (Depends-on): Remove intprops.
55497         * lib/relocwrapper.c: Update dependency tree.
55498         (strerror): Undefine.
55499         * build-aux/install-reloc (func_create_wrapper): Do not compile
55500         strerror.c and strerror-override.c. Erase stat.o and lstat.o.
55502 2016-11-19  Bruno Haible  <bruno@clisp.org>
55504         strerror: Make it compile in C++ mode.
55505         * lib/strerror.c (strerror): Ignore the return value of memcpy().
55507 2016-11-15  Pedro Alves  <palves@redhat.com>
55509         sys_time: add gnulib::timeval for C++
55510         * lib/sys_time.in.h [__cplusplus && defined GNULIB_NAMESPACE]:
55511         Define "timeval" in the GNULIB_NAMESPACE namespace, and #undef any
55512         timeval macro.
55514 2016-11-14  Pedro Alves  <palves@redhat.com>
55516         snippet/c++defs: fix real-floating arg functions in C++ mode
55517         Also, define isfinite, isinf, isnan, signbit in the gnulib
55518         namespace instead of in the global namespace.
55519         * build-aux/snippet/c++defs.h (_GL_BEGIN_NAMESPACE)
55520         (_GL_END_NAMESPACE): New.
55521         * lib/math.in.h (_GL_MATH_CXX_REAL_FLOATING_DECL_2): Use them.
55522         (isfinite, isinf, isnan, signbit) [__cplusplus &&
55523         GNULIB_NAMESPACE]: Define them in the GNULIB_NAMESPACE namespace
55524         instead of in the global namespace.
55525         * tests/test-math-c++.cc: Check that the isfinite, isinf, isnan,
55526         signbit overloads exist in the GNULIB_NAMESPACE namespace, instead
55527         of in the global namespace.
55529 2016-11-13  Jim Meyering  <meyering@fb.com>
55531         strftime: don't use __THROW
55532         Each use of __THROW would provoke this from gcc-7-to-be:
55534           lib/strftime.c:371:1: warning: '__leaf__' attribute has no effect \
55535             on unit local functions [-Wattributes]
55536           static int iso_week_days (int, int) __THROW;
55537           ^~~~~~
55538         * lib/strftime.c (__THROW): Don't define.
55539         Remove each use of __THROW.
55540         * lib/strftime.c (memcpy_lowcase, memcpy_uppcase): Remove __THROW.
55541         (tm_diff, iso_week_days, __strftime_internal): Likewise.
55543 2016-11-14  Paul Eggert  <eggert@union>
55545         obstack: port to gcc -fcheck-pointer-bounds
55546         Problem found by 'make check' failure on bleeding-edge coreutils
55547         on an MPX-enabled CPU (Intel Core i3-7100U) running GCC (Ubuntu
55548         6.2.0-5ubuntu12), configured via "./configure
55549         --enable-gcc-warnings CFLAGS='-mmpx -fcheck-pointer-bounds -g3
55550         -O2' LDFLAGS='-static-libmpx -static-libmpxwrappers'".
55551         * lib/obstack.h (__FLEXIBLE_ARRAY_MEMBER):
55552         New macro, copied from fts_.h.
55553         (struct _obstack_chunk.contents): Use it.
55555 2016-11-14  Eric Blake  <eblake@redhat.com>
55557         strerror_r-posix: Another fix, for HAVE_DECL_STRERROR_R on mingw.
55558         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R, gl_FUNC_STRERROR_R_WORKS):
55559         Avoid _ONCE variants, which may supply a conflicting AC_DEFINE().
55561 2016-11-14  Pádraig Brady  <P@draigBrady.com>
55563         strptime: fix compile error in recent change
55564         * lib/strptime.c (__strptime_internal): Fix ported code.
55566 2016-11-11  Bruno Haible  <bruno@clisp.org>
55568         gnulib-tool: Support for the dual "LGPLv3+ or GPLv2" license.
55569         * gnulib-tool (--lgpl): Accept value 3orGPLv2.
55570         (func_import): Extend determination of license_incompatibilities.
55571         (func_create_testdir): Extend table of license compatibility. Handle
55572         also the licenses GPLv3+, GPL, LGPLv3+.
55574 2016-11-12  Paul Eggert  <eggert@cs.ucla.edu>
55576         strftime: tune %q
55577         * lib/strftime.c (__strftime_internal): Assume tp->tm_mon is in range.
55579         Merge strftime.c changes from glibc
55580         This incorporates:
55581         2007-10-16 [BZ #5184] Add tzset_called argument
55582         2008-06-13 [BZ #6612] pass reference to tzset_called around
55583         2009-10-30 Implement Burmese language locale for Myanmar
55584         2010-01-09 Add support for XPG7 testing
55585         2015-09-26 [BZ #18985] out of range data to strftime() causes a segfault
55586         2015-10-20 Convert miscellaneous function definitions to prototype style
55587         * lib/strftime.c: Copy glibc license, since gnulib-tool rewrites
55588         it anyway and this lessens the difference between gnulib and glibc.
55589         (USE_IN_EXTENDED_LOCALE_MODEL) [_LIBC]: Define.
55590         (__THROW): Define if standard headers do not.
55591         (LOCALE_PARAM): Rename from LOCALE_PARAM_PROTO.  All uses changed.
55592         (memcpy_locase, memcpy_uppcase, tm_diff, __strftime_internal):
55593         Declare with __THROW.
55594         (__strftime_internal): Rename from strftime_case_. Add arg for
55595         whether tzset is called.  All uses changed.  Call tzset at most
55596         once.  Allow %OC, for Burmese.
55597         (a_wkday, f_wkday, a_month, f_month) [_NL_CURRENT]:
55598         Don't assume values are in range.
55600 2016-11-12  Eric Blake  <eblake@redhat.com>
55602         strerror_r-posix: Fix override of AC_FUNC_STRERROR_R
55603         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): New override.
55604         (gl_FUNC_STRERROR_R): Don't reuse AC_DEFINE() with a potentially
55605         different value.
55607 2006-11-12  Pedro Alves  <palves@redhat.com>
55609         Fix gnulib C++ namespace support and std::frexp
55610         * lib/math.in.h (frexp): Use _GL_CXXALIASWARN1 instead of
55611         _GL_CXXALIASWARN.
55613 2006-11-12  Pedro Alves  <palves@redhat.com>
55615         GNULIB_NAMESPACE::func need not pull in rpl_func
55616         * build-aux/snippet/c++defs.h [__cplusplus && GNULIB_NAMESPACE]
55617         (_GL_CXXALIAS_RPL_1, _GL_CXXALIAS_RPL_CAST_1, _GL_CXXALIAS_SYS)
55618         (_GL_CXXALIAS_SYS_CAST, _GL_CXXALIAS_SYS_CAST2): Define a wrapper
55619         struct instead of a function pointer.
55621 2016-11-09  Frediano Ziglio  <fziglio@redhat.com>
55623         manywarnings: fix -Wno-missing-field-initializers detection
55624         * m4/manywarnings.m4: Fix -Wno-missing-field-initializers detection
55625         to be independent of -Wunused-variable.  I.E. ensure the latter
55626         warning doesn't occur so that detection of the former is accurate.
55628 2016-11-05  Pádraig Brady  <pbrady@fb.com>
55630         strftime,strptime: support %q to represent the quarter
55631         * lib/strftime.c (strftime_case_): Add %q case.
55632         * lib/strptime.c (__strptime_internal): Likewise.
55633         * tests/test-strftime.c (quarter_test): A new test case.
55635 2016-11-03  Eric Blake  <eblake@redhat.com>
55637         bootstrap: Fix get_version() for AIX 5.3
55638         * build-aux/bootstrap (get_version): Factor out sed script, since
55639         indented comments choke AIX 5.3 sed.
55640         Reported-by: Michael Felt <aixtools@gmail.com>
55642 2016-11-03  Paul Eggert  <eggert@cs.ucla.edu>
55644         intprops: port to older XL C
55645         Problem reported by Alexander Samoilov in:
55646         http://lists.gnu.org/r/bug-gnulib/2016-10/msg00166.html
55647         http://savannah.nongnu.org/bugs/?49448
55648         * lib/intprops.h (_GL_HAVE___TYPEOF__) [__IBM__TYPEOF__]:
55649         Define to 1 only for XL C 12.1 or later, since this bug
55650         occurs in XL C for AIX 6.0 but not in 12.1.
55652 2016-11-02  Pádraig Brady  <P@draigBrady.com>
55654         backupfile: initialize default suffix within the implementation
55655         * lib/backupfile.c (find_backup_file_name): Initialize the
55656         global variable here, to simplify usage, and to only call
55657         getenv() when needed.
55659 2016-11-01  Paul Eggert  <eggert@cs.ucla.edu>
55661         futimens: remove FIXME for old Linux kernels
55662         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Belatedy do a "simplify
55663         this in 2012" FIXME, like that for utimensat.
55665         utimensat: remove FIXME for old Linux kernels
55666         * lib/utimensat.c (rpl_utimensat): Update FIXME comment.
55667         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Belatedy do a "simplify
55668         this in 2012" FIXME, by assuming the file system bug is absent
55669         unless demonstrated to be present.  We no longer need to worry
55670         about Linux kernel 2.6.32 when building with newer kernels.
55672 2016-10-16  Bruno Haible  <bruno@clisp.org>
55674         qsort_r: Fix macrology for platforms that lack the function.
55675         * m4/stdlib_h.m4 (gl_STDLIB_H): Check for qsort_r.
55676         (gl_STDLIB_H_DEFAULTS): Initialize HAVE_QSORT_R.
55677         * modules/stdlib (Makefile.am): Substitute HAVE_QSORT_R.
55678         * lib/stdlib.in.h (qsort_r): Provide declaration if the function does
55679         not exist.
55680         * m4/qsort_r.m4 (gl_FUNC_QSORT_R): Use AC_CHECK_FUNCS to test whether
55681         the function exists.
55682         * modules/qsort_r: Add comments.
55684 2016-10-26  Paul Eggert  <eggert@cs.ucla.edu>
55686         sys_types: fix Texinfo typos
55687         * doc/glibc-functions/gnu_dev_major.texi:
55688         * doc/glibc-functions/gnu_dev_makedev.texi:
55689         * doc/glibc-functions/gnu_dev_minor.texi: Fix typos.
55691 2016-10-26  John David Anglin  <dave.anglin@bell.net>
55693         getprogname: port to HP-UX
55694         See Bug#24805.
55695         * lib/getprogname.c (getprogname) [__hpux]: Port.
55696         * tests/test-getprogname.c (STREQ) [__hpux]:
55697         Special-case for HP-UX limitations on program name length.
55699 2016-10-20  Bruno Haible  <bruno@clisp.org>
55701         Update doc about target platforms.
55702         * doc/gnulib-intro.texi (Target Platforms): Update list.
55704 2016-10-15  Bruno Haible  <bruno@clisp.org>
55706         opendir, readdir, closedir: Relicense under LGPLv2+.
55707         * modules/opendir (License): Change to LGPLv2+.
55708         * modules/readdir (License): Likewise.
55709         * modules/closedir (License): Likewise.
55711 2016-10-16  Bruno Haible  <bruno@clisp.org>
55713         Fix conflict between strerror_r-posix module and AC_FUNC_STRERROR_R.
55714         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Override the values set by the
55715         AC_FUNC_STRERROR_R macro. Define HAVE_DECL_STRERROR_R_ORIG.
55716         * lib/strerror_r.c: Use HAVE_DECL_STRERROR_R_ORIG instead of
55717         HAVE_DECL_STRERROR_R.
55719 2016-10-16  Bruno Haible  <bruno@clisp.org>
55721         Make the 'argp' module work without the 'error' module.
55722         * m4/argp.m4 (gl_ARGP): Require AC_FUNC_STRERROR_R.
55724 2016-10-25  Paul Eggert  <eggert@cs.ucla.edu>
55726         diffseq: restore TOO_EXPENSIVE heuristic
55727         * lib/diffseq.h: Problem with diffutils reported by Andreas Schwab
55728         (Bug#24715).  The simplest solution is to restore the
55729         TOO_EXPENSIVE heuristic that I added to GNU diff in 1993, while
55730         using a higher threshold to avoid Bug#16848 on smaller files.
55731         * lib/diffseq.h (struct context): Restore member too_expensive.
55732         (struct partition): Restore members lo_minimal, hi_minimal.
55733         (diag, compareseq): Restore arg find_minimal.  All uses changed.
55734         (diag): Restore the TOO_EXPENSIVE heuristic that I added back in
55735         1993 to make 'diff' run faster (but not as well) on large inputs,
55736         but use a threshold of 4096 instead of the old 256.
55737         * lib/fstrcmp.c (strcmp_bounded):
55738         * lib/git-merge-changelog.c (compute_differences):
55739         Adjust to diffseq.h changes.
55741 2016-10-22  Bruno Haible  <bruno@clisp.org>
55743         iconv: Avoid compilation error when bootstrapping GNU libiconv.
55744         * m4/iconv.m4 (AM_ICONV): When the system does not have an iconv()
55745         declaration yet, define ICONV_CONST to empty.
55747 2016-10-15  Bruno Haible  <bruno@clisp.org>
55749         Avoid gnulib-tool warnings about the dependencies of 'parse-datetime'.
55750         * gnulib-tool (func_get_license): Special-case the 'parse-datetime'
55751         module.
55753 2016-10-16  Bruno Haible  <bruno@clisp.org>
55755         system-quote tests: Avoid compiler warning on AIX.
55756         * tests/test-system-quote-child.c (fopen): Redefine like the system's
55757         <stdio.h> does.
55759 2016-10-16  Bruno Haible  <bruno@clisp.org>
55761         Fix some "gcc -Wall" warnings.
55762         * tests/test-ffsl.c (main): Use variable x, not i.
55763         * tests/test-posix_spawn3.c (parent_main): Consider the return value of
55764         freopen.
55765         * tests/test-sethostname1.c (main): Explicitly ignore the return value
55766         of sethostname.
55768 2016-10-16  Bruno Haible  <bruno@clisp.org>
55770         gnulib-tool: Make --create-testdir on all modules work again.
55771         * gnulib-tool (func_create_testdir): Don't include the
55772         non-recursive-gnulib-prefix-hack module.
55774 2016-10-21  Daiki Ueno  <ueno@gnu.org>
55776         libunistring: change the maintainer to 'all'
55777         * modules/gen-uni-tables, modules/libunistring:
55778         * modules/ucs4-utf16, modules/ucs4-utf8, modules/unicodeio:
55779         * modules/unitypes, modules/utf16-ucs4, modules/utf16-ucs4-unsafe:
55780         * modules/utf8-ucs4, modules/utf8-ucs4-unsafe:
55781         * modules/unicase/*, modules/uniconv/*, modules/unictype/*:
55782         * modules/unilbrk/*, modules/uniname/*, modules/uninorm/*:
55783         * modules/unistdio/*, modules/unistr/*, modules/uniwbrk/*:
55784         * modules/uniwidth/*: Change the maintainer to 'all'.
55786 2016-10-16  Bruno Haible  <bruno@clisp.org>
55788         Simplify "configure: checking ..." messages.
55789         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use AC_MSG_CHECKING instead of
55790         AC_MSG_NOTICE.
55791         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Likewise.
55793 2016-10-20  Paul Eggert  <eggert@cs.ucla.edu>
55795         quotearg-tests: pacify gcc -Wall
55796         Problem reported by Bruno Haible in:
55797         http://lists.gnu.org/r/bug-gnulib/2016-10/msg00066.html
55798         * tests/test-quotearg-simple.c (use_quote_double_quotes): Move here ...
55799         * tests/test-quotearg.h: ... from here.
55801 2016-10-20  Pádraig Brady  <P@draigBrady.com>
55803         canonicalize-lgpl: fix for missing SIZE_MAX on older systems
55804         * lib/canonicalize-lgpl.c [SIZE_MAX]: Define if needed.
55805         Needed on Centos <= 4.
55807 2016-10-20  Jim Meyering  <meyering@fb.com>
55809         printf.m4: fix a bug in detecting printf %j support
55810         * m4/printf.m4 (gl_PRINTF_SIZES_C99): Fail any system for which
55811         uintmax_t is defined in neither stdint.h nor inttypes.h.
55812         Before, this macro might have mistakenly set
55813         gl_cv_func_printf_sizes_c99=yes on such a system.
55814         Spotted by Zev Weiss.
55816 2016-10-19  Paul Eggert  <eggert@cs.ucla.edu>
55818         sched: substitute HAVE_SYS_CDEFS_H too
55819         Problem reported by Tom G. Christensen in:
55820         http://lists.gnu.org/r/bug-gnulib/2016-10/msg00084.html
55821         * m4/sched_h.m4 (gl_SCHED_H): Set and substitute HAVE_SYS_CDEFS_H.
55822         * modules/sched (Depends-on): Substitute HAVE_SYS_CDEFS_H.
55824 2016-10-19  Pádraig Brady  <P@draigBrady.com>
55826         quotearg: never write beyond the returned length
55827         * lib/quotearg.c (quotearg_buffer_restyled): Switch to a read-only
55828         scan of the string when we initially encounter a single quote when
55829         shell quoting, so that if we then switch to a more concise quoting method
55830         we will not have written beyond that returned length.
55831         This is significant for sh-quote, which has separate routines
55832         to determine the length and do the actual quoting.
55833         * tests/test-quotearg.h: Reinstate the buffer bounds checking
55834         now that we never write more than the returned length.
55836 2016-10-18  Bruno Haible  <bruno@clisp.org>
55838         getprogname tests: Avoid failure in packages that use libtool.
55839         * tests/test-getprogname.c (main): Strip "lt-" prefix.
55840         Based on a patch by Jim Meyering.
55842 2016-10-16  Bruno Haible  <bruno@clisp.org>
55844         getprogname: Fix test failure on Cygwin. Comments.
55845         * lib/getprogname.h: Add comments.
55846         * lib/getprogname.c: Add comments. Fix #elif indentation.
55847         * tests/test-getprogname.c (main): On Cygwin, expect a result without
55848         ".exe" suffix.
55850 2016-10-16  Bruno Haible  <bruno@clisp.org>
55852         Make sure the libunistring detection rejects older versions with a
55853         known bug.
55854         * modules/unistr/u8-strtok (configure.ac): Bump required version.
55855         * modules/unistr/u16-strtok (configure.ac): Likewise.
55856         * modules/unistr/u32-strtok (configure.ac): Likewise.
55858 2016-10-18  Bruno Haible  <bruno@clisp.org>
55860         sh-quote, system-quote: revert regression of unit test.
55861         * tests/test-sh-quote.c (check_one): Do detect buffer overruns.
55862         * tests/test-system-quote-main.c (check_one): Likewise.
55864 2016-10-16  Pádraig Brady  <P@draigBrady.com>
55866         quotearg: fix stale tests
55867         * tests/test-quotearg.c [locale_results]: Add the missing str7
55868         entries to the expected results.
55869         * tests/test-system-quote-main.c (check_one): Don't enforce that we
55870         don't write beyond the returned length, since that's no longer the
55871         case if we switch to a more concise quoting style.
55872         * tests/test-sh-quote.c (check_one): Likewise.
55873         (main): Adjust for the new more concise quoting style.
55874         Reported by Bruno Haible.
55876 2016-10-16  Jim Meyering  <meyering@fb.com>
55878         non-recursive-gnulib-prefix-hack: fix inconsequential typo
55879         * m4/non-recursive-gnulib-prefix-hack.m4: Change a hard-coded "lib"
55880         to "$1".  This macro is always invoked with $1 == lib.
55881         Spotted by Bruno Haible
55883 2016-10-16  Bruno Haible  <bruno@clisp.org>
55885         Fix a test crash.
55886         * tests/test-duplocale.c (main): Skip the test if the 'newlocale' call
55887         fails.
55889 2016-10-16  Pádraig Brady  <P@draigBrady.com>
55891         test-limits-h: suppress -Woverlength-strings
55892         * tests/test-limits-h.c [__GNUC__]: Ignore -Woverlength-strings.
55894 2016-10-15  Bruno Haible  <bruno@clisp.org>
55896         gettime, timespec, utimens: Relicense under LGPL.
55897         * modules/gettime (License): Change to LGPL.
55898         * modules/timespec (License): Likewise.
55899         * modules/utimens (License): Likewise.
55901 2016-10-14  Bruno Haible  <bruno@clisp.org>
55902             Pádraig Brady  <P@draigBrady.com>
55904         canonicalize-lgpl: Support the case path_max > INT_MAX.
55905         * lib/canonicalize-lgpl.c (__realpath): Declare n as ssize_t, not int.
55906         Fix overflow check, for platforms where 'size_t' is larger than 'long'.
55908 2016-10-13  Jim Meyering  <meyering@fb.com>
55910         getprogname: IBM z/OS: avoid NULL-dereference
55911         * lib/getprogname.c (getprogname) [__MVS__]: Don't dereference NULL
55912         upon strdup failure.
55914 2016-10-12  Jim Meyering  <meyering@fb.com>
55916         test-stdint: use _GL_VERIFY rather than "verify" for some tests
55917         * tests/test-stdint.c (verify_width): Implement with _GL_VERIFY
55918         and an abbreviated diagnostic rather than verify with the full one,
55919         because the full-length strings would evoke warnings from gcc with
55920         -Woverlength-strings.
55922 2016-10-13  Paul Eggert  <eggert@cs.ucla.edu>
55924         stdint: port SIZE_MAX to glibc s390
55925         Problem reported by Eric Blake in:
55926         http://lists.gnu.org/r/bug-gnulib/2016-10/msg00031.html
55927         * doc/posix-headers/stdint.texi (stdint.h): Document the fix.
55928         * m4/stdint.m4 (gl_STDINT_H): Check that SIZE_MAX has the
55929         correct type, if possible.
55931 2016-10-13  Daniel Richard G.  <skunk@iSKUNK.ORG>
55933         getprogname: port to IBM z/OS
55934         * lib/getprogname.c (getprogname): Use w_getpsent() to get the name.
55936 2016-10-11  Jim Meyering  <meyering@fb.com>
55938         maint: remove stray space after "." in AC_DEFINE comment.
55939         * m4/st_dm_mode.m4 (AC_STRUCT_ST_DM_MODE): Remove space-after-".".
55940         * m4/utimes.m4 (gl_FUNC_UTIMES): Likewise.
55942 2016-10-05  Jim Meyering  <meyering@fb.com>
55944         long-options: avoid new GCC 7 warning from -Wimplicit-fallthrough
55945         * lib/long-options.c (parse_long_options): Add a break statement
55946         to avoid this new warning/failure:
55947         $ CFLAGS='-O -Werror=implicit-fallthrough' ./gnulib-tool \
55948           --create-testdir --dir=/t/x --with-tests --test long-options
55949         ../../gllib/long-options.c: In function 'parse_long_options':
55950         ../../gllib/long-options.c:66:12: error: this statement may \
55951           fall through [-Werror=implicit-fallthrough]
55952                    (*usage_func) (EXIT_SUCCESS);
55953                    ~^~~~~~~~~~~~~~~~~~~~~~~~~~~
55955 2016-10-05  Jim Meyering  <meyering@fb.com>
55957         utimecmp: avoid new GCC 7 warning from -Wbool-operation
55958         Testing this module would fail when using GCC 7 like this:
55959         $ CFLAGS='-O -Werror=bool-operation' ./gnulib-tool --create-testdir \
55960           --dir=/tmp/x --with-tests --test utimecmp
55961         ../../gllib/utimecmp.c: In function ‘utimecmp’:
55962         ../../gllib/utimecmp.c:291:36: error: ‘~’ on a boolean expression \
55963           [-Werror=bool-operation]
55964                          time_t s = src_s & ~ (res == 2 * BILLION);
55965                                             ^
55966         ../../gllib/utimecmp.c:370:16: error: ‘~’ on a boolean expression \
55967           [-Werror=bool-operation]
55968                src_s &= ~ (res == 2 * BILLION);
55969                         ^
55970         * lib/utimecmp.c (utimecmp): Do not apply "~" to a boolean.
55971         Instead, make it explicit that we intend to apply it to 0 or 1.
55973 2016-10-10  Norihiro Tanaka  <noritnk@kcn.ne.jp>
55975         dfa: save memory for states
55976         * src/dfa (dfaexec_main): Beginning of dfa execution, release caches of
55977         states if dfa has a lot of caches.
55979 2016-10-10  Eli Zaretskii  <eliz@gnu.org>
55981         wchar, wctype-h: fix for MinGW 3.22.2
55982         * lib/wchar.in.h [__MINGW32__]: Add one more condition for
55983         special invocation, to fix issues with MinGW 3.22.2 wchar.h
55984         when included from <string.h>.
55985         * lib/wctype.in.h [__MINGW32__]: Add special invocation
55986         convention for MinGW 3.22.2, to solve issues with their
55987         wctype.h when included from <ctype.h>.
55989 2016-10-05  Jim Meyering  <meyering@fb.com>
55991         long-options: avoid new GCC 7 warning from -Wimplicit-fallthrough
55992         * lib/long-options.c (parse_long_options): Add a break statement
55993         to avoid this new warning/failure:
55994         $ CFLAGS='-O -Werror=implicit-fallthrough' ./gnulib-tool \
55995           --create-testdir --dir=/t/x --with-tests --test long-options
55996         ../../gllib/long-options.c: In function ‘parse_long_options’:
55997         ../../gllib/long-options.c:66:12: error: this statement may \
55998           fall through [-Werror=implicit-fallthrough]
55999                    (*usage_func) (EXIT_SUCCESS);
56000                    ~^~~~~~~~~~~~~~~~~~~~~~~~~~~
56002         utimecmp: avoid new GCC 7 warning from -Wbool-operation
56003         Testing this module would fail when using GCC 7 like this:
56004         $ CFLAGS='-O -Werror=bool-operation' ./gnulib-tool --create-testdir \
56005           --dir=/tmp/x --with-tests --test utimecmp
56006         ../../gllib/utimecmp.c: In function ‘utimecmp’:
56007         ../../gllib/utimecmp.c:291:36: error: ‘~’ on a boolean expression \
56008           [-Werror=bool-operation]
56009                          time_t s = src_s & ~ (res == 2 * BILLION);
56010                                             ^
56011         ../../gllib/utimecmp.c:370:16: error: ‘~’ on a boolean expression \
56012           [-Werror=bool-operation]
56013                src_s &= ~ (res == 2 * BILLION);
56014                         ^
56015         * lib/utimecmp.c (utimecmp): Do not apply "~" to a boolean.
56016         Instead, make it explicit that we intend to apply it to 0 or 1.
56018 2016-10-03  Pádraig Brady  <P@draigBrady.com>
56020         quotearg: minimize shell quoting using double quotes
56021         * lib/quotearg.c (quotearg_buffer_restyled): If an ASCII single
56022         quote in encountered then use double quotes (c style quoting)
56023         when possible, as it simplifies the quoting.
56024         * tests/test-quotearg-simple.c: Add test cases.
56025         * tests/test-quotearg.h (use_quotearg_buffer): Adjust to account
56026         for the fact we now may write beyond the returned length.
56028 2016-10-02  Jim Meyering  <meyering@fb.com>
56030         vasnprintf.c: avoid spurious warning from GCC 7
56031         The presence of cpp directives renders this "FALLTHROUGH" comment
56032         ineffective, so does not suppress the -Wimplicit-fallthrough warning
56033         from GCC 7 built from git on 2016-10-02.
56034         * lib/vasnprintf.c (VASNPRINTF): Move comment down past two cpp
56035         directives, so that it takes effect once again.  This is clearly
56036         not a proper change, and I will revert it once this bug is fixed:
56037         https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77817
56039 2016-10-01  Jim Meyering  <meyering@fb.com>
56041         getprogname: correct the test for a __progname variable
56042         * m4/getprogname.m4 (gl_FUNC_GETPROGNAME): Use AC_CACHE_CHECK
56043         and AC_LINK_IFELSE to check for a global __progname.  If found,
56044         define HAVE_VAR___PROGNAME.
56045         * lib/getprogname.c (getprogname): Reflect the new name of the
56046         feature- checked preprocessor symbol:
56047         s/HAVE_DECL___PROGNAME/HAVE_VAR___PROGNAME/
56049 2016-09-28  Jim Meyering  <meyering@fb.com>
56051         u8-uctomb-aux.c: build: placate GCC 7's new -Wimplicit-fallthrough
56052         * lib/unistr/u8-uctomb-aux.c (u8_uctomb_aux): Mark each end of
56053         fall-through case with a /* fallthrough */ comment.
56055         dfa: build: avoid warning from GCC 7's new -Wimplicit-fallthrough
56056         * lib/dfa.c (dfassbuild): Mark the end of this case with a
56057         /* fallthrough */ comment.
56059         getprogname: avoid __progname vs program_invocation_short_name pitfall
56060         I.e., don't let the OpenBSD 5.1 fix induce failure when using newer
56061         glibc.  Would have caused failure with Fedora 25's glibc-2.24-3, but
56062         not with Fedora 24's glibc-2.23.1-10.
56063         * lib/getprogname.c (__progname): Move this declaration down...
56064         (getprogname): ... into the #elif block where used, and make it
56065         explicitly "extern".
56067         getprogname: port to OpenBSD 5.1
56068         * lib/getprogname.c (__progname) [HAVE_DECL___PROGNAME]: Declare.
56069         (getprogname) [HAVE_DECL___PROGNAME]: Return __progname or "?".
56070         * modules/getprogname (configure.ac): Move most of this code...
56071         * m4/getprogname.m4 (gl_FUNC_GETPROGNAME): ... to this function,
56072         increment serial number, and add a test for __progname.
56073         https://bugs.gnu.org/24562
56074         Reported by Nelson H. F. Beebe.
56076 2016-09-24  Paul Eggert  <eggert@cs.ucla.edu>
56078         sched: port to GCC 6.2.1 on macOS Sierra
56079         Problem reported by Denis Davydov in:
56080         http://lists.gnu.org/r/bug-gnulib/2016-09/msg00056.html
56081         * lib/sched.in.h [HAVE_SYS_CDEFS_H]:
56082         Include <sys/cdefs.h> before <sched.h>.
56083         * m4/nproc.m4 (gl_PREREQ_NPROC): Include errno.h before sched.h,
56084         so that we needn’t worry about the sched.h include bug here.
56085         * m4/sched_h.m4 (gl_SCHED_H): Check for sys/cdefs.h,
56086         and include it before <sched.h> if it exists, when
56087         checking for <sched.h>.
56089         tests/init.sh: port Alpine fix to AIX 7.1
56090         * tests/init.sh (compare_): When attempting to use diff -U3,
56091         prefer diff -u to -U3 to -c to plain diff.  Do not insist on
56092         diff -u not outputting a space after leading '+', as the users
56093         of 'compare' should not be that picky about its output format.
56094         In the AIX 7.1 case, return with diff exit status (or with 2 if
56095         trouble), instead of some random nonzero exit status.
56096         * tests/test-init.sh (test_compare): Remove space after leading
56097         '+', so that AIX 7.1 'diff' passes the test.
56099 2016-09-22  Paul Eggert  <eggert@cs.ucla.edu>
56101         nl_langinfo: pacify GCC
56102         * lib/nl_langinfo.c (ctype_codeset): Remove unused local.
56103         (rpl_nl_langinfo): Cast string literals to char *, to pacify GCC.
56105         stdint: also set GL_GENERATE_LIMITS_H
56106         Problem reported by Jim Meyering in:
56107         http://lists.gnu.org/r/bug-gnulib/2016-09/msg00052.html
56108         * m4/stdint.m4 (gl_STDINT_H): Also redo the AM_CONDITIONAL.
56110         limits-h, stdint: Don't assume extensions, fix typo
56111         * m4/limits-h.m4 (gl_LIMITS_H):
56112         * m4/stdint.m4 (gl_STDINT_H):
56113         Don't assume AC_USE_SYSTEM_EXTENSIONS.
56114         * m4/stdint.m4 (gl_STDINT_H): Fix typo in setting of LIMITS_H,
56115         reported by Jim Meyering in:
56116         http://lists.gnu.org/r/bug-gnulib/2016-09/msg00050.html
56118 2016-09-21  Jim Meyering  <meyering@fb.com>
56120         getprogname: port to AIX
56121         * lib/getprogname.c (getprogname) [_AIX]: Use getpid, getprocs64
56122         and strdup to obtain a short program name string.  Using code from
56123         Bruno Haible and an idea from Bastien ROUCARIÈS, in
56124         https://lists.gnu.org/r/bug-gnulib/2010-12/msg00249.html
56125         Assaf Gordon reported that this new file would fail to compile on
56126         AIX-7.1 32bit.
56128 2016-09-16  Paul Eggert  <eggert@cs.ucla.edu>
56130         extensions: fix typo in comment
56131         * m4/extensions.m4: Sync from Autoconf master.
56133         stdint: support new _WIDTH macros
56134         * doc/posix-headers/stdint.texi: Document this.
56135         * lib/stdint.in.h: Add support for INTMAX_WIDTH. etc.
56136         * m4/stdint.m4 (gl_STDINT_H): Require gl_LIMITS_H.  Check for
56137         support for INTMAX_WIDTH, etc. as well as for support for just C99.
56138         * modules/stdint (Depends-on): Add limits-h.
56139         (Makefile.am): Substitute HAVE_C99_STDINT_H.
56140         * modules/stdint-tests (Depends-on): Add extensions, so that
56141         INTMAX_MAX etc. are defined.
56142         * tests/test-stdint.c: Verify the new macros.
56144         limits-h: new module
56145         This adds ISO/IEC TS 18661-1:2014 support to limits.h.
56146         * MODULES.html.sh: Add limits-h,and move size_max to stdint section.
56147         * doc/posix-headers/limits.texi: Document new module.
56148         * lib/limits.in.h, m4/limits-h.m4, modules/limits-h:
56149         * modules/limit-h-tests, tests/test-limits-h.c: New files.
56151         stdio: don't redefine __USE_MINGW_ANSI_STDIO
56152         * m4/stdio_h.m4 (gl_STDIO_H): Don't define __USE_MINGW_ANSI_STDIO
56153         if it is already defined.  Apparently GNU Emacs relies on this.  See:
56154         http://lists.gnu.org/r/emacs-devel/2016-09/msg00416.html
56156 2016-09-15  Eric Blake  <eblake@redhat.com>
56158         sys_types: avoid glibc 2.25 warnings about major()
56159         * m4/sys_types_h.m4 (AC_HEADER_MAJOR): Replace broken version in
56160         older autoconf.
56161         * doc/posix-headers/sys_types.texi (sys/types.h): Document fix.
56162         * doc/glibc-functions/gnu_dev_major.texi (gnu_dev_major): Likewise.
56163         * doc/glibc-functions/gnu_dev_makedev.texi (gnu_dev_makedev): Likewise.
56164         * doc/glibc-functions/gnu_dev_minor.texi (gnu_dev_minor): Likewise.
56166         mountlist: include sysmacros.h for glibc
56167         * m4/mountlist.m4 (gl_PREREQ_MOUTLIST_EXTRA): Include
56168         AC_HEADER_MAJOR.
56169         * lib/mountlist.c (includes): Use correct headers.
56171 2016-09-15  Paul Eggert  <eggert@cs.ucla.edu>
56173         extensions: port to more ISO C TSes
56174         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Sync from Autoconf
56175         master, to add support for more recent ISO C TRs and TSes.
56177 2016-09-13  Paul Eggert  <eggert@cs.ucla.edu>
56179         intprops: new macro TYPE_WIDTH
56180         * lib/intprops.h (TYPE_WIDTH): New macro.
56181         (TYPE_MAXIMUM, _GL_SIGNED_INT_MAXIMUM, INT_STRLEN_BOUND):
56182         * lib/ftoastr.h (_GL_FLOAT_DIG_BITS_BOUND):
56183         * lib/parse-datetime.y (parse_datetime2):
56184         Use it.
56186         extensions: port to recent ISO C TRs
56187         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS):
56188         Sync from Autoconf master, to add support for recent ISO C TRs.
56189         * m4/stdio_h.m4 (gl_STDIO_H): Define __USE_MINGW_ANSI_STDIO here,
56190         since AC_USE_SYSTEM_EXTENSIONS no longer does that as
56191         the MinGW option is not an extension.
56193 2016-09-11  Paul Eggert  <eggert@cs.ucla.edu>
56195         dfa: port to Solaris 9
56196         Problems reported by Tom G. Christensen in:
56197         http://lists.gnu.org/r/bug-gnulib/2016-09/msg00031.html
56198         * modules/dfa (Depends-on): Add isblank.
56199         * modules/dfa-tests (dfa_match_aux_LDADD):
56200         Rename from test_stat_LDADD, to fix typo.
56201         * tests/dfa-match.sh: Don't require 'timeout'; use it if available.
56203 2016-09-10  Jim Meyering  <meyering@fb.com>
56205         strverscmp: avoid link failure on OS X
56206         * lib/strverscmp.c [!weak_alias]: Define __strverscmp to strverscmp.
56207         Reported by Assaf Gordon in https://bugs.gnu.org/24256#26
56209 2016-08-16  Jim Meyering  <meyering@fb.com>
56211         dfa: new module, importing grep's DFA matcher
56212         Since grep's DFA matcher is now being used by two gnulib-enabled
56213         projects, grep and sed, it makes sense to version-control its
56214         sources and unit tests in one place: here.
56215         * modules/dfa: New module.
56216         * modules/dfa-tests: New file.
56217         * lib/dfa.c: New file, from grep.
56218         * lib/dfa.h: Likewise.
56219         * lib/localeinfo.c: Likewise.
56220         * lib/localeinfo.h: Likewise.
56221         * tests/dfa-match-aux.c: Likewise.
56222         * tests/dfa-invalid-char-class.sh: Likewise.
56223         * tests/dfa-match.sh: Likewise, with minor changes.
56224         * MODULES.html.sh (Misc): Add "dfa" to this list.
56226 2016-09-09  Jim Meyering  <meyering@fb.com>
56228         getprogname-tests: don't depend on assert-h
56229         * modules/getprogname-tests (Depends-on): Remove assert-h.
56230         It was not needed, and in fact would cause build failure for
56231         coreutils on some systems.  Reported by Assaf Gordon in https:
56232         //lists.gnu.org/r/coreutils/2016-09/msg00016.html
56234 2016-09-07  Jim Meyering  <meyering@fb.com>
56236         getprogname-tests: work also when EXEEXT is nonempty
56237         * modules/getprogname-tests (Makefile.am): Define EXEEXT.
56238         * tests/test-getprogname.c (main): Use it.
56239         Suggested by Gisle Vanem.
56241 2016-09-07  Gisle Vanem  <gvanem@yahoo.no>
56243         getprogname: fix errors in previous change
56244         * lib/getprogname.c (getprogname) [HAVE_GETEXECNAME]:
56245         s/program_invocation_name/base/
56246         [HAVE_DECL___ARGV]: Handle NULL __argv or __argv[0].
56248 2016-09-08  Pádraig Brady  <P@draigBrady.com>
56250         parse-datetime: restrict debug output to input string
56251         * lib/parse-datetime.y (parse_datetime2): If we parse
56252         all of the input but determine it's invalid, ensure
56253         we don't output the now invalid input pointer.
56254         This issue was seen with `date -d 'now +1'`.
56256 2016-09-07  Paul Eggert  <eggert@cs.ucla.edu>
56258         flexmember: new macro FLEXALIGNOF
56259         * lib/flexmember.h: Include <stddef.h>, for offsetof.
56260         (FLEXALIGNOF): Rename from _GL_XALLOC_ALIGNOF, as Emacs can use
56261         this macro.  Update comments.
56263 2016-09-07  Jim Meyering  <meyering@fb.com>
56265         getprogname: port to systems with __argv (mingw, msvc)
56266         * lib/getprogname.c (getprogname): Include "dirname.h" and use
56267         last_component: more general than open coding it with hard-coded "/".
56268         * lib/getprogname.h (getprogname): Prefer "char const *" consistently.
56269         * modules/getprogname (Depends-on): Add dirname-lgpl.
56270         (configure.ac): Check for __argv in <stdlib.h>.
56271         * modules/getprogname-tests: New file.
56272         * tests/test-getprogname.c: New file.
56273         Suggested by Gisle Vanem in
56274         https://lists.gnu.org/r/bug-gnulib/2016-09/msg00014.html
56276 2016-09-07  Paul Eggert  <eggert@cs.ucla.edu>
56278         flexmember: port better to GCC + valgrind
56279         With a char[] flexible array member in a struct with nontrivial
56280         alignment, GCC-generated code can access past the end of the
56281         array, because GCC assumes there are padding bytes to get the
56282         struct aligned.  So the common idiom of malloc (offsetof (struct
56283         s, m), n) does not properly allocate an n-byte trailing member, as
56284         malloc’s argument should be the next multiple of alignof (struct s).
56285         See GCC Bug#66661: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66661
56286         Although C11 apparently permits this GCC optimization (i.e., there
56287         was a bug in Gnulib not in GCC), possibly this is a defect in C11.
56288         See the thread containing:
56289         https://gcc.gnu.org/ml/gcc-patches/2016-09/msg00317.html
56290         * lib/flexmember.h: New file.
56291         * lib/fnmatch.c, lib/fts.c, lib/glob.c, lib/idcache.c:
56292         * lib/localename.c, lib/time_rz.c:
56293         Include flexmember.h.
56294         * lib/fnmatch_loop.c (struct patternlist):
56295         * lib/localename.c (struct hash_node):
56296         Use FLEXIBLE_ARRAY_MEMBER.
56297         * lib/fnmatch_loop.c (EXT):
56298         * lib/fts.c (fts_alloc):
56299         * lib/glob.c (glob_in_dir):
56300         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
56301         * lib/localename.c (gl_lock_define_initialized):
56302         * lib/time_rz.c (tzalloc):
56303         Use FLEXSIZEOF instead of offsetof.
56304         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
56305         Check that the size of the struct can be taken.
56306         * modules/flexmember (Files): Add lib/flexmember.h.
56307         * modules/fnmatch, modules/glob, modules/localename (Depends-on):
56308         Add flexmember.
56310 2016-09-06  Paul Eggert  <eggert@cs.ucla.edu>
56312         getprogname: port to Solaris 10
56313         * lib/getprogname.c: Include stdlib.h, for getexecname decl.
56314         (getprogname) [HAVE_GETEXECNAME]: Use that, for Solaris 10.
56315         * m4/getprogname.m4 (gl_FUNC_GETPROGNAME): Check for getexecname.
56317         stdalign: correct mistake in alignof doc
56318         Problem reported by Joseph Myers in:
56319         https://gcc.gnu.org/ml/gcc-patches/2016-09/msg00340.html
56320         * doc/posix-headers/stdalign.texi: Do not imply that C11 prohibits
56321         alignof(S) where S is a structure containing a flexible array
56322         member.  The Gnulib substitute does not support this, but C11 does.
56324 2016-08-18  Pino Toscano  <ptoscano@redhat.com>
56326         main.mk: remove sc_program_name, since there is no more need to
56327         use set_program_name in tools (getprogname is enough for most
56328         of the cases).
56329         * cfg.mk (local-checks-to-skip): Remove sc_program_name.
56330         * top/maint.mk (sc_program_name): Remove.
56332 2016-08-18  Pino Toscano  <ptoscano@redhat.com>
56334         Port tests away from progname, since modules that need the
56335         program name already depend on getprogname.
56336         * modules/acl-tests (Depends-on): Remove progname.
56337         * modules/argmatch (Depends-on): Likewise.
56338         * modules/argmatch-tests (Depends-on): Likewise.
56339         * modules/argp-tests (Depends-on): Likewise.
56340         * modules/argp-version-etc-tests (Depends-on): Likewise.
56341         * modules/array-list-tests (Depends-on): Likewise.
56342         * modules/array-oset-tests (Depends-on): Likewise.
56343         * modules/avltree-list-tests (Depends-on): Likewise.
56344         * modules/avltree-oset-tests (Depends-on): Likewise.
56345         * modules/avltreehash-list-tests (Depends-on): Likewise.
56346         * modules/carray-list-tests (Depends-on): Likewise.
56347         * modules/copy-file-tests (Depends-on): Likewise.
56348         * modules/exclude-tests (Depends-on): Likewise.
56349         * modules/fchownat-tests (Depends-on): Likewise.
56350         * modules/fdopendir-tests (Depends-on): Likewise.
56351         * modules/filenamecat-tests (Depends-on): Likewise.
56352         * modules/fstatat-tests (Depends-on): Likewise.
56353         * modules/fstrcmp-tests (Depends-on): Likewise.
56354         * modules/linked-list-tests (Depends-on): Likewise.
56355         * modules/linkedhash-list-tests (Depends-on): Likewise.
56356         * modules/mkdirat-tests (Depends-on): Likewise.
56357         * modules/nonblocking-pipe-tests (Depends-on): Likewise.
56358         * modules/nonblocking-socket-tests (Depends-on): Likewise.
56359         * modules/obstack-printf-tests (Depends-on): Likewise.
56360         * modules/openat-tests (Depends-on): Likewise.
56361         * modules/parse-datetime-tests (Depends-on): Likewise.
56362         * modules/pipe-filter-gi-tests (Depends-on): Likewise.
56363         * modules/pipe-filter-ii-tests (Depends-on): Likewise.
56364         * modules/quotearg-simple-tests (Depends-on): Likewise.
56365         * modules/quotearg-tests (Depends-on): Likewise.
56366         * modules/rbtree-list-tests (Depends-on): Likewise.
56367         * modules/rbtree-oset-tests (Depends-on): Likewise.
56368         * modules/rbtreehash-list-tests (Depends-on): Likewise.
56369         * modules/spawn-pipe-tests (Depends-on): Likewise.
56370         * modules/system-quote-tests (Depends-on): Likewise.
56371         * modules/uniname/uniname-tests (Depends-on): Likewise.
56372         * modules/uninorm/nfc-tests (Depends-on): Likewise.
56373         * modules/uninorm/nfd-tests (Depends-on): Likewise.
56374         * modules/uninorm/nfkc-tests (Depends-on): Likewise.
56375         * modules/uninorm/nfkd-tests (Depends-on): Likewise.
56376         * modules/unistdio/u16-vsnprintf-tests (Depends-on): Likewise.
56377         * modules/unistdio/u16-vsprintf-tests (Depends-on): Likewise.
56378         * modules/unistdio/u32-vsnprintf-tests (Depends-on): Likewise.
56379         * modules/unistdio/u32-vsprintf-tests (Depends-on): Likewise.
56380         * modules/unistdio/u8-vsnprintf-tests (Depends-on): Likewise.
56381         * modules/unistdio/u8-vsprintf-tests (Depends-on): Likewise.
56382         * modules/unistdio/ulc-vsnprintf-tests (Depends-on): Likewise.
56383         * modules/unistdio/ulc-vsprintf-tests (Depends-on): Likewise.
56384         * modules/unlinkat-tests (Depends-on): Likewise.
56385         * modules/version-etc-tests (Depends-on): Likewise.
56386         * modules/xalloc-die-tests (Depends-on): Likewise.
56387         * modules/xmemdup0-tests (Depends-on): Likewise.
56388         * modules/xprintf-posix-tests (Depends-on): Likewise.
56389         * modules/xvasprintf-tests (Depends-on): Likewise.
56390         * tests/test-argmatch.c: Do not include progname.h.
56391         (main) Stop calling set_program_name.
56392         * tests/test-argp-version-etc.c: Likewise.
56393         * tests/test-argp.c: Likewise.
56394         * tests/test-argv-iter.c: Likewise.
56395         * tests/test-array_list.c: Likewise.
56396         * tests/test-array_oset.c: Likewise.
56397         * tests/test-avltree_list.c: Likewise.
56398         * tests/test-avltree_oset.c: Likewise.
56399         * tests/test-avltreehash_list.c: Likewise.
56400         * tests/test-carray_list.c: Likewise.
56401         * tests/test-copy-acl.c: Likewise.
56402         * tests/test-copy-file.c: Likewise.
56403         * tests/test-exclude.c: Likewise.
56404         * tests/test-fchownat.c: Likewise.
56405         * tests/test-fdopendir.c: Likewise.
56406         * tests/test-filenamecat.c: Likewise.
56407         * tests/test-fstatat.c: Likewise.
56408         * tests/test-fstrcmp.c: Likewise.
56409         * tests/test-linked_list.c: Likewise.
56410         * tests/test-linkedhash_list.c: Likewise.
56411         * tests/test-mkdirat.c: Likewise.
56412         * tests/test-nonblocking-pipe-main.c: Likewise.
56413         * tests/test-nonblocking-socket-main.c: Likewise.
56414         * tests/test-obstack-printf.c: Likewise.
56415         * tests/test-openat.c: Likewise.
56416         * tests/test-parse-datetime.c: Likewise.
56417         * tests/test-pipe-filter-gi1.c: Likewise.
56418         * tests/test-pipe-filter-gi2-main.c: Likewise.
56419         * tests/test-pipe-filter-ii1.c: Likewise.
56420         * tests/test-pipe-filter-ii2-main.c: Likewise.
56421         * tests/test-quotearg-simple.c: Likewise.
56422         * tests/test-quotearg.c: Likewise.
56423         * tests/test-rbtree_list.c: Likewise.
56424         * tests/test-rbtree_oset.c: Likewise.
56425         * tests/test-rbtreehash_list.c: Likewise.
56426         * tests/test-sameacls.c: Likewise.
56427         * tests/test-set-mode-acl.c: Likewise.
56428         * tests/test-spawn-pipe-main.c: Likewise.
56429         * tests/test-system-quote-main.c: Likewise.
56430         * tests/test-unlinkat.c: Likewise.
56431         * tests/test-version-etc.c: Likewise.
56432         * tests/test-xalloc-die.c: Likewise.
56433         * tests/test-xfprintf-posix.c: Likewise.
56434         * tests/test-xmemdup0.c: Likewise.
56435         * tests/test-xprintf-posix.c: Likewise.
56436         * tests/test-xvasprintf.c: Likewise.
56437         * tests/uniname/test-uninames.c: Likewise.
56438         * tests/uninorm/test-u32-nfc-big.c: Likewise.
56439         * tests/uninorm/test-u32-nfd-big.c: Likewise.
56440         * tests/uninorm/test-u32-nfkc-big.c: Likewise.
56441         * tests/uninorm/test-u32-nfkd-big.c: Likewise.
56442         * tests/unistdio/test-u16-vsnprintf1.c: Likewise.
56443         * tests/unistdio/test-u16-vsprintf1.c: Likewise.
56444         * tests/unistdio/test-u32-vsnprintf1.c: Likewise.
56445         * tests/unistdio/test-u32-vsprintf1.c: Likewise.
56446         * tests/unistdio/test-u8-vsnprintf1.c: Likewise.
56447         * tests/unistdio/test-u8-vsprintf1.c: Likewise.
56448         * tests/unistdio/test-ulc-vsnprintf1.c: Likewise.
56449         * tests/unistdio/test-ulc-vsprintf1.c: Likewise.
56450         * tests/test-c-stack.c: (program_name): Do not define.
56451         (main): Do not set program_name.
56452         * tests/test-closein.c: Likewise.
56453         * tests/test-xstrtol.c: Likewise.
56454         * tests/test-yesno.c: Likewise.
56456 2016-08-18  Pino Toscano  <ptoscano@redhat.com>
56458         Port modules to use getprogname explicitly, instead of requiring
56459         progname to be used (or program_name to be provided).
56460         * lib/argmatch.c: Do not include progname.h.
56461         [TEST] (program_name): Do not define.
56462         [TEST] (main): Call getprogname instead of using program_name.
56463         * lib/c-stack.c: Do not include progname.h.
56464         (program_name): Do not define.
56465         (die): Call getprogname instead of using program_name.
56466         * lib/chdir-long.c: Do not include progname.h.
56467         [TEST_CHDIR] (main): Do not set program_name.
56468         * lib/error.c [!_LIBC]: Include progname.h.
56469         [!_LIBC] (program_name): Define using getprogname.
56470         * lib/euidaccess.c: Do not include progname.h.
56471         [TEST] (main): Do not set program_name.
56472         * lib/git-merge-changelog.c: Include getprogname.h instead of
56473         progname.h.
56474         (usage): Call getprogname instead of using program_name.
56475         (main): Likewise.  Stop calling set_program_name.
56476         * lib/group-member.c: Do not include progname.h.
56477         [TEST] (main): Do not set program_name.
56478         * modules/argmatch (Depends-on): Add getprogname.
56479         * modules/c-stack (Depends-on): Likewise.
56480         * modules/error (Depends-on): Likewise.
56481         * modules/git-merge-changelog (Depends-on): Likewise.
56482         Also remove progname.
56484 2016-09-05  Pino Toscano  <ptoscano@redhat.com>
56486         * NEWS: Document the deprecation of the 'progname' module.
56488 2016-08-18  Pino Toscano  <ptoscano@redhat.com>
56490         getprogname: new module
56491         This provides a LGPL module for getting the name of the current
56492         program, using the same API found on *BSD systems.
56493         * lib/getprogname.c, lib/getprogname.h, m4/getprogname.m4:
56494         * modules/getprogname: New files.
56495         * MODULES.html.sh (Misc): Add getprogname.
56497 2016-09-02  Jim Meyering  <meyering@fb.com>
56499         manywarnings: add -fno-common
56500         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -fno-common
56501         to the list.  Quoting the manual, "Compiling with -fno-common is
56502         useful on targets for which it provides better performance, or if
56503         you wish to verify that the program will work on other systems that
56504         always treat uninitialized variable declarations this way [putting
56505         it in the data section]."  If diffutils had been using this sooner,
56506         it would have prevented this duplicate declaration issue:
56507         http://git.sv.gnu.org/cgit/diffutils.git/commit/?id=v3.4-10-gc2dc91f
56509 2016-08-31  Simon Josefsson  <simon@josefsson.org>
56511         parse-datetime: Fix typo.
56512         * lib/parse-datetime.y (parse_datetime2): Fix typo.
56514 2016-08-30  Paul Eggert  <eggert@cs.ucla.edu>
56516         intprops: tune INT_NEGATE_OVERFLOW for GCC 5 and 6
56517         * lib/intprops.h (INT_NEGATE_OVERFLOW): Tune for platforms like
56518         GCC 5 and 6 that have __builtin_sub_overflow but not
56519         __builtin_sub_overflow_p.  With the recent changes, these
56520         platforms are a tiny bit faster with the INT_NEGATE_RANGE_OVERFLOW
56521         implementation than with INT_SUBTRACT_OVERFLOW implementation,
56522         since the former needs just one runtime comparison whereas the
56523         latter needs two.
56525         strverscmp: sync with glibc
56526         Although this doesn't exactly synchronize with glibc
56527         byte-for-byte, it makes the code behave the same as glibc.
56528         * lib/strverscmp.c (S_I, S_F, S_Z): Now masks, not powers of 2.
56529         (ISDIGIT): Remove, as glibc is sticking with isdigit, and the
56530         difference shouldn't matter in practical use.  All uses changed
56531         back to isdigit.
56532         (__strverscmp, strverscmp): Use new glibc method for weak aliases.
56533         (next_state): Now unsigned char array; redo elements.
56534         (result_type): Now signed char array; redo elements.
56535         (__strverscmp): Fix glibc bug 9913 by using new states.
56536         * tests/test-strverscmp.c (main): Test glibc bug 9913.
56538 2016-08-29  Jim Meyering  <meyering@fb.com>
56540         xalloc-oversized.h: port __builtin_mul_overflow change to GCC 6.2.0
56541         * lib/xalloc-oversized.h: Port this change to GCC 6.2.0, too,
56542         similarly to how it was done to intprops.h.
56544 2016-08-29  Paul Eggert  <eggert@cs.ucla.edu>
56546         intprops.h: port recent changes to GCC 6.2.0
56547         * lib/intprops.h (__has_builtin): Move earlier.
56548         (_GL_HAS_BUILTIN_OVERFLOW): Rename from
56549         _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL and don't worry about whether
56550         the last argument can be null.  All uses changed.
56551         (_GL_HAS_BUILTIN_OVERFLOW_P): Also test __has_builtin.
56552         (_GL_ADD_OVERFLOW, _GL_SUBTRACT_OVERFLOW, _GL_MULTIPLY_OVERFLOW):
56553         Don't try to use 3rd arg null, as this doesn't work on GCC 6.2.0
56554         and it's not clear which GCC versions it works for.
56555         (_GL_INT_OP_WRAPV): Use _GL_HAS_BUILTIN_OVERFLOW instead of
56556         its definiens.
56558         intprops.h: use __typeof__ with GCC 7
56559         * lib/intprops.h (_GL_ADD_OVERFLOW, _GL_SUBTRACT_OVERFLOW)
56560         (_GL_MULTIPLY_OVERFLOW): Use __typeof__ as in the GCC manual.
56561         This avoids computing the expression's value (which might overflow!).
56563 2016-08-29  Jim Meyering  <meyering@fb.com>
56565         intprops.h, xalloc-oversized.h: work with gcc 7
56566         In gcc 6, __builtin_add_overflow, __builtin_sub_overflow and
56567         __builtin_mul_overflow each accept a NULL pointer as the third
56568         argument.  However in gcc 7, that is no longer accepted.
56569         Instead, one must use the "_p"-suffixed names, with which, the
56570         third parameter is no longer a pointer.
56571         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW_WITH_NULL): Correct
56572         the definition: not true for gcc 7 and subsequent.
56573         (_GL_HAS_BUILTIN_OVERFLOW_P): Define.
56574         (_GL_ADD_OVERFLOW, _GL_SUBTRACT_OVERFLOW, _GL_MULTIPLY_OVERFLOW):
56575         Provide new definitions for gcc 7 and subsequent.
56576         * lib/xalloc-oversized.h (xalloc_oversized): Provide a definition
56577         that works with gcc-7.
56579         intprops.h: fix missing-backslash problems
56580         * lib/intprops.h (_GL_ADD_OVERFLOW): Add backslash.
56581         (_GL_SUBTRACT_OVERFLOW,_GL_MULTIPLY_OVERFLOW): Likewise.
56583 2016-08-24  Paul Eggert  <eggert@cs.ucla.edu>
56585         intprops: fix paren typo on old platforms
56586         Problem reported by John E. Malmberg in: https://bugs.gnu.org/24300#13
56587         * lib/intprops.h (_GL_INT_OP_WRAPV_LONGISH)
56588         [__GNUC__ < 5 && !__has_builtin (__builtin_add_overflow)
56589         && (__STDC_VERSION__ < 201112 || _GL__GENERIC_BOGUS)
56590         && !defined LLONG_MAX]:
56591         Remove stray paren.
56593         intprops: port to OpenVMS
56594         Problem reported by John E. Malmberg in: https://bugs.gnu.org/24300
56595         * doc/posix-headers/limits.texi: Document the problem.
56596         * lib/intprops.h (LLONG_MAX, LLONG_MIN) [__INT64_MAX]:
56597         Define if not already defined.
56599 2016-08-19  Assaf Gordon  <assafgordon@gmail.com>
56601         parse-datetime: improve debug implementation
56602         Follow-up to commit 12ad79069 ("add optional debug printing").
56603         Improve parse-datetime's debug implementation: remove macros,
56604         replace global debug flag variable with a function parameter,
56605         use nstrftime for formatting.
56606         See: https://lists.gnu.org/r/bug-gnulib/2016-08/msg00021.html
56607         * lib/parse-datetime.h: (parse_datetime_debug): Remove global extern.
56608         (parse_datetime2): New function, accepts 'flags' parameter, supporting
56609         debug flag. Existing interface 'parse_datetime' left unmodified.
56610         * lib/parse-datetime.c: (parse_datetime_debug): Remove global variable.
56611         (struct parser_control): add 'parse_datetime_debug' member variable.
56612         (parse_datetime): Call new function 'parse_datetime2' without debug.
56613         (parse_datetime2): Adapted from previous 'parse_datetime', initialize
56614         pc.parse_datetime_debug variable as needed.
56615         (to_year): Accept new flags parameter, instead of using global variable.
56616         (debug_print_current_time,debug_print_relative_time,debug_mktime_not_ok):
56617         use struct 'debug' variable instead of global variable.
56618         (DEBUG,DEBUG_PRINT_CURRENT_TIME,DEBUG_PRINT_RELATIVE_TIME,
56619         DEBUG_MKTIME_NOT_OK,PROGRESS,PROGRESS0): Remove macros. Call
56620         correspnding functions directly instead of using macros.
56621         * modules/parse-datetime: Add gnulib's strftime module.
56623 2016-08-19  Daniel Richard G.  <skunk@iSKUNK.ORG>
56625         c-strcase-tests: port to EBCDIC
56626         * tests/test-c-strncasecmp.c: Allow two c_strncasecmp calls
56627         which assume ASCII encoding semantics to run only in ASCII
56628         mode, as they fail in EBCDIC.
56630         sigpipe-tests: fix typo
56631         * tests/test-sigpipe.sh: C, not B.
56633 2016-08-18  Paul Eggert  <eggert@cs.ucla.edu>
56635         canonicalize-lgpl: fix errno after malloca fails
56636         This fixes a typo I recently introduced.  Suggested by Bruno Haible in:
56637         http://lists.gnu.org/r/bug-gnulib/2016-08/msg00039.html
56638         * lib/canonicalize-lgpl.c (__realpath):
56639         Don't assume malloca sets errno on failure.
56641 2016-08-17  Paul Eggert  <eggert@cs.ucla.edu>
56643         strtod: port errno handling to z/OS
56644         * lib/strtod.c (strtod): Save and restore errno more reliably.
56646 2016-08-17  Daniel Richard G.  <skunk@iSKUNK.ORG>
56648         strtod: port to z/OS
56649         * lib/strtod.c (strtod): Address a couple quirks in the z/OS
56650         implementation.
56652 2016-08-17  Paul Eggert  <eggert@cs.ucla.edu>
56654         strtod: port to z/OS
56655         * lib/strtod.c (strtod): Address a couple quirks in the z/OS
56656         implementation.
56658         regex, string: rename to avoid '__string'
56659         * lib/regex.h, lib/string.in.h: Do not use the identifier
56660         '__string', as it is effectively reserved by string.h on z/OS.
56662         c-strcase-tests, wcwidth-tests: depend on c-ctype
56663         * modules/c-strcase-tests, modules/wcwidth-tests (Depends-on):
56664         Add c-ctype.
56666 2016-08-17  Daniel Richard G.  <skunk@iSKUNK.ORG>
56668         thread: port to z/OS
56669         * lib/glthread/thread.c, lib/glthread/thread.h:
56670         Rudimentary gl_thread support for z/OS.
56672         maint: port tests to z/OS errno behavior
56673         * tests/test-nonblocking-reader.h:
56674         * tests/test-nonblocking-writer.h:
56675         Accommodate z/OS errno code preferences. (I believe this should
56676         still be within spec; IBM is good at following the letter if not
56677         the spirit of such things.)
56679         maint: preprocessor changes to support z/OS
56680         * lib/alloca.in.h, lib/fnmatch.c, lib/get-rusage-as.c:
56681         * lib/glob.c, lib/math.in.h, lib/ptsname_r.c:
56682         * tests/infinity.h, tests/nan.h, tests/test-canonicalize-lgpl.c:
56683         * tests/test-nonblocking-pipe.h:
56685         fclose, strstr-simple, wchar: port to z/OS
56686         * m4/fclose.m4, m4/strstr.m4, m4/wchar_h.m4:
56687         Changes to the Autoconf M4 code to support z/OS.  Note that
56688         fclose() is broken in a different way on z/OS than it is on other
56689         systems, thus the special-case in fclose.m4.
56691         iconv_open-utf-tests, iconv-tests: port to EBCDIC
56692         * tests/test-iconv-utf.c, tests/test-iconv.c:
56693         Added appropriately conditional #pragmas so that the test strings
56694         in test-iconv-utf.c are correctly interpreted in ASCII instead of
56695         EBCDIC (i.e. 'J' == 0x4A and not 0xD1). This issue could be
56696         addressed in a more portable way by simply rewriting all the ASCII
56697         literal characters as octal escapes, but then you would lose the
56698         partial readability that the strings have now. Also, iconv_open()
56699         on z/OS does not recognize "ISO-8859-1", but "ISO8859-1" works.
56701         c-strcase-tests, wcwidth-tests: port to EBCDIC
56702         * tests/test-c-strcasecmp.c: Include c-ctype.h.
56703         (main) [!C_CTYPE_ASCII]: Skip tests that assume ASCII.
56704         * tests/test-wcwidth.c: Likewise.
56706 2016-08-17  Paul Eggert  <eggert@cs.ucla.edu>
56708         stdbool: don't require _Bool for C++
56709         Problem reported by David Seifert in:
56710         http://lists.gnu.org/r/bug-gnulib/2016-06/msg00005.html
56711         * NEWS, doc/posix-headers/stdbool.texi (stdbool.h): Document this.
56712         * m4/stdbool.m4 (AC_CHECK_HEADER_STDBOOL): Make the check
56713         more-forgiving for C++, in that it requires only 'bool'.  Be a bit
56714         stricter about checking that bool and _Bool are compatible in C.
56716 2016-08-16  Paul Eggert  <eggert@cs.ucla.edu>
56718         getdelim: remove dependency on realloc-posix
56719         * lib/canonicalize-lgpl.c (alloc_failed)
56720         [!FUNC_REALPATH_WORKS || defined _LIBC]: New function,
56721         (__realpath) [!FUNC_REALPATH_WORKS || defined _LIBC]: Use it.
56722         Use __set_errno where needed, for consistency.
56723         * lib/getdelim.c (alloc_failed): New function.
56724         (getdelim): Use it.
56726 2016-08-09  Assaf Gordon  <assafgordon@gmail.com>
56728         parse-datetime: add optional debug printing
56729         Print parsing information, warnings, and errors to stderr.
56730         * lib/parse-datetime.h (parse_datetimte_debug): New global variable.
56731         * lib/parse-datetime.y:
56732         (DEBUG_*):  Macros calling debug functions if debugging is enabled.
56733         (PROGRESS*): Same as DEBUG, for progress reporting.
56734         (dbg_printf): Print message to stderr, with 'date' prefix.
56735         (struct parser_control): Add 'debug_*_seen' variables.
56736         (str_days): Converts day ordinal/number to string (e.g. 'last wed').
56737         (debug_print_current_time, debug_print_relateive_time): Prints the
56738         current/relative date/time value of parser_control.
56739         (YACC parser syntax): Print parsed parts with DEBUG_* macros.
56740         (to_year): Warn about 2-digit year parsing.
56741         (yylex):   Warn about unrecognized words.
56742         (get_effective_timezone): Returns current timezone in minutes.
56743         (debug_strf{time,date,datetime}): Convert 'struct tm' to string as
56744         clearly and unambigiously as possible.
56745         (debug_mktime_not_ok): Print detailed information about failed
56746         date/time values.
56747         (parse_datetime): Add DEBUG messages for failures, warnings. Add
56748         PROGRESS messages for status messages.
56749         * modules/parse-datetime: Add 'timegm', 'gettext-h' dependencies.
56751 2016-08-06  Jim Meyering  <meyering@fb.com>
56753         tests/init.sh: exclude dash with bad "local" semantics
56754         * tests/init.sh (gl_shell_test_script_): Add a function to
56755         eliminate a shell like "dash" (unlike bash, zsh) that has
56756         surprising/risky "local var='...'" semantics.  Inspired by
56757         the problem and discussion in https://bugs.gnu.org/24116#11.
56759 2016-08-02  Ján Tomko  <jtomko@redhat.com>
56761         maint.mk: expand the prohibit_doubled_word regex
56762         This check has a static list of words that are checked for
56763         repetitions.  Expand it before running the perl script to
56764         avoid using expensive captures.  This decreases the cost
56765         for libvirt from 1.66s to 0.66s.
56766         * top/maint.mk (prohibit_doubled_word_expanded_): Define.
56767         (sc_prohibit_doubled_word): Use it.
56769 2016-07-26  Ján Tomko  <jtomko@redhat.com>
56771         useless-if-before-free: skip non-matching lines early
56772         * build-aux/useless-if-before-free: First match each line with the
56773         simple/quick /\bif\b/ and reject if there is no match. This often
56774         saves the cost of the much more involved regular expression.
56775         For libvirt, this decreases the cost from 1.44s to 1.02s.
56777 2016-07-26  Ján Tomko  <jtomko@redhat.com>
56779         maint.mk: speed up sc_po_check
56780         sc_po_check would skip files based on their names, or on the
56781         existence of files with derived names. Rewrite it to use perl
56782         instead of shell to make the check faster.
56783         * top/maint.mk (perl_translatable_files_list_): Define.
56784         (sc_po_check): Use it.
56786 2016-07-30  Ján Tomko  <jtomko@redhat.com>
56788         maint.mk: speed up require_config_h_first
56789         Instead of spawning three processes per file,
56790         rewrite the check in perl and run it once for all the files.
56791         * top/maint.mk (perl_config_h_first_): Define.
56792         (sc_require_config_h_first): Use it in place of shell code.
56794 2016-07-26  Ján Tomko  <jtomko@redhat.com>
56796         maint.mk: speed up sc_po_check
56797         sc_po_check would skip files based on their names, or on the
56798         existence of files with derived names. Rewrite it to use perl
56799         instead of shell to make the check faster.
56800         * top/maint.mk (perl_translatable_files_list_): Define.
56801         (sc_po_check): Use it.
56803 2016-07-15  Paul Eggert  <eggert@cs.ucla.edu>
56805         obstack: pacify GCC 6 with -Wnull-dereference
56806         Problem reported by Assaf Gordon in:
56807         http://lists.gnu.org/r/bug-gnulib/2016-07/msg00028.html
56808         * lib/obstack.c, lib/obstack.h (obstack_alloc_failed_handler):
56809         Declare with __attribute_noreturn__.
56810         * lib/obstack.h (__attribute_noreturn__): New macro.
56812 2016-07-13  Eric Blake  <eblake@redhat.com>
56814         doc: mention glibc, OS X, Cygwin [S]SIZE_MAX buglet
56815         * doc/posix-headers/stdint.texi (stdint.h): Document the bugs.
56816         * doc/posix-headers/limits.texi (limits.h): Document the bugs.
56818 2016-07-13  Paul Eggert  <eggert@cs.ucla.edu>
56820         doc: mention glibc SSIZE_MAX buglet
56821         * doc/posix-headers/limits.texi (limits.h): Document the bug.
56823 2016-07-04  Martin Kletzander  <mkletzan@redhat.com>
56825         printf-posix: Fix mingw build
56826         Commit 54615b95ff238e235e806855efc46a9abad09f2e changed the regular
56827         expression for detecting C symbol prefixes but forgot to qoute square
56828         brackets in the command line arguments for grep.  That way when
56829         building with mingw the condition was false although it ought to be
56830         true instead.  In particular scenarios this led to the following
56831         compile error:
56833             Cannot export rpl_printf: symbol not found
56834             Cannot export rpl_scanf: symbol not found
56835             collect2: error: ld returned 1 exit status
56837         Fix this by properly quoting square brackets.
56839 2016-07-03  Paul Eggert  <eggert@cs.ucla.edu>
56841         mktime: call tzset as per POSIX
56842         Problem reported by Ludovic Courtès in:
56843         http://lists.gnu.org/r/bug-gnulib/2016-06/msg00068.html
56844         * lib/mktime.c (mktime) [!_LIBC && HAVE_TZSET]: Call tzset.
56845         * m4/mktime.m4 (gl_FUNC_MKTIME): Check for tzset.
56847 2016-06-26  Pádraig Brady  <P@draigBrady.com>
56849         fts: handle readdir() errors
56850         * lib/fts.c (fts_build): readdir(3) returns NULL when finished,
56851         but also upon error when it will also set errno.  Therefore
56852         flag the error case from readdir().  We treat the case where
56853         no items are read the same as if the dir can't be accessed,
56854         i.e. by setting fts_errno to FTS_DNR.
56856 2016-06-24  Paul Eggert  <eggert@cs.ucla.edu>
56858         intprops: port better to GCC 7
56859         GCC 7 __builtin_add_overflow supports a new usage form, where the
56860         last argument is a null pointer, and which merely returns 1 if an
56861         overflow would occur.  This is a constant expression if all
56862         arguments are constants, and should generate faster code when code
56863         needs to be generated.
56864         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW_WITH_NULL): New macro.
56865         (_GL_ADD_OVERFLOW, _GL_SUBTRACT_OVERFLOW, _GL_MULTIPLY_OVERFLOW):
56866         Use builtin operations if available.
56867         (INT_NEGATE_OVERFLOW): Prefer INT_SUBTRACT_OVERFLOW if builtin
56868         operations are available, as it's almost surely faster.
56870 2016-06-23  Paul Eggert  <eggert@cs.ucla.edu>
56872         intprops-test: port to GCC 6
56873         * tests/test-intprops.c: Ignore -Woverflow if any GCC version,
56874         since the bug is not fixed in GCC 6.1.
56876 2016-06-13  Paul Eggert  <eggert@cs.ucla.edu>
56878         xalloc-oversized: port to GCC 7; fewer warnings
56879         GCC 7 will have a better way to deal with integer overflow.
56880         Plus, fix a warnings problem reported by Tim Ruehsen in:
56881         http://lists.gnu.org/r/bug-gnulib/2016-06/msg00022.html
56882         * lib/xalloc-oversized.h (__xalloc_oversized): New macro.
56883         (xalloc_oversized): Use plain __builtin_mul_overflow if GCC 7 or later.
56884         For GCC 5, use __xalloc_oversized if both args are constants,
56885         or if pedantic.
56887 2016-06-08  Paul Eggert  <eggert@cs.ucla.edu>
56889         regex: port to Sun C
56890         Reported by Daiki Ueno.
56891         * lib/regcomp.c (regcomp, regerror): Use _Restrict_, not
56892         __restrict, in prototype.  This fixes a problem I introduced in
56893         the 2016-02-19 merge from glibc.
56895 2016-05-31  Paul Eggert  <eggert@cs.ucla.edu>
56897         stdbool: Restore __bool_true_false_are_defined check
56898         * m4/stdbool.m4 (AC_CHECK_HEADER_STDBOOL):
56899         __bool_true_false_are_defined is still defined, even with C++11.
56901 2016-05-31  David Seifert  <soap@gentoo.org>  (tiny change)
56903         stdbool: Port AC_CHECK_HEADER_STDBOOL to C++11
56904         * m4/stdbool.m4 (AC_CHECK_HEADER_STDBOOL): Port to C++11.
56906 2016-05-30  Paul Eggert  <eggert@cs.ucla.edu>
56908         Use GCC_LINT, not lint
56909         FreeBSD and Cygwin #define _Noreturn to empty if 'lint' is defined.
56910         Problem reported by Ken Brown in: http://bugs.gnu.org/23640
56911         * doc/posix-headers/stdnoreturn.texi (stdnoreturn.h):
56912         Document problem with lint and _Noreturn.
56913         * lib/diffseq.h (IF_LINT, IF_LINT2):
56914         * lib/fts.c (sccsid):
56915         * lib/getndelim2.c (IF_LINT):
56916         * lib/gl_anylinked_list2.h (gl_linked_iterator)
56917         (gl_linked_iterator_from_to):
56918         * lib/gl_anytree_list2.h (gl_tree_iterator)
56919         (gl_tree_iterator_from_to):
56920         * lib/gl_anytree_oset.h (gl_tree_iterator):
56921         * lib/gl_array_list.c (gl_array_iterator)
56922         (gl_array_iterator_from_to):
56923         * lib/gl_array_oset.c (gl_array_iterator):
56924         * lib/gl_carray_list.c (gl_carray_iterator)
56925         (gl_carray_iterator_from_to):
56926         * lib/idcache.c:
56927         * lib/inet_ntop.c (IF_LINT):
56928         * lib/regcomp.c (build_charclass_op, create_tree):
56929         * lib/regex_internal.c (re_acquire_state)
56930         (re_acquire_state_context):
56931         * lib/trigl.c (rcsid):
56932         * lib/trim.c (IF_LINT):
56933         * lib/vasnprintf.c (IF_LINT):
56934         * lib/verify.h (assume):
56935         Treat GCC_LINT like lint.
56937 2016-05-29  Bruno Haible  <bruno@clisp.org>
56939         secure_getenv: Port to many more platforms.
56940         * m4/secure_getenv.m4 (gl_PREREQ_SECURE_GETENV): Also check for get*id
56941         functions.
56942         * lib/secure_getenv.c (secure_getenv): Add alternate implementations
56943         for non-BSD Unix platforms and for native Windows.
56944         * doc/glibc-functions/secure_getenv.texi: Remove known issue.
56945         Prompted by a request from Nikos Mavrogiannopoulos.
56947 2016-05-27  Eric Blake  <eblake@redhat.com>
56949         canonicalize: Fix broken probe for realpath.
56950         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Fix regression
56951         in logic introduced in 54615b95.
56953 2016-05-26  Eric Blake  <eblake@redhat.com>
56955         unsetenv: relax to LGPLv2+
56956         * modules/unsetenv (License): Match setenv license.
56958 2016-05-20  Ludovic Courtès  <ludo@gnu.org>
56960         gendocs.sh: Set default TOP_NODE_UP_URL in HTML output.
56961         Suggested by Gavin Smith <gavinsmith0123@gmail.com>.
56962         Reported by myglc2 <myglc2@gmail.com> in <http://bugs.gnu.org/22651>.
56963         * build-aux/gendocs.sh (MANUAL_TITLE, PACKAGE, EMAIL)
56964         (commonarg, dirargs, dirs, infoarg, generate_ascii)
56965         (generate_html, generate_info, generate_tex, outdir)
56966         (source_extra, split, srcfile, texarg): Move above 'version'.
56967         (htmlarg): Likewise, and add "-c TOP_NODE_UP_URL=/manual".
56969 2016-05-17  Paul Eggert  <eggert@cs.ucla.edu>
56971         manywarnings: update for GCC 6.1
56972         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC):
56973         Add GCC 6.1 options that apply to C.
56974         * build-aux/gcc-warning.spec: Add GCC 6.1 options that
56975         do not apply to C, are obsolescent, etc.
56977 2016-05-12  Paul Eggert  <eggert@cs.ucla.edu>
56979         glob: size_t overflow checks
56980         * lib/glob.c (__has_builtin): New macro.
56981         (size_add_wrapv, glob_use_alloca): New static functions.
56982         (glob, glob_in_dir): Check for size_t overflow in several places,
56983         and fix some size_t checks that were not quite right.
56985         glob: don't assume INT_MAX < SIZE_MAX
56986         * lib/glob.c (glob): Prefer SIZE_MAX to ~((size_t) 0), as the
56987         latter is not portable to (probably theoretical) hosts where
56988         SIZE_MAX <= INT_MAX.
56990 2016-05-09  Bruno Haible  <bruno@clisp.org>
56992         Fix undefined behaviour in gettext.h.
56993         * lib/gettext.h (dcpgettext_expr, dcnpgettext_expr): Avoid accessing a
56994         pointer's value after the storage it points to has been freed.
56995         Reported by Michael Pyne in https://savannah.gnu.org/bugs/?47847.
56996         Spotted by Coverity.
56998 2016-05-08  Paul Eggert  <eggert@cs.ucla.edu>
57000         git-version-gen: avoid undefined shift
57001         Problem reported by Mosè Giordano in:
57002         http://lists.gnu.org/r/bug-gnulib/2016-05/msg00012.html
57003         * build-aux/git-version-gen: Avoid undefined behavior if invoked
57004         with --prefix or --fallback but without a later argument.  While
57005         we're at it, omit unnecessary quotes.
57007 2016-05-04  Paul Eggert  <eggert@cs.ucla.edu>
57009         glob: merge glibc changes into lib/glob.c
57010         * lib/glob.c (glob_in_dir): Sync with glibc/posix/glob.c,
57011         dated 2016-05-04 12:09:35 2016 +0200.  Here are the changes:
57012         2016-05-04 CVE-2016-1234: glob: Do not copy d_name field of
57013           struct dirent [BZ #19779]
57014         2016-04-29 glob: Simplify the interface for the GLOB_ALTDIRFUNC
57015           callback gl_readdir
57016         2015-10-20 Convert miscellaneous function definitions to prototype style
57017         2015-10-20 Convert 113 more function definitions to prototype style
57018           (files with assertions)
57019         2015-06-12 Fix getlogin_r namespace (bug 18527).
57020         2014-02-10 Use glibc_likely instead __builtin_expect.
57021         2013-10-20 When glob pattern contains a trailing slash match only
57022           directories. Fixes bug 10278.
57023         2013-09-04 glob: silence -Wattribute warnings
57024         2013-06-07 Avoid use of "register" as optimization hint.
57025         2012-09-25 Use size_t instead of int for internal variables in glob
57026           (bug 14621)
57027         2011-07-20 Check for overflows in expressions
57028         2011-05-28 Remove unused variable
57029         2011-05-22 Add a few more alloca size checks
57030         2010-03-27 Whitespace fixes
57031         2010-03-27 Fix one more issue with the glob patch
57032         2010-03-24 Fix glob with empty pattern
57033         2008-05-27 Remove useless more "if" tests before "free"
57034         * modules/glob (Depends-on): Add stdint.
57036 2016-05-01  Paul Eggert  <eggert@cs.ucla.edu>
57038         mktime: port to stricter signed overflow checking
57039         * lib/mktime.c: Omit 'pragma GCC optimize ("wrapv")'.
57040         (long_int): Require width for INT_MAX * 3 * (seconds per year),
57041         instead of merely for INT_MAX * 2.  In practice platforms that
57042         do the latter also do the former.
57043         (TIME_T_MIN, TIME_T_MAX, TIME_T_MIDPOINT, SHR): Remove.
57044         (shr): New static function, replacing SHR.  All uses changed.
57045         (mktime_min, mktime_max): New constants, replacing TIME_T_MIN
57046         and TIME_T_MAX.  All uses changed.
57047         (ydhms_diff, guess_time_tm, ranged_convert, __mktime_internal):
57048         Use long_int, not time_t.
57049         (long_int_avg): New static function, replacing time_t_avg.
57050         All uses changed.  Round toward positive infinity, as that
57051         generates slightly better code.
57052         (time_t_add_ok, time_t_int_add_ok): Remove.  All uses replaced
57053         by INT_ADD_WRAPV.
57054         (guess_time_tm): Accept time, not a pointer to it.  All uses changed.
57055         (convert_time): New static function.
57056         (ranged_convert): Use it
57057         (ranged_convert): Check for *T out of [mktime_min, mktime_max] range.
57058         Use simpler test for loop exit.
57059         (__mktime_internal): Store negative of guessed offset, to simplify
57060         overflow checking.  Remove no-longer-needed test for small time_t
57061         overflows.
57063         mktime: speed up DEBUG_MKTIME benchmarks
57064         Call tzset just once, at the start, rather than for every test
57065         case.  This lets us measure the CPU cost of mktime as opposed to
57066         that of tzset.  This is relevant when TZ is not set and glibc is
57067         being used.  This speeds up tests by a factor of 40 on my Fedora
57068         23 x86-64 platform.
57069         * lib/mktime.c (main) [DEBUG_MKTIME]: Call localtime at the start,
57070         to call tzset and as a sanity check.  Later on, use localtime_r
57071         instead of localtime.
57073         mktime: resurrect DEBUG_MKTIME testing
57074         * lib/mktime.c [DEBUG_MKTIME]: Do not include <config.h>.
57075         Include <string.h>, for strcmp.
57077         mktime: simplify DEBUG_MKTIME
57078         * lib/mktime.c (DEBUG_MKTIME): Define to 0 if not defined.
57079         Simplify later usage accordingly.
57081         Port mktime_internal offset to unsigned time_t
57082         This avoids some assumptions about wraparound arithmetic on
57083         signed integer overflow.
57084         * lib/mktime-internal.h (mktime_offset_t): New type.
57085         (mktime_internal): Use it in decl.
57086         * lib/mktime.c, lib/timegm.c (mktime_offset_t) [_LIBC]: New type.
57088         * lib/mktime.c (__mktime_internal, localtime_offset):
57089         * lib/timegm.c (timegm): Use it.
57090         * m4/mktime.m4 (gl_TIME_T_IS_SIGNED): New macro.
57091         (gl_FUNC_MKTIME): Require it.
57093 2016-04-27  Paul Eggert  <eggert@cs.ucla.edu>
57095         xstrtol: prohibit monstrosities like "1bB"
57096         Problem reported by Young Mo Kang in: http://bugs.gnu.org/23388
57097         * lib/xstrtol.c (__xstrtol): Allow trailing second suffixes like
57098         "B" only if the first suffix needs a base.
57099         * tests/test-xstrtol.sh: Test this.
57101 2016-04-21  Pádraig Brady  <P@draigBrady.com>
57103         xstrtod: reinstate setting of *result upon ERANGE
57104         * lib/xstrtod.c (XSTRTOD): The user may decide to use
57105         the returned limits upon ERANGE, so allow and document that.
57107 2016-04-20  Tino Calancha  <f92capac@gmail.com>  (tiny change)
57109         xstrtod: modify *result only if no errors
57110         * lib/xstrtod.c (XSTRTOD).
57112 2016-04-19  Paul Eggert  <eggert@cs.ucla.edu>
57114         btowc: document problems in C locale
57115         * doc/posix-functions/btowc.texi (btowc): Mention incompatibility
57116         with mbrtowc.  See: http://bugs.gnu.org/23269#32
57118 2016-04-13  Paul Eggert  <eggert@cs.ucla.edu>
57120         mktime: improve integer overflow checking
57121         * lib/mktime.c: Include stdbool.h, intprops.h, verify.h.
57122         (WRAPV): Remove; no longer needed.
57123         (verify): Remove.  Replace all uses with call to verify.h 'verify'.
57124         (TYPE_IS_INTEGER, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
57125         Remove.  Use intprops.h defns instead.
57126         (leapyear, isdst_differ, time_t_add_ok, time_t_int_ok):
57127         Use bool for Boolean, for clarity.
57128         (time_t_add_ok, time_t_int_add_ok): Use INT_ADD_WRAPV to
57129         detect integer overflow.
57130         * modules/mktime (Depends-on): Add intprops, stdbool, verify.
57132         intprops: check two's complement assumption
57133         Suggested by Eric Blake in:
57134         http://lists.gnu.org/r/bug-gnulib/2016-04/msg00016.html
57135         * lib/intprops.h: Include <verify.h>.  Verify that signed char,
57136         short, int, long, and (if available) long long are two's complement.
57137         * modules/intprops (Depends-on): Add 'verify'.
57139         intprops, mktime, strtol: assume two's complement
57140         These macros were not portable to every conforming C11 ones'
57141         complement platform.  It's not worth the hassle of porting to some
57142         platforms that use ones' complement or signed magnitude, as such
57143         platforms are almost purely theoretical nowadays and porting even
57144         to some of them makes the code harder to review for little
57145         practical benefit.  Problem reported by Florian Weimer in:
57146         https://sourceware.org/ml/libc-alpha/2016-04/msg00295.html
57147         * lib/intprops.h (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT)
57148         (TYPE_SIGNED_MAGNITUDE, _GL_INT_TWOS_COMPLEMENT):
57149         * lib/mktime.c (TYPE_TWOS_COMPLEMENT):
57150         * lib/strtol.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT)
57151         (TYPE_SIGNED_MAGNITUDE):
57152         Remove.  All uses rewritten to assume two's complement, which is
57153         all we can reasonably test nowadays anyway.
57154         * top/maint.mk (_intprops_names): Remove the removed macros.
57156 2016-04-11  Paul Eggert  <eggert@cs.ucla.edu>
57158         stdint: port to strict C11 left shift
57159         * lib/stdint.in.h (_STDINT_MIN, _STDINT_MAX):
57160         Pacify clang -Wshift-negative-value, which should be an issue only
57161         on clang setups where stdint.h does not conform to C11 or to C++11.
57162         Problem reported by Philipp Stephani in: http://bugs.gnu.org/23261
57164 2016-04-09  Paul Eggert  <eggert@penguin.cs.ucla.edu>
57166         mbrtowc: work around glibc bug#19932
57167         Fix mbrtowc so that it never returns -1 in the C locale,
57168         as this conflicts with a future version of POSIX
57169         http://austingroupbugs.net/view.php?id=663#c2738
57170         and causes problems with GNU grep: http://bugs.gnu.org/23234
57171         See glibc bug 19932:
57172         https://sourceware.org/bugzilla/show_bug.cgi?id=19932
57173         * doc/posix-functions/mbrlen.texi (mbrlen):
57174         * doc/posix-functions/mbrtowc.texi (mbrtowc):
57175         Document the glibc bug.
57176         * lib/mbrtowc.c [C_LOCALE_MAYBE_EILSEQ]:
57177         Include hard-locale.h, locale.h.
57178         (rpl_mbrtowc): Work around the C_LOCALE_MAYBE_EILSEQ bug,
57179         if the bug is possible.
57180         * m4/mbrtowc.m4 (gl_MBRTOWC_C_LOCALE): New macro.
57181         (gl_FUNC_MBRTOWC): Use it, and define C_LOCALE_MAYBE_EILSEQ as needed.
57182         * modules/hard-locale (License): Now LGPLv2+, for mbrtowc.
57183         * modules/mbrtowc (Depends-on): Add hard-locale.
57184         * modules/mbrtowc-tests (Files, TESTS): Add tests/test-mbrtowc5.sh.
57185         * tests/test-mbrtowc.c (main): Test for bug fix if arg is '5'.
57186         * tests/test-mbrtowc5.sh: New file.
57188 2016-04-03  Pedro Alves  <palves@redhat.com>
57190         stdint: detect good enough pre-C++11 stdint.h in C++ mode
57191         When gnulib is configured in C++ mode for a system with a working C99
57192         implementation of stdint.h that predates C++11, gnulib ends up
57193         substituting stdint.h anyway.  This works on most targets, but on e.g.,
57194         64-bit MinGW, it doesn't, as gnulib's substitute assumes LP64, while
57195         MinGW is LLP64.  Instead of trying to detect the right types, detect
57196         good-enough-pre-C++11 stdint.h and in such case define
57197         __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS in config.h.
57198         * m4/stdint.m4 (gl_STDINT_H): Always define __STDC_CONSTANT_MACROS
57199         / __STDC_LIMIT_MACROS while checking whether the system stdint.h
57200         conforms to C99.  If it does, check whether it hides symbols
57201         behind the __STDC_{CONSTANT|LIMIT}_MACROS macros.  Then if it
57202         does, define those macros in config.h.
57204 2016-04-03  Paul Eggert  <eggert@cs.ucla.edu>
57206         argp: merge changes from glibc
57207         Among other things, this should fix problems found by a Coverity
57208         scan and reported by Andrei Borzenkov:
57209         http://lists.gnu.org/r/bug-gnulib/2016-01/msg00015.html
57210         http://lists.gnu.org/r/bug-gnulib/2016-01/msg00016.html
57211         * lib/argp-ba.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h:
57212         * lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h:
57213         * lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c:
57214         * lib/argp.h:
57215         Merge changes from glibc.
57216         * tests/test-argp-2.sh: Adjust to match new behavior.
57218 2016-04-01  Paul Eggert  <eggert@cs.ucla.edu>
57220         stddef: support configuring with g++
57221         Problem reported by Ángel González in:
57222         http://lists.gnu.org/r/bug-gnulib/2016-04/msg00003.html
57223         * lib/stddef.in.h (_GL_STDDEF_ALIGNAS, max_align_t):
57224         Do not define if _GCC_MAX_ALIGN_T is defined.
57226 2016-03-25  Paul Eggert  <eggert@cs.ucla.edu>
57228         test-framework-sh: minor cleanups
57229         * tests/init.sh (testdir_prefix_): Output a trailing newline,
57230         since strictly speaking POSIX requires this.
57231         (setup_): Do not use the variable 'fail', as that makes the
57232         trace output harder to read ('fail' is typically used by
57233         tests to mean the test failed).  Treat // portably.
57234         Check that new directory is not merely a sibling of the tmp dir.
57235         Avoid unnecessary invocation of tr.
57237         test-framework-sh: revert port to NetBSD 7.0
57238         It was a false alarm; I misinterpreted Assaf Gordon's report.
57239         * tests/init.sh (testdir_prefix_, pfx_, template_length_):
57240         Restore.
57241         (test_dir_): Adjust to mktempd_ change.
57242         (mktempd_): Restore 2nd arg.  Use -t again.
57243         (base_template_, template_, nx_): Resurrect old code.
57245         Port better to Alpine Linux
57246         Its diff implementation does not support -c, but does support -U3.
57247         Problem reported by Assaf Gordon in: http://bugs.gnu.org/23107#13
57248         * tests/init.sh (diff_opt_): New var.
57249         (compare_): Prefer diff -U3 to diff -c to plain diff.
57251 2016-03-24  Paul Eggert  <eggert@cs.ucla.edu>
57253         test-framework-sh: port to NetBSD 7.0
57254         Problem reported by Assaf Gordon in: http://bugs.gnu.org/23107#13
57255         * tests/init.sh (testdir_prefix_, pfx_, template_length_):
57256         Remove.  All uses removed.
57257         (test_dir_): Adjust to mktempd_ change.
57258         (mktempd_): Omit 2nd arg.  Stop using -t, as it is not portable.
57259         (base_template_, template_, nx_): Simplify by hardcoding.
57261 2016-03-22  Paul Eggert  <eggert@cs.ucla.edu>
57263         gitlog-to-changelog: suppress ignored chatter
57264         * build-aux/gitlog-to-changelog: Do not warn about skipping
57265         an SHA if it would have been ignored anyway.
57267 2016-03-22  Geert Janssens  <janssens-geert@telenet.be>
57269         setlocale: add "sv" to Windows language table
57270         * lib/setlocale.c (language_table) [W32]: Add "sv".
57271         Reported in <https://savannah.gnu.org/bugs/?44588>.
57273 2016-03-21  Paul Eggert  <eggert@cs.ucla.edu>
57275         sys_select: port to new Cygwin
57276         Problem reported by Ken Brown in:
57277         https://lists.gnu.org/r/bug-gnulib/2016-03/msg00054.html
57278         * lib/sys_select.in.h [__CYGWIN__]: Avoid "unknown type name"
57279         diagnostics.
57281 2016-03-17  Jim Meyering  <meyering@fb.com>
57283         test-userspec.c: do not trigger gcc's new -Wmisleading-indentation
57284         * tests/test-userspec.c (main): Remove unnecessary braces and fix
57285         misleading indentation. Here is the diagnostic gcc-6.0-to-be issued:
57286           test-userspec.c:176:9: error: statement is indented as if it were \
57287             guarded by... [-Werror=misleading-indentation]
57288                    {
57289                    ^
57290           test-userspec.c:173:7: note: ...this 'if' clause, but it is not
57291                  if (!diag && !T[i].result)
57292                  ^~
57294 2016-03-15  Paul Eggert  <eggert@cs.ucla.edu>
57296         time_rz: port to clang -Wunused-const-variable
57297         * lib/time_rz.c (TZ): Remove.  All uses removed.
57299         std-gnu11: improve clang support
57300         * m4/std-gnu11.m4: Sync with autoconf, incorporating:
57301         2016-03-15 Also try clang
57302         2016-03-15 Port C11 and C++11 testing to clang
57304         select: port more to Intel 2016.1.150 compiler
57305         Problem reported by Balázs Hajgató in:
57306         http://lists.gnu.org/r/bug-gnulib/2016-03/msg00036.html
57307         * m4/select.m4 (gl_FUNC_SELECT): Require AC_C_RESTRICT.
57309 2016-03-14  Paul Eggert  <eggert@cs.ucla.edu>
57311         select: try to port to 2016.1.150 compiler
57312         Problem reported by Balázs Hajgató in:
57313         http://lists.gnu.org/r/bug-gnulib/2016-03/msg00026.html
57314         * lib/sys_select.in.h (select): Use 'restrict' on arguments where
57315         POSIX specifies 'restrict'.
57317 2016-03-13  Paul Eggert  <eggert@cs.ucla.edu>
57319         localename-tests: memory allocation fixes
57320         * tests/test-localename.c (test_locale_name)
57321         (test_locale_name_thread): Don't call freelocale on a locale
57322         that was the base of a successful newlocale, as that
57323         results in a double free.  Problem reported by Assaf Gordon.
57324         (test_locale_name_thread): Free saved names after use, to pacify
57325         gcc -fsanitize=address.
57327 2016-03-08  Paul Eggert  <eggert@cs.ucla.edu>
57329         intprops: make .h file license match module
57330         * lib/intprops.h: Change the license wording to match glibc format.
57331         This is what is in modules/intprops anyway.  See:
57332         https://sourceware.org/bugzilla/show_bug.cgi?id=19738#c8
57334 2016-03-08  Eric Blake  <eblake@redhat.com>
57336         acl: fix missing return on Cygwin
57337         * lib/set-permissions.c (set_acls) [HAVE_FACL && GETACL]: Don't
57338         fall off end of function. Fixes http://bugs.gnu.org/22949
57340 2016-03-05  Bruno Haible  <bruno@clisp.org>
57342         extern-inline: port to PGI CC
57343         * m4/extern-inline.m4 (gl_EXTERN_INLINE): For PGI CC, don't use the
57344         keyword 'inline'.
57345         Reported by Adam James Stewart in:
57346         http://lists.gnu.org/r/bug-gnulib/2016-03/msg00006.html
57348 2016-02-20  Paul Eggert  <eggert@cs.ucla.edu>
57350         signbit: port back to pre-C++11 GCC
57351         * lib/math.in.h (signbit): Do previous change only if
57352         __cplusplus < 201103.  See Jonathan Wakely in:
57353         https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/UY3VX3W7XEXYTUKHG5BALU4ACUD7ZLGE/
57355 2016-02-19  Kamil Dudka  <kdudka@redhat.com>
57357         mountlist: recognize autofs-mounted remote file systems, too
57358         Originally reported at: https://bugzilla.redhat.com/1309247
57359         * lib/mountlist.c (ME_REMOTE): Return true if a file system is named
57360         "-hosts" because it is used by autofs to mount remote file systems.
57362 2016-02-19  Paul Eggert  <eggert@cs.ucla.edu>
57364         signbit: port to C++ with GCC 6
57365         * lib/math.in.h (signbit) [__cplusplus]:
57366         Do not replace with GCC builtin.  Reported by Orion Poplawski in:
57367         http://lists.gnu.org/r/bug-gnulib/2016-02/msg00005.html
57369         * lib/regex_internal.h (IDX_MAX) [_REGEX_LARGE_OFFSETS]: Now SSIZE_MAX.
57371         regex: make it closer to libc
57372         Make Idx a signed type, rather than possibly unsigned.
57373         The unsignedness was not really buying us anything, since the code
57374         overflows for other reasons before getting to PTRDIFF_MAX.  Making
57375         it signed allows us to use -1 and -2 with abandon, like libc does,
57376         thus lessening the number of differences between gnulib and libc.
57377         Also, it should help avoid gratuitous warnings like the one
57378         reported by Nelson H. F. Beebe in: http://bugs.gnu.org/22702
57379         * lib/regex.h (__re_idx_t): Remove.  All uses changed to regoff_t.
57382         regex: merge patches from libc
57384         2015-10-21  Joseph Myers  <joseph@codesourcery.com>
57385         2015-10-20  Joseph Myers  <joseph@codesourcery.com>
57386         Convert miscellaneous function definitions to prototype style.
57387         * lib/regcomp.c (re_compile_pattern, re_set_syntax)
57388         (re_compile_fastmap, regcomp, regerror, regfree, re_comp):
57389         * lib/regexec.c (regexec, re_match, re_search, re_match_2, re_search_2)
57390         (re_search_2_stub, re_search_stub, re_set_registers, re_exec)
57391         (re_search_internal):
57392         Convert to prototype-style function definition.
57393         Use internal_function for internal functions.
57395 2016-02-10  Paul Eggert  <eggert@cs.ucla.edu>
57397         stdalign: port to older HP and IBM cc
57398         * lib/stdalign.in.h (_Alignas): Port better to older HP and IBM
57399         C compilers, by checking their version numbers.  These version
57400         numbers appear in MariaDB and in Qt code that dates way back and
57401         that conditiionally uses the 'aligned' attribute.
57403 2016-02-09  Paul Eggert  <eggert@cs.ucla.edu>
57405         stdalign: port to clang 3.7.0
57406         Problem reported by Herbert J. Skuhra in:
57407         http://lists.gnu.org/r/emacs-devel/2016-02/msg00476.html
57408         * lib/stdalign.in.h (alignas): Fix typo that prevented 'alignas'
57409         from being defined on clang 3.7.0, which has a buggy stdalign.h.  See:
57410         https://llvm.org/bugs/show_bug.cgi?id=26547
57412 2016-02-08  Paul Eggert  <eggert@cs.ucla.edu>
57414         readdir_r: now obsolescent
57415         * doc/posix-functions/readdir_r.texi (readdir_r): Now obsolescent.
57416         * lib/mountlist.c (read_file_system_list): Add a FIXME.
57418 2016-02-06  Paul Eggert  <eggert@cs.ucla.edu>
57420         misc: port better to gcc -fsanitize=address
57421         Without these patches, ./configure CFLAGS='-fsanitize=address'
57422         would compute incorrect values.  This patch fixes some (but not all)
57423         test failures with recent glibc, with this configuration.
57424         * m4/acl.m4 (gl_ACL_GET_FILE):
57425         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF):
57426         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS):
57427         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO):
57428         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE):
57429         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
57430         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
57431         * m4/getgroups.m4 (gl_FUNC_GETGROUPS):
57432         * m4/getline.m4 (gl_FUNC_GETLINE):
57433         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF):
57434         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF):
57435         * m4/regex.m4 (gl_REGEX):
57436         * m4/strndup.m4 (gl_FUNC_STRNDUP):
57437         * tests/test-calloc-gnu.c (main):
57438         * tests/test-duplocale.c (main):
57439         * tests/test-getgroups.c (main):
57440         * tests/test-getline.c (main):
57441         * tests/test-inttostr.c (main):
57442         * tests/test-localename.c (test_locale_name)
57443         (test_locale_name_thread, test_locale_name_environ)
57444         (test_locale_name_default):
57445         * tests/test-regex.c (main):
57446         * tests/test-setlocale1.c (main):
57447         * tests/test-stat.h (test_stat_func):
57448         Free heap-allocated storage before exiting.
57449         * m4/asm-underscore.m4 (gl_ASM_SYMBOL_PREFIX):
57450         Don't match *_foo symbols inserted by AddressSanitizer.
57451         * tests/test-regex.c, tests/test-stat.c: Include stdlib.h, for 'free'.
57453 2016-02-02  Jim Meyering  <meyering@fb.com>
57455         verify-tests: also remove stray test-verify.Tpo
57456         * modules/verify-tests (Makefile.am): Arrange for "make clean"
57457         to remove the test-verify.Tpo file that is left behind by
57458         the automake-generated rule upon compilation failure.
57459         Otherwise, that .Tpo file would cause a failed "make distcheck"
57460         at least for grep.
57462 2016-02-02  Paul Eggert  <eggert@cs.ucla.edu>
57464         std-gnu11: new module
57465         This makes it easier for applications to prefer C11 and C++11
57466         to older variants, when compiling C and C++ code.
57467         Unlike most m4/*.m4 files, m4/std-gnu11.m4 is GPLed, as it copies
57468         a nontrivial chunk of GPLed Autoconf source code.
57469         * COPYING: Mention the m4/*.m4 copyright situation.
57470         * MODULES.html.sh (std-gnu11): New module.
57471         * m4/std-gnu11.m4, modules/std-gnu11: New files.
57473 2016-01-25  Paul Eggert  <eggert@cs.ucla.edu>
57475         get-permissions, strftime: fix grammar in comments
57476         * lib/get-permissions.c, lib/strftime.c: Merge into the comments
57477         some grammar fixes Alan Mackenzie made to GNU Emacs.
57479 2016-01-25  Daiki Ueno  <ueno@gnu.org>
57481         gettext: mark as obsolete
57482         Suggested by Paul Eggert in:
57483         https://lists.gnu.org/r/bug-gnulib/2016-01/msg00101.html
57484         * modules/gettext (Status): Mark as obsolete.
57485         (Notice): Suggest to use 'gettext-h' instead.
57486         * modules/gettext-h (Description): Suggest GNU gettext, instead of
57487         the 'gettext' module.
57489 2016-01-24  Paul Eggert  <eggert@cs.ucla.edu>
57491         gnulib-tool: don't give up on ln -s so easily
57492         * gnulib-tool (func_ln_s): Don't give up on a later ln -s merely
57493         because an earlier one failed.  The targets could be on different
57494         file systems.  Problem reported by KO Myung-Hun in:
57495         http://lists.gnu.org/r/bug-gnulib/2016-01/msg00081.html
57497         closedir: fix OS/2-related typos
57498         Problem reported by KO Myung-Hun in:
57499         http://lists.gnu.org/r/bug-gnulib/2016-01/msg00107.html
57500         * m4/closedir.m4 (gl_FUNC_CLOSEDIR): Fix a couple of typos
57501         in the last couple of changes.
57503 2016-01-24  KO Myung-Hun  <komh78@gmail.com>
57505         openat_proc_name: fix that last '/' is overwritten on OS/2 kLIBC
57506         * lib/openat-proc.c (openat_proc_name): Increase dirlen by 1 after
57507         copying a directory.
57509 2016-01-24  Paul Eggert  <eggert@cs.ucla.edu>
57511         regex: treat [x] as x if x is a unibyte encoding error
57512         Problem reported by Aharon Robbins in:
57513         http://lists.gnu.org/r/bug-gnulib/2016-01/msg00091.html
57514         * lib/regcomp.c (parse_byte) [!_LIBC && RE_ENABLE_I18N]: New function.
57515         (build_range_exp) [!_LIBC && RE_ENABLE_I18N]: Use it.
57517         closedir, dirfd, opendir: port to OpenSolaris 5.10
57518         * m4/closedir.m4 (gl_FUNC_CLOSEDIR):
57519         * m4/dirfd.m4 (gl_FUNC_DIRFD):
57520         * m4/opendir.m4 (gl_FUNC_OPENDIR):
57521         Don't use ${word##pat} substitution, as it doesn't work in
57522         OpenSolaris 5.10 /bin/sh.  Problem reported by Assaf Gordon in:
57523         http://bugs.gnu.org/22443#11
57525 2016-01-23  Paul Eggert  <eggert@cs.ucla.edu>
57527         bootstrap: use American spelling
57528         * build-aux/bootstrap: Honor American spelling.
57530 2016-01-22  Karl Berry  <karl@freefriends.org>
57532         * doc/posix-functions/localtime.texi,
57533         * doc/posix-functions/localtime_r.texi: @item needed for @itemize text.
57535 2016-01-21  Bruno Haible  <bruno@clisp.org>
57537         hash-pjw-bare: fix comment
57538         * lib/hash-pjw-bare.h (hash_pjw_bare): Fix comment.
57540         wcwidth: Replace also on OpenBSD 5.8
57541         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Check the value of wcwidth(0xFF1A).
57542         * doc/posix-functions/wcwidth.texi: Update.
57544 2016-01-20  Pádraig Brady  <P@draigBrady.com>
57546         gnu-web-doc-update: fix addition of new files
57547         If there were already added (emnpty) dirs,
57548         then cvs aborts the add with the message:
57549           cvs [add aborted]: there is a version in <./dirname> already
57550         * build-aux/gnu-web-doc-update: Add directories separately
57551         to the addition of files, to avoid the above issue
57552         impacting the addition of files.
57554 2016-01-19  Daiki Ueno  <ueno@gnu.org>
57556         utimens-tests: avoid pulling gettext .m4 files
57557         Although this is not the right fix to the original problem:
57558         http://lists.gnu.org/r/bug-gnulib/2013-01/msg00086.html
57559         it makes it possible again for consumer projects to use arbitrary
57560         version of gettext, through the steps described at:
57561         http://www.gnu.org/software/gnulib/manual/html_node/gettextize-and-autopoint.html
57562         See here for details:
57563         https://lists.gnu.org/r/bug-gnulib/2016-01/msg00079.html
57564         * modules/futimens-tests (Depends-on): Add 'gettext-h' in place of
57565         'gettext'.
57566         * modules/utimens-tests (Depends-on): Add 'gettext-h' in place of
57567         'gettext'.
57569 2016-01-18  Paul Eggert  <eggert@cs.ucla.edu>
57571         regex: pacify static checkers
57572         Problem and draft fix reported by Aharon Robbins in:
57573         http://lists.gnu.org/r/bug-gnulib/2016-01/msg00082.html
57574         * lib/regcomp.c (build_charclass_op, create_tree) [lint]:
57575         Clear memory to pacify static checkers.
57577         regex: fix [ diagnostic
57578         Problem and fix reported by Aharon Robbins in:
57579         http://lists.gnu.org/r/bug-gnulib/2016-01/msg00082.html
57580         * lib/regcomp.c (REG_EBRACK_IDX): Fix misleading diagnostic about [.
57582         regex: fix memory leaks
57583         Problem and draft fix reported by Aharon Robbins in:
57584         http://lists.gnu.org/r/bug-gnulib/2016-01/msg00082.html
57585         * lib/regcomp.c (build_range_exp, build_charclass_op)
57586         * lib/regex_internal.c (re_dfa_add_node):
57587         Fix memory leak on failure.
57589 2016-01-18  Pádraig Brady  <P@draigBrady.com>
57591         fts: don't unconditionally use leaf optimization for NFS
57592         NFS st_nlink are not accurate on all implementations,
57593         leading to aborts() if that assumption is made.
57594         See <https://bugzilla.redhat.com/1299169>
57595         * lib/fts.c (leaf_optimization_applies): Remove NFS from
57596         the white list, and document the issue.
57598 2016-01-15  Paul Eggert  <eggert@cs.ucla.edu>
57599             KO Myung-Hun  <komh@chollian.net>
57601         gnulib-tool: don't assume ln -s works
57602         * gnulib-tool (func_ln_s): New function.
57603         (func_ln): Use it.
57605 2016-01-15  KO Myung-Hun  <komh@chollian.net>
57607         utimes: detect utimes() correctly on OS/2 kLIBC
57608         utimes() of OS/2 kLIBC has some limitations.
57609         1. OS/2 itself supports a file date since 1980 year in local time.
57610         2. OS/2 itself supports only even seconds for a file time.
57611         3. utimes() of OS/2 kLIBC does not work on an opened file.
57612         * m4/utimes.m4: Detect utimes() correctly on OS/2 kLIBC.
57613         * doc/posix-functions/utimes.texi: Document the above limitations of
57614         utimes() on OS/2 kLIBC.
57616 2016-01-15  Paul Eggert  <eggert@cs.ucla.edu>
57617             KO Myung-Hun  <komh@chollian.net>
57619         openat_proc_name: port to OS/2 kLIBC
57620         OS/2 kLIBC provides a function to retrive a path from a fd. Use it
57621         instead of /proc/self/fd.
57622         * lib/openat-proc.c (openat_proc_name):
57623         Don't assume file name length is less than INT_MAX.
57624         Port to OS/2 kLIBC with __libc_Back_ioFHToPath().
57626 2016-01-14  KO Myung-Hun  <komh@chollian.net>
57628         stdint: check _INTPTR_T_DECLARED for intptr_t etc.
57629         OS/2 kLIBC's stdint.h defines _INTPTR_T_DECLARED and needs its own
57630         definitions of intptr_t and uintptr_t (which use int and unsigned)
57631         to avoid clashes with declarations of system functions like sbrk.
57632         * lib/stdint.in.h (intptr_t, uintptr_t): Check
57633         _INTPTR_T_DECLARED before defining them.
57635         opendir, closedir, dirfd, fdopendir: port to OS/2 kLIBC
57636         * lib/closedir.c (closedir): Unregister fd if closedir() succeeds.
57637         * lib/dirent.in.h (_gl_register_dirp_fd, _gl_unregister_dirp_fd):
57638         Declare on kLIBC.
57639         * lib/dirfd.c (struct dirp_fd_list): New. Structures to keep track of
57640         fd associated with dirp.
57641         (_gl_register_dirp_fd): New. Register fd associated with dirp to
57642         dirp_fd_list.
57643         (_gl_unregister_dirp_fd): New. Unregister fd with closing it.
57644         (dirfd): Implemented for kLIBC.
57645         * lib/fdopendir.c (fdopendir): Implemented for kLIBC.
57646         * lib/opendir.c (opendir): New. Register fd and dirp pair if open()
57647         succeeds.
57648         * m4/closedir.m4 (gl_FUNC_CLOSEDIR): Replace if OS/2.
57649         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
57650         (REPLACE_DIRFD): Define to 1 if replaced.
57651         * m4/opendir.m4 (gl_FUNC_OPENDIR): Likewise.
57652         * modules/closedir (Depends-on): Add dirfd.
57653         * modules/dirfd (Depends-on): Add 'test $REPLACE_DIRFD = 1' to errno
57654         condition.
57655         (configure.ac): Add dirfd to LIBOBJS if $REPLACE_DIRFD = 1 as well.
57656         * modules/opendir (Depends-on): Add dirfd.
57658         dup, dup2, fcntl: support a directory fd on OS/2 kLIBC
57659         On OS/2 kLIBC, dup(), dup2() and fcntl() do not work on a directory fd.
57660         * lib/dup.c (dup_nothrow): New.
57661         * lib/dup2.c (klibc_dup2dirfd): New. dup2() for a directory fd.
57662         (klibc_dup2): New.
57663         * lib/fcntl.c (klibc_fcntl): New.
57664         * m4/dup.m4 (gl_FUNC_DUP): Check if dup() works on a directory fd.
57665         * m4/dup2.m4 (gl_FUNC_DUP2): Check if dup2() works on a directory fd.
57666         * m4/fcntl.m4 (gl_FUNC_FCNTL): Check if F_DUPFD works on a directory
57667         fd.
57669         pipe_filter_ii_execute: port to OS/2 kLIBC
57670         Pipes on kLIBC do not support O_NONBLOCK like Win32.
57671         * lib/pipe-filter-ii.c (start_wrapper, _beginthreadex, CloseHandle,
57672         WaiForSingleObject, WaitForMultipleObjects): New on OS/2 kLIBC.
57673         Reuse Win32 code on OS/2 kLIBC.
57674         * lib/spawn-pipe.c: Reuse Win32 code on OS/2 kLIBC.
57675         * lib/w32spawn.h: Do not include windows.h on OS/2 kLIBC.
57677         wchar: fix "conflicting types" error for __wcwidth on OS/2 kLIBC
57678         On OS/2 kLIBC, wcwidth is a macro that expands to the name of a
57679         static inline function.  The implementation of wcwidth in wcwidth.c
57680         causes a "conflicting types" error.
57681         * lib/wchar.in.h: Undefine wcwidth on OS/2 kLIBC.
57683         w32spawn: clear SHELL_SPECIAL_CHARS and SHELL_SPACE_CHAR on OS/2 kLIBC
57684         spawn() on OS/2 kLIBC is not silly like one on Windows
57685         * libc/w32spawn.h (SHELL_SPECIAL_CHARS, SHELL_SPACE_CHAR): Set both to
57686         empty string on OS/2 kLIBC.
57688         pipe-filter-aux: undefine HAVE_SELECT on KLIBC
57689         On OS/2 kLIBC, select() works only on sockets.
57690         * lib/pipe-filter-aux.h (HAVE_SELECT): Undefine on OS/2 kLIBC.
57692         binary-io: don't put fd in binary mode if it is a console on EMX
57693         * lib/binary-io.h (SET_BINARY): Don't put fd in binary mode if it is
57694         a console on EMX.
57696 2016-01-15  Pádraig Brady  <P@draigBrady.com>
57698         doc: mention unfixed issues with unsupported localtime() values
57699         * doc/posix-functions/localtime.texi: Mention that FreeBSD 10
57700         returns nonsense for localtime(2^56).
57701         * doc/posix-functions/localtime_r.texi: Likewise.
57703 2016-01-14  Pádraig Brady  <P@draigBrady.com>
57705         doc: mention setlocale() issues on OpenBSD
57706         * doc/posix-functions/setlocale.texi: Mention setlocale(LC_ALL,"")
57707         never fails, and the need to check categories individually.
57709 2016-01-14  Pádraig Brady  <P@draigBrady.com>
57711         sig2str: list all signals on FreeBSD >= 7
57712         FreeBSD >= 7 is contravening POSIX by not defining NSIG
57713         to the maximal statically defined signal value.
57714         It does define _SIG_MAXSIG though, so base SIGNUM_BOUND on that.
57715         * lib/sig2str.h (SIGNUM_BOUND): Define to (_SIG_MAXSIG - 2)
57716         where available, even when NSIG is defined.
57718 2016-01-13  Paul Eggert  <eggert@cs.ucla.edu>
57720         acl-permissions: port to USE_ACL==0 platforms
57721         I ran into this problem when building bleeding-edge GNU Emacs
57722         with gcc -fsanitize=address on Fedora 23.  On this platform
57723         the ACL library does not pass the 'configure' test and Emacs
57724         then does not build due in part to what appear to be typos in the
57725         ACL part of Gnulib.
57726         * lib/acl-internal.c (free_permission_context):
57727         * lib/acl-internal.h (struct permission_context):
57728         Test whether USE_ACL is nonzero, not whether it is defined.
57730 2016-01-12  Martin Sebor  <msebor@redhat.com>
57732         mktime: rename macro to avoid glibc clash
57733         * lib/mktime.c [DEBUG] (DEBUG): Rename to DEBUG_MKTIME.  See:
57734         https://sourceware.org/ml/libc-alpha/2016-01/msg00267.html
57736 2016-01-12  Paul Eggert  <eggert@cs.ucla.edu>
57738         Port "$@" to OpenIndiana ksh93
57739         In http://lists.gnu.org/r/bug-autoconf/2015-12/msg00000.html
57740         Pavel Raiskup reports that ${1+"$@"} runs afoul of a bug in /bin/sh
57741         (derived from ksh 93t+ 2010-03-05).  ${1+"$@"} works around an ancient
57742         bug long-dead shells, so remove the workaround.
57743         * build-aux/announce-gen, build-aux/do-release-commit-and-tag:
57744         * build-aux/gitlog-to-changelog, build-aux/gnu-web-doc-update:
57745         * build-aux/prefix-gnulib-mk, build-aux/update-copyright:
57746         * build-aux/useless-if-before-free, tests/test-update-copyright.sh:
57747         Use "$@" instead of ${1+"$@"}.
57749         Port Universal Time settings to strict POSIX
57750         * build-aux/announce-gen, build-aux/bootstrap:
57751         * build-aux/do-release-commit-and-tag, build-aux/git-version-gen:
57752         * build-aux/gitlog-to-changelog, build-aux/gnu-web-doc-update:
57753         * build-aux/gnupload, build-aux/mkinstalldirs:
57754         * build-aux/move-if-change, build-aux/prefix-gnulib-mk:
57755         * build-aux/update-copyright, build-aux/useless-if-before-free:
57756         * build-aux/vc-list-files, tests/test-strftime.c:
57757         Use TZ="UTC0", not TZ="UTC".  Either works on GNU platforms,
57758         but POSIX says the behavior of TZ="UTC" is undefined.
57760 2016-01-02  Paul Eggert  <eggert@cs.ucla.edu>
57762         msvc-inval: fix problem with unset shell var
57763         Problem reported by Karl Berry in:
57764         http://lists.gnu.org/r/bug-gnulib/2016-01/msg00004.html
57765         * modules/msvc-inval (Depends-on):
57766         AC_REQUIRE gl_MSVC_INVAL instead of merely calling it.
57767         * modules/msvc-nothrow (Depends-on): Likewise for gl_MSVC_NOTHROW.
57769 2016-01-01  Pádraig Brady  <P@draigBrady.com>
57771         tests: for compare_(), use cmp -s where available
57772         * tests/init.sh (compare_): Only fall back to cmp without
57773         the POSIX defined -s option, where this is not available.
57775 2016-01-01  Paul Eggert  <eggert@cs.ucla.edu>
57777         version-etc: new year
57778         * build-aux/gendocs.sh (version):
57779         * doc/gendocs_template:
57780         * doc/gendocs_template_min:
57781         * doc/gnulib.texi:
57782         * lib/version-etc.c (COPYRIGHT_YEAR):
57783         Update copyright dates by hand in templates and the like.
57784         * all files: Run 'make update-copyright'.
57786 2015-12-31  Paul Eggert  <eggert@cs.ucla.edu>
57788         human: fix output buffer overrun by 1
57789         * lib/human.c (human_readable): Fix off-by-one typo in buffer
57790         calculation that could lead to a one-byte buffer overrun.
57792 2015-12-28  Daiki Ueno  <ueno@gnu.org>
57794         maint: fix operator precedence in mbrtowc test
57795         This is a fix for test breakage introduced by commit 45228d96; the
57796         equality expression must be parenthesized when negated with '!',
57797         otherwise we always get:
57799           test-mbrtowc.c:49: assertion 'ret == (size_t)(-2)' failed
57801         * m4/mbrtowc.m4 (gl_MBRTOWC_EMPTY_INPUT): Negate the entire expression.
57802         * m4/mbrlen.m4 (gl_MBRLEN_EMPTY_INPUT): Likewise.
57804 2015-12-23  James Youngman  <jay@gnu.org>
57806         regexprops-generic: update from regex.h
57807         * doc/regexprops-generic.texi: update by running the regexprops binary
57808         from findutils (the command line is 'regexprops "Regular Expressions"
57809         generic').  The recent (ish) change (5a5a9388) to regex.h aligning
57810         gnulib with GNU grep had made this document out-of-date.
57812 2015-12-23  Pádraig Brady  <P@draigBrady.com>
57814         strftime-tests: avoid false failure on OS X
57815         * tests/test-strftime.c (struct localtime_rz_test): Add an
57816         ahistorical member which is used to warn rather than fail
57817         when tm_isdst isn't set for such entries.  This is the case for
57818         "1970-01-01 13:00:00 +1300 (NZDT)" on Darwin 13/14 at least.
57820 2015-12-20  Kamil Dudka  <kdudka@redhat.com>
57822         fts: ensure leaf optimization is used for NFS
57823         NFS provides usable dirent.d_type but not necessarily for all entries
57824         of large directories.  See <https://bugzilla.redhat.com/1252549>
57825         * lib/fts.c (leaf_optimization_applies): Append NFS on the white list.
57827 2015-12-20  Pádraig Brady  <P@draigBrady.com>
57829         fts: enable leaf optimization for XFS
57830         XFS provides usable dirent.d_type only for DT_DIR,
57831         but the noleaf optimization still applies.
57832         * lib/fts.c (leaf_optimization_applies): Add XFS to the white list.
57834 2015-12-17  Paul Eggert  <eggert@cs.ucla.edu>
57836         intprops: comment fix
57837         * lib/intprops.h: Fix comment.  Reported by Pádraig Brady in:
57838         http://lists.gnu.org/r/bug-gnulib/2015-12/msg00013.html
57840         intprops-test: work around GCC bug 68971
57841         Problem reported by Pádraig Brady in:
57842         http://lists.gnu.org/r/bug-gnulib/2015-12/msg00011.html
57843         * tests/test-intprops.c: Ignore -Woverflow in GCC 6 and earlier.
57844         (main): Add a case that better tests 64-bit long in this area.
57846 2015-12-09  Pavel Raiskup  <praiskup@redhat.com>
57848         gnulib-tool: allow multiple --local-dir usage
57849         * gnulib-tool: Use --local-dir to construct compound
57850         $local_gnulib_path path instead of $local_gnulib_dir.  Determine
57851         PATH_SEPARATOR early.
57852         (local_gnulib_dir): Rename into $local_gnulib_path everywhere.
57853         (func_gnulib_dir): Cut out PATH_SEPARATOR detection code into
57854         func_determine_path_separator because that needs to be detected
57855         earlier now.
57856         (func_determine_path_separator): New function.
57857         (func_path_foreach, func_path_foreach_inner): New functions.
57858         (func_path_prepend, func_path_append): Likewise.
57859         (func_lookup_local_file, func_lookup_local_file_cb): Likewise.
57860         (func_lookup_file, func_all_modules): Use new functions to work
57861         with local_gnulib_path.
57862         (func_modules_in_dir, func_exists_module): New callbacks for
57863         func_path_foreach.
57864         (func_exists_module, func_get_tests_module): Likewise.
57865         (func_is_local_file, func_should_symlink): New helper methods.
57866         (func_add_file, func_update_file): Use new func_should_symlink
57867         instead, DRY.
57868         (func_reconstruct_cached_local_gnulib_path): New helper.
57869         (func_reconstruct_cached_dir): New callback.
57870         (func_import): The cached_local_gnulib_dir renamed to
57871         cached_local_gnulib_path similarly to local_gnulib_dir.
57872         Use new func_reconstruct_cached_local_gnulib_path.
57873         (func_count_relative_local_gnulib_path): New sub-method.
57874         (func_create_testdir): Use func_should_symlink, DRY.
57875         (func_create_megatestdir): Use new functions to work with
57876         local_gnulib_path correctly.
57877         (func_append_local_dir): New helper.
57879 2015-12-08  Pádraig Brady  <P@draigBrady.com>
57881         fix freadptr to work with ungetc on all uClibc configs
57882         Reported at https://bugs.busybox.net/show_bug.cgi?id=4099
57883         where GNU coreutils cut(1) generates invalid output on uClibc
57884         when __UCLIBC_HAS_STDIO_GETC_MACRO__ is not defined.
57885         * lib/freadptr.c (freadptr): Return NULL if there are
57886         ungotten chars.  In this case freadseek() will iterate
57887         again to process the ungotten character.
57889 2015-11-13  Paul Eggert  <eggert@cs.ucla.edu>
57891         xalloc-oversized: improve performance with GCC 5
57892         * lib/xalloc-oversized.h (xalloc_oversized):
57893         Improve performance with GCC 5 by using __builtin_mul_overflow.
57895 2015-11-10  Paul Eggert  <eggert@cs.ucla.edu>
57897         intprops: new public macro EXPR_SIGNED
57898         Emacs can use this macro, so make it public.
57899         * doc/intprops.texi (Arithmetic Type Properties): Rename from
57900         'Integer Type Determination', since some of these macros apply
57901         to non-integer types.  Clarify what kinds of constant expressions
57902         these macros return.  Say when the arguments can be non-integers.
57903         Mention newly published macro EXPR_SIGNED.
57904         * lib/intprops.h (EXPR_SIGNED): Rename from _GL_INT_SIGNED, to
57905         make it public.  All uses changed.
57907         intprops: fix typo in clang port
57908         * lib/intprops.h (_GL_INT_OP_WRAPV): Fix misspelling of
57909         '__builtin_add_overflow' that is not caught by compiler.
57911 2015-11-05  Paul Eggert  <eggert@cs.ucla.edu>
57913         test-timespec: fix typo in previous change
57914         * tests/test-timespec.c (main): Fix typo that reduced test quality.
57916         timespec-sub: fix overflow bug; add tests
57917         * lib/timespec-add.c (timespec_add):
57918         * lib/timespec-sub.c (timespec_sub):
57919         Work even if time_t is narrower than int (a theoretical
57920         possibility).  Redo code for a bit more clarity.
57921         * lib/timespec-sub.c (timespec_sub):
57922         Fix off-by-2 bug if a.tv_sec == TYPE_MINIMUM (time_t) and 0 < b.tv_sec.
57923         * modules/timespec-tests, tests/test-timespec.c: New files.
57925         intprops-test: suppress -Woverlength-strings
57926         Problem reported by Pádraig Brady in:
57927         http://lists.gnu.org/r/bug-gnulib/2015-11/msg00008.html
57928         It is not worth the hassle to port this test to compilers that
57929         cannot handle long strings in diagnostics.
57930         * tests/test-intprops.c [__GNUC__]: Ignore -Woverlength-strings.
57932 2015-11-03  Pádraig Brady  <P@draigBrady.com>
57934         quotearg: add quotearg_n_style_colon()
57935         This quotes with default options of the specified style,
57936         but with quoting enabled for instances of ':'.
57937         * lib/quotearg.h (quotearg_n_style_colon): Description and declaration.
57938         * lib/quotearg.c (quotearg_n_style_colon): New function implementation.
57940 2015-11-04  Paul Eggert  <eggert@cs.ucla.edu>
57942         intprops: revise _WRAPV macros, revert _OVERFLOW
57943         The incompatible changes to the _OVERFLOW macros were too much of
57944         a hassle in practice, so revert them.  Instead, change the new
57945         _WRAPV macros to make them closer in behavior to GCC 5's new
57946         builtin_add_overflow etc. functions.  No other software was using
57947         these newly-added macros yet, so this should be OK.
57948         * NEWS: Revert previous change, since the incompatible change
57949         has been reverted, and nobody used the incompatible version.
57950         * doc/intprops.texi (Wraparound Arithmetic, Integer Type Overflow):
57951         Document revised behavior.
57952         (Integer Range Overflow): Adjust example to match above revisions.
57953         * lib/intprops.h (INT_ADD_OVERFLOW, INT_SUBTRACT_OVERFLOW)
57954         (INT_MULTIPLY_OVERFLOW): Revert previous change, so that
57955         these can be used in integer constant expressions again.
57956         (INT_CONST_ADD_OVERFLOW, INT_CONST_SUBTRACT_OVERFLOW)
57957         (INT_CONST_MULTIPLY_OVERFLOW): Remove, as these are no longer
57958         needed.
57959         (INT_CONST_ADD_WRAPV, INT_CONST_SUBTRACT_WRAPV)
57960         (INT_NEGATE_WRAPV, INT_CONST_MULTIPLY_WRAPV, INT_DIVIDE_WRAPV)
57961         (INT_REMAINDER_WRAPV, INT_LEFT_SHIFT_WRAPV):
57962         Remove, as they did not seem that useful.
57963         (INT_ADD_WRAPV, INT_SUBTRACT_WRAPV, INT_MULTIPLY_WRAPV)
57964         (_GL_INT_OP_WRAPV, _GL_INT_OP_WRAPV_LONGISH)
57965         (_GL_INT_OP_WRAPV_VIA_UNSIGNED):
57966         Support new semantics.
57967         (__has_builtin): New macro, if not alreay defined.
57968         (_GL__GENERIC_BOGUS, _GL_INT_OP_CALC, _GL_INT_OP_CALC1): New macros.
57969         * tests/test-intprops.c (INT_CONST_DIVIDE_OVERFLOW)
57970         (INT_CONST_REMAINDER_OVERFLOW, INT_CONST_LEFT_SHIFT_OVERFLOW)
57971         (INT_CONST_DIVIDE_WRAPV, INT_CONST_REMAINDER_WRAPV)
57972         (INT_CONST_LEFT_SHIFT_WRAPV): Remove.
57973         (CHECK_SBINOP, CHECK_SSUM, CHECK_SUM1, CHECK_SSUM1)
57974         (CHECK_SDIFFERENCE, CHECK_SPRODUCT, CHECK_PRODUCT1, CHECK_SPRODUCT1):
57975         New macros.
57976         (CHECK_BINOP, CHECK_UNOP, main, CHECK_SUM): Test new behavior.
57978 2015-11-03  Jim Meyering  <meyering@fb.com>
57980         intprops: add parentheses for when OP has precedence lower than "-"
57981         * lib/intprops.h (_GL_INT_OP_WRAPV_VIA_UNSIGNED): In "a OP b - c",
57982         "a OP b" must be parenthesized for when OP is like "<<", which has
57983         lower precedence than the following "-". Reported by Pádraig Brady.
57985 2015-11-03  Pádraig Brady  <P@draigBrady.com>
57987         quotearg: constify get_quoting_style parameters
57988         * lib/quotearg.h (get_quoting_style): Mark parameter as const.
57989         * lib/quotearg.c (get_quoting_style): Likewise.
57991 2015-11-02  Pádraig Brady  <P@draigBrady.com>
57993         quotearg: add support for $'' shell escaping
57994         * lib/quotearg.h: Add "shell-escape" and "shell-escape-always"
57995         items and descriptions.
57996         * lib/quotearg.c (quotearg_buffer_restyled): Add support for the
57997         above types by quoting like "shell", but using $'...' syntax
57998         for non printable characters, which should provide unambiguous
57999         printable output for any input.
58000         * tests/test-quotearg-simple.c: Update accordingly.
58002 2015-11-02  Pádraig Brady  <P@draigBrady.com>
58004         maint: use a more standard return from mbrtowc test
58005         * m4/mbrtowc.m4 (gl_MBRTOWC_EMPTY_INPUT): Don't return 1
58006         from the test program as this is non standard and often
58007         indicates an unhandled case in the test program.
58008         * m4/mbrlen.m4 (gl_MBRLEN_EMPTY_INPUT): Likewise.
58010 2015-10-30  Paul Eggert  <eggert@cs.ucla.edu>
58012         intprops: add WRAPV and const flavors for GCC 5
58013         If available, use GCC 5's builtin functions for efficient integer
58014         overflow checking.  Also, add macros like INT_ADD_WRAPV efficently
58015         and safely compute the low-order bits of the correct answer.
58016         A downside of these efficient functions is that they cannot be
58017         used in constant expressions, so add macros like INT_CONST_ADD_OVERFLOW
58018         and INT_CONST_ADD_WRAPV that can be used even in constant expressions.
58019         * NEWS: Document the incompatible changes to INT_ADD_OVERFLOW etc.
58020         * doc/intprops.texi (Integer Properties, Integer Type Overflow):
58021         Document the changes.
58022         (Wraparound Arithmetic): New section.
58023         (Integer Range Overflow):
58024         Put this subsection last, since it's least useful.
58025         * lib/intprops.h (INT_CONST_ADD_OVERFLOW)
58026         (INT_CONST_SUBTRACT_OVERFLOW, INT_CONST_MULTIPLY_OVERFLOW):
58027         New macros, with the meaning that INT_ADD_OVERFLOW etc. used to have.
58028         (INT_CONST_ADD_WRAPV, INT_CONST_SUBTRACT_WRAPV)
58029         (INT_NEGATE_WRAPV, INT_CONST_MULTIPLY_WRAPV, INT_DIVIDE_WRAPV)
58030         (INT_REMAINDER_WRAPV, _GL_INT_OP_WRAPV, _GL_EXPR_CAST)
58031         (_GL_INT_OP_WRAPV_LONGISH, INT_ADD_WRAPV, INT_SUBTRACT_WRAPV)
58032         (INT_MULTIPLY_WRAPV, _GL_OP_OVERFLOW, _GL_OP_WRAPV, _GL_OP_WRAPV_GENSYM):
58033         New macros.
58034         (INT_ADD_OVERFLOW, INT_SUBTRACT_OVERFLOW, INT_MULTIPLY_OVERFLOW):
58035         Generate calls to GCC builtins if available, for speed.
58036         * tests/test-intprops.c (INT_CONST_DIVIDE_OVERFLOW)
58037         (INT_CONST_REMAINDER_OVERFLOW, INT_CONST_LEFT_SHIFT_OVERFLOW)
58038         (INT_CONST_DIVIDE_WRAPV, INT_CONST_REMAINDER_WRAPV)
58039         (INT_CONST_LEFT_SHIFT_WRAPV): New macros.
58040         (main, CHECK_BINOP, CHECK_UNOP, CHECK_SUM, CHECK_PRODUCT)
58041         (CHECK_QUOTIENT, CHECK_REMAINDER):
58042         Test WRAPV and CONST flavors (when available) too.
58044 2015-10-30  Pádraig Brady  <P@draigBrady.com>
58046         doc: use extended timezone format in iso-8601 example
58047         * doc/parse-datetime.texi: The standard states that extended format
58048         is to be used consistently throughout.
58049         Note that lib/parse-datetime.y can handle either tz format.
58051 2015-10-25  Paul Eggert  <eggert@cs.ucla.edu>
58053         stdalign: port to Sun C 5.9
58054         * doc/posix-headers/stdalign.texi: Document this.
58055         * lib/stdalign.in.h (_Alignas): Sun C 5.9 also supports
58056         __attribute__ ((__aligned__ (...))).
58058 2015-10-20  Paul Eggert  <eggert@cs.ucla.edu>
58060         time_rz: fix comment about tzalloc
58061         * lib/time_rz.c (tzalloc): Fix comment.
58063 2015-10-18  Paul Eggert  <eggert@cs.ucla.edu>
58065         stdalign: work around pre-4.9 GCC x86 bug
58066         * lib/stdalign.in.h (_Alignof): Work around bug in pre-4.9 GCC on
58067         x86, when -std=gnu11 is used.  Problem reported by Jim Meyering in:
58068         http://lists.gnu.org/r/bug-gnulib/2015-10/msg00038.html
58070 2015-10-18  Pádraig Brady  <P@draigBrady.com>
58072         maint.mk: sc_tight_scope: remove extraneous expressions
58073         * top/maint.mk (tight_scope): This is not really required since
58074         commit 3ef58f46 as sed_wrap ensures we don't get an empty expression
58075         that matches all nm entries.  But it does remove extraneous entries
58076         that may be confusing or cause issue in future maintenance.
58078 2015-10-18  Paul Eggert  <eggert@cs.ucla.edu>
58080         time_rz: return NULL if localtime_r fails
58081         * lib/time_rz.c (localtime_rz): Return NULL if localtime_r fails,
58082         while still attempting to pacify bleeding-edge GCC.
58084         fts: port to C11 alignof
58085         * doc/posix-headers/stdalign.texi (stdalign.h):
58086         Document the C11 restriction.
58087         * lib/fts.c: Include stddef.h, for max_align_t.
58088         (fts_alloc): Align using max_align_t, not FTSENT.
58089         * modules/fts (Depends-on): Add stddef.
58091 2015-10-18  Jim Meyering  <meyering@fb.com>
58093         time_rz: avoid warning from bleeding-edge gcc's -Wnonnull
58094         Compiling with gcc version 6.0.0 20151017 (experimental) (GCC), I
58095         would see this:
58097         lib/time_rz.c: In function 'localtime_rz':
58098         lib/time_rz.c:292:15: error: nonnull argument 'tm' compared to NULL \
58099           [-Werror=nonnull]
58100                    if (tm && !save_abbr (tz, tm))
58101                        ^
58103         That was complaining about "tm" because it is a parameter that was
58104         declared with the __nonnull__ attribute.
58105         * lib/time_rz.c (localtime_rz): Don't bother setting "tm" to the
58106         result of localtime_r.
58108 2015-10-17  Jim Meyering  <meyering@fb.com>
58110         maint.mk: _gl_TS_function_match: fix "extern" name extracting regexp
58111         * top/maint.mk (_gl_TS_function_match): This heuristic extern-function-
58112         name-extraction regexp mistakenly used \S+, and would mistakenly
58113         extract "*F" from "extern int *F()" rather than the desired "F".
58114         Use \w+ instead.
58116 2015-10-17  Jim Meyering  <meyering@fb.com>
58118         maint.mk: sc_tight_scope: factor and support OS X
58119         * top/maint.mk (_gl_tight_scope): Address three issues:
58120         - factor out four instances of code that wraps a string in "^...$"
58121         - allow nm-reported symbol names to have an optional leading "_"
58122         - add "main" to the list of ignored variable names, because on os x,
58123         "main" has nm-reported type "S" in the variable-checking section.
58125 2015-10-16  Dmitry Smirnov  <onlyjob@member.fsf.org>
58127         safe-alloc-tests: fix typo in license header
58128         * tests/test-safe-alloc.c: Mention LGPL 2.1, not 3.1
58130 2015-10-15  Simon Reinhardt  <simon@keinstein.org>
58132         copy-file: fix mem leak in error case
58133         * lib/copy-file.c (qcopy_file_preserving): Free the 32KiB buffer
58134         upon error opening or performing I/O to the src and dest files.
58136 2015-10-15  Mike Frysinger  <vapier@chromium.org>
58138         localename: control langinfo.h inclusion
58139         This header is only used to work around buggy behavior in old
58140         versions of glibc, so do not include it all the time.  Otherwise
58141         we get build failures on systems that do not provide langinfo.h.
58142         * lib/localename.c: Wrap langinfo.h include with same ifdefs used
58143         in the source later on.
58144         The patch was originally submitted to gettext as:
58145         https://lists.gnu.org/r/bug-gettext/2015-10/msg00011.html
58147 2015-10-13  Paul Eggert  <eggert@cs.ucla.edu>
58149         binary-io, math, pthread, sys_socket, u64, unistd: port to strict C
58150         * lib/binary-io.c, lib/math.c, lib/pthread.c, lib/sys_socket.c:
58151         * lib/u64.c, lib/unistd.c:
58152         Append 'typedef int dummy;', to pacify compilers that are picky
58153         about empty translation units.
58155 2015-10-12  Pino Toscano  <ptoscano@redhat.com>
58157         accept4-tests: fix to avoid non portable flags
58158         * tests/test-accept4.c (main): Pass only SOCK_* flags to accept4(),
58159         as they are the only documented ones, and passing others may trigger
58160         EINVAL (seen on FreeBSD 10.1-RELEASE).
58161         * doc/glibc-functions/accept4.texi: Mention that we don't provide
58162         the SOCK_CLOEXEC or SOCK_NONBLOCK defines.
58164 2015-10-06  Pavel Raiskup  <praiskup@redhat.com>
58166         gnulib-tool: fix tests of 'extensions' module
58167         This complements f8fe25fab60e3c687a124 commit.
58168         * gnulib-tool (func_emit_pre_early_macros): New function, it wraps
58169         emitting of initial gl_EARLY macros.
58170         (func_import, func_create_testdir): All dumps of gl_PROG_AR_RANLIB
58171         replaced with func_emit_pre_early_macros call.
58173 2015-10-06  Paul Eggert  <eggert@cs.ucla.edu>
58175         unicase/locale-language: fix typo in utf-8 cookie
58176         * lib/unicase/locale-languages.gperf: Fix gperf input file format.
58177         Problem reported by Zbigniew Jędrzejewski-Szmek.
58179 2015-10-02  Paul Eggert  <eggert@cs.ucla.edu>
58181         xalloc: do not worry about GCC 5 warning on 32 bit
58182         * lib/xalloc.h: Revert previous change.
58183         I found a better way to fix this in coreutils.
58185 2015-10-02  Pádraig Brady  <P@draigBrady.com>
58187         xalloc: avoid GCC 5.1 warning on 32 bit
58188         * lib/xalloc.h: Disable -Wstrict-overflow for uses of
58189         xalloc_oversized(), which was seen to give this warning
58190         on GCC 5.1 on 32 bit: "assuming signed overflow does not occur
58191         when simplifying conditional".
58193 2015-10-02  Daiki Ueno  <ueno@gnu.org>
58195         uniname/uniname-tests: avoid compiler warnings
58196         * tests/uniname/test-uninames.c (fill_names, fill_aliases): Remove
58197         unused local variables.
58198         (test_alias_lookup): Fix alias name display in failure cases.
58200 2015-09-26  Paul Eggert  <eggert@cs.ucla.edu>
58202         c-ctype: do not worry about EBCDIC + char signed
58203         Drop support for EBCDIC with char being signed, as this breaks too
58204         many programs.  Problem reported by Ben Pfaff in:
58205         http://lists.gnu.org/r/bug-gnulib/2015-09/msg00053.html
58206         * lib/c-ctype.h: Verify that we are not using EBCDIC with
58207         char being signed.
58208         (_C_CTYPE_LOWER_A_THRU_F_N): New macro.
58209         (_C_CTYPE_LOWER_N, _C_CTYPE_A_THRU_F): Use it.
58210         (_C_CTYPE_DIGIT, _C_CTYPE_LOWER, _C_CTYPE_PUNCT, _C_CTYPE_UPPER):
58211         (c_isascii, c_isgraph, c_isprint, c_ispunct, c_tolower, c_toupper):
58212         * tests/test-c-ctype.c (test_all):
58213         Simplify by assuming standard char values cannot be negative.
58214         * tests/test-c-ctype.c (NCHARS, to_char): Remove; all uses removed.
58216 2015-09-25  Paul Eggert  <eggert@cs.ucla.edu>
58218         c-ctype: port better to z/OS EBCDIC
58219         Problems reported by Daniel Richard G. in:
58220         http://lists.gnu.org/r/bug-gnulib/2015-09/msg00050.html
58221         * lib/c-ctype.h (_C_CTYPE_CNTRL): Rewrite in terms of
58222         the C standard escapes and _C_CTYPE_OTHER_CNTRL.
58223         (_C_CTYPE_OTHER_CNTRL): New macro.
58224         * tests/test-c-ctype.c (test_all): Test from CHAR_MIN, not
58225         from SCHAR_MIN, as the functions are defined only from values
58226         promoted from char or from unsigned char, not necessarily from
58227         signed char.
58229 2015-09-25  Pavel Raiskup  <praiskup@redhat.com>
58231         gnulib-common.m4: fix gl_PROG_AR_RANLIB/AM_PROG_AR clash
58233         The gl_PROG_AR_RANLIB (it is always called by gl_EARLY) sets AR
58234         and ARFLAGS variables.  Doing this unconditionally could break
58235         later Automake's AM_PROG_AR invocation (at least it's
58236         AC_CHECK_TOOLS call to detect correct 'ar' binary).
58238         Original purpose of the gl_PROG_AR_RANLIB was only to handle the
58239         Amsterdam Compiler Kit, so make the previous code to have effects
58240         only on ACK, and rather automatically call the Automake's
58241         AM_PROG_AR as soon as possible to decide other cases.
58243         References:
58244         http://lists.gnu.org/r/bug-gnulib/2015-07/msg00001.html
58246         * m4/gnulib-common.m4 (gl_PROG_AR_RANLIB): AC_BEFORE AM_PROG_AR.
58247         Set the AR/ARFLAGS to ACK defaults OR call AM_PROG_AR.  If neither
58248         is possible, keep setting AR/ARFLAGS to reasonable defaults.
58249         * gnulib-tool (func_import): Put the gl_USE_SYSTEM_EXTENSIONS
58250         right before gl_PROG_AR_RANLIB into gnulib-comp.m4 (if the
58251         'extensions' module is used.
58252         * modules/extensions (configure.ac-early): Remove as this snippet
58253         is added to gnulib-comp.m4 earlier anyway.
58255 2015-09-25  Paul Eggert  <eggert@cs.ucla.edu>
58257         sockets: MS Windows initalization fixes
58258         Problem reported by Test User in:
58259         http://lists.gnu.org/r/help-shishi/2015-09/msg00001.html
58260         * lib/sockets.h (SOCKETS_1_0, SOCKETS_2_0, SOCKETS_2_1):
58261         Correct the endianness.
58262         * lib/sockets.c (gl_sockets_startup): Return 2 on any version
58263         number mismatch, not just on <.  Cleanup before any such failure.
58265 2015-09-25  Mats Erik Andersson  <gnu@gisladisker.se>
58267         gc: fix detection of installed libgcrypt version
58268         * m4/gc.m4: Use AM_PATH_LIBCRYPT to test for libcrypt versions
58269         at least as recent as 1.4.4.  The previously used macro is not
58270         available now, since modules were removed in version 1.6.0.
58272 2015-09-25  Paul Eggert  <eggert@cs.ucla.edu>
58274         c-ctype: rewrite to use inline functions
58275         This simplifies maintenance, since it makes for just one
58276         implementation of each function, letting the compiler have the fun
58277         of optimization.  In practice this works well nowadays with GCC.
58278         E.g., c_isascii might need only three instructions even though the
58279         source code lists every ASCII character individually in a large
58280         switch statement.
58281         Also, fix some z/OS porting bugs reported by Daniel Richard G. in:
58282         http://lists.gnu.org/r/bug-gnulib/2015-09/msg00037.html
58283         * NEWS: Document the API change.
58284         * lib/c-ctype.c: Drastically simplify, since this now just expands
58285         inline functions.
58286         * lib/c-ctype.h: Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
58287         (C_CTYPE_INLINE): New macro.
58288         (C_CTYPE_CONSECUTIVE_DIGITS, C_CTYPE_CONSECUTIVE_LOWERCASE)
58289         (C_CTYPE_CONSECUTIVE_UPPERCASE): Remove.
58290         Verify that either ASCII or EBCDIC is being used.
58291         (_C_CTYPE_SIGNED_EBCDIC, _C_CTYPE_CNTRL, _C_CTYPE_A_THRU_F_N)
58292         (_C_CTYPE_DIGIT_N, _C_CTYPE_LOWER_N, _C_CTYPE_UPPER_N)
58293         (_C_CTYPE_CASES, _C_CTYPE_A_THRU_F, _C_CTYPE_DIGIT, _C_CTYPE_LOWER)
58294         (_C_CTYPE_UPPER, _C_CTYPE_PUNCT_PLAIN):
58295         New private macros.
58296         (_C_CTYPE_CNTRL): In EBCDIC, '\x07' is a control, not '\xff'.
58297         (c_isalnum, c_isalpha, c_isascii, c_isblank, c_iscntrl, c_isdigit)
58298         (c_isgraph, c_islower, c_isprint, c_ispunct, c_isspace, c_isupper)
58299         (c_isxdigit, c_tolower, c_toupper): Now inline functions.
58300         (c_tolower, c_toupper): When converting, return the unsigned char,
58301         as that is what z/OS does.
58302         * lib/c-strcaseeq.h (CASEEQ): Simplify in the light of the removal
58303         of some c-ctype.h macros.
58304         * modules/c-ctype (Depends-on): Add extern-inline; remove verify.
58305         * tests/test-c-ctype.c (test_all): Fix test for c_toupper and
58306         c_tolower promotion to be compatible with z/OS.
58308 2015-09-24  Pavel Raiskup  <praiskup@redhat.com>
58310         gitlog-to-changelog: trim only trailing whitespaces
58311         This is fix for --format regression introduced by commit
58312         2b93079a5d1baa4d;  it caused that --format='%s%n%n%b%n' (see the
58313         doubled %n string) had no effect anymore.  This format
58314         specification has been used e.g. by GNU paxuitils (commit
58315         edfd8bcc3).
58317         * build-aux/gitlog-to-changelog (main): Stop squashing multiple
58318         newlines in commmit messages.
58320 2015-09-23  Paul Eggert  <eggert@cs.ucla.edu>
58322         Test that c_iscntrl agrees with iscntrl, etc.
58323         Suggested by Daniel Richard G. in:
58324         http://lists.gnu.org/r/bug-gnulib/2015-09/msg00034.html
58325         * modules/c-ctype-tests (Depends-on): Add ctype.
58326         * tests/test-c-ctype.c: Include <ctype.h>.
58327         (NCHARS): New constant.
58328         (test_agree_with_C_locale): New function.
58329         (main): Use it.
58330         (test_all): Use named constants.
58332         c-ctype: improve c_isascii testing
58333         * tests/test-c-ctype.c (test_all): Port c_isascii test to EBCDIC.
58334         Add a test to count the number of ASCII characters.
58336 2015-09-22  Paul Eggert  <eggert@cs.ucla.edu>
58338         savewd: remove SAVEWD_CHDIR_READABLE
58339         It was problematic in the light of file systems that ignore umask.
58340         Problem reported by Sebastian Unger in: http://bugs.gnu.org/21534
58341         * NEWS: Document this.
58342         * lib/mkancesdirs.c (mkancesdirs): MAKE_DIR now returns 0 if
58343         successful, -1 (setting errno) on failure, rather than something
58344         more complicated than that.
58345         * lib/mkdir-p.c (make_dir_parents):
58346         Do not use SAVEWD_CHDIR_READABLE.
58347         * lib/savewd.c (savewd_chdir):
58348         Remove support for SAVEWD_CHDIR_READABLE.
58349         * lib/savewd.h (SAVEWD_CHDIR_READABLE): Remove.
58351         c-ctype: port better to EBCDIC
58352         Problems reported by Daniel Richard G. in
58353         http://lists.gnu.org/r/bug-gnulib/2015-09/msg00020.html
58354         * lib/c-ctype.c: Include <limits.h>, for CHAR_MIN and CHAR_MAX.
58355         Include "verify.h".
58356         (C_CTYPE_ASCII, C_CTYPE_CONSECUTIVE_DIGITS)
58357         (C_CTYPE_CONSECUTIVE_LOWERCASE, C_CTYPE_CONSECUTIVE_UPPERCASE):
58358         Define as enum constants with value false, if not defined, so that
58359         code can use 'if' instead of 'ifdef'.  Using 'if' helps make the
58360         code more portable, as both branches of the 'if' are compiled on
58361         all platforms.
58362         (C_CTYPE_EBCDIC): New constant.
58363         Verify that the character set is either ASCII or EBCDIC.
58364         (to_char): New static function.
58365         (c_isascii, c_iscntrl):
58366         Assume standard control-character assignments for EBCDIC.
58367         (c_isalnum, c_isalpha, c_isdigit, c_islower, c_isgraph, c_isprint)
58368         (c_ispunct, c_isupper, c_isxdigit, c_tolower, c_toupper):
58369         Rewrite to use 'if' instead of 'ifdef'.
58370         Use to_char if non-ASCII.  Prefer <= to >=.
58371         Prefer true and false to 1 and 0, for booleans.
58372         (c_iscntrl): Use 'if', not 'ifdef'.
58373         * modules/c-ctype (Depends-on): Add verify.
58374         * tests/test-c-ctype.c: Include <limits.h>, for CHAR_MIN
58375         (to_char): New function.
58376         (test_all): Port to EBCDIC.  Add some more tests, e.g., for c_ispunct.
58378 2015-09-21  Pádraig Brady  <P@draigBrady.com>
58380         nanosleep: fix return code for interrupted replacement
58381         * lib/nanosleep.c (nanosleep): In the replaced nanosleep, ensure
58382         that we return -1 in the case the call is interrupted by a signal,
58383         rather than the current value of 1.
58384         Diagnosed and tested by Daniel Richard G.
58386 2015-09-19  Paul Eggert  <eggert@cs.ucla.edu>
58388         Diagnose ERE '()|\1'
58389         Problem reported by Hanno Böck in: http://bugs.gnu.org/21513
58390         * lib/regcomp.c (parse_reg_exp): While parsing alternatives, keep
58391         track of the set of previously-completed subexpressions available
58392         before the first alternative, and restore this set just before
58393         parsing each subsequent alternative.  This lets us diagnose the
58394         invalid back-reference in the ERE '()|\1'.
58396         regex: merge patches from libc
58398         2015-09-08  Joseph Myers  <joseph@codesourcery.com>
58399         Move bits/libc-lock.h and bits/libc-lockP.h out of bits/ (bug 14912).
58400         * lib/regex_internal.h:
58401         Include <libc-lock.h> instead of <bits/libc-lock.h>.
58403         2015-06-09  Joseph Myers  <joseph@codesourcery.com>
58404         Fix regcomp wcscoll, wcscmp namespace (bug 18497).
58405         * lib/regcomp.c (build_range_exp): Call __wcscoll instead of
58406         wcscoll.
58407         * lib/regexec.c (check_node_accept_bytes): Likewise.
58409         2015-06-05  Joseph Myers  <joseph@codesourcery.com>
58410         Fix regex wcrtomb namespace (bug 18496).
58411         * lib/regex_internal.c (build_wcs_upper_buffer): Call __wcrtomb
58412         instead of wcrtomb.
58414         2015-06-05  Joseph Myers  <joseph@codesourcery.com>
58415         Fix regex wctype namespace (bug 18495).
58416         * lib/regcomp.c (re_compile_fastmap_iter): Call __towlower
58417         instead of towlower.
58418         * lib/regex_internal.c (build_wcs_upper_buffer): Call __iswlower
58419         instead of iswlower.  Call __towupper instead of towupper.
58420         * lib/regex_internal.h (IS_WIDE_WORD_CHAR): Call __iswalnum
58421         instead of iswalnum.
58423         2015-01-07  Chris Metcalf  <cmetcalf@ezchip.com>
58424         * lib/regcomp.c (parse_bracket_exp): Initialize type to
58425         COLL_SYM in a couple of places to avoid uninitialized variable
58426         wanings on tilegx gcc 4.8.2.
58428         2014-11-24  Siddhesh Poyarekar  <siddhesh@redhat.com>
58429         * lib/regex_internal.h: Remove NOT_IN_libc.
58431         2014-11-17  Andreas Schwab  <schwab@suse.de>
58432         * lib/regex_internal.h: Don't include <locale/elem-hash.h>.
58434         2014-09-11  Roland McGrath  <roland@hack.frob.com>
58435         Move findidx nested functions to top-level.
58436         * lib/regcomp.c [_LIBC]: #include <locale/weight.h>.
58437         (build_equiv_class) [_LIBC]: Don't #include it inside the function.
58438         Pass new arguments to findidx.
58439         * lib/regexec.c [RE_ENABLE_I18N] [_LIBC]: #include <locale/weight.h>.
58440         [RE_ENABLE_I18N] (check_node_accept_bytes) [_LIBC]:
58441         Don't #include it inside the function.  Pass new arguments to findidx.
58442         * lib/regex_internal.h:
58443         [!NOT_IN_libc] [_LIBC]: #include <locale/weight.h>.
58444         (re_string_elem_size_at): Don't #include it inside the function.
58445         Pass new arguments to findidx.
58447         2014-08-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
58448         Check if DEBUG is defined in regex_internal.c
58449         * lib/regex_internal.c: Check if DEBUG is defined and is set.
58451 2015-09-08   Assaf Gordon  <assafgordon@gmail.com>
58453         ceill: detect buggy OpenBSD implementation
58454         * m4/ceill.m4 (gl_FUNC_CEILL): Detect buggy openBSD implementation
58455         which returns zero for small values.  Discussed here:
58456         http://lists.gnu.org/r/bug-gnulib/2015-08/msg00010.html
58458 2015-09-08  Dave Chiluk  <chiluk@canonical.com>
58460         mountlist: add me_mntroot field on Linux machines
58461         * lib/mountlist.c (read_file_system_list): Populate me_mntroot in
58462         mount_entry so Linux machines based on /proc/self/mountinfo can
58463         distinguish between bind mounts and original mounts.  In reality bind
58464         mounts aren't treated differently than mountroot=/ mounts by the
58465         kernel, but the user often wants these bind mounts distinguished.
58466         * lib/mountlist.h (struct mount_entry): Add me_mntroot element.
58467         More details at https://pad.lv/1432871
58469 2015-09-08  Christian Egli  <christian.egli@sbs.ch>
58471         doc: Describe to use multiple instances of gnulib
58472         * doc/gnulib-tool.texi: Add a section to the manual outlining how two
58473         instances of gnulib with different modules can be used, for example one
58474         for a lib and another one for associated tools.
58476 2015-09-01  Pádraig Brady  <P@draigBrady.com>
58478         base32: mark function as __attribute__ const
58479         * lib/base32.h (isbase32): Mark __attribute__ const as
58480         suggested by GCC, and consistent with the base64 module.
58482 2015-08-20  Daiki Ueno  <ueno@gnu.org>
58484         gnulib-tool: don't transform binary files with sed
58485         * gnulib-tool (func_add_or_update): Don't apply sed_transform_* to
58486         .mo and .class files.
58487         Reported by Denis Denisov.
58489 2015-08-10  Daiki Ueno  <ueno@gnu.org>
58491         gperf: respect silent rules
58492         * modules/gperf (Makefile.am): Define V_GPERF, V_GPERF_, and
58493         V_GPERF_0 for silent rules.
58494         * modules/iconv_open (Makefile.am): Use V_GPERF.
58495         * modules/unicase/locale-language (Makefile.am): Likewise.
58496         * modules/unicase/special-casing (Makefile.am): Likewise.
58497         * modules/unictype/category-byname (Makefile.am): Likewise.
58498         * modules/unictype/combining-class-byname (Makefile.am): Likewise.
58499         * modules/unictype/joininggroup-byname (Makefile.am): Likewise.
58500         * modules/unictype/joiningtype-byname (Makefile.am): Likewise.
58501         * modules/unictype/property-byname (Makefile.am): Likewise.
58502         * modules/unictype/scripts (Makefile.am): Likewise.
58503         * modules/uninorm/composition (Makefile.am): Likewise.
58505 2015-08-03  Paul Eggert  <eggert@cs.ucla.edu>
58507         Improve port of stdalign to C++11
58508         Problem reported by Sundaram in:
58509         http://lists.gnu.org/r/bug-gnulib/2015-08/msg00003.html
58510         * lib/stdalign.in.h (alignof, alignas): Don't define if C++11 or newer.
58511         (__alignas_is_defined): Define if C++11 or newer.
58513 2015-08-01  Assaf Gordon  <assafgordon@gmail.com>  (tiny change)
58515         pmccabe2html: fix gawk regex escaping
58516         * build-aux/pmccabe2html: Add one more backslash to properly
58517         escape the gsub replacement value.  Fixes this error:
58518         gawk: ./build-aux/pmccabe2html:425: \
58519         warning: escape sequence `\&' treated as plain `&'
58521 2015-07-29  Paul Eggert  <eggert@cs.ucla.edu>
58523         time_rz: port to pedantic memcpy
58524         * lib/time_rz.c (tzalloc): Pacify pedantic memcpy implementations
58525         that reject memcpy (..., NULL, 0).
58527 2015-07-27  Paul Eggert  <eggert@cs.ucla.edu>
58529         time_rz: port better to MinGW
58530         Don't change tzname, as this makes MinGW dump core (Bug#21020).
58531         Instead, store the tzname copy in the struct tm_zone object.
58532         Problem reported by Eli Zaretskii in: http://bugs.gnu.org/21020#48
58533         * lib/strftime.c [!_LIBC]:
58534         * lib/time_rz.c: Include time-internal.h.
58535         * lib/strftime.c (strftime_case_) [!HAVE_TM_ZONE]: Infer the zone
58536         name from *TZ rather than from TZNAME, doable because *TZ now has
58537         a tzname_copy member.
58538         * lib/time-internal.h: New file, with contents taken from
58539         lib/time_rz.c.  It's separate because strftime.c now accesses
58540         struct tm_zone members.
58541         (struct tm_zone) [HAVE_TZNAME && !HAVE_TM_ZONE]:
58542         New member tzname_copy.
58543         * lib/time_rz.c (struct tm_zone): Move to time-internal.h.
58544         (tzalloc) [HAVE_TZNAME && !HAVE_TM_ZONE]:
58545         Initialize tzname_copy member.
58546         (save_abbr) [HAVE_TZNAME && !HAVE_TM_ZONE]: Save abbreviation
58547         in tzname_copy member.
58548         (revert_tz) [HAVE_TZNAME]: Remove no-longer-needed tzname saving.
58549         (restore_tzname): Remove; no longer needed.  All calls removed.
58550         * modules/time_rz (Files): Add lib/time-internal.h.
58552         time: port __need_time_t to MinGW
58553         * lib/time.in.h (__need_time_t): Do not treat specially on MinGW.
58554         Fix reported by Eli Zaretskii in: http://bugs.gnu.org/21020#36
58556 2015-07-25  Paul Eggert  <eggert@cs.ucla.edu>
58558         strftime: fix newly-introduced bug on Solaris
58559         * lib/strftime.c (strftime_case_): Set the local variable 'zone'
58560         consistently at the start, rather than doing some of the setup at
58561         the start and some in the %Z format spec.  This is cleaner, and
58562         works better with time_rz on platforms like Solaris where struct
58563         tm lacks a tm_zone member, as when !HAVE_TM_GMTOFF %z's calls to
58564         mktime_z and localtime_rz can mess up the tzname cache.
58566         test-strftime: test for Solaris bug
58567         * modules/strftime-tests (Depends-on): Add strerror.
58568         * tests/test-strftime.c: Include <errno.h>.
58569         (posixtm_test): New function, containing the old 'main'.
58570         (struct tzalloc_test, struct localtime_rz_test): New types.
58571         (TZ, LT): New static vars.
58572         (tzalloc_test): New function.
58573         (main): Rewrite in terms of posixtm_test and tzalloc_test.
58575         time_rz: port to Solaris etc.
58576         Works around a tzname problem on platforms like Solaris that have
58577         tzname but not tm_zone, by setting tzname at the appropriate time
58578         and restoring it later.
58579         * lib/time_rz.c (tzname_address, tzname_value) [HAVE_TZNAME]:
58580         New static vars.
58581         (save_abbr) [HAVE_TZNAME]: Set them.
58582         (revert_tz) [HAVE_TZNAME]: Clear or use them.
58583         (restore_tzname): New function.
58584         (localtime_rz, mktime_z): Use it.
58586         time_rz: now LGPL
58587         * modules/time_rz (License): Now LGPL, because strftime depends on it.
58589         time_rz: make a constant 'const'
58590         * lib/time_rz.c (local_tz): Now const.
58592         time_rz: fix off-by-one typo
58593         * lib/time_rz.c (extend_abbrs): Fix off-by-one typo.
58595 2015-07-23  Paul Eggert  <eggert@cs.ucla.edu>
58597         fprintftime, strftime: use timezone_t args
58598         * NEWS: Document the change.
58599         * lib/fprintftime.h (fprintftime):
58600         * lib/strftime.c (extra_args) [my_strftime]:
58601         * lib/strftime.h (nstrftime):
58602         Time zone arg is now of type timezone_t, not int.
58603         * lib/strftime.c (mktime_z) [_LIBC]: New macro.
58604         (__gmtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: Remove; no longer used.
58605         (my_strftime) [emacs && !my_strftime]:
58606         (emacs_strftimeu) [emacs && !FPRINTFTIME]:
58607         Remove; Emacs doesn't need this any more.
58608         (HAVE_TZSET) [my_strftime]: Unset, since we no longer want
58609         fprintftime and nstrftime to call tzset.
58610         (ut) [!my_strftime]: Remove, replacing with ...
58611         (tz) [!my_stftime]: ... this new macro.  All uses changed.
58612         (strftime_case_): Use localtime_rz and mktime_z instead
58613         of localtime_r and mktime.
58614         * modules/fprintftime (Depends-on): Add time_rz.
58615         * modules/strftime (Depends-on): Add time_rz.  Remove time_r.
58616         * tests/test-strftime.c (main): Adjust to new nstrftime API.
58618         time_rz: new module
58619         * MODULES.html.sh: Add time_rz.
58620         * lib/time_rz.c, m4/time_rz.m4, modules/time_rz: New files.
58621         * lib/time.in.h (timezone_t, tzalloc, tzfree, localtime_rz, mktime_z):
58622         New decls if _GNU_SOURCE && @GNULIB_TIME_RZ@ && ! @HAVE_TIMEZONE_T@.
58623         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_DEFAULTS):
58624         New var HAVE_TIMEZONE_T (default 0).
58625         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS):
58626         New var GNULIB_TIME_RZ (default 0).
58627         * modules/time (time.h): Substitute the new vars.
58629         flexmember: license is now unlimited
58630         * modules/flexmember (License): Change to unlimited,
58631         since its only source file gives an unlimited license.
58633 2015-07-15  Eric Blake  <eblake@redhat.com>
58635         maint: update copyright paper procedures
58636         * config/srclist.txt: Drop outdated files.
58637         * doc/Copyright/conditions.txt: Update to latest.
58638         * doc/Copyright/assign.changes.manual: Delete.
58639         * doc/Copyright/assign.future.manual: Likewise.
58640         * doc/Copyright/assign.manual: Likewise.
58641         * doc/Copyright/assign.translation.manual: Likewise.
58642         * doc/Copyright/disclaim.changes.manual: Likewise.
58643         * doc/Copyright/disclaim.manual: Likewise.
58644         * doc/Copyright/disclaim.program: Likewise.
58646 2015-07-07  Daiki Ueno  <ueno@gnu.org>
58648         localename: fix link error on Illumos
58649         Illumos defines __sun, but does not have getlocalename_l nor the
58650         equivalent.  This partially reverts commit 387c214.
58651         * m4/localename.m4 (gl_LOCALENAME): Check if getlocalename_l is
58652         available, as well as uselocale.
58653         * lib/localename.c [HAVE_USELOCALE && __sun]: Don't fallback to
58654         use getlocalename_l if it is not available.
58656 2015-07-07  Daiki Ueno  <ueno@gnu.org>
58658         unistr/uN-strtok-tests: avoid a trivial leak
58659         * tests/unistr/test-u-strtok.h (test_u_strtok): Untabify.  Free
58660         input and delim after the multibyte delimiter tests.
58662 2015-07-04  Paul Eggert  <eggert@cs.ucla.edu>
58664         file-has-acl, acl-permissions: fix HP-UX typos
58665         Problem reported by John David Anglin in: http://bugs.gnu.org/20979
58666         * lib/file-has-acl.c (file_has_acl):
58667         * lib/set-permissions.c (context_acl_from_mode)
58668         (context_aclv_from_mode, set_acls):
58669         Fix some obvious typos when HAVE_GETCL /* HP-UX */.
58670         They were introduced by the recent ACL changes.
58672         regex: match current GNU grep behavior
58673         These symbols have not matched GNU grep behavior for quite some time.
58674         Fix prompted by Balazs Kezes bug report at: http://bugs.gnu.org/20974
58675         * lib/regex.h (RE_SYNTAX_GREP, RE_SYNTAX_EGREP):
58676         Change to match current GNU behavior.
58677         Simplify by expressing it as differences from POSIX BREs and EREs.
58678         (RE_SYNTAX_POSIX_EGREP): No longer differs from GNU behavior.
58680 2015-07-03  Jim Meyering  <meyering@fb.com>
58682         set-permissions.c: adjust acl_from_mode's cpp guard
58683         * lib/set-permissions.c (acl_from_mode): Guard with #ifdef
58684         directives identical to those guarding the sole use.
58685         Otherwise, on some systems, we'd get a warning about
58686         the function being defined but not used.
58687         Also, filter through cppi to correct misleading indentation
58688         of cpp directives.
58690 2015-07-03  Pádraig Brady  <P@draigBrady.com>
58692         tests: restrict shells to those that support 'local'
58693         The local keyword is very widely supported and used
58694         in tests in coreutils and grep at least.  Therefore
58695         restrict to testing with shells that support it.
58696         This mainly excludes /bin/sh on Solaris.
58697         * tests/init.sh (gl_shell_test_script_): Add a test for 'local'.
58699 2015-07-03  Seiya Kawashima  <skawashima@uchicago.edu>  (tiny change)
58700         and Daiki Ueno  <ueno@gnu.org>
58702         unistr/uN-strtok: handle multibyte delimiters
58703         Previously, uN_strtok moved PTR to the next unit to the token end.
58704         When DELIM contained a multibyte character, the new position could
58705         be a middle of a multibyte character.
58706         * lib/unistr/u-strtok.h (FUNC): Place PTR at the next character
58707         after the token.
58708         * lib/unistr/u8-strtok.c (U_STRMBLEN): New macro.
58709         * lib/unistr/u16-strtok.c (U_STRMBLEN): New macro.
58710         * lib/unistr/u32-strtok.c (U_STRMBLEN): New macro.
58711         * modules/unistr/u8-strtok (Depends-on): Depend on
58712         unistr/u8-strmblen.
58713         * modules/unistr/u16-strtok (Depends-on): Depend on
58714         unistr/u16-strmblen.
58715         * modules/unistr/u32-strtok (Depends-on): Depend on
58716         unistr/u32-strmblen.
58717         * tests/unistr/test-u-strtok.h: New file.
58718         * tests/unistr/test-u8-strtok.c: New file.
58719         * tests/unistr/test-u16-strtok.c: New file.
58720         * tests/unistr/test-u32-strtok.c: New file.
58721         * modules/unistr/u8-strtok-tests: New file.
58722         * modules/unistr/u32-strtok-tests: New file.
58723         * modules/unistr/u16-strtok-tests: New file.
58725 2015-07-02  Friedrich Haubensak  <hsk@fli-leibniz.de>
58727         update-copyright: fix test failure with perl >= 5.22 (trivial)
58728         * build-aux/update-copyright: Escape a literal left curly bracket,
58729         required with perl >= 5.22
58731 2015-07-02  Daiki Ueno  <ueno@gnu.org>
58733         u{16,32}-strstr-tests: relax timeout condition
58734         On slower platforms (e.g., Solaris 10/SPARC), u{16,32}-strstr
58735         tests can take longer than 5 seconds to complete.
58736         Reported by Dagobert Michelsen in:
58737         https://lists.gnu.org/r/bug-libunistring/2015-06/msg00006.html
58738         * tests/unistr/test-u16-strstr.c (main): Increase timeout from 5
58739         seconds to 10 seconds.
58740         * tests/unistr/test-u32-strstr.c (main): Likewise.
58742 2015-07-01  Pavel Raiskup  <praiskup@redhat.com>
58744         gnulib-common.m4: change the ARFLAGS default to 'cr'
58745         In some GNU/Linux distributions people started to compile 'ar'
58746         binary with --enable-deterministic-archives (binutils project).
58747         That, however, in combination with previous autotools long time
58748         working default AR{_,}FLAGS=cru causes warnings on such
58749         installations:
58750         ar: `u' modifier ignored since `D' is the default (see `U')
58751         * m4/gnulib-common.m4 (gl_PROG_AR_RANLIB): Set ARFLAGS='cr' if not
58752         set already.
58754 2015-07-01  Pavel Raiskup  <praiskup@redhat.com>
58756         selinux-h: avoid double free after *getfilecon()
58757         Originally reported by Ben Shelton on bug-tar:
58758         http://lists.gnu.org/r/bug-tar/2015-04/msg00009.html
58759         * lib/getfilecon.c (map_to_failure): Set the already freed '*con'
58760         pointer to NULL.  Man getfilecon(3) says that any non-NULL '*con'
58761         param should be freed by freecon(3) (regardless the return value).
58763 2015-07-01  Pavel Fedin  <p.fedin@samsung.com>
58765         fix pty related tests issues on Windows (trivial)
58766         * lib/grantpt.c (grantpt): grantpt.c seems to be never used on Windows,
58767         however it's still present in tests/ subdirectory of the final project.
58768         Therefore avoid it to pass `make check`.
58769         * tests/test-openpty.c (main): Windows has no PTYs and gnulib's openpty()
58770         will just return -ENOSYS, so avoid this non applicable test allowing
58771         the build to proceed.
58773 2015-07-01  Pádraig Brady  <P@draigBrady.com>
58775         acl: fix definition of acl_from_mode on FreeBSD
58776         This was causing basic coreutils copy operations to fail
58777         with ENOTSUP or ENOENT error messages.
58778         * lib/acl-internal.h (acl_from_mode): Only define when
58779         ! defined HAVE_ACL_FROM_TEXT.  That allows the version
58780         of acl_from_mode() defined in lib/set-permissions.c to
58781         be used on FreeBSD at least.
58782         * lib/set-permissions.c: Fix up comment spelling,
58783         and a redundant variable assignment; noticed in passing.
58785 2015-06-30  Pádraig Brady  <P@draigBrady.com>
58787         readutmp: port to FreeBSD >= 9
58788         * lib/readutmp.h: Map utmpxname() to setutxdb().
58789         With that coreutils who(1) and pinky(1) tests pass.
58791 2015-06-30  Paul Eggert  <eggert@cs.ucla.edu>
58793         mgetgroups: port to strict OS X
58794         The previous fix wasn't working, so use a bigger hammer (Bug#20923).
58795         * lib/mgetgroups.c: Ignore -Wpointer-sign diagnostics.
58796         (getgrouplist_gids) [HAVE_GETGROUPLIST]: Remove.  All uses removed.
58797         * m4/mgetgroups.m4 (gl_MGETGROUPS): Revert recent changes.
58799 2015-06-29  Paul Eggert  <eggert@cs.ucla.edu>
58801         mgetgroups: port to strict OS X
58802         * doc/glibc-functions/getgrouplist.texi (getgrouplist):
58803         Document the getgrouplist problem.
58804         * lib/mgetgroups.c (getgrouplist_gids) [HAVE_GETGROUPLIST]:
58805         New macro.
58806         (mgetgroups): Use it.
58807         * m4/mgetgroups.m4 (gl_MGETGROUPS):
58808         Check for OS X signature for getgrouplist.
58810 2015-06-29  Jim Meyering  <meyering@fb.com>
58812         linkat: fix invalid definition of LINKAT_SYMLINK_NOTSUP on OS X
58813         It started like this when building coreutils' latest on OS X,
58814         invoking ./configure with a nonempty --cache=.cache:
58816           lib/linkat.c:46:42: error: operator '||' has no right operand
58817           lib/linkat.c: In function 'rpl_linkat':
58818           lib/linkat.c:330:27: error: #if with no expression
58820         Here's linkat.c's line 46:
58822           #if !HAVE_LINKAT || LINKAT_SYMLINK_NOTSUP
58824         Here's some context:
58826           $ grep linkat_nofoll .cache
58827           gl_cv_func_linkat_nofollow=${gl_cv_func_linkat_nofollow=no}
58828           $ grep LINKAT_SYM lib/config.h
58829           #define LINKAT_SYMLINK_NOTSUP
58831         The problem is that m4/linkat.m4's gl_FUNC_LINKAT
58832         uses AC_CACHE_CHECK to set LINKAT_SYMLINK_NOTSUP,
58833         but that violates a tenet of AC_CACHE_CHECK: it must
58834         have no side effect other than setting its cache variable.
58836         What happens is that when the cache is set, we'd skip the
58837         code in that AC_CACHE_CHECK call, and leave LINKAT_SYMLINK_NOTSUP
58838         defined to whatever value it happened to have in configure's
58839         environment.  In my case, it was not defined, so this later code:
58841           AC_DEFINE_UNQUOTED([LINKAT_SYMLINK_NOTSUP], [$LINKAT_SYMLINK_NOTSUP],
58842             [Define to 1 if linkat can create hardlinks to symlinks])
58844         would emit code with an empty RHS.
58846         * m4/linkat.m4 (gl_FUNC_LINKAT): Move the setting of
58847         $LINKAT_SYMLINK_NOTSUP out of the AC_CACHE_CHECK code block.
58849 2015-06-28  Jim Meyering  <meyering@fb.com>
58851         mountlist: avoid an unused-label warning on OS X
58852         * lib/mountlist.c (read_file_system_list) [MOUNTED_GETMNTINFO]:
58853         Building on OS X, I saw a warning about the "free_then_fail" label
58854         being unused.  Give it the _GL_UNUSED_LABEL attribute.
58856         error.c: correct printf-style format: %d -> %u
58857         * lib/error.c (error_at_line): Correct __fxprintf format to use %u,
58858         rather than %d, to match the type of "line_number", unsigned int.
58860 2015-06-25  Pádraig Brady  <P@draigBrady.com>
58862         fts: avoid reading beyond the heap allocation
58863         GCC 5.1.1 with -O2 and -fsanitize=address reports
58864         a read of size 4 from a heap object of size 3 is indeed invalid,
58865         though this may be due to incorrect padding assumptions by GCC, see:
58866         https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66661
58867         * lib/fts.c (fts_alloc): Increase allocation to alignof(FTSENT).
58868         * modules/fts: Depend on stdalign.
58870 2015-06-24  Pádraig Brady  <P@draigBrady.com>
58872         savedir: avoid undefined behavior in qsort call
58873         GCC 5.1.1 -fsanitize=undefined with glibc 2.21 is returning:
58874         "runtime error: null pointer passed as argument 1,
58875          which is declared to never be null"
58876         * lib/savedir.c (streamsavedir): Avoid the call with no entries.
58878 2015-06-24  Pádraig Brady  <P@draigBrady.com>
58880         userspec: avoid undefined behavior in gettext call
58881         GCC 5.1.1 -fsanitize=undefined with glibc 2.21 is returning:
58882         "runtime error: null pointer passed as argument 2,
58883          which is declared to never be null"
58884         * lib/userspec.c (parse_with_separator): Avoid passing NULL to gettext()
58886 2015-06-20  Glenn Morris  <rgm@gnu.org>
58888         gitlog-to-changelog: improve gitmerge.el commits
58889         Let the Emacs ChangeLog generation process exclude "skipped"
58890         messages from merge commits (Bug#20717).
58891         * build-aux/gitlog-to-changelog: Handle gitmerge.el skipped commits.
58893 2015-06-20  Paul Eggert  <eggert@cs.ucla.edu>
58895         wchar: fix MinGW compilation warnings
58896         This lets Texinfo compile cleanly.  See Eli Zaretskii in:
58897         http://lists.gnu.org/r/bug-gnulib/2015-06/msg00050.html
58898         * lib/wchar.in.h: Do not use special invocation convention on MinGW.
58900 2015-06-20  Daiki Ueno  <ueno@gnu.org>
58902         uniname/uniname-tests: use pristine data files
58903         For copyright and maintenance reasons, use the data files from UCD
58904         without modification.
58905         * tests/uniname/test-uninames.c (FIELDLEN): Remove.
58906         (getfield): Remove.
58907         (aliases_count): New global variable.
58908         (fill_names): Skip comments and empty lines in the input.  Don't
58909         use getfield.
58910         (fill_aliases): Likewise.
58911         (main): Change the expected command line arguments to:
58912         NAMES... ["--" ALIASES...].
58913         * tests/uniname/test-uninames.sh: Adjust to the change in
58914         test-uninames.c.
58915         * tests/uniname/UnicodeDataNames.txt: Remove.
58916         * tests/uniname/UnicodeData.txt: New file, from Unicode 8.0.0.
58917         * tests/uniname/NameAliases.txt: Use the pristine copy of the data
58918         file from Unicode 8.0.0.
58920 2015-06-19  Pádraig Brady  <P@draigBrady.com>
58922         linked-list, linkedhash-list: avoid compiler warnings
58923         * lib/gl_anytree_list2.h: Add _GL_ATTRIBUTE_PURE to avoid
58924         -Werror=suggest-attribute=pure (from GCC 5.1.1).
58926 2015-06-19  Daiki Ueno  <ueno@gnu.org>
58928         libunistring: bump minimum version to 0.9.6
58929         * all modules depending on updated Unicode data: Regenerate.
58930         The modules are listed by a script that does:
58931         - for each file listed by: git show --oneline --name-only 705f4efc
58932           - deduce the containing modules, based on "Files:"
58933         - deduce the modules which depend on the containing modules, based
58934           on "Depends-on:"
58936 2015-06-18  Daiki Ueno  <ueno@gnu.org>
58938         uniname/uniname: update to Unicode 8.0.0
58939         * lib/uniname/uninames.h: Regenerate.
58940         * tests/uniname/NameAliases.txt: Update from Unicode 8.0.0.
58941         * tests/uniname/UnicodeDataNames.txt: Update from Unicode 8.0.0.
58943 2015-06-18  Daiki Ueno  <ueno@gnu.org>
58945         libunistring: update to Unicode 8.0.0
58946         * lib/gen-uni-tables.c (SIZEOF): New macro.
58947         (output_numeric): Increase the maximum number of fractions from
58948         128 to 160.  Increase the level3 value width from 7 bits to 8
58949         bits.  Use SIZEOF instead of a hard-coded integer.
58950         (output_blocks): Decrease the cut-off threshold from 0x30000 to
58951         0x28000.
58952         (fill_blocks): Increase the maximum number of blocks from 256 to
58953         384.  Use SIZEOF instead of a hard-coded integer.
58954         (get_lbp): Adjust to new characters added in Unicode 8.0.0.
58955         * lib/unictype/numeric.c (uc_numeric_value): Adjust the level3
58956         value width.
58957         * lib/unilbrk/lbrktables.c (unilbrk_table): Implement LBP21b and
58958         a new case added to LBP22.
58959         * lib/uniwidth/width.c (nonspacing_table_data): Add U+08E3,
58960         U+A69E, U+FE2E..U+FE2F, U+111CA..U+111CC, U+11300,
58961         U+115DC..U+115DD, U+1171D..U+1171F, U+11722..U+11725,
58962         U+11727..U+1172B, U+1DA00..U+1DA36, U+1DA3B..U+1DA6C, U+1DA75,
58963         U+1DA84, U+1DA9B..U+1DA9F, and U+1DAA1..U+1DAAF.
58964         * tests/uniwidth/test-uc_width2.sh: Same updates as in
58965         lib/uniwidth/width.c.
58966         * all generated files under lib/uni* and tests/uni*: Regenerate.
58968 2015-06-16  Pádraig Brady  <P@draigBrady.com>
58970         gnu-web-doc-update: add --mirror to remove stale files
58971         * build-aux/gnu-web-doc-update: Add a --mirror option to remove
58972         out of date files from the CVS server.  Since this is usually
58973         appropriate, a prompt is given when the option is not specified,
58974         along with the `cvs remove` command that would be run.
58976 2015-06-06  Paul Eggert  <eggert@cs.ucla.edu>
58978         acl-permissions: pacify -Wsuggest-attribute=const
58979         Problem reported by Masanari Iida in: http://bugs.gnu.org/20753
58980         * lib/acl-internal.h (free_permission_context):
58981         Declare with attribute const if ! (defined USE_ACL &&
58982         (HAVE_ACL_GET_FILE || defined GETACL)).
58984         fsync: document AIX misbehavior
58985         * doc/posix-functions/fsync.texi (fsync):
58986         Document failure on AIX with read-only file descriptor.
58988 2015-06-05  Jonathan Perkin  <jperkin@joyent.com>  (tiny change)
58990         stdio: Don't redefine gets when using C++
58991         * lib/stdio.in.h (gets): Disable warning on C++.
58993 2015-06-05  Paul Eggert  <eggert@cs.ucla.edu>
58995         acl-permissions: port to AIX, C89 HP-UX
58996         Problems reported by Michael Felt.
58997         * lib/file-has-acl.c (file_has_acl) [HAVE_STATACL]:
58998         * lib/get-permissions.c (get_permissions) [USE_ACL && HAVE_STATACL]:
58999         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]:
59000         * lib/set-permissions.c (set_acls) [HAVE_ACLX_GET && ACL_AIX_WIP]:
59001         Add cast for AIX, whose system calls are declared to accept
59002         char * even though the arguments are really char const *.
59003         * lib/get-permissions.c (get_permissions):
59004         If USE_ACL && HAVE_GETACL /* HP-UX */, don't assume C99.
59005         If USE_ACL && HAVE_STATACL /* older AIX */, add missing decl
59006         that broke a build.
59007         * lib/mountlist.c (read_file_system_list) [MOUNTED_VMOUNT]:
59008         Rework types to pacify xlc.
59010 2015-06-03  Pádraig Brady  <P@draigBrady.com>
59012         vasprintf-posix: avoid compiling vasnprintf where possible
59013         * modules/vasprintf-posix: Avoid compiling the large vasnprintf
59014         module where not required.  For example on a GNU/Linux system
59015         when gnulib-tool is run with the --conditional-dependencies option.
59017 2015-06-02  Pádraig Brady  <P@draigBrady.com>
59019         file-has-acl: fix build on Mac OS X 10
59020         This reverts commit f1b37e3a which doesn't work on Mac OS X >= 10.4
59021         which has an incompatible 6 parameter getxattr() call.
59022         * doc/glibc-functions/getxattr.texi: Mention the divergent getxattr()
59023         call on Mac OS X >= 10.4.
59024         * doc/glibc-functions/fgetxattr.texi: Likewise.
59025         * lib/file-has-acl.c: Revert to more complete combined check.
59026         * m4/acl.m4 (gl_FILE_HAS_ACL): Likewise.
59027         Reported by Jack Howarth.
59029 2015-06-02  Pádraig Brady  <P@draigBrady.com>
59031         prefix-gnulib-mk: remove no longer needed special case
59032         * build-aux/prefix-gnulib-mk (prefix): Since commit e3704b9c,
59033         continued lib_SOURCES lines are no longer present,
59034         so special case handling of such entries is not required.
59036 2015-06-01  Pádraig Brady  <P@draigBrady.com>
59038         acl: don't depend on the deprecated qacl module
59039         * modules/acl (Depends-on): Use q{copy,set}-acl instead.
59041 2015-06-01  Pádraig Brady  <P@draigBrady.com>
59043         gnulib-tool: concatenate lib_SOURCES to a single line
59044         * gnulib-tool: Refactor the line merging sed logic,
59045         and use that to output a single lib_SOURCES line for each module.
59046         gnulib using projects often postprocess this output to prepend
59047         subdir paths to each item, and having a single line simplifies this
59048         processing allowing better decoupling from the gnulib-tool output.
59050 2015-06-01  Pavel Fedin  <p.fedin@samsung.com>
59052         pthread_sigmask: discount system version if a simple macro (trivial)
59053         MinGW64 has: #define pthread_sigmask(H, S1, S2) 0
59054         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Call the
59055         function to ensure it's available.
59057 2015-05-31  Pádraig Brady  <P@draigBrady.com>
59059         readlinkat: avoid OS X 10.10 trailing slash bug
59060         * doc/posix-functions/readlink.texi: Mention that OS X 10.10
59061         has this bug.
59062         * doc/posix-functions/readlinkat.texi: Likewise.  Also mention
59063         that OS X 10.10 has this function.
59064         * lib/readlinkat.c (rpl_readlinkat): Handle the trailing slash bug,
59065         as done for readlink().
59066         * m4/readlinkat.m4 (gl_FUNC_READLINKAT): Check for the readlink()
59067         trailing slash bug, and assume readlinkat() has the same issue.
59068         Also fix a typo where $gl_cv_decl_readlink_works was tested,
59069         rather than the correct $gl_cv_decl_readlinkat_works.
59071 2015-05-29  Andreas Gruenbacher  <andreas.gruenbacher@gmail.com>
59073         acl-permissions: Fix build on Mac OS X and older AIX (Bug#20681)
59074         * lib/set-permissions.c (set_acls): Fix more errors introduced in the acl
59075         module rewrite.
59077         acl-permissions: Fix build on Solaris and Cygwin
59078         Reported by Tom G. Christensen <tgc@jupiterrise.com>:
59079         * lib/set-permissions.c (set_acls): The count, entries, ace_count, and
59080         ace_entries variables have moved into struct permission_context but
59081         they were still accessed as local variables here.
59083 2015-05-29  Pádraig Brady  <P@draigBrady.com>
59085         linkat: avoid OS X 10.10 trailing slash with symlink bug
59086         On Darwin 14.3.0 linkat(,"path1",,"dangling_symlink/",)
59087         causes the symlink to be dereferenced, and if it points
59088         to a non existent file, that file will be created as
59089         a hard link to "path1".
59090         This fixes a test failure in test-linkat.c.
59091         * m4/linkat.m4 (gl_FUNC_LINKAT): Augment the test with
59092         this case.  The existing workaround in linkat.c for
59093         trailing slash issues, suffices for this case.
59094         * doc/posix-functions/linkat.texi: Add OS X 10.10 to
59095         the list of platforms with trailing slash issues.
59097 2015-05-28  Pádraig Brady  <P@draigBrady.com>
59099         unlinkat: handle ignoring of ".." on Darwin 14
59100         * lib/unlinkat.c: unlinkat() has the same bug as unlink()
59101         on Mac OS X 10.10, where it ignores paths with a trailing "..",
59102         so handle in the same manner.
59103         * m4/unlinkat.m4: Comment on this Darwin issue.
59104         * doc/posix-functions/unlink.texi: Update the latest version
59105         where the issue was seen.
59106         * doc/posix-functions/unlinkat.texi: Mention this issue.
59107         Fixes a test failure in test-unlinkat.c.
59109 2015-05-27  Paul Eggert  <eggert@cs.ucla.edu>
59111         qacl: split into qcopy-acl and qset-acl
59112         Emacs needs the former, but not the latter.
59113         * modules/acl-permissions: New file, containing most of the old qacl.
59114         * modules/file-has-acl (Depends-on): Depend on acl-permissions, not qacl.
59115         * modules/qacl: Now merely depends on qcopy-acl and qset-acl.
59116         * modules/qcopy-acl, modules/qset-acl: New files.
59117         * MODULES.html.sh (File system functions):
59118         Mention the new modules, and mention qacl while we're at it.
59120 2015-05-27  Glenn Morris  <rgm@gnu.org>
59122         gitlog-to-changelog: new option --ignore-line
59123         (This patch is imported from the GNU Emacs master.)
59124         This option ignores individual commit lines matching a pattern.
59125         * build-aux/gitlog-to-changelog: Add --ignore-line option.
59127 2015-05-27  Andreas Gruenbacher  <agruenba@redhat.com>
59129         qacl: Reimplement qset_acl and qcopy_acl (Bug#20666)
59130         Implement get_permissions and set_permissions primitives for getting all
59131         the permissions of a file, storing them, and later setting them. (In the
59132         minimal case, the permissions consist only of a file mode.) Reimplement
59133         qset_acl and qcopy_acl based on these new primitives: this avoids code
59134         duplication and makes error handling more consistent.
59135         The Solaris and Cygwin code still uses duplicate code paths for setting
59136         a file mode while making sure that no acls exist and setting an explicit
59137         acl; this is no worse than before, but could be cleaned up.  The AIX
59138         code still doesn't read ACLs, it only makes sure that acls don't get in
59139         the way when setting a file mode.
59140         * lib/acl-internal.h (struct permission_context): New data structure.
59141         (get_permissions, set_permissions, free_permission_context): Declare.
59142         * lib/acl-internal.c (free_permission_context): New helper function.
59143         * lib/get-permissions.c (get_permissions): New helper function split off
59144         from qcopy_acl.
59145         * lib/set-permissions.c: (set_acls_from_mode): On Solaris, Cygwin, and
59146         AIX, set a file's permissions based only on a file mode.
59147         (acl_from_mode, context_acl_from_mode, context_aclv_from_mode): All
59148         other platforms construct a temporary acl from the file mode and set
59149         that acl in the same way as setting an acl read from the source file.
59150         This should help avoid code duplication and inconsistent / buggy
59151         behavior.
59152         (set_acls): New helper function Split off from qcopy_acl.
59153         (chmod_or_fchmod): Moved here from qset-acl.c.
59154         (set_permissions): New helper function.
59155         * lib/qcopy-acl.c (qcopy_acl): Rewrite using get_permissions and
59156         set_permissions.
59157         * lib/qset-acl.c (qset_acl): Rewrite using set_permissions.
59158         * modules/qacl: Add get-permissions.c and set-permissions.c.
59160         file-has-acl: Split feature tests again (Bug#20667)
59161         * lib/file-has-acl.c: Instead of testing for
59162         XATTR_NAME_POSIX_ACL_ACCESS and XATTR_NAME_POSIX_ACL_DEFAULT,
59163         define them when needed.
59164         * m4/acl.m4 (gl_FILE_HAS_ACL): With that, Paul's
59165         GETXATTR_WITH_POSIX_ACLS change shouldn't be needed anymore.
59167 2015-05-27  Pádraig Brady  <P@draigBrady.com>
59169         string: fix build failure on BSD/OSX with FORTIFY_SOURCE
59170         This avoids a conflict with "FORTIFY_SOURCE" variants
59171         of the string functions when they're replaced on NetBSD-6.0.1
59172         and Darwin-14.3.0 at least.
59173         * lib/string.in.h: Avoid including our "lib/string.h" while
59174         including the system <string.h>.
59176 2015-05-26  Eric Blake  <eblake@redhat.com>
59178         stdio: limit __gnu_printf__ witness to gcc 4.4+
59179         * lib/error.h (_GL_ATTRIBUTE_SPEC_PRINTF): Move gcc version probe...
59180         * m4/stdio_h.m4 (gl_STDIO_H): ...here.
59182         error: use correct printf attributes on mingw
59183         * lib/stdio.in.h (_GL_ATTRIBUTE_SPEC_PRINTF): New define.
59185         inttypes: force correct mingw PRIdMAX even without <stdio.h>
59186         * modules/inttypes (Depends-on): Require extensions, so that mingw
59187         always uses GNU style inttypes.
59188         * lib/inttypes.in.h: On mingw, include <stdio.h>.
59190         stdio: fix probe on mingw under gcc 5.1
59191         * m4/stdio_h.m4 (gl_STDIO_H): Change to compile test, to work
59192         around new gcc preprocessor rules.
59194 2015-05-07  Glenn Morris  <rgm@gnu.org>
59196         gitlog-to-changelog: parse "Tiny-change"
59197         * build-aux/gitlog-to-changelog: Treat "Tiny-change" like
59198         "Copyright-paperwork-exempt".  (Bug#20324)
59200 2015-05-06  Pádraig Brady  <P@draigBrady.com>
59202         doc: document glibc posix_fallocate() issues
59203         * doc/posix-functions/posix_fallocate.texi: Mention the
59204         glibc efficiency problems and issues with NFS.
59206 2015-05-05  Karl Berry  <karl@freefriends.org>
59208         * build-aux/gendocs.sh (usage): document new css default
59209         for HTML (--htmlarg).
59211 2015-04-29  Paul Eggert  <eggert@cs.ucla.edu>
59213         extern-inline: no need for workaround in GCC 5.1
59214         * doc/extern-inline.texi (extern inline):
59215         * m4/extern-inline.m4 (gl_EXTERN_INLINE):
59216         GCC bugs 54113 and 63877 are fixed in GCC 5.1, so don't work
59217         around these bugs in GCC 5.1 and later.  Maybe in a decade or
59218         two we can remove these workarounds.
59220 2015-04-28  Pádraig Brady  <P@draigBrady.com>
59222         eealloc, pagealign_alloc, xalloc: avoid clang warnings
59223         Avoid [-Wunknown-attributes] warnings like:
59224         warning: unknown attribute '__alloc_size__' ignored
59225         * lib/xalloc.h: Don't use the __alloc_size__  attribute
59226         with clang, as support has been fully removed as of clang 3.5:
59227         https://github.com/llvm-mirror/clang/commit/c047507a
59228         * lib/eealloc.h: Likewise.
59229         * lib/pagealign_alloc.h: Likewise.
59231 2015-04-27  Paul Eggert  <eggert@cs.ucla.edu>
59233         tests: pacify GCC 5.1's stricter printf checking
59234         * tests/test-dirname.c (main):
59235         * tests/test-getaddrinfo.c (simple):
59236         * tests/test-getlogin.c (main):
59237         * tests/test-getndelim2.c (main):
59238         * tests/test-inttostr.c (CK):
59239         * tests/test-md5.c (main):
59240         * tests/test-read-file.c (main):
59241         * tests/test-sha1.c (main):
59242         Fix mismatches between printf format and value signedness.
59243         * tests/test-inttostr.c (FMT, CAST_VAL, V_min, V_max):
59244         Remove, as CAST_VAL always returned a value of type uintmax_t.
59246         fts: port to GCC 5.1 with --enable-gcc-warnings
59247         Without this fix, GCC 5.1 (correctly) warns about a subscript
59248         error on the fts_name component of FTSENT.  It's actually a
59249         flexible member, so define it that way on C99 or later hosts.
59250         * lib/fts.c (fts_alloc): Use offsetof, not sizeof, for a
59251         structure that now has a flexible array member.
59252         * lib/fts_.h (__FLEXIBLE_ARRAY_MEMBER): New macro.
59253         (FTSENT): fts_name is now flexible on C99-or-later platforms.
59254         * modules/fts (Depends-on): Add flexmember.
59256 2015-04-26  Paul Eggert  <eggert@cs.ucla.edu>
59258         file-has-acl: port to CentOS 6
59259         Problem reported by Tom G. Christensen in:
59260         http://lists.gnu.org/r/bug-gnulib/2015-04/msg00074.html
59261         * lib/file-has-acl.c: Use GETXATTR_WITH_POSIX_ACLS instead of a
59262         combination of HAVE_SYS_XATTR_H, HAVE_LINUX_XATTR_H, and
59263         HAVE_GETXATTR.
59264         * m4/acl.m4 (gl_FILE_HAS_ACL): Test fot the entire combination of
59265         linux/xattr.h, sys/xattr.h, getxattr, XATTR_NAME_POSIX_ACL_ACCESS,
59266         and XATTR_NAME_POSIX_ACL_DEFAULT, since that's what
59267         file-has-acl.c actually needs.
59269 2015-04-26  Pádraig Brady  <P@draigBrady.com>
59271         file-has-acl: always return false when ACLs aren't supported
59272         * lib/file-has-acl.c (file_has_acl): Consistent with other paths,
59273         change the GNU/Linux getxattr path, to transform "not supported"
59274         errors to a false return rather than an error.  This is handled
59275         within file_has_acl() due to the platform specific tests to
59276         determine if ACLs are not supported.
59278 2015-04-25  Paul Eggert  <eggert@cs.ucla.edu>
59280         gettext: propagate po/Makefile.in.in too
59281         * build-aux/po/Makefile.in.in: Copy from latest gettext.
59282         * config/srclist.txt: In build-aux/po, copy Makefile.in.in and
59283         remove-potcdate.sin from $GETTEXT.  This fixes a version mismatch
59284         between Makefile.in.in and the gettext-runtime m4 files.
59286 2015-04-24  Paul Eggert  <eggert@cs.ucla.edu>
59288         file-has-acl: new module, split from acl
59289         And add a new module file-has-acl-tests to match.
59290         I ran into a problem with the recent changes to the acl module,
59291         as they introduced a typo 'test use_xattrs = 0' into 'configure'.
59292         When using the fixed version with Emacs, I discovered that
59293         file-has-acl wasn't separated out well enough for Emacs (e.g., it
59294         had multiple libraries, but needed only one), so I fixed that too.
59295         * NEWS: Document this incompatible change.
59296         * modules/file-has-acl, modules/file-has-acl-tests: New files.
59297         * m4/acl.m4 (gl_FUNC_ACL_ARG): New macro, split from gl_FUNC_ACL.
59298         Initialize gl_need_lib_has_acl.
59299         (gl_FUNC_ACL): Require it.
59300         Simplify use of 'test'.  Set LIB_HAS_ACL if gl_need_lib_has_acl.
59301         Move the file-has-acl.c-relevant stuff to ...
59302         (gl_FILE_HAS_ACL): ... this new macro.  Rewrite to fix 'test
59303         use_xattrs = 0' typo, and omit some needless work.  Set
59304         gl_need_lib_has_acl=1 if we'll need LIB_HAS_ACL to be set
59305         when gl_FUNC_ACL is called.
59306         * modules/acl (Files, lib_SOURCES): Remove lib/file-has-acl.c.
59307         (Link): Remove $(LIB_HAS_ACL).
59308         * modules/acl-tests (Files, Depends-on, configure.ac, TESTS)
59309         (check_PROGRAMS): Move stuff relevant to file-has-acl to
59310         modules/file-has-acl-tests.
59311         (test_file_has_acl_LDADD): Move to modules/file-has-acl-tests.
59313         manywarnings: add GCC 5.1 warnings
59314         * build-aux/gcc-warning.spec: Add -Wabi=, -Warray-bounds,
59315         -Warray-bounds=, -Wc++14-compat, -Wc90-c99-compat,
59316         -Wc99-c11-compat, -Wshadow-ivar, -Wsized-deallocation,
59317         -Wsuggest-override, -Wuse-without-only.  Change
59318         -Wnormalized=... operands to match 5.1.
59319         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -Wbool-compare,
59320         -Wchkp, -Wdesignated-init, -Wdiscarded-array-qualifiers,
59321         -Wdiscarded-qualifiers, -Wformat-signedness,
59322         -Wincompatible-pointer-types, -Wint-conversion,
59323         -Wlogical-not-parentheses, -Wmemset-transposed-args, -Wodr,
59324         -Wshift-count-negative, -Wshift-count-overflow,
59325         -Wsizeof-array-argument, -Wsuggest-final-methods,
59326         -Wsuggest-final-types, -Wswitch-bool.  Remove -Warray-bounds,
59327         and add -Warray-bounds=2 as a special case.
59329 2015-04-21  Simon Josefsson  <simon@josefsson.org>
59331         doc: update FDL template to match FDL examples.
59332         * doc/alloca-opt.texi:
59333         * doc/alloca.texi:
59334         * doc/c-ctype.texi:
59335         * doc/c-strcase.texi:
59336         * doc/c-strcaseeq.texi:
59337         * doc/c-strcasestr.texi:
59338         * doc/c-strstr.texi:
59339         * doc/c-strtod.texi:
59340         * doc/c-strtold.texi:
59341         * doc/ctime.texi:
59342         * doc/error.texi:
59343         * doc/gcd.texi:
59344         * doc/gnulib-tool.texi:
59345         * doc/inet_ntoa.texi:
59346         * doc/intprops.texi:
59347         * doc/lib-symbol-visibility.texi:
59348         * doc/maintain.texi:
59349         * doc/parse-datetime.texi:
59350         * doc/quote.texi:
59351         * doc/regexprops-generic.texi:
59352         * doc/standards.texi: Remove spurious 'with' in FDL license
59353         template.
59355 2015-04-21  Paul Eggert  <eggert@cs.ucla.edu>
59357         lstat: fix cross-compilation 'ln -s' problem
59358         * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK):
59359         Have the test program call 'symlink' rather than a separate
59360         script run 'ln -s'; this is more likely to work in
59361         cross-compilation environments.  Reported by Pavel Fedin in:
59362         http://lists.gnu.org/r/bug-gnulib/2015-04/msg00060.html
59364 2015-04-16  Ludovic Courtès  <ludo@gnu.org>
59366         gendocs.sh: default to a common CSS style sheet for HTML output
59367         * build-aux/gendocs.sh (htmlarg): Change default value.
59369 2015-04-15  Mats Erik Andersson  <gnu@gisladisker.se>
59371         gnulib-tool: output bold attribute more portably
59372         * gnulib-tool (func_show_module_list): Change hexadecimal
59373         numbers to octal in BOLD_ON and BOLD_OFF.  The use of hex
59374         encoded numbers as arguments to `printf' is not portable,
59375         and is not claimed by POSIX.  This is the case with FreeBSD.
59377 2015-04-15  Andreas Gruenbacher  <andreas.gruenbacher@gmail.com>
59379         qacl: Simplify HP-UX acl_nontrivial check
59380         * lib/acl-internal.c: Remove struct stat parameter from HP-UX's version of
59381         acl_nontrivial. Check if the acl has at most three entries instead (it must
59382         have exactly three entries according to the HP-UX documentation). Ignore
59383         uids and gids as long as an entry is either for a user (i.e., the owner),
59384         a group (i.e., the owning group), or others.
59385         * lib/acl-internal.h: Change HP-UX's acl_nontrivial prototype.
59386         * lib/qcopy-acl.c (qcopy_acl): With that, we no longer need to stat the file.
59388 2015-04-15  Andreas Gruenbacher   <andreas.gruenbacher@gmail.com>
59390         acl: On Linux, check for acls without libacl
59391         On Linux, use the getxattr syscall instead of the acl_extended_file libacl
59392         library function to check for the presence of acls, avoiding a library.
59393         * lib/file-has-acl.c: Include xattr headers if we have them.
59394         (file_has_acl): On Linux, use getxattr().
59395         * m4/acl.m4 (gl_FUNC_ACL): Define LIB_HAS_ACL as the libraries to link with for
59396         file_has_acl(). Check for xattr headers and getxattr().
59398 2015-04-14  Ángel González  <keisial@gmail.com>
59400         tempname: avoid unused parameter warnings (trivial)
59401         * lib/tempname.c (try_dir): Tag with __GL_UNUSED.
59402         (try_nocreate): Likewise.
59404 2015-04-14  HIRAMATSU Yoshifumi  <hiramatu@boreas.dti.ne.jp>
59406         fseeko: fix build failure on NetBSD >= 6 (trivial)
59407         * lib/fseeko.c (feeko): NetBSD 6 changed the definition of _offset
59408         from 'fpos_t struct' to __off_t, which is a typedef of __int64_t.
59410 2015-04-09  Paul Eggert  <eggert@cs.ucla.edu>
59412         gitlog-to-changelog: port to MS-Windows
59413         * build-aux/gitlog-to-changelog (git_dir_option):
59414         Use strftime with "%Y-%m-%d", not "%F", to avoid a bug in
59415         MS-Windows Perl.  Reported by Eli Zaretskii in:
59416         http://lists.gnu.org/r/emacs-devel/2015-04/msg00504.html
59418 2015-04-07  Karl Berry  <karl@gnu.org>
59420         gendocs: new option --tex for passing args to texi2dvi.
59421         * build-aux/gendocs.sh: new option --tex, default -t @finalout.
59422         (TEXI2DVI): cut to just command name.
59423         (usage): mention new option, and update copyright.
59424         <generate_tex>: use it.
59426 2015-04-07  Karl Berry  <karl@gnu.org>
59428         * config/srclistvars.sh (GETTEXT): new definition.
59429         * config/srclist.txt: use it for gettext .m4 files.
59430         Thread starting at http://lists.gnu.org/r/bug-gnulib/201
59431         and confirmed at http://lists.gnu.org/r/bug-gnulib/2015-02/msg00146.html
59432         and continuing into April.
59434 2015-04-07  Daiki Ueno  <ueno@gnu.org>
59436         uniname/uniname-tests: fix failure due to alias
59437         Reported by Jack Howarth in:
59438         <https://lists.gnu.org/r/bug-libunistring/2015-04/msg00000.html>.
59439         * tests/uniname/test-uninames.c (name_has_alias): New function.
59440         (test_inverse_lookup): Exclude character name with valid alias,
59441         from randomly generated character names.
59442         (main): Fill unicode_aliases before calling test functions.
59444 2015-04-03  Giuseppe Scrivano  <gscrivan@redhat.com>
59446         hash: remove deprecated hash_insert0 function
59447         * lib/hash.h (hash_insert0): Remove deprecated function.
59448         * lib/hash.c (hash_insert0): Likewise.
59450 2015-04-02  Pádraig Brady  <P@draigBrady.com>
59452         mountlist: remove dependency on libmount
59453         * lib/mountlist.c (read_file_system_list): Parse /proc/self/mountinfo
59454         directly, rather than depending on libmount, which has many
59455         dependencies due to its dependence on libselinux, as detailed at:
59456         http://lists.gnu.org/r/bug-gnulib/2015-01/msg00063.html
59457         Note we restrict this to __linux__ as that's probably where this
59458         interface will remain.  If ever porting, it would be best
59459         to first pull the makedev() wrapper from coreutils to a gnulib module.
59460         Note also we don't add a getline dependency to the mountlist module,
59461         as all Linux versions are sufficient.
59463 2015-04-02  Paul Eggert  <eggert@cs.ucla.edu>
59465         stddef: port to pre-C11 GCC on x86
59466         On this platform, max_align_t should have an alignment of 8 even
59467         though the storage alignments of double, long, etc. max out at 4.
59468         Inspired by a comment of Andreas Schwab's here:
59469         https://sourceware.org/ml/libc-alpha/2015-04/msg00017.html
59470         * lib/stddef.in.h (_GL_STDDEF_ALIGNAS) [!HAVE_MAX_ALIGN_T]: New macro.
59471         (max_align_t) [!HAVE_MAX_ALIGN_T]: Use it.
59472         * tests/test-stddef.c: Test __alignof__ too, if available.
59474 2015-03-24  Pádraig Brady  <P@draigBrady.com>
59476         quotearg-simple-tests: add missing gl_FUNC_MMAP_ANON dependency
59477         * modules/quotearg-simple-tests: Reference m4/mmap-anon.m4
59479 2015-03-24  Tobias Stoeckmann  <tobias@stoeckmann.org>
59481         yesno: make EOL optional in ENABLE_NLS case also (trival)
59482         * lib/yesno.c (yesno): Check for EOL before replacing.
59483         * tests/test-yesno.sh: Add a test case (test along with gettext).
59485 2015-03-22  Paul Eggert  <eggert@cs.ucla.edu>
59487         fdopendir-tests: test it does not close its arg
59488         * tests/test-fdopendir.c (main): Test that fdopendir does not
59489         close its argument.  From a suggestion by David Grayson in:
59490         http://lists.gnu.org/r/bug-gnulib/2015-03/msg00039.html
59492 2015-03-20  Paul Eggert  <eggert@cs.ucla.edu>
59494         gitlog-to-changelog: trim trailing white space
59495         * build-aux/gitlog-to-changelog (main):
59496         Trim trailing white space from commit message lines.
59497         This is helpful for processing the GNU Emacs repository,
59498         which dates back to 1985 and contains a lot of such lines.
59500         gitlog-to-changelog: new option --ignore-matching
59501         * build-aux/gitlog-to-changelog (usage, git_dir_option, main):
59502         Support new option --ignore-matching=PAT, which ignores all
59503         commit messages whose first line matches PAT.
59505 2015-03-19  Paul Eggert  <eggert@cs.ucla.edu>
59507         fdopendir: port better to MinGW
59508         * lib/fdopendir.c (fd_clone_opendir) [REPLACE_FCHDIR]:
59509         Use 'dup' if dirfd fails.  Suggested by Eli Zaretskii in:
59510         http://lists.gnu.org/r/bug-gnulib/2015-03/msg00033.html
59511         * modules/fdopendir (Depends-on): Add dirfd.
59513 2015-03-18  Paul Eggert  <eggert@cs.ucla.edu>
59515         fdopendir: fix typo in comment
59516         * lib/fdopendir.c (fdopendir_with_dup): REPLACE_FCHDIR was misspelled.
59518 2015-03-09  Eric Blake  <eblake@redhat.com>
59520         error: document all entry points provided
59521         * doc/glibc-functions/error_print_progname.texi
59522         (error_print_progname): Mention the error module.
59523         * doc/glibc-functions/error_at_line.texi (error_at_line):
59524         Likewise.
59525         * doc/glibc-functions/error_message_count.texi
59526         (error_message_count): Likewise.
59527         * doc/glibc-functions/error_one_per_line.texi
59528         (error_one_per_line): Likewise.
59530 2015-03-03  Paul Eggert  <eggert@cs.ucla.edu>
59532         vasnprintf: pacify clang 3.5.0
59533         Problem reported by Werner Lemberg in:
59534         http://lists.gnu.org/r/bug-gnulib/2015-03/msg00000.html
59535         * lib/vasnprintf.c (VASNPRINTF): Omit casts that clang objects to.
59536         The casts aren't needed, since the characters in question are ASCII.
59538 2015-02-24  Paul Eggert  <eggert@cs.ucla.edu>
59540         glob, etc.: port to MSVC v18 on MS-Windows 8.1
59541         * lib/dirent--.h (GNULIB_defined_opendir):
59542         * lib/dirent.in.h (GNULIB_defined_opendir)
59543         (GNULIB_defined_closedir):
59544         * lib/getcwd.c, lib/glob.c, lib/mountlist.c (opendir, closedir):
59545         #undef only if Gnulib defined it.
59547         poll: port to MSVC v18 on MS-Windows 8.1
59548         Problem reported by Gisle Vanem in:
59549         http://lists.gnu.org/r/bug-gnulib/2015-02/msg00139.html
59550         * lib/poll.c: Always include <sys/select.h> and <sys/socket.h>.
59551         * modules/poll (Depends-on) [!HAVE_POLL || REPLACE_POLL]:
59552         Add sys_socket.
59554 2015-02-24  Pádraig Brady  <P@draigBrady.com>
59556         tests: support stderr verification with returns_()
59557         * tests/init.sh (returns_): Disable tracing for this wrapper
59558         function, so that stderr of the wrapped command is unchanged,
59559         allowing for verification of the contents.
59561 2015-02-24  Pavel Hrdina  <phrdina@redhat.com>
59563         passfd: avoid valgrind uninitalised data warning
59564         * lib/passfd.c (sendfd): Reset the msg_controllen of msghdr,
59565         to include just the fd we've initialized, rather than including
59566         the extra space used for alignment.
59568 2015-02-23  Paul Eggert  <eggert@cs.ucla.edu>
59570         uniwbrk/u32-wordbreaks-tests: fix copyright
59571         * tests/uniwbrk/test-uc-wordbreaks.c: Fix copyright date.
59573         dup2: doc and test for Android bug
59574         Reported by Kevin Cernekee in:
59575         http://lists.gnu.org/r/bug-gnulib/2015-02/msg00125.html
59576         * doc/posix-functions/dup2.texi (dup2): Document the bug.
59577         * m4/dup2.m4 (gl_FUNC_DUP2): Test for the bug.
59579 2015-02-23  Kevin Cernekee  <cernekee@google.com>
59581         Replace dup2() on Android
59582         * m4/dup2.m4 (gl_FUNC_DUP2): Android implements dup2() using dup3().
59583         Since dup3(fd, fd) fails but dup2(fd, fd) should pass, test-dup2
59584         fails.  Using rpl_dup2() fixes this because it has an explicit test
59585         for this condition.
59587 2015-02-22  Paul Eggert  <eggert@cs.ucla.edu>
59589         Android doesn't define RLIM_SAVED_*
59590         Portability problem reported by Kevin Cernekee in:
59591         http://lists.gnu.org/r/bug-gnulib/2015-02/msg00122.html
59592         * doc/posix-headers/sys_resource.texi (sys/resource.h):
59593         Mention the portability problem.
59594         * lib/getdtablesize.c (RLIM_SAVED_CUR, RLIM_SAVED_MAX):
59595         Define if not defined.
59596         * m4/dup2.m4 (gl_FUNC_DUP2):
59597         * m4/fcntl.m4 (gl_FUNC_FCNTL):
59598         Likewise.
59600 2015-02-21  Paul Eggert  <eggert@cs.ucla.edu>
59602         vasnprintf-posix-tests: use consistent test
59603         * tests/test-vasnprintf-posix.c (test_function):
59604         Use "<" in assert instead of "<=", for consistency with other tests.
59606 2015-02-20  Paul Eggert  <eggert@cs.ucla.edu>
59608         printf, isinf, etc.: noncanonical != NaN
59609         Do not require that isinf, printf, etc. treat noncanonical
59610         values as NaNs.  Instead, require only that they do not crash.
59611         Problem reported by Joseph Myers in:
59612         https://sourceware.org/ml/libc-alpha/2015-02/msg00244.html
59613         * doc/posix-functions/dprintf.texi (dprintf):
59614         * doc/posix-functions/fprintf.texi (fprintf):
59615         * doc/posix-functions/isfinite.texi (isfinite):
59616         * doc/posix-functions/isinf.texi (isinf):
59617         * doc/posix-functions/isnan.texi (isnan):
59618         * doc/posix-functions/printf.texi (printf):
59619         * doc/posix-functions/snprintf.texi (snprintf):
59620         * doc/posix-functions/sprintf.texi (sprintf):
59621         * doc/posix-functions/vdprintf.texi (vdprintf):
59622         * doc/posix-functions/vfprintf.texi (vfprintf):
59623         * doc/posix-functions/vprintf.texi (vprintf):
59624         * doc/posix-functions/vsnprintf.texi (vsnprintf):
59625         * doc/posix-functions/vsprintf.texi (vsprintf):
59626         Document this.
59627         * m4/isfinite.m4 (gl_ISFINITEL_WORKS):
59628         * m4/isinf.m4 (gl_ISINFL_WORKS):
59629         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS):
59630         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE):
59631         * tests/test-isfinite.c (test_isfinitel):
59632         * tests/test-isinf.c (test_isinfl):
59633         * tests/test-isnan.c (test_long_double):
59634         * tests/test-isnanl.h (main):
59635         * tests/test-snprintf-posix.h (test_function):
59636         * tests/test-sprintf-posix.h (test_function):
59637         * tests/test-vasnprintf-posix.c (test_function):
59638         * tests/test-vasprintf-posix.c (test_function):
59639         Test only that noncanonical values do not cause crashes, not that
59640         they are treated as NaNs.  In some cases this means a larger
59641         output buffer is needed.
59643 2015-02-20  Jaroslav Skarvada  <jskarvad@redhat.com>
59645         fts: remove redundant close() (trivial)
59646         * lib/fts.c (fts_read): Remove redundant call to close().
59647         Spotted by coverity.
59649 2015-02-20  Paul Eggert  <eggert@cs.ucla.edu>
59651         getdtablesize: port better for Android
59652         Problem reported by Kevin Cernekee in:
59653         http://lists.gnu.org/r/bug-gnulib/2015-02/msg00112.html
59654         * doc/glibc-functions/getdtablesize.texi (getdtablesize): Mention bug.
59655         * lib/getdtablesize.c (getdtablesize): Don't fall back on _SC_OPEN_MAX.
59656         Instead, just use getrlimit, taking care to avoid Cygwin bug.
59658         poll: fixes for large fds
59659         * lib/poll.c (poll): Don't check directly for NFD too large.
59660         Don't rely on undefined behavior in FD_SET when an arg exceeds
59661         FD_SETSIZE.  Always set revents afterwards, even if to zero.
59662         * tests/test-poll.c (poll1): Set revents to -1 instead of 0,
59663         as that makes the test a bit stricter.
59665 2015-02-19  Kevin Cernekee  <cernekee@google.com>
59667         fcntl: Fix cross compiling
59668         * m4/fcntl.m4 (gl_FUNC_FCNTL): Assign the guessed result to the
59669         correct variable name (gl_cv_func_fcntl_f_dupfd_works).
59671 2015-02-18  Paul Eggert  <eggert@cs.ucla.edu>
59673         dup2, fcntl: cross-compile better for Android
59674         Problem reported by Kevin Cernekee in:
59675         http://lists.gnu.org/r/bug-gnulib/2015-02/msg00109.html
59676         * m4/dup2.m4 (gl_FUNC_DUP2): Don't guess no when cross-compiling
59677         for a Linux kernel.  That kernel bug was fixed on 2009-05-11, and
59678         there's little need to cross-compile for older kernels nowadays.
59679         * m4/fcntl.m4 (gl_FUNC_FCNTL): When cross-compiling, guess no only
59680         for systems where the bug is known to occur (AIX, Cygwin, Haiku).
59682 2015-02-18  Pádraig Brady  <P@draigBrady.com>
59684         getopt: don't crash on memory exhaustion
59685         * lib/getopt.c (_getopt_internal_r): Use degraded diagnostics on
59686         memory exhaustion.  In the _LIBC case we use alloca() as is
59687         already done in glibc, so we don't need to consider the separate
59688         error path in that awkward case.  Also fix a memory leak when
59689         ambiguous options are present.
59690         Reported by Tobias Stoeckmann
59692 2015-02-17  Mike Miller  <mtmiller@ieee.org>
59694         tempname: allow compilation with C++ (trivial)
59695         * lib/tempname.h [C++]: Specify extern "C" linkage.
59696         * lib/tempname.h (try_tempname):
59697         * lib/tempname.c (__try_tempname, __gen_tempname):
59698         Rename 'try' to 'tryfunc'.
59700 2015-02-17  Paul Eggert  <eggert@cs.ucla.edu>
59702         dup2, fcntl: port to AIX
59703         * m4/dup2.m4 (gl_FUNC_DUP2):
59704         * m4/fcntl.m4 (gl_FUNC_FCNTL):
59705         Prefer getrusage (RLIM_NOFILE ...)/rlim_cur to sysconf (_SC_OPEN_MAX).
59706         The former works on AIX 7.1 but the latter does not.
59707         Also, this may work better with Android; see:
59708         http://lists.gnu.org/r/bug-gnulib/2015-02/msg00100.html
59710 2015-02-16  Paul Eggert  <eggert@cs.ucla.edu>
59712         getdtablesize, dup2, fcntl: port to Android
59713         Problem reported by Kevin Cernekee in:
59714         http://lists.gnu.org/r/bug-gnulib/2015-02/msg00092.html
59715         * doc/glibc-functions/getdtablesize.texi (getdtablesize):
59716         Mention that getdtablesize doesn't work on Android.
59717         * lib/getdtablesize.c: Use getrlimit substitute only if
59718         getdtablesize is declared.  This should suffice for Cygwin
59719         while not breaking Android.
59720         * m4/dup2.m4 (gl_FUNC_DUP2):
59721         * m4/fcntl.m4 (gl_FUNC_FCNTL):
59722         Prefer sysconf (_SC_OPEN_MAX) to getdtablesize, as the former is
59723         standardized but the latter is not, and sysconf works on Android.
59724         * m4/getdtablesize.m4 (gl_FUNC_GETDTABLESIZE):
59725         Also check that getdtablesize is declared.
59726         This removes the need for a special case for Android.
59728 2015-02-16  Kevin Cernekee  <cernekee@google.com>
59730         localename: Implement gl_locale_name_thread_unsafe for Android
59731         * lib/localename.c: Android API level >= 21 supports two hardcoded
59732         locales: C (POSIX) and C.UTF-8.  Distinguish them by checking
59733         the internal __locale_t struct.
59735 2015-02-16  Kamil Dudka  <kdudka@redhat.com>
59737         fts: avoid crash when a cycle is added while traversing
59738         This could be triggered by auto-mounting a recursive bind mount.
59739         Reported by Michael Chapman in: https://bugzilla.redhat.com/1188498
59740         * lib/fts.c (fts_read): Avoid removing the original hash table item
59741         when leaving a directory that caused a cycle, and preserve the FTS_DC
59742         flag.
59744 2015-02-16  Daiki Ueno  <ueno@gnu.org>
59746         uniname/uniname: support character alias
59747         * lib/uniname/gen-uninames.lisp (main): New argument ALIASFILE.
59748         Generate one-way mapping from aliases to codepoints in the
59749         generated tables.  Special case variation selectors to reduce
59750         table size.
59751         * lib/uniname/uniname.c (unicode_character_name): Special case
59752         variation selectors.
59753         (unicode_name_character): Special case variation selectors and
59754         their aliases.
59755         * lib/uniname/uninames.h: Regenerate.
59756         * tests/uniname/NameAliases.txt: New file, taken from UCD 7.0.0.
59757         * modules/uniname/uniname-tests (Files): Add
59758         tests/uniname/NameAliases.txt.
59759         * tests/uniname/test-uninames.c: Mark as static.
59760         (ALIASLEN): Define.
59761         (struct unicode_alias): New struct.
59762         (unicode_aliases): New variable.
59763         (fill_aliases): New function.
59764         (test_alias_lookup): New test function.
59765         (main): Run the 'test_alias_lookup' test if the second argument is
59766         given.
59767         * tests/uniname/test-uninames.sh: Supply NameAliases.txt as the
59768         second argument.
59770 2015-02-11  Kevin Cernekee  <cernekee@google.com>
59772         Fix FILE struct compatibility with Android API level >= 21
59773         * lib/stdio-impl.h: Test explicitly for __ANDROID__ instead of
59774         __sferror.  Recent versions of Bionic's stdio.h no longer define
59775         __sferror.
59776         * lib/fbufmode.c: Likewise.
59777         * lib/fflush.c: Likewise.
59778         * lib/fpurge.c: Likewise.
59779         * lib/freadable.c: Likewise.
59780         * lib/freadahead.c: Likewise.
59781         * lib/freading.c: Likewise.
59782         * lib/freadptr.c: Likewise.
59783         * lib/freadseek.c: Likewise.
59784         * lib/fseeko.c: Likewise.
59785         * lib/fseterr.c: Likewise.
59786         * lib/fwritable.c: Likewise.
59788         Assume unbroken ungetc() on Android
59789         * m4/ungetc.m4: Add Android case to host OS check.  The ungetc()
59790         test case passed when running on an Android host, and the code
59791         hasn't really changed since 2009.
59793         getdtablesize: Fix Android build
59794         * m4/getdtablesize.m4: Add Android case to host OS check.  Recent NDK
59795         versions have this symbol in the .so library (at least 32-bit
59796         platforms) but are missing the declaration in the header file,
59797         causing the m4 logic to guess incorrectly.
59799         localename: Fix Android build
59800         * modules/localename (Depends-on): Add langinfo.
59802         getugroups: Fix Android build
59803         * lib/getugroups.c: Don't reference unsupported {get,set,end}grent
59804         functions.
59806         euidaccess: Fix Android build
59807         * modules/euidaccess (Depends-on): Add fcntl-h to ensure that
59808         AT_EACCESS gets declared.
59810         linkat_nofollow: Add fallback case for cross compiling
59811         * m4/linkat.m4: Guess no for Darwin, yes otherwise.
59813         net_if: Handle content-free <net/if.h> system headers
59814         * m4/net_if_h.m4: Check to make sure <net/if.h> actually defines
59815         struct if_nameindex.  If not, enable the replacement header.
59817         signal_h: Fix Android build
59818         * lib/signal.in.h: Add Android to the list of platforms that declare
59819         pthread_sigmask() in <pthread.h> instead of <signal.h>.
59821         duplocale: Fix Android build of duplocale-tests
59822         * modules/duplocale-tests (Depends-on): Add langinfo, as the header
59823         is included by test-duplocale.c (but not by duplocale.c).
59824         * modules/duplocale-tests (configure.ac): Check for monetary.h.
59825         * tests/test-duplocale.c: Skip test if monetary.h is absent.
59826         * doc/posix-headers/monetary.texi: Add Android to the list of
59827         platforms missing monetary.h.
59829 2015-02-11  Pádraig Brady  <P@draigBrady.com>
59831         tests: avoid recent -Werror=unused-variable regression in test-locale
59832         * tests/test-locale.c (main): Reference the variable to avoid the
59833         "unused variable" warning.
59835 2015-02-11  Pádraig Brady  <P@draigBrady.com>
59837         maint: various whitespace cleanups in tempname
59838         * lib/tempname.c: Normalize spacing and line length.
59839         * lib/tempname.h: Likewise.
59840         * modules/tempname: Likewise.
59842 2015-02-11  Pádraig Brady  <P@draigBrady.com>
59844         tests: provide returns_() to simplify exit status checking
59845         * tests/init.sh (returns_): A new function for use in tests,
59846         to allow for easier checking of return values, where you expect
59847         a command to exit with failure status.  By checking for a particular
59848         exit code, you don't hide any crashes for example.
59850 2015-02-11  Pádraig Brady  <P@draigBrady.com>
59852         mountlist: only use libmount when specified
59853         There are currently many shared libs dependencies introduced by
59854         libmount with associated runtime and virt mem overhead.
59855         Therefore don't enable by default.
59856         * m4/ls-mntd-fs.m4: Use --with-libmount to enable at build time.
59858 2015-02-08  Daiki Ueno  <ueno@gnu.org>
59860         uniname/unimame-tests: don't link with -lunistring
59861         * modules/uniname/uniname-tests (Makefile.am): Don't link against
59862         $(LIBUNISTRING).  Document the rationale why we need to
59863         conditionalize the test.
59865 2015-02-07  Paul Eggert  <eggert@cs.ucla.edu>
59867         fstrcmp: don't assume strlen < INT_MAX
59868         * lib/fstrcmp.c: Include stddef.h and stdint.h.
59869         (uintptr_t): Remove, as we're now assuming stdint.
59870         (OFFSET, EXTRA_CONTEXT_FIELDS, fstrcmp_bounded):
59871         Prefer ptrdiff_t to int when the value could exceed INT_MAX
59872         if the input string is long.
59873         (fstrcmp_bounded): Check for size-calculation overflow.  Prefer
59874         uintptr_t to size_t when the underlying value is a pointer casted
59875         to an unsigned integer.  Avoid unnecessary 'buffer != NULL' test.
59876         * modules/fstrcmp (Depends-on): Add stdint.
59878         diffseq: prefer ptrdiff_t to ssize_t
59879         * lib/diffseq.h: In commentary, prefer ptrdiff_t to ssize_t.
59880         ptrdiff_t is the natural type for signed indexes.
59881         On a few older platforms, ssize_t is narrower than size_t.
59883         xalloc: fix typo that suppressed warnings
59884         * lib/xalloc.h: Add missing _GL_INLINE_HEADER_END.
59885         This typo, introduced a couple of years ago, mistakenly suppressed
59886         some -Wsuggest-attribute=const, -Wmissing-prototypes, and
59887         -Wmissing-declarations warnings.
59889         full-read: fix license notice typo
59890         * lib/full-read.h: Remove a stray line in the license notice.
59891         Reported by Sam Ellis in: http://bugs.gnu.org/19808
59893         crypto/gc: fix a -Wswitch warning
59894         Reported by Bruce Korb in:
59895         http://lists.gnu.org/r/bug-gnulib/2015-02/msg00046.html
59896         * lib/gc-gnulib.c (gc_hash_open): Fail faster if MODE is nonzero.
59898 2015-02-03  Pádraig Brady  <P@draigBrady.com>
59900         gnulib-tool: fix handling of patch(1) diagnostics
59901         * gnulib-tool: Send diagnostics from patch(1) to stderr,
59902         as otherwise gnulib-tool will reparse that output and attempt
59903         to lookup modules.
59905 2015-02-03  Pádraig Brady  <P@draigBrady.com>
59907         bootstrap: exit immediately upon gnulib-tool failure
59908         * build-aux/bootstrap: Exit immediately if gnulib-tool fails.
59909         This was noticed when gnulib-tool exited early due to failure
59910         to apply a patch in coreutils at http://hydra.nixos.org/eval/1172233,
59911         but various confusing errors were then given as the build proceeded.
59913 2015-02-02  Andreas Gruenbacher  <agruen@gnu.org>
59915         symlinkat: include all required header files
59916         * lib/symlinkat.c (HAVE_SYMLINK_AT): Add <sys/stat.h> for fstatat(),
59917         and string.h for strlen(), required at least on OS X 10.10 (Yosemite).
59918         Reported at https://savannah.gnu.org/bugs/index.php?44151
59919         and by Jack Howarth.
59921 2015-01-29  Pádraig Brady  <P@draigBrady.com>
59923         localename: support Solaris 12 and illumos
59924         * lib/localename.c (gl_locale_name_thread_unsafe): call
59925         getlocalename_l() on newer __sun platforms.
59926         Reported by Alexander Pyhalov.
59927         Fix suggested by Rich Burridge.
59929 2015-01-29  Alexander Pyhalov  <alp@rsu.ru>
59931         locale: fix tests on illumos (trivial)
59932         * tests/test-locale.c: LC_GLOBAL_LOCALE is a function call on illumos,
59933         so move from global scope to main().
59935 2015-01-24  Daiki Ueno  <ueno@gnu.org>
59937         unictype: avoid undefined left-shift behavior
59938         * lib/unictype/bidi_of.c (uc_bidi_class): Building libunistring with
59939         gcc's -fsanitize=shift and running its tests triggered:
59940           unictype/bidi_of.c:43:60: runtime error: left shift of 40167 by 16 \
59941             places cannot be represented in type 'int'
59942         Cast LHS to 'unsigned int' after integer promotion.
59943         * lib/unictype/categ_of.c (lookup_withtable): Likewise.
59944         * lib/unictype/joininggroup_of.c (uc_joining_group): Likewise.
59946 2015-01-20  Daiki Ueno  <ueno@gnu.org>
59948         libunistring: bump version of unitypes dependants
59949         Due to the header file search order, all the headers which depend
59950         on unitypes.h need to be generated, when the preinstalled
59951         libunistring is older.
59952         * modules/unicase/base (configure.ac): Bump minimum version to
59953         0.9.4.
59954         * modules/uniconv/base (configure.ac): Likewise.
59955         * modules/unilbrk/base (configure.ac): Likewise.
59956         * modules/uninorm/base (configure.ac): Likewise.
59957         * modules/unistdio/base (configure.ac): Likewise.
59958         * modules/unistr/base (configure.ac): Likewise.
59959         * modules/uniwbrk/base (configure.ac): Likewise.
59960         * modules/uniwidth/base (configure.ac): Likewise.
59962 2015-01-20  Daiki Ueno  <ueno@gnu.org>
59964         unictype/category-none: fix link with libunistring
59965         Since _UC_CATEGORY_NONE is not a public symbol, it will be
59966         prefixed with "libstring_" when compiled as part of libunistring.
59967         To avoid undefined symbol at link time, increase the minimum
59968         version when the dependant modules are updated.
59969         * modules/unictype/category-none (configure.ac): Bump minimum
59970         version to 0.9.5.
59972 2015-01-20  Daiki Ueno  <ueno@gnu.org>
59974         unitypes: fix build with installed libunistring
59975         The minimum version has not bumped after _UC_ATTRIBUTE_CONST and
59976         _UC_ATTRIBUTE_PURE were added to unitypes.in.h.
59977         * modules/unitypes (configure.ac): Bump minimum version to 0.9.4.
59979 2015-01-15  Paul Eggert  <eggert@cs.ucla.edu>
59981         time: port to MinGW32 3.21
59982         Problem reported by Eli Zaretskii in:
59983         http://lists.gnu.org/r/bug-gnulib/2015-01/msg00042.html
59984         * lib/time.in.h:
59985         * m4/time_h.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC):
59986         * modules/time (Depends-on):
59987         Fall back on unistd.h if the other include files don't define
59988         struct timespec.
59990         update-copyright: apply to self
59991         * build-aux/update-copyright: Fix copyright date.  How ironic!
59993 2015-01-15  Daiki Ueno  <ueno@gnu.org>
59995         libunistring: update to Unicode 7.0.0
59996         * lib/unictype/joininggroup_byname.gperf: Add Straight Waw and
59997         Manichaean names.
59998         * lib/unictype/joininggroup_name.h: Likewise.
59999         * lib/unictype.in.h (UC_JOINING_GROUP_STRAIGHT_WAW)
60000         (UC_JOINING_GROUP_MANICHAEAN_ALEPH): New enumeration values.
60001         * lib/gen-uni-tables.c (UC_JOINING_GROUP_STRAIGHT_WAW)
60002         (UC_JOINING_GROUP_MANICHAEAN_*): New enumeration values.
60003         (fill_arabicshaping, joining_group_as_c_identifier): Support those
60004         enum values.
60005         (is_property_alphabetic): Accept newly added characters to
60006         cuneiform numeric signs.
60007         (is_property_default_ignorable_code_point): Reject U+0605.
60008         (FIELDLEN): Increase from 120 to 160.
60009         * lib/uniwidth/width.c (nonspacing_table_data): Add U+0605,
60010         U+08FF, U+0C00, U+0C81, U+0D01, U+1AB0..U+1ABE, U+1BAC..U+1BAD,
60011         U+1CF8..U+1CF9, U+1DE7..U+1DF5, U+A9E5, U+AA7C, U+FE27..U+FE2D,
60012         U+102E0, U+10376..U+1037A, U+10AE5..U+10AE6, U+1107F, U+11173,
60013         U+1122F..U+11231, U+11234, U+11236..U+11237, U+112DF,
60014         U+112E3..U+112EA, U+11301, U+1133C, U+11340, U+11366..U+1136C,
60015         U+11370..U+11374, U+114B3..U+114B8, U+114BA, U+114BF..U+114C0,
60016         U+114C2..U+114C3, U+115B2..U+115B5, U+115BC..U+115C0,
60017         U+11633..U+1163A, U+1163D, U+1163F..U+11640, U+16AF0..U+16AF4,
60018         U+16B30..U+16B36, U+1BC9D..U+1BC9E, U+1BCA0..U+1BCA3, and
60019         U+1E8D0..U+1E8D6.
60020         (uc_width): Adjust nonspacing_table_ind boundary from 240 to 248.
60021         * tests/uniwidth/test-uc_width2.sh: Same updates as in
60022         lib/uniwidth/width.c.
60023         * all generated files under lib/uni* and tests/uni*: Regenerate.
60025 2015-01-14  Daiki Ueno  <ueno@gnu.org>
60027         libunistring: update to Unicode 6.3.0
60028         * lib/uniwbrk.in.h (WBP_DQ, WBP_SQ, WBP_HL): New enumeration values.
60029         * lib/uniwbrk/u-wordbreaks.h (FUNC): Support WB7a, WB7b, and WB7c.
60030         Update WB5, WB6, WB7, WB9, WB11, WB12, WB13a, and WB13b.
60031         * lib/uniwbrk/wbrktable.h (uniwbrk_table): Adjust table size.
60032         * lib/uniwbrk/wbrktable.c (uniwbrk_table): Support rule WB7a.
60033         Update WB5, WB9, WB10, WB13a, and WB13b.
60034         * tests/uniwbrk/test-uc-wordbreaks.c
60035         (wordbreakproperty_to_string): Support WBP_DQ, WBP_SQ, and WBP_HL.
60036         * lib/gen-uni-tables.c (UC_BIDI_LRI, UC_BIDI_RLI, UC_BIDI_FSI)
60037         (UC_BIDI_PDI): New enumeration values.
60038         (bidi_category_byname): Support those enum values.
60039         (is_WBP_MIDNUMLET): Exclude 0x0027 (SINGLE QUOTE), which is now a
60040         dedicated property assigned.
60041         (is_property_case_ignorable): Check 0x0027.
60042         (WBP_DQ, WBP_SQ, WBP_HL): New enumeration values.
60043         (get_wbp, debug_output_wbp, fill_org_wbp, debug_output_org_wbp)
60044         (output_wbp): Support those enum values.
60045         * lib/unictype.in.h (UC_BIDI_LRI, UC_BIDI_RLI, UC_BIDI_FSI)
60046         (UC_BIDI_PDI): New enumeration values.
60047         * lib/unictype/bidi_byname.gperf: Add those property names.
60048         * lib/uniwidth/width.c (nonspacing_table_data): Add U+061C,
60049         U+180E, U+1A1B, and U+2066..U+2069.
60050         * tests/uniwidth/test-uc_width2.sh: Same updates as in
60051         lib/uniwidth/width.c.
60052         * all generated files under lib/uni* and tests/uni*: Regenerate.
60054 2015-01-14  Daiki Ueno  <ueno@gnu.org>
60056         libunistring: update to Unicode 6.2.0
60057         * lib/unilbrk/lbrktables.h (LBP_RI): New enumeration value.
60058         (unilbrk_table): Adjust table size.
60059         * lib/unilbrk/lbrktables.c (unilbrk_table): Add a row and column
60060         for LBP_RI.
60061         * lib/uniwbrk.in.h (WBP_RI): New enumeration value.
60062         * lib/uniwbrk/u-wordbreaks.h (FUNC): Support rule WB13c.
60063         Normalize table index skipping ignored properties.
60064         * lib/uniwbrk/wbrktable.c (uniwbrk_table): Support WBP_RI.  Remove
60065         WBP_EXTEND and WBP_FORMAT, which are now computed without using
60066         the table.
60067         * lib/uniwbrk/wbrktable.h: Adjust table size.
60068         * lib/unigbrk.in.h (GBP_RI): New enumeration value.
60069         * lib/unigbrk/uc-is-grapheme-break.c (UC_IS_GRAPHEME_BREAK):
60070         Support rule GB8a.
60071         (UC_GRAPHEME_BREAKS_FOR, gb_table): Support GBP_RI.
60072         * tests/unigbrk/test-uc-is-grapheme-break.c
60073         (graphemebreakproperty_to_string): Support GBP_RI.
60074         * tests/uniwbrk/test-uc-wordbreaks.c
60075         (wordbreakproperty_to_string): Support WBP_RI.
60076         * lib/gen-uni-tables.c (LBP_RI): New enumeration value.
60077         (get_lbp, debug_output_lbp, fill_org_lbp, debug_output_org_lbp)
60078         (output_lbp): Support LBP_RI.  Adjust some characters changed from
60079         LBP_AL to LBP_ID.
60080         (output_lbp): Support LBP_RI.
60081         (WBP_RI): New enumeration value.
60082         (debug_output_wbp, fill_org_wbp, debug_output_org_wbp)
60083         (output_wbp): Support WBP_RI.
60084         (GBP_RI): New enumeration value.
60085         (output_gbp_test, fill_org_gbp): Support GBP_RI.
60086         * all generated files under lib/uni* and tests/uni*: Regenerate.
60088 2015-01-14  Daiki Ueno  <ueno@gnu.org>
60090         libunistring: update to Unicode 6.1.0
60091         * lib/gen-uni-tables.c (output_joining_group): Switch to
60092         3-level table to accommodate joining groups defined with higher
60093         codepoint value.  Since there are only 88 groups defined in
60094         Unicode 7.0.0, use 7-bit packed format for level3 entries.
60095         (get_lbp): Update for Unicode 6.1.0.
60096         * lib/unictype/joininggroup_of.c (uc_joining_group): Adjust to use
60097         3-level table.
60098         * lib/unictype/joininggroup_byname.gperf: Add Rohingya Yeh
60099         joining group name.
60100         * lib/unictype/joininggroup_name.h: Likewise.
60101         * lib/unilbrk/lbrktables.h (LBP_HL): New enumeration value.
60102         (unilbrk_table): Adjust table size.
60103         * lib/unilbrk/lbrktables.c (unilbrk_table): Add a row and column
60104         for LBP_HL.
60105         * lib/uniwidth/width.c (nonspacing_table_data): Add U+0604,
60106         U+08E4..U+08FE, U+1BAB, U+1CF4, U+A674..U+A67B, U+A69F,
60107         U+AAEC..U+AAED, U+AAF6, U+11100..U+11102, U+11127..U+1112B,
60108         U+1112D..U+11134, U+11180..U+11181, U+111B6..U+111BE, U+116AB,
60109         U+116AD, U+116B0..U+116B5, U+116B7, U+16F8F..U+16F92.  Remove
60110         U+302E..U+302F.
60111         * tests/uniwidth/test-uc_width2.sh: Same updates as in
60112         lib/uniwidth/width.c.
60113         * all generated files under lib/uni* and tests/uni*: Regenerate.
60114         * modules/uni*/* (configure.ac): Bump minimum version to 0.9.5.
60116 2015-01-15  Daiki Ueno  <ueno@gnu.org>
60118         uniwbrk/u32-wordbreaks-tests: add conformance test
60119         * modules/uniwbrk/u32-wordbreaks-tests (Files): Add
60120         tests/uniwbrk/test-uc-wordbreaks.c,
60121         tests/uniwbrk/test-uc-wordbreaks.sh, and
60122         tests/uniwbrk/WordBreakTest.txt.
60123         (Makefile.am): Add uniwbrk/test-uc-wordbreaks.sh to $(TESTS), add
60124         test-uc-wordbreaks to $(check_PROGRAMS), and define
60125         test_uc_wordbreaks_SOURCES and test_uc_wordbreaks_LDADD.
60126         * tests/uniwbrk/test-uc-wordbreaks.sh: New file.
60127         * tests/uniwbrk/test-uc-wordbreaks.c: New file.
60129 2015-01-15  Daiki Ueno  <ueno@gnu.org>
60131         uniwbrk: ignore Extended/Format characters at BOL not BOS
60132         * lib/uniwbrk/u-wordbreaks.h (FUNC): Ignore Extend and Format
60133         characters if the previous character property is one of
60134         WBP_NEWLINE, WBP_CR, and WBP_LF.
60136 2015-01-11  Jim Meyering  <meyering@fb.com>
60138         test-strstr.c: avoid a trivial leak
60139         * tests/test-strstr.c (main): Free haystack.
60141         update-copyright: recognize groff's \(co marker
60142         * build-aux/update-copyright (circle_c_re): Also accept
60143         uses of \(co, as found in gzip.1.
60145 2015-01-08  Pádraig Brady  <P@draigBrady.com>
60147         maint.mk: fix compatibility with OS X nm
60148         * top/maint.mk (_gl_tight_scope): Use the -g option to
60149         show exported items rather than the -e option which is
60150         ignored on all platforms except OS X where it gives an error.
60151         Reported by Assaf Gordon.
60153 2015-01-07  KO Myung-Hun  <komh@chollian.net>
60155         localcharset: improve charset detection on OS/2
60156         Use system codepage when appropriate.  Map OS/2 codepages to
60157         GNU canonical charset names if possible.
60158         * lib/config.charset: Don't output aliases if "$os" is os2*.
60159         * lib/localcharset.c (get_charset_aliases) [OS2]: Hardcode the
60160         result for OS/2.
60161         (locale_charset) [OS2]: Use system codepage if codeset is omitted
60162         from the locale name which is neither "C" nor "POSIX".
60164 2015-01-06  Paul Eggert  <eggert@cs.ucla.edu>
60166         count-leading-zeros: use 64-bit intrinsics on 32-bit Windows
60167         This reverts the last patch but one, as it shouldn't be needed now
60168         that the typo is fixed.
60169         * lib/count-leading-zeros.h (count_leading_zeros_ll):
60170         * lib/count-trailing-zeros.h:
60171         * lib/count-one-bits.h:
60172         Go back to using 64-bit intrinsics.
60174         count-leading-zeros: fix pragma typos
60175         * lib/count-leading-zeros.h (_BitScanReverse, _BitScanReverse64):
60176         Fix typos in declaration of intrinsics when _MSC_VER.
60178 2015-01-06  Pádraig Brady  <P@draigBrady.com>
60180         count-leading-zeros: avoid 64-bit intrinsics on 32-bit Windows
60181         * lib/count-leading-zeros.h (count_leading_zeros_ll): Use 32 bit
60182         intrinsics in this case.
60183         * lib/count-trailing-zeros.h: Likewise.
60184         * lib/count-one-bits.h: Likewise.
60186 2015-01-06  Daiki Ueno  <ueno@gnu.org>
60188         uniname/uniname: update to Unicode 7.0.0
60189         To accommodate new characters added since Unicode 5.1.0, this
60190         changes the internal representation of codepoint ranges.
60191         Previously, we grouped codepoint ranges by manually assigned 4-bit
60192         tag, which only allowed 16 groups.  This removes the limitation by
60193         switching to binary search on a table.  For the detail rationale
60194         and the benchmark results, see:
60195         https://lists.gnu.org/r/bug-libunistring/2014-06/msg00001.html
60196         * lib/uniname/gen-uninames.lisp (unicode-char): Rename CODE member
60197         to INDEX, as it no longer represents a codepoint.
60198         (range): New struct.
60199         (main): Switch to intervals list from a bit-pattern based
60200         classification.
60201         * lib/uniname/uninames.h: Regenerate.
60202         * tests/uniname/UnicodeDataNames.txt: Update to Unicode 7.0.0.
60203         * modules/uniname/base (configure.ac): Bump minimum version to
60204         0.9.5.
60205         * modules/uniname/uniname (configure.ac): Bump minimum version to
60206         0.9.5.
60208 2015-01-05  Eric Blake  <eblake@redhat.com>
60210         doc: update INSTALL from autoconf
60211         * doc/install.texi: Resync from autoconf.
60212         * doc/INSTALL: Reflect recent autoconf update.
60213         * doc/INSTALL.ISO: Likewise.
60214         * doc/INSTALL.UTF-8: Likewise.
60216         stdio: fix use of PRIdMAX on modern mingw
60217         * m4/stdio_h.m4 (gl_STDIO_H): Probe for printf flavor via inttypes.
60218         * lib/stdio.in.h (_GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM): Use result
60219         to work with modern mingw.
60221 2015-01-05  Daniel P. Berrange  <berrange@redhat.com>  (tiny change)
60223         pthread: detect git mingw builds with only partial pollution
60224         * m4/pthread.m4 (gl_PTHREAD_CHECK): Check for additional
60225         pollution, as seen temporarily in Fedora 21.
60227 2015-01-04  Paul Eggert  <eggert@cs.ucla.edu>
60229         lib-symbol-versions: cache script check
60230         * m4/ld-version-script.m4 (gl_LD_VERSION_SCRIPT):
60231         Cache the check for linker version scripts.
60232         From a suggestion by Christophe Curis in:
60233         http://lists.gnu.org/r/bug-gnulib/2015-01/msg00011.html
60235 2015-01-04  Benno Schulenberg  <bensberg@justemail.net>
60237         maint: fix grammar nits in propername (trivial change)
60238         * lib/propername.h: Remove a mistaken comma and a duplicate "from",
60239         and use an adequate verb and tense.
60241 2015-01-02  Ludovic Courtès  <ludo@gnu.org>
60243         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
60244         * module/gendocs: Add 'doc/gendocs_template_min'.
60246         * build-aux/gendocs.sh: Change email addresses and upstream URLs
60247         from to Gnulib's.
60248         (scripturl, templateurl): Adjust accordingly.
60250 2015-01-01  Paul Eggert  <eggert@cs.ucla.edu>
60252         gendocs: copyright date and version fix
60253         Reported by Karl Berry in:
60254         http://lists.gnu.org/r/bug-gnulib/2015-01/msg00002.html
60255         * build-aux/gendocs.sh, doc/gendocs_template, doc/gendocs_template_min:
60256         Fix copyright date.
60257         * build-aux/gendocs.sh (scriptversion): Update.
60259 2015-01-01  Karl Berry  <karl@gnu.org>
60261         * doc/install.texi,
60262         * build-aux/mdate-sh,
60263         * build-aux/depcomp,
60264         * build-aux/config.guess,
60265         * build-aux/config.sub,
60266         * build-aux/ar-lib,
60267         * build-aux/compile: revert copyright updates (some from last
60268         year) in slaved files.
60270 2015-01-01  Paul Eggert  <eggert@cs.ucla.edu>
60272         version-etc: new year
60273         * doc/gnulib.texi:
60274         * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date.
60275         * all files: Run 'make update-copyright'.
60277 2014-12-30  Pádraig Brady  <P@draigBrady.com>
60279         xstrtol: ensure errno is reset
60280         Since commit 3bf75404, on 26-09-1998, errno may not have been reset.
60281         Noticed with a spurious coreutils test failure on Darwin 14.0.0.
60283         * lib/xstrtol.c (__xstrtol): Always reset errno before returning.
60285 2014-12-28  Paul Eggert  <eggert@cs.ucla.edu>
60287         utimens: fix dependency typo
60288         * modules/utimens (Depends-on): Remove 'assure'.
60289         This bug was introduced in the recent 'assure' patch.
60291 2014-12-22  Eric Blake  <eblake@redhat.com>
60293         docs: mention why libgen.h is bad
60294         * doc/posix-headers/libgen.texi (libgen.h): Refer to dirname module.
60296 2014-12-20  Paul Eggert  <eggert@cs.ucla.edu>
60298         assure: new module
60299         This works better than 'assert' when compiling with -DNDEBUG,
60300         as it avoids some compiler diagnostics in that case.
60301         Reported by Norihiro Tanaka in:
60302         http://lists.gnu.org/r/bug-gnulib/2014-12/msg00215.html
60303         * MODULES.html.sh (func_all_modules): Add 'assure'.
60304         * lib/assure.h, modules/assure: New files.
60305         * lib/chdir-long.c, lib/cycle-check.c, lib/fchdir.c, lib/fts.c:
60306         * lib/poll.c, lib/savewd.c, lib/xstrtol.c:
60307         Prefer 'assure' to 'assert'.
60308         * lib/utimens.c: Stop using 'assert'; it wasn't helpful.
60309         * modules/chdir-long, modules/cycle-check, modules/fchdir:
60310         * modules/poll, modules/savewd, modules/utimens, modules/xstrtol:
60311         Depend on 'assure'.
60313 2014-12-16  Paul Eggert  <eggert@cs.ucla.edu>
60315         stdalign: port better to HP compilers
60316         * m4/stdalign.m4 (gl_STDALIGN_H): Try the test if __HP_cc or
60317         __HP_aCC are nonzero, to be consistent with the 2014-01-20 patch.
60319         stdalign: work around Apple GCC 4.0 bug
60320         Reported by David Fang in:
60321         http://lists.gnu.org/r/bug-gnulib/2014-12/msg00194.html
60322         * lib/stdalign.in.h (_Alignas):
60323         * m4/stdalign.m4 (gl_STDALIGN_H):
60324         Do not use aligned attribute with GCC 4.0 on Apple.
60326 2014-12-16  Pádraig Brady  <P@draigBrady.com>
60328         getcwd: fix test failure on OS X 10.9
60329         * m4/getcwd-path-max.m4: Avoid the replacement if it
60330         won't be effective due to the PATH_MAX limitation of lstat().
60331         (gl_cv_func_getcwd_path_max): Adjust to indicate this case.
60332         * m4/getcwd.m4 (gl_FUNC_GETCWD): Define HAVE_GETCWD_SHORTER
60333         for this case for use in tests, and also exclude this
60334         case when setting REPLACE_GETCWD.
60335         * tests/test-getcwd.c (test_long_name): Restrict the
60336         tested path length so that lstat() will not be passed
60337         a path greater than PATH_MAX.
60338         Also key a test condition on HAVE_OPENAT_SUPPORT rather
60339         than AT_FDCWD, since the latter is set unconditionally
60340         since Sep 2009 in commit 52c658e9.
60342 2014-12-14  Tim Rühsen  <tim.ruehsen@gmx.de>
60344         parse-datetime: avoid a compiler warning with byacc (trivial)
60345         * lib/parse-datetime.y (yylex): Use the same prototype in the
60346         function definition as the declaration, to avoid a -Wstrict-prototypes
60347         warning seen when using byacc.
60349 2014-12-12  Daiki Ueno  <ueno@gnu.org>
60351         unicase/locale-language-tests: fix LOCALE_FR test
60352         * tests/unicase/test-locale-language.sh: Really use $LOCALE_FR for
60353         a French locale with traditional encoding.
60354         Reported by umerqayam in:
60355         http://lists.gnu.org/r/bug-libunistring/2014-12/msg00000.html
60357 2014-12-12  Paul Eggert  <eggert@cs.ucla.edu>
60359         stddef: support C11's max_align_t
60360         * doc/posix-headers/stddef.texi (stddef.h): Document max_align_t.
60361         * lib/stddef.in.h (_@GUARD_PREFIX@_STDDEF_H) [__need_wint_t]:
60362         Do not undef, as that might cause max_align_t to be defined twice.
60363         Instead, change use to check for _GL_STDDEF_WINT_T too.
60364         (max_align_t) [!HAVE_MAX_ALIGN_T]: New decl.
60365         * m4/stddef_h.m4 (gl_STDDEF_H, gl_STDDEF_H_DEFAULTS):
60366         Check for max_align_t.
60367         * modules/stddef (stddef.h): Substitute HAVE_MAX_ALIGN_T.
60368         * modules/stddef-tests (Depends-on): Add stdalign.
60369         * tests/test-stddef.c: Test max_align_t.
60371 2014-12-11  Daiki Ueno  <ueno@gnu.org>
60373         unistd: fix iOS check conditional
60374         On Mac OS X 10.8, the TARGET_* macros are unconditonally defined
60375         as 0 or 1 in <TargetConditionals.h>, and the previous check always
60376         yielded true on non-iOS environment.
60377         * lib/unistd.in.h (environ) [__APPLE__]: Check the values of
60378         TARGET_OS_IPHONE and TARGET_IPHONE_SIMULATOR, instead of whether
60379         they are defined.
60381 2014-12-09  Paul Eggert  <eggert@cs.ucla.edu>
60383         posixtm: avoid compiler warning in a better way
60384         * lib/posixtm.c (IF_LINT): Remove.
60385         (year, posix_time_parse):
60386         Return true (not 0) if successful.  All callers changed.
60387         (posix_time_parse): Simplify to pacify GCC without need for IF_LINT.
60389 2014-12-08  KO Myung-Hun  <komh78@gmail.com>
60391         * lib/relocatable.c (relocate): Prepend $UNIXROOT to pathname if it is
60392         started with '/' on EMX.
60394 2014-12-08  KO Myung-Hun  <komh78@gmail.com>
60396         freopen: workaround freopen() on OS/2 kLIBC
60397         * lib/freopen.c (rpl_freopen): Workaround.
60398         * m4/freopen.m4: Add os2* case.
60400         get_shared_library_fullname: port to EMX
60401         * lib/relocatable.c: Define strcmp and strncmp to stricmp and strnicmp
60402         on EMX, respectively.
60403         (_DLL_InitTerm): New on EMX.
60404         (get_shared_library_fullname): Implement on EMX.
60406         find_executable: port to EMX
60407         * lib/progreloc.c (find_executable): Implement on EMX.
60409         sched: check struct sched_param in spawn.h as well
60410         * lib/sched.in.h: Include spawn.h on kLIBC.
60411         * lib/sched_h.m4: Check struct sched_param in spawn.h as well.
60413 2014-12-08  Martin Kletzander  <mkletzan@redhat.com>  (tiny change)
60415         bootstrap: Allow perl modules in $buildreq
60416         * build-aux/bootstrap: Add case for perl modules.
60418 2014-12-08  Pádraig Brady  <P@draigBrady.com>
60420         apply _GL_ATTRIBUTE_PURE to some inline functions
60421         clang 3.4.2 flagged these inline functions as pure
60422         * lib/savewd.h (savewd_errno): Set _GL_ATTRIBUTE_PURE.
60423         * lib/sig-handler.h (get_handler): Likewise.
60424         * lib/stat-time.h (get_stat_{a,c,m,birth}time{,_ns}): Likewise.
60425         * lib/timespec.h (timespec_cmp, timespec_sign): Likewise.
60427 2014-12-06  Pádraig Brady  <P@draigBrady.com>
60429         vasnprintf: fix potential use after free
60430         * lib/vasnprintf.c (VASNPRINTF): Fix free-memory read,
60431         flagged by clang-analyzer 3.4.2.
60433 2014-12-05  Pádraig Brady  <P@draigBrady.com>
60435         filevercmp, posixtm: avoid compiler warnings with -O3
60436         * lib/filevercmp.h (filevercmp): Tag with _GL_ATTRIBUTE_PURE
60437         * lib/posixtm.c: (IF_LINT): Define.
60438         (posix_time_parse): Use it to void a "may be used uninitialized"
60439         warning, seen only with -O3.
60441 2014-12-05  Bruno Haible  <bruno@clisp.org>
60443         Fix LDBL80_WORDS macro on big endian platforms.
60444         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Add missing parenthesis in
60445         LDBL80_WORDS macro.
60446         * m4/isinf.m4 (gl_ISINFL_WORKS): Likewise.
60447         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Likewise.
60448         * tests/test-isfinite.c (test_isfinitel): Likewise.
60449         * tests/test-isinf.c (test_isinfl): Likewise.
60450         * tests/test-isnan.c (test_long_double): Likewise.
60451         * tests/test-isnanl.h (main): Likewise.
60452         * tests/test-snprintf-posix.h (LDBL80_WORDS): Add missing parenthesis.
60453         * tests/test-sprintf-posix.h (LDBL80_WORDS): Likewise.
60454         * tests/test-vasnprintf-posix.c (LDBL80_WORDS): Likewise.
60455         * tests/test-vasprintf-posix.c (LDBL80_WORDS): Likewise.
60456         Reported by Pádraig Brady.
60458 2014-12-02  KO Myung-Hun  <komh78@gmail.com>
60460         git-version-gen: do not print new line characters
60461         * build-aux/git-version-gen: Use printf instead of echo and tr.
60463         gnulib-tool: recognize x:* as an absolute path
60464         * gnulib-tool (func_gnulib_dir): Add ?:* case.
60465         (func_relconcat): Likewise.
60467 2014-12-02  Andrei Borzenkov  <arvidjaar@gmail.com>
60469         argp: avoid extraneous translation and mem leak with empty pre doc
60470         * lib/argp-help.c (argp_doc): Never translate the empty string,
60471         when "\v" is the first or last character of the string, as that
60472         has a reserved meaning to return the header info from a po file.
60473         This also fixes a small memory leak in the !post case.
60474         The issue can be seen with this command for example:
60475         LC_MESSAGES=en_US grub2-mknetdir --help
60477 2014-11-27  Daiki Ueno  <ueno@gnu.org>
60479         uniname/uniname-tests: skip if system's libunistring is used
60480         * modules/uniname/uniname-tests (Makefile.am): Skip test if
60481         uniname/uniname module is not compiled.
60483 2014-11-27  Pádraig Brady  <P@draigBrady.com>
60485         printf: fix configure check on big endian systems
60486         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Add missing bracket.
60488 2014-11-22  Daiki Ueno  <ueno@gnu.org>
60490         pipe-filter-gi, pipe-filter-ii: port to AIX
60491         On AIX 7.1, 'select' is defined as static and cannot be referred
60492         to from inline function.
60493         * lib/pipe-filter-aux.h (nointr_select): Remove, manually expand
60494         the definition...
60495         * lib/pipe-filter-gi.c (filter_loop): ...here, and...
60496         * lib/pipe-filter-ii.c (pipe_filter_ii_execute): ...here.
60498 2014-11-20  Paul Eggert  <eggert@cs.ucla.edu>
60500         gitlog-to-changelog: add --until
60501         * build-aux/gitlog-to-changelog: Support new --until option.
60502         Need described by Eli Zaretskii in: http://bugs.gnu.org/19113
60504 2014-11-14  Paul Eggert  <eggert@cs.ucla.edu>
60506         extern-inline: update commentary about GCC bugs
60507         * m4/extern-inline.m4: Add another GCC bug number to comments.
60509 2014-11-13  Daiki Ueno  <ueno@gnu.org>
60511         gen-uni-tables: untabify
60512         * lib/gen-uni-tables.c: Untabify.
60514 2014-11-13  Daiki Ueno  <ueno@gnu.org>
60516         gen-uni-tables: check out-of-range values added to 3-level tables
60517         * lib/gen-uni-tables.c (output_category, output_bidi_category)
60518         (output_joining_type, output_ident_category): Check out-of-range
60519         values added to 3-level tables.
60521 2014-11-13  Daiki Ueno  <ueno@gnu.org>
60523         gen-uni-tables: utilize 'assert'
60524         * lib/gen-uni-tables.c: Include <assert.h>.
60525         (output_category, output_combclass, output_decimal_digit_test)
60526         (output_decimal_digit, output_digit_test, output_digit)
60527         (output_numeric, get_mirror_value, fill_properties)
60528         (fill_property30, is_property_alphabetic)
60529         (is_property_default_ignorable_code_point)
60530         (is_property_uppercase, is_property_lowercase)
60531         (is_property_cased, is_property_case_ignorable)
60532         (is_property_changes_when_lowercased, is_property_iso_control)
60533         (is_property_math, fill_arabicshaping, output_joining_group)
60534         (fill_scripts, fill_blocks, output_lbp, fill_org_wbp)
60535         (output_wbp, fill_org_gbp, get_decomposition)
60536         (output_decomposition, fill_composition_exclusions)
60537         (debug_output_composition_tables, output_composition_tables)
60538         (redistribute_casefolding_rules, output_casing_rules): Use
60539         'assert (EXPR);' instead of 'if (!EXPR) abort ();' for better error
60540         reporting.
60542 2014-11-13  Daiki Ueno  <ueno@gnu.org>
60544         gen-uni-tables: cosmetic improvements
60545         * lib/gen-uni-tables.c: Escape newlines in the Emacs file local
60546         variables specification.
60547         (is_outdigit): Remove unused function.
60549 2014-11-12  Jeroen Roovers  <jer@gentoo.org>  (tiny change)
60551         fcntl-h-tests: port to PA-RISC GNU/Linux
60552         * tests/test-fcntl-h.c (main): Check O_SYNC is different from O_DSYNC.
60554 2014-11-10  Paul Eggert  <eggert@cs.ucla.edu>
60556         fts: port to C89
60557         Problem reported for MSVC 16 by Gisle Vanem in:
60558         http://lists.gnu.org/r/bug-gnulib/2014-11/msg00027.html
60559         * lib/fts.c (fts_build): Avoid declaration before statement.
60561 2014-11-06  Paul Eggert  <eggert@cs.ucla.edu>
60563         unistd: port to iOS
60564         Problem reported by André Klitzing in:
60565         http://lists.gnu.org/r/bug-gnulib/2014-11/msg00013.html
60566         * lib/unistd.in.h (environ): Do not include crt_externs.h on iOS.
60568 2014-11-05  Paul Eggert  <eggert@cs.ucla.edu>
60570         obstack: do not reject malloc-style obstack_chunkfun, obstack_freefun
60571         Problem reported by Alan Modra in:
60572         http://lists.gnu.org/r/bug-gnulib/2014-11/msg00007.html
60573         * lib/obstack.h (obstack_chunkfun, obstack_freefun):
60574         Always cast the function arg, reverting this part of the previous
60575         change.
60577 2014-11-04  Paul Eggert  <eggert@cs.ucla.edu>
60579         obstack: avoid potentially-nonportable function casts
60580         * lib/obstack.c (CALL_CHUNKFUN, CALL_FREEFUN):
60581         Remove, replacing with ...
60582         (call_chunkfun, call_freefun): New static functions.
60583         All uses changed.  Avoid potentially-nonportable casts.
60584         (chunkfun_type, freefun_type): Remove typedefs; no longer used.
60585         (_obstack_begin_worker): Omit last two args, since they
60586         rely on potentially-nonportable casts.  All callers changed.
60587         * lib/obstack.h (_OBSTACK_CAST): New macro.
60588         Use it everywhere the old API used a potentially-nonportable cast.
60589         The new API doesn't cast.
60590         (struct obstack): Use unions rather than requiring
60591         potentially-nonportable casts.
60592         (obstack_chunkfun, obstack_freefun): Return void.
60594 2014-11-03  Alan Modra  <amodra@gmail.com>
60596         obstack: fix macro return values
60597         * lib/obstack.h (obstack_next_free): Return void *.
60598         (obstack_1grow_fast, obstack_blank_fast): Return void.
60599         For __GNUC__ macros:
60600         (obstack_1grow, obstack_blank): Remove now unnecessary (void) 0.
60601         For !__GNUC__ macros:
60602         (obstack_make_room, obstack_grow, obstack_grow0)
60603         (obstack_ptr_grow_fast, obstack_int_grow_fast): Return void.
60605 2014-11-03  Paul Eggert  <eggert@cs.ucla.edu>
60607         obstack: do not assume system-supplied obstack is size_t safe
60608         * m4/obstack.m4: New file.
60609         * modules/obstack (Files): Add it.
60611         obstack: port to platforms that #define __alignof__
60612         * lib/obstack.c: Include <alignof.h> if !defined __alignof__,
60613         not if !_LIBC.  We don't know of any platforms that #define
60614         __alignof__, but it might be useful in tests.  Conversely,
60615         glibc assumes GCC.
60617 2014-11-03  Pádraig Brady  <P@draigBrady.com>
60619         linkat: don't unconditionally replace on GNU/Linux
60620         * m4/linkat.m4 (gl_FUNC_LINKAT): The compile check for AT_SYMLINK_FOLLOW
60621         was redundant for a few reasons.  It was present to support compiling
60622         on new systems but running on the old narrow window of Linux 2.6.1[67].
60623         It setup and cleaned up test files which weren't actually used.
60624         On non __linux__ it compile tested AT_SYMLINK_FOLLOW, but that is
60625         implicit in the following check.
60627 2014-11-03  Pádraig Brady  <P@draigBrady.com>
60629         linkat: wrap to handle symlinks on OS X 10.10
60630         * m4/linkat.m4 (gl_FUNC_LINKAT): linkat() is available on Yosemite
60631         but not usable because it doesn't support creating hardlinks
60632         to symlinks.  Therefore add a generic test for this capability
60633         and fallback to our emulation if linkat() fails with ENOTSUP.
60635 2014-11-02  Paul Eggert  <eggert@cs.ucla.edu>
60637         open, openat: document nonstandard FreeBSD, NetBSD O_NOFOLLOW errno
60638         * doc/posix-functions/open.texi (open):
60639         * doc/posix-functions/openat.texi (openat):
60640         Document that these functions do not set errno to ELOOP when
60641         a symlink is opened with O_NOFOLLOW.
60643 2014-10-31  Paul Eggert  <eggert@cs.ucla.edu>
60645         obstack: add NEWS entry for recent incompatible changes
60646         * NEWS: Describe recent changes.
60648 2014-10-30  Pádraig Brady  <P@draigBrady.com>
60650         mountlist: don't use libmount to decide on dummy/remote
60651         * lib/mountlist.c (read_file_system_list): Don't use the libmount
60652         routines to determine whether a file system is dummy or remote,
60653         as they're not currently compatible.  For example the remoteness
60654         is determined on file system type (for which the list seems incomplete),
60655         rather than simply checking for a ':' in the device name.
60656         Also libmount currently determines that 'tmpfs' is a dummy file system
60657         even though it has associated storage.
60659 2014-10-29  Paul Eggert  <eggert@cs.ucla.edu>
60661         obstack: prefer __alignof__ to alignof
60662         This is for portability to pre-4.7 GCC when compiling glibc.
60663         See Joseph S. Myers in:
60664         http://sourceware.org/ml/libc-alpha/2014-10/msg00703.html
60665         * lib/obstack.c (__alignof__) [!_LIBC && !__GNUC__]:
60666         New macro, defined by including and using <alignof.h>.
60667         (MAX): New macro.
60668         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Redefine in terms of these.
60669         Do not use enums as they are not portable to some broken compilers.
60670         * modules/obstack (Depends-on): Depend on alignof, not stdalign.
60672         obstack: prefer alignof to calculating alignments by hand
60673         * lib/obstack.c: Include <stdalign.h>.
60674         (struct fooalign): Remove.
60675         (DEFAULT_ALIGNMENT): Use alignof rather than the old offsetof hack.
60676         * modules/obstack (Depends-on): Add stdalign.
60678 2014-10-28  Paul Eggert  <eggert@cs.ucla.edu>
60680         obstack: use size_t alignments and check for overflow
60681         * lib/obstack.c, lib/obstack.h (_obstack_begin, _obstack_begin_1):
60682         * lib/obstack.c (_obstack_begin_worker, _obstack_newchunk):
60683         * lib/obstack.h (struct obstack.alignment_mask):
60684         Use _OBSTACK_SIZE_T, not int, for alignments.
60685         * lib/obstack.c (_obstack_newchunk): Fail if the size calculation
60686         overflows, e.g., when adding the alignment.
60688 2014-10-29  Alan Modra  <amodra@gmail.com>
60690         obstack: 64-bit obstack support, part 3
60691         This finally enables full 64-bit obstack support.  The glibc
60692         shared library specific code is removed from obstack.c too, and
60693         the error handling code conditionally compiled under control of
60694         another macro, _OBSTACK_NO_ERROR_HANDLER.
60695         * lib/obstack.h: Include string.h earlier.
60696         (_OBSTACK_INTERFACE_VERSION): Define.
60697         (_OBSTACK_SIZE_T, _CHUNK_SIZE_T): Define as size_t for version 2.
60698         * lib/obstack.c: Don't include shlib-compat.h.
60699         (OBSTACK_INTERFACE_VERSION): Delete.
60700         (_OBSTACK_ELIDE_CODE): Rename from ELIDE_CODE.  Define when version 1
60701         glibc code is compatible with version 2.  Don't include stdio.h for
60702         __GNU_LIBRARY.
60703         (obstack_exit_failure, print_and_abort, obstack_alloc_failed_handler):
60704         Omit when _OBSTACK_NO_ERROR_HANDLER defined.  Include stdio.h here.
60705         (_obstack_compat, _obstack, _obstack_newchunk, obstack_free): Delete
60706         glibc shared library specific source.
60708         obstack: 64-bit obstack support, part 2
60709         This gets us 4G obstack support, without changing ABI
60710         compatibility, apart from possibly introducing some
60711         signed/unsigned comparison warnings in code that uses obstack.h.
60712         a) Replace "int" size parameters, return values, and macro local vars
60713            with _OBSTACK_SIZE_T, an "unsigned int" for now.
60714         b) Make obstack.chunk_size a _CHUNK_SIZE_T, an "unsigned long" for now.
60715         c) Make all obstack macros checking available room use obstack_room.
60716            "next_free + desired > chunk_limit" may wrap the lhs for chunks
60717            allocated near the top of memory.
60718         d) Use unsigned comparisons, and macro locals to support >2G on 32-bit.
60719         * lib/obstack.h (_OBSTACK_SIZE_T): Define.  Use throughout
60720         in place of "int" size parameters, return values and local vars.
60721         (_CHUNK_SIZE_T): Define.
60722         (struct obstack): Make chunk_size a _CHUNK_SIZE_T.  Make temp
60723         union use an _OBSTACK_SIZE_T integer type.
60724         For __GNUC__ versions of the following macros...
60725         (obstack_room): Rename local var.
60726         (obstack_make_room): Use obstack_room.
60727         (obstack_grow, obstack_grow0, obstack_1grow, obstack_ptr_grow,
60728         obstack_int_grow, obstack_blank): Likewise.
60729         (obstack_finish): Use unsigned comparison when comparing aligned
60730         next_free against chunk_limit.
60731         (obstack_free): Cast OBJ to remove possible const qualifier.
60732         For !__GNUC__ versions of the following macros...
60733         (obstack_make_room): Use obstack_room.
60734         (obstack_grow, obstack_grow0, obstack_1grow, obstack_ptr_grow,
60735         obstack_int_grow, obstack_blank): Likewise.
60736         (obstack_finish): Use unsigned comparision when comparing aligned
60737         next_free against chunk_limit.
60738         (obstack_free): Use temp.p and same comparisons as __GNUC__ version.
60739         * lib/obstack.c (_obstack_begin_worker): Make "size" parameter
60740         _OBSTACK_SIZE_T.
60741         (_obstack_begin, _obstack_begin_1): Likewise.
60742         (_obstack_newchunk): Likewise for length parameter.  Use size_t locals.
60743         (_obstack_memory_used): Return and use _OBSTACK_SIZE_T local.
60745         obstack: 64-bit obstack support, part 1
60746         a) Correct calls to alloc function, to use a size_t arg.  "long" is
60747            just wrong on targets like x86_64-mingw64 where "long" is 32 bits
60748            and "size_t" 64 bits.
60749         b) Consolidate _obstack_begin and _obstack_begin1 code.
60750         * lib/obstack.h (struct obstack <chunkfun>): Correct prototype to
60751         use "size_t" rather than "long".
60752         (_obstack_begin, _obstack_begin1): Likewise.
60753         (obstack_init, obstack_begin, obstack_specify_allocation_with_arg,
60754         obstack_chunkfun): Update alloc function casts.
60755         * lib/obstack.c (CALL_CHUNKFUN): Update chunkfun cast.
60756         (chunkfun_type, freefun_type): New typdefs.
60757         (_obstack_begin_worker): Split out from ..
60758         (_obstack_begin, _obstack_begin_1): ..here.
60760         obstack: tidy part 2
60761         a) Don't be concerned about "not polluting the namespace with stddef.h
60762            symbols" in obstack.h, since gnulib string.h includes stddef.h
60763            anyway, and it seems unlikely that anyone would care.
60764         b) Don't roll our own slow memcpy in _obstack_newchunk.
60765         c) Rename obstack_free to _obstack_free.  This makes the naming
60766            consistent with other obstack functions and obviates the need for
60767            __obstack_free.  Ancient obstack.c defined both obstack_free and
60768            _obstack_free.  We continue to do that for _LIBC via an alias.
60769         d) Miscellaneous macro fixes.  The expression used to test for gcc-2.8
60770            is clever, but nowadays gcc warns on undefined macros.  You'll get
60771            an undefined macro warning if simulating an old gcc with -U__GNUC__
60772            -U__GNUC_MINOR__ -D__GNUC__=1.
60773         * lib/obstack.h: Include stddef.h unconditionally.  Formatting fixes.
60774         (PTR_INT_TYPE): Delete, replace with ptrdiff_t.
60775         (__obstack_free): Delete, update refs.
60776         (_obstack_free): Rename from obstack_free.
60777         (__extension__): Avoid undefined macro warning for __GNUC_MINOR__.
60778         (obstack_object_size, obstack_room): Parenthesise !__GNUC__ versions.
60779         * lib/obstack.c: Don't include stddef.h.
60780         (COPYING_UNIT): Delete.
60781         (_obstack_begin): Formatting fix.
60782         (_obstack_newchunk): Use memcpy to move existing object to new chunk.
60783         (_obstack_free): Rename from __obstack_free, update alias.  Move
60784         undef of obstack_free to where it is needed.
60786         obstack: tidy part 1
60787         a) Rename temp fields.  temp.tempint and temp.tempptr just looks ugly
60788            to me, and result in overlong lines after later patches.
60789         b) Move error handling code, to avoid a forward declaration and to
60790            simplify later patches in this series.
60791         * lib/obstack.h (struct obstack <temp>): Rename fields of union
60792         and update all uses.
60793         * lib/obstack.c: Include stdlib.h earlier.
60794         (obstack_exit_failure, obstack_alloc_failed_handler): Move later
60795         in file.
60796         (print_and_abort): Remove now redundant forward declaration.
60798 2014-10-24  Paul Eggert  <eggert@cs.ucla.edu>
60800         socketlib, sockets, sys_socket: Use AC_REQUIRE to pacify autoconf.
60801         Without this change, in bleeding-edge fileutils Autoconf complains
60802         that gl_SOCKETLIB etc. are AC_REQUIREd after being invoked.
60803         * modules/socketlib (configure.ac): AC_REQUIRE gl_SOCKETLIB.
60804         * modules/sockets (configure.ac): AC_REQUIRE gl_SOCKETS.
60805         * modules/sys_socket (configure.ac): AC_REQUIRE gl_HEADER_SYS_SOCKET.
60807 2014-10-24  Daiki Ueno  <ueno@gnu.org>
60809         iconv: avoid false detection of non-working iconv
60810         The INBUF arguments of iconv can be either 'const char **'
60811         or 'char **'.  If CC is g++, the difference causes a compile error
60812         and thus leads to a false detection of non-working iconv.
60813         Reported by Eli Zaretskii and Werner LEMBERG in:
60814         <https://lists.gnu.org/r/bug-gnulib/2014-10/msg00023.html>.
60815         * m4/iconv.m4 (AM_ICONV_LINK): Try all possible argument types of
60816         iconv.  Bump serial number.
60818 2014-10-23  Pádraig Brady  <P@draigBrady.com>
60820         bootstrap: print more diagnostics for missing programs
60821         * build-aux/bootstrap: only suppress stderr when checking for
60822         alternative program names.  This supports programs issuing non
60823         standard error messages.
60825 2014-10-23  Pádraig Brady  <P@draigBrady.com>
60827         bootstrap: only update the gnulib submodule
60828         * build-aux/bootstrap: Restrict the "submodule update" command
60829         to the gnulib path.
60831 2014-10-18  Paul Eggert  <eggert@cs.ucla.edu>
60833         symlinkat: port to AIX 7.1
60834         * doc/posix-functions/symlinkat.texi (symlinkat):
60835         Mention AIX porting problem.
60836         * lib/symlinkat.c: Always include errno.h.
60837         (rpl_symlinkat) [HAVE_SYMLINKAT]: New function.
60838         * lib/unistd.in.h (symlinkat): Add replacement machinery.
60839         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Check symlinkat behavior.
60840         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add REPLACE_SYMLINKAT.
60841         * modules/symlinkat (Depends-on): Add fstatat if REPLACE_SYMLINKAT.
60842         (configure.ac): Also compile replacement if REPLACE_SYMLINKAT.
60843         * modules/unistd (unistd.h): Substitute REPLACE_SYMLINKAT.
60845         readlinkat: port to AIX 7.1
60846         * doc/posix-functions/readlink.texi (readlink):
60847         * doc/posix-functions/readlinkat.texi (readlinkat):
60848         Mention AIX porting problem.
60849         * lib/readlinkat.c (rpl_readlinkat) [HAVE_READLINKAT]:
60850         New function.
60851         * lib/unistd.in.h (readlinkat): Add replacement machinery.
60852         * m4/readlinkat.m4 (gl_FUNC_READLINKAT): Check readlinkat signature.
60853         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add REPLACE_READLINKAT.
60854         * modules/readlinkat (configure.ac): Also compile replacement
60855         if REPLACE_READLINKAT.
60856         * modules/unistd (unistd.h): Substitute REPLACE_READLINKAT.
60858 2014-10-12  Karl Berry  <karl@gnu.org>
60860         * doc/posix-functions/dirname.texi: remove spurious {.
60862 2014-09-28  Ben Pfaff  <blp@cs.stanford.edu>
60864         basename, dirname: Improve documentation.
60865         * doc/posix-functions/basename.texi: Mention dirname module and
60866         base_name() function.
60867         * doc/posix-functions/dirname.texi: Mention dir_name() and
60868         mdir_name() functions.
60869         Suggested by Werner LEMBERG <wl@gnu.org>.
60871 2014-09-24  Jim Meyering  <meyering@fb.com>
60873         exclude: declare exclude_patopts static
60874         * lib/exclude.c (exclude_patopts): Declare static,
60875         to avoid triggering a -Wmissing-prototypes warning.
60876         The alternative (declaring it in the .h file) would
60877         require publicizing the private "struct patopts".
60879 2014-09-21  Werner Lemberg  <wl@gnu.org>
60881         dirname: support compilation with C++
60882         * lib/dirname.h: Add necessary C linkage declarations.
60884 2014-09-16  Paul Eggert  <eggert@cs.ucla.edu>
60886         qsort_r: include <config.h>
60887         Problem reported by Tom G. Christensen in:
60888         http://lists.gnu.org/r/bug-gnulib/2014-09/msg00071.html
60889         * lib/qsort.c [!_LIBC]: Include <config.h> first.
60891 2014-09-16  Dylan Cali  <calid1984@gmail.com>
60893         avltree-list: avoid compiler warnings (trivial)
60894         * lib/gl_anytree_list2.h: Add _GL_ATTRIBUTE_PURE to avoid
60895         -Werror=suggest-attribute=pure.
60896         * lib/gl_array_list.c: Likewise.
60897         * lib/gl_avltree_list.c (gl_avltree_list_check_invariants): Add extern
60898         declaration to avoid -Werror=missing-prototypes.  This is not added
60899         to a header as only exported for tests.  Add (void) to the
60900         check_invariants() call to indicate we're discarding the result
60901         in this context which avoids -Werror=unused-value.  Note we don't
60902         use ignore_value here to avoid a dependency as we know we'll not
60903         be adding __attribute__((warn_unused_result)) to check_invariants().
60904         Add _GL_ATTRIBUTE_CONST to avoid -Werror=suggest-attribute=const.
60906 2014-09-15  Paul Eggert  <eggert@cs.ucla.edu>
60908         qsort_r: new module, for GNU-style qsort_r
60909         * m4/qsort_r.m4: New file.  Forgot to add this earlier.
60911 2014-09-15  Werner LEMBERG  <wl@gnu.org>
60913         strerror_r-posix: support compilation with C++
60914         * lib/strerror_r.c: Add necessary C linkage declarations.
60916 2014-09-11  Johannes Zarl  <johannes.zarl@jku.at>
60918         fcntl-h: fix compilation with Intel C++ compiler (trivial)
60919         * lib/fcntl.in.h: ICC has the same issue as GCC <= 4.2.
60921 2014-09-09  Fridolin Pokorny  <fpokorny@redhat.com>
60923         mountlist: use /proc/self/mountinfo when available
60924         Use libmount to propagate device IDs provided by Linux in
60925         /proc/self/mountinfo.  This will give more accurate output when
60926         using df in chroot'ed environments as the device IDs are not
60927         determined by stat() which may be inaccurate within the chroot.
60928         * lib/mountlist.c (read_file_system_list): Use the libmount routines
60929         from util-linux to parse "/proc/self/mountinfo" or fall back to
60930         standard getmntent() processing.
60931         * m4/ls-mntd-fs.m4: Check for libmount only when 1-argument
60932         getmntent() is used, as is the case on GNU/Linux.
60934 2014-09-07  Eric Wong  <normalperson@yhbt.net>
60936         users.txt: add cmogstored
60937         cmogstored has used gnulib since the beginning in 2012 to support
60938         GNU/Linux, FreeBSD, and GNU/kFreeBSD.
60940 2014-09-05  Mathieu Anquetin  <mathieu@anquetin.eu>
60942         Trivial change.
60943         * gnulib-tool: Use same options as build-aux/bootstrap to download
60944         PO files.
60946 2014-09-05  Mathieu Anquetin  <mathieu@anquetin.eu>
60948         Trivial change.
60949         * gnulib-tool: Fallback to wget when rsync of PO files fails.
60951 2014-09-04  Eric Blake  <eblake@redhat.com>
60953         maintainer-makefile: add syntax check for useless ';;'
60954         * top/maint.mk (sc_prohibit_double_semicolon): New rule.
60956 2014-09-04  Paul Eggert  <eggert@cs.ucla.edu>
60958         pthread, pthread_sigmask, threadlib: port to Ubuntu 14.04
60959         Problem reported by Assaf Gordon in:
60960         http://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
60961         Apparently Ubuntu is doing some fancy link-time optimization
60962         that doesn't work with -lpthread but does work with -pthread.
60963         Work around the bug by preferring -pthread to -lpthread.
60964         * m4/pthread.m4 (gl_PTHREAD_CHECK):
60965         * m4/threadlib.m4 (gl_THREADLIB_BODY): Prefer -pthread to -lpthread.
60966         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK):
60967         Treat -pthread like -lpthread.
60969 2014-09-04  Eric Blake  <eblake@redhat.com>
60971         error: drop spurious semicolon
60972         * lib/error.c (__error_at_line): Fix ';;'.
60974 2014-09-02  Paul Eggert  <eggert@cs.ucla.edu>
60976         gnulib-common.m4: port to GCC 4.2.1 and Sun Studio 12 C++
60977         * m4/gnulib-common.m4 (AC_C_RESTRICT):
60978         Override AC_C_RESTRICT unconditionally.
60979         Update from autoconf, incorporating:
60980         2014-09-02 autoconf: port 'restrict' to GCC 4.2.1
60981         2009-01-28 Fix AC_C_RESTRICT for Sun Studio 12 C++.
60983 2014-09-01  Paul Eggert  <eggert@cs.ucla.edu>
60985         manywarnings: add GCC 4.9 warnings
60986         Also, make it easier to maintain this in the future.
60987         * build-aux/gcc-warning.spec: Add -Wabi-tag,
60988         -Wconditionally-supported, -Wdelete-incomplete,
60989         -Winherited-variadic-ctor, -Wvirtual-move-assign, -Wzerotrip.
60990         Remove duplicates.  Use tabs uniformly, as that's what 'cut' wants.
60991         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -Wdate-time,
60992         -Wopenmp-simd.  Use -fdiagnostics-show-option and -funit-at-a-time
60993         only for older GCC versions that need them.  Handle
60994         -Wnormalized=nfc specially, so that the 'comm' command used
60995         for maintenance doesn't get confused.
60997 2014-08-31  Paul Eggert  <eggert@cs.ucla.edu>
60999         vasnprintf: fix bugs in width computation
61000         * lib/vasnprintf.c (VASNPRINTF):
61001         Rework previous change, which introduced a bug,
61002         to avoid the warning in a different way.
61003         Avoid undefined behavior if the width arg is less than -INT_MAX.
61004         Avoid unnecessary use of HAS_WIDTH local.
61006 2014-08-31  Thien-Thi Nguyen  <ttn@gnu.org>  (tiny change)
61008         vasnprintf: Avoid signed/unsigned comparison warning.
61009         * lib/vasnprintf.c (VASNPRINTF): To calculate padding,
61010         compare end addr of generated string w/ maximum end addr.
61012 2013-08-30  Mats Erik Andersson  <gnu@gisladisker.se>  (tiny change)
61014         parse-datetime: Avoid pointer difference.
61015         * lib/parse-datetime.y (yylex): Compare pointer to end of buffer,
61016         instead of calculating difference of pointers.  This removes an
61017         annoying warning, devoid of any use.
61019 2014-08-29  Paul Eggert  <eggert@cs.ucla.edu>
61021         qsort_r: new module, for GNU-style qsort_r
61022         This works even on FreeBSD, which has an incompatible qsort_r API.
61023         * MODULES.html.sh: Add it.
61024         * doc/glibc-functions/qsort_r.texi: It's now supported.
61025         * lib/qsort.c: New file, taken from glibc with minor changes
61026         inside "#ifndef _LIBC" and with an unnecessary "#include <alloca.h>"
61027         removed.
61028         * lib/qsort_r.c: New file, compiled only on FreeBSD.
61029         * lib/stdlib.in.h (qsort_r): Declare in the usual way.
61030         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS):
61031         * modules/qsort_r, modules/qsort_r-tests: New files.
61032         * modules/stdlib (Makefile): Set up its defaults.
61033         * tests/test-qsort_r.c: New file.
61035 2014-08-08  Paul Eggert  <eggert@cs.ucla.edu>
61037         vla: new module
61038         GNU RCS can use this, mostly for documentation I expect.  See:
61039         http://lists.gnu.org/r/bug-gnulib/2014-08/msg00025.html
61040         * MODULES.html.sh: Add vla.
61041         * lib/vla.h, modules/vla: New files.
61043 2014-08-07  Daiki Ueno  <ueno@gnu.org>
61045         localename: make gl_locale_name_thread really thread-safe on Windows
61046         * lib/localename.c [WINDOWS_NATIVE && !IN_LIBINTL]: Include
61047         "glthread/lock.h".
61048         (get_lcid_lock) [WINDOWS_NATIVE]: New variable.
61049         (get_lcid) [WINDOWS_NATIVE]: Lock while looking for an LCID.
61051 2014-08-07  Paul Eggert  <eggert@cs.ucla.edu>
61053         getpass: don't assume struct termios
61054         Problem report and trivial fix by Jonas 'Sortie' Termansen in:
61055         http://lists.gnu.org/r/bug-gnulib/2014-08/msg00015.html
61056         * lib/getpass.c (getpass): Port to systems lacking struct termios.
61058         getdtablesize: fall back on sysconf (_SC_OPEN_MAX)
61059         Problem reported by Jonas 'Sortie' Termansen in:
61060         http://lists.gnu.org/r/bug-gnulib/2014-08/msg00023.html
61061         * lib/getdtablesize.c (getdtablesize) [_SC_OPEN_MAX]:
61062         Implement via sysconf for platforms that lack getdtablesize.
61064         vararrays: modernize AC_C_VARARRAYS for C11
61065         This backports a change I recently made to Autoconf.
61066         * m4/vararrays.m4 (AC_C_VARARRAYS): Define __STDC_NO_VLA__ if
61067         VLAs are not supported, as this is what C11 does.  The old macro
61068         HAVE_C_VARARRAYS is still defined if they are supported, but is
61069         now obsolescent.  Also, check for VLA bug in GCC 3.4.3.
61071 2014-08-07  Alessandro Degano  <degano@cern.ch>  (tiny change)
61073         relocatable-prog-wrapper: port gettext to OS X 10.8 + GCC 4.8.1
61074         * build-aux/install-reloc (func_create_wrapper): Also wrap
61075         strerror-override, stat, stat.
61077 2014-08-05  Paul Eggert  <eggert@cs.ucla.edu>
61079         sys_select: fix FD_ZERO problem on Solaris 10
61080         * lib/sys_select.in.h: Fix Solaris 10 bug where "#include
61081         <sys/time.h>" followed by "#include <sys/select.h>" caused FD_ZERO
61082         to expand to an expression that invoked memset without necessarily
61083         including <string.h>.  The problem was that the first include
61084         defined _SYS_TIME_H, causing the second include to short-circuit.
61085         Fix a similar problem with <sys/types.h> followed by <sys/select.h>.
61086         Also, fix what appears to be a cut-and-paste typo, by replacing
61087         _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H with
61088         _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H.
61090         accept: document Solaris 10 type glitch
61091         * doc/posix-functions/accept.texi (accept): Mention that
61092         Solaris 10 'accept' takes void * last arg, not socklen_t *.
61094 2014-08-04  Paul Eggert  <eggert@cs.ucla.edu>
61096         extern-inline: port to FreeBSD, DragonFly
61097         * m4/extern-inline.m4 (gl_EXTERN_INLINE): Also assume the bug
61098         is present if either __DragonFly__ or __FreeBSD__ is defined.
61099         FreeBSD problem reported by Andrey Borzenkov in:
61100         http://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html
61101         Also, worry about __APPLE__ only if __MACH__ is also defined,
61102         as this is more consistent with the rest of gnulib.
61103         (_GL_EXTERN_INLINE_STDHEADER_BUG): Rename this internal macro from
61104         _GL_EXTERN_INLINE_APPLE_BUG, since the bug is not limited to Apple.
61106 2014-08-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
61108         regex: Make #if/#ifdef usage consistent for DEBUG
61109         * lib/regex_internal.c: Use "#if defined DEBUG && DEBUG" instead
61110         of the inconsistent usage of #if and #ifdef as that works with
61111         both Glibc and Gnulib's style.
61113 2014-07-31  Eric Blake  <eblake@redhat.com>
61115         openat-die: use _Noreturn markup
61116         * modules/openat-die (Depends-on): Add snippet/_Noreturn.
61117         * lib/openat-die.c (openat_save_fail, openat_restore_fail): Mark
61118         _Noreturn.
61120 2014-07-30  Eric Blake  <eblake@redhat.com>
61122         test-open: port to cygwin, which lacks Fortify
61123         * tests/test-open.h (ALWAYS_INLINE): New macro.
61124         (__always_inline): Don't abuse internal symbol on non-glibc.
61126 2014-07-19  Eli Zaretskii  <eliz@gnu.org>
61128         localename: Enforce declarations before statements.
61129         * localename.c (gl_locale_name_thread): Declare 'lcid' before the
61130         first statement.
61132 2014-07-18  Jim Meyering  <meyering@fb.com>
61134         test-userspec: don't look up numeric user names
61135         * tests/test-userspec.c: I found a system for which getpwnam("0")
61136         returned a pointer to a non-root user's entry, and that made the
61137         test fail.
61138         (T): Prefix each numeric input with "+", to inhibit lookup.
61140 2014-07-15  Eli Zaretskii  <eliz@gnu.org>
61142         localcharset, localename: MS-Windows support for non-default locales
61143         * lib/localcharset.c (locale_charset) [WINDOWS_NATIVE]: Before
61144         falling back on the default system codepage, try extracting
61145         the codepage from what 'setlocale' returns.  This allows to
61146         take into account changes of the codeset due to non-default
61147         locale set by a previous call to 'setlocale'.
61148         * lib/localename.c (LOCALE_NAME_MAX_LENGTH) [WINDOWS_NATIVE]:
61149         Define if not already defined.
61150         (enum_locales_fn, get_lcid) [WINDOWS_NATIVE]: New functions.
61151         (gl_locale_name_thread) [WINDOWS_NATIVE]: Produce the
61152         current locale by calling 'setlocale', then converting the
61153         locale name into LCID by calling 'get_lcid'.  This allows to
61154         take into account changes in the current locale from the
61155         default one, in contrast to GetThreadLocale.
61157 2014-07-14  Daiki Ueno  <ueno@gnu.org>
61159         announce-gen: avoid failure when Digest::SHA is installed
61160         When Digest::SHA is available, Digest::SHA1 is not loaded and thus
61161         Digest::SHA1->new in print_checksums fails.
61162         * build-aux/announce-gen (digest_classes): New associative array
61163         for available message digest implementations.
61164         (print_locations): Use it.
61166 2014-07-13  Pádraig Brady  <P@draigBrady.com>
61168         gettext: revert "update macros to version 0.19"
61169         This reverts commit 9b9370ca, as it currently requires that
61170         developers of any project that explicitly uses the gettext module
61171         or implicitly uses it through the utimens-tests or
61172         futimens-tests modules, use gettext >= 0.19.
61173         However there are some stability and availablity issues with
61174         that version at present.  We can reinstate this soon, when stability
61175         is addressed and packages are more readily available.
61177 2014-07-12  Jim Meyering  <meyering@fb.com>
61179         regex: don't deref NULL upon heap allocation failure
61180         * lib/regcomp.c (parse_dup_op): Handle duplicate_tree
61181         failure in one more place.
61182         To trigger the segfault, configure grep -with-included-regex,
61183         build it, and run these commands:
61184         ( ulimit -v 300000; echo a|src/grep -E a+++++++++++++++++++++ )
61185         I discovered this while replying to a private report from
61186         Jens Schleusener about excessive memory consumption by grep
61187         when using a regular expression like the one above.
61189 2014-07-11  Paul Eggert  <eggert@cs.ucla.edu>
61191         regex: fix memory leak in compiler
61192         Fix by Andreas Schwab in:
61193         https://sourceware.org/ml/libc-alpha/2014-06/msg00503.html
61194         * lib/regcomp.c (parse_reg_exp): Deallocate partially
61195         constructed tree before returning error.
61197 2014-07-10  Assaf Gordon  <assafgordon@gmail.com>
61199         announce-gen: avoid perl warnings
61200         * build-aux/announce-gen: add two minor checks to avoid
61201         "use of uninitialized value" warnings when command-line parameters are
61202         missing.
61204 2014-07-10  Assaf Gordon  <assafgordon@gmail.com>
61206         localename: avoid -Wsuggest-attribute={const,pure} warnings
61207         * lib/localename.c (string_has): Tag internal function as pure.
61208         * lib/localename.h (gl_locale_name_default): Tag extern declaration
61209         as const when appropriate.
61211 2014-07-10  Eli Zaretskii  <eliz@gnu.org>
61213         nl_langinfo: Fix last change.
61214         * lib/nl_langinfo.c (includes): Drop redundant include.
61216 2014-07-10  Siddhesh Poyarekar  <siddhesh@redhat.com>
61218         error: Fix -Wundef warnings in glibc
61219         * lib/error.c [_LIBC]: Define default macros for
61220         glibc.
61221         (print_errno_message) [defined HAVE_STRERROR_R || _LIBC]:
61222         Check _LIBC before STRERROR_R_CHAR_P.
61224         error: Sync from glibc master
61225         * lib/error.c [_LIBC]: Remove INTUSE usage.
61226         (error_tail): Remove unused macro ALLOCA_LIMIT.
61227         Fix potential buffer overflow.  Fix potential NULL dereference
61228         in strcmp.
61230 2014-07-09  Pavel Hrdina  <phrdina@redhat.com> (tiny change)
61232         nl_langinfo: fix build under mingw
61233         * lib/nl_langinfo.c (includes): Pick up <windows.h> for GetACP().
61235 2014-07-09  Andrew D Warshall  <warshall@99main.com>
61237         mountlist: do not classify a bind-mounted dir entry as "dummy"
61238         * m4/ls-mntd-fs.m4: Check for hasmntopt() on platforms with
61239         1-argument getmntent() (instead of assuming absence).
61241 2014-07-08  Eric Blake  <eblake@redhat.com>
61243         maint.mk: less syntax-check noise when SIGPIPE is ignored
61244         * top/maint.mk (_sc_header_without_use)
61245         (sc_require_config_h_first): Parse full list.
61247 2014-07-07  Eli Zaretskii  <eliz@gnu.org>
61248             Paul Eggert  <eggert@cs.ucla.edu>
61250         nl_langinfo: CODESET on MS-Windows and more items from localeconv
61251         * lib/langinfo.in.h (DECIMAL_POINT, THOUSANDS_SEP, GROUPING)
61252         (CURRENCY_SYMBOL, INT_CURR_SYMBOL, MON_DECIMAL_POINT)
61253         (MON_THOUSANDS_SEP, MON_GROUPING, POSITIVE_SIGN, NEGATIVE_SIGN)
61254         (FRAC_DIGITS, INT_FRAC_DIGITS, P_CS_PRECEDES, N_CS_PRECEDES)
61255         (P_SEP_BY_SPACE, N_SEP_BY_SPACE, P_SIGN_POSN, N_SIGN_POSN): Define.
61256         * lib/nl_langinfo.c: Include <locale.h> and <string.h> early.
61257         Include <stdio.h> if Microsoft Windows.
61258         Include <time.h> if !REPLACE_NL_LANGINFO.
61259         (ctype_codeset): New function, taken from rpl_nl_langinfo,
61260         and with improvements for Microsoft Windows.
61261         (rpl_nl_langinfo): Use it.
61262         (nl_langinfo) [!REPLACE_NL_LANGINFO]: Likewise.
61263         Compute the values of RADIXCHAR, THOUSEP, GROUPING, CRNCYSTR,
61264         INT_CURR_SYMBOL, MON_DECIMAL_POINT, MON_THOUSANDS_SEP,
61265         MON_GROUPING, POSITIVE_SIGN, NEGATIVE_SIGN, FRAC_DIGITS,
61266         INT_FRAC_DIGITS, P_CS_PRECEDES, N_CS_PRECEDES, P_SEP_BY_SPACE,
61267         N_SEP_BY_SPACE, P_SIGN_POSN, and N_SIGN_POSN from the
61268         corresponding values returned by 'localeconv'.  Compute the values
61269         of AM_STR, PM_STR, DAY_n, ABDAY_n, MON_n, and ABMON_n by calling
61270         'strftime' with a suitable struct tm value.
61272 2014-07-05  Paul Eggert  <eggert@cs.ucla.edu>
61274         Bruno Haible has stepped down as maintainer.
61275         See Karl Berry in:
61276         http://lists.gnu.org/r/bug-gnulib/2014-07/msg00004.html
61277         Daiki Ueno has volunteered to maintain libunistring; see:
61278         http://lists.gnu.org/r/bug-gnulib/2014-07/msg00005.html
61279         * modules/gen-uni-tables, modules/libunistring:
61280         * modules/libunistring-optional, modules/ucs4-utf16, modules/ucs4-utf8:
61281         * modules/unicase/base, modules/unicase/cased:
61282         * modules/unicase/empty-prefix-context:
61283         * modules/unicase/empty-suffix-context, modules/unicase/ignorable:
61284         * modules/unicase/locale-language, modules/unicase/special-casing:
61285         * modules/unicase/tocasefold, modules/unicase/tolower:
61286         * modules/unicase/totitle, modules/unicase/toupper:
61287         * modules/unicase/u16-casecmp, modules/unicase/u16-casecoll:
61288         * modules/unicase/u16-casefold, modules/unicase/u16-casemap:
61289         * modules/unicase/u16-casexfrm, modules/unicase/u16-ct-casefold:
61290         * modules/unicase/u16-ct-tolower, modules/unicase/u16-ct-totitle:
61291         * modules/unicase/u16-ct-toupper, modules/unicase/u16-is-cased:
61292         * modules/unicase/u16-is-casefolded, modules/unicase/u16-is-invariant:
61293         * modules/unicase/u16-is-lowercase, modules/unicase/u16-is-titlecase:
61294         * modules/unicase/u16-is-uppercase, modules/unicase/u16-prefix-context:
61295         * modules/unicase/u16-suffix-context, modules/unicase/u16-tolower:
61296         * modules/unicase/u16-totitle, modules/unicase/u16-toupper:
61297         * modules/unicase/u32-casecmp, modules/unicase/u32-casecoll:
61298         * modules/unicase/u32-casefold, modules/unicase/u32-casemap:
61299         * modules/unicase/u32-casexfrm, modules/unicase/u32-ct-casefold:
61300         * modules/unicase/u32-ct-tolower, modules/unicase/u32-ct-totitle:
61301         * modules/unicase/u32-ct-toupper, modules/unicase/u32-is-cased:
61302         * modules/unicase/u32-is-casefolded, modules/unicase/u32-is-invariant:
61303         * modules/unicase/u32-is-lowercase, modules/unicase/u32-is-titlecase:
61304         * modules/unicase/u32-is-uppercase, modules/unicase/u32-prefix-context:
61305         * modules/unicase/u32-suffix-context, modules/unicase/u32-tolower:
61306         * modules/unicase/u32-totitle, modules/unicase/u32-toupper:
61307         * modules/unicase/u8-casecmp, modules/unicase/u8-casecoll:
61308         * modules/unicase/u8-casefold, modules/unicase/u8-casemap:
61309         * modules/unicase/u8-casexfrm, modules/unicase/u8-ct-casefold:
61310         * modules/unicase/u8-ct-tolower, modules/unicase/u8-ct-totitle:
61311         * modules/unicase/u8-ct-toupper, modules/unicase/u8-is-cased:
61312         * modules/unicase/u8-is-casefolded, modules/unicase/u8-is-invariant:
61313         * modules/unicase/u8-is-lowercase, modules/unicase/u8-is-titlecase:
61314         * modules/unicase/u8-is-uppercase, modules/unicase/u8-prefix-context:
61315         * modules/unicase/u8-suffix-context, modules/unicase/u8-tolower:
61316         * modules/unicase/u8-totitle, modules/unicase/u8-toupper:
61317         * modules/unicase/ulc-casecmp, modules/unicase/ulc-casecoll:
61318         * modules/unicase/ulc-casexfrm, modules/unicodeio:
61319         * modules/uniconv/base, modules/uniconv/u16-conv-from-enc:
61320         * modules/uniconv/u16-conv-to-enc:
61321         * modules/uniconv/u16-strconv-from-enc:
61322         * modules/uniconv/u16-strconv-from-locale:
61323         * modules/uniconv/u16-strconv-to-enc:
61324         * modules/uniconv/u16-strconv-to-locale:
61325         * modules/uniconv/u32-conv-from-enc, modules/uniconv/u32-conv-to-enc:
61326         * modules/uniconv/u32-strconv-from-enc:
61327         * modules/uniconv/u32-strconv-from-locale:
61328         * modules/uniconv/u32-strconv-to-enc:
61329         * modules/uniconv/u32-strconv-to-locale:
61330         * modules/uniconv/u8-conv-from-enc, modules/uniconv/u8-conv-to-enc:
61331         * modules/uniconv/u8-strconv-from-enc:
61332         * modules/uniconv/u8-strconv-from-locale:
61333         * modules/uniconv/u8-strconv-to-enc:
61334         * modules/uniconv/u8-strconv-to-locale, modules/unictype/base:
61335         * modules/unictype/bidicategory-all:
61336         * modules/unictype/bidicategory-byname:
61337         * modules/unictype/bidicategory-name, modules/unictype/bidicategory-of:
61338         * modules/unictype/bidicategory-test, modules/unictype/bidiclass-all:
61339         * modules/unictype/bidiclass-byname:
61340         * modules/unictype/bidiclass-longname, modules/unictype/bidiclass-name:
61341         * modules/unictype/bidiclass-of, modules/unictype/bidiclass-test:
61342         * modules/unictype/block-all, modules/unictype/block-list:
61343         * modules/unictype/block-of, modules/unictype/block-test:
61344         * modules/unictype/category-C, modules/unictype/category-Cc:
61345         * modules/unictype/category-Cf, modules/unictype/category-Cn:
61346         * modules/unictype/category-Co, modules/unictype/category-Cs:
61347         * modules/unictype/category-L, modules/unictype/category-LC:
61348         * modules/unictype/category-Ll, modules/unictype/category-Lm:
61349         * modules/unictype/category-Lo, modules/unictype/category-Lt:
61350         * modules/unictype/category-Lu, modules/unictype/category-M:
61351         * modules/unictype/category-Mc, modules/unictype/category-Me:
61352         * modules/unictype/category-Mn, modules/unictype/category-N:
61353         * modules/unictype/category-Nd, modules/unictype/category-Nl:
61354         * modules/unictype/category-No, modules/unictype/category-P:
61355         * modules/unictype/category-Pc, modules/unictype/category-Pd:
61356         * modules/unictype/category-Pe, modules/unictype/category-Pf:
61357         * modules/unictype/category-Pi, modules/unictype/category-Po:
61358         * modules/unictype/category-Ps, modules/unictype/category-S:
61359         * modules/unictype/category-Sc, modules/unictype/category-Sk:
61360         * modules/unictype/category-Sm, modules/unictype/category-So:
61361         * modules/unictype/category-Z, modules/unictype/category-Zl:
61362         * modules/unictype/category-Zp, modules/unictype/category-Zs:
61363         * modules/unictype/category-all, modules/unictype/category-and:
61364         * modules/unictype/category-and-not, modules/unictype/category-byname:
61365         * modules/unictype/category-longname, modules/unictype/category-name:
61366         * modules/unictype/category-none, modules/unictype/category-of:
61367         * modules/unictype/category-or, modules/unictype/category-test:
61368         * modules/unictype/category-test-withtable:
61369         * modules/unictype/combining-class:
61370         * modules/unictype/combining-class-all:
61371         * modules/unictype/combining-class-byname:
61372         * modules/unictype/combining-class-longname:
61373         * modules/unictype/combining-class-name, modules/unictype/ctype-alnum:
61374         * modules/unictype/ctype-alpha, modules/unictype/ctype-blank:
61375         * modules/unictype/ctype-cntrl, modules/unictype/ctype-digit:
61376         * modules/unictype/ctype-graph, modules/unictype/ctype-lower:
61377         * modules/unictype/ctype-print, modules/unictype/ctype-punct:
61378         * modules/unictype/ctype-space, modules/unictype/ctype-upper:
61379         * modules/unictype/ctype-xdigit, modules/unictype/decimal-digit:
61380         * modules/unictype/digit, modules/unictype/joininggroup-all:
61381         * modules/unictype/joininggroup-byname:
61382         * modules/unictype/joininggroup-name, modules/unictype/joininggroup-of:
61383         * modules/unictype/joiningtype-all:
61384         * modules/unictype/joiningtype-byname:
61385         * modules/unictype/joiningtype-longname:
61386         * modules/unictype/joiningtype-name, modules/unictype/joiningtype-of:
61387         * modules/unictype/mirror, modules/unictype/numeric:
61388         * modules/unictype/property-all, modules/unictype/property-alphabetic:
61389         * modules/unictype/property-ascii-hex-digit:
61390         * modules/unictype/property-bidi-arabic-digit:
61391         * modules/unictype/property-bidi-arabic-right-to-left:
61392         * modules/unictype/property-bidi-block-separator:
61393         * modules/unictype/property-bidi-boundary-neutral:
61394         * modules/unictype/property-bidi-common-separator:
61395         * modules/unictype/property-bidi-control:
61396         * modules/unictype/property-bidi-embedding-or-override:
61397         * modules/unictype/property-bidi-eur-num-separator:
61398         * modules/unictype/property-bidi-eur-num-terminator:
61399         * modules/unictype/property-bidi-european-digit:
61400         * modules/unictype/property-bidi-hebrew-right-to-left:
61401         * modules/unictype/property-bidi-left-to-right:
61402         * modules/unictype/property-bidi-non-spacing-mark:
61403         * modules/unictype/property-bidi-other-neutral:
61404         * modules/unictype/property-bidi-pdf:
61405         * modules/unictype/property-bidi-segment-separator:
61406         * modules/unictype/property-bidi-whitespace:
61407         * modules/unictype/property-byname:
61408         * modules/unictype/property-case-ignorable:
61409         * modules/unictype/property-cased:
61410         * modules/unictype/property-changes-when-casefolded:
61411         * modules/unictype/property-changes-when-casemapped:
61412         * modules/unictype/property-changes-when-lowercased:
61413         * modules/unictype/property-changes-when-titlecased:
61414         * modules/unictype/property-changes-when-uppercased:
61415         * modules/unictype/property-combining:
61416         * modules/unictype/property-composite:
61417         * modules/unictype/property-currency-symbol:
61418         * modules/unictype/property-dash:
61419         * modules/unictype/property-decimal-digit:
61420         * modules/unictype/property-default-ignorable-code-point:
61421         * modules/unictype/property-deprecated:
61422         * modules/unictype/property-diacritic:
61423         * modules/unictype/property-extender:
61424         * modules/unictype/property-format-control:
61425         * modules/unictype/property-grapheme-base:
61426         * modules/unictype/property-grapheme-extend:
61427         * modules/unictype/property-grapheme-link:
61428         * modules/unictype/property-hex-digit:
61429         * modules/unictype/property-hyphen:
61430         * modules/unictype/property-id-continue:
61431         * modules/unictype/property-id-start:
61432         * modules/unictype/property-ideographic:
61433         * modules/unictype/property-ids-binary-operator:
61434         * modules/unictype/property-ids-trinary-operator:
61435         * modules/unictype/property-ignorable-control:
61436         * modules/unictype/property-iso-control:
61437         * modules/unictype/property-join-control:
61438         * modules/unictype/property-left-of-pair:
61439         * modules/unictype/property-line-separator:
61440         * modules/unictype/property-logical-order-exception:
61441         * modules/unictype/property-lowercase, modules/unictype/property-math:
61442         * modules/unictype/property-non-break:
61443         * modules/unictype/property-not-a-character:
61444         * modules/unictype/property-numeric:
61445         * modules/unictype/property-other-alphabetic:
61446         * modules/unictype/property-other-default-ignorable-code-point:
61447         * modules/unictype/property-other-grapheme-extend:
61448         * modules/unictype/property-other-id-continue:
61449         * modules/unictype/property-other-id-start:
61450         * modules/unictype/property-other-lowercase:
61451         * modules/unictype/property-other-math:
61452         * modules/unictype/property-other-uppercase:
61453         * modules/unictype/property-paired-punctuation:
61454         * modules/unictype/property-paragraph-separator:
61455         * modules/unictype/property-pattern-syntax:
61456         * modules/unictype/property-pattern-white-space:
61457         * modules/unictype/property-private-use:
61458         * modules/unictype/property-punctuation:
61459         * modules/unictype/property-quotation-mark:
61460         * modules/unictype/property-radical:
61461         * modules/unictype/property-sentence-terminal:
61462         * modules/unictype/property-soft-dotted:
61463         * modules/unictype/property-space:
61464         * modules/unictype/property-terminal-punctuation:
61465         * modules/unictype/property-test, modules/unictype/property-titlecase:
61466         * modules/unictype/property-unassigned-code-value:
61467         * modules/unictype/property-unified-ideograph:
61468         * modules/unictype/property-uppercase:
61469         * modules/unictype/property-variation-selector:
61470         * modules/unictype/property-white-space:
61471         * modules/unictype/property-xid-continue:
61472         * modules/unictype/property-xid-start:
61473         * modules/unictype/property-zero-width, modules/unictype/scripts:
61474         * modules/unictype/scripts-all, modules/unictype/syntax-c-ident:
61475         * modules/unictype/syntax-c-whitespace:
61476         * modules/unictype/syntax-java-ident:
61477         * modules/unictype/syntax-java-whitespace, modules/unigbrk/base:
61478         * modules/unigbrk/u16-grapheme-breaks:
61479         * modules/unigbrk/u16-grapheme-next, modules/unigbrk/u16-grapheme-prev:
61480         * modules/unigbrk/u32-grapheme-breaks:
61481         * modules/unigbrk/u32-grapheme-next, modules/unigbrk/u32-grapheme-prev:
61482         * modules/unigbrk/u8-grapheme-breaks, modules/unigbrk/u8-grapheme-next:
61483         * modules/unigbrk/u8-grapheme-prev, modules/unigbrk/uc-gbrk-prop:
61484         * modules/unigbrk/uc-is-grapheme-break:
61485         * modules/unigbrk/ulc-grapheme-breaks, modules/unilbrk/base:
61486         * modules/unilbrk/tables, modules/unilbrk/u16-possible-linebreaks:
61487         * modules/unilbrk/u16-width-linebreaks:
61488         * modules/unilbrk/u32-possible-linebreaks:
61489         * modules/unilbrk/u32-width-linebreaks:
61490         * modules/unilbrk/u8-possible-linebreaks:
61491         * modules/unilbrk/u8-width-linebreaks, modules/unilbrk/ulc-common:
61492         * modules/unilbrk/ulc-possible-linebreaks:
61493         * modules/unilbrk/ulc-width-linebreaks, modules/uniname/base:
61494         * modules/uniname/uniname, modules/uninorm/base:
61495         * modules/uninorm/canonical-decomposition:
61496         * modules/uninorm/compat-decomposition, modules/uninorm/composition:
61497         * modules/uninorm/decompose-internal, modules/uninorm/decomposing-form:
61498         * modules/uninorm/decomposition, modules/uninorm/decomposition-table:
61499         * modules/uninorm/filter, modules/uninorm/nfc, modules/uninorm/nfd:
61500         * modules/uninorm/nfkc, modules/uninorm/nfkd:
61501         * modules/uninorm/u16-normalize, modules/uninorm/u16-normcmp:
61502         * modules/uninorm/u16-normcoll, modules/uninorm/u16-normxfrm:
61503         * modules/uninorm/u32-normalize, modules/uninorm/u32-normcmp:
61504         * modules/uninorm/u32-normcoll, modules/uninorm/u32-normxfrm:
61505         * modules/uninorm/u8-normalize, modules/uninorm/u8-normcmp:
61506         * modules/uninorm/u8-normcoll, modules/uninorm/u8-normxfrm:
61507         * modules/unistdio/base, modules/unistdio/u-printf-args:
61508         * modules/unistdio/u16-asnprintf, modules/unistdio/u16-asprintf:
61509         * modules/unistdio/u16-printf-parse, modules/unistdio/u16-snprintf:
61510         * modules/unistdio/u16-sprintf, modules/unistdio/u16-u16-asnprintf:
61511         * modules/unistdio/u16-u16-asprintf, modules/unistdio/u16-u16-snprintf:
61512         * modules/unistdio/u16-u16-sprintf:
61513         * modules/unistdio/u16-u16-vasnprintf:
61514         * modules/unistdio/u16-u16-vasprintf:
61515         * modules/unistdio/u16-u16-vsnprintf:
61516         * modules/unistdio/u16-u16-vsprintf, modules/unistdio/u16-vasnprintf:
61517         * modules/unistdio/u16-vasprintf, modules/unistdio/u16-vsnprintf:
61518         * modules/unistdio/u16-vsprintf, modules/unistdio/u32-asnprintf:
61519         * modules/unistdio/u32-asprintf, modules/unistdio/u32-printf-parse:
61520         * modules/unistdio/u32-snprintf, modules/unistdio/u32-sprintf:
61521         * modules/unistdio/u32-u32-asnprintf:
61522         * modules/unistdio/u32-u32-asprintf, modules/unistdio/u32-u32-snprintf:
61523         * modules/unistdio/u32-u32-sprintf:
61524         * modules/unistdio/u32-u32-vasnprintf:
61525         * modules/unistdio/u32-u32-vasprintf:
61526         * modules/unistdio/u32-u32-vsnprintf:
61527         * modules/unistdio/u32-u32-vsprintf, modules/unistdio/u32-vasnprintf:
61528         * modules/unistdio/u32-vasprintf, modules/unistdio/u32-vsnprintf:
61529         * modules/unistdio/u32-vsprintf, modules/unistdio/u8-asnprintf:
61530         * modules/unistdio/u8-asprintf, modules/unistdio/u8-printf-parse:
61531         * modules/unistdio/u8-snprintf, modules/unistdio/u8-sprintf:
61532         * modules/unistdio/u8-u8-asnprintf, modules/unistdio/u8-u8-asprintf:
61533         * modules/unistdio/u8-u8-snprintf, modules/unistdio/u8-u8-sprintf:
61534         * modules/unistdio/u8-u8-vasnprintf, modules/unistdio/u8-u8-vasprintf:
61535         * modules/unistdio/u8-u8-vsnprintf, modules/unistdio/u8-u8-vsprintf:
61536         * modules/unistdio/u8-vasnprintf, modules/unistdio/u8-vasprintf:
61537         * modules/unistdio/u8-vsnprintf, modules/unistdio/u8-vsprintf:
61538         * modules/unistdio/ulc-asnprintf, modules/unistdio/ulc-asprintf:
61539         * modules/unistdio/ulc-fprintf, modules/unistdio/ulc-printf-parse:
61540         * modules/unistdio/ulc-snprintf, modules/unistdio/ulc-sprintf:
61541         * modules/unistdio/ulc-vasnprintf, modules/unistdio/ulc-vasprintf:
61542         * modules/unistdio/ulc-vfprintf, modules/unistdio/ulc-vsnprintf:
61543         * modules/unistdio/ulc-vsprintf, modules/unistr/base:
61544         * modules/unistr/u16-check, modules/unistr/u16-chr:
61545         * modules/unistr/u16-cmp, modules/unistr/u16-cmp2:
61546         * modules/unistr/u16-cpy, modules/unistr/u16-cpy-alloc:
61547         * modules/unistr/u16-endswith, modules/unistr/u16-mblen:
61548         * modules/unistr/u16-mbsnlen, modules/unistr/u16-mbtouc:
61549         * modules/unistr/u16-mbtouc-unsafe, modules/unistr/u16-mbtoucr:
61550         * modules/unistr/u16-move, modules/unistr/u16-next:
61551         * modules/unistr/u16-prev, modules/unistr/u16-set:
61552         * modules/unistr/u16-startswith, modules/unistr/u16-stpcpy:
61553         * modules/unistr/u16-stpncpy, modules/unistr/u16-strcat:
61554         * modules/unistr/u16-strchr, modules/unistr/u16-strcmp:
61555         * modules/unistr/u16-strcoll, modules/unistr/u16-strcpy:
61556         * modules/unistr/u16-strcspn, modules/unistr/u16-strdup:
61557         * modules/unistr/u16-strlen, modules/unistr/u16-strmblen:
61558         * modules/unistr/u16-strmbtouc, modules/unistr/u16-strncat:
61559         * modules/unistr/u16-strncmp, modules/unistr/u16-strncpy:
61560         * modules/unistr/u16-strnlen, modules/unistr/u16-strpbrk:
61561         * modules/unistr/u16-strrchr, modules/unistr/u16-strspn:
61562         * modules/unistr/u16-strstr, modules/unistr/u16-strtok:
61563         * modules/unistr/u16-to-u32, modules/unistr/u16-to-u8:
61564         * modules/unistr/u16-uctomb, modules/unistr/u32-check:
61565         * modules/unistr/u32-chr, modules/unistr/u32-cmp:
61566         * modules/unistr/u32-cmp2, modules/unistr/u32-cpy:
61567         * modules/unistr/u32-cpy-alloc, modules/unistr/u32-endswith:
61568         * modules/unistr/u32-mblen, modules/unistr/u32-mbsnlen:
61569         * modules/unistr/u32-mbtouc, modules/unistr/u32-mbtouc-unsafe:
61570         * modules/unistr/u32-mbtoucr, modules/unistr/u32-move:
61571         * modules/unistr/u32-next, modules/unistr/u32-prev:
61572         * modules/unistr/u32-set, modules/unistr/u32-startswith:
61573         * modules/unistr/u32-stpcpy, modules/unistr/u32-stpncpy:
61574         * modules/unistr/u32-strcat, modules/unistr/u32-strchr:
61575         * modules/unistr/u32-strcmp, modules/unistr/u32-strcoll:
61576         * modules/unistr/u32-strcpy, modules/unistr/u32-strcspn:
61577         * modules/unistr/u32-strdup, modules/unistr/u32-strlen:
61578         * modules/unistr/u32-strmblen, modules/unistr/u32-strmbtouc:
61579         * modules/unistr/u32-strncat, modules/unistr/u32-strncmp:
61580         * modules/unistr/u32-strncpy, modules/unistr/u32-strnlen:
61581         * modules/unistr/u32-strpbrk, modules/unistr/u32-strrchr:
61582         * modules/unistr/u32-strspn, modules/unistr/u32-strstr:
61583         * modules/unistr/u32-strtok, modules/unistr/u32-to-u16:
61584         * modules/unistr/u32-to-u8, modules/unistr/u32-uctomb:
61585         * modules/unistr/u8-check, modules/unistr/u8-chr:
61586         * modules/unistr/u8-cmp, modules/unistr/u8-cmp2, modules/unistr/u8-cpy:
61587         * modules/unistr/u8-cpy-alloc, modules/unistr/u8-endswith:
61588         * modules/unistr/u8-mblen, modules/unistr/u8-mbsnlen:
61589         * modules/unistr/u8-mbtouc, modules/unistr/u8-mbtouc-unsafe:
61590         * modules/unistr/u8-mbtoucr, modules/unistr/u8-move:
61591         * modules/unistr/u8-next, modules/unistr/u8-prev:
61592         * modules/unistr/u8-set, modules/unistr/u8-startswith:
61593         * modules/unistr/u8-stpcpy, modules/unistr/u8-stpncpy:
61594         * modules/unistr/u8-strcat, modules/unistr/u8-strchr:
61595         * modules/unistr/u8-strcmp, modules/unistr/u8-strcoll:
61596         * modules/unistr/u8-strcpy, modules/unistr/u8-strcspn:
61597         * modules/unistr/u8-strdup, modules/unistr/u8-strlen:
61598         * modules/unistr/u8-strmblen, modules/unistr/u8-strmbtouc:
61599         * modules/unistr/u8-strncat, modules/unistr/u8-strncmp:
61600         * modules/unistr/u8-strncpy, modules/unistr/u8-strnlen:
61601         * modules/unistr/u8-strpbrk, modules/unistr/u8-strrchr:
61602         * modules/unistr/u8-strspn, modules/unistr/u8-strstr:
61603         * modules/unistr/u8-strtok, modules/unistr/u8-to-u16:
61604         * modules/unistr/u8-to-u32, modules/unistr/u8-uctomb, modules/unitypes:
61605         * modules/uniwbrk/base, modules/uniwbrk/table:
61606         * modules/uniwbrk/u16-wordbreaks, modules/uniwbrk/u32-wordbreaks:
61607         * modules/uniwbrk/u8-wordbreaks, modules/uniwbrk/ulc-wordbreaks:
61608         * modules/uniwbrk/wordbreak-property, modules/uniwidth/base:
61609         * modules/uniwidth/u16-strwidth, modules/uniwidth/u16-width:
61610         * modules/uniwidth/u32-strwidth, modules/uniwidth/u32-width:
61611         * modules/uniwidth/u8-strwidth, modules/uniwidth/u8-width:
61612         * modules/uniwidth/width, modules/utf16-ucs4:
61613         * modules/utf16-ucs4-unsafe, modules/utf8-ucs4:
61614         * modules/utf8-ucs4-unsafe:
61615         Change maintainer from Bruno Haible to Daiki Ueno.
61616         This is my guess at the libunistring modules; please feel free
61617         to fix if I guessed incorrectly.
61618         * modules/accept4, modules/acl, modules/acos, modules/acosf:
61619         * modules/alignof, modules/amemxfrm, modules/ansi-c++-opt:
61620         * modules/areadlink, modules/array-list, modules/array-mergesort:
61621         * modules/array-oset, modules/asin, modules/asinf, modules/astrxfrm:
61622         * modules/atan, modules/atan2, modules/atan2f, modules/atanf:
61623         * modules/avltree-list, modules/avltree-oset, modules/avltreehash-list:
61624         * modules/binary-io, modules/bison-i18n, modules/btowc:
61625         * modules/c-ctype, modules/c-strcase, modules/c-strcaseeq:
61626         * modules/c-strcasestr, modules/c-strstr, modules/calloc-posix:
61627         * modules/canonicalize-lgpl, modules/careadlinkat, modules/carray-list:
61628         * modules/cbrt, modules/cbrt-ieee, modules/cbrtf, modules/cbrtf-ieee:
61629         * modules/cbrtl, modules/cbrtl-ieee, modules/ceil, modules/ceil-ieee:
61630         * modules/ceilf, modules/ceilf-ieee, modules/ceill, modules/ceill-ieee:
61631         * modules/chdir, modules/classpath, modules/clean-temp, modules/close:
61632         * modules/closedir, modules/concat-filename, modules/copy-file:
61633         * modules/copysign, modules/copysignf, modules/copysignl, modules/cos:
61634         * modules/cosf, modules/cosh, modules/coshf, modules/csharpcomp:
61635         * modules/csharpcomp-script, modules/csharpexec:
61636         * modules/csharpexec-script, modules/ctype, modules/diffseq:
61637         * modules/dprintf, modules/dprintf-posix, modules/dup:
61638         * modules/dup2-obsolete, modules/dup3, modules/duplocale:
61639         * modules/eealloc, modules/environ, modules/erf, modules/erfc:
61640         * modules/errno, modules/execute, modules/exp, modules/exp-ieee:
61641         * modules/exp2, modules/exp2-ieee, modules/exp2f, modules/exp2f-ieee:
61642         * modules/exp2l, modules/exp2l-ieee, modules/expf, modules/expf-ieee:
61643         * modules/expl, modules/expl-ieee, modules/expm1, modules/expm1-ieee:
61644         * modules/expm1f, modules/expm1f-ieee, modules/expm1l:
61645         * modules/expm1l-ieee, modules/fabs, modules/fabs-ieee, modules/fabsf:
61646         * modules/fabsf-ieee, modules/fabsl, modules/fabsl-ieee:
61647         * modules/fatal-signal, modules/fbufmode, modules/fchdir:
61648         * modules/fclose, modules/fd-hook, modules/fdopen, modules/filename:
61649         * modules/findprog, modules/findprog-lgpl, modules/floor:
61650         * modules/floor-ieee, modules/floorf, modules/floorf-ieee:
61651         * modules/floorl, modules/floorl-ieee, modules/fma, modules/fma-ieee:
61652         * modules/fmaf, modules/fmaf-ieee, modules/fmal, modules/fmal-ieee:
61653         * modules/fmod, modules/fmod-ieee, modules/fmodf, modules/fmodf-ieee:
61654         * modules/fmodl, modules/fmodl-ieee, modules/fopen, modules/fpieee:
61655         * modules/fprintf-posix, modules/fpucw, modules/fpurge:
61656         * modules/freadable, modules/freadahead, modules/freadptr:
61657         * modules/freadseek, modules/freopen, modules/frexp:
61658         * modules/frexp-ieee, modules/frexp-nolibm, modules/frexpf:
61659         * modules/frexpf-ieee, modules/frexpl, modules/frexpl-ieee:
61660         * modules/frexpl-nolibm, modules/fseek, modules/fseeko:
61661         * modules/fseterr, modules/fstat, modules/fstrcmp, modules/ftell:
61662         * modules/ftello, modules/full-read, modules/full-write:
61663         * modules/fwritable, modules/fwriteerror, modules/gcd:
61664         * modules/get-rusage-as, modules/get-rusage-data:
61665         * modules/getdtablesize, modules/getrusage, modules/gettext:
61666         * modules/gettext-h, modules/git-merge-changelog, modules/gperf:
61667         * modules/grantpt, modules/havelib, modules/host-cpu-c-abi:
61668         * modules/hostent, modules/hypot, modules/hypot-ieee, modules/hypotf:
61669         * modules/hypotf-ieee, modules/hypotl, modules/hypotl-ieee:
61670         * modules/iconv, modules/iconv-h, modules/iconv_open:
61671         * modules/iconv_open-utf, modules/idpriv-drop, modules/idpriv-droptemp:
61672         * modules/ilogb, modules/ilogbf, modules/ilogbl, modules/imaxabs:
61673         * modules/imaxdiv, modules/integer_length, modules/integer_length_l:
61674         * modules/integer_length_ll, modules/ioctl, modules/isatty:
61675         * modules/isblank, modules/isnand, modules/isnand-nolibm:
61676         * modules/isnanf, modules/isnanf-nolibm, modules/isnanl:
61677         * modules/isnanl-nolibm, modules/iswblank, modules/iswctype:
61678         * modules/j0, modules/j1, modules/javacomp, modules/javacomp-script:
61679         * modules/javaexec, modules/javaexec-script, modules/javaversion:
61680         * modules/jn, modules/langinfo, modules/ldd, modules/ldexp:
61681         * modules/ldexp-ieee, modules/ldexpf, modules/ldexpf-ieee:
61682         * modules/ldexpl, modules/ldexpl-ieee, modules/lgamma:
61683         * modules/lib-symbol-visibility, modules/libsigsegv:
61684         * modules/linked-list, modules/linkedhash-list, modules/list:
61685         * modules/localcharset, modules/locale, modules/localeconv:
61686         * modules/localename, modules/lock, modules/log, modules/log-ieee:
61687         * modules/log10, modules/log10-ieee, modules/log10f:
61688         * modules/log10f-ieee, modules/log10l, modules/log10l-ieee:
61689         * modules/log1p, modules/log1p-ieee, modules/log1pf:
61690         * modules/log1pf-ieee, modules/log1pl, modules/log1pl-ieee:
61691         * modules/log2, modules/log2-ieee, modules/log2f, modules/log2f-ieee:
61692         * modules/log2l, modules/log2l-ieee, modules/logb, modules/logb-ieee:
61693         * modules/logbf, modules/logbf-ieee, modules/logbl, modules/logbl-ieee:
61694         * modules/logf, modules/logf-ieee, modules/login_tty:
61695         * modules/logl-ieee, modules/malloc-posix, modules/malloca:
61696         * modules/mbchar, modules/mbfile, modules/mbiter, modules/mbmemcasecmp:
61697         * modules/mbmemcasecoll, modules/mbrlen, modules/mbrtowc:
61698         * modules/mbscasecmp, modules/mbscasestr, modules/mbschr:
61699         * modules/mbscspn, modules/mbsinit, modules/mbslen:
61700         * modules/mbsncasecmp, modules/mbsnlen, modules/mbsnrtowcs:
61701         * modules/mbspbrk, modules/mbspcasecmp, modules/mbsrchr:
61702         * modules/mbsrtowcs, modules/mbssep, modules/mbsspn, modules/mbsstr:
61703         * modules/mbstok_r, modules/mbswidth, modules/mbtowc, modules/mbuiter:
61704         * modules/memchr-obsolete, modules/memcmp2, modules/minmax:
61705         * modules/mkdtemp, modules/mkostemp, modules/mktime-internal:
61706         * modules/modf, modules/modf-ieee, modules/modff, modules/modff-ieee:
61707         * modules/modfl, modules/modfl-ieee, modules/msvc-inval:
61708         * modules/msvc-nothrow, modules/multiarch, modules/nextafter:
61709         * modules/nl_langinfo, modules/no-c++, modules/nocrash:
61710         * modules/nonblocking, modules/open, modules/opendir, modules/openmp:
61711         * modules/oset, modules/pclose, modules/pipe, modules/pipe-filter-gi:
61712         * modules/pipe-filter-ii, modules/pipe2, modules/poll-h:
61713         * modules/posix_spawn, modules/posix_spawn-internal:
61714         * modules/posix_spawn_file_actions_addclose:
61715         * modules/posix_spawn_file_actions_adddup2:
61716         * modules/posix_spawn_file_actions_addopen:
61717         * modules/posix_spawn_file_actions_destroy:
61718         * modules/posix_spawn_file_actions_init:
61719         * modules/posix_spawnattr_destroy, modules/posix_spawnattr_getflags:
61720         * modules/posix_spawnattr_getpgroup:
61721         * modules/posix_spawnattr_getschedparam:
61722         * modules/posix_spawnattr_getschedpolicy:
61723         * modules/posix_spawnattr_getsigdefault:
61724         * modules/posix_spawnattr_getsigmask, modules/posix_spawnattr_init:
61725         * modules/posix_spawnattr_setflags, modules/posix_spawnattr_setpgroup:
61726         * modules/posix_spawnattr_setschedparam:
61727         * modules/posix_spawnattr_setschedpolicy:
61728         * modules/posix_spawnattr_setsigdefault:
61729         * modules/posix_spawnattr_setsigmask, modules/posix_spawnp:
61730         * modules/pow, modules/powf, modules/printf-frexp:
61731         * modules/printf-frexpl, modules/printf-posix, modules/printf-safe:
61732         * modules/progname, modules/propername, modules/pselect:
61733         * modules/pthread_sigmask, modules/ptsname, modules/ptsname_r:
61734         * modules/qacl, modules/quotearg-simple, modules/raise, modules/random:
61735         * modules/rbtree-list, modules/rbtree-oset, modules/rbtreehash-list:
61736         * modules/read, modules/readdir, modules/readlink:
61737         * modules/realloc-posix, modules/regex-quote, modules/relocatable-lib:
61738         * modules/relocatable-lib-lgpl, modules/relocatable-perl:
61739         * modules/relocatable-prog, modules/relocatable-prog-wrapper:
61740         * modules/relocatable-script, modules/remainder:
61741         * modules/remainder-ieee, modules/remainderf, modules/remainderf-ieee:
61742         * modules/remainderl, modules/remainderl-ieee, modules/rewinddir:
61743         * modules/rint, modules/rint-ieee, modules/rintf, modules/rintf-ieee:
61744         * modules/rintl, modules/rintl-ieee, modules/round-ieee:
61745         * modules/roundf-ieee, modules/roundl-ieee, modules/safe-read:
61746         * modules/safe-write, modules/sched, modules/servent, modules/setenv:
61747         * modules/setlocale, modules/sh-quote, modules/shutdown:
61748         * modules/signal, modules/signbit, modules/sigpipe:
61749         * modules/sigpipe-die, modules/sigprocmask, modules/sin, modules/sinf:
61750         * modules/sinh, modules/sinhf, modules/size_max, modules/sleep:
61751         * modules/snippet/arg-nonnull, modules/snippet/c++defs:
61752         * modules/snippet/link-warning, modules/snippet/unused-parameter:
61753         * modules/snprintf, modules/snprintf-posix, modules/spawn:
61754         * modules/spawn-pipe, modules/sprintf-posix, modules/sqrt:
61755         * modules/sqrt-ieee, modules/sqrtf, modules/sqrtf-ieee:
61756         * modules/sqrtl-ieee, modules/stdalign, modules/stdarg:
61757         * modules/stdbool, modules/stpcpy, modules/stpncpy, modules/strcase:
61758         * modules/strcasestr, modules/strcasestr-simple, modules/strcspn:
61759         * modules/streq, modules/strerror_r-posix, modules/striconv:
61760         * modules/striconveh, modules/striconveha, modules/strncat:
61761         * modules/strnlen1, modules/strpbrk, modules/strtod-obsolete:
61762         * modules/sublist, modules/sys_resource, modules/sys_utsname:
61763         * modules/sys_wait, modules/system-posix, modules/system-quote:
61764         * modules/tan, modules/tanf, modules/tanh, modules/tanhf:
61765         * modules/tcgetsid, modules/termios, modules/threadlib, modules/tls:
61766         * modules/tmpdir, modules/towctrans, modules/trunc, modules/trunc-ieee:
61767         * modules/truncf, modules/truncf-ieee, modules/truncl:
61768         * modules/truncl-ieee, modules/ttyname_r, modules/uname:
61769         * modules/unlockpt, modules/unsetenv, modules/vasnprintf:
61770         * modules/vasnprintf-posix, modules/vasprintf, modules/vasprintf-posix:
61771         * modules/vdprintf, modules/vdprintf-posix, modules/vfprintf-posix:
61772         * modules/vfscanf, modules/vma-iter, modules/vprintf-posix:
61773         * modules/vscanf, modules/vsnprintf-posix, modules/vsprintf-posix:
61774         * modules/wait-process, modules/waitpid, modules/wcpcpy:
61775         * modules/wcpncpy, modules/wcrtomb, modules/wcscasecmp, modules/wcscat:
61776         * modules/wcschr, modules/wcscmp, modules/wcscoll, modules/wcscpy:
61777         * modules/wcscspn, modules/wcsdup, modules/wcslen, modules/wcsncasecmp:
61778         * modules/wcsncat, modules/wcsncmp, modules/wcsncpy, modules/wcsnlen:
61779         * modules/wcsnrtombs, modules/wcspbrk, modules/wcsrchr:
61780         * modules/wcsrtombs, modules/wcsspn, modules/wcsstr, modules/wcstok:
61781         * modules/wcswidth, modules/wcsxfrm, modules/wctob, modules/wctomb:
61782         * modules/wctrans, modules/wctype, modules/wcwidth, modules/wmemchr:
61783         * modules/wmemcmp, modules/wmemcpy, modules/wmemmove, modules/wmemset:
61784         * modules/write, modules/xconcat-filename, modules/xlist:
61785         * modules/xmalloca, modules/xoset, modules/xprintf-posix:
61786         * modules/xreadlink, modules/xsetenv, modules/xsize, modules/xstriconv:
61787         * modules/xstriconveh, modules/xsublist, modules/xvasprintf-posix:
61788         * modules/y0, modules/y1, modules/yn:
61789         Remove Bruno Haible as maintainer; if he's the sole maintainer,
61790         change the maintainer to 'all'.  Let's hope someone volunteers.
61792 2014-06-27  Paul Eggert  <eggert@cs.ucla.edu>
61794         mktime: merge #if/#ifdef usage from glibc
61795         * lib/mktime.c: Use "#if defined DEBUG && DEBUG", not "#if DEBUG",
61796         as that works with both Glibc's and Gnulib's style.
61797         See thread starting at Siddhesh Poyarekar's bug report at:
61798         http://lists.gnu.org/r/bug-gnulib/2014-06/msg00102.html
61800 2014-06-20  Alfred M. Szmidt  <ams@gnu.org>
61802         git-version-gen: improve option descriptions
61803         * build-aux/git-version-gen: Mention that --prefix and --fallback
61804         have a mandatory argument.
61806 2014-06-19  Paul Eggert  <eggert@penguin.cs.ucla.edu>
61808         regex: fix memory leak in compiler
61809         Fix by Andreas Schwab in:
61810         https://sourceware.org/ml/libc-alpha/2014-06/msg00462.html
61811         * lib/regcomp.c (parse_expression): Deallocate partially
61812         constructed tree before returning error.
61814         regex: merge patch from libc
61815         2014-02-12  Joseph Myers  <joseph@codesourcery.com>
61816         Combine __USE_BSD and __USE_SVID into __USE_MISC.
61817         * lib/regex.h [__USE_BSD]: Change condition to [__USE_MISC].
61819 2014-06-17  Paul Eggert  <eggert@cs.ucla.edu>
61821         acl: port to gcc -Wredundant-decls
61822         From a request by Dmitry Antipov in:
61823         http://lists.gnu.org/r/emacs-devel/2014-06/msg00263.html
61824         * lib/acl.h (_GL_ACL_H): New macro.  Protect entire contents with
61825         "#ifndef _GL_ACL_H".
61827 2014-06-11  Bruce Korb  <bkorb@gnu.org>
61828         Jim Meyering  <meyering@fb.com>
61830         parse-duration: eliminate 68-year duration limit
61831         * lib/parse-duration.c: Include "intprops.h".
61832         (TIME_MAX): Rename to MAX_DURATION and define to
61833         TYPE_MAXIMUM(time_t).
61834         * modules/parse-duration (Depends-on): Add intprops.
61835         Reported by Jonas 'Sortie' Termansen.
61837 2014-06-14  Paul Eggert  <eggert@cs.ucla.edu>
61839         pthread: don't assume AC_CANONICAL_HOST, port better to Solaris, etc.
61840         * modules/pthread (Depends-on): Add 'extensions', as it defines
61841         _POSIX_PTHREAD_SEMANTICS, which is needed on Solaris.
61842         (configure.ac-early): New section.
61843         * m4/pthread.m4 (gl_PTHREAD_CHECK): Revert previous change, as
61844         it is no longer needed.
61846 2014-06-14  Pádraig Brady  <P@draigBrady.com>
61848         pthread: define thread-safe macros on some platforms
61849         * m4/pthread.m4 (gl_PTHREAD_CHECK): Define macros needed
61850         for thread-safe operation on some platforms.
61852 2014-06-13  Paul Eggert  <eggert@cs.ucla.edu>
61854         regex: don't be multithreaded if USE_UNLOCKED_IO.
61855         Problem reported by Michael Felt in: http://bugs.gnu.org/17773
61856         * lib/regex_internal.h: Do not use multithreaded version if
61857         USE_UNLOCKED_IO is defined.  This is a hack, but it works
61858         around a porting bug with coreutils 8.22 on AIX 7.1.
61860 2014-06-11  Daiki Ueno  <ueno@gnu.org>
61862         gettext: update macros to version 0.19
61863         * m4/intl.m4, m4/po.m4: Update from gettext-0.19.  In particular,
61864         depend on gl_EXTERN_INLINE and drop support for older Bison
61865         versions.
61867 2014-06-10  Pádraig Brady  <P@draigBrady.com>
61869         select,poll: fix console handle check on windows 8
61870         lib/poll.c (IsConsoleHandle): Change from testing the lower
61871         2 bits of the handle to the more expensive but accurate syscall.
61872         lib/select.c: Likewise.
61874 2014-06-10  Eli Zaretskii  <eliz@gnu.org>
61876         select: fix waiting on anonymous pipes on MS-Windows
61877         * lib/select.c (rpl_select): Fall back to polling when select()
61878         indicates there is nothing to check, while due to the timeout not
61879         expiring, activity is indicated on one of the handles.
61880         Also clear the TIMEOUT argument if the timer does expire.
61882 2014-06-10  Eli Zaretskii  <eliz@gnu.org>
61884         times: fix to return non constant value on MS-Windows
61885         * lib/times.c (times): Don't use the process creation time,
61886         rather clock() which on windows returns the number of
61887         clock ticks since the process started.
61889 2014-06-09  Michael Goffioul  <michael.goffioul@gmail.com>
61891         isatty: fix to work on windows 8
61892         * lib/isatty.c (IsConsoleHandle): Change from testing the lower
61893         2 bits of the handle to the more expensive but accurate syscall.
61895 2014-06-07  Paul Eggert  <eggert@cs.ucla.edu>
61897         maint: fix typo in fdl.texi
61898         * doc/fdl.texi: Fix typo (missing '@').
61899         Somehow this was in fdl.texi but not fdl-1.3.texi.
61901 2014-06-06  Ben Walton  <bdwalton@gmail.com>
61903         mountlist: avoid hasmntopt const type warning on solaris
61904         * lib/mountlist.c: Solaris defines the OPT param of hasmntopt()
61905         with char * instead of const char *.  Passing the constant string
61906         "ignore" generates a compiler warning.  For Solaris cast MNT_IGNORE
61907         to avoid the warning.
61909 2014-06-04  Eric Blake  <eblake@redhat.com>
61911         maintainer-makefile: delete obsolete code
61912         * top/maint.mk (build_aux): Drop old code, as threatened.
61914         maintainer-makefile: avoid spurious error messages
61915         * top/maint.mk (syntax-check): Guard definition and use of
61916         $(shell) by whether Makefile is present.
61918 2014-06-03  Ben Walton  <bdwalton@gmail.com>
61920         rename: avoid unused-but-set-variable compiler warning
61921         * lib/rename.c (rpl_rename):  In the non-Win32 variant of rpl_rename,
61922         it is possible that dst_exists may be set but not used.  Mark it with
61923         the unused attribute to avoid compiler warnings.
61925 2014-06-02  Ben Walton  <bdwalton@gmail.com>
61927         rename: mark a label as potentially unused
61928         * lib/rename.c (rpl_rename): Avoid compiler warnings seen on Solaris,
61929         by marking the out label as potentially unused.
61930         * m4/gnulib-common.m4: Mention the need for the trailing ; for C++.
61932 2014-06-01  Paul Eggert  <eggert@cs.ucla.edu>
61934         gnulib-common.m4: Fix typo in _GL_UNUSED_LABEL.
61935         * m4/gnulib-common.m4 (_GL_UNUSED_LABEL): Omit trailing semicolon.
61937 2014-06-02  Ben Walton  <bdwalton@gmail.com>
61939         acl: apply pure attribute to two functions
61940         * lib/acl-internal.h (acl_nontrivial, acl_ace_nontrivial):
61941         Mark as "pure" as flagged by gcc 4.9 on Solaris 10.
61943 2014-06-01  Pádraig Brady  <P@draigBrady.com>
61945         gnulib-common.m4: add _GL_UNUSED_LABEL
61946         * m4/gnulib-common.m4: Add _GL_UNUSED_LABEL which is similar to
61947         _GL_UNUSED, but handles g++ < 4.5 not supporting this syntax.
61949 2014-05-31  Paul Eggert  <eggert@cs.ucla.edu>
61951         dup2, fcntl, fcntl-h: port to AIX 7.1
61952         This fixes some porting problems discovered when testing the latest
61953         grep snapshot on AIX 7.1.  I don't think if fixes any bugs
61954         in grep but it could be important for other applications.
61955         * doc/posix-functions/dup2.texi:
61956         * doc/posix-functions/fcntl.texi:
61957         * doc/posix-headers/fcntl.texi:
61958         Document AIX bugs.
61959         * lib/fcntl.in.h (O_CLOEXEC, O_NOFOLLOW, O_TTY_INIT) [_AIX]:
61960         Define to 0 if outside 'int' range.
61961         * m4/dup2.m4 (gl_FUNC_DUP2):
61962         * m4/fcntl.m4 (gl_FUNC_FCNTL):
61963         Check for getdtablesize.  If it's available, test a value just
61964         outside its range instead of testing 1000000.  When cross-compiling,
61965         guess that AIX will fail this improved test.
61967 2014-05-30  Paul Eggert  <eggert@cs.ucla.edu>
61969         printf, config.rpath: Port to FreeBSD 10.
61970         Problem reported by Tijl Coosemans in:
61971         http://lists.gnu.org/r/bug-gnulib/2014-05/msg00078.html
61972         * build-aux/config.rpath (hardcode_libdir_flag_spec)
61973         (hardcode_direct): Simplify FreeBSD configuration.
61974         (library_names_spec): Don't mishandle FreeBSD 10+.
61975         * m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_LONG_DOUBLE)
61976         (gl_PRINTF_INFINITE_LONG_DOUBLE, gl_PRINTF_DIRECTIVE_F)
61977         (gl_SNPRINTF_TRUNCATION_C99, gl_SNPRINTF_RETVAL_C99)
61978         (gl_SNPRINTF_DIRECTIVE_N, gl_VSNPRINTF_ZEROSIZE_C99):
61979         Don't mishandle FreeBSD 10+ when cross-compiling.
61981         ftoastr: work around compiler bug in IBM xlc 12.1
61982         * lib/ftoastr.h (_GL_FLT_PREC_BOUND, _GL_DBL_PREC_BOUND)
61983         (_GL_LDBL_PREC_BOUND): Make these macros, not enums, to work
61984         around a compiler bug in IBM xlc 12.1.0.0: it complains
61985         '"ftoastr.c", line 80.37: 1506-045 (S) Undeclared identifier
61986         _GL_FLT_PREC_BOUND.'
61988 2014-05-30  Kieran Colford  <colfordk@gmail.com>
61990         valgrind-tests: fixed misleading help message
61991         * m4/valgrind-tests.m4: The help message generated by configure
61992         implied that valgrind was disabled by default, which it wasn't.
61993         Adjusted the help message using s/enable/disable/ to clarify.
61995 2014-05-30  Ulrich Weigand  <uweigand@de.ibm.com>
61997         isfinite, isinf, isnan tests: fix for little-endian PowerPC
61998         * tests/test-isfinite.c (test_isfinitel): Only manipulate the
61999         first double of a PowerPC "double double" pair.
62000         * tests/test-isinf.c (test_isinfl): Likewise.
62001         * tests/test-isnan.c (test_long_double): Likewise.
62002         * tests/test-isnanl.h (main): Likewise.
62003         * tests/test-signbit.c (test_signbitl): Likewise.
62005 2014-05-29  Paul Eggert  <eggert@cs.ucla.edu>
62007         exclude-tests: port to AIX 7.1
62008         * modules/exclude-tests (test_exclude_LDADD): Add $(LIBTHREAD).
62009         Needed on AIX 7.1 with xlc V12.1, otherwise it won't link because
62010         the regex code uses locks.
62012 2014-05-28  Paul Eggert  <eggert@cs.ucla.edu>
62014         pthread_sigmask, timer-time: use gl_THREADLIB only if needed
62015         Without this fix, Emacs would sometimes call sigprocmask instead
62016         of pthread_sigmask, which is a no-no in multithreaded applications.
62017         Problem reported by Jorgen Schaefer in <http://bugs.gnu.org/17561>.
62018         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK):
62019         Suppress check for pthread_sigmask working without -lpthread if
62020         the application always links with -lpthread.  Do not link with
62021         $LIBMULTITHREAD if gl_THREADLIB is not defined.
62022         * m4/timer_time.m4 (gl_TIMER_TIME):
62023         Require gl_THREADLIB only if it is defined.  Do not append
62024         $LIBMULTITHREAD to LIB_TIMER_TIME if gl_THREADLIB is not defined.
62026 2014-05-27  Sylvain Beucler  <beuc@beuc.net>.
62028         gnulib-tool: wget translations using --no-verbose rather than --quiet
62029         This allows the user to see error messages if any (--quiet hides them)
62030         * gnulib-tool: Invoke wget with --no-verbose, rather than --quiet.
62032 2014-05-27  Sylvain Beucler  <beuc@beuc.net>
62034         gnulib-tool: adjust translation wget to avoid a https redirection
62035         Context: http://translationproject.org/latest/gnulib redirects to
62036            https://translationproject.org/latest/gnulib/
62037         Rationale: if the user falls back to wget, she doesn't have rsync and
62038         is probably in a minimal build environment, where packages such as
62039         'ca-certificates' are missing as well, resulting in a failed (and
62040         difficult to detect since ignored) translation initial fetch.
62041         Consequently let's avoid https if possible, and add the missing
62042         trailing slash.  This also avoids an unnecessary 302 redirection.
62043         * gnulib-tool: Add trailing slash to gnulib URL.
62045 2014-05-22  Pádraig Brady  <P@draigBrady.com>
62047         getlogin_r-tests: check return value rather than errno
62048         * tests/test-getlogin_r.c (main): As per POSIX we should be
62049         verifying the return value from getlogin_r() rather than errno.
62051 2014-05-22  Pádraig Brady  <P@draigBrady.com>
62053         getlogin_r-tests: fix various issues in recent change
62054         * tests/test-getlogin_r.c: Include required headers that were
62055         missed in recent commit eec20b4e.
62056         Also consistently check the errno rather than the return value from
62057         getlogin_r as POSIX only specifies that non zero is returned on error.
62058         * modules/getlogin_r-tests (configure.ac): Add the check for ttyname().
62060 2014-05-21  Paul Eggert  <eggert@cs.ucla.edu>
62062         fchdir: port 'open' and 'close' redefinitions to AIX 7.1
62063         * lib/chown.c, lib/clean-temp.c, lib/copy-file.c, lib/execute.c:
62064         * lib/fsusage.c, lib/gc-gnulib.c, lib/javacomp.c, lib/mountlist.c:
62065         * lib/openat-proc.c, lib/pagealign_alloc.c, lib/progreloc.c:
62066         * lib/spawn-pipe.c:
62067         Do not #undef 'open' and 'close'.  AIX 7 does '#define open open64'
62068         and then 'int open64(const char *, int, ...);', which means the
62069         declaration for 'open' gets lost if we later '#undef open'.
62070         Discovered while building grep pretest 2.18.151-1c770 on AIX 7.1,
62071         where the compilation reported the non-fatal error "In function
62072         'openat_proc_name' ... warning: implicit declaration of function
62073         'open'".  In this case the error is relatively harmless, but in
62074         other cases it might not be so minor.
62076 2014-05-20  Paul Eggert  <eggert@cs.ucla.edu>
62078         xalloc: don't potentially generate invalid code for xmemdup calls
62079         * lib/xalloc.h (xmemdup): Do not mark with _GL_ATTRIBUTE_ALLOC, as
62080         this function can initialize the newly-allocated storage with new
62081         pointers, which means this function is not malloc-like.  See:
62082         https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56955
62084 2014-05-19  Pádraig Brady  <P@draigBrady.com>
62086         getlogin_r-tests: avoid false failure under sudo/ssh etc.
62087         * tests/test-getlogin_r.c (main): Sync up with test-getlogin.c
62088         changes from commit 97249cf29 to not depend on environment variables.
62090 2014-05-18  Pádraig Brady  <P@draigBrady.com>
62092         getlogin-tests: avoid false failure under cron
62093         * tests/test-getlogin.c (main): Avoid verifying errnos from ttyname()
62094         since that's not what's under test.  Centos 6 was seen to return
62095         EINVAL for ttyname() when run from cron.
62097 2014-05-16  Jim Meyering  <meyering@fb.com>
62099         mbrtowc.m4: fix a comment typo
62100         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Fix typo s/2/-2/ in
62101         emitted documentation string.
62103 2014-05-16  Paul Eggert  <eggert@cs.ucla.edu>
62105         mbrlen, mbrtowc: fix bug with empty input
62106         * lib/mbrtowc.c (rpl_mbrtowc) [MBRTOWC_EMPTY_INPUT_BUG]: Fix the bug.
62107         * m4/mbrlen.m4 (gl_MBRLEN_EMPTY_INPUT): New macro.  It's not used,
62108         so this is mainly for documentation.
62109         * m4/mbrtowc.m4 (gl_MBRTOWC_EMPTY_INPUT): New macro.
62110         (gl_FUNC_MBRTOWC): Use it.
62111         * tests/test-mbrtowc.c (main): Test for the bug.
62113 2014-05-15  Paul Eggert  <eggert@cs.ucla.edu>
62115         doc: document mbrtowc and mbrlen problem with empty input
62116         * doc/posix-functions/mbrlen.texi (mbrlen):
62117         * doc/posix-functions/mbrtowc.texi (mbrtowc):
62118         Document portability problem when the input string is empty.  See:
62119         https://sourceware.org/bugzilla/show_bug.cgi?id=16950
62121         doc: document exec* = spawn+exit bug with non-Cygwin Windows platforms
62122         Problem reported by Eli Zaretskii in:
62123         http://lists.gnu.org/r/bug-grep/2014-05/msg00118.html
62124         * doc/posix-functions/execl.texi (execl):
62125         * doc/posix-functions/execle.texi (execle):
62126         * doc/posix-functions/execlp.texi (execlp):
62127         * doc/posix-functions/execv.texi (execv):
62128         * doc/posix-functions/execve.texi (execve):
62129         * doc/posix-functions/execvp.texi (execvp):
62130         Mention spawn+exit problem on non-Cygwin Windows platforms.
62132 2014-05-14  Guilherme de Almeida Suckevicz  <guito.linux@gmail.com>
62134         getlogin-tests: avoid false failure under sudo/ssh etc.
62135         * modules/getlogin-tests (configure.ac): Check for ttyname().
62136         * tests/test-getlogin.c (main): Don't depend on environment variables
62137         to correlate with getlogin(), since sudo and ssh etc. can tamper
62138         with the LOGNAME and USER env vars.  Instead lookup the name from
62139         the uid associated with the stdin tty.
62141 2014-05-11  Paul Eggert  <eggert@cs.ucla.edu>
62143         mbsstr, quotearg, xstrtol: pacify IRIX 6.5 cc
62144         These were found when building the latest grep snapshot on IRIX 6.5.
62145         * lib/mbsstr.c (knuth_morris_pratt_multibyte): Break "a=b=c;" into
62146         "b=c; a=b;", since IRIX 6.5 cc complains about the former if b is
62147         never used later.
62148         * lib/quotearg.c (quoting_options_from_style):
62149         * lib/xstrtol.c (__xstrtol):
62150         Use enum instead of 0, to pacify IRIX 6.5 cc.
62152 2014-04-18  Pádraig Brady  <P@draigBrady.com>
62154         gitlog-to-changelog: revert inclusion of git-log-fix file
62155         * build-aux/git-log-fix: Delete dummy file.
62156         * modules/gitlog-to-changelog: Don't reference (overwrite)
62157         the project specific git-log-fix file.
62159 2014-04-18  Assaf Gordon  <agordon@wi.mit.edu>
62161         maint.mk: Relax the copyright check to cater for non FSF projects
62162         * top/maint.mk (sc_copyright_check): Relax the check for $PACKAGE.texi
62163         to not require the "Free" suffix after the copyright years.
62165 2014-04-18  Natanael Copa  <ncopa@alpinelinux.org>
62167         physmem: use sysinfo on linux-gnu if _SC_PHYS_PAGES unavailable
62168         * lib/physmem.c (physmem_total): Some systems like musl libc don't yet
62169         support _SC_PHYS_PAGES.  Use the linux syscall sysinfo as fallback
62170         if _SC_PHYS_PAGES or _SC_PAGESIZE fails.
62171         (physmem_available): Likewise for _SC_AVPHYS_PAGES.
62173 2014-04-18  Paul Eggert  <eggert@cs.ucla.edu>
62175         exclude: port to strict C99
62176         Strict C does not allow converting a function pointer to void *
62177         and vice versa.  Pass a pointer to a function pointer instead.
62178         * lib/exclude.c (add_exclude_file):
62179         Pass the address of the function pointer.
62180         (call_addfn): And deference the address here, to match.
62182 2014-04-17  Paul Eggert  <eggert@cs.ucla.edu>
62184         regex: do not depend on malloc-gnu
62185         * modules/regex (Depends-on): Remove malloc-gnu.
62186         It's no longer needed, because of the 2012-12-29 patch
62187         "regex: port to hosts where malloc (0) == NULL".
62188         Reported by Nathan Kennedy in:
62189         http://lists.gnu.org/r/bug-gnulib/2014-04/msg00026.html
62191 2014-04-16  Assaf Gordon  <agordon@wi.mit.edu>
62193         expl: avoid incorrect expl(small_value) on OpenBSD 5.4
62194         * m4/expl.m4 (gl_FUNC_EXPL): Add a check for this condition.
62195         * doc/posix-functions/expl.texi: Mention the workaround.
62197 2014-04-12  Paul Eggert  <eggert@cs.ucla.edu>
62199         xalloc: allow x2nrealloc (P, PN, S) where P && !*PN
62200         * lib/xalloc.h (x2nrealloc): Extend slightly, to allow the current
62201         size to be zero even when the pointer is nonnull.  This
62202         accommodates the use case where P is malloc (0) and *PN is 0 on a
62203         host where malloc (0) yields nonnull.
62205 2014-04-09  Eric Blake  <eblake@redhat.com>
62207         fts: avoid unnecessary strlen calls
62208         * lib/fts.c (_D_EXACT_NAMLEN): Restore definition when needed.
62210 2014-04-09  Paul Eggert  <eggert@cs.ucla.edu>
62212         fts: avoid unnecessary strlen calls
62213         * lib/fts.c (fts_build): Go back to using _D_EXECT_NAMLEN
62214         when that can be faster than strlen.
62216 2014-03-26  Bernhard Voelker  <mail@bernhard-voelker.de>
62218         fts: avoid unnecessary strlen calls
62219         * lib/fts.c (_D_EXACT_NAMLEN): Remove macro.
62220         (fts_build): Store the length of the dp->d_name entry in a local variable
62221         instead of calling strlen() several times via the above, removed macro.
62222         For 'rm -rf some-dir' with e.g. 1M directory entries, this speeds up the
62223         run by ~4%, yet this reduces the execution time by about a third if run
62224         via "ltrace -c rm -rf some-dir".
62226 2014-03-27  Paul Eggert  <eggert@cs.ucla.edu>
62228         obstack: Remove ancient NeXTSTEP gcc support conditional
62229         This change will ease merging with glibc.  The "#if ... __NEXT__"
62230         causes a warning with -Wundef which glibc now enables by default.
62231         Problem reported by Will Newton in
62232         <http://lists.gnu.org/r/bug-gnulib/2014-03/msg00032.html>.
62233         glibc <sys/cdefs.h> now uses __extension__ for GCC 2.8 or later,
62234         so go with that.
62235         * lib/obstack.h (__extension__):
62237 2014-03-27  Paul Eggert  <eggert@cs.ucla.edu>
62239         obstack: merge with glibc changes
62240         * lib/obstack.c, lib/obstack.h: Merge from glibc.
62241         This is mostly indenting and commentary changes.
62242         Instances of 'register' have been removed.
62244 2014-03-26  Bernhard Voelker  <mail@bernhard-voelker.de>
62246         strftime: wrap macros in "do {...} while(0)"
62247         * lib/strftime.c (DO_NUMBER): Wrap multi-statement code block of
62248         this macro in "do {...} while(0)" to prevent false use as a
62249         single statement, e.g., in an un-braced "{}" else-block.
62250         (DO_SIGNED_NUMBER, DO_TZ_OFFSET, DO_NUMBER_SPACEPAD): Likewise.
62251         (strftime_case_): Remove 'else' after 'goto' - which was the
62252         only non-fatal, un-braced use of one of the above macros.
62253         Spotted by coverity (NESTING_INDENT_MISMATCH).
62255 2014-03-26  Bernhard Voelker  <mail@bernhard-voelker.de>
62257         modechange: avoid memory leaks for invalid octal modes
62258         * lib/modechange.c (mode_compile): During the parsing of
62259         notations like +40, free the 'mc' buffer for invalid mode
62260         strings like +17777 (greater than the maximum octal mode),
62261         =18 (bad octal mode characters) or u=1 ('affected' with
62262         octal modes).
62263         Reproducer, e.g.:
62264             $ valgrind --leak-check=full chmod +17777 file
62265         Introduced via the 2012-03-09 commit, 4730c3e3, "modechange:
62266         add notations +40, 00440, etc.".
62267         Spotted by coverity (RESOURCE_LEAK).
62269 2014-03-24  Paul Eggert  <eggert@cs.ucla.edu>
62271         gitlog-to-changelog: include a dummy git-log-fix file
62272         Problem reported by Nathan Stratton Treadway in:
62273         http://lists.gnu.org/r/bug-tar/2014-03/msg00082.html
62274         * build-aux/git-log-fix: New file.
62276 2014-03-13  Jim Meyering  <meyering@fb.com>
62278         gitlog-to-changelog: also include the file, git-log-fix
62279         * modules/gitlog-to-changelog (Files): Add git-log-fix.
62280         Reported by Assaf Gordon.
62282 2014-03-06  Paul Eggert  <eggert@cs.ucla.edu>
62284         regex: port to OS X 10.8.5 en_US.UTF-8 locale
62285         This fixes a bug when ignoring case and when comparing the
62286         titlecase letter 'Lj' (U+01C8 LATIN CAPITAL LETTER L WITH SMALL
62287         LETTER J) to the corresponding uppercase letter 'LJ' (U+01C7 LATIN
62288         CAPITAL LETTER LJ).  In the OS X 10.8.5 en_US.UTF-8 locale, the
62289         titlecase letter is neither lowercase nor uppercase, but
62290         uppercasing the titlecase letter (via towupper) yields the
62291         uppercase letter, so the two letters should match when ignoring case.
62292         Problem reported by Jim Meyering in <http://debbugs.gnu.org/16911#16>.
62293         * lib/regex_internal.c (build_wcs_upper_buffer, build_upper_buffer):
62294         Don't test whether a character is lowercase before uppercasing it.
62296 2014-03-04  Kevin Cernekee  <cernekee@gmail.com>
62298         stdint, read-file: fix missing SIZE_MAX on Android (tiny change)
62299         This is basically one of the options Bruno Haible proposed in:
62300         http://lists.gnu.org/r/bug-gnulib/2012-01/msg00282.html
62301         * lib/sys_types.in.h (_GL_INCLUDING_UNISTD_H): New macro.
62302         * lib/stdint.in.h: Use it.
62303         * modules/stdint (Depends-on): Add sys_types.
62305 2014-02-26  Pádraig Brady  <P@draigBrady.com>
62307         parse-datetime: fix crash or infloop in TZ="" parsing
62308         * lib/parse-datetime.y (parse_datetime): Break out of the
62309         TZ="" parsing loop once the second significant " is found.
62310         Also skip over any subsequent whitespace to be consistent
62311         with the non TZ= case.
62312         * tests/test-parse-datetime.c: Add test cases for TZ="" parsing.
62314 2014-02-26  Paul Eggert  <eggert@cs.ucla.edu>
62316         savedir: new symbol for fast-read version
62317         * lib/savedir.h (SAVEDIR_SORT_FASTREAD): New symbol, for programs
62318         like GNU cp that want to use SAVEDIR_SORT_INODE if available,
62319         SAVEDIR_SORT_NONE otherwise.  Problem reported by Bernhard Voelker in:
62320         http://lists.gnu.org/r/coreutils/2014-02/msg00037.html
62322 2014-02-25  Paul Eggert  <eggert@penguin.cs.ucla.edu>
62324         unistd: port readlink to Mac OS X 10.3.9
62325         * lib/unistd.in.h (_GL_INCLUDING_UNISTD_H): New macro, to work
62326         around self-include problem in Mac OS X 10.3.9 when combined with
62327         readlink module.  Problem reported by Klaus Zietler in
62328         <http://bugs.gnu.org/16825>.
62330 2014-02-23  Paul Eggert  <eggert@cs.ucla.edu>
62332         diffseq: remove TOO_EXPENSIVE heuristic
62333         Problem with diffutils reported by Vincent Lefevre in
62334         <http://bugs.gnu.org/16848>.  The simplest solution is to remove
62335         the TOO_EXPENSIVE heuristic that I added to GNU diff in 1993.
62336         Although appropriate for circa-1993 hardware, these days the heuristic
62337         seems to be more trouble than it's worth.
62338         * lib/diffseq.h: Modernize citations.
62339         (struct context): Remove member too_expensive.
62340         All uses changed.
62341         (struct partition): Remove members lo_minimal, hi_minimal.
62342         All uses changed.
62343         (diag, compareseq): Remove arg find_minimal.  All uses changed.
62344         (diag): Remove the TOO_EXPENSIVE heuristic that I added back in
62345         1993 to make 'diff' run faster (but not as well) on large inputs.
62346         These days, computers are fast enough that it's typically better
62347         to run slower but more accurately.
62348         * lib/fstrcmp.c: Remove duplicate comment.
62349         * lib/fstrcmp.c (strcmp_bounded):
62350         * lib/git-merge-changelog.c (compute_differences):
62351         Adjust to diffseq.h changes.
62352         * NEWS: Document the change.
62354         savedir: simplify by using stpcpy
62355         * lib/savedir.c (direntry_t): Remove size member.  All uses removed.
62356         (streamsavedir): Use stpcpy instead.
62357         * modules/savedir (Depends-on): Add stpcpy.
62359 2014-02-21  Pádraig Brady  <P@draigBrady.com>
62361         spawn: fix link error on uclibc
62362         * m4/spawn_h.m4 (gl_HAVE_POSIX_SPAWN): use AC_SEARCH_LIBS,
62363         to incorporate -lrt if needed (on uclibc for example).
62364         * modules/posix_spawn: Reference the substituted LIB.
62366 2014-02-21  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>  (tiny change)
62367         timer: fix uClibc detection of threading
62368         * m4/time_time.m4 (gl_TIMER_TIME): Detect whether threads are
62369         enabled in uClibc.
62371 2014-02-21  Eric Blake  <eblake@redhat.com>
62373         maintainer-makefiles: provide AC_PROG_SED for older autoconf
62374         * m4/gnulib-common.m4 (AC_PROG_SED): Copy from newer autoconf.
62376 2014-02-21  Sergey Poznyakoff  <gray@gnu.org.ua>
62378         exclude: add support for posix regexps
62380         This commit adds support for POSIX extended regular expressions
62381         and fixes a long-standing memory leak (pattern buffer was never
62382         freed).  It also implements a new interface function to read
62383         exclude patterns from a FILE, which passes an additional parameter
62384         to its callback function, thereby allowing to preserve its state
62385         between invocations.
62387         * lib/exclude.c (struct patopts): Pack regex and pattern into union.
62388         (pattern_buffer): New struct.
62389         (exclude): New member patbuf.
62390         (exclude_add_pattern_buffer): New function.
62391         (free_exclude_segment): Free regexps.
62392         (free_exclude): Free allocated pattern buffers.
62393         (exclude_patopts): New function.
62394         (file_pattern_matches): Use exclude_patopts.
62395         (add_exclude): support regexps.
62396         (add_exclude_fp): New function.
62397         (add_exclude_file): Rewrite using add_exclude_fp.
62398         (fnmatch_pattern_has_wildcards): Support posix extended regexps.
62399         * lib/exclude.h (EXCLUDE_REGEX, EXCLUDE_ALLOC): New flags.
62400         (add_exclude_fp)
62401         (add_exclude_file): Rewrite using add_exclude_fp.
62402         (fnmatch_pattern_has_wildcards): Support posix extended regexps.
62403         * lib/exclude.h (EXCLUDE_REGEX, EXCLUDE_ALLOC): New flags.
62404         (add_exclude_fp)
62405         (exclude_add_pattern_buffer): New prototypes.
62406         * modules/exclude: Depends on regex and filename.
62408 2014-02-20  Eric Blake  <eblake@redhat.com>
62410         maintainer-makefiles: use $(SED) for syntax check
62411         * modules/maintainer-makefile (configure.ac): Check for sane sed.
62412         * top/maint.mk: Change sed to $(SED).
62414 2014-02-11  Sergey Poznyakoff  <gray@gnu.org.ua>
62415             Paul Eggert  <eggert@cs.ucla.edu>
62417         savedir: add sorting arg to savedir, streamsavedir; remove fdsavedir
62418         Patch based on an idea by Dick Streefland in
62419         <https://savannah.gnu.org/patch/?7892>.
62420         * NEWS: Document this.
62421         * lib/savedir.c (NAME_SIZE_DEFAULT): Remove.
62422         (direntry_t, comparison_function): New types.
62423         (direntry_cmp_name): New function.
62424         (direntry_cmp_inode) [D_INO_IN_DIRENT]: New function.
62425         (streamsavedir, savedir): New arg OPTION.
62426         (streamsavedir): Simplify memory allocation.
62427         (fdsavedir): Remove.
62428         * lib/savedir.h (enum savedir_option): New type.
62429         (streamsavedir, savedir): New arg OPTION.
62430         (fdsavedir): Remove.
62432 2014-02-05  Paul Eggert  <eggert@cs.ucla.edu>
62434         file-type: add support for doors and other less-common file types
62435         Problem with S_ISDOOR reported by Rich Burridge.
62436         * lib/file-type.c (file_type): Do S_ISLNK early too.  Do S_TYPEIS*
62437         macros before the rest.  Add S_ISCTG, S_ISDOOR, S_ISMPB, S_ISMPC,
62438         S_ISMPX, S_ISNAM, S_ISNWK, S_ISOFD, S_ISOFL, S_ISPORT, S_ISWHT.
62440 2014-01-23  Eric Blake  <eblake@redhat.com>
62442         pthread: work around winpthread header pollution on mingw
62443         * lib/time.in.h: Move pthread workarounds...
62444         * lib/pthread.in.h: ...here.
62445         * m4/pthread.m4 (gl_PTHREAD_CHECK): Also build pthread.h when we
62446         detect macro pollution on mingw.
62447         * doc/posix-headers/pthread.texi (pthread.h): Document the problems.
62449 2014-01-22  Paul Eggert  <eggert@cs.ucla.edu>
62451         qacl: check for fchmod
62452         * m4/acl.m4 (gl_FUNC_ACL): Check for fchmod, since acl-internal.h
62453         and qset-acl.c both use HAVE_FCHMOD.
62455 2014-01-20  Paul Eggert  <eggert@cs.ucla.edu>
62457         fdopen-tests: port to Tru64
62458         * tests/test-fdopen.c (main): Don't invoke fdopen on a file
62459         descriptor that is not open, as POSIX doesn't specify the
62460         resulting behavior and the test does not work on Tru64.
62461         Problem reported by Steven M. Schweda in:
62462         http://lists.gnu.org/r/bug-gnulib/2014-01/msg00079.html
62464         stdalign: port to HP-UX compilers
62465         * lib/stdalign.in.h (_Alignas): Use __attribute__ (__aligned__ (x))
62466         if __HP_cc or __HP_aCC are nonzero.
62468 2014-01-16  Paul Eggert  <eggert@cs.ucla.edu>
62470         strtoimax: port to platforms lacking 'long long'
62471         VMS's pre-C99 compiler lacks 'long long', so 'configure' doesn't
62472         check whether strtoll is declared, which causes the C file to
62473         wrongly report an error.  Problem reported by Steven M. Schweda in:
62474         http://lists.gnu.org/r/bug-diffutils/2014-01/msg00003.html
62475         * lib/strtoimax.c (strtoull):
62476         Declare only if HAVE_UNSIGNED_LONG_LONG_INT.
62477         (strtoll): Declare only if HAVE_LONG_LONG_INT.
62479 2014-01-16  Daniel Albers  <daniel@lbe.rs>  (tiny change)
62481         relocatable-perl: fix texi syntax
62482         * doc/relocatable-maint.texi: Escape braces.
62484 2014-01-09  Reuben Thomas  <rrt@sc3d.org>
62486         relocatable-perl: like relocatable-script, but for Perl scripts
62487         * build-aux/relocatable.pl.in: Add.
62488         * doc/relocatable-maint.texi: Add documentation.
62489         * modules/relocatable-perl: Add.
62491 2014-01-07  Paul Eggert  <eggert@cs.ucla.edu>
62493         tests: fix export bug in previous patch
62494         Problem reported by Jim Meyering.
62495         * tests/init.sh (re_shell): New var, which is exported instead of
62496         re_shell_.
62498         tests: simplify porting to Solaris 10 /bin/sh
62499         Some test cases in 'grep' need a shell that groks '$(';
62500         export re_shell_ for their benefit.  Problem reported for 'grep'
62501         by Dagobert Michelsen in <http://bugs.gnu.org/16380>.
62502         * tests/init.sh (re_shell_): Export if it's used.
62504 2014-01-06  Eric Blake  <eblake@redhat.com>
62506         md5, sha1, sha256, sha512: support older autoconf
62507         * m4/00gnulib.m4 (m4_divert_push): Wrap diversion stack
62508         for autoconf < 2.63b.
62510         include_next: port to autoconf 2.63
62511         * m4/gnulib-common.m4 (AS_VAR_COPY): Define if missing.
62513 2014-01-04  Jim Meyering  <meyering@fb.com>
62515         maint: add a gnulib-local rule to keep non-ascii out of .texi files
62516         * cfg.mk (sc_keep_gnulib_texi_files_mostly_ascii): New rule,
62517         so that "make sc_maint" will ding anyone who puts non-ascii
62518         in any of gnulib's .texi files.
62520 2014-01-03  Jim Meyering  <meyering@fb.com>
62522         freadable, fwritable, fwriting: declare with the "pure" attribute
62523         * lib/freadable.h (freadable): Declare with the "pure" attribute.
62524         * lib/fwritable.h (fwritable): Likewise.
62525         * lib/fwriting.h (fwriting): Likewise.
62526         Suggested by Bruno Haible.
62528         maint.mk: adapt openat.h-include-without-use test
62529         * top/maint.mk (sc_prohibit_openat_without_use): Also check for
62530         FCHMODAT_INLINE, FCHOWNAT_INLINE and STATAT_INLINE, to avoid
62531         failing on gnulib's own lib/{chmod,chown,stat}at.c files.
62532         With this change, running "make sc_maint" in gnulib's top-level
62533         directory now passes for me.
62535 2014-01-03  Paul Eggert  <eggert@cs.ucla.edu>
62537         doc: use ASCII in .texi files where UTF-8 isn't needed
62538         * doc/posix-functions/crypt.texi, doc/posix-functions/encrypt.texi:
62539         * doc/posix-functions/setkey.texi, doc/regex.texi:
62540         Use ASCII input, not UTF-8.
62542 2014-01-02  Jim Meyering  <meyering@fb.com>
62544         freading: declare with the "pure" attribute
62545         * lib/freading.h (freading): Declare with the "pure" attribute.
62547         manywarnings: remove -Wmudflap
62548         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Remove -Wmudflap, since
62549         it is no longer supported in gcc-4.9-to-be.
62551 2014-01-01  Paul Eggert  <eggert@cs.ucla.edu>
62553         relocatable-script: remove unused code
62554         Problem reported by Reuben Thomas in:
62555         http://lists.gnu.org/r/bug-gnulib/2013-12/msg00117.html
62556         * build-aux/relocatable.sh.in (func_tmpdir): Remove unused function.
62558 2014-01-01  Jim Meyering  <meyering@fb.com>
62560         maint: fix public-submodule-commit to work with newer git
62561         * top/maint.mk (public-submodule-commit): Remove excess quoting.
62562         We were over-quoting the test arguments, and somewhere prior to
62563         version 1.8.5.2.229, git stopped removing those excess quotes,
62564         which made the test fail, since the unexpanded strings would
62565         always differ; using GIT_TRACE=1 confirmed that the git merge-base
62566         command wasn't even being run.
62568 2014-01-01  Paul Eggert  <eggert@cs.ucla.edu>
62570         doc: update main copyright year
62571         * doc/gnulib.texi: Update copyright date.
62573 2014-01-01  Eric Blake  <eblake@redhat.com>
62575         version-etc: new year
62576         * lib/version-etc.c (COPYRIGHT_YEAR): Bump to 2014.
62577         * all files: run 'make update-copyright'
62579 2013-12-24  Eric Blake  <eblake@redhat.com>
62581         passfd: give nicer error for recvfd at eof
62582         * lib/passfd.c (recvfd): Fake ENOTCONN if other end closes early.
62583         * tests/test-passfd.c (main): Enhance test to cover this.
62585 2013-12-17  Paul Eggert  <eggert@cs.ucla.edu>
62587         gettimeofday: port recent C++ fix to Emacs
62588         Without this further patch, Emacs won't build due to
62589         the portcheck failing.  Also, this simplifies the patch a bit.
62590         * lib/time.in.h (localtime, gmtime): Don't replace unless
62591         GNULIB_GETTIMEOFDAY.  Treat them more like mktime.
62592         * lib/time.in.h (localtime, gmtime):
62593         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME):
62594         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS):
62595         * modules/time (time.h):
62596         Don't worry about the possibility of localtime and gmtime
62597         being absent; they're present in all C libraries we know about.
62598         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS):
62599         Don't assume sys_time is present and has been initialized.
62600         Instead, use a hack that should work even if it hasn't been.
62601         Don't use a portcheck for gmtime or localtime; this supports
62602         the hack.
62603         * modules/time (time.h): Substitute GNULIB_GETTIMEOFDAY.
62605 2013-12-17  John W. Eaton  <jwe@gnu.org>
62607         gettimeofday: fix C++ crosscompilation
62609         Never replace gmtime and localtime by macros when compiling with
62610         C++, this prevents <ctime> from being included.
62612         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Do not
62613         define gmtime and localtime as preprocessor macros.  Instead
62614         define some HAVE_GMTIME, HAVE_LOCALTIME, REPLACE_GMTIME, and
62615         REPLACE_LOCALTIME substitutions.
62616         * lib/time.in.h: Declare gmtime and localtime when needed.
62617         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): AC_SUBST HAVE_GMTIME,
62618         HAVE_LOCALTIME, REPLACE_GMTIME, and REPLACE_LOCALTIME.
62619         * modules/time: Depend on gettimeofday, and substitute the above
62620         variables in time.h.
62622 2013-12-17  Paul Eggert  <eggert@cs.ucla.edu>
62624         qacl: port to Windows better
62625         See Eli Zaretskii in
62626         <http://lists.gnu.org/r/emacs-devel/2013-12/msg00593.html>.
62627         * lib/file-has-acl.c (acl_access_nontrivial):
62628         Return -1 and set errno if !HAVE_ACL_FIRST_ENTRY &&
62629         !HAVE_ACL_TO_SHORT_TEXT && !HAVE_ACL_FREE_TEXT.
62631 2013-12-12  Alexander V. Lukyanov  <lav@netis.ru>
62633         md5, sha1, sha256, sha512: fix (trivial) compile error in c++ mode.
62634         * lib/gl_openssl.h: Cast void pointers to a specific type.
62636 2013-12-07  Pádraig Brady  <P@draigBrady.com>
62638         open-tests: fix build failure with -Werror=old-style-declaration
62639         * tests/test-open.h: Reorder the inline to avoid the issue.
62641 2013-12-07  Pádraig Brady  <P@draigBrady.com>
62643         md5, sha1, sha256, sha512: fix link error with partial libcrypto
62644         * m4/gl-openssl.m4 (gl_CRYPTO_CHECK): Only clear LIB_CRYPTO at
62645         init time, so that if early checks find crypto routines,
62646         while the last does not, then @LIB_CRYPTO@ is replaced correctly,
62647         avoiding link failures.
62649 2013-12-07  Paul Eggert  <eggert@cs.ucla.edu>
62651         md5, sha1, sha256, sha512: add gl_SET_CRYPTO_CHECK_DEFAULT
62652         This provides a new way to specify the default for
62653         gl_CRYPTO_CHECK, one that is reflected in the --help message.
62654         Emacs uses this, as well as the old way.
62655         This attempts to implement a suggestion by Pádraig Brady in
62656         <http://lists.gnu.org/r/coreutils/2013-12/msg00080.html>.
62657         * m4/gl-openssl.m4(gl_SET_CRYPTO_CHECK_DEFAULT): New macro.
62658         (gl_CRYPTO_CHECK): Use it.  Mention the default in --help output.
62660         md5, sha1, sha256, sha512: add 'auto', and a way to specify default
62661         * m4/gl-openssl.m4 (gl_CRYPTO_CHECK):
62662         Add support for a new option, --with-openssl=auto, which causes
62663         the library to be used if available and silently ignored if not.
62664         Add support to allow configure.ac to specify its own
62665         default, by setting with_openssl_default before invoking gl_INIT.
62667 2013-12-05  Paul Eggert  <eggert@cs.ucla.edu>
62669         open-tests: port to glibc with _FORTIFY_SOURCE and -O1
62670         Problem reported by Daiki Ueno in:
62671         http://lists.gnu.org/r/bug-gnulib/2013-06/msg00052.html
62672         * tests/test-open.h (__always_inline):
62673         New macro, if not already defined.
62674         (test_open): Use it.
62676 2013-12-04  Eric Blake  <eblake@redhat.com>
62678         include_next: minimize code duplication
62679         * modules/include_next (Depends-on): Add absolute-header.
62680         * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Reuse
62681         gl_ABSOLUTE_HEADER_ONE instead of open-coding it.
62683 2013-12-04  Pádraig Brady  <P@draigBrady.com>
62685         getcwd: fix compile error in configure check
62686         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Include errno.h
62688 2013-12-04  Pádraig Brady  <P@draigBrady.com>
62690         regex: suppress core dumps from detection code
62691         * m4/regex.m4 (gl_REGEX): Catch the SIGABRT and convert to SIGTERM
62692         to suppress core dumps that may well occur on glibc systems.
62693         These core dumps might not be cleaned up automatically, or could
62694         trigger some system core dump handling logic.
62696 2013-12-03  Pádraig Brady  <P@draigBrady.com>
62698         md5, sha1, sha256, sha512: support mandating use of openssl
62699         * m4/gl-openssl.m4 (gl_crypto_check): Adjust the --with-openssl
62700         description, to list the now 3 separate options.  also don't
62701         mention the default=no, since this is implicit given the option
62702         is described as --with-openssl rather than --without-openssl.
62703         If projects change the default they're free to document that.
62704         with --with-openssl[=yes] we now error out when the specified
62705         hash algorithm is not available in libcrypto.
62707 2013-12-03  Ivailo  <xakepa10@gmail.com>
62709         test-xvasprintf: (trivial) fix to disable some -Wformat-security diags
62710         * tests/test-xvasprintf.c: Disable -Wformat-zero-length and
62711         -Wformat-nonliteral checks, as these edge cases are part of the test.
62713 2013-12-03  Eric Blake  <eblake@redhat.com>
62715         regex: avoid glibc deadlock during configure
62716         * m4/regex.m4 (gl_REGEX): Avoid recursive malloc deadlock when
62717         glibc bug 15078 in turn triggers bug 16159.
62718         Reported by Michal Privoznik.
62720 2013-12-02  Pádraig Brady  <P@draigBrady.com>
62722         md5, sha1, sha256, sha512: use openssl routines if available.
62723         --with-openssl the libcrypto md5, sha1, sha224, sha256, sha384, sha256
62724         routines will be used if available, requiring apps to link @LIB_CRYPTO@
62725         * lib/gl_openssl.h: Provide wrappers for specified openssl hash.
62726         * m4/gl-openssl.m4 (gl_CRYPTO_CHECK): New function to lookup libcrypto
62727         in the standard system location.
62728         * m4/sha1.m4: Call gl_CRYPTO_CHECK() for SHA1.
62729         * m4/sha256.m4: Likewise with SHA256.
62730         * m4/sha512.m4: Likewise with SHA512.
62731         * m4/md5.m4: Likewise with MD5.
62732         * m4/gc.m4: Ensure @LIB_CRYPTO@ set for tests.
62733         * lib/sha1.h: Include wrappers if HAVE_OPENSSL_SHA1.
62734         * lib/sha256.h: Likewise with SHA256.
62735         * lib/sha512.h: Likewise with SHA512.
62736         * lib/md5.h: Likewise with MD5.
62737         * lib/sha1.c: Exlude functionality if HAVE_OPENSSL_SHA1.
62738         * lib/sha256.c: Likewise with SHA256.
62739         * lib/sha512.c: Likewise with SHA512.
62740         * lib/md5.c: Likewise with MD5.
62741         * modules/crypto/sha1 (Link:): Add the new optional lib.
62742         (Depends-on:): Add dependency on extern-inline.
62743         * modules/crypto/sha256: Likewise.
62744         * modules/crypto/sha512: Likewise.
62745         * modules/crypto/md5: Likewise.
62746         * modules/crypto/sha1-tests: Reference the lib here too.
62747         * modules/crypto/md5-tests: Likewise.
62748         * modules/crypto/gc-des-tests: Likewise.
62749         * modules/crypto/gc-hmac-md5-tests: Likewise.
62750         * modules/crypto/gc-hmac-sha1-tests: Likewise.
62751         * modules/crypto/gc-hmac-sha256-tests: Likewise.
62752         * modules/crypto/gc-hmac-sha512-tests: Likewise.
62753         * modules/crypto/gc-md5-tests: Likewise.
62754         * modules/crypto/gc-pbkdf2-sha1-tests: Likewise.
62755         * modules/crypto/gc-sha1-tests: Likewise.
62756         * modules/crypto/gc-tests: Likewise.
62757         * modules/crypto/hmac-md5-tests: Likewise.
62758         * modules/crypto/hmac-sha1-tests: Likewise.
62759         * modules/crypto/hmac-sha256-tests: Likewise.
62760         * modules/crypto/hmac-sha512-tests: Likewise.
62762 2013-11-29  RV1971  <rv1971@web.de>
62764         base64: (trivial) fix compilation regression on some compilers
62765         * lib/base64.c: Don't return the void function,
62766         instead split to a separate return statement.
62768 2013-11-28  Paul Eggert  <eggert@cs.ucla.edu>
62770         ignore-value: revert previous code change
62771         * lib/ignore-value.h (ignore_value): Use __extension__ and
62772         __typeof__ only for GCC 3.4 and later.  Reported by Eric Blake in
62773         <http://lists.gnu.org/r/bug-gnulib/2013-11/msg00102.html>.
62774         Change the comment to try to explain this better.
62776 2013-11-27  Pádraig Brady  <P@draigBrady.com>
62778         selinux-h: improve stub types and add more stub functions
62780         * lib/se-selinux.in.h: Change security_context_t to a typedef
62781         rather than a define, as it's a pointer type and so is better
62782         as a typedef to avoid issues declaring multiple variables
62783         with the comma operator.  Also add stub for string_to_security_class().
62784         * lib/se-context.in.h: Add stub functions for
62785         context_{type,range,role,user}_get().
62787 2013-11-27  Paul Eggert  <eggert@cs.ucla.edu>
62789         ignore-value: prefer GCC version back through 2.0
62790         The code didn't match the comments, so I did a bit of software
62791         archaeology.  GCC 2.0 seems to support __extension__ and
62792         __typeof__, so fix both code and comments to use 2.0.
62793         * lib/ignore-value.h (ignore_value): Use __extension__ and
62794         __typeof__ for GCC 2.0 through 3.3, too.
62796 2013-11-25  Mats Erik Andersson  <gnu@gisladisker.se>
62798         pty: Activate the signature wrapper of forkpty.
62799         The intended preprocessor macro HAVE_FORKPTY is
62800         never defined, yet `lib/forkpty.c' depends on it.
62802         * m4/pty.m4 (gl_FUNC_FORKPTY): At completed analysis,
62803         apply AC_DEFINE_UNQUOTED to HAVE_FORKPTY with value
62804         $HAVE_FORKPTY for access to wrapper in `lib/forkpty.c'.
62806 2013-11-18  Jim Meyering  <meyering@fb.com>
62807         and Paul Eggert  <eggert@cs.ucla.edu>
62809         quotearg: don't attempt to store 1 << 31 into an "int"
62810         * lib/quotearg.c (quotearg_buffer_restyled): Building coreutils with
62811         gcc's new -fsanitize=undefined and running its tests triggered some
62812         new test failures due to undefined behavior, all with this diagnostic:
62813           lib/quotearg.c:629:62: runtime error: left shift of 1 by 31 places \
62814             cannot be represented in type int
62815         Rather than shifting "1" left to form a mask, shift the bits right and
62816         simply use "1" as the mask.
62818 2013-11-21  Paul Eggert  <eggert@cs.ucla.edu>
62820         error: depend on stdio
62821         Problem reported by Nikos Mavrogiannopoulos in
62822         <http://lists.gnu.org/r/bug-gnulib/2013-11/msg00084.html>
62823         * modules/error (Depends-on): Add stdio.
62825 2013-11-18  Ben Pfaff  <blp@cs.stanford.edu>
62827         * doc/relocatable-maint.texi (Supporting Relocation): Improve
62828         wording.
62829         Reported by Reuben Thomas <rrt@sc3d.org>.
62831 2013-11-13  Paul Eggert  <eggert@cs.ucla.edu>
62833         * lib/getgroups.c (posix_getgroups, getgroups) [__APPLE__]:
62834         New function and macro, to work around _DARWIN_C_SOURCE problem.
62835         Reported by Jack Howarth in <http://bugs.gnu.org/14463>.
62837 2013-11-11  Pádraig Brady  <P@draigBrady.com>
62839         base64: provide a fast path for encoding well sized buffers
62840         Avoid conditionals in the base64 encoding loop,
62841         which was seen to give 60% better throughput.
62842         * lib/base64.c (base64_encode_fast): A new function to be called
62843         when we don't want to NUL terminate, and we have enough space
62844         in the output to encode the given input.
62845         (base64_encode): Call the _fast() version when appropriate.
62846         Also remove a redundant mask with 0x3F on the first encoded byte.
62848 2013-11-08  Paul Eggert  <eggert@cs.ucla.edu>
62850         extern-inline: port better to OS X 10.9
62851         * m4/extern-inline.m4: Omit serial number; this file doesn't use them.
62852         (gl_EXTERN_INLINE): Do not suppress the use of extern inline on
62853         OS X 10.9, except for g++ where the bug is still present.
62854         See <http://trac.macports.org/ticket/41033>.
62856 2013-11-08  Eric Blake  <eblake@redhat.com>
62858         fpending: fix regression on DragonFly BSD
62859         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for declaration.
62860         * lib/fpending.h (__fpending): Don't declare twice.
62861         Reported by GW in
62862         <https://lists.gnu.org/r/bug-m4/2013-11/msg00000.html>
62864 2013-11-05  Jim Meyering  <meyering@fb.com>
62866         hash: relax license to LGPLv2+, for libguestfs
62867         * modules/hash (License): Change from GPL to LGPLv2+.
62869 2013-11-03  Paul Eggert  <eggert@cs.ucla.edu>
62871         intprops: port to Oracle Studio c99
62872         * lib/intprops.h (_GL_HAVE___TYPEOF__) [__SUNPRO_C && __STDC__]:
62873         Define to 0, to avoid diagnostics when Oracle Studio is pedantic.
62875 2013-10-31  Paul Eggert  <eggert@cs.ucla.edu>
62877         obstack: pacify HP C
62878         * lib/obstack.h (obstack_free) [!__GNUC__]: Rewrite to avoid
62879         warning "conversion from pointer to smaller integer" from HP
62880         C-ANSI-C - cc version B9007AA/B3910B A.06.26.  It's safe to assume
62881         C89 or later nowadays, so cast to void instead of int.  Privately
62882         reported by H.Merijn Brand.  Also, change header to match glibc's,
62883         to make checking against glibc easier.
62885 2013-10-29  Jim Meyering  <meyering@fb.com>
62887         maint.mk: prefer gpgv2 over gpgv
62888         * top/maint.mk (gpgv): Use gpgv2 if present, else gpgv.
62889         (gpg_key_ID): Use $(gpgv), rather than hard-coding "gpgv".
62890         Reported by Gary Vaughan.
62892 2013-10-30  Paul Eggert  <eggert@cs.ucla.edu>
62894         isnan: port to VAX
62895         Reported by John Klos for NetBSD-5/VAX in
62896         <http://lists.gnu.org/r/bug-gnulib/2013-10/msg00133.html>.
62897         * lib/isnan.c (IEEE_FLOATING_POINT): New macro, stolen from Emacs.
62898         (FUNC): Use it.
62900 2013-10-28  Jim Meyering  <meyering@fb.com>
62902         gnulib-tool: protect against CDPATH
62903         * gnulib-tool: Many "cd" built-in functions print a directory name
62904         to stdout when CDPATH is set, e.g.,
62905           $ bash -c 'CDPATH=/; cd tmp'
62906           /tmp
62907         Unset it, when possible.  Prompted by a comment from Bruce Korb.
62909         maint.mk: restore functionality removed by recent change...
62910         Sunday's change, v0.0-8062-g6b24f60, may have appeared correct from
62911         the context of a shallow-cloned gnulib repository: "git describe"
62912         would fail in such a directory.  However, that change made it so
62913         the reported gnulib revision no longer includes the version number
62914         or a commit count, even when run from a full clone.
62915         * top/maint.mk (gnulib-version): Use the full "git describe"
62916         output when possible, e.g., the form above, rather than the
62917         abbreviated, no-tag, no-commit-count string, and fall back to
62918         using a 10-byte hash, rather than the default minimal-length
62919         hash prefix, since while the minimal-length one may be fine today,
62920         it is likely not to be unique for very long.
62922 2013-10-26  Jim Meyering  <meyering@fb.com>
62924         maint.mk: fix "release" target to build _version
62925         This fixes a bug in README-release whereby following the outlined
62926         steps, one would publish a tarball whose programs would report
62927         --version output not consistent with the package version number.
62928         This bug caused grep-2.15 to produce a grep program whose
62929         --version option made it print 2.14.56-1e3d rather than 2.15.
62930         * top/maint.mk (release): Making this target build "_version"
62931         ensures that the new version number is reflected in configure.
62933 2013-10-21  Ben Pfaff  <blp@cs.stanford.edu>
62935         install-reloc: Support multi-binary installation.
62936         * build-aux/install-reloc: Support installing multiple programs in
62937         one invocation, as done by Automake starting with commit
62938         4295fe33eb23f (Multi-file install for PROGRAMS.).  From Bruno
62939         Haible <bruno@clisp.org>, archived at
62940         http://lists.debian.org/debian-bsd/2012/05/msg00032.html.
62941         Reported by Sylvain <beuc@gnu.org>.
62943 2013-10-21  Michael Haubenwallner  <michael.haubenwallner@salomon.at>
62945         selinux-h: Really build without selinux when library is missing.
62946         * m4/selinux-selinux-h.m4: When the selinux library is missing, really
62947         continue without selinux, as already told in the warning message.
62949 2013-10-21  Jim Meyering  <meyering@fb.com>
62951         regex: also remove dependency on HAVE_WCSCOLL
62952         * lib/regex_internal.h: Remove final vestige of the wcscoll dependency.
62954 2013-10-21  Reuben Thomas  <rrt@sc3d.org>
62956         xfreopen: Fix typo. s/frepoen/freopen/
62957         * lib/xfreopen.c: Fix description.
62958         * modules/xfreopen: Likewise.
62960 2013-10-21  Jim Meyering  <meyering@fb.com>
62962         regex: don't depend on wcscoll
62963         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wcscoll.
62964         It is no longer used.
62966 2013-10-20  Jim Meyering  <meyering@fb.com>
62968         error: add the printf attribute to a static function
62969         * lib/error.c (error_tail): Add the printf attribute, to placate
62970         gcc's -Werror=suggest-attribute=format option.
62972 2013-09-30  Jim Meyering  <meyering@fb.com>
62974         fpending, obstack, strerror-override: use pure+const function attrs
62975         * lib/fpending.h (__fpending): Declare with the "pure" attribute.
62976         * lib/obstack.c (_obstack_allocated_p): Likewise.
62977         * lib/obstack.h (_obstack_memory_used): Likewise.
62978         (_obstack_memory_used): Likewise.
62979         * lib/strerror-override.h (strerror_override): Declare with
62980         the "const" attribute.
62982 2013-10-18  Eric Blake  <eblake@redhat.com>
62984         extern-inline: make safe for -Wundef usage
62985         Reported by Vladimir 'phcoder' Serbinenko in
62986         https://lists.gnu.org/r/bug-gnulib/2013-10/msg00078.html
62987         * m4/extern-inline.m4 (gl_EXTERN_INLINE): Port to older gcc.
62989 2013-10-16  Paul Eggert  <eggert@cs.ucla.edu>
62991         mkfifo-tests, etc.: allow HP-UX 11.11 bug
62992         Problem reported by Daniel Richard G. in
62993         <http://lists.gnu.org/r/bug-gnulib/2013-10/msg00068.html>.
62994         * doc/posix-functions/mkfifo.texi (mkfifo):
62995         * doc/posix-functions/mkfifoat.texi (mkfifoat):
62996         * doc/posix-functions/mknod.texi (mknod):
62997         * doc/posix-functions/mknodat.texi (mknodat):
62998         Document the HP-UX 11.11 bug.
62999         * tests/test-mkfifo.h (test_mkfifo):
63000         Allow the HP-UX 11.11 bug.
63002 2013-10-14  Paul Eggert  <eggert@cs.ucla.edu>
63004         acl: allow cross-compilation to Gentoo
63005         Problem reported by Gabriel Marcano in
63006         <http://lists.gnu.org/r/bug-gnulib/2013-10/msg00058.html>.
63007         * m4/acl.m4 (gl_ACL_GET_FILE): When cross-compiling,
63008         test only whether it links.
63010 2013-10-13  Paul Eggert  <eggert@cs.ucla.edu>
63012         mgetgroups: remove dependency on realloc-gnu
63013         The dependency violates the comment in realloc-gnu, which
63014         says that tests can't depend on realloc-gnu; some tests depend
63015         on mgetgroups, so mgetgroups can't depend on realloc-gnu.
63016         Problem reported by Daniel Richard G. in
63017         <http://lists.gnu.org/r/bug-gnulib/2013-10/msg00056.html>.
63018         * lib/mgetgroups.c (mgetgroups): Don't call realloc (NULL, 0).
63019         * modules/mgetgroups (Depends-on): Depend on realloc-posix,
63020         not realloc-gnu.
63022 2013-10-12  Paul Eggert  <eggert@cs.ucla.edu>
63024         regex-tests: port to HP-UX 11.11
63025         Problem reported by Daniel Richard G. in
63026         <http://lists.gnu.org/r/bug-gnulib/2013-10/msg00052.html>.
63027         * modules/regex-tests (test_regex_LDADD): Add LIBTHREAD, LIB_PTHREAD.
63029 2013-10-10  Paul Eggert  <eggert@cs.ucla.edu>
63031         verify: document some 'assume' pitfalls
63032         * doc/verify.texi (Compile-time Assertions):
63033         Mention that 'assume (E)' can sometimes slow things down.
63034         Use CHAR_MAX + 1, not UCHAR_MAX + 1.
63036 2013-10-10  Eric Blake  <eblake@redhat.com>
63038         strtoumax: fix typo in previous commit.
63039         * modules/strtoumax (Depends-on): Fix typo.
63040         * modules/strtoimax (Depends-on): Likewise.
63042 2013-10-10  Paul Eggert  <eggert@cs.ucla.edu>
63044         strtoumax: port to Solaris 8
63045         This problem was introduced in the recent HP-UX patch.
63046         Reported by Tom G. Christensen in
63047         <http://lists.gnu.org/r/bug-gnulib/2013-10/msg00037.html>.
63048         * modules/strtoumax (Depends-on): Test HAVE_STRTOUMAX
63049         and REPLACE_STRTOUMAX rather than ac_cv_func_strtoumax.
63051 2013-10-09  Paul Eggert  <eggert@cs.ucla.edu>
63053         strtoimax, strtoumax: port to HP-UX 11.11
63054         Problem reported by Daniel Richard G. in
63055         <http://lists.gnu.org/r/bug-gnulib/2013-10/msg00023.html>.
63056         * lib/inttypes.in.h (strtoumax): Replace strtoumax if
63057         REPLACE_STRTOUMAX, thus treating it consistently with strtoimax.
63058         * m4/inttypes.m4 (gl_INTTYPES_H_DEFAULTS): Add default for
63059         REPLACE_STRTOUMAX.
63060         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX):
63061         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX):
63062         Replace the function if defined as a macro but not as a function.
63063         * modules/inttypes-incomplete (inttypes.h): Substitute
63064         REPLACE_STRTOUMAX.
63065         * modules/strtoumax (configure.ac): Replace strtoumax if
63066         REPLACE_STRTOUMAX.
63068 2013-10-08  Paul Eggert  <eggert@cs.ucla.edu>
63070         strtoimax: port to HP-UX 11.11
63071         Problem reported by Daniel Richard G.
63072         * lib/strtoimax.c (Strtoimax, Strtol, Strtoll): New macros.
63073         (strtoimax, strtol, strtoll) [UNSIGNED]: Remove, since
63074         they might clash with inttypes.h.
63076 2013-10-06  Paul Eggert  <eggert@cs.ucla.edu>
63078         New module 'count-trailing-zeros'.
63079         * MODULES.html.sh: Mention it.
63080         * lib/count-trailing-zeros.c, lib/count-trailing-zeros.h:
63081         * m4/count-trailing-zeros.m4, modules/count-trailing-zeros:
63082         * modules/count-trailing-zeros-tests:
63083         * tests/test-count-trailing-zeros.c:
63084         New files.
63086         count-leading-zeros: port to MSC; support types wider than 64 bits
63087         The ideas behind the MSC port are stolen from Emacs.
63088         * lib/count-leading-zeros.h:
63089         Don't include verify.h: it's no longer needed, as types wider than
63090         64 bits are now supported.
63091         (COUNT_LEADING_ZEROS): New arg MSC_BUILTIN, for better
63092         performance with MSC.  All uses changed.  Do not assume that TYPE
63093         has at most 64 bits.
63094         (count_leading_zeros_32): Assume 0 < X < 2**32, for speed.
63095         All uses changed.  Fold the subtraction from 31 into the table.
63097         count-one-bits: port to MSC; support types wider than 64 bits
63098         The ideas behind the MSC port are stolen from Emacs.
63099         * lib/count-one-bits.c (popcount_support) [_MSC_VER]: New variable.
63100         * lib/count-one-bits.h: Include limits.h, for CHAR_BIT.
63101         Don't include verify.h: it's no longer needed, as types wider than
63102         64 bits are now supported.
63103         (COUNT_ONE_BITS_GENERIC): New macro.
63104         (popcount_supported) [_MSC_VER]: New inline function.
63105         (COUNT_ONE_BITS): Use it.  New arg MSC_BUILTIN, for better
63106         performance with MSC.  All uses changed.  Do not assume that TYPE
63107         has at most 64 bits.
63108         * modules/count-one-bits (Depends-on): Do not depend on 'verify'.
63110 2013-10-06  Andrew Borodin  <aborodin@vmail.ru>
63112         mountlist: fix resource leak with MOUNTED_INTERIX_STATVFS
63113         * lib/mountlist.c (read_file_system_list): fix leak of directory
63114         streams in case of #ifdef MOUNTED_INTERIX_STATVFS.
63116 2013-10-06  Paul Eggert  <eggert@cs.ucla.edu>
63118         tests: improve diagnostic when an assertion fails
63119         * tests/macros.h (ASSERT): Report the assertion that failed.
63121 2013-10-02  Paul Eggert  <eggert@cs.ucla.edu>
63123         verify: new macro 'assume'
63124         This is taken from Emacs, and should be generally useful.
63125         * doc/verify.texi (assume): Document it.
63126         * lib/verify.h (assume): New macro.
63127         (__has_builtin): Expand to 0 if not defined.
63129 2013-09-26  Eric Blake  <eblake@redhat.com>
63131         dup2, dup3: work around another cygwin crasher
63132         * m4/dup2.m4 (gl_FUNC_DUP2): Expose the bug.
63133         * m4/dup3.m4 (gl_FUNC_DUP3): Likewise.
63134         * tests/test-dup2.c (main): Likewise.
63135         * lib/dup2.c (rpl_dup2): Use setdtablesize to avoid it.
63136         * lib/dup3.c (dup3): Likewise.
63137         * doc/posix-functions/dup2.texi (dup2): Document it.
63138         * doc/glibc-functions/dup3.texi (dup3): Likewise.
63140         getdtablesize: work around cygwin issue
63141         * m4/getdtablesize.m4 (gl_FUNC_GETDTABLESIZE): Detect problem.
63142         * modules/getdtablesize (configure.ac): Build replacement.
63143         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set up a witness.
63144         * modules/unistd (Makefile.am): Expose the witness.
63145         * lib/unistd.in.h (getdtablesize): Declare replacement.
63146         * lib/getdtablesize.c (rpl_getdtablesize): Work around it.
63147         * tests/test-getdtablesize.c (main): Test it.
63148         * doc/glibc-functions/getdtablesize.texi (getdtablesize): Document it.
63150 2013-09-25  Mats Erik Andersson  <gnu@gisladisker.se>
63152         pmccabe2html: escaping of special characters
63153         Escape all '<', '>', and '&' in HTML output.
63154         * build-aux/pmccabe2html (html_fnc): Call gsub()
63155         instead of sub() to capture all '<', '>', and '&'.
63156         Neither of '<' and '>' is special in a regexp,
63157         so first arguments to gsub() are corrected. Also,
63158         in replacement strings, ampersand must be escaped.
63159         Finally, '&' must be handled first, then '<' and '>'.
63161 2013-09-24  Eric Blake  <eblake@redhat.com>
63163         manywarnings: enable nicer gcc warning messages
63164         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Older gcc requires
63165         some -f options for optimal warnings.
63167 2013-09-21  Jim Meyering  <meyering@fb.com>
63169         timespec: use the new TIMESPEC_RESOLUTION in a few more places
63170         * lib/timespec-add.c (timespec_add): Also replace 999999999
63171         with TIMESPEC_RESOLUTION - 1.
63172         * lib/timespec-sub.c (timespec_sub): Likewise.
63174 2013-09-23  Paul Eggert  <eggert@cs.ucla.edu>
63176         warnings: port --enable-gcc-warnings to Solaris Studio 12.3
63177         Problem reported by Dagobert Michelsen via Eric Blake in
63178         <http://lists.gnu.org/r/bug-gnulib/2013-09/msg00052.html>.
63179         * m4/warnings.m4 (gl_COMPILER_OPTION_IF): Use AC_LINK_IFELSE,
63180         not AC_COMPILE_IFELSE.
63182 2013-09-23  Eric Blake  <eblake@redhat.com>
63184         configmake: support new --runstatedir option
63185         * m4/configmake.m4 (gl_CONFIGMAKE_PREP): Substitute runstatedir
63186         even if autoconf was too old to provide the command line option.
63187         * modules/configmake (Makefile.am): Propagate it to .h file.
63189 2013-09-22  Paul Eggert  <eggert@cs.ucla.edu>
63191         ctype, string: depend on extern-inline
63192         This is needed to complete the recent OS X fixes.
63193         Also, fix related documentation as suggested by Eric Blake.
63194         * doc/posix-functions/isalnum.texi, doc/posix-functions/isalpha.texi:
63195         * doc/posix-functions/isascii.texi, doc/posix-functions/iscntrl.texi:
63196         * doc/posix-functions/isdigit.texi, doc/posix-functions/isgraph.texi:
63197         * doc/posix-functions/islower.texi, doc/posix-functions/isprint.texi:
63198         * doc/posix-functions/ispunct.texi, doc/posix-functions/isspace.texi:
63199         * doc/posix-functions/isupper.texi, doc/posix-functions/isxdigit.texi:
63200         * doc/posix-functions/toascii.texi, doc/posix-functions/tolower.texi:
63201         * doc/posix-functions/toupper.texi:
63202         List the 'ctype' gnulib module.
63203         * doc/posix-functions/strcat.texi, doc/posix-functions/strcpy.texi:
63204         * doc/posix-functions/strncpy.texi:
63205         List the 'string' gnulib module.
63206         * modules/memcpy, modules/memmove, modules/memset (Depends-on):
63207         Add string.
63208         * modules/ctype, modules/string (Depends-on): Add extern-inline.
63210 2013-09-19  Pádraig Brady  <P@draigBrady.com>
63212         userspec: support optional parameters to parse_user_spec()
63213         * lib/userspec.c (parse_user_spec): If the GID param is NULL,
63214         then avoid group processing and treat the full spec as a user.
63215         (parse_with_separator): Allow the USERNAME and GROUPNAME to
63216         be optional params (NULL), in which case they're ignored.
63218 2013-09-19  Paul Eggert  <eggert@cs.ucla.edu>
63220         timespec: new function make_timespec, and new constants
63221         * lib/timespec.h: Incorporate recent changes on the Emacs trunk.
63222         (TIMESPEC_RESOLUTION, LOG10_TIMESPEC_RESOLUTION): New constants.
63223         (make_timespec): New function.
63224         * lib/dtotimespec.c (dtotimespec):
63225         * lib/timespec-add.c (timespec_add):
63226         * lib/timespec-sub.c (timespec_sub):
63227         * lib/utimens.c (validate_timespec):
63228         * lib/utimensat.c (rpl_utimensat):
63229         Use these new constants and functions.
63231         stdio: OS X port of putc_unlocked + extern inline
63232         * lib/stdio.in.h (putc_unlocked): #undef on problematic Apple platforms.
63233         * doc/posix-functions/putc_unlocked.texi:
63234         * doc/posix-functions/putchar_unlocked.texi:
63235         Document this portability problem.
63237         signal: OS X port of sigaddset etc. + extern inline
63238         * lib/signal.in.h (sigaddset, sigdelset, sigemptyset, sigfillset)
63239         (sigismember): #undef on problematic Apple platforms.
63240         * doc/posix-functions/sigaddset.texi:
63241         * doc/posix-functions/sigdelset.texi:
63242         * doc/posix-functions/sigemptyset.texi:
63243         * doc/posix-functions/sigfillset.texi:
63244         * doc/posix-functions/sigismember.texi:
63245         Document this portability problem.
63247         extern-inline: do not always suppress extern inline on OS X
63248         * m4/extern-inline.m4 (gl_EXTERN_INLINE): Suppress the use of
63249         extern inline on Apple only if the particular compile-time
63250         configuration is known to have the problem.
63251         (_GL_EXTERN_INLINE_APPLE_BUG): New private macro, to implement this.
63252         (_GL_EXTERN_INLINE_IN_USE): New macro, intended for use by
63253         other Gnulib modules.
63255         extern-inline: document fixes for ctype and wctype macros
63256         * doc/posix-functions/isalnum.texi, doc/posix-functions/isalpha.texi:
63257         * doc/posix-functions/isascii.texi, doc/posix-functions/isblank.texi:
63258         * doc/posix-functions/iscntrl.texi, doc/posix-functions/isdigit.texi:
63259         * doc/posix-functions/isgraph.texi, doc/posix-functions/islower.texi:
63260         * doc/posix-functions/isprint.texi, doc/posix-functions/ispunct.texi:
63261         * doc/posix-functions/isspace.texi, doc/posix-functions/isupper.texi:
63262         * doc/posix-functions/iswalnum.texi, doc/posix-functions/iswalpha.texi:
63263         * doc/posix-functions/iswcntrl.texi, doc/posix-functions/iswctype.texi:
63264         * doc/posix-functions/iswdigit.texi, doc/posix-functions/iswgraph.texi:
63265         * doc/posix-functions/iswlower.texi, doc/posix-functions/iswprint.texi:
63266         * doc/posix-functions/iswpunct.texi, doc/posix-functions/iswspace.texi:
63267         * doc/posix-functions/iswupper.texi, doc/posix-functions/iswxdigit.texi:
63268         * doc/posix-functions/isxdigit.texi, doc/posix-functions/toascii.texi:
63269         * doc/posix-functions/memcpy.texi, doc/posix-functions/memmove.texi:
63270         * doc/posix-functions/memset.texi, doc/posix-functions/stpcpy.texi:
63271         * doc/posix-functions/stpncpy.texi, doc/posix-functions/strcat.texi:
63272         * doc/posix-functions/strcpy.texi, doc/posix-functions/strncat.texi:
63273         * doc/posix-functions/strncpy.texi:
63274         * doc/posix-functions/tolower.texi, doc/posix-functions/toupper.texi:
63275         * doc/posix-functions/towlower.texi, doc/posix-functions/towupper.texi:
63276         Document that Gnulib fixes portability problems with these
63277         functions on OS X 10.8 and earlier when called from plain inline
63278         or extern inline functions.
63280 2013-09-17  Kevin Cernekee  <cernekee@gmail.com>
63282         fflush, freadahead, fseeko: Fix for Android
63283         Suggested by Bruno Haible in:
63284         <http://lists.gnu.org/r/bug-gnulib/2012-01/msg00306.html>
63285         * lib/stdio-impl.h: Use local __sfileext definition.
63287 2013-09-17  Mats Erik Andersson  <gnu@gisladisker.se>
63289         pmccabe2html: Portability to other awk versions.
63290         The functions systime() and strftime() are available
63291         in Gawk only.  Properly close two HTML-tags 'style'
63292         and 'span'.
63293         * build-aux/pmccabe2html (BEGIN): Store timing
63294         strings in EPOCH_TIME and CHRONOS_TIME.  Replace
63295         systime() in HTML_COMMENT.
63296         (html_header): Correctly close tag 'style'.
63297         (END): Replace strftime() by CHRONOS_TIME.  Close
63298         tag 'span' correctly, not as 'div'.
63300 2013-09-17  Mats Erik Andersson  <gnu@gisladisker.se>  (tiny change)
63302         getgroups: statement without effect
63303         * lib/getgroups.c (rpl_getgroups) [HAVE_GETGROUPS]:
63304         Change equality conditional to expected assignment.
63306 2013-09-09  Eric Blake  <eblake@redhat.com>
63308         glob: fix compilation
63309         * lib/glob.in.h (__THROW): Fix missing line in previous commit.
63311 2013-09-07  Eric Blake  <eblake@redhat.com>
63313         glob: fix build for platforms without __THROW
63314         * lib/glob.in.h (__THROW): Add definition again.
63316 2013-09-04  Anton Ovchinnikov  <revolver112@gmail.com>  (tiny change)
63318         regex-quote: fix buffer access out of bounds
63319         http://lists.gnu.org/r/bug-gnulib/2013-09/msg00001.html
63320         * lib/regex-quote.c (regex_quote_spec_pcre):
63321         Fix typo that resulted in an out-of-bounds read.
63323 2013-09-04  Eric Blake  <eblake@redhat.com>
63325         glob: avoid -Wattribute warnings on glibc
63326         * lib/glob.c (next_brace_sub, prefix_array, collated_compare): Use
63327         __THROWNL, not __THROW, on static functions.
63328         * lib/glob.in.h (__THROW): Adjust...
63329         (__THROWNL): ...accordingly.
63331 2013-08-28  Paul Eggert  <eggert@cs.ucla.edu>
63333         headers: check that _GL_INLINE_HEADER_BEGIN is defined
63334         Suggested by Bruce Korb in:
63335         http://lists.gnu.org/r/bug-gnulib/2013-08/msg00070.html
63336         * doc/extern-inline.texi (extern inline):
63337         Suggest checking that _GL_INLINE_HEADER_BEGIN is defined.
63338         * lib/acl-internal.h, lib/argp-fmtstream.h, lib/argp.h:
63339         * lib/binary-io.h, lib/bitrotate.h, lib/count-leading-zeros.h:
63340         * lib/count-one-bits.h, lib/eealloc.h, lib/execinfo.in.h:
63341         * lib/gethrxtime.h, lib/gl_list.h, lib/gl_oset.h, lib/gl_xlist.h:
63342         * lib/gl_xoset.h, lib/gl_xsublist.h, lib/glthread/cond.h:
63343         * lib/glthread/thread.h, lib/math.in.h, lib/mbchar.h, lib/mbfile.h:
63344         * lib/mbiter.h, lib/mbuiter.h, lib/openat.h, lib/pipe-filter-aux.h:
63345         * lib/priv-set.h, lib/pthread.in.h, lib/savewd.h, lib/se-context.in.h:
63346         * lib/se-selinux.in.h, lib/sig-handler.h, lib/stat-time.h:
63347         * lib/sys_socket.in.h, lib/timespec.h, lib/u64.h, lib/unistd.in.h:
63348         * lib/utimens.h, lib/wctype.in.h, lib/xalloc.h, lib/xsize.h:
63349         * lib/xtime.h:
63350         Check that _GL_INLINE_HEADER_BEGIN is defined.
63352 2013-08-29  Pádraig Brady  <P@draigBrady.com>
63354         bootstrap: remove the --version requirement from ancillary tools
63355         * build-aux/bootstrap (check_exists): A new refactored function to
63356         determine if a command exists.
63357         (find_tool): Use the new function which does not require the
63358         --version option to be supported.
63359         (check_versions): Use the new function.
63361 2013-08-26  Simon Josefsson  <simon@josefsson.org>
63363         gc: support HMAC-SHA256 and HMAC-SHA512.
63364         * lib/gc.h: Add gc_hmac_sha256 and gc_hmac_sha512.
63365         * lib/gc-libgcrypt.c (gc_hmac_sha256, gc_hmac_sha512): New
63366         functions.
63367         (gc_hmac_md5): Use symbolic constant.
63368         * lib/gc-gnulib.c: Include hmac.h for HMAC-SHA256/512 too.
63369         (gc_hmac_sha256, gc_hmac_sha512): New functions.
63370         * lib/hmac.h: Add hmac_sha256 and hmac_sha512 prototypes.
63371         * m4/sha256.m4: Protect against empty expansion.
63372         * m4/sha512.m4: Likewise.
63373         * lib/hmac-sha256.c: New file.
63374         * lib/hmac-sha512.c: Likewise.
63375         * m4/gc-hmac-sha256.m4: Likewise.
63376         * m4/gc-hmac-sha512.m4: Likewise.
63377         * m4/gc-sha256.m4: Likewise.
63378         * m4/gc-sha512.m4: Likewise.
63379         * modules/crypto/gc-hmac-sha256: Likewise.
63380         * modules/crypto/gc-hmac-sha256-tests: Likewise.
63381         * modules/crypto/gc-hmac-sha512: Likewise.
63382         * modules/crypto/gc-hmac-sha512-tests: Likewise.
63383         * modules/crypto/hmac-sha256: Likewise.
63384         * modules/crypto/hmac-sha256-tests: Likewise.
63385         * modules/crypto/hmac-sha512: Likewise.
63386         * modules/crypto/hmac-sha512-tests: Likewise.
63387         * tests/test-gc-hmac-sha256.c: Likewise.
63388         * tests/test-gc-hmac-sha512.c: Likewise
63389         * tests/test-hmac-sha256.c: Likewise.
63390         * tests/test-hmac-sha512.c: Likewise
63392 2013-08-24  Daiki Ueno  <ueno@gnu.org>
63394         * m4/intl.m4: Update from gettext-0.18.3.1, which fixes a misuse
63395         of AC_CHECK_DECLS.
63397 2013-08-23  Paul Eggert  <eggert@cs.ucla.edu>
63399         selinux-at: omit unnecessary include
63400         * lib/selinux-at.c: Don't include dosname.h; not needed, since
63401         this source file doesn't use its macros, and subsidiary files that
63402         use the macros already include it.
63404 2013-08-21  Eric Blake  <eblake@redhat.com>
63406         d-ino: avoid false negative on symlink
63407         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Use lstat.
63408         Reported by Stephane Chazelas.
63410 2013-08-12  Mike Miller  <mtmiller@ieee.org>  (tiny change)
63412         bootstrap: port to OpenBSD sed
63413         * build-aux/bootstrap (insert_if_absent): Port to OpenBSD sed which
63414         does not interpret `-' as a file argument to mean stdin.
63416 2013-08-15  Eric Blake  <eblake@redhat.com>
63418         warnings: minor optimization
63419         * m4/warnings.m4 (gl_COMPILER_OPTION_IF): Use fewer processes.
63421         warnings: check -Wfoo rather than -Wno-foo
63422         * m4/warnings.m4 (gl_COMPILER_OPTION_IF): If name begins with
63423         -Wno-, test if the compiler recognizes the positive form instead.
63425 2013-08-15  Karl Berry  <karl@gnu.org>
63427         * config/srclist-update: add option "doclicense" to placate
63428         pulling *.texi files from Emacs.  Write terse usage
63429         documentation at the top.
63431 2013-08-13  Paul Eggert  <eggert@cs.ucla.edu>
63433         xvasprintf-tests: port to GCC with hardening flags
63434         * tests/test-xvasprintf.c (test_xasprintf): Pass another arg to
63435         xasprintf, to pacify GCC.  Reported by Santiago Vila in:
63436         http://lists.gnu.org/r/bug-diffutils/2013-08/msg00002.html
63438 2013-08-11  Paul Eggert  <eggert@cs.ucla.edu>
63440         fpending: port to recent Cygwin change to stdio_ext.h
63441         Reported by LRN in
63442         <http://lists.gnu.org/r/bug-gnulib/2013-08/msg00028.html>.
63443         * lib/fpending.h: Don't worry about HAVE_DECL___FPENDING;
63444         just declare __fpending unless it's a macro.
63445         A duplicate decl shouldn't hurt.
63446         * m4/fpending.m4 (gl_FUNC_FPENDING): Check that an __fpending
63447         call compiles and links, instead of separately checking for
63448         decl and lib function.
63449         * modules/fpending (configure-ac):
63450         Adjust to fpending.m4's renaming of shell variable.
63452 2013-08-10  Paul Eggert  <eggert@cs.ucla.edu>
63454         sys_time: port to OpenBSD
63455         * lib/sys_time.in.h: Simply delegate to the system's header
63456         in the BSDish cases as well.  Problem reported by Mike Miller in
63457         <http://lists.gnu.org/r/bug-gnulib/2013-08/msg00016.html>.
63458         * tests/test-sys_select.c, tests/test-sys_time.c (verify_tv_sec_type):
63459         Allow platforms like 64-bit OpenBSD where timeval's tv_sec is
63460         wider than time_t.
63462 2013-08-09  Pádraig Brady  <P@draigBrady.com>
63464         bootstrap: support checksum utils having -c but not --status
63465         * build-aux/bootstrap: Only look for sha1sum if updating po files.
63466         Add sha1 to the list of supported checksum utils since it's now
63467         supported through adjustments below.
63468         (update_po_files): Remove the use of --status
63469         in a way that will suppress all error messages, but since this is
63470         only used to minimize updates, it shouldn't cause an issue.
63471         Exit early if there is a problem updating the po file checksums.
63472         (find_tool): Remove the check for --version support as this
63473         is optional as per commit 86186b17.  Don't even check for the
63474         presence of the command as if that is needed, it's supported
63475         through configuring prerequisites in bootstrap.conf.
63476         Prompt that when a tool isn't found, one can define an environment
63477         variable to add to the hardcoded search list.
63479 2013-08-05  Jim Meyering  <meyering@fb.com>
63481         regex: port to non-glibc/lock-using systems
63482         Since 29-05-2013 commit, 55ba71f4, compilation on a non-glibc
63483         system with GNULIB_LOCK would fail due to absence of the
63484         included "glthread/lock.h".  This would affect any package
63485         for which the "lock" module is used only by the regex module,
63486         and not explicitly used.
63487         * m4/regex.m4 (gl_PREREQ_REGEX): Require gl_GLIBC21.
63488         * modules/regex (Depends-on) [!GLIBC && $ac_use_included_regex]:
63489         Add a dependency on the "lock" module.
63491 2013-07-20  Daiki Ueno  <ueno@gnu.org>
63493         localecharset: make locale_charset thread-safe on Mac OS X
63494         * lib/localcharset.c (locale_charset) [DARWIN7]: Use MB_CUR_MAX_L
63495         instead of MB_CUR_MAX.
63497 2013-07-20  Daiki Ueno  <ueno@gnu.org>
63499         gettext: update to version 0.18.3
63500         * m4/intl.m4, m4/po.m4: Update from gettext-0.18.3.  In particular,
63501         require AC_PROG_SED to allow user to specify custom sed command when
63502         generating en@quot PO file.
63504 2013-07-18  Werner Lemberg  <wl@gnu.org>  (tiny change)
63506         bootstrap: use correct source when copying build-aux files
63507         * build-aux/bootstrap (gnulib_extra_files): This variable is
63508         relative to upstream gnulib layout, not downstream.
63510 2013-07-17  Paul Eggert  <eggert@cs.ucla.edu>
63512         tmpdir: fix bug in VMS port
63513         * lib/tmpdir.c (path_search) [__VMS]: Never add slash.
63514         See Steven M. Schweda in
63515         <http://lists.gnu.org/r/bug-gnulib/2013-07/msg00026.html>.
63517 2013-07-15  Paul Eggert  <eggert@cs.ucla.edu>
63519         tmpdir: port to VMS, to // != /, and to long dirs
63520         * lib/tmpdir.c (__libc_secure_getenv) [!_LIBC]: Rename from
63521         __secure_getenv, so that we're more like the glibc version.
63522         All uses changed.
63523         (path_search): Don't put slash after directory if __VMS.
63524         Problem reported by Steven M. Schweda in
63525         <http://lists.gnu.org/r/bug-gnulib/2013-07/msg00019.html>.
63526         Simplify code to add slash; no need for a loop.
63527         Do not remove trailing slash from "//".
63528         Do not assume dlen <= INT_MAX.
63530 2013-07-09  Paul Eggert  <eggert@cs.ucla.edu>
63532         regex: port to --with-included-regex --enable-gcc-warnings non-threaded
63533         * lib/regex_internal.h (lock_fini, lock_lock): Rework to avoid
63534         gcc warnings in the non-threaded case.  Reported by Charlie Brown in
63535         <http://lists.gnu.org/r/bug-gnulib/2013-07/msg00015.html>.
63537         accept4, dup3, pipe2: port to Cygwin
63538         Problem reported for Emacs by Ken Brown in <http://bugs.gnu.org/14821>.
63539         * lib/accept4.c (accept4) [O_BINARY]:
63540         * lib/dup3.c (dup3) [O_BINARY]:
63541         * lib/pipe2.c (pipe2) [O_BINARY]:
63542         Use set_binary_mode, not setmode.
63543         * lib/pipe2.c [!GNULIB_BINARY_IO]: Include binary-io.h.
63544         * modules/binary-io (Depends-on): Remove module indicator.
63545         These last two bits undo the previous change to pipe2 and binary-io.
63547 2013-07-09  Pádraig Brady  <P@draigBrady.com>
63549         mountlist: add support for deallocating returned list entries
63550         * lib/mountlist.c (free_mount_entry): A new exported function
63551         to deallocate a mount list entry.
63552         (read_file_system_list): Refactor to use the new deallocation function.
63553         Suggested by Anton Ovchinnikov.
63555 2013-07-07  Paul Eggert  <eggert@cs.ucla.edu>
63557         stdalign, verify: port to FreeBSD 9.1, to C11, and to C++11
63558         Problem reported by Ulrich Mueller in <http://bugs.gnu.org/14812>.
63559         * lib/stdalign.in.h (_Alignas, _Alignof):
63560         Port to FreeBSD 9.1, and to C11 and C++11.
63561         (_Alignas): Also support ICC.
63562         * lib/verify.h (_Static_assert): Undef if <stddef.h> defines it.
63563         * m4/stdalign.m4 (gl_STDALIGN_H): Port to ICC and to C++11.
63565 2013-07-06  Paul Eggert  <eggert@cs.ucla.edu>
63567         fnmatch: don't goto over declaration
63568         * lib/fnmatch_loop.c (FCT): Hoist local up one level, to avoid
63569         undefined behavior for goto over a declaration.
63570         Problem reported by Charlie Brown in
63571         <http://lists.gnu.org/r/bug-gnulib/2013-07/msg00009.html>.
63573         pipe2: decouple from binary-io a bit
63574         This is for Emacs, which needs pipe2 but not binary-io.
63575         * lib/pipe2.c [!GNULIB_BINARY_IO]: Don't include binary-io.h.
63576         * modules/binary-io (Depends-on): Add module indicator.
63578 2013-07-03  Eric Blake  <eblake@redhat.com>
63580         mgetgroups: relax license to LGPLv2+
63581         * modules/getugroups (License): Change from GPLv3+.
63582         * modules/mgetgroups (License): Likewise.
63583         * modules/getgroups (License): Change from LGPLv3+.
63585         xalloc-oversized: relax license to LGPLv2+
63586         * modules/xalloc-oversized (License): Change from GPLv3+.
63588         nproc: relax license to LGPLv2+
63589         * modules/nproc (License): Change from LGPLv3+.
63591         bootstrap: honor --no-git
63592         * build-aux/bootstrap: Don't even try to use git when user is
63593         pointing to a static checkout.
63595 2013-06-23  Paul Eggert  <eggert@cs.ucla.edu>
63597         ignore-value: port to gcc -pedantic
63598         * lib/ignore-value.h (ignore_value):
63599         Port to gcc -pedantic, by using __extension__.
63600         Reindent as per usual gnulib style nowadays.
63601         Simplify GCC version check.
63603 2013-06-21  Paul Eggert  <eggert@cs.ucla.edu>
63605         extern-inline: port to gcc -std=c89
63606         * m4/extern-inline.m4 (gl_EXTERN_INLINE):
63607         Do not use __gnu_inline__ if pedantic and pre-C99.
63609 2013-06-18  Paul Eggert  <eggert@cs.ucla.edu>
63611         doc: document extern-inline
63612         * doc/extern-inline.texi: New file.
63613         * doc/gnulib.texi (alloca-opt): Include it.
63614         * m4/extern-inline.m4: Move some comments to documentation,
63615         and others closer to what they describe.
63617         doc: chatter less
63618         * doc/Makefile (NEWEST_GNULIB_TEXI_FILE): New macro.
63619         (updated-stamp): Use it.  This causes 'make' to output just
63620         one file name rather than zillions.
63622         fflush, fseeko: port to musl cross-compiles
63623         * lib/fseeko.c (fseeko): Assume that fflushing stdin works if
63624         on some implementation that (1) is not known to be buggy,
63625         (2) claims conformance to POSIX.1-2008 or later, and (3) is being
63626         cross-compiled to so we can't easily check for lack of
63627         conformance.  This is for cross-compiling to musl.
63628         Reported by Rich Felker in
63629         <http://lists.gnu.org/r/bug-gnulib/2013-06/msg00043.html>.
63630         * m4/fclose.m4 (gl_FUNC_FCLOSE):
63631         * m4/fflush.m4 (gl_FUNC_FFLUSH):
63632         * m4/fseeko.m4 (gl_FUNC_FSEEKO):
63633         Adjust to above change.
63634         * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): Set gl_cv_func_fflush_stdin
63635         to 'cross', not to 'no', when cross-compiling.  AC_DEFINE
63636         FUNC_FFLUSH_STDIN to 1, 0, -1 if fflushing stdin is known to work,
63637         known not to work, or unknown.
63639 2013-06-15  Paul Eggert  <eggert@cs.ucla.edu>
63641         msvc-inval: port to mingw-w64
63642         * lib/msvc-inval.c (gl_msvc_invalid_parameter_handler):
63643         Use __cdecl, not cdecl, for mingw-w64.  Reported by LRN in
63644         <http://lists.gnu.org/r/bug-gnulib/2013-06/msg00039.html>.
63646 2013-06-11  Paul Eggert  <eggert@cs.ucla.edu>
63648         getcwd-lgpl: port to Tru64
63649         * lib/getcwd-lgpl.c: Include <stdlib.h>, for malloc etc.
63650         Problem reported by Steven M. Schweda in
63651         <http://lists.gnu.org/r/bug-gzip/2013-06/msg00010.html>.
63653         tests: port large-fd POSIX spawn tests to OS X
63654         Problem reported by Daiki Ueno in
63655         <http://lists.gnu.org/r/bug-gnulib/2013-06/msg00031.html>.
63656         * tests/test-posix_spawn_file_actions_addclose.c:
63657         * tests/test-posix_spawn_file_actions_adddup2.c:
63658         * tests/test-posix_spawn_file_actions_addopen.c:
63659         Include <limits.h>, for OPEN_MAX, if available.
63660         (big_fd): New static function.
63661         (main): Use it.
63663 2013-06-04  Bernhard Voelker  <mail@bernhard-voelker.de>
63665         tests/nap.h: use an adaptive delay to avoid ctime update issues
63666         The recent change in nap.h (5191133e) decreased the probability of lost
63667         races to about a third, however such problems could still be observed
63668         in virtual machines and openSUSE's OBS.
63669         Before, nap() detected the needed time once empirically and then used
63670         that delay (together with a small correction multiplier) in further
63671         calls.  This problem has been reported and discussed several times,
63672         including guesses about possible kernel issues:
63673         https://lists.gnu.org/r/bug-gnulib/2013-04/msg00071.html
63674         http://lists.gnu.org/r/coreutils/2012-03/msg00088.html
63675         https://lists.gnu.org/r/bug-gnulib/2011-11/msg00226.html
63676         http://bugs.gnu.org/12820
63677         https://lists.gnu.org/r/bug-gnulib/2010-11/msg00113.html
63678         https://lists.gnu.org/r/bug-gnulib/2009-11/msg00007.html
63679         Now, nap() avoids the race alltogether by verifying on a reference
63680         file whether a timestamp difference has happened.
63681         * tests/nap.h (nap_fd): Define file descriptor variable for the
63682         witness file.
63683         (nap_works): Change return value to bool.  Change passing
63684         the old file's status by value instead of by reference as this function
63685         does no longer update that timestamp; rename the function argument from
63686         st to old_st.  Remove the local variables cdiff and mdiff because that
63687         function now returns true/false instead of the precise delay.
63688         (guess_delay): Remove function.
63689         (clear_tmp_file): Add new function to close and unlink the witness file.
63690         (nap): Instead of re-using the delay which has been calculated during
63691         the first call, avoid the race by actually verifying that a timestamp
63692         difference can be observed on the current file system.  Use an adaptive
63693         approach for the delay to minimize execution time.  Assert that the
63694         maximum delay is <= ~2 seconds, more precisely sum(2^n) from 0 to 30
63695         = 2^31 - 1 = 2.1s.
63696         Use atexit to call clear_tmp_file when the process terminates.
63698 2013-06-02  Paul Eggert  <eggert@cs.ucla.edu>
63700         sig2str: port to C++
63701         * lib/sig2str.h (sig2str, str2sig): Declare as extern "C".
63702         Reported by Daniel J Sebald in
63703         <http://lists.gnu.org/r/bug-gnulib/2013-06/msg00000.html>.
63705 2013-05-30  Eric Blake  <eblake@redhat.com>
63707         docs: mention cygwin shortcoming in <sys/un.h>
63708         * doc/posix-headers/sys_un.texi (sys/un.h): Mention problem.
63710         vasnprintf: silence mingw compiler warning
63711         * lib/vasnprintf.c (VASNPRINTF): Avoid unused variable warning.
63713 2013-05-29  Paul Eggert  <eggert@cs.ucla.edu>
63715         c-ctype, regex, verify: port to gcc -std=c90 -pedantic
63716         Avoid constructions that are rejected by gcc -std=c90 -pedantic.
63717         This fixes a porting bug I recently reintroduced in regex, and
63718         some other instances that I discovered while testing the fix.
63719         * lib/c-ctype.h [__STRICT_ANSI__]: Avoid ({ ... }).
63720         * lib/regcomp.c (utf8_sb_map) [__STRICT_ANSI__]: Avoid [0 ... N] = E.
63721         * lib/regex_internal.h [!_LIBC && GNULIB_LOCK]: Do not use a macro
63722         with an empty argument if this is a pedantic pre-C99 GCC.
63723         * lib/verify.h: Do not use _Static_assert if this is a pedantic
63724         pre-C11 GCC.
63726         regex: adapt to locking regime instead of depending on pthread
63727         Instead of depending on pthread, adapt to whatever thread
63728         modules are in use.  Problem reported by Ludovic Courtès in
63729         <http://lists.gnu.org/r/bug-gnulib/2013-05/msg00082.html>
63730         and by Mats Erik Andersson in
63731         <http://lists.gnu.org/r/bug-gnulib/2013-05/msg00100.html>.
63732         * lib/regex_internal.h (lock_define, lock_init, lock_fini):
63733         Support either the 'lock' module, or the 'pthread' module, or
63734         no module.
63735         (lock_lock, lock_unlock): New macros.
63736         * lib/regexec.c (regexec, re_search_stub): Use the new macros.
63737         * modules/lock, modules/pthread (configure.ac): Add module indicator.
63738         * modules/regex (Depends-on): Remove pthread.
63740 2013-05-22  Eric Blake  <eblake@redhat.com>
63742         getgroups: document portability issues
63743         * doc/glibc-functions/initgroups.texi (initgroups): Mention
63744         multithread safety.
63745         * doc/posix-functions/getpwuid.texi (getpwuid): Likewise.
63746         * doc/posix-functions/getpwuid_r.texi (getpwuid_r): Likewise.
63747         * doc/glibc-functions/getgrouplist.texi (getgrouplist): Mention
63748         getugroups.
63749         * doc/posix-functions/getgroups.texi (getgroups): Mention
63750         multithread safety and mgetgroups.
63752 2013-05-22  Bernhard Voelker  <mail@bernhard-voelker.de>
63754         test-lchown, test-chown: also skip test if chown fails with EPERM
63755         * tests/test-lchown.h (test_lchown): Add EPERM to the condition to
63756         skip this test, to handle FAT file systems.
63757         * tests/test-chown.h (test_chown): Likewise.
63759 2013-05-19  Paul Eggert  <eggert@cs.ucla.edu>
63761         regex: fix dfa race in multithreaded uses
63762         Problem reported by Ludovic Courtès in
63763         <http://lists.gnu.org/r/bug-gnulib/2013-05/msg00058.html>.
63764         * lib/regex_internal.h (lock_define, lock_init, lock_fini):
63765         New macros.  All uses of __libc_lock_define, __libc_lock_init
63766         changed to use the first two of these.
63767         (__libc_lock_lock, __libc_lock_unlock): New macros, for
63768         non-glibc platforms.
63769         (struct re_dfa_t): Define the lock unconditionally.
63770         * lib/regexec.c (regexec, re_search_stub): Remove some now-incorrect
63771         '#ifdef _LIBC"s.
63772         * modules/regex (Depends-on): Add pthread, if we use the
63773         included regex.
63775         * lib/regcomp.c: Do actions that are not needed for glibc,
63776         but may be needed elsewhere.
63777         (regfree, re_compile_internal): Destroy the lock.
63778         (re_compile_internal): Check for lock-initialization failure.
63780         malloca: port to compilers that reject size-zero arrays
63781         This fixes a bug introduced in my previous patch.
63782         * lib/malloca.c (struct preliminary_header): Use an int
63783         rather than a character array of size int; that's simpler.
63784         (struct header): Remove, replacing with ...
63785         (union header): New type.  This avoids the need for declaring a
63786         character array of size zero, which is not allowed on some platforms.
63787         All uses changed.
63789 2013-05-18  Paul Eggert  <eggert@cs.ucla.edu>
63791         parse-datetime, tests: don't use "string" + int
63792         Recent versions of 'clang' complain about C source code that
63793         uses expressions of the form '"string literal" + integer',
63794         I guess on the theory that it's confusing for readers who are
63795         used to C++.  On those grounds I suppose it's OK to make this
63796         minor style change.
63797         * lib/parse-datetime.y (parse_datetime):
63798         * tests/test-fchdir.c (main):
63799         * tests/test-snprintf-posix.h (test_function):
63800         * tests/test-snprintf.c (main):
63801         * tests/test-vasnprintf-posix.c (test_function):
63802         * tests/test-vasnprintf.c (test_function):
63803         * tests/test-vsnprintf.c (main):
63804         * tests/unistdio/test-ulc-asnprintf1.h (test_function):
63805         Rewrite '"str" + E' to '&"str"[E]'.
63807 2013-05-17  Alexandre Duret-Lutz  <adl@lrde.epita.fr>
63809         argmatch: port to C++
63810         * lib/argmatch.h [__cplusplus]: Add extern "C".
63812         argp: typo fix
63813         * lib/argp-help.c: Typo in comment.
63815 2013-05-15  Paul Eggert  <eggert@cs.ucla.edu>
63817         manywarnings: update for GCC 4.8.0
63818         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC):
63819         Add -Waggressive-loop-optimizations, -Wreturn-local-addr, which
63820         are new to GCC 4.8.  Remove -Wformat=2, -Wmissing-format-attribute,
63821         -Wmissing-noreturn, as they are duplicates of other warnings.
63822         Remove -Wunreachable-code, as it is removed in GCC 4.8 and
63823         was documented to be flaky in earlier versions of GCC.
63825         spawn-tests, sys_socket-tests, sys_wait-tests: port to clang
63826         * tests/test-spawn.c (main):
63827         * tests/test-sys_socket.c (main):
63828         * tests/test-sys_wait.c (main):
63829         Don't have a switch value that isn't covered by a case.
63831         getaddrinfo-tests: port --enable-gcc-warnings to clang
63832         * tests/test-getaddrinfo.c (simple):
63833         Avoid casts from looser to stricter-aligned pointers.
63835         thread: port --enable-gcc-warnings to clang
63836         * lib/glthread/thread.h [__clang__ && USE_POSIX_THREADS_WEAK]:
63837         Include <signal.h>, to pacify a warning about pthread_sigmask.
63839         stdio: use __REDIRECT for fwrite, fwrite_unlocked
63840         * lib/stdio.in.h (fwrite):
63841         When working around bug 11959, use __REDIRECT rather than '#define
63842         fwrite(...) ... fwrite (...) ...'.  This is a more-targeted way to
63843         fix the -Wunused-value issue with clang, and it works with GCC too.
63844         Problem with targeting reported by Eric Blake in
63845         <http://lists.gnu.org/r/bug-gnulib/2013-05/msg00067.html>.
63846         (fwrite_unlocked): Treat like fwrite.  I ran into this issue while
63847         debugging the fwrite issue.
63849         stdio: port --enable-gcc-warnings to clang
63850         * lib/stdio.in.h (fwrite) [__clang__]: Ignore -Wunused-value entirely,
63851         since the GCC workaround for fwrite does not pacify clang.
63853         sig2str: port --enable-gcc-warnings to clang
63854         * lib/sig2str.c (sig2str): Avoid warning about unused printf argument.
63856         obstack: port --enable-gcc-warnings to clang
63857         * lib/obstack.h (obstack_ptr_grow_fast, obstack_int_grow_fast):
63858         Avoid casts from looser to stricter-aligned pointers.
63860         memchr2: port --enable-gcc-warnings to clang
63861         * lib/memchr2.c (memchr2):
63862         Avoid casts from looser to stricter-aligned pointers.
63864         mbsstr: port --enable-gcc-warnings to clang
63865         * lib/mbsstr.c (knuth_morris_pratt_multibyte):
63866         Avoid casts from looser to stricter-aligned pointers.
63868         malloca: port --enable-gcc-warnings to clang
63869         * lib/malloca.c (struct header): New member 'magic', to avoid casts.
63870         (mmalloca): Avoid casts from looser to stricter-aligned pointers.
63872         inttostr: port --enable-gcc-warnings to clang
63873         * lib/anytostr.c [__clang__]: Ignore -Wtautological-compare.
63875         warnings: port to clang
63876         Problem reported by Daniel P. Berrange via Eric Blake in
63877         <http://lists.gnu.org/r/bug-gnulib/2013-05/msg00055.html>.
63878         * m4/warnings.m4 (gl_UNKNOWN_WARNINGS_ARE_ERRORS): New macro.
63879         (gl_WARN_ADD): Use it.
63881 2013-05-11  Jim Meyering  <meyering@fb.com>
63883         quotearg: do not read beyond end of buffer
63884         * lib/quotearg.c (quotearg_buffer_restyled): Do not read beyond the
63885         end of an ARG for which no length was specified.  With an N-byte
63886         quote string, (e.g., N is 3 in the fr_FR.UTF-8 locale), this function
63887         would read N-2 bytes beyond ARG's trailing NUL.  This was triggered
63888         via coreutils' misc/sort-debug-keys.sh test and detected by running
63889         the test against a binary compiled with gcc-4.8.0's -fsanitize=address.
63890         * tests/test-quotearg-simple.c (main): Add a test to trigger the bug.
63891         * modules/quotearg-simple-tests (Files): Add tests/zerosize-ptr.h.
63892         Introduced via the 2000-01-15 commit, c4b7f3f8, "Quote multibyte
63893         characters correctly."
63895 2013-05-11  Daiki Ueno  <ueno@gnu.org>
63897         lock: work around pthread recursive mutexes bug in Mac OS X 10.6
63898         * m4/lock.m4: Don't define HAVE_PTHREAD_MUTEX_RECURSIVE if the
63899         compilation target is Mac OS X 10.6.
63900         Problem reported by parafin and Andoni Morales in
63901         <http://savannah.gnu.org/bugs/?37844> and
63902         <http://lists.gnu.org/r/bug-gettext/2013-05/msg00007.html>.
63904 2013-05-11  Paul Eggert  <eggert@cs.ucla.edu>
63906         mkdir-p: remove assumptions about umask and mode
63907         * lib/mkdir-p.c (make_dir_parents): Do not assume that the current
63908         umask is 0, or that MODE is a subset of MODE_BITS.
63910 2013-05-10  Eric Blake  <eblake@redhat.com>
63912         maint.mk: catch more abuse of HAVE_DECL in syntax-check
63913         * top/maint.mk (sc_prohibit_defined_have_decl_tests): Relax regex.
63915 2013-05-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
63917         deps: require Automake >= 1.9.6 in generated Makefile fragments
63919         That is the same minimal version required in the DEPENDENCIES file.
63920         Moreover, the old code generated a requirement of Automake >= 1.5,
63921         and that is an insanely outdated version.
63923         * gnulib-tool: Bump minimal version requirement in AUTOMAKE_OPTIONS.
63924         * tests/havelib/rpathlx/Makefile.am: Likewise.
63925         * tests/havelib/rpathly/Makefile.am: Likewise.
63926         * tests/havelib/rpathlyx/Makefile.am: Likewise.
63927         * tests/havelib/rpathlz/Makefile.am: Likewise.
63928         * tests/havelib/rpathlzyx/Makefile.am: Likewise.
63929         * tests/havelib/rpathx/Makefile.am: Likewise.
63930         * tests/havelib/rpathy/Makefile.am: Likewise.
63931         * tests/havelib/rpathz/Makefile.am: Likewise.
63933 2013-05-08  Eric Blake  <eblake@redhat.com>
63935         bootstrap: AC_INIT may have more than four parameters
63936         * build-aux/bootstrap (extract_package_name): Correctly extract
63937         non-empty tarname field.  Avoid range in regex.
63938         Based on a report by Sami Kerola <kerolasa@iki.fi>.
63940 2013-05-07  Paul Eggert  <eggert@cs.ucla.edu>
63942         qacl: port to MS-Windows port of GNU Emacs
63943         * lib/acl-errno-valid.c (acl_errno_valid) [ENOTSUP == ENOSYS]:
63944         Omit the duplicate ENOTSUP case.  Needed for the MS-Windows
63945         port of GNU Emacs.  Problem reported by Eli Zaretskii in
63946         <http://bugs.gnu.org/14295#14>.
63948 2013-05-07  Mike Frysinger  <vapier@gentoo.org>
63950         acl: include quote.h
63951         * lib/copy-acl.c: Include quote.h.
63952         * lib/set-acl.c: Likewise.
63954 2013-05-06  Mike Frysinger  <vapier@gentoo.org>
63956         fchownat, renameat, unlinkat: update statat dependencies
63957         These modules use statat and lstatat, not fstatat; so depend on
63958         the statat module, which was split out recently from fstatat.
63959         * modules/fchownat, modules/unlinkat: Change fstatat to statat.
63960         * modules/renameat: Likewise.  Also delete fstat.
63961         URL: http://bugs.gentoo.org/468790
63963 2013-05-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
63965         Assume gnulib is checked out from Git, not CVS
63967         In fact, access to the gnulib repository through CVS has been
63968         disabled, or more precisely, got broken and was never restored; see:
63969         <http://lists.gnu.org/r/bug-gnulib/2013-05/msg00008.html>
63971         Note that support for CVS is not removed completely and unthinkingly
63972         by this change: only support for CVS checkouts of gnulib itself is
63973         removed.  For example, the 'bootstrap' script still cater to .cvsingore
63974         files and CVS directories, for the benefit of those poor gnulib clients
63975         still stuck with CVS.  Ditto for the 'gnulib-tool' script itself.
63977         * gnulib-tool: Simplify accordingly.
63978         * posix-modules: Likewise.
63979         * MODULES.html.sh: Likewise.
63980         * doc/gnulib.texi: No longer mention the decommissioned CVS gnulib
63981         repository.
63982         * doc/gnulib-intro.texi: Likewise.
63983         * doc/gnulib-readme.texi: Likewise.
63984         * doc/gnulib-tool.texi: In the examples and explanations, refer to a
63985         sample '.gitignore' file rather than a sample '.cvsignore'.
63986         * NEWS: Update.
63987         * m4/extensions.m4: While at it, remove a comment mistakenly referring
63988         to "CVS Autoconf" rather than "git Autoconf".
63990 2013-04-30  Paul Eggert  <eggert@cs.ucla.edu>
63992         utimensat-tests, etc.: try to fix some races
63993         Problem reported by Bernhard Voelker in
63994         <http://lists.gnu.org/r/bug-gnulib/2013-04/msg00071.html>.
63995         I don't know whether this patch fixes that race condition, but it
63996         fixes *some* race conditions, so it should be a win.
63997         * modules/chown-tests (Depends-on):
63998         * modules/fchownat-tests (Depends-on):
63999         * modules/fdutimensat-tests (Depends-on):
64000         * modules/futimens-tests (Depends-on):
64001         * modules/lchown-tests (Depends-on):
64002         * modules/stat-time-tests (Depends-on):
64003         * modules/utimens-tests (Depends-on):
64004         * modules/utimensat-tests (Depends-on):
64005         Depend on nanosleep, not usleep.
64006         * modules/chown-tests (test_chown_LDADD):
64007         * modules/lchown-tests (test_lchown_LDADD):
64008         * modules/stat-time-tests (test_stat_time_LDADD):
64009         New macro.
64010         * modules/fchownat-tests (test_fchownat_LDADD):
64011         * modules/fdutimensat-tests (test_fdutimensat_LDADD):
64012         * modules/futimens-tests (test_futimens_LDADD):
64013         * modules/utimens-tests (test_utimens_LDADD):
64014         * modules/utimensat-tests (test_utimensat_LDADD):
64015         Add $(LIB_NANOSLEEP).
64016         * modules/stat-time-tests (Files): Add tests/nap.h.
64017         * tests/nap.h: Include <limits.h>, for INT_MAX.
64018         (lt_mtime): Remove.
64019         (diff_timespec): New function.
64020         (get_stat): Rename from get_mtime.  All callers changed.
64021         (nap_works): Determine the needed delay by inspecting the
64022         file system's timestamp jumps; this should be more reliable.
64023         Look at both mtime and ctime, and take the maximum of the two jumps.
64024         (nap_works, guess_delay):
64025         Return a nanosecond count, not a microsecond count.
64026         All callers changed.
64027         (nap_works, nap): Use nanosleep, not usleep.  Check for nanosleep
64028         failure.
64029         (nap): Multiply the guess by 1.125, to accommodate the case where
64030         the file system's clock is a bit slower than nanosleep's clock.
64031         * tests/test-stat-time.c (BASE): New macro.
64032         Include nap.h.
64033         (nap): Remove; nap.h now defines this.  This removes a duplicate
64034         implementation of 'nap'.
64036         utimens, utimensat: work around Solaris UTIME_OMIT bug
64037         Solaris 11.1 and Solaris 10 have the same UTIME_OMIT bug that
64038         Linux kernel 2.6.32 does.  Work around it in the same way.
64039         * doc/posix-functions/futimens.texi (futimens):
64040         * doc/posix-functions/utimensat.texi (utimensat): Document the bug.
64041         * lib/utimens.c (fdutimens, lutimens):
64042         * lib/utimensat.c (rpl_utimensat): Work around the bug.
64044         gettext: now it's your responsibility to add -I$(top_builddir)/intl
64045         Formerly, it was your responsibility to do this for all Makefile.ams
64046         other than Gnulib's.  Now it's your responsibility to do it for
64047         Gnulib's Makefile.am, too.
64048         * NEWS: Document this.
64049         * modules/gettext (AM_CPPFLAGS): Don't append -$(top_builddir)/intl.
64051         acl: include errno.h to get errno
64052         Reported by Daiki Ueno in
64053         <http://lists.gnu.org/r/bug-gnulib/2013-04/msg00073.html>.
64054         * lib/copy-acl.c, lib/set-acl.c: Include errno.h.
64056 2013-04-29  Paul Eggert  <eggert@cs.ucla.edu>
64058         tests: don't assume getdtablesize () <= 10000000
64059         * modules/cloexec-tests:
64060         * modules/dup2-tests:
64061         * modules/dup3-tests:
64062         * modules/nonblocking-tests:
64063         * modules/posix_spawn_file_actions_addclose-tests:
64064         * modules/posix_spawn_file_actions_adddup2-tests:
64065         * modules/posix_spawn_file_actions_addopen-tests:
64066         * modules/unistd-safer-tests:
64067         Depend on the getdtablesize module.
64068         * tests/test-cloexec.c:
64069         * tests/test-dup-safer.c:
64070         * tests/test-dup2.c:
64071         * tests/test-dup3.c:
64072         * tests/test-fcntl.c:
64073         * tests/test-nonblocking.c:
64074         * tests/test-posix_spawn_file_actions_addclose.c:
64075         * tests/test-posix_spawn_file_actions_adddup2.c:
64076         * tests/test-posix_spawn_file_actions_addopen.c:
64077         Don't assume getdtablesize () <= 10000000.
64079 2013-04-28  Paul Eggert  <eggert@cs.ucla.edu>
64081         extern-inline: work around bug in Sun c99
64082         * m4/extern-inline.m4 (_GL_INLINE, _GL_EXTERN_INLINE):
64083         Work around bug in Sun C 5.12 c99's implementation of 'inline'.
64085 2013-04-27  Paul Eggert  <eggert@cs.ucla.edu>
64087         qacl: new module, broken out from the acl module
64088         This is for GNU Emacs, which wants the acl functions but does
64089         not want 'error' invoked when they fail.
64090         * lib/acl-internal.h: Do not include error.h, quote.h.
64091         (ENOSYS, ENOTSUP): Remove; no longer needed.
64092         (ACL_NOT_WELL_SUPPORTED): Remove; replaced by acl_errno_valid.
64093         * lib/acl.h: Include <stdbool.h>.
64094         (acl_errno_valid): New function.
64095         * lib/copy-acl.c, lib/set-acl.c: Include errno,h, not acl-internal.h.
64096         * lib/copy-acl.c (qcopy_acl): Move to lib/qcopy-acl.c.
64097         * lib/set-acl.c: Rename from lib/set-mode-acl.c.
64098         (chmod_or_fchmod, qset_acl): Move to lib/qset-acl.c.
64099         (ACL_INTERNAL_INLINE): Remove; no longer needed.
64100         * lib/file-has-acl.c (file_has_acl):
64101         * lib/qcopy-acl.c (qcopy_acl):
64102         * lib/qset-acl.c (qset_acl):
64103         Use acl_errno_valid instead of ACL_NOT_WELL_SUPPORTED.
64104         * modules/acl (Files): Move lib/acl.h, lib/acl-internal.h,
64105         lib/acl_entries.c, lib/set-mode-acl.c (renamed to lib/set-acl.c),
64106         lib/file-has-acl.c, m4/acl.m4 to qacl module.
64107         Add lib/set-acl.c.
64108         (Depends-on): Move extern-inline, fstat, sys_stat to qacl module.
64109         Add qacl.
64110         (configure.ac): Move gl_FUNC_ACL to qacl module.
64111         (lib_SOURCES): Remove file-has-acl.c (moved to qacl module).
64112         Rename set-mode-acl.c to set-acl.c.
64113         * lib/acl-errno-valid.c: New file.
64114         * lib/qcopy-acl.c: New file, moved from the old lib/copy-acl.c; the
64115         copy_acl function remains in copy-acl.c.
64116         * lib/qcopy-acl.c, lib/qset-acl.c: Do not include gettext.h.
64117         (_): Remove; not needed.
64118         * lib/qset-acl.c: New file, moved from the old lib/set-mode-acl.c; the
64119         set_acl function remains in set-acl.c (renamed from set-mode-acl.c).
64120         * modules/qacl: New file, moved from the old modules/acl.
64121         (Files, lib_SOURCES): Add acl-errno-valid.c, qcopy-acl.c, qset-acl.c.
64122         Remove set-mode-acl.c, copy-acl.c.
64123         (Depends-on): Remove error, gettext-h, quote.  Add stdbool.
64125         alignof, intprops, malloca: port better to IBM's C compiler
64126         * lib/alignof.h (alignof_type) [__IBM_ALIGNOF__]: Use __alignof__.
64127         * lib/intprops.h (_GL_HAVE___TYPEOF__) [__IBM_TYPEOF__]: Now 1.
64128         * lib/malloca.h (sa_alignof): [__IBM_ALIGNOF__]: Use __alignof__.
64130 2013-04-25  Daiki Ueno  <ueno@gnu.org>
64132         wctype-h: fix gettext link error on mingw
64133         Reported by Josue Andrade Gomes and Takayuki Tsunakawa in
64134         <https://lists.gnu.org/r/bug-gettext/2013-03/msg00086.html>.
64135         * lib/wctype.in.h [__MINGW32__]: Include <ctype.h> before defining
64136         rpl_towupper and rpl_towupper.
64138 2013-04-11  Dmitry V. Levin  <ldv@altlinux.org>
64140         regex-tests, regex: allow glibc re_search behavior
64141         * tests/test-regex.c (main): In test for glibc bug 15078, reformat
64142         re_search input data to make the multi-character collating element
64143         in it clearly visible, and treat re_search return code 0 as valid.
64144         * m4/regex.m4 (gl_REGEX): Likewise.
64146 2013-03-30  Paul Eggert  <eggert@cs.ucla.edu>
64148         stdalign: doc fix
64149         * doc/posix-headers/stdalign.texi (stdalign.h):
64150         Gnulib doesn't support '_Alignof expr'.
64152 2013-03-29  Paul Eggert  <eggert@cs.ucla.edu>
64154         stdalign: port to stricter ISO C11
64155         ISO C11 says that _Alignof's operand must be a parenthesized type.
64156         Problem reported by Eli Zaretskii in
64157         <http://lists.gnu.org/r/emacs-devel/2013-03/msg00960.html>.
64158         * doc/posix-headers/stdalign.texi (stdalign.h): Document this.
64159         * m4/stdalign.m4 (gl_STDALIGN_H): Don't use _Alignof (expr).
64161 2013-03-21  Paul Eggert  <eggert@cs.ucla.edu>
64163         sys_select, sys_time: port 2013-01-30 Solaris 2.6 fix to Cygwin
64164         Problem reported by Marco Atzeri in
64165         <http://lists.gnu.org/r/bug-gnulib/2013-03/msg00000.html>.
64166         * lib/sys_select.in.h [HAVE_SYS_SELECT_H && _CYGWIN_SYS_TIME_H]:
64167         Simply delegate to the system <sys/select.h> in this case too.
64168         Also, pay attention to _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H only
64169         if OSF/1, since otherwise Cygwin breaks, and it doesn't seem to
64170         be needed on Solaris either.
64171         * lib/sys_time.in.h [_CYGWIN_SYS_TIME_H]:
64172         Simply delegate to the system <sys/time.h> in this case.
64174 2013-03-19  Karl Berry  <karl@gnu.org>
64176         * build-aux/gnupload: check for erroneous (with gnupload) use of
64177         ftp-upload.gnu.org, tweak help.
64179 2013-03-19  Paul Eggert  <eggert@cs.ucla.edu>
64181         copy-file, rpmatch: fix problems found by cppcheck
64182         Reported by Arno Onken in
64183         <http://lists.gnu.org/r/bug-gnulib/2013-03/msg00069.html>.
64184         * lib/rpmatch.c (try): Fix memory leak.
64185         * lib/copy-file.c: Include "ignore-value.h".
64186         (qcopy_file_preserving): Ignore chown value.
64187         * modules/copy-file (Depends-on): Add ignore-value.
64189 2013-01-27  Jim Meyering  <jim@meyering.net>
64191         prefix-gnulib-mk: give better diagnostics
64192         * build-aux/prefix-gnulib-mk: Don't just "die".
64193         Give better diagnostics upon failure.
64195 2013-03-13  Paul Eggert  <eggert@cs.ucla.edu>
64197         putenv: port to Solaris 10
64198         * lib/putenv.c (_unsetenv, putenv): Use HAVE_DECL__PUTENV, not
64199         HAVE__PUTENV.  Solaris 10 has a _putenv that's not declared and
64200         is not what is wanted here.
64201         * m4/putenv.m4 (gl_PREREQ_PUTENV): Check for _putenv's
64202         declaration, not for its existence.
64204 2013-03-12  Paul Eggert  <eggert@cs.ucla.edu>
64206         mktime: fix configure typo
64207         * m4/mktime.m4 (gl_FUNC_MKTIME): Fix typo in previous change.
64209 2013-03-12  Eric Blake  <eblake@redhat.com>
64211         regex-tests: skip UTF-8 test on mingw
64212         * modules/regex-tests (Depends-on): Add localcharset.
64213         * tests/test-regex.c (main): Use it to skip test on mingw.
64215 2013-03-11  Eric Blake  <eblake@redhat.com>
64217         tests: make it easier to bypass alarm time in debugger
64218         * tests/test-file-has-acl.c (main): Allow gdb to override alarm.
64219         * tests/test-memmem.c (main): Likewise.
64220         * tests/test-passfd.c (main): Likewise.
64221         * tests/test-ptsname.c (main): Likewise.
64222         * tests/test-ptsname_r.c (main): Likewise.
64223         * tests/test-strcasestr.c (main): Likewise.
64224         * tests/test-strstr.c (main): Likewise.
64226         regex: port to mingw's recent addition of undeclared alarm
64227         * doc/posix-functions/alarm.texi (alarm): Document that alarm
64228         exists but still doesn't work in newer mingw.
64229         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Check for alarm declaration,
64230         not existence.  Ensure SIGALRM is not trapped.
64231         * m4/mktime.m4 (gl_FUNC_MKTIME): Likewise.
64232         * m4/regex.m4 (gl_REGEX): Likewise.
64233         * m4/remainderf.m4 (gl_FUNC_REMAINDERF_WORKS): Likewise.
64234         * tests/test-regex.c (main): Use correct probe for alarm.
64236         putenv: avoid compilation warning on mingw
64237         * lib/putenv.c (_unsetenv): Protect variable declaration.
64238         (putenv): Fix indentation.
64240 2013-03-11  Gary V. Vaughan  <gary@gnu.org>
64242         unistd: don't prevent Tru64 Unix from using gnulib strtod.
64243         * lib/unistd.in.h: be careful not to include un-needed system
64244         stdlib.h from here, because that prevents gnulib stdlib.h from
64245         defining rpl_strtod correctly.
64247 2013-03-09  Gary V. Vaughan  <gary@gnu.org>
64249         vasprintf-posix-tests: allow rounding 1.51 to 1, per the previous
64250         changesets, but for the 'precision 0' test.
64251         * tests/test-vasprintf-posix.c (test_function): Don't insist on
64252         round-to-even, since POSIX says rounding is implementation-defined
64253         and OS X 10.8.2 rounds 1.51 to 1 here.
64255         vasprintf-posix-tests: allow rounding 1.5 to 1, per the previous
64256         changeset.
64257         * tests/test-vasprintf-posix.c (test_function): Don't insist on
64258         round-to-even, since POSIX says rounding is implementation-defined
64259         and OS X 10.8.2 rounds 1.5 to 1 here.
64261 2013-03-08  Paul Eggert  <eggert@cs.ucla.edu>
64263         vasnprintf-posix-tests: allow rounding 1.5 to 1
64264         * tests/test-vasnprintf-posix.c (test_function): Don't insist on
64265         round-to-even, since POSIX says rounding is implementation-defined
64266         and OS X 10.8.2 rounds 1.5 to 1 here.  Reported by Gary V. Vaughan in
64267         <http://lists.gnu.org/r/bug-gnulib/2013-03/msg00019.html>.
64269         bootstrap: port to FreeBSD
64270         * build-aux/bootstrap (bootstrap_sync): Port sh -c usage to shells
64271         that treat '--' differently.  Reported by Mats Erik Andersson in
64272         <http://lists.gnu.org/r/bug-gnulib/2013-03/msg00012.html>.
64274 2013-03-08  Gary V. Vaughan  <gary@gnu.org>
64276         regex: rename remaining __attribute calls to __attribute__.
64277         2012-02-25 changed definition of __attribute, but left some uses
64278         unchanged, preventing compilation of regex module on most non-gcc
64279         environments.
64280         * lib/regcomp.c (re_set_fastmap, seek_collating_symbol_entry)
64281         (lookup_collation_sequence_value, build_range_exp)
64282         (build_collating_symbol): Set attributes with newly renamed
64283         __attribute__ decorator.
64284         * lib/regex_internal.c (re_string_peek_byte_case)
64285         (re_node_set_compare, re_node_set_contains): Likewise.
64286         * lib/regexec.c (acquire_init_state_context): Likewise.
64288 2013-03-06  Bruno Haible  <bruno@clisp.org>
64290         execute: Revert last change, but use a different condition.
64291         * lib/execute.c (nonintr_close, nonintr_open): Reintroduce, but only
64292         on Windows.
64294 2013-03-05  Eric Blake  <eblake@redhat.com>
64296         execute: drop dead code
64297         * lib/execute.c (nonintr_close, nonintr_open): Delete.
64299 2013-03-04  Paul Eggert  <eggert@cs.ucla.edu>
64301         non-recursive-gnulib-prefix-hack: port coreutils 8.21 to HP NonStop
64302         * m4/non-recursive-gnulib-prefix-hack.m4
64303         (gl_NON_RECURSIVE_GNULIB_PREFIX_HACK): Don't mess with ALLOCA.
64304         Problem reported for HP NonStop + coreutils 8.21 by Joachim Schmitz in
64305         <http://bugs.gnu.org/10305#237>.
64307 2013-03-04  Eric Blake  <eblake@redhat.com>
64309         test-getsockopt: avoid compiler warning
64310         * tests/test-getsockopt.c (includes): Ensure close is declared.
64312 2013-03-02  Bruno Haible  <bruno@clisp.org>
64314         sys_types: Avoid autoconf warning about gl_SYS_TYPES_H.
64315         * m4/sys_types_h.m4 (gl_SYS_TYPES_H): Define through AC_DEFUN_ONCE.
64317 2013-03-02  Bruno Haible  <bruno@clisp.org>
64319         gettext: Update to version 0.18.2.
64320         * m4/intl.m4, m4/po.m4: Update from gettext-0.18.2. In particular:
64321         2012-12-07  Stefano Lattarini  <stefano.lattarini@gmailcom>
64322                 * intl.m4, po.m4: Bump requirement in AC_PREREQ to 2.60.
64324 2013-02-25  Paul Eggert  <eggert@cs.ucla.edu>
64326         regex: merge patches from libc
64328         2013-02-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
64329         * lib/regex_internal.h (__attribute__): Rename from __attribute.
64330         All uses changed.
64331         (bitset_not, bitset_merge, bitset_mask, re_string_char_size_at)
64332         (re_string_wchar_at, re_string_elem_size_at):
64333         Mark function as possibly unused.
64335         2013-02-12  Andreas Schwab  <schwab@suse.de>  [BZ #11561]
64336         * lib/regcomp.c (parse_bracket_exp) [_LIBC]: When looking up collating
64337         elements compare against the byte sequence of it, not its name.
64339 2013-02-21  Paul Eggert  <eggert@cs.ucla.edu>
64341         putenv: port better to native Windows
64342         * lib/putenv.c [(_WIN32 || __WIN32__) && ! __CYGWIN__]:
64343         Define WIN32_LEAN_AND_MEAN and include <windows.h>.
64344         (_unsetenv): Use _putenv if available.
64345         (putenv): Temporarily set NAME=' ' rather than NAME='x' as that's
64346         a bit less likely to cause damage.
64347         (putenv) [(_WIN32 || __WIN32__) && ! __CYGWIN__]:
64348         Fix the wrong value with SetEnvironmentVariable.
64349         (putenv) [!HAVE__PUTENV]: Simplify and match the HAVE__PUTENV
64350         code better.
64352 2013-02-20  Paul Eggert  <eggert@cs.ucla.edu>
64354         regex: ignore old-style-definition warnings
64355         * lib/regex.c: Add pragma to ignore these warnings.
64356         Problem reported for GNU tar by Pavel Raiskup.
64358 2013-02-19  Paul Eggert  <eggert@cs.ucla.edu>
64360         getcwd: support coreutils better
64361         Like strtod, getcwd incorrectly referred to HAVE_RAW_DECL_GETCWD,
64362         but this might not be correct in coreutils, which disables
64363         the raw decl checks.  Problem reported by Nagendra in
64364         <http://bugs.gnu.org/10305#192>.
64365         * lib/getcwd.c (__getcwd): Do not depend on HAVE_RAW_DECL_GETCWD.
64366         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
64367         Test the getcwd function, not any macro, since getcwd.c wants the
64368         function.
64369         * m4/getcwd.m4 (gl_FUNC_GETCWD):
64370         Don't define HAVE_MINIMALLY_WORKING_GETCWD if the code doesn't
64371         compile, as might happen if there's a macro but no function.
64373         strtod: support coreutils better
64374         * lib/strtod.c (underlying_strtod): Just invoke the underlying strtod.
64375         HAVE_RAW_DECL_STRTOD might not be correct in coreutils, which
64376         disables the raw decl checks.  This assumes there is an underlying
64377         strtod, but that's a safe assumption these days.
64378         (HAVE_RAW_DECL_STRTOD): Remove; no longer used.
64380         mountlist: port to HP NonStop
64381         Reported by Joachim Schmitz in
64382         <http://lists.gnu.org/r/bug-gnulib/2013-02/msg00084.html>.
64383         * lib/mountlist.c (hasmntopt) [!HAVE_HASMNTOPT]: New function.
64384         (MNT_IGNORE) [MNTOPT_IGNORE]: Use it.
64386 2013-02-18  Paul Eggert  <eggert@cs.ucla.edu>
64388         extern-inline: avoid compilation error with HP-UX cc
64389         Reported by Richard Lloyd in
64390         <http://lists.gnu.org/r/bug-texinfo/2013-02/msg00030.html>.
64391         * m4/extern-inline.m4 (_GL_INLINE, _GL_EXTERN_INLINE):
64392         Suppress extern inline with HP-UX cc.  This should be safe,
64393         though it may hurt performance.  Perhaps someone with some HP-UX
64394         experience can come up with a higher-performance fix.
64396 2013-02-14  Paul Eggert  <eggert@cs.ucla.edu>
64398         putenv: fix heap corruption with mixed putenv/_putenv
64399         Problem reported by Michael Goffioul in
64400         <http://lists.gnu.org/r/bug-gnulib/2013-02/msg00061.html>.
64401         * lib/putenv.c (putenv) [HAVE__PUTENV]:
64402         Rely on _putenv to allocate the new environment.
64403         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
64404         * modules/putenv (configure.ac): Use it.
64406 2013-02-11  Paul Eggert  <eggert@cs.ucla.edu>
64408         unsetenv etc.: port to Solaris 11 + GNU Emacs
64409         * lib/canonicalize-lgpl.c, lib/getaddrinfo.c, lib/getdelim.c:
64410         * lib/glob.c, lib/random_r.c, lib/setenv.c, lib/tsearch.c:
64411         * lib/unsetenv.c (_GL_ARG_NONNULL): Define before including <config.h>.
64412         GNU Emacs's <config.h> includes <stdlib.h> (which is not a great
64413         idea but is too painful to fix right now), and without this gnulib
64414         change <stdlib.h> was defining _GL_ARG_NONNULL incorrectly when
64415         compiling unsetenv.c on Solaris 11.  Fix the problem for
64416         unsetenv.c, and fix other similar occurrences.
64418 2013-02-09  Paul Eggert  <eggert@cs.ucla.edu>
64420         secure_getenv: fix C++ declaration typo
64421         * lib/stdlib.in.h (secure_getenv): Fix typo with return type
64422         in _GL_CXXALIAS_SYS macro.  Reported by John W. Eaton in
64423         <http://lists.gnu.org/r/bug-gnulib/2013-02/msg00057.html>.
64425 2013-02-08  Paul Eggert  <eggert@cs.ucla.edu>
64427         careadlinkat: stop exporting careadlinkatcwd
64428         Only Emacs used it directly, and Emacs no longer needs it.
64429         * NEWS: Document this simplification.
64430         * lib/areadlink.c (careadlinkatcwd): Move here from careadlinkat.c,
64431         and make it static.  Include <stdlib.h>, for abort, and unistd.h,
64432         for readlink.
64433         * lib/careadlinkat.c (careadlinkatcwd): Move to areadlink.c.
64434         Don't include stdlib.h; no longer needed.
64435         * lib/careadlinkat.h (careadlinkatcwd): Remove decl.
64436         * lib/relocwrapper.c: Adjust comment to match new dependencies.
64437         * modules/areadlink (Depends-on): Add readlink.
64438         (Maintainer): Add self.
64439         * modules/careadlinkat (Depends-on): Remove readlink.
64441         extensions: port better to HP-UX
64442         This is merged from git Autoconf.
64443         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS):
64444         On hosts that need _XOPEN_SOURCE, define it when configuring, too,
64445         so that it's compatible with the value used when compiling.
64447         openpty: fix bug where HAVE_OPENPTY is mistakenly 1
64448         Problem reported by Mats Erik Andersson in
64449         <http://lists.gnu.org/r/bug-gnulib/2013-02/msg00051.html>.
64450         * m4/pty.m4 (gl_FUNC_OPENPTY): Define HAVE_OPENPTY when the
64451         openpty function exists, not merely when we intend to replace it.
64452         This corrects the 2013-01-31 patch, which mistakenly defined
64453         HAVE_OPENPTY even on hosts that lacked it.
64455 2013-02-07  Paul Eggert  <eggert@cs.ucla.edu>
64457         secure_getenv: fix include typo
64458         * lib/secure_getenv.c: Include config.h.  Somehow I forgot!
64460         secure_getenv: port better to FreeBSD and Solaris
64461         * lib/secure_getenv.c [!HAVE___SECURE_GETENV]:
64462         Include unistd.h if HAVE_ISSETUGID, otherwise define a dummy issetugid.
64463         (secure_getenv) [!HAVE___SECURE_GETENV]: Use getenv if not issetugid.
64464         This works better on BSDish platforms.
64465         * m4/secure_getenv.m4 (gl_PREREQ_SECURE_GETENV):
64466         Test for issetugid if __secure_getenv is missing.
64468 2013-02-06  Paul Eggert  <eggert@cs.ucla.edu>
64470         extensions: port better to MINIX 3, HP-UX, autoheader 2.62
64471         Some of these changes are merged in from git Autoconf.
64472         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS):
64473         When deciding whether to define _XOPEN_SOURCE, inspect the
64474         preprocessor macro __hpux instead of the more-heavyweight
64475         operation of requiring AC_CANONICAL_HOST.  Define _NETBSD_HOST on
64476         MINIX, for MINIX 3.  Use USE_SYSTEM_EXTENSIONS, not __EXTENSIONS__,
64477         as the key for __EXTENSIONS__.
64479         unistd: avoid namespace pollution on non-glibc systems
64480         * lib/unistd.in.h: #define __need_getopt before including <getopt.h>.
64481         This avoids namespace pollution on non-glibc systems, by causing
64482         gnulib unistd.h to behave more like glibc unistd.h.  I also hope
64483         that this fixes a bug on FreeBSD, reported by Mats Erik Andersson in
64484         <http://lists.gnu.org/r/bug-gnulib/2013-02/msg00027.html>.
64486 2013-02-04  Paul Eggert  <eggert@cs.ucla.edu>
64488         tmpdir: use secure_getenv
64489         * lib/tmpdir.c (__secure_getenv) [!LIBC]:
64490         Define to secure_getenv, not getenv.
64491         * m4/tmpdir.m4 (gt_TMPDIR): Don't check for __secure_getenv,
64492         as that's now secure_getenv's job.
64493         * modules/tmpdir (Depends-on): Add secure_getenv.
64495         tempname: use secure_getenv
64496         * lib/tempname.c (__secure_getenv) [!_LIBC]:
64497         Define to secure_getenv, not getenv.
64498         * modules/tempname (Depends-on):
64499         Add secure_getenv.
64501         secure_getenv: new module
64502         * MODULES.html.sh (Extra functions based on ANSI C 89):
64503         Add secure_getenv.
64504         * doc/glibc-functions/secure_getenv.texi: New file.
64505         * doc/gnulib.texi: Include it.
64506         * lib/secure_getenv.c, m4/secure_getenv.m4, modules/secure_getenv:
64507         New files.
64508         * lib/stdlib.in.h (secure_getenv): New decl.
64509         * m4/stdlib_h.m4 (gl_STDLIB_H, gl_STDLIB_H_DEFAULTS):
64510         * modules/stdlib (stdlib.h):
64511         Add secure_getenv checks.
64513 2013-02-03  Paul Eggert  <eggert@cs.ucla.edu>
64515         getcwd: break fdopendir + save_cwd recursive loop (Bug#13516)
64516         Reported for OS X 10.8.2 by Assaf Gordon in
64517         <http://bugs.gnu.org/13516>.
64518         * lib/getcwd.c (HAVE_OPENAT_SUPPORT): Do not define if
64519         !HAVE_OPENAT && !HAVE_FDOPENDIR.
64520         * m4/getcwd-abort-bug.m4: Reformat to match test-getcwd.c
64521         so that they can be kept in sync more easily.  Avoid PATH_MAX
64522         test on the Hurd.  Sync from test-getcwd.c for errno tests after
64523         mkdir or chdir failure.
64524         * tests/test-getcwd.c (HAVE_OPENAT_SUPPORT): New macro, from
64525         lib/getcwd.c.
64526         (test_abort_bug): Do not test for the deep directory bug unless we
64527         have openat support.  Avoid PATH_MAX test on the Hurd.
64529         regex-tests, regex: fix bug: memset undeclared
64530         * tests/test-regex.c: Don't include regex.h twice.  Include
64531         string.h, to declare memset.  Christensen's report also mentioned
64532         this issue.
64533         * m4/regex.m4 (gl_REGEX): Keep test program more in sync with
64534         test-regex.c, to avoid future problems like this.  Remove
64535         AC_INCLUDES_DEFAULT.  Include <string.h>.  Don't include <regex.h>
64536         twice.
64538         regex-tests: fix link errors on older Solaris
64539         These need to link with @LIBINTL@ to get libintl_gettext.
64540         Problem reported by Tom G. Christensen in
64541         <http://lists.gnu.org/r/bug-gnulib/2013-02/msg00003.html>.
64542         * modules/regex-tests (test_regex_LDADD): New macro.
64544 2013-01-31  Paul Eggert  <eggert@cs.ucla.edu>
64546         regex-tests: new module
64547         * modules/regex-tests, tests/test-regex.c: New files.
64549         regex: fix off-by-one error in configure test
64550         * m4/regex.m4 (gl_REGEX): Test should return 21, not 20.
64552 2013-01-31  Eric Blake  <eblake@redhat.com>
64554         regex: avoid infinite configure test
64555         * m4/regex.m4 (gl_REGEX): Add an alarm escape hatch.
64557 2013-01-31  Reuben Thomas  <rrt@sc3d.org>
64559         openpty: fix bug where HAVE_OPENPTY wasn't defined
64560         See the thread starting at:
64561         http://lists.gnu.org/r/bug-gnulib/2013-01/msg00185.html
64562         * m4/pty.m4 (gl_FUNC_OPENPTY): Define HAVE_OPENPTY when the
64563         openpty function exists, not merely when we intend to replace it.
64565 2013-01-30  Paul Eggert  <eggert@cs.ucla.edu>
64567         sys_time: port to Solaris 2.6
64568         There is a circularity problem on Solaris 2.6, where <time.h> includes
64569         <sys/time.h> for struct timespec.  The include nesting is gnulib
64570         <time.h>, system <time.h>, gnulib <sys/time.h>, system
64571         <sys/time.h>, gnulib <sys/types.h>, system <sys/types.h>, gnulib
64572         <sys/select.h>, gnulib <signal.h>, system <sys/signal.h>, system
64573         <sys/siginfo.h>; the last, innermost file needs struct
64574         timestruc_t, which is defined in <sys/time.h>, which has not been
64575         fully parsed.  Problem reported by Tom G. Christensen in
64576         <http://lists.gnu.org/r/bug-gnulib/2013-01/msg00113.html>.
64577         * lib/sys_select.in.h: Treat Solaris 2.6's problem with
64578         <sys/time.h> and <sys/types.h> like OSF/1's similar problem.
64579         * lib/sys_time.in.h: Redo to resemble sys_select.in.h, which
64580         uses split double-inclusion guards.
64582 2013-01-29  Paul Eggert  <eggert@cs.ucla.edu>
64584         regex: test for buffer overrun
64585         * m4/regex.m4 (gl_REGEX): Add test case, by Andreas Schwab,
64586         for the just-fixed regex bug.
64588 2013-01-29  Andreas Schwab  <schwab@suse.de>
64590         regex: fix buffer overrun in regexp matcher [BZ #15078]
64591         * lib/regexec.c (extend_buffers): Add parameter min_len.
64592         (check_matching): Pass minimum needed length.
64593         (clean_state_log_if_needed): Likewise.
64594         (get_subexp): Likewise.
64596 2013-01-28  Pádraig Brady  <P@draigBrady.com>
64598         mountlist: don't consider "devtmpfs" as dummy
64599         * lib/mountlist.c (ME_DUMMY_0): Remove "devtmpfs"
64600         as there is storage associcated with it.
64602 2013-01-27  Paul Eggert  <eggert@cs.ucla.edu>
64604         futimens-tests, utimens-tests: Depend on gettext.
64605         This works around a problem introduced in my 2013-01-12 patch,
64606         which added @LIBINTL@ to these modules.
64607         * modules/futimens-tests (Depends-on):
64608         * modules/utimens-tests (Depends-on): Add gettext.
64610 2013-01-26  Eric Blake  <eblake@redhat.com>
64612         test-getpeername: fix typo
64613         * tests/test-getpeername.c: Fix typo introduced in fd cleanup.
64615 2013-01-20  Bernhard Voelker  <mail@bernhard-voelker.de>
64617         bootstrap: remove the need for a sorted .gitignore file
64618         * build-aux/bootstrap (insert_sorted_if_absent): Adjust and
64619         rename to insert_if_absent(), so that we don't need or generate
64620         a sorted .gitignore file.  We do require a .gitignore with no
64621         existing duplicate entries and enforce that.
64622         (sort_patterns): Remove this function as we now use the simpler
64623         technigue of inserting blacklist entries at the top of the file,
64624         assuming gnulib won't be inserting !whitelist entries.
64626 2013-01-23  Paul Eggert  <eggert@cs.ucla.edu>
64628         readlinkat: don't depend on gl_FUNC_OPENAT
64629         * m4/readlinkat.m4 (gl_FUNC_READLINKAT): Don't require gl_FUNC_OPENAT.
64630         Perhaps a similar change needs to be made for linkat.m4, mkfifoat.m4,
64631         renameat.m4, symlinkat.m4; but one thing at a time.
64633         statat: new module, split out from fstatat
64634         GNU Emacs needs the POSIX-specified fstatat, but not the
64635         gnulib-specified statat and lstat.  Split the latter two into a
64636         new module 'statat'.
64637         * lib/openat.h: Depend on GNULIB_STATAT, not GNULIB_FSTATAT.
64638         * lib/openat.h, lib/statat.c (STATAT_INLINE):
64639         Rename from FSTATAT_INLINE. All uses changed.
64640         * modules/fstatat (Files): Remove lib/statat.c.
64641         (gl_MODULE_INDICATOR([fstatat])): Remove.
64642         (lib_SOURCES): Remove.
64643         (Maintainer): Add self.
64644         * modules/statat, modules/statat-tests, tests/test-statat.c: New files.
64645         * tests/test-fstatat.c (BASE): Don't define if already defined.
64646         (do_stat, do_lstat) [!TEST_STATAT]: Test fstatat instead.
64648 2013-01-22  Paul Eggert  <eggert@cs.ucla.edu>
64650         tests: don't assume fd 99 is closed
64651         * tests/test-accept.c, tests/test-accept4.c, tests/test-bind.c:
64652         * tests/test-close.c, tests/test-connect.c, tests/test-dprintf.c:
64653         * tests/test-dup.c, tests/test-dup2.c, tests/test-faccessat.c:
64654         * tests/test-fchdir.c, tests/test-fchmod.c, tests/test-fchmodat.c:
64655         * tests/test-fchown.c, tests/test-fchownat.c, tests/test-fclose.c:
64656         * tests/test-fdatasync.c, tests/test-fdopen.c, tests/test-fdopendir.c:
64657         * tests/test-fflush.c, tests/test-fgetc.c, tests/test-fputc.c:
64658         * tests/test-fread.c, tests/test-freopen.c, tests/test-fseeko4.c:
64659         * tests/test-fstat.c, tests/test-fstatat.c, tests/test-fsync.c:
64660         * tests/test-ftello4.c, tests/test-ftruncate.c, tests/test-futimens.h:
64661         * tests/test-fwrite.c, tests/test-getpeername.c:
64662         * tests/test-getsockname.c, tests/test-getsockopt.c:
64663         * tests/test-grantpt.c, tests/test-ioctl.c, tests/test-isatty.c:
64664         * tests/test-linkat.c, tests/test-listen.c, tests/test-lseek.c:
64665         * tests/test-mkdirat.c, tests/test-mkfifoat.c, tests/test-openat.c:
64666         * tests/test-pread.c, tests/test-pwrite.c, tests/test-read.c:
64667         * tests/test-readlinkat.c, tests/test-recv.c, tests/test-recvfrom.c:
64668         * tests/test-renameat.c, tests/test-select.h, tests/test-send.c:
64669         * tests/test-sendto.c, tests/test-setsockopt.c, tests/test-shutdown.c:
64670         * tests/test-symlinkat.c, tests/test-ttyname_r.c:
64671         * tests/test-unlinkat.c, tests/test-unlockpt.c:
64672         * tests/test-utimensat.c, tests/test-vdprintf.c, tests/test-write.c:
64673         Close file descriptor 99, instead of assuming it's already closed.
64675 2013-01-21  Paul Eggert  <eggert@cs.ucla.edu>
64677         stpncpy: port to OS X 10.8
64678         * lib/stpncpy.c (__stpncpy): Parenthesize name when defining function.
64679         Problem reported by Assaf Gordon in <http://bugs.gnu.org/13495>.
64681 2013-01-16  Paul Eggert  <eggert@cs.ucla.edu>
64683         unistd: port to recent mingw
64684         * lib/unistd.in.h: Remove special invocation convention for mingw,
64685         which breaks for the latest mingw version.  See John W. Eaton in
64686         <http://lists.gnu.org/r/bug-gnulib/2013-01/msg00100.html>.
64688         largefile: port better to Mac OS X 10.5
64689         This patch is backported from Autoconf git.
64690         * m4/largefile.m4 (AC_SYS_LARGEFILE): Use AC_DEFINE, not
64691         AH_VERBATIM, to define _DARWIN_USE_64_BIT_INODE, to avoid problems
64692         with ino_t size being different for configuration time versus
64693         build/run time.  Problem reported by PHO in
64694         <http://lists.gnu.org/r/bug-autoconf/2013-01/msg00040.html>.
64696 2013-01-15  Paul Eggert  <eggert@cs.ucla.edu>
64698         doc: clarify -Werror
64699         * doc/warnings.texi (warnings): -Werror is not always a bad idea;
64700         clarify that it's intended for developers, not for ordinary builds,
64701         and mention --enable-gcc-warnings as one possible use.
64703 2013-01-15  Andoni Morales Alastruey  <ylatuya@gmail.com>  (tiny change)
64705         stdint: fix build with Android's Bionic fox x86
64706         * lib/stdint.in.h: fix check to test if included-fixed/sys/types.h
64707         was already included as _SSIZE_T_DEFINED_ might also be defined
64708         in include/machine/_types.h, which is included by stdio.h
64710 2013-01-13  Paul Eggert  <eggert@cs.ucla.edu>
64712         net_if-tests: port to Solaris 7 + GCC 3.4.6
64713         Problem reported by Tom G. Christensen in
64714         <http://lists.gnu.org/r/bug-gnulib/2013-01/msg00091.html>.
64715         * tests/test-net_if.c (ni): Move to next the code that uses it,
64716         so that it's declared only if needed.
64718 2013-01-12  Paul Eggert  <eggert@cs.ucla.edu>
64720         net_if-tests: port to older Solaris
64721         Problem reported by Tom G. Christensen in
64722         <http://lists.gnu.org/r/bug-gnulib/2013-01/msg00086.html>.
64723         * modules/net_if-tests (NET_IF_LIB): New substitution.
64724         (test_net_if_LDADD): New makefile macro, which uses NET_IF_LIB.
64725         (HAVE_IF_NAMEINDEX): New C macro.
64726         * tests/test-net_if.c: Bypass most of the test if !HAVE_IF_NAMEINDEX.
64728         system-quote-tests: port to older Solaris
64729         Problem reported by Tom G. Christensen in
64730         <http://lists.gnu.org/r/bug-gnulib/2013-01/msg00086.html>.
64731         * tests/test-system-quote-child.c (fopen, fread): Undef.
64733         c-xvasprintf etc.: fix link errors on older Solaris
64734         These need to link with @LIBINTL@ to get libintl_gettext.
64735         Problem reported by Tom G. Christensen in
64736         <http://lists.gnu.org/r/bug-gnulib/2013-01/msg00086.html>.
64737         * modules/c-xvasprintf-tests (test_c_xvasprintf_LDADD):
64738         * modules/readtokens-tests (test_readtokens_LDADD): New macros.
64739         * modules/futimens-tests (test_futimens_LDADD):
64740         * modules/utimens-tests (test_utimens_LDADD): Add @LIBINTL@.
64742 2013-01-10  Paul Eggert  <eggert@cs.ucla.edu>
64744         locale: port to Solaris 2.6 and 7 + GNU gettext
64745         * lib/locale.in.h: Just include_next <locale.h> when
64746         being invoked recursively.  This prevents problems on Solaris 2.6 and 7
64747         when combining the localename module with GNU gettext 0.18.2.
64748         Problem reported by Tom G. Christensen in
64749         <http://lists.gnu.org/r/bug-gnulib/2013-01/msg00084.html>.
64751 2013-01-09  Paul Eggert  <eggert@cs.ucla.edu>
64753         stdlib: port to Solaris 2.6
64754         Also, the code worked on Solaris 7 through 9 only by accident.
64755         Problem reported by Tom G. Christensen in
64756         <http://lists.gnu.org/r/bug-gnulib/2013-01/msg00059.html>.
64757         * lib/stdlib.in.h: If __need_system_stdlib_h is defined,
64758         simply include the system stdlib.h.
64759         * lib/getopt.in.h (__need_system_stdlib_h):
64760         * lib/pthread.in.h (__need_system_stdlib_h):
64761         * lib/unistd.in.h (__need_system_stdlib_h) [!__GLIBC__]:
64762         Define when including <stdlib.h>, to avoid problems at least for
64763         the pthread case on Solaris 2.6 and 7.  These .h files can get by
64764         with the system stdlib.h.
64766 2013-01-06  Paul Eggert  <eggert@cs.ucla.edu>
64768         doc: update main copyright year
64769         * doc/gnulib.texi: Update copyright date.
64771         doc: improve ISO 8601 discussion
64772         * doc/parse-datetime.texi (Combined date and time of day items):
64773         Specify more carefully what formats are supported and what is
64774         done with excess precision.
64776 2013-01-05  Paul Eggert  <eggert@cs.ucla.edu>
64778         doc: avoid small caps
64779         * doc/parse-datetime.texi, doc/regex.texi: Don't use small caps;
64780         they're more trouble than they're worth.  Suggested by Karl Berry
64781         in <http://bugs.gnu.org/13360>.
64783         regex: conform to strict C
64784         * lib/regcomp.c (parse_bracket_exp): Add cast to conform to strict C.
64785         From Aharon Robbins.
64787         gnulib-tool: fix incompatibility with autopoint 0.18.2
64788         * gnulib-tool: Don't indent AM_GNU_GETTEXT_VERSION line.
64789         Problem reported by Tom G. Christensen in
64790         <http://lists.gnu.org/r/bug-gnulib/2013-01/msg00053.html>.
64792 2013-01-04  Paul Eggert  <eggert@cs.ucla.edu>
64794         fprintftime: bring back and reword fwrite comment
64795         * lib/strftime.c (cpy) [FPRINTFTIME]: Re-add reworded comment.
64797         stdio: remove now-unnecessary stdio.c
64798         Since stdio.in.h no longer uses inline functions, we no longer
64799         need to compile the extern versions.
64800         * lib/stdio.c: Remove.
64801         * modules/stdio (Files): Remove lib/stdio.c.
64802         (lib_SOURCES): Remove.
64804         unicodeio: depend on stdio, not ignore-value
64805         * lib/unicodeio.c: Do not include ignore-value.h.
64806         (fwrite_success_callback): Use plain fwrite, not ignore_value + fwrite.
64807         * modules/unicodeio (Depends-on): Depend on stdio, not ignore-value.
64809         fprintftime: depend on stdio, not ignore-value
64810         * lib/strftime.c [FPRINTFTIME]: Do not include ignore-value.h.
64811         (cpy) [FPRINTFTIME]: Use plain fwrite, not ignore_value of fwrite,
64812         since the stdio module arranges to silence that warning now.
64813         * modules/fprintftime (Depends-on): Depend on stdio, not ignore-value.
64815 2012-10-04  Simon Josefsson  <simon@josefsson.org>
64817         stdint-tests: Fix expanded-before-required-warning.
64818         * modules/stdint-tests (Depends-on): Use AC_REQUIRE.
64820 2013-01-03  Paul Eggert  <eggert@cs.ucla.edu>
64822         fwrite: silence __wur only for older glibc versions
64823         * lib/stdio.in.h (fwrite): Limit workaround to glibc 2.4 through 2.15.
64824         This will help us remove this workaround some time in the far future.
64826 2013-01-03  Eric Blake  <eblake@redhat.com>
64828         fwrite: silence __wur without using inline
64829         * lib/stdio.in.h (fwrite): Limit warn_unused_result workaround to
64830         just gcc, and in a way that avoids inline issues.
64831         * modules/stdio (Depends-on): Drop extern-inline.
64833 2013-01-03  Jim Meyering  <jim@meyering.net>
64835         update-copyright: avoid copyright notice date corruption
64836         Given a sequence of copyright year numbers in which the final
64837         one was a two-digit number that happened to be a substring of
64838         a preceding four-digit year number, we would mistakenly update
64839         the substring (from two- to four-digit) rather than the two-digit
64840         number at the end, which, combined with the addition of the current
64841         4-digit year number would yield two 5-digit year numbers, e.g.,
64842         here, it would convert the first "99" to "1999, 2013" rather than
64843         the final one:
64844           1991, 99
64845           11999, 20131, 1999
64846         * build-aux/update-copyright: Tighten a regexp.
64847         * tests/test-update-copyright.sh: Add a test case to trigger the bug.
64848         Reported by Joseph Myers in
64849         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/32281
64851 2013-01-01  Paul Eggert  <eggert@cs.ucla.edu>
64853         regex: omit needless signed-pointer casts
64854         * lib/regcomp.c (build_charclass, build_charclass_op):
64855         Use char *, not unsigned char *, for class name and extra.
64856         The char values are always nonnegative so there's no need to
64857         insist on unsigned char * here, and using char * removes the need
64858         for casts.  Reported by Aharon Robbins in
64859         <http://sourceware.org/ml/libc-alpha/2012-12/msg00456.html>.
64861         regex: support Gawk, which never uses alloca
64862         * lib/regex_internal.h [!_LIBC && !HAVE_ALLOCA]:
64863         Do not include in this case.  Gawk doesn't supply a substitute
64864         alloca.h and doesn't need one.
64866         regex: port __libc_lock_define usage to C89
64867         * lib/regex_internal.h (__libc_lock_define) [!_LIBC]: Remove.
64868         (struct re_dfa_t): Use #ifdef instead.  '__libc_lock_define (, lock)'
64869         does not conform to C89, as it has an empty macro argument.
64870         Reported by Aharon Robbins in
64871         <http://sourceware.org/ml/libc-alpha/2012-12/msg00456.html>.
64873 2013-01-01  Eric Blake  <eblake@redhat.com>
64875         maint: update all copyright year number ranges
64876         Run "make update-copyright".
64878         version-etc: bump copyright year reported in --version
64879         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2013.
64881 2012-12-31  Eric Blake  <eblake@redhat.com>
64883         sigprocmask-tests: skip test if pid is unexpectedly large
64884         * tests/test-sigprocmask.c (main): Add range check.
64886         git-version-gen: avoid test -z portability glitch
64887         * build-aux/git-version-gen: Prefer portable test spelling, since
64888         git-version-gen is run on more than just developer machines.
64890 2012-12-31  Peter Rosin  <peda@lysator.liu.se>  (tiny change)
64892         git-version-gen: add --fallback option to use if git is not present
64893         * build-aux/git-version-gen: Add support for the new option --fallback,
64894         which comes into play when there is no $tarball_version_file and
64895         git is not working.
64896         (scriptversion): Update.
64898         maint.mk: handle missing git with more grace
64899         * top/maint.mk (no-submodule-changes, public-submodule-commit):
64900         Quietly proceed if git is not present.
64902 2012-12-31  Eric Blake  <eblake@redhat.com>
64904         dup2: work around cygwin bug
64905         * m4/dup2.m4 (gl_FUNC_DUP2): Flush out cygwin core dump.
64906         * lib/dup2.c (rpl_dup2): Work around it.
64907         * doc/posix-functions/dup2.texi (dup2): Document it.
64909 2012-12-30  Paul Eggert  <eggert@cs.ucla.edu>
64911         regex: remove unnecessary dependency on localcharset.h
64912         * lib/regex_internal.h [!_LIBC]: Don't include localcharset.h;
64913         hasn't been needed for years.
64914         * modules/regex (Depends-on): Remove localcharset.
64916         regex: revert single-byte change
64917         * lib/regexec.c (check_node_accept_bytes): Revert previous change
64918         to this function.  This was alredy fixed in a different way, at
64919         bdb56bacd57070eced9998569ffe3f3c37ef5964 in the glibc git; see
64920         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=510219> and
64921         <http://sourceware.org/bugzilla/show_bug.cgi?id=9697>.
64923         regex: simplify based on Gawk version
64924         * lib/regex_internal.c (re_dfa_add_node): Simplify.
64925         Reported by Aharon Robbins in
64926         <http://sourceware.org/ml/libc-alpha/2012-12/msg00456.html>.
64928 2012-12-29  Paul Eggert  <eggert@cs.ucla.edu>
64930         regex: check that pattern char is single-byte
64931         Reported by Aharon Robbins in
64932         <http://sourceware.org/ml/libc-alpha/2012-12/msg00456.html>.
64933         * lib/regexec.c (check_node_accept_bytes):
64934         Return 0 if the pattern string has a multibyte character here.
64936         regex: implement rational ranges
64937         Reported by Aharon Robbins in
64938         <http://sourceware.org/ml/libc-alpha/2012-12/msg00456.html>.
64939         * lib/regcomp.c (build_range_exp) [!_LIBC]:
64940         * lib/regexec.c (check_node_accept_bytes) [!_LIBC]:
64941         Implement rational ranges.
64943         regex: avoid redefining __wctype
64944         Reported by Aharon Robbins in
64945         <http://sourceware.org/ml/libc-alpha/2012-12/msg00456.html>.
64946         * lib/regex_internal.h (__wctype, __iswctype) [!_LIBC]:
64947         #undef before defining.
64949         regex: port to hosts where malloc (0) == NULL
64950         Reported by Aharon Robbins in
64951         <http://sourceware.org/ml/libc-alpha/2012-12/msg00456.html>.
64952         * lib/regex_internal.c (re_node_set_alloc):
64953         Don't assume that malloc (0) yields nonnull.
64954         * lib/regex_internal.h (MALLOC_0_IS_NONNULL): New macro.
64955         * m4/regex.m4 (gl_PREREQ_REGEX): Require gl_EEMALLOC.
64956         * modules/regex (Files): Add m4/eealloc.m4.
64958         regex: port to C89
64959         Reported by Aharon Robbins in
64960         <http://sourceware.org/ml/libc-alpha/2012-12/msg00456.html>.
64961         * lib/regcomp.c (init_word_char): Declaration before statement.
64963         regex: merge glibc changes
64964         Also, copy the license wording from glibc.  This simplifies
64965         merging changes.  gnulib-tool will change the wording to GPL as
64966         appropriate, when importing it to other packages.  The only
64967         glibc change made since the last merge, which needs merging, is:
64968         2012-05-24 Andreas Schwab <schwab@linux-m68k.org>
64969         * lib/regex_internal.h (gettext): Remove use of INTUSE.
64971         * users.txt: Add Emacs.
64973         doc: omit mention of version when not needed
64974         * doc/gnulib-intro.texi (Portability and Application Code):
64975         * doc/gnulib.texi (Brief Overview, Legacy Function Substitutes):
64976         Don't mention particular dates or versions when not necessary, so
64977         that the documentation won't go out of date so quickly.
64979         * doc/intprops.texi (Integer Properties): Fix Texinfo typo.
64981 2012-12-28  Akim Demaille  <akim@lrde.epita.fr>
64983         bootstrap: pass --force to autoreconf.
64984         * build-aux/bootstrap (AUTORECONFFLAGS): New.
64985         Add "--force" so that Automake's ylwrap and other such tools
64986         be updated at each bootstrap invocation.
64987         Use it.
64989 2012-12-27  Paul Eggert  <eggert@cs.ucla.edu>
64991         argp: fix port of port new 'inline' approach to Sun C 5.12 + Solaris 10
64992         The earlier patch forgot to update one of the #if conditions, causing
64993         a problem on Debian testing i386 reported by Mats Erik Andersson
64994         <http://lists.gnu.org/r/bug-gnulib/2012-12/msg00124.html>.
64995         * lib/argp-fmtstream.h (__argp_fmtstream_putc, argp_fmtstream_putc)
64996         (__argp_fmtstream_puts, argp_fmtstream_puts)
64997         (__argp_fmtstream_write, argp_fmtstream_write)
64998         [!_LIBC && !__OPTIMIZE__]: Declare as ARGP_FS_EI, not as extern.
65000         * doc/gnulib-readme.texi: Minor fixups.
65001         (Portability guidelines): Modernize URLs.  Remove some repetition.
65002         (Indent with spaces not TABs): Reword to avoid too-long lines.
65003         Remove some '@ifset standalone' stuff that isn't used.
65005         * doc/gnulib-readme.texi (Portability guidelines):
65006         ctype.h, not ctime.h.
65008         Correct name of POSIX.1-2001.
65009         * doc/posix-functions/fgetc.texi (fgetc):
65010         * doc/posix-functions/fgets.texi (fgets):
65011         * doc/posix-functions/fread.texi (fread):
65012         * doc/posix-functions/fscanf.texi (fscanf):
65013         * doc/posix-functions/getc.texi (getc):
65014         * doc/posix-functions/getchar.texi (getchar):
65015         * doc/posix-functions/scanf.texi (scanf):
65016         POSIX.1-2001, not POSIX-2001.
65018         doc: move README into manual
65019         * README: Move contents to new file doc/gnulib-readme.texi.
65020         Replace with a one-line summary.
65021         * doc/gnulib.texi (Brief Overview): New section,
65022         with old intro preface.  Include gnulib-readme.texi for contents.
65023         (Philosophy): Rename from "Introduction", since this
65024         section no longer introduces the rest.  Write a new preface.
65025         * doc/gnulib-readme.texi: New file, with the old contents of
65026         README texinfo-ized.  This way, the README info appears
65027         in the online and printed manual.
65029 2012-12-25  Ben Pfaff  <blp@cs.stanford.edu>
65031         c-xvasprintf: Fix "implicit declaration of function" GCC warning.
65032         * lib/c-xvasprintf.c: Add missing #include "c-vasprintf.h", for
65033         c_vasprintf() prototype.
65035 2012-12-24  Ben Pfaff  <blp@cs.stanford.edu>
65037         c-vasprintf: Fix "empty declaration" warning reported by GCC.
65038         * lib/c-vasprintf.h: Remove stray semicolon.
65040 2012-12-23  Paul Eggert  <eggert@cs.ucla.edu>
65042         gettext: avoid obsolete macro AM_PROG_MKDIR_P
65043         It is obsolete and is planned to be removed from Automake 1.14; see
65044         <http://lists.gnu.org/r/automake/2012-12/msg00029.html>.
65045         * build-aux/po/Makefile.in.in (install-data, install-data-yes)
65046         (installdirs-data, installdirs-data-yes):
65047         Use $(MKDIR_P), not $(mkdir_p).
65048         * m4/intl.m4 (AM_INTL_SUBDIR):
65049         * m4/po.m4 (AM_PO_SUBDIRS):
65050         Require AC_PROG_MKDIR_P, not AM_PROG_MKDIR_P.
65052 2012-12-22  Paul Eggert  <eggert@cs.ucla.edu>
65054         argp: port new 'inline' approach to Sun C 5.12 + Solaris 10
65055         On this platform, we are not optimizing but we are using
65056         the substitute for extern inlines, so compile as if
65057         C99-style extern inline, or a substitute, is available.
65058         * lib/argp-fmtstream.h (argp_fmtstream_set_lmargin)
65059         (__argp_fmtstream_set_lmargin, argp_fmtstream_set_rmargin)
65060         (__argp_fmtstream_set_rmargin, argp_fmtstream_set_wmargin)
65061         (__argp_fmtstream_set_wmargin, argp_fmtstream_point)
65062         (__argp_fmtstream_point) [!_LIBC && !__OPTIMIZE__]:
65063         Declare as ARGP_FS_EI, not as extern.
65064         * lib/argp.h (argp_usage, __argp_usage, _option_is_short)
65065         (__option_is_short, _option_is_end, __option_is_end)
65066         [!_LIBC && __USE_EXTERN_INLINES]:
65067         Declare as ARGP_EI, not as extern.
65069 2012-12-21  Paul Eggert  <eggert@cs.ucla.edu>
65071         AC_PROG_MKDIR_P: port workaround to pre-2.62 Autoconf
65072         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P, AC_C_RESTRICT):
65073         Use m4_ifndef([AC_AUTOCONF_VERSION], ...), not
65074         m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]),[2.62]),[-1],
65075         ...), as the latter is fatal with older Autoconfs.
65076         Problem reported and fix suggested by Eric Blake in thread starting at
65077         <http://lists.gnu.org/r/bug-gnulib/2012-12/msg00097.html>.
65079 2012-12-20  Paul Eggert  <eggert@cs.ucla.edu>
65081         AC_PROG_MKDIR_P: don't workaround if not buggy
65082         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P):
65083         Define only for Autoconf versions before 2.62.
65084         (AC_C_RESTRICT): Use documented AC_AUTOCONF_VERSION, not
65085         undocumented m4_PACKAGE_VERSION, for consistency with the
65086         abovementioned change to AC_PROG_MKDIR_P.  This should suffice
65087         since we're checking for 2.62 or later, and AC_AUTOCONF_VERSION
65088         was introduced in 2.62.
65090 2012-12-15  Ben Pfaff  <blp@cs.stanford.edu>
65092         New 'c-*printf' modules for formatted output in C locale.
65094         New module 'c-vasnprintf'.
65095         * modules/c-vasnprintf: New file.
65096         * lib/c-vasnprintf.c: New file.
65097         * lib/c-vasnprintf.h: New file.
65099         New module 'c-snprintf'.
65100         * modules/c-snprintf: New file.
65101         * modules/c-snprintf-tests: New file.
65102         * lib/c-snprintf.c: New file.
65103         * lib/c-snprintf.h: New file.
65104         * tests/test-c-snprintf.c: New file.
65105         * tests/test-c-snprintf.sh: New file.
65107         New module 'c-vsnprintf'.
65108         * modules/c-vsnprintf: New file.
65109         * modules/c-vsnprintf-tests: New file.
65110         * lib/c-vsnprintf.c: New file.
65111         * lib/c-vsnprintf.h: New file.
65112         * tests/test-c-vsnprintf.c: New file.
65113         * tests/test-c-vsnprintf.sh: New file.
65115         New module 'c-vasprintf'.
65116         * modules/c-vasprintf: New file.
65117         * modules/c-vasprintf-tests: New file.
65118         * lib/c-asprintf.c: New file.
65119         * lib/c-vasprintf.c: New file.
65120         * lib/c-vasprintf.h: New file.
65121         * tests/test-c-vasprintf.c  +: New file.
65122         * tests/test-c-vasprintf.sh: New file.
65124         New module 'c-xvasprintf'.
65125         * modules/c-xvasprintf: New file.
65126         * modules/c-xvasprintf-tests: New file.
65127         * lib/c-xasprintf.c: New file.
65128         * lib/c-xvasprintf.c: New file.
65129         * lib/c-xvasprintf.h: New file.
65130         * tests/test-c-xvasprintf.c: New file.
65131         * tests/test-c-xvasprintf.sh: New file.
65133 2012-12-18  Paul Eggert  <eggert@cs.ucla.edu>
65135         argp: better 'inline'
65136         Use extern-inline module to declare extern inline functions.
65137         This avoids some bogus warning diagnostics.  Problem discovered
65138         when modifying GNU tar to use the manywarnings module.
65139         * lib/argp.h, lib/argp-xinl.c (ARGP_EI) [!_LIBC]:
65140         * lib/argp-fmtstream.h, lib/argp-fs-xinl.c (ARGP_FS_EI) [!_LIBC]:
65141         Define based on extern-inline.
65142         * modules/argp (Depends-on): Add extern-inline.
65144 2012-12-17  Paul Eggert  <eggert@cs.ucla.edu>
65146         filemode, sys_stat: Handle MPX files a la AIX.
65147         * lib/filemode.c (ftypelet): Report 'm' for MPX files.
65148         * lib/sys_stat.in.h (S_ISMPX): New macro.
65149         * tests/test-sys_stat.c: Add tests for MPX files.
65151 2012-12-16  Alexandre Duret-Lutz  <adl@lrde.epita.fr>
65153         x-to-1: honor $PERL
65154         * build-aux/x-to-1.in: Run $HELP2MAN via $PERL so that the user gets
65155         a chance to use his preferred version of Perl.  This is typically
65156         required by Darwin users whose default /usr/bin/perl does not have all
65157         the libraries required by help2man, and who need to use their MacPorts
65158         installation of Perl instead.
65160 2012-12-16  Akim Demaille  <akim@lrde.epita.fr>
65162         gnu-web-doc-update: add all the new files, even in new directories
65163         See http://lists.gnu.org/r/bug-gnulib/2012-12/msg00057.html
65164         * build-aux/gnu-web-doc-update (--dry-run, $dryrun): New.
65165         Use it.
65166         (main): Don't use cvsutils to get the list of unknown files,
65167         just add all the existing files and directories.
65169 2012-12-16  Akim Demaille  <akim@lrde.epita.fr>
65171         gnu-web-doc-update: improve --help
65172         * build-aux/gnu-web-doc-update: Move comments into --help.
65174 2012-12-07  Eric Wong  <normalperson@yhbt.net>
65176         mountlist: recognize more "dummy" file systems
65177         * lib/mountlist.c (ME_DUMMY_0):
65178         Add these dummy FS names to the list:
65179         - "debugfs" virtual filesystem for kernel debugging
65180         - "devpts" PTY slave filesystem
65181         - "devtmpfs" device filesystem on top of tmpfs/ramfs
65182         - "fusectl" control filesystem for FUSE
65183         - "mqueue" enumerates POSIX message queues
65184         - "rpc_pipefs" kernel <-> userspace bridge for NFS
65185         - "sysfs" is for exporting kernel objects
65186         - "devfs" device filesystem for Linux 2.4 and FreeBSD
65188 2012-12-11  Paul Eggert  <eggert@cs.ucla.edu>
65190         extern-inline: avoid incompatibility with Darwin Libc
65191         * m4/extern-inline.m4 (_GL_INLINE, _GL_EXTERN_INLINE): Do not use
65192         extern inline if __APPLE__.  Use _GL_UNUSED in the non-inline branch.
65193         Problem reported by Akim Demaille in
65194         <http://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html>.
65196 2012-12-11  Simon Josefsson  <simon@josefsson.org>
65198         gnupload: Work with GnuPG using gpg-agent (for smartcards).
65199         * build-aux/gnupload: If GnuPG is configured to use gpg-agent,
65200         let it handle password prompting.
65202 2012-12-10  Eli Zaretskii  <eliz@gnu.org>
65204         canonicalize, canonicalize-lgpl: Microsoft Windows prefix fixes
65205         * lib/canonicalize.c (canonicalize_filename_mode):
65206         * lib/canonicalize-lgpl.c (__realpath): Recompute prefix_len after
65207         fetching the current directory.  Don't overrun the beginning of
65208         rpath if there's no slashes after the MS-Windows drive letter.
65210 2012-12-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
65212         maint.mk: avoid extra forks
65213         * top/maint.mk (_cfg_mk): The GNU make manual documents that
65214         "$(wildcard FILE)" expands to empty if FILE doesn't exist.
65215         So use that instead of "$(shell test -f FILE && echo FILE)".
65217 2012-12-07  Paul Eggert  <eggert@cs.ucla.edu>
65219         vasnprintf: fix ASCII_ONLY typo
65220         * lib/unistdio/u8-vasnprintf.c (FCHAR_T_ONLY_ASCII):
65221         * lib/unistdio/u16-vasnprintf.c (FCHAR_T_ONLY_ASCII):
65222         * lib/unistdio/u32-vasnprintf.c (FCHAR_T_ONLY_ASCII):
65223         New macro, replacing ASCII_ONLY.  This fixes a typo.  See thread at
65224         <http://lists.gnu.org/r/bug-gnulib/2012-12/msg00021.html>.
65226 2012-12-05  Paul Eggert  <eggert@cs.ucla.edu>
65228         list, oset, xlist, xoset: fix extern inline issue with C99
65229         This was introduced by my recent changes for 'inline'.
65230         Problem reported for gettext by Daiki Ueno in
65231         <http://lists.gnu.org/r/bug-gnulib/2012-12/msg00000.html>.
65232         * lib/gl_list.h (gl_list_nx_create_empty, gl_list_create)
65233         (gl_list_nx_create, gl_list_size, gl_list_node_value)
65234         (gl_list_node_set_value, gl_list_node_nx_set_value, gl_list_next_node)
65235         (gl_list_previous_node, gl_list_get_at)
65236         (gl_list_nx_set_at, gl_list_search, gl_list_search_from)
65237         (gl_list_search_from_to, gl_list_indexof, gl_list_indexof_from)
65238         (gl_list_indexof_from_to, gl_list_nx_add_first, gl_list_nx_add_last)
65239         (gl_list_nx_add_before, gl_list_nx_add_after, gl_list_nx_add_at)
65240         (gl_list_remove_node, gl_list_remove_at, gl_list_remove, gl_list_free)
65241         (gl_list_iterator, gl_list_iterator_from_to, gl_list_iterator_next)
65242         (gl_list_iterator_free, gl_sortedlist_search)
65243         (gl_sortedlist_search_from_to, gl_sortedlist_indexof)
65244         (gl_sortedlist_indexof_from_to, gl_sortedlist_add, gl_sortedlist_nx_add)
65245         (gl_sortedlist_remove):
65246         * lib/gl_oset.h (go_oset_nx_create_empty, gl_oset_size, gl_oset_search)
65247         (gl_oset_search_atleast, gl_oset_nx_add, gl_oset_remove, gl_oset_free)
65248         (gl_oset_iterator, gl_oset_iterator_next, gl_oset_iterator_free):
65249         * lib/gl_xlist.h (gl_list_create_empty, gl_list_create)
65250         (gl_list_node_set_value, gl_list_set_at, gl_list_add_first)
65251         (gl_list_add_last, gl_list_add_before, gl_list_add_after)
65252         (gl_list_add_at, gl_sortedlist_add):
65253         * lib/gl_xoset.h (gl_oset_create_empty, gl_oset_add):
65254         Wrap these extern decls inside "#if 0", because they are implemented
65255         as inline functions, and extern inline is not what's wanted here.
65256         It would simplify these .h files to remove the extern decls entirely,
65257         although a downside would be less-clear separation between
65258         specification and implementation.
65260 2012-11-29  Paul Eggert  <eggert@cs.ucla.edu>
65262         sys_stat: no 'static inline'
65263         * lib/sys_stat.in.h (rpl_mkdir): Now static, not static inline.
65264         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Do not require AC_C_INLINE.
65266         extern-inline: no 'static inline'
65267         * m4/extern-inline.m4 (gl_EXTERN_INLINE):
65268         Do not require AC_C_INLINE.
65269         (_GL_INLINE, _GL_EXTERN_INLINE): Define as 'static', not as
65270         'static inline', for older compilers.
65272         snippet/warn-on-use: no 'static inline'
65273         * build-aux/snippet/warn-on-use.h:
65274         Remove unnecessary 'inline' in comment.
65276         rbtree-list, rbtreehash-list: no 'static inline'
65277         * lib/gl_anyrbtree_list2.h (rotate_left, rotate_right):
65278         * lib/gl_anytree_list2.h (node_at):
65279         * lib/gl_anytreehash_list1.h (hash_resize_after_add)
65280         (gl_oset_first, add_nodes_to_buckets):
65281         Now static, not static inline.
65283         regex: no 'static inline'
65284         * lib/regex_internal.c (calc_state_hash):
65285         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain)
65286         (bitset_empty, bitset_set_all, bitset_copy, bitset_not, bitset_merge)
65287         (bitset_mask, re_string_char_size_at, re_string_wchar_at):
65288         Now static, not static inline.
65289         (inline) [__GNUC__ < 3 && _LIBC]:
65290         Remove macro; no longer needed.
65292         xvasprintf: no 'static inline'
65293         * lib/xvasprintf.c (xstrcat):
65294         Now static, not static inline.
65295         * m4/xvasprintf.m4 (gl_XVASPRINTF):
65296         Do not require AC_C_INLINE.
65298         parse-datetime, parse-duration: no 'static inline'
65299         * lib/parse-datetime.y (to_uchar):
65300         * lib/parse-duration.c (str_const_to_ul, str_const_to_l)
65301         (scale_n_add):
65302         Now static, not static inline.
65303         * m4/parse-datetime.m4 (gl_PARSE_DATETIME):
65304         * modules/parse-duration (configure.ac):
65305         Do not require AC_C_INLINE.
65307         getaddrinfo: no 'static inline'
65308         * lib/getaddrinfo.c (validate_family):
65309         Now static, not static inline.
65310         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO):
65311         Do not require AC_C_INLINE.
65313         ftruncate, fts, lstat, openat, raise: no 'static inline'
65314         * lib/ftruncate.c (chsize_nothrow):
65315         * lib/fts.c (opendirat, diropen):
65316         * lib/lstat.c (orig_lstat):
65317         * lib/openat.c (orig_openat):
65318         * lib/raise.c (raise_nothrow):
65319         Now static, not static inline.
65320         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE):
65321         * m4/fts.m4 (gl_FUNC_FTS_CORE):
65322         * m4/lstat.m4 (gl_PREREQ_LSTAT):
65323         * m4/openat.m4 (gl_PREREQ_OPENAT):
65324         * m4/raise.m4 (gl_PREREQ_RAISE):
65325         Do not require AC_C_INLINE.
65327         fflush, stat: no 'static inline'
65328         * lib/fflush.c (clear_ungetc_buffer_preserving_position)
65329         (clear_ungetc_buffer, disable_seek_optimization)
65330         (restore_seek_optimization, update_fpos_cache):
65331         * lib/stat.c (orig_stat):
65332         Now static, not static inline.
65333         * lib/fflush.c (disable_seek_optimization, restore_seek_optimization)
65334         (update_fpos_cache):
65335         Define only if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1).
65336         * m4/fflush.m4 (gl_PREREQ_FFLUSH):
65337         * m4/stat.m4 (gl_PREREQ_STAT):
65338         Do not require AC_C_INLINE.
65340         error, filevercmp: no 'static inline'
65341         * lib/error.c (is_open, flush_stdout):
65342         * lib/filevercmp.c (order):
65343         Now static, not static inline.
65344         * m4/error.m4 (gl_PREREQ_ERROR):
65345         * modules/filevercmp (configure.ac):
65346         Do not require AC_C_INLINE.
65348         dup, execute, fatal-signal, etc.: no 'static inline'
65349         * lib/dup.c (dup_nothrow):
65350         * lib/execute.c (nonintr_close, nonintr_open):
65351         * lib/fatal-signal.c (uninstall_handlers, install_handlers):
65352         * lib/fopen.c (orig_fopen):
65353         * lib/freadseek.c (freadptrinc):
65354         * lib/freopen.c (orig_freopen):
65355         * lib/fstat.c (orig_fstat, fstat_nothrow):
65356         * lib/get-rusage-as.c (get_rusage_as_via_setrlimit)
65357         (get_rusage_as_via_iterator):
65358         * lib/get-rusage-data.c (get_rusage_data_via_setrlimit):
65359         * lib/getdtablesize.c (_setmaxstdio_nothrow):
65360         * lib/isatty.c (_isatty_nothrow):
65361         * lib/open.c (orig_open):
65362         * lib/read.c (read_nothrow):
65363         * lib/sigprocmask.c (signal_nothrow):
65364         * lib/spawn-pipe.c (nonintr_close, nonintr_open):
65365         * lib/vasnprintf.c (MAX_ROOM_NEEDED):
65366         * lib/wait-process.c (unregister_slave_subprocess):
65367         * lib/write.c (write_nothrow):
65368         Now static, not static inline.
65369         * lib/spawn-pipe.c (nonintr_open): Define only if
65370         (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__.
65371         * m4/dup.m4 (gl_PREREQ_DUP):
65372         * m4/execute.m4 (gl_EXECUTE):
65373         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL):
65374         * m4/fopen.m4 (gl_PREREQ_FOPEN):
65375         * m4/freadseek.m4 (gl_FUNC_FREADSEEK):
65376         * m4/freopen.m4 (gl_PREREQ_FREOPEN):
65377         * m4/fstat.m4 (gl_PREREQ_FSTAT):
65378         * m4/getdtablesize.m4 (gl_PREREQ_GETDTABLESIZE):
65379         * m4/isatty.m4 (gl_PREREQ_ISATTY):
65380         * m4/open.m4 (gl_PREREQ_OPEN):
65381         * m4/read.m4 (gl_PREREQ_READ):
65382         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK):
65383         * m4/spawn-pipe.m4 (gl_SPAWN_PIPE):
65384         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF):
65385         * m4/wait-process.m4 (gl_WAIT_PROCESS):
65386         * m4/write.m4 (gl_PREREQ_WRITE):
65387         * modules/get-rusage-as, modules/get-rusage-data (configure.ac):
65388         Do not require AC_C_INLINE.
65390         c-strtod, memcoll, readutmp: no 'static inline'
65391         * lib/c-strtod.c (c_locale):
65392         * lib/memcoll.c (strcoll_loop):
65393         * lib/readutmp.c (desirable_utmp_entry):
65394         Now static, not static inline.
65395         * m4/c-strtod.m4 (gl_C_STRTOD, gl_C_STRTOLD):
65396         * m4/memcoll.m4 (gl_MEMCOLL):
65397         * m4/readutmp.m4 (gl_READUTMP):
65398         Do not require AC_C_INLINE.
65400         arctwo, md4, md5, sha1, sha256, sha512: no 'static inline'
65401         * lib/arctwo.c (to_uchar):
65402         * lib/md4.c (set_uint32):
65403         * lib/md5.c (set_uint32):
65404         * lib/sha1.c (set_uint32):
65405         * lib/sha256.c (set_uint32):
65406         * lib/sha512.c (set_uint64):
65407         Now static, not static inline.  This is a bit simpler, and doesn't
65408         affect performance with GCC and default optimization.
65409         * m4/arctwo.m4 (gl_ARCTWO):
65410         * m4/md4.m4 (gl_MD4):
65411         * m4/md5.m4 (gl_MD5):
65412         * m4/sha1.m4 (gl_SHA1):
65413         * m4/sha256.m4 (gl_SHA256):
65414         * m4/sha512.m4 (gl_SHA512):
65415         Do not require AC_C_INLINE.
65417         cond, lock, thread: better 'inline'
65418         * lib/glthread/cond.c, lib/glthread/cond.h (_GLTHREAD_COND_INLINE):
65419         * lib/glthread/thread.c, lib/glthread/thread.h (_GLTHREAD_THREAD_INLINE):
65420         New macros.  Use them instead of static inline, for header functions.
65421         * lib/glthread/cond.c (gl_waitqueue_init, gl_waitqueue_remove)
65422         (gl_waitqueue_notify_first, gl_waitqueue_notify_all):
65423         * lib/glthread/lock.c (gl_waitqueue_init)
65424         (gl_waitqueue_notify_first, gl_waitqueue_notify_all):
65425         * lib/glthread/thread.c (get_current_thread_handle):
65426         Change 'static inline' to 'inline'.
65427         * lib/glthread/cond.h, lib/glthread/thread.h:
65428         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
65429         * m4/cond.m4 (gl_COND):
65430         * m4/lock.m4 (gl_PREREQ_LOCK):
65431         * m4/thread.m4 (gl_THREAD):
65432         Do not require AC_C_INLINE.
65433         * modules/cond, modules/thread (Depends-on): Add extern-inline.
65435         chdir-long, cycle-check, savewd: better 'inline'
65436         * lib/chdir-long.c (cdb_init, cdb_fchdir, cdb_free)
65437         (find_non_slash):
65438         * lib/cycle-check.c (is_zero_or_power_of_two):
65439         * lib/savewd.c (savewd_delegating):
65440         Change 'static inline' to 'inline'.
65441         * lib/savewd.c, lib/savewd.h (SAVEWD_INLINE): New macro.
65442         Replace all remaining uses of 'static inline' with it.
65443         * lib/savewd.h:
65444         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
65445         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG):
65446         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
65447         * m4/savewd.m4 (gl_SAVEWD):
65448         Do not require AC_C_INLINE.
65449         * modules/savewd (Depends-on): Add extern-inline.
65451         base32, base64: no need for 'inline'
65452         * lib/base32.c (to_uchar, get_8, decode_8):
65453         * lib/base64.c (to_uchar, get_4, decode_4):
65454         Change 'static inline' to 'inline'.
65455         * m4/base32.m4 (gl_PREREQ_BASE32):
65456         * m4/base64.m4 (gl_PREREQ_BASE64):
65457         Do not require AC_C_INLINE.
65459         array-oset, linkedhash-list, rbtree-oset: no need for 'inline'
65460         * lib/gl_array_oset.c (gl_array_nx_add_at):
65461         (gl_array_remove_at):
65462         * lib/gl_linkedhash_list.c (hash_resize_after_add)
65463         (add_to_bucket, remove_from_bucket):
65464         * lib/gl_rbtree_oset.c (rotate_left, rotate_right):
65465         Change 'static inline' to 'static', as it's simpler to omit
65466         'inline' unless there's a significant performance advantage.
65468         list, oset, xlist, xoset, xsublist: simplify via extern inline
65469         * lib/gl_list.h, lib/gl_list.c (GL_LIST_INLINE):
65470         * lib/gl_oset.c, lib/gl_oset.h (GL_OSET_INLINE):
65471         * lib/gl_xlist.c, lib/gl_xlist.h (GL_XLIST_INLINE):
65472         * lib/gl_xoset.c, lib/gl_xoset.h (GL_XOSET_INLINE):
65473         * lib/gl_xsublist.c, lib/gl_xsublist.h (GL_XSUBLIST_INLINE):
65474         New macro.  Replace all uses of 'static inline' with it.
65475         [HAVE_INLINE]: Implement functions as *_INLINE functions,
65476         instead of as macros FOO that are defined to static inline
65477         functions FOO_inline.
65478         * lib/gl_list.c, lib/gl_oset.c, lib/gl_xlist.c, lib/gl_xoset.c:
65479         * lib/gl_xsublist.c:
65480         Reimplement from scratch, by defining the corresponding *_INLINE
65481         macro and including the corresponding .h file.  This is simpler.
65482         * modules/list, modules/oset, modules/xlist, modules/xoset:
65483         (Files): Remove m4/gl_list.m4.
65484         (configure.ac): Remove gl_LIST.
65485         * m4/gl_list.m4: Remove.
65486         * modules/list, modules/oset, modules/xlist, modules/xoset:
65487         * modules/xsublist:
65488         (Depends-on): Depend on extern-inline, not inline.
65490         xalloc: better 'inline'
65491         * lib/xmalloc.c, lib/xalloc.h (XALLOC_INLINE):
65492         New macro.  Replace all uses of 'static inline' with it.
65493         (static_inline): Remove.
65494         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
65495         Let 'extern inline' do the work automatically, instead of doing
65496         it by hand.
65497         * m4/xalloc.m4 (gl_PREREQ_XALLOC, gl_PREREQ_XMALLOC):
65498         Remove.  All uses removed.
65499         * modules/xalloc (Depends-on): Remove 'inline'.  Add 'extern-inline'.
65501         gethrxtime: better 'inline'
65502         * lib/xtime.c: New file.
65503         * lib/gethrxtime.c, lib/gethrxtime.h (GETHRXTIME_INLINE):
65504         * lib/xtime.h (XTIME_INCLUDE):
65505         New macros.  Replace all uses of 'static inline' with them.
65506         * lib/gethrxtime.c (gethrxtime): Define only if
65507         ! (HAVE_ARITHMETIC_HRTIME_T && HAVE_DECL_GETHRTIME), since
65508         this source file is now always compiled, because of the extern inline.
65509         * lib/gethrxtime.h, lib/xtime.h:
65510         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
65511         * m4/gethrxtime.m4 (gl_GETHRXTIME): Do not check for clock macros
65512         if gethrtime works, as they're not needed in that case.
65513         (gl_XTIME): Do not require AC_C_INLINE.
65514         (gl_PREREQ_GETHRXTIME): Remove; all uses removed, as it's always
65515         compiled now.  Move the check into gl_GETHRXTIME.
65516         * modules/gethrxtime (Files, lib_SOURCES): Add lib/xtime.c.
65517         (Depends-on): Add extern-inline.
65518         (configure.ac): gethrxtime is always compiled now.
65519         (lib_SOURCES): Add gethrxtime.c.
65521         wctype-h: better 'inline'
65522         * lib/wctype-h.c: New file.
65523         * lib/wctype.in.h (_GL_WCTYPE_INLINE):
65524         New macro.  Replace all uses of 'static inline' with it.
65525         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
65526         * m4/wctype_h.m4 (gl_WCTYPE_H): Do not require AC_C_INLINE.
65527         * modules/wctype-h (Files, lib_SOURCES): Add lib/wctype-h.c.
65528         (Depends-on): Add extern-inline.
65530         unistd: better 'inline'
65531         * lib/unistd.c: New file.
65532         * lib/unistd.in.h (_GL_UNISTD_INLINE):
65533         New macro.  Replace all uses of 'static inline' with it.
65534         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
65535         * m4/unistd_h.m4 (gl_UNISTD_H): Do not require AC_C_INLINE.
65536         * modules/unistd (Files, lib_SOURCES): Add lib/unistd.c.
65537         (Depends-on): Add extern-inline.
65539         sys_socket: better 'inline'
65540         * lib/sys_socket.c: New file.
65541         * lib/sys_socket.in.h (_GL_SYS_SOCKET_INLINE):
65542         New macro.  Replace all uses of 'static inline' with it.
65543         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
65544         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Do not require AC_C_INLINE.
65545         * modules/sys_socket (Files, lib_SOURCES): Add lib/sys_socket.c.
65546         (Depends-on): Add extern-inline.
65548         stdio: better 'inline'
65549         * lib/stdio.c: New file.
65550         * lib/stdio.in.h (_GL_STDIO_INLINE):
65551         New macro.  Replace all uses of 'static inline' with it.
65552         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
65553         * m4/stdio_h.m4 (gl_STDIO_H): Do not require AC_C_INLINE.
65554         * modules/stdio (Files, lib_SOURCES): Add lib/stdio.c.
65555         (Depends-on): Add extern-inline.
65557         sigaction: better 'inline'
65558         * lib/sig-handler.c: New file.
65559         * lib/sig-handler.h (SIG_HANDLER_INLINE):
65560         New macro.  Replace all uses of 'static inline' with it.
65561         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
65562         * m4/sigaction.m4 (gl_PREREQ_SIG_HANDLER_H): Do not require AC_C_INLINE.
65563         * modules/sigaction (Files, lib_SOURCES): Add lib/sig-handler.c.
65564         (Depends-on): Add extern-inline.
65566         selinux-h: better 'inline'
65567         * lib/se-context.c, lib/se-selinux.c: New files.
65568         * lib/getfilecon.c (map_to_failure): Omit 'inline' for static function.
65569         * lib/se-context.in.h (SE_CONTEXT_INLINE):
65570         New macro.  Replace all uses of 'static inline' with it.
65571         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
65572         * lib/se-selinux.in.h (SE_SELINUX_INLINE):
65573         New macro.  Replace all uses of 'static inline' with it.
65574         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
65575         * modules/selinux-h (Files, lib_SOURCES):
65576         Add lib/se-context.c, lib/se-selinux.c.
65577         (Depends-on): Add extern-inline.
65578         (configure.ac): Do not require AC_C_INLINE.
65580         pthread: better 'inline'
65581         * lib/pthread.c: New file.
65582         * lib/pthread.in.h (_GL_PTHREAD_INLINE):
65583         New macro.  Replace all uses of 'static inline' with it.
65584         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
65585         * m4/pthread.m4 (gl_PTHREAD_CHECK):
65586         Add AC_LIBOBJ([pthread]).  Do not require AC_C_INLINE.
65587         * modules/pthread (Files): Add lib/pthread.c.
65588         (Depends-on): Add extern-inline.
65590         math: better 'inline'
65591         * lib/math.c: New file.
65592         * lib/math.in.h (_GL_MATH_INLINE):
65593         New macro.  Replace all uses of 'static inline' with it.
65594         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
65595         * m4/math_h.m4 (gl_MATH_H):
65596         Do not require AC_C_INLINE.
65597         * modules/math (Files, lib_SOURCES):
65598         Add lib/math.c.
65599         (Depends-on): Add extern-inline.
65601         count-one-bits: better 'inline'
65602         * lib/count-one-bits.c: New file.
65603         * lib/count-one-bits.h (COUNT_ONE_BITS_INLINE):
65604         New macro.  Replace all uses of 'static inline' with it.
65605         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
65606         * m4/count-one-bits.m4 (gl_COUNT_ONE_BITS):
65607         Do not require AC_C_INLINE.
65608         * modules/count-one-bits (Files, lib_SOURCES):
65609         Add lib/count-one-bits.c.
65610         (Depends-on): Add extern-inline.
65612         count-leading-zeros: better 'inline'
65613         * lib/count-leading-zeros.c: New file.
65614         * lib/count-leading-zeros.h (COUNT_LEADING_ZEROS_INLINE):
65615         New macro.  Replace all uses of 'static inline' with it.
65616         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
65617         * m4/count-leading-zeros.m4 (gl_COUNT_LEADING_ZEROS):
65618         Do not require AC_C_INLINE.
65619         * modules/count-leading-zeros (Files, lib_SOURCES):
65620         Add lib/count-leading-zeros.c.
65621         (Depends-on): Add extern-inline.
65623         bitrotate: better 'inline'
65624         * lib/bitrotate.c: New file.
65625         * lib/bitrotate.h (BITROTATE_INLINE):
65626         New macros.
65627         Replace all uses of 'static inline' with them.
65628         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
65629         * modules/bitrotate (Files, lib_SOURCES): Add lib/bitrotate.c.
65630         (Depends-on): Add extern-inline.
65631         (configure.ac): Do not require AC_C_INLINE.
65633 2012-11-20  Theophile Ranquet  <ranquet@lrde.epita.fr>
65635         maint.mk: avoid gratuitous failure
65636         Reported by Stefano Lattarini in
65637         <http://lists.gnu.org/r/bug-bison/2012-11/msg00022.html>
65638         * top/maint.mk (public-submodule-commit): Quote more safely.
65640 2012-11-20  Eli Zaretskii  <eliz@gnu.org>
65642         canonicalize, canonicalize-lgpl: support MS-Windows file names
65643         See <http://lists.gnu.org/r/bug-gnulib/2012-11/msg00074.html>
65644         for test cases, which it'd be nice to add at some point.
65645         * lib/canonicalize.c, lib/canonicalize-lgpl.c: Include dosname.h.
65646         * lib/canonicalize.c (canonicalize_filename_mode):
65647         * lib/canonicalize-lgpl.c (__realpath):
65648         Use FILE_SYSTEM_PREFIX_LEN instead of assuming that the first
65649         slash is at the beginning of the file name.  Use ISSLASH, instead
65650         of a literal '/'.  Use IS_ABSOLUTE_FILE_NAME instead of comparing
65651         the first character with '/'.  Test for
65652         DOUBLE_SLASH_IS_DISTINCT_ROOT only if the file name does not begin
65653         with a drive letter.
65654         * lib/canonicalize.c (SLASHES): New macro.
65655         (canonicalize_filename_mode): Use SLASHES instead of a literal "/".
65657 2012-11-17  Dmitry V. Levin  <ldv@altlinux.org>
65659         fts: introduce FTS_VERBATIM
65660         * lib/fts_.h (FTS_VERBATIM): New bit flag.
65661         (FTS_OPTIONMASK, FTS_NAMEONLY, FTS_STOP): Adjust.
65662         * lib/fts.c (fts_open): Honor it.
65664 2012-11-09  Pádraig Brady  <P@draigBrady.com>
65666         getlogin-tests: allow errno == ENXIO
65667         * tests/test-getlogin.c (main): Skip tests if getlogin fails
65668         with errno == ENXIO (No controlling tty).
65669         getlogin_r-tests: Likewise. Also allow errno == ENOENT
65670         * tests/test-getlogin_r.c (main): Skip tests if getlogin_r fails
65671         with errno == ENOENT.  This was reported to happen in various
65672         situations on GNU/Linux.
65674 2012-11-09  Paul Eggert  <eggert@cs.ucla.edu>
65676         getlogin-tests: allow errno == ENOENT
65677         * tests/test-getlogin.c (main): Skip tests if getlogin fails
65678         with errno == ENOENT.  This happened to me on Ubuntu 12.04.1 x86,
65679         when running a test in an Emacs shell buffer.
65681 2012-11-08  Jim Meyering  <jim@meyering.net>
65683         tests/nap.h: avoid warning about unused variable
65684         * tests/nap.h (nap_works): Remove now-unused declaration of "result".
65686         prefix-gnulib-mk: avoid overzealous "lib/"-prefix addition
65687         * build-aux/prefix-gnulib-mk (prefix): Tighten a regexp to require
65688         white space before each of the special-cased file names, to avoid
65689         adding "lib/" after $(libdir)/.  Reported by Matias A. fonzo
65690         in http://bugs.gnu.org/12830.
65692 2012-11-08  Paul Eggert  <eggert@cs.ucla.edu>
65694         fcntl-h: default O_SEARCH, O_EXEC back to O_RDONLY
65695         O_PATH doesn't work with Linux kernel 3.6.5, as fchmod (fd, ...)
65696         fails with errno == EBADF when fd is opened with O_PATH.
65697         Reported by Jim Meyering in
65698         <http://lists.gnu.org/r/bug-gnulib/2012-11/msg00026.html>.
65699         * doc/posix-headers/fcntl.texi (fcntl.h): Document this.
65700         * lib/fcntl.in.h (O_EXEC, O_SEARCH) [O_PATH]: Default back to O_RDONLY.
65702 2012-11-07  Paul Eggert  <eggert@cs.ucla.edu>
65704         test-utimens: speed up by taking shorter naps
65705         * tests/nap.h (lt_mtime, get_mtime, nap_works, guess_delay):
65706         New functions.
65707         (nap): Use them, to do a better job of guessing the delay.
65708         On Fedora 17 with ext4 atop md atop hard disks, this made
65709         test-utimens run 10x faster, because the test napped for
65710         1 ms at a time rather than 20 ms.  Reported by Stefano Lattarini in
65711         <http://bugs.gnu.org/12820#11>.
65713 2012-11-07  Jim Meyering  <jim@meyering.net>
65715         mountlist.c: fix a compilation failure
65716         * lib/mountlist.c (read_file_system_list): Fix a compilation failure
65717         I introduced while transforming commit v0.0-7683-g613bcb6
65719 2012-11-05  Paul Eggert  <eggert@cs.ucla.edu>
65721         errno: port to LynxOS 178 2.2.2
65722         Problem reported by Joel Brobecker in
65723         <http://lists.gnu.org/r/bug-gnulib/2012-10/msg00088.html>.
65724         * doc/posix-headers/errno.texi (errno.h): Document this.
65725         * lib/errno.in.h (EILSEQ, GNULIB_defined_EILSEQ) [!EILSEQ]: New macros.
65726         * lib/strerror-override.c, lib/strerror-override.h (strerror_override):
65727         Supply a string for EILSEQ.
65728         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Check for EILSEQ.
65730 2012-11-05  Paul Eggert  <eggert@cs.ucla.edu>
65732         fcntl-h: default O_SEARCH, O_EXEC to O_PATH if available
65733         Linux kernel 2.6.39 introduced O_PATH (see
65734         <http://lwn.net/Articles/433854/>) and this is a better fallback
65735         for O_SEARCH and O_EXEC than O_RDONLY, if O_PATH is available.
65736         * doc/posix-headers/fcntl.texi (fcntl.h): Document this.
65737         * lib/fcntl.in.h (O_EXEC, O_SEARCH) [O_PATH]: Default to O_PATH.
65738         * lib/fcntl.in.h (O_ACCMODE):
65739         * tests/test-fcntl-h.c (main):
65740         Do not reject O_ACCMODE merely because it has more than the
65741         minimal number of bits, as POSIX allows extensions here.
65743 2012-11-04  Andrew Warshall  <warshall@99main.com>  (tiny change)
65745         mountlist: do not classify a bind-mounted dir entry as "dummy"
65746         * lib/mountlist.c (ME_DUMMY_0): Rename from ME_DUMMY, but omit
65747         the "none"-testing clause.
65748         (ME_DUMMY) [MOUNTED_GETMNTENT1]: New macro to encapsulate the
65749         exception for bind-mounted directories.
65751 2012-11-01  Akim Demaille  <akim@lrde.epita.fr>
65753         quote: provide a means to escape strings with nul characters
65754         * lib/quote.h, lib/quotearg.c (quote_mem, quote_n_mem): New functions.
65755         (quote, quote_n): Rename formal arguments for consistency with
65756         quotearg.
65758 2012-10-30  Paul Eggert  <eggert@cs.ucla.edu>
65760         test-raise: don't assume 199 is an invalid signal
65761         * tests/test-raise.c (main): Don't assume 199 is not a signal number.
65763         sh-quote-tests: port to Solaris 9
65764         * modules/sh-quote-tests (test_sh_quote_LDADD): Add @LIBINTL@.
65765         Problem reported by Dagobert Michelsen in
65766         <http://lists.gnu.org/r/bug-gnulib/2012-10/msg00114.html>.
65768 2012-10-28  Jim Meyering  <jim@meyering.net>
65770         maint.mk: rename a new configurable variable
65771         * top/maint.mk (_gl_translatable_string_re): Rename from
65772         translation-markers: _gl_ prefix to insulate from user Makefile code,
65773         and the _re suffix to inform that it's a regular expression.
65775 2012-10-26  Eric Blake  <eblake@redhat.com>
65777         maint.mk: let packages tweak sc_po_check pattern
65778         * top/maint.mk (sc_po_check): Add translation-markers, to allow
65779         finding files with other translation markers.
65781 2012-10-16  Paul Eggert  <eggert@cs.ucla.edu>
65783         euidaccess: speed up 'configure' on GNU hosts
65784         * m4/euidaccess.m4 (gl_FUNC_NONREENTRANT_EUIDACCESS):
65785         Check for setregid here, not in gl_PREREQ_EUIDACCESS, since
65786         it's needed only in this case.  Use AC_CHECK_DECLS, not
65787         AC_CHECK_DECLS_ONCE.
65788         (gl_PREREQ_EUIDACCESS): Do not use AC_CHECK_HEADERS_ONCE libgen.h
65789         or AC_REQUIRE for AC_FUNC_GETGROUPS.
65791         * lib/regexec.c (re_search_internal): Fix grammar in comment.
65793 2012-10-15  Paul Eggert  <eggert@cs.ucla.edu>
65795         fchmodat, fchownat, fstatat: port to non-inlining compilers
65796         Problem reported for FreeBSD 9 by Jim Meyering in
65797         <http://lists.gnu.org/r/bug-gnulib/2012-10/msg00070.html>.
65798         * lib/chmodat.c, lib/chownat.c, lib/statat.c:
65799         New files, which define FCHMODAT_INLINE etc.
65800         * lib/fchmodat.c (FCHMODAT_INLINE):
65801         * lib/fchownat.c (FCHOWNAT_INLINE):
65802         * lib/fstatat.c (FSTATAT_INLINE):
65803         Remove, as chmodat.c etc. now do this.
65804         * modules/fchmodat (Files): Add lib/chmodat.c.
65805         * modules/fchownat (Files): Add lib/chownat.c.
65806         * modules/fstatat (Files): Add lib/statat.c.
65808 2012-10-15  Jim Meyering  <jim@meyering.net>
65810         fchmodat.c, fchownat.c: compile-impeding typos
65811         * lib/fchmodat.c (FCHMODAT_INLINE): Fix typo: s/#include/#define/
65812         * lib/fchownat.c (FCHOWNAT_INLINE): Likewise.
65813         Introduced in commit v0.0-7636-gd202279.
65815 2012-10-15  Paul Eggert  <eggert@cs.ucla.edu>
65817         fcntl-h: support GNU flags like O_IGNORE_CTTY
65818         * doc/posix-headers/fcntl.texi (fcntl.h): Support O_IGNORE_CTTY,
65819         O_NOLINK, and O_NOTRANS.  These flags are nonzero on GNU/Hurd
65820         systems.  Discovered when using fcntl-h with GNU Emacs, which uses
65821         O_IGNORE_CTTY.  Fix misspelling of F_SETLKW.
65822         * lib/fcntl.in.h (O_IGNORE_CTTY, O_NOLINK, O_NOTRANS):
65823         Define to 0 if not already defined.
65824         * tests/test-fcntl-h.c: Test these new flags.
65826 2012-10-14  Paul Eggert  <eggert@cs.ucla.edu>
65828         faccessat, etc.: support AT_FDCWD-only use
65829         * lib/at-func.c: If GNULIB_SUPPORT_ONLY_AT_FDCWD, then support
65830         this function only if its first argument is AT_FDCWD.
65831         Emacs wants faccessat for AT_EACCESS but not for any first-arg
65832         values other than AT_FDCWD, so it doesn't want all the openat
65833         machinery with fchdir etc.
65834         * modules/faccessat, modules/fchmodat, modules/fchownat (Files):
65835         * modules/fstatat, modules/mkdirat, modules/openat (Files):
65836         * modules/unlinkat (Files):
65837         Remove lib/openat-priv.h, as at-internal supplies this file.
65838         Removing this file here allows us to support programs like Emacs
65839         that avoid at-internal.
65841         faccessat: speed up 'configure' on mainstream hosts
65842         * m4/faccessat.m4 (gl_PREREQ_FACCESSAT):
65843         Use AT_CHECK_FUNCS for 'access', not AC_CHECK_FUNCS_ONCE,
65844         since it's only on unusual platforms that we need to check for
65845         'access', and it's better not to slow 'configure' down on all
65846         platforms.
65848         faccessat: port to Solaris 10
65849         * lib/faccessat.c: Include <fcntl.h>, for AT_EACCESS.
65850         Needed on Solaris 10, which doesn't have AT_EACCESS,
65851         so we need the Gnulib fcntl.h, which defines it.
65853 2012-10-14  Pádraig Brady  <P@draigBrady.com>
65854         canonicalize: fix C89 compilation
65855         * lib/canonicalize.c (canonicalize_filename_mode): Swap order of
65856         declarations so C89 is supported.  Also remove the comment
65857         referencing memorty allocation as the suggested feature could
65858         not be implemented as suggested.
65859         Reported by Michael Goffioul.
65861 2012-10-12  Paul Eggert  <eggert@cs.ucla.edu>
65863         group-member: omit unnecessary dependencies
65864         This is for Emacs, which has its own allocator and where we
65865         don't want to use xalloc.
65866         * lib/group-member.c: Include xalloc-oversized.h, not xalloc.h,
65867         since we no longer use xmalloc.  Do not include stdbool.h, since
65868         the changes below happen to remove the only use of bool.
65869         (GROUPBUF_SIZE): New constant.
65870         (struct group_info): Remove n_groups member.  Add groupbuf member.
65871         This lets us get the groups without using malloc, usually.
65872         (free_group_info, get_group_info): Adjust to this.
65873         (get_group_info): Return the number of groups found, or -1 on error.
65874         Use plain malloc not xmalloc, and treat its failure as if there
65875         are no groups, as the user already loses in case of error.
65876         (group_member): Simplify, based on changes to get_group_info.
65877         * modules/group-member (Depends-on): Remove dependencies on
65878         xalloc and stdbool.  Add dependency on xalloc-oversized.
65880 2012-10-08  Alexandre Duret-Lutz  <adl@lrde.epita.fr>  (tiny change)
65882         gethrxtime: port to C++
65883         * lib/gethrxtime.h, lib/xtime.h [__cplusplus]: Add extern "C".
65885 2012-10-04  Paul Eggert  <eggert@cs.ucla.edu>
65887         ptsname: fix macro-name typo
65888         * lib/stdlib.in.h (ptsname): Fix misspelling of GNULIB_NAMESPACE.
65890 2012-10-03  Simon Josefsson  <simon@josefsson.org>
65892         inttostr: Relax license.
65893         * modules/inttostr (License): Change from LGPL to LGPLv2+.
65895 2012-10-03  Eric Blake  <eblake@redhat.com>
65897         ptsname_r: support ptys returned by FreeBSD posix_openpt
65898         * lib/ptsname_r.c (__ptsname_r): Don't munge name if it already
65899         lives in /dev/pts/.
65901 2012-10-02  Eric Blake  <eblake@redhat.com>
65903         pselect: reject invalid file descriptors
65904         * m4/pselect.m4 (gl_FUNC_PSELECT): Probe for FreeBSD bug.
65905         * lib/pselect.c (rpl_pselect) [!win32]: Work around it.
65906         * modules/pselect (Depends-on): Add dup2.
65907         * doc/posix-functions/pselect.texi (pselect): Document this.
65909         select: reject invalid file descriptors
65910         * m4/select.m4 (gl_FUNC_SELECT): Probe for FreeBSD bug.
65911         * lib/select.c (rpl_select) [!win32]: Work around it.
65912         * modules/select (Depends-on): Add dup2.
65913         * doc/posix-functions/select.texi (select): Document this.
65915         select: enhance test
65916         * tests/test-select.h (do_select_bad_nfd_nowait, test_bad_nfd):
65917         New functions.
65918         (test_function): Enhance test.
65919         (do_select_bad_fd): Avoid any stale errno values.
65921         ptsname: reject invalid file descriptors
65922         http://www.austingroupbugs.net/view.php?id=503
65923         * m4/ptsname.m4 (gl_FUNC_PTSNAME): Probe for FreeBSD bug.
65924         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Add new witness.
65925         * modules/stdlib (Makefile.am): Replace witness.
65926         * lib/stdlib.in.h (ptsname): Allow for replacement.
65927         * modules/ptsname (configure.ac): Trigger replacement.
65928         * doc/posix-functions/ptsname.texi (ptsname): Document this.
65930 2012-10-02  Nikos Mavrogiannopoulos  <nmav@gnutls.org>  (tiny change)
65932         hash-pjw-bare: new module
65933         * lib/hash-pjw-bare.c: New file, very much like hash-pjw.c.
65934         * lib/hash-pjw-bare.h: Likewise.
65935         * modules/hash-pjw-bare: New file.
65936         * MODULES.html.sh (Misc): Add it.
65938 2012-10-02  Eric Blake  <eblake@redhat.com>
65940         manywarnings: cater to more gcc infelicities
65941         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add test for
65942         -Wuninitialized without -O.
65944 2012-10-01  Ed Maste  <emaste@freebsd.org>  (tiny change)
65946         select, poll tests: Make setsockopt invocation effective.
65947         * tests/test-poll.c (open_server_socket): Move setsockopt() call before
65948         the bind() call.
65949         * tests/test-select.h (open_server_socket): Likewise.
65951 2012-09-30  Paul Eggert  <eggert@cs.ucla.edu>
65953         sockets, sys_stat: restore AC_C_INLINE
65954         This undoes the 2012-09-22 patch.
65955         * m4/sockets.m4 (gl_SOCKETS):
65956         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H):
65957         Restore AC_C_INLINE, since MSVC requires __inline or _inline
65958         and does not support plain 'inline'.  Reported by Bruno Haible in
65959         <http://lists.gnu.org/r/bug-gnulib/2012-09/msg00183.html>.
65961 2012-09-30  Bruno Haible  <bruno@clisp.org>
65963         localeconv tests: Avoid test failure on OpenIndiana.
65964         * tests/test-localeconv.c (main): On OpenIndiana (a Solaris 11 variant)
65965         skip the 'grouping' and 'mon_grouping' tests.
65966         Reported by Jim Meyering.
65968 2012-09-30  Bruno Haible  <bruno@clisp.org>
65970         havelib: Follow libtool developments.
65971         * m4/lib-ld.m4: Rebase on libtool.m4 from libtool-2.4.
65972         Suggested by Simon Josefsson.
65974 2012-09-29  Jim Meyering  <meyering@redhat.com>
65976         fstatat.c: fix a compile-impeding typo
65977         * lib/fstatat.c (FSTATAT_INLINE): Fix typo: s/#include/#define/
65978         Introduced in commit v0.0-7636-gd202279.
65979         Mats Erik Andersson reported the resulting OpenBSD compilation failure.
65981 2012-09-28  Akim Demaille  <akim@lrde.epita.fr>
65983         extern-inline: provide a -Wundef safe config.h
65984         * m4/extern-inline.m4 (gl_EXTERN_INLINE): Protect
65985         "#if __GNUC_STDC_INLINE__" with "defined __GNUC_STDC_INLINE__"
65986         to produce a -Wundef warning free config.h.
65988 2012-09-26  Paul Eggert  <eggert@cs.ucla.edu>
65990         hash-pjw: relax license to LGPLv2+
65991         * modules/hash-pjw (License): Relax, with consent of author.
65993 2012-09-25  Akim Demaille  <akim@lrde.epita.fr>
65995         maint.mk: fix strict vs. lazy variable issues with RELEASE
65996         * top/maint.mk (_equal): New function.
65997         (member_check): Strip the result to avoid spurious spaces.
65998         (url_dir_list): Do not use ifeq, which is strict, as it will
65999         require RELEASE_TYPE to be defined.
66000         (announcement_Cc_, announcement_mail_headers_): Likewise: instead
66001         of relying on ifeq, use $(release_type) to dispatch (lazily) onto...
66002         (announcement_Cc_alpha,announcement_mail_headers_alpha)
66003         (announcement_Cc_beta,announcement_mail_headers_beta)
66004         (announcement_Cc_stable,announcement_mail_headers_stable): these.
66005         (release): Do not depend on $(release-type), as it forces its
66006         evaluation.  Bounce to it.
66008 2012-09-25  Akim Demaille  <akim@lrde.epita.fr>
66010         maint.mk: formatting changes
66011         * top/maint.mk: Indent bodies of if's.
66013 2012-09-21  Akim Demaille  <akim@lrde.epita.fr>
66015         maint.mk: factor the validation of RELEASE_TYPE
66016         With help from Jim Meyering.
66017         http://lists.gnu.org/r/bug-gnulib/2012-09/msg00132.html
66018         * top/maint.mk (_empty, _sp): Move their definition earlier.
66019         (member-check, release-type): New.
66020         Use the latter instead of $(RELEASE_TYPE).
66021         Remove now useless local checks.
66023 2012-09-20  Akim Demaille  <akim@lrde.epita.fr>
66025         maint.mk: provide "make upload" to ease uploading
66026         See
66027         <http://lists.gnu.org/r/bug-gnulib/2012-08/msg00028.html>.
66028         Do not depend simply on the current $(VERSION), as there may have been
66029         new commits since the tarball generation.  Rather, rely on $(RELEASE),
66030         as "make release-commit" already does.
66032         For consistency, add "make release RELEASE='X.Y TYPE'" as an alias for
66033         "make TYPE".
66035         * top/maint.mk (upload_command, upload, release): New.
66036         (RELEASE_TYPE): If undefined, default to the second word of $(RELEASE).
66037         (VERSION): first word of $(RELEASE) is always right.
66038         (emit_upload_commands): Adjust.
66039         * top/README-release: Update.
66041 2012-09-20  Akim Demaille  <akim@lrde.epita.fr>
66043         maint.mk: silent rules
66044         With help from Stefano Lattarini.
66045         * top/maint.mk (writable-files): Use $(AM_V_GEN).
66046         (announcement): Use $(AM_V_at).
66048 2012-09-24  Paul Eggert  <eggert@cs.ucla.edu>
66050         localename: port gl_locale_name_thread_unsafe to FreeBSD
66051         * lib/localename.c (gl_locale_name_thread_unsafe): Port to FreeBSD,
66052         and use the simpler FreeBSD implementation on Mac OS X as well.
66053         Original idea suggested by Ed Maste in
66054         <http://lists.gnu.org/r/bug-gnulib/2012-09/msg00094.html>.
66056 2012-09-22  Paul Eggert  <eggert@cs.ucla.edu>
66058         binary-io, eealloc, mbfile, mbiter, mbutil, xsize: better 'inline'
66059         * lib/binary-io.c, lib/eealloc.c, lib/mbfile.c, lib/mbiter.c:
66060         * lib/mbuiter.c, lib/xsize.c: New files.
66061         * lib/binary-io.h (BINARY_IO_INLINE):
66062         * lib/eealloc.h (EEALLOC_INLINE):
66063         * lib/mbfile.h (MBFILE_INLINE):
66064         * lib/mbiter.h (MBITER_INLINE):
66065         * lib/mbuiter.h (MBUITER_INLINE):
66066         * lib/xsize.h (XSIZE_INLINE):
66067         New macros.
66068         Replace all uses of 'static inline' with them.
66069         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
66070         * m4/eealloc.m4 (gl_EEALLOC):
66071         * m4/mbfile.m4 (gl_MBFILE):
66072         * m4/mbiter.m4 (gl_MBITER):
66073         * m4/xsize.m4 (gl_XSIZE):
66074         Do not require AC_C_INLINE.
66075         * modules/binary-io (Files, lib_SOURCES): Add lib/binary-io.c
66076         * modules/eealloc (Files, lib_SOURCES): Add lib/eealloc.c.
66077         * modules/mbfile (Files, lib_SOURCES): Add lib/mbfile.c.
66078         * modules/mbiter (Files, lib_SOURCES): Add lib/mbiter.c.
66079         * modules/mbuiter (Files, lib_SOURCES): Add lib/mbuiter.c.
66080         * modules/xsize (Files, lib_SOURCES): Add lib/xsize.c.
66081         * modules/binary-io, modules/eealloc, modules/mbfile:
66082         * modules/mbiter, modules/mbuiter:
66083         (Depends-on): Add extern-inline.
66085         pipe-filter-gi, pipe-filter-ii: better use of 'inline'
66086         * lib/pipe-filter-aux.c: New file.
66087         * lib/pipe-filter-aux.h (PIPE_FILTER_AUX_INLINE): New macro.
66088         Replace all uses of 'static inline' with it.
66089         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
66090         * lib/pipe-filter-gi.c (filter_init, filter_cleanup)
66091         (filter_retcode): No real need for inline here.
66092         * modules/pipe-filter-gi, modules/pipe-filter-ii:
66093         (Files): Add lib/pipe-filter-aux.c.
66094         (Depends-on): Add extern-inline.
66095         (configure.ac): Do not require AC_C_INLINE.
66096         (lib_SOURCES): Add pipe-filter-aux.c.
66098         fdutimensat: omit unnecessary AC_C_INLINE
66099         * modules/fdutimensat (configure.ac): Remove AC_C_INLINE.
66101         fchmodat, fchownat, fstatat: use extern-inline
66102         * lib/fchmodat.c, lib/openat.h (FCHMODAT_INLINE):
66103         * lib/fchownat.c, lib/openat.h (FCHOWNAT_INLINE):
66104         * lib/fstatat.c, lib/openat.h (FSTATAT_INLINE):
66105         New macros.
66106         * lib/openat.h:
66107         Replace all uses of 'static inline' with them.
66108         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
66109         * modules/fchmodat, modules/fchownat, modules/fstatat:
66110         * modules/openat-h:
66111         (Depends-on):
66112         Add extern-inline.
66113         (configure.ac): Remove AC_C_INLINE.
66115         acl, mbchar, priv-set: use extern-inline
66116         * lib/set-mode-acl.c, lib/acl-internal.h (ACL_INTERNAL_INLINE):
66117         * lib/mbchar.c, lib/mbchar.h (MBCHAR_INLINE):
66118         * lib/priv-set.c, lib/priv-set.h (PRIV_SET_INLINE):
66119         New macros.
66120         * lib/acl-internal.h, lib/mbchar.h, lib/priv-set.h:
66121         Replace all uses of 'static inline' with it.
66122         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
66123         * m4/acl.m4 (gl_FUNC_ACL):
66124         * m4/mbchar.m4 (gl_MBCHAR):
66125         * m4/priv-set.m4 (gl_PRIV_SET):
66126         Remove AC_C_INLINE, since 'inline' is no longer used directly.
66127         * modules/acl, modules/mbchar, modules/priv-set (Depends-on):
66128         Add extern-inline.
66130         sockets, sys_stat: remove AC_C_INLINE in MSVC-only cases
66131         * m4/sockets.m4 (gl_SOCKETS):
66132         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H):
66133         Remove AC_C_INLINE.  Here, 'inline' is used only in MSVC
66134         environments where it's already guaranteed to work, so we needn't
66135         check for it at 'configure'-time.
66137         tls-tests: omit unnecessary 'inline'
66138         * tests/test-tls.c (perhaps_yield): No longer inline.
66139         Simplicity and portability trump efficiency in test cases.
66141         utimens-tests: avoid unnecessary 'inline'
66142         * modules/fdutimensat-tests (configure.ac):
66143         * modules/futimens-tests (configure.ac):
66144         * modules/utimens-tests (configure.ac):
66145         * modules/utimensat-tests (configure.ac):
66146         Remove AC_C_INLINE.
66147         * tests/test-utimens-common.h (ctime_compare):
66148         No longer inline.  Simplicity and portability trump efficiency here.
66150         misc: don't limit commentary to inline functions
66151         * lib/binary-io.h, lib/malloca.h, lib/safe-alloc.c:
66152         * lib/xalloc-oversized.h, lib/xsize.h:
66153         Contrast macros to functions in general, not just to inline functions,
66154         when the commentary does not apply only to inline functions.
66156 2012-09-20  Jim Meyering  <meyering@redhat.com>
66158         non-recursive-gnulib-prefix-hack: new module
66159         * build-aux/prefix-gnulib-mk: Copied from coreutils, derived from
66160         the file that originated in Bison.
66161         * m4/non-recursive-gnulib-prefix-hack.m4: Likewise, this code is
66162         largely copied from a snippet that resided in bison's configure.ac.
66163         * modules/non-recursive-gnulib-prefix-hack: New file.
66164         * MODULES.html.sh (Support for maintaining and releasing projects):
66165         Add it.
66167 2012-09-18  Jim Meyering  <meyering@redhat.com>
66169         maint.mk: generalize _gl_tight_scope for non-recursive make
66170         * top/maint.mk (_gl_tight_scope): Remove a hard-coded assumption
66171         that *.h would describe additional .h files in the directory
66172         specified by $(_gl_TS_dir).  I.e., add this...
66173         (_gl_TS_other_headers): New variable.
66175         maint.mk: exempt trailing blanks found in "binary" files
66176         * top/maint.mk (sc_trailing_blank): Filter out any matches found in
66177         "binary" files, as reported by grep.  Suggested by Richard W.M. Jones
66178         in http://thread.gmane.org/gmane.comp.emulators.guestfs/1902
66180 2012-09-17  Jim Meyering  <meyering@redhat.com>
66182         maint.mk: sc_prohibit_path_max_allocation: don't FP for UNIX_PATH_MAX
66183         * top/maint.mk (sc_prohibit_path_max_allocation): Avoid false-positive
66184         match for symbols like UNIX_PATH_MAX. Reported by Richard W.M. Jones
66185         in http://thread.gmane.org/gmane.comp.emulators.guestfs/1902
66187 2012-09-17  Jim Meyering  <meyering@redhat.com>
66189         maint.mk: teach sc_prohibit_magic_number_exit to accept 77
66190         * top/maint.mk (sc_prohibit_magic_number_exit): Do not complain about
66191         uses like "exit (77)".  "77" is automake's "skip this test" exit code.
66192         It is not in the same category as "exit (0)" or "exit (1)", and
66193         besides, I know of no symbolic name for that 77.  Reported by
66194         Richard W.M. Jones in
66195         http://thread.gmane.org/gmane.comp.emulators.guestfs/1902
66197 2012-09-17  Jim Meyering  <meyering@redhat.com>
66199         maint.mk: relax sc_prohibit_strcmp, to avoid a false positive
66200         * top/maint.mk (sc_prohibit_strcmp): Relax regexp, so as to match
66201         all uses of #define, not just those that start in column 1.
66202         Richard W.M. Jones reported a false positive in
66203         http://thread.gmane.org/gmane.comp.emulators.guestfs/1902
66205 2012-09-16  Paul Eggert  <eggert@cs.ucla.edu>
66207         localcharset: work around Mac OS X bug with UTF-8 and MB_CUR_MAX
66208         * lib/localcharset.c (locale_charset) [DARWIN7]:
66209         Return "ASCII" if the system reports "UTF-8" and MB_CUR_MAX <= 1,
66210         as these two values are incompatible.  Problem reported by Max Horn.
66211         For more discussion, please see
66212         <http://lists.gnu.org/r/bug-gnulib/2012-09/msg00061.html>.
66214         doc: document sticky-EOF issue
66215         * doc/posix-functions/fgetc.texi (fgetc):
66216         * doc/posix-functions/fgets.texi (fgets):
66217         * doc/posix-functions/fread.texi (fread):
66218         * doc/posix-functions/fscanf.texi (fscanf):
66219         * doc/posix-functions/getc.texi (getc):
66220         * doc/posix-functions/getchar.texi (getchar):
66221         * doc/posix-functions/scanf.texi (scanf):
66222         Mention that glibc and default Solaris do not conform to
66223         C99 and POSIX-2001 or later, with respect to how getchar
66224         etc. behave when feof reports nonzero.
66226 2012-09-13  Joachim Schmitz  <jojo@schmitz-digital.de>  (tiny change)
66228         poll: fix poll(0, NULL, msec)
66229         * lib/poll.c: don't exit early if NULL is the 1st arg to poll(),
66230         but nfd is 0.  In that case poll should behave like select.
66232 2012-09-13  Joachim Schmitz  <jojo@schmitz-digital.de>  (tiny change)
66233             Paolo Bonzini  <bonzini@gnu.org>
66235         poll: fix for systems that can't recv() on a non-socket
66236         * lib/poll.c: if recv returns ENOTSOCK, assume the descriptor
66237         is readable.  In this case POLLHUP will not be supported.
66238         * doc/posix-functions/poll.texi: Document this.
66240 2012-09-13  Paolo Bonzini  <bonzini@gnu.org>
66242         poll/select: document portability problems not fixed by Gnulib.
66243         * doc/posix-functions/poll.texi: poll does not work well on
66244         pipes under Windows.  It has the same limitations as select on
66245         BeOS.
66246         * doc/posix-functions/select.texi: select does not work well
66247         on pipes under Windows.
66249 2012-09-10  Paul Eggert  <eggert@cs.ucla.edu>
66251         fcntl-h: check for AIX 7.1 bug with O_NOFOLLOW and O_CREAT
66252         * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Check for AIX 7.1 bug
66253         that caused a GNU tar test failure.  Problem reported by Jez Wain; see
66254         <http://lists.gnu.org/r/bug-tar/2012-07/msg00018.html>.
66256 2012-09-06  Eric Blake  <eblake@redhat.com>
66258         net_if: give more details about the bug being fixed
66259         * doc/posix-headers/net_if.texi: Add clarification.
66261 2012-09-05  Eric Blake  <eblake@redhat.com>
66263         net_if: new module
66264         * modules/net_if: New module, borrowing ideas from netinet_in.
66265         * m4/net_if_h.m4: New file.
66266         * lib/net_if.in.h: Likewise.
66267         * doc/posix-headers/net_if.texi (net/if.h): Document it.
66268         * MODULES.html.sh (lacking POSIX:2008): Likewise.
66269         * tests/test-net_if.c: Make function checks conditional.
66270         Reported by Jasper Lievisse Adriaanse <jasper@humppa.nl>.
66272 2012-09-05  Mats Erik Andersson  <gnu@gisladisker.se>  (tiny change)
66274         readutmp: fix non-portable UT_PID use
66275         * lib/readutmp.c (desirable_utmp_entry) <READ_UTMP_CHECK_PIDS>:
66276         Use `UT_PID (u) > 0' as absolute condition.
66278 2012-09-04  Jim Meyering  <meyering@redhat.com>
66280         fts: reduce two or more trailing spaces to just one, usually
66281         * lib/fts.c (fts_open): Upon initialization, if a name ends in two
66282         or more slashes, trim all but the final one.  But if a name consists
66283         solely of two slashes, don't modify it.  If it consists solely of
66284         three or more slashes, strip all but one.
66286         This is part of the solution to a minor problem with rm:
66287         it would print a bogus ELOOP diagnostic when failing to remove
66288         the slash-decorated name of a symlink-to-directory:
66290             $ mkdir d && ln -s d s && env rm -r s/
66291             rm: cannot remove 's': Too many levels of symbolic links
66293         With the change below and a trivial don't-trim-trailing-slashes
66294         adjustment to remove.c, it does this:
66296             $ env rm -r s/
66297             rm: cannot remove 's/': Not a directory
66299         Improved by: Eric Blake
66301         fts: when there is no risk of overlap, use memcpy, not memmove
66302         * lib/fts.c (fts_alloc): Fix unjustified memcopy: s/memmove/memcpy/
66304 2012-08-29  Paul Eggert  <eggert@cs.ucla.edu>
66306         stdbool: be more compatible with mixed C/C++ compiles
66307         * lib/stdbool.in.h (_Bool, true, false) [__cplusplus]:
66308         Define to bool, true, false, respectively, as GCC's builtin
66309         stdbool.h does.  Problem reported by Michael Goffioul in
66310         <http://lists.gnu.org/r/bug-gnulib/2012-08/msg00143.html>.
66312 2012-08-28  Jim Meyering  <meyering@redhat.com>
66314         revert last change: it was not needed
66315         * tests/test-vc-list-files-git.sh: There's already a test for
66316         a working git, just below.
66318 2012-08-28  Jim Meyering  <meyering@redhat.com>
66320         tests: test-vc-list-files-git.sh: skip if git is not available
66321         * tests/test-vc-list-files-git.sh: Skip this test when git is
66322         not available.
66324 2012-08-26  Bruno Haible  <bruno@clisp.org>
66326         gnulib-tool: Remove no-op option --no-changelog.
66327         * gnulib-tool (func_usage): Don't mention --no-changelog.
66328         (do_changelog): Remove variable.
66329         Reported by Dmitriy Selyutin <ghostman.sd@gmail.com>.
66331 2012-08-24  Paul Eggert  <eggert@cs.ucla.edu>
66333         doc: remove fdl-1.2.texi
66334         It is no longer used or maintained, and its use of @acronym
66335         is problematic.  See the thread containing
66336         <http://lists.gnu.org/r/bug-gnulib/2012-08/msg00134.html>.
66337         * config/srclist.txt: Remove doc/old-licenses/fdl-1.2.texi.
66338         * doc/old-licenses/fdl-1.2.texi: Remove.
66340         execinfo: port to FreeBSD
66341         * m4/execinfo.m4 (gl_EXECINFO_H): Set LIB_EXECINFO to -lexecinfo
66342         if needed, as in FreeBSD.  Reported by Bastien Roucariès in
66343         <http://lists.gnu.org/r/bug-gnulib/2012-08/msg00113.html>.
66344         * modules/execinfo (Link): Add $(LIB_EXECINFO).
66346 2012-08-23  Jim Meyering  <meyering@redhat.com>
66348         xstrtol.h: avoid "_Noreturn is not at beginning of declaration" warning
66349         * lib/xstrtol.h: Put "_Noreturn" before "void" in declaration,
66350         to placate gcc's -Wold-style-declaration.
66352 2012-08-24  Paul Eggert  <eggert@cs.ucla.edu>
66354         doc: do not use @acronym
66355         * doc/inet_ntoa.texi (inet_ntoa):
66356         * doc/parse-datetime.texi (Seconds since the Epoch)
66357         (Specifying time zone rules):
66358         * doc/posix-functions/inet_ntoa.texi (inet_ntoa):
66359         Don't use @acronym.  Problem reported by John Darlington in
66360         <http://lists.gnu.org/r/bug-gnulib/2012-08/msg00124.html>.
66362 2012-08-23  Paul Eggert  <eggert@cs.ucla.edu>
66364         stdnoreturn: port to newer GCCs
66365         * m4/stdnoreturn.m4 (gl_STDNORETURN_H): Avoid problems with
66366         bleeding-edge GCC that complains about 'int _Noreturn foo (void);'.
66367         Problem reported by Jim Meyering in
66368         <http://lists.gnu.org/r/bug-gnulib/2012-08/msg00121.html>.
66369         Also, rename the 'test' function to a void a clash with the
66370         already-supplied 'main' function; this fixes a bug that incorrectly
66371         rejected GCC 4.7.1's <stdnoreturn.h>.
66372         * doc/posix-headers/stdnoreturn.texi (stdnoreturn.h):
66373         Document GCC problem.
66375 2012-08-22  Reuben Thomas  <rrt@sc3d.org>
66377         pipe-filter: fix comment typo
66378         * lib/pipe-filter.h: Mention correct function.
66380 2012-08-22  Paul Eggert  <eggert@cs.ucla.edu>
66382         execinfo: new module
66383         This is for Emacs.  Currently, it provides a no-effect stub
66384         on all platforms where it does not already work.
66385         It already works on glibc-based systems, and on Solaris 11.
66386         * lib/execinfo.c, lib/execinfo.in.h, m4/execinfo.m4, modules/execinfo:
66387         New files.
66388         * doc/glibc-headers/execinfo.texi (execinfo.h):
66389         * MODULES.html.sh (Misc): Document it.
66391 2012-08-20  Paul Eggert  <eggert@cs.ucla.edu>
66393         extern-inline: support old GCC 'inline'
66394         * m4/extern-inline.m4 (gl_EXTERN_INLINE): Use pre-C99 GCC 'inline'
66395         if available.  This applies to GCC versions 2.7 through 4.2, or
66396         when newer GCC is using -fgnu89-inline.  The goal is to address
66397         some of the performance issues mentioned by Bruno Haible in
66398         <http://lists.gnu.org/r/bug-gnulib/2012-08/msg00097.html>.
66400 2012-08-20  Eric Blake  <eblake@redhat.com>
66402         maint.mk: avoid redundant file name in message
66403         * top/maint.mk (sc_prohibit_strcmp, sc_unmarked_diagnostics)
66404         (sc_prohibit_defined_have_decl_tests, sc_const_long_option)
66405         (sc_makefile_path_separator_check): Remove bogus $(ME).
66407 2012-08-20  Mike Frysinger  <vapier@gentoo.org>
66409         timer-time: fix link order when static linking on glibc
66410         * m4/timer_time.m4 (LIB_TIMER_TIME): Add -lpthread
66411         _after_ -lrt so that it's significant.
66413 2012-08-19  Paul Eggert  <eggert@cs.ucla.edu>
66415         timespec: omit unnecessary AC_C_INLINE
66416         * m4/timespec.m4 (gl_TIMESPEC): Do not require AC_C_INLINE.
66418         stat-time: omit unnecessary AC_C_INLINE
66419         * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
66420         Do not require AC_C_INLINE.
66422         ignore-value: omit unnecessary AC_C_INLINE
66423         * modules/ignore-value (configure.ac): Do not require AC_C_INLINE.
66425         sys_select: avoid 'static inline'
66426         * lib/sys_select.in.h (rpl_fd_isset): Now static, not static inline.
66428         mktime: avoid 'static inline'
66429         * lib/mktime.c (leapyear, ydhms_diff): Now static, not static inline.
66430         * m4/mktime.m4 (gl_PREREQ_MKTIME): Do not require AC_C_INLINE.
66432 2012-08-19  Bruno Haible  <bruno@clisp.org>
66434         gnulib-tool: Improve coding style.
66435         * gnulib-tool (func_emit_tests_Makefile_am): Set perhapsLT, like in
66436         func_emit_lib_Makefile_am.
66437         Reported and fix suggested by Dmitriy Selyutin <ghostman.sd@gmail.com>.
66439 2012-08-19  Bruno Haible  <bruno@clisp.org>
66441         gnulib-tool: Fix indentation.
66442         * gnulib-tool (func_import): Fix indentation.
66444 2012-08-19  Bruno Haible  <bruno@clisp.org>
66446         gnulib-tool: Remove old file names from .cvsignore, .gitignore.
66447         * gnulib-tool (func_update_ignorelist): Don't use 'join -v 1' command
66448         on the list of removed files.
66450 2012-08-17  Paul Eggert  <eggert@cs.ucla.edu>
66452         test-parse-datetime: avoid glibc leap-second glitch
66453         * tests/test-parse-datetime.c (main): Set TZ to US Eastern time
66454         with the 2012 rules.  Problem reported by Bruce Dubbs in
66455         <http://bugs.gnu.org/12206>.
66457 2012-08-14  Bruno Haible  <bruno@clisp.org>
66459         gnulib-tool: Fix indentation of generated gnulib-comp.m4 file.
66460         * gnulib-tool (func_emit_autoconf_snippet): Initialize indentation
66461         from argument.
66462         Reported and fix suggested by Dmitriy Selyutin <ghostman.sd@gmail.com>.
66464 2012-08-14  Eric Blake  <eblake@redhat.com>
66466         ldexp: relax license
66467         * modules/ldexp (License): Trivial relax, since the module only
66468         provides a permissively licensed m4 file.
66470 2012-08-13  Bruno Haible  <bruno@clisp.org>
66472         gnulib-tool: Fix persistence of --witness-c-macro option.
66473         * gnulib-tool (func_import): Fix typo in emit of gl_WITNESS_C_MACRO.
66474         Reported by Dmitriy Selyutin <ghostman.sd@gmail.com>.
66476 2012-08-11  Eric Blake  <eblake@redhat.com>
66478         count-leading-zeros: use a lookup table on non-gcc compilers
66479         * lib/count-leading-zeros.h (count_leading_zeros_32): Use an
66480         alternate implementation, suggested by Jim Meyering.
66482 2012-08-10  Eric Blake  <eblake@redhat.com>
66484         count-leading-zeros: new module
66485         * modules/count-leading-zeros: New module.
66486         * m4/count-leading-zeros.m4: New file.
66487         * lib/count-leading-zeros.h: Likewise.
66488         * modules/count-leading-zeros-tests: New test.
66489         * tests/test-count-leading-zeros.c: New file.
66490         * MODULES.html.sh (Integer arithmetic functions): Document it.
66492 2012-08-07  Simon Josefsson  <simon@josefsson.org>
66493             Jim Meyering  <meyering@redhat.com>
66495         maintainer-makefile: Fix syntax error with dash.
66496         * top/maint.mk (sc_vulnerable_makefile_CVE-2009-4029): Quote arguments.
66497         (sc_vulnerable_makefile_CVE-2012-3386): Likewise.
66499 2012-08-05  Jim Meyering  <meyering@redhat.com>
66501         extern-inline: also ignore -Wmissing-declarations
66502         * m4/extern-inline.m4: Also ignore -Wmissing-declarations,
66503         required with gcc-4.8.0-to-be.
66505         maint.mk: sc_prohibit_magic_number_exit: avoid new false positives
66506         * top/maint.mk (sc_prohibit_magic_number_exit): Also filter out matches
66507         for /error ?([^,]*)/.  This avoids false-positives for strings like
66508         "Unknown error (252)", introduced via commit v0.0-7538-g92875a6.
66510 2012-08-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
66512         gnumakefile: better interaction with Automake-NG
66513         * modules/gnumakefile [Makefile.am]: The makefiles generated by
66514         Automake-NG always contain a definition of VPATH, even in non-VPATH
66515         builds (its value being simply '.' in that case).  So, in the
66516         'clean-GNUmakefile' rule, to determine whether running under a
66517         VPATH setup, compare '$(srcdir)' to '.' rather than checking whether
66518         '$(VPATH)' expands to the empty string.
66520 2012-08-02  Carlo de Falco  <carlo.defalco@polimi.it>  (tiny change)
66522         base64: Use extern C scope in header file, for C++.
66523         * lib/base64.h: Add C++ namespace protection.
66525 2012-08-02  Paul Eggert  <eggert@cs.ucla.edu>
66527         stat-time, timespec, u64: support naive out-of-dir builds
66528         * lib/stat-time.c, lib/timespec.c, lib/u64.c:
66529         Use '#include "foo.h"', not '#include <foo.h>', when including
66530         one's own interface.  This works better when configuring with
66531         out-of-directory builds, since packages need not add an
66532         otherwise-unnecessary -I$(topdir_src)/lib to DEFAULT_INCLUDES.
66534 2012-08-01  Paul Eggert  <eggert@cs.ucla.edu>
66536         utimens: use extern-inline
66537         * lib/utimens.c (_GL_UTIMENS_INLINE): Define when including utimens.h.
66538         * lib/utimens.h: Add copyright notice, since this is now large enough
66539         to copyright.  Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
66540         (_GL_UTIMENS_INLINE): New macro.  Use it instead of 'static inline'.
66541         * modules/utimens (Depends-on): Add extern-inline.
66543         u64: use extern-inline
66544         * lib/u64.c: New file.
66545         * lib/u64.h: Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
66546         (_GL_U64_INLINE): New macro.  Use it instead of 'static inline'.
66547         * modules/u64 (Files): Add lib/u64.c.
66548         (Depends-on): Add extern-inline.
66549         (configure.ac): No need to require AC_C_INLINE, since extern-inline
66550         does that now.
66551         (lib_SOURCES): Add u64.c.
66553         timespec: use extern-inline
66554         * lib/timespec.c: New file.
66555         * lib/timespec.h: Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
66556         (_GL_TIMESPEC_INLINE): New macro.  Use it instead of 'static inline'.
66557         * modules/timespec (Files): Add lib/timespec.c.
66558         (Depends-on): Add extern-inline.
66559         (lib_SOURCES): Add timespec.c.
66561         stat-time: use extern-inline
66562         * lib/stat-time.c: New file.
66563         * lib/stat-time.h: Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
66564         (_GL_STAT_TIME_INLINE): New macro.  Use it instead of 'static inline'.
66565         * modules/stat-time (Files): Add lib/stat-time.c.
66566         (Depends-on): Add extern-inline.
66567         (lib_SOURCES): Add stat-time.c.
66569         extern-inline: new module
66570         * modules/extern-inline, m4/extern-inline.m4: New files.
66571         This is for better support of 'extern inline' a la ISO C99,
66572         with a portable alternative on compilers that do not support
66573         C99-style 'extern inline'.  Using 'extern inline' shrinks the size
66574         of the Emacs executable, when compiled with debugging disabled,
66575         which is a typical way that Emacs is built while developing.
66577 2012-08-01  Akim Demaille  <akim@lrde.epita.fr>
66579         maint.mk: a "release-commit" wrapper to do-release-commit-and-tag
66580         * build-aux/do-release-commit-and-tag: Move variable definitions
66581         together.
66582         ($branch): Instead of defaulting to "master", default to the current
66583         branch (as gnu-web-doc-update does).
66584         (help): Display the current values of the option arguments.
66585         * top/maint.mk (release-commit): New.
66586         * top/README-release: Simplify the corresponding step.
66588 2012-07-30  Eric Blake  <eblake@redhat.com>
66590         passfd: fix comment on recvfd
66591         * lib/passfd.c (recvfd): Fix comment.
66592         Reported by Jann Horn <jannhorn@googlemail.com>.
66594 2012-07-30  Jim Meyering  <meyering@redhat.com>
66596         maint.mk: avoid a sub-shell
66597         * top/maint.mk (release-prep): Remove unneeded sub-shell.
66599 2012-07-30  Akim Demaille  <akim@lrde.epita.fr>
66601         maint.mk: use silent-rules support from Automake
66602         * top/maint.mk (news-check, vc-diff-check, announcement)
66603         (no-submodule-changes, alpha beta stable, release-prep)
66604         (web-manual, update-copyright): Use $(AM_V_GEN) and $(AM_V_at).
66606 2012-07-30  Akim Demaille  <akim@lrde.epita.fr>
66608         maint.mk: provide a web-manual-update target
66609         * top/maint.mk: here.
66610         * top/README-release: Use it to simplify the web manual update step.
66612 2012-07-30  Akim Demaille  <akim@lrde.epita.fr>
66614         README-release: shorten the circuit to post a news
66615         * top/README-release: Point directly to the news submission form.
66617 2012-07-30  Akim Demaille  <akim@lrde.epita.fr>
66619         gnu-web-doc-update: fix --help
66620         * build-aux/gnu-web-doc-update: The information "top level" was written
66621         twice.
66623 2012-07-30  Akim Demaille  <akim@lrde.epita.fr>
66625         maint.mk: absolute VPATH issue
66626         * top/maint.mk (release-prep): Help Git find .git/.
66627         From Jim Meyering.
66629 2012-07-29  Akim Demaille  <akim@lrde.epita.fr>
66631         gitlog-to-changelog: fix previous change
66632         * build-aux/gitlog-to-changelog: Fix condition.
66633         Add missing ";".
66635 2012-07-29  Akim Demaille  <akim@lrde.epita.fr>
66637         gitlog-to-changelog: don't expect .git to be in $srcdir
66638         Reported by Bruno Haible.
66639         <http://lists.gnu.org/r/bug-gnulib/2012-07/msg00265.html>
66640         * build-aux/gitlog-to-changelog (&git_dir_option): New.
66641         Use it.
66643 2012-07-29  Akim Demaille  <akim@lrde.epita.fr>
66645         maint.mk: absolute VPATH build fix
66646         * top/maint.mk (gpg_key_ID): Help git find .git when, for instance,
66647         $(srcdir) is not a parent of $(builddir).
66649 2012-07-28  John Darrington  <john@darrington.wattle.id.au>
66651         clean-temp: Fix memory leak.
66652         * lib/clean-temp.c (cleanup_temp_dir): Free also the 'subdirs' and
66653         'files' members of tmpdir.
66655 2012-07-27  Jim Meyering  <meyering@redhat.com>
66657         maint.mk: new rule: refresh-gnulib-patches
66658         I noticed that 8 of coreutils' 9 gl/**/*.diff files were stale.
66659         Use this rule to refresh them.
66660         * top/maint.mk (refresh-gnulib-patches): New rule.
66662 2012-07-24  Bruno Haible  <bruno@clisp.org>
66664         gnulib-tool: Fix handling of inctests variable.
66665         * gnulib-tool: Canonicalize $inctests also in 'update' mode.
66666         Reported by Nick Bowler <nbowler@elliptictech.com>.
66668 2012-07-22  Bruno Haible  <bruno@clisp.org>
66670         getpass: Assume AC_CHECK_DECLS_ONCE invocation, like in getpass.m4.
66671         * lib/getpass.h: Assume HAVE_DECL_GETPASS is defined.
66672         * cfg.mk (exclude_file_name_regexp--sc_prohibit_defined_have_decl_tests):
66673         Remove exemption for getpass.h.
66674         Suggested by Eric Blake.
66676 2012-07-20  Eric Blake  <eblake@redhat.com>
66678         verify: document conflict with -Wnested-externs
66679         * lib/verify.h: Give hint about usage when gcc warnings are enabled.
66681         maint.mk: forbid exit(-1)
66682         * top/maint.mk (sc_prohibit_magic_number_exit): Detect negatives.
66684 2012-07-20  Paul Eggert  <eggert@cs.ucla.edu>
66686         fsusage: port back to Solaris
66687         * lib/fsusage.c (get_fs_usage): Fix busted logic causing compile-time
66688         error (fsd not declared) on Solaris 10.  Reported privately by
66689         Andrew Borodin.
66691 2012-07-19  Akim Demaille  <akim@lrde.epita.fr>
66693         gnu-web-doc-update: fix error messages
66694         * build-aux/gnu-web-doc-update: Don't pass $ME to die.
66696         gnu-web-doc-update: check the requirements.
66697         * build-aux/gnu-web-doc-update (find_tool): Import from bootstrap.
66698         ($CVS, $CVSU, $GIT, $RSYNC, $XARGS): New.
66699         * build-aux/bootstrap (find_tool): Comment change.
66701 2012-07-17  Akim Demaille  <akim@lrde.epita.fr>
66703         maint.mk: minor simplication.
66704         * top/maint.mk (_sc_excl): Use $(or...) instead of $(if...)
66705         for default values.
66707 2012-07-15  Akim Demaille  <akim@lrde.epita.fr>
66709         gitlog-to-changelog: VPATH build issues
66710         If builddir is not a subdirectory of srcdir, running git from it will
66711         fail.
66712         * build-aux/gitlog-to-changelog (--srcdir): New option.
66714 2012-07-15  Bruno Haible  <bruno@clisp.org>
66716         fpending: Assume AC_CHECK_DECLS_ONCE invocation, like in fpending.m4.
66717         * lib/fpending.h: Assume HAVE_DECL___FPENDING is defined.
66718         * cfg.mk (exclude_file_name_regexp--sc_prohibit_defined_have_decl_tests)
66719         Remove exemption for fpending.h.
66720         Suggested by Eric Blake.
66722 2012-07-15  Paul Eggert  <eggert@cs.ucla.edu>
66724         pthread_sigmask: fix bug on FreeBSD 9
66725         * lib/pthread_sigmask.c [PTHREAD_SIGMASK_INEFFECTIVE]:
66726         Include string.h.
66727         (pthread_sigmask) [PTHREAD_SIGMASK_INEFFECTIVE]:
66728         When calling pthread_sigmask (1729, NEW, OLD), specify non-null NEW;
66729         this avoids a bug on FreeBSD 9, where pthread_sigmask is effective
66730         but pthread_sigmask (1729, NULL, NULL) returns zero.
66731         See <http://bugs.gnu.org/11884>.
66732         Avoid the need to call pthread_sigmask (1729, ...) in most cases,
66733         by inspecting whether the main call changed the old mask.
66735 2012-07-15  Reuben Thomas  <rrt@sc3d.org>
66737         README-release: make it more legible
66738         * top/README-release: Improve typography slightly.
66740 2012-07-15  Jim Meyering  <meyering@redhat.com>
66742         maint: require that each sc_... command start with "@"
66743         * Makefile (sc_prohibit_sc_omitted_at): New rule so that
66744         "make sc_maint" helps us avoid this nit.
66746 2012-07-15  Jim Meyering  <meyering@redhat.com>
66748         maint.mk: add leading "@" to quiet new "make syntax-check" rule
66749         * top/maint.mk (sc_prohibit_defined_have_decl_tests): Add "@".
66751 2012-07-13  Eric Blake  <eblake@redhat.com>
66753         maint.mk: new syntax check for HAVE_DECL checks
66754         * top/maint.mk (sc_prohibit_defined_have_decl_tests): New rule.
66755         * cfg.mk
66756         (exclude_file_name_regexp--sc_prohibit_defined_have_decl_tests):
66757         Exempt some false positives.
66758         Based on a report by Karel Zak.
66760         argp: make HAVE_DECL usage consistent
66761         * lib/argp-parse.c (__argp_parse): Check contents of HAVE_DECL
66762         macros, not whether they are defined.
66763         * m4/argp.m4 (gl_ARGP): Always define HAVE_DECL_* macros, per
66764         convention with other declaration checks.
66765         Reported by Karel Zak, with suggestions from Paul Eggert.
66767         stat-time: relax license to LGPLv2+
66768         * modules/stat-time (License): Relax, with consent of all authors.
66770         strndup: fix m4 usage error
66771         * m4/strndup.m4 (gl_FUNC_STRNDUP): HAVE_DECL_STRNDUP is always
66772         defined, to either 0 or 1.
66773         Reported by Karel Zak.
66775 2012-07-11  Jim Meyering  <meyering@redhat.com>
66777         maint: enable the sc_avoid_if_before_free syntax-check rule
66778         * cfg.mk (local-checks-to-skip): Enable sc_avoid_if_before_free.
66779         (if_before_free_offenders_): Define.
66780         (if_before_free_basename_re_): Define.
66781         Exempt current files with useless if-before-free.
66783 2012-07-11  Paul Eggert  <eggert@cs.ucla.edu>
66785         gettext: do not assume '#define ... defined ...' behavior
66786         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS):
66787         Do not use '#define FOO ... defined BAR ...', as the C standard says
66788         it's not portable to expect that this works after macro expansion.
66789         Problem reported for gzip by Steven M. Schweda in
66790         <http://lists.gnu.org/r/bug-gzip/2012-07/msg00000.html>.
66792 2012-07-10  Paul Eggert  <eggert@cs.ucla.edu>
66794         getloadavg: clean out old Emacs and Autoconf cruft
66795         See Glenn Morris in <http://bugs.gnu.org/11905>.
66796         * lib/getloadavg.c: Include <config.h>, <stdbool.h> always.
66797         Include <sys/param.h> if HAVE_SYS_PARAM_H, not if unix or __unix.
66798         (LDAV_CVT): Remove no-longer-used LOAD_AVE_CVT hook.
66799         * m4/getloadavg.m4 (gl_PREREQ_GETLOADAVG): Check for <sys/param.h>.
66801 2012-07-10  Akim Demaille  <akim@lrde.epita.fr>
66803         bootstrap: let warn be like tests/init.sh's warn_
66804         Reported by Jim Meyering.
66805         * build-aux/bootstrap (warn): Remove, replaced by...
66806         (warnf_, warn_): these.
66807         Adjust callers.
66808         Shorten messages that no longer fit in 80 columns.
66810 2012-07-09  Bruno Haible  <bruno@clisp.org>
66812         getopt: Simplify after Emacs changed.
66813         * m4/getopt.m4 (gl_FUNC_GETOPT_POSIX): Inline gl_GETOPT_IFELSE.
66814         (gl_GETOPT_IFELSE): Remove macro.
66816 2012-07-09  Jim Meyering  <meyering@redhat.com>
66818         maint.mk: add sc_vulnerable_makefile_CVE-2012-3386
66819         * top/maint.mk (sc_vulnerable_makefile_CVE-2012-3386): New rule.
66821         maint.mk: _sc_search_regexp, sc_vulnerable_makefile_CVE-2009-4029: fix
66822         Bugs in both of those conspired to make the
66823         sc_vulnerable_makefile_CVE-2009-4029 rule 99% useless.
66824         _sc_search_regexp's handling of non-empty $in_files would filter
66825         out any offending file names.  sc_vulnerable_makefile_CVE-2009-4029's
66826         choice of in_files value meant there would be no match in most
66827         projects, due to the presence of two or more Makefile.in files.
66828         * top/maint.mk (_sc_search_regexp) [in_vc_files,in_files]: Clarify.
66829         Fix a bug in how a non-empty $$in_files was processed:
66830         (sc_vulnerable_makefile_CVE-2009-4029): Fix erroneous use of in_files:
66831         in spite of the name, it's a regexp, not a list of file names.
66833 2012-07-09  Paul Eggert  <eggert@cs.ucla.edu>
66835         getloadavg, getopt: fix commentary re configure.in
66836         Autoconf is deprecating the name 'configure.in', so change it to
66837         to the new name 'configure.ac' in a couple of places.
66838         * lib/getloadavg.c: configure.in -> configure.ac, in comment.
66839         * m4/getopt.m4 (gl_GETOPT_IFELSE, gl_GETOPT_SUBSTITUTE_HEADER)
66840         (gl_PREREQ_GETOPT): Remove obsolete commentary re Emacs configure.in.
66841         Emacs has renamed it to configure.ac, and it no longer refers
66842         to these macros anyway.
66844         timespec: mark functions with const attributes
66845         * lib/timespec.h (timespec_add, timespec_sub, dtotimespec):
66846         Mark with _GL_ATTRIBUTE_CONST.
66848 2012-07-07  Ludovic Courtès  <ludo@gnu.org>
66850         canonicalize[-lgpl]: handle "guessing" values when cross-building
66851         * m4/canonicalize.m4 (gl_FUNC_CANONICALIZE_FILENAME_MODE)
66852         (gl_CANONICALIZE_LGPL): Check whether $gl_cv_func_realpath_works
66853         matches "*yes" instead of just "yes".  Regression introduced in commit
66854         e0bcf6626cde8dad4bfbdc4045c744f0cd8b9e24.
66856 2012-07-07  Ludovic Courtès  <ludo@gnu.org>
66857             Bruno Haible  <bruno@clisp.org>
66859         canonicalize: make the right guess when cross-compiling to GNU
66860         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Match also "gnu*" to
66861         determine whether cross-compiling to glibc systems, so as to
66862         include GNU/Hurd.
66864 2012-07-06  Paul Eggert  <eggert@cs.ucla.edu>
66866         timespec-sub: avoid duplicate include
66867         * lib/timespec-sub.c: Do not include <config.h> twice.
66868         Reported by Juanma Barranquero.
66870 2012-07-06  Akim Demaille  <akim@lrde.epita.fr>
66872         bootstrap: use a more consistent error reporting scheme
66873         * build-aux/bootstrap (warn, die): New.
66874         Use them.
66876 2012-07-05  Paul Eggert  <eggert@cs.ucla.edu>
66878         sys_time: allow too-wide tv_sec
66879         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Allow struct
66880         timeval even if tv_sec is wider than time_t.  This allows
66881         OpenBSD 5.1 amd64 and fixes an Emacs porting glitch with utimens.c,
66882         as without this patch gnulib replaces struct timeval
66883         and OpenBSD futimes therefore has a type mismatch.
66884         * doc/posix-headers/sys_time.texi: Mention this.
66886         pthread: check for both pthread_create and pthread_join
66887         * m4/pthread.m4 (gl_PTHREAD_CHECK): Revert previous change, but
66888         alter the check so that it tests for both pthread_create and
66889         pthread_join.  This should be more portable to hosts like OSF/1 5.1.
66890         Suggested by Bruno Haible and Richard Yao in
66891         <http://lists.gnu.org/r/bug-gnulib/2012-07/msg00048.html>.
66893         parse-datetime: doc tuneup
66894         * doc/parse-datetime.texi: Index "leap seconds" and fix minor
66895         spacing issues.
66897 2012-07-05  Akim Demaille  <akim@lrde.epita.fr>
66899         do-release-commit-and-tag: fix the previous commit
66900         * build-aux/do-release-commit-and-tag: Actually the test was right,
66901         but the comment and the error message were misleading.
66902         Fix comment, and improve error message.
66903         Perform check first, so that NEWS is not modified uselessly.
66905         do-release-commit-and-tag: fix typo
66906         * build-aux/do-release-commit-and-tag: Be sure that NEWS does
66907         _not_ start with a stub.
66909 2012-07-04  Paul Eggert  <eggert@cs.ucla.edu>
66911         pthread: check for pthread_create, not pthread_join
66912         * m4/pthread.m4 (gl_PTHREAD_CHECK): Check for pthread_create, not
66913         pthread_join.  On FreeBSD 9, pthread_create is in libpthread but
66914         pthread_join in libc.  I hope this removes the need for all the
66915         OSF/1 5.1 pthread_join business.  Reported by Richard Yao in
66916         <http://lists.gnu.org/r/bug-gnulib/2012-07/msg00042.html>.
66918 2012-07-04  Jim Meyering  <meyering@redhat.com>
66920         parse-datetime: fix failure to diagnose invalid input
66921         date -d "$(printf '\xb0')" would print 00:00:00 with today's date
66922         rather than diagnosing the invalid input.  Now it reports this:
66923         date: invalid date '\260'
66924         * lib/parse-datetime.y (to_uchar): Define.
66925         (yylex): Don't sign-extend "other" bytes.
66926         * m4/parse-datetime.m4: Require AC_C_INLINE for first use of "inline".
66927         Thanks to Bruno Haible for the patch to this file.
66928         * tests/test-parse-datetime.c (main): Add a test to trigger the bug.
66929         Peter Evans reported the bug in GNU date: http://bugs.gnu.org/11843
66931 2012-07-03  Jim Meyering  <meyering@redhat.com>
66933         bootstrap: do not require now-removed build-aux/missing
66934         Now that build-aux/missing is, er, missing, bootstrap would
66935         silently fail.
66936         * build-aux/bootstrap (gnulib_extra_files): Remove $build_aux/missing
66937         from the list, now that (since commit v0.0-7489-gd0f486f) the file is
66938         no longer part of gnulib.
66939         Diagnose the failure.
66941 2012-07-03  Paul Eggert  <eggert@cs.ucla.edu>
66943         alloca: add support for HP NonStop TNS/E native
66944         * lib/alloca.in.h (alloca): Support the new host.
66945         From a suggestion by Joachim Schmitz in
66946         <http://lists.gnu.org/r/bug-gnulib/2012-06/msg00355.html>.
66948 2012-07-02  Pádraig Brady  <P@draigBrady.com>
66950         fsusage: remove code not needed on non GNU/Linux systems.
66952         * lib/fsusage.c [STAT_STATVFS || STAT_STATVFS64]:
66953         Don't include headers no longer needed in this case.
66954         * lib/fsusage.c [STAT_STATVFS &&
66955         ! (__linux__ && (__GLIBC__||__UCLIBC__))]: Undefine
66956         STAT_STATFS2_FRSIZE to exclude code not used in this case.
66958 2012-07-02  Paul Eggert  <eggert@cs.ucla.edu>
66960         fsusage: include files needed for glibc 2.6 fallback
66961         * lib/fsusage.c [STAT_STATVFS || STAT_STATVFS64]:
66962         Include <sys/param.h>, <sys/mount.h>, <sys/vfs.h>
66963         as they are needed for the 2.6 < glibc/Linux < 2.6.36 fallback.
66964         Problem reported by Ludovic Courtès in
66965         <http://lists.gnu.org/r/bug-gnulib/2012-07/msg00005.html>.
66967         fsusage: avoid needless check on GNU/Linux
66968         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Omit STAT_STATFS3_OSF1 check
66969         on GNU/Linux systems, since it can't possibly work.
66971 2012-07-01  Bruno Haible  <bruno@clisp.org>
66973         log: Fix an autoconf >= 2.64 warning.
66974         * modules/log (configure.ac): Require, not invoke, gl_FUNC_LOG.
66975         Reported by Carlos O'Donell <carlos_odonell@mentor.com>.
66977 2012-06-28  Bruno Haible  <bruno@clisp.org>
66979         log10f: Fix possible configuration problem.
66980         * m4/log10f.m4 (gl_FUNC_LOG10F): Augment LIBS by $LOG10F_LIBM, not
66981         $LOGF_LIBM.
66982         Reported by Carlos O'Donell <carlos_odonell@mentor.com>.
66984 2012-06-28  Bruno Haible  <bruno@clisp.org>
66986         remove: No longer override on all platforms. Fixes bug from 2010-03-20.
66987         * m4/remove.m4 (gl_FUNC_REMOVE): Test gl_cv_func_unlink_honors_slashes,
66988         not gl_cv_func_unlink_works.
66989         Reported by Carlos O'Donell <carlos_odonell@mentor.com>.
66991 2012-06-27  Eric Blake  <eblake@redhat.com>
66993         config: drop scripts that automake says are not independent
66994         * config/srclist.txt: Drop elisp-comp, missing, and ylwrap.
66995         * build-aux/elisp-comp: Delete.
66996         * build-aux/missing: Likewise.
66997         * build-aux/ylwrap: Likewise.
66998         * modules/elisp-comp: Likewise.
66999         * MODULES.html.sh: Drop mention of elisp-comp.
67000         * NEWS: Mention this.
67002 2012-06-26  Paul Eggert  <eggert@cs.ucla.edu>
67004         root-uid: new module
67005         This is for portability to Tandem's NonStop Kernel.
67006         * lib/root-uid.h, modules/root-uid: New files.
67007         * lib/euidaccess.c, lib/pt_chown.c, lib/unlinkdir.c:
67008         * lib/write-any-file.c, tests/test-sethostname2.c:
67009         Include "root-uid.h".
67010         * lib/euidaccess.c (euidaccess):
67011         * lib/pt_chown.c (main):
67012         * lib/unlinkdir.c (cannot_unlink_dir):
67013         * lib/write-any-file.c (can_write_any_file):
67014         * m4/mknod.m4 (gl_FUNC_MKNOD):
67015         * tests/test-sethostname2.c (geteuid, main):
67016         Don't assume ROOT_UID == 0.
67017         * modules/euidaccess (Depends-on):
67018         * modules/pt_chown (Depends-on):
67019         * modules/sethostname-tests (Depends-on):
67020         * modules/unlinkdir (Depends-on):
67021         * modules/write-any-file (Depends-on):
67022         Add root-uid.
67024         regex: use locale-independent comparison for codeset name
67025         See Bruno Haible's comment in <http://bugs.gnu.org/10305#120>.
67026         * lib/regcomp.c (init_dfa): Use just ASCII case comparison
67027         for codeset name.
67028         * lib/regex_internal.h: Do not include <strings.h>, since we
67029         no longer use strcasecmp.
67030         * modules/regex (Depends-on): Remove strcase.
67032 2012-06-23  Bruno Haible  <bruno@clisp.org>
67034         getopt-posix: No longer guarantee that option processing is resettable.
67035         * doc/posix-functions/getopt.texi: Drop description of problem with
67036         internal state. Fix info about mingw and msvc9.
67037         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Don't require a resettable
67038         option processing by getopt(). Run three test programs instead of one.
67039         Simplify cross-compilation guess.
67040         * NEWS: Mention the change.
67041         Reported by Rich Felker <dalias@aerifal.cx>.
67043 2012-06-26  Bruno Haible  <bruno@clisp.org>
67045         argp, regex: Ensure strcasecmp gets declared.
67046         * lib/argp-help.c: Include <strings.h>.
67047         * lib/regex_internal.h: Likewise.
67048         Reported and suggested by Joachim Schmitz <jojo@schmitz-digital.de>.
67050 2012-06-24  Bruno Haible  <bruno@clisp.org>
67052         ptsname_r: Make it consistent with ptsname on AIX.
67053         * lib/ptsname_r.c (__ptsname_r): For AIX, use nearly the same
67054         implementation as for OSF/1.
67055         * tests/test-ptsname_r.c (main) [AIX]: Use the modern way of opening
67056         a pty master.
67058         ptsname_r: Make it consistent with ptsname on OSF/1.
67059         * lib/ptsname_r.c (__ptsname_r): Add a different implementation for
67060         OSF/1.
67062 2012-06-24  Bruno Haible  <bruno@clisp.org>
67064         ttyname_r: Fix result on OSF/1, Solaris.
67065         * lib/ttyname_r.c (ttyname_r): Produce a NUL-terminated result.
67067 2012-06-24  Bruno Haible  <bruno@clisp.org>
67069         ptsname_r: Add support for Solaris.
67070         * lib/ptsname_r.c (__ptsname_r): Add a different implementation for
67071         Solaris.
67073         ptsname_r: Fix test failure on native Windows.
67074         * modules/ptsname_r (Depends-on): Add isatty.
67076         ptsname_r: Fix test failures on IRIX, Solaris.
67077         * m4/ptsname_r.m4 (gl_PREREQ_PTSNAME_R): Test whether isatty sets
67078         errno when it fails. Define ISATTY_FAILS_WITHOUT_SETTING_ERRNO
67079         accordingly.
67080         * lib/ptsname_r.c: Include <fcntl.h>.
67081         (__ptsname_r): When isatty returned false, then on IRIX, Solaris
67082         set errno if fd is invalid.
67083         * tests/test-isatty.c (main): Update comments.
67085 2012-06-24  Bruno Haible  <bruno@clisp.org>
67087         ptsname test: Extend test.
67088         * tests/test-ptsname.c: Include <errno.h>.
67089         (main): Test behaviour with invalid file descriptor.
67091 2012-06-23  Paul Eggert  <eggert@cs.ucla.edu>
67093         time: fix obsolete comment
67094         * m4/time_h.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Remove obsolete
67095         reference to HAVE_STRUCT_TIMESPEC in comment.
67097 2012-06-23  Bruno Haible  <bruno@clisp.org>
67099         getopt-gnu: Handle suboptimal getopt_long's abbreviation handling.
67100         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): If getopt_long exists but
67101         does not handle abbreviated long options with equivalent
67102         disambiguations, set gl_replace_getopt to yes.
67103         * doc/posix-functions/getopt.texi: Mention the OpenBSD 5.0 problem.
67105 2012-06-22  Paul Eggert  <eggert@cs.ucla.edu>
67107         time_r: fix typo that always overrode localtime_r decl
67108         * m4/time_r.m4 (gl_TIME_R): Use AC_CHECK_DECLS, not
67109         AC_CHECK_DECLS_ONCE, since localtime_r is declared in <time.h>,
67110         not in a standard include.
67112 2012-06-22  Bruno Haible  <bruno@clisp.org>
67114         Write "Mac OS X" instead of "MacOS X".
67115         * README: Write "Mac OS X" instead of "MacOS X".
67116         * build-aux/bootstrap: Likewise.
67117         * build-aux/install-reloc: Likewise.
67118         * lib/acl-internal.h: Likewise.
67119         * lib/acl_entries.c: Likewise.
67120         * lib/argp-ba.c: Likewise.
67121         * lib/argp-pv.c: Likewise.
67122         * lib/config.charset: Likewise.
67123         * lib/copy-acl.c: Likewise.
67124         * lib/csharpexec.c: Likewise.
67125         * lib/euidaccess.c: Likewise.
67126         * lib/fbufmode.c: Likewise.
67127         * lib/fflush.c: Likewise.
67128         * lib/file-has-acl.c: Likewise.
67129         * lib/filemode.h: Likewise.
67130         * lib/fpurge.c: Likewise.
67131         * lib/freadable.c: Likewise.
67132         * lib/freadahead.c: Likewise.
67133         * lib/freading.c: Likewise.
67134         * lib/freadptr.c: Likewise.
67135         * lib/freadseek.c: Likewise.
67136         * lib/fseeko.c: Likewise.
67137         * lib/fseterr.c: Likewise.
67138         * lib/fsusage.c: Likewise.
67139         * lib/fwritable.c: Likewise.
67140         * lib/fwriting.c: Likewise.
67141         * lib/get-rusage-as.c: Likewise.
67142         * lib/get-rusage-data.c: Likewise.
67143         * lib/getdomainname.c: Likewise.
67144         * lib/idpriv-drop.c: Likewise.
67145         * lib/idpriv-droptemp.c: Likewise.
67146         * lib/localcharset.c: Likewise.
67147         * lib/locale.in.h: Likewise.
67148         * lib/localename.c: Likewise.
67149         * lib/mbsrtowcs-state.c: Likewise.
67150         * lib/nproc.c: Likewise.
67151         * lib/passfd.c: Likewise.
67152         * lib/posix_openpt.c: Likewise.
67153         * lib/printf-parse.c: Likewise.
67154         * lib/progreloc.c: Likewise.
67155         * lib/safe-read.h: Likewise.
67156         * lib/safe-write.h: Likewise.
67157         * lib/sched.in.h: Likewise.
67158         * lib/set-mode-acl.c: Likewise.
67159         * lib/signal.in.h: Likewise.
67160         * lib/stdint.in.h: Likewise.
67161         * lib/stdio-impl.h: Likewise.
67162         * lib/stdlib.in.h: Likewise.
67163         * lib/strtod.c: Likewise.
67164         * lib/sys_select.in.h: Likewise.
67165         * lib/tcgetsid.c: Likewise.
67166         * lib/unistd.in.h: Likewise.
67167         * lib/unlockpt.c: Likewise.
67168         * lib/vasnprintf.c: Likewise.
67169         * lib/vma-iter.c: Likewise.
67170         * lib/wcsrtombs-state.c: Likewise.
67171         * m4/acl.m4: Likewise.
67172         * m4/acosl.m4: Likewise.
67173         * m4/asinl.m4: Likewise.
67174         * m4/atanl.m4: Likewise.
67175         * m4/c-stack.m4: Likewise.
67176         * m4/cosl.m4: Likewise.
67177         * m4/expl.m4: Likewise.
67178         * m4/extensions.m4: Likewise.
67179         * m4/fdatasync.m4: Likewise.
67180         * m4/fmal.m4: Likewise.
67181         * m4/frexp.m4: Likewise.
67182         * m4/frexpf.m4: Likewise.
67183         * m4/frexpl.m4: Likewise.
67184         * m4/fsusage.m4: Likewise.
67185         * m4/getdomainname.m4: Likewise.
67186         * m4/getloadavg.m4: Likewise.
67187         * m4/getopt.m4: Likewise.
67188         * m4/gettext.m4: Likewise.
67189         * m4/gnulib-common.m4: Likewise.
67190         * m4/intdiv0.m4: Likewise.
67191         * m4/intlmacosx.m4: Likewise.
67192         * m4/largefile.m4: Likewise.
67193         * m4/ldexpl.m4: Likewise.
67194         * m4/link-follow.m4: Likewise.
67195         * m4/locale-ar.m4: Likewise.
67196         * m4/locale-fr.m4: Likewise.
67197         * m4/locale-ja.m4: Likewise.
67198         * m4/locale-tr.m4: Likewise.
67199         * m4/locale-zh.m4: Likewise.
67200         * m4/locale_h.m4: Likewise.
67201         * m4/lock.m4: Likewise.
67202         * m4/logl.m4: Likewise.
67203         * m4/mathfunc.m4: Likewise.
67204         * m4/minus-zero.m4: Likewise.
67205         * m4/mktime.m4: Likewise.
67206         * m4/mmap-anon.m4: Likewise.
67207         * m4/multiarch.m4: Likewise.
67208         * m4/nanosleep.m4: Likewise.
67209         * m4/nocrash.m4: Likewise.
67210         * m4/poll.m4: Likewise.
67211         * m4/printf-frexpl.m4: Likewise.
67212         * m4/printf.m4: Likewise.
67213         * m4/signbit.m4: Likewise.
67214         * m4/sinl.m4: Likewise.
67215         * m4/sqrtl.m4: Likewise.
67216         * m4/strerror_r.m4: Likewise.
67217         * m4/tanl.m4: Likewise.
67218         * m4/threadlib.m4: Likewise.
67219         * m4/ttyname_r.m4: Likewise.
67220         * m4/unlink.m4: Likewise.
67221         * m4/visibility.m4: Likewise.
67222         * m4/wcwidth.m4: Likewise.
67223         * tests/minus-zero.h: Likewise.
67224         * tests/test-alloca-opt.c: Likewise.
67225         * tests/test-copy-acl.sh: Likewise.
67226         * tests/test-copy-file.sh: Likewise.
67227         * tests/test-fdatasync.c: Likewise.
67228         * tests/test-file-has-acl.sh: Likewise.
67229         * tests/test-flock.c: Likewise.
67230         * tests/test-fsync.c: Likewise.
67231         * tests/test-localename.c: Likewise.
67232         * tests/test-malloca.c: Likewise.
67233         * tests/test-nonblocking-pipe.h: Likewise.
67234         * tests/test-nonblocking-socket.h: Likewise.
67235         * tests/test-openpty.c: Likewise.
67236         * tests/test-posix_openpt.c: Likewise.
67237         * tests/test-ptsname.c: Likewise.
67238         * tests/test-ptsname_r.c: Likewise.
67239         * tests/test-sameacls.c: Likewise.
67240         * tests/test-select.h: Likewise.
67241         * tests/test-set-mode-acl.sh: Likewise.
67242         * tests/test-snprintf-posix.h: Likewise.
67243         * tests/test-sprintf-posix.h: Likewise.
67244         * tests/test-strtod.c: Likewise.
67245         * tests/test-time.c: Likewise.
67246         * tests/test-vasnprintf-posix.c: Likewise.
67247         * tests/test-vasprintf-posix.c: Likewise.
67248         * doc/acl-resources.txt: Likewise.
67249         * doc/**/*.texi: Likewise.
67250         Reported by Max Horn <max@quendi.de>.
67252 2012-06-22  Bruno Haible  <bruno@clisp.org>
67254         grantpt: Relax requirement regarding invalid file descriptors.
67255         * lib/grantpt.c: Don't include <fcntl.h>.
67256         (grantpt): Don't verify the validity of the file descriptor.
67257         * modules/grantpt (Depends-on): Remove fcntl-h.
67258         * tests/test-grantpt.c (main): Allow grantpt to succeed for invalid
67259         file descriptors.
67260         * doc/posix-functions/grantpt.texi: Document more platforms on which
67261         grantpt succeeds for invalid file descriptors.
67262         Reported by Rich Felker <dalias@aerifal.cx>.
67264 2012-06-22  Bruno Haible  <bruno@clisp.org>
67266         fbufmode test: Don't test unportable behaviour.
67267         * tests/test-fbufmode.c (test_mode): New function, extracted from main.
67268         (main): Invoke it three times.
67269         Reported by Szabolcs Nagy <nsz@port70.net>
67270         and Rich Felker <dalias@aerifal.cx>.
67272 2012-06-21  Bruno Haible  <bruno@clisp.org>
67274         gnulib-tool: Refactor inctests variable.
67275         * gnulib-tool: Normalize inctests to 'true' or 'false', not ''.
67276         (func_modules_transitive_closure,
67277         func_modules_transitive_closure_separately,
67278         func_import, func_create_testdir): Update.
67280         gnulib-tool: --create-[mega]testdir, --[mega]test implies --with-tests.
67281         * gnulib-tool: Accept option --without-tests.
67282         (func_usage): Document --without-tests option. Rearrange.
67283         (inctests): Normalize according to the mode.
67284         * NEWS: Mention the change.
67285         Suggested by Simon Josefsson.
67287 2012-06-21  Bruce Korb  <bkorb@gnu.org>
67289         parse-duration test: Avoid spurious output.
67290         * tests/test-parse-duration.sh: Reindent with leading tabs.
67292 2012-06-21  Jim Meyering  <meyering@redhat.com>
67294         maint: disable the strncpy prohibition
67295         * cfg.mk: Do not prohibit strncpy here.
67297 2012-06-21  Bruno Haible  <bruno@clisp.org>
67299         nonblocking: Avoid compilation error on mingw64.
67300         * m4/stdio_h.m4 (gl_STDIO_H): Invoke gl_MODULE_INDICATOR for scanf,
67301         fscanf.
67302         * modules/vscanf (configure.ac): Invoke gl_MODULE_INDICATOR.
67303         * modules/vfscanf (configure.ac): Likewise.
67304         * lib/stdio-read.c (scanf, fscanf, vscanf, vfscanf): Enable function
67305         definition only if stdio.h has prepared it.
67306         Reported by Daniel P. Berrange <berrange@redhat.com>.
67308 2012-06-20  Bernd Jendrissek  <bernd.jendrissek@gmail.com>  (tiny change)
67310         gnulib-tool: Use readlink if it is available.
67311         * gnulib-tool (func_readlink): Choose function more appropriately.
67313 2012-06-21  Paul Eggert  <eggert@cs.ucla.edu>
67315         posixtm-tests: port to buggy compiler
67316         Problem reported by Simon Josefsson in
67317         <http://lists.gnu.org/r/bug-gnulib/2012-06/msg00246.html>.
67318         * modules/posixtm-tests (Depends-on): Add stdint.
67319         * tests/test-posixtm.c (struct posixtm_test.t_expected):
67320         Now of type int_least64_t, not int64_t, both because that's
67321         what INT64_C returns and because int_least64_t works even
67322         on 72-bit hosts.
67323         (T): Use INT64_C on constants outside the traditional int range,
67324         to work around compiler bug noted by Simon.
67326         mktime: fix integer overflow in 'configure'-time test
67327         * m4/mktime.m4 (gl_FUNC_MKTIME): Do not rely on undefined behavior
67328         after integer overflow.  Problem reported by Rich Felker in
67329         <http://lists.gnu.org/r/bug-gnulib/2012-06/msg00257.html>.
67330         Also, don't look for further instances of a bug if we've already
67331         found one instance; this helps 'configure' run faster.
67333 2012-06-20  John Darrington  <john@darrington.wattle.id.au>  (tiny change)
67335         tmpfile, clean-temp: Fix invocation of GetVersionEx.
67336         * lib/tmpfile.c (supports_delete_on_close): Initialize parameter for
67337         GetVersionEx correctly.
67338         * lib/clean-temp.c (supports_delete_on_close): Likewise.
67340 2012-06-20  Bruno Haible  <bruno@clisp.org>
67342         fdopen: Allow implementations that don't reject invalid fd arguments.
67343         * m4/fdopen.m4 (gl_FUNC_FDOPEN): Let the test pass if fdopen(-1,...)
67344         succeeds.
67345         Reported by Rich Felker <dalias@aerifal.cx>.
67347 2012-06-20  Simon Josefsson  <simon@josefsson.org>
67349         * modules/parse-duration-tests (test_parse_duration_LDADD): Don't
67350         bring in LIBINTL.
67352 2012-06-20  Paul Eggert  <eggert@cs.ucla.edu>
67354         init.sh: do not rely on autoupated PWD
67355         This addresses symptoms of the problem reported by Nelson H.F. Beebe in
67356         <http://lists.gnu.org/r/bug-gzip/2012-06/msg00008.html>.
67357         Although Nelson's bug was not necessarily fixed by this patch,
67358         it seems wise to make the change for safety.
67359         * tests/init.sh (path_prepend_): Do not rely on PWD updating
67360         automagically after 'cd'; this is not reliable on older shells.
67361         (setup_): Fail if we cannot cd to temporary directory.
67363 2012-06-19  Bruno Haible  <bruno@clisp.org>
67365         stat, fstat: Avoid warnings on mingw64.
67366         * lib/stat.c (stat) [_GL_WINDOWS_64_BIT_ST_SIZE]: Undefine before
67367         redefining.
67368         * lib/fstat.c (stat, fstat) [_GL_WINDOWS_64_BIT_ST_SIZE]: Likewise.
67369         Reported by Daniel P. Berrange <berrange@redhat.com>.
67371 2012-06-19  Bruno Haible  <bruno@clisp.org>
67373         stdioext: Add support for musl libc.
67375         * m4/fbufmode.m4 (gl_FUNC_FBUFMODE): Test whether __fbufsize exists.
67376         * lib/fbufmode.c (fbufmode): Add conditional code for musl.
67378         * m4/fseterr.m4: New file.
67379         * lib/fseterr.h (fseterr): Define as an alias of __fseterr if that
67380         function exists.
67381         * modules/fseterr (Files): Add m4/fseterr.m4.
67382         (configure.ac): Invoke gl_FUNC_FSETERR. Compile fseterr.c if
67383         __fseterr does not exist.
67384         (Makefile.am): Remove fseterr.c from lib_SOURCES.
67386         * lib/freadable.h: Update comment.
67388         * lib/fwritable.h: Update comment.
67390         * lib/freading.h: Update comment.
67392         * lib/fwriting.h: Update comment.
67394         * m4/freadahead.m4: New file.
67395         * lib/freadahead.h (freadahead): Define as an alias of __freadahead if
67396         that function exists.
67397         * modules/freadahead (Files): Add m4/freadahead.m4.
67398         (configure.ac): Invoke gl_FUNC_FREADAHEAD. Compile freadahead.c if
67399         __freadahead does not exist.
67400         (Makefile.am): Remove freadahead.c from lib_SOURCES.
67402         * m4/freadptr.m4: New file.
67403         * lib/freadptr.h (freadptr): Define as an alias of __freadptr if that
67404         function exists.
67405         * modules/freadptr (Files): Add m4/freadptr.m4.
67406         (configure.ac): Invoke gl_FUNC_FREADPTR. Compile freadptr.c if
67407         __freadptr does not exist.
67408         (Makefile.am): Remove freadptr.c from lib_SOURCES.
67410         * m4/freadseek.m4: New file.
67411         * lib/freadseek.c (freadptrinc): Use __freadptrinc if that function
67412         exists.
67413         * modules/freadseek (Files): Add m4/freadseek.m4.
67414         (configure.ac): Invoke gl_FUNC_FREADSEEK.
67416         * lib/fpurge.c (fpurge): Update comment.
67418         Reported by and with help from Rich Felker <dalias@aerifal.cx>.
67420 2012-06-19  Bruno Haible  <bruno@clisp.org>
67422         *printf-posix: Put more info into config.log.
67423         * m4/printf.m4 (gl_PRINTF_ENOMEM): Emit conftest's error output and
67424         exit code into config.log.
67426 2012-06-19  Bruno Haible  <bruno@clisp.org>
67428         getopt-gnu: Fix exit code overflow in autoconf test.
67429         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Squash exit code values,
67430         to keep them below < 128.
67432 2012-06-17  Jim Meyering  <meyering@redhat.com>
67434         maint.mk: fix typo in code to derive GPG key at release time
67435         * top/maint.mk (gpg_key_ID): Fix typo: $3 -> $$3
67437 2012-06-17  Paul Eggert  <eggert@cs.ucla.edu>
67439         regex: avoid warning when pointers are not long
67440         * lib/regcomp.c (parse_dup_op, mark_opt_subexp): Cast between void *
67441         and uintptr_t, not long, for portability to hosts where pointers and
67442         long have different sizes.  Issue noted by Daniel P. Berrange in
67443         <http://lists.gnu.org/r/bug-gnulib/2012-06/msg00122.html>
67444         and fix suggested by Bruno Haible in
67445         <http://lists.gnu.org/r/bug-gnulib/2012-06/msg00128.html>.
67447 2012-06-17  Bruno Haible  <bruno@clisp.org>
67449         dummy: Relicense into the public domain.
67450         * modules/dummy (License): Set to "public domain".
67451         Suggested by Reuben Thomas.
67453 2012-06-12  Akim Demaille  <akim@lrde.epita.fr>
67455         announce-gen: VPATH issues
67456         * build-aux/announce-gen (--srcdir): New option, used to trim the
67457         $srcdir part of the path from $builddir to NEWS.
67458         * top/maint.mk (announcement): Adjust.
67460 2012-06-12  Akim Demaille  <akim@lrde.epita.fr>
67462         gnu-web-doc-update: VPATH builds
67463         * build-aux/gnu-web-doc-update (--builddir): New option.
67464         Revamp the handling of options.
67465         Prefer $(...) to `...`.
67466         Don't pass --tmpdir=. to mktemp, it is useless given that we specify
67467         the template, and it is GNU mktemp specific.
67468         Prefer set -e to long series of &&.
67469         Restore the initial git branch, not "master".
67470         Properly initialize submodules (don't rely only on bootstrap).
67471         Do not reconfigure blindly, use config.status.
67472         * top/README-release: Update instructions for gnu-web-doc-update.
67474 2012-06-11  Jim Meyering  <meyering@redhat.com>
67476         maint.mk: revert most of the previous change re "all these"
67477         * top/maint.mk (prohibit_undesirable_word_seq_RE_): Remove that pair.
67478         For rationale, see the discussion at
67479         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/30912
67481 2012-06-10  Karl Berry  <karl@gnu.org>
67483         * build-aux/gnupload: with --dry-run, do not ask for gpg pw.
67485         * build-aux/gnupload: implement --replace, ftp-upload protocol v1.2.
67487 2012-06-10  Bruce Korb  <bkorb@gnu.org>
67489         parse-duration: Relicense under LGPLv2+.
67490         * modules/parse-duration (License): Change to LGPLv2+.
67492 2012-06-10  Jim Meyering  <meyering@redhat.com>
67494         maint.mk: prohibit common grammar error: "all these"
67495         * top/maint.mk (prohibit_undesirable_word_seq_RE_): Add "all these" to
67496         the list of prohibited word sequences.  It should be "all of these".
67497         * lib/tempname.c (__gen_tempname): Fix one of them.
67499 2012-06-07  Akim Demaille  <akim@lrde.epita.fr>
67501         do-release-commit-and-tag: support VPATH builds
67502         * build-aux/do-release-commit-and-tag: Prefer $(...) to `...`.
67503         (noteworthy): Defined earlier to factor its value.
67504         (noteworthy_stub): New.
67505         Use it to factor.
67506         (help_version): Split into...
67507         (help, version): these.
67508         Adjust the option processing part.
67509         Support "--option=value" in addition to "--option value".
67510         (builddir): New.
67511         (--builddir): New option.
67512         * top/README-release: Document this.
67513         Reword slightly so that the reader cannot understand that he
67514         has to do these steps before calling do-release-commit-and-tag.
67516 2012-06-07  Akim Demaille  <akim@lrde.epita.fr>
67518         readme-release: also require announce-gen and maintainer-makefile
67519         * modules/readme-release (Depends-on): here.
67520         * modules/announce-gen, modules/do-release-commit-and-tag,
67521         modules/gnu-web-doc-update, modules/maintainer-makefile
67522         (Description): Point to readme-release.
67524 2012-06-07  Akim Demaille  <akim@lrde.epita.fr>
67526         maint.mk: fix VPATH issues.
67527         * top/maint.mk (news-check): GNU Make understand $< very well.
67528         (release-prep): NEWS is in $(srcdir).
67530 2012-06-05  Akim Demaille  <akim@lrde.epita.fr>
67532         readme-release: require the promoted modules.
67533         * modules/readme-release (Depends-on): Add
67534         do-release-commit-and-tag, gnupload, and gnu-web-doc-update, used
67535         in this text.
67537 2012-05-21  Paolo Bonzini  <bonzini@gnu.org>
67538             Bruno Haible  <bruno@clisp.org>
67540         error, strerror-override: Support mingw64 from Fedora 17.
67541         * lib/errno.in.h (GNULIB_defined_ESTREAMS): Use a different indicator
67542         for ETXTBSY, ENODATA, ENOSR, ENOSTR, ETIME, EOTHER, compared to
67543         EINPROGRESS.
67544         * lib/strerror-override.h (strerror_override): Test it.
67545         * lib/strerror-override.c (strerror_override): Likewise.
67546         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Test also ETXTBSY.
67548 2012-05-21  Paolo Bonzini  <bonzini@gnu.org>
67549             Bruno Haible  <bruno@clisp.org>
67551         error, strerror-override: Support mingw64 from Fedora 17.
67552         * lib/errno.in.h (GNULIB_defined_ENOTRECOVERABLE): Use a different
67553         indicator for ENOTRECOVERABLE, compared to EOWNERDEAD.
67554         * lib/strerror-override.h (strerror_override): Test it.
67555         * lib/strerror-override.c (strerror_override): Likewise.
67557 2012-06-03  Bruno Haible  <bruno@clisp.org>
67559         error, strerror-override: Support new errno values from POSIX:2008.
67560         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Test also EOWNERDEAD and
67561         ENOTRECOVERABLE.
67562         * lib/errno.in.h (EOWNERDEAD, ENOTRECOVERABLE): Define on all
67563         platforms.
67564         * lib/strerror-override.c (strerror_override): Conditionalize the
67565         EOWNERDEAD, ENOTRECOVERABLE handling on GNULIB_defined_EOWNERDEAD.
67566         * lib/strerror-override.h (strerror_override): Declare also if
67567         GNULIB_defined_EOWNERDEAD is defined.
67568         * tests/test-errno.c (e130, e131): New variables.
67569         * doc/posix-headers/errno.texi: Mention the status for EOWNERDEAD,
67570         ENOTRECOVERABLE.
67571         Reported by Paolo Bonzini.
67573 2012-05-31  Jim Meyering  <meyering@redhat.com>
67575         savewd: add missing dependency on sys_wait module
67576         * modules/savewd (Depends-on): Add sys_wait, needed at least
67577         for MSVC.  Report and suggested change by Michael Goffioul.
67579 2012-05-29  Paul Eggert  <eggert@cs.ucla.edu>
67581         system-quote-tests: port to CentOS 5
67582         Problem reported by Tom G. Christensen in
67583         <http://lists.gnu.org/r/bug-gnulib/2012-05/msg00255.html>.
67584         * tests/test-system-quote-child.c (fclose, fprintf): Undef.
67586 2012-05-29  Jim Meyering  <meyering@redhat.com>
67588         maint: fix typos in comments and ChangeLog
67589         Culprits identified and fixed mostly automatically using these commands:
67590         git ls-files | misspellings -f - |grep -v '^ERROR:' |perl -pe \
67591         's/^(.*?)\[(\d+)\]: (\w+) -> "(.*?)"$/sed -i '\''${2}s!$3!$4!'\'' $1/'
67592         using http://github.com/lyda/misspell-check
67593         * ChangeLog: Fix typos.
67594         * doc/solaris-versions: Likewise.
67595         * lib/regexec.c (re_search_stub): Likewise.
67596         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Likewise.
67598 2012-05-27  Paul Eggert  <eggert@cs.ucla.edu>
67600         manywarnings: remove duplicate -Wmultichar entry
67601         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Remove duplicate
67602         entry for -Wmultichar.  -Wno-multichar is in the GCC 4.7.0 manual,
67603         so keep the entry marked as documented.
67605 2012-05-27  Karl Berry  <karl@gnu.org>
67607         * config/srclist.txt (mktime.c): remove last libc sync,
67608         perhaps just temporarily.
67610 2012-05-26  Paul Eggert  <eggert@cs.ucla.edu>
67612         regex: don't assume uint64_t or uint32_t
67613         * lib/regcomp.c (init_word_char): Don't assume that the types
67614         uint64_t and uint32_t exist.  The C standard doesn't guarantee
67615         them, and on some 32-bit compilers there is no uint64_t.
67616         Problem reported by Gianluigi Tiesi in
67617         <http://lists.gnu.org/r/bug-gnulib/2012-03/msg00154.html>.
67619 2012-05-25  Jim Meyering  <meyering@redhat.com>
67621         maint.mk: add strncpy-prohibiting syntax-check rule
67622         * top/maint.mk (sc_prohibit_strncpy): New rule, from coreutils.
67624 2012-05-24  Jim Meyering  <meyering@redhat.com>
67626         maint.mk: compute $(gpg_key_ID) more portably
67627         * top/maint.mk (gpg_key_ID): Use awk in place of sed '{...;...;}'.
67628         That use of sed is not portable to some fringe systems.
67629         Reported by Paul Eggert in
67630         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/30793/focus=30802
67632 2012-05-23  Paul Eggert  <eggert@cs.ucla.edu>
67634         mktime: sync from glibc
67635         * config/srclist.txt: Uncomment mktime.c.
67636         * lib/mktime.c: Sync from glibc master.  This incorporates 3 changes.
67637         First, indent with tabs, since glibc uses tabs and doesn't want to
67638         change and we'd rather be identical to glibc.  Also, two small
67639         coding changes:
67640         (isdst_differ): Use &&, not &, as && is the usual style.
67641         (__mktime_internal): Rename local var from abs_diff to approx_abs_diff
67642         for clarity.
67644 2012-05-23  Akim Demaille  <akim@lrde.epita.fr>
67646         announce-gen: du -h is more portable than du --human
67647         * build-aux/announce-gen (sizes): Invoke du with -h instead
67648         of --human.  Accept leading white space in its output.
67650 2012-05-23  Akim Demaille  <akim@lrde.epita.fr>
67652         announce-gen: Improve diagnostics.
67653         * build-aux/announce-gen: When parsing command line options,
67654         prefer "announce-gen: option --release-type requires an argument"
67655         to "Option release-type requires an argument".
67657 2012-05-23  Akim Demaille  <akim@lrde.epita.fr>
67659         maint.mk: gpg_key_ID: use sed more portably
67660         * top/maint.mk (gpg_key_ID): End sed block with a semicolon before
67661         the closing brace.
67662         (refresh-po): Fuse two sed invocations into one.
67664 2012-05-15  Akim Demaille  <akim@lrde.epita.fr>
67666         gitlog-to-changelog: support the log message format used in Bison.
67667         * build-aux/gitlog-to-changelog: Support --strip-tab and
67668         --strip-cherry-picked.
67670 2012-05-21  Paolo Bonzini  <bonzini@gnu.org>
67672         poll/select: prevent busy-waiting.  SwitchToThread() only gives away
67673         the rest of the current time slice to another thread in the current
67674         process. So if the thread that feeds the file decscriptor we're
67675         polling is not in the current process, we get busy-waiting.
67676         * lib/poll.c: Use SleepEx(1, TRUE) instead of SwitchToThread().
67677         Patch from Theodore Leblond.
67678         * lib/select.c: Split polling out of the loop that sets the output
67679         fd_sets.  Check for zero result and loop if the wait timeout is
67680         infinite.
67682 2012-05-21  Simon Josefsson  <simon@josefsson.org>
67684         select: Fix build error on IRIX 6.5.
67685         * lib/select.c: Include stddef.h for NULL.
67687 2012-05-21  Simon Josefsson  <simon@josefsson.org>
67689         gc: fix libgcrypt detection on older machines.
67690         * m4/gc.m4: Reject libgcrypt earlier than 1.4.4.  Collapse
67691         copyright years because the file has been distributed every year
67692         since it was created.
67694 2012-05-18  Paul Eggert  <eggert@cs.ucla.edu>
67696         crypto: fix bug in large buffer handling
67697         Problem reported by Serge Belyshev for glibc in
67698         <http://sourceware.org/bugzilla/show_bug.cgi?id=14090> and for gnulib in
67699         <http://lists.gnu.org/r/bug-gnulib/2012-05/msg00226.html>.
67700         * lib/md4.c (md4_process_block):
67701         * lib/md5.c (md5_process_block):
67702         * lib/sha1.c (sha1_process_block):
67703         * lib/sha256.c (sha256_process_block):
67704         Don't assume the buffer length is less than 2**32.
67705         * lib/sha512.c (sha512_process_block): Likewise.
67706         Here, the bug is present only in the rare case where the host does
67707         not support uint64_t or where size_t is wider than 64 bits.
67708         Use u64size to work around the problems.
67709         * lib/u64.h (u64size): New macro.
67711 2012-05-15  Pádraig Brady  <P@draigBrady.com>
67713         fsusage: fix block size returned on older Linux 2.6
67715         * lib/fsusage.c: Fall back to (struct statfs).f_frsize
67716         which is available since Linux 2.6.
67717         * m4/fsusage.m4 (STAT_STATFS2_FRSIZE): Always define
67718         when the member is available so it can be used as a fallback.
67719         * doc/posix-functions/statvfs.texi: Mention the hang issue
67720         on Linux < 2.6.36.
67722 2012-05-14  Paul Eggert  <eggert@cs.ucla.edu>
67724         bootstrap: suppress stderr chatter
67725         * build-aux/bootstrap (insert_sorted_if_absent, main program):
67726         Omit unnecessary chatter to stderr.  The main program chatter
67727         was there only inadvertantly.
67729         bootstrap: .gitignore files created by autopoint, libtool
67730         I ran into this problem when bootstrapping the latest diffutils.
67731         After './bootstrap', 'git status' reported lots of untracked files
67732         m4/codeset.m4, m4/gettext.m4, etc.  These files were created by
67733         autopoint and do not need to be version-controlled.
67734         * build-aux/bootstrap: Put into .gitignore the files that
67735         autopoint and libtool create, by keeping track of files that exist
67736         after but not before these programs are run.
67737         (version_controlled_file): Move up.  2nd arg is now full file
67738         name, not base name; this is more convenient.  Put CVS at the end,
67739         as it's now somewhat deprecated.
67741 2012-05-14  Jim Meyering  <meyering@redhat.com>
67743         ignore-value.h: remove unused _GL_ATTRIBUTE_DEPRECATED definition
67744         * lib/ignore-value.h (_GL_ATTRIBUTE_DEPRECATED): Remove now-unused
67745         definition.  Reported by Bruno Haible.
67747 2012-05-13  Bruno Haible  <bruno@clisp.org>
67748             Paul Eggert  <eggert@cs.ucla.edu>
67750         binary-io: Define set_binary_mode function.
67751         * lib/binary-io.h (set_binary_mode): New function.
67752         (SET_BINARY): Define in terms of set_binary_mode.
67753         * modules/binary-io (configure.ac): Require AC_C_INLINE.
67754         * tests/test-binary-io.c (main): Accept an argument, and test either
67755         set_binary_mode or SET_BINARY depending on the argument.
67756         * tests/test-binary-io.sh: Invoke test-binary-io twice, with an
67757         argument. Clean up also t-bin-out0.tmp.
67759 2012-05-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
67761         bootstrap: take advantage of POSIX shell features
67763         The 'bootstrap' script offered by Gnulib script already uses POSIX
67764         shell features (like $((...)) arithmetic expansions) that are not
67765         supported by legacy Bourne shells like Solaris 10 /bin/sh.  This
67766         means that bootstrap must already be run using a proper POSIX shell,
67767         which will thus provide more features, like ${var#pattern} parameter
67768         expansion or inversion of a command exit status with '!'.  We can
67769         thus use these features to improve the clarity and the performances
67770         of the bootstrap script.
67772         Suggested by Eric Blake.
67774         * build-aux/bootstrap: Prefer xpg4 parameter expansions over use
67775         of sed/expr plus command substitutions, to save some forks.  While
67776         we are at it, prefer the POSIX $(...) form of command substitution,
67777         rather than the legacy form `...` (since the former is visually
67778         clearer and interacts better with quoting), and prefer the idiom:
67779           "if ! CMD; then ACTION ..."
67780         over the idiom:
67781           "if CMD; then :; else ACTION ..."
67782         which was required by legacy Bourne shells not supporting '!'.
67784 2012-05-12  Bruno Haible  <bruno@clisp.org>
67786         system-quote: Add more comments.
67787         * lib/system-quote.h: Add more comments about wilcards and limitations.
67788         Suggested by Eli Zaretskii <eliz@gnu.org>.
67790         sh-quote, system-quote: Add comments about wildcards.
67791         * lib/sh-quote.h: Clarify what happens with wildcard characters.
67792         * lib/system-quote.h: Likewise.
67793         Reported by Eli Zaretskii <eliz@gnu.org>.
67795 2012-05-11  Paul Eggert  <eggert@cs.ucla.edu>
67797         fsusage: check for GNU/Linux statvfs problem dynamically
67798         * lib/fsusage.c [STAT_STATVFS && __linux__ && (__GLIBC__||__UCLIBC__)]:
67799         Define STAT_STATFS2_BSIZE too, since in this case the code now
67800         checks dynamically whether statvfs is reliable, falling back on
67801         Linux-style statfs otherwise.
67802         (statvfs_works): New function, for dynamically testing statvfs.
67803         (get_fs_usage) [STAT_STATVFS]: Use it.
67804         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Remove static check for
67805         statvfs on GNU/Linux hosts, since it's now done dynamically.
67807 2012-05-10  Bruno Haible  <bruno@clisp.org>
67809         system-quote, execute, spawn-pipe: Escape '?' on Windows.
67810         * lib/system-quote.c (SHELL_SPECIAL_CHARS, CMD_SPECIAL_CHARS): Add the
67811         '?' character.
67812         * lib/w32spawn.h (SHELL_SPECIAL_CHARS): Likewise.
67813         * tests/test-system-quote-main.c (check_all): Check also strings like
67814         "??????????".
67815         Reported by Eli Zaretskii <eliz@gnu.org>.
67817 2012-05-10  Paul Eggert  <eggert@cs.ucla.edu>
67819         _Noreturn: port config.h to gcc -Wundef
67820         * m4/gnulib-common.m4 (gl_COMMON_BODY): Check that __STDC_VERSION__ is
67821         defined before using it, for gcc -Wundef.  Reported by Akim Demaille in
67822         <http://lists.gnu.org/r/bug-gnulib/2012-05/msg00147.html>.
67824 2012-05-10  Bruno Haible  <bruno@clisp.org>
67826         system-quote: Refactor.
67827         * lib/system-quote.h (system_quote_copy): Fix comment.
67828         * lib/system-quote.c (windows_createprocess_quote, windows_cmd_quote):
67829         New functions, extracted from system_quote_copy.
67830         (system_quote_length, system_quote_copy): Use these functions.
67831         Reported by Paul Eggert.
67833 2012-05-08  Bruno Haible  <bruno@clisp.org>
67835         execute, spawn-pipe: Escape '*' characters in arguments on Windows.
67836         * lib/w32spawn.h (SHELL_SPECIAL_CHARS): Add the '*' character.
67838 2012-05-08  Bruno Haible  <bruno@clisp.org>
67840         Tests for module 'system-quote'.
67841         * modules/system-quote-tests: New file.
67842         * tests/test-system-quote.sh: New file.
67843         * tests/test-system-quote-main.c: New file.
67844         * tests/test-system-quote-child.c: New file.
67846         New module 'system-quote'.
67847         * lib/system-quote.h: New file.
67848         * lib/system-quote.c: New file.
67849         * modules/system-quote: New file.
67851 2012-05-08  Bruno Haible  <bruno@clisp.org>
67853         sh-quote: Make C++ safe and allow multiple inclusion.
67854         * lib/sh-quote.h: Add double-inclusion guard. For C++, wrap function
67855         declarations in extern "C".
67857 2012-05-08  Bruno Haible  <bruno@clisp.org>
67859         sh-quote tests: Make tests stricter.
67860         * tests/test-sh-quote.c (check_one): Check the return value of
67861         shell_quote_copy.
67862         (main): Check a string with a CR character. Check a string that
67863         contains UCHAR_MAX.
67865 2012-05-08  Akim Demaille  <akim@lrde.epita.fr>
67867         warnings.m4: provide a means to specify the program to compile.
67868         * m4/warnings.m4 (gl_COMPILER_OPTION_IF): New, extracted from...
67869         (gl_WARN_ADD): here.
67870         Use gl_AS_VAR_APPEND.
67871         Support an argument to specify the program to compile.
67872         (gl_WARN_ADD): Accept an argument to specify the program to compile.
67873         AC_SUBST the WARN_CFLAGS when they are used.
67874         * modules/warnings (configure.ac): Don't AC_SUBST WARN_CFLAGS,
67875         leave this to gl_WARN_ADD.
67877 2012-05-08  Eric Blake  <eblake@redhat.com>
67879         doc: recommendations on gettext version
67880         * doc/gnulib-tool.texi (gettextize and autopoint): Document the
67881         choice between versions.
67882         * DEPENDENCIES (gettext): Cover both approaches.
67884 2012-05-08  Jim Meyering  <meyering@redhat.com>
67886         init.sh: explain why EXEEXT support uses aliases rather than functions
67887         * tests/init.sh: Add a comment.
67889         init.sh: don't let bash aliases interfere with tests
67890         * tests/init.sh: Undefine any pre-defined aliases if the selected shell
67891         is bash.  This avoids problems for those who alias standard commands to
67892         non-conforming uses, like those reported in http://bugs.gnu.org/11256.
67893         Suggested by Tim Mooney <Tim.Mooney@ndsu.edu>.
67895 2012-05-07  Paul Eggert  <eggert@cs.ucla.edu>
67897         stdint: be more consistent with glibc, SunOS libc
67898         * lib/stdint.in.h (gl_int_fast8_t, gl_uint_fast8_t)
67899         (gl_int_fast16_t, gl_uint_fast16_t)
67900         (gl_int_fast32_t, gl_uint_fast32_t)
67901         (INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX)
67902         (INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX)
67903         (INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
67904         Be consistent with glibc by default, and with SunOS 5.10 and later
67905         if __sun is defined.  This lessens the likelihood of clashes if
67906         code compiled for older hosts is combined with code compiled for
67907         newer ones.  Problem reported by Niels Möller in
67908         <http://lists.gnu.org/r/bug-gnulib/2012-05/msg00074.html>.
67910 2012-05-07  Eric Blake  <eblake@redhat.com>
67912         isatty: relax license to LGPLv2+
67913         * modules/isatty (License): Relax license.
67915 2012-05-06  Paul Eggert  <eggert@cs.ucla.edu>
67917         stat-size: comment fix
67918         * lib/stat-size.h: Remove obsolete comment about indenting.
67920 2012-05-06  Bruno Haible  <bruno@clisp.org>
67922         Tests for module 'sh-quote'.
67923         * modules/sh-quote-tests: New file.
67924         * tests/test-sh-quote.c: New file.
67926 2012-05-06  Bruno Haible  <bruno@clisp.org>
67928         sh-quote: Improve shell_quote_argv's signature.
67929         * lib/sh-quote.h (shell_quote_argv): Make argument array a 'const *'.
67930         * lib/sh-quote.c (shell_quote_argv): Likewise.
67932 2012-05-06  Paul Eggert  <eggert@cs.ucla.edu>
67934         stdint: document issues with int_fast8_t etc.
67935         * doc/posix-headers/stdint.texi (stdint.h): Say that other
67936         stdint.h substitutes may define these types differently.  See
67937         <http://lists.gnu.org/r/bug-gnulib/2012-05/msg00071.html>.
67939 2012-05-05  Bruno Haible  <bruno@clisp.org>
67941         nanosleep: Avoid guessing wrong when cross-compiling to Linux.
67942         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require AC_CANONICAL_HOST. When
67943         cross-compiling, set gl_cv_func_nanosleep to either 'guessing no'
67944         or 'guessing no (mishandles large arguments)'.
67946 2012-05-05  Bruno Haible  <bruno@clisp.org>
67948         link-follow: Avoid guessing wrong when cross-compiling to glibc/Linux.
67949         * m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): Require
67950         AC_CANONICAL_HOST. When cross-compiling to a glibc/Linux platform,
67951         set gl_cv_func_link_follows_symlink to "guessing no".
67953 2012-05-05  Bruno Haible  <bruno@clisp.org>
67955         tzset: Avoid guessing wrong when cross-compiling to glibc systems.
67956         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require AC_CANONICAL_HOST. When
67957         cross-compiling to a glibc platform, set gl_cv_func_tzset_clobber to
67958         "guessing no".
67959         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Update.
67961 2012-05-05  Bruno Haible  <bruno@clisp.org>
67963         d-ino: Avoid guessing "no" when cross-compiling to glibc/Linux systems.
67964         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Require
67965         AC_CANONICAL_HOST. When cross-compiling to a glibc/Linux platform,
67966         set gl_cv_struct_dirent_d_ino to "guessing yes".
67968 2012-05-05  Bruno Haible  <bruno@clisp.org>
67970         fseeko-tests, ftello-tests: Avoid "guessing no" when cross-compiling.
67971         * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Require AC_CANONICAL_HOST. When
67972         cross-compiling to a glibc platform, set gl_cv_func_ungetc_works to
67973         "guessing yes".
67975 2012-05-05  Bruno Haible  <bruno@clisp.org>
67977         signbit: Avoid "guessing no" when cross-compiling to glibc systems.
67978         * m4/signbit.m4 (gl_SIGNBIT): Require AC_CANONICAL_HOST. When cross-
67979         compiling to a glibc system, set gl_cv_func_signbit and
67980         gl_cv_func_signbit_gcc to "guessing yes".
67982 2012-05-05  Bruno Haible  <bruno@clisp.org>
67984         strerror: Avoid "guessing no" when cross-compiling to glibc systems.
67985         * m4/strerror.m4 (gl_FUNC_STRERROR): Require AC_CANONICAL_HOST. When
67986         cross-compiling to a glibc platform, set gl_cv_func_working_strerror
67987         to "guessing yes".
67988         (gl_FUNC_STRERROR_0): Require AC_CANONICAL_HOST. When cross-compiling
67989         to a glibc platform, set gl_cv_func_strerror_0_works to "guessing yes".
67991 2012-05-05  Bruno Haible  <bruno@clisp.org>
67993         canonicalize[-lgpl]: Avoid "guessing no" when cross-compiling to glibc.
67994         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Require
67995         AC_CANONICAL_HOST. When cross-compiling to a glibc system, set
67996         gl_cv_func_realpath_works to "guessing yes".
67998 2012-05-05  Bruno Haible  <bruno@clisp.org>
68000         gettimeofday: Avoid bad guess when cross-compiling to glibc systems.
68001         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY_CLOBBER): Require
68002         AC_CANONICAL_HOST. When cross-compiling, guess no on glibc platforms.
68004 2012-05-04  Bruno Haible  <bruno@clisp.org>
68006         Tweak last commit.
68007         * m4/off_t.m4 (gl_TYPE_OFF_T): Tweak comments.
68008         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
68010 2012-05-04  Paul Eggert  <eggert@cs.ucla.edu>
68012         unistd_h: make it easier to avoid sys_types_h
68013         This is useful for Emacs, which has its own method of porting to
68014         Windows, and which therefore does not need the sys_types_h module.
68015         * m4/off_t.m4: New file, defining gl_TYPE_OFF_T, which contains
68016         code moved here from gl_SYS_TYPES_H.
68017         * m4/sys_types_h.m4 (gl_SYS_TYPES_H): Require it instead of
68018         using the code directly.
68019         * m4/unistd_h.m4 (gl_UNISTD_H): Require gl_TYPE_OFF_T, not
68020         gl_SYS_TYPES_H.
68021         * modules/sys_types (Files):
68022         * modules/unistd (Files): Add m4/off_t.m4.
68024 2012-05-03  Bruno Haible  <bruno@clisp.org>
68026         lstat: Avoid "guessing no" when cross-compiling to glibc systems.
68027         * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): When cross-
68028         compiling, set gl_cv_func_lstat_dereferences_slashed_symlink to
68029         "guessing yes" or "guessing no".
68030         (gl_FUNC_LSTAT): Update.
68031         * m4/fstatat.m4 (gl_FUNC_FSTATAT): Update.
68032         * m4/openat.m4 (gl_FUNC_OPENAT): Update.
68033         * m4/unlinkat.m4 (gl_FUNC_UNLINKAT): Update.
68035 2012-05-03  Bruno Haible  <bruno@clisp.org>
68037         *alloc-gnu, eealloc: Avoid "guessing no" when cross-compiling to glibc.
68038         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Override in autoconf < 2.70.
68039         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Override in autoconf < 2.70.
68040         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Require AC_CANONICAL_HOST. When
68041         cross-compiling, choose the first alternative on glibc systems.
68042         * modules/eealloc (Files): Add m4/malloc.m4, m4/realloc.m4.
68044 2012-05-03  Bruno Haible  <bruno@clisp.org>
68046         getgroups: Avoid "guessing no" when cross-compiling to glibc systems.
68047         * m4/getgroups.m4 (AC_FUNC_GETGROUPS): Override in autoconf < 2.70.
68048         (gl_FUNC_GETGROUPS): Adapt to change of ac_cv_func_getgroups_works.
68050 2012-05-03  Bruno Haible  <bruno@clisp.org>
68052         chown: Avoid "guessing no" when cross-compiling to glibc systems.
68053         * m4/chown.m4 (AC_FUNC_CHOWN): Override in autoconf < 2.70.
68055 2012-05-03  Bruno Haible  <bruno@clisp.org>
68057         Avoid "guessing no" guesses when cross-compiling to glibc systems.
68058         * m4/cbrtl.m4 (gl_FUNC_CBRTL): Require AC_CANONICAL_HOST. When cross-
68059         compiling to glibc systems, set gl_cv_func_cbrtl_ieee to "guessing yes".
68060         * m4/ceil.m4 (gl_FUNC_CEIL): Require AC_CANONICAL_HOST. When cross-
68061         compiling to glibc systems, set gl_cv_func_ceil_ieee to "guessing yes".
68062         * m4/ceilf.m4 (gl_FUNC_CEILF): Require AC_CANONICAL_HOST. When cross-
68063         compiling to glibc systems, set gl_cv_func_ceilf_ieee to "guessing yes".
68064         * m4/ceill.m4 (gl_FUNC_CEILL): Require AC_CANONICAL_HOST. When cross-
68065         compiling to glibc systems, set gl_cv_func_ceill_ieee to "guessing yes".
68066         * m4/chown.m4 (gl_FUNC_CHOWN): Require AC_CANONICAL_HOST. When cross-
68067         compiling to glibc systems, set gl_cv_func_chown_slash_works,
68068         gl_cv_func_chown_ctime_works to "guessing yes".
68069         * m4/lchown.m4 (gl_FUNC_LCHOWN): Update.
68070         * m4/exp2l.m4 (gl_FUNC_EXP2L): Require AC_CANONICAL_HOST. When cross-
68071         compiling to glibc systems, set gl_cv_func_exp2l_ieee to "guessing yes".
68072         * m4/expm1.m4 (gl_FUNC_EXPM1): Require AC_CANONICAL_HOST. When cross-
68073         compiling to glibc systems, set gl_cv_func_expm1_ieee to "guessing yes".
68074         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require AC_CANONICAL_HOST. When cross-
68075         compiling to glibc systems, set gl_cv_func_open_directory_works to
68076         "guessing yes".
68077         * m4/fstat.m4 (gl_FUNC_FSTAT): Update.
68078         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Require AC_CANONICAL_HOST. When
68079         cross-compiling to glibc systems, set gl_cv_func_fdopendir_works to
68080         "guessing yes".
68081         * m4/floor.m4 (gl_FUNC_FLOOR): Require AC_CANONICAL_HOST. When cross-
68082         compiling to glibc systems, set gl_cv_func_floor_ieee to "guessing yes".
68083         * m4/floorf.m4 (gl_FUNC_FLOORF): Require AC_CANONICAL_HOST. When cross-
68084         compiling to glibc systems, set gl_cv_func_floorf_ieee to
68085         "guessing yes".
68086         * m4/fmod.m4 (gl_FUNC_FMOD): Require AC_CANONICAL_HOST. When cross-
68087         compiling to glibc systems, set gl_cv_func_fmod_ieee to "guessing yes".
68088         * m4/fmodf.m4 (gl_FUNC_FMODF): Require AC_CANONICAL_HOST. When cross-
68089         compiling to glibc systems, set gl_cv_func_fmodf_ieee to "guessing yes".
68090         * m4/fmodl.m4 (gl_FUNC_FMODL): Require AC_CANONICAL_HOST. When cross-
68091         compiling to glibc systems, set gl_cv_func_fmodl_ieee to "guessing yes".
68092         * m4/getgroups.m4 (gl_FUNC_GETGROUPS): Require AC_CANONICAL_HOST. When
68093         cross-compiling to glibc systems, set gl_cv_func_getgroups_works to
68094         "guessing yes".
68095         * m4/hypot.m4 (gl_FUNC_HYPOT): Require AC_CANONICAL_HOST. When cross-
68096         compiling to glibc systems, set gl_cv_func_hypot_ieee to "guessing yes".
68097         * m4/hypotf.m4 (gl_FUNC_HYPOTF): Require AC_CANONICAL_HOST. When cross-
68098         compiling to glibc systems, set gl_cv_func_hypotf_ieee to
68099         "guessing yes".
68100         * m4/hypotl.m4 (gl_FUNC_HYPOTL): Require AC_CANONICAL_HOST. When cross-
68101         compiling to glibc systems, set gl_cv_func_hypotl_ieee to
68102         "guessing yes".
68103         * m4/link.m4 (gl_FUNC_LINK): Require AC_CANONICAL_HOST. When cross-
68104         compiling to glibc systems, set gl_cv_func_link_works to "guessing yes".
68105         * m4/log.m4 (gl_FUNC_LOG): Require AC_CANONICAL_HOST. When cross-
68106         compiling to glibc systems, set gl_cv_func_log_ieee to "guessing yes".
68107         * m4/logf.m4 (gl_FUNC_LOGF): Require AC_CANONICAL_HOST. When cross-
68108         compiling to glibc systems, set gl_cv_func_logf_ieee to "guessing yes".
68109         * m4/log10.m4 (gl_FUNC_LOG10): Require AC_CANONICAL_HOST. When cross-
68110         compiling to glibc systems, set gl_cv_func_log10_ieee to "guessing yes".
68111         * m4/log10f.m4 (gl_FUNC_LOG10F): Require AC_CANONICAL_HOST. When cross-
68112         compiling to glibc systems, set gl_cv_func_log10f_ieee to
68113         "guessing yes".
68114         * m4/log1p.m4 (gl_FUNC_LOG1P): Require AC_CANONICAL_HOST. When cross-
68115         compiling to glibc systems, set gl_cv_func_log1p_ieee to "guessing yes".
68116         * m4/log1pf.m4 (gl_FUNC_LOG1PF): Require AC_CANONICAL_HOST. When cross-
68117         compiling to glibc systems, set gl_cv_func_log1pf_ieee to
68118         "guessing yes".
68119         * m4/log1pl.m4 (gl_FUNC_LOG1PL): Require AC_CANONICAL_HOST. When cross-
68120         compiling to glibc systems, set gl_cv_func_log1pl_ieee to
68121         "guessing yes".
68122         * m4/log2.m4 (gl_FUNC_LOG2): Require AC_CANONICAL_HOST. When cross-
68123         compiling to glibc systems, set gl_cv_func_log2_ieee to "guessing yes".
68124         * m4/log2f.m4 (gl_FUNC_LOG2F): Require AC_CANONICAL_HOST. When cross-
68125         compiling to glibc systems, set gl_cv_func_log2f_ieee to "guessing yes".
68126         * m4/mkdir.m4 (gl_FUNC_MKDIR): Require AC_CANONICAL_HOST. When cross-
68127         compiling to glibc systems, set gl_cv_func_mkdir_trailing_slash_works,
68128         gl_cv_func_mkdir_trailing_dot_works to "guessing yes".
68129         * m4/mkfifo.m4 (gl_FUNC_MKFIFO): Require AC_CANONICAL_HOST. When cross-
68130         compiling to glibc systems, set gl_cv_func_mkfifo_works to
68131         "guessing yes".
68132         * m4/mknod.m4 (gl_FUNC_MKNOD): Require AC_CANONICAL_HOST. When cross-
68133         compiling to glibc systems, set gl_cv_func_mknod_works to
68134         "guessing yes".
68135         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_CANONICAL_HOST. When
68136         cross-compiling to glibc systems, set gl_cv_func_working_mkstemp to
68137         "guessing yes".
68138         * m4/modf.m4 (gl_FUNC_MODF): Require AC_CANONICAL_HOST. When cross-
68139         compiling to glibc systems, set gl_cv_func_modf_ieee to "guessing yes".
68140         * m4/modff.m4 (gl_FUNC_MODFF): Require AC_CANONICAL_HOST. When cross-
68141         compiling to glibc systems, set gl_cv_func_modff_ieee to "guessing yes".
68142         * m4/modfl.m4 (gl_FUNC_MODFL): Require AC_CANONICAL_HOST. When cross-
68143         compiling to glibc systems, set gl_cv_func_modfl_ieee to "guessing yes".
68144         * m4/putenv.m4 (gl_FUNC_PUTENV): Require AC_CANONICAL_HOST. When cross-
68145         compiling to glibc systems, set gl_cv_func_svid_putenv to
68146         "guessing yes".
68147         * m4/readlink.m4 (gl_FUNC_READLINK): Require AC_CANONICAL_HOST. When
68148         cross-compiling to glibc systems, set gl_cv_func_readlink_works to
68149         "guessing yes".
68150         * m4/remainder.m4 (gl_FUNC_REMAINDER): Require AC_CANONICAL_HOST. When
68151         cross-compiling to glibc systems, set gl_cv_func_remainder_ieee to
68152         "guessing yes".
68153         * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Require AC_CANONICAL_HOST.
68154         When cross-compiling to glibc systems, set gl_cv_func_remainderf_ieee
68155         to "guessing yes".
68156         * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Require AC_CANONICAL_HOST.
68157         When cross-compiling to glibc systems, set gl_cv_func_remainderl_ieee
68158         to "guessing yes".
68159         * m4/rmdir.m4 (gl_FUNC_RMDIR): Require AC_CANONICAL_HOST. When cross-
68160         compiling to glibc systems, set gl_cv_func_rmdir_works to
68161         "guessing yes".
68162         * m4/unlink.m4 (gl_FUNC_UNLINK): Require AC_CANONICAL_HOST. When cross-
68163         compiling to glibc systems, set gl_cv_func_unlink_honors_slashes,
68164         gl_cv_func_unlink_parent_fails to "guessing yes".
68165         * m4/remove.m4 (gl_FUNC_REMOVE): Update.
68166         * m4/rename.m4 (gl_FUNC_RENAME): Require AC_CANONICAL_HOST. When cross-
68167         compiling to glibc systems, set gl_cv_func_rename_slash_dst_works,
68168         gl_cv_func_rename_slash_src_works, gl_cv_func_rename_link_works,
68169         gl_cv_func_rename_dest_works to "guessing yes".
68170         * m4/round.m4 (gl_FUNC_ROUND): Require AC_CANONICAL_HOST. When cross-
68171         compiling to glibc systems, set gl_cv_func_round_ieee to "guessing yes".
68172         * m4/roundf.m4 (gl_FUNC_ROUNDF): Require AC_CANONICAL_HOST. When cross-
68173         compiling to glibc systems, set gl_cv_func_roundf_ieee to
68174         "guessing yes".
68175         * m4/roundl.m4 (gl_FUNC_ROUNDL): Require AC_CANONICAL_HOST. When cross-
68176         compiling to glibc systems, set gl_cv_func_roundl_ieee to
68177         "guessing yes".
68178         * m4/setenv.m4 (gl_FUNC_SETENV): Require AC_CANONICAL_HOST. When cross-
68179         compiling to glibc systems, set gl_cv_func_setenv_works to
68180         "guessing yes".
68181         (gl_FUNC_UNSETENV): Require AC_CANONICAL_HOST. When cross-
68182         compiling to glibc systems, set gl_cv_func_unsetenv_works to
68183         "guessing yes".
68184         * m4/sleep.m4 (gl_FUNC_SLEEP): Require AC_CANONICAL_HOST. When cross-
68185         compiling to glibc systems, set gl_cv_func_sleep_works to
68186         "guessing yes".
68187         * m4/stat.m4 (gl_FUNC_STAT): Require AC_CANONICAL_HOST. When cross-
68188         compiling to glibc systems, set gl_cv_func_stat_file_slash to
68189         "guessing yes".
68190         * m4/symlink.m4 (gl_FUNC_SYMLINK): Require AC_CANONICAL_HOST. When
68191         cross-compiling to glibc systems, set gl_cv_func_symlink_works to
68192         "guessing yes".
68193         * m4/trunc.m4 (gl_FUNC_TRUNC): Require AC_CANONICAL_HOST. When cross-
68194         compiling to glibc systems, set gl_cv_func_trunc_ieee to "guessing yes".
68195         * m4/truncf.m4 (gl_FUNC_TRUNCF): Require AC_CANONICAL_HOST. When cross-
68196         compiling to glibc systems, set gl_cv_func_truncf_ieee to
68197         "guessing yes".
68198         * m4/truncl.m4 (gl_FUNC_TRUNCL): Require AC_CANONICAL_HOST. When cross-
68199         compiling to glibc systems, set gl_cv_func_truncl_ieee to
68200         "guessing yes".
68201         * m4/usleep.m4 (gl_FUNC_USLEEP): Require AC_CANONICAL_HOST. When cross-
68202         compiling to glibc systems, set gl_cv_func_usleep_works to
68203         "guessing yes".
68204         * m4/utimens.m4 (gl_UTIMENS): Require AC_CANONICAL_HOST. When cross-
68205         compiling to glibc systems, set gl_cv_func_futimesat_works to
68206         "guessing yes".
68208 2012-05-03  Bruno Haible  <bruno@clisp.org>
68210         Say "guessing yes" or "guessing no" when cross-compiling.
68211         * m4/dup2.m4 (gl_FUNC_DUP2): When cross-compiling, set
68212         gl_cv_func_dup2_works to "guessing yes" or "guessing no".
68213         * m4/getdelim.m4 (gl_FUNC_GETDELIM): When cross-compiling, set
68214         gl_cv_func_working_getdelim to "guessing yes" or "guessing no".
68215         * m4/getline.m4 (gl_FUNC_GETLINE): When cross-compiling, set
68216         am_cv_func_working_getline to "guessing yes" or "guessing no".
68217         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): When cross-compiling, set
68218         gl_cv_func_memmem_works_always to "guessing yes" or "guessing no".
68219         (gl_FUNC_MEMMEM): When cross-compiling, set
68220         gl_cv_func_memmem_works_fast to "guessing yes" or "guessing no".
68221         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): When cross-compiling, set
68222         gl_cv_func_stpncpy to "guessing yes" or "guessing no".
68223         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): When cross-compiling,
68224         set gl_cv_func_strcasestr_works_always to "guessing yes" or
68225         "guessing no".
68226         (gl_FUNC_STRCASESTR): When cross-compiling, set
68227         gl_cv_func_strcasestr_linear to "guessing yes" or "guessing no".
68228         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE): When cross-compiling, set
68229         gl_cv_func_strstr_works_always to "guessing yes" or "guessing no".
68230         (gl_FUNC_STRSTR): When cross-compiling, set
68231         gl_cv_func_strstr_linear to "guessing yes" or "guessing no".
68232         * m4/strtod.m4 (gl_FUNC_STRTOD): When cross-compiling, set
68233         gl_cv_func_strtod_works to "guessing yes" or "guessing no".
68234         * m4/wctype_h.m4 (gl_WCTYPE_H): When cross-compiling, set
68235         gl_cv_func_iswcntrl_works to "guessing yes" or "guessing no".
68237 2012-05-01  Bruno Haible  <bruno@clisp.org>
68239         relocatable-prog: Enable ELF ORIGIN trick also on GNU/kFreeBSD.
68240         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Treat kFreeBSD like Linux.
68241         * build-aux/reloc-ldflags: Likewise.
68242         Suggested by Steven Chamberlain <steven@pyro.eu.org>.
68244 2012-05-01  Bruno Haible  <bruno@clisp.org>
68246         gnulib-tool: Remove transitional code.
68247         * gnulib-tool: Don't warn about --import with 0 arguments any more.
68248         Reported by Dmitriy Selyutin <ghostman.sd@gmail.com>.
68250 2012-05-01  Bruno Haible  <bruno@clisp.org>
68252         getcwd: Fix misindentation.
68253         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Fix indentation.
68255 2012-04-29  Paul Eggert  <eggert@cs.ucla.edu>
68257         exclude: process exclude and include directives in order
68258         This restores the pre-2009 behavior, and is part of a fix of a
68259         grep bug reported by Quentin Arce in
68260         <http://lists.gnu.org/r/bug-grep/2012-04/msg00056.html>.
68261         * lib/exclude.c (struct exclude): Remove 'tail' member.
68262         (new_exclude_segment): Prepend the new segment instead of appending.
68263         Return void, since that's now more convenient.
68264         (file_pattern_matches): Renamed from excluded_file_pattern_p.
68265         (file_name_matches): Renamed from excluded_file_name_p.
68266         (file_pattern_matches, file_name_matches):
68267         Return true if the pattern matches, not if it excludes.
68268         All callers changed.
68269         (excluded_file_name): Process the list in reverse order;
68270         since the list is now reversed this restores the pre-2009 behavior.
68271         (add_exclude): Adjust to new reversed-order list.  Use local var
68272         rather than macro, for clarity.
68273         * tests/test-exclude7.sh: Adjust to corrected behavior.
68275         exclude: handle wildcards with FNM_NOESCAPE and with trailing \
68276         * lib/exclude.c (unescape_pattern): Don't worry about unescaped [;
68277         it's not possible here.  Handle the case of \ at end of pattern
68278         without dumping core.
68279         (add_exclude): Do not unescape the pattern if FNM_NOESCAPE is used.
68281         _Noreturn: future-proof non-GNU and non-MSVC compilers
68282         * build-aux/snippet/_Noreturn.h (_Noreturn):
68283         * m4/gnulib-common.m4 (gl_COMMON_BODY):
68284         Do not define _Noreturn if __STDC_VERSION__ indicates this is
68285         C11 or later.  This is more likely to work with random future C
68286         compilers that are neither GNUish nor MSVCish.  See Vincent Lefevre in
68287         <http://lists.gnu.org/r/bug-gnulib/2012-04/msg00195.html>.
68289         exclude: handle wildcards with FNM_EXTMATCH
68290         * lib/exclude.c (fnmatch_pattern_has_wildcards): Also treat '+(',
68291         '+@', '!(' as wildcards, if FNM_EXTMATCH.  Make it clear in a
68292         comment that "has wildcards" really means "has or may have
68293         wildcards".  Simplify by avoiding the need to call strcspn.
68295 2012-04-29  Bruno Haible  <bruno@clisp.org>
68297         gnulib-tool: Fix list of authors.
68298         * gnulib-tool (func_version): Add Paul Eggert to list of authors.
68300 2012-04-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
68302         bootstrap: support Automake-NG in $buildreq
68303         * bootstrap (check_versions): Handle automake and aclocal from
68304         Automake-NG specially.  They can be specified as respectively
68305         the "automake-ng" and "aclocal-ng" requirements.
68307 2012-04-25  Eric Blake  <eblake@redhat.com>
68309         bootstrap: only force latest Makefile.in.in for gettext module
68310         * build-aux/bootstrap (with_gettext): Only install latest
68311         Makefile.in.in for projects requesting bleeding edge gettext.
68313 2012-04-22  Bruno Haible  <bruno@clisp.org>
68315         doc: Mention reason for replacement on glibc/Linux systems.
68316         * doc/posix-functions/dprintf.texi: Mention the problem with special
68317         'long double' values.
68318         * doc/posix-functions/fprintf.texi: Likewise.
68319         * doc/posix-functions/printf.texi: Likewise.
68320         * doc/posix-functions/snprintf.texi: Likewise.
68321         * doc/posix-functions/sprintf.texi: Likewise.
68322         * doc/posix-functions/vdprintf.texi: Likewise.
68323         * doc/posix-functions/vfprintf.texi: Likewise.
68324         * doc/posix-functions/vprintf.texi: Likewise.
68325         * doc/posix-functions/vsnprintf.texi: Likewise.
68326         * doc/posix-functions/vsprintf.texi: Likewise.
68327         * doc/posix-functions/fcntl.texi: Add glibc/Linux to the list of
68328         platforms with F_DUPFD_CLOEXEC problems.
68329         * doc/posix-functions/glob.texi: Mention which platforms are affected
68330         by the problem with symbolic links.
68331         * doc/posix-functions/linkat.texi: Mention the problem with
68332         AT_SYMLINK_FOLLOW on Linux.
68334 2012-04-22  Bruno Haible  <bruno@clisp.org>
68336         pwrite: Don't replace on all platforms.
68337         * m4/pwrite.m4 (gl_FUNC_PWRITE): Fix syntax error in test program.
68339 2012-04-22  Bruno Haible  <bruno@clisp.org>
68341         rint* tests: Avoid gcc warnings.
68342         * tests/test-rint.c (INFINITY, NAN): Undefine before redefining.
68343         * tests/test-rintf.c (INFINITY, NAN): Likewise.
68344         * tests/test-rintl.c (INFINITY, NAN): Likewise.
68346 2012-04-21  Bruno Haible  <bruno@clisp.org>
68348         users.txt: Update.
68349         * users.txt: Add freedink, wdiff. Update URLs for projects that have
68350         switched from CVS to git, bzr, or svn.
68352 2012-04-21  Bruno Haible  <bruno@clisp.org>
68354         Large File Support for native Windows platforms.
68356         * m4/largefile.m4 (gl_LARGEFILE): New macro.
68357         * modules/largefile (configure.ac): Require gl_LARGEFILE.
68359         * lib/sys_types.in.h (off_t) [WINDOWS_64_BIT_OFF_T]: Define to a 64-bit
68360         type.
68361         * m4/sys_types_h.m4 (gl_SYS_TYPES_H): Set WINDOWS_64_BIT_OFF_T.
68362         * modules/sys_types (Makefile.am): Substitute WINDOWS_64_BIT_OFF_T.
68363         * doc/posix-headers/sys_types.texi: Mention the effect of the
68364         'largefile' module.
68366         * lib/fcntl.in.h: Add comments about off_t.
68367         * modules/fcntl-h (Depends-on): Add sys_types.
68369         * lib/unistd.in.h [WINDOWS_64_BIT_OFF_T]: Include <sys/types.h>.
68370         (ftruncate): Replace it if REPLACE_FTRUNCATE is 1.
68371         * m4/unistd_h.m4 (gl_UNISTD_H): Require gl_SYS_TYPES_H.
68372         (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_FTRUNCATE.
68373         * modules/unistd (Depends-on): Add sys_types.
68374         (Makefile.am): Substitute WINDOWS_64_BIT_OFF_T, REPLACE_FTRUNCATE.
68376         * lib/lseek.c (rpl_lseek) [_GL_WINDOWS_64_BIT_OFF_T]: Use _lseeki64
68377         instead of lseek.
68378         * m4/lseek.m4 (gl_FUNC_LSEEK): Require gl_SYS_TYPES_H. Set
68379         REPLACE_LSEEK if WINDOWS_64_BIT_OFF_T is 1.
68380         * modules/lseek (Depends-on): Add sys_types.
68382         * lib/ftruncate.c: Put under GPLv3+. Include <windows.h>,
68383         msvc-nothrow.h.
68384         (SetFileSize): New function.
68385         (ftruncate) [_GL_WINDOWS_64_BIT_OFF_T]: New implementation.
68386         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Set REPLACE_FTRUNCATE on Windows
68387         if Large File Support is requested.
68388         * modules/ftruncate (configure.ac): Consider REPLACE_FTRUNCATE.
68389         (Depends-on): Add sys_types, msvc-nothrow. Update conditions.
68391         * lib/stdio.in.h: Add comments about off_t.
68392         * modules/stdio (Depends-on): Add sys_types.
68394         * lib/ftello.c [_GL_WINDOWS_64_BIT_OFF_T]: Use _ftelli64 or ftello64
68395         instead of ftello.
68396         * m4/ftello.m4 (gl_FUNC_FTELLO): Require gl_SYS_TYPES_H. Set
68397         REPLACE_FTELLO if WINDOWS_64_BIT_OFF_T is 1.
68398         (gl_PREREQ_FTELLO): New macro.
68399         * modules/ftello (Depends-on): Add sys_types.
68400         (configure.ac): Incoke gl_PREREQ_FTELLO.
68402         * lib/fseeko.c [_GL_WINDOWS_64_BIT_OFF_T]: Use _fseeki64 or fseeko64
68403         instead of fseeko.
68404         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Require gl_SYS_TYPES_H. Set
68405         REPLACE_FSEEKO if WINDOWS_64_BIT_OFF_T is 1.
68406         (gl_PREREQ_FSEEKO): New macro.
68407         * modules/fseeko (Depends-on): Add sys_types.
68408         (configure.ac): Invoke gl_PREREQ_FSEEKO.
68410         * lib/sys_stat.in.h: Add comments about off_t.
68411         (stat, fstat) [WINDOWS_64_BIT_ST_SIZE]: Define to variants that use a
68412         64-bit integer for st_size in 'struct stat'.
68413         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Set WINDOWS_64_BIT_ST_SIZE.
68414         Define _GL_WINDOWS_64_BIT_ST_SIZE.
68415         * modules/sys_stat (Depends-on): Add sys_types.
68416         (Makefile.am): Substitute WINDOWS_64_BIT_ST_SIZE.
68418         * lib/stat.c (stat) [_GL_WINDOWS_64_BIT_ST_SIZE]: Define to _stati64
68419         instead of stat or _stat.
68421         * lib/fstat.c [_GL_WINDOWS_64_BIT_ST_SIZE]: Use _fstati64 and
68422         'struct _stati64' instead of fstat and 'struct stat'.
68423         * m4/fstat.m4 (gl_FUNC_FSTAT): Require gl_HEADER_SYS_STAT_H. Set
68424         REPLACE_FSTAT if WINDOWS_64_BIT_ST_SIZE is 1.
68426         Reported by Ray Satiro <raysatiro@yahoo.com>.
68428 2012-04-19  Eric Blake  <eblake@redhat.com>
68430         bootstrap: accommodate older libtool
68431         * build-aux/bootstrap (use_libtool): Cater to libtool 1.5.22.
68432         Reported by Daniel P. Berrange.
68434 2012-04-19  Jim Meyering  <meyering@redhat.com>
68436         announce-gen: avoid failure due to lack of Digest::SHA1
68437         Even with the preferred Digest::SHA available, this script
68438         would fail when the backup module, Digest::SHA1, was not installed.
68439         * build-aux/announce-gen: Quote the conditional use of "use".
68440         Reported by Reuben Thomas in:
68441         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/30444
68443         bootstrap: don't let a user's CDPATH setting affect this script
68444         When CDPATH is set, cd will sometimes generate output.
68445         When "cd" is run in a subshell whose output matters, that
68446         surprising-to-some output can cause malfunction.
68447         Unsetting CDPATH turns off this shell "feature."
68448         * build-aux/bootstrap (CDPATH): Unset.
68449         Reported by Reuben Thomas in:
68450         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/30435
68451         and inspired by his patch here:
68452         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/30440
68454 2012-04-16  Akim Demaille  <akim@lrde.epita.fr>
68455         and Jim Meyering  <meyering@redhat.com>
68457         maint.mk: catch "see @xref{}" and similar
68458         * top/maint.mk (prohibit_undesirable_word_seq_RE_): Also
68459         prohibit "See also @xref{", "Also see @pxref{", and similar.
68461 2012-04-16  Jim Meyering  <meyering@redhat.com>
68463         bootstrap: really use gnulib's po/Makefile.in.in
68464         * build-aux/bootstrap: Correct the source file name in previous change.
68465         Reported by Akim Demaille.
68467         configmake: correct minor inconsistency in Makefile rule
68468         * modules/configmake (Makefile.am): All other rules like this one
68469         run the final "mv -f ..." in the same backslash-continued command
68470         as the one that does everything else.  This one put the mv -f ...
68471         command on a separate, non-backslash-continued line.
68472         Make it like the others.
68474         bootstrap: use gnulib's po/Makefile.in.in, not the one from gettext
68475         * build-aux/bootstrap: Use gnulib's po/Makefile.in.in, not
68476         the one from gettext.  Reported by Akim Demaille.
68478 2012-04-16  Joel E. Denny  <joeldenny@joeldenny.org>
68480         Fix recursion of install-* into po directories.
68481         Bison's install-pdf bug reported by Hans Aberg at
68482         <http://lists.gnu.org/r/bug-bison/2011-05/msg00008.html>.
68483         * build-aux/po/Makefile.in.in (install-dvi, install-html)
68484         (install-info, install-pdf, install-ps): New targets.
68486 2012-04-16  Jim Meyering  <meyering@redhat.com>
68488         maint: avoid spurious "make sc_maint" failure
68489         * cfg.mk (exclude_file_name_regexp--sc_trailing_blank): Also
68490         exempt all *.class file names, for lib/javaversion.class.
68492 2012-04-15  Bruno Haible  <bruno@clisp.org>
68494         lseek: Make configure test independent of environment.
68495         * m4/lseek.m4 (gl_FUNC_LSEEK): Require AC_CANONICAL_HOST. On native
68496         Windows, we know that lseek() on pipes is broken; skip the runtime
68497         test.
68499 2012-04-14  Bruno Haible  <bruno@clisp.org>
68501         stat: Bypass buggy override in mingw64.
68502         * m4/stat.m4 (gl_FUNC_STAT): Update comments.
68503         * lib/stat.c (stat) [mingw64]: Define to _stat.
68504         * doc/posix-functions/stat.texi: Mention mingw64 bug.
68506 2012-04-14  Bruno Haible  <bruno@clisp.org>
68508         pathmax: Fix compilation error on MSVC 9.
68509         * modules/pathmax (Depends-on): Add unistd.
68511 2012-04-12  Paul Eggert  <eggert@cs.ucla.edu>
68513         README: document pointer comparison assumption
68514         * README (Portability guidelines): Document assumption about
68515         pointer comparisons, in response to a recent bug-gnulib comment by
68516         Jeffrey Kegler.
68518 2012-04-12  Bruno Haible  <bruno@clisp.org>
68520         Tests for module 'getrusage'.
68521         * modules/getrusage-tests: New file.
68522         * tests/test-getrusage.c: New file.
68524         New module 'getrusage'.
68525         * lib/sys_resource.in.h: Include arg-nonnull.h, c++defs.h,
68526         warn-on-use.h.
68527         (getrusage): New declaration.
68528         * lib/getrusage.c: New file.
68529         * m4/getrusage.m4: New file.
68530         * m4/sys_resource_h.m4 (gl_HEADER_SYS_RESOURCE): Test whether getrusage
68531         is declared.
68532         (gl_SYS_RESOURCE_H_DEFAULTS): Initialize GNULIB_GETRUSAGE,
68533         HAVE_GETRUSAGE.
68534         * modules/sys_resource (Depends-on): Add snippet/arg-nonnull,
68535         snippet/c++defs, snippet/warn-on-use.
68536         (Makefile.am): Update generation of sys/resource.h. Substitute
68537         GNULIB_GETRUSAGE, HAVE_GETRUSAGE.
68538         * modules/getrusage: New file.
68539         * doc/posix-functions/getrusage.texi: Mention the new module.
68541 2012-04-12  Bruno Haible  <bruno@clisp.org>
68543         Tests for module 'sys_resource'.
68544         * modules/sys_resource-tests: New file.
68545         * tests/test-sys_resource.c: New file.
68547         New module 'sys_resource'.
68548         * lib/sys_resource.in.h: New file.
68549         * m4/sys_resource_h.m4: New file.
68550         * modules/sys_resource: New file.
68551         * doc/posix-headers/sys_resource.texi: Mention the new module.
68553 2012-04-12  LRN  <lrn1986@gmail.com>  (tiny change)
68555         ioctl: Fix compilation error on mingw.
68556         * lib/ioctl.c: Include <windows.h>.
68557         Also reported by Ray Satiro <raysatiro@yahoo.com>.
68559 2012-04-04  Jim Meyering  <meyering@redhat.com>
68561         regex: correct #pragma guard expression
68562         * lib/regex.c: -Wsuggest-attribute=pure was introduced in gcc-4.6,
68563         not 4.3.  Correct its cpp guard expression.
68565 2012-04-04  Paul Eggert  <eggert@cs.ucla.edu>
68567         regex: remove unnecessary type punning
68568         Problem reported by Vladimir Serbinenko in
68569         <http://lists.gnu.org/r/bug-gnulib/2012-04/msg00006.html>.
68570         * lib/regex.h (struct re_pattern_buffer): Change the type of
68571         __REPB_PREFIX(buffer) from unsigned char * to struct re_dfa_t *.
68572         Fix comment to match code.
68573         * lib/regcomp.c (re_compile_fastmap, re_compile_fastmap_iter, regfree)
68574         (re_compile_internal, free_workarea_compile, analyze, lower_subexp)
68575         (parse, parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
68576         * lib/regexec.c (regexec, re_search_stub, re_search_internal)
68577         (set_regs):
68578         Omit no-longer-necessary casts.
68580 2012-04-03  Bruno Haible  <bruno@clisp.org>
68582         Tests for module 'ilogbl'.
68583         * modules/ilogbl-tests: New file.
68584         * tests/test-ilogbl.c: New file.
68586         New module 'ilogbl'.
68587         * lib/math.in.h (ilogbl): New declaration.
68588         * lib/ilogbl.c: New file.
68589         * m4/ilogbl.m4: New file.
68590         * m4/math_h.m4 (gl_MATH_H): Test whether ilogbl is declared.
68591         (gl_MATH_H_DEFAULTS): Initialize GNULIB_ILOGBL, HAVE_ILOGBL.
68592         * modules/math (Makefile.am): Substitute GNULIB_ILOGBL, HAVE_ILOGBL.
68593         Split sed invocation, to avoid the limit of 100 substitutions of
68594         HP-UX 'sed'.
68595         * modules/ilogbl: New file.
68596         * tests/test-math-c++.cc: Check the declaration of ilogbl.
68597         * doc/posix-functions/ilogbl.texi: Mention the new module.
68599 2012-04-03  Bruno Haible  <bruno@clisp.org>
68601         Tests for module 'ilogbf'.
68602         * modules/ilogbf-tests: New file.
68603         * tests/test-ilogbf.c: New file.
68605         New module 'ilogbf'.
68606         * lib/math.in.h (ilogbf): New declaration.
68607         * lib/ilogbf.c: New file.
68608         * m4/ilogbf.m4: New file.
68609         * m4/math_h.m4 (gl_MATH_H): Test whether ilogbf is declared.
68610         (gl_MATH_H_DEFAULTS): Initialize GNULIB_ILOGBF, HAVE_ILOGBF,
68611         REPLACE_ILOGBF.
68612         * modules/math (Makefile.am): Substitute GNULIB_ILOGBF, HAVE_ILOGBF,
68613         REPLACE_ILOGBF.
68614         * modules/ilogbf: New file.
68615         * tests/test-math-c++.cc: Check the declaration of ilogbf.
68616         * doc/posix-functions/ilogbf.texi: Mention the new module.
68618 2012-04-03  Bruno Haible  <bruno@clisp.org>
68620         Tests for module 'ilogb'.
68621         * modules/ilogb-tests: New file.
68622         * tests/test-ilogb.c: New file.
68623         * tests/test-ilogb.h: New file, based on tests/test-logb.h and
68624         tests/test-logb-ieee.h.
68626         New module 'ilogb'.
68627         * lib/math.in.h (ilogb): New declaration.
68628         * lib/ilogb.c: New file.
68629         * m4/ilogb.m4: New file.
68630         * m4/math_h.m4 (gl_MATH_H): Test whether ilogb is declared.
68631         (gl_MATH_H_DEFAULTS): Initialize GNULIB_ILOGB, HAVE_ILOGB,
68632         REPLACE_ILOGB.
68633         * modules/math (Makefile.am): Substitute GNULIB_ILOGB, HAVE_ILOGB,
68634         REPLACE_ILOGB.
68635         * modules/ilogb: New file.
68636         * tests/test-math-c++.cc: Check the declaration of ilogb.
68637         * doc/posix-functions/ilogb.texi: Mention the new module.
68639 2012-04-03  Bruno Haible  <bruno@clisp.org>
68641         math: Provide FP_ILOGB0 and FP_ILOGBNAN.
68642         * lib/math.in.h (FP_ILOGB0, FP_ILOGBNAN): Define fallback.
68643         * tests/test-math.c: Check that FP_ILOGB0, FP_ILOGBNAN are defined.
68644         (main): Check their values.
68645         * doc/posix-headers/math.texi: Mention the FP_ILOGB0, FP_ILOGBNAN
68646         problem.
68648 2012-04-03  Bruno Haible  <bruno@clisp.org>
68650         Tests for module 'logbl-ieee'.
68651         * modules/logbl-ieee-tests: New file.
68652         * tests/test-logbl-ieee.c: New file.
68654         New module 'logbl-ieee'.
68655         * modules/logbl-ieee: New file.
68657         Tests for module 'logb-ieee'.
68658         * modules/logb-ieee-tests: New file.
68659         * tests/test-logb-ieee.c: New file.
68661         New module 'logb-ieee'.
68662         * modules/logb-ieee: New file.
68664         Tests for module 'logbf-ieee'.
68665         * modules/logbf-ieee-tests: New file.
68666         * tests/test-logbf-ieee.c: New file.
68667         * tests/test-logb-ieee.h: New file.
68669         New module 'logbf-ieee'.
68670         * modules/logbf-ieee: New file.
68672 2012-04-03  Bruno Haible  <bruno@clisp.org>
68674         Tests for module 'logbl'.
68675         * modules/logbl-tests: New file.
68676         * tests/test-logbl.c: New file.
68678         New module 'logbl'.
68679         * lib/math.in.h (logbl): New declaration.
68680         * lib/logbl.c: New file.
68681         * m4/logbl.m4: New file.
68682         * m4/math_h.m4 (gl_MATH_H): Test whether logbl is declared.
68683         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOGBL, HAVE_LOGBL,
68684         REPLACE_LOGBL.
68685         * modules/math (Makefile.am): Substitute GNULIB_LOGBL, HAVE_LOGBL,
68686         REPLACE_LOGBL.
68687         * modules/logbl: New file.
68688         * tests/test-math-c++.cc: Check the declaration of logbl.
68689         * doc/posix-functions/logbl.texi: Mention the new module.
68691 2012-04-02  Bruno Haible  <bruno@clisp.org>
68693         Tests for module 'logbf'.
68694         * modules/logbf-tests: New file.
68695         * tests/test-logbf.c: New file.
68697         New module 'logbf'.
68698         * lib/math.in.h (logbf): New declaration.
68699         * lib/logbf.c: New file.
68700         * m4/logbf.m4: New file.
68701         * m4/math_h.m4 (gl_MATH_H): Test whether logbf is declared.
68702         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOGBF, HAVE_LOGBF,
68703         REPLACE_LOGBF.
68704         * modules/math (Makefile.am): Substitute GNULIB_LOGBF, HAVE_LOGBF,
68705         REPLACE_LOGBF.
68706         * modules/logbf: New file.
68707         * tests/test-math-c++.cc: Check the declaration of logbf.
68708         * doc/posix-functions/logbf.texi: Mention the new module.
68710 2012-04-02  Bruno Haible  <bruno@clisp.org>
68712         logb tests: More tests.
68713         * tests/test-logb.h: New file, based on tests/test-logb.c and
68714         tests/test-frexp.h.
68715         * tests/test-logb.c: Include minus-zero.h, test-logb.h.
68716         (main): Just invoke test_function.
68717         * modules/logb-tests (Files): Add tests/test-logb.h,
68718         tests/minus-zero.h, tests/randomd.c.
68719         (Makefile.am): Add randomd.c to test_logb_SOURCES.
68721         logb: Provide replacement and workarounds.
68722         * lib/math.in.h (logb): Ensure declaration. Replace if REPLACE_LOGB
68723         is 1.
68724         * lib/logb.c: New file.
68725         * m4/logb.m4 (gl_FUNC_LOGB_WORKS): New macro.
68726         (gl_FUNC_LOGB): Invoke it. Set HAVE_LOGB, REPLACE_LOGB.
68727         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOGB.
68728         * modules/math (Makefile.am): Substitute REPLACE_LOGB.
68729         * modules/logb (Files): Add lib/logb.c.
68730         (Depends-on): Add isfinite, frexp, isnand.
68731         (configure.ac): Compile the replacement code logb.c if needed.
68732         * tests/test-math-c++.cc: Check the declaration of logb.
68733         * doc/posix-functions/logb.texi: Mention the replacement and the bug
68734         with subnormal numbers.
68736 2012-04-02  Bruno Haible  <bruno@clisp.org>
68738         log10* tests: Speed up.
68739         * tests/test-log10.h (test_function): Reduce amount of random numbers
68740         to test.
68742 2012-04-01  Bruno Haible  <bruno@clisp.org>
68744         logf-ieee: Fix test whether logf works.
68745         * m4/logf.m4 (gl_FUNC_LOGF): Fix typo in test program.
68747 2012-04-01  Bruno Haible  <bruno@clisp.org>
68749         log10l: Work around log10l-ieee test failure on IRIX 6.5.
68750         * lib/log10l.c: Include <float.h>
68751         (log10l): On IRIX, normalize the +Infinity value.
68752         * modules/log10l (Depends-on): Add 'float'.
68753         * doc/posix-functions/log10l.texi: Mention the IRIX problem with
68754         +Infinity.
68756         log10f-ieee: Work around test failure on NetBSD 5.1.
68757         * m4/log10f-ieee.m4: New file.
68758         * m4/log10f.m4 (gl_FUNC_LOG10F): If gl_FUNC_LOG10F_IEEE is present,
68759         test whether log10f works with a negative argument. Replace it if not.
68760         * lib/log10f.c (log10f): For negative arguments, return NaN.
68761         * modules/log10f-ieee (Files): Add m4/log10f-ieee.m4.
68762         (configure.ac): Invoke gl_FUNC_LOG10F_IEEE.
68763         * doc/posix-functions/log10f.texi: Mention the log10f-ieee module.
68765         log10f-ieee: Work around test failure on Solaris 9.
68766         * modules/log10f-ieee (Depends-on): Add log10-ieee.
68767         (configure.ac): Require gl_FUNC_LOG10F.
68769         log10-ieee: Work around test failure on NetBSD 5.1 and Solaris 11.
68770         * m4/log10-ieee.m4: New file.
68771         * m4/log10.m4 (gl_FUNC_LOG10): If gl_FUNC_LOG10_IEEE is present, test
68772         whether log10 works with a negative argument. Replace it if not.
68773         * lib/log10.c (log10): For negative arguments, return NaN.
68774         * modules/log10-ieee (Files): Add m4/log10-ieee.m4.
68775         (configure.ac): Invoke gl_FUNC_LOG10_IEEE.
68776         * doc/posix-functions/log10.texi: Mention the log10-ieee module.
68778         Tests for module 'log10l-ieee'.
68779         * modules/log10l-ieee-tests: New file.
68780         * tests/test-log10l-ieee.c: New file.
68782         New module 'log10l-ieee'.
68783         * modules/log10l-ieee: New file.
68785         Tests for module 'log10-ieee'.
68786         * modules/log10-ieee-tests: New file.
68787         * tests/test-log10-ieee.c: New file.
68789         New module 'log10-ieee'.
68790         * modules/log10-ieee: New file.
68792         Tests for module 'log10f-ieee'.
68793         * modules/log10f-ieee-tests: New file.
68794         * tests/test-log10f-ieee.c: New file.
68795         * tests/test-log10-ieee.h: New file.
68797         New module 'log10f-ieee'.
68798         * modules/log10f-ieee: New file.
68800 2012-04-01  Bruno Haible  <bruno@clisp.org>
68802         log10l: Work around AIX 5.1, IRIX 6.5, OSF/1 5.1 bug.
68803         * lib/math.in.h (log10l): Override if REPLACE_LOG10L is 1.
68804         * lib/log10l.c (log10l): If log10l exists, use it and provide just the
68805         workaround.
68806         * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): New macro.
68807         (gl_FUNC_LOG10L): Invoke it. Set REPLACE_LOG10L.
68808         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOG10L.
68809         * modules/math (Makefile.am): Substitute REPLACE_LOG10L.
68810         * modules/log10l (configure.ac): Consider REPLACE_LOG10L.
68811         (Depends-on): Update conditions.
68812         * doc/posix-functions/log10l.texi: Mention the MSVC9, AIX 5.1,
68813         IRIX 6.5, OSF/1 5.1 problems.
68815 2012-04-01  Bruno Haible  <bruno@clisp.org>
68817         log10f: Work around OSF/1 5.1 bug.
68818         * lib/math.in.h (log10f): Override if REPLACE_LOG10F is 1.
68819         * lib/log10f.c (log10f): If logf exists, use it and provide just the
68820         workaround.
68821         * m4/log10f.m4 (gl_FUNC_LOG10F_WORKS): New macro.
68822         (gl_FUNC_LOG10F): Invoke it. Set REPLACE_LOG10F.
68823         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOG10F.
68824         * modules/math (Makefile.am): Substitute REPLACE_LOG10F.
68825         * modules/log10f (configure.ac): Consider REPLACE_LOG10F.
68826         (Depends-on): Update conditions.
68827         * doc/posix-functions/log10f.texi: Mention the OSF/1 5.1 problem.
68829 2012-04-01  Bruno Haible  <bruno@clisp.org>
68831         log10: Work around OSF/1 5.1 bug.
68832         * lib/math.in.h (log10): New declaration.
68833         * lib/log10.c: New file.
68834         * m4/log10.m4 (gl_FUNC_LOG10_WORKS): New macro.
68835         (gl_FUNC_LOG10): Invoke it. Set REPLACE_LOG10.
68836         * m4/math_h.m4 (gl_MATH_H): Test whether log10 is declared.
68837         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG10, REPLACE_LOG10.
68838         * modules/math (Makefile.am): Substitute GNULIB_LOG10, REPLACE_LOG10.
68839         * modules/log10 (Files): Add lib/log10.c.
68840         (Depends-on): Add math.
68841         (configure.ac): If REPLACE_LOG10 is 1, compile an override.
68842         * tests/test-math-c++.cc: Check the declaration of log10.
68843         * doc/posix-functions/log10.texi: Mention the OSF/1 5.1 problem.
68845 2012-03-31  Bruno Haible  <bruno@clisp.org>
68847         log10l tests: More tests.
68848         * modules/log10l-tests (Files): Add tests/test-log10l.h,
68849         tests/minus-zero.h, tests/randoml.c.
68850         (Makefile.am): Add randoml.c to test_log10l_SOURCES.
68851         * tests/test-log10l.c: Include <float.h>, minus-zero.h, test-log10l.h.
68852         (main): Invoke test_function.
68854         log10f tests: More tests.
68855         * modules/log10f-tests (Files): Add tests/test-log10.h,
68856         tests/minus-zero.h, tests/randomf.c.
68857         (Makefile.am): Add randomf.c to test_log10f_SOURCES.
68858         * tests/test-log10f.c: Include <float.h>, minus-zero.h, test-log10.h.
68859         (main): Invoke test_function.
68861         log10 tests: More tests.
68862         * tests/test-log10.h: New file.
68863         * modules/log10-tests (Files): Add tests/test-log10.h,
68864         tests/minus-zero.h, tests/randomd.c.
68865         (Makefile.am): Add randomd.c to test_log10_SOURCES.
68866         * tests/test-log10.c: Include <float.h>, minus-zero.h, test-log10.h.
68867         (main): Invoke test_function.
68869 2012-03-31  Simon Josefsson  <simon@josefsson.org>
68871         fflush: Fix syntax error.
68872         * lib/fflush.c: Include unused-parameter.h, needed for
68873         _GL_UNUSED_PARAMETER.
68874         * modules/fflush (Depends-on): Add snippet/unused-parameter.
68876 2012-03-30  Paul Eggert  <eggert@cs.ucla.edu>
68878         regex: pacify GCC when compiling GRUB
68879         * lib/regcomp.c (init_dfa): Make a pointer 'const', to avoid
68880         a diagnostic.  Reported by Vladimir Serbinenko in
68881         <http://lists.gnu.org/r/bug-gnulib/2012-03/msg00163.html>.
68883 2012-03-29  Eric Blake  <eblake@redhat.com>
68885         stdio: don't assume gets any more
68886         * m4/stdio_h.m4 (gl_STDIO_H, gl_STDIO_H_DEFAULTS): Drop gets
68887         support.
68888         * modules/stdio (Makefile.am): Likewise.
68889         * lib/stdio-read.c (gets): Likewise.
68890         * tests/test-stdio-c++.cc: Likewise.
68891         * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Fix comment.
68892         * lib/stdio.in.h (gets): Make warning occur in more places.
68893         * doc/posix-functions/gets.texi (gets): Update documentation.
68894         Reported by Christer Solskogen.
68896         maint.mk: fix syntax checks without exclusions
68897         * top/maint.mk (_sc_search_regexp): Allow for empty variable.
68898         Reported by Daniel P. Berrange.
68900         strerror_r: avoid compiler warning
68901         * lib/strerror_r.c (strerror_r): Hoist extern declaration to top
68902         level.
68904         fflush: avoid compiler warning
68905         * lib/fflush.c (update_fpos_cache): Mark variables that are
68906         potentially unused.
68908 2012-03-25  Bruno Haible  <bruno@clisp.org>
68910         Tests for module 'localeconv'.
68911         * modules/localeconv-tests: New file.
68912         * tests/test-localeconv.c: New file.
68914         New module 'localeconv'.
68915         * lib/locale.in.h (localeconv): New declaration.
68916         * lib/localeconv.c: New file.
68917         * m4/localeconv.m4: New file.
68918         * m4/locale_h.m4 (gl_LOCALE_H_DEFAULTS): Initialize GNULIB_LOCALECONV,
68919         REPLACE_LOCALECONV.
68920         * modules/locale (Makefile.am): Substitute GNULIB_LOCALECONV,
68921         REPLACE_LOCALECONV.
68922         * modules/localeconv: New file.
68923         * modules/nl_langinfo (Depends-on): Add localeconv.
68924         * modules/human (Depends-on): Likewise.
68925         * doc/posix-functions/localeconv.texi: Mention the new module.
68927 2012-03-25  Bruno Haible  <bruno@clisp.org>
68929         locale: Provide a complete 'struct lconv'.
68930         * m4/locale_h.m4 (gl_LOCALE_H): Set REPLACE_STRUCT_LCONV to 1 if
68931         'struct lconv' does not contain int_p_cs_precedes.
68932         * tests/test-locale.c (main): Check that 'struct lconv' is complete.
68933         * doc/posix-headers/locale.texi: Update.
68935         locale: Provide a complete 'struct lconv' on Solaris 10, 11.
68936         * m4/locale_h.m4 (gl_LOCALE_H): On Solaris, define _LCONV_C99.
68937         * doc/posix-headers/locale.texi: Update.
68939         locale: Provide a working 'struct lconv'.
68940         * lib/locale.in.h (lconv): Override if REPLACE_STRUCT_LCONV is 1.
68941         * m4/locale_h.m4 (gl_LOCALE_H): Set REPLACE_STRUCT_LCONV to 1 if
68942         'struct lconv' does not even contain decimal_point.
68943         (gl_LOCALE_H_DEFAULTS): Initialize REPLACE_STRUCT_LCONV.
68944         * modules/locale (Makefile.am): Substitute REPLACE_STRUCT_LCONV.
68945         * tests/test-locale.c (main): Check that 'struct lconv' is complete.
68946         * doc/posix-headers/locale.texi: Mention the problems with
68947         'struct lconv'.
68948         Reported by Gianluigi Tiesi <sherpya@netfarm.it>.
68950 2012-03-24  Bruno Haible  <bruno@clisp.org>
68952         Enable common subexpression optimization in GCC.
68953         * lib/unitypes.in.h (_UC_ATTRIBUTE_CONST, _UC_ATTRIBUTE_PURE): New
68954         macros.
68955         * lib/unicase.in.h (uc_toupper, uc_tolower, uc_totitle): Declare with
68956         GCC attribute 'const'.
68957         (uc_locale_language): Declare with GCC attribute 'pure'.
68958         * lib/unicase/caseprop.h (uc_is_cased, uc_is_case_ignorable): Declare
68959         with GCC attribute 'const'.
68960         * lib/unictype.in.h (uc_is_general_category_withtable,
68961         uc_combining_class, uc_combining_class_name,
68962         uc_combining_class_long_name, uc_bidi_class_name,
68963         uc_bidi_category_name, uc_bidi_class_long_name, uc_bidi_class,
68964         uc_bidi_category, uc_is_bidi_class, uc_is_bidi_category,
68965         uc_decimal_value, uc_digit_value, uc_numeric_value,
68966         uc_joining_type_name, uc_joining_type_long_name, uc_joining_type,
68967         uc_joining_group_name, uc_joining_group, uc_is_property_*, uc_script,
68968         uc_block, uc_is_c_whitespace, uc_is_java_whitespace,
68969         uc_c_ident_category, uc_java_ident_category, uc_is_alnum, uc_is_alpha,
68970         uc_is_cntrl, uc_is_digit, uc_is_graph, uc_is_lower, uc_is_print,
68971         uc_is_punct, uc_is_space, uc_is_upper, uc_is_xdigit, uc_is_blank):
68972         Declare with GCC attribute 'const'.
68973         (uc_general_category_name, uc_general_category_long_name,
68974         uc_general_category_byname, uc_general_category,
68975         uc_is_general_category, uc_combining_class_byname,
68976         uc_bidi_class_byname, uc_bidi_category_byname, uc_joining_type_byname,
68977         uc_joining_group_byname, uc_script_byname, uc_is_script, uc_is_block):
68978         Declare with GCC attribute 'pure'.
68979         * lib/unigbrk.in.h (uc_graphemeclusterbreak_property,
68980         uc_is_grapheme_break, u8_grapheme_next, u16_grapheme_next,
68981         u32_grapheme_next, u8_grapheme_prev, u16_grapheme_prev,
68982         u32_grapheme_prev, lib/uniname.in.h (unicode_name_character): Declare
68983         with GCC attribute 'pure'.
68984         * lib/uninorm.in.h (uc_composition): Declare with GCC attribute
68985         'const'.
68986         (uninorm_decomposing_form): Declare with GCC attribute 'pure'.
68987         * lib/unistr.in.h (): Declare with GCC attribute 'const'.
68988         (u8_check, u16_check, u32_check, u8_mblen, u16_mblen, u32_mblen,
68989         u8_cmp, u16_cmp, u32_cmp, u8_cmp2, u16_cmp2, u32_cmp2, u8_chr, u16_chr,
68990         u32_chr, u8_mbsnlen, u16_mbsnlen, u32_mbsnlen, u8_strmblen,
68991         u16_strmblen, u32_strmblen, u8_strlen, u16_strlen, u32_strlen,
68992         u8_strnlen, u16_strnlen, u32_strnlen, u8_strcmp_gnu, u8_strcmp,
68993         u16_strcmp, u32_strcmp, u8_strncmp, u16_strncmp, u32_strncmp,
68994         u8_strchr, u16_strchr, u32_strchr, u8_strrchr, u16_strrchr,
68995         u32_strrchr, u8_strcspn, u16_strcspn, u32_strcspn, u8_strspn,
68996         u16_strspn, u32_strspn, u8_strpbrk, u16_strpbrk, u32_strpbrk,
68997         u8_strstr, u16_strstr, u32_strstr, u8_startswith, u16_startswith,
68998         u32_startswith, u8_endswith, u16_endswith, u32_endswith): Declare with
68999         GCC attribute 'pure'.
69000         * lib/uniwbrk.in.h (uc_wordbreak_property): Declare with GCC attribute
69001         'const'.
69002         * lib/uniwidth.in.h (uc_width): Simplify declaration.
69003         (u8_width, u16_width, u32_width, u8_strwidth, u16_strwidth,
69004         u32_strwidth): Declare with GCC attribute 'pure'.
69006         Enable common subexpression optimization in GCC.
69007         * lib/dirent.in.h (_GL_ATTRIBUTE_PURE): Define, like in string.in.h.
69008         (alphasort): Declare with GCC attribute 'pure'.
69009         * lib/stdlib.in.h (_GL_ATTRIBUTE_PURE): Define, like in string.in.h.
69010         (atoll): Declare with GCC attribute 'pure'.
69011         * lib/string.in.h (mbslen, mbsnlen, mbschr, mbsrchr, mbsstr,
69012         mbscasecmp, mbsncasecmp, mbspcasecmp, mbscasestr, mbscspn, mbspbrk,
69013         mbsspn, strverscmp): Declare with GCC attribute 'pure'.
69014         * lib/wchar.in.h (_GL_ATTRIBUTE_PURE): Define, like in string.in.h.
69015         (btowc, wctob, wcwidth, wmemchr, wmemcmp, wcslen, wcsnlen, wcscmp,
69016         wcsncmp, wcscasecmp, wcsncasecmp, wcschr, wcsrchr, wcscspn, wcsspn,
69017         wcspbrk, wcsstr, wcswidth): Declare with GCC attribute 'pure'.
69019 2012-03-24  Bruno Haible  <bruno@clisp.org>
69021         gnulib-tool: Avoid unintended error output from 'cmp'.
69022         * gnulib-tool (func_add_file, func_update_file, func_import): Use
69023         "cmp -s", not "cmp > /dev/null".
69025 2012-03-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
69027         gnulib-tool: fix imprecise comments w.r.t. an automake bug
69029         It's not just Automake versions < 1.9b that creates an empty
69030         pkgdatadir at installation time if pkgdata_DATA is specified
69031         to empty; modern automake versions do this as well, at least
69032         until automake 1.11.4 (not yet released at the moment of writing,
69033         but soon to appear).  That behaviour was generally considered a
69034         feature rather than a bug, at least until this discussion:
69035         <http://lists.gnu.org/r/automake/2012-03/msg00014.html>
69037         See also automake bugs #10997 and #11030.
69039         * gnulib-tool (func_emit_lib_Makefile_am): Adjust comments.  Add
69040         reference to relevant automake bug numbers.
69041         (func_emit_tests_Makefile_am): Likewise.
69043 2012-03-20  Reuben Thomas  <rrt@sc3d.org>
69045         announce-gen: use Digest::SHA when possible
69046         * build-aux/announce-gen: Use Digest::SHA when possible, falling
69047         back to Digest::SHA1 if necessary.
69049 2012-03-20  Jim Meyering  <meyering@redhat.com>
69051         tests: avoid gcc warnings about argv vs. const initializers
69052         * tests/test-posix_spawn1.c (main): Cast to "(char *)" to avoid two
69053         warnings about discarding 'const' qualifier from pointer target type.
69054         * tests/test-posix_spawn2.c (main): Likewise.
69056 2012-03-20  Reuben Thomas  <rrt@sc3d.org>
69058         README-release: simplify slightly
69059         * top/README-release: Run "git checkout master" only once.
69061 2012-03-15  Mark Wielaard  <mark@klomp.org>
69063         git-merge-changelog: add specific example on how to use with hg.
69064         * lib/git-merge-changelog.c: Add example on how to use in .hgrc.
69066 2012-03-18  Mark Wielaard  <mark@klomp.org>
69068         lib/git-merge-changelog.c (status): Report bugs to bug-gnulib@gnu.org.
69070 2012-03-18  Andreas Oberritter  <obi@opendreambox.org>
69072         git-version-gen: don't let "prefix" envvar cause trouble
69073         * build-aux/git-version-gen (prefix): Initialize properly,
69074         so as not to use a value specified via the environment.
69075         Details here: http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10810
69077 2012-03-16  Paul Eggert  <eggert@cs.ucla.edu>
69079         regex: diagnose too-large repeat counts in EREs
69080         Previously, the code did not diagnose the too-large repeat count
69081         in EREs like 'b{1000000000}'; instead, it silently treated the ERE
69082         as if it were 'b\{1000000000}', which is unexpected.
69083         * lib/regcomp.c (parse_dup_op): Fail with REG_ESIZE if a repeat count
69084         is too large.  REG_ESIZE is used nowhere else, and the diagnostic
69085         is a reasonable one for this problem.  Another option would be to
69086         create a new REG_OVERFLOW error for repeat counts that are too large.
69087         (fetch_number): Return RE_DUP_MAX + 1, not REG_ERROR, if the repeat
69088         count is too large, so that the caller can distinguish the two cases.
69089         * lib/regex.h (_REG_ESIZE): Document that this is now a generic
69090         "Too large" return code, and that repeat counts are one example of this.
69092 2012-03-16  Paul Eggert  <eggert@cs.ucla.edu>
69094         doc: some glibc x32 integer width issues
69095         * doc/posix-headers/sys_types.texi (sys/types.h):
69096         * doc/posix-headers/time.texi (time.h):
69097         Mention that glibc x32 does not conform to POSIX in a couple of
69098         areas related to integer widths.
69100 2012-03-15  Bruno Haible  <bruno@clisp.org>
69102         fmal: Avoid test failure on OpenBSD 5.1/SPARC64.
69103         * lib/fma.c (VOLATILE): New macro.
69104         (FUNC): Use it to work around a GCC compiler bug.
69106 2012-03-13  Bruno Haible  <bruno@clisp.org>
69108         hypotl: Bypass broken implementation in OpenBSD 5.1/SPARC.
69109         * m4/hypotl.m4 (gl_FUNC_HYPOTL_WORKS): New macro.
69110         (gl_FUNC_HYPOTL): Invoke it. If the function does not work, set
69111         REPLACE_HYPOTL to 1.
69112         * doc/posix-functions/hypotl.texi: Mention the OpenBSD 5.1/SPARC bug.
69114 2012-03-13  Bruno Haible  <bruno@clisp.org>
69116         remainderl: Bypass broken implementation in OpenBSD 5.1/SPARC.
69117         * m4/remainderl.m4 (gl_FUNC_REMAINDERL_WORKS): New macro.
69118         (gl_FUNC_REMAINDERL): Invoke it. If the function does not work, set
69119         REPLACE_REMAINDERL to 1.
69120         * doc/posix-functions/remainderl.texi: Mention the OpenBSD 5.1/SPARC
69121         bug.
69123 2012-03-13  Bruno Haible  <bruno@clisp.org>
69125         sqrtl: Bypass broken implementation in OpenBSD 5.1/SPARC.
69126         * lib/math.in.h (sqrtl): Replace it if REPLACE_SQRTL is 1.
69127         * m4/sqrtl.m4 (gl_FUNC_SQRTL_WORKS): New macro.
69128         (gl_FUNC_SQRTL): Invoke it. Set REPLACE_SQRTL to 1 if sqrtl() produces
69129         too big rounding errors.
69130         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_SQRTL.
69131         * modules/math (Makefile.am): Substitute REPLACE_SQRTL.
69132         * modules/sqrtl (configure.ac): Consider REPLACE_SQRTL.
69133         (Depends-on): Update conditions.
69134         * tests/test-sqrtl.c (my_ldexpl): New function.
69135         (main): Add test of a particular value.
69136         * doc/posix-functions/sqrtl.texi: Mention the OpenBSD 5.1/SPARC bug.
69138 2012-03-13  Pádraig Brady  <P@draigBrady.com>
69140         doc: Update timer_* platform portability notes.
69141         * doc/posix-functions/timer_create.texi: Add platforms (OpenBSD 4.9)
69142         that always return ENOSYS.
69143         * doc/posix-functions/timer_delete.texi: Likewise.
69144         * doc/posix-functions/timer_gettime.texi: Likewise.
69145         * doc/posix-functions/timer_settime.texi: Likewise.
69147 2012-03-13  Bruno Haible  <bruno@clisp.org>
69149         cbrtl: Bypass broken implementation in OpenBSD 5.1/SPARC.
69150         * m4/cbrtl.m4 (gl_FUNC_CBRTL_WORKS): New macro.
69151         (gl_FUNC_CBRTL): Invoke it. If the function does not work, set
69152         REPLACE_CBRTL to 1.
69153         * doc/posix-functions/cbrtl.texi: Mention the OpenBSD 5.1/SPARC bug.
69155 2012-03-13  Bruno Haible  <bruno@clisp.org>
69157         remainderl: Avoid compilation error on AIX >= 5.2.
69158         * lib/math.in.h (remainderl): Undefine macro from the system header.
69160 2012-03-13  Bruno Haible  <bruno@clisp.org>
69162         Avoid compilation errors with MSVC option -fp:strict.
69163         * lib/cbrt.c: Use MSVC specific pragma fenv_access.
69164         * lib/cbrtf.c: Likewise.
69165         Reported by Michael Goffioul <michael.goffioul@gmail.com>.
69167 2012-03-12  Bruno Haible  <bruno@clisp.org>
69169         uninorm: Don't crash in out-of-memory conditions.
69170         * lib/uninorm/u-normalize-internal.h (FUNC): Handle malloc() failure
69171         gracefully.
69172         * lib/uninorm/uninorm-filter.c (uninorm_filter_write): Likewise.
69173         Based on a report and patch by Stephen Gallagher <sgallagh@redhat.com>.
69175 2012-03-13  Akim Demaille  <akim@lrde.epita.fr>
69177         quote: fix syntax-check
69178         * top/maint.mk (sc_prohibit_quote_without_use): quote.h
69179         also exports quote_quoting_options.
69181 2012-03-12  Simon Josefsson  <simon@josefsson.org>
69183         Collapse list of copyright years to ranges.  See
69184         <https://lists.gnu.org/r/bug-gnulib/2012-03/msg00051.html>.
69185         * build-aux/bootstrap.conf, build-aux/csharpcomp.sh.in,
69186         build-aux/csharpexec.sh.in, build-aux/gnupload,
69187         build-aux/install-reloc, build-aux/javacomp.sh.in,
69188         build-aux/javaexec.sh.in, build-aux/ldd.sh.in,
69189         build-aux/move-if-change, build-aux/reloc-ldflags,
69190         build-aux/relocatable.sh.in, build-aux/x-to-1.in: Fix copyright.
69192 2012-03-11  Bruno Haible  <bruno@clisp.org>
69194         log2f-ieee: Work around test failure on NetBSD 5.1 and Solaris 10.
69195         * m4/log2f-ieee.m4: New file.
69196         * m4/log2f.m4 (gl_FUNC_LOG2F): If gl_FUNC_LOG2F_IEEE is present, test
69197         whether log2f works with a minus zero argument. Replace it if not.
69198         * modules/log2f-ieee (Files): Add m4/log2f-ieee.m4.
69199         (Depends-on): Add log2-ieee.
69200         (configure.ac): Invoke gl_FUNC_LOG2F_IEEE.
69201         * doc/posix-functions/log2f.texi: Mention the log2f-ieee module.
69203         log2-ieee: Work around test failure on NetBSD 5.1 and Solaris 10.
69204         * m4/log2-ieee.m4: New file.
69205         * m4/log2.m4 (gl_FUNC_LOG2): If gl_FUNC_LOG2_IEEE is present, test
69206         whether log2 works with a minus zero argument. Replace it if not.
69207         * modules/log2-ieee (Files): Add m4/log2-ieee.m4.
69208         (configure.ac): Invoke gl_FUNC_LOG2_IEEE.
69209         * doc/posix-functions/log2.texi: Mention the log2-ieee module.
69211         Tests for module 'log2l-ieee'.
69212         * modules/log2l-ieee-tests: New file.
69213         * tests/test-log2l-ieee.c: New file.
69215         New module 'log2l-ieee'.
69216         * modules/log2l-ieee: New file.
69218         Tests for module 'log2-ieee'.
69219         * modules/log2-ieee-tests: New file.
69220         * tests/test-log2-ieee.c: New file.
69222         New module 'log2-ieee'.
69223         * modules/log2-ieee: New file.
69225         Tests for module 'log2f-ieee'.
69226         * modules/log2f-ieee-tests: New file.
69227         * tests/test-log2f-ieee.c: New file.
69228         * tests/test-log2-ieee.h: New file.
69230         New module 'log2f-ieee'.
69231         * modules/log2f-ieee: New file.
69233 2012-03-11  Bruno Haible  <bruno@clisp.org>
69235         Tests for module 'log2l'.
69236         * modules/log2l-tests: New file.
69237         * tests/test-log2l.c: New file.
69239         New module 'log2l'.
69240         * lib/math.in.h (log2l): New declaration.
69241         * lib/log2l.c: New file.
69242         * m4/log2l.m4: New file.
69243         * m4/math_h.m4 (gl_MATH_H): Test whether log2l is declared.
69244         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG2L, HAVE_DECL_LOG2L,
69245         REPLACE_LOG2L.
69246         * modules/math (Makefile.am): Substitute GNULIB_LOG2L, HAVE_DECL_LOG2L,
69247         REPLACE_LOG2L.
69248         * modules/log2l: New file.
69249         * tests/test-math-c++.cc: Check the declaration of log2l.
69250         * doc/posix-functions/log2l.texi: Mention the new module and the IRIX
69251         and OSF/1 problems.
69253 2012-03-11  Bruno Haible  <bruno@clisp.org>
69255         Tests for module 'log2f'.
69256         * modules/log2f-tests: New file.
69257         * tests/test-log2f.c: New file.
69259         New module 'log2f'.
69260         * lib/math.in.h (log2f): New declaration.
69261         * lib/log2f.c: New file.
69262         * m4/log2f.m4: New file.
69263         * m4/math_h.m4 (gl_MATH_H): Test whether log2f is declared.
69264         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG2F, HAVE_DECL_LOG2F,
69265         REPLACE_LOG2F.
69266         * modules/math (Makefile.am): Substitute GNULIB_LOG2F, HAVE_DECL_LOG2F,
69267         REPLACE_LOG2F.
69268         * modules/log2f: New file.
69269         * tests/test-math-c++.cc: Check the declaration of log2f.
69270         * doc/posix-functions/log2f.texi: Mention the new module and the IRIX
69271         and OSF/1 and Cygwin problems.
69273 2012-03-11  Bruno Haible  <bruno@clisp.org>
69275         Tests for module 'log2'.
69276         * modules/log2-tests: New file.
69277         * tests/test-log2.c: New file.
69278         * tests/test-log2.h: New file.
69280         New module 'log2'.
69281         * lib/math.in.h (log2): New declaration.
69282         * lib/log2.c: New file.
69283         * m4/log2.m4: New file.
69284         * m4/math_h.m4 (gl_MATH_H): Test whether log2 is declared.
69285         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG2, HAVE_DECL_LOG2,
69286         REPLACE_LOG2.
69287         * modules/math (Makefile.am): Substitute GNULIB_LOG2, HAVE_DECL_LOG2,
69288         REPLACE_LOG2.
69289         * modules/log2: New file.
69290         * tests/test-math-c++.cc: Check the declaration of log2.
69291         * doc/posix-functions/log2.texi: Mention the new module and the IRIX
69292         and OSF/1 and Cygwin problems.
69294 2012-03-11  Bruno Haible  <bruno@clisp.org>
69296         exp2* tests: More tests.
69297         * tests/test-exp2.h (test_function): Test all integral arguments that
69298         don't need to overflow or denormalized numbers.
69299         * tests/test-exp2.c (MAX_EXP, MIN_EXP): New macros.
69300         * tests/test-exp2f.c (MAX_EXP, MIN_EXP): Likewise.
69301         * tests/test-exp2l.c (MAX_EXP, MIN_EXP): Likewise.
69303 2012-03-10  Bruno Haible  <bruno@clisp.org>
69305         log1pl-ieee: Work around test failure on AIX 7.1.
69306         * modules/log1pl-ieee (Depends-on): Add log1p-ieee.
69308         log1pl-ieee: Work around test failure on IRIX 6.5.
69309         * m4/log1pl-ieee.m4: New file.
69310         * m4/log1pl.m4 (gl_FUNC_LOG1PL): If gl_FUNC_LOG1PL_IEEE is present,
69311         test whether log1pl works with a minus zero argument. Replace it if
69312         not.
69313         * lib/math.in.h (log1pl): Override if REPLACE_LOG1PL is 1.
69314         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOG1PL.
69315         * modules/math (Makefile.am): Substitute REPLACE_LOG1PL.
69316         * modules/log1pl (configure.ac): Consider REPLACE_LOG1PL.
69317         (Depends-on): Update conditions.
69318         * modules/log1pl-ieee (Files): Add m4/log1p-ieee.m4, m4/minus-zero.m4,
69319         m4/signbit.m4.
69320         (configure.ac): Invoke gl_FUNC_LOG1PL_IEEE.
69321         * doc/posix-functions/log1pl.texi: Mention the log1pl-ieee module.
69323         log1pf-ieee: Work around test failure on OpenBSD 4.9 and AIX 7.1.
69324         * m4/log1pf-ieee.m4: New file.
69325         * m4/log1pf.m4 (gl_FUNC_LOG1PF): If gl_FUNC_LOG1PF_IEEE is present,
69326         test whether log1pf works with a minus zero argument. Replace it if
69327         not.
69328         * modules/log1pf-ieee (Files): Add m4/log1pf-ieee.m4, m4/minus-zero.m4,
69329         m4/signbit.m4.
69330         (configure.ac): Invoke gl_FUNC_LOG1PF_IEEE.
69331         * doc/posix-functions/log1pf.texi: Mention the log1pf-ieee module.
69333         log1pf-ieee: Work around test failure on AIX 5.1 and HP-UX 11.
69334         * modules/log1pf-ieee (Depends-on): Add log1p-ieee.
69335         (configure.ac): Require gl_FUNC_LOG1PF.
69337         log1p-ieee: Work around test failure on AIX 7.1 and HP-UX 11.
69338         * m4/log1p-ieee.m4: New file.
69339         * m4/log1p.m4 (gl_FUNC_LOG1P): If gl_FUNC_LOG1P_IEEE is present, test
69340         whether log1p works with a minus zero argument. Replace it if not.
69341         * lib/math.in.h (log1p): Override if REPLACE_LOG1P is 1.
69342         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOG1P.
69343         * modules/math (Makefile.am): Substitute REPLACE_LOG1P.
69344         * modules/log1p (configure.ac): Consider REPLACE_LOG1P.
69345         (Depends-on): Update conditions.
69346         * modules/log1p-ieee (Files): Add m4/log1p-ieee.m4, m4/minus-zero.m4,
69347         m4/signbit.m4.
69348         (configure.ac): Invoke gl_FUNC_LOG1P_IEEE.
69349         * doc/posix-functions/log1p.texi: Mention the log1p-ieee module.
69351         Tests for module 'log1pl-ieee'.
69352         * modules/log1pl-ieee-tests: New file.
69353         * tests/test-log1pl-ieee.c: New file.
69355         New module 'log1pl-ieee'.
69356         * modules/log1pl-ieee: New file.
69358         Tests for module 'log1p-ieee'.
69359         * modules/log1p-ieee-tests: New file.
69360         * tests/test-log1p-ieee.c: New file.
69362         New module 'log1p-ieee'.
69363         * modules/log1p-ieee: New file.
69365         Tests for module 'log1pf-ieee'.
69366         * modules/log1pf-ieee-tests: New file.
69367         * tests/test-log1pf-ieee.c: New file.
69368         * tests/test-log1p-ieee.h: New file.
69370         New module 'log1pf-ieee'.
69371         * modules/log1pf-ieee: New file.
69373 2012-03-10  Bruno Haible  <bruno@clisp.org>
69375         Tests for module 'log1pl'.
69376         * modules/log1pl-tests: New file.
69377         * tests/test-log1pl.c: New file.
69379         New module 'log1pl'.
69380         * lib/math.in.h (log1pl): New declaration.
69381         * lib/log1pl.c: New file.
69382         * m4/log1pl.m4: New file.
69383         * m4/math_h.m4 (gl_MATH_H): Test whether log1pl is declared.
69384         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG1PL, HAVE_LOG1PL.
69385         * modules/math (Makefile.am): Substitute GNULIB_LOG1PL, HAVE_LOG1PL.
69386         * modules/log1pl: New file.
69387         * tests/test-math-c++.cc: Check the declaration of log1pl.
69388         * doc/posix-functions/log1pl.texi: Mention the new module.
69390 2012-03-10  Bruno Haible  <bruno@clisp.org>
69392         Tests for module 'log1pf'.
69393         * modules/log1pf-tests: New file.
69394         * tests/test-log1pf.c: New file.
69396         New module 'log1pf'.
69397         * lib/math.in.h (log1pf): New declaration.
69398         * lib/log1pf.c: New file.
69399         * m4/log1pf.m4: New file.
69400         * m4/math_h.m4 (gl_MATH_H): Test whether log1pf is declared.
69401         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG1PF, HAVE_LOG1PF,
69402         REPLACE_LOG1PF.
69403         * modules/math (Makefile.am): Substitute GNULIB_LOG1PF, HAVE_LOG1PF,
69404         REPLACE_LOG1PF.
69405         * modules/log1pf: New file.
69406         * tests/test-math-c++.cc: Check the declaration of log1pf.
69407         * doc/posix-functions/log1pf.texi: Mention the new module.
69409 2012-03-10  Bruno Haible  <bruno@clisp.org>
69411         log1p tests: More tests.
69412         * tests/test-log1p.h: New file.
69413         * modules/log1p-tests (Files): Add tests/test-log1p.h, tests/randomd.c.
69414         (Makefile.am): Add randomd.c to test_log1p_SOURCES.
69415         * tests/test-log1p.c: Include <float.h> and test-log1p.h.
69416         (main): Invoke test_function.
69418         log1p: Provide replacement for Minix and MSVC.
69419         * lib/math.in.h (log1p): New declaration.
69420         * lib/log1p.c: New file.
69421         * m4/log1p.m4: New file.
69422         * m4/math_h.m4 (gl_MATH_H): Test whether log1p is declared.
69423         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG1P, HAVE_LOG1P.
69424         * modules/math (Makefile.am): Substitute GNULIB_LOG1P, HAVE_LOG1P.
69425         * modules/log1p (Files): Add lib/log1p.c, m4/log1p.m4.
69426         (Depends-on): Add math, isnand, log, round.
69427         (configure.ac): Invoke gl_FUNC_LOG1P. Arrange to compile replacement if
69428         HAVE_LOG1P is 0.
69429         * tests/test-math-c++.cc: Check the declaration of log1p.
69430         * doc/posix-functions/log1p.texi: Mention the replacement.
69432 2012-03-10  Bruno Haible  <bruno@clisp.org>
69434         math tests: Small simplification.
69435         * tests/test-exp.h (test_function): Use the same err_bound for
69436         'double' on platforms with sizeof (long double) == sizeof (double)
69437         than on platforms with sizeof (long double) > sizeof (double).
69438         * tests/test-exp2.h (test_function): Likewise.
69439         * tests/test-expm1.h (test_function): Likewise.
69440         * tests/test-log.h (test_function): Likewise.
69442 2012-03-10  Bruno Haible  <bruno@clisp.org>
69444         Fix some comments.
69445         * lib/expl.c: Fix an ambiguous comment.
69446         * lib/expm1.c: Likewise.
69447         * lib/expm1l.c: Likewise.
69448         * lib/exp2.c: Likewise.
69449         * lib/exp2l.c: Likewise.
69451 2012-03-10  Paul Eggert  <eggert@cs.ucla.edu>
69453         regex: allow inclusion of <regex.h> before <limits.h>
69454         Without this patch, portable programs had to include <limits.h> before
69455         <regex.h> if they wanted a consistent value for RE_DUP_MAX.
69456         I ran into this problem with a test version of GNU grep on Solaris 8.
69457         * lib/regex.h: Include <limits.h> if _REGEX_INCLUDE_LIMITS_H.
69458         This is done conditionally so that this change can be merged
69459         back to glibc.
69460         * m4/regex.m4 (gl_REGEX): Define _REGEX_INCLUDE_LIMITS_H if
69461         using the included regex.
69463         fts: depend on fdopendir
69464         * modules/fts (Depends-on): Depend on fdopendir.  This is needed
69465         on Solaris 8, at least, since it lacks fdopendir.  Evidently the
69466         problem was introduced when fdopendir was split out.
69468 2012-03-10  Bruno Haible  <bruno@clisp.org>
69470         Remove unused variables.
69471         * m4/fmodf.m4 (gl_FUNC_FMODF): Remove unused variable 'i'.
69472         * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Likewise.
69474 2012-03-10  Bruno Haible  <bruno@clisp.org>
69476         isnanf-nolibm: Fix last commit.
69477         * lib/isnanf-nolibm.h [IRIX]: Don't include <ieeefp.h>. Declare isnanf.
69479         isnanf-nolibm: Make it work on IRIX 6.5 with cc.
69480         * lib/isnanf-nolibm.h [IRIX]: Include <ieeefp.h>.
69482 2012-03-10  Bruno Haible  <bruno@clisp.org>
69484         logf-ieee: Work around test failure on NetBSD 5.1.
69485         * m4/logf-ieee.m4: New file.
69486         * m4/logf.m4 (gl_FUNC_LOGF): If gl_FUNC_LOGF_IEEE is present, test
69487         whether logf works with a negative argument. Replace it if not.
69488         * lib/logf.c (logf): For negative arguments, return NaN.
69489         * modules/logf-ieee (Files): Add m4/logf-ieee.m4.
69490         (configure.ac): Invoke gl_FUNC_LOGF_IEEE.
69491         * doc/posix-functions/logf.texi: Mention the logf-ieee module.
69493         logf-ieee: Work around test failure on Solaris 9.
69494         * modules/logf-ieee (Depends-on): Add log-ieee.
69495         (configure.ac): Require gl_FUNC_LOGF.
69497         log-ieee: Work around test failure on NetBSD 5.1 and Solaris 11.
69498         * m4/log-ieee.m4: New file.
69499         * m4/log.m4 (gl_FUNC_LOG): If gl_FUNC_LOG_IEEE is present, test whether
69500         log works with a negative argument. Replace it if not.
69501         * lib/log.c (log): For negative arguments, return NaN.
69502         * modules/log-ieee (Files): Add m4/log-ieee.m4.
69503         (configure.ac): Invoke gl_FUNC_LOG_IEEE.
69504         * doc/posix-functions/log.texi: Mention the log-ieee module.
69506         Tests for module 'logl-ieee'.
69507         * modules/logl-ieee-tests: New file.
69508         * tests/test-logl-ieee.c: New file.
69510         New module 'logl-ieee'.
69511         * modules/logl-ieee: New file.
69513         Tests for module 'log-ieee'.
69514         * modules/log-ieee-tests: New file.
69515         * tests/test-log-ieee.c: New file.
69517         New module 'log-ieee'.
69518         * modules/log-ieee: New file.
69520         Tests for module 'logf-ieee'.
69521         * modules/logf-ieee-tests: New file.
69522         * tests/test-logf-ieee.c: New file.
69523         * tests/test-log-ieee.h: New file.
69525         New module 'logf-ieee'.
69526         * modules/logf-ieee: New file.
69528 2012-03-10  Bruno Haible  <bruno@clisp.org>
69530         log: Fix bug introduced on 2012-03-09.
69531         * m4/log.m4 (gl_FUNC_LOG): Require gl_MATH_H_DEFAULTS.
69533 2012-03-10  Pádraig Brady  <P@draigBrady.com>
69535         timer-time: link explicitly with pthreads on glibc
69536         * m4/timer_time.m4 (LIB_TIMER_TIME): Add -lpthread
69537         to support static linking, when newer glibc is
69538         detected, as that contains pthread emulation of
69539         POSIX timer functions where required.
69540         * modules/timer-time: Depend on threadlib to
69541         pull in the appropriate library to link.
69543 2012-03-10  Bruno Haible  <bruno@clisp.org>
69545         log* tests: More tests.
69546         * tests/test-log.h: New file.
69547         * tests/test-log.c: Include <float.h>, minus-zero.h, test-log.h.
69548         (main): Invoke test_function.
69549         * tests/test-logf.c: Include <float.h>, minus-zero.h, test-log.h.
69550         (main): Invoke test_function.
69551         * tests/test-logl.c: Include <float.h>, minus-zero.h, test-log.h.
69552         (main): Invoke test_function.
69553         * modules/log-tests (Files): Add tests/test-log.h, tests/minus-zero.h,
69554         tests/randomd.c.
69555         (Makefile.am): Add randomd.c to test_log_SOURCES.
69556         * modules/logf-tests (Files): Add tests/test-log.h, tests/minus-zero.h,
69557         tests/randomf.c.
69558         (Makefile.am): Add randomf.c to test_logf_SOURCES.
69559         * modules/logl-tests (Files): Add tests/test-log.h, tests/minus-zero.h,
69560         tests/randoml.c.
69561         (Depends-on): Add 'float'.
69562         (Makefile.am): Add randoml.c to test_logl_SOURCES.
69564 2012-03-09  Bruno Haible  <bruno@clisp.org>
69566         logl: Work around OSF/1 5.1 bug.
69567         * lib/math.in.h (logl): Override if REPLACE_LOGL is 1.
69568         * lib/logl.c (logl): If logl exists, use it and provide just the
69569         workaround.
69570         * m4/logl.m4 (gl_FUNC_LOGL_WORKS): New macro.
69571         (gl_FUNC_LOGL): Invoke it. Set REPLACE_LOGL.
69572         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOGL.
69573         * modules/math (Makefile.am): Substitute REPLACE_LOGL.
69574         * modules/logl (configure.ac): Consider REPLACE_LOGL.
69575         (Depends-on): Update conditions.
69576         * doc/posix-functions/logl.texi: Mention the OSF/1 5.1 problem.
69578 2012-03-09  Bruno Haible  <bruno@clisp.org>
69580         logf: Work around OSF/1 5.1 bug.
69581         * lib/math.in.h (logf): Override if REPLACE_LOGF is 1.
69582         * lib/logf.c (logf): If logf exists, use it and provide just the
69583         workaround.
69584         * m4/logf.m4 (gl_FUNC_LOGF_WORKS): New macro.
69585         (gl_FUNC_LOGF): Invoke it. Set REPLACE_LOGF.
69586         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOGF.
69587         * modules/math (Makefile.am): Substitute REPLACE_LOGF.
69588         * modules/logf (configure.ac): Consider REPLACE_LOGF.
69589         (Depends-on): Update conditions.
69590         * doc/posix-functions/logf.texi: Mention the OSF/1 5.1 problem.
69592 2012-03-09  Bruno Haible  <bruno@clisp.org>
69594         log: Work around OSF/1 5.1 bug.
69595         * lib/math.in.h (log): New declaration.
69596         * lib/log.c: New file.
69597         * m4/log.m4 (gl_FUNC_LOG_WORKS): New macro.
69598         (gl_FUNC_LOG): Invoke it. Set REPLACE_LOG.
69599         * m4/math_h.m4 (gl_MATH_H): Test whether log is declared.
69600         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG, REPLACE_LOG.
69601         * modules/math (Makefile.am): Substitute GNULIB_LOG, REPLACE_LOG.
69602         * modules/log (Files): Add lib/log.c.
69603         (Depends-on): Add math.
69604         (configure.ac): If REPLACE_LOG is 1, compile an override.
69605         * tests/test-math-c++.cc: Check the declaration of log.
69606         * doc/posix-functions/log.texi: Mention the OSF/1 5.1 problem.
69608 2012-03-09  Jim Meyering  <meyering@redhat.com>
69610         readtokens.c: adjust wording in a comment
69611         * lib/readtokens.c: Insert omitted "that" in a comment.
69613 2012-03-08  Paul Eggert  <eggert@cs.ucla.edu>
69615         modechange: add notations +40, 00440, etc.
69616         * lib/modechange.c (mode_compile): Support new notations
69617         +40, -40, =440, 00440.  See <http://debbugs.gnu.org/8391>.
69619 2012-03-08  Bruno Haible  <bruno@clisp.org>
69621         exp2l-ieee: Work around test failure on OpenBSD 4.9 and IRIX 6.5.
69622         * m4/exp2l-ieee.m4: New file.
69623         * m4/exp2l.m4 (gl_FUNC_EXP2L): If gl_FUNC_EXP2L_IEEE is present,
69624         test whether exp2l works with a NaN argument and with a negative
69625         infinity argument. Replace it if not.
69626         * lib/math.in.h (exp2l): Override if REPLACE_EXP2L is 1.
69627         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXP2L.
69628         * modules/math (Makefile.am): Substitute REPLACE_EXP2L.
69629         * modules/exp2l (configure.ac): Consider REPLACE_EXP2L.
69630         (Depends-on): Update conditions.
69631         * modules/exp2l-ieee (Files): Add m4/exp2l-ieee.m4.
69632         (configure.ac): Invoke gl_FUNC_EXP2L_IEEE.
69633         * doc/posix-functions/exp2l.texi: Mention the exp2l-ieee module.
69635         Tests for module 'exp2l-ieee'.
69636         * modules/exp2l-ieee-tests: New file.
69637         * tests/test-exp2l-ieee.c: New file.
69639         New module 'exp2l-ieee'.
69640         * modules/exp2l-ieee: New file.
69642         Tests for module 'exp2-ieee'.
69643         * modules/exp2-ieee-tests: New file.
69644         * tests/test-exp2-ieee.c: New file.
69646         New module 'exp2-ieee'.
69647         * modules/exp2-ieee: New file.
69649         Tests for module 'exp2f-ieee'.
69650         * modules/exp2f-ieee-tests: New file.
69651         * tests/test-exp2f-ieee.c: New file.
69652         * tests/test-exp2-ieee.h: New file.
69654         New module 'exp2f-ieee'.
69655         * modules/exp2f-ieee: New file.
69657 2012-03-08  Bruno Haible  <bruno@clisp.org>
69659         Tests for module 'exp2l'.
69660         * modules/exp2l-tests: New file.
69661         * tests/test-exp2l.c: New file.
69663         New module 'exp2l'.
69664         * lib/math.in.h (exp2l): New declaration.
69665         * lib/exp2l.c: New file.
69666         * lib/expl-table.c: New file, extracted from lib/expl.c.
69667         * lib/expl.c (gl_expl_table): New declaration.
69668         (expl): Remove expl_table. Update reference.
69669         * m4/exp2l.m4: New file.
69670         * m4/math_h.m4 (gl_MATH_H): Test whether exp2l is declared.
69671         (gl_MATH_H_DEFAULTS): Initialize GNULIB_EXP2L, HAVE_DECL_EXP2L.
69672         * modules/math (Makefile.am): Substitute GNULIB_EXP2L, HAVE_DECL_EXP2L.
69673         * modules/exp2l: New file.
69674         * modules/expl (Files): Add lib/expl-table.c.
69675         (configure.ac): Compile also expl-table.c.
69676         * tests/test-math-c++.cc: Check the declaration of exp2l.
69677         * doc/posix-functions/exp2l.texi: Mention the new module and the IRIX
69678         problem.
69680 2012-03-08  Bruno Haible  <bruno@clisp.org>
69682         Tests for module 'exp2f'.
69683         * modules/exp2f-tests: New file.
69684         * tests/test-exp2f.c: New file.
69686         New module 'exp2f'.
69687         * lib/math.in.h (exp2f): New declaration.
69688         * lib/exp2f.c: New file.
69689         * m4/exp2f.m4: New file.
69690         * m4/math_h.m4 (gl_MATH_H): Test whether exp2f is declared.
69691         (gl_MATH_H_DEFAULTS): Initialize GNULIB_EXP2F, HAVE_DECL_EXP2F.
69692         * modules/math (Makefile.am): Substitute GNULIB_EXP2F, HAVE_DECL_EXP2F.
69693         * modules/exp2f: New file.
69694         * tests/test-math-c++.cc: Check the declaration of exp2f.
69695         * doc/posix-functions/exp2f.texi: Mention the new module and the
69696         IRIX problem.
69698 2012-03-08  Bruno Haible  <bruno@clisp.org>
69700         Tests for module 'exp2'.
69701         * modules/exp2-tests: New file.
69702         * tests/test-exp2.c: New file.
69703         * tests/test-exp2.h: New file.
69705         New module 'exp2'.
69706         * lib/math.in.h (exp2): New declaration.
69707         * lib/exp2.c: New file.
69708         * m4/exp2.m4: New file.
69709         * m4/math_h.m4 (gl_MATH_H): Test whether exp2 is declared.
69710         (gl_MATH_H_DEFAULTS): Initialize GNULIB_EXP2, HAVE_DECL_EXP2,
69711         REPLACE_EXP2.
69712         * modules/math (Makefile.am): Substitute GNULIB_EXP2, HAVE_DECL_EXP2,
69713         REPLACE_EXP2.
69714         * modules/exp2: New file.
69715         * tests/test-math-c++.cc: Check the declaration of exp2.
69716         * doc/posix-functions/exp2.texi: Mention the new module and the IRIX
69717         and OpenBSD problems.
69719 2012-03-08  Paul Eggert  <eggert@cs.ucla.edu>
69721         savedir: fix comment typo
69722         * lib/savedir.c (savedirstream): Fix typo in comment.
69724 2012-03-08  Bruno Haible  <bruno@clisp.org>
69726         test-readtokens.c: use const; remove unwarranted cast
69727         * tests/test-readtokens.c: Declare delim to be const, to avoid a cast.
69729 2012-03-08  Bruno Haible  <bruno@clisp.org>
69731         fmal: Avoid compilation error on AIX.
69732         * lib/math.in.h (fmal): Undefine macro before declaration. Needed on
69733         AIX 5.2..7.1.
69735 2012-03-08  Bruno Haible  <bruno@clisp.org>
69737         fma, fmaf, fmal: Override undeclared system functions on IRIX 6.5.
69738         * m4/fma.m4 (gl_FUNC_FMA): If fma() exists but is not declared,
69739         arrange to set REPLACE_FMA=1, not HAVE_FMA=0.
69740         * m4/fmaf.m4 (gl_FUNC_FMAF): If fmaf() exists but is not declared,
69741         arrange to set REPLACE_FMAF=1, not HAVE_FMAF=0.
69742         * m4/fmal.m4 (gl_FUNC_FMAL): If fmal() exists but is not declared,
69743         arrange to set REPLACE_FMAL=1, not HAVE_FMAL=0.
69745 2012-03-08  Bruno Haible  <bruno@clisp.org>
69747         remainderf: Override buggy system function on IRIX 6.5.
69748         * m4/remainderf.m4 (gl_FUNC_REMAINDERF_WORKS): New macro.
69749         (gl_FUNC_REMAINDERF): Invoke it. Don't assume remainderf() is declared
69750         when it exists.
69751         * doc/posix-functions/remainderf.texi: Mention the IRIX problems.
69753 2012-03-08  Jim Meyering  <meyering@redhat.com>
69755         test-readtokens.c: avoid const-related compilation warnings
69756         * tests/test-readtokens.c: Avoid const-related compilation warnings.
69758 2012-03-07  Jim Meyering  <meyering@redhat.com>
69759             Bruno Haible  <bruno@clisp.org>
69761         frexp-nolibm, frexpl-nolibm tests: Fix bug introduced on 2012-03-03.
69762         * modules/frexp-nolibm-tests (Files): Add tests/test-frexp.h,
69763         tests/randomd.c.
69764         (Makefile.am): Add randomd.c to test_frexp_nolibm_SOURCES.
69765         * modules/frexpl-nolibm-tests (Files): Add tests/test-frexp.h,
69766         tests/randoml.c.
69767         (Makefile.am): Add randoml.c to test_frexpl_nolibm_SOURCES.
69769 2012-03-07  Bruno Haible  <bruno@clisp.org>
69771         expm1l: Avoid compilation error on AIX.
69772         * lib/math.in.h (expm1l): Undefine macro before declaration. Needed on
69773         AIX 5.2..7.1.
69775 2012-03-07  Bruno Haible  <bruno@clisp.org>
69777         expm1l: Don't override undeclared system function on IRIX 6.5.
69778         * lib/math.in.h (expm1l): Test HAVE_DECL_EXPM1L, not HAVE_EXPM1L.
69779         * m4/expm1l.m4 (gl_FUNC_EXPM1L): Don't assume expm1l() is declared when
69780         it exists. Set HAVE_DECL_EXPM1L.
69781         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize HAVE_DECL_EXPM1L, not
69782         HAVE_EXPM1L.
69783         * modules/math (Makefile.am): Substitute HAVE_DECL_EXPM1L, not
69784         HAVE_EXPM1L.
69785         * doc/posix-functions/expm1l.texi: Mention missing declaration problem.
69787 2012-03-07  Bruno Haible  <bruno@clisp.org>
69789         remainderl: Don't override undeclared system function on IRIX 6.5.
69790         * lib/math.in.h (remainderl): Test HAVE_DECL_REMAINDERL, not
69791         HAVE_REMAINDERL.
69792         * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Don't assume remainderl() is
69793         declared when it exists. Set HAVE_DECL_REMAINDERL.
69794         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize HAVE_DECL_REMAINDERL,
69795         not HAVE_REMAINDERL.
69796         * modules/math (Makefile.am): Substitute HAVE_DECL_REMAINDERL, not
69797         HAVE_REMAINDERL.
69798         * doc/posix-functions/remainderl.texi: Mention missing declaration
69799         problem.
69801 2012-03-07  Bruno Haible  <bruno@clisp.org>
69803         rintf: Don't override undeclared system function on IRIX 6.5.
69804         * lib/math.in.h (rintf): Test HAVE_DECL_RINTF, not HAVE_RINTF.
69805         * m4/rintf.m4 (gl_FUNC_RINTF): Don't assume rintf() is declared when it
69806         exists. Set HAVE_DECL_RINTF.
69807         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize HAVE_DECL_RINTF, not
69808         HAVE_RINTF.
69809         * modules/math (Makefile.am): Substitute HAVE_DECL_RINTF, not
69810         HAVE_RINTF.
69811         * doc/posix-functions/rintf.texi: Mention missing declaration problem.
69813 2012-03-07  Bruno Haible  <bruno@clisp.org>
69815         roundl: Avoid compilation error on AIX.
69816         * lib/math.in.h (roundl): Undefine macro before declaration. Needed on
69817         AIX 5.2..7.1.
69819 2012-03-07  Bruno Haible  <bruno@clisp.org>
69821         roundl: Don't override undeclared system function on IRIX 6.5.
69822         * m4/roundl.m4 (gl_FUNC_ROUNDL): Search for roundl() in the libraries
69823         also when it is not declared. Set HAVE_ROUNDL. For replacement code,
69824         test HAVE_ROUNDL, not HAVE_DECL_ROUNDL.
69825         * modules/roundl (configure.ac): For replacement code, test
69826         HAVE_ROUNDL, not HAVE_DECL_ROUNDL.
69827         (Depends-on): Update conditions.
69828         * doc/posix-functions/roundl.texi: Mention the IRIX problem.
69830 2012-03-07  Bruno Haible  <bruno@clisp.org>
69832         roundf: Don't override undeclared system function on IRIX 6.5.
69833         * m4/roundf.m4 (gl_FUNC_ROUNDF): Search for roundf() in the libraries
69834         also when it is not declared. Set HAVE_ROUNDF. For replacement code,
69835         test HAVE_ROUNDF, not HAVE_DECL_ROUNDF.
69836         * modules/roundf (configure.ac): For replacement code, test
69837         HAVE_ROUNDF, not HAVE_DECL_ROUNDF.
69838         (Depends-on): Update conditions.
69839         * modules/roundf-ieee (Depends-on): Update conditions.
69840         * doc/posix-functions/roundf.texi: Mention the IRIX problem.
69842 2012-03-07  Bruno Haible  <bruno@clisp.org>
69844         round: Don't override undeclared system function on IRIX 6.5.
69845         * m4/check-math-lib.m4 (gl_CHECK_MATH_LIB): Accept an optional third
69846         argument.
69847         * m4/round.m4 (gl_FUNC_ROUND): Search for round() in the libraries
69848         also when it is not declared. Set HAVE_ROUND. For replacement code,
69849         test HAVE_ROUND, not HAVE_DECL_ROUND.
69850         * modules/round (configure.ac): For replacement code, test HAVE_ROUND,
69851         not HAVE_DECL_ROUND.
69852         (Depends-on): Update conditions.
69853         * modules/round-ieee (Depends-on): Update conditions.
69854         * doc/posix-functions/round.texi: Mention the IRIX problem.
69856 2012-03-07  Bruno Haible  <bruno@clisp.org>
69858         copysignf: Don't override undeclared system function on IRIX 6.5.
69859         * lib/math.in.h (copysignf): Test HAVE_DECL_COPYSIGNF, not
69860         HAVE_COPYSIGNF.
69861         * m4/copysignf.m4 (gl_FUNC_COPYSIGNF): Don't assume copysignf() is
69862         declared when it exists. Set HAVE_DECL_COPYSIGNF.
69863         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize HAVE_DECL_COPYSIGNF,
69864         not HAVE_COPYSIGNF.
69865         * modules/math (Makefile.am): Substitute HAVE_DECL_COPYSIGNF, not
69866         HAVE_COPYSIGNF.
69867         * doc/posix-functions/copysignf.texi: Mention missing declaration
69868         problem.
69870 2012-03-07  Jim Meyering  <meyering@redhat.com>
69872         readtokens: add tests
69873         * modules/readtokens-tests: New file.
69874         * tests/test-readtokens.c: New file.
69876 2012-03-07  Jim Meyering  <meyering@redhat.com>
69878         quotearg: the module must now include quote.h
69879         With commit v0.0-7133-g6417476, quotearg.c includes "quote.h".
69880         So must the module.
69881         * modules/quotearg (Files): Add quote.h.
69883 2012-03-06  Paul Eggert  <eggert@cs.ucla.edu>
69885         readtokens: avoid core dumps with unusual calling patterns
69886         Reported by Xu Zhongxing in <http://debbugs.gnu.org/10953>.
69887         * lib/readtokens.c: Include limits.h.
69888         (word, bits_per_word, get_nth_bit, set_nth_bit): New.
69889         (readtoken): Don't cache the delimiters; the cache code was buggy
69890         if !delim && saved_delim, or if the new n_delim differs from the old.
69891         Also, it wasn't thread-safe.
69893 2012-03-07  Bruno Haible  <bruno@clisp.org>
69895         quote: Adhere to common module description layout.
69896         * modules/quote (Makefile.am): Add back empty section.
69898 2012-03-06  Akim Demaille  <demaille@gostai.com>
69900         quote: fuse into quotearg
69901         This patch is made for the benefit of Bison.
69902         quote does not leave the choice of the quoting style to the user.
69903         quoting_style provides poor customizability, yet quoting_options,
69904         which is very rich, is hidden inside quotearg.c.  So in order to
69905         allow quote customization, move its implementation to quotearg.c.
69906         * lib/quote.c: Remove.
69907         * modules/quote: Adjust.
69908         * lib/quotearg.c (quoting_options_from_style): Fix a compiler
69909         warning: provide all the members of literal structs.
69910         (quote_quoting_options): New.
69911         (quote, quote_n): Import implementation from quote.c.
69912         * lib/quote.h: Import the comments from quote.c.
69913         (quote_quoting_options): New.
69915 2012-03-06  Bruno Haible  <bruno@clisp.org>
69917         Tests for module 'expm1l-ieee'.
69918         * modules/expm1l-ieee-tests: New file.
69919         * tests/test-expm1l-ieee.c: New file.
69921         New module 'expm1l-ieee'.
69922         * modules/expm1l-ieee: New file.
69924         Tests for module 'expm1f-ieee'.
69925         * modules/expm1f-ieee-tests: New file.
69926         * tests/test-expm1f-ieee.c: New file.
69928         New module 'expm1f-ieee'.
69929         * modules/expm1f-ieee: New file.
69931         Tests for module 'expm1-ieee'.
69932         * modules/expm1-ieee-tests: New file.
69933         * tests/test-expm1-ieee.c: New file.
69934         * tests/test-expm1-ieee.h: New file.
69936         New module 'expm1-ieee'.
69937         * modules/expm1-ieee: New file.
69938         * m4/expm1-ieee.m4: New file.
69939         * m4/expm1.m4 (gl_FUNC_EXPM1): If gl_FUNC_EXPM1_IEEE is present, test
69940         whether expm1 works with a minus zero argument. Replace it if not.
69941         * lib/math.in.h (expm1): Override if REPLACE_EXPM1 is 1.
69942         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXPM1.
69943         * modules/math (Makefile.am): Substitute REPLACE_EXPM1.
69944         * modules/expm1 (configure.ac): Consider REPLACE_EXPM1.
69945         (Depends-on): Update conditions.
69946         * doc/posix-functions/expm1.texi: Mention the expm1-ieee module and the
69947         AIX problem.
69949 2012-03-06  Bruno Haible  <bruno@clisp.org>
69951         Work around expm1f bug on IRIX 6.5.
69952         * lib/math.in.h (expm1f): Override if REPLACE_EXPM1F is 1.
69953         * m4/expm1f.m4 (gl_FUNC_EXPM1F_WORKS): New macro.
69954         (gl_FUNC_EXPM1F): Invoke it. Set REPLACE_EXPM1F to 1 if expm1f() does
69955         not work.
69956         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXPM1F.
69957         * modules/math (Makefile.am): Substitute REPLACE_EXPM1F.
69958         * modules/expm1f (configure.ac): Consider REPLACE_EXPM1F.
69959         (Depends-on): Update conditions.
69960         * doc/posix-functions/expm1f.texi: Mention the IRIX 6.5 bug.
69962 2012-03-06  Bruno Haible  <bruno@clisp.org>
69964         Tests for module 'expm1l'.
69965         * modules/expm1l-tests: New file.
69966         * tests/test-expm1l.c: New file.
69968         New module 'expm1l'.
69969         * lib/math.in.h (expm1l): New declaration.
69970         * lib/expm1l.c: New file.
69971         * m4/expm1l.m4: New file.
69972         * m4/math_h.m4 (gl_MATH_H): Test whether expm1l is declared.
69973         (gl_MATH_H_DEFAULTS): Initialize GNULIB_EXPM1L, HAVE_EXPM1L.
69974         * modules/math (Makefile.am): Substitute GNULIB_EXPM1L, HAVE_EXPM1L.
69975         * modules/expm1l: New file.
69976         * tests/test-math-c++.cc: Check the declaration of expm1l.
69977         * doc/posix-functions/expm1l.texi: Mention the new module.
69979 2012-03-06  Bruno Haible  <bruno@clisp.org>
69981         Tests for module 'expm1f'.
69982         * modules/expm1f-tests: New file.
69983         * tests/test-expm1f.c: New file.
69985         New module 'expm1f'.
69986         * lib/math.in.h (expm1f): New declaration.
69987         * lib/expm1f.c: New file.
69988         * m4/expm1f.m4: New file.
69989         * m4/math_h.m4 (gl_MATH_H): Test whether expm1f is declared.
69990         (gl_MATH_H_DEFAULTS): Initialize GNULIB_EXPM1F, HAVE_EXPM1F.
69991         * modules/math (Makefile.am): Substitute GNULIB_EXPM1F, HAVE_EXPM1F.
69992         * modules/expm1f: New file.
69993         * tests/test-math-c++.cc: Check the declaration of expm1f.
69994         * doc/posix-functions/expm1f.texi: Mention the new module.
69996 2012-03-06  Bruno Haible  <bruno@clisp.org>
69998         Tests for module 'expm1'.
69999         * modules/expm1-tests: New file.
70000         * tests/test-expm1.c: New file.
70001         * tests/test-expm1.h: New file.
70003         New module 'expm1'.
70004         * lib/math.in.h (expm1): New declaration.
70005         * lib/expm1.c: New file.
70006         * m4/expm1.m4: New file.
70007         * m4/math_h.m4 (gl_MATH_H): Test whether expm1 is declared.
70008         (gl_MATH_H_DEFAULTS): Initialize GNULIB_EXPM1, HAVE_EXPM1.
70009         * modules/math (Makefile.am): Substitute GNULIB_EXPM1, HAVE_EXPM1.
70010         * modules/expm1: New file.
70011         * tests/test-math-c++.cc: Check the declaration of expm1.
70012         * doc/posix-functions/expm1.texi: Mention the new module.
70014 2012-03-06  Bruno Haible  <bruno@clisp.org>
70016         math: Ensure declarations of math functions.
70017         * modules/acosf (Depends-on): Add 'extensions'.
70018         * modules/asinf (Depends-on): Likewise.
70019         * modules/atan2f (Depends-on): Likewise.
70020         * modules/atanf (Depends-on): Likewise.
70021         * modules/cbrt (Depends-on): Likewise.
70022         * modules/cbrtf (Depends-on): Likewise.
70023         * modules/cbrtl (Depends-on): Likewise.
70024         * modules/copysignf (Depends-on): Likewise.
70025         * modules/copysignl (Depends-on): Likewise.
70026         * modules/cosf (Depends-on): Likewise.
70027         * modules/coshf (Depends-on): Likewise.
70028         * modules/expf (Depends-on): Likewise.
70029         * modules/fabsf (Depends-on): Likewise.
70030         * modules/fabsl (Depends-on): Likewise.
70031         * modules/fmaf (Depends-on): Likewise.
70032         * modules/fmal (Depends-on): Likewise.
70033         * modules/fmodf (Depends-on): Likewise.
70034         * modules/fmodl (Depends-on): Likewise.
70035         * modules/frexpf (Depends-on): Likewise.
70036         * modules/frexpl (Depends-on): Likewise.
70037         * modules/hypot (Depends-on): Likewise.
70038         * modules/hypotf (Depends-on): Likewise.
70039         * modules/hypotl (Depends-on): Likewise.
70040         * modules/ldexpf (Depends-on): Likewise.
70041         * modules/ldexpl (Depends-on): Likewise.
70042         * modules/log10f (Depends-on): Likewise.
70043         * modules/log10l (Depends-on): Likewise.
70044         * modules/log1p (Depends-on): Likewise.
70045         * modules/logb (Depends-on): Likewise.
70046         * modules/logf (Depends-on): Likewise.
70047         * modules/modff (Depends-on): Likewise.
70048         * modules/modfl (Depends-on): Likewise.
70049         * modules/powf (Depends-on): Likewise.
70050         * modules/remainderf (Depends-on): Likewise.
70051         * modules/remainderl (Depends-on): Likewise.
70052         * modules/rintf (Depends-on): Likewise.
70053         * modules/rintl (Depends-on): Likewise.
70054         * modules/sinf (Depends-on): Likewise.
70055         * modules/sinhf (Depends-on): Likewise.
70056         * modules/sqrtf (Depends-on): Likewise.
70057         * modules/tanf (Depends-on): Likewise.
70058         * modules/tanhf (Depends-on): Likewise.
70059         * m4/acosf.m4 (gl_FUNC_ACOSF): Require gl_USE_SYSTEM_EXTENSIONS.
70060         * m4/asinf.m4 (gl_FUNC_ASINF): Likewise.
70061         * m4/atan2f.m4 (gl_FUNC_ATAN2F): Likewise.
70062         * m4/atanf.m4 (gl_FUNC_ATANF): Likewise.
70063         * m4/cbrt.m4 (gl_FUNC_CBRT): Likewise.
70064         * m4/cbrtf.m4 (gl_FUNC_CBRTF): Likewise.
70065         * m4/cbrtl.m4 (gl_FUNC_CBRTL): Likewise.
70066         * m4/copysignf.m4 (gl_FUNC_COPYSIGNF): Likewise.
70067         * m4/copysignl.m4 (gl_FUNC_COPYSIGNL): Likewise.
70068         * m4/cosf.m4 (gl_FUNC_COSF): Likewise.
70069         * m4/coshf.m4 (gl_FUNC_COSHF): Likewise.
70070         * m4/expf.m4 (gl_FUNC_EXPF): Likewise.
70071         * m4/fabsf.m4 (gl_FUNC_FABSF): Likewise.
70072         * m4/fabsl.m4 (gl_FUNC_FABSL): Likewise.
70073         * m4/fmaf.m4 (gl_FUNC_FMAF): Likewise.
70074         * m4/fmal.m4 (gl_FUNC_FMAL): Likewise.
70075         * m4/fmodf.m4 (gl_FUNC_FMODF): Likewise.
70076         * m4/fmodl.m4 (gl_FUNC_FMODL): Likewise.
70077         * m4/frexpf.m4 (gl_FUNC_FREXPF): Likewise.
70078         * m4/frexpl.m4 (gl_FUNC_FREXPL): Likewise.
70079         * m4/hypot.m4 (gl_FUNC_HYPOT): Likewise.
70080         * m4/hypotf.m4 (gl_FUNC_HYPOTF): Likewise.
70081         * m4/hypotl.m4 (gl_FUNC_HYPOTL): Likewise.
70082         * m4/ldexpf.m4 (gl_FUNC_LDEXPF): Likewise.
70083         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Likewise.
70084         * m4/log10f.m4 (gl_FUNC_LOG10F): Likewise.
70085         * m4/log10l.m4 (gl_FUNC_LOF10L): Likewise.
70086         * m4/logb.m4 (gl_FUNC_LOGB): Likewise.
70087         * m4/logf.m4 (gl_FUNC_LOGF): Likewise.
70088         * m4/modff.m4 (gl_FUNC_MODFF): Likewise.
70089         * m4/modfl.m4 (gl_FUNC_MODFL): Likewise.
70090         * m4/powf.m4 (gl_FUNC_POWF): Likewise.
70091         * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Likewise.
70092         * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Likewise.
70093         * m4/rintf.m4 (gl_FUNC_RINTF): Likewise.
70094         * m4/rintl.m4 (gl_FUNC_RINTL): Likewise.
70095         * m4/sinf.m4 (gl_FUNC_SINF): Likewise.
70096         * m4/sinhf.m4 (gl_FUNC_SINHF): Likewise.
70097         * m4/sqrtf.m4 (gl_FUNC_SQRTF): Likewise.
70098         * m4/tanf.m4 (gl_FUNC_TANF): Likewise.
70099         * m4/tanhf.m4 (gl_FUNC_TANHF): Likewise.
70101 2012-03-06  Bruno Haible  <bruno@clisp.org>
70103         math: Update module names in warnings.
70104         * lib/math.in.h (acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl,
70105         tanl): Use specific module name in warn-on-use warning.
70107 2012-03-06  Bruno Haible  <bruno@clisp.org>
70109         expl: Simplify computation.
70110         * lib/expl.c (expl): Simplify computation of exp_y. Fix comment.
70112 2012-03-05  Bruno Haible  <bruno@clisp.org>
70114         exp* tests: More tests.
70115         * tests/test-exp.h: New file.
70116         * tests/test-exp.c: Include <float.h> and test-exp.h.
70117         (main): Invoke test_function.
70118         * tests/test-expf.c: Include <float.h> and test-exp.h.
70119         (main): Invoke test_function.
70120         * tests/test-expl.c: Include <float.h> and test-exp.h.
70121         (main): Invoke test_function.
70122         * modules/exp-tests (Files): Add tests/test-exp.h, tests/randomd.c.
70123         (Makefile.am): Add randomd.c to test_exp_SOURCES.
70124         * modules/expf-tests (Files): Add tests/test-exp.h, tests/randomf.c.
70125         (Makefile.am): Add randomf.c to test_expf_SOURCES.
70126         * modules/expl-tests (Files): Add tests/test-exp.h, tests/randoml.c.
70127         (Depends-on): Add 'float'.
70128         (Makefile.am): Add randoml.c to test_expl_SOURCES.
70130         expl: Fix precision of computed result.
70131         * lib/expl.c: Completely rewritten.
70132         * modules/expl (Depends-on): Add isnanl, roundl, ldexpl. Remove floorl.
70133         (Maintainer): Add me.
70134         * m4/expl.m4 (gl_FUNC_EXPL): Update computation of EXPL_LIBM.
70136 2012-03-05  Bruno Haible  <bruno@clisp.org>
70138         cbrt* tests: More tests.
70139         * tests/test-cbrt.h: New file.
70140         * tests/test-cbrt.c: Include <float.h> and test-cbrt.h.
70141         (main): Invoke test_function.
70142         * tests/test-cbrtf.c: Include <float.h> and test-cbrt.h.
70143         (main): Invoke test_function.
70144         * tests/test-cbrtl.c: Include <float.h> and test-cbrt.h.
70145         (main): Invoke test_function.
70146         * modules/cbrt-tests (Files): Add tests/test-cbrt.h, tests/randomd.c.
70147         (Makefile.am): Add randomd.c to test_cbrt_SOURCES.
70148         * modules/cbrtf-tests (Files): Add tests/test-cbrt.h, tests/randomf.c.
70149         (Makefile.am): Add randomf.c to test_cbrtf_SOURCES.
70150         * modules/cbrtl-tests (Files): Add tests/test-cbrt.h, tests/randoml.c.
70151         (Depends-on): Add 'float'.
70152         (Makefile.am): Add randoml.c to test_cbrtl_SOURCES.
70154 2012-03-05  Bruno Haible  <bruno@clisp.org>
70156         hypot* tests: More tests.
70157         * tests/test-hypot.h: New file, partially extracted from
70158         tests/test-hypotl.c.
70159         * tests/test-hypot.c: Include test-hypot.h.
70160         (main): Invoke test_function.
70161         * tests/test-hypotf.c: Include test-hypot.h.
70162         (main): Invoke test_function.
70163         * tests/test-hypotl.c: Include fpucw.h and test-hypot.h.
70164         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING and test_function.
70165         * modules/hypot-tests (Files): Add tests/test-hypot.h, tests/randomd.c.
70166         (Makefile.am): Add randomd.c to test_hypot_SOURCES.
70167         * modules/hypotf-tests (Files): Add tests/test-hypot.h,
70168         tests/randomf.c.
70169         (Makefile.am): Add randomf.c to test_hypotf_SOURCES.
70170         * modules/hypotl-tests (Files): Add tests/test-hypot.h,
70171         tests/randoml.c.
70172         (Depends-on): Add 'fpucw', 'float'.
70173         (Makefile.am): Add randoml.c to test_hypotl_SOURCES.
70175 2012-03-05  Bruno Haible  <bruno@clisp.org>
70177         fpucw: Doc about FreeBSD.
70178         * lib/fpucw.h: Mention FreeBSD in comments.
70180 2012-03-04  Bruno Haible  <bruno@clisp.org>
70182         sqrt* tests: More tests.
70183         * tests/test-sqrt.h: New file.
70184         * tests/test-sqrt.c: Include <float.h> and test-sqrt.h.
70185         (main): Invoke test_function.
70186         * tests/test-sqrtf.c: Include <float.h> and test-sqrt.h.
70187         (main): Invoke test_function.
70188         * tests/test-sqrtl.c: Include <float.h> and test-sqrt.h.
70189         (main): Invoke test_function.
70190         * modules/sqrt-tests (Files): Add tests/test-sqrt.h, tests/randomd.c.
70191         (Makefile.am): Add randomd.c to test_sqrt_SOURCES.
70192         * modules/sqrtf-tests (Files): Add tests/test-sqrt.h, tests/randomf.c.
70193         (Makefile.am): Add randomf.c to test_sqrtf_SOURCES.
70194         * modules/sqrtl-tests (Files): Add tests/test-sqrt.h, tests/randoml.c.
70195         (Depends-on): Add 'float'.
70196         (Makefile.am): Add randoml.c to test_sqrtl_SOURCES.
70198 2012-03-04  Bruno Haible  <bruno@clisp.org>
70200         remainder* tests: More tests.
70201         * tests/test-remainder.h: New file, based on tests/test-fmod.h.
70202         * tests/test-remainder.c: Include <float.h> and test-remainder.h.
70203         (main): Invoke test_function.
70204         * tests/test-remainderf.c: Include <float.h> and test-remainder.h.
70205         (main): Invoke test_function.
70206         * tests/test-remainderl.c: Include <float.h> and test-remainder.h.
70207         (main): Invoke test_function.
70208         * modules/remainder-tests (Files): Add tests/test-remainder.h,
70209         tests/randomd.c.
70210         (Makefile.am): Add randomd.c to test_remainder_SOURCES.
70211         * modules/remainderf-tests (Files): Add tests/test-remainder.h,
70212         tests/randomf.c.
70213         (Makefile.am): Add randomf.c to test_remainderf_SOURCES.
70214         * modules/remainderl-tests (Files): Add tests/test-remainder.h,
70215         tests/randoml.c.
70216         (Depends-on): Add 'float'.
70217         (Makefile.am): Add randoml.c to test_remainderl_SOURCES.
70219 2012-03-04  Bruno Haible  <bruno@clisp.org>
70221         remainder, remainderf, remainderl: Fix computation for large quotients.
70222         * lib/remainder.c: Completely rewritten.
70223         * lib/remainderf.c (remainderf): Use implementation of remainder.c with
70224         USE_FLOAT.
70225         * lib/remainderl.c (remainderl): Use implementation of remainder.c with
70226         USE_LONG_DOUBLE.
70227         * modules/remainder (Depends-on): Add isfinite, signbit, fabs, fmod,
70228         isnand, isinf. Remove round, fma.
70229         * modules/remainderf (Files): Add lib/remainder.c.
70230         (Depends-on): Add isfinite, signbit, fabsf, fmodf, isnanf, isinf.
70231         Remove roundf, fmaf.
70232         * modules/remainderl (Files): Add lib/remainder.c.
70233         (Depends-on): Add float, isfinite, signbit, fabsl, fmodl, isnanl,
70234         isinf. Remove roundl, fmal.
70235         * m4/remainder.m4 (gl_FUNC_REMAINDER): Update computation of
70236         REMAINDER_LIBM.
70237         * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Update computation of
70238         REMAINDERF_LIBM.
70239         * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Update computation of
70240         REMAINDERL_LIBM.
70242 2012-03-04  Bruno Haible  <bruno@clisp.org>
70244         fmod* tests: More tests.
70245         * tests/test-fmod.h (my_ldexp): New function.
70246         (test_function): Reduce amount of random numbers to test. Add tests
70247         of very large quotients x / y.
70248         * tests/test-fmod.c (MAX_EXP): New macro.
70249         * tests/test-fmodf.c (MAX_EXP): Likewise.
70250         * tests/test-fmodl.c (MAX_EXP): Likewise.
70252 2012-03-04  Bruno Haible  <bruno@clisp.org>
70254         fmod, fmodl: Fix computation for large quotients x / y.
70255         * lib/fmod.c: Completely rewritten.
70256         * lib/fmodl.c (fmodl): Use implementation of fmod.c with
70257         USE_LONG_DOUBLE.
70258         * modules/fmod (Depends-on): Add isfinite, signbit, fabs, frexp, ldexp,
70259         isnand. Remove fma.
70260         * modules/fmodl (Files): Add lib/fmod.c.
70261         (Depends-on): Add float, isfinite, signbit, fabsl,
70262         frexpl, ldexpl, isnanl. Remove fma.
70263         * m4/fmod.m4 (gl_FUNC_FMOD): Update computation of FMOD_LIBM.
70264         * m4/fmodl.m4 (gl_FUNC_FMODL): Update computation of FMODL_LIBM.
70266 2012-03-03  Bruno Haible  <bruno@clisp.org>
70268         fmod* tests: More tests.
70269         * tests/test-fmod.h: New file.
70270         * tests/test-fmod.c: Include <float.h> and test-fmod.h.
70271         (main): Invoke test_function.
70272         * tests/test-fmodf.c: Include <float.h> and test-fmod.h.
70273         (main): Invoke test_function.
70274         * tests/test-fmodl.c: Include <float.h> and test-fmod.h.
70275         (main): Invoke test_function.
70276         * modules/fmod-tests (Files): Add tests/test-fmod.h, tests/randomd.c.
70277         (Makefile.am): Add randomd.c to test_fmod_SOURCES.
70278         * modules/fmodf-tests (Files): Add tests/test-fmod.h, tests/randomf.c.
70279         (Makefile.am): Add randomf.c to test_fmodf_SOURCES.
70280         * modules/fmodl-tests (Files): Add tests/test-fmod.h, tests/randoml.c.
70281         (Depends-on): Add 'float'.
70282         (Makefile.am): Add randoml.c to test_fmodl_SOURCES.
70284 2012-03-03  Bruno Haible  <bruno@clisp.org>
70286         rint* tests: More tests.
70287         * tests/test-rint.h: New file, partially extracted from
70288         tests/test-rintl.c.
70289         * tests/test-rint.c: Include test-rint.h.
70290         (main): Invoke test_function.
70291         * tests/test-rintf.c: Include test-rint.h.
70292         (main): Invoke test_function.
70293         * tests/test-rintl.c: Include test-rint.h.
70294         (main): Invoke test_function.
70295         * modules/rint-tests (Files): Add tests/test-rint.h, tests/randomd.c.
70296         (Makefile.am): Add randomd.c to test_rint_SOURCES.
70297         * modules/rintf-tests (Files): Add tests/test-rint.h, tests/randomf.c.
70298         (Makefile.am): Add randomf.c to test_rintf_SOURCES.
70299         * modules/rintl-tests (Files): Add tests/test-rint.h, tests/randoml.c.
70300         (Makefile.am): Add randoml.c to test_rintl_SOURCES.
70302 2012-03-03  Bruno Haible  <bruno@clisp.org>
70304         modf* tests: More tests.
70305         * tests/test-modf.h: New file.
70306         * tests/test-modf.c: Include <float.h> and test-modf.h.
70307         (main): Invoke test_function.
70308         * tests/test-modff.c: Include <float.h> and test-modf.h.
70309         (main): Invoke test_function.
70310         * tests/test-modfl.c: Include <float.h> and test-modf.h.
70311         (main): Invoke test_function.
70312         * modules/modf-tests (Files): Add tests/test-modf.h, tests/randomd.c.
70313         (Makefile.am): Add randomd.c to test_modf_SOURCES.
70314         * modules/modff-tests (Files): Add tests/test-modf.h, tests/randomf.c.
70315         (Makefile.am): Add randomf.c to test_modff_SOURCES.
70316         * modules/modfl-tests (Files): Add tests/test-modf.h, tests/randoml.c.
70317         (Depends-on): Add 'float'.
70318         (Makefile.am): Add randoml.c to test_modfl_SOURCES.
70320 2012-03-03  Bruno Haible  <bruno@clisp.org>
70322         fabs* tests: More tests.
70323         * tests/test-fabs.h: New file, partially extracted from
70324         tests/test-fabsl.c.
70325         * tests/test-fabs.c (RANDOM): New macro.
70326         * tests/test-fabsf.c (RANDOM): New macro.
70327         * tests/test-fabsl.c (RANDOM): New macro.
70328         * modules/fabs-tests (Files): Add tests/randomd.c.
70329         (Makefile.am): Add randomd.c to test_fabs_SOURCES.
70330         * modules/fabsf-tests (Files): Add tests/randomf.c.
70331         (Makefile.am): Add randomf.c to test_fabsf_SOURCES.
70332         * modules/fabsl-tests (Files): Add tests/randoml.c.
70333         (Makefile.am): Add randoml.c to test_fabsl_SOURCES.
70335 2012-03-03  Bruno Haible  <bruno@clisp.org>
70337         ldexp* tests: More tests.
70338         * tests/test-ldexp.h (test_function): Add some pseudo-randomized tests.
70339         * tests/test-ldexp.c (RANDOM): New macro.
70340         * tests/test-ldexpf.c (RANDOM): New macro.
70341         * tests/test-ldexpl.c (RANDOM): New macro.
70342         * modules/ldexp-tests (Files): Add tests/randomd.c.
70343         (Makefile.am): Add randomd.c to test_ldexp_SOURCES.
70344         * modules/ldexpf-tests (Files): Add tests/randomf.c.
70345         (Makefile.am): Add randomf.c to test_ldexpf_SOURCES.
70346         * modules/ldexpl-tests (Files): Add tests/randoml.c.
70347         (Makefile.am): Add randoml.c to test_ldexpl_SOURCES.
70349 2012-03-03  Bruno Haible  <bruno@clisp.org>
70351         frexp* tests: More tests.
70352         * tests/test-frexp.h (test_function): Add some pseudo-randomized tests.
70353         * tests/test-frexp.c (RANDOM): New macro.
70354         * tests/test-frexpf.c (RANDOM): New macro.
70355         * tests/test-frexpl.c (RANDOM): New macro.
70356         * modules/frexp-tests (Files): Add tests/randomd.c.
70357         (Makefile.am): Add randomd.c to test_frexp_SOURCES.
70358         * modules/frexpf-tests (Files): Add tests/randomf.c.
70359         (Makefile.am): Add randomf.c to test_frexpf_SOURCES.
70360         * modules/frexpl-tests (Files): Add tests/randoml.c.
70361         (Makefile.am): Add randoml.c to test_frexpl_SOURCES.
70363 2012-03-03  Bruno Haible  <bruno@clisp.org>
70365         Support for pseudo-random numbers in tests.
70366         * tests/randomf.c: New file.
70367         * tests/randomd.c: New file.
70368         * tests/randoml.c: New file.
70369         * tests/macros.h (randomf, randomd, randoml): New declarations.
70371 2012-03-03  Bruno Haible  <bruno@clisp.org>
70373         frexp* tests: Refactor.
70374         * tests/test-frexp.h: New file, extracted from tests/test-frexpl.c.
70375         * tests/test-frexp.c: Include and use it.
70376         * tests/test-frexpf.c: Likewise.
70377         * tests/test-frexpl.c: Likewise.
70378         * modules/frexp-tests (Files): Add tests/test-frexp.h.
70379         * modules/frexpf-tests (Files): Likewise.
70380         * modules/frexpl-tests (Files): Likewise.
70382 2012-03-02  Jim Meyering  <meyering@redhat.com>
70384         maint: don't specify XZ_OPT=-9ev in dist-related rule
70385         Using xz's -9 option is warranted only if you have a very large
70386         tarball (see xz's documentation for the sizes vs. presets), and
70387         requires 64MiB of memory at decompression time.
70388         * top/maint.mk (alpha beta stable): Don't specify XZ_OPT=-9ev.
70389         Automake's default of just "-e" is fine.  Override on a
70390         per-package basis by setting XZ_OPT e.g., in cfg.mk.
70392 2012-03-01  Eric Blake  <eblake@redhat.com>
70394         maint.mk: allow announcement for non-gnulib project
70395         * maint.mk (announcement): Skip gnulib version if not used.
70397 2012-03-01  Jim Meyering  <meyering@redhat.com>
70399         maint.mk: avoid spurious failure of _sc_search_regexp-using tests
70400         * top/maint.mk: Initialize _sc_search_regexp parameters, so that
70401         envvar settings cannot interfere.  Otherwise, setting envvars like
70402         prohibit=foo require=bar, etc. would cause spurious test failures.
70404 2012-03-01  Eric Blake  <eblake@redhat.com>
70406         maint.mk: add per-line exclusions to prohibitions
70407         * maint.mk (_sc_search_regexp): Add $exclude parameter.
70408         (sc_prohibit_strcmp, sc_unmarked_diagnostics)
70409         (sc_const_long_option): Use it.
70411 2012-03-01  Bruno Haible  <bruno@clisp.org>
70413         Tests for module 'expl-ieee'.
70414         * modules/expl-ieee-tests: New file.
70415         * tests/test-expl-ieee.c: New file.
70417         New module 'expl-ieee'.
70418         * modules/expl-ieee: New file.
70420         Tests for module 'exp-ieee'.
70421         * modules/exp-ieee-tests: New file.
70422         * tests/test-exp-ieee.c: New file.
70424         New module 'exp-ieee'.
70425         * modules/exp-ieee: New file.
70427         Tests for module 'expf-ieee'.
70428         * modules/expf-ieee-tests: New file.
70429         * tests/test-expf-ieee.c: New file.
70430         * tests/test-exp-ieee.h: New file.
70432         New module 'expf-ieee'.
70433         * modules/expf-ieee: New file.
70435 2012-02-29  Bruno Haible  <bruno@clisp.org>
70437         cbrtl-ieee: Work around test failure on IRIX 6.5.
70438         * m4/cbrtl-ieee.m4: New file.
70439         * m4/cbrtl.m4 (gl_FUNC_CBRTL): If gl_FUNC_CBRTL_IEEE is present,
70440         test whether cbrtl works with a minus zero argument. Replace it if not.
70441         * lib/math.in.h (cbrtl): Override if REPLACE_CBRTL is 1.
70442         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_CBRTL.
70443         * modules/math (Makefile.am): Substitute REPLACE_CBRTL.
70444         * modules/cbrtl (configure.ac): Consider REPLACE_CBRTL.
70445         (Depends-on): Update conditions.
70446         * modules/cbrtl-ieee (Files): Add m4/cbrtl-ieee.m4, m4/minus-zero.m4,
70447         m4/signbit.m4.
70448         (configure.ac): Invoke gl_FUNC_CBRTL_IEEE.
70449         * lib/cbrtl.c (cbrtl) [IRIX]: Avoid an unnecessary addition.
70450         * doc/posix-functions/cbrtl.texi: Mention the cbrtl-ieee module.
70452         Tests for module 'cbrtl-ieee'.
70453         * modules/cbrtl-ieee-tests: New file.
70454         * tests/test-cbrtl-ieee.c: New file.
70456         New module 'cbrtl-ieee'.
70457         * modules/cbrtl-ieee: New file.
70459         Tests for module 'cbrt-ieee'.
70460         * modules/cbrt-ieee-tests: New file.
70461         * tests/test-cbrt-ieee.c: New file.
70463         New module 'cbrt-ieee'.
70464         * modules/cbrt-ieee: New file.
70466         Tests for module 'cbrtf-ieee'.
70467         * modules/cbrtf-ieee-tests: New file.
70468         * tests/test-cbrtf-ieee.c: New file.
70469         * tests/test-cbrt-ieee.h: New file.
70471         New module 'cbrtf-ieee'.
70472         * modules/cbrtf-ieee: New file.
70474 2012-02-29  Bruno Haible  <bruno@clisp.org>
70476         cbrtf: Work around bug in IRIX 6.5 system function.
70477         * lib/math.in.h (cbrtf): Override if REPLACE_CBRTF is 1.
70478         * m4/cbrtf.m4 (gl_FUNC_CBRTF_WORKS): New macro.
70479         (gl_FUNC_CBRTF): Invoke it. Set REPLACE_CBRTF to 1 if cbrtf() does not
70480         work.
70481         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_CBRTF.
70482         * modules/math (Makefile.am): Substitute REPLACE_CBRTF.
70483         * modules/cbrtf (configure.ac): Consider REPLACE_CBRTF.
70484         (Depends-on): Update conditions.
70485         * doc/posix-functions/cbrtf.texi: Mention the IRIX 6.5 problem.
70487 2012-02-29  Bruno Haible  <bruno@clisp.org>
70489         Tests for module 'cbrtl'.
70490         * modules/cbrtl-tests: New file.
70491         * tests/test-cbrtl.c: New file.
70493         New module 'cbrtl'.
70494         * lib/math.in.h (cbrtl): New declaration.
70495         * lib/cbrtl.c: New file.
70496         * m4/cbrtl.m4: New file.
70497         * m4/math_h.m4 (gl_MATH_H): Test whether cbrtl is declared.
70498         (gl_MATH_H_DEFAULTS): Initialize GNULIB_CBRTL, HAVE_CBRTL,
70499         HAVE_DECL_CBRTL.
70500         * modules/math (Makefile.am): Substitute GNULIB_CBRTL, HAVE_CBRTL,
70501         HAVE_DECL_CBRTL.
70502         * modules/cbrtl: New file.
70503         * tests/test-math-c++.cc: Check the declaration of cbrtl.
70504         * doc/posix-functions/cbrtl.texi: Mention the new module.
70506 2012-02-29  Bruno Haible  <bruno@clisp.org>
70508         Tests for module 'cbrtf'.
70509         * modules/cbrtf-tests: New file.
70510         * tests/test-cbrtf.c: New file.
70512         New module 'cbrtf'.
70513         * lib/math.in.h (cbrtf): New declaration.
70514         * lib/cbrtf.c: New file.
70515         * m4/cbrtf.m4: New file.
70516         * m4/math_h.m4 (gl_MATH_H): Test whether cbrtf is declared.
70517         (gl_MATH_H_DEFAULTS): Initialize GNULIB_CBRTF, HAVE_CBRTF,
70518         HAVE_DECL_CBRTF.
70519         * modules/math (Makefile.am): Substitute GNULIB_CBRTF, HAVE_CBRTF,
70520         HAVE_DECL_CBRTF.
70521         * modules/cbrtf: New file.
70522         * tests/test-math-c++.cc: Check the declaration of cbrtf.
70523         * doc/posix-functions/cbrtf.texi: Mention the new module.
70525 2012-02-29  Bruno Haible  <bruno@clisp.org>
70527         cbrt: Provide replacement on MSVC and Minix.
70528         * lib/math.in.h (cbrt): New declaration.
70529         * lib/cbrt.c: New file.
70530         * m4/cbrt.m4: New file.
70531         * m4/math_h.m4 (gl_MATH_H): Test whether cbrt is declared.
70532         (gl_MATH_H_DEFAULTS): Initialize GNULIB_CBRT, HAVE_CBRT.
70533         * modules/math (Makefile.am): Substitute GNULIB_CBRT, HAVE_CBRT.
70534         * modules/cbrt (Files): Add lib/cbrt.c, m4/cbrt.m4.
70535         (Depends-on): Add dependencies.
70536         (configure.ac): Arrange to compile replacement if HAVE_CBRT is 0.
70537         * tests/test-math-c++.cc: Check the declaration of cbrt.
70538         * doc/posix-functions/cbrt.texi: Mention that the module provides a
70539         replacement.
70541 2012-02-29  Bruno Haible  <bruno@clisp.org>
70543         hypotl-ieee: Work around test failure on OSF/1 and native Windows.
70544         * m4/hypotl-ieee.m4: New file.
70545         * m4/hypotl.m4 (gl_FUNC_HYPOTL): If gl_FUNC_HYPOTL_IEEE is present,
70546         test whether hypotl works with mixed NaN and Infinity arguments.
70547         Replace it if not.
70548         * lib/math.in.h (hypotl): Override if REPLACE_HYPOTL is 1.
70549         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_HYPOTL.
70550         * modules/math (Makefile.am): Substitute REPLACE_HYPOTL.
70551         * modules/hypotl (configure.ac): Consider REPLACE_HYPOTL.
70552         (Depends-on): Update conditions.
70553         * modules/hypotl-ieee (Files): Add m4/hypotl-ieee.m4.
70554         (Depends-on): Add hypot-ieee.
70555         (configure.ac): Invoke gl_FUNC_HYPOTL_IEEE.
70556         * doc/posix-functions/hypotl.texi: Mention the hypotl-ieee module.
70558         hypotf-ieee: Work around test failure on OSF/1 and native Windows.
70559         * m4/hypotf-ieee.m4: New file.
70560         * m4/hypotf.m4 (gl_FUNC_HYPOTF): If gl_FUNC_HYPOTF_IEEE is present,
70561         test whether hypotf works with mixed NaN and Infinity arguments.
70562         Replace it if not.
70563         * modules/hypotf-ieee (Files): Add m4/hypotf-ieee.m4.
70564         (Depends-on): Add hypot-ieee.
70565         (configure.ac): Invoke gl_FUNC_HYPOTF_IEEE.
70566         * doc/posix-functions/hypotf.texi: Mention the hypotf-ieee module.
70568         hypot-ieee: Work around test failure on OSF/1 and native Windows.
70569         * lib/math.in.h (hypot): New declaration.
70570         * lib/hypot.c: New file.
70571         * m4/hypot-ieee.m4: New file.
70572         * m4/hypot.m4 (gl_FUNC_HYPOT): If gl_FUNC_HYPOT_IEEE is present, test
70573         whether hypot works with mixed NaN and Infinity arguments. Replace it
70574         if not.
70575         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_HYPOT,
70576         REPLACE_HYPOT.
70577         * modules/math (Makefile.am): Substitute GNULIB_HYPOT, REPLACE_HYPOT.
70578         * modules/hypot (Files): Add lib/hypot.c.
70579         (Depends-on): Add dependencies.
70580         (configure.ac): Arrange to compile replacement if REPLACE_HYPOT is 1.
70581         * modules/hypot-ieee (Files): Add m4/hypot-ieee.m4.
70582         (configure.ac): Invoke gl_FUNC_HYPOT_IEEE.
70583         * tests/test-math-c++.cc: Check the declaration of hypot.
70584         * doc/posix-functions/hypot.texi: Mention the hypot-ieee module.
70586         Tests for module 'hypotl-ieee'.
70587         * modules/hypotl-ieee-tests: New file.
70588         * tests/test-hypotl-ieee.c: New file.
70590         New module 'hypotl-ieee'.
70591         * modules/hypotl-ieee: New file.
70593         Tests for module 'hypot-ieee'.
70594         * modules/hypot-ieee-tests: New file.
70595         * tests/test-hypot-ieee.c: New file.
70597         New module 'hypot-ieee'.
70598         * modules/hypot-ieee: New file.
70600         Tests for module 'hypotf-ieee'.
70601         * modules/hypotf-ieee-tests: New file.
70602         * tests/test-hypotf-ieee.c: New file.
70603         * tests/test-hypot-ieee.h: New file.
70605         New module 'hypotf-ieee'.
70606         * modules/hypotf-ieee: New file.
70608 2012-02-29  Bruno Haible  <bruno@clisp.org>
70610         Remove unused variables.
70611         * m4/fmod.m4 (gl_FUNC_FMOD): Remove unused variable 'i'.
70612         * m4/fmodl.m4 (gl_FUNC_FMODL): Likewise.
70613         * m4/remainder.m4 (gl_FUNC_REMAINDER): Likewise.
70614         * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Likewise.
70616 2012-02-29  Eric Blake  <eblake@redhat.com>
70618         termios: fix pid_t always, not just for tcgetsid
70619         * doc/posix-headers/termios.texi (termios.h): Mention problem.
70620         * lib/termios.in.h (include): Ensure pid_t on all platforms, not
70621         just when building tcgetsid.
70623 2012-02-29  Bruno Haible  <bruno@clisp.org>
70625         Tests for module 'hypotl'.
70626         * modules/hypotl-tests: New file.
70627         * tests/test-hypotl.c: New file.
70629         New module 'hypotl'.
70630         * lib/math.in.h (hypotl): New declaration.
70631         * lib/hypotl.c: New file.
70632         * m4/hypotl.m4: New file.
70633         * m4/math_h.m4 (gl_MATH_H): Test whether hypotf is declared.
70634         (gl_MATH_H_DEFAULTS): Initialize GNULIB_HYPOTL, HAVE_HYPOTL.
70635         * modules/math (Makefile.am): Substitute GNULIB_HYPOTL, HAVE_HYPOTL.
70636         * modules/hypotl: New file.
70637         * tests/test-math-c++.cc: Check the hypotl declaration.
70638         * doc/posix-functions/hypotl.texi: Mention the new module.
70640 2012-02-29  Eric Blake  <eblake@redhat.com>
70642         tcgetsid: fix cygwin header bug
70643         * lib/termios.in.h (includes) [Cygwin]: Ensure pid_t is defined.
70645         docs: update cygwin progress
70646         * doc/posix-functions/llround.texi (llround): Added in cygwin
70647         1.7.8.
70648         * doc/posix-functions/llroundf.texi (llroundf): Likewise.
70649         * doc/glibc-functions/program_invocation_name.texi
70650         (program_invocation_name): Likewise.
70651         * doc/glibc-functions/program_invocation_short_name.texi
70652         (program_invocation_short_name): Likewise.
70653         * doc/glibc-functions/madvise.texi (madvise): Likewise.
70654         * doc/glibc-functions/pthread_yield.texi (pthread_yield):
70655         Likewise.
70656         * doc/posix-functions/pthread_spin_destroy.texi
70657         (pthread_spin_destroy): Added in cygwin 1.7.10.
70658         * doc/posix-functions/pthread_spin_init.texi (pthread_spin_init):
70659         Likewise.
70660         * doc/posix-functions/pthread_spin_lock.texi (pthread_spin_lock):
70661         Likewise.
70662         * doc/posix-functions/pthread_spin_trylock.texi
70663         (pthread_spin_trylock): Likewise.
70664         * doc/posix-functions/pthread_spin_unlock.texi
70665         (pthread_spin_unlock): Likewise.
70666         * doc/posix-functions/pthread_setschedprio.texi
70667         (pthread_setschedprio): Likewise.
70668         * doc/posix-functions/pthread_attr_getstack.texi
70669         (pthread_attr_getstack): Likewise.
70670         * doc/pastposix-functions/pthread_attr_getstackaddr.texi
70671         (pthread_attr_getstackaddr): Likewise.
70672         * doc/glibc-functions/pthread_getattr_np.texi
70673         (pthread_getattr_np): Likewise.
70674         * doc/glibc-functions/sys_siglist.texi (sys_siglist): Likewise.
70675         * doc/glibc-functions/sysinfo.texi (sysinfo): Likewise.
70676         * doc/posix-functions/clock_settime.texi (clock_settime):
70677         Likewise.
70678         * doc/posix-functions/pthread_attr_getguardsize.texi
70679         (pthread_attr_getguardsize): Likewise.
70680         * doc/posix-functions/pthread_attr_setguardsize.texi
70681         (pthread_attr_setguardsize): Likewise.
70682         * doc/posix-functions/pthread_attr_setstack.texi
70683         (pthread_attr_setstack): Likewise.
70684         * doc/pastposix-functions/pthread_attr_setstackaddr.texi
70685         (pthread_attr_setstackaddr): Likewise.
70686         * doc/posix-functions/clock_getcpuclockid.texi
70687         (clock_getcpuclockid): Likewise.
70688         * doc/posix-functions/pthread_getcpuclockid.texi
70689         (pthread_getcpuclockid): Likewise.
70690         * doc/glibc-functions/error.texi (error): Likewise.
70691         * doc/glibc-functions/error_at_line.texi (error_at_line):
70692         Likewise.
70693         * doc/glibc-functions/error_message_count.texi
70694         (error_message_count): Likewise.
70695         * doc/glibc-functions/error_one_per_line.texi
70696         (error_one_per_line): Likewise.
70697         * doc/glibc-functions/error_print_progname.texi
70698         (error_print_progname): Likewise.
70699         * doc/posix-functions/pthread_condattr_getclock.texi
70700         (pthread_condattr_getclock): Likewise.
70701         * doc/posix-functions/pthread_condattr_setclock.texi
70702         (pthread_condattr_setclock): Likewise.
70703         * doc/posix-functions/clock_nanosleep.texi (clock_nanosleep):
70704         Likewise.
70705         * doc/glibc-functions/getgrouplist.texi (getgrouplist): Likewise.
70706         * doc/glibc-functions/getpt.texi (getpt): Likewise.
70707         * doc/glibc-functions/get_current_dir_name.texi
70708         (get_current_dir_name): Likewise.
70709         * doc/glibc-functions/pthread_sigqueue.texi (pthread_sigqueue):
70710         Likewise.
70711         * doc/posix-functions/tcgetsid.texi (tcgetsid): Likewise, but with
70712         wrong return type.
70713         * doc/glibc-functions/scandirat.texi (scandirat): Added in cygwin
70714         1.7.11.
70716 2012-02-29  Bruno Haible  <bruno@clisp.org>
70718         Tests for module 'hypotf'.
70719         * modules/hypotf-tests: New file.
70720         * tests/test-hypotf.c: New file.
70722         New module 'hypotf'.
70723         * lib/math.in.h (hypotf): New declaration.
70724         * lib/hypotf.c: New file.
70725         * m4/hypotf.m4: New file.
70726         * m4/math_h.m4 (gl_MATH_H): Test whether hypotf is declared.
70727         (gl_MATH_H_DEFAULTS): Initialize GNULIB_HYPOTF, HAVE_HYPOTF,
70728         REPLACE_HYPOTF.
70729         * modules/math (Makefile.am): Substitute GNULIB_HYPOTF, HAVE_HYPOTF,
70730         REPLACE_HYPOTF.
70731         * modules/hypotf: New file.
70732         * tests/test-math-c++.cc: Check the hypotf declaration.
70733         * doc/posix-functions/hypotf.texi: Mention the new module.
70735         hypot: Prepare for hypotf module.
70736         * m4/hypot.m4: New file.
70737         * modules/hypot (Files): Add m4/hypot.m4.
70738         (configure.ac): Invoke gl_FUNC_HYPOT.
70740 2012-02-29  Bruno Haible  <bruno@clisp.org>
70742         hypot tests: More tests.
70743         * tests/test-hypot.c: Include <float.h>.
70744         (main): Add tests about overflow and underflow.
70746 2012-02-29  Bruno Haible  <bruno@clisp.org>
70748         math code: Add comments.
70749         * lib/acosl.c: Add comment about related glibc source files.
70750         * lib/asinl.c: Likewise.
70751         * lib/atanl.c: Likewise.
70752         * lib/expl.c: Likewise.
70753         * lib/logl.c: Likewise.
70754         * lib/sincosl.c: Likewise.
70755         * lib/sinl.c: Likewise.
70756         * lib/tanl.c: Likewise.
70757         * lib/trigl.c: Likewise.
70758         * lib/cosl.c: Likewise. Fix comments.
70760 2012-02-28  Bruno Haible  <bruno@clisp.org>
70762         math: Ensure HUGE_VAL, HUGE_VALF, HUGE_VALL are defined.
70763         * lib/math.in.h (HUGE_VAL, HUGE_VALF, HUGE_VALL): Define fallbacks.
70764         * tests/test-math.c: Include macros.h. Check that HUGE_VAL, HUGE_VALF,
70765         HUGE_VALL are defined.
70766         (numeric_equald): Renamed from numeric_equal.
70767         (numeric_equalf, numeric_equall): New functions.
70768         (main): Check also HUGE_VALF, HUGE_VALL.
70769         * modules/math-tests (Files): Add tests/macros.h.
70770         * doc/posix-headers/math.texi: Document the problems with HUGE_VALF and
70771         HUGE_VALL.
70773 2012-02-28  Bruno Haible  <bruno@clisp.org>
70775         doc: Move ISO C11 feature notes into POSIX chapters.
70776         * doc/posix-functions/aligned_alloc.texi: Renamed from
70777         doc/glibc-functions/aligned_alloc.texi.
70778         * doc/posix-functions/quick_exit.texi: Renamed from
70779         doc/glibc-functions/quick_exit.texi.
70780         * doc/posix-headers/uchar.texi: Renamed from
70781         doc/glibc-headers/uchar.texi.
70782         * doc/posix-functions/c16rtomb.texi: Renamed from
70783         doc/glibc-functions/c16rtomb.texi.
70784         * doc/posix-functions/c32rtomb.texi: Renamed from
70785         doc/glibc-functions/c32rtomb.texi.
70786         * doc/posix-functions/mbrtoc16.texi: Renamed from
70787         doc/glibc-functions/mbrtoc16.texi.
70788         * doc/posix-functions/mbrtoc32.texi: Renamed from
70789         doc/glibc-functions/mbrtoc32.texi.
70790         * doc/gnulib.texi: Update.
70791         (Glibc uchar.h): Remove section.
70792         Suggested by Eric Blake.
70794 2012-02-29  Paul Eggert  <eggert@cs.ucla.edu>
70796         stdnoreturn: port to MSVC better
70797         MSVC standard headers use __declspec(noreturn), so #define noreturn
70798         to empty on that platform.  Reported by Bruno Haible in
70799         <http://lists.gnu.org/r/bug-gnulib/2012-02/msg00152.html>.
70800         * lib/stdnoreturn.in.h (noreturn): Define to empty on MSVC.
70801         * doc/posix-headers/stdnoreturn.texi (stdnoreturn.h): Document this.
70803 2012-02-28  Bruno Haible  <bruno@clisp.org>
70805         doc: Mention new glibc headers and functions.
70806         * doc/glibc-headers/uchar.texi: New file.
70807         * doc/glibc-functions/aligned_alloc.texi: New file.
70808         * doc/glibc-functions/c16rtomb.texi: New file.
70809         * doc/glibc-functions/c32rtomb.texi: New file.
70810         * doc/glibc-functions/clock_adjtime.texi: New file.
70811         * doc/glibc-functions/fanotify_init.texi: New file.
70812         * doc/glibc-functions/fanotify_mark.texi: New file.
70813         * doc/glibc-functions/inet6_opt_append.texi: New file.
70814         * doc/glibc-functions/inet6_opt_find.texi: New file.
70815         * doc/glibc-functions/inet6_opt_finish.texi: New file.
70816         * doc/glibc-functions/inet6_opt_get_val.texi: New file.
70817         * doc/glibc-functions/inet6_opt_init.texi: New file.
70818         * doc/glibc-functions/inet6_opt_next.texi: New file.
70819         * doc/glibc-functions/inet6_opt_set_val.texi: New file.
70820         * doc/glibc-functions/inet6_rth_add.texi: New file.
70821         * doc/glibc-functions/inet6_rth_getaddr.texi: New file.
70822         * doc/glibc-functions/inet6_rth_init.texi: New file.
70823         * doc/glibc-functions/inet6_rth_reverse.texi: New file.
70824         * doc/glibc-functions/inet6_rth_segments.texi: New file.
70825         * doc/glibc-functions/inet6_rth_space.texi: New file.
70826         * doc/glibc-functions/login.texi: New file.
70827         * doc/glibc-functions/mbrtoc16.texi: New file.
70828         * doc/glibc-functions/mbrtoc32.texi: New file.
70829         * doc/glibc-functions/name_to_handle_at.texi: New file.
70830         * doc/glibc-functions/ntp_gettimex.texi: New file.
70831         * doc/glibc-functions/open_by_handle_at.texi: New file.
70832         * doc/glibc-functions/prlimit.texi: New file.
70833         * doc/glibc-functions/process_vm_readv.texi: New file.
70834         * doc/glibc-functions/process_vm_writev.texi: New file.
70835         * doc/glibc-functions/recvmmsg.texi: New file.
70836         * doc/glibc-functions/scandirat.texi: New file.
70837         * doc/glibc-functions/sendmmsg.texi: New file.
70838         * doc/glibc-functions/setns.texi: New file.
70839         * doc/glibc-functions/timespec_get.texi: New file.
70840         * doc/gnulib.texi: Include them.
70841         (Glibc sys/fanotify.h, Glibc sys/resource.h, Glibc uchar.h): New
70842         sections.
70843         Reported by Eric Blake.
70845 2012-02-28  Bruno Haible  <bruno@clisp.org>
70847         Avoid compilation errors with MSVC option -fp:strict.
70848         * lib/floor.c: Use MSVC specific pragma fenv_access.
70849         * lib/ceil.c: Likewise.
70850         * lib/trunc.c: Likewise.
70851         * lib/round.c: Likewise.
70852         * lib/rint.c: Likewise.
70853         * lib/fma.c: Likewise.
70854         * lib/integer_length.c: Likewise.
70855         * m4/round.m4 (gl_FUNC_ROUND): Likewise.
70856         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
70857         * tests/test-floor2.c: Likewise.
70858         * tests/test-floorf2.c: Likewise.
70859         * tests/test-ceil2.c: Likewise.
70860         * tests/test-ceilf2.c: Likewise.
70861         * tests/test-trunc2.c: Likewise.
70862         * tests/test-truncf2.c: Likewise.
70863         Reported by Michael Goffioul <michael.goffioul@gmail.com>.
70865 2012-02-27  Bruno Haible  <bruno@clisp.org>
70867         Tests for module 'sqrtl-ieee'.
70868         * modules/sqrtl-ieee-tests: New file.
70869         * tests/test-sqrtl-ieee.c: New file.
70871         New module 'sqrtl-ieee'.
70872         * modules/sqrtl-ieee: New file.
70874         Tests for module 'sqrt-ieee'.
70875         * modules/sqrt-ieee-tests: New file.
70876         * tests/test-sqrt-ieee.c: New file.
70878         New module 'sqrt-ieee'.
70879         * modules/sqrt-ieee: New file.
70881         Tests for module 'sqrtf-ieee'.
70882         * modules/sqrtf-ieee-tests: New file.
70883         * tests/test-sqrtf-ieee.c: New file.
70884         * tests/test-sqrt-ieee.h: New file.
70886         New module 'sqrtf-ieee'.
70887         * modules/sqrtf-ieee: New file.
70889 2012-02-27  Bruno Haible  <bruno@clisp.org>
70891         remainderl-ieee: Work around test failure on OSF/1.
70892         * m4/remainderl-ieee.m4: New file.
70893         * m4/remainderl.m4 (gl_FUNC_REMAINDERL): If gl_FUNC_REMAINDERL_IEEE is
70894         present, test whether remainderl works with a zero second argument.
70895         Replace it if not.
70896         * lib/math.in.h (remainderl): Override if REPLACE_REMAINDERL is 1.
70897         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_REMAINDERL.
70898         * modules/math (Makefile.am): Substitute REPLACE_REMAINDERL.
70899         * modules/remainderl (configure.ac): Consider REPLACE_REMAINDERL.
70900         (Depends-on): Update conditions.
70901         * modules/remainderl-ieee (Files): Add m4/remainderl-ieee.m4.
70902         (Depends-on): Add remainder-ieee.
70903         (configure.ac): Invoke gl_FUNC_REMAINDERL_IEEE.
70904         * doc/posix-functions/remainderl.texi: Mention the remainderl-ieee
70905         module.
70907         remainderf-ieee: Work around test failure on OSF/1.
70908         * m4/remainderf-ieee.m4: New file.
70909         * m4/remainderf.m4 (gl_FUNC_REMAINDERF): If gl_FUNC_REMAINDERF_IEEE is
70910         present, test whether remainderf works with a zero second argument.
70911         Replace it if not.
70912         * lib/math.in.h (remainderf): Override if REPLACE_REMAINDERF is 1.
70913         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_REMAINDERF.
70914         * modules/math (Makefile.am): Substitute REPLACE_REMAINDERF.
70915         * modules/remainderf (configure.ac): Consider REPLACE_REMAINDERF.
70916         (Depends-on): Update conditions.
70917         * modules/remainderf-ieee (Files): Add m4/remainderf-ieee.m4.
70918         (Depends-on): Add remainder-ieee.
70919         (configure.ac): Invoke gl_FUNC_REMAINDERF_IEEE.
70920         * doc/posix-functions/remainderf.texi: Mention the remainderf-ieee
70921         module.
70923         remainder-ieee: Work around test failure on OSF/1.
70924         * m4/remainder-ieee.m4: New file.
70925         * m4/remainder.m4 (gl_FUNC_REMAINDER): If gl_FUNC_REMAINDER_IEEE is
70926         present, test whether remainder works with a zero second argument.
70927         Replace it if not.
70928         * lib/math.in.h (remainder): Override if REPLACE_REMAINDER is 1.
70929         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_REMAINDER.
70930         * modules/math (Makefile.am): Substitute REPLACE_REMAINDER.
70931         * modules/remainder (configure.ac): Consider REPLACE_REMAINDER.
70932         (Depends-on): Update dependencies.
70933         * modules/remainder-ieee (Files): Add m4/remainder-ieee.m4.
70934         (configure.ac): Invoke gl_FUNC_REMAINDER_IEEE.
70935         * doc/posix-functions/remainder.texi: Mention the remainder-ieee module.
70937         Tests for module 'remainderl-ieee'.
70938         * modules/remainderl-ieee-tests: New file.
70939         * tests/test-remainderl-ieee.c: New file.
70941         New module 'remainderl-ieee'.
70942         * modules/remainderl-ieee: New file.
70944         Tests for module 'remainder-ieee'.
70945         * modules/remainder-ieee-tests: New file.
70946         * tests/test-remainder-ieee.c: New file.
70948         New module 'remainder-ieee'.
70949         * modules/remainder-ieee: New file.
70951         Tests for module 'remainderf-ieee'.
70952         * modules/remainderf-ieee-tests: New file.
70953         * tests/test-remainderf-ieee.c: New file.
70954         * tests/test-remainder-ieee.h: New file.
70956         New module 'remainderf-ieee'.
70957         * modules/remainderf-ieee: New file.
70959 2012-02-27  Bruno Haible  <bruno@clisp.org>
70961         modff, modfl: Fix configure syntax error.
70962         * m4/modff.m4 (gl_FUNC_MODFF): Insert ':' command in 'if'.
70963         * m4/modfl.m4 (gl_FUNC_MODFL): Likewise.
70965 2012-02-27  Bruno Haible  <bruno@clisp.org>
70967         fmodl-ieee: Work around test failures on OSF/1, MSVC 9.
70968         * m4/fmodl-ieee.m4: New file.
70969         * m4/fmodl.m4 (gl_FUNC_FMODL): If gl_FUNC_FMODL_IEEE is present, test
70970         whether fmodl works with zero arguments. Replace it if not.
70971         * modules/fmodl-ieee (Files): Add m4/fmodl-ieee.m4.
70972         (Depends-on): Add fmod-ieee.
70973         (configure.ac): Invoke gl_FUNC_FMODL_IEEE.
70974         * doc/posix-functions/fmodl.texi: Mention the fmodl-ieee module.
70976         fmodf-ieee: Work around test failure on OSF/1.
70977         * m4/fmodf-ieee.m4: New file.
70978         * m4/fmodf.m4 (gl_FUNC_FMODF): If gl_FUNC_FMODF_IEEE is present, test
70979         whether fmodf works with zero arguments. Replace it if not.
70980         * lib/math.in.h (fmodf): Override if REPLACE_FMODF is 1.
70981         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FMODF.
70982         * modules/math (Makefile.am): Substitute REPLACE_FMODF.
70983         * modules/fmodf (configure.ac): Consider REPLACE_FMODF.
70984         (Depends-on): Update dependencies.
70985         * modules/fmodf-ieee (Files): Add m4/fmodf-ieee.m4.
70986         (configure.ac): Invoke gl_FUNC_FMODF_IEEE.
70987         * doc/posix-functions/fmodf.texi: Mention the problem on OSF/1.
70989         fmodf-ieee: Work around test failure on MSVC 9.
70990         * modules/fmodf-ieee (Depends-on): Add fmod-ieee.
70991         * doc/posix-functions/fmodf.texi: Mention the fmodf-ieee module.
70993         fmod-ieee: Work around test failures on OSF/1, mingw.
70994         * m4/fmod-ieee.m4: New file.
70995         * m4/fmod.m4 (gl_FUNC_FMOD): If gl_FUNC_FMOD_IEEE is present, test
70996         whether fmod works with zero arguments. Replace it if not.
70997         * lib/math.in.h (fmod): New declaration.
70998         * lib/fmod.c: New file.
70999         * m4/math_h.m4 (gl_MATH_H): Test whether fmod is declared.
71000         (gl_MATH_H_DEFAULTS): Initialize GNULIB_FMOD, REPLACE_FMOD.
71001         * modules/math (Makefile.am): Substitute GNULIB_FMOD, REPLACE_FMOD.
71002         * modules/fmod (Files): Add lib/fmod.c.
71003         (Depends-on): Add math, isinf, trunc, fma.
71004         (configure.ac): Arrange to compile lib/fmod.c if needed.
71005         * modules/fmod-ieee (Files): Add m4/fmod-ieee.m4, m4/minus-zero.m4,
71006         m4/signbit.m4.
71007         (configure.ac): Invoke gl_FUNC_FMOD_IEEE.
71008         * tests/test-math-c++.cc: Check the declaration of fmod.
71009         * doc/posix-functions/fmod.texi: Mention the fmod-ieee module.
71011         fmodl-ieee: Fix test failures.
71012         * lib/fmodl.c (fmodl): Treat Inf specially.
71013         * modules/fmodl (Depends-on): Add isinf.
71015         Tests for module 'fmodl-ieee'.
71016         * modules/fmodl-ieee-tests: New file.
71017         * tests/test-fmodl-ieee.c: New file.
71019         New module 'fmodl-ieee'.
71020         * modules/fmodl-ieee: New file.
71022         Tests for module 'fmod-ieee'.
71023         * modules/fmod-ieee-tests: New file.
71024         * tests/test-fmod-ieee.c: New file.
71026         New module 'fmod-ieee'.
71027         * modules/fmod-ieee: New file.
71029         Tests for module 'fmodf-ieee'.
71030         * modules/fmodf-ieee-tests: New file.
71031         * tests/test-fmodf-ieee.c: New file.
71032         * tests/test-fmod-ieee.h: New file.
71034         New module 'fmodf-ieee'.
71035         * modules/fmodf-ieee: New file.
71037 2012-02-27  Bruno Haible  <bruno@clisp.org>
71039         Tests for module 'rintl-ieee'.
71040         * modules/rintl-ieee-tests: New file.
71041         * tests/test-rintl-ieee.c: New file.
71043         New module 'rintl-ieee'.
71044         * modules/rintl-ieee: New file.
71046         Tests for module 'rint-ieee'.
71047         * modules/rint-ieee-tests: New file.
71048         * tests/test-rint-ieee.c: New file.
71050         New module 'rint-ieee'.
71051         * modules/rint-ieee: New file.
71053         Tests for module 'rintf-ieee'.
71054         * modules/rintf-ieee-tests: New file.
71055         * tests/test-rintf-ieee.c: New file.
71056         * tests/test-rint-ieee.h: New file.
71058         New module 'rintf-ieee'.
71059         * modules/rintf-ieee: New file.
71061 2012-02-26  Paul Eggert  <eggert@cs.ucla.edu>
71063         regex: re_search etc. should return -2 when memory exhausted
71064         This bug was uncovered when testing 'grep'.  Without the fix,
71065         re_search and friends return -1 when memory is exhausted, but -1
71066         means no match, and this causes grep to falsely report no-match
71067         instead of memory-exhaustion.  See
71068         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=13762>.
71069         * lib/regexec.c (re_search_stub): Return -2 (not -1) if there is
71070         trouble; this can occur if re_search_internal ran out of memory.
71072 2012-02-26  Bruno Haible  <bruno@clisp.org>
71074         modfl-ieee: Work around test failures on IRIX, OSF/1, mingw.
71075         * m4/modfl-ieee.m4: New file.
71076         * m4/modfl.m4 (gl_FUNC_MODFL): If gl_FUNC_MODFL_IEEE is present, test
71077         whether modfl works with Inf. Replace it if not.
71078         * lib/math.in.h (modfl): Override if REPLACE_MODFF is 1.
71079         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_MODFL.
71080         * modules/math (Makefile.am): Substitute REPLACE_MODFL.
71081         * modules/modfl (configure.ac): Consider REPLACE_MODFL.
71082         (Depends-on): Update dependencies.
71083         * modules/modfl-ieee (Files): Add m4/modfl-ieee.m4, m4/minus-zero.m4,
71084         m4/signbit.m4.
71085         (configure.ac): Invoke gl_FUNC_MODFL_IEEE.
71086         * doc/posix-functions/modfl.texi: Mention the modfl-ieee module.
71088         modfl-ieee: Fix dependencies.
71089         * modules/modfl-ieee (Depends-on): Add modf-ieee.
71091         modfl-ieee: Fix test failures.
71092         * lib/modfl.c (modfl): Treat NaN and Inf specially.
71093         * modules/modfl (Depends-on): Add isfinite, isinf.
71095         modff-ieee: Work around test failures on *BSD, IRIX, OSF/1, etc.
71096         * m4/modff-ieee.m4: New file.
71097         * m4/modff.m4 (gl_FUNC_MODFF): If gl_FUNC_MODFF_IEEE is present, test
71098         whether modff works with NaN and Inf. Replace it if not.
71099         * lib/math.in.h (modff): Override if REPLACE_MODFF is 1.
71100         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_MODFF.
71101         * modules/math (Makefile.am): Substitute REPLACE_MODFF.
71102         * modules/modff (configure.ac): Consider REPLACE_MODFF.
71103         (Depends-on): Update dependencies.
71104         * modules/modff-ieee (Files): Add m4/modff-ieee.m4, m4/minus-zero.m4,
71105         m4/signbit.m4.
71106         (Depends-on): Add modf-ieee.
71107         (configure.ac): Invoke gl_FUNC_MODFF_IEEE.
71108         * doc/posix-functions/modff.texi: Mention the modff-ieee module.
71110         modf-ieee: Work around test failures on *BSD, IRIX, OSF/1, Cygwin.
71111         * m4/modf-ieee.m4: New file.
71112         * m4/modf.m4 (gl_FUNC_MODF): If gl_FUNC_MODF_IEEE is present, test
71113         whether modf works with NaN and Inf. Replace it if not.
71114         * lib/math.in.h (modf): New declaration.
71115         * lib/modf.c: New file.
71116         * m4/math_h.m4 (gl_MATH_H): Test whether modf is declared.
71117         (gl_MATH_H_DEFAULTS): Initialize GNULIB_MODF, REPLACE_MODF.
71118         * modules/math (Makefile.am): Substitute GNULIB_MODF, REPLACE_MODF.
71119         * modules/modf (Files): Add lib/modf.c.
71120         (Depends-on): Add math, isfinite, trunc, isinf.
71121         (configure.ac): Addrange to compile lib/modf.c if needed.
71122         * modules/modf-ieee (Files): Add m4/modf-ieee.m4, m4/minus-zero.m4,
71123         m4/signbit.m4.
71124         (configure.ac): Invoke gl_FUNC_MODF_IEEE.
71125         * tests/test-math-c++.cc: Check the declaration of modf.
71126         * doc/posix-functions/modf.texi: Mention the modf-ieee module.
71128         Tests for module 'modfl-ieee'.
71129         * modules/modfl-ieee-tests: New file.
71130         * tests/test-modfl-ieee.c: New file.
71132         New module 'modfl-ieee'.
71133         * modules/modfl-ieee: New file.
71135         Tests for module 'modf-ieee'.
71136         * modules/modf-ieee-tests: New file.
71137         * tests/test-modf-ieee.c: New file.
71139         New module 'modf-ieee'.
71140         * modules/modf-ieee: New file.
71142         Tests for module 'modff-ieee'.
71143         * modules/modff-ieee-tests: New file.
71144         * tests/test-modff-ieee.c: New file.
71145         * tests/test-modf-ieee.h: New file.
71147         New module 'modff-ieee'.
71148         * modules/modff-ieee: New file.
71150 2012-02-26  Bruno Haible  <bruno@clisp.org>
71152         Tests for module 'fabsl-ieee'.
71153         * modules/fabsl-ieee-tests: New file.
71154         * tests/test-fabsl-ieee.c: New file.
71156         New module 'fabsl-ieee'.
71157         * modules/fabsl-ieee: New file.
71159         Tests for module 'fabs-ieee'.
71160         * modules/fabs-ieee-tests: New file.
71161         * tests/test-fabs-ieee.c: New file.
71163         New module 'fabs-ieee'.
71164         * modules/fabs-ieee: New file.
71166         Tests for module 'fabsf-ieee'.
71167         * modules/fabsf-ieee-tests: New file.
71168         * tests/test-fabsf-ieee.c: New file.
71169         * tests/test-fabs-ieee.h: New file.
71171         New module 'fabsf-ieee'.
71172         * modules/fabsf-ieee: New file.
71174 2012-02-26  Bruno Haible  <bruno@clisp.org>
71176         Tests for module 'fmal-ieee'.
71177         * modules/fmal-ieee-tests: New file.
71178         * tests/test-fmal-ieee.c: New file.
71180         New module 'fmal-ieee'.
71181         * modules/fmal-ieee: New file.
71183         Tests for module 'fma-ieee'.
71184         * modules/fma-ieee-tests: New file.
71185         * tests/test-fma-ieee.c: New file.
71187         New module 'fma-ieee'.
71188         * modules/fma-ieee: New file.
71190         Tests for module 'fmaf-ieee'.
71191         * modules/fmaf-ieee-tests: New file.
71192         * tests/test-fmaf-ieee.c: New file.
71193         * tests/test-fma-ieee.h: New file.
71195         New module 'fmaf-ieee'.
71196         * modules/fmaf-ieee: New file.
71198 2012-02-26  Bruno Haible  <bruno@clisp.org>
71200         Tests for module 'ldexpl-ieee'.
71201         * modules/ldexpl-ieee-tests: New file.
71202         * tests/test-ldexpl-ieee.c: New file.
71204         New module 'ldexpl-ieee'.
71205         * modules/ldexpl-ieee: New file.
71207         Tests for module 'ldexp-ieee'.
71208         * modules/ldexp-ieee-tests: New file.
71209         * tests/test-ldexp-ieee.c: New file.
71211         New module 'ldexp-ieee'.
71212         * modules/ldexp-ieee: New file.
71214         Tests for module 'ldexpf-ieee'.
71215         * modules/ldexpf-ieee-tests: New file.
71216         * tests/test-ldexpf-ieee.c: New file.
71217         * tests/test-ldexp-ieee.h: New file.
71219         New module 'ldexpf-ieee'.
71220         * modules/ldexpf-ieee: New file.
71222 2012-02-26  Bruno Haible  <bruno@clisp.org>
71224         Refactor frexp*-ieee tests.
71225         * tests/test-frexp-ieee.h: New file.
71226         * tests/test-frexpf-ieee.c: Include test-frexp-ieee.h.
71227         (main): Just call test_function.
71228         * tests/test-frexp-ieee.c: Include test-frexp-ieee.h.
71229         (main): Just call test_function.
71230         * tests/test-frexpl-ieee.c: Include test-frexp-ieee.h.
71231         (main): Just call test_function.
71232         * modules/frexpf-ieee-tests (Files): Add tests/test-frexp-ieee.h.
71233         * modules/frexp-ieee-tests (Files): Likewise.
71234         * modules/frexpl-ieee-tests (Files): Likewise.
71236         Tests for module 'frexpl-ieee'.
71237         * modules/frexpl-ieee-tests: New file.
71238         * tests/test-frexpl-ieee.c: New file.
71240         New module 'frexpl-ieee'.
71241         * modules/frexpl-ieee: New file.
71243         Tests for module 'frexp-ieee'.
71244         * modules/frexp-ieee-tests: New file.
71245         * tests/test-frexp-ieee.c: New file.
71247         New module 'frexp-ieee'.
71248         * modules/frexp-ieee: New file.
71250         Tests for module 'frexpf-ieee'.
71251         * modules/frexpf-ieee-tests: New file.
71252         * tests/test-frexpf-ieee.c: New file.
71254         New module 'frexpf-ieee'.
71255         * modules/frexpf-ieee: New file.
71257 2012-02-26  Bruno Haible  <bruno@clisp.org>
71259         roundl-ieee tests: More tests.
71260         * tests/test-roundl-ieee.c: Include isnanl-nolibm.h, infinity.h, nan.h.
71261         (main): Add tests for [MX] shaded specification in POSIX.
71262         * modules/roundl-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
71263         (Depends-on): Add isnanl-nolibm.
71265         round-ieee tests: More tests.
71266         * tests/test-round-ieee.c: Include isnand-nolibm.h, infinity.h, nan.h.
71267         (main): Add tests for [MX] shaded specification in POSIX.
71268         * modules/round-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
71269         (Depends-on): Add isnand-nolibm.
71271         roundf-ieee tests: More tests.
71272         * tests/test-roundf-ieee.c: Include isnanf-nolibm.h, infinity.h, nan.h.
71273         (main): Add tests for [MX] shaded specification in POSIX.
71274         * modules/roundf-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
71275         (Depends-on): Add isnanf-nolibm.
71277         truncl-ieee tests: More tests.
71278         * tests/test-truncl-ieee.c: Include isnanl-nolibm.h, infinity.h, nan.h.
71279         (main): Add tests for [MX] shaded specification in POSIX.
71280         * modules/truncl-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
71281         (Depends-on): Add isnanl-nolibm.
71283         trunc-ieee tests: More tests.
71284         * tests/test-trunc-ieee.c: Include isnand-nolibm.h, infinity.h, nan.h.
71285         (main): Add tests for [MX] shaded specification in POSIX.
71286         * modules/trunc-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
71287         (Depends-on): Add isnand-nolibm.
71289         truncf-ieee tests: More tests.
71290         * tests/test-truncf-ieee.c: Include isnanf-nolibm.h, infinity.h, nan.h.
71291         (main): Add tests for [MX] shaded specification in POSIX.
71292         * modules/truncf-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
71293         (Depends-on): Add isnanf-nolibm.
71295         ceill-ieee tests: More tests.
71296         * tests/test-ceill-ieee.c: Include isnanl-nolibm.h, infinity.h, nan.h.
71297         (main): Add tests for [MX] shaded specification in POSIX.
71298         * modules/ceill-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
71299         (Depends-on): Add isnanl-nolibm.
71301         ceil-ieee tests: More tests.
71302         * tests/test-ceil-ieee.c: Include isnand-nolibm.h, infinity.h, nan.h.
71303         (main): Add tests for [MX] shaded specification in POSIX.
71304         * modules/ceil-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
71305         (Depends-on): Add isnand-nolibm.
71307         ceilf-ieee tests: More tests.
71308         * tests/test-ceilf-ieee.c: Include isnanf-nolibm.h, infinity.h, nan.h.
71309         (main): Add tests for [MX] shaded specification in POSIX.
71310         * modules/ceilf-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
71311         (Depends-on): Add isnanf-nolibm.
71313         floorl-ieee tests: More tests.
71314         * tests/test-floorl-ieee.c: Include isnanl-nolibm.h, infinity.h, nan.h.
71315         (main): Add tests for [MX] shaded specification in POSIX.
71316         * modules/floorl-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
71317         (Depends-on): Add isnanl-nolibm.
71319         floor-ieee tests: More tests.
71320         * tests/test-floor-ieee.c: Include isnand-nolibm.h, infinity.h, nan.h.
71321         (main): Add tests for [MX] shaded specification in POSIX.
71322         * modules/floor-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
71323         (Depends-on): Add isnand-nolibm.
71325         floorf-ieee tests: More tests.
71326         * tests/test-floorf-ieee.c: Include isnanf-nolibm.h, infinity.h, nan.h.
71327         (main): Add tests for [MX] shaded specification in POSIX.
71328         * modules/floorf-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
71329         (Depends-on): Add isnanf-nolibm.
71331 2012-02-26  Bruno Haible  <bruno@clisp.org>
71333         fpieee: More comments.
71334         * m4/fpieee.m4 (gl_FP_IEEE): Add more comments.
71336 2012-02-25  Bruno Haible  <bruno@clisp.org>
71338         Tests for module 'log10l'.
71339         * modules/log10l-tests: New file.
71340         * tests/test-log10l.c: New file.
71341         * tests/test-math-c++.cc: Check the declaration of log10l.
71343         New module 'log10l'.
71344         * lib/math.in.h (log10l): New declaration.
71345         * lib/log10l.c: New file.
71346         * m4/log10l.m4: New file.
71347         * modules/log10l: New file.
71348         * m4/math_h.m4 (gl_MATH_H): Test whether log10l is declared.
71349         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG10L, HAVE_LOG10L,
71350         HAVE_DECL_LOG10L.
71351         * modules/math (Makefile.am): Substitute GNULIB_LOG10L, HAVE_LOG10L,
71352         HAVE_DECL_LOG10L.
71353         * doc/posix-functions/log10l.texi: Mention the new module.
71355 2012-02-25  Bruno Haible  <bruno@clisp.org>
71357         fmodl, remainder*: Avoid wrong results due to rounding errors.
71358         * lib/fmodl.c (fmodl): Correct the result if it is not within the
71359         expected bounds.
71360         * lib/remainderf.c (remainderf): Likewise.
71361         * lib/remainder.c (remainder): Likewise.
71362         * lib/remainderl.c (remainderl): Likewise.
71364 2012-02-25  Bruno Haible  <bruno@clisp.org>
71366         Tests for module 'remainderl'.
71367         * modules/remainderl-tests: New file.
71368         * tests/test-remainderl.c: New file.
71369         * tests/test-math-c++.cc: Check the declaration of remainderl.
71371         New module 'remainderl'.
71372         * lib/math.in.h (remainderl): New declaration.
71373         * lib/remainderl.c: New file.
71374         * m4/remainderl.m4: New file.
71375         * modules/remainderl: New file.
71376         * m4/math_h.m4 (gl_MATH_H): Test whether remainderl is declared.
71377         (gl_MATH_H_DEFAULTS): Initialize GNULIB_REMAINDERL, HAVE_REMAINDERL.
71378         * modules/math (Makefile.am): Substitute GNULIB_REMAINDERL,
71379         HAVE_REMAINDERL.
71380         * doc/posix-functions/remainderl.texi: Mention the new module.
71382 2012-02-25  Bruno Haible  <bruno@clisp.org>
71384         Tests for module 'remainderf'.
71385         * modules/remainderf-tests: New file.
71386         * tests/test-remainderf.c: New file.
71387         * tests/test-math-c++.cc: Check the declaration of remainderf.
71389         New module 'remainderf'.
71390         * lib/math.in.h (remainderf): New declaration.
71391         * lib/remainderf.c: New file.
71392         * m4/remainderf.m4: New file.
71393         * modules/remainderf: New file.
71394         * m4/math_h.m4 (gl_MATH_H): Test whether remainderf is declared.
71395         (gl_MATH_H_DEFAULTS): Initialize GNULIB_REMAINDERF, HAVE_REMAINDERF.
71396         * modules/math (Makefile.am): Substitute GNULIB_REMAINDERF,
71397         HAVE_REMAINDERF.
71398         * doc/posix-functions/remainderf.texi: Mention the new module.
71400 2012-02-25  Bruno Haible  <bruno@clisp.org>
71402         remainder: Support for MSVC.
71403         * lib/math.in.h (remainder): New declaration.
71404         * lib/remainder.c: New file.
71405         * m4/remainder.m4: New file.
71406         * modules/remainder (Files): Add lib/remainder.c, m4/remainder.m4.
71407         (Depends-on): Add math, round, fma.
71408         (configure.ac): Use results of gl_FUNC_REMAINDER.
71409         * m4/math_h.m4 (gl_MATH_H): Test whether remainder is declared.
71410         (gl_MATH_H_DEFAULTS): Initialize GNULIB_REMAINDER, HAVE_REMAINDER,
71411         HAVE_DECL_REMAINDER.
71412         * modules/math (Makefile.am): Substitute GNULIB_REMAINDER,
71413         HAVE_REMAINDER, HAVE_DECL_REMAINDER.
71414         * tests/test-math-c++.cc: Check the declaration of remainder.
71415         * doc/posix-functions/remainder.texi: Mention that the MSVC and IRIX 5
71416         problems are fixed.
71418 2012-02-25  Bruno Haible  <bruno@clisp.org>
71420         Tests for module 'fmodl'.
71421         * modules/fmodl-tests: New file.
71422         * tests/test-fmodl.c: New file.
71423         * tests/test-math-c++.cc: Check the declaration of fmodl.
71425         New module 'fmodl'.
71426         * lib/math.in.h (fmodl): New declaration.
71427         * lib/fmodl.c: New file.
71428         * m4/fmodl.m4: New file.
71429         * m4/math_h.m4 (gl_MATH_H): Test whether fmodl is declared.
71430         (gl_MATH_H_DEFAULTS): Initialize GNULIB_FMODL, HAVE_FMODL,
71431         REPLACE_FMODL.
71432         * modules/math (Makefile.am): Substitute GNULIB_FMODL, HAVE_FMODL,
71433         REPLACE_FMODL.
71434         * modules/fmodl: New file.
71435         * doc/posix-functions/fmodl.texi: Mention the new module.
71437 2012-02-25  Bruno Haible  <bruno@clisp.org>
71439         Tests for module 'modfl'.
71440         * modules/modfl-tests: New file.
71441         * tests/test-modfl.c: New file.
71442         * tests/test-math-c++.cc: Check the declaration of modfl.
71444         New module 'modfl'.
71445         * lib/math.in.h (modfl): New declaration.
71446         * lib/modfl.c: New file.
71447         * m4/modfl.m4: New file.
71448         * m4/math_h.m4 (gl_MATH_H): Test whether modfl is declared.
71449         (gl_MATH_H_DEFAULTS): Initialize GNULIB_MODFL, HAVE_MODFL.
71450         * modules/math (Makefile.am): Substitute GNULIB_MODFL, HAVE_MODFL.
71451         * modules/modfl: New file.
71452         * doc/posix-functions/modfl.texi: Mention the new module.
71454 2012-02-25  Bruno Haible  <bruno@clisp.org>
71456         Tests for module 'fabsl'.
71457         * modules/fabsl-tests: New file.
71458         * tests/test-fabsl.c: New file.
71459         * tests/test-math-c++.cc: Check the declaration of fabsl.
71461         New module 'fabsl'.
71462         * lib/math.in.h (fabsl): New declaration.
71463         * lib/fabsl.c: New file.
71464         * m4/fabsl.m4: New file.
71465         * m4/math_h.m4 (gl_MATH_H): Test whether fabsl is declared.
71466         (gl_MATH_H_DEFAULTS): Initialize GNULIB_FABSL, HAVE_FABSL,
71467         REPLACE_FABSL.
71468         * modules/math (Makefile.am): Substitute GNULIB_FABSL, HAVE_FABSL,
71469         REPLACE_FABSL.
71470         * modules/fabsl: New file.
71471         * doc/posix-functions/fabsl.texi: Mention the new module.
71473 2012-02-25  Bruno Haible  <bruno@clisp.org>
71475         fabs tests: More tests.
71476         * tests/test-fabs.c: Include <string.h>, minus-zero.h.
71477         (zero): New variable.
71478         (main): Add tests for signed zero.
71479         * modules/fabs-tests (Files): Add tests/minus-zero.h.
71481         fabsf tests: More tests.
71482         * tests/test-fabsf.c: Include <string.h>, minus-zero.h.
71483         (zero): New variable.
71484         (main): Add tests for signed zero.
71485         * modules/fabsf-tests (Files): Add tests/minus-zero.h.
71487 2012-02-24  Bruno Haible  <bruno@clisp.org>
71489         atanl: Provide function definition on MSVC.
71490         * m4/atanl.m4 (gl_FUNC_ATANL): Test also whether atanl can be used as a
71491         function pointer.
71492         * lib/math.in.h (atanl): Undefine if it does not exist as a function.
71494 2012-02-24  Bruno Haible  <bruno@clisp.org>
71496         acosl: Provide function definition on MSVC.
71497         * m4/acosl.m4 (gl_FUNC_ACOSL): Test also whether acosl can be used as a
71498         function pointer.
71499         * lib/math.in.h (acosl): Undefine if it does not exist as a function.
71501 2012-02-24  Bruno Haible  <bruno@clisp.org>
71503         asinl: Provide function definition on MSVC.
71504         * m4/asinl.m4 (gl_FUNC_ASINL): Test also whether asinl can be used as a
71505         function pointer.
71506         * lib/math.in.h (asinl): Undefine if it does not exist as a function.
71508 2012-02-24  Bruno Haible  <bruno@clisp.org>
71510         tanl: Provide function definition on MSVC.
71511         * m4/tanl.m4 (gl_FUNC_TANL): Test also whether tanl can be used as a
71512         function pointer.
71513         * lib/math.in.h (tanl): Undefine if it does not exist as a function.
71515 2012-02-24  Bruno Haible  <bruno@clisp.org>
71517         cosl: Provide function definition on MSVC.
71518         * m4/cosl.m4 (gl_FUNC_COSL): Test also whether cosl can be used as a
71519         function pointer.
71520         * lib/math.in.h (cosl): Undefine if it does not exist as a function.
71522 2012-02-24  Bruno Haible  <bruno@clisp.org>
71524         sinl: Provide function definition on MSVC.
71525         * m4/sinl.m4 (gl_FUNC_SINL): Test also whether sinl can be used as a
71526         function pointer.
71527         * lib/math.in.h (sinl): Undefine if it does not exist as a function.
71529 2012-02-24  Bruno Haible  <bruno@clisp.org>
71531         logl: Provide function definition on MSVC.
71532         * m4/logl.m4 (gl_FUNC_LOGL): Test also whether logl can be used as a
71533         function pointer.
71534         * lib/math.in.h (logl): Undefine if it does not exist as a function.
71536 2012-02-24  Bruno Haible  <bruno@clisp.org>
71538         expl: Provide function definition on MSVC.
71539         * m4/expl.m4 (gl_FUNC_EXPL): Test also whether expl can be used as a
71540         function pointer.
71541         * lib/math.in.h (expl): Undefine if it does not exist as a function.
71543 2012-02-24  Bruno Haible  <bruno@clisp.org>
71545         sqrtl: Provide function definition on MSVC.
71546         * m4/sqrtl.m4 (gl_FUNC_SQRTL): Test also whether sqrtl can be used as
71547         a function pointer.
71548         * lib/math.in.h (sqrtl): Undefine if it does not exist as a function.
71550 2012-02-24  Bruno Haible  <bruno@clisp.org>
71552         ceill: Provide function definition on MSVC.
71553         * m4/ceill.m4 (gl_FUNC_CEILL_LIBS): Test also whether ceill can be
71554         used as a function pointer.
71555         * lib/math.in.h (ceill): Undefine if it is not declared as a function.
71557 2012-02-24  Bruno Haible  <bruno@clisp.org>
71559         floorl: Provide function definition on MSVC.
71560         * m4/floorl.m4 (gl_FUNC_FLOORL_LIBS): Test also whether floorl can be
71561         used as a function pointer.
71562         * lib/math.in.h (floorl): Undefine if it is not declared as a function.
71564 2012-02-24  Bruno Haible  <bruno@clisp.org>
71566         ceilf: Provide function definition on MSVC.
71567         * m4/ceilf.m4 (gl_FUNC_CEILF_LIBS): Test also whether ceilf can be
71568         used as a function pointer.
71569         * lib/math.in.h (ceilf): Undefine if it is not declared as a function.
71571 2012-02-24  Bruno Haible  <bruno@clisp.org>
71573         floorf: Provide function definition on MSVC.
71574         * m4/floorf.m4 (gl_FUNC_FLOORF_LIBS): Test also whether floorf can be
71575         used as a function pointer.
71576         * lib/math.in.h (floorf): Undefine if it is not declared as a function.
71578 2012-02-24  Paul Eggert  <eggert@cs.ucla.edu>
71580         stdnoreturn: new module
71581         This implements a replacement for C11's <stdnoreturn.h>.
71582         * doc/gnulib.texi (Header File Substitutes): Add stdnoreturn.
71583         * doc/posix-headers/stdnoreturn.texi, lib/stdnoreturn.in.h:
71584         * m4/stdnoreturn.m4, modules/stdnoreturn, modules/stdnoreturn-tests:
71585         * tests/test-stdnoreturn.c: New files.
71587 2012-02-24  Stanislav Brabec  <sbrabec@suse.cz>  (tiny change)
71589         regex: fix false multibyte matches in some regular expressions
71590         See <http://sourceware.org/bugzilla/show_bug.cgi?id=13637>
71591         and <http://sourceware.org/ml/libc-alpha/2012-02/msg00521.html>.
71592         * lib/regex_internal.c (re_string_skip_chars):
71593         Fix miscomputation of remain_len that may cause incomplete
71594         multi-byte character and false match.
71596 2012-02-24  Jim Meyering  <meyering@redhat.com>
71598         maint.mk: tell sc_prohibit_strcmp to ding "0 == strcmp (...)", too
71599         * top/maint.mk (sc_prohibit_strcmp): Also prohibit uses of strcmp
71600         uses with "==" *before* the call, e.g., 0 == strcmp (...)
71601         Remove now-unnecessary str''cmp obfuscation.
71602         Suggested by Akim Demaille.
71604 2012-02-24  Bruno Haible  <bruno@clisp.org>
71606         streq: Rename macro.
71607         * lib/streq.h (STREQ_OPT): Renamed from STREQ.
71608         * NEWS: Mention the change.
71609         * lib/mbrtowc.c (mbrtowc): Update.
71610         * lib/uniwidth/cjk.h (is_cjk_encoding): Update.
71611         * lib/wcwidth.c (wcwidth): Update.
71612         Suggested by Akim Demaille and Jim Meyering.
71614 2012-02-20  Paul Eggert  <eggert@cs.ucla.edu>
71616         regex: fix typo in definition of MIN
71617         * lib/regex_internal.h (MIN): Fix typo.  Problem reported by Thomas
71618         Schwinge in <http://sourceware.org/bugzilla/show_bug.cgi?id=11638#c4>.
71620 2012-02-19  Paul Eggert  <eggert@cs.ucla.edu>
71621             Bruno Haible  <bruno@clisp.org>
71623         acl: Don't use ACL_CNT and similar ops, since they are unreliable.
71624         * lib/file-has-acl.c (file_has_acl) [HP-UX, NonStop Kernel]: Read the
71625         entries into a stack-allocated buffer directly.
71626         * lib/copy-acl.c (qcopy_acl) [HP-UX, NonStop Kernel]: Likewise.
71628 2012-02-19  Paul Eggert  <eggert@cs.ucla.edu>
71629             Bruno Haible  <bruno@clisp.org>
71631         acl: Don't use GETACLCNT and similar ops, since they are unreliable.
71633          - There were several instances of this pattern:
71635              for (;;) {
71636                n = acl (f, GETACLCNT, 0, NULL);
71637                [ allocate an array A of size N ]
71638                if (acl (f, GETACL, n, a) == n)
71639                  break;
71640              }
71642            This loop might never terminate if some other process is constantly
71643            manipulating the file's ACL.  The loop should be rewritten to
71644            terminate.
71646          - The acl (... GETACLNT ...) call is merely an optimization; its value
71647            is merely a hint as to how big to make the array.  A better
71648            optimization is to avoid the acl (... GETACLNT ...)  call entirely,
71649            and just guess a reasonably-big size, growing the size and trying
71650            again if it's not large enough.  This guarantees termination, and
71651            saves a system call.
71653         * lib/acl-internal.h: Include <limits.h>.
71654         (MIN, SIZE_MAX): New macros.
71655         * lib/file-has-acl.c (file_has_acl) [Solaris]: Read the entries into
71656         a stack-allocated buffer, and use malloc if it does not fit. Don't
71657         use GETACLCNT.
71658         * lib/set-mode-acl.c (qset_acl) [Solaris]: Likewise.
71660 2012-02-19  Bruno Haible  <bruno@clisp.org>
71662         acl: Fix endless loop on Solaris with vxfs.
71663         * lib/file-has-acl.c (file_has_acl) [Solaris]: Treat a failing
71664         acl()/facl() call for ACE_GETACL like a failing call for ACE_GETACLCNT.
71665         * lib/set-mode-acl.c (qset_acl) [Solaris]: Likewise.
71666         * lib/copy-acl.c (qcopy_acl)[Solaris]: Likewise.
71667         * tests/test-sameacls.c (main)[Solaris]: Likewise.
71668         Reported by Bill Jones in
71669         <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10639>, via Paul Eggert.
71671 2012-02-19  Bruno Haible  <bruno@clisp.org>
71673         acl: Fix copy-acl test failure on Solaris 11.0.
71674         * lib/file-has-acl.c (NEW_ACE_WRITEA_DATA): New macro.
71675         (acl_ace_nontrivial): Relax the restrictions on access_masks[] so
71676         that this function returns 0 in some more cases.
71678 2012-02-19  Bruno Haible  <bruno@clisp.org>
71680         acl: Update doc references.
71681         * doc/acl-resources.txt: Update links to Solaris documentation.
71683 2012-02-19  Bruno Haible  <bruno@clisp.org>
71685         Fix test failure in many locales on Solaris 11.
71686         * tests/test-pipe-filter-gi1.c (main): Don't use range expression in
71687         'tr' arguments.
71688         * tests/test-pipe-filter-ii1.c (main): Likewise.
71689         * build-aux/bootstrap (check_versions): Run 'tr' command with range
71690         expressions in the C locale.
71691         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Likewise.
71692         * m4/host-os.m4 (gl_HOST_OS): Likewise.
71694 2012-02-19  Bruno Haible  <bruno@clisp.org>
71696         gnulib-tool: Improve usage message.
71697         * gnulib-tool (func_usage): Move doc of --help and --version to the
71698         section "Operation modes".
71700 2012-02-18  Reuben Thomas  <rrt@sc3d.org>
71702         README-release: make it easier to execute commands
71703         * top/README-release: break commands out on to separate lines.
71705 2012-02-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
71707         GNUmakefile: simplify detection of unconfigured trees
71708         * top/GNUmakefile: Use $(wildcard) instead of $(shell) to determine
71709         whether the tree make is being run from is already configured or
71710         not.  Related simplifications.
71712 2012-02-13  Simon Josefsson  <simon@josefsson.org>
71714         * gnulib-tool (func_usage): Document --help and --version.
71716 2012-02-11  Jim Meyering  <meyering@redhat.com>
71718         bootstrap: don't exit 0 upon gnulib-tool failure
71719         * build-aux/bootstrap (gnulib_tool): If gnulib-tool fails, exit with
71720         its exit status, not 0.
71722 2011-12-19  Reuben Thomas  <rrt@sc3d.org>
71724         README-release: various improvements
71725         * top/README-release: Give a command to push changes for the
71726         release.  Add "distcheck" to list of other pre-release checks.
71727         Fix instance of "make stable" which should be "make TYPE".
71729 2012-02-09  Paul Eggert  <eggert@cs.ucla.edu>
71731         maint: replace FSF snail-mail addresses with URLs
71732         * config/argz.mk, lib/accept4.c, lib/alignof.h, lib/alloca.in.h:
71733         * lib/alphasort.c, lib/arcfour.c, lib/arcfour.h, lib/arctwo.c:
71734         * lib/arctwo.h, lib/argz.c, lib/arpa_inet.in.h, lib/asnprintf.c:
71735         * lib/asprintf.c, lib/assert.in.h, lib/base32.c, lib/base32.h:
71736         * lib/base64.c, lib/base64.h, lib/c-ctype.c, lib/c-ctype.h:
71737         * lib/c-strcase.h, lib/c-strcasecmp.c, lib/c-strncasecmp.c:
71738         * lib/check-version.c, lib/check-version.h, lib/config.charset:
71739         * lib/ctype.in.h, lib/des.c, lib/des.h, lib/dup3.c, lib/errno.in.h:
71740         * lib/float+.h, lib/fnmatch.c, lib/fnmatch.in.h, lib/fnmatch_loop.c:
71741         * lib/fseeko.c, lib/gai_strerror.c, lib/gc-gnulib.c:
71742         * lib/gc-libgcrypt.c, lib/gc-pbkdf2-sha1.c, lib/gc.h:
71743         * lib/getaddrinfo.c, lib/getdelim.c, lib/getfilecon.c, lib/getline.c:
71744         * lib/getlogin_r.c, lib/getpass.c, lib/getpass.h, lib/gettext.h:
71745         * lib/gettimeofday.c, lib/glob.in.h, lib/glthread/cond.c:
71746         * lib/glthread/cond.h, lib/glthread/lock.c, lib/glthread/lock.h:
71747         * lib/glthread/thread.c, lib/glthread/thread.h:
71748         * lib/glthread/threadlib.c, lib/glthread/yield.h, lib/hmac-md5.c:
71749         * lib/hmac-sha1.c, lib/hmac.h, lib/iconv.c, lib/iconv.in.h:
71750         * lib/iconv_close.c, lib/iconv_open.c, lib/inet_ntop.c, lib/isfinite.c:
71751         * lib/isinf.c, lib/iswblank.c, lib/langinfo.in.h, lib/link.c:
71752         * lib/localcharset.c, lib/localcharset.h, lib/lseek.c, lib/malloc.c:
71753         * lib/malloca.c, lib/malloca.h, lib/md2.c, lib/md2.h, lib/md4.c:
71754         * lib/md4.h, lib/md5.c, lib/md5.h, lib/memmem.c, lib/mempcpy.c:
71755         * lib/memset.c, lib/memxor.c, lib/memxor.h, lib/minmax.h, lib/mktime.c:
71756         * lib/msvc-inval.c, lib/msvc-inval.h, lib/msvc-nothrow.c:
71757         * lib/msvc-nothrow.h, lib/netdb.in.h, lib/netinet_in.in.h, lib/nproc.c:
71758         * lib/nproc.h, lib/obstack_printf.c, lib/pathmax.h, lib/pipe.c:
71759         * lib/pipe2.c, lib/poll.c, lib/poll.in.h, lib/printf-args.c:
71760         * lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h:
71761         * lib/pselect.c, lib/pthread.in.h, lib/pty-private.h, lib/pty.in.h:
71762         * lib/read-file.c, lib/read-file.h, lib/ref-add.sin, lib/ref-del.sin:
71763         * lib/regcomp.c, lib/regex.c, lib/regex.h, lib/regex_internal.c:
71764         * lib/regex_internal.h, lib/regexec.c, lib/rijndael-alg-fst.c:
71765         * lib/rijndael-alg-fst.h, lib/rijndael-api-fst.c:
71766         * lib/rijndael-api-fst.h, lib/rint.c, lib/rintf.c, lib/rintl.c:
71767         * lib/round.c, lib/roundf.c, lib/roundl.c, lib/scandir.c, lib/select.c:
71768         * lib/sha1.c, lib/sha1.h, lib/size_max.h, lib/snprintf.c:
71769         * lib/stdalign.in.h, lib/stdarg.in.h, lib/stdbool.in.h:
71770         * lib/stddef.in.h, lib/stdint.in.h, lib/stdio.in.h, lib/str-kmp.h:
71771         * lib/str-two-way.h, lib/strcasecmp.c, lib/strcasestr.c, lib/strdup.c:
71772         * lib/striconv.c, lib/striconv.h, lib/string.in.h, lib/strings.in.h:
71773         * lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c, lib/strpbrk.c:
71774         * lib/strptime.c, lib/strsep.c, lib/strstr.c, lib/strverscmp.c:
71775         * lib/sys_file.in.h, lib/sys_ioctl.in.h, lib/sys_select.in.h:
71776         * lib/sys_socket.in.h, lib/sys_stat.in.h, lib/sys_time.in.h:
71777         * lib/sys_times.in.h, lib/sys_types.in.h, lib/sys_uio.in.h:
71778         * lib/sys_utsname.in.h, lib/sys_wait.in.h, lib/tcgetsid.c:
71779         * lib/termios.in.h, lib/time.in.h, lib/time_r.c, lib/timegm.c:
71780         * lib/times.c, lib/unictype/3level.h, lib/unictype/3levelbit.h:
71781         * lib/unistd.in.h, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c:
71782         * lib/vsnprintf.c, lib/waitpid.c, lib/wchar.in.h, lib/wctype.in.h:
71783         * lib/xsize.h, tests/test-closein.c, tests/test-des.c:
71784         * tests/test-fclose.c, tests/test-fgetc.c, tests/test-filevercmp.c:
71785         * tests/test-fputc.c, tests/test-fread.c, tests/test-fwrite.c:
71786         * tests/test-gc-arcfour.c, tests/test-gc-arctwo.c, tests/test-gc-des.c:
71787         * tests/test-gc-hmac-md5.c, tests/test-gc-hmac-sha1.c:
71788         * tests/test-gc-md2.c, tests/test-gc-md4.c, tests/test-gc-md5.c:
71789         * tests/test-gc-pbkdf2-sha1.c, tests/test-gc-rijndael.c:
71790         * tests/test-gc-sha1.c, tests/test-gc.c, tests/test-getdelim.c:
71791         * tests/test-getline.c, tests/test-getndelim2.c, tests/test-md2.c:
71792         * tests/test-md4.c, tests/test-parse-datetime.c, tests/test-perror.c:
71793         * tests/test-perror2.c, tests/test-pipe.c, tests/test-pipe2.c:
71794         * tests/test-poll.c, tests/test-quotearg-simple.c:
71795         * tests/test-quotearg.c, tests/test-quotearg.h:
71796         * tests/test-round-ieee.c, tests/test-round1.c:
71797         * tests/test-roundf-ieee.c, tests/test-roundf1.c:
71798         * tests/test-roundl-ieee.c, tests/test-roundl.c:
71799         * tests/test-safe-alloc.c, tests/test-sigpipe.c:
71800         * tests/test-spawn-pipe-child.c, tests/test-spawn-pipe-main.c:
71801         * tests/test-strerror.c, tests/test-strerror_r.c:
71802         * tests/test-strsignal.c, tests/test-strverscmp.c:
71803         * tests/test-xmemdup0.c:
71804         Replace FSF snail mail addresses with URLs, as per GNU coding
71805         standards.  See glibc bug
71806         <http://sourceware.org/bugzilla/show_bug.cgi?id=13673>.
71808 2011-12-22  Reuben Thomas  <rrt@sc3d.org>
71810         README-release: capitalize a word and split a line
71811         * top/README-release: Fix punctuation and spacing.
71813 2012-02-08  Akim Demaille  <demaille@gostai.com>
71815         fatal-signal: use C prototypes (with explicit void).
71816         * lib/fatal-signal.c (uninstall_handlers, install_handlers)
71817         (init_fatal_signal_set, block_fatal_signals): Fix signatures.
71819 2012-02-07  Paul Eggert  <eggert@cs.ucla.edu>
71821         regex: spelling fix
71822         * lib/regexec.c: spelling fix
71824         regex: rely on stdint.h for SIZE_MAX
71825         * lib/regex_internal.h (SIZE_MAX): Remove; stdint.h supplies this now.
71827 2012-02-07  Paul Eggert  <eggert@cs.ucla.edu>
71829         regex: merge glibc changes
71831         * lib/regcomp.c (init_dfa): Tighten overflow checks to test
71832         for IDX_MAX too, since IDX_MAX can be much less than SIZE_MAX.
71833         (init_word_char): Work even if bitset words are not exactly 32 or
71834         64 bits wide.  Don't assume there are no padding bits.
71835         * lib/regex.c [_LIBC]: Do not include <config.h>.
71836         [!_LIBC]: Add pragmas to ignore -Wsuggest-attributes=pure
71837         and -Wtype-limits.
71838         * lib/regex.h (__USE_GNU): Renamed from __USE_GNU_REGEX, to avoid
71839         needless disagreement with glibc.  All uses changed.  Define it to
71840         1 only if _GNU_SOURCE, to match glibc.
71841         (_REG_RM_NAME): Remove; no longer needed, since the names in
71842         question are now all protected by __USE_GNU.
71843         (_REG_RE_NAME): Remove; replaced by glibc's __REPB_PREFIX.
71844         (REG_TRANSLATE_TYPE): Remove; replaced by glibc's __RE_TRANSLATE_TYPE.
71845         * lib/regex_internal.h (MIN): New macro.
71847         2012-01-03 Ulrich Drepper <drepper@gmail.com>
71848         * lib/regcomp.c (init_word_char): Optimize regex a bit.
71850         2011-12-30 Jakub Jelinek <jakub@redhat.com>
71851         * lib/regex_internal.c (re_string_fetch_byte_case):
71852         Fix up regcomp/regexec.  The problem is that parse_bracket_symbol
71853         is miscompiled, and it turns out it is because of an incorrect
71854         attribute on re_string_fetch_byte_case.  Unlike
71855         re_string_peek_byte_case, this one is really not pure, it modifies
71856         memory (increments pstr->cur_idx), and with the pure attribute GCC
71857         assumed it doesn't and it cached the presumed value of
71858         regexp->cur_idx in a variable across the
71859          for (;; ++i)
71860            {
71861              if (i >= BRACKET_NAME_BUF_SIZE)
71862                return REG_EBRACK;
71863              if (token->type == OP_OPEN_CHAR_CLASS)
71864                ch = re_string_fetch_byte_case (regexp);
71865              else
71866                ch = re_string_fetch_byte (regexp);
71867              if (re_string_eoi(regexp))
71868                return REG_EBRACK;
71869              if (ch == delim && re_string_peek_byte (regexp, 0) == ']')
71870                break;
71871              elem->opr.name[i] = ch;
71872            }
71874         2011-11-29 Andreas Schwab <schwab@redhat.com>
71875         * lib/regcomp.c (build_equiv_class):
71876         Fix access after end of search string in regex matcher.
71878         2011-11-12 Ulrich Drepper <drepper@redhat.com>
71879         * lib/regex_internal.c, lib/regex_internal.h: Fix warnings in regex.
71881         2011-10-12 Ulrich Drepper <drepper@redhat.com>
71882         * lib/regcomp.c (parse_branch): One more regex memory leak fixed.
71884         2011-10-11 Ulrich Drepper <drepper@redhat.com>
71885         * lib/regcomp.c (parse_branch, parse_sub_exp):
71886         More regex memory leak fixes and tests.
71887         (parse_sub_exp, parse_bracket_exp):
71888         Fix memory leak for some invalid regular expressions.
71890         2011-05-28 Ulrich Drepper <drepper@gmail.com>
71891         * lib/regex_internal.c, lib/regexec.c:
71892         Fix unnecessary overallocation due to incomplete character.  When
71893         incomplete characters are found at the end of a string the code
71894         ran amok and allocated lots of memory.  Stricter limits are now in
71895         place.
71897         2011-05-20 Reuben Thomas <rrt@sc3d.org>
71898         * lib/regex.h: Update documentation.
71900         2011-05-16 Aharon Robbins <arnold@skeeve.com>
71901         * lib/regex.h: Update RE_SYNTAX*_AWK constants.
71903         2010-05-05 Andreas Schwab <schwab@redhat.com>
71904         * lib/regexec.c (find_collation_sequence_value):
71905         Fix lookup of collation sequence value during regexp matching.
71907         2010-01-22 Ulrich Drepper <drepper@redhat.com>
71908         * lib/regex_internal.c (re_dfa_add_node): Extend overflow detection.
71910         2008-01-16 Ulrich Drepper <drepper@redhat.com>
71911         * lib/regex.h: Cleanup namespace.
71913         2007-11-26 Ulrich Drepper <drepper@redhat.com>
71914         * lib/regex.h (REG_ENOSYS): Define REG_ENOSYS also for __USE_XOPEN2K.
71916         2007-08-26 Ulrich Drepper <drepper@redhat.com>
71917         * lib/regex_internal.h: Prevent some declarations and definitions
71918         to be seen when used in tests.
71920         2005-05-06 Ulrich Drepper <drepper@redhat.com>
71921         * lib/regex_internal.h: Include bits/libc-lock.h or define dummy
71922         __libc_lock_* macros if not _LIBC.
71923         (struct re_dfa_t): Add lock.
71925 2012-02-07  Eric Blake  <eblake@redhat.com>
71927         maint.mk: also prohibit lower-case @var@
71928         * top/maint.mk (sc_makefile_at_at_check): Enhance check to cover
71929         lower case, like @top_srcdir@.
71931 2012-02-04  Eric Blake  <eblake@redhat.com>
71933         canonicalize: avoid uninitialized memory use
71934         * lib/canonicalize-lgpl.c (__realpath): Avoid possibility of
71935         random '/' left in dest.
71936         * lib/canonicalize.c (canonicalize_filename_mode): Likewise.
71938 2012-02-04  Bruno Haible  <bruno@clisp.org>
71940         isatty: Fix test failure of ptsname_r on native Windows.
71941         * lib/isatty.c (_isatty_nothrow): Upon exception, return 0, not -1,
71942         and don't set errno.
71943         (isatty): Test first whether fd is valid. Set errno when returning 0.
71945 2012-02-04  Bruno Haible  <bruno@clisp.org>
71947         spawn-pipe tests: Fix a NULL program name in a diagnostic.
71948         * tests/test-spawn-pipe-main.c: Include progname.h.
71949         (main): Invoke set_program_name.
71950         * modules/spawn-pipe-tests (Depends-on): Add progname.
71952         nonblocking-socket tests: Fix a NULL program name in a diagnostic.
71953         * tests/test-nonblocking-socket-main.c: Include progname.h.
71954         (main): Invoke set_program_name.
71955         * modules/nonblocking-socket-tests (Depends-on): Add progname.
71957         nonblocking-pipe tests: Fix a NULL program name in a diagnostic.
71958         * tests/test-nonblocking-pipe-main.c: Include progname.h.
71959         (main): Invoke set_program_name.
71960         * modules/nonblocking-pipe-tests (Depends-on): Add progname.
71962 2012-02-04  Eric Blake  <eblake@redhat.com>
71964         canonicalize-lgpl: fix // handling
71965         * lib/canonicalize-lgpl.c (__realpath): Don't convert /// to //.
71967         canonicalize: fix // handling
71968         * lib/canonicalize.c (canonicalize_filename_mode): Don't convert
71969         /// to //, since only // is special.
71971 2012-02-04  Bruno Haible  <bruno@clisp.org>
71973         ioctl: Fix test failure on native Windows.
71974         * lib/ioctl.c: Include msvc-nothrow.h.
71975         (primary_ioctl): If fd is not a valid handle, set errno to EBADF.
71977 2012-02-04  Bruno Haible  <bruno@clisp.org>
71979         fsync: Avoid test failure on native Windows.
71980         * lib/fsync.c (fsync) [Windows]: Don't fail if the handle is merely
71981         read-only.
71983 2012-02-04  Bruno Haible  <bruno@clisp.org>
71985         sys_select: Avoid syntax error on OpenBSD 5.0.
71986         * lib/sys_select.in.h [OpenBSD]: When /usr/include/pthread.h is
71987         currently being included, just include the system's <sys/select.h>.
71989 2012-02-04  Bruno Haible  <bruno@clisp.org>
71991         sys_select: Avoid syntax error on OpenBSD 5.0.
71992         * lib/sys_select.in.h: Include <signal.h> only after the include_next
71993         <sys/select.h>, not before.
71994         Reported by Jiri B <jirib@devio.us>.
71996 2012-02-04  Bruno Haible  <bruno@clisp.org>
71998         get-rusage-as, get-rusage-data tests: Avoid test failure with gcc-4.7.
71999         * tests/test-get-rusage-as.c (main): Assign the malloc() results to
72000         global variables.
72001         * tests/test-get-rusage-data.c (main): Likewise.
72002         Reported by Jim Meyering.
72004 2012-02-04  Bruno Haible  <bruno@clisp.org>
72006         stdioext: Fix last commit.
72007         * lib/fwritable.c [EPLAN9]: Include <fcntl.h>.
72009 2012-02-03  Bruno Haible  <bruno@clisp.org>
72011         stdioext: Add tentative support for Plan9.
72012         * lib/stdio-impl.h: Include <errno.h>.
72013         * lib/fseterr.c (fseterr) [EPLAN9]: Add conditional code.
72014         * lib/freadable.c (freadable): Likewise.
72015         * lib/fwritable.c (fwritable): Likewise.
72016         * lib/fbufmode.c (fbufmode): Likewise.
72017         * lib/freading.c (freading): Likewise.
72018         * lib/fwriting.c (fwriting): Likewise.
72019         * lib/freadptr.c (freadptr): Likewise.
72020         * lib/freadseek.c (freadptrinc): Likewise.
72021         * lib/freadahead.c (freadahead): Likewise.
72022         * lib/fpurge.c (fpurge): Likewise.
72023         * lib/fseeko.c (rpl_fseeko): Likewise.
72024         * m4/fpending.m4 (gl_PREREQ_FPENDING): Add a variant for Plan9.
72025         Reported by Jens Staal <staal1978@gmail.com>.
72027 2012-02-02  Jim Meyering  <meyering@redhat.com>
72029         file-has-acl: suppress a warning from gcc -Wsuggest-attribute=const
72030         * lib/file-has-acl.c (file_has_acl): This function (for some #ifdefs)
72031         would evoke a new gcc warning.  Given all of the #ifdefs, it is better
72032         not even to try to add the attribute.  Instead, add a pragma to suppress
72033         the suggestion/warning.
72035 2012-01-31  Karl Berry  <karl@gnu.org>
72037         setstate doc: typo.
72038         * doc/posix-functions/setstate.texi (setstate): { not (.
72040 2012-01-31  Bruno Haible  <bruno@clisp.org>
72042         popen: Make more robust on Windows.
72043         * lib/popen.c: On native Windows, use the _popen based code even if
72044         HAVE_POPEN is set.
72045         * doc/posix-functions/popen.texi: Mention necessity of COMSPEC
72046         environment variable on native Windows.
72048 2012-01-30  Bruno Haible  <bruno@clisp.org>
72050         pclose: Fix typo.
72051         * lib/stdio.in.h (pclose): Fix typo in warning message.
72053 2012-01-30  Bruno Haible  <bruno@clisp.org>
72055         doc about getlogin_r, setstate.
72056         * doc/posix-functions/getlogin_r.texi: List the incompatible
72057         declaration problem under "not fixed by gnulib".
72058         * doc/posix-functions/setstate.texi: Mention incompatible declaration
72059         problem on Solaris 11 and other platforms.
72061 2012-01-30  Chuanchang Jia  <chuanchang.jia@gmail.com>  (tiny change)
72062             Bruno Haible  <bruno@clisp.org>
72064         poll tests: Make test more robust.
72065         * tests/test-poll.c: Include macros.h.
72066         (test_accept_first, test_pair, test_socket_pair, test_pipe): Verify
72067         return value of various I/O operations.
72068         * modules/poll-tests (Files): Add tests/macros.h.
72070 2012-01-30  Bruno Haible  <bruno@clisp.org>
72072         sys_stat: Fix support for mingw64 and MSVC.
72073         * lib/sys_stat.in.h (stat) [AIX]: Don't redefine 'stat' if the system
72074         header files already do it.
72075         (stat) [mingw, msvc]: Redefine the symbol to which stat is defined, not
72076         stat itself.
72077         Reported by Marc-André Lureau <marcandre.lureau@redhat.com>.
72079 2012-01-30  Bruno Haible  <bruno@clisp.org>
72081         wcwidth: Work around bug in UTF-8 locale on OpenBSD 5.0.
72082         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Test also wcwidth of U+05B0.
72083         * doc/posix-functions/wcwidth.texi: Mention the OpenBSD 5.0 bug.
72085 2012-01-29  Bruno Haible  <bruno@clisp.org>
72087         quotearg: Fix test failure on MacOS X 10.5.
72088         * tests/test-quotearg-simple.c: Include localcharset.h.
72089         (main): If the locale encoding is not ASCII, bypass the tests of
72090         locale_quoting_style and clocale_quoting_style.
72091         * modules/quotearg-tests (Depends-on): Add 'localcharset'.
72093 2012-01-29  Jim Meyering  <meyering@redhat.com>
72095         maint.mk: sc_prohibit_canonicalize_without_use: avoid false positive
72096         * top/maint.mk (sc_prohibit_canonicalize_without_use): Also
72097         detect uses of canonicalize_file_name.
72099 2012-01-28  Bruno Haible  <bruno@clisp.org>
72101         test-framework-sh: Fix test failure with AIX 7.1 diff.
72102         * tests/init.sh (compare_): Don't use 'diff -u' if it inserts a space
72103         in column 1, like 'diff -c' does.
72104         * tests/test-init.sh (test_compare): Don't repeat the test from init.sh
72105         whether 'diff -u' is used. Instead, test whether the output contains
72106         some '@' character.
72108 2012-01-28  Paul Eggert  <eggert@cs.ucla.edu>
72110         strtoimax: eliminate need for stdint.h, inttypes.h checks
72111         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Don't use
72112         gl_AC_HEADER_STDINT_H or gl_AC_HEADER_INTTYPES_H.  This reduces
72113         the prerequisites for a recently-introduced strtoimax test.
72114         I guess this might cause strtoimax to be replaced when not
72115         strictly necessary on older hosts, but this shouldn't introduce
72116         any bugs and it should make Emacs 'configure' faster on typical
72117         modern hosts.  Problem discovered when importing the latest gnulib
72118         to an Emacs test version.
72119         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4.
72121 2012-01-28  Bruno Haible  <bruno@clisp.org>
72123         sys_time: Override 'struct timeval' on some native Windows platforms.
72124         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Test whether tv_sec
72125         has the right type. Set REPLACE_STRUCT_TIMEVAL if not.
72126         (gl_HEADER_SYS_TIME_H_DEFAULTS): Initialize REPLACE_STRUCT_TIMEVAL.
72127         * lib/sys_time.in.h: Include <winsock2.h> also when 'struct timeval'
72128         needs to be overridden.
72129         (timeval): Override if REPLACE_STRUCT_TIMEVAL is set.
72130         * modules/sys_time (Makefile.am): Substitute REPLACE_STRUCT_TIMEVAL.
72131         * tests/test-sys_select.c: Check that the tv_sec member has the same
72132         size as a 'time_t'.
72133         * tests/test-sys_time.c: Likewise.
72134         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): If REPLACE_STRUCT_TIMEVAL
72135         is set, set also REPLACE_GETTIMEOFDAY.
72136         * lib/gettimeofday.c (gettimeofday): If 'struct timeval' is overridden,
72137         convert the resulting 'struct timeval' before returning.
72138         * lib/select.c: Include <sys/time.h>.
72139         (select, timeval): Undefine at the right place.
72140         * modules/select (Depends-on): Add sys_time.
72141         * doc/posix-headers/sys_time.texi: Mention the problem with tv_sec on
72142         some Windows platforms.
72143         Reported by Marc-André Lureau <marcandre.lureau@redhat.com>.
72145 2012-01-28  Marc-André Lureau  <marcandre.lureau@redhat.com>  (tiny change)
72147         accept4, fcntl, socket modules: Avoid warnings on x86_64 mingw64.
72148         * lib/accept4.c (accept4): Use intptr_t to convert handle pointer to
72149         an integer.
72150         * lib/fcntl.c (dupfd): Likewise.
72151         * lib/w32sock.h (SOCKET_TO_FD): Likewise.
72153 2012-01-28  Bruno Haible  <bruno@clisp.org>
72155         fcntl: Avoid compilation error on native Windows.
72156         * modules/fcntl (Depends-on): Add 'close'.
72158 2012-01-28  Marc-André Lureau  <marcandre.lureau@redhat.com>  (tiny change)
72160         select, poll, isatty: Avoid warnings on x86_64 mingw64.
72161         * lib/select.c (IsConsoleHandle): Use intptr_t to convert handle
72162         pointer to an integer.
72163         * lib/poll.c (IsConsoleHandle): Likewise.
72164         * lib/isatty.c (IsConsoleHandle): Likewise.
72166 2012-01-28  Jim Meyering  <meyering@redhat.com>
72168         doc: clarify README-release
72169         * top/README-release: Clarify: you should make a point to have
72170         the latest stable versions of build tools in your PATH, and the
72171         reference to buildreq is solely for its list of tool names, not
72172         for its minimal-functional version numbers.
72173         Prompted by discussion with Reuben Thomas and Gary V. Vaughan.
72175         maint.mk: use more readable (yet functionally equivalent) quoting
72176         It is common to quote a single quote in a single quoted string like
72177         this:  '...'\''...'.  Unless you know the idiom, that looks like
72178         gibberish, so prefer to double-quote the string when possible.
72179         Then you can use a more readable, lone single quote: "...'..."
72180         * top/maint.mk (sc_cast_of_argument_to_free): Quoting like this
72181         "don't" is more readable than the equivalent 'don'\''t'.
72182         (sc_cast_of_x_alloc_return_value): Likewise.
72183         (sc_cast_of_alloca_return_value): Likewise.
72184         (sc_makefile_path_separator_check): Similar: use ":" in '...',
72185         rather than '\'':'\''.
72187 2012-01-27  Paul Eggert  <eggert@cs.ucla.edu>
72189         stdalign: relax _Alignof and tighten _Alignas test
72190         * m4/stdalign.m4 (gl_STDALIGN_H): Relax the _Alignof test,
72191         as it was too strict: alignof must divide offsetof, but it need
72192         not equal offsetof.  Inspired by Joseph S. Myers's comment
72193         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023#c10>.
72194         Conversely, tighten the _Alignas test a bit, as the resulting
72195         alignment must be exactly 8.
72197 2012-01-27  Bruno Haible  <bruno@clisp.org>
72199         stdalign: Document the last change.
72200         * doc/posix-headers/stdalign.texi: Mention GCC bug 52023.
72202 2012-01-27  Paul Eggert  <eggert@cs.ucla.edu>
72204         stdalign: check that alignof and offsetof are consistent
72205         * m4/stdalign.m4 (gl_STDALIGN_H): Check for GCC bug 52023.
72206         Problem reported for gnulib by Richard W.M. Jones in
72207         <http://lists.gnu.org/r/bug-gnulib/2012-01/msg00340.html>.
72209 2012-01-27  Jim Meyering  <meyering@redhat.com>
72211         update-copyright: accept new option: UPDATE_COPYRIGHT_USE_INTERVALS=2
72212         * build-aux/update-copyright: When UPDATE_COPYRIGHT_USE_INTERVALS=2,
72213         convert a sequence with gaps to the minimal containing range.
72214         For example, convert 2000, 2004-2007, 2009 to 2000-2009.
72215         * tests/test-update-copyright.sh: Test for this.
72216         The FSF confirmed it is ok to do this, assuming there is at
72217         least one significant change per year in the affected range:
72218         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/29554/focus=29860
72220 2012-01-26  Bruno Haible  <bruno@clisp.org>
72222         pipe2: refine doc about thread-safety
72223         * doc/glibc-functions/pipe2.texi: Clarify the extent of the
72224         multithread-safety problem.
72225         * doc/glibc-functions/accept4.texi: Likewise.
72227 2012-01-26  Bruno Haible  <bruno@clisp.org>
72229         posix_spawn_file_actions_addopen: Fix 2012-01-08 commit.
72230         * m4/posix_spawn.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN):
72231         In the test program, include <fcntl.h>, for O_RDONLY.
72233 2012-01-26  Eric Blake  <eblake@redhat.com>
72235         pipe2: document lack of thread-safety in replacement
72236         * doc/glibc-functions/pipe2.texi (pipe2): Mention thread safety
72237         issue in replacement.
72238         * doc/glibc-functions/accept4.texi (accept4): Likewise.
72239         Based on a report by Eric Wong.
72241 2012-01-24  Marc-André Lureau  <marcandre.lureau@redhat.com>  (tiny change)
72242             Bruno Haible  <bruno@clisp.org>
72244         malloca: Avoid warnings on x86_64 mingw64.
72245         * lib/malloca.c: Include <stdint.h>.
72246         (mmalloca, freea): Use uintptr_t to convert pointers to integers.
72247         * modules/malloca (Depends-on): Add stdint.
72248         * modules/relocatable-prog-wrapper (Depends-on): Likewise.
72250 2012-01-25  Paul Eggert  <eggert@cs.ucla.edu>
72252         obstack: remove __STDC__ conditionals
72253         * lib/obstack.h: Remove __STDC__ conditionals, as suggested by Joseph
72254         S. Myers in <http://cygwin.com/ml/libc-alpha/2012-01/msg00104.html>.
72255         This leaves lib/localcharset.c, m4/iconv.m4, and a confusing comment in
72256         m4/include_next.m4 as the only gnulib-maintained places that still
72257         refer to __STDC__.
72259 2012-01-24  Bruno Haible  <bruno@clisp.org>
72261         havelib: Modern quoting.
72262         * build-aux/config.rpath: Quote 'like this', not `like this', as per
72263         the recent change to the GNU coding standards.
72265 2012-01-24  Bruno Haible  <bruno@clisp.org>
72267         stdint: Improve support for Android.
72268         * lib/stdint.in.h: Test __ANDROID__, not __BIONIC__.
72269         Reported by Simon Josefsson <simon@josefsson.org>.
72271 2012-01-23  Paul Eggert  <eggert@cs.ucla.edu>
72273         doc: omit trailing empty lines from INSTALL etc.
72274         * doc/Makefile (INSTALL): Omit trailing empty lines.
72275         (INSTALL.ISO, INSTALL.UTF-8): Build from INSTALL, so that these also
72276         omit trailing empty lines.  This simplifies the build procedure.
72278 2012-01-23  Jim Meyering  <meyering@redhat.com>
72280         tests: avoid spurious warnings about gl_sockets_startup
72281         Fedora rawhide's gcc version 4.7.0 20120119 with -Wunused-value
72282         would warn about every use of "gl_sockets_startup (SOCKETS_1_1);"
72283         reporting a "statement with no effect".
72284         * tests/test-accept.c (main): Mark as "(void)".
72285         * tests/test-accept4.c (main): Likewise.
72286         * tests/test-bind.c (main): Likewise.
72287         * tests/test-connect.c (main): Likewise.
72288         * tests/test-getpeername.c (main): Likewise.
72289         * tests/test-getsockname.c (main): Likewise.
72290         * tests/test-getsockopt.c (main): Likewise.
72291         * tests/test-listen.c (main): Likewise.
72292         * tests/test-recv.c (main): Likewise.
72293         * tests/test-recvfrom.c (main): Likewise.
72294         * tests/test-send.c (main): Likewise.
72295         * tests/test-sendto.c (main): Likewise.
72296         * tests/test-setsockopt.c (main): Likewise.
72297         * tests/test-shutdown.c (main): Likewise.
72299 2012-01-21  Bruno Haible  <bruno@clisp.org>
72301         locale-fr.m4: Fix for Android.
72302         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Avoid compilation
72303         failure of the test program on Bionic libc.
72305 2012-01-21  Jim Meyering  <meyering@redhat.com>
72307         bootstrap: fail when bootstrap_post_import_hook fails
72308         Otherwise, it's far too easy to miss diagnostics emitted
72309         between gnulib-tool's output and that of running configure.
72310         * build-aux/bootstrap: Fail when bootstrap_post_import_hook fails.
72312 2012-01-17  Jim Meyering  <meyering@redhat.com>
72314         maint: enable sc_trailing_blank
72315         * build-aux/pmccabe.css: Remove trailing blanks.
72316         * doc/acl-cygwin.txt: Likewise.
72317         * doc/gnu-oids.texi: Likewise
72318         * cfg.mk: Enable sc_trailing_blank.
72319         Exempt build-aux/texinfo.tex and doc/Copyright/assign.future.manual.
72321 2012-01-17  Jim Meyering  <meyering@redhat.com>
72323         maint: enable sc_prohibit_openat_without_use
72324         * cfg.mk: Enable sc_prohibit_openat_without_use.
72325         Exempt lib/selinux-at.c.
72327 2012-01-17  Jim Meyering  <meyering@redhat.com>
72329         maint: enable sc_prohibit_cloexec_without_use
72330         * cfg.mk: Enable sc_prohibit_cloexec_without_use.
72331         * lib/dup-safer-flag.c: Don't include "cloexec.h".  Not needed.
72333 2012-01-17  Jim Meyering  <meyering@redhat.com>
72335         maint: enable sc_prohibit_intprops_without_use
72336         * cfg.mk: Enable sc_prohibit_intprops_without_use
72337         * tests/test-nanosleep.c: Don't include "intprops.h".  Not needed.
72339 2012-01-17  Jim Meyering  <meyering@redhat.com>
72341         maint: enable sc_prohibit_hash_pjw_without_use
72342         * cfg.mk: Enable sc_prohibit_hash_pjw_without_use.
72343         * top/maint.mk (sc_prohibit_hash_pjw_without_use): Adjust regexp
72344         to match any use of \<hash_pjw\>, i.e., not necessarily with a
72345         following " (".
72347 2012-01-17  Jim Meyering  <meyering@redhat.com>
72349         maint: enable double-word-prohibiting rule
72350         * cfg.mk (local-checks-to-skip): Enable sc_prohibit_doubled_word.
72351         Exempt three files.
72353 2012-01-17  Jim Meyering  <meyering@redhat.com>
72355         maint: remove empty lines at EOF, but excluding modules/*
72356         Apply syntax rules at home as well as abroad.  Most changes
72357         were induced by running this:
72358           make srcdir=. _build-aux=build-aux -f top/maint.mk \
72359             sc_prohibit_empty_lines_at_EOF | grep -v modules/ \
72360             | xargs perl -pi -0777 -e 's/\n\n+$/\n/'
72361         * cfg.mk (local-checks-to-skip): Enable sc_prohibit_empty_lines_at_EOF.
72362         Exempt modules/* and two binary files.
72363         Also exempt doc/INSTALL*, per request from Bruno Haible.
72364         * doc/regexprops-generic.texi: *Add* a newline at EOF.  There was none.
72365         * doc/Copyright/assign.translation.manual: Remove empty lines at EOF.
72366         * doc/Copyright/request-assign.future: Likewise.
72367         * doc/Copyright/request-disclaim.changes: Likewise.
72368         * doc/INSTALL: Likewise.
72369         * doc/INSTALL.ISO: Likewise.
72370         * doc/INSTALL.UTF-8: Likewise.
72371         * doc/acl-cygwin.txt: Likewise.
72372         * doc/acl-resources.txt: Likewise.
72373         * doc/fdl-1.2.texi: Likewise.
72374         * doc/fdl-1.3.texi: Likewise.
72375         * doc/fdl.texi: Likewise.
72376         * lib/argp-pin.c: Likewise.
72377         * lib/round.c: Likewise.
72378         * lib/unicase/u16-totitle.c: Likewise.
72379         * lib/unictype/block_test.c: Likewise.
72380         * lib/uninorm/canonical-decomposition.c: Likewise.
72381         * m4/README: Likewise.
72382         * m4/relocatable-lib.m4: Likewise.
72383         * tests/test-isnand-nolibm.c: Likewise.
72384         * tests/test-isnand.c: Likewise.
72385         * tests/uninorm/NormalizationTest.txt: Likewise.
72387 2012-01-17  Jim Meyering  <meyering@redhat.com>
72389         maint: add framework to run syntax-check rules against gnulib sources
72390         * cfg.mk: New file, to disable all currently-failing tests.
72391         We'll enable them one by one, as they are made to pass.
72392         * Makefile (sc_maint): New rule.
72394 2012-01-21  Bruno Haible  <bruno@clisp.org>
72396         stdint: Add support for Android.
72397         * lib/stdint.in.h: When included from Bionic <sys/types.h>, just
72398         include the system's <stdint.h>.
72399         Reported by Simon Josefsson <simon@josefsson.org>.
72401 2012-01-19  Jim Meyering  <meyering@redhat.com>
72403         bootstrap: add bootstrap_post_import_hook
72404         Bison does still need something like the gnulib_mk_hook whose
72405         invocation I had to remove along with slurp in commit 767ccd40.
72406         Technically, we could get along without it, but doing so would
72407         have required living with a warning and a mandatory post-bootstrap
72408         automake rerun.
72409         * build-aux/bootstrap (gnulib_mk_hook): Remove definition, too.
72410         (bootstrap_post_import_hook): New function.
72411         Invoke it after gnulib-tool --import and before autoreconf.
72413 2012-01-18  Jim Meyering  <meyering@redhat.com>
72415         gitlog-to-changelog: don't use "no_"-prefixed variable name
72416         * build-aux/gitlog-to-changelog (main): Use getopt's "!" attribute
72417         to enable both --cluster and --no-cluster.  Change variable name,
72418         s/\$no_cluster/$cluster/, and reverse usage to match.
72420         gitlog-to-changelog: use "||", not "or" in expressions
72421         * build-aux/gitlog-to-changelog (main): Use "||", not "or" in
72422         expressions.
72424 2012-01-17  Joel E. Denny  <joeldenny@joeldenny.org>
72426         gitlog-to-changelog: new option --no-cluster
72427         * build-aux/gitlog-to-changelog: New option --no-cluster, disables
72428         clustering of adjacent commit messages.
72430 2012-01-17  Jim Meyering  <meyering@redhat.com>
72432         maint: spell file systems with two words, not one
72433         * m4/ls-mntd-fs.m4 (MOUNTED_INTERIX_STATVFS): Spell file systems with
72434         two words, not one.
72436 2012-01-16  Jim Meyering  <meyering@redhat.com>
72438         bootstrap: add a FIXME comment to ensure we eventually remove the hack
72439         * build-aux/bootstrap (gnulib_tool_options): Add comment.
72441 2012-01-16  Eric Blake  <eblake@redhat.com>
72443         bootstrap: cater to autoconf 2.59
72444         * build-aux/bootstrap (AUTORECONF): Work even when --no-recursive
72445         is not available.
72447         bootstrap: properly check for libtool
72448         * build-aux/bootstrap (libtoolize): Also run libtool when older
72449         usage is detected.
72451 2012-01-15  Bruno Haible  <bruno@clisp.org>
72453         Improve support for MSVC 9.
72454         * lib/unistd.in.h: Include <io.h> when needed to avoid redefinition
72455         clashes on MSVC.
72456         * lib/fcntl.in.h: Likewise.
72457         * lib/stdlib.in.h: Likewise.
72458         * lib/sys_stat.in.h: Likewise.
72460 2011-01-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
72462         gnupload: we hold the master copy of this script now
72463         For motivation and more information, see:
72464         <http://lists.gnu.org/r/bug-gnulib/2012-01/msg00222.html>
72465         * build-aux/gnupload: Make it clear in the heading comments that the
72466         master copy of this file is maintained by gnulib.  Since we are at
72467         it, bump its copyright year and ...
72468         ($scriptversion): ... the date in its version.
72469         ($usage): Patches and bug reports should be sent to the gnulib list,
72470         not the automake one.
72471         * config/srclist.txt: Don't try to sync 'gnupload' from automake
72472         anymore.
72474 2012-01-15  Bruno Haible  <bruno@clisp.org>
72476         Fix module 'random'.
72477         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether random, srandom,
72478         initstate, setstate are declared.
72480 2012-01-14  Bruno Haible  <bruno@clisp.org>
72482         Tests for module 'random'.
72483         * modules/random-tests: New file.
72484         * tests/test-random.c: New file, based on tests/test-random_r.c.
72486         New module 'random'.
72487         * lib/stdlib.in.h (random, srandom, initstate, setstate): New
72488         declarations.
72489         * lib/random.c: New file, based on glibc/stdlib/random.c.
72490         * m4/random.m4: New file.
72491         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_RANDOM,
72492         HAVE_RANDOM.
72493         * modules/stdlib (Makefile.am): Substitute GNULIB_RANDOM, HAVE_RANDOM.
72494         * modules/random: New file.
72495         * config/srclist.txt: Add an entry for random.c.
72496         * doc/posix-functions/random.texi: Mention the 'random' module.
72497         * doc/posix-functions/initstate.texi: Likewise.
72498         * doc/posix-functions/setstate.texi: Likewise.
72499         * doc/posix-functions/srandom.texi: Likewise.
72501 2012-01-12  Bruno Haible  <bruno@clisp.org>
72503         random_r: Use common idioms.
72504         * lib/random_r.c: Include <stdlib.h> first.
72506         random_r: Override incompatible API on AIX, OSF/1.
72507         * lib/stdlib.in.h (random_r, srandom_r, initstate_r, setstate_r):
72508         Override the system function if REPLACE_RANDOM_R is 1.
72509         * m4/random_r.m4 (gl_FUNC_RANDOM_R): Require AC_CANONICAL_HOST. On AIX
72510         and OSF/1, set REPLACE_RANDOM_R.
72511         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_RANDOM_R.
72512         * modules/stdlib (Makefile.am): Substitute REPLACE_RANDOM_R.
72513         * modules/random_r (configure.ac): Test REPLACE_RANDOM_R.
72514         * doc/glibc-functions/initstate_r.texi: Mention the AIX, OSF/1 problem.
72515         * doc/glibc-functions/random_r.texi: Likewise.
72516         * doc/glibc-functions/setstate_r.texi: Likewise.
72518         random_r: Support for MSVC 9.
72519         * lib/random_r.c: Include stdint.h, not inttypes.h.
72521 2012-01-12  Eric Blake  <eblake@redhat.com>
72523         inet_ntop: guard extra work by IF_LINT
72524         * lib/inet_ntop.c (inet_ntop6): Mark spurious initialization, for
72525         better code generation when not checking for warnings.
72526         Suggested by Paul Eggert and Jim Meyering.
72528         strptime: fix regression on mingw
72529         * lib/strptime.c (__strptime_internal) [!_LIBC && !HAVE_TM_GMTOFF]:
72530         Fix regression.  Reported by Bruno Haible.
72532 2012-01-11  Reuben Thomas  <rrt@sc3d.org>
72533             Bruno Haible  <bruno@clisp.org>
72535         copy-file: add error-code-returning variant.
72536         * lib/copy-file.h (GL_COPY_ERR_*): New enumeration items.
72537         (qcopy_file_preserving): New declaration.
72538         * lib/copy-file.c (qcopy_file_preserving): Renamed from
72539         copy_file_preserving. Change return type to 'int'. Don't emit an error
72540         message here.
72541         (copy_file_preserving): New function.
72542         * tests/test-copy-file.c: Include <stdlib.h>.
72543         (main): Test qcopy_file_preserving if the environment variable
72544         NO_STDERR_OUTPUT is set.
72545         * tests/test-copy-file-1.sh: Invoke test-copy-file.sh a second time,
72546         with NO_STDERR_OUTPUT
72547         * tests/test-copy-file-2.sh: Likewise.
72549 2012-01-10  Bruno Haible  <bruno@clisp.org>
72551         copy-file: Use 'quote' module consistently.
72552         * lib/copy-file.c (copy_file_preserving): Use quote().
72554         copy-file: Refactor.
72555         * lib/copy-file.c: Include quote.h.
72556         (copy_file_preserving): Call qcopy_acl instead of copy_acl. Emit error
72557         message here.
72558         * modules/copy-file (Depends-on): Add quote.
72560         acl: Export qcopy_acl.
72561         * lib/acl.h (qcopy_acl): New declaration.
72562         * lib/copy-acl.c (qcopy_acl): Make non-static.
72564         acl: Rename a local variable.
72565         * lib/set-mode-acl.c (set_acl): Use same variable name as in copy_acl.
72567         acl: Align return values of copy_acl and qcopy_acl.
72568         * lib/copy-acl.c (copy_acl): Return the same value as qcopy_acl,
72569         maybe < -1.
72571 2012-01-11  Eric Blake  <eblake@redhat.com>
72573         strptime: silence gcc warnings
72574         * lib/strptime.c (__strptime_internal) [!_NL_CURRENT],
72575         [!_LIBC && !HAVE_TM_GMTOFF]: Avoid unused variables.
72576         Reported by Daniel P. Berrange.
72578         inet_ntop: silence gcc warning
72579         * lib/inet_ntop.c (inet_ntop6): Initialize best.base.
72580         Reported by Daniel P. Berrange.
72582 2012-01-11  Dmitry V. Levin  <ldv@altlinux.org>
72584         getloadavg test: skip the test on GNU/Linux without /proc mounted
72585         GNU libc implements getloadavg(3) on Linux by parsing /proc/loadavg
72586         file.  When /proc is not mounted, it always fails with ENOENT.
72587         * tests/test-getloadavg.c (main): Treat ENOENT return code from
72588         getloadavg(3) the same way as ENOSYS and ENOTSUP.
72590 2012-01-10  Bruno Haible  <bruno@clisp.org>
72592         regex: Avoid link error on MSVC 9.
72593         * modules/regex (Depends-on): Add wctype.
72595 2012-01-10  Bruno Haible  <bruno@clisp.org>
72597         doc: Mention --with-tests option.
72598         * gnulib-tool (func_usage): Suggest --with-tests for --test etc.
72599         * doc/gnulib.texi (Extra tests modules): Mention the need to pass
72600         --with-tests.
72601         Reported by Reuben Thomas.
72603 2012-01-10  Reuben Thomas  <rrt@sc3d.org>
72605         users.txt: order package names lexicographically.
72606         * users.txt: Order package names lexicographically.
72608 2012-01-10  Jim Meyering  <meyering@redhat.com>
72610         maint.mk: fix description in comment
72611         * top/maint.mk (require_exactly_one_NL_at_EOF_): Fix comment.
72613         ignore-value: remove deprecated ignore_ptr function
72614         * lib/ignore-value.h (ignore_ptr): Remove deprecated function.
72615         * NEWS: Note this.
72617 2012-01-09  Jim Meyering  <meyering@redhat.com>
72619         test-init.sh: avoid a subshell
72620         * tests/test-init.sh: Remove protective subshell.
72621         Suggested by Bernhard Voelker.  While a subshell is normally
72622         required to protect against older shells (Solaris, FreeBSD) that
72623         warn about a missing program before performing redirection, the
72624         shell-selection tests performed by init.sh probably exclude any
72625         offending shell.
72627 2012-01-08  Bruno Haible  <bruno@clisp.org>
72629         setlocale tests: Avoid test failure on Solaris 11.0.
72630         * tests/test-setlocale2.sh: Use 'env' to set the LC_ALL environment
72631         variable.
72633 2012-01-08  Bruno Haible  <bruno@clisp.org>
72635         posix_spawn_file_actions_addopen: Work around Solaris 11.0 bug.
72636         * m4/spawn_h.m4 (gl_SPAWN_H_DEFAULTS): Initialize
72637         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN.
72638         * m4/posix_spawn.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN): New
72639         macro.
72640         * lib/spawn.in.h (posix_spawn_file_actions_addopen): Test
72641         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN, not REPLACE_POSIX_SPAWN.
72642         * lib/spawn_faction_addopen.c: Add workaround implementation if
72643         HAVE_WORKING_POSIX_SPAWN.
72644         * modules/spawn (Makefile): Substitute
72645         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN.
72646         * modules/posix_spawn_file_actions_addopen (configure.ac): Invoke
72647         gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN. Test
72648         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN, not REPLACE_POSIX_SPAWN.
72649         (Depends-on): Update conditions.
72650         * doc/posix-functions/posix_spawn_file_actions_addopen.texi: Mention
72651         the Solaris 11 bug.
72653 2012-01-08  Bruno Haible  <bruno@clisp.org>
72655         posix_spawn_file_actions_adddup2: Work around Solaris 11.0 bug.
72656         * m4/spawn_h.m4 (gl_SPAWN_H_DEFAULTS): Initialize
72657         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2.
72658         * m4/posix_spawn.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2): New
72659         macro.
72660         * lib/spawn.in.h (posix_spawn_file_actions_adddup2): Test
72661         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2, not REPLACE_POSIX_SPAWN.
72662         * lib/spawn_faction_adddup2.c: Add workaround implementation if
72663         HAVE_WORKING_POSIX_SPAWN.
72664         * modules/spawn (Makefile): Substitute
72665         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2.
72666         * modules/posix_spawn_file_actions_adddup2 (configure.ac): Invoke
72667         gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2. Test
72668         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2, not REPLACE_POSIX_SPAWN.
72669         (Depends-on): Update conditions.
72670         * doc/posix-functions/posix_spawn_file_actions_adddup2.texi: Mention
72671         the Solaris 11 bug.
72673 2012-01-08  Bruno Haible  <bruno@clisp.org>
72675         posix_spawn_file_actions_addclose: Work around Solaris 11.0 bug.
72676         * m4/spawn_h.m4 (gl_SPAWN_H_DEFAULTS): Initialize
72677         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE.
72678         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): Define
72679         HAVE_WORKING_POSIX_SPAWN.
72680         (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE): New macro.
72681         * lib/spawn.in.h (posix_spawn_file_actions_addclose): Test
72682         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE, not REPLACE_POSIX_SPAWN.
72683         * lib/spawn_faction_addclose.c: Add workaround implementation if
72684         HAVE_WORKING_POSIX_SPAWN.
72685         * modules/spawn (Makefile): Substitute
72686         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE.
72687         * modules/posix_spawn_file_actions_addclose (configure.ac): Invoke
72688         gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE. Test
72689         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE, not REPLACE_POSIX_SPAWN.
72690         (Depends-on): Update conditions.
72691         * doc/posix-functions/posix_spawn_file_actions_addclose.texi: Mention
72692         the Solaris 11 bug.
72694 2012-01-08  Bruno Haible  <bruno@clisp.org>
72696         doc: Update for Solaris 11.0.
72697         * doc/*/*.texi: Mention Solaris 11.0 where appropriate.
72698         * m4/printf.m4: Update comments.
72700 2012-01-08  Bruno Haible  <bruno@clisp.org>
72702         mktime: Avoid compilation error on Solaris 11.
72703         * lib/mktime.c (WRAPV): Define to 0 on all non-glibc systems.
72705 2012-01-08  Bruno Haible  <bruno@clisp.org>
72707         doc: Small fix.
72708         * doc/posix-headers/nl_types.texi: Correct platforms list.
72710 2012-01-08  Simon Josefsson  <simon@josefsson.org>
72712         Add lgpl-3.0 module.
72713         * MODULES.html.sh (Support for building documentation): Add
72714         lgpl-3.0.
72715         * modules/lgpl-3.0: New file.
72717 2012-01-08  Jim Meyering  <meyering@redhat.com>
72719         select.c: indent with spaces, not TABs
72720         * lib/select.c (windows_poll_handle): Indent with spaces, not TABs.
72722 2012-01-07  Paolo Bonzini  <bonzini@gnu.org>
72724         quotearg: do not use grave accent for left quote
72725         * lib/quotearg.c (gettext_quote): Map "`" to "'" for
72726         locale_quoting_style.
72727         (quotearg_buffer_restyled): Fix example.
72728         * tests/test-quotearg-simple.c (results_g): Adjust test vectors.
72730 2012-01-07  Paolo Bonzini  <bonzini@gnu.org>
72732         quotearg: fall back to Unicode single quotes in UTF-8, GB-18030 locales
72733         Most programs do not have translation catalogs for English and much
72734         less separate catalogs for British and American English.  Drop the
72735         suggestion to translators about these two, and provide it
72736         automatically for Unicode locales.  Like most programs, even those
72737         using American English, we use single quotation marks.  This conflicts
72738         with the American typographic convention, but works better when you
72739         cite the entire error message within double quotes.  It also tries not
72740         to clash with established practice and with what non-gnulib programs
72741         will usually do.
72742         * lib/quotearg.c (gettext_quote): Hard-code U+2018 and U+2019 when
72743         using an UTF-8 or GB-18030 locale.  The list of other locales with
72744         quotes was provided by Bruno Haible.
72745         (quotearg_buffer_restyled): Adjust instructions to translators.
72746         * lib/quotearg.h (locale_quoting_style): Do not put an example in the
72747         text, since this would be wrong when using Unicode.
72748         * modules/quotearg: Depend on c-strcaseeq.
72750 2012-01-07  Paolo Bonzini  <bonzini@gnu.org>
72752         quotearg: fix Wikipedia link
72753         * lib/quotearg.c (quotearg_buffer_restyled): Fix link to Wikipedia.
72755 2012-01-07  Simon Josefsson  <simon@josefsson.org>
72757         Fix for mingw with MSVC9.
72758         * m4/ld-version-script.m4: Check that compiler rejects version
72759         scripts with syntax errors.  Reported by Bruno Haible
72760         <bruno@clisp.org>.
72762 2012-01-06  Bruno Haible  <bruno@clisp.org>
72764         Talk about "native Windows API", not "Woe32".
72765         * lib/accept4.c: Update comments to mention native Windows.
72766         * lib/execute.c: Likewise.
72767         * lib/fatal-signal.c: Likewise.
72768         * lib/localcharset.c: Likewise.
72769         * lib/nanosleep.c: Likewise.
72770         * lib/nl_langinfo.c: Likewise.
72771         * lib/pclose.c: Likewise.
72772         * lib/pipe-filter-gi.c: Likewise.
72773         * lib/pipe-filter-ii.c: Likewise.
72774         * lib/pipe.c: Likewise.
72775         * lib/pipe2.c: Likewise.
72776         * lib/popen.c: Likewise.
72777         * lib/progreloc.c: Likewise.
72778         * lib/relocatable.c: Likewise.
72779         * lib/sigaction.c: Likewise.
72780         * lib/sigprocmask.c: Likewise.
72781         * lib/spawn-pipe.h: Likewise.
72782         * lib/spawn-pipe.c: Likewise.
72783         * lib/spawni.c: Likewise.
72784         * lib/stat-time.h: Likewise.
72785         * lib/w32spawn.h: Likewise.
72786         * tests/test-isatty.c: Likewise.
72787         * lib/config.charset: More comments.
72788         * doc/gnulib-intro.texi: Mention native Windows.
72789         * doc/posix-functions/_Exit_C99.texi: Likewise.
72790         * doc/posix-headers/fcntl.texi: Likewise.
72792 2012-01-06  Guillem Jover  <guillem@hadrons.org>  (tiny change)
72794         argp: Avoid crash if translator uses % characters in a translation.
72795         * lib/argp-parse.c (argp_version_parser): Use a "%s" format string.
72796         Reported by Mats Erik Andersson <gnu@gisladisker.se>.
72798 2012-01-06  Paul Eggert  <eggert@cs.ucla.edu>
72800         doc: C11 and C++11 are now official
72801         * doc/posix-headers/assert.texi, doc/posix-headers/stdalign.texi:
72802         * doc/verify.texi, stdalign.in.h, verify.h, m4/gnulib-common.m4:
72803         * m4/stdalign.m4, modules/assert-h, modules/snippet/_Noreturn:
72804         * modules/stdalign:
72805         Replace references to draft C1X to C11, and to draft C++0X to C++11.
72807 2012-01-06  Bruno Haible  <bruno@clisp.org>
72809         uc-is-grapheme-break tests: Tweak.
72810         * tests/unigbrk/test-uc-is-grapheme-break.c (main): Fix an error
72811         message.
72813 2012-01-06  Bruno Haible  <bruno@clisp.org>
72815         test-init.sh: correct the test for diff -u
72816         * tests/test-init.sh: Also redirect stdout to /dev/null.
72818 2012-01-05  Paul Eggert  <eggert@cs.ucla.edu>
72820         Use ', not `, for quoting output.
72821         * build-aux/announce-gen (usage, sizes, print_news_deltas)
72822         (print_changelog_deltas, get_tool_versions, main program):
72823         * build-aux/git-version-gen:
72824         * build-aux/gitlog-to-changelog (usage, parse_amend_file):
72825         * build-aux/move-if-change (help):
72826         * build-aux/useless-if-before-free (usage, main program):
72827         * check-module (parse_module_file, usage)
72828         (find_included_lib_files, check_module):
72829         * lib/argmatch.c (main) [TEST]:
72830         * lib/argp-help.c (_help):
72831         * lib/getopt1.c (main) [TEST]:
72832         * lib/git-merge-changelog.c (usage):
72833         * lib/xstrtol-error.c (xstrtol_error):
72834         * m4/alloca.m4 (_AC_LIBOBJ_ALLOCA):
72835         * m4/argz.m4 (gl_FUNC_ARGZ):
72836         * m4/bison.m4 (gl_BISON):
72837         * m4/calloc.m4 (gl_FUNC_CALLOC_GNU):
72838         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS):
72839         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
72840         * m4/fpending.m4 (gl_PREREQ_FPENDING):
72841         * m4/gc-random.m4 (gl_GC_RANDOM):
72842         * m4/intl.m4 (gt_CHECK_DECL):
72843         * m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK):
72844         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT)
72845         (AC_TYPE_UNSIGNED_LONG_LONG_INT):
72846         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS):
72847         * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK):
72848         * m4/onceonly.m4 (AC_CHECK_FUNCS_ONCE):
72849         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION):
72850         * tests/test-dirname.c (main):
72851         * tests/test-getpass.c (main):
72852         * tests/test-iconvme.c (main):
72853         * tests/test-parse-datetime.c (LOG):
72854         * tests/test-xstrtoimax.sh:
72855         * tests/test-xstrtol.sh:
72856         * tests/test-xstrtoll.sh:
72857         * tests/test-xstrtoumax.sh:
72858         * tests/unigbrk/test-uc-is-grapheme-break.c (main):
72859         * top/GNUmakefile (abort-due-to-no-makefile):
72860         Quote 'like this', not `like this', as per the recent change to
72861         the GNU coding standards.
72863 2012-01-05  Bruno Haible  <bruno@clisp.org>
72865         strtoimax: Don't force a replacement on systems where intmax_t is int.
72866         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Use a different test if
72867         'intmax_t' is not larger than 'int'.
72868         Reported by Pádraig Brady <P@draigBrady.com>.
72870 2012-01-05  Bruno Haible  <bruno@clisp.org>
72872         doc: Mention NetBSD bugs.
72873         * doc/posix-functions/*printf.texi: Mention a NetBSD 5.1 bug.
72874         * doc/posix-functions/nl_langinfo.texi: Mention another NetBSD 5.1 bug.
72876 2012-01-05  Bruno Haible  <bruno@clisp.org>
72878         strtoumax tests: Enhance tests.
72879         * tests/test-strtoumax.c (main): Add tests for large values.
72881 2012-01-05  Bruno Haible  <bruno@clisp.org>
72883         strtoimax: Work around AIX 5.1 bug.
72884         * lib/inttypes.in.h (strtoimax): Allow overriding the system's
72885         definition.
72886         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Check against the AIX 5.1 bug.
72887         Set HAVE_STRTOIMAX.
72888         * m4/inttypes.m4 (gl_INTTYPES_H_DEFAULTS): Initialize
72889         REPLACE_STRTOIMAX.
72890         * modules/inttypes-incomplete (Makefile.am): Substitute
72891         REPLACE_STRTOIMAX.
72892         * modules/strtoimax (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
72893         (configure.ac): Test HAVE_STRTOIMAX, REPLACE_STRTOIMAX.
72894         (Depends-on): Update conditions.
72895         * tests/test-strtoimax.c (main): Add tests for large values.
72896         * doc/posix-functions/strtoimax.texi: Mention the AIX 5.1 bug.
72898 2012-01-05  Bruno Haible  <bruno@clisp.org>
72900         inttypes: Modernize.
72901         * lib/inttypes.in.h (strtoimax, strtoumax): Use the C++ safe idioms.
72902         * modules/inttypes-incomplete (Depends-on): Add snippet/c++defs.
72903         (Makefile.am): Update inttypes.h rule.
72905 2012-01-05  Jim Meyering  <meyering@redhat.com>
72907         init.sh: don't waste a subshell just to redirect stderr
72908         * tests/init.sh: In testing for diff -u and diff -c, use a
72909         stderr-redirecting exec inside `...` rather than a subshell.
72911         test-init.sh: avoid failure on HP-UX 11.00
72912         * tests/test-init.sh: Skip "diff -u"-comparing step when compare
72913         resolves to diff -c or cmp.  Reported by Bruno Haible.
72915 2012-01-05  Bruno Haible  <bruno@clisp.org>
72917         Tests for module 'strtoull'.
72918         * modules/strtoull-tests: New file.
72919         * tests/test-strtoull.c: New file, based on tests/test-strtoumax.c.
72921 2012-01-05  Bruno Haible  <bruno@clisp.org>
72923         Tests for module 'strtoll'.
72924         * modules/strtoll-tests: New file.
72925         * tests/test-strtoll.c: New file, based on tests/test-strtoimax.c.
72927 2012-01-05  Bruno Haible  <bruno@clisp.org>
72929         Tests for module 'strtoul'.
72930         * modules/strtoul-tests: New file.
72931         * tests/test-strtoul.c: New file, based on tests/test-strtoumax.c.
72933 2012-01-05  Bruno Haible  <bruno@clisp.org>
72935         Tests for module 'strtol'.
72936         * modules/strtol-tests: New file.
72937         * tests/test-strtol.c: New file, based on tests/test-strtoimax.c.
72939 2012-01-04  Jim Meyering  <meyering@redhat.com>
72941         test-init.sh: accommodate Solaris 5.10's different diff -u output
72942         * tests/test-init.sh: Also exempt @@ lines from the comparison
72943         of diff output, since Solaris 5.10 and GNU diff formats differ.
72944         Reported by Stefano Lattarini.
72946 2012-01-04  Paul Eggert  <eggert@cs.ucla.edu>
72948         test-posixtm: don't assume signed integer wraparound
72949         * tests/test-posixtm.c (main): Don't assume wraparound semantics
72950         after signed integer overflow.  Inspired by (though it may not
72951         fix) Bruno Haible's bug report in
72952         <http://lists.gnu.org/r/bug-gnulib/2012-01/msg00066.html>.
72954         Spell out "Windows 9x" and "Windows XP".
72955         * lib/poll.c, lib/select.c: In comments, replace "Win9x" with
72956         "Windows 9x" and "WinXP" with "Windows XP".
72958 2012-01-04  Jim Meyering  <meyering@redhat.com>
72960         test-vc-list-files-cvs.sh: remove obsolete comment
72961         * tests/test-vc-list-files-cvs.sh: Remove obsolete comment about
72962         double exit.  Now that's all encapsulated via skip_ and Exit.
72964 2012-01-04  Bruno Haible  <bruno@clisp.org>
72966         Talk about "native Windows API", not "Win32".
72967         * lib/classpath.c: Update comments to mention native Windows.
72968         * lib/csharpexec.c: Likewise.
72969         * lib/dup2.c: Likewise.
72970         * lib/error.c: Likewise.
72971         * lib/fcntl.c: Likewise.
72972         * lib/filename.h: Likewise.
72973         * lib/findprog.c: Likewise.
72974         * lib/get-rusage-as.c: Likewise.
72975         * lib/get-rusage-data.c: Likewise.
72976         * lib/getpagesize.c: Likewise.
72977         * lib/javaexec.c: Likewise.
72978         * lib/msvc-inval.c: Likewise.
72979         * lib/msvc-nothrow.c: Likewise.
72980         * lib/nanosleep.c: Likewise.
72981         * lib/nonblocking.c: Likewise.
72982         * lib/printf-parse.c: Likewise.
72983         * lib/setlocale.c: Likewise.
72984         * lib/sigaction.c: Likewise.
72985         * lib/strerror_r.c: Likewise.
72986         * lib/tmpdir.c: Likewise.
72987         * lib/vasnprintf.c: Likewise.
72988         * lib/w32spawn.h: Likewise.
72989         * lib/waitpid.c: Likewise.
72990         * lib/stdio.in.h (fdopen, fopen, freopen): Likewise.
72991         * m4/locale-ar.m4: Likewise.
72992         * m4/locale-fr.m4: Likewise.
72993         * m4/locale-ja.m4: Likewise.
72994         * m4/locale-tr.m4: Likewise.
72995         * m4/locale-zh.m4: Likewise.
72996         * m4/printf.m4: Likewise.
72997         * tests/test-cloexec.c: Likewise.
72998         * tests/test-copy-acl.sh: Likewise.
72999         * tests/test-copy-file.sh: Likewise.
73000         * tests/test-file-has-acl.sh: Likewise.
73001         * tests/test-set-mode-acl.sh: Likewise.
73002         * tests/test-dup-safer.c: Likewise.
73003         * tests/test-dup2.c: Likewise.
73004         * tests/test-dup3.c: Likewise.
73005         * tests/test-fcntl.c: Likewise.
73006         * tests/test-nonblocking-pipe.h: Likewise.
73007         * tests/test-nonblocking-socket.h: Likewise.
73008         * tests/test-pipe.c: Likewise.
73009         * tests/test-pipe2.c: Likewise.
73010         * tests/test-spawn-pipe-child.c: Likewise.
73011         * doc/acl-resources.txt: Likewise.
73012         * lib/getaddrinfo.c (WINDOWS_NATIVE): Renamed from WIN32_NATIVE.
73013         * tests/test-poll.c (WINDOWS_NATIVE): Likewise.
73014         * tests/test-select.h (WINDOWS_NATIVE): Likewise.
73015         * lib/localcharset.c: Update comments to mention native Windows.
73016         (WINDOWS_NATIVE): Renamed from WIN32_NATIVE.
73017         * lib/localename.c: Likewise.
73018         * lib/progreloc.c: Likewise.
73019         * lib/relocatable.c: Likewise.
73020         * lib/poll.c (WINDOWS_NATIVE): Renamed from WIN32_NATIVE.
73021         (windows_compute_revents): Renamed from win32_compute_revents.
73022         (windows_compute_revents_socket): Renamed from
73023         win32_compute_revents_socket.
73024         * lib/select.c: Update comments to mention native Windows.
73025         (windows_poll_handle): Renamed from win32_poll_handle.
73026         * m4/threadlib.m4: Update comments to mention native Windows.
73027         (gl_THREADLIB_EARLY_BODY, gl_THREADLIB_BODY): Expect
73028         --enable-threads=windows instead of --enable-threads=win32. Set
73029         USE_WINDOWS_THREADS, not USE_WIN32_THREADS.
73030         * lib/glthread/lock.h: Update comments to mention native Windows.
73031         (USE_WINDOWS_THREADS): Renamed from USE_WIN32_THREADS.
73032         * lib/glthread/lock.c (USE_WINDOWS_THREADS): Renamed from
73033         USE_WIN32_THREADS.
73034         * lib/glthread/cond.h (USE_WINDOWS_THREADS): Likewise.
73035         * lib/glthread/cond.c (USE_WINDOWS_THREADS): Likewise.
73036         * lib/glthread/thread.h (USE_WINDOWS_THREADS): Likewise.
73037         * lib/glthread/thread.c (USE_WINDOWS_THREADS): Likewise.
73038         * lib/glthread/tls.h (USE_WINDOWS_THREADS): Likewise.
73039         * lib/glthread/tls.c (USE_WINDOWS_THREADS): Likewise.
73040         * lib/glthread/yield.h (USE_WINDOWS_THREADS): Likewise.
73041         * tests/test-cond.c (USE_WINDOWS_THREADS): Likewise.
73042         * tests/test-thread_create.c (USE_WINDOWS_THREADS): Likewise.
73043         * tests/test-lock.c (USE_WINDOWS_THREADS): Likewise.
73044         (TEST_WINDOWS_THREADS): Renamed from TEST_WIN32_THREADS.
73045         * tests/test-tls.c: Likewise.
73046         Rationale:
73047         Microsoft renamed the "Win32 API" to "Windows API", as it is available
73048         on both 32-bit and 64-bit Windows systems.
73049         But in gnulib, we treat Cygwin like a Unix platform, therefore the main
73050         line of distinction is between "native Windows" on one side and Unix/
73051         POSIX systems on the other side. More details in
73052         <https://lists.gnu.org/r/bug-gnulib/2012-01/msg00027.html>.
73053         Suggested by Paul Eggert.
73055 2012-01-03  Bruno Haible  <bruno@clisp.org>
73057         isatty: Support for MSVC 9.
73058         * doc/posix-functions/isatty.texi: Mention the MSVC problem.
73059         * lib/isatty.c: Include <errno.h>, msvc-inval.h.
73060         (_isatty_nothrow): New function.
73061         (isatty): Use it instead of _isatty.
73062         (IsConsoleHandle): Add comment, from Paolo Bonzini.
73063         * lib/poll.c (IsConsoleHandle): Likewise.
73064         * lib/select.c (IsConsoleHandle): Likewise.
73065         * m4/isatty.m4 (gl_FUNC_ISATTY): Fix comment. Reported by Eli Zaretskii.
73066         (gl_PREREQ_ISATTY): New macro.
73067         * modules/isatty (Depends-on): Add msvc-inval.
73068         (configure.ac): Invoke gl_PREREQ_ISATTY.
73070 2012-01-03  Jim Meyering  <meyering@redhat.com>
73072         maint.mk: remove temporary transition aid from over 1.5 years ago
73073         * top/maint.mk (_prohibit_regexp): Remove definition whose sole
73074         purpose was to aid in the transition (avoiding silent malfunction)
73075         from that old name to the new _sc_search_regexp.  This shim was
73076         added by commit 219c504b.
73078         init.sh: do not try to accommodate compare arguments starting with "-"
73079         * tests/init.sh (compare_dev_null_): Do not try to accommodate
73080         compare arguments that start with "-".  Besides, we do not worry
73081         about this when invoking diff or cmp; why start now with sed?
73082         Using "--" to separate options from argument would trigger sed
73083         failure in at least Solaris 7, HP-UX 11.00, IRIX 6.5, FreeBSD 6.4,
73084         OpenBSD 4.9 and NetBSD 5.1.  Reported by Bruno Haible.
73086 2012-01-02  Bruno Haible  <bruno@clisp.org>
73088         Enhance tests for module 'isatty'.
73089         * modules/isatty-tests (Depends-on): Add pipe-posix.
73090         * tests/test-isatty.c: Include <fcntl.h>.
73091         (DEV_NULL): New macro.
73092         (main): Test the resut of isatty() also on regular files, pipes, and
73093         /dev/null.
73095         New module 'isatty'.
73096         * lib/unistd.in.h (isatty): New declaration.
73097         * lib/isatty.c: New file, based on an idea of
73098         Bastien Roucariès <roucaries.bastien@gmail.com>.
73099         * m4/isatty.m4: New file.
73100         * m4/unistd_h.m4 (gl_UNISTD_H): Test whether isatty is declared.
73101         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_ISATTY, REPLACE_ISATTY.
73102         * modules/unistd (Makefile.am): Substitute GNULIB_ISATTY,
73103         REPLACE_ISATTY.
73104         * modules/isatty: New file.
73105         * doc/posix-functions/isatty.texi: Mention the new module.
73106         Suggested by Paolo Bonzini.
73108 2012-01-02  Bruno Haible  <bruno@clisp.org>
73110         canonicalize: Tweak 2011-12-29 commit.
73111         * lib/canonicalize.c (canonicalize_filename_mode): Fix typo in comment.
73112         * lib/canonicalize.h (canonicalize_filename_mode): Update specification.
73114 2012-01-02  Jim Meyering  <meyering@redhat.com>
73116         gitlog-to-changelog: describe input syntax in --help output
73117         * build-aux/gitlog-to-changelog (usage) [SPECIAL SYNTAX]: New section.
73119         gitlog-to-changelog: fix typo in --help: show backslash before email @
73120         * build-aux/gitlog-to-changelog (usage): An "@" was backslash-escaped
73121         in sources, but not in actual output.
73123 2011-12-30  Jim Meyering  <meyering@redhat.com>
73125         gitlog-to-changelog: don't malfunction when name contains %-directive
73126         * build-aux/gitlog-to-changelog (main): Don't let a %-directive
73127         in a name string cause trouble.  E.g., with a user name of "%s",
73128         gitlog-to-changelog would fail with "Missing argument in sprintf at..."
73130 2011-12-30  Gary V. Vaughan  <gary@gnu.org>
73132         gitlog-to-changelog: Copyright-paperwork-exempt: yes == (tiny change)
73133         * build-aux/gitlog-to-changelog (main): Map the string, at beginning
73134         of line in a git commit log, "Copyright-paperwork-exempt: yes", to
73135         the "  (tiny change)" notation that is appended to the standard
73136         ChangeLog "date  name  email" header line.
73138 2012-01-01  Jim Meyering  <meyering@redhat.com>
73140         test-framework-sh: init.sh: fix "make dist" failure
73141         When using gnulib-tool's --with-tests option and any module that
73142         depends on test-framework-sh, "make dist" would fail due to the
73143         lack of init.sh *in lib/*.  The EXTRA_DIST += init.sh is required
73144         in the gltests directory, and not in the gllib/ directory.
73145         One way to work around that is to move the EXTRA_DIST += init.sh
73146         from the primary module to the -tests one:
73147         * modules/test-framework-sh-tests (EXTRA_DIST): Add init.sh here, ...
73148         * modules/test-framework-sh (Makefile.am): ...not here.
73149         Reported by Tom G. Christensen in
73150         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/29519
73152         version-etc: update copyright year reported by --version
73153         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2012.
73155 2011-12-31  Pádraig Brady  <P@draigBrady.com>
73157         canonicalize: only stat() if required
73158         * lib/canonicalize.c (canonicalize_filename_mode):
73159         Avoid calling l?stat() when both CAN_MISSING,
73160         and CAN_NOLINKS are set, as we neither need
73161         to resolve symlinks or test component existence.
73163 2011-12-31  Paul Eggert  <eggert@cs.ucla.edu>
73165         doc: cover st_ino issues once; add OpenVMS etc.
73166         * doc/posix-functions/stat.texi (stat):
73167         * doc/posix-functions/lstat.texi (lstat):
73168         * doc/posix-functions/fstatat.texi (fstatat):
73169         * doc/posix-functions/fstat.texi (fstat):
73170         Move general 'struct stat' stuff to sys_stat.texi,
73171         leaving behind a pointer.
73172         * doc/posix-headers/sys_stat.texi (sys/stat.h):
73173         Merge duplicate info about 'struct stat' problems into here.
73174         Mention issues with OpenVMS, GNU/Linux NFS, NetApp, ClearCase,
73175         and suggest partial workarounds.
73177         same-inode: port to OpenVMS
73178         * lib/same-inode.h (SAME_INODE): Port to OpenVMS by checking all
73179         three st_ino values.
73181 2011-12-30  Pádraig Brady  <P@draigBrady.com>
73183         canonicalize: fix references to stat() and lstat()
73184         * lib/canonicalize.c (canonicalize_filename_mode):
73185         Ensure references always resolve to a replacement
73186         function if required (even via a macro).
73188 2011-12-30  Jim Meyering  <meyering@redhat.com>
73190         gitlog-to-changelog: remove a little duplication
73191         * build-aux/gitlog-to-changelog (main): Grep @lines once,
73192         rather than twice.
73194 2011-12-29  Pádraig Brady  <P@draigBrady.com>
73196         canonicalize: add support for not resolving symlinks
73197         * lib/canonicalize.h: Add the CAN_NOLINKS flag to
73198         indicate we don't want to follow symlinks.  Also
73199         provide CAN_MODE_MASK to aid setting these existing
73200         mutually exclusive values.
73201         * lib/canonicalize.c (canonicalize_filename_mode):
73202         Extract the flags from can_mode parameter, which
73203         are currently just used to select between stat()
73204         and lstat().  Also ensure that mutually exclusive
73205         values are flagged immediately as invalid.
73206         * tests/test-canonicalize.c: Verify symlinks are
73207         not followed, and that invalid flag combinations
73208         are diagnosed.
73210 2011-12-25  Jim Meyering  <meyering@redhat.com>
73212         gitlog-to-changelog: do not clump multi-paragraph entries
73213         Identical header lines (date,name,email+coauthors) are suppressed,
73214         thus putting all entries with those same characteristics under
73215         a single header.  However, when a log entry consists of two or
73216         more paragraphs, it may not be clear where it starts and ends.
73217         This change makes it so that such an entry is always separated
73218         from others by a header line, even when that header would
73219         otherwise be suppressed.
73220         * build-aux/gitlog-to-changelog: Implement the above.
73221         Inspired by a related request from Stefano Lattarini in
73222         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/29456
73224 2011-12-25  Paul Eggert  <eggert@cs.ucla.edu>
73226         announce-gen: fix `cmd' typo in diagnostic
73227         * build-aux/announce-gen (print_changelog_deltas): Fix typo in
73228         diagnostic: a missing '$' meant that the command was not output.
73230 2011-12-23  Jim Meyering  <meyering@redhat.com>
73232         test-framework-sh: distribute init.sh
73233         * modules/test-framework-sh (EXTRA_DIST): Append init.sh.
73234         Otherwise, "make -C gnulib-tests check" (at least in grep) would
73235         fail due to the lack of init.sh.
73237         maint: remove explicit Files: tests/init.sh; depend on test-framework-sh
73238         * modules/atexit-tests: Rather than listing tests/init.sh,
73239         now that there's a module for it, simply depend on that new module.
73240         * modules/closein-tests: Likewise.
73241         * modules/exclude-tests: Likewise.
73242         * modules/getcwd-tests: Likewise.
73243         * modules/perror-tests: Likewise.
73244         * modules/pread-tests: Likewise.
73245         * modules/pwrite-tests: Likewise.
73246         * modules/vc-list-files-tests: Likewise.
73247         * modules/verify-tests: Likewise.
73248         * modules/xalloc-die-tests: Likewise.
73249         * modules/xstrtoimax-tests: Likewise.
73250         * modules/xstrtol-tests: Likewise.
73251         * modules/xstrtoll-tests: Likewise.
73252         * modules/xstrtoumax-tests: Likewise.
73253         * modules/yesno-tests: Likewise.
73255 2011-12-22  Jim Meyering  <meyering@redhat.com>
73257         test-framework-sh: add minimal tests of init.sh's compare function
73258         * modules/test-framework-sh-tests: New file.
73259         * tests/test-init.sh: New file.
73261         test-framework-sh: new module
73262         * modules/test-framework-sh: New file.
73263         * MODULES.html.sh (Support for maintaining and releasing projects):
73264         List it.
73266         init.sh: do not emit simulated diff output to stderr
73267         * tests/init.sh (compare_dev_null_): Print to stdout, not stderr.
73269 2011-12-22  Reuben Thomas  <rrt@sc3d.org>
73271         .gitignore: ignore gnulib.dvi and regex.info
73272         * doc/.gitignore:add gnulib.dvi and regex.info
73274 2011-12-22  Jim Meyering  <meyering@redhat.com>
73276         init.sh: correct previous change
73277         * tests/init.sh (compare): My previous change was wrong.
73278         Don't clobber "$?".  Spotted by Stefano Lattarini and Pádraig Brady.
73280         init.sh: avoid unwarranted test failure when using "set -e"
73281         * tests/init.sh (compare): Ignore nonzero exit from compare_dev_null_.
73282         Otherwise, in a test script that uses "set -e" (like many in vc-dwim)
73283         a use like "compare exp out" would get evoke an unconditional failure.
73285 2011-12-21  Alfred M. Szmidt  <ams@gnu.org>
73287         bootstrap: fix it to honor $ACLOCAL_FLAGS once again
73288         The 2011-12-17 change, commit 767ccd40, replaced a manual invocation
73289         of aclocal that used explicit $ACLOCAL_FLAGS with an invocation of
73290         autoreconf that did not.
73291         * build-aux/bootstrap: Use $ACLOCAL_FLAGS when invoking autoreconf.
73292         Reported by Mats Erik Andersson <gnu@gisladisker.se>.
73294 2011-12-17  Jim Meyering  <meyering@redhat.com>
73296         bootstrap: remove some now-unneeded code
73297         This script arose back when gnulib-tool was young.
73298         Since then, it has seen improvements that render much of this
73299         script unnecessary.  In particular, it can now make symlinks
73300         to the files it uses.  Also, I no longer see as much value in
73301         marking files as read-only via comments.
73302         If you relied on the symlink-creation feature of the preceding
73303         version of this script, you can get most of that functionality
73304         by adding the --symlink option to the definition of
73305         gnulib_tool_option_extras in your bootstrap.conf file.
73306         * build-aux/bootstrap (AUTOPOINT, AUTORECONF): Factor out definitions.
73307         Run autopoint and libtoolize *before* gnulib-tool.
73308         After it, run an abbreviated autoreconf, rather than a loop around
73309         all tools.
73310         (slirp, bt_mark_as_generated): Remove functions.
73312 2011-12-18  Paul Eggert  <eggert@cs.ucla.edu>
73314         ftoastr: fix typo
73315         * lib/ftoastr.h: Fix misspelling in comment.
73317 2011-12-18  Reuben Thomas  <rrt@sc3d.org>
73319         * top/README-release: fix punctuation.
73321 2011-12-17  Jim Meyering  <meyering@redhat.com>
73323         bootstrap: correct the recent buildreq change
73324         The 2011-12-07 commit, 39f5f1e4, omitted some '*'s, and thus
73325         had no effect.
73326         * build-aux/bootstrap (buildreq): Bracket each search term with
73327         "*...*", so that the shell "case" statement works as intended.
73328         Add comments.
73330 2011-12-17  Bernhard Voelker  <mail@bernhard-voelker.de>
73332         build: let bootstrap resort to wget when downloading .po files
73333         * build-aux/bootstrap (download_po_files): Fallback to wget when
73334         downloading the .po files via rsync fails.  This is necessary to
73335         bootstrap from behind a strict firewall.
73337 2011-12-15  Paul Eggert  <eggert@cs.ucla.edu>
73339         stdint: don't assume C++11 when compiling with g++
73340         Problem reported for glibc 2.14 and g++ by Alexander V. Lukyanov in
73341         <http://lists.gnu.org/r/bug-gnulib/2011-12/msg00099.html>.
73342         * m4/stdint.m4 (gl_STDINT_H): Don't go to extra work to make it
73343         work also in C++ before C++11, as that improperly inhibits
73344         generating a substitute stdint.h for that case.
73346 2011-12-15  Paul Eggert  <eggert@cs.ucla.edu>
73348         alloca: protect comment from gnulib-tool
73349         * lib/alloca.c: Change "GCC version 2" to "GCC 2" in comment, so
73350         that gnulib-tool doesn't think it's a license, and munge it to
73351         say "GCC version 3".
73353 2011-12-15  Ludovic Courtès  <ludo@gnu.org>  (tiny change)
73355         localcharset: Use an absolute path in TESTS_ENVIRONMENT.
73356         * modules/localcharset (LOCALCHARSET_TESTS_ENVIRONMENT): Use
73357         $(abs_top_builddir) instead of $(top_builddir).
73359 2011-12-14  Alex Nelson  <ajnelson@cs.ucsc.edu>  (tiny change)
73361         strftime-tests: also test nanoseconds
73362         * tests/test-strftime.c (T): Add a test of %N.
73364 2011-12-13  Paul Eggert  <eggert@cs.ucla.edu>
73366         inttypes, stdint: add C++11 support
73367         C++11 says there's no need to define __STDC_CONSTANT_MACROS etc.
73368         when including inttypes.h and stdint.h.  Support this change to
73369         the standard.
73370         * doc/posix-headers/inttypes.texi (inttypes.h):
73371         * doc/posix-headers/stdint.texi (stdint.h): Document this.
73372         * lib/inttypes.in.h (__STDC_FORMAT_MACROS) [! __cplusplus]:
73373         Define if not defined already, for the benefit of pre-C++11 hosts.
73374         Define the standard format macros (e.g., PRId8) always.
73375         * lib/stdint.in.h (__STDC_CONSTANT_MACROS, __STDC_LIMIT_MACROS):
73376         Likewise, if __cpluspus.  Define the standard constant and limit
73377         macros (e.g., INT8_C, INT8_MAX) always.
73378         * m4/inttypes.m4 (gl_INTTYPES_INCOMPLETE): Do not define
73379         GL_TRIGGER_STDC_LIMIT_MACROS or __STDC_LIMIT_MACROS; no longer needed.
73380         * m4/stdint.m4 (gl_STDINT_H): Update comments about these macros.
73381         * tests/test-inttypes.c (__STDC_LIMIT_MACROS, __STDC_CONSTANT_MACROS)
73382         (__STDC_FORMAT_MACROS): Do not define, since we assume C++11 API now.
73383         * tests/test-stdint.c (__STDC_LIMIT_MACROS, __STDC_CONSTANT_MACROS):
73384         Likewise.
73386 2011-12-12  Paul Eggert  <eggert@cs.ucla.edu>
73388         nonblocking tests: Fix test failure on Linux/PPC.
73389         Suggested by Prerna Saxena in
73390         <http://lists.gnu.org/r/bug-gnulib/2011-12/msg00080.html>.
73391         * tests/test-nonblocking-pipe.h (PIPE_DATA_BLOCK_SIZE) [Linux/PPC64]:
73392         Set to 1100000.
73394 2011-12-12  Jim Meyering  <meyering@redhat.com>
73396         argmatch: don't hard-code `' when listing valid option arguments
73397         * lib/argmatch.c (argmatch_valid): Don't hard-code `%s'.  Instead,
73398         use the quote function to add quotes.  Use fputs rather than
73399         fprintf for the format string with no format directive.
73401 2011-12-07  Eric Blake  <eblake@redhat.com>
73403         bootstrap: detect tools required by gnulib-tool
73404         * build-aux/bootstrap (buildreq): Provide minimum implicit
73405         dependencies.
73406         * DEPENDENCIES: Mention patch as a prereq.
73408 2011-12-04  Bruno Haible  <bruno@clisp.org>
73410         sethostname: Port to Windows platforms.
73411         * lib/sethostname.c: Provide an alternate implementation for Windows
73412         platforms.
73413         * tests/test-sethostname2.c (geteuid): Redefine on Cygwin.
73414         (main): Skip the test if sethostname() fails with EPERM. On Windows
73415         platforms, don't check the result of gethostname().
73417 2011-12-04  Bruno Haible  <bruno@clisp.org>
73418             Jim Meyering  <meyering@redhat.com>
73420         tests: Avoid spurious error message on platforms without mktemp program.
73421         * tests/init.sh (mktempd_): Run mktemp in a subcommand.
73423 2011-12-04  Bruno Haible  <bruno@clisp.org>
73425         sethostname: Fix documentation.
73426         * doc/glibc-functions/sethostname.texi: Move the Solaris problem to the
73427         "not fixed" section.
73429 2011-12-03  Bruno Haible  <bruno@clisp.org>
73431         gnulib-tool: Verify that the License field is present and non-empty.
73432         * gnulib-tool (func_get_license_raw): New function, extracted from
73433         func_get_license.
73434         (func_get_license): Use it. Warn if the module is not a test module and
73435         has no license.
73436         Suggested by Jim Meyering.
73438 2011-12-03  Bruno Haible  <bruno@clisp.org>
73440         sethostname tests: Fix link error on mingw.
73441         * tests/test-sethostname1.c: New file, extracted from
73442         tests/test-sethostname.c.
73443         * tests/test-sethostname2.c: New file, extracted from
73444         tests/test-sethostname.c.
73445         * tests/test-sethostname.c: Remove file.
73446         * modules/sethostname-tests (Files): Add tests/test-sethostname1.c,
73447         tests/test-sethostname2.c. Remove tests/test-sethostname.c.
73448         (Depends-on): Add gethostname.
73449         (Makefile.am): Compile both test-sethostname1 and test-sethostname2.
73450         Link the latter with $(GETHOSTNAME_LIB).
73452         sethostname tests: Fix compilation error on mingw.
73453         * tests/test-sethostname.c: Don't include <sys/types.h>.
73454         (geteuid): Use a dummy value without uid_t.
73455         * modules/sethostname-tests (Depends-on): Remove sys_types.
73457         sethostname tests: Avoid a gcc warning.
73458         * tests/test-sethostname.c (main): Remove an unused variable.
73460         Tweak last commit.
73461         * modules/sethostname-tests (Files): Sort by decreasing importance.
73462         (configure.ac): Check for geteuid.
73463         * tests/test-sethostname.c (main): Emit error messages to stderr. Skip
73464         the test when there's nothing to test. Drop an unnecessary cast.
73465         Improve an error message. Verify that the final sethostname() call
73466         succeeds.
73468 2011-12-01  Ben Walton  <bwalton@artsci.utoronto.ca>
73470         Add a test suite for the sethostname module.
73471         * modules/sethostname-tests: New file.  A test program
73472         for the sethostname module.
73473         * tests/test-sethostname.c: Likewise.
73475 2011-12-03  Bruno Haible  <bruno@clisp.org>
73477         Tweak last commit.
73478         * lib/unistd.in.h (sethostname): Keep declarations in alphabetic order.
73479         Fix preprocessor directives indentation. Fix typos.
73480         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Keep alphabetic order.
73481         * modules/unistd (Makefile): Likewise.
73483 2011-12-01  Ben Walton  <bwalton@artsci.utoronto.ca>
73485         Integrate the sethostname module into unistd.
73486         * lib/unistd.in.h: Integrate the SETHOSTNAME preprocessor handling
73487         into the unistd.h header.
73488         * m4/unistd_h.m4: Setup the autoconf handling for the SETHOSTNAME
73489         preprocessor directives.
73490         * modules/unistd: Setup the Makefile substitutions of the
73491         SETHOSTNAME preprocessor directives.
73493 2011-12-03  Bruno Haible  <bruno@clisp.org>
73495         Tweak last commit.
73496         * lib/sethostname.c: Don't include <string.h>.
73497         (sethostname): No need to copy the argument string to the stack. Don't
73498         call clearerr. Preserve errno when fprintf failed.
73499         * m4/sethostname.m4 (gl_FUNC_SETHOSTNAME): Comment about HOST_NAME_MAX.
73500         Don't invoke AC_REPLACE_FUNCS.
73501         * modules/sethostname (Link): Remove empty section.
73502         * doc/glibc-functions/sethostname.texi: Gnulib does not fix the ENOSYS
73503         failure problem.
73505 2011-12-01  Ben Walton  <bwalton@artsci.utoronto.ca>
73507         New module 'sethostname'.
73508         * lib/sethostname.c (sethostname): New file.  Provide sethostname
73509         for systems that lack it.
73510         * m4/sethostname.m4 (gl_FUNC_SETHOSTNAME): New file.  Detection of
73511         sethostname declaration and function.
73512         * modules/sethostname: New file.  Define the sethostname module.
73514 2011-12-03  Bruno Haible  <bruno@clisp.org>
73516         Tweak last commit.
73517         * m4/gethostname.m4 (gl_PREREQ_HOST_NAME_MAX): Trim blank line.
73519 2011-12-01  Ben Walton  <bwalton@artsci.utoronto.ca>
73521         Split the HOST_NAME_MAX detection into a separate m4 macro.
73522         * m4/gethostname.m4 (gl_PREREQ_HOST_NAME_MAX): Make this a separate
73523         macro so it can be used by the pending sethostname module.
73525 2011-12-03  Bruno Haible  <bruno@clisp.org>
73527         Fix module descriptions syntax.
73528         * modules/argv-iter (License): Fix syntax.
73529         * modules/di-set (License): Likewise.
73530         * modules/ino-map (License): Likewise.
73531         Reported by Stefano Lattarini <stefano.lattarini@gmail.com>.
73533 2011-12-02  Paul Eggert  <eggert@cs.ucla.edu>
73535         stdalign: port to Clang 3.0
73536         Problem reported by Simon Josefsson in
73537         <http://lists.gnu.org/r/bug-gnulib/2011-12/msg00005.html>.
73538         * doc/posix-headers/stdalign.texi (stdalign.h): Mention Clang 3.0,
73539         which has <stdalign.h> but which does not define alignof.
73540         * m4/stdalign.m4 (gl_STDALIGN_H): Check for Clang 3.0's problem.
73542 2011-12-01  Eric Blake  <eblake@redhat.com>
73544         mktempd: silence dd usage
73545         * build-aux/mktempd (rand_bytes): Silence dd.
73547 2011-11-30  Simon Josefsson  <simon@josefsson.org>
73549         manywarnings: Don't mention gcc version in docstring.
73550         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Doc fix.  Suggested by
73551         Jim Meyering <meyering@redhat.com>.
73553 2011-11-30  Jim Meyering  <meyering@redhat.com>
73555         hash: mark a few floating point constants with "f" suffix
73556         * lib/hash.c (DEFAULT_GROWTH_THRESHOLD, DEFAULT_GROWTH_FACTOR)
73557         (DEFAULT_SHRINK_THRESHOLD, DEFAULT_SHRINK_FACTOR): Mark literal
73558         floating point constants with "f", since they're destined to be
73559         saved/used as "float"s.
73561 2011-11-29  Paolo Bonzini  <bonzini@gnu.org>
73563         float tests: Correct and re-enable assertion about LDBL_MIN_EXP.
73564         * tests/test-float.c (test_long_double): Correct and re-enable the
73565         assertion about LDBL_MIN_EXP that was disabled on 2011-08-31.
73567 2011-11-29  Matthew Wala  <wala1@illinois.edu>  (tiny change)
73569         Avoid subtracting two pointers that don't point into the same block.
73570         * lib/argp-help.c (hol_append): Reorder pointer subtractions so that
73571         only pointers into the same memory block are subtracted. We cannot
73572         assume that sizeof (ptrdiff_t) == sizeof (void *).
73574 2011-11-29  Eric Blake  <eblake@redhat.com>
73576         maint.mk: add syntax check for use of compare from init.sh
73577         * top/maint.mk (sc_prohibit_reversed_compare_failure): New rule,
73578         moved here from coreutils.
73580         manywarnings: drop -Wunsuffixed-float-constants
73581         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): C99 does not allow
73582         '1.0D', which is the only way to silence this warning for 'double'.
73584 2011-11-29  Jim Meyering  <meyering@redhat.com>
73586         hash: mark compute_bucket_size with the pure attribute
73587         * lib/hash.c (compute_bucket_size): Use _GL_ATTRIBUTE_PURE.
73589         quotearg, propername: correct pragma guard expression
73590         * lib/quotearg.c: Enable pragma for gcc-4.6 and newer, not 4.3 and newer.
73591         * lib/propername.c: Likewise.  Reported by Bernhard Voelker.
73593 2011-11-28  Jim Meyering  <meyering@redhat.com>
73595         propername: do not mark proper_name with the const attribute
73596         * lib/propername.h (proper_name): Do *not* mark as _GL_ATTRIBUTE_CONST,
73597         since it examines data pointed to by its parameter.
73598         * lib/propername.c (proper_name): Instead, add a pragma to suppress
73599         the suggestion from -Wsuggest-attribute=const.
73601         propername: mark one more function as const
73602         * lib/propername.h (proper_name): Mark as _GL_ATTRIBUTE_CONST.
73604 2011-11-27  Jim Meyering  <meyering@redhat.com>
73606         mark functions with const and pure attributes
73608         Mark functions per suggestions from gcc-4.6 when using these options:
73609         -Wsuggest-attribute=pure -Wsuggest-attribute=const.
73610         Use gnulib's _GL_ATTRIBUTE_PURE and _GL_ATTRIBUTE_CONST macros.
73611         Follow these guidelines: when possible, apply the attribute to
73612         an extern declaration, not to its definition.  Apply it to the
73613         definition only when the definition is static.
73614         * lib/argmatch.h (argmatch, argmatch_to_argument): Mark.
73615         * lib/argv-iter.h (argv_iter_n_args): Likewise.
73616         * lib/base64.h (isbase64): Likewise.
73617         * lib/basename-lgpl.c (last_component, base_len): Likewise.
73618         * lib/c-ctype.h (c_isascii, c_isalnum, c_isalpha): Likewise.
73619         (c_isblank, c_iscntrl, c_isdigit, c_islower, c_isgraph): Likewise.
73620         (c_isprint, c_ispunct, c_isspace, c_isupper, c_isxdigit): Likewise.
73621         (c_tolower, c_toupper): Likewise.
73622         * lib/c-strcase.h (c_strcasecmp, c_strncasecmp): Likewise.
73623         * lib/chdir-long.c (find_non_slash): Likewise.
73624         * lib/dirname.h (base_len, dir_len, last_component): Likewise.
73625         * lib/exclude.h (fnmatch_pattern_has_wildcards): Likewise.
73626         * lib/file-type.h (file_type): Likewise.
73627         * lib/filenamecat-lgpl.c (longest_relative_suffix): Likewise.
73628         * lib/filevercmp.c (verrevcmp): Likewise.
73629         * lib/freadahead.h (freadahead): Likewise.
73630         * lib/fts.c (fts_maxarglen): Likewise.
73631         * lib/hash-pjw.h (hash_pjw): Likewise.
73632         * lib/hash-triple.h (triple_hash_no_name, triple_compare_ino_str):
73633         * lib/hash.c (is_prime, next_prime): Likewise.
73634         * lib/hash.c (hash_get_n_buckets, hash_get_n_buckets_used): Likewise.
73635         (hash_get_n_entries, hash_get_max_bucket_length): Likewise.
73636         (hash_table_ok, hash_get_first, hash_string): Likewise.
73637         (compute_bucket_size): Likewise.
73638         * lib/i-ring.h (i_ring_empty): Likewise.
73639         * lib/isnan.c (isnanl): Likewise.
73640         * lib/math.h (isnanl, rpl_isnanl): Likewise.
73641         * lib/memcasecmp.h (memcasecmp): Likewise.
73642         * lib/memchr2.h (memchr2): Likewise.
73643         * lib/memcmp2.h (memcmp2): Likewise.
73644         * lib/parse-datetime.y (lookup_zone): Likewise.
73645         * lib/sockets.h (gl_sockets_startup, gl_sockets_cleanup)
73646         [!WINDOWS_SOCKETS]: Likewise.
73647         * lib/strnlen1.h (strnlen1): Likewise.
73648         * lib/uniwidth.in.h (uc_width): Likewise.
73649         * lib/quotearg.c: Add pragma to avoid unwarranted suggestion from
73650         gcc's -Wsuggest-attribute=pure for quoting_options_from_style.
73651         (quoting_options_from_style): Add a comment.
73652         * lib/propername.h (proper_name): Add a comment.
73654 2011-11-27  Bruno Haible  <bruno@clisp.org>
73656         Remove unused macros from !_LIBC code in glibc-borrowed files.
73657         * lib/fnmatch.c (STRCOLL): Remove macro.
73658         * lib/fnmatch_loop.c (STRCOLL): Remove undef.
73659         * lib/glob.c (__stat, __readdir64): Remove macros.
73660         * lib/tempname.c (__open64, __xstat64): Remove macros.
73661         Suggested by Paul Eggert.
73663 2011-11-27  Bruno Haible  <bruno@clisp.org>
73665         getcwd: Fix link error on MSVC 9.
73666         * modules/getcwd (Depends-on): Add readdir, rewinddir.
73668 2011-11-27  Bruno Haible  <bruno@clisp.org>
73670         Don't set REPLACE_FOO to 1 if HAVE_FOO is 0.
73671         * m4/opendir.m4 (gl_FUNC_OPENDIR): Don't set REPLACE_OPENDIR to 1 if
73672         HAVE_OPENDIR is 0.
73673         * m4/closedir.m4 (gl_FUNC_CLOSEDIR): Don't set REPLACE_CLOSEDIR to 1 if
73674         HAVE_CLOSEDIR is 0.
73675         * m4/dup2.m4 (gl_FUNC_DUP2): Don't set REPLACE_DUP2 to 1 if HAVE_DUP2
73676         is 0.
73677         * m4/dup3.m4 (gl_FUNC_DUP3): Update comments.
73679 2011-11-27  Bruno Haible  <bruno@clisp.org>
73681         getcwd: Fix bug from 2011-08-17.
73682         * m4/getcwd.m4 (gl_FUNC_GETCWD): Set REPLACE_GETCWD to 1 only on
73683         platforms that need it.
73684         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Consider a return
73685         code of 4 to be a failure, not a success. This ensures that
73686         REPLACE_GETCWD becomes 1 on OpenBSD 4.9 and NetBSD 5.1.
73688 2011-11-27  Bruno Haible  <bruno@clisp.org>
73690         binary-io tests: Avoid test failure on mingw when libtool is used.
73691         * tests/test-binary-io.c (main): Don't remove t-bin-out2.tmp here.
73692         Don't verify the size of t-bin-out1.tmp here.
73693         * tests/test-binary-io.sh: Verify it here.
73694         Reported by Simon Josefsson.
73696 2011-11-26  Bruno Haible  <bruno@clisp.org>
73698         Fix conflict between two instantiations of module 'unistd'.
73699         * gnulib-tool (func_emit_autoconf_snippet): Substitute
73700         ${include_guard_prefix} also in the autoconf snippet.
73701         * m4/getopt.m4 (gl_FUNC_GETOPT_POSIX): Don't set GNULIB_UNISTD_H_GETOPT.
73702         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Don't initialize
73703         GNULIB_UNISTD_H_GETOPT.
73704         * modules/getopt-posix (configure.ac): Set the
73705         GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT variable.
73706         * modules/getopt-gnu (configure.ac): Likewise.
73707         * modules/unistd (Makefile.am): Change the substitution value of
73708         GNULIB_UNISTD_H_GETOPT to depend on the include guard prefix.
73709         Reported by Simon Josefsson.
73711 2011-11-25  Bruno Haible  <bruno@clisp.org>
73713         pagealign_alloc: Doc and comments.
73714         * doc/posix-functions/posix_memalign.texi: Refer to the pagealign_alloc
73715         module.
73716         * lib/pagealign_alloc.c (pagealign_alloc): Add comment.
73718 2011-11-25  Jim Meyering  <meyering@redhat.com>
73720         test-update-copyright.sh: avoid false-positive failure
73721         * tests/test-update-copyright.sh: Use $TMP.? (not $TMP.*), to work
73722         around false positive failure on Cygwin/Windows.  The latter was
73723         matching erroneously-created files with names like
73724         update-copyright.test-ex.4.bak.  Reported by Simon Josefsson.
73726 2011-11-25  Simon Josefsson  <simon@josefsson.org>
73728         valgrind-tests.m4: Avoid breakage if valgrind on bash fails.
73729         * m4/valgrind-tests.m4: Check that the parameters that will be
73730         used works, not just a subset of them.  Reported by Bruno Haible
73731         <bruno@clisp.org>.
73733 2011-11-24  Jim Meyering  <meyering@redhat.com>
73735         test-stdalign.c: comment out long double tests
73736         * tests/test-stdalign.c: Don't try to reduce alignment of long double
73737         variables.  That provokes errors like this from gcc-4.7.0 20111124:
73738         error: '_Alignas' specifiers cannot reduce alignment of \
73739         'static_longdouble_alignas'.
73741 2011-11-22  Jim Meyering  <meyering@redhat.com>
73743         init.sh: make "compare /dev/null FILE" output more readable
73744         * tests/init.sh (compare_): Document the preferred order of arguments.
73745         (emit_diff_u_header_): New function.
73746         (compare_dev_null_): Emit a simulated diff, rather than just the
73747         contents of the unexpected file.  Suggestion from Bruno Haible.
73749 2011-11-21  Jim Meyering  <meyering@redhat.com>
73750             Eric Blake  <eblake@redhat.com>
73752         init.sh: work around OSF/1 5.1's mishandling of /dev/null
73753         * tests/init.sh: Make our compare function slightly more portable.
73754         Reported by Bruno Haible in
73755         http://thread.gmane.org/gmane.comp.gnu.grep.bugs/4020
73757 2011-11-21  Simon Josefsson  <simon@josefsson.org>
73759         * m4/gnulib-common.m4 (_Noreturn): Check that _MSC_VER is defined
73760         before using it, in code that ends up in config.h.
73762 2011-11-20  Bruno Haible  <bruno@clisp.org>
73764         getcwd: Work around getcwd bug on AIX 5..7.
73765         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Require
73766         AC_CANONICAL_HOST. Assign exit code 31 to the bug seen on AIX 5.1..7.1.
73767         Use a different value for gl_cv_func_getcwd_path_max. Move the
73768         definition of HAVE_PARTLY_WORKING_GETCWD from here...
73769         * m4/getcwd.m4 (gl_FUNC_GETCWD): ... to here. Invoke
73770         gl_FUNC_GETCWD_PATH_MAX also when $gl_cv_func_getcwd_null is 'no'.
73771         Define HAVE_MINIMALLY_WORKING_GETCWD.
73772         * lib/getcwd.c (__getcwd): Don't use the system's getcwd on platforms
73773         where it is not even minimally working, that is, on AIX.
73774         * tests/test-getcwd.c (test_long_name): Distinguish the same cases as
73775         m4/getcwd-path-max.m4.
73776         (main): Update exit code computation.
73777         * doc/posix-functions/getcwd.texi: Mention list of platforms where
73778         getcwd does not handle long file names.
73780 2011-11-20  Bruno Haible  <bruno@clisp.org>
73782         getcwd: Fix bug from 2009-09-10.
73783         * m4/getcwd.m4 (gl_FUNC_GETCWD): Treat "guessing yes" like "yes", not
73784         like "no".
73786 2011-11-20  Simon Josefsson  <simon@josefsson.org>
73788         * m4/manywarnings.m4: Add more warnings from gcc 4.6.2.
73790 2011-11-20  Bruno Haible  <bruno@clisp.org>
73792         fma tests: Avoid shadowing local variables.
73793         * tests/test-fma2.h (test_function): Reduce scope of x, y, z, result,
73794         expected.
73796 2011-11-20  Bruno Haible  <bruno@clisp.org>
73798         copysignf tests: Fix.
73799         * tests/test-copysignf.c: Fix signature check.
73801 2011-11-20  Bruno Haible  <bruno@clisp.org>
73803         fma: Remove unused code.
73804         * lib/fma.c (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): Remove
73805         unused macros.
73807 2011-11-20  Bruno Haible  <bruno@clisp.org>
73809         sethostname: Fix doc about AIX.
73810         * doc/glibc-functions/sethostname.texi: Drop mention that AIX 5.1 lacks
73811         sethostname; it has it.
73813         sethostname: Mention more portability problems.
73814         * doc/glibc-functions/sethostname.texi: Mention the missing declaration
73815         problem.
73816         Reported by Ben Walton <bwalton@artsci.utoronto.ca>.
73818 2011-11-19  Bruno Haible  <bruno@clisp.org>
73820         Depend on module fcntl-h when AT_FDCWD is used.
73821         * modules/utimens (Depends-on): Add fcntl-h.
73822         * modules/areadlinkat (Depends-on): Likewise.
73823         * modules/areadlinkat-with-size (Depends-on): Likewise.
73824         * modules/faccessat (Depends-on): Likewise.
73825         * modules/fchmodat (Depends-on): Likewise.
73826         * modules/fchownat (Depends-on): Likewise.
73827         * modules/getcwd (Depends-on): Likewise.
73828         * modules/mkdirat (Depends-on): Likewise.
73829         * modules/mkfifoat (Depends-on): Likewise.
73830         * modules/readlinkat (Depends-on): Likewise.
73831         * modules/symlinkat (Depends-on): Likewise.
73832         * modules/dup2-tests (Depends-on): Likewise.
73833         * modules/fdutimensat-tests (Depends-on): Likewise.
73834         * modules/futimens-tests (Depends-on): Likewise.
73836 2011-11-19  Bruno Haible  <bruno@clisp.org>
73838         euidaccess: Update a comment.
73839         * lib/euidaccess.c: Update comment about platforms with faccessat.
73841 2011-11-19  Bruno Haible  <bruno@clisp.org>
73843         openat: Fix file list.
73844         * modules/openat (Files): Remove lib/at-func.c.
73846 2011-11-19  Bruno Haible  <bruno@clisp.org>
73848         fstatat: Simplify.
73849         * lib/fstatat.c (AT_FUNC_NAME): Define as fstatat. On platforms where
73850         gnulib should define rpl_fstatat, there is a
73851         "#define fstatat rpl_fstatat" in <sys/stat.h>.
73853 2011-11-19  Bruno Haible  <bruno@clisp.org>
73855         Ensure 'inline' can be used in tests/test-utimens-common.h.
73856         * modules/fdutimensat-tests (configure.ac): Require AC_C_INLINE.
73857         * modules/futimens-tests (configure.ac): Likewise.
73858         * modules/utimens-tests (configure.ac): Likewise.
73859         * modules/utimensat-tests (configure.ac): Likewise.
73861 2011-11-19  Simon Josefsson  <simon@josefsson.org>
73863         * lib/hash.c (hash_insert): Use hash_insert_if_absent,
73864         not hash_insert0.
73865         (hash_insert_if_absent): Doc fix.
73867 2011-11-19  Simon Josefsson  <simon@josefsson.org>
73869         * m4/readline.m4 (gl_FUNC_READLINE): Check for readline/history.h.
73871 2011-11-18  Paul Eggert  <eggert@cs.ucla.edu>
73873         test-getcwd: disambiguate exit status
73874         * tests/test-getcwd.c (test_long_name): Return 0..7.
73875         (main): Exit with an unambiguous exit status.  The old
73876         code yielded a mysterious mixture of two failure codes.
73878         fstatat: fix configuration bug on mingw, OpenBSD 4, Solaris 8
73879         * lib/fstatat.c (AT_FUNC_NAME): Use HAVE_FSTAT, not
73880         HAVE_WORKING_FSTATAT_ZERO_FLAG, to decide whether to define
73881         rpl_fstatat or fstatat.  This should fix the other problem
73882         reported by Kai Habel in
73883         <http://lists.gnu.org/r/bug-gnulib/2011-11/msg00237.html>.
73884         A similar problem was reported for OpenBSD 4.6 by Mats Erik Andersson
73885         <http://lists.gnu.org/r/bug-gnulib/2011-11/msg00239.html>
73886         and I reproduced it on a Solaris 8 host we still have in production.
73888 2011-11-18  Jim Meyering  <meyering@redhat.com>
73890         hash: deprecate poorly-named hash_insert0: use hash_insert_if_absent
73891         * lib/hash.c (hash_insert_if_absent): Rename from hash_insert0.
73892         Add a sentence to the comment.
73893         (hash_insert0): New function that simply calls hash_insert_if_absent.
73894         * lib/hash.h (hash_insert_if_absent): Declare it.
73895         (hash_insert0): Add deprecation attribute.
73896         (_GL_ATTRIBUTE_DEPRECATED): Define.
73897         * lib/di-set.c (di_set_insert): Use hash_insert_if_absent,
73898         not hash_insert0.
73899         * NEWS: Mention it, even though it's not really an incompatible change.
73901 2011-11-18  Dagobert Michelsen  <dam@opencsw.org>  (tiny change)
73903         openat: avoid compilation failure due to lack of <errno.h> inclusion
73904         * lib/openat.c: Include <errno.h>.
73906 2011-11-17  Paul Eggert  <eggert@cs.ucla.edu>
73908         * modules/getcwd (Depends-on): Add fdopendir.
73909         This fixes one of the two problems reported by Kai Habel in
73910         <http://lists.gnu.org/r/bug-gnulib/2011-11/msg00237.html>.
73912         modules/crypto/gc-*: simplify dependencies and fix stdalign.h bug
73913         stdalign problem reported by Ian Beckwith in
73914         <http://lists.gnu.org/r/bug-gnulib/2011-11/msg00238.html>.
73915         * modules/crypto/gc-arcfour (Depends-on):
73916         Depend conditionally on crypto/arcfour.
73917         * modules/crypto/gc-arctwo (Depends-on):
73918         Depend conditionally on crypto/arctwo.
73919         * modules/crypto/gc-des (Depends-on):
73920         Depend conditionally on crypto/des.
73921         * modules/crypto/gc-hmac-md5 (Depends-on):
73922         Depend conditionally on crypto/hmac-md5.
73923         * modules/crypto/gc-hmac-sha1 (Depends-on):
73924         Depend conditionally on crypto/hmac-sha1.
73925         * modules/crypto/gc-md2 (Depends-on): Remove stdint, minmax.
73926         * modules/crypto/gc-md4 (Depends-on):
73927         Depend conditionally on crypto/md4.
73928         * modules/crypto/gc-md5 (Depends-on):
73929         Depend conditionally on crypto/md5.
73930         * modules/crypto/gc-rijndael (Depends-on):
73931         Depend conditionally on crypto/rijndael.
73932         * modules/crypto/gc-sha1 (Depends-on):
73933         Depend conditionally on crypto/sha1.
73934         * modules/crypto/gc-arcfour:
73935         * modules/crypto/gc-arctwo:
73936         * modules/crypto/gc-des:
73937         * modules/crypto/gc-hmac-md5:
73938         * modules/crypto/gc-hmac-sha1:
73939         * modules/crypto/gc-md2:
73940         * modules/crypto/gc-md4:
73941         * modules/crypto/gc-md5:
73942         * modules/crypto/gc-rijndael:
73943         * modules/crypto/gc-sha1:
73944         (Files, Depends-on, configure.ac): Remove now-unnecessary stuff,
73945         now that the conditional dependencies do the work for us.
73947 2011-11-17  Jim Meyering  <meyering@redhat.com>
73949         tests: factor st_ctime-comparison out of two headers
73950         * tests/test-utimens-common.h (ctime_compare): Define.
73951         * tests/test-futimens.h (test_futimens): Replace open-coded equivalent.
73952         * tests/test-lutimens.h (test_lutimens): Likewise.
73953         * tests/test-utimens.h (test_utimens): Likewise.
73955         test-getcwd: don't leave behind a confdir3/ directory upon interrupt
73956         Invoke the test program via an init.sh-using wrapper.
73957         * tests/test-getcwd.sh: New file.
73958         * modules/getcwd-tests (Files): Add it.
73959         (Makefile.am) [TESTS]: Invoke the shell script wrapper.
73961 2011-11-01  Gary V. Vaughan  <gary@gnu.org>
73963         gitlog-to-changelog: support multi-author commits.
73964         The FSF cares about keeping track of all authors of patches to its
73965         projects, but Git doesn't provide obvious support for multi-author
73966         changesets. Consensus seems to be forming around the use of extra
73967         Signed-off-by inspired lines in the log message formatted as
73968         `Co-authored-by: A U Thor <email@example.com>' for round-tripping
73969         multi-author commits between version control systems.
73970         * gitlog-to-changelog: Extract `Co-authored-by:' lines from the git
73971         log message and output in standard ChangeLog multi-author format.
73972         Reported by Peter Rosin <peda@lysator.liu.se>
73974 2011-11-15  Ben Walton  <bwalton@artsci.utoronto.ca>  (tiny change)
73975             Bruno Haible  <bruno@clisp.org>
73977         Fix some modules' file list.
73978         * modules/fstatat (Files): Add m4/lstat.m4.
73979         * modules/openat (Files): Likewise.
73980         * modules/unlinkat (Files): Likewise.
73982 2011-11-15  Gary V. Vaughan  <gary@gnu.org>
73984         maint.mk: fix tight-scope.mk generation in VPATH builds.
73985         * top/maint.mk (tight-scope.mk): Make sure to prefix file
73986         reference with $(srcdir) so that the file is found correctly even
73987         when running `make syntax-check' in a VPATH build.
73989 2011-11-13  Bruno Haible  <bruno@clisp.org>
73990             Jim Meyering  <meyering@redhat.com>
73992         Silence successful tests that use 'compare' on AIX, HP-UX, Solaris.
73993         * tests/init.sh (compare): Remove "No differences encountered" or
73994         synonymous output from the 'diff' program.
73996 2011-11-13  Bruno Haible  <bruno@clisp.org>
73998         Makefile: Tweak indentation.
73999         * Makefile: Use tab as first character in every line that contains rule
74000         commands.
74002 2011-11-13  Bruno Haible  <bruno@clisp.org>
74004         Syntax check for copyright statements.
74005         * check-copyright: New file.
74006         * Makefile (sc_check_copyright): New rule.
74008 2011-11-13  Simon Josefsson  <simon@josefsson.org>
74010         * build-aux/git-version-gen: Add --prefix to configure the tag
74011         match string.
74013 2011-11-13  Simon Josefsson  <simon@josefsson.org>
74015         * build-aux/git-version-gen: Add --help and --version.
74017 2011-11-12  Jim Meyering  <meyering@redhat.com>
74019         revamp the other test-exclude?.sh scripts to use init.sh, too
74020         * tests/test-exclude1.sh: Use init.sh.
74021         * tests/test-exclude2.sh: Likewise.
74022         * tests/test-exclude3.sh: Likewise.
74023         * tests/test-exclude4.sh: Likewise.
74024         * tests/test-exclude5.sh: Likewise.
74025         * tests/test-exclude6.sh: Likewise.
74026         * tests/test-exclude7.sh: Likewise.
74027         * tests/test-exclude8.sh: Likewise.
74028         * modules/exclude-tests (Files): List init.sh.
74030         test-exclude2.sh, test-exclude5.sh: fail if test-exclude fails
74031         These shell scripts ignored failure of the binary test-exclude,
74032         so making the latter return 77 didn't cause them to be skipped.
74033         * tests/test-exclude5.sh: Exit with test-exclude's error status
74034         when that program fails.  Revamp to use init.sh.
74035         * tests/test-exclude2.sh: Likewise.
74037         test-exclude: fix a typo
74038         * tests/test-exclude.c (main): Test for "leading_dir", not "leading-dir".
74040 2011-11-11  Bruno Haible  <bruno@clisp.org>
74042         obstack: Fix compilation error on MSVC 9.
74043         * lib/obstack.c (print_and_abort): Declare with _Noreturn specifier.
74045 2011-11-11  Jim Meyering  <meyering@redhat.com>
74047         test-exclude: skip tests rather than failing on deficient systems
74048         * tests/test-exclude.c (main): Skip tests that use FNM_CASEFOLD
74049         and FNM_LEADING_DIR on systems that lack the definitions.  This affects
74050         at least Solaris 9.  Reported and diagnosed by Dagobert Michelsen in
74051         http://thread.gmane.org/gmane.comp.gnu.grep.bugs/3947/focus=3950
74053 2011-11-10  Bruno Haible  <bruno@clisp.org>
74055         ptsname_r test: Avoid gcc warning on glibc systems.
74056         * tests/test-ptsname_r.c (null_ptr): New function.
74057         (test_errors): Use it.
74059 2011-11-10  Bruno Haible  <bruno@clisp.org>
74061         ptsname_r: Avoid compilation error on OSF/1 5.1.
74062         * lib/stdlib.in.h (ptsname_r): Override if REPLACE_PTSNAME_R is 1.
74063         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_PTSNAME_R.
74064         * m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): Set REPLACE_PTSNAME_R if the
74065         function is not declared or incompatibly declared.
74066         * modules/stdlib (Makefile.am): Substitute REPLACE_PTSNAME_R.
74067         * modules/ptsname_r (Depends-on, configure.ac): Update.
74068         * doc/glibc-functions/ptsname_r.texi: Mention the OSF/1 problems.
74070 2011-11-10  Bruno Haible  <bruno@clisp.org>
74072         fstatat: Make cross-compilation guess succeed everywhere except on AIX.
74073         * m4/fstatat.m4 (gl_FUNC_FSTATAT): Require AC_CANONICAL_HOST.
74074         When cross-compiling, guess yes on all platforms except AIX.
74075         Reported by Ludovic Courtès <ludo@gnu.org>.
74077 2011-11-09  Bruno Haible  <bruno@clisp.org>
74079         ptsname_r tests: Fix bugs.
74080         * tests/test-ptsname_r.c (test_errors): Change return type to 'void'.
74081         Fix ptsname_r calls. Reduce loop rounds to a reasonable amount.
74083 2011-11-09  Paul Eggert  <eggert@cs.ucla.edu>
74085         fstatat: work with cross-compilation
74086         Problem reported by Ludovic Courtès in
74087         <http://lists.gnu.org/r/bug-gnulib/2011-11/msg00136.html>.
74088         * m4/fstatat.m4 (gl_FUNC_FSTATAT): When cross-compiling, report
74089         "cross-compiling" and assume the bug is present.  Replace
74090         FSTATAT_ZERO_FLAG_BROKEN with HAVE_WORKING_FSTATAT_ZERO_FLAG with
74091         an inverted sense, to be more conservative about our assumptions.
74092         * lib/fstatat.c (rpl_fstatat): Adjust to renamed macro.
74094 2011-11-09  Bruno Haible  <bruno@clisp.org>
74096         Improve MODULES.html output.
74097         * modules/mkfifoat (Description): Use the word "function".
74098         * modules/readlinkat (Description): Likewise.
74099         * modules/symlinkat (Description): Likewise.
74101 2011-11-09  Eric Blake  <eblake@redhat.com>
74103         ptsname_r-tests: new test module
74104         * modules/ptsname_r-tests: New module.
74105         * tests/test-ptsname_r.c: New file.
74107         ptsname_r: new module
74108         * modules/ptsname_r: New module.
74109         * m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): New file.
74110         * lib/ptsname.c (__ptsname_r): Split...
74111         * lib/ptsname_r.c: ...into new file.
74112         * m4/stdlib_h.m4 (gl_STDLIB_H): Check for decl.
74113         (gl_STDLIB_H_DEFAULTS): Set witness defaults.
74114         * modules/stdlib (Makefile.am): Substitute witnesses.
74115         * lib/stdlib.in.h (ptsname_r): Declare it.
74116         * doc/glibc-functions/ptsname_r.texi (ptsname_r): Document it.
74117         * MODULES.html.sh (Misc): Likewise.
74118         * modules/ptsname (Depends-on): Alter dependency.
74119         * doc/posix-functions/ptsname.texi (ptsname): Mention new module.
74121 2011-11-09  Jim Meyering  <meyering@redhat.com>
74123         announce-gen: be more concise when there's only one URL+tarball
74124         * build-aux/announce-gen (get_tool_versions): When you distribute
74125         only one type of tarball, combine the first two "Here are..."
74126         sections and make the key-checking grammar independent of
74127         how many tarballs there are.
74129 2011-11-09  Eric Blake  <eblake@redhat.com>
74131         openpty: provide a stub on mingw
74132         * lib/pty.in.h (includes): Provide forward declarations.
74133         * lib/openpty.c (openpty) [mingw]: Provide ENOSYS stub.
74135         raise: fix mingw handling of SIGPIPE
74136         * lib/sigprocmask.c (_gl_raise_SIGPIPE): Provide a return value.
74138 2011-11-08  Bruno Haible  <bruno@clisp.org>
74140         More conditional dependencies.
74141         * modules/faccessat (Depends-on): Add conditions.
74142         * modules/fchmodat (Depends-on): Likewise.
74143         * modules/fchownat (Depends-on): Likewise.
74144         * modules/fstatat (Depends-on): Likewise.
74145         * modules/mkfifoat (Depends-on): Likewise.
74146         * modules/readlinkat (Depends-on): Likewise.
74147         * modules/symlinkat (Depends-on): Likewise.
74148         * modules/unlinkat (Depends-on): Likewise.
74149         * modules/utimensat (Depends-on): Likewise.
74150         * modules/mkdirat (Depends-on): Add sys_stat. Add conditions.
74151         * modules/linkat (Depends-on): Refine the conditions.
74152         * modules/renameat (Depends-on): Likewise.
74154 2011-11-08  Bruno Haible  <bruno@clisp.org>
74156         faccessat: Move AC_LIBOBJ invocation to module description.
74157         * m4/faccessat.m4 (gl_PREREQ_FACCESSAT): New macro.
74158         (gl_FUNC_FACESSAT): Don't test for access() here. Move AC_LIBOBJ
74159         invocation from here...
74160         * modules/faccessat (configure.ac): ... to here. Invoke
74161         gl_PREREQ_FACCESSAT.
74163 2011-11-08  Bruno Haible  <bruno@clisp.org>
74165         faccessat: Simplify autoconf macro.
74166         * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Don't require gl_FUNC_OPENAT,
74167         gl_FUNC_EUIDACCESS.
74169 2011-11-08  Bruno Haible  <bruno@clisp.org>
74171         renameat: Fix dependencies.
74172         * modules/renameat (Depends-on): Add stdbool.
74174 2011-11-08  Bruno Haible  <bruno@clisp.org>
74176         mkfifoat: Fix module description.
74177         * modules/mkfifoat (configure.ac): Invoke gl_SYS_STAT_MODULE_INDICATOR,
74178         not gl_UNISTD_MODULE_INDICATOR.
74180 2011-11-08  Bruno Haible  <bruno@clisp.org>
74182         fstatat: Remove unused dependency.
74183         * modules/fstatat (Depends-on): Remove fstat.
74185 2011-11-08  Simon Josefsson  <simon@josefsson.org>
74187         GNUmakefile: behave when Makefile is missing.
74188         * top/GNUmakefile: Always initialize _build-aux and _autoreconf.
74190 2011-11-08  Bruno Haible  <bruno@clisp.org>
74192         openat: Conditionalize dependencies.
74193         * lib/openat.c: Reduce the scope of some #includes.
74194         * modules/openat (Depends-on): Add conditions.
74196 2011-11-07  Jim Meyering  <meyering@redhat.com>
74198         maint.mk: extract GPG key ID without using a temporary file
74199         * top/maint.mk (gpg_key_ID): Extract GPG key ID from signed tag, but
74200         without using a temporary file.  Based on a suggestion from Werner Koch
74201         in http://thread.gmane.org/gmane.comp.encryption.gpg.devel/16496
74203 2011-11-07  Eric Blake  <eblake@redhat.com>
74205         grantpt: fix typo
74206         * lib/stdlib.in.h (grantpt): Check correct function.
74208         maint.mk: silence new syntax check
74209         * top/maint.mk (sc_prohibit_dirent_without_use): Add missing @.
74211 2011-11-06  Bruno Haible  <bruno@clisp.org>
74213         Doc about floating-point and math API.
74214         * doc/posix-headers/float.texi: Mention problem with FLT_ROUNDS.
74215         * doc/posix-headers/math.texi: Mention problem with math_errhandling.
74217 2011-11-06  Bruno Haible  <bruno@clisp.org>
74219         stdalign tests: Skip the test when compiled by Sun C.
74220         * tests/test-stdalign.c (main): Skip the test on Sun C.
74222 2011-11-06  Bruno Haible  <bruno@clisp.org>
74224         ansi-c++-opt: Complete the 2011-06-05 change.
74225         * m4/ansi-c++.m4 (gl_PROG_ANSI_CXX): When a C++ compiler is found but
74226         does not support namespaces, set the variable to "no", not to ":".
74228 2011-11-06  Paul Eggert  <eggert@cs.ucla.edu>
74230         * doc/posix-headers/stdalign.texi (stdalign.h): Mention Sun review ID.
74232 2011-11-06  Bruno Haible  <bruno@clisp.org>
74234         copysignl: Fix result for zero argument on HP-UX 11 with HP C.
74235         * lib/copysignl.c (compute_minus_zerol) [HP-UX]: New function.
74236         (minus_zerol) [HP-UX]: New macro.
74237         (unary_minus) [HP-UX]: New function.
74238         (copysignl) [HP-UX]: Use unary_minus function.
74240 2011-11-06  Bruno Haible  <bruno@clisp.org>
74242         ldexp, ldexpf, ldexpl: Enhance tests.
74243         * tests/test-ldexp.h: New file, combining code from tests/test-ldexp.c
74244         and tests/test-ldexpl.c.
74245         * tests/test-ldexpl.c: (DOUBLE, ISNAN, INFINITY, NAN, L_, MINUS_ZERO,
74246         LDEXP, MIN_EXP, MAX_EXP): New macros.
74247         Include test-ldexp.h.
74248         (main): Just call test_function.
74249         * tests/test-ldexp.c: Include float.h, isnand-nolibm.h, minus-zero.h,
74250         infinity.h, nan.h.
74251         (DOUBLE, ISNAN, INFINITY, NAN, L_, MINUS_ZERO, LDEXP, MIN_EXP,
74252         MAX_EXP): New macros.
74253         Include test-ldexp.h.
74254         (x, y): Remove variables.
74255         (main): Just call test_function.
74256         * tests/test-ldexpf.c: Include float.h, isnanf-nolibm.h, minus-zero.h,
74257         infinity.h, nan.h.
74258         (DOUBLE, ISNAN, INFINITY, NAN, L_, MINUS_ZERO, LDEXP, MIN_EXP,
74259         MAX_EXP): New macros.
74260         Include test-ldexp.h.
74261         (x, y): Remove variables.
74262         (main): Just call test_function.
74263         * modules/ldexpl-tests (Files): Add tests/test-ldexp.h.
74264         * modules/ldexp-tests (Files): Add tests/test-ldexp.h,
74265         tests/minus-zero.h, tests/infinity.h, tests/nan.h.
74266         (Depends-on): Add isnand-nolibm, signbit, float.
74267         * modules/ldexpf-tests (Files): Add tests/test-ldexp.h,
74268         tests/minus-zero.h, tests/infinity.h, tests/nan.h.
74269         (Depends-on): Add isnanf-nolibm, signbit, float.
74271 2011-11-06  Bruno Haible  <bruno@clisp.org>
74273         math tests: Cosmetics.
74274         * tests/test-math-c++.cc: Reorder declarations.
74276 2011-11-05  Bruno Haible  <bruno@clisp.org>
74278         fma*: Simplify test.
74279         * tests/test-fma2.h (FORGIVE_GLIBC_BUG): Remove macro.
74280         (test_function): Remove all if (FORGIVE_GLIBC_BUG) statements.
74282         Tests for module 'fmal'.
74283         * modules/fmal-tests: New file.
74284         * tests/test-fmal1.c: New file.
74285         * tests/test-fmal2.c: New file.
74287         New module 'fmal'.
74288         * lib/math.in.h (fmal): New declaration.
74289         * lib/fmal.c: New file.
74290         * m4/fmal.m4: New file.
74291         * m4/math_h.m4 (gl_MATH_H): Test whethern fmal is declared.
74292         (gl_MATH_H_DEFAULTS): Initialize GNULIB_FMAL, HAVE_FMAL, REPLACE_FMAL.
74293         * modules/math (Makefile.am): Substitute GNULIB_FMAL, HAVE_FMAL,
74294         REPLACE_FMAL.
74295         * modules/fmal: New file.
74296         * doc/posix-functions/fmal.texi: Mention the new module and the various
74297         bugs.
74299         Tests for module 'fmaf'.
74300         * modules/fmaf-tests: New file.
74301         * tests/test-fmaf1.c: New file.
74302         * tests/test-fmaf2.c: New file.
74304         New module 'fmaf'.
74305         * lib/math.in.h (fmaf): New declaration.
74306         * lib/fmaf.c: New file.
74307         * m4/fmaf.m4: New file.
74308         * m4/math_h.m4 (gl_MATH_H): Test whethern fmaf is declared.
74309         (gl_MATH_H_DEFAULTS): Initialize GNULIB_FMAF, HAVE_FMAF, REPLACE_FMAF.
74310         * modules/math (Makefile.am): Substitute GNULIB_FMAF, HAVE_FMAF,
74311         REPLACE_FMAF.
74312         * modules/fmaf: New file.
74313         * doc/posix-functions/fmaf.texi: Mention the new module and the various
74314         bugs.
74316         Tests for module 'fma'.
74317         * modules/fma-tests: New file.
74318         * tests/test-fma1.c: New file.
74319         * tests/test-fma1.h: New file.
74320         * tests/test-fma2.c: New file.
74321         * tests/test-fma2.h: New file.
74323         New module 'fma'.
74324         * lib/math.in.h (fma): New declaration.
74325         * lib/fma.c: New file.
74326         * m4/fma.m4: New file.
74327         * m4/fegetround.m4: New file.
74328         * m4/math_h.m4 (gl_MATH_H): Test whethern fma is declared.
74329         (gl_MATH_H_DEFAULTS): Initialize GNULIB_FMA, HAVE_FMA, REPLACE_FMA.
74330         * modules/math (Makefile.am): Substitute GNULIB_FMA, HAVE_FMA,
74331         REPLACE_FMA.
74332         * modules/fma: New file.
74333         * doc/posix-functions/fma.texi: Mention the new module and the various
74334         bugs.
74336         Extend gl_MATHFUNC.
74337         * m4/mathfunc.m4 (gl_MATHFUNC): Accept an 4th parameter of INCLUDES.
74338         Support 'void' as argument type.
74339         * m4/rint.m4 (gl_FUNC_RINT): Update gl_MATHFUNC invocation.
74341 2011-11-05  Jim Meyering  <meyering@redhat.com>
74343         maint.mk: also prohibit inclusion of dirent.h without use
74344         * top/maint.mk (sc_prohibit_dirent_without_use): New rule.
74346 2011-11-05  Bruno Haible  <bruno@clisp.org>
74348         ldexpl tests: Avoid test failure on MSVC 9.
74349         * tests/test-ldexpl.c (main): Use a temporary variable for the expected
74350         value. Needed in order to enforce the conversion from a value greater
74351         than LDBL_MAX to Infinity.
74353 2011-11-05  Bruno Haible  <bruno@clisp.org>
74355         New modules 'at-internal', 'openat-h', split off from module 'openat'.
74356         * modules/at-internal: New file, extracted from modules/openat.
74357         * modules/openat-h: New file.
74358         * m4/openat.m4 (gl_FUNC_OPENAT): Don't set GNULIB_OPENAT. Don't
74359         invoke gl_PREREQ_OPENAT and gl_MODULE_INDICATOR.
74360         * modules/openat (Description): Add reference to POSIX function.
74361         (Files): Remove lib/openat.h, lib/openat-proc.c.
74362         (Depends-on): Add at-internal, openat-h. Remove fdopendir, gettext-h,
74363         intprops, unistd.
74364         (configure.ac): Remove AC_LIBOBJ of openat-proc. Invoke
74365         gl_PREREQ_OPENAT, gl_MODULE_INDICATOR here. Invoke
74366         gl_FCNTL_MODULE_INDICATOR.
74367         (Include): Remove unistd.h, openat.h.
74368         * modules/areadlinkat (Files): Add lib/at-func.c.
74369         (Depends-on): Add at-internal, dosname, errno, extensions, fchdir,
74370         openat-die, openat-h, save-cwd.
74371         * modules/areadlinkat-with-size (Files): Add lib/at-func.c.
74372         (Depends-on): Add at-internal, dosname, errno, extensions, fchdir,
74373         openat-die, openat-h, save-cwd, unistd.
74374         * modules/faccessat (Files): Add lib/at-func.c, lib/openat-priv.h.
74375         (Depends-on): Add at-internal, dosname, errno, fchdir, openat-die,
74376         openat-h, save-cwd. Remove fcntl-h, openat.
74377         * modules/fchmodat (Files): Remove lib/openat.h.
74378         (Depends-on): Add at-internal, openat-h. Remove dirent, fcntl-h,
74379         openat, stdbool, unistd.
74380         * modules/fchownat (Files): Remove lib/openat.h.
74381         (Depends-on): Add at-internal, openat-h. Remove dirent, fcntl-h,
74382         openat, stdbool, sys_stat.
74383         * modules/fdopendir (Files): Remove lib/openat-priv.h,
74384         lib/openat-proc.c.
74385         (Depends-on): Add at-internal.
74386         (condigure.ac): Remove AC_LIBOBJ of openat-proc.
74387         * modules/fstatat (Files): Remove lib/openat.h.
74388         (Depends-on): Add at-internal, openat-h. Remove dirent, openat,
74389         stdbool, unistd.
74390         * modules/fts (Depends-on): Add openat-h.
74391         * modules/linkat (Depends-on): Add at-internal, openat-h. Remove
74392         openat.
74393         * modules/mkdirat (Files): Remove lib/openat.h.
74394         (Depends-on): Add at-internal, openat-h. Remove dirent, fcntl-h,
74395         openat, stdbool, sys_stat.
74396         * modules/mkfifoat (Files): Add lib/at-func.c.
74397         (Depends-on): Add at-internal, dosname, errno, fchdir, openat-die,
74398         openat-h, save-cwd. Remove fcntl-h, openat.
74399         * modules/openat-die (Depends-on): Add openat-h. Remove openat.
74400         * modules/readlinkat (Files): Add lib/at-func.c.
74401         (Depends-on): Add at-internal, dosname, errno, fchdir, openat-die,
74402         openat-h, save-cwd. Remove fcntl-h, openat.
74403         * modules/renameat (Depends-on): Add at-internal, openat-h. Remove
74404         openat.
74405         * modules/selinux-at (Files): Add lib/at-func.c.
74406         (Depends-on): Add at-internal, dosname, errno, extensions, fchdir,
74407         fcntl-h, openat-die, openat-h, save-cwd, unistd. Remove openat.
74408         * modules/symlinkat (Files): Add lib/at-func.c.
74409         (Depends-on): Add at-internal, dosname, errno, fchdir, openat-die,
74410         openat-h, save-cwd. Remove fcntl-h, openat.
74411         * modules/unlinkat (Files): Remove lib/openat.h.
74412         (Depends-on): Add at-internal, openat-h. Remove dirent, openat,
74413         stdbool.
74414         * modules/utimensat (Files): Add lib/at-func.c.
74415         (Depends-on): Add at-internal, dosname, errno, fchdir, fcntl-h,
74416         openat-die, openat-h, save-cwd.
74417         * modules/fchownat-tests (Depends-on): Add openat-h. Remove openat.
74418         * modules/fdutimensat-tests (Depends-on): Add openat.
74419         * modules/fstatat-tests (Depends-on): Add openat-h.
74420         * modules/readlinkat-tests (Depends-on): Add openat.
74421         * modules/symlinkat-tests (Depends-on): Add openat.
74423 2011-11-05  Bruno Haible  <bruno@clisp.org>
74425         openat: Include <stdbool.h>.
74426         * lib/openat.c: Include <stdbool.h>.
74428 2011-11-04  Bruno Haible  <bruno@clisp.org>
74430         fchownat, renameat, unlinkat: Fix dependencies.
74431         * modules/fchownat (Depends-on): Add fstatat.
74432         * modules/renameat (Depends-on): Likewise.
74433         * modules/unlinkat (Depends-on): Likewise.
74435 2011-11-04  Paul Eggert  <eggert@cs.ucla.edu>
74437         openat: remove direct dependency on dirent
74438         * lib/openat.h: Don't include <dirent.h>; it's no longer needed,
74439         and hasn't been needed ever since fdopendir was split into its own
74440         module on 2009-08-31.
74441         * modules/openat (Depends-on): Remove dirent.
74443 2011-11-04  Bruno Haible  <bruno@clisp.org>
74445         renameat: Optimize code size.
74446         * modules/renameat (configure.ac): Don't compile at-func2.c if
74447         REPLACE_RENAMEAT is 1.
74449 2011-11-04  Bruno Haible  <bruno@clisp.org>
74451         openat tests: Fix file list.
74452         * modules/openat-tests (Files): Add tests/test-open.h.
74454 2011-11-04  Bruno Haible  <bruno@clisp.org>
74456         openat, fchmodat, fchownat, linkat, renameat: Fix dependencies.
74457         * modules/fchmodat (Depends-on): Add openat-die.
74458         * modules/fchownat (Depends-on): Likewise.
74459         * modules/linkat (Depends-on): Likewise.
74460         * modules/renameat (Depends-on): Likewise.
74461         * modules/openat (Depends-on): Add dirent.
74463 2011-11-04  Jim Meyering  <meyering@redhat.com>
74465         at-func*.c: fix comments
74466         * lib/at-func2.c: Correct/improve first-line comment.
74467         * lib/at-func.c: Correct grammar in first-line comment.
74469 2011-11-04  Bruno Haible  <bruno@clisp.org>
74471         New module 'mkdirat', split off from module 'openat'.
74472         * m4/mkdirat.m4: New file. extracted from m4/openat.m4.
74473         * m4/openat.m4 (gl_FUNC_OPENAT): Don't require gl_SYS_STAT_H_DEFAULTS.
74474         Don't test for mkdirat. Don't set GNULIB_MKDIRAT, HAVE_MKDIRAT.
74475         * modules/mkdirat: New file, extracted from modules/openat.
74476         * modules/openat (Files): Remove lib/mkdirat.c.
74477         (Depends-on): Remove mkdir.
74478         (configure.ac): Remove AC_LIBOBJ of mkdirat.
74479         (Include): Remove <sys/stat.h>.
74480         * modules/mkdirat-tests: New file, extracted from modules/openat-tests.
74481         * modules/openat-tests (Files): Remove tests/test-mkdirat.c,
74482         tests/test-mkdir.h.
74483         (Depends-on): Remove ignore-value.
74484         (Makefile.am): Remove rules for test-mkdirat.
74485         * doc/posix-functions/mkdirat.texi: Mention module 'mkdirat' instead
74486         of module 'openat'.
74487         * NEWS: Mention the change.
74489 2011-11-04  Bruno Haible  <bruno@clisp.org>
74491         closedir: Avoid warning on mingw.
74492         * lib/closedir.c: Include <unistd.h>.
74494 2011-11-04  Bruno Haible  <bruno@clisp.org>
74496         New module 'fstatat', split off from module 'openat'.
74497         * lib/openat.h (statat, lstatat): Enable only if GNULIB_FSTATAT is
74498         defined.
74499         * m4/fstatat.m4: New file. extracted from m4/openat.m4.
74500         * m4/openat.m4 (gl_FUNC_OPENAT): Don't set GNULIB_FSTATAT. Don't invoke
74501         gl_FUNC_FSTATAT.
74502         (gl_FUNC_FSTATAT): Moved to m4/fstatat.m4.
74503         * modules/fstatat: New file, extracted from modules/openat.
74504         * modules/openat (Files): Remove lib/fstatat.c.
74505         (Depends-on): Remove lstat.
74506         (configure.ac): Remove AC_LIBOBJ of fstatat.
74507         * modules/fstatat-tests: New file, extracted from modules/openat-tests.
74508         * modules/openat-tests (Files): Remove tests/test-fstatat.c,
74509         tests/test-lstat.h, tests/test-stat.h.
74510         (Depends-on): Remove getcwd-lgpl.
74511         (Makefile.am): Remove rules for test-fstatat.
74512         * doc/posix-functions/fstatat.texi: Mention module 'fstatat' instead
74513         of module 'openat'.
74514         * NEWS: Mention the change.
74515         * modules/getcwd (Depends-on): Add fstatat.
74516         * modules/linkat (Depends-on): Likewise.
74517         * modules/mkfifoat-tests (Depends-on): Likewise.
74518         * modules/utimensat (Depends-on): Add fstatat. Remove openat.
74520 2011-11-03  Bruno Haible  <bruno@clisp.org>
74522         New module 'unlinkat', split off from module 'openat'.
74523         * m4/unlinkat.m4: New file, extracted from m4/openat.m4.
74524         * m4/openat.m4 (gl_FUNC_OPENAT): Don't set GNULIB_UNLINKAT,
74525         REPLACE_UNLINKAT, HAVE_UNLINKAT. Don't test for unlinkat.
74526         * modules/unlinkat: New file, extracted from modules/openat. Correct
74527         the dependency conditions.
74528         * modules/openat (Files): Remove lib/unlinkat.c.
74529         (Depends-on): Remove rmdir, unlink.
74530         (configure.ac): Remove AC_LIBOBJ of unlinkat.
74531         * modules/unlinkat-tests: New file, extracted from modules/openat-tests.
74532         * modules/openat-tests (Files): Remove tests/test-unlinkat.c,
74533         tests/test-rmdir.h, tests/test-unlink.h.
74534         (Depends-on): Remove unlinkdir.
74535         (Makefile.am): Remove rules for test-unlinkat.
74536         * doc/posix-functions/unlinkat.texi: Mention module 'unlinkat' instead
74537         of module 'openat'.
74538         * NEWS: Mention the change.
74539         * modules/linkat-tests (Depends-on): Add unlinkat.
74540         * modules/mkfifoat-tests (Depends-on): Likewise.
74541         * modules/readlinkat-tests (Depends-on): Likewise.
74543 2011-11-02  Bruno Haible  <bruno@clisp.org>
74545         New module 'fchmodat', split off from module 'openat'.
74546         * lib/openat.h (chmodat, lchmodat): Enable only if GNULIB_FCHMODAT is
74547         defined.
74548         * m4/fchmodat.m4: New file, extracted from m4/openat.m4.
74549         * m4/openat.m4 (gl_FUNC_OPENAT): Don't set GNULIB_FCHMODAT. Don't test
74550         for fchmodat, lchmod. Don't set HAVE_FCHMODAT.
74551         * modules/fchmodat: New file, extracted from modules/openat.
74552         * modules/openat (Files): Remove lib/fchmodat.c.
74553         (configure.ac): Remove AC_LIBOBJ of fchmodat.
74554         * modules/fchmodat-tests: New file, extracted from modules/openat-tests.
74555         * modules/openat-tests (Files): Remove tests/test-fchmodat.c.
74556         (Makefile.am): Remove rules for test-fchmodat.
74557         * doc/posix-functions/fchmodat.texi: Mention module 'fchmodat' instead
74558         of module 'openat'.
74559         * NEWS: Mention the change.
74561 2011-11-02  Jim Meyering  <meyering@redhat.com>
74563         putenv: indent #definition of "environ" to placate cppi
74564         * lib/putenv.c (environ): Make indentation reflect cpp nesting.
74566         gitlog-to-changelog: provide a ChangeLog-repair mechanism
74567         Git logs are often treated as immutable, because editing them
74568         changes the SHA1 checksums of all descendants.  Thus, errors in
74569         git logs tend to stay there forever.  However, when we generate
74570         a ChangeLog file -- typically for distribution -- from that git log,
74571         we can actually make corrections in the generated file.  The key
74572         lies in recording in machine-readable/applicable form the desired
74573         corrections.  See --help for description and an example.
74574         * build-aux/gitlog-to-changelog (parse_amend_file): New function.
74575         (usage): Describe it; alphabetize option descriptions.
74576         (main): Honor the new option, carefully.
74578 2011-11-01  Jim Meyering  <meyering@redhat.com>
74580         gitlog-to-changelog: avoid an infloop
74581         * build-aux/gitlog-to-changelog: Don't infloop for a commit log
74582         that ends up being empty.
74584 2011-11-01  Paul Eggert  <eggert@cs.ucla.edu>
74586         * MODULES.html.sh: Fix sed-script shell quoting and locale issues.
74587         (func_module): Replace foo=` ... sed -e COMPLICATED ... ` with
74588         bar=COMPLICATED; foo=` ... sed -e "$bar" ... ` when COMPLICATED
74589         contains (possibly-quoted) backslashes.  This should avoid
74590         all-too-common shell bugs if COMPLICATED contains backslashes in
74591         the "wrong" places.  Reported by David Evans in
74592         <http://lists.gnu.org/r/bug-gnulib/2011-11/msg00013.html>.
74593         When 'sed' uses character ranges like A-Z, invoke it in the C locale,
74594         because we want ASCII ranges.  Is there some reason we don't use
74595         the C locale everywhere in this script?
74596         (func_module, top level): Avoid unwanted pathname expansion when
74597         $repo_url_prefix or $repo_url_suffix_repl contain shell
74598         metacharacters like '?' and '*'.
74600 2011-11-01  Bruno Haible  <bruno@clisp.org>
74602         fchownat: Improve description.
74603         * modules/fchownat (Description): Add link to function.
74605 2011-11-01  Paul Eggert  <eggert@cs.ucla.edu>
74607         * tests/test-stdalign.c (TEST_ALIGNMENT): Shrink back to 8.
74608         mingw supports alignments only up to 8 (!).  Reported by Bruno Haible in
74609         <http://lists.gnu.org/r/bug-gnulib/2011-11/msg00006.html>.
74610         * doc/posix-headers/stdalign.texi (stdalign.h): Document this.
74612 2011-11-01  Bruno Haible  <bruno@clisp.org>
74614         alignof: Avoid collision with stdalign module.
74615         * lib/alignof.h (alignof): Remove macro.
74616         * NEWS: Mention the change.
74617         Reported by Paul Eggert.
74619 2011-11-01  Bruno Haible  <bruno@clisp.org>
74621         New module 'fchownat', split off from module 'openat'.
74622         * lib/openat.h (chownat, lchownat): Enable only if GNULIB_FCHOWNAT is
74623         defined.
74624         * m4/fchownat.m4: New file, extracted from m4/openat.m4.
74625         * m4/openat.m4 (gl_FUNC_OPENAT): Don't set GNULIB_FCHOWNAT. Don't
74626         invoke gl_FUNC_FCHOWNAT.
74627         (gl_FUNC_FCHOWNAT_DEREF_BUG, gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG,
74628         gl_FUNC_FCHOWNAT): Moved to m4/fchownat.m4.
74629         * modules/fchownat: New file, extracted from modules/openat.
74630         * modules/openat (Files): Remove lib/fchownat.c.
74631         (Depends-on): Remove lchown.
74632         (configure.ac): Remove AC_LIBOBJ of fchownat.
74633         * modules/fchownat-tests: New file, extracted from modules/openat-tests.
74634         * modules/openat-tests (Files): Remove tests/test-fchownat.c,
74635         tests/test-chown.h, tests/test-lchown.h, tests/nap.h.
74636         (Depends-on): Remove mgetgroups, usleep, stat-time.
74637         (configure.ac): Remove test for getegid.
74638         (Makefile.am): Remove rules for test-fchownat.
74639         * doc/posix-functions/fchownat.texi: Mention module 'fchownat' instead
74640         of module 'openat'.
74641         * NEWS: Mention the change.
74643 2011-10-31  Paul Eggert  <eggert@cs.ucla.edu>
74645         stdalign: port better to MSVC and to Sun C 5.11
74646         This fixes some of the problems reported by Bruno Haible in
74647         <http://lists.gnu.org/r/bug-gnulib/2011-10/msg00300.html>.
74648         * doc/posix-headers/stdalign.texi (stdalign.h): Document more
74649         shortcomings of MSVC and of Sun C 5.11.
74650         * lib/stdalign.in.h (_Alignas): Omit bogus extra parenthesis
74651         around __declspec arg.
74652         * modules/stdalign-tests (Files): Add tests/macros.h.
74653         * tests/test-stdalign.c: Do not include <stdlib.h>; no longer needed.
74654         Include macros.h, for ASSERT.
74655         (DECLARE_ALIGNED): Remove.
74656         (TEST_ALIGNMENT): Define to 16 if alignment is supported (more likely
74657         to catch bug), and to 1 if not (simplifies the rest of the code).
74658         (CHECK_STATIC): Always declare the alignment test vars; that's simpler.
74659         (CHECK_AUTO): Remove.
74660         (CHECK_ALIGNED): Check only the alignment of the static vars,
74661         since auto var alignment isn't supported by Sun C 5.11.
74662         (CHECK_TYPES): Remove.  All uses replaced by inline code, so that
74663         ASSERT failures are easier to diagnose.
74665 2011-10-31  Bruno Haible  <bruno@clisp.org>
74667         doc about some IRIX 5.3 problems.
74668         * doc/posix-functions/getpwnam_r.texi: Mention incompatible declaration
74669         on IRIX 5.3.
74670         * doc/posix-headers/poll.texi: Mention missing nfds_t on IRIX 5.3.
74671         * doc/posix-functions/ptsname.texi: Mention missing declaration on IRIX
74672         5.3.
74673         * doc/posix-functions/grantpt.texi: Likewise.
74674         * doc/posix-functions/unlockpt.texi: Likewise.
74675         * doc/posix-functions/lgamma.texi: Likewise.
74676         * doc/posix-functions/nextafter.texi: Likewise.
74677         * doc/posix-functions/remainder.texi: Likewise.
74678         * doc/posix-functions/select.texi: Mention misplaced declaration on
74679         IRIX 5.3.
74680         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
74682 2011-10-31  Dmitry V. Levin  <ldv@altlinux.org>
74684         gitlog-to-changelog: fix git-log invocation.
74685         git-log mishandles date strings before 1970-01-01 UTC, and there is
74686         no use to specify --since=1970-01-01 by default anyway.
74687         * build-aux/gitlog-to-changelog: By default, when no --since option
74688         was given, do not specify explicit --since option to git-log.
74690 2011-10-30  Dmitry V. Levin  <ldv@altlinux.org>
74692         gitlog-to-changelog: new option --append-dot.
74693         * build-aux/gitlog-to-changelog: New option --append-dot, makes the
74694         first non-blank line of each commit message terminated with a dot.
74696 2011-10-30  Bruno Haible  <bruno@clisp.org>
74698         ffsl, ffsll: Avoid compilation error due to 'restrict'.
74699         * lib/ffsl.h: Include <config.h>.
74700         Suggested by Tom G. Christensen <tgc@jupiterrise.com>.
74702 2011-10-30  Jim Meyering  <meyering@redhat.com>
74704         GNUmakefile: reenable "make syntax-check" for most projects
74705         Since Friday's commit 05e2d798, "maint.mk: don't maintain a second
74706         build-aux variable", "syntax-check" would do nothing but succeed with
74707         the "No version control files detected..." diagnostic (unless you
74708         happened to override _build-aux via cfg.mk).
74709         * top/GNUmakefile (_autoreconf, _build-aux): Move default definitions
74710         to precede inclusion of maint.mk.  Otherwise, these variables would
74711         be used undefined in any project that does not override the default.
74713 2011-10-29  Dmitry V. Levin  <ldv@altlinux.org>
74715         gitlog-to-changelog: treat a message with only blank lines as empty.
74716         * build-aux/gitlog-to-changelog: Move the code that removes leading and
74717         trailing blank lines before the code that issues a warning about an
74718         empty commit message.
74720 2011-10-30  Jim Meyering  <meyering@redhat.com>
74722         test-parse-datetime.c: avoid new DST-related false positive test failure
74723         * tests/test-parse-datetime.c (gmt_offset): Determine the "gmt_offset"
74724         based on the time/date we'll convert, not the current time.
74725         Otherwise, the moment we cross a DST boundary like today's in
74726         Europe, (CEST to CET), that offset ends up being one hour off.
74728 2011-10-27  Bruno Haible  <bruno@clisp.org>
74730         fstat: Tweak documentation.
74731         * modules/fstat (Description): More precise description.
74733 2011-10-27  Bruno Haible  <bruno@clisp.org>
74735         Update documentation regarding 'largefile' module.
74736         * doc/posix-functions/fstat.texi: Tweak wording.
74737         * doc/posix-functions/opendir.texi: Mention that the module fixes the
74738         problems with huge directories and/or small ino_t types.
74739         * doc/posix-functions/readdir.texi: Likewise.
74740         * doc/posix-functions/rewinddir.texi: Likewise.
74742 2011-10-28  Gary V. Vaughan  <gary@gnu.org>
74744         maint.mk: don't maintain a second build-aux variable.
74745         * maint.mk (build_aux): Removed.  The maintainer-makefile module
74746         depends on GNUmakefile, which already maintains a cfg.mk
74747         overridable $(_build-aux) for projects with a non-standard
74748         build-aux directory location, although without the $(srcdir)
74749         prefix.  Use that variable consistently instead of introducing a
74750         second one.  Adjust all call sites.
74752 2011-10-27  Paul Eggert  <eggert@cs.ucla.edu>
74754         Add stdalign module and use it in other modules.
74755         This is based on a previous proposal by Bruno Haible
74756         <https://lists.gnu.org/r/bug-gnulib/2011-07/msg00226.html>.
74758         stdalign: new module
74759         * doc/posix-headers/stdalign.texi, lib/stdalign.in.h, m4/stdalign.m4:
74760         * modules/stdalign: New files.
74761         * MODULES.html.sh (c1x_core_properties): Add stdalign.
74762         * doc/gnulib.texi (Header File Substitutes): Add stdalign.
74764         stdalign-tests: new module
74765         * modules/stdalign-tests, tests/test-stdalign.c: New files.
74767         argp: use stdalign
74768         * lib/argp-parse.c: Include <stdalign.h>.
74769         (alignof): Remove.
74770         * modules/argp (Depends-on): Add stdalign.
74772         crypto libraries: use stdalign
74773         * lib/md4.c, lib/md5.c, lib/sha1.c, lib/sha256.c, lib/sha512.c:
74774         Include <stdalign.h> and <stdint.h>.  Do not include <stddef.h>.
74775         Do not include <stdlib.h> twice, in md4.c.
74776         (UNALIGNED_P): Simplify by using alignof.  Use uintptr_t, not size_t,
74777         because we are accessing a pointer's bit-pattern, not a size.
74778         * modules/crypto/gc-md4 (Depends-on): Add stdalign.
74779         * modules/crypto/gc-md5, modules/crypto/gc-sha1, modules/crypto/md4:
74780         * modules/crypto/md5, modules/crypto/sha1, modules/crypto/sha256:
74781         * modules/crypto/sha512: Likewise.
74783         sys_socket: use stdalign, not alignof
74784         * lib/sys_socket.in.h: Include <stdalign.h> instead of <alignof.h>.
74785         * modules/sys_socket (Depends-on): Depend on stdalign, not alignof.
74787 2011-10-27  Bruno Haible  <bruno@clisp.org>
74789         raise test: Avoid a test failure on Linux/MIPS.
74790         * tests/test-raise.c (main): Try raising signal 199, not 99. Needed
74791         because 99 is a valid signal on Linux/MIPS.
74793 2011-10-27  Bruno Haible  <bruno@clisp.org>
74795         nonblocking tests: Fix test failure on Linux/MIPS.
74796         * tests/test-nonblocking-pipe.h (PIPE_DATA_BLOCK_SIZE) [Linux/MIPS]:
74797         Set to 270000.
74799 2011-10-27  Bruno Haible  <bruno@clisp.org>
74801         utimensat: Work around problem on Linux/hppa.
74802         * lib/utimensat.c (rpl_utimensat) [Linux/hppa]: Reject invalid tv_nsec
74803         values.
74804         * doc/posix-functions/utimensat.texi: Mention the problem on Linux/hppa.
74806 2011-10-25  Jim Meyering  <meyering@redhat.com>
74808         maint.mk: fix a bug in sc_prohibit_stddef_without_use
74809         * top/maint.mk (sc_prohibit_stddef_without_use): Don't require / *\(/
74810         after symbols like NULL, size_t, etc.
74811         Reported by Alfred M. Szmidt.
74813         maint.mk: exempt ENODATA from a syntax-check rule
74814         * top/maint.mk (gl_extract_significant_defines_): Also exempt ENODATA
74815         from the sc_prohibit_always-defined_macros syntax-check rule.
74816         Add a comment.  See this for more details:
74817         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/28739/focus=28795
74819 2011-10-23  Jim Meyering  <meyering@redhat.com>
74821         fts: close parent dir FD before returning from post-traversal fts_read
74822         The problem: the fts-using "mkdir -p A/B; rm -rf A" would attempt to
74823         unlink A, even though an FD open on A remained.  This is suboptimal
74824         (holding a file descriptor open longer than needed), but otherwise not
74825         a problem on Unix-like kernels.  However, on Cygwin with certain Novell
74826         file systems, (see http://cygwin.com/ml/cygwin/2011-10/msg00365.html),
74827         that represents a real problem: it causes the removal of A to fail
74828         with e.g., "rm: cannot remove `A': Device or resource busy"
74830         fts visits each directory twice and keeps a cache (fts_fd_ring) of
74831         directory file descriptors.  After completing the final, FTS_DP,
74832         visit of a directory, RESTORE_INITIAL_CWD intended to clear the FD
74833         cache, but then proceeded to add a new FD to it via the subsequent
74834         FCHDIR (which calls cwd_advance_fd and i_ring_push).  Before, the
74835         final file descriptor would be closed only via fts_close's call to
74836         fd_ring_clear.  Now, it is usually closed earlier, via the final
74837         FTS_DP-returning fts_read call.
74838         * lib/fts.c (restore_initial_cwd): New function, converted from
74839         the macro.  Call fd_ring_clear *after* FCHDIR, not before it.
74840         Update callers.
74841         Reported by Franz Sirl via the above URL, with analysis by Eric Blake
74842         in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/28739
74844 2011-10-23  Gary V. Vaughan  <gary@gnu.org>
74845             Bruno Haible  <bruno@clisp.org>
74846             Jim Meyering  <jim@meyering.net>
74848         readme-release: improve safety of release prep instructions.
74849         * README-release: Don't git pull all branches when only master
74850         is needed for the release process.
74851         Run make maintainer-clean before changing trees and merging.
74852         Don't try to run ./configure right after git pull in case files
74853         that influence the bootstrap process have changed, move the
74854         ./configure step to after running ./bootstrap.
74855         Don't bootstrap "one last time"... it's the first time!
74857 2011-10-22  Bruno Haible  <bruno@clisp.org>
74859         errno, strerror-override: Support for MSVC 10.
74860         * lib/errno.in.h (GNULIB_defined_ETXTBSY): Remove macro.
74861         (ENOMSG, EIDRM, ENOLINK, EPROTO, EBADMSG, EOVERFLOW, ENOTSUP,
74862         ENETRESET, ECONNABORTED, ECANCELED, EINPROGRESS, EALREADY, ENOTSOCK,
74863         EDESTADDRREQ, EMSGSIZE, EPROTOTYPE, ENOPROTOOPT, EPROTONOSUPPORT,
74864         EOPNOTSUPP, EAFNOSUPPORT, EADDRINUSE, EADDRNOTAVAIL, ENETDOWN,
74865         ENETUNREACH, ECONNRESET, ENOBUFS, EISCONN, ENOTCONN, ETIMEDOUT,
74866         ECONNREFUSED, ELOOP, EHOSTUNREACH, EWOULDBLOCK, ETXTBSY) [Win32]:
74867         Assign values compatible with MSVC 10.
74868         (ENODATA, ENOSR, ENOSTR, ENOTRECOVERABLE, EOWNERDEAD, ETIME, EOTHER):
74869         New macros.
74870         (GNULIB_defined_EWINSOCK): New macro.
74871         * lib/strerror-override.c (strerror_override): Update accordingly.
74872         * lib/strerror-override.h: Likewise.
74873         * lib/w32sock.h (set_winsock_errno): Map those WSA* values that are no
74874         longer equal to the corresponding errno value.
74875         Reported by Michael Goffioul <michael.goffioul@gmail.com>.
74877 2011-10-22  Bruno Haible  <bruno@clisp.org>
74879         perror: Recognize when test program crashes.
74880         * m4/perror.m4 (gl_FUNC_PERROR): If the test program crashes due to
74881         strerror, set gl_cv_func_perror_works to no.
74882         Reported by Daniel Richard G. <skunk@iskunk.org>.
74884         perror: Fix indentation.
74885         * m4/perror.m4 (gl_FUNC_PERROR): Fix indentation.
74887 2011-10-22  Bruno Haible  <bruno@clisp.org>
74889         isfinite, isinf, isnan, signbit: Don't define as a macro in C++.
74890         * lib/math.in.h (_GL_MATH_CXX_REAL_FLOATING_DECL_1,
74891         _GL_MATH_CXX_REAL_FLOATING_DECL_2): nEW MACROS.
74892         (isfinite, isinf, isnan, signbit): In C++, define as overloaded
74893         functions, not as a macro.
74894         * tests/test-math-c++.cc (REAL_FLOATING_CHECK, OVERLOADED_CHECK): New
74895         macros.
74896         (isfinite, isinf, isnan, signbit): Check overloaded functions and
74897         absence of macro.
74898         Suggested by Eric Blake.
74899         Reported by Michael Goffioul <michael.goffioul@gmail.com>.
74901 2011-10-21  Bruno Haible  <bruno@clisp.org>
74903         relocatable-prog-wrapper: Don't leave object files behind.
74904         * build-aux/install-reloc: Re-synchronize list of .o files to be
74905         removed with list of compilation units.
74907 2011-10-20  Bruno Haible  <bruno@clisp.org>
74909         openpty, posix_openpt: Remove code duplication.
74910         * lib/posix_openpt.c: Add comments about platforms, from lib/openpty.c.
74911         * lib/openpty.c: Include <stdlib.h>.
74912         (openpty): Use posix_openpt on all platforms except IRIX.
74913         * modules/openpty (Depends-on): Add posix_openpt. Add conditions.
74915 2011-10-20  Bruno Haible  <bruno@clisp.org>
74917         unlockpt: Detect invalid argument.
74918         * lib/unlockpt.c: Include <fcntl.h>.
74919         (unlockpt): Check whether fd is valid, using fcntl().
74920         * modules/unlockpt (Depends-on): Add fcntl-h.
74922 2011-10-20  Bruno Haible  <bruno@clisp.org>
74924         openpty: Avoid compilation error on AIX 6.1.
74925         * lib/pty.in.h [AIX]: Include <sys/ioctl.h>, for 'struct winsize'.
74927 2011-10-20  Bruno Haible  <bruno@clisp.org>
74929         posix_openpt: Support for OpenBSD.
74930         * lib/posix_openpt.c [OpenBSD]: Include <sys/ioctl.h>, <sys/tty.h>.
74931         (posix_openpt) [OpenBSD]: New code.
74932         * lib/grantpt.c: Include <fcntl.h>.
74933         (grantpt) [OpenBSD]: Only test whether fd is valid, nothing else.
74934         * modules/grantpt (Depends-on): Add fcntl-h.
74936 2011-10-20  Bruno Haible  <bruno@clisp.org>
74938         posix_openpt test: Coding style.
74939         * tests/test-posix_openpt.c: Use GNU coding style.
74941 2011-10-20  Bruno Haible  <bruno@clisp.org>
74943         grantpt: Support --avoid=pt_chown.
74944         * modules/grantpt (Files): Add lib/pty-private.h.
74946 2011-10-20  Bruno Haible  <bruno@clisp.org>
74948         posix_openpt: Fix autoconf macro.
74949         * m4/posix_openpt.m4 (gl_FUNC_POSIX_OPENPT): Fix variable name. Remove
74950         unneeded check for _getpty.
74952 2011-10-20  Bruno Haible  <bruno@clisp.org>
74954         openpty: Update comments.
74955         * lib/openpty.c: Add comments about Minix.
74957 2011-10-19  Eric Blake  <eblake@redhat.com>
74959         openpty: relax license
74960         * modules/openpty (License): Change from LGPLv3+ to LGPLv2+.
74962         pt_chown: use configmake to simplify build
74963         * modules/pt_chown (Makefile.am): Drop line guaranteed by configmake.
74965         ptsname and others: relax license
74966         * modules/grantpt (License): Change from LGPLv3+ to LGPLv2+.
74967         * modules/unlockpt (License): Likewise.
74968         * modules/pt_chown (License): Likewise.
74969         * modules/ptsname (License): Likewise.
74970         * modules/ttyname_r (License): Likewise.
74972 2011-10-19  Jim Meyering  <meyering@redhat.com>
74974         posix_openpt: remove spurious #endif
74975         * lib/posix_openpt.c (posix_openpt): Remove spurious #endif.
74977 2011-10-19  Gary V. Vaughan  <gary@gnu.org>
74979         maint.mk: Respect $(build_aux) in web-manual rule.
74980         * top/maint.mk (web-manual): Find gen-announce script in user's
74981         $(build_aux) directory instead of hard-coding 'build-aux'.
74983 2011-10-19  Bruno Haible  <bruno@clisp.org>
74985         posix_openpt: Fix compilation error.
74986         * lib/posix_openpt.c (posix_openpt): Renamed from posix_openpty.
74987         * doc/posix-functions/posix_openpt.texi: Mention ENOENT error code.
74988         Mention the openpty module as an alternative.
74990 2011-10-19  Bruno Haible  <bruno@clisp.org>
74992         Support for old NeXTstep 3.3 frexp().
74993         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Check for alarm. Limit the
74994         execution time of the test to 5 seconds.
74995         Reported by Daniel Richard G. <skunk@iskunk.org>.
74997 2011-10-19  Bruno Haible  <bruno@clisp.org>
74999         Support for old NeXTstep 3.3 sed.
75000         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER_ONE): In the sed address
75001         part, use /.../, not \|...|. Escape periods in the header file name.
75002         * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Likewise.
75003         Reported by Daniel Richard G. <skunk@iskunk.org>.
75005 2011-10-18  Daniel Richard G.  <skunk@iskunk.org>  (tiny change)
75007         Support for old NeXTstep 3.3 gcc.
75008         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Write
75009         'defined __STRICT_ANSI__', not '__STRICT_ANSI__'.
75010         * lib/math.in.h (_GL_NUM_UINT_WORDS etc.): Likewise.
75011         * lib/spawn.in.h (_Restrict_arr_): Likewise.
75012         * lib/regex.h (_Restrict_arr_): Likewise.
75013         * lib/regex_internal.h (re_token_t): Likewise.
75014         * lib/regexec.c (check_node_accept_bytes): Likewise.
75015         * tests/test-printf-posix.c (func1, func2, func3, func4): Likewise.
75017 2011-10-18  Eric Blake  <eblake@redhat.com>
75019         posix_openpt: new module
75020         * modules/posix_openpt: New module.
75021         * m4/posix_openpt.m4: New file.
75022         * lib/posix_openpt.c: Likewise.
75023         * m4/stdlib_h.m4 (gl_STDLIB_H): Check for decl.
75024         (gl_STDLIB_H_DEFAULTS): Set defaults.
75025         * modules/stdlib (Makefile.am): Substitute macros.
75026         * lib/stdlib.in.h (posix_openpt): Declare.
75027         * MODULES.html.sh (systems lacking POSIX:2008): Document it.
75028         * doc/posix-functions/posix_openpt.texi (posix_openpt): Likewise.
75029         * modules/posix_openpt-tests: New test module.
75030         * tests/test-posix_openpt.c: New test.
75032 2011-10-15  Bruno Haible  <bruno@clisp.org>
75034         xstrtoll: Fix compilation failure.
75035         * lib/xstrtol.c (ULLONG_MAX, LLONG_MAX, LLONG_MIN): New macros, taken
75036         from lib/strtol.c.
75037         * doc/posix-headers/limits.texi: Mention missing numerical limits on
75038         some platforms.
75039         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
75041 2011-10-15  Bruno Haible  <bruno@clisp.org>
75043         vasnprintf: Optimize bit search operation.
75044         * lib/vasnprintf.c (divide): Use optimizations from integer_length.c.
75045         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Require
75046         gl_DOUBLE_EXPONENT_LOCATION.
75047         * modules/vasnprintf (Files): Add m4/exponentd.m4.
75048         * modules/unistdio/u8-vasnprintf (Files): Likewise.
75049         * modules/unistdio/u8-u8-vasnprintf (Files): Likewise.
75050         * modules/unistdio/u16-vasnprintf (Files): Likewise.
75051         * modules/unistdio/u16-u16-vasnprintf (Files): Likewise.
75052         * modules/unistdio/u32-vasnprintf (Files): Likewise.
75053         * modules/unistdio/u32-u32-vasnprintf (Files): Likewise.
75054         * modules/unistdio/ulc-vasnprintf (Files): Likewise.
75055         * m4/isnand.m4 (gl_PREREQ_ISNAND): Use AC_REQUIRE.
75057 2011-10-15  Bruno Haible  <bruno@clisp.org>
75059         vasnprintf: Fix comments.
75060         * lib/vasnprintf.c (decode_long_double, decode_double): Fix comments.
75062 2011-10-14  Bruno Haible  <bruno@clisp.org>
75064         Tests for module 'integer_length_ll'.
75065         * modules/integer_length_ll-tests: New file.
75066         * tests/test-integer_length_ll.c: New file.
75068         New module 'integer_length_ll'.
75069         * lib/integer_length_ll.c: New file.
75070         * modules/integer_length_ll: New file.
75072 2011-10-14  Bruno Haible  <bruno@clisp.org>
75074         Tests for module 'integer_length_l'.
75075         * modules/integer_length_l-tests: New file.
75076         * tests/test-integer_length_l.c: New file.
75078         New module 'integer_length_l'.
75079         * lib/integer_length_l.c: New file.
75080         * modules/integer_length_l: New file.
75082 2011-10-14  Bruno Haible  <bruno@clisp.org>
75084         Tests for module 'integer_length'.
75085         * modules/integer_length-tests: New file.
75086         * tests/test-integer_length.c: New file.
75088         New module 'integer_length'.
75089         * lib/integer_length.h: New file.
75090         * lib/integer_length.c: New file.
75091         * modules/integer_length: New file.
75093 2011-10-14  Daniel Richard G.  <skunk@iskunk.org>  (tiny change)
75095         popen: Fix dependency conditions.
75096         * modules/popen (Depends-on, configure.ac): Fix shell syntax error.
75098 2011-10-14  Daniel Richard G.  <skunk@iskunk.org>  (tiny change)
75100         perror: Fix autoconf test.
75101         * m4/perror.m4 (gl_FUNC_PERROR): In the test program, include
75102         <stdlib.h> and <string.h>.
75104 2011-10-14  Bruno Haible  <bruno@clisp.org>
75106         ffsl: Optimize on 64-bit platforms.
75107         * lib/ffsl.h (FUNC): Omit a test from the last loop round. Do loop
75108         unrolling.
75110 2011-10-13  Bruno Haible  <bruno@clisp.org>
75112         ffsl: Optimize on 32-bit platforms.
75113         * lib/ffsl.h (FUNC): If TYPE has the same representation as 'int', just
75114         use ffs() without a loop.
75116         ffsl, ffsll: Optimize for GCC.
75117         * lib/ffsl.h (FUNC): Use GCC_BUILTIN if defined.
75118         * lib/ffsl.c (GCC_BUILTIN): New macro.
75119         * lib/ffsll.c (GCC_BUILTIN): Likewise.
75121 2011-10-13  Bruno Haible  <bruno@clisp.org>
75123         ffs, bcopy, memset: Support symbol renaming via config.h.
75124         * lib/ffs.c: Include <config.h>.
75125         * lib/bcopy.c: Likewise.
75126         * lib/memset.c: Likewise.
75128 2011-10-10  Bruno Haible  <bruno@clisp.org>
75130         atanl: Simplify for platforms where 'long double' == 'double'.
75131         * lib/atanl.c (atanl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New
75132         alternative implementation.
75133         * m4/atanl.m4 (gl_FUNC_ATANL): Require gl_LONG_DOUBLE_VS_DOUBLE.
75134         Determine ATANL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
75135         * modules/atanl (Depends-on): Add atan. Update conditions.
75137 2011-10-10  Bruno Haible  <bruno@clisp.org>
75139         acosl: Simplify for platforms where 'long double' == 'double'.
75140         * lib/acosl.c (acosl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New
75141         alternative implementation.
75142         * m4/acosl.m4 (gl_FUNC_ACOSL): Require gl_LONG_DOUBLE_VS_DOUBLE.
75143         Determine ACOSL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
75144         * modules/acosl (Depends-on): Add acos. Update conditions.
75146 2011-10-10  Bruno Haible  <bruno@clisp.org>
75148         asinl: Simplify for platforms where 'long double' == 'double'.
75149         * lib/asinl.c (asinl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New
75150         alternative implementation.
75151         * m4/asinl.m4 (gl_FUNC_ASINL): Require gl_LONG_DOUBLE_VS_DOUBLE.
75152         Determine ASINL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
75153         * modules/asinl (Depends-on): Add asin. Update conditions.
75155 2011-10-10  Bruno Haible  <bruno@clisp.org>
75157         tanl: Simplify for platforms where 'long double' == 'double'.
75158         * lib/tanl.c (tanl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New alternative
75159         implementation.
75160         * m4/tanl.m4 (gl_FUNC_TANL): Require gl_LONG_DOUBLE_VS_DOUBLE.
75161         Determine TANL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
75162         * modules/tanl (Depends-on): Add tan. Update conditions.
75163         (configure.ac): Don't compile trigl.c if
75164         HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
75166 2011-10-10  Bruno Haible  <bruno@clisp.org>
75168         cosl: Simplify for platforms where 'long double' == 'double'.
75169         * lib/cosl.c (cosl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New alternative
75170         implementation.
75171         * m4/cosl.m4 (gl_FUNC_COSL): Require gl_LONG_DOUBLE_VS_DOUBLE.
75172         Determine COSL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
75173         * modules/cosl (Depends-on): Add cos. Update conditions.
75174         (configure.ac): Don't compile sincosl.c and trigl.c if
75175         HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
75177 2011-10-10  Bruno Haible  <bruno@clisp.org>
75179         sinl: Simplify for platforms where 'long double' == 'double'.
75180         * lib/sinl.c (sinl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New alternative
75181         implementation.
75182         * m4/sinl.m4 (gl_FUNC_SINL): Require gl_LONG_DOUBLE_VS_DOUBLE.
75183         Determine SINL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
75184         * modules/sinl (Depends-on): Add sin. Update conditions.
75185         (configure.ac): Don't compile sincosl.c and trigl.c if
75186         HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
75188 2011-10-10  Bruno Haible  <bruno@clisp.org>
75190         logl: Simplify for platforms where 'long double' == 'double'.
75191         * lib/logl.c (logl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New alternative
75192         implementation.
75193         * m4/logl.m4 (gl_FUNC_LOGL): Require gl_LONG_DOUBLE_VS_DOUBLE.
75194         Determine LOGL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
75195         * modules/logl (Depends-on): Add log. Update conditions.
75197 2011-10-10  Bruno Haible  <bruno@clisp.org>
75199         expl: Simplify for platforms where 'long double' == 'double'.
75200         * lib/expl.c (expl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New alternative
75201         implementation.
75202         * m4/expl.m4 (gl_FUNC_EXPL): Require gl_LONG_DOUBLE_VS_DOUBLE.
75203         Determine EXPL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
75204         * modules/expl (Depends-on): Add exp. Update conditions.
75206 2011-10-10  Bruno Haible  <bruno@clisp.org>
75208         sqrtl: Simplify for platforms where 'long double' == 'double'.
75209         * lib/sqrtl.c (sqrtl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New
75210         alternative implementation.
75211         * m4/sqrtl.m4 (gl_FUNC_SQRTL): Require gl_LONG_DOUBLE_VS_DOUBLE.
75212         Determine SQRTL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
75213         * modules/sqrtl (Depends-on): Update conditions.
75215 2011-10-10  Bruno Haible  <bruno@clisp.org>
75217         ldexpl: Simplify for platforms where 'long double' == 'double'.
75218         * lib/ldexpl.c (ldexpl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New
75219         alternative implementation.
75220         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Require gl_LONG_DOUBLE_VS_DOUBLE.
75221         Determine LDEXPL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
75222         * modules/ldexpl (Depends-on): Add ldexp. Update conditions.
75224 2011-10-10  Tom G. Christensen  <tgc@jupiterrise.com>  (tiny change)
75226         ffsll: set correct witness
75227         * modules/ffsll (configure.ac): Fix typo.
75229 2011-10-10  Bruno Haible  <bruno@clisp.org>
75231         printf-frexpl: Simplify for platforms where 'long double' == 'double'.
75232         * lib/printf-frexpl.c: Include <config.h>.
75233         (printf_frexpl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New function.
75234         * lib/printf-frexp.c [!USE_LONG_DOUBLE]: Don't include <config.h> a
75235         second time.
75236         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Require
75237         gl_LONG_DOUBLE_VS_DOUBLE.
75238         * modules/printf-frexpl (Depends-on): Add printf-frexp. Update
75239         conditions.
75241 2011-10-10  Bruno Haible  <bruno@clisp.org>
75243         frexpl: Simplify for platforms where 'long double' == 'double'.
75244         * lib/frexpl.c: Include <config.h>.
75245         (frexpl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New function.
75246         * lib/frexp.c [!USE_LONG_DOUBLE]: Don't include <config.h> a second
75247         time.
75248         * m4/frexpl.m4 (gl_FUNC_FREXPL): Require gl_LONG_DOUBLE_VS_DOUBLE.
75249         Determine FREXPL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
75250         (gl_FUNC_FREXPL_NO_LIBM): Require gl_LONG_DOUBLE_VS_DOUBLE.
75251         * modules/frexpl (Depends-on): Add frexp. Update conditions.
75252         * modules/frexpl-nolibm (Depends-on): Add frexp-nolibm. Update
75253         conditions.
75255 2011-10-10  Jim Meyering  <meyering@redhat.com>
75257         test-renameat: don't leave behind a temporary file
75258         * tests/test-renameat.c (main): Don't forget to remove a temporary file.
75259           ERROR: files left in build directory after distclean:
75260           ./gltests/test-renameat.too
75261           make[1]: *** [distcleancheck] Error 1
75262         Reported by Tom G. Christensen.
75264 2011-10-09  Bruno Haible  <bruno@clisp.org>
75266         rint: Determine RINT_LIBM correctly on AIX 7.
75267         * m4/mathfunc.m4 (gl_MATHFUNC): Try to invoke the function also
75268         directly, not only through a function pointer. Also accept an optional
75269         4th argument with extra code.
75270         * m4/rint.m4 (gl_FUNC_RINT): Pass an extra code that gets turned into a
75271         rintf() call by gcc when optimizing.
75273         mathfunc.m4: Refactor.
75274         * m4/mathfunc.m4 (gl_MATHFUNC): Assign the argument list to a temporary
75275         m4 variable.
75277 2011-10-09  Bruno Haible  <bruno@clisp.org>
75279         rintl: Simplify for platforms where 'long double' == 'double'.
75280         * lib/rintl.c: Include <config.h>.
75281         (rintl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New function.
75282         * lib/rint.c [!USE_LONG_DOUBLE]: Don't include <config.h> a second
75283         time.
75284         * m4/rintl.m4 (gl_FUNC_RINTL): Require gl_LONG_DOUBLE_VS_DOUBLE.
75285         Determine RINTL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
75286         * modules/rintl (Depends-on): Add rint. Update conditions.
75288 2011-10-09  Bruno Haible  <bruno@clisp.org>
75290         roundl: Simplify for platforms where 'long double' == 'double'.
75291         * lib/roundl.c: Include <config.h>.
75292         (roundl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New function.
75293         * lib/round.c [!USE_LONG_DOUBLE]: Don't include <config.h> a second
75294         time.
75295         * m4/roundl.m4 (gl_FUNC_ROUNDL): Require gl_LONG_DOUBLE_VS_DOUBLE.
75296         Determine ROUNDL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
75297         * modules/roundl (Depends-on): Add round. Update conditions.
75299 2011-10-09  Bruno Haible  <bruno@clisp.org>
75301         truncl: Simplify for platforms where 'long double' == 'double'.
75302         * lib/truncl.c: Include <config.h>.
75303         (truncl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New function.
75304         * lib/trunc.c [!USE_LONG_DOUBLE]: Don't include <config.h> a second
75305         time.
75306         * m4/truncl.m4 (gl_FUNC_TRUNCL): Require gl_LONG_DOUBLE_VS_DOUBLE.
75307         Determine TRUNCL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
75308         * modules/truncl (Depends-on): Add trunc. Update conditions.
75310 2011-10-09  Bruno Haible  <bruno@clisp.org>
75312         ceill: Simplify for platforms where 'long double' == 'double'.
75313         * lib/ceill.c: Include <config.h>.
75314         (ceill) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New function.
75315         * lib/ceil.c [!USE_LONG_DOUBLE]: Don't include <config.h> a second
75316         time.
75317         * m4/ceill.m4 (gl_FUNC_CEILL): Require gl_LONG_DOUBLE_VS_DOUBLE.
75318         Determine CEILL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
75319         * modules/ceill (Depends-on): Add ceil. Update conditions.
75321 2011-10-09  Bruno Haible  <bruno@clisp.org>
75323         floorl: Simplify for platforms where 'long double' == 'double'.
75324         * lib/floorl.c: Include <config.h>.
75325         (floorl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New function.
75326         * lib/floor.c [!USE_LONG_DOUBLE]: Don't include <config.h> a second
75327         time.
75328         * m4/floorl.m4 (gl_FUNC_FLOORL): Require gl_LONG_DOUBLE_VS_DOUBLE.
75329         Determine FLOORL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
75330         * modules/floorl (Depends-on): Add floor. Update conditions.
75332 2011-10-09  Bruno Haible  <bruno@clisp.org>
75334         rint: Fix ordering constraints.
75335         * m4/rint.m4 (gl_FUNC_RINT): Require gl_MATH_H_DEFAULTS.
75336         * m4/rintf.m4 (gl_FUNC_RINTF): Likewise.
75337         * m4/rintl.m4 (gl_FUNC_RINTL): Likewise.
75339 2011-10-09  Bruno Haible  <bruno@clisp.org>
75341         copysignl: Simplify for platforms where 'long double' == 'double'.
75342         * lib/copysignl.c (copysignl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New
75343         alternative.
75344         * m4/copysignl.m4 (gl_FUNC_COPYSIGNL): Require gl_LONG_DOUBLE_VS_DOUBLE.
75345         Determine COPYSIGNL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
75346         * modules/copysignl (Depends-on): Add copysign. Update conditions.
75348 2011-10-09  Bruno Haible  <bruno@clisp.org>
75350         Tests for module 'rintl'.
75351         * modules/rintl-tests: New file.
75352         * tests/test-rintl.c: New file.
75354         New module 'rintl'.
75355         * lib/math.in.h (rintl): New declaration.
75356         * lib/rintl.c: New file.
75357         * m4/rintl.m4: New file.
75358         * m4/math_h.m4 (gl_MATH_H): Test whether rintl is declared.
75359         (gl_MATH_H_DEFAULTS): Initialize GNULIB_RINTL, HAVE_RINTL.
75360         * modules/math (Makefile.am): Substitute GNULIB_RINTL, HAVE_RINTL.
75361         * modules/rintl: New file.
75362         * tests/test-math-c++.cc: Check the declaration of rintl.
75363         * modules/math-c++-tests (Makefile.am): Link test-math-c++ against
75364         $(RINTL_LIBM). Needed on IRIX 6.5 with cc.
75365         * doc/posix-functions/rintl.texi: Mention the new module.
75367 2011-10-09  Bruno Haible  <bruno@clisp.org>
75369         Tests for module 'rintf'.
75370         * modules/rintf-tests: New file.
75371         * tests/test-rintf.c: New file.
75373         New module 'rintf'.
75374         * lib/math.in.h (rintf): New declaration.
75375         * lib/rintf.c: New file.
75376         * m4/rintf.m4: New file.
75377         * m4/math_h.m4 (gl_MATH_H): Test whether rintf is declared.
75378         (gl_MATH_H_DEFAULTS): Initialize GNULIB_RINTF, HAVE_RINTF.
75379         * modules/math (Makefile.am): Substitute GNULIB_RINTF, HAVE_RINTF.
75380         * modules/rintf: New file.
75381         * tests/test-math-c++.cc: Check the declaration of rintf.
75382         * doc/posix-functions/rintf.texi: Mention the new module.
75384 2011-10-09  Bruno Haible  <bruno@clisp.org>
75386         rint: Support for MSVC.
75387         * lib/math.in.h (rint): New declaration.
75388         * lib/rint.c: New file.
75389         * m4/rint.m4: New file.
75390         * m4/math_h.m4 (gl_MATH_H): Test whether rint is declared.
75391         (gl_MATH_H_DEFAULTS): Initialize GNULIB_RINT, HAVE_RINT.
75392         * modules/math (Makefile.am): Substitute GNULIB_RINT, HAVE_RINT.
75393         * modules/rint (Description): Fix.
75394         (Files): Add lib/rint.c, m4/rint.m4.
75395         (Depends-on): Add math.
75396         (configure.ac): Invoke gl_FUNC_RINT, AC_LIBOBJ,
75397         gl_MATH_MODULE_INDICATOR.
75398         * tests/test-math-c++.cc: Check the declaration of rint.
75399         * modules/math-c++-tests (Makefile.am): Link test-math-c++ against
75400         $(RINT_LIBM). Needed on IRIX 6.5 with cc.
75401         * doc/posix-functions/rint.texi: Mention the replacement provided by
75402         the module.
75404         rint tests: More tests.
75405         * tests/test-rint.c: Include <float.h>, <stdio.h>, isnand-nolibm.h,
75406         minus-zero.h, infinity.h, nan.h.
75407         (main): Skip the test if the current rounding mode is not standard. Add
75408         tests for negative numbers, minus zero, infinity, NaN.
75409         * modules/rint-tests (Files): Add tests/minus-zero.h, tests/infinity.h,
75410         tests/nan.h.
75411         (Depends-on): Add isnand-nolibm.
75413 2011-10-09  Bruno Haible  <bruno@clisp.org>
75415         Tests for module 'copysignl'.
75416         * modules/copysignl-tests: New file.
75417         * tests/test-copysignl.c: New file.
75419         New module 'copysignl'.
75420         * lib/math.in.h (copysignl): New declaration.
75421         * lib/copysignl.c: New file.
75422         * m4/copysignl.m4: New file.
75423         * m4/math_h.m4 (gl_MATH_H): Test whether copysignl is declared.
75424         (gl_MATH_H_DEFAULTS): Initialize GNULIB_COPYSIGNL, HAVE_COPYSIGNL.
75425         * modules/math (Makefile.am): Substitute GNULIB_COPYSIGNL,
75426         HAVE_COPYSIGNL.
75427         * modules/copysignl: New file.
75428         * tests/test-math-c++.cc: Check the declaration of copysignl.
75429         * modules/math-c++-tests (Makefile.am): Link test-math-c++ against
75430         $(COPYSIGNL_LIBM). Needed on IRIX 6.5 with cc.
75431         * doc/posix-functions/copysignl.texi: Mention the new module.
75433 2011-10-09  Bruno Haible  <bruno@clisp.org>
75435         Tests for module 'copysignf'.
75436         * modules/copysignf-tests: New file.
75437         * tests/test-copysignf.c: New file.
75439         New module 'copysignf'.
75440         * lib/math.in.h (copysignf): New declaration.
75441         * lib/copysignf.c: New file.
75442         * m4/copysignf.m4: New file.
75443         * m4/math_h.m4 (gl_MATH_H): Test whether copysignf is declared.
75444         (gl_MATH_H_DEFAULTS): Initialize GNULIB_COPYSIGNF, HAVE_COPYSIGNF.
75445         * modules/math (Makefile.am): Substitute GNULIB_COPYSIGNF,
75446         HAVE_COPYSIGNF.
75447         * modules/copysignf: New file.
75448         * tests/test-math-c++.cc: Check the declaration of copysignf.
75449         * doc/posix-functions/copysignf.texi: Mention the new module.
75451 2011-10-09  Bruno Haible  <bruno@clisp.org>
75453         Ensure that HAVE_* variables are set to 1 before they are set to 0.
75454         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Require gl_DIRENT_H_DEFAULTS.
75455         * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): Require gl_ARPA_INET_H_DEFAULTS.
75456         * m4/inet_pton.m4 (gl_FUNC_INET_PTON): Likewise.
75457         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Require
75458         gl_SIGNAL_H_DEFAULTS.
75460 2011-10-09  Bruno Haible  <bruno@clisp.org>
75462         poll: Make macro safer.
75463         * m4/poll.m4 (gl_FUNC_POLL): Complain if, after invoking gl_POLL_H,
75464         ac_cv_header_poll_h is not set.
75466 2011-10-09  Bruno Haible  <bruno@clisp.org>
75468         copysign: Provide replacement.
75469         * lib/math.in.h (copysign): New declaration.
75470         * lib/copysign.c: New file.
75471         * m4/copysign.m4: New file.
75472         * m4/math_h.m4 (gl_MATH_H): Test whether copysign is declared.
75473         (gl_MATH_H_DEFAULTS): Initialize GNULIB_COPYSIGN, HAVE_COPYSIGN.
75474         * modules/math (Makefile.am): Substitute GNULIB_COPYSIGN,
75475         HAVE_COPYSIGN.
75476         * modules/copysign (Description): Clarify.
75477         (Files): Add lib/copysign.c, m4/copysign.m4.
75478         (Depends-on): Add math, signbit.
75479         (configure.ac): Invoke gl_FUNC_COPYSIGN, AC_LIBOBJ,
75480         gl_MATH_MODULE_INDICATOR.
75481         * tests/test-math-c++.cc: Check the declaration of copysign.
75482         * doc/posix-functions/copysign.texi: Mention the effects of the module
75483         on Minix and MSVC.
75485 2011-10-09  Bruno Haible  <bruno@clisp.org>
75487         isinf: Ensure macro on AIX 5.1.
75488         * m4/isinf.m4 (gl_ISINF): Also test whether isinf is defined as a
75489         macro.
75490         * doc/posix-functions/isinf.texi: Mention also AIX 5.1 as deficient.
75492 2011-10-09  Bruno Haible  <bruno@clisp.org>
75494         *printf-posix tests: Fix for platforms where 'long double' == 'double'.
75495         * modules/snprintf-posix-tests (configure.ac): Require
75496         gl_LONG_DOUBLE_VS_DOUBLE.
75497         * modules/sprintf-posix-tests (configure.ac): Likewise.
75498         * modules/vasnprintf-posix-tests (configure.ac): Likewise.
75499         * modules/vasprintf-posix-tests (configure.ac): Likewise.
75500         * modules/vsnprintf-posix-tests (configure.ac): Likewise.
75501         * modules/vsprintf-posix-tests (configure.ac): Likewise.
75502         * tests/test-snprintf-posix.h (test_function): Avoid 80-bit long double
75503         tests on platforms where 'long double' is the same as 'double'.
75504         * tests/test-sprintf-posix.h (test_function): Likewise.
75505         * tests/test-vasnprintf-posix.c (test_function): Likewise.
75506         * tests/test-vasprintf-posix.c (test_function): Likewise.
75508         *printf: Fix for platforms where 'long double' == 'double'.
75509         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Require
75510         gl_LONG_DOUBLE_VS_DOUBLE. Don't blindly assume 80-bit 'long double'.
75511         * modules/dprintf-posix (Files): Add m4/math_h.m4.
75512         * modules/fprintf-posix (Files): Likewise.
75513         * modules/obstack-printf-posix (Files): Likewise.
75514         * modules/snprintf-posix (Files): Likewise.
75515         * modules/sprintf-posix (Files): Likewise.
75516         * modules/vasnprintf (Files): Likewise.
75517         * modules/vasnprintf-posix (Files): Likewise.
75518         * modules/vasprintf-posix (Files): Likewise.
75519         * modules/vdprintf-posix (Files): Likewise.
75520         * modules/vfprintf-posix (Files): Likewise.
75521         * modules/vsnprintf-posix (Files): Likewise.
75522         * modules/vsprintf-posix (Files): Likewise.
75523         * modules/unistdio/u8-vasnprintf (Files): Likewise.
75524         * modules/unistdio/u8-u8-vasnprintf (Files): Likewise.
75525         * modules/unistdio/u16-vasnprintf (Files): Likewise.
75526         * modules/unistdio/u16-u16-vasnprintf (Files): Likewise.
75527         * modules/unistdio/u32-vasnprintf (Files): Likewise.
75528         * modules/unistdio/u32-u32-vasnprintf (Files): Likewise.
75529         * modules/unistdio/ulc-vasnprintf (Files): Likewise.
75531         isnanl[-nolibm]: Fix for platforms where 'long double' == 'double'.
75532         * lib/isnan.c (rpl_isnanl): Don't blindly assume 80-bit 'long double'.
75533         * m4/isnanl.m4 (gl_PREREQ_ISNANL): Require gl_LONG_DOUBLE_VS_DOUBLE.
75534         (gl_FUNC_ISNANL_WORKS): Likewise. Don't blindly assume 80-bit
75535         'long double'.
75536         * modules/isnanl-nolibm (Files): Add m4/math_h.m4.
75538         isinf: Fix for platforms where 'long double' == 'double'.
75539         * m4/isinf.m4 (gl_ISINFL_WORKS): Require gl_LONG_DOUBLE_VS_DOUBLE.
75540         Don't blindly assume 80-bit 'long double'.
75542         isfinite: Fix for platforms where 'long double' == 'double'.
75543         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Require gl_LONG_DOUBLE_VS_DOUBLE.
75544         Don't blindly assume 80-bit 'long double'.
75546         isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
75547         * m4/math_h.m4 (gl_LONG_DOUBLE_VS_DOUBLE): New macro.
75548         * modules/isfinite-tests (configure.ac): Require
75549         gl_LONG_DOUBLE_VS_DOUBLE.
75550         * modules/isinf-tests (configure.ac): Likewise.
75551         * modules/isnan-tests (configure.ac): Likewise.
75552         * modules/isnanl-tests (configure.ac): Likewise.
75553         * modules/isnanl-nolibm-tests (configure.ac): Likewise.
75554         * tests/test-isfinite.c (test_isfinitel): Avoid 80-bit long double
75555         tests on platforms where 'long double' is the same as 'double'.
75556         * tests/test-isinf.c (test_isinfl): Likewise.
75557         * tests/test-isnan.c (test_long_double): Likewise.
75558         * tests/test-isnanl.h (main): Likewise.
75560 2011-10-08  Bruno Haible  <bruno@clisp.org>
75562         Tests for module 'tanhf'.
75563         * modules/tanhf-tests: New file.
75564         * tests/test-tanhf.c: New file.
75566         New module 'tanhf'.
75567         * lib/math.in.h (tanhf): New declaration.
75568         * lib/tanhf.c: New file.
75569         * m4/tanhf.m4: New file.
75570         * m4/math_h.m4 (gl_MATH_H): Test whether tanhf is declared.
75571         (gl_MATH_H_DEFAULTS): Initialize GNULIB_TANHF, HAVE_TANHF.
75572         * modules/math (Makefile.am): Substitute GNULIB_TANHF, HAVE_TANHF.
75573         * modules/tanhf: New file.
75574         * tests/test-math-c++.cc: Check the declaration of tanhf.
75575         * doc/posix-functions/tanhf.texi: Mention the new module.
75577         tanh: Use a .m4 file.
75578         * m4/tanh.m4: New file.
75579         * modules/tanh (Files): Add it.
75580         (configure.ac): Just invoke gl_FUNC_TANH.
75582 2011-10-08  Bruno Haible  <bruno@clisp.org>
75584         Tests for module 'coshf'.
75585         * modules/coshf-tests: New file.
75586         * tests/test-coshf.c: New file.
75588         New module 'coshf'.
75589         * lib/math.in.h (coshf): New declaration.
75590         * lib/coshf.c: New file.
75591         * m4/coshf.m4: New file.
75592         * m4/math_h.m4 (gl_MATH_H): Test whether coshf is declared.
75593         (gl_MATH_H_DEFAULTS): Initialize GNULIB_COSHF, HAVE_COSHF.
75594         * modules/math (Makefile.am): Substitute GNULIB_COSHF, HAVE_COSHF.
75595         * modules/coshf: New file.
75596         * tests/test-math-c++.cc: Check the declaration of coshf.
75597         * doc/posix-functions/coshf.texi: Mention the new module.
75599         cosh: Use a .m4 file.
75600         * m4/cosh.m4: New file.
75601         * modules/cosh (Files): Add it.
75602         (configure.ac): Just invoke gl_FUNC_COSH.
75604 2011-10-08  Bruno Haible  <bruno@clisp.org>
75606         Tests for module 'sinhf'.
75607         * modules/sinhf-tests: New file.
75608         * tests/test-sinhf.c: New file.
75610         New module 'sinhf'.
75611         * lib/math.in.h (sinhf): New declaration.
75612         * lib/sinhf.c: New file.
75613         * m4/sinhf.m4: New file.
75614         * m4/math_h.m4 (gl_MATH_H): Test whether sinhf is declared.
75615         (gl_MATH_H_DEFAULTS): Initialize GNULIB_SINHF, HAVE_SINHF.
75616         * modules/math (Makefile.am): Substitute GNULIB_SINHF, HAVE_SINHF.
75617         * modules/sinhf: New file.
75618         * tests/test-math-c++.cc: Check the declaration of sinhf.
75619         * doc/posix-functions/sinhf.texi: Mention the new module.
75621         sinh: Use a .m4 file.
75622         * m4/sinh.m4: New file.
75623         * modules/sinh (Files): Add it.
75624         (configure.ac): Just invoke gl_FUNC_SINH.
75626 2011-10-08  Bruno Haible  <bruno@clisp.org>
75628         Tests for module 'atan2f'.
75629         * modules/atan2f-tests: New file.
75630         * tests/test-atan2f.c: New file.
75632         New module 'atan2f'.
75633         * lib/math.in.h (atan2f): New declaration.
75634         * lib/atan2f.c: New file.
75635         * m4/atan2f.m4: New file.
75636         * m4/math_h.m4 (gl_MATH_H): Test whether atan2f is declared.
75637         (gl_MATH_H_DEFAULTS): Initialize GNULIB_ATAN2F, HAVE_ATAN2F.
75638         * modules/math (Makefile.am): Substitute GNULIB_ATAN2F, HAVE_ATAN2F.
75639         * modules/atan2f: New file.
75640         * tests/test-math-c++.cc: Check the declaration of atan2f.
75641         * doc/posix-functions/atan2f.texi: Mention the new module.
75643         atan2: Use a .m4 file.
75644         * m4/atan2.m4: New file.
75645         * modules/atan2 (Files): Add it.
75646         (configure.ac): Just invoke gl_FUNC_ATAN2.
75648 2011-10-08  Bruno Haible  <bruno@clisp.org>
75650         Tests for module 'atanf'.
75651         * modules/atanf-tests: New file.
75652         * tests/test-atanf.c: New file.
75654         New module 'atanf'.
75655         * lib/math.in.h (atanf): New declaration.
75656         * lib/atanf.c: New file.
75657         * m4/atanf.m4: New file.
75658         * m4/math_h.m4 (gl_MATH_H): Test whether atanf is declared.
75659         (gl_MATH_H_DEFAULTS): Initialize GNULIB_ATANF, HAVE_ATANF.
75660         * modules/math (Makefile.am): Substitute GNULIB_ATANF, HAVE_ATANF.
75661         * modules/atanf: New file.
75662         * tests/test-math-c++.cc: Check the declaration of atanf.
75663         * doc/posix-functions/atanf.texi: Mention the new module.
75665         atan: Use a .m4 file.
75666         * m4/atan.m4: New file.
75667         * modules/atan (Files): Add it.
75668         (configure.ac): Just invoke gl_FUNC_ATAN.
75670 2011-10-08  Bruno Haible  <bruno@clisp.org>
75672         Tests for module 'acosf'.
75673         * modules/acosf-tests: New file.
75674         * tests/test-acosf.c: New file.
75676         New module 'acosf'.
75677         * lib/math.in.h (acosf): New declaration.
75678         * lib/acosf.c: New file.
75679         * m4/acosf.m4: New file.
75680         * m4/math_h.m4 (gl_MATH_H): Test whether acosf is declared.
75681         (gl_MATH_H_DEFAULTS): Initialize GNULIB_ACOSF, HAVE_ACOSF.
75682         * modules/math (Makefile.am): Substitute GNULIB_ACOSF, HAVE_ACOSF.
75683         * modules/acosf: New file.
75684         * tests/test-math-c++.cc: Check the declaration of acosf.
75685         * doc/posix-functions/acosf.texi: Mention the new module.
75687         acos: Use a .m4 file.
75688         * m4/acos.m4: New file.
75689         * modules/acos (Files): Add it.
75690         (configure.ac): Just invoke gl_FUNC_ACOS.
75692 2011-10-08  Bruno Haible  <bruno@clisp.org>
75694         Tests for module 'asinf'.
75695         * modules/asinf-tests: New file.
75696         * tests/test-asinf.c: New file.
75698         New module 'asinf'.
75699         * lib/math.in.h (asinf): New declaration.
75700         * lib/asinf.c: New file.
75701         * m4/asinf.m4: New file.
75702         * m4/math_h.m4 (gl_MATH_H): Test whether asinf is declared.
75703         (gl_MATH_H_DEFAULTS): Initialize GNULIB_ASINF, HAVE_ASINF.
75704         * modules/math (Makefile.am): Substitute GNULIB_ASINF, HAVE_ASINF.
75705         * modules/asinf: New file.
75706         * tests/test-math-c++.cc: Check the declaration of asinf.
75707         * doc/posix-functions/asinf.texi: Mention the new module.
75709         asin: Use a .m4 file.
75710         * m4/asin.m4: New file.
75711         * modules/asin (Files): Add it.
75712         (configure.ac): Just invoke gl_FUNC_ASIN.
75714 2011-10-08  Bruno Haible  <bruno@clisp.org>
75716         Tests for module 'tanf'.
75717         * modules/tanf-tests: New file.
75718         * tests/test-tanf.c: New file.
75720         New module 'tanf'.
75721         * lib/math.in.h (tanf): New declaration.
75722         * lib/tanf.c: New file.
75723         * m4/tanf.m4: New file.
75724         * m4/math_h.m4 (gl_MATH_H): Test whether tanf is declared.
75725         (gl_MATH_H_DEFAULTS): Initialize GNULIB_TANF, HAVE_TANF.
75726         * modules/math (Makefile.am): Substitute GNULIB_TANF, HAVE_TANF.
75727         * modules/tanf: New file.
75728         * tests/test-math-c++.cc: Check the declaration of tanf.
75729         * doc/posix-functions/tanf.texi: Mention the new module.
75731         tan: Use a .m4 file.
75732         * m4/tan.m4: New file.
75733         * modules/tan (Files): Add it.
75734         (configure.ac): Just invoke gl_FUNC_TAN.
75736 2011-10-08  Bruno Haible  <bruno@clisp.org>
75738         Tests for module 'cosf'.
75739         * modules/cosf-tests: New file.
75740         * tests/test-cosf.c: New file.
75742         New module 'cosf'.
75743         * lib/math.in.h (cosf): New declaration.
75744         * lib/cosf.c: New file.
75745         * m4/cosf.m4: New file.
75746         * m4/math_h.m4 (gl_MATH_H): Test whether cosf is declared.
75747         (gl_MATH_H_DEFAULTS): Initialize GNULIB_COSF, HAVE_COSF.
75748         * modules/math (Makefile.am): Substitute GNULIB_COSF, HAVE_COSF.
75749         * modules/cosf: New file.
75750         * tests/test-math-c++.cc: Check the declaration of cosf.
75751         * doc/posix-functions/cosf.texi: Mention the new module.
75753         cos: Use a .m4 file.
75754         * m4/cos.m4: New file.
75755         * modules/cos (Files): Add it.
75756         (configure.ac): Just invoke gl_FUNC_COS.
75758 2011-10-08  Bruno Haible  <bruno@clisp.org>
75760         Tests for module 'sinf'.
75761         * modules/sinf-tests: New file.
75762         * tests/test-sinf.c: New file.
75764         New module 'sinf'.
75765         * lib/math.in.h (sinf): New declaration.
75766         * lib/sinf.c: New file.
75767         * m4/sinf.m4: New file.
75768         * m4/math_h.m4 (gl_MATH_H): Test whether sinf is declared.
75769         (gl_MATH_H_DEFAULTS): Initialize GNULIB_SINF, HAVE_SINF.
75770         * modules/math (Makefile.am): Substitute GNULIB_SINF, HAVE_SINF.
75771         * modules/sinf: New file.
75772         * tests/test-math-c++.cc: Check the declaration of sinf.
75773         * doc/posix-functions/sinf.texi: Mention the new module.
75775         sin: Use a .m4 file.
75776         * m4/sin.m4: New file.
75777         * modules/sin (Files): Add it.
75778         (configure.ac): Just invoke gl_FUNC_SIN.
75780 2011-10-08  Bruno Haible  <bruno@clisp.org>
75782         Tests for module 'powf'.
75783         * modules/powf-tests: New file.
75784         * tests/test-powf.c: New file.
75786         New module 'powf'.
75787         * lib/math.in.h (powf): New declaration.
75788         * lib/powf.c: New file.
75789         * m4/powf.m4: New file.
75790         * m4/math_h.m4 (gl_MATH_H): Test whether powf is declared.
75791         (gl_MATH_H_DEFAULTS): Initialize GNULIB_POWF, HAVE_POWF.
75792         * modules/math (Makefile.am): Substitute GNULIB_POWF, HAVE_POWF.
75793         * modules/powf: New file.
75794         * tests/test-math-c++.cc: Check the declaration of powf.
75795         * doc/posix-functions/powf.texi: Mention the new module.
75797         pow: Use a .m4 file.
75798         * m4/pow.m4: New file.
75799         * modules/pow (Files): Add it.
75800         (configure.ac): Just invoke gl_FUNC_POW.
75802 2011-10-08  Bruno Haible  <bruno@clisp.org>
75804         Tests for module 'log10f'.
75805         * modules/log10f-tests: New file.
75806         * tests/test-log10f.c: New file.
75808         New module 'log10f'.
75809         * lib/math.in.h (log10f): New declaration.
75810         * lib/log10f.c: New file.
75811         * m4/log10f.m4: New file.
75812         * m4/math_h.m4 (gl_MATH_H): Test whether log10f is declared.
75813         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG10F, HAVE_LOG10F.
75814         * modules/math (Makefile.am): Substitute GNULIB_LOG10F, HAVE_LOG10F.
75815         * modules/log10f: New file.
75816         * tests/test-math-c++.cc: Check the declaration of log10f.
75817         * doc/posix-functions/log10f.texi: Mention the new module.
75819         log10: Use a .m4 file.
75820         * m4/log10.m4: New file.
75821         * modules/log10 (Files): Add it.
75822         (configure.ac): Just invoke gl_FUNC_LOG10.
75824 2011-10-08  Bruno Haible  <bruno@clisp.org>
75826         Tests for module 'logf'.
75827         * modules/logf-tests: New file.
75828         * tests/test-logf.c: New file.
75830         New module 'logf'.
75831         * lib/math.in.h (logf): New declaration.
75832         * lib/logf.c: New file.
75833         * m4/logf.m4: New file.
75834         * m4/math_h.m4 (gl_MATH_H): Test whether logf is declared.
75835         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOGF, HAVE_LOGF.
75836         * modules/math (Makefile.am): Substitute GNULIB_LOGF, HAVE_LOGF.
75837         * modules/logf: New file.
75838         * tests/test-math-c++.cc: Check the declaration of logf.
75839         * doc/posix-functions/logf.texi: Mention the new module.
75841         log: Use a .m4 file.
75842         * m4/log.m4: New file.
75843         * modules/log (Files): Add it.
75844         (configure.ac): Just invoke gl_FUNC_LOG.
75846 2011-10-08  Bruno Haible  <bruno@clisp.org>
75848         Tests for module 'expf'.
75849         * modules/expf-tests: New file.
75850         * tests/test-expf.c: New file.
75852         New module 'expf'.
75853         * lib/math.in.h (expf): New declaration.
75854         * lib/expf.c: New file.
75855         * m4/expf.m4: New file.
75856         * m4/math_h.m4 (gl_MATH_H): Test whether expf is declared.
75857         (gl_MATH_H_DEFAULTS): Initialize GNULIB_EXPF, HAVE_EXPF.
75858         * modules/math (Makefile.am): Substitute GNULIB_EXPF, HAVE_EXPF.
75859         * modules/expf: New file.
75860         * tests/test-math-c++.cc: Check the declaration of expf.
75861         * doc/posix-functions/expf.texi: Mention the new module.
75863         exp: Use a .m4 file.
75864         * m4/exp.m4: New file.
75865         * modules/exp (Files): Add it.
75866         (configure.ac): Just invoke gl_FUNC_EXP.
75868 2011-10-08  Bruno Haible  <bruno@clisp.org>
75870         Tests for module 'sqrtf'.
75871         * modules/sqrtf-tests: New file.
75872         * tests/test-sqrtf.c: New file.
75874         New module 'sqrtf'.
75875         * lib/math.in.h (sqrtf): New declaration.
75876         * lib/sqrtf.c: New file.
75877         * m4/sqrtf.m4: New file.
75878         * m4/math_h.m4 (gl_MATH_H): Test whether sqrtf is declared.
75879         (gl_MATH_H_DEFAULTS): Initialize GNULIB_SQRTF, HAVE_SQRTF.
75880         * modules/math (Makefile.am): Substitute GNULIB_SQRTF, HAVE_SQRTF.
75881         * modules/sqrtf: New file.
75882         * tests/test-math-c++.cc: Check the declaration of sqrtf.
75883         * doc/posix-functions/sqrtf.texi: Mention the new module.
75885 2011-10-08  Bruno Haible  <bruno@clisp.org>
75887         Tests: Avoid link failures w.r.t. libintl.
75888         * modules/faccessat-tests (Makefile.am): Link test-faccessat against
75889         $(LIBINTL).
75890         * modules/fchdir-tests (Makefile.am): Link test-fchdir against
75891         $(LIBINTL).
75892         * modules/getcwd-lgpl-tests (Makefile.am): Link test-getcwd-lgpl
75893         against $(LIBINTL).
75894         * modules/getcwd-tests (Makefile.am): Link test-getcwd against
75895         $(LIBINTL).
75896         * modules/openat-tests (Makefile.am): Link test-fchmodat against
75897         $(LIBINTL).
75898         * modules/stat-tests (Makefile.am): Link test-stat against $(LIBINTL).
75900 2011-10-08  Bruno Haible  <bruno@clisp.org>
75902         pow tests: Defeat compiler optimizations.
75903         * tests/test-pow.c (main): Assign arguments to x and y before use.
75905 2011-10-08  Bruno Haible  <bruno@clisp.org>
75907         gnulib-tool: Improve last commit.
75908         * gnulib-tool (func_modules_transitive_closure): Simplify code.
75909         (func_emit_autoconf_snippets): Instead of invoking func_acceptable,
75910         ignore dependencies that are not among the modules list.
75912 2011-10-07  Paul Eggert  <eggert@cs.ucla.edu>
75914         gnulib-tool: don't follow dependencies to avoided modules
75915         This fixes a bug that is related to the previous one.
75916         * gnulib-tool (func_modules_transitive_closure)
75917         (func_emit_autoconf_snippets):
75918         Check whether a dependency is acceptable before using it.
75919         (--extract-dependencies): Report an error if --avoid is also used,
75920         since this combination of options is not yet supported.
75922         gnulib-tool: fix typo that broke Emacs on powerpc-apple-darwin9.8.0.
75923         Problem reported by Peter Dyballa in
75924         <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9696>.
75925         * gnulib-tool (func_emit_autoconf_snippets): Quote with "", not '',
75926         when echoing "$condition".
75928 2011-10-07  Bruno Haible  <bruno@clisp.org>
75930         Fix documentation about math functions on MacOS X.
75931         * doc/posix-functions/exp2.texi: Don't say the function is missing on
75932         MacOS X 10.5.
75933         * doc/posix-functions/fdim.texi: Likewise.
75934         * doc/posix-functions/feclearexcept.texi: Likewise.
75935         * doc/posix-functions/fegetenv.texi: Likewise.
75936         * doc/posix-functions/fegetround.texi: Likewise.
75937         * doc/posix-functions/feholdexcept.texi: Likewise.
75938         * doc/posix-functions/feraiseexcept.texi: Likewise.
75939         * doc/posix-functions/fesetenv.texi: Likewise.
75940         * doc/posix-functions/fesetround.texi: Likewise.
75941         * doc/posix-functions/fetestexcept.texi: Likewise.
75942         * doc/posix-functions/feupdateenv.texi: Likewise.
75943         * doc/posix-functions/fmax.texi: Likewise.
75944         * doc/posix-functions/fmin.texi: Likewise.
75945         * doc/posix-functions/log2.texi: Likewise.
75946         * doc/posix-functions/modff.texi: Likewise.
75947         * doc/posix-functions/nan.texi: Likewise.
75948         * doc/posix-functions/nanf.texi: Likewise.
75949         * doc/posix-functions/nextafterf.texi: Likewise.
75950         * doc/posix-functions/remquo.texi: Likewise.
75952 2011-10-07  Bruno Haible  <bruno@clisp.org>
75954         modff: Drop assumption about library that defines modff.
75955         * m4/modff.m4 (gl_FUNC_MODFF): Use gl_MATHFUNC macro instead of
75956         AC_CHECK_FUNCS.
75957         * modules/modff (Files): Add m4/mathfunc.m4.
75959 2011-10-07  Bernhard Voelker  <mail@bernhard-voelker.de>
75961         raise tests: Avoid a GCC warning.
75962         * tests/test-raise.c (handler): Use _Noreturn.
75964 2011-10-07  Bruno Haible  <bruno@clisp.org>
75966         Tests for module 'ldexpf'.
75967         * modules/ldexpf-tests: New file.
75968         * tests/test-ldexpf.c: New file.
75970         New module 'ldexpf'.
75971         * lib/math.in.h (ldexpf): New declaration.
75972         * lib/ldexpf.c: New file.
75973         * m4/ldexpf.m4: New file.
75974         * m4/math_h.m4 (gl_MATH_H): Test whether ldexpf is declared.
75975         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LDEXPF, HAVE_LDEXPF.
75976         * modules/math (Makefile.am): Substitute GNULIB_LDEXPF, HAVE_LDEXPF.
75977         * modules/ldexpf: New file.
75978         * tests/test-math-c++.cc: Check the declaration of ldexpf.
75979         * doc/posix-functions/ldexpf.texi: Mention the new module.
75981 2011-10-06  Bruno Haible  <bruno@clisp.org>
75983         frexpf: Work around problems on IRIX and mingw.
75984         * lib/math.in.h (frexpf): Consider also REPLACE_FREXPF.
75985         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPF.
75986         * m4/frexpf.m4 (gl_FUNC_FREXPF_WORKS): New macro.
75987         (gl_FUNC_FREXPF): Invoke it. Set REPLACE_FREXPF.
75988         * modules/frexpf (Depends-on, configure.ac): Consider REPLACE_FREXPF.
75989         * modules/math (Makefile.am): Substitute REPLACE_FREXPF.
75990         * doc/posix-functions/frexpf.texi: Mention the IRIX and mingw problems.
75992 2011-10-06  Bruno Haible  <bruno@clisp.org>
75994         fabsf: Drop assumption about library that defines fabsf.
75995         * m4/fabsf.m4 (gl_FUNC_FABSF): Use gl_MATHFUNC macro instead of
75996         AC_CHECK_FUNCS.
75997         * modules/fabsf (Files): Add m4/mathfunc.m4.
75999 2011-10-06  Bruno Haible  <bruno@clisp.org>
76001         frexpf: Drop assumption about library that defines frexpf.
76002         * m4/mathfunc.m4 (gl_MATHFUNC): Support also the argument types
76003         'int *', 'float *', 'long double *', 'float', 'long double'.
76004         * m4/frexpf.m4 (gl_FUNC_FREXPF): Use gl_MATHFUNC macro instead of
76005         AC_CHECK_FUNCS.
76006         * modules/frexpf (Files): Add m4/mathfunc.m4.
76008         Tests for module 'frexpf'.
76009         * modules/frexpf-tests: New file.
76010         * tests/test-frexpf.c: New file.
76012         New module 'frexpf'.
76013         * lib/math.in.h (frexpf): New declaration.
76014         * lib/frexpf.c: New file.
76015         * m4/frexpf.m4: New file.
76016         * m4/math_h.m4 (gl_MATH_H): Test whether frexpf is declared.
76017         (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPF, HAVE_FREXPF.
76018         * modules/math (Makefile.am): Substitute GNULIB_FREXPF, HAVE_FREXPF.
76019         * modules/frexpf: New file.
76020         * tests/test-math-c++.cc: Check the declaration of frexpf.
76021         * doc/posix-functions/frexpf.texi: Mention the new module.
76023 2011-10-06  Bruno Haible  <bruno@clisp.org>
76025         math: Sort function declarations of math.in.h.
76026         * lib/math.in.h (frexp, logb): Move declarations.
76028 2011-10-05  Bruno Haible  <bruno@clisp.org>
76030         Tests for module 'modff'.
76031         * modules/modff-tests: New file.
76032         * tests/test-modff.c: New file.
76034         New module 'modff'.
76035         * lib/math.in.h (modff): New declaration.
76036         * lib/modff.c: New file.
76037         * m4/modff.m4: New file.
76038         * m4/math_h.m4 (gl_MATH_H): Test whether modff is declared.
76039         (gl_MATH_H_DEFAULTS): Initialize GNULIB_MODFF, HAVE_MODFF.
76040         * modules/math (Makefile.am): Substitute GNULIB_MODFF, HAVE_MODFF.
76041         * modules/modff: New file.
76042         * tests/test-math-c++.cc: Check the declaration of modff.
76043         * doc/posix-functions/modff.texi: Mention the new module.
76045         modf tests: Make test sharper.
76046         * tests/test-modf.c (main): Strengthen upper bound.
76048         modf: Use a .m4 file.
76049         * m4/modf.m4: New file.
76050         * modules/modf (Files): Add it.
76051         (configure.ac): Just invoke gl_FUNC_MODF.
76053 2011-10-05  Bruno Haible  <bruno@clisp.org>
76055         Tests for module 'fmodf'.
76056         * modules/fmodf-tests: New file.
76057         * tests/test-fmodf.c: New file.
76059         New module 'fmodf'.
76060         * lib/math.in.h (fmodf): New declaration.
76061         * lib/fmodf.c: New file.
76062         * m4/fmodf.m4: New file.
76063         * m4/math_h.m4 (gl_MATH_H): Test whether fmodf is declared.
76064         (gl_MATH_H_DEFAULTS): Initialize GNULIB_FMODF, HAVE_FMODF.
76065         * modules/math (Makefile.am): Substitute GNULIB_FMODF, HAVE_FMODF.
76066         * modules/fmodf: New file.
76067         * tests/test-math-c++.cc: Check the declaration of fmodf.
76068         * doc/posix-functions/fmodf.texi: Mention the new module.
76070         fmod: Use a .m4 file.
76071         * m4/fmod.m4: New file.
76072         * modules/fmod (Files): Add it.
76073         (configure.ac): Just invoke gl_FUNC_FMOD.
76075 2011-10-05  Bruno Haible  <bruno@clisp.org>
76077         Tests for module 'fabsf'.
76078         * modules/fabsf-tests: New file.
76079         * tests/test-fabsf.c: New file.
76081         New module 'fabsf'.
76082         * lib/math.in.h (fabsf): New declaration.
76083         * lib/fabsf.c: New file.
76084         * m4/fabsf.m4: New file.
76085         * m4/math_h.m4 (gl_MATH_H): Test whether fabsf is declared.
76086         (gl_MATH_H_DEFAULTS): Initialize GNULIB_FABSF, HAVE_FABSF.
76087         * modules/math (Makefile.am): Substitute GNULIB_FABSF, HAVE_FABSF.
76088         * modules/fabsf: New file.
76089         * tests/test-math-c++.cc: Check the declaration of fabsf.
76090         * doc/posix-functions/fabsf.texi: Mention the new module.
76092         fabs: Use a .m4 file.
76093         * m4/fabs.m4: New file.
76094         * modules/fabs (Files): Add it.
76095         (configure.ac): Just invoke gl_FUNC_FABS.
76097 2011-10-05  Jim Meyering  <meyering@redhat.com>
76099         file-has-acl: revert both recent changes, 80af92af and 95f7c57f
76100         * lib/file-has-acl.c: While the 2011-10-03 change does fix the
76101         ls -lL regression introduced in coreutils-8.12, it does so at the
76102         cost of an additional stat call in the common case.  Besides, now
76103         that the kernel change that prompted commit 95f7c57f has been reverted
76104         (see https://bugzilla.redhat.com/show_bug.cgi?id=720325#c24)
76105         we have no use for commit 95f7c57f, "file-has-acl: use
76106         acl_extended_file_nofollow if available".
76108 2011-10-03  Kamil Dudka  <kdudka@redhat.com>
76110         file-has-acl: revert unintended change in behavior of ls -L
76111         * lib/file-has-acl.c (acl_extended_file_wrap): New function,
76112         derived from...
76113         (file_has_acl): ...code here.  Call it.
76114         This problem was introduced with 2011-07-22 commit 95f7c57f,
76115         "file-has-acl: use acl_extended_file_nofollow if available".
76116         See http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/28538
76118 2011-10-03  Bruno Haible  <bruno@clisp.org>
76120         poll: Avoid link errors on MSVC.
76121         * m4/poll.m4 (gl_FUNC_POLL): Determine LIB_POLL.
76122         * modules/poll (Depends-on): Add sockets.
76123         (Link): New section.
76124         * NEWS: Mention the change.
76125         * modules/poll-tests (Makefile.am): Link test-poll against $(LIB_POLL).
76126         * modules/poll-h-c++-tests (Makefile.am): Link test-poll-h-c++ against
76127         $(LIB_POLL) instead of $(LIBSOCKET).
76129 2011-10-03  Bruno Haible  <bruno@clisp.org>
76131         sys_select tests: Fix link error on MSVC 9.
76132         * modules/sys_select-c++-tests (Makefile.am): Link test-sys_select-c++
76133         with $(LIB_SELECT) instead of $(LIBSOCKET).
76135 2011-10-03  Bruno Haible  <bruno@clisp.org>
76137         sys_select: Fix compilation error on mingw.
76138         * lib/sys_select.in.h: On native Windows, include <io.h>.
76140 2011-10-03  Bruno Haible  <bruno@clisp.org>
76142         wmemset: Support for MSVC.
76143         * m4/wmemset.m4 (gl_FUNC_WMEMSET): Use a small test program to test
76144         whether wmemset() exists.
76146 2011-10-03  Bruno Haible  <bruno@clisp.org>
76148         wmemmove: Support for MSVC.
76149         * m4/wmemmove.m4 (gl_FUNC_WMEMMOVE): Use a small test program to test
76150         whether wmemmove() exists.
76152 2011-10-03  Bruno Haible  <bruno@clisp.org>
76154         wmemcpy: Support for MSVC.
76155         * m4/wmemcpy.m4 (gl_FUNC_WMEMCPY): Use a small test program to test
76156         whether wmemcpy() exists.
76158 2011-10-03  Bruno Haible  <bruno@clisp.org>
76160         wmemcmp: Support for MSVC.
76161         * m4/wmemcmp.m4 (gl_FUNC_WMEMCMP): Use a small test program to test
76162         whether wmemcmp() exists.
76164 2011-10-03  Bruno Haible  <bruno@clisp.org>
76166         wmemchr: Support for MSVC.
76167         * m4/wmemchr.m4 (gl_FUNC_WMEMCHR): Use a small test program to test
76168         whether wmemchr() exists.
76170 2011-10-03  Bruno Haible  <bruno@clisp.org>
76172         glthread/*, strsignal: Support for MSVC.
76173         * lib/glthread/cond.h: Define WIN32_LEAN_AND_MEAN, so as to avoid
76174         including <winsock.h> on MSVC 9.
76175         * lib/glthread/lock.h: Likewise.
76176         * lib/glthread/thread.h: Likewise.
76177         * lib/glthread/tls.h: Likewise.
76178         * lib/glthread/yield.h: Likewise.
76179         * lib/strsignal.c: Include <string.h> first. Don't include <unistd.h>
76180         if HAVE_UNISTD_H is false.
76181         * m4/strsignal.m4 (gl_PREREQ_STRSIGNAL): Test for <unistd.h>.
76183 2011-10-03  Bruno Haible  <bruno@clisp.org>
76185         nonblocking tests: Fix test failure on OpenBSD/SPARC64.
76186         * tests/test-nonblocking-socket.h (SOCKET_DATA_BLOCK_SIZE) [OpenBSD]:
76187         Set to 100000.
76189 2011-10-03  Bruno Haible  <bruno@clisp.org>
76191         acl: Fix specification.
76192         * lib/file-has-acl.c (file_has_acl): Fix specification.
76194 2011-10-03  Bruno Haible  <bruno@clisp.org>
76196         relocatable-lib[-lgpl]: Avoid expensive /proc access on Linux, Cygwin.
76197         * lib/relocatable.c (ENABLE_COSTLY_RELOCATABLE): New macro.
76198         (compute_curr_prefix, shared_library_fullname,
76199         find_shared_library_fullname, get_shared_library_fullname, relocate):
76200         Use it together with PIC && INSTALLDIR.
76201         Reported by <jojelino@gmail.com>
76202         via Charles Wilson <cygwin@cwilson.fastmail.fm>.
76204 2011-10-01  Jim Meyering  <meyering@redhat.com>
76206         maint.mk: adjust a release-related rule not to require use of gzip
76207         * top/maint.mk (writable-files): Don't hard-code use of .tar.gz.
76208         Instead, check each file in $(DIST_ARCHIVES).  This is better for
76209         projects that build only .tar.xz files.  Also fix an erroneous test.
76211         test-linkat: don't leave behind a temporary file
76212         * tests/test-linkat.c (main): Don't forget to remove a temporary file.
76213         Otherwise, coreutils' "make distcheck" would fail with this:
76214           Only in /c/cu/tests/torture/coreutils/test/\
76215             coreutils-8.13.22-d5caf.old/gnulib-tests: test-linkat.too
76216           make[2]: *** [my-distcheck] Error 1
76218         float, math: add omitted file
76219         * lib/itold.c: Add file, required for yesterday's float change.
76221 2011-10-01  Bruno Haible  <bruno@clisp.org>
76223         isinf: Fix for OpenBSD/x86.
76224         * m4/isinf.m4 (gl_ISINFL_WORKS): Also test the behaviour of isinf on
76225         pseudo-NaNs, pseudo-Infinities, and other non-IEEE values.
76226         * doc/posix-functions/isinf.texi: Mention the problem on OpenBSD/x86.
76228 2011-10-01  Bruno Haible  <bruno@clisp.org>
76230         isfinite: Fix syntax error in configure test.
76231         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Fix syntax error.
76233         isfinite: Fix typo.
76234         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): When cross-compiling, set
76235         gl_cv_func_isfinitel_works, not gl_cv_func_isnanl_works.
76237 2011-10-01  Bruno Haible  <bruno@clisp.org>
76239         nonblocking tests: Fix test failure on Linux/IA-64.
76240         * tests/test-nonblocking-pipe.h (PIPE_DATA_BLOCK_SIZE) [Linux/IA-64]:
76241         Set to 270000.
76243 2011-10-01  Bruno Haible  <bruno@clisp.org>
76245         mkfifoat tests: Fix a test failure on mingw.
76246         * tests/test-mkfifoat.c (main): Allow mkfifoat or test_mknodat to fail
76247         with error ENOSYS.
76249 2011-09-30  Bruno Haible  <bruno@clisp.org>
76251         float, math: Fix 'int' to 'long double' conversion on Linux/SPARC64.
76252         * m4/float_h.m4 (gl_FLOAT_H): Test conversion from 'int' to
76253         'long double'. Set REPLACE_ITOLD.
76254         * lib/float.in.h (_Qp_itoq, _gl_float_fix_itold): New declarations.
76255         * lib/math.in.h (_Qp_itoq, _gl_math_fix_itold): New declarations.
76256         * lib/itold.c: New file.
76257         * modules/float (Files): Add lib/itold.c.
76258         (configure.ac): When REPLACE_ITOLD is 1, arrange to compile itold.c.
76259         (Makefile.am): Substitute REPLACE_ITOLD.
76260         * modules/math (Depends-on): Add float.
76261         (Makefile.am): Substitute REPLACE_ITOLD.
76262         * doc/posix-headers/float.texi: Mention problem on Linux/SPARC64.
76263         * doc/posix-headers/math.texi: Likewise.
76264         * doc/posix-functions/logl.texi: Likewise.
76266 2011-09-30  Bruno Haible  <bruno@clisp.org>
76268         nonblocking tests: Fix test failure on Linux/SPARC (32-bit and 64-bit).
76269         * tests/test-nonblocking-pipe.h (PIPE_DATA_BLOCK_SIZE) [Linux/SPARC]:
76270         Set to 140000.
76272 2011-09-30  Bruno Haible  <bruno@clisp.org>
76274         gnulib-tool: Improve suggestion where to put gl_EARLY invocation.
76275         * gnulib-tool (func_import): If the configure.ac has an AC_PROG_CC_STDC
76276         invocation, say "right after AC_PROG_CC_STDC", not "right after
76277         AC_PROG_CC".
76278         Reported by Gary V. Vaughan <gary@gnu.org>.
76280 2011-09-30  Bruno Haible  <bruno@clisp.org>
76282         Centralize C99 requirement.
76283         * m4/gnulib-common.m4 (gl_PROG_CC_C99): New macro.
76284         * modules/stdarg (configure.ac-early): Invoke it instead of
76285         AC_PROG_CC_STDC.
76286         Reported by Gary V. Vaughan and Paul Eggert.
76288 2011-09-29  Bruno Haible  <bruno@clisp.org>
76290         float: Fix LDBL_MAX value on Linux/PowerPC.
76291         * m4/float_h.m4 (gl_FLOAT_H): Set FLOAT_H and REPLACE_FLOAT_LDBL also
76292         on Linux/PowerPC.
76293         * lib/float.in.h (LDBL_MAX): Redefine also on Linux/PowerPC.
76294         * lib/float.c (gl_LDBL_MAX): Also define on Linux/PowerPC.
76295         * doc/posix-headers/float.texi: Mention Linux/PowerPC as an affected
76296         platform.
76297         Reported by Andreas Metzler <ametzler@downhill.at.eu.org>.
76299 2011-09-29  Bruno Haible  <bruno@clisp.org>
76301         doc: Improve doc about gl_EARLY.
76302         * doc/gnulib-tool.texi (Initial import): Mention where to place an
76303         AC_PROG_CC_STDC invocation.
76304         Reported by Gary V. Vaughan <gary@gnu.org>.
76306 2011-09-28  Bruno Haible  <bruno@clisp.org>
76308         fgetc, fputc, fread, fwrite tests: Fix link error.
76309         * tests/test-fgetc.c (main): Don't invoke gl_msvc_inval_ensure_handler
76310         on non-MSVC platforms.
76311         * tests/test-fputc.c (main): Likewise.
76312         * tests/test-fread.c (main): Likewise.
76313         * tests/test-fwrite.c (main): Likewise.
76314         Reported by Jim Meyering.
76316 2011-09-27  Bruno Haible  <bruno@clisp.org>
76318         fputc, fwrite tests: Avoid test failure on MSVC.
76319         * tests/test-fgetc.c: Include msvc-inval.h.
76320         (main): Invoke gl_msvc_inval_ensure_handler.
76321         * tests/test-fputc.c: Include msvc-inval.h.
76322         (main): Invoke gl_msvc_inval_ensure_handler.
76323         * tests/test-fread.c: Include msvc-inval.h.
76324         (main): Invoke gl_msvc_inval_ensure_handler.
76325         * tests/test-fwrite.c: Include msvc-inval.h.
76326         (main): Invoke gl_msvc_inval_ensure_handler.
76327         * modules/fgetc-tests (Depends-on): Add msvc-inval.
76328         * modules/fputc-tests (Depends-on): Likewise.
76329         * modules/fread-tests (Depends-on): Likewise.
76330         * modules/fwrite-tests (Depends-on): Likewise.
76332 2011-09-27  Bruno Haible  <bruno@clisp.org>
76334         raise: Fix double declaration with modules 'sigprocmask' and 'sigpipe'.
76335         * lib/signal.in.h (GNULIB_defined_signal_blocking): New macro.
76336         (raise): Remove older, duplicated declaration.
76337         (_gl_raise_SIGPIPE): New declaration.
76338         * lib/sigprocmask.c (_gl_raise_SIGPIPE): New function.
76339         (rpl_raise): Remove function.
76340         * lib/raise.c (rpl_raise, raise): Merge into a single function. Handle
76341         a gnulib-defined SIGPIPE here.
76342         * m4/raise.m4 (gl_FUNC_RAISE): Set REPLACE_RAISE also if the module
76343         'sigprocmask' has detected missing signal-blocking and the module
76344         'sigpipe' is enabled.
76345         Reported by Tatsuro MATSUOKA <tmacchant5@yahoo.co.jp>.
76347 2011-09-26  Gijs van Tulder  <gvtulder@gmail.com>
76349         base64-tests: avoid memory leak
76350         * tests/test-base64.c (main): Plug memory leak.
76352         base32: new module
76353         * modules/base32: New module.
76354         * lib/base32.c: New file.
76355         * lib/base32.h: Likewise.
76356         * m4/base32.m4: Likewise.
76357         * modules/base32-tests: New test.
76358         * tests/test-base32.c: Likewise.
76359         * MODULES.html.sh (Misc): Mention it.
76361 2011-09-26  Paul Eggert  <eggert@cs.ucla.edu>
76363         gnulib: use more-standard license notice wording
76364         * gnulib-tool (func_emit_copyright_notice): When emitting a
76365         license notice into a file, use the standard wording as suggested
76366         by the current information for GNU maintainers, except say "file"
76367         rather than "program".  The new wording gives a license version
76368         number, which addresses an issue raised by Glenn Morris in
76369         <http://lists.gnu.org/r/bug-gnulib/2011-09/msg00397.html>.
76370         * m4/onceonly.m4: Use that same wording here, too.
76372         dup2: minor simplification
76373         * m4/dup2.m4 (gl_PREREQ_DUP2): Don't require AC_C_INLINE,
76374         as lib/dup2.c no longer uses 'inline'.
76376 2011-09-25  Bruno Haible  <bruno@clisp.org>
76378         strings: Fix compilation error on MSVC.
76379         * lib/strings.in.h: Include <stddef.h> for size_t.
76381 2011-09-25  Bruno Haible  <bruno@clisp.org>
76383         fflush et al.: Document limitation on MSVC.
76384         * doc/posix-functions/fflush.texi: Document possible crash in handling
76385         mode other than DEFAULT_HANDLING.
76386         * doc/posix-functions/fgetc.texi: Likewise.
76387         * doc/posix-functions/fputc.texi: Likewise.
76388         * doc/posix-functions/fread.texi: Likewise.
76389         * doc/posix-functions/fwrite.texi: Likewise.
76391 2011-09-25  Bruno Haible  <bruno@clisp.org>
76393         msvc-inval: Allow three invalid parameter handling modes.
76394         * lib/msvc-inval.h: Don't include <stdlib.h> here.
76395         (DEFAULT_HANDLING, HAIRY_LIBRARY_HANDLING, SANE_LIBRARY_HANDLING): New
76396         macros.
76397         (gl_msvc_inval_ensure_handler, TRY_MSVC_INVAL, CATCH_MSVC_INVAL,
76398         DONE_MSVC_INVAL): Implement DEFAULT_HANDLING. Treat
76399         SANE_LIBRARY_HANDLING as a no-op.
76400         * lib/msvc-inval.c: Treat SANE_LIBRARY_HANDLING as a no-op. Include
76401         <stdlib.h>.
76402         (gl_msvc_invalid_parameter_handler): Implement DEFAULT_HANDLING.
76404 2011-09-25  Bruno Haible  <bruno@clisp.org>
76406         msvc-inval: Make handler multithread-safe.
76407         * lib/msvc-inval.h (struct gl_msvc_inval_per_thread): New type.
76408         (gl_msvc_inval_restart, gl_msvc_inval_restart_valid): Remove
76409         declarations.
76410         (gl_msvc_inval_current): New declaration.
76411         (TRY_MSVC_INVAL, CATCH_MSVC_INVAL, DONE_MSVC_INVAL) [!_MSC_VER]:
76412         Operate on the structure returned by gl_msvc_inval_current().
76413         * lib/msvc-inval.c (gl_msvc_inval_restart, gl_msvc_inval_restart_valid):
76414         Remove varaiables.
76415         (tls_index, tls_initialized): New variables.
76416         (not_per_thread): New variable.
76417         (gl_msvc_inval_current): New function.
76418         (gl_msvc_invalid_parameter_handler) [!_MSC_VER]: Use the structure
76419         returned by gl_msvc_inval_current().
76421 2011-09-25  Bruno Haible  <bruno@clisp.org>
76423         msvc-inval: Install handler globally.
76424         * lib/msvc-inval.h (STATUS_GNULIB_INVALID_PARAMETER): Define also for
76425         !_MSC_VER.
76426         (gl_msvc_invalid_parameter_handler): Remove declaration.
76427         (gl_msvc_inval_restart_valid, gl_msvc_inval_ensure_handler): New
76428         declarations.
76429         (TRY_MSVC_INVAL, CATCH_MSVC_INVAL, DONE_MSVC_INVAL) [!_MSC_VER]:
76430         Install the handler globally, don't uninstall it.
76431         * lib/msvc-inval.c (gl_msvc_inval_restart_valid): New variable.
76432         (gl_msvc_invalid_parameter_handler): Make static. If the restart is not
76433         currently valid, call RaiseException instead.
76434         (gl_msvc_inval_initialized, gl_msvc_inval_ensure_handler): Define also
76435         for !_MSC_VER.
76437 2011-09-25  Bruno Haible  <bruno@clisp.org>
76439         strerror_r-posix: Fix for MSVC 9.
76440         * lib/strerror_r.c (local_snprintf): New function.
76441         (snprintf): Define to local_snprintf, not to _snprintf.
76443 2011-09-25  Bruno Haible  <bruno@clisp.org>
76445         ftruncate: Support for MSVC 9.
76446         * lib/ftruncate.c: Include errno.h, msvc-inval.h.
76447         (chsize_nothrow): New function.
76448         (chsize): Redefine as a macro.
76449         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): Require AC_C_INLINE.
76450         * modules/ftruncate (Depends-on): Add msvc-inval.
76452 2011-09-25  Bruno Haible  <bruno@clisp.org>
76454         New module 'fstat'.
76455         * lib/sys_stat.in.h (fstat): Declare only if GNULIB_FSTAT is set.
76456         * lib/fstat.c: New file, based on a piece of lib/fchdir.c.
76457         * lib/fchdir.c (rpl_fstat): Remove function.
76458         * m4/fstat.m4: New file.
76459         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't set REPLACE_FSTAT.
76460         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Test whether fstat is
76461         declared.
76462         (gl_SYS_STAT_H_DEFAULTS): Initialize GNULIB_FSTAT.
76463         * modules/sys_stat (Makefile.am): Substitute GNULIB_FSTAT.
76464         * modules/fstat: New file.
76465         * modules/sys_stat-tests (Depends-on): Remove fstat-tests.
76466         * tests/test-sys_stat-c++.cc (fstat): Check only if GNULIB_TEST_FSTAT
76467         is set.
76468         * doc/posix-functions/fstat.texi: Mention the new module and the
76469         problem on MSVC.
76470         * NEWS: Mention the change.
76471         * modules/acl (Depends-on): Add fstat.
76472         * modules/chdir-safer (Depends-on): Likewise.
76473         * modules/chown (Depends-on): Likewise.
76474         * modules/copy-file (Depends-on): Likewise.
76475         * modules/fchdir (Depends-on): Likewise.
76476         * modules/fdopendir (Depends-on): Likewise.
76477         * modules/fopen (Depends-on): Likewise.
76478         * modules/fts (Depends-on): Likewise.
76479         * modules/getcwd (Depends-on): Likewise.
76480         * modules/isapipe (Depends-on): Likewise.
76481         * modules/linkat (Depends-on): Likewise.
76482         * modules/lseek (Depends-on): Likewise.
76483         * modules/mkdir-p (Depends-on): Likewise.
76484         * modules/open (Depends-on): Likewise.
76485         * modules/openat (Depends-on): Likewise.
76486         * modules/read-file (Depends-on): Likewise.
76487         * modules/renameat (Depends-on): Likewise.
76488         * modules/utimens (Depends-on): Likewise.
76490 2011-09-25  Bruno Haible  <bruno@clisp.org>
76492         linkat: Fix compilation on MSVC 9.
76493         * lib/linkat.c: Don't include <stdint.h>.
76495 2011-09-25  Bruno Haible  <bruno@clisp.org>
76497         fclose: Support for MSVC 9.
76498         * lib/fclose.c: Include msvc-inval.h.
76499         (fclose_nothrow): New function.
76500         (rpl_fclose): Use it.
76501         * modules/fclose (Depends-on): Add msvc-inval.
76502         * doc/posix-functions/fclose.texi: Mention the problem on MSVC.
76504 2011-09-24  Paul Eggert  <eggert@cs.ucla.edu>
76506         dup2: minor simplifications
76507         * lib/dup2.c (ms_windows_dup2): Omit 'inline' as it's not clear
76508         that it's a performance win.
76509         (rpl_dup2): Change "if !((defined _WIN32 || defined __WIN32__) &&
76510         ! defined __CYGWIN__)" to "ifdef F_GETFL".
76512 2011-09-24  Jim Meyering  <meyering@redhat.com>
76514         test-futimens: avoid a warning from gcc -Wshadow
76515         * tests/test-futimens.h (test_futimens): Rename inner local, s/fd/fd0/
76516         to avoid a shadowing warning.
76518 2011-09-24  Bruno Haible  <bruno@clisp.org>
76520         fdopen: Support for MSVC 9.
76521         * m4/fdopen.m4 (gl_FUNC_FDOPEN): Set REPLACE_FDOPEN also if
76522         HAVE_MSVC_INVALID_PARAMETER_HANDLER is 1.
76523         * lib/fdopen.c: Include msvc-inval.h.
76524         (fdopen_nothrow): New function.
76525         (rpl_fdopen): Use it.
76526         * modules/fdopen (Depends-on): Add msvc-inval.
76527         * modules/fclose-tests (Depends-on): Add fdopen.
76528         * modules/fflush-tests (Depends-on): Likewise.
76529         * modules/fgetc-tests (Depends-on): Likewise.
76530         * modules/fputc-tests (Depends-on): Likewise.
76531         * modules/fread-tests (Depends-on): Likewise.
76532         * modules/freopen-tests (Depends-on): Likewise.
76533         * modules/fseeko-tests (Depends-on): Likewise.
76534         * modules/ftello-tests (Depends-on): Likewise.
76535         * modules/fwrite-tests  (Depends-on): Likewise.
76536         * doc/posix-functions/fdopen.texi: Mention the problem on MSVC.
76538 2011-09-24  Bruno Haible  <bruno@clisp.org>
76540         fgetc, fputc, fread, fwrite tests: Avoid compilation error on MSVC.
76541         * modules/fgetc-tests (Depends-on): Add unistd.
76542         * modules/fputc-tests (Depends-on): Likewise.
76543         * modules/fread-tests (Depends-on): Likewise.
76544         * modules/fwrite-tests (Depends-on): Likewise.
76546 2011-09-24  Bruno Haible  <bruno@clisp.org>
76548         dup: Simplify autoconf test.
76549         * m4/dup.m4 (gl_FUNC_DUP): Don't run a test program. Instead, just rely
76550         on gl_MSVC_INVAL's result.
76552 2011-09-24  Bruno Haible  <bruno@clisp.org>
76554         Tests for function fwrite().
76555         * modules/fwrite-tests: New file.
76556         * tests/test-fwrite.c: New file.
76557         * modules/stdio-tests (Depends-on): Add fwrite-tests.
76559         Tests for function fread().
76560         * modules/fread-tests: New file.
76561         * tests/test-fread.c: New file.
76562         * modules/stdio-tests (Depends-on): Add fread-tests.
76564         Activate fputc tests.
76565         * modules/stdio-tests (Depends-on): Add fputc-tests.
76567         Enhance fgetc, fputc tests.
76568         * tests/test-fgetc.c (main): Also test the stream's error indicator.
76569         * tests/test-fputc.c (main): Likewise.
76571 2011-09-24  Bruno Haible  <bruno@clisp.org>
76573         write: Support for MSVC 9.
76574         * lib/unistd.in.h (write): Replace also when GNULIB_UNISTD_H_NONBLOCKING
76575         is not 1.
76576         * lib/write.c (write_nothrow): New function.
76577         (rpl_write): Define also when GNULIB_NONBLOCKING or GNULIB_SIGPIPE is
76578         not 1. Use write_nothrow.
76579         * m4/write.m4 (gl_FUNC_WRITE): Replace read if the platform has an
76580         invalid parameter handler.
76581         (gl_PREREQ_WRITE): New macro.
76582         * modules/write (Depends-on): Add msvc-inval.
76583         (configure.ac): Invoke gl_PREREQ_WRITE.
76584         * doc/posix-functions/write.texi: Mention the problem on MSVC.
76586 2011-09-24  Bruno Haible  <bruno@clisp.org>
76588         read: Fix last commit.
76589         * lib/read.c (read_nothrow): Change return type to 'ssize_t'.
76591 2011-09-24  Bruno Haible  <bruno@clisp.org>
76593         dup2: Fix last commit.
76594         * lib/dup2.c: Restore comments. Treat Cygwin like Unix.
76595         (rpl_dup2): Disable fcntl workaround on native Windows.
76597         sigprocmask: Make code safer.
76598         * lib/sigprocmask.c: Move '#include "msvc-inval.h"' before the code
76599         section that changes macro definitions for this compilation unit.
76601 2011-09-23  Paul Eggert  <eggert@cs.ucla.edu>
76603         dup2: clarify by coalescing Windows-specific material
76604         * lib/dup2.c: Move '#include "msvc-inval.h"' and '#include
76605         "msvc-nothrow.h"' to the Windows-specific section, so that the
76606         Emacs source need not contain these include files.
76607         (ms_windows_dup2): Rename from dup2_nothrow, and move all the
76608         Windows-specific fixes into this function rather than just the
76609         nothrow fix, as this shortens and clarifies the code.  Always
76610         define as a function, as that's a bit cleaner than having it be
76611         sometimes a function and sometimes a macro.
76612         (rpl_dup2): Move the Windows-specific stuff out of here and into
76613         ms_windows_dup2.  Don't protect the Haiku-related fix with
76614         "#if !defined __linux__", as the same code also works around
76615         a Linux kernel bug, and it doesn't add any system calls on any
76616         platform.  Add comment about FreeBSD 6.1.
76618         sigprocmask: move #include directive
76619         * lib/sigprocmask.c: Move '#include "msvc-inval.h"' to the
76620         Windows-specific section, so that the Emacs source need not
76621         contain msvc-inval.h.
76623 2011-09-23  Bruno Haible  <bruno@clisp.org>
76625         read: Support for MSVC 9.
76626         * lib/unistd.in.h (read): Replace also when GNULIB_UNISTD_H_NONBLOCKING
76627         is not 1.
76628         * lib/read.c (read_nothrow): New function.
76629         (rpl_read): Define also when GNULIB_NONBLOCKING is not 1. Use
76630         read_nothrow.
76631         * m4/read.m4 (gl_FUNC_READ): Replace read if the platform has an
76632         invalid parameter handler.
76633         (gl_PREREQ_READ): New macro.
76634         * modules/read (Depends-on): Add msvc-inval.
76635         (configure.ac): Invoke gl_PREREQ_READ.
76636         * doc/posix-functions/read.texi: Mention the problem on MSVC.
76638 2011-09-23  Bruno Haible  <bruno@clisp.org>
76640         close: Support for MSVC 9.
76641         * lib/close.c: Include <errno.h>, msvc-inval.h.
76642         (close_nothrow): New function.
76643         (rpl_close): Use it.
76644         * m4/close.m4 (gl_FUNC_CLOSE): Replace close if the platform has an
76645         invalid parameter handler.
76646         * modules/close (Depends-on): Add msvc-inval.
76647         * modules/dup2-tests (Depends-on): Add close.
76648         * modules/dup3-tests (Depends-on): Likewise.
76649         * modules/fcntl-tests (Depends-on): Likewise.
76650         * modules/spawn-pipe-tests (Depends-on): Likewise.
76651         * modules/unistd-safer-tests (Depends-on): Likewise.
76652         * doc/posix-functions/close.texi: Mention the problem on MSVC.
76654 2011-09-23  Bruno Haible  <bruno@clisp.org>
76656         New module 'dup'.
76657         * lib/unistd.in.h (dup): Declare only if the 'dup' module is in use.
76658         Allow replacement.
76659         * lib/dup.c: New file.
76660         * lib/fchdir.c (rpl_dup): Remove function.
76661         * m4/dup.m4: New file.
76662         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't set REPLACE_DUP here.
76663         * m4/unistd_h.m4 (gl_UNISTD_H): Test whether 'dup' is declared.
76664         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_DUP.
76665         * modules/unistd (Makefile.am): Substitute GNULIB_DUP.
76666         * modules/dup: New file.
76667         * tests/test-unistd-c++.cc: Check the signature of 'dup' only if the
76668         'dup' module is in use.
76669         * modules/fdopendir (Depends-on): Add dup.
76670         * modules/fdutimensat-tests (Depends-on): Likewise.
76671         * modules/fts (Depends-on): Likewise.
76672         * modules/futimens-tests (Depends-on): Likewise.
76673         * modules/posix_spawnp-tests (Depends-on): Likewise.
76674         * modules/unistd-safer-tests (Depends-on): Likewise.
76675         * modules/utimens-tests (Depends-on): Likewise.
76676         * doc/posix-functions/dup.texi: Mention the new module and the problem
76677         on MSVC.
76679 2011-09-23  Bruno Haible  <bruno@clisp.org>
76681         getdtablesize: Support for MSVC 9.
76682         * lib/getdtablesize.c: Include msvc-inval.h.
76683         (_setmaxstdio_nothrow): New function.
76684         (_setmaxstdio): Redefine it.
76685         * m4/getdtablesize.m4 (gl_PREREQ_GETDTABLESIZE): New macro.
76686         * modules/getdtablesize (Depends-on): Add msvc-inval.
76687         (configure.ac): Invoke gl_PREREQ_GETDTABLESIZE.
76689 2011-09-23  Bruno Haible  <bruno@clisp.org>
76691         signal-h: Rename from signal.
76692         * modules/signal-h: Renamed from modules/signal.
76693         * modules/pthread_sigmask (Depends-on): Update.
76694         * modules/raise (Depends-on): Likewise.
76695         * modules/sigaction (Depends-on): Likewise.
76696         * modules/sigpipe (Depends-on): Likewise.
76697         * modules/sigprocmask (Depends-on): Likewise.
76698         * modules/sys_select (Depends-on): Likewise.
76699         * modules/signal-h-tests: Renamed from modules/signal-tests.
76700         (Files, Depends-on, Makefile.am): Update.
76701         * tests/test-signal-h.c: Renamed from tests/test-signal.c.
76702         * modules/signal-h-c++-tests: Renamed from modules/signal-c++-tests.
76703         (Files, Makefile.am): Update.
76704         * tests/test-signal-h-c++.cc: Renamed from tests/test-signal-c++.cc.
76705         * tests/test-signal-h-c++2.cc: Renamed from tests/test-signal-c++2.cc.
76706         * modules/signal: New placeholder file.
76707         * MODULES.html.sh (Support for systems lacking POSIX:2008): Update.
76708         * doc/posix-headers/signal.texi: Update.
76709         * NEWS: Mention the change.
76711 2011-09-23  Bruno Haible  <bruno@clisp.org>
76713         sigprocmask: Avoid crashes through signal() on MSVC 9.
76714         * lib/sigprocmask.c: Include msvc-inval.h.
76715         (signal_nothrow): New function.
76716         (signal): Redefine it.
76717         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Require AC_C_INLINE.
76718         * modules/sigprocmask (Depends-on): Add msvc-inval.
76719         * doc/posix-functions/signal.texi: Mention the problem on MSVC.
76721 2011-09-23  Bruno Haible  <bruno@clisp.org>
76723         Tests for module 'raise'.
76724         * modules/raise-tests: New file.
76725         * tests/test-raise.c: New file.
76727         raise: Support for MSVC.
76728         * lib/signal.in.h (raise): New declaration.
76729         * lib/raise.c (raise_nothrow, rpl_raise): New alternate implementation
76730         for native Windows platforms.
76731         * m4/raise.m4: New file.
76732         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Initialize GNULIB_RAISE,
76733         HAVE_RAISE, REPLACE_RAISE.
76734         * modules/signal (Makefile.am): Substitute GNULIB_RAISE, HAVE_RAISE,
76735         REPLACE_RAISE.
76736         * modules/raise (Status, Notice): Remove fields.
76737         (Files): Add m4/raise.m4.
76738         (Depends-on): Add signal, msvc-inval.
76739         (configure.ac): Use the common idioms.
76740         (Maintainer): Add me.
76741         * tests/test-signal-c++.cc: Check the signature of raise.
76742         * doc/posix-functions/raise.texi: Mention the problem on MSVC.
76744 2011-09-23  Bruno Haible  <bruno@clisp.org>
76746         pipe2: Fix compilation on pre-C99 compilers.
76747         * lib/pipe2.c (pipe2): Surround verify(...) declaration with braces.
76749 2011-09-23  Bruno Haible  <bruno@clisp.org>
76751         New module 'msvc-nothrow'. Makes _get_osfhandle safe on MSVC 9.
76752         * lib/msvc-nothrow.h: New file.
76753         * lib/msvc-nothrow.c: New file.
76754         * m4/msvc-nothrow.m4: New file.
76755         * modules/msvc-nothrow: New file.
76756         * lib/dup2.c: Include msvc-nothrow.h.
76757         (rpl_dup2): No need to protect _get_osfhandle call here.
76758         * lib/accept4.c: Include msvc-nothrow.h.
76759         * lib/error.c: Likewise.
76760         * lib/fcntl.c: Likewise.
76761         * lib/lseek.c: Likewise.
76762         * lib/nonblocking.c: Likewise.
76763         * lib/poll.c: Likewise.
76764         * lib/read.c: Likewise.
76765         * lib/select.c: Likewise.
76766         * lib/sockets.h: Likewise.
76767         * lib/sockets.c: Likewise.
76768         * lib/stdio-read.c: Likewise.
76769         * lib/stdio-write.c: Likewise.
76770         * lib/write.c: Likewise.
76771         * lib/w32sock.h: Likewise.
76772         * lib/w32spawn.h: Likewise.
76773         * lib/flock.c: Include msvc-nothrow.h instead of <io.h>.
76774         * lib/fsync.c: Likewise.
76775         * lib/isapipe.c: Likewise.
76776         * modules/dup2 (Depends-on): Add msvc-nothrow.
76777         * modules/accept4 (Depends-on): Likewise.
76778         * modules/error (Depends-on): Likewise.
76779         * modules/fcntl (Depends-on): Likewise.
76780         * modules/lseek (Depends-on): Likewise.
76781         * modules/nonblocking (Depends-on): Likewise.
76782         * modules/poll (Depends-on): Likewise.
76783         * modules/read (Depends-on): Likewise.
76784         * modules/select (Depends-on): Likewise.
76785         * modules/sockets (Depends-on): Likewise.
76786         * modules/sigpipe (Depends-on): Likewise.
76787         * modules/write (Depends-on): Likewise.
76788         * modules/accept (Depends-on): Likewise.
76789         * modules/bind (Depends-on): Likewise.
76790         * modules/connect (Depends-on): Likewise.
76791         * modules/gethostname (Depends-on): Likewise.
76792         * modules/getpeername (Depends-on): Likewise.
76793         * modules/getsockname (Depends-on): Likewise.
76794         * modules/getsockopt (Depends-on): Likewise.
76795         * modules/ioctl (Depends-on): Likewise.
76796         * modules/listen (Depends-on): Likewise.
76797         * modules/recv (Depends-on): Likewise.
76798         * modules/recvfrom (Depends-on): Likewise.
76799         * modules/send (Depends-on): Likewise.
76800         * modules/sendto (Depends-on): Likewise.
76801         * modules/setsockopt (Depends-on): Likewise.
76802         * modules/shutdown (Depends-on): Likewise.
76803         * modules/socket (Depends-on): Likewise.
76804         * modules/execute (Depends-on): Likewise.
76805         * modules/spawn-pipe (Depends-on): Likewise.
76806         * modules/flock (Depends-on): Likewise.
76807         * modules/fsync (Depends-on): Likewise.
76808         * modules/isapipe (Depends-on): Likewise.
76809         * tests/test-cloexec.c: Include msvc-nothrow.h.
76810         * tests/test-dup-safer.c: Likewise.
76811         * tests/test-dup2.c: Likewise.
76812         * tests/test-dup3.c: Likewise.
76813         * tests/test-fcntl.c: Likewise.
76814         * tests/test-pipe.c: Likewise.
76815         * tests/test-pipe2.c: Likewise.
76816         * modules/cloexec-tests (Depends-on): Add msvc-nothrow.
76817         * modules/unistd-safer-tests (Depends-on): Likewise.
76818         * modules/dup2-tests (Depends-on): Likewise.
76819         * modules/dup3-tests (Depends-on): Likewise.
76820         * modules/fcntl-tests (Depends-on): Likewise.
76821         * modules/pipe-posix-tests (Depends-on): Likewise.
76822         * modules/pipe2-tests (Depends-on): Likewise.
76824 2011-09-23  Bruno Haible  <bruno@clisp.org>
76826         dup2: Make code more maintainable.
76827         * lib/dup2.c (dup2_nothrow): New function, extracted from rpl_dup2.
76828         (rpl_dup2): Use it.
76829         * m4/dup2.m4 (gl_PREREQ_DUP2): New macro.
76830         * modules/dup2 (configure.ac): Invoke it.
76831         Reported by Paul Eggert.
76833 2011-09-23  Bruno Haible  <bruno@clisp.org>
76835         msvc-inval: Fix compilation error.
76836         * lib/msvc-inval.h: Include <excpt.h>.
76838 2011-09-23  Bruno Haible  <bruno@clisp.org>
76840         mkdir: Tweak for MSVC 9.
76841         * lib/sys_stat.in.h: Update comments.
76842         * doc/posix-functions/mkdir.texi: Mention problem on MSVC 9.
76844         Tests for module 'chdir'.
76845         * modules/chdir-tests: New file.
76846         * tests/test-chdir.c: New file.
76848         New module 'chdir'.
76849         * modules/chdir: New file.
76850         * lib/unistd.in.h: Include <io.h>, <direct.h> also for chdir.
76851         (chdir): New declaration.
76852         * m4/unistd_h.m4 (gl_UNISTD_H): Test whether chdir is declared.
76853         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_CHDIR.
76854         * modules/unistd (Makefile.am): Substitute GNULIB_CHDIR.
76855         * tests/test-unistd-c++.cc: Check signature of chdir.
76856         * doc/posix-functions/chdir.texi: Mention problem on native Windows.
76857         * modules/chdir-long (Depends-on): Add chdir.
76858         * modules/fchdir (Depends-on): Likewise.
76859         * modules/rename (Depends-on): Likewise.
76860         * modules/savewd (Depends-on): Likewise.
76862         rmdir: Support for mingw, MSVC 9.
76863         * lib/unistd.in.h: Include <io.h> and <direct.h> also for rmdir.
76864         * doc/posix-functions/getcwd.texi: Mention problem on native Windows.
76866         getcwd: Tweak for MSVC 9.
76867         * lib/unistd.in.h: Update comments.
76868         * doc/posix-functions/getcwd.texi: Mention problem on MSVC 9.
76870 2011-09-22  Bruno Haible  <bruno@clisp.org>
76872         strerror_r-posix: Avoid a link error on MSVC.
76873         * m4/strerror_r.m4 (gl_PREREQ_STRERROR_R): Check for snprintf.
76874         * lib/strerror_r.c (snprintf): Define to _snprintf if it doesn't exist.
76876 2011-09-22  Bruno Haible  <bruno@clisp.org>
76878         select: Avoid link errors on MSVC.
76879         * m4/select.m4 (gl_FUNC_SELECT): Determine LIB_SELECT.
76880         * modules/select (Link): Replace $(LIBSOCKET) with $(LIB_SELECT).
76881         * modules/pselect (Link): Likewise.
76882         * NEWS: Mention the change.
76883         * modules/select-tests (Makefile.am): Link test-select, test-select-fd,
76884         test-select-stdin against $(LIB_SELECT).
76885         * modules/pselect-tests (Makefile.am): Link test-pselect against
76886         $(LIB_SELECT).
76888 2011-09-22  Bruno Haible  <bruno@clisp.org>
76890         select: Avoid compilation error on MSVC.
76891         * lib/select.c: Don't include <stdbool.h>.
76893 2011-09-21  Bruno Haible  <bruno@clisp.org>
76895         Consolidate all uses of PATH_MAX in *.m4 files.
76896         * m4/pathmax.m4 (gl_PATHMAX_SNIPPET, gl_PATHMAX_SNIPPET_PREREQ): New
76897         macros.
76898         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Use gl_PATHMAX_SNIPPET_PREREQ
76899         and gl_PATHMAX_SNIPPET.
76900         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise.
76901         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
76902         * modules/chdir-long (Files): Add m4/pathmax.m4.
76903         * modules/getcwd (Files): Likewise.
76905 2011-09-21  Bruno Haible  <bruno@clisp.org>
76907         ftruncate: Un-deprecate, concentrate on Win32 support.
76908         * modules/ftruncate (Status, Notice): Remove sections.
76909         (Depends-on): Add largefile.
76910         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Drop failure message on
76911         non-mingw platforms.
76912         * lib/ftruncate.c: Remove code for the older platforms. For Win32,
76913         include <io.h>.
76914         * modules/perror-tests (Depends-on): Add ftruncate.
76915         * doc/posix-functions/ftruncate.texi: Mention the MSVC problem and the
76916         'ftruncate' module.
76918 2011-09-21  Bruno Haible  <bruno@clisp.org>
76920         Add dependencies to new dirent related modules.
76921         * modules/opendir (Depends-on): Add closedir.
76922         * modules/getcwd (Depends-on): Add opendir, closedir.
76923         * modules/dirent-safer-tests (Depends-on): Likewise.
76924         * modules/fdopendir-tests (Depends-on): Likewise.
76925         * modules/rename-tests (Depends-on): Add opendir, readdir, closedir.
76926         * modules/renameat-tests (Depends-on): Likewise.
76928 2011-09-21  Bruno Haible  <bruno@clisp.org>
76930         opendir: Avoid compilation error on mingw.
76931         * lib/opendir.c: Include <stddef.h> always. Include <unistd.h> as well.
76932         * modules/opendir (Depends-on): Add unistd.
76934 2011-09-21  Bruno Haible  <bruno@clisp.org>
76936         ftruncate tests: Avoid a test failure on mingw.
76937         * tests/test-ftruncate.c (main): Allow a failure with EACCES.
76939 2011-09-21  Bruno Haible  <bruno@clisp.org>
76941         select tests: Avoid test failures on OSF/1 5.1 and mingw.
76942         * tests/test-select.h (test_bad_fd): Disable all tests on OSF/1 and
76943         native Windows.
76945 2011-09-21  Bruno Haible  <bruno@clisp.org>
76947         New module 'fdopen'.
76948         * lib/stdio.in.h (fdopen): New declaration.
76949         * lib/fdopen.c: New file.
76950         * m4/fdopen.m4: New file.
76951         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize GNULIB_FDOPEN,
76952         REPLACE_FDOPEN.
76953         * modules/stdio (Makefile.am): Substitute GNULIB_FDOPEN,
76954         REPLACE_FDOPEN.
76955         * modules/fdopen: New file.
76956         * modules/stdio-tests (Depends-on): Remove fdopen-tests.
76957         * tests/test-stdio-c++.cc: Check signature of fdopen.
76958         * doc/posix-functions/fdopen.texi: Mention the new module.
76960 2011-09-21  Bruno Haible  <bruno@clisp.org>
76962         unlockpt tests: Avoid test failure on NetBSD 5.1.
76963         * tests/test-unlockpt.c (main): Skip the EBADF tests on NetBSD.
76964         * doc/posix-functions/unlockpt.texi: Mention the bug on NetBSD.
76966 2011-09-21  Bruno Haible  <bruno@clisp.org>
76968         getlogin, getlogin_r tests: Avoid test failure on Linux/SPARC.
76969         * tests/test-getlogin.c (main): Allow a failure with EINVAL.
76970         * tests/test-getlogin_r.c (main): Likewise.
76972 2011-09-20  Bruno Haible  <bruno@clisp.org>
76974         time tests: Don't require pid_t.
76975         * doc/posix-headers/time.texi: Revert last change.
76976         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Revert last change.
76977         * tests/test-time.c: Comment out the check for pid_t.
76979 2011-09-20  Bruno Haible  <bruno@clisp.org>
76981         fsync tests: Avoid a test failure on mingw.
76982         * tests/test-fsync.c (main): Allow a failure with EIO.
76984 2011-09-20  Bruno Haible  <bruno@clisp.org>
76986         euidaccess: Update comments.
76987         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Update comments.
76989 2011-09-20  Bruno Haible  <bruno@clisp.org>
76991         Ensure EBADF returns for socket functions on mingw.
76992         * lib/accept.c (rpl_accept): Fail with error EBADF if the file
76993         descriptor is invalid.
76994         * lib/bind.c (rpl_bind): Likewise.
76995         * lib/connect.c (rpl_connect): Likewise.
76996         * lib/getpeername.c (rpl_getpeername): Likewise.
76997         * lib/getsockname.c (rpl_getsockname): Likewise.
76998         * lib/getsockopt.c (rpl_getsockopt): Likewise.
76999         * lib/listen.c (rpl_listen): Likewise.
77000         * lib/recv.c (rpl_recv): Likewise.
77001         * lib/recvfrom.c (rpl_recvfrom): Likewise.
77002         * lib/send.c (rpl_send): Likewise.
77003         * lib/sendto.c (rpl_sendto): Likewise.
77004         * lib/setsockopt.c (rpl_setsockopt): Likewise.
77005         * lib/shutdown.c (rpl_shutdown): Likewise.
77007 2011-09-20  Bruno Haible  <bruno@clisp.org>
77009         select tests: EBADF tests.
77010         * tests/test-select.h (do_select_bad_fd, do_select_bad_fd_nowait,
77011         test_bad_fd): New functions.
77012         (test_function): Invoke also test_bad_fd.
77014 2011-09-20  Bruno Haible  <bruno@clisp.org>
77016         Tests for module 'posix_spawn_file_actions_addopen.
77017         * modules/posix_spawn_file_actions_addopen-tests: New file.
77018         * tests/test-posix_spawn_file_actions_addopen.c: New file.
77020         Tests for module 'posix_spawn_file_actions_adddup2'.
77021         * modules/posix_spawn_file_actions_adddup2-tests: New file.
77022         * tests/test-posix_spawn_file_actions_adddup2.c: New file.
77024         Tests for module 'posix_spawn_file_actions_addclose'.
77025         * modules/posix_spawn_file_actions_addclose-tests: New file.
77026         * tests/test-posix_spawn_file_actions_addclose.c: New file.
77028 2011-09-20  Bruno Haible  <bruno@clisp.org>
77030         Tests for module 'unlockpt'.
77031         * modules/unlockpt-tests: New file.
77032         * tests/test-unlockpt.c: New file.
77033         * doc/posix-functions/unlockpt.texi: Mention the Cygwin 1.7 problem.
77035         Tests for module 'grantpt'.
77036         * modules/grantpt-tests: New file.
77037         * tests/test-grantpt.c: New file.
77038         * doc/posix-functions/grantpt.texi: Mention the Cygwin 1.7 problem.
77040 2011-09-20  Bruno Haible  <bruno@clisp.org>
77042         freopen tests: EBADF tests.
77043         * tests/test-freopen.c: Include errno.h, unistd.h.
77044         (main): Add tests for EBADF, commented out for the moment.
77046         fclose tests: EBADF tests.
77047         * tests/test-fclose.c (main): Add tests for EBADF.
77049         fflush tests: EBADF tests.
77050         * tests/test-fflush.c: Include errno.h, macros.h.
77051         (main): Add tests for EBADF.
77053         ftello tests: EBADF tests.
77054         * tests/test-ftello4.sh: New file.
77055         * tests/test-ftello4.c: New file.
77056         * modules/ftello-tests (Files): Add them.
77057         (Makefile.am): Arrange to compile test-ftello4 and run test-ftello4.sh.
77059         fseeko tests: EBADF tests.
77060         * tests/test-fseeko4.sh: New file.
77061         * tests/test-fseeko4.c: New file.
77062         * modules/fseeko-tests (Files): Add them.
77063         (Makefile.am): Arrange to compile test-fseeko4 and run test-fseeko4.sh.
77065         Tests for function fputc().
77066         * modules/fputc-tests: New file.
77067         * tests/test-fputc.c: New file.
77068         * modules/stdio-tests (Depends-on): Add fputc-tests.
77070         Tests for function fgetc().
77071         * modules/fgetc-tests: New file.
77072         * tests/test-fgetc.c: New file.
77073         * modules/stdio-tests (Depends-on): Add fgetc-tests.
77075         Tests for function fdopen().
77076         * modules/fdopen-tests: New file.
77077         * tests/test-fdopen.c: New file.
77078         * modules/stdio-tests (Depends-on): Add fdopen-tests.
77080         Tests for module 'vdprintf'.
77081         * modules/vdprintf-tests: New file.
77082         * tests/test-vdprintf.c: New file.
77084         Tests for module 'dprintf'.
77085         * modules/dprintf-tests: New file.
77086         * tests/test-dprintf.c: New file.
77088 2011-09-20  Bruno Haible  <bruno@clisp.org>
77090         Tests for module 'ioctl'.
77091         * modules/ioctl-tests: New file.
77092         * tests/test-ioctl.c: New file.
77094 2011-09-20  Bruno Haible  <bruno@clisp.org>
77096         fcntl tests: EBADF tests.
77097         * tests/test-fcntl.c (main): Add more tests for EBADF.
77099 2011-09-20  Bruno Haible  <bruno@clisp.org>
77101         utimensat tests: EBADF tests.
77102         * tests/test-utimensat.c (main): Add tests for EBADF.
77104         renameat tests: EBADF tests.
77105         * tests/test-renameat.c (main): Add tests for EBADF.
77107         mkfifoat tests: EBADF tests.
77108         * tests/test-mkfifoat.c (main): Add tests for EBADF.
77110         readlinkat tests: EBADF tests.
77111         * tests/test-readlinkat.c (main): Add tests for EBADF.
77113         symlinkat tests: EBADF tests.
77114         * tests/test-symlinkat.c (main): Add tests for EBADF.
77116         linkat tests: EBADF tests.
77117         * tests/test-linkat.c (main): Add tests for EBADF.
77119         Tests for module 'faccessat'.
77120         * modules/faccessat-tests: New file.
77121         * tests/test-faccessat.c: New file.
77123         fdopendir tests: EBADF tests.
77124         * tests/test-fdopendir.c (main): Add more tests for EBADF.
77126         openat tests: EBADF tests.
77127         * tests/test-fchownat.c (main): Add tests for EBADF.
77128         * tests/test-fstatat.c (main): Likewise.
77129         * tests/test-mkdirat.c (main): Likewise.
77130         * tests/test-openat.c (main): Likewise.
77131         * tests/test-unlinkat.c (main): Likewise.
77132         * tests/test-fchmodat.c: New file.
77133         * modules/openat-tests (Files): Add tests/test-fchmodat.c.
77134         (Makefile.am): Also run 'test-fchmodat'.
77136 2011-09-20  Bruno Haible  <bruno@clisp.org>
77138         utimens, futimens, fdutimensat tests: EBADF tests.
77139         * tests/test-futimens.h (test_futimens): Add more tests for EBADF.
77141         Tests for function fstat().
77142         * modules/fstat-tests: New file.
77143         * tests/test-fstat.c: New file.
77144         * modules/sys_stat-tests (Depends-on): Add fstat-tests.
77146 2011-09-20  Bruno Haible  <bruno@clisp.org>
77148         test-ttyname_r tests: EBADF tests.
77149         * tests/test-ttyname_r.c (main): Add tests for EBADF.
77151         Tests for module 'isatty'.
77152         * modules/isatty-tests: New file.
77153         * tests/test-isatty.c: New file.
77155         Tests for module 'write'.
77156         * modules/write-tests: New file.
77157         * tests/test-write.c: New file.
77159         Tests for module 'read'.
77160         * modules/read-tests: New file.
77161         * tests/test-read.c: New file.
77163         pwrite tests: EBADF tests.
77164         * tests/test-pwrite.c (main): Add tests for EBADF.
77166         pread tests: EBADF tests.
77167         * tests/test-pread.c (main): Add tests for EBADF.
77169         lseek tests: EBADF tests.
77170         * tests/test-lseek.c (main): Add more tests for EBADF.
77172         Tests for module 'ftruncate'.
77173         * modules/ftruncate-tests: New file.
77174         * tests/test-ftruncate.sh: New file.
77175         * tests/test-ftruncate.c: New file.
77177         fsync tests: EBADF tests.
77178         * tests/test-fsync.c (main): Add more tests for EBADF.
77180         fdatasync tests: EBADF tests.
77181         * tests/test-fdatasync.c (main): Add more tests for EBADF.
77183         Tests for module 'fchown'.
77184         * modules/fchown-tests: New file.
77185         * tests/test-fchown.c: New file.
77187         Tests for module 'fchmod'.
77188         * modules/fchmod-tests: New file.
77189         * tests/test-fchmod.c: New file.
77191         fchdir tests: EBADF tests.
77192         * tests/test-fchdir.c (main): Add more tests for EBADF.
77194         dup2 tests: EBADF tests.
77195         * tests/test-dup2.c (main): Add more tests for EBADF.
77197         Tests for module 'dup'.
77198         * modules/dup-tests: New file.
77199         * tests/test-dup.c: New file.
77201         Tests for module 'close'.
77202         * modules/close-tests: New file.
77203         * tests/test-close.c: New file.
77205 2011-09-20  Bruno Haible  <bruno@clisp.org>
77207         Tests for module 'shutdown'.
77208         * modules/shutdown-tests: New file.
77209         * tests/test-shutdown.c: New file.
77211         Tests for module 'setsockopt'.
77212         * modules/setsockopt-tests: New file.
77213         * tests/test-setsockopt.c: New file.
77215         Tests for module 'sendto'.
77216         * modules/sendto-tests: New file.
77217         * tests/test-sendto.c: New file.
77219         Tests for module 'send'.
77220         * modules/send-tests: New file.
77221         * tests/test-send.c: New file.
77223         Tests for module 'recvfrom'.
77224         * modules/recvfrom-tests: New file.
77225         * tests/test-recvfrom.c: New file.
77227         Tests for module 'recv'.
77228         * modules/recv-tests: New file.
77229         * tests/test-recv.c: New file.
77231         Tests for module 'listen'.
77232         * modules/listen-tests: New file.
77233         * tests/test-listen.c: New file.
77235         Tests for module 'getsockopt'.
77236         * modules/getsockopt-tests: New file.
77237         * tests/test-getsockopt.c: New file.
77239         Tests for module 'getsockname'.
77240         * modules/getsockname-tests: New file.
77241         * tests/test-getsockname.c: New file.
77243         Tests for module 'getpeername'.
77244         * modules/getpeername-tests: New file.
77245         * tests/test-getpeername.c: New file.
77247         Tests for module 'connect'.
77248         * modules/connect-tests: New file.
77249         * tests/test-connect.c: New file.
77251         Tests for module 'bind'.
77252         * modules/bind-tests: New file.
77253         * tests/test-bind.c: New file.
77255         accept4 tests: Fix for native Windows.
77256         * tests/test-accept4.c: Include sockets.h.
77257         (main): Invoke gl_sockets_startup.
77258         * modules/accept4-tests (Depends-on): Add sockets.
77260         accept tests: Fix for native Windows.
77261         * tests/test-accept.c: Include sockets.h.
77262         (main): Invoke gl_sockets_startup.
77263         * modules/accept-tests (Depends-on): Add sockets.
77265 2011-09-19  Bruno Haible  <bruno@clisp.org>
77267         msvc-inval: Require a semicolon after DONE_MSVC_INVAL.
77268         * lib/msvc-inval.h (TRY_MSVC_INVAL, DONE_MSVC_INVAL): Wrap in a
77269         do...while(0).
77270         * lib/dup2.c (rpl_dup2): Add a semicolon after DONE_MSVC_INVAL.
77271         Suggested by Paul Eggert.
77273 2011-09-19  Bruno Haible  <bruno@clisp.org>
77275         sched: Ensure pid_t is defined.
77276         * m4/sched_h.m4 (gl_SCHED_H): Arrange to override <sched.h> if it does
77277         not define pid_t.
77278         * lib/sched.in.h: Include <sys/types.h>.
77279         * doc/posix-headers/sched.texi: Mention the pid_t problem.
77280         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
77282 2011-09-19  Bruno Haible  <bruno@clisp.org>
77284         msvc-inval: Ensure the entire expansion is a single statement.
77285         * lib/msvc-inval.h (TRY_MSVC_INVAL, DONE_MSVC_INVAL): Add an extra pair
77286         of braces.
77288 2011-09-19  Jim Meyering  <meyering@redhat.com>
77290         tests: use printf, not echo in init.sh's warn_ function
77291         * tests/init.sh (warn_): Use printf, not echo.  The latter would
77292         misbehave when given strings containing a backslash or starting
77293         with e.g., -n.  James Youngman suggested setting IFS.
77295 2011-09-19  Eric Blake  <eblake@redhat.com>
77297         futimens: enhance test
77298         * tests/test-futimens.h (test_futimens): Also check for EBADF on
77299         closed non-negative fd.
77301         date: accept 'hence' as opposite of 'ago'
77302         * lib/parse-datetime.y (relative_time_table): Add 'hence'.
77303         * tests/test-parse-datetime.c (main): Enhance test.
77304         Suggested by Jesse Wilson.
77306 2011-09-19  Jim Meyering  <meyering@redhat.com>
77308         getcwd: don't fail in a deep directory on a system without openat
77309         Before this change, getcwd would fail when called from a directory
77310         of depth PATH_MAX / 3 or greater.  That was due to the fact that
77311         the non-openat implementation used "..", "../..", "../../..", etc.
77312         to access ancestor directories.  With too many, that string would
77313         be longer than PATH_MAX.
77314         * lib/getcwd.c (HAVE_OPENAT_SUPPORT): Define also when we are
77315         using gnulib's openat replacement.
77316         * m4/openat.m4: Set GNULIB_OPENAT, so getcwd.c knows when
77317         we're using the replacement function.
77319 2011-09-14  Martin von Gagern  <Martin.vGagern@gmx.net>
77321         maint.mk: avoid warnings from perl about missing files
77322         * top/maint.mk (def_sym_regex): Ignore files listed in
77323         $(gl_other_headers_) that do not exist, say because a project
77324         does not use a corresponding module.
77326 2011-09-18  Paul Eggert  <eggert@cs.ucla.edu>
77328         stat: use pathmax.h only if needed
77329         * lib/stat.c: Include pathmax.h only if REPLACE_FUNC_STAT_DIR.
77330         This is better for Emacs, which does not have a mingw port and
77331         therefore can avoid the pathmax module.
77333         utimens: remove dependency on dup2
77334         * lib/utimens.c (fdutimens): Don't invoke dup2; it's not needed
77335         to work around the Linux kernel bug.
77336         * modules/utimens (Depends-on): Remove dup2.
77338 2011-09-18  Bruno Haible  <bruno@clisp.org>
77340         inet_ntop, inet_pton: Look for it also in libresolv.
77341         * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): If the function was not found in
77342         libnsl, search for it in libresolv.
77343         * m4/inet_pton.m4 (gl_FUNC_INET_PTON): Likewise.
77344         Needed on Solaris 7.
77346 2011-09-18  Bruno Haible  <bruno@clisp.org>
77348         accept, accept4 tests: Avoid link error on Solaris.
77349         * modules/accept-tests (Makefile.am): Link test-accept against
77350         $(LIBSOCKET).
77351         * modules/accept4-tests (Makefile.am): Link test-accept4 against
77352         $(LIBSOCKET).
77354         accept4: Avoid link error on Solaris.
77355         * modules/accept4 (Link): New section.
77357         socket functions: Avoid link errors on Solaris.
77358         * modules/accept (Depends-on): Add socketlib.
77359         (Link): New section.
77360         * modules/bind (Depends-on): Add socketlib.
77361         (Link): New section.
77362         * modules/connect (Depends-on): Add socketlib.
77363         (Link): New section.
77364         * modules/getpeername (Depends-on): Add socketlib.
77365         (Link): New section.
77366         * modules/getsockname (Depends-on): Add socketlib.
77367         (Link): New section.
77368         * modules/getsockopt (Depends-on): Add socketlib.
77369         (Link): New section.
77370         * modules/listen (Depends-on): Add socketlib.
77371         (Link): New section.
77372         * modules/recv (Depends-on): Add socketlib.
77373         (Link): New section.
77374         * modules/recvfrom (Depends-on): Add socketlib.
77375         (Link): New section.
77376         * modules/send (Depends-on): Add socketlib.
77377         (Link): New section.
77378         * modules/sendto (Depends-on): Add socketlib.
77379         (Link): New section.
77380         * modules/setsockopt (Depends-on): Add socketlib.
77381         (Link): New section.
77382         * modules/shutdown (Depends-on): Add socketlib.
77383         (Link): New section.
77384         * modules/socket (Depends-on): Add socketlib.
77385         (Link): New section.
77387 2011-09-18  Bruno Haible  <bruno@clisp.org>
77389         ptsname tests: Let the test fail rather than hang (e.g. on AIX 5.1).
77390         * tests/test-ptsname.c (main): Terminate the test if it takes longer
77391         than 5 seconds.
77392         * modules/ptsname-tests (configure.ac): Test for alarm.
77394 2011-09-18  Bruno Haible  <bruno@clisp.org>
77396         posix_spawn_file_actions_add*: Fix module dependencies.
77397         * modules/posix_spawn_file_actions_addclose (Dependencies): Add
77398         posix_spawn_file_actions_init.
77399         * modules/posix_spawn_file_actions_adddup2 (Dependencies): Likewise.
77400         * modules/posix_spawn_file_actions_addopen (Dependencies): Likewise.
77402 2011-09-18  Bruno Haible  <bruno@clisp.org>
77404         rename, renameat tests: Avoid test failures on FreeBSD 6.4.
77405         * tests/test-rename.h (test_rename): Allow error code EEXIST.
77406         * tests/test-renameat.c (main): Likewise.
77408 2011-09-18  Bruno Haible  <bruno@clisp.org>
77410         Tests for module 'accept4'.
77411         * modules/accept4-tests: New file.
77412         * tests/test-accept4.c: New file.
77414 2011-09-18  Bruno Haible  <bruno@clisp.org>
77416         Tests for module 'accept'.
77417         * modules/accept-tests: New file.
77418         * tests/test-accept.c: New file.
77420 2011-09-18  Bruno Haible  <bruno@clisp.org>
77422         dup2: Support for MSVC.
77423         * lib/dup2.c: Include msvc-inval.h.
77424         (rpl_dup2): Handle invalid parameter notifications during dup2 and
77425         _get_osfhandle calls.
77426         * modules/dup2 (Depends-on): Add msvc-inval.
77427         * doc/posix-functions/dup2.texi: Mention problem on MSVC.
77429         New module 'msvc-inval'.
77430         * lib/msvc-inval.h: New file.
77431         * lib/msvc-inval.c: New file.
77432         * m4/msvc-inval.m4: New file.
77433         * modules/msvc-inval: New file.
77435 2011-09-17  Bruno Haible  <bruno@clisp.org>
77437         Tests for module 'pclose'.
77438         * modules/pclose-tests: New file.
77440         New module 'pclose'.
77441         * lib/stdio.in.h (pclose): New declaration.
77442         * lib/pclose.c: New file.
77443         * m4/pclose.m4: New file.
77444         * m4/stdio_h.m4 (gl_STDIO_H): Test whether pclose is declared.
77445         (gl_STDIO_H_DEFAULTS): Initialize GNULIB_PCLOSE, HAVE_PCLOSE.
77446         * modules/stdio (Makefile.am): Substitute GNULIB_PCLOSE, HAVE_PCLOSE.
77447         * modules/pclose: New file.
77448         * modules/popen-tests (Depends-on): Add pclose.
77449         * modules/popen-safer-tests (Depends-on): Likewise.
77450         * doc/posix-functions/pclose.texi: Mention the new module.
77452 2011-09-17  Bruno Haible  <bruno@clisp.org>
77454         popen: Support for MSVC.
77455         * lib/stdio.in.h (popen): Declare it if the system lacks this function.
77456         * lib/popen.c (popen): Provide alternate definition for native Windows.
77457         * m4/popen.m4 (gl_FUNC_POPEN): Test if popen exists. Set HAVE_POPEN.
77458         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize HAVE_POPEN.
77459         * modules/popen (Depends-on, configure.ac): Update condition.
77460         * modules/stdio (Makefile.am): Substitute HAVE_POPEN.
77461         * doc/posix-functions/popen.texi: Mention that the MSVC problem is
77462         fixed.
77464 2011-09-17  Bruno Haible  <bruno@clisp.org>
77466         isnanl, isnand, isnanf: Work around MSVC bug.
77467         * lib/isnan.c (FUNC): Use alternate ways of computing NaN and Infinity.
77469 2011-09-17  Bruno Haible  <bruno@clisp.org>
77471         sys_socket tests: Fix recent mistake.
77472         * tests/test-sys_socket.c (t1): Avoid collision of identifiers.
77474 2011-09-17  Bruno Haible  <bruno@clisp.org>
77476         putenv: Support for MSVC.
77477         * modules/putenv (Depends-on): Add environ.
77478         * lib/putenv.c (environ): Disable declaration.
77479         * lib/unistd.in.h: Update comment.
77481 2011-09-17  Bruno Haible  <bruno@clisp.org>
77483         math: Avoid macro redefinition warnings on MSVC.
77484         * lib/math.in.h (ceilf, ceill, floorf, floorl, frexpl, ldexpl):
77485         Undefine before redefining.
77487 2011-09-17  Bruno Haible  <bruno@clisp.org>
77489         doc: Mention functions which are declared as macros.
77490         * doc/posix-functions/*[fl].texi: Mention that some functions are
77491         defined as macros with arguments only.
77493 2011-09-17  Bruno Haible  <bruno@clisp.org>
77495         Add dependencies to new dirent related modules.
77496         * modules/backupfile (Depends-on): Add opendir, readdir, closedir.
77497         * modules/fts (Depends-on): Likewise.
77498         * modules/glob (Depends-on): Likewise.
77499         * modules/savedir (Depends-on): Likewise.
77500         * modules/scandir (Depends-on): Likewise.
77501         * modules/dirent-safer (Depends-on): Add opendir, closedir.
77502         * modules/fdopendir (Depends-on): Add opendir.
77504 2011-09-17  Bruno Haible  <bruno@clisp.org>
77506         inet_pton: Support for MSVC on Windows Vista or newer.
77507         * lib/arpa_inet.in.h (inet_pton): Also consider REPLACE_INET_PTON.
77508         * lib/inet_pton.c (rpl_inet_pton): Use a simple wrapper if
77509         HAVE_DECL_INET_PTON is defined.
77510         * m4/inet_pton.m4 (gl_FUNC_INET_PTON): Invoke gl_PREREQ_SYS_H_WINSOCK2.
77511         On platforms with <winsock2.h>, test whether inet_pton is declared in
77512         <ws2tcpip.h>. If so, arrange to replace it.
77513         * m4/arpa_inet_h.m4 (gl_ARPA_INET_H_DEFAULTS): Initialize
77514         REPLACE_INET_PTON.
77515         * modules/arpa_inet (Makefile.am): Substitute REPLACE_INET_PTON.
77516         * modules/inet_pton (Files): Add m4/sys_socket_h.m4.
77517         (Depends-on, configure.ac): Update condition.
77518         * doc/posix-functions/inet_pton.texi: Mention the MSVC problem.
77520 2011-09-17  Bruno Haible  <bruno@clisp.org>
77522         inet_ntop: Support for MSVC on Windows Vista or newer.
77523         * lib/arpa_inet.in.h (inet_ntop): Also consider REPLACE_INET_NTOP.
77524         * lib/inet_ntop.c (rpl_inet_ntop): Use a simple wrapper if
77525         HAVE_DECL_INET_NTOP is defined.
77526         * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): Invoke gl_PREREQ_SYS_H_WINSOCK2.
77527         On platforms with <winsock2.h>, test whether inet_ntop is declared in
77528         <ws2tcpip.h>. If so, arrange to replace it.
77529         * m4/arpa_inet_h.m4 (gl_ARPA_INET_H_DEFAULTS): Initialize
77530         REPLACE_INET_NTOP.
77531         * modules/arpa_inet (Makefile.am): Substitute REPLACE_INET_NTOP.
77532         * modules/inet_ntop (Files): Add m4/sys_socket_h.m4.
77533         (Depends-on, configure.ac): Update condition.
77534         * doc/posix-functions/inet_ntop.texi: Mention the MSVC problem.
77536 2011-09-16  Eric Blake  <eblake@redhat.com>
77538         test-fsync: yet another enhancement
77539         * tests/test-fsync.c (main): Also test behavior on read-only text
77540         file.
77542 2011-09-16  Bruno Haible  <bruno@clisp.org>
77544         Enhance fsync, fdatasync tests.
77545         * tests/test-fsync.c (main): Test both STDIN_FILENO and STDOUT_FILENO.
77546         * tests/test-fdatasync.c (main): Likewise.
77548 2011-09-16  Bruno Haible  <bruno@clisp.org>
77550         Support for MSVC compiler: Ensure mode_t gets defined.
77551         * m4/fcntl_h.m4 (gl_FCNTL_H): Require AC_TYPE_MODE_T.
77552         * m4/spawn_h.m4 (gl_SPAWN_H): Likewise.
77553         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
77554         * m4/sys_types_h.m4 (gl_SYS_TYPES_H): Likewise.
77555         * tests/test-fcntl-h.c: Check that mode_t is defined.
77556         * tests/test-sys_stat.c: Likewise.
77557         * tests/test-sys_types.c: Likewise.
77558         * doc/posix-headers/fcntl.texi: Mention the missing mode_t problem.
77559         * doc/posix-headers/sys_stat.texi: Likewise.
77560         * doc/posix-headers/sys_types.texi: Likewise.
77562 2011-09-16  Bruno Haible  <bruno@clisp.org>
77564         sys_stat: Support for MSVC.
77565         * lib/sys_stat.in.h (S_IFIFO): Define to _S_IFIFO if that exists.
77566         * tests/test-sys_stat.c: Don't assume that S_IFBLK exists.
77567         * doc/posix-headers/sys_stat.texi: Mention missing S_IFIFO, S_IFBLK on
77568         MSVC.
77570 2011-09-16  Bruno Haible  <bruno@clisp.org>
77572         Support for MSVC compiler: Ensure off_t gets defined.
77573         * lib/unistd.in.h: Include <sys/types.h>.
77574         * tests/test-fcntl-h.c: Check that off_t is defined.
77575         * tests/test-sys_stat.c: Likewise.
77576         * tests/test-sys_types.c: Likewise.
77578 2011-09-16  Eric Blake  <eblake@redhat.com>
77580         fdatasync: port to Solaris
77581         * m4/fdatasync.m4 (gl_FUNC_FDATASYNC): Set LIB_FDATASYNC.
77582         * modules/fdatasync (Link): Document it.
77583         * modules/fdatasync-tests (test_fdatasync_LDADD): Link with it.
77585         fdatasync: port to MacOS X 10.7
77586         * m4/fdatasync.m4 (gl_FUNC_FDATASYNC): Check for present but not
77587         declared.
77588         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Another default.
77589         * modules/unistd (Makefile.am): Substitute it.
77590         * lib/unistd.in.h (fdatasync): Declare on MacOS.
77591         * doc/posix-functions/fdatasync.texi (fdatasync): Document it.
77593         fdatasync: minor improvements
77594         * modules/fdatasync (Depends-on): Add condition for fsync.
77595         * lib/fdatasync.c (fdatasync): Add comment.
77596         * tests/test-unistd-c++.cc: Test fdatasync.
77598         unistd: update refs to newer POSIX
77599         * lib/unistd.in.h: Prefer POSIX 2008 over 2001.
77600         Suggested by Bruno Haible.
77602         fdatasync: new module
77603         * modules/fsync (Description): Document difference to fdatasync.
77604         * modules/fdatasync: New module.
77605         * m4/fdatasync.m4 (gl_FUNC_FDATASYNC): New file.
77606         * lib/fdatasync.c (fdatasync): Likewise.
77607         * m4/unistd_h.m4 (gl_UNISTD_H, gl_UNISTD_H_DEFAULTS): Set up
77608         defaults.
77609         * modules/unistd (Makefile.am): Set witnesses.
77610         * lib/unistd.in.h (fdatasync): Declare.
77611         * MODULES.html.sh: Document it.
77612         * doc/posix-functions/fdatasync.texi (fdatasync): Likewise.
77613         * modules/fdatasync-tests: New test.
77614         * tests/test-fdatasync.c: Likewise.
77616 2011-09-16  Eric Blake  <eblake@redhat.com>
77618         test-fsync: enhance tests
77619         * modules/fsync-tests (Depends-on): Add errno, for mingw.
77620         * tests/test-fsync.c (main): Enhance test.
77622 2011-09-15  Bruno Haible  <bruno@clisp.org>
77624         Support for MSVC compiler: Ensure ssize_t gets defined.
77625         * doc/posix-headers/sys_types.texi: Mention the missing ssize_t problem.
77626         * doc/posix-headers/stdio.texi: Likewise.
77627         * modules/stdio (Depends-on): Add ssize_t.
77628         * modules/sys_socket (Depends-on): Likewise.
77629         * modules/sys_types (Depends-on): Likewise.
77630         * modules/sys_uio (Depends-on): Likewise.
77631         * modules/unistd (Depends-on): Likewise.
77632         * tests/test-sys_socket.c: Check that size_t and ssize_t are defined.
77633         * tests/test-sys_types.c: Check that ssize_t is defined.
77635 2011-09-14  Bruno Haible  <bruno@clisp.org>
77637         Avoid using #, the m4 comment starter character, near brackets.
77638         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER_ONE): Use |, not #, as
77639         delimiter character in sed expressions.
77640         * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Likewise.
77641         Suggested by Eric Blake.
77643         Properly quote AC_CHECK_DECLS' 4th argument.
77644         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Double-quote AC_CHECK_DECLS' 4th
77645         argument.
77646         * m4/ceilf.m4 (gl_FUNC_CEILF): Likewise.
77647         * m4/ceill.m4 (gl_FUNC_CEILL): Likewise.
77648         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
77649         * m4/floorf.m4 (gl_FUNC_FLOORF): Likewise.
77650         * m4/floorl.m4 (gl_FUNC_FLOORL): Likewise.
77651         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH): Likewise.
77652         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Likewise.
77653         * m4/getdomainname.m4 (gl_FUNC_GETDOMAINNAME): Likewise.
77654         * m4/gethrxtime.m4 (gl_GETHRXTIME): Likewise.
77655         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
77656         * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): Likewise.
77657         * m4/inet_pton.m4 (gl_FUNC_INET_PTON): Likewise.
77658         * m4/isfinite.m4 (gl_ISFINITE): Likewise.
77659         * m4/isinf.m4 (gl_ISINF): Likewise.
77660         * m4/logb.m4 (gl_FUNC_LOGB): Likewise.
77661         * m4/readutmp.m4 (gl_READUTMP): Likewise.
77662         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
77663         * m4/round.m4 (gl_FUNC_ROUND): Likewise.
77664         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
77665         * m4/roundl.m4 (gl_FUNC_ROUNDL): Likewise.
77666         * m4/signbit.m4 (gl_SIGNBIT): Likewise.
77667         * m4/sleep.m4 (gl_FUNC_SLEEP): Likewise.
77668         * m4/strsignal.m4 (gl_PREREQ_STRSIGNAL): Likewise.
77669         * m4/trunc.m4 (gl_FUNC_TRUNC): Likewise.
77670         * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
77671         * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
77672         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Likewise.
77673         * m4/wctob.m4 (gl_FUNC_WCTOB): Likewise.
77674         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
77675         Reported by Eric Blake.
77677         Properly quote AC_CHECK_DECL's 4th argument.
77678         * m4/acosl.m4 (gl_FUNC_ACOSL): Double-quote AC_CHECK_DECL's 4th
77679         argument.
77680         * m4/argp.m4 (gl_ARGP): Likewise.
77681         * m4/asinl.m4 (gl_FUNC_ASINL): Likewise.
77682         * m4/atanl.m4 (gl_FUNC_ATANL): Likewise.
77683         * m4/cosl.m4 (gl_FUNC_COSL): Likewise.
77684         * m4/expl.m4 (gl_FUNC_EXPL): Likewise.
77685         * m4/frexpl.m4 (gl_FUNC_FREXPL, gl_FUNC_FREXPL_NO_LIBM): Likewise.
77686         * m4/getloadavg.m4 (gl_GETLOADAVG): Likewise.
77687         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Likewise.
77688         * m4/logl.m4 (gl_FUNC_LOGL): Likewise.
77689         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Likewise.
77690         * m4/sinl.m4 (gl_FUNC_SINL): Likewise.
77691         * m4/sqrtl.m4 (gl_FUNC_SQRTL): Likewise.
77692         * m4/tanl.m4 (gl_FUNC_TANL): Likewise.
77693         Reported by Eric Blake.
77695 2011-09-14  Eric Blake  <eblake@redhat.com>
77697         opendir: avoid compile warning
77698         * lib/opendir.c (includes): Always include errno.h.
77699         Reported by Tatsuro MATSUOKA.
77701 2011-09-14  Jim Meyering  <meyering@redhat.com>
77703         maint.mk: sc_tight_scope: propagate failure from sub-make
77704         * top/maint.mk (sc_tight_scope): Actually initialize and use $fail.
77705         Reported by Martin von Gagern.
77707 2011-09-13  Bruno Haible  <bruno@clisp.org>
77709         tempname: Support for MSVC.
77710         * doc/posix-headers/fcntl.texi: Document the problem with O_ACCMODE on
77711         MSVC.
77712         * modules/tempname (Depends-on): Add fcntl-h.
77714 2011-09-13  Bruno Haible  <bruno@clisp.org>
77716         sys_time: Support for MSVC.
77717         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Invoke
77718         gl_PREREQ_SYS_H_WINSOCK2. When testing for 'struct timeval', also
77719         include <winsock2.h>.
77720         * lib/sys_time.in.h: On MSVC, include <winsock2.h> and hide its
77721         function declarations that collide with POSIX.
77722         * modules/sys_time (Files): Add m4/sys_socket_h.m4.
77723         (Makefile.am): Substitute HAVE_WINSOCK2_H.
77725 2011-09-13  Bruno Haible  <bruno@clisp.org>
77727         stat: Support for MSVC.
77728         * lib/stat.c: Include pathmax.h.
77729         * modules/stat (Depends-on): Add pathmax.
77731         pathmax: Support for native Windows.
77732         * lib/pathmax.h (PATH_MAX): Define to 260 on native Windows.
77734 2011-09-12  Bruno Haible  <bruno@clisp.org>
77736         New modules 'opendir', 'readdir', 'rewinddir', 'closedir'.
77737         * lib/dirent.in.h (struct dirent): New type.
77738         (DT_UNKNOWN, DT_FIFO, DT_CHR, DT_DIR, DT_BLK, DT_REG, DT_LNK, DT_SOCK,
77739         DT_WHT): New macros.
77740         (DIR): New type.
77741         (opendir, closedir): Declare only if the module 'opendir' is enabled.
77742         (readdir, rewinddir): New declarations.
77743         * lib/dirent-private.h: New file.
77744         * lib/opendir.c: New file.
77745         * lib/readdir.c: New file.
77746         * lib/rewinddir.c: New file.
77747         * lib/closedir.c: New file.
77748         * lib/fchdir.c (rpl_closedir, rpl_opendir): Remove functions.
77749         * m4/opendir.m4: New file.
77750         * m4/readdir.m4: New file.
77751         * m4/rewinddir.m4: New file.
77752         * m4/closedir.m4: New file.
77753         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't set REPLACE_OPENDIR,
77754         REPLACE_CLOSEDIR here.
77755         * m4/dirent_h.m4 (gl_DIRENT_H): Also check whether closedir, opendir,
77756         readdir, rewinddir are declared.
77757         (gl_DIRENT_H_DEFAULTS): Initialize GNULIB_OPENDIR, GNULIB_READDIR,
77758         GNULIB_REWINDDIR, GNULIB_CLOSEDIR, HAVE_OPENDIR, HAVE_READDIR,
77759         HAVE_REWINDDIR, HAVE_CLOSEDIR.
77760         * modules/dirent (Makefile.am): Substitute GNULIB_OPENDIR,
77761         GNULIB_READDIR, GNULIB_REWINDDIR, GNULIB_CLOSEDIR, HAVE_OPENDIR,
77762         HAVE_READDIR, HAVE_REWINDDIR, HAVE_CLOSEDIR.
77763         * modules/opendir: New file.
77764         * modules/readdir: New file.
77765         * modules/rewinddir: New file.
77766         * modules/closedir: New file.
77767         * doc/posix-functions/opendir.texi: Mention the 'opendir' module.
77768         * doc/posix-functions/readdir.texi: Mention the 'readdir' module.
77769         * doc/posix-functions/rewinddir.texi: Mention the 'rewinddir' module.
77770         * doc/posix-functions/closedir.texi: Mention the 'closedir' module.
77771         * NEWS: Mention the 'fchdir' change.
77773 2011-09-11  Bruno Haible  <bruno@clisp.org>
77775         asm-underscore.m4: Support for MSVC.
77776         * m4/asm-underscore.m4 (gl_C_ASM): New macro.
77777         (gl_ASM_SYMBOL_PREFIX): Require it. Use its results.
77779 2011-09-11  Reuben Thomas  <rrt@sc3d.org>
77781         Doc about crypt functions.
77782         * doc/posix-functions/crypt.texi: Expand range of glibc versions
77783         needing for _GNU_SOURCE to get crypt.
77784         * doc/posix-functions/encrypt.texi: Likewise.
77785         * doc/posix-functions/setkey.texi: Likewise.
77787 2011-09-11  Bruno Haible  <bruno@clisp.org>
77789         doc: Update regarding MSVC 9.
77790         * doc/gnulib-intro.texi (Target Platforms): Classify MSVC as "rarely
77791         tested".
77792         * doc/posix-functions/*.texi: Update with info about MSVC 9.
77793         * doc/posix-headers/*.texi: Likewise.
77794         * doc/pastposix-functions/*.texi: Likewise.
77795         * doc/glibc-functions/*.texi: Likewise.
77796         * doc/glibc-headers/*.texi: Likewise.
77798 2011-09-11  Bruno Haible  <bruno@clisp.org>
77800         unistd et al.: Don't assume <unistd.h> exists.
77801         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Don't include <unistd.h> if it
77802         does not exist.
77803         * m4/environ.m4 (gl_ENVIRON): Don't include <unistd.h> if it does not
77804         exist. But include <stdlib.h>.
77805         * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): If <unistd.h> does not exist,
77806         include <io.h> and <stdlib.h> instead. Don't test symbolink links if
77807         symlink() does not exist.
77808         * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): If <unistd.h> does not exist,
77809         include <io.h> instead.
77810         * m4/free.m4 (gl_FUNC_FREE): Assume free(NULL) works on native Windows.
77811         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): If <unistd.h> does not exist,
77812         include <direct.h> instead.
77813         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise.
77814         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
77815         * m4/lseek.m4 (gl_FUNC_LSEEK): If <unistd.h> does not exist, include
77816         <io.h> instead.
77817         * m4/rename.m4 (gl_FUNC_RENAME): Assume rename() manages hard links
77818         correctly if the system does not have hard links.
77819         * m4/rmdir.m4 (gl_FUNC_RMDIR): If <unistd.h> does not exist, include
77820         <direct.h> instead.
77821         * m4/unistd_h.m4 (gl_UNISTD_H): If <unistd.h> does not exist, bypass
77822         it when looking for function declarations.
77823         * m4/unlink.m4 (gl_FUNC_UNLINK): If <unistd.h> does not exist, include
77824         <direct.h> and <io.h> instead.
77825         * doc/posix-headers/unistd.texi: More details about MSVC problem.
77827 2011-09-11  Bruno Haible  <bruno@clisp.org>
77829         strcase: Support for MSVC.
77830         * modules/strcase (Status, Notice): Remove obsoletion mark.
77831         * doc/posix-functions/strcasecmp.texi: Mention MSVC problem.
77832         * doc/posix-functions/strncasecmp.texi: Likewise.
77834         strings: Don't assume <strings.h> exists.
77835         * lib/strings.in.h: Include <strings.h> only if HAVE_STRINGS_H is 1.
77836         * m4/strings_h.m4 (gl_HEADER_STRINGS_H_BODY): Set HAVE_STRINGS_H.
77837         * modules/strings (Makefile.am): Substitute HAVE_STRINGS_H.
77838         * doc/posix-headers/strings.texi: Mention the MSVC problem.
77840 2011-09-11  Bruno Haible  <bruno@clisp.org>
77842         dirent: Don't assume <dirent.h> exists.
77843         * lib/dirent.in.h: Include <dirent.h> only if HAVE_DIRENT_H is 1.
77844         * m4/dirent_h.m4 (gl_DIRENT_H): Set HAVE_DIRENT_H.
77845         * modules/dirent (Makefile.am): Substitute HAVE_DIRENT_H.
77846         * doc/posix-headers/dirent.texi: Mention the MSVC problem.
77848 2011-09-11  Bruno Haible  <bruno@clisp.org>
77850         Fix wint_t on MSVC.
77851         * lib/wchar.in.h (wint_t): On MSVC, override it.
77852         * lib/wctype.in.h (wint_t): Likewise.
77853         * m4/stdint.m4 (gl_STDINT_TYPE_PROPERTIES): Override BITSIZEOF_WINT_T on
77854         MSVC.
77855         * doc/posix-headers/wchar.texi: Mention the problem with wint_t on MSVC.
77856         * doc/posix-headers/wctype.texi: Likewise.
77858 2011-09-11  Bruno Haible  <bruno@clisp.org>
77860         sys_types: Fix typo.
77861         * lib/sys_types.in.h: Fix typo in comment.
77862         Reported by Paul Eggert.
77864         Support for MSVC compiler: Ensure size_t gets defined.
77865         * modules/strings (Depends-on): Add 'sys_types'.
77866         * modules/sys_uio (Depends-on): Likewise.
77867         * lib/sys_uio.in.h: Update comment.
77869         C++ tests for module 'sys_types'.
77870         * modules/sys_types-c++-tests: New file.
77871         * tests/test-sys_types-c++.cc: New file.
77873         Tests for module 'sys_types'.
77874         * modules/sys_types-tests: New file.
77875         * tests/test-sys_types.c: New file.
77877         New module 'sys_types'.
77878         * lib/sys_types.in.h: New file.
77879         * m4/sys_types_h.m4: New file.
77880         * modules/sys_types: New file.
77881         * doc/posix-headers/sys_types.texi: Mention the new module and the
77882         size_t problem on MSVC 9.
77884 2011-09-11  Bruno Haible  <bruno@clisp.org>
77886         Support for MSVC compiler: Avoid division by a literal 0.
77887         * lib/math.in.h (NAN): Define through a function call also on MSVC.
77888         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Divide by 'zero' instead of 0.0.
77889         * m4/printf.m4 (gl_PRINTF_INFINITE, gl_PRINTF_DIRECTIVE_A,
77890         gl_PRINTF_DIRECTIVE_F, gl_PRINTF_FLAG_ZERO): Likewise.
77891         (gl_PRINTF_INFINITE_LONG_DOUBLE): Divide by 'zeroL' instead of 0.0L.
77892         * tests/infinity.h: New file.
77893         * tests/nan.h (NaNf, NaNd, NaNl): Define through a function call also
77894         on MSVC.
77895         * tests/test-ceilf1.c: Include infinity.h.
77896         (main): Use Infinityf.
77897         * tests/test-ceil1.c: Include infinity.h.
77898         (main): Use Infinityd.
77899         * tests/test-ceill.c: Include infinity.h.
77900         (main): Use Infinityl.
77901         * tests/test-dprintf-posix.c: Include infinity.h.
77902         (test_function): Use Infinityd.
77903         * tests/test-floorf1.c: Include infinity.h.
77904         (main): Use Infinityf.
77905         * tests/test-floor1.c: Include infinity.h.
77906         (main): Use Infinityd.
77907         * tests/test-floorl.c: Include infinity.h.
77908         (main): Use Infinityl.
77909         * tests/test-fprintf-posix.c: Include infinity.h.
77910         (test_function): Use Infinityd.
77911         * tests/test-frexp.c: Include infinity.h.
77912         (main): Use Infinityd.
77913         * tests/test-frexpl.c: Include infinity.h.
77914         (main): Use Infinityl.
77915         * tests/test-isfinite.c: Include infinity.h.
77916         (test_isfinitef): Use Infinityf.
77917         (test_isfinited): Use Infinityd.
77918         (test_isfinitel): Use Infinityl.
77919         * tests/test-isinf.c: Include infinity.h.
77920         (test_isinff): Use Infinityf.
77921         (test_isinfd): Use Infinityd.
77922         (test_isinfl): Use Infinityl.
77923         * tests/test-isnan.c: Include infinity.h.
77924         (test_float): Use Infinityf.
77925         (test_double): Use Infinityd.
77926         (test_long_double): Use Infinityl.
77927         * tests/test-isnanf.h: Include infinity.h.
77928         (main): Use Infinityf.
77929         * tests/test-isnand.h: Include infinity.h.
77930         (main): Use Infinityd.
77931         * tests/test-isnanl.h: Include infinity.h.
77932         (main): Use Infinityl.
77933         * tests/test-ldexpl.c: Include infinity.h.
77934         (main): Use Infinityl.
77935         * tests/test-printf-posix.h: Include infinity.h.
77936         (test_function): Use Infinityd.
77937         * tests/test-roundf1.c: Include infinity.h.
77938         (main): Use Infinityf.
77939         * tests/test-round1.c: Include infinity.h.
77940         (main): Use Infinityd.
77941         * tests/test-roundl.c: Include infinity.h.
77942         (main): Use Infinityl.
77943         * tests/test-signbit.c: Include infinity.h.
77944         (test_signbitf): Use Infinityf.
77945         (test_signbitd): Use Infinityd.
77946         (test_signbitl): Use Infinityl.
77947         * tests/test-snprintf-posix.h: Include infinity.h.
77948         (test_function): Use Infinityd, Infinityl.
77949         * tests/test-sprintf-posix.h: Include infinity.h.
77950         (test_function): Use Infinityd, Infinityl.
77951         * tests/test-truncf1.c: Include infinity.h.
77952         (main): Use Infinityf.
77953         * tests/test-trunc1.c: Include infinity.h.
77954         (main): Use Infinityd.
77955         * tests/test-truncl.c: Include infinity.h.
77956         (main): Use Infinityl.
77957         * tests/test-vasnprintf-posix.c: Include infinity.h.
77958         (test_function): Use Infinityd, Infinityl.
77959         * tests/test-vasprintf-posix.c: Include infinity.h.
77960         (test_function): Use Infinityd, Infinityl.
77961         * modules/ceilf-tests (Files): Add tests/infinity.h.
77962         * modules/ceil-tests (Files): Likewise.
77963         * modules/ceill-tests (Files): Likewise.
77964         * modules/dprintf-posix-tests (Files): Likewise.
77965         * modules/floorf-tests (Files): Likewise.
77966         * modules/floor-tests (Files): Likewise.
77967         * modules/floorl-tests (Files): Likewise.
77968         * modules/fprintf-posix-tests (Files): Likewise.
77969         * modules/frexp-tests (Files): Likewise.
77970         * modules/frexp-nolibm-tests (Files): Likewise.
77971         * modules/frexpl-tests (Files): Likewise.
77972         * modules/frexpl-nolibm-tests (Files): Likewise.
77973         * modules/isfinite-tests (Files): Likewise.
77974         * modules/isinf-tests (Files): Likewise.
77975         * modules/isnan-tests (Files): Likewise.
77976         * modules/isnanf-tests (Files): Likewise.
77977         * modules/isnanf-nolibm-tests (Files): Likewise.
77978         * modules/isnand-tests (Files): Likewise.
77979         * modules/isnand-nolibm-tests (Files): Likewise.
77980         * modules/isnanl-tests (Files): Likewise.
77981         * modules/isnanl-nolibm-tests (Files): Likewise.
77982         * modules/ldexpl-tests (Files): Likewise.
77983         * modules/printf-posix-tests (Files): Likewise.
77984         * modules/roundf-tests (Files): Likewise.
77985         * modules/round-tests (Files): Likewise.
77986         * modules/roundl-tests (Files): Likewise.
77987         * modules/signbit-tests (Files): Likewise.
77988         * modules/snprintf-posix-tests (Files): Likewise.
77989         * modules/sprintf-posix-tests (Files): Likewise.
77990         * modules/truncf-tests (Files): Likewise.
77991         * modules/trunc-tests (Files): Likewise.
77992         * modules/truncl-tests (Files): Likewise.
77993         * modules/vasnprintf-posix-tests (Files): Likewise.
77994         * modules/vasprintf-posix-tests (Files): Likewise.
77995         * modules/vdprintf-posix-tests (Files): Likewise.
77996         * modules/vfprintf-posix-tests (Files): Likewise.
77997         * modules/vprintf-posix-tests (Files): Likewise.
77998         * modules/vsnprintf-posix-tests (Files): Likewise.
77999         * modules/vsprintf-posix-tests (Files): Likewise.
78000         * modules/xprintf-posix-tests (Files): Likewise.
78002 2011-09-11  Bruno Haible  <bruno@clisp.org>
78004         Ensure pid_t gets defined.
78005         * m4/fcntl_h.m4 (gl_FCNTL_H): Require AC_TYPE_PID_T.
78006         * m4/sched_h.m4 (gl_SCHED_H): Likewise.
78007         * m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
78008         * m4/spawn_h.m4 (gl_SPAWN_H): Likewise.
78009         * m4/sys_wait_h.m4 (gl_SYS_WAIT_H): Likewise.
78010         * m4/termios_h.m4 (gl_TERMIOS_H): Likewise.
78011         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Likewise.
78012         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
78013         * tests/test-fcntl-h.c: Check that pid_t is defined.
78014         * tests/test-sched.c: Likewise.
78015         * tests/test-termios.c: Likewise.
78016         * tests/test-time.c: Likewise.
78017         * doc/posix-headers/fcntl.texi: Mention lack of pid_t on MSVC platform.
78018         * doc/posix-headers/signal.texi: Likewise.
78019         * doc/posix-headers/sys_types.texi: Likewise.
78020         * doc/posix-headers/time.texi: Likewise.
78022 2011-09-11  Bruno Haible  <bruno@clisp.org>
78024         acl: Fix compilation on Solaris 10 (older version).
78025         * lib/file-has-acl.c (acl_ace_nontrivial): Use NEW_ACE_EVERYONE instead
78026         of ACE_EVERYONE.
78027         * lib/set-mode-acl.c (qset_acl): Likewise.
78028         Reported by Christian Jullien <eligis@orange.fr>.
78030 2011-09-10  Bruno Haible  <bruno@clisp.org>
78032         iconv, unsetenv: Add support for MSVC compiler.
78033         * m4/iconv.m4 (AM_ICONV): Use ISO C declaration syntax on MSVC.
78034         * m4/setenv.m4 (gl_FUNC_UNSETENV): Drop support for K&R C compilers.
78036 2011-09-10  Bruno Haible  <bruno@clisp.org>
78038         *printf: Add support for MSVC compiler.
78039         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_N): On MSVC, install a handler that
78040         handles the exception caused by the %n directive. When cross-compiling,
78041         guess no on native Windows.
78042         (gl_SNPRINTF_TRUNCATION_C99, gl_SNPRINTF_RETVAL_C99,
78043         gl_SNPRINTF_DIRECTIVE_N, gl_SNPRINTF_SIZE1): When snprintf is missing,
78044         emulate it through vsnprintf.
78045         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Update comment.
78046         * doc/posix-functions/dprintf.texi: Update documentation regarding
78047         MSVC 9.
78048         * doc/posix-functions/fprintf.texi: Likewise.
78049         * doc/posix-functions/printf.texi: Likewise.
78050         * doc/posix-functions/snprintf.texi: Likewise.
78051         * doc/posix-functions/sprintf.texi: Likewise.
78052         * doc/posix-functions/swprintf.texi: Likewise.
78053         * doc/posix-functions/vdprintf.texi: Likewise.
78054         * doc/posix-functions/vfprintf.texi: Likewise.
78055         * doc/posix-functions/vprintf.texi: Likewise.
78056         * doc/posix-functions/vsnprintf.texi: Likewise.
78057         * doc/posix-functions/vsprintf.texi: Likewise.
78058         * doc/glibc-functions/asprintf.texi: Likewise.
78059         * doc/glibc-functions/obstack_printf.texi: Likewise.
78060         * doc/glibc-functions/obstack_vprintf.texi: Likewise.
78061         * doc/glibc-functions/vasprintf.texi: Likewise.
78063 2011-09-10  Bruno Haible  <bruno@clisp.org>
78065         nocrash: Add support for native Windows.
78066         * m4/nocrash.m4 (GL_NOCRASH): Avoid a crash also on native Windows.
78068 2011-09-10  Michael Goffioul  <michael.goffioul@gmail.com>  (tiny change)
78069             Bruno Haible  <bruno@clisp.org>
78071         absolute-header, include-next: Add support for MSVC compiler.
78072         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER_ONE): Require
78073         AC_CANONICAL_HOST. On native Windows, recognize also backslash as
78074         directory separator in #line directives.
78075         * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): On native Windows,
78076         recognize also backslash as directory separator in #line directives.
78078 2011-09-08  Jim Meyering  <meyering@redhat.com>
78080         maint.mk: mark the post-release commit log with "maint: " prefix
78081         * top/maint.mk (emit-commit-log): Add "maint: " prefix to the
78082         one-line commit-log summary.
78084 2011-09-08  Reuben Thomas  <rrt@sc3d.org>
78085             Bruno Haible  <bruno@clisp.org>
78087         Doc about crypt functions.
78088         * doc/posix-functions/crypt.texi: Mention need for _GNU_SOURCE on glibc
78089         systems.
78090         * doc/posix-functions/encrypt.texi: Likewise.
78091         * doc/posix-functions/setkey.texi: Likewise.
78093 2011-09-08  Simon Josefsson  <simon@josefsson.org>
78095         * lib/gc.h: Fix copyright header.
78097 2011-09-07  Bruno Haible  <bruno@clisp.org>
78099         pthread: Determine $(LIB_PTHREAD) correctly on OSF/1 5.1.
78100         * m4/pthread.m4 (gl_PTHREAD_CHECK): Use AC_CACHE_CHECK and
78101         AC_LINK_IFELSE instead of AC_SEARCH_LIBS.
78103 2011-09-07  Bruno Haible  <bruno@clisp.org>
78105         openat: Work around compilation error with OSF/1 5.1 DTK cc.
78106         * lib/fopen.c: Use different syntax for include of <stdio.h>.
78107         * lib/freopen.c: Likewise.
78108         * lib/fstatat.c: Use different syntax for include of <sys/stat.h>.
78109         * lib/lstat.c: Likewise.
78110         * lib/stat.c: Likewise.
78111         * lib/open.c: Use different syntax for include of <fcntl.h>.
78112         * lib/openat.c: Include fcntl.h again, explicitly.
78114 2011-09-04  J.T. Conklin  <jtc@acorntoolworks.com>
78116         parse-datetime: document the newly accepted format
78117         * doc/parse-datetime.texi (Combined date and time of day items):
78118         New section.
78120 2011-09-06  Bruno Haible  <bruno@clisp.org>
78122         acl: Fix a test failure on newer Solaris 10 with ZFS.
78123         * tests/test-sameacls.c (main): Interpret acl GETACLCNT failure with
78124         ENOSYS as no ACL.
78125         Reported by Jim Meyering.
78127 2011-09-06  Bruno Haible  <bruno@clisp.org>
78129         acl: Update for AIX >= 5.3 with NFS.
78130         * lib/file-has-acl.c (file_has_acl): Interpret aclx_get failure with
78131         ENOSYS as no ACL.
78133         acl: Fix a test failure on AIX >= 5.3 with NFS.
78134         * tests/test-sameacls.c (main): Interpret aclx_get failure with ENOSYS
78135         as no ACL.
78137 2011-09-06  Bruno Haible  <bruno@clisp.org>
78139         acl: Fix a test failure on IRIX 6.5 with NFS.
78140         * lib/acl-internal.h (MODE_INSIDE_ACL): Define to 0 on IRIX.
78141         * lib/set-mode-acl.c (qset_acl): Test !HAVE_ACL_TYPE_EXTENDED instead
78142         of MODE_INSIDE_ACL. If !MODE_INSIDE_ACL, do a chmod_or_fchmod always.
78143         * lib/copy-acl.c (qcopy_acl): Likewise.
78145 2011-09-05  Paul Eggert  <eggert@cs.ucla.edu>
78147         openat: port to AIX 7.1 with large files
78148         AIX 7.1 does a "#define openat open64at" if large files are in use,
78149         so we can't simply #undef openat.  Use the orig_openat trick (similar
78150         to orig_open in lib/open.c) to work around the problem.  Problem
78151         reported by Kevin Brott for GNU tar, in the thread containing
78152         <http://lists.gnu.org/r/bug-tar/2011-09/msg00032.html>.
78153         * lib/openat.c (__need_system_fcntl_h): Define first.
78154         Include <fcntl.h> and <sys/types.h> before undefining.
78155         (orig_openat) [HAVE_OPENAT]: New inline function.
78156         (openat) [HAVE_OPENAT]: Do not undef.
78157         (rpl_openat): Use orig_openat, not openat.
78159 2011-09-05  Joachim Schmitz  <schmitz@hp.com>  (tiny change)
78160             Bruno Haible  <bruno@clisp.org>
78162         acl: Avoid errors on NonStop Kernel.
78163         * lib/file-has-acl.c (file_has_acl) [NonStop Kernel]: Ignore ENOSYS and
78164         ENOTSUP errors.
78166 2011-09-05  Bruno Haible  <bruno@clisp.org>
78168         acl: Clean up Solaris code.
78169         * lib/acl-internal.h: Remove no-op #if.
78170         * lib/file-has-acl.c: Likewise.
78171         * lib/set-mode-acl.c (qset_acl): Remove unused Solaris code.
78172         * lib/copy-acl.c (qcopy_acl): Likewise.
78174 2011-09-05  Bruno Haible  <bruno@clisp.org>
78176         acl: Fix a bug with NFSv4 ACLs on Solaris 10 (newer version) in
78177         binaries built on the original Solaris 10.
78178         * lib/file-has-acl.c (file_has_acl): ACLs with 4..6 ACEs can be
78179         trivial.
78181 2011-09-05  Bruno Haible  <bruno@clisp.org>
78183         acl: Improve support of NFSv4 ACLs on Solaris 10 (newer version).
78184         * lib/acl-internal.h (acl_nontrivial): Declare also on newer Solaris
78185         10.
78186         * lib/file-has-acl.c (acl_nontrivial): Define also on newer Solaris 10.
78187         (acl_ace_nontrivial): Likewise. Recognize the trivial ACLs with 6 ACEs.
78188         * lib/copy-acl.c (qcopy_acl): On newer Solaris 10, use acl or facl
78189         instead of acl_get, facl_get, acl_set, facl_set.
78191 2011-09-05  Bruno Haible  <bruno@clisp.org>
78193         copy-file: Try unit tests on more file systems.
78194         * tests/test-copy-file-1.sh: New file.
78195         * tests/test-copy-file-2.sh: New file.
78196         * modules/copy-file-tests (Files): Add them.
78197         (Makefile.am): Add them to TESTS.
78199         acl: Try unit tests on more file systems.
78200         * tests/test-file-has-acl-1.sh: New file.
78201         * tests/test-file-has-acl-2.sh: New file.
78202         * tests/test-set-mode-acl-1.sh: New file.
78203         * tests/test-set-mode-acl-2.sh: New file.
78204         * tests/test-copy-acl-1.sh: New file.
78205         * tests/test-copy-acl-2.sh: New file.
78206         * modules/acl-tests (Files): Add them.
78207         (Makefile.am): Add them to TESTS.
78209 2011-09-04  Bruno Haible  <bruno@clisp.org>
78211         acl: Improve support of NFSv4 ACLs on Solaris 10 (newer version).
78212         * lib/acl-internal.h (ACE_*, NEW_ACE_*): Define also on newer Solaris
78213         10.
78214         (OLD_ALLOW, OLD_DENY): New macros.
78215         (NEW_ACE_ACCESS_ALLOWED_ACE_TYPE): Renamed from
78216         ACE_ACCESS_ALLOWED_ACE_TYPE.
78217         (NEW_ACE_ACCESS_DENIED_ACE_TYPE): Renamed from
78218         ACE_ACCESS_DENIED_ACE_TYPE.
78219         (OLD_ACE_OWNER, OLD_ACE_GROUP, OLD_ACE_OTHER): New macros.
78220         (NEW_ACE_EXECUTE): Fix value.
78221         (NEW_ACE_APPEND_DATA, NEW_ACE_READ_NAMED_ATTRS,
78222         NEW_ACE_WRITE_NAMED_ATTRS, NEW_ACE_DELETE_CHILD,
78223         NEW_ACE_READ_ATTRIBUTES, NEW_ACE_WRITE_ATTRIBUTES, NEW_ACE_DELETE,
78224         NEW_ACE_READ_ACL, NEW_ACE_WRITE_ACL, NEW_ACE_WRITE_OWNER,
78225         NEW_ACE_SYNCHRONIZE): New macros.
78226         * lib/set-mode-acl.c (qset_acl): On newer Solaris 10, use acl or facl
78227         instead of acl_fromtext, acl_set, facl_set.
78228         Fixes a coreutils/tests/cp/perm failure.
78230 2011-09-03  Paul Eggert  <eggert@cs.ucla.edu>
78232         openat: test for fstatat (..., 0) bug
78233         Further testing with tar suggests that fstatat (..., 0)
78234         does not work in general, on AIX 7.1; see
78235         <http://lists.gnu.org/r/bug-tar/2011-09/msg00023.html>.
78236         So, give up entirely on AIX 7.1's fstatat, and fall back on our
78237         replacement fstatat (which is what older AIX releases were using
78238         anyway).
78239         * lib/fstatat.c (fstatat) [HAVE_FSTATAT]: Do not undef.  The only
78240         use is now changed to orig_fstatat.  This was probably the right
78241         thing to do anyway.
78242         (FSTATAT_AT_FDCWD_0_BROKEN): Remove; no longer used.
78243         (rpl_fstatat) [FSTATAT_ZERO_FLAG_BROKEN]: Remove.
78244         (rpl_fstatat): Simplify, assuming !FSTATAT_ZERO_FLAG_BROKEN.
78245         (AT_FUNC_NAME) [FSTATAT_ZERO_FLAG_BROKEN]: Now rpl_fstatat.
78246         * m4/openat.m4 (gl_FUNC_FSTATAT): Test for the more-general bug
78247         and define FSTATAT_ZERO_FLAG_BROKEN, not FSTATAT_AT_FDCWD_0_BROKEN,
78248         if the bug is found.
78250         openat: test for fstatat (AT_FDCWD, ..., 0) bug
78251         This tests for another fstatat bug on AIX 7.1:
78252         fstatat (AT_FDCWD, ..., 0) does not work.  See
78253         <http://lists.gnu.org/r/bug-tar/2011-09/msg00015.html>.
78254         * lib/fstatat.c (FSTATAT_AT_FDCWD_0_BROKEN)
78255         (LSTAT_FOLLOWS_SLASHED_SYMLINK): Default to 0.
78256         (rpl_fstatat): Adjust so that it works around either (or both)
78257         bugs if present.
78258         * m4/openat.m4 (gl_FUNC_FSTATAT): Test for this fstatat bug.
78260 2011-09-03  Karl Berry  <karl@gnu.org>
78262         * doc/regex.texi (Character Class Operators): Avoid literal ":"
78263         in index entries.
78265 2011-09-02  Bruno Haible  <bruno@clisp.org>
78267         Allow the user to override the choice of AR, ARFLAGS, RANLIB.
78268         * m4/gnulib-common.m4 (gl_PROG_AR_RANLIB): Don't override the given
78269         values of AR, ARFLAGS, RANLIB.
78270         Reported by John W. Eaton <jwe@gnu.org> for Octave.
78272 2011-09-02  Bruno Haible  <bruno@clisp.org>
78274         Find 'ar' program that fits with --host argument.
78275         * m4/gnulib-common.m4 (gl_PROG_AR_RANLIB): Use AC_CHECK_TOOL.
78277 2011-09-02  Bruno Haible  <bruno@clisp.org>
78279         tests: init.sh: Support any non-GNU diff.
78280         * tests/init.sh (compare): If "diff -c" is supported but "diff -u" is
78281         not, use "diff -c". Useful on AIX 6.1, HP-UX 11.31, OSF/1 5.1,
78282         Solaris 8.
78284 2011-09-02  Bruno Haible  <bruno@clisp.org>
78286         tests: init.sh: work also with any non-GNU diff that supports -u
78287         * tests/init.sh: Relax check for diff -u support.
78288         Rather than checking for GNU diff via --version, simply check
78289         for support for -u itself.  Useful at least on OpenBSD 4.9,
78290         AIX 7.1, IRIX 6.5, and Solaris 10.
78292 2011-09-01  Bruno Haible  <bruno@clisp.org>
78294         strtoimax, strtoumax: Document problem on HP-UX 11.
78295         * doc/posix-functions/strtoimax.texi: Mention HP-UX 11.11 problem.
78296         * doc/posix-functions/strtoumax.texi: Likewise.
78298 2011-09-01  Bruno Haible  <bruno@clisp.org>
78300         strtoumax: Avoid link error on OSF/1 with DTK cc.
78301         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Always test whether strtoumax is
78302         defined as a function.
78303         * modules/strtoumax (Depends-on, configure.ac): Test only whether
78304         strtoumax is defined, not whether it is declared.
78306 2011-09-01  Bruno Haible  <bruno@clisp.org>
78308         strtoimax: Avoid link error on OSF/1 with DTK cc.
78309         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Always test whether strtoimax is
78310         defined as a function.
78311         * modules/strtoimax (Depends-on, configure.ac): Test only whether
78312         strtoimax is defined, not whether it is declared.
78314 2011-09-01  Bruno Haible  <bruno@clisp.org>
78316         imaxdiv: Avoid link error on OSF/1 with DTK cc.
78317         * m4/imaxdiv.m4 (gl_FUNC_IMAXDIV): Also test whether imaxdiv is defined
78318         as a function.
78319         * modules/imaxdiv (configure.ac): Test whether imaxdiv is defined, not
78320         whether it is declared.
78322 2011-09-01  Bruno Haible  <bruno@clisp.org>
78324         imaxabs: Avoid link error on OSF/1 with DTK cc.
78325         * m4/imaxabs.m4 (gl_FUNC_IMAXABS): Also test whether imaxabs is defined
78326         as a function.
78327         * modules/imaxabs (configure.ac): Test whether imaxabs is defined, not
78328         whether it is declared.
78330 2011-09-01  Bruno Haible  <bruno@clisp.org>
78332         Tests for module 'strtoumax'.
78333         * modules/strtoumax-tests: New file.
78334         * tests/test-strtoumax.c: New file.
78336         Tests for module 'strtoimax'.
78337         * modules/strtoimax-tests: New file.
78338         * tests/test-strtoimax.c: New file.
78340         Tests for module 'imaxdiv'.
78341         * modules/imaxdiv-tests: New file.
78342         * tests/test-imaxdiv.c: New file.
78344         Tests for module 'imaxabs'.
78345         * modules/imaxabs-tests: New file.
78346         * tests/test-imaxabs.c: New file.
78348 2011-09-01  Bruno Haible  <bruno@clisp.org>
78350         pthread: Determine $(LIB_PTHREAD) correctly on IRIX 6.5.
78351         * m4/pthread.m4 (gl_PTHREAD_CHECK): Check for pthread_join, not
78352         pthread_create.
78354 2011-09-01  Paul Eggert  <eggert@cs.ucla.edu>
78356         openat: work around AIX 7.1 fstatat issue
78357         This should fix the problem that was not properly fixed
78358         in the previous change, dated 2011-08-30.
78359         * lib/fstatat.c: Include <sys/stat.h> twice, the first with
78360         __need_system_stat_h defined.
78361         (orig_fstatat) [HAVE_FSTATAT]: New function.
78362         (rpl_fstatat): Go back to the old way of doing things,
78363         except call orig_fstatat instead of fstatat.
78364         * m4/openat.m4 (gl_FUNC_FSTATAT): Remove unnecessary check for openat.
78365         Remove unnecessary check whether fstatat fills in st_size etc.
78367 2011-09-01  Bruno Haible  <bruno@clisp.org>
78369         sys_select: Avoid a syntax error regarding timespec_t on IRIX 6.5.
78370         * lib/sys_select.in.h [__sgi]: When included from <sys/bsd_types.h>,
78371         just include the system's header.
78373 2011-08-31  Jim Meyering  <meyering@redhat.com>
78375         tests: avoid spurious assertion failure in test-float.c on ppc64
78376         * tests/test-float.c (test_long_double): Comment out an assertion,
78377         LDBL_MIN_EXP <= DBL_MIN_EXP, that is failing at least on PowerPC-64
78378         with gcc-4.4.4.
78380         maint: indent with spaces, not TABs
78381         I need to get in the habit of running gnulib's "make check".
78382         Both of these would have been caught.
78383         * m4/largefile.m4: Indent with spaces, not TABs.
78384         * lib/parse-datetime.y (iso_8601_time): Likewise.
78385         Spotted by Pádraig Brady.
78387         test-parse-datetime.c: accommodate a relatively strict gcc warning
78388         * tests/test-parse-datetime.c (gmt_offset): Declare function "static",
78389         to avoid a warning from gcc's -Werror=missing-declarations.
78390         Insert a few spaces-before-funcall-parenthesis.
78392 2011-08-17  J.T. Conklin  <jtc@acorntoolworks.com>
78394         parse-datetime: accept ISO 8601 date and time rep with "T" separator
78395         The parser now accepts ISO 8601 date-time strings with "T" as the
78396         separator.  It has long parsed dates like "2004-02-29 16:21:42"
78397         with a space between the date and time strings.  Now it also parses
78398         "2004-02-29T16:21:42" and fractional-second and time-zone-annotated
78399         variants like "2004-02-29T16:21:42.333-07:00"
78400         * lib/parse-datetime.y: Parse ISO 8601 extended date and time
78401         of day representation using the 'T' separator character.
78402         * doc/parse-datetime.texi (General date syntax): replace use of
78403         deprecated --iso-8601 option with --rfc-3339 in example of date
78404         command output formats that can be parsed.
78405         * tests/test-parse-datetime.c (tm_diff): New function, taken from
78406         lib/parse-datetime.y.
78407         (gmt_offset): New function.
78408         (main): Add additional test cases to validate ISO8601 extended
78409         date and time of day parsing.
78411 2011-08-31  Bruno Haible  <bruno@clisp.org>
78413         freopen: Documentation.
78414         * doc/posix-functions/freopen.texi: Document the bug with the NULL file
78415         name.
78416         Reported by Claudio Bley <claudio.bley@gmail.com>.
78418 2011-08-31  Claudio Bley  <claudio.bley@gmail.com>  (tiny change)
78420         freopen: Don't crash if the filename argument is NULL.
78421         * lib/freopen.c (rpl_freopen): Don't compare the filename if it is
78422         NULL.
78424 2011-08-30  Paul Eggert  <eggert@cs.ucla.edu>
78426         openat: work around AIX 7.1 fstatat bug
78427         Problem reported by Kevin Brott for GNU tar, in the thread containing
78428         <http://lists.gnu.org/r/bug-tar/2011-08/msg00015.html>.
78429         * lib/fstatat.c (rpl_fstatat): Do not invoke underlying fstatat if
78430         FSTATAT_ST_SIZE_ETC_BROKEN.
78431         (fstatat) [FSTATAT_ST_SIZE_ETC_BROKEN && HAVE_FSTATAT]: #define to
78432         rpl_fstatat.
78433         * m4/openat.m4 (gl_FUNC_FSTATAT): New macro, with the fstatat-relevant
78434         part of gl_FUNC_OPENAT.  Also, check for the AIX 7.1 bug, and use
78435         AC_CHECK_FUNCS_ONCE for fstatat.
78436         (gl_FUNC_OPENAT): Use it.  Use AC_CHECK_FUNCS_ONCE for
78437         fchmodat, mkdirat, openat and unlinkat.
78439 2011-08-30  Bruno Haible  <bruno@clisp.org>
78441         Avoid endless recursions if config.h includes some header files.
78442         * lib/fopen.c (__need_FILE): Define already before including config.h.
78443         * lib/freopen.c (__need_FILE): Likewise.
78444         * lib/open.c (__need_system_fcntl_h): Likewise.
78445         * lib/stat.c (__need_system_sys_stat_h): Likewise.
78446         * lib/lstat.c (__need_system_sys_stat_h): Likewise.
78447         Reported by Michael Goffioul <michael.goffioul@gmail.com>.
78449 2011-08-25  Karl Berry  <karl@gnu.org>
78451         * config/srclist.txt (ylwrap): new try.
78452         * build-aux/ylwrap: new file.
78454 2011-08-23  Bruno Haible  <bruno@clisp.org>
78456         tmpdir: Use a good default directory on native Windows.
78457         * lib/tmpdir.c: Include <windows.h>, pathmax.h.
78458         (P_tmpdir): Default to _P_tmpdir on native Windows.
78459         (path_search): On native Windows, try the value returned by GetTempPath
78460         before trying P_tmpdir.
78461         * modules/tmpdir (Depends-on): Add pathmax.
78462         Suggested by John Darrington <john@darrington.wattle.id.au>.
78464 2011-08-20  Reuben Thomas  <rrt@sc3d.org>
78466         doc: fix typo in README-release
78467         * top/README-release: Capitalize first word of a sentence.
78469 2011-08-19  Jim Meyering  <meyering@redhat.com>
78471         fts: do not exhaust memory when processing million-entry directories
78472         Before this change, traversing (via rm -rf, find, du, etc.) an N-entry
78473         directory would require about 256*N bytes of memory.  Thus, it was
78474         easy to construct a directory too large to be processed by any of
78475         those tools.  With this change, fts' maximum memory utilization is
78476         now limited to around 30MB.
78477         * lib/fts.c (FTS_MAX_READDIR_ENTRIES): Define.
78478         (fts_read): When we've processed the final entry (i.e., when
78479         ->fts_link is NULL) and fts_dirp is non-NULL, call fts_build
78480         using the parent entry to read any remaining entries.  Dispatch
78481         depending on what fts_build returns:
78482         - NULL+stop, aka failure: stop
78483         - NULL otherwise: move up in the dir hierarchy
78484         - non-NULL: handle this new entry
78485         (fts_build): Declare and use new local, continue_readdir.
78486         Prepare to be called from fts_read, when the entries
78487         from a partially-read directory have just been exhausted.
78488         In that case, we'll skip the opendir and instead use the parent's
78489         fts_dirp and derive dir_fd from that.
78490         Finally, in the readdir loop, if we read max_entries entries,
78491         exit the loop ensuring *not* to call closedir.  This is required
78492         so that fts_dirp can be reused on a subsequent call.
78493         Prompted by Ben England's report of memory exhaustion in find
78494         and rm -rf vs. NFS: https://bugzilla.redhat.com/719749.
78496         maint: fts: move decl of `dp' down into while loop; split a long line
78497         * lib/fts.c (fts_build): No semantic change.
78499         fts: add/use new struct member, fts_dirp
78500         We are about to use this to manage any directory with
78501         too many entries to read all of them into memory at once.
78502         To do that, we'll need to save the DIR* pointer in each
78503         affected FTSENT struct.
78504         * lib/fts_.h: Include <dirent.h>.
78505         (struct FTSENT) [fts_dirp]: New member.
78506         * lib/fts.c (closedir_and_clear): Define.
78507         Use it in place of closedir so that we are sure to
78508         clear the new fts_dirp member when done with it.
78509         (fts_alloc): Initialize the new member.
78510         (fts_lfree): Free, if needed.
78512         maint: fts: give __opendir2 a new parameter and rename
78513         * lib/fts.c (__opendir2): Give it a new parameter, Pdir_fd, rather
78514         than surreptitiously using sole caller's "dir_fd".
78515         (fts_opendir): Rename from __opendir2.
78517         maint: fts.c: remove __opendir2's now-unused parameter, oflag
78518         * lib/fts.c (__opendir2): Remove unused parameter, oflag.
78520         maint: fts.c: correct off-by-one indentation
78521         * lib/fts.c (fts_build): Correct indentation, change style
78522         of a couple of block comments, and bracing style.
78524         maint: fts.c: move __opendir2 #define "up" out of function body
78525         * lib/fts.c (__opendir2): Move "up".  No semantic change.
78527         maint: fts.c: remove #if-0'd FTS_WHITEOUT code
78528         * lib/fts.c: Remove #if-0'd FTS_WHITEOUT code.  It's been #if-0'd
78529         out for a long time and besides was useful only on BSD systems.
78531 2011-08-18  Paul Eggert  <eggert@cs.ucla.edu>
78533         regex: port to Stratus OpenVOS
78534         * lib/regex_internal.h (internal_function) [!_LIBC]: Simply
78535         define to empty, rather than attempting nonportable optimizations.
78536         Problem reported by Paul Green in:
78537         http://lists.gnu.org/r/bug-diffutils/2011-08/msg00047.html
78538         and fix suggested by Eric Blake in:
78539         http://lists.gnu.org/r/bug-gnulib/2011-08/msg00143.html
78541 2011-08-17  Eric Blake  <eblake@redhat.com>
78543         getcwd: fix test failures on mingw
78544         * lib/getcwd.c (__getcwd): Early exit for ERANGE.
78545         * tests/test-getcwd.c (test_abort_bug, test_long_name): Don't fail
78546         test if long directory cannot be created, and allow mingw errno.
78548         getcwd-lgpl: fix m4 to match relaxed test for BSD
78549         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Relax probe.
78550         (gl_FUNC_GETCWD_SIGNATURE): New macro.
78551         (gl_FUNC_GETCWD_LGPL, gl_FUNC_GETCWD): Use it.
78552         * doc/posix-functions/getcwd.texi (getcwd): Tweak mentions of
78553         signature problem.
78555         getcwd: fix compilation on mingw64
78556         * lib/unistd.in.h (includes) [mingw]: Include <direct.h> for
78557         getcwd.
78558         Reported by Marc-André Lureau.
78560         pipe2: silence compiler warning
78561         * lib/pipe2.c (pipe2): Hide label if it is not used.
78563 2011-08-15  Ben Pfaff  <blp@cs.stanford.edu>
78565         relocatable-prog: fix link error
78566         * modules/relocatable-prog (configure.ac) [RELOCATABLE]: Also
78567         invoke AC_LIBOBJ([relocatable]).  This invocation was previously
78568         in the gl_RELOCATABLE_LIBRARY macro.  That invocation was moved
78569         into modules/relocatable-lib without noticing that
78570         modules/relocatable-prog also invokes gl_RELOCATABLE_LIBRARY and
78571         also needs to build relocatable.c.
78573 2011-08-12  Paul Eggert  <eggert@cs.ucla.edu>
78575         getaddrinfo: fix sh typo in gai_strerrorA decl checking
78576         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix typo in the generated
78577         shell code: it contained a 'break' that was not in a loop.
78578         Apparently the macro assumed that AC_CHECK_DECLS is implemenented
78579         via a shell-language loop; this may have been true in old Autoconf
78580         versions, but it's not true in Autoconf 2.68.  I found this bug
78581         when testing coreutils git on Solaris 8, whose shell complains
78582         about the syntax error.
78584 2011-08-12  Simon Josefsson  <simon@josefsson.org>
78586         * lib/base64.c: Fix comment to reference RFC 4648.
78587         Suggested by Bruno Haible <bruno@clisp.org> and Gijs van Tulder
78588         <gvtulder@gmail.com>.
78590 2011-08-11  Paul Eggert  <eggert@cs.ucla.edu>
78592         * build-aux/bootstrap (slurp): Remove obsolescent gettext.m4 patch.
78594         po/Makefile.in.in: fix make -q problem
78595         * build-aux/po/Makefile.in.in (check-macro-version): Remove this
78596         rule, since there's no file named 'check-macro-version' and its
78597         use as a file breaks make -q.
78598         (all): Don't depend on check-macro-version.
78599         (CHECK_MACRO_VERSION): New macro.
78600         (stamp-po): Use it.
78602         configmake: fix make -q problem
78603         * modules/configmake (configmake.h): Update configmake.h's time stamp
78604         even if the file does not change.  Otherwise, 'make -q' fails.
78605         Problem reported by Simon Josefsson in
78606         <http://lists.gnu.org/r/bug-gnulib/2011-08/msg00088.html>.
78608 2011-08-11  Jim Meyering  <meyering@redhat.com>
78610         git-version-gen: correct the advice in a comment
78611         * build-aux/git-version-gen: Correct comment.
78612         Don't recommend to list .tarball-version in .gitignore.
78614 2011-08-10  Paul Eggert  <eggert@cs.ucla.edu>
78616         base64: fix off-by-one buffer size bug
78617         Problem and (trivial) fix reported by Gijs van Tulder in
78618         <http://lists.gnu.org/r/bug-gnulib/2011-08/msg00083.html>.
78619         * lib/base64.c (base64_decode_alloc_ctx): Allocate one more byte.
78620         * tests/test-base64.c (main): Catch the bug.
78622 2011-08-10  Eric Blake  <eblake@redhat.com>
78624         closein: correct comments
78625         * lib/closein.c (close_stdin): Improve comments.
78627 2011-08-09  Bruno Haible  <bruno@clisp.org>
78629         More tests for 'fseeko'.
78630         * tests/test-fseeko3.c: New file, from Eric Blake.
78631         * tests/test-fseeko3.sh: New file.
78632         * modules/fseeko-tests (Files): Add them.
78633         (TESTS): Add test-fseeko3.sh.
78634         (check_PROGRAMS): Add test-fseeko3.
78636 2011-08-09  Eric Blake  <eblake@redhat.com>
78638         fseeko: remove unneeded hack
78639         * lib/fseeko.c (fseeko): Don't special-case SEEK_END.
78641         fseeko: fix bug on glibc
78642         * lib/fseeko.c (fseeko): Set stream offset to match fd offset.
78643         Reported by John W. Eaton.
78645 2011-08-08  Bruno Haible  <bruno@clisp.org>
78647         unictype/base: Fix interoperability with preinstalled libunistring.
78648         * modules/unictype/base (configure.ac): Bump minimum version to 0.9.4.
78649         Reported by Simon Josefsson.
78651 2011-08-08  Bruno Haible  <bruno@clisp.org>
78653         iswblank: Detect declaration correctly.
78654         * m4/iswblank.m4 (gl_FUNC_ISWBLANK): Use correct headers in
78655         AC_CHECK_DECLS invocation.
78657 2011-08-08  Bruno Haible  <bruno@clisp.org>
78659         tcgetsid: Detect declaration correctly.
78660         * m4/tcgetsid.m4 (gl_FUNC_TCGETSID): Use correct headers in
78661         AC_CHECK_DECLS invocation.
78662         Reported by Simon Josefsson.
78664 2011-08-08  Eric Blake  <eblake@redhat.com>
78666         largefile: fix typo that regressed large file support
78667         * modules/largefile (configure.ac-early): Fix section name.
78669 2011-08-06  Karl Berry  <karl@gnu.org>
78671         * MODULES.html.sh (func_all_files): _Noreturn is no longer
78672         a separate module.
78674 2011-08-05  Simon Josefsson  <simon@josefsson.org>
78676         openat: Fix warnings and commens when building unlinkat.c on Hurd.
78677         * lib/unlinkat.c: Mention Hurd in comments.  Include stdlib.h to
78678         get prototype for free.
78680 2011-08-04  Bruno Haible  <bruno@clisp.org>
78682         Tests for module 'pathmax'.
78683         * modules/pathmax-tests: New file.
78684         * tests/test-pathmax.c: New file.
78686         canonicalize-lgpl: Support larger filenames on the Hurd.
78687         * lib/canonicalize-lgpl.c (__realpath): Bump path_max fallback to 8192.
78688         Reported by Paul Eggert.
78690         pathmax: Leave PATH_MAX undefined on the Hurd, and a constant otherwise.
78691         * lib/pathmax.h (PATH_MAX): Leave it undefined on GNU/Hurd.
78692         * lib/chdir-long.h: Include pathmax.h.
78693         * lib/clean-temp.c (PATH_MAX): Remove code that is done by pathmax.h.
78694         * lib/getcwd.c: Include pathmax.h instead of <limits.h>.
78695         (PATH_MAX): Remove code that is done by pathmax.h.
78696         * lib/canonicalize.c (PATH_MAX): Provide a fallback value.
78697         * lib/tmpfile.c: Add a comment.
78698         * m4/pathmax.m4 (gl_PATHMAX): Don't test for pathconf.
78699         * modules/chdir-long (Depends-on): Add pathmax.
78700         * modules/getcwd (Depends-on): Add pathmax.
78701         * tests/test-getcwd.c (test_abort_bug): Avoid syntax error when PATH_MAX
78702         is not defined.
78703         * doc/posix-headers/limits.texi: Mention the pathmax module.
78704         * NEWS: Mention the change.
78706 2011-08-02  Bruno Haible  <bruno@clisp.org>
78708         pthread_sigmask: Actually use results of gl_THREADLIB.
78709         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Test and require
78710         gl_THREADLIB, not gl_[]THREADLIB.
78711         Reported by Eric Blake.
78713 2011-08-02  Jim Meyering  <meyering@redhat.com>
78715         maint.mk: relax the default _gl_TS_function_match regexp
78716         * top/maint.mk (_gl_TS_function_match): Don't require at least one
78717         space between function name and "(" in an "extern" declaration.
78718         That would fail to match a decl with no space there: extern void foo();
78720 2011-07-31  Iain Nicol  <iain@thenicols.net>
78722         git-version-gen: document that EXTRA_DIST must include .version
78723         * build-aux/git-version-gen: In the how-to-use comment, document
78724         that EXTRA_DIST must include .version.  Otherwise, "make distcheck"
78725         will fail when run from an unpacked distribution tarball.
78727 2011-08-01  Bruno Haible  <bruno@clisp.org>
78729         wctype-h: Fix last change.
78730         * m4/wctype_h.m4 (gl_WCTYPE_H): If towlower is defined, set
78731         REPLACE_TOWLOWER to 0.
78732         Reported by Sam Steingold <sds@gnu.org>.
78734 2011-07-31  Bruno Haible  <bruno@clisp.org>
78736         frexpl: Update autoconf test.
78737         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Update overrides of <float.h>,
78738         according to changes of 2011-06-20.
78740 2011-07-31  Bruno Haible  <bruno@clisp.org>
78742         sys_utsname: Add support for Minix.
78743         * lib/sys_utsname.in.h [Minix]: Include <stddef.h> before
78744         <sys/utsname.h>.
78745         * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H): Likewise.
78746         * doc/posix-headers/sys_utsname.texi: Document the Minix problem.
78748 2011-07-31  Bruno Haible  <bruno@clisp.org>
78750         strings: Add support for Minix.
78751         * lib/strings.in.h [Minix]: Include <sys/types.h> before <strings.h>.
78752         * m4/strings_h.m4 (gl_HEADER_STRINGS_H_BODY): Likewise.
78753         * doc/posix-headers/strings.texi: Document the Minix problem.
78755 2011-07-31  Bruno Haible  <bruno@clisp.org>
78757         wctype-h: Add support for Minix.
78758         * m4/wctype_h.m4 (gl_WCTYPE_H): Test whether towlower is declared. Set
78759         REPLACE_TOWLOWER.
78760         * modules/wctype-h (Makefile.am): Substitute REPLACE_TOWLOWER.
78761         * lib/wctype.in.h (towlower, towupper): Test REPLACE_TOWLOWER, not
78762         REPLACE_ISWCNTRL.
78764 2011-07-31  Paul Eggert  <eggert@cs.ucla.edu>
78766         * lib/xalloc.h (DEFAULT_MXFAST): Track 64-bit glibc.
78767         This is a performance improvement for 64-bit hosts: it causes the
78768         value of DEFAULT_MXFAST to track what's in glibc on such hosts.
78770 2011-07-31  Bruno Haible  <bruno@clisp.org>
78772         stdioext: Add support for Minix.
78773         * lib/fbufmode.c (fbufmode) [__minix]: Add conditional code.
78774         * lib/fpurge.c (fpurge): Likewise.
78775         * lib/freadahead.c (freadahead): Likewise.
78776         * lib/freadable.c (freadable): Likewise.
78777         * lib/freading.c (freading): Likewise.
78778         * lib/freadptr.c (freadptr): Likewise.
78779         * lib/freadseek.c (freadptrinc): Likewise.
78780         * lib/fseeko.c (rpl_fseeko): Likewise.
78781         * lib/fseterr.c (fseterr): Likewise.
78782         * lib/fwritable.c (fwritable): Likewise.
78783         * lib/fwriting.c (fwriting): Likewise.
78784         * lib/fflush.c (clear_ungetc_buffer): Update comment.
78785         * m4/fpending.m4 (gl_PREREQ_FPENDING): Add a variant for Minix.
78787 2011-07-31  Bruno Haible  <bruno@clisp.org>
78789         errno: Port to Minix.
78790         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Test also whether ENETRESET and
78791         ECONNABORTED are defined.
78792         * lib/errno.in.h (ENETRESET, GNULIB_defined_ENETRESET, ECONNABORTED,
78793         GNULIB_defined_ECONNABORTED): New macros.
78794         * lib/strerror-override.h (strerror_override): Test also
78795         GNULIB_defined_ENETRESET, GNULIB_defined_ECONNABORTED.
78796         * lib/strerror-override.c (strerror_override): Handle also ENETRESET,
78797         ECONNABORTED.
78798         * doc/posix-headers/errno.texi: Mention the Minix problem.
78800 2011-07-31  Bruno Haible  <bruno@clisp.org>
78802         Work around declaration collisions on Minix.
78803         * m4/mbsinit.m4 (gl_FUNC_MBSINIT): If mbsinit is declared but not
78804         defined, set REPLACE_MBSINIT.
78805         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): If mbrtowc is declared but not
78806         defined, set REPLACE_MBRTOWC.
78807         * m4/mbrlen.m4 (gl_FUNC_MBRLEN): If mbrlen is declared but not defined,
78808         set REPLACE_MBRLEN.
78809         * m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS): If mbsrtowcs is declared but not
78810         defined, set REPLACE_MBSRTOWCS.
78811         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): If wcrtomb is declared but not
78812         defined, set REPLACE_WCRTOMB.
78813         * m4/wcsrtombs.m4 (gl_FUNC_WCSRTOMBS): If wcsrtombs is declared but not
78814         defined, set REPLACE_WCSRTOMBS.
78816 2011-07-31  Bruno Haible  <bruno@clisp.org>
78818         Add support for Minix with ACK compiler.
78819         * m4/gnulib-common.m4 (gl_PROG_AR_RANLIB): New macro.
78820         * gnulib-tool (func_import, func_create_testdir): Emit invocation of
78821         gl_PROG_AR_RANLIB instead of AC_PROG_RANLIB.
78823 2011-07-31  Bruno Haible  <bruno@clisp.org>
78825         Documentation about Minix.
78826         * doc/posix-headers/*.texi: Add info about Minix 3.1.8.
78827         * doc/glibc-headers/*.texi: Likewise.
78828         * doc/posix-functions/*.texi: Likewise.
78829         * doc/glibc-functions/*.texi: Likewise.
78831 2011-07-31  Bruno Haible  <bruno@clisp.org>
78833         snippet/warn-on-use: Fix indentation.
78834         * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Fix indentation.
78836 2011-07-25  Jim Meyering  <meyering@redhat.com>
78838         tests: test-update-copyright.sh: remove unnecessary "rm" commands
78839         * tests/test-update-copyright.sh: Remove unused rm -f $TMP.*.bak
78840         commands.
78842 2011-07-27  Jim Meyering  <meyering@redhat.com>
78844         maint.mk: avoid sc_prohibit_always-defined_macros failure in coreutils
78845         * top/maint.mk (gl_extract_significant_defines_): Now that
78846         SA_RESETHAND and SA_RESTART are #defined (albeit conditionally) in
78847         gnulib/lib/signal.in.h, and now that we recommend to
78848         define-if-undefined those two symbols in application code,
78849         we must filter them out of the "significant" list.
78850         This avoids a "make syntax-check" failure in coreutils.
78852 2011-07-26  Eric Blake  <eblake@redhat.com>
78854         warnings: add comments about previous patch
78855         * m4/absolute-header.m4: Document AS_VAR_PUSHDEF limitation.
78856         * m4/include_next.m4: Likewise.
78857         * m4/warn-on-use.m4: Likewise.
78858         * m4/warnings.m4: Likewise, and simplify use.
78859         Suggested by Stefano Lattarini.
78861         include-next, warnings: support older autoconf
78862         * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Use
78863         AS_VAR_PUSHDEF in a way that works with older autoconf.
78864         * m4/warnings.m4 (gl_WARN_ADD): Likewise.
78865         Reported by Daniel P. Berrange.
78867 2011-07-25  Bruno Haible  <bruno@clisp.org>
78869         fseek, ftell: Fix doc.
78870         * doc/posix-functions/fseek.texi: Reword statement about
78871         AC_SYS_LARGEFILE.
78872         * doc/posix-functions/ftell.texi: Likewise.
78874 2011-07-25  Paul Eggert  <eggert@cs.ucla.edu>
78875             Bruno Haible  <bruno@clisp.org>
78877         Add dependencies to the 'largefile' module.
78878         * modules/fopen (Depends-on): Add 'largefile'.
78879         * modules/freopen (Depends-on): Likewise.
78880         * modules/fseeko (Depends-on): Likewise.
78881         * modules/ftello (Depends-on): Likewise.
78882         * modules/glob (Depends-on): Likewise.
78883         * modules/lseek (Depends-on): Likewise.
78884         * modules/lstat (Depends-on): Likewise.
78885         * modules/mkostemp (Depends-on): Likewise.
78886         * modules/mkostemps (Depends-on): Likewise.
78887         * modules/mkstemp (Depends-on): Likewise.
78888         * modules/mkstemps (Depends-on): Likewise.
78889         * modules/open (Depends-on): Likewise.
78890         * modules/openat (Depends-on): Likewise.
78891         * modules/pread (Depends-on): Likewise.
78892         * modules/pwrite (Depends-on): Likewise.
78893         * modules/scandir (Depends-on): Likewise.
78894         * modules/stat (Depends-on): Likewise.
78895         * modules/tmpfile (Depends-on): Likewise.
78896         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Do not require AC_SYS_LARGEFILE,
78897         since the containing module now depends on the largefile module.
78898         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Likewise.
78899         * doc/posix-functions/fopen.texi: Mention that the problem of 32-bit
78900         off_t is fixed by gnulib.
78901         * doc/posix-functions/freopen.texi: Likewise.
78902         * doc/posix-functions/fseeko.texi: Likewise.
78903         * doc/posix-functions/fstatat.texi: Likewise.
78904         * doc/posix-functions/ftello.texi: Likewise.
78905         * doc/posix-functions/glob.texi: Likewise.
78906         * doc/posix-functions/lseek.texi: Likewise.
78907         * doc/posix-functions/lstat.texi: Likewise.
78908         * doc/posix-functions/mkstemp.texi: Likewise.
78909         * doc/posix-functions/open.texi: Likewise.
78910         * doc/posix-functions/openat.texi: Likewise.
78911         * doc/posix-functions/pread.texi: Likewise.
78912         * doc/posix-functions/pwrite.texi: Likewise.
78913         * doc/posix-functions/scandir.texi: Likewise.
78914         * doc/posix-functions/stat.texi: Likewise.
78915         * doc/posix-functions/tmpfile.texi: Likewise.
78916         * doc/glibc-functions/mkostemp.texi: Likewise.
78917         * doc/glibc-functions/mkostemps.texi: Likewise.
78918         * doc/glibc-functions/mkstemps.texi: Likewise.
78920 2011-07-25  Bruno Haible  <bruno@clisp.org>
78922         fcntl: Move AC_LIBOBJ invocation to module description.
78923         * m4/fcntl.m4 (gl_REPLACE_FCNTL): Don't invoke AC_LIBOBJ.
78924         * modules/fcntl (configure.ac): Invoke AC_LIBOBJ.
78926         fcntl: Remove call-in from fchdir.m4.
78927         * m4/fcntl.m4 (gl_FUNC_FCNTL): Conditionally invoke gl_TEST_FCHDIR.
78928         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't invoke gl_REPLACE_FCNTL.
78930         dup3: Remove potential call-in from fchdir.m4.
78931         * m4/dup3.m4 (gl_FUNC_DUP3): Add comment about fchdir.
78932         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Remove comment about dup3.
78934         dup2: Move AC_LIBOBJ invocation to module description.
78935         * m4/dup2.m4 (gl_REPLACE_DUP2): Remove macro.
78936         (gl_FUNC_DUP2): Instead of gl_REPLACE_DUP2, just set REPLACE_DUP2 to 1.
78937         Don't invoke AC_LIBOBJ.
78938         * modules/dup2 (configure.ac): Invoke AC_LIBOBJ.
78940         dup2: Remove call-in from fchdir.m4.
78941         * m4/dup2.m4 (gl_FUNC_DUP2): Conditionally invoke gl_TEST_FCHDIR.
78942         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't invoke gl_REPLACE_DUP2.
78944         fclose: Move AC_LIBOBJ invocation to module description.
78945         * m4/fclose.m4 (gl_REPLACE_FCLOSE): Remove macro.
78946         (gl_FUNC_FCLOSE): Instead of gl_REPLACE_FCLOSE, just set REPLACE_FCLOSE
78947         to 1.
78948         * modules/fclose (configure.ac): Invoke AC_LIBOBJ.
78950         fclose: Remove call-in from close.m4.
78951         * m4/fclose.m4 (gl_FUNC_FCLOSE): Invoke gl_FUNC_CLOSE.
78952         * m4/close.m4 (gl_FUNC_CLOSE): Don't invoke gl_REPLACE_FCLOSE.
78954         close: Move AC_LIBOBJ invocation to module description.
78955         * m4/close.m4 (gl_REPLACE_CLOSE): Remove macro.
78956         (gl_FUNC_CLOSE): Instead of gl_REPLACE_CLOSE, just set REPLACE_CLOSE to
78957         1.
78958         * modules/close (configure.ac): Invoke AC_LIBOBJ.
78960         close: Remove call-in from fchdir.m4.
78961         * m4/close.m4 (gl_FUNC_CLOSE): Conditionally invoke gl_TEST_FCHDIR.
78962         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't invoke gl_REPLACE_CLOSE.
78964         open: Move AC_LIBOBJ invocation to module description.
78965         * m4/open.m4 (gl_REPLACE_OPEN): Remove macro.
78966         (gl_FUNC_OPEN): Instead of gl_REPLACE_OPEN, just set REPLACE_OPEN to 1.
78967         * modules/open (configure.ac): Invoke AC_LIBOBJ and gl_PREREQ_OPEN.
78969         open: Remove call-in from fchdir.m4.
78970         * m4/open.m4 (gl_FUNC_OPEN): Conditionally invoke gl_TEST_FCHDIR.
78971         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't invoke gl_REPLACE_OPEN.
78973         fchdir: Start to remove gl_REPLACE_* idiom.
78974         * m4/fchdir.m4 (gl_TEST_FCHDIR): New macro.
78975         (gl_FUNC_FCHDIR): Invoke it.
78977 2011-07-25  Paul Eggert  <eggert@cs.ucla.edu>
78979         * lib/ftell.c (ftell): Comment out cast.
78981         close: use gl_REPLACE_FCLOSE only if defined
78982         * m4/close.m4 (gl_REPLACE_CLOSE): Use gl_REPLACE_FCLOSE only if it
78983         is defined.  The close module doesn't depend on the fclose module
78984         any more, so gl_REPLACE_CLOSE's existence cannot be assumed.  See
78985         <http://lists.gnu.org/r/bug-gnulib/2011-07/msg00392.html>.
78986         I reproduced the problem with "./gnulib-tool --test close sys_socket".
78988 2011-07-24  Jim Meyering  <meyering@redhat.com>
78990         test-select.h: avoid warning when using gcc's -Wmissing-declarations
78991         * tests/test-select.h (test_function): Declare as "static".
78993 2011-07-24  Bruno Haible  <bruno@clisp.org>
78995         doc: Mention the effects of AC_SYS_LARGEFILE.
78996         * doc/posix-functions/aio_cancel.texi: Mention the effects of AC_SYS_LARGEFILE
78997         on this function.
78998         * doc/posix-functions/aio_error.texi: Likewise.
78999         * doc/posix-functions/aio_fsync.texi: Likewise.
79000         * doc/posix-functions/aio_read.texi: Likewise.
79001         * doc/posix-functions/aio_return.texi: Likewise.
79002         * doc/posix-functions/aio_suspend.texi: Likewise.
79003         * doc/posix-functions/aio_write.texi: Likewise.
79004         * doc/posix-functions/fgetpos.texi: Likewise.
79005         * doc/posix-functions/fopen.texi: Likewise.
79006         * doc/posix-functions/freopen.texi: Likewise.
79007         * doc/posix-functions/fsetpos.texi: Likewise.
79008         * doc/posix-functions/fstatvfs.texi: Likewise.
79009         * doc/posix-functions/ftruncate.texi: Likewise.
79010         * doc/posix-functions/ftw.texi: Likewise.
79011         * doc/posix-functions/getrlimit.texi: Likewise.
79012         * doc/posix-functions/glob.texi: Likewise.
79013         * doc/posix-functions/lio_listio.texi: Likewise.
79014         * doc/posix-functions/lockf.texi: Likewise.
79015         * doc/posix-functions/mkstemp.texi: Likewise.
79016         * doc/posix-functions/mmap.texi: Likewise.
79017         * doc/posix-functions/nftw.texi: Likewise.
79018         * doc/posix-functions/openat.texi: Likewise.
79019         * doc/posix-functions/opendir.texi: Likewise.
79020         * doc/posix-functions/posix_fadvise.texi: Likewise.
79021         * doc/posix-functions/posix_fallocate.texi: Likewise.
79022         * doc/posix-functions/pread.texi: Likewise.
79023         * doc/posix-functions/pwrite.texi: Likewise.
79024         * doc/posix-functions/readdir.texi: Likewise.
79025         * doc/posix-functions/readdir_r.texi: Likewise.
79026         * doc/posix-functions/rewinddir.texi: Likewise.
79027         * doc/posix-functions/scandir.texi: Likewise.
79028         * doc/posix-functions/seekdir.texi: Likewise.
79029         * doc/posix-functions/setrlimit.texi: Likewise.
79030         * doc/posix-functions/statvfs.texi: Likewise.
79031         * doc/posix-functions/telldir.texi: Likewise.
79032         * doc/posix-functions/tmpfile.texi: Likewise.
79033         * doc/posix-functions/truncate.texi: Likewise.
79034         * doc/glibc-functions/fallocate.texi: Likewise.
79035         * doc/glibc-functions/fstatfs.texi: Likewise.
79036         * doc/glibc-functions/fts_children.texi: Likewise.
79037         * doc/glibc-functions/fts_read.texi: Likewise.
79038         * doc/glibc-functions/getdirentries.texi: Likewise.
79039         * doc/glibc-functions/mkostemp.texi: Likewise.
79040         * doc/glibc-functions/mkostemps.texi: Likewise.
79041         * doc/glibc-functions/mkstemps.texi: Likewise.
79042         * doc/glibc-functions/preadv.texi: Likewise.
79043         * doc/glibc-functions/pwritev.texi: Likewise.
79044         * doc/glibc-functions/sendfile.texi: Likewise.
79045         * doc/glibc-functions/statfs.texi: Likewise.
79047 2011-07-24  Bruno Haible  <bruno@clisp.org>
79049         doc: Fix typo.
79050         * doc/posix-functions/fstat.texi: Talk about fstat, not stat.
79052 2011-07-24  Bruno Haible  <bruno@clisp.org>
79054         doc: Mention fsusage.
79055         * doc/posix-functions/statvfs.texi: Mention the fsusage module.
79057 2011-07-24  Bruno Haible  <bruno@clisp.org>
79059         doc: Mention new glibc headers and functions.
79060         * doc/glibc-headers/gshadow.texi: New file.
79061         * doc/glibc-functions/endsgent.texi: New file.
79062         * doc/glibc-functions/fgetsgent.texi: New file.
79063         * doc/glibc-functions/fgetsgent_r.texi: New file.
79064         * doc/glibc-functions/getsgent.texi: New file.
79065         * doc/glibc-functions/getsgent_r.texi: New file.
79066         * doc/glibc-functions/getsgnam.texi: New file.
79067         * doc/glibc-functions/getsgnam_r.texi: New file.
79068         * doc/glibc-functions/putsgent.texi: New file.
79069         * doc/glibc-functions/setsgent.texi: New file.
79070         * doc/glibc-functions/sgetsgent.texi: New file.
79071         * doc/glibc-functions/sgetsgent_r.texi: New file.
79072         * doc/glibc-functions/malloc_info.texi: New file.
79073         * doc/glibc-functions/preadv.texi: New file.
79074         * doc/glibc-functions/pwritev.texi: New file.
79075         * doc/glibc-functions/register_printf_modifier.texi: New file.
79076         * doc/glibc-functions/register_printf_specifier.texi: New file.
79077         * doc/glibc-functions/register_printf_type.texi: New file.
79078         * doc/glibc-functions/pthread_attr_getaffinity_np.texi: New file.
79079         * doc/glibc-functions/pthread_attr_setaffinity_np.texi: New file.
79080         * doc/glibc-functions/pthread_getaffinity_np.texi: New file.
79081         * doc/glibc-functions/pthread_getname_np.texi: New file.
79082         * doc/glibc-functions/pthread_mutex_consistent_np.texi: New file.
79083         * doc/glibc-functions/pthread_mutexattr_getrobust_np.texi: New file.
79084         * doc/glibc-functions/pthread_mutexattr_setrobust_np.texi: New file.
79085         * doc/glibc-functions/pthread_setaffinity_np.texi: New file.
79086         * doc/glibc-functions/pthread_setname_np.texi: New file.
79087         * doc/glibc-functions/pthread_sigqueue.texi: New file.
79088         * doc/glibc-functions/pthread_timedjoin_np.texi: New file.
79089         * doc/glibc-functions/pthread_tryjoin_np.texi: New file.
79090         * doc/glibc-functions/qsort_r.texi: New file.
79091         * doc/glibc-functions/quick_exit.texi: New file.
79092         * doc/glibc-functions/syncfs.texi: New file.
79093         * doc/gnulib.texi: Include them.
79094         (Glibc gshadow.h, Glibc sys/uio.h): New sections.
79095         * doc/posix-functions/psiginfo.texi: Fix info about glibc version.
79096         * doc/posix-functions/pthread_mutex_consistent.texi: Likewise.
79097         * doc/posix-functions/pthread_mutexattr_getrobust.texi: Likewise.
79098         * doc/posix-functions/pthread_mutexattr_setrobust.texi: Likewise.
79099         * doc/glibc-functions/execvpe.texi: Likewise.
79101 2011-07-24  Paul Eggert  <eggert@cs.ucla.edu>
79103         ftell: don't include <unistd.h>
79104         * lib/ftell.c: Don't include <unistd.h>.  <stdio.h> is now
79105         guaranteed to define off_t, and the ftell module depends on the
79106         stdio module.
79108         ftell: do not assume wraparound signed arithmetic
79109         * lib/ftell.c: Include <limits.h>.
79110         (ftell): Don't assume wraparound signed arithmetic.
79112 2011-07-24  Bruno Haible  <bruno@clisp.org>
79114         close: No longer depend on module 'fclose'.
79115         * modules/close (Depends-on): Remove fclose.
79116         * NEWS: Mention the change.
79117         Suggested by Sam Steingold <sds@gnu.org>.
79119 2011-07-24  Bruno Haible  <bruno@clisp.org>
79121         fsusage: Enable large volume support on AIX >= 5.2.
79122         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): If 'struct statvfs64' has a
79123         larger f_blocks field than 'struct statvfs', define STAT_STATVFS64
79124         instead of STAT_STATVFS.
79125         * lib/fsusage.c (get_fs_usage) [STAT_STATVFS64]: Use statvfs64.
79127         fsusage: Restore previous behaviour on AIX, Cygwin, Interix.
79128         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Enforce a 64-bit struct statvfs
79129         f_blocks field only on MacOS X.
79131         fsusage: Support large volumes on glibc/Hurd, HP-UX, Solaris, MacOS X.
79132         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Require AC_SYS_LARGEFILE.
79133         * modules/fsusage (Depends-on): Add largefile.
79135 2011-07-24  Paul Eggert  <eggert@cs.ucla.edu>
79137         * README: Modernize discussion of signed integers.
79138         Assuming overflow wraparound is no longer safe.
79139         Mention ones' complement and signed magnitude.
79141 2011-07-22  Bruno Haible  <bruno@clisp.org>
79143         select tests, pselect tests: Refactor.
79144         * tests/test-select.h: New file, extracted from tests/test-select.c.
79145         (select_fn): New type.
79146         (test, do_select, do_select_nowait, do_select_wait, test_tty,
79147         test_connect_first, test_accept_first, test_pair, test_socket_pair,
79148         test_pipe): Add my_select argument.
79149         (test_function): Renamed from main. Add my_select argument.
79150         * tests/test-select.c: Move most code to tests/test-select.h. Include
79151         test-select.h.
79152         * modules/select-tests (Files): Add tests/test-select.h.
79153         * tests/test-pselect.c: Include test-select.h instead of test-select.c.
79154         (my_select, main): New functions.
79155         * modules/pselect-tests (Files): Add tests/test-select.h,
79156         tests/macros.h, tests/signature.h.
79157         (Depends-on): Remove select-tests. Add dependencies of test-select.h.
79158         (configure.ac): Check for <sys/wait.h>.
79160 2011-07-22  Bruno Haible  <bruno@clisp.org>
79162         sys_select tests: Check the signature of FD_*.
79163         * tests/test-select.c (FD_CLR, FD_ISSET, FD_SET, FD_ZERO): Move
79164         signature tests from here...
79165         * tests/test-sys_select.c (FD_CLR, FD_ISSET, FD_SET, FD_ZERO): ... to
79166         here.
79167         * modules/sys_select-tests (Files): Add tests/signature.h.
79169 2011-07-22  Paul Eggert  <eggert@cs.ucla.edu>
79171         largefile: new module, replacing large-inode
79172         Pádraig Brady suggested this in <http://debbugs.gnu.org/9140#20>.
79173         * MODULES.html.sh: Add largefile, remove large-inode.
79174         * modules/largefile, m4/largefile.m4: New files.
79175         * modules/large-inode, m4/large-inode.m4: Remove.
79177         fsusage: port to MacOS X 10.7 with 4 TiB file systems
79178         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Reject statvfs
79179         implementations that use only 32 bits to count blocks.
79180         On typical hosts with 1024-byte blocks, this fails with file
79181         systems as small as 4 TiB.  Problem reported by Herb Wartens
79182         <http://debbugs.gnu.org/9140> and this should also fix a similar
79183         problem reported by Tim Spriggs <http://debbugs.gnu.org/7355>.
79185         large-inode: New module
79186         * MODULES.html.sh: Add it.
79187         * modules/large-inode, m4/large-inode.m4: New files.
79189         extensions: Enable extensions on MacOS X 10.5 and later.
79190         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Define _DARWIN_C_SOURCE.
79192 2011-07-22  Kamil Dudka  <kdudka@redhat.com>
79194         file-has-acl: use acl_extended_file_nofollow if available
79195         * lib/acl-internal.h (HAVE_ACL_EXTENDED_FILE): New macro.
79196         (acl_extended_file): New macro.
79197         * lib/file-has-acl.c (file_has_acl): Use acl_extended_file_nofollow.
79198         * m4/acl.m4 (gl_FUNC_ACL): Check for acl_extended_file_nofollow.
79200 2011-07-21  Bruno Haible  <bruno@clisp.org>
79202         Declare system functions in a way that works with C++.
79203         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR) [C++]: In the test program,
79204         declare fdopendir as extern "C".
79205         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS) [C++]: In the test program,
79206         declare frexpl as extern "C".
79207         * m4/getaddrinfo.m4 (gl_GETADDRINFO) [C++]: In the test program,
79208         declare gai_strerror as extern "C".
79209         * m4/getdomainname.m4 (gl_FUNC_GETDOMAINNAME) [C++]: In the test
79210         programs, declare gai_strerror as extern "C".
79211         * m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R) [C++]: In the test program,
79212         declare getlogin_r as extern "C".
79213         * m4/ioctl.m4 (gl_FUNC_IOCTL) [C++]: In the test program, declare ioctl
79214         as extern "C".
79215         * m4/ldexpl.m4 (gl_FUNC_LDEXPL_WORKS) [C++]: In the test program,
79216         declare ldexpl as extern "C".
79217         * m4/logb.m4 (gl_FUNC_LOGB) [C++]: In the test programs, declare logb
79218         as extern "C".
79219         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS) [C++]: In the test
79220         program, declare getmntinfo as extern "C".
79221         * m4/stpncpy.m4 (gl_FUNC_STPNCPY) [C++]: In the test program, declare
79222         stpncpy as extern "C".
79223         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R_WORKS) [C++]: In the test
79224         program, declare __xpg_strerror_r as extern "C".
79225         * m4/strndup.m4 (gl_FUNC_STRNDUP) [C++]: In the test program, declare
79226         strndup as extern "C".
79227         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT) [C++]: In the test program,
79228         declare memset and bzero as extern "C".
79229         Reported by Sam Steingold <sds@gnu.org>.
79231 2011-07-12  Jim Meyering  <meyering@redhat.com>
79233         maint.mk: prohibit inclusion of "verify.h" without use
79234         * top/maint.mk (sc_prohibit_verify_without_use): New rule.
79236 2011-07-19  Pádraig Brady  <P@draigBrady.com>
79238         timer-time: A new module to check for timer_settime()
79239         * m4/timer_time.m4: Check for the posix function.
79240         * modules/timer-time: Add the new module.
79241         * MODULES.html.sh (Compat checks for POSIX:2008 functions):
79242         Mention it.
79244 2011-07-19  Paul Eggert  <eggert@cs.ucla.edu>
79245             Bruno Haible  <bruno@clisp.org>
79247         pthread_sigmask: assume POSIX threads if --avoid=threadlib
79248         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): If gl_THREADLIB is
79249         not defined, assume POSIX threads and look for pthread_sigmask in
79250         $LIBS, without changing $CPPFLAGS.
79252 2011-07-19  Bruno Haible  <bruno@clisp.org>
79254         strstr: Update cross-compilation guess.
79255         * m4/strstr.m4 (gl_FUNC_STRSTR): On glibc > 2.12 with x86 or x86_64
79256         CPUs, guess no, in view of glibc
79257         BZ #12100 <http://sourceware.org/bugzilla/show_bug.cgi?id=12100>.
79258         Suggested by Eric Blake. Reported by Reuben Thomas.
79260 2011-07-19  Pádraig Brady  <P@draigBrady.com>
79262         getopt-gnu: suppress core dumps from detection code
79263         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Use the nocrash module
79264         to suppress core dumps that may well occur on glibc systems.
79265         * modules/getopt-gnu: Depend on nocrash.
79267 2011-07-16  Paul Eggert  <eggert@cs.ucla.edu>
79269         pthread_sigmask: ensure usleep is declared
79270         * lib/pthread_sigmask.c [PTHREAD_SIGMASK_UNBLOCK_BUG]:
79271         Include <unistd.h>, to declare usleep.  Needed on Solaris 8,
79273 2011-07-15  Paul Eggert  <eggert@cs.ucla.edu>
79275         doc: Document NonStop portability issues.
79276         * doc/posix-functions/sigaction.texi (sigaction):
79277         * doc/posix-headers/signal.texi (signal.h):
79278         Document NonStop.  See Joachim Schmitz in
79279         http://lists.gnu.org/r/bug-coreutils/2011-07/msg00062.html
79281 2011-07-15  Bruno Haible  <bruno@clisp.org>
79283         ffsl, ffsll: Avoid unportable behaviour.
79284         * lib/ffsl.h (FUNC): Use 'unsigned int' instead of 'int'.
79286 2011-07-15  Bruno Haible  <bruno@clisp.org>
79288         ffs: More tests.
79289         * tests/test-ffs.c (NBITS): New macro.
79290         (main): Add more tests.
79291         * tests/test-ffsl.c (NBITS): New macro.
79292         (main): Add more tests.
79293         * tests/test-ffsll.c (NBITS): New macro.
79294         (main): Add more tests.
79296 2011-07-15  Eric Blake  <eblake@redhat.com>
79298         ffsl, ffsll: new modules
79299         * modules/ffsl: New file.
79300         * modules/ffsll: Likewise.
79301         * m4/ffsl.m4: Likewise.
79302         * m4/ffsll.m4: Likewise.
79303         * lib/ffsl.c: Likewise.
79304         * lib/ffsl.h: Likewise.
79305         * lib/ffsll.c: Likewise.
79306         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY)
79307         (gl_HEADER_STRING_H_DEFAULTS): Add defaults.
79308         * modules/string (Makefile.am): Substitute witnesses.
79309         * lib/strings.in.h (ffsl, ffsll): Declare.
79310         * modules/ffsl-tests: New test file.
79311         * modules/ffsll-tests: Likewise.
79312         * tests/test-ffsl.c: Likewise.
79313         * tests/test-ffsll.c: Likewise.
79314         * MODULES.html.sh (Integer arithmetic functions): Mention it.
79315         * doc/glibc-functions/ffsl.texi (ffsl): Likewise.
79316         * doc/glibc-functions/ffsll.texi (ffsll): Likewise.
79318         ffs: fix m4 prerequisite
79319         * m4/ffs.m4 (gl_FUNC_FFS): Require strings.h defaults.
79321         ffs: avoid undefined behavior
79322         * lib/ffs.c (ffs): Provide fallback for non-32-bit int.
79323         * tests/test-ffs.c (naive, main): Avoid signed shifts.
79324         Reported by Bruno Haible.
79326 2011-07-12  Bruno Haible  <bruno@clisp.org>
79328         pthread_sigmask: Rely on module 'threadlib'.
79329         * modules/pthread_sigmask (Depends-on): Add threadlib.
79330         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Assume gl_THREADLIB
79331         is defined.
79333 2011-07-12  Bruno Haible  <bruno@clisp.org>
79335         regex: Depend on module 'strcase'.
79336         * modules/regex (Depends-on): Add strcase, for strcasecmp().
79338 2011-07-12  Jim Meyering  <meyering@redhat.com>
79340         warn-on-use: fix typo in file name
79341         * modules/snippet/warn-on-use (Files): Correct file name:
79342         include /snippet/ component in "build-aux/snippet/warn-on-use.h".
79344 2011-07-12  Bruno Haible  <bruno@clisp.org>
79346         strings: Document module.
79347         * doc/posix-headers/strings.texi: Mention module 'strings'.
79349 2011-07-12  Bruno Haible  <bruno@clisp.org>
79351         Rename module '_Noreturn' to 'snippet/_Noreturn'.
79352         * modules/snippet/_Noreturn: Renamed from modules/_Noreturn.
79353         (Files, Makefile.am): Update.
79354         * build-aux/snippet/_Noreturn.h: Renamed from build-aux/_Noreturn.h.
79355         * modules/stdlib (Depends-on): Update.
79357 2011-07-12  Bruno Haible  <bruno@clisp.org>
79359         * NEWS: Mention the changes.
79361         Rename module 'warn-on-use' to 'snippet/warn-on-use'.
79362         * modules/snippet/warn-on-use: Renamed from modules/warn-on-use.
79363         (Files, Makefile.am): Update.
79364         * build-aux/snippet/warn-on-use.h: Renamed from build-aux/warn-on-use.h.
79365         * modules/arpa_inet (Depends-on): Update.
79366         * modules/ctype (Depends-on): Update.
79367         * modules/dirent (Depends-on): Update.
79368         * modules/fcntl-h (Depends-on): Update.
79369         * modules/glob (Depends-on): Update.
79370         * modules/iconv-h (Depends-on): Update.
79371         * modules/inttypes-incomplete (Depends-on): Update.
79372         * modules/langinfo (Depends-on): Update.
79373         * modules/locale (Depends-on): Update.
79374         * modules/math (Depends-on): Update.
79375         * modules/netdb (Depends-on): Update.
79376         * modules/poll-h (Depends-on): Update.
79377         * modules/pty (Depends-on): Update.
79378         * modules/search (Depends-on): Update.
79379         * modules/signal (Depends-on): Update.
79380         * modules/spawn (Depends-on): Update.
79381         * modules/stdio (Depends-on): Update.
79382         * modules/stdlib (Depends-on): Update.
79383         * modules/string (Depends-on): Update.
79384         * modules/strings (Depends-on): Update.
79385         * modules/sys_file (Depends-on): Update.
79386         * modules/sys_ioctl (Depends-on): Update.
79387         * modules/sys_select (Depends-on): Update.
79388         * modules/sys_socket (Depends-on): Update.
79389         * modules/sys_stat (Depends-on): Update.
79390         * modules/sys_time (Depends-on): Update.
79391         * modules/sys_times (Depends-on): Update.
79392         * modules/sys_utsname (Depends-on): Update.
79393         * modules/sys_wait (Depends-on): Update.
79394         * modules/termios (Depends-on): Update.
79395         * modules/time (Depends-on): Update.
79396         * modules/unistd (Depends-on): Update.
79397         * modules/wchar (Depends-on): Update.
79398         * modules/wctype-h (Depends-on): Update.
79399         * MODULES.html.sh (Support for building libraries and executables):
79400         Update.
79402         Rename module 'unused-parameter' to 'snippet/unused-parameter'.
79403         * modules/snippet/unused-parameter: Renamed from
79404         modules/unused-parameter.
79405         (Files, Makefile.am): Update.
79406         * build-aux/snippet/unused-parameter.h: Renamed from
79407         build-aux/unused-parameter.h.
79408         * modules/selinux-h (Depends-on): Update.
79409         * modules/unistr/base (Depends-on): Update.
79410         * MODULES.html.sh (Core language properties): Update.
79412         Rename module 'link-warning' to 'snippet/link-warning'.
79413         * modules/snippet/link-warning: Renamed from modules/link-warning.
79414         (Files, Makefile.am): Update.
79415         * build-aux/snippet/link-warning.h: Renamed from
79416         build-aux/link-warning.h.
79417         * MODULES.html.sh (Support for building libraries and executables):
79418         Update.
79420         Rename module 'c++defs' to 'snippet/c++defs'.
79421         * modules/snippet/c++defs: Renamed from modules/c++defs.
79422         (Files, Makefile.am): Update.
79423         * build-aux/snippet/c++defs.h: Renamed from build-aux/c++defs.h.
79424         * modules/arpa_inet (Depends-on): Update.
79425         * modules/ctype (Depends-on): Update.
79426         * modules/dirent (Depends-on): Update.
79427         * modules/fcntl-h (Depends-on): Update.
79428         * modules/glob (Depends-on): Update.
79429         * modules/iconv-h (Depends-on): Update.
79430         * modules/langinfo (Depends-on): Update.
79431         * modules/locale (Depends-on): Update.
79432         * modules/math (Depends-on): Update.
79433         * modules/netdb (Depends-on): Update.
79434         * modules/poll-h (Depends-on): Update.
79435         * modules/pty (Depends-on): Update.
79436         * modules/search (Depends-on): Update.
79437         * modules/signal (Depends-on): Update.
79438         * modules/spawn (Depends-on): Update.
79439         * modules/stdio (Depends-on): Update.
79440         * modules/stdlib (Depends-on): Update.
79441         * modules/string (Depends-on): Update.
79442         * modules/strings (Depends-on): Update.
79443         * modules/sys_ioctl (Depends-on): Update.
79444         * modules/sys_select (Depends-on): Update.
79445         * modules/sys_socket (Depends-on): Update.
79446         * modules/sys_stat (Depends-on): Update.
79447         * modules/sys_time (Depends-on): Update.
79448         * modules/sys_wait (Depends-on): Update.
79449         * modules/termios (Depends-on): Update.
79450         * modules/time (Depends-on): Update.
79451         * modules/unistd (Depends-on): Update.
79452         * modules/wchar (Depends-on): Update.
79453         * modules/wctype-h (Depends-on): Update.
79455         Rename module 'arg-nonnull' to 'snippet/arg-nonnull'.
79456         * modules/snippet/arg-nonnull: Renamed from modules/arg-nonnull.
79457         (Files, Makefile.am): Update.
79458         * build-aux/snippet/arg-nonnull.h: Renamed from build-aux/arg-nonnull.h.
79459         * modules/argv-iter (Depends-on): Update.
79460         * modules/arpa_inet (Depends-on): Update.
79461         * modules/dirent (Depends-on): Update.
79462         * modules/fcntl-h (Depends-on): Update.
79463         * modules/fnmatch (Depends-on): Update.
79464         * modules/getopt-posix (Depends-on): Update.
79465         * modules/glob (Depends-on): Update.
79466         * modules/iconv-h (Depends-on): Update.
79467         * modules/inttypes-incomplete (Depends-on): Update.
79468         * modules/locale (Depends-on): Update.
79469         * modules/math (Depends-on): Update.
79470         * modules/netdb (Depends-on): Update.
79471         * modules/search (Depends-on): Update.
79472         * modules/signal (Depends-on): Update.
79473         * modules/spawn (Depends-on): Update.
79474         * modules/stdio (Depends-on): Update.
79475         * modules/stdlib (Depends-on): Update.
79476         * modules/string (Depends-on): Update.
79477         * modules/strings (Depends-on): Update.
79478         * modules/sys_socket (Depends-on): Update.
79479         * modules/sys_stat (Depends-on): Update.
79480         * modules/sys_time (Depends-on): Update.
79481         * modules/sys_times (Depends-on): Update.
79482         * modules/sys_utsname (Depends-on): Update.
79483         * modules/time (Depends-on): Update.
79484         * modules/unistd (Depends-on): Update.
79485         * modules/wchar (Depends-on): Update.
79486         * MODULES.html.sh (Support for building libraries and executables):
79487         Update.
79489 2011-07-12  Paul Eggert  <eggert@cs.ucla.edu>
79491         Improvements on _Noreturn and related modules.
79493         modules/_Exit-tests: test _Noreturn too
79494         * tests/test-_Exit.c (MTA, Charlie): New functions, taken from the
79495         old tests/test-stdnoreturn.c.  This tests the _Noreturn keyword a bit.
79496         (main): Use them.
79498         stdnoreturn, stdnoreturn-tests: remove modules
79499         They're not needed here and a bit premature for use elsewhere.  See
79500         <http://lists.gnu.org/r/bug-gnulib/2011-07/msg00209.html>.
79501         * m4/stdnoreturn.m4, modules/stdnoreturn, modules/stdnoreturn-tests:
79502         * tests/test-stdnoreturn.c: Remove files.
79503         * MODULES.html.sh (_Noreturn <stdnoreturn.h>): Remove section.
79504         * lib/openat.h, lib/sigpipe-die.h, lib/xalloc.h, lib/xmemdup0.h:
79505         * lib/xstrtol.h: Use _Noreturn rather than including <stdnoreturn.h>
79506         and using noreturn.
79507         * modules/openat, modules/sigpipe-die, modules/xalloc:
79508         * modules/xmemdup0, modules/xstrtol:
79509         Remove dependency on stdnoreturn.
79511         _Noreturn: Ignore __STDC_VERSION__; observe _MSC_VER.
79512         * build-aux/_Noreturn.h (_Noreturn): Ignore __STDC_VERSION__.
79513         Reparenthesize to avoid GCC warning.
79514         Support Microsoft's syntax.
79515         * m4/gnulib-common.m4 (gl_COMMON_BODY): Likewise.
79517         _Noreturn-tests: remove module
79518         * modules/_Noreturn-tests: Remove.
79519         * modules/stdnoreturn-tests (Files): Remove tests/test-_Noreturn.c.
79520         * tests/test-_Noreturn.c: Remove.
79521         * tests/test-stdnoreturn.c: Merge from the old
79522         tests/test-_Noreturn.c, testing both noreturn and _Noreturn.
79524 2011-07-12  Paul Eggert  <eggert@cs.ucla.edu>
79526         _Noreturn, stdnoreturn, and related modules.
79528         * top/maint.mk: Adjust to new noreturn support.
79529         (gl_extract_significant_defines_): Omit pattern ATTRIBUTE_NORETURN.
79530         (def_sym_regex): Do not remove ATTRIBUTE_NORETURN.
79532         xalloc: use stdnoreturn.h
79533         * lib/xalloc.h: Include <stdnoreturn.h>.
79534         (_GL_ATTRIBUTE_NORETURN): Remove; all uses replaced with noreturn.
79535         * modules/xalloc (Depends-on): Add stdnoreturn.
79537         xstrtol: use stdnoreturn.h
79538         * lib/xstrtol.h: Include <stdnoreturn.h>.
79539         (_GL_ATTRIBUTE_NORETURN): Remove; all uses replaced with noreturn.
79540         * modules/xstrtol (Depends-on): Add stdnoreturn.
79542         xmemdup0: use stdnoreturn.h
79543         * lib/xmemdup0.h: Include <stdnoreturn.h>.
79544         (_GL_ATTRIBUTE_NORETURN): Remove; all uses replaced with noreturn.
79545         * modules/xmemdup0 (Depends-on): Add stdnoreturn.
79547         sigpipe-die: use stdnoreturn.h
79548         * lib/sigpipe-die.h: Include <stdnoreturn.h>.
79549         (_GL_ATTRIBUTE_NORETURN): Remove; all uses replaced with noreturn.
79550         * modules/sigpipe-die (Depends-on): Add stdnoreturn.
79552         openat: use stdnoreturn.h
79553         * lib/openat.h: Include <stdnoreturn.h>.
79554         (_GL_ATTRIBUTE_NORETURN): Remove; all uses replaced with noreturn.
79555         * modules/openat (Depends-on): Add stdnoreturn.
79557         * lib/openat-die.c (openat_save_fail): Modernize comment.
79559         * lib/xalloc-die.c (xalloc_die): Modernize comment.
79561         * lib/glthread/thread.h: Modernize comment.
79563         obstack: use _Noreturn
79564         * lib/obstack.c (__attribute__): Remove macro.
79565         (print_and_abort): Use _Noreturn.
79567         c-stack: use _Noreturn
79568         * lib/c-stack.c (die, overflow_handler, segv_handler):
79569         Use _Noreturn rather than __attribute__((noreturn)).
79571         argmatch-tests, exclude_tests: use _Noreturn
79572         * tests/test-argmatch.c, tests/test-exclude.c (_GL_ATTRIBUTE_NORETURN):
79573         Remove.
79574         (ARGMATCH_DIE_DECL): Use _Noreturn instead.
79576         stdlib: use _Noreturn
79577         * lib/stdlib.in.h (_GL_ATTRIBUTE_NORETURN): Remove.
79578         (_Exit): Use _Noreturn rather than _GL_ATTRIBUTE_NORETURN.
79579         * modules/stdlib (Depends-on): Add _Noreturn.
79580         (stdlib.h): Depend on $(_NORETURN_H), and copy it in.
79582         stdnoreturn-tests: new module
79583         * modules/stdnoreturn-tests, tests/test-stdnoreturn.c: New files.
79585         stdnoreturn: new module
79586         * MODULES.html.sh (Noreturn <stdnoreturn.h>): New section.
79587         * m4/stdnoreturn.m4, modules/stdnoreturn: New files.
79589         _Noreturn-tests: new module
79590         * modules/_Noreturn-tests, tests/test-_Noreturn.c: New files.
79592         _Noreturn: new module
79593         * MODULES.html.sh (Support for systems lacking draft ISO C 1X):
79594         New section, mentioning it.
79595         * build-aux/_Noreturn.h, modules/_Noreturn: New files.
79597         * m4/gnulib-common.m4 (gl_COMMON_BODY): Add _Noreturn.
79599 2011-07-11  Eric Blake  <eblake@redhat.com>
79601         ffs: new module
79602         * modules/ffs: New file.
79603         * m4/ffs.m4: Likewise.
79604         * lib/ffs.c: Likewise.
79605         * m4/strings_h.m4 (gl_HEADER_STRINGS_H_DEFAULTS): Add default.
79606         * modules/strings (Makefile.am): Substitute witness.
79607         (Depends-on): Add c++defs.
79608         * lib/strings.in.h (ffs): Declare.
79609         * modules/ffs-tests: New test file.
79610         * tests/test-ffs.c: Test new module.
79611         * MODULES.html.sh (Integer arithmetic functions): Mention it.
79612         * doc/posix-functions/ffs.texi (ffs): Likewise.
79614         regex: avoid compiler warning
79615         * lib/regex.c (includes): Include <strings.h>, for use of
79616         strcasecmp in regcomp.c.
79617         Reported by Joachim Schmitz.
79619 2011-07-09  Paul Eggert  <eggert@cs.ucla.edu>
79621         stdint: respect system's intmax_t if INTMAX_MAX
79622         * lib/stdint.in.h (intmax_t, uintmax_t): If the system defines
79623         INTMAX_MAX, assume its intmax_t is OK.  Similarly for and
79624         uintmax_t.  This is for some Mac OS X builds, where intmax_t is
79625         long but int64_t is long long, and where we will clash with the
79626         system intmax_t if we override it.  See
79627         <http://lists.gnu.org/r/bug-gnulib/2011-07/msg00160.html>.
79628         (INTMAX_C, UINTMAX_C): For consistency, respect the system's
79629         INTMAX_C if INTMAX_MAX and INTMAX_C are both defined, and
79630         similarly for UINTMAX_C.
79632 2011-07-08  Bruno Haible  <bruno@clisp.org>
79634         pthread_sigmask tests: Avoid a compiler warning.
79635         * tests/test-pthread_sigmask1.c (main): Complain if system() returns
79636         non-zero.
79638         sigprocmask tests: A better way to avoid a compiler warning.
79639         * tests/test-sigprocmask.c: Don't include "ignore-value.h".
79640         (main): Complain if system() returns non-zero.
79641         * modules/sigprocmask-tests (Depends-on): Remove ignore-value.
79643 2011-07-08  Bruno Haible  <bruno@clisp.org>
79645         pthread_sigmask: Work around IRIX bug.
79646         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Test for the IRIX
79647         bug.
79648         * lib/pthread_sigmask.c (pthread_sigmask): usleep for some time when
79649         there may be unblocked pending signals.
79650         * doc/posix-functions/pthread_sigmask.texi: Mention the IRIX bug.
79652 2011-07-08  Bruno Haible  <bruno@clisp.org>
79654         pthread_sigmask: Work around Cygwin bug.
79655         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Test for the Cygwin
79656         bug.
79657         * lib/pthread_sigmask.c (pthread_sigmask): Fix the return value from
79658         the system's pthread_sigmask function.
79659         * doc/posix-functions/pthread_sigmask.texi: Mention the Cygwin bug.
79661 2011-07-08  Bruno Haible  <bruno@clisp.org>
79663         pthread_sigmask: Work around bug in single-threaded implementation.
79664         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Test for the
79665         FreeBSD, HP-UX, Solaris bug.
79666         (gl_PREREQ_PTHREAD_SIGMASK): New macro.
79667         * lib/pthread_sigmask.c: Include <stddef.h>.
79668         (pthread_sigmask): If HAVE_PTHREAD_SIGMASK, define as a wrapper around
79669         the system's pthread_sigmask function.
79670         * modules/pthread_sigmask (configure.ac): Invoke
79671         gl_PREREQ_PTHREAD_SIGMASK.
79672         * doc/posix-functions/pthread_sigmask.texi: Mention bug on FreeBSD,
79673         HP-UX, Solaris.
79675 2011-07-08  Eric Blake  <eblake@redhat.com>
79677         test-sigprocmask: avoid compiler warning
79678         * modules/sigprocmask-tests (Depends-on): Add ignore-value.
79679         * tests/test-sigprocmask.c (main): Use it to silence warning.
79680         Reported by Jim Meyering.
79682         test-snprintf: avoid compiler warning
79683         * tests/test-snprintf.c (main): Avoid shadowed declaration.
79684         * tests/test-vsnprintf.c (main): Likewise.
79685         Reported by Jim Meyering.
79687 2011-07-08  Bruno Haible  <bruno@clisp.org>
79689         Tests for module 'pthread_sigmask'.
79690         * modules/pthread_sigmask-tests: New file.
79691         * tests/test-pthread_sigmask1.c: New file, based on
79692         tests/test-sigprocmask.c.
79693         * tests/test-pthread_sigmask2.c: New file.
79695 2011-07-08  Jim Meyering  <meyering@redhat.com>
79697         test-getopt.h: avoid warning about an unused variable
79698         * tests/test-getopt.h (test_getopt): Remove unused variable, "c".
79700 2011-07-07  Jim Meyering  <meyering@redhat.com>
79702         maint: reduce list of files exempt from sc_prohibit_leading_TABs
79703         * Makefile (sc_prohibit_leading_TABs): Don't exempt m4/po.m4,
79704         now that it no longer contains leading TABs.
79705         Remove unused "url=FIXME" statement.
79707 2011-07-08  Paul Eggert  <eggert@cs.ucla.edu>
79709         pthread_sigmask: Assume POSIX when not gl_THREADLIB.
79710         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK):
79711         When gl_THREADLIB is not in use, assume that the POSIX sematics
79712         are desired.  This is better for Emacs, which uses POSIX semantics
79713         on GNUish and/or POSIXish platforms, and does not use threads at
79714         all otherwise.
79716         pthread_sigmask: fix typo when testing for libraries
79717         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK):
79718         AC_LINK_IFELSE, not AC_COMPILE_IFELSE.
79720 2011-07-08  Eric Blake  <eblake@redhat.com>
79722         fts: introduce FTS_NOATIME
79723         * lib/fts_.h (FTS_NOATIME): New bit flag.
79724         (FTS_OPTIONMASK): Adjust.
79725         * lib/fts.c (diropen, fts_open, fts_build): Honor it.
79726         (fd_ring_check): Debug code unconditionally uses O_NOATIME.
79728 2011-07-08  Bruno Haible  <bruno@clisp.org>
79730         Tests for module 'thread'.
79731         * modules/thread-tests: New file.
79732         * tests/test-thread_self.c: New file.
79733         * tests/test-thread_create.cc: New file.
79735 2011-07-08  Bruno Haible  <bruno@clisp.org>
79737         thread: Avoid gcc warnings when using gl_thread_self().
79738         * lib/glthread/thread.h (gl_thread_self): Return a pthread_t, not a
79739         'void *'.
79740         (gl_thread_self_pointer): Update.
79742 2011-07-07  Bruno Haible  <bruno@clisp.org>
79744         signal-c++-tests: Check declaration of pthread_sigmask.
79745         * tests/test-signal-c++.cc: Check declaration of pthread_sigmask.
79746         * modules/signal-c++-tests (Makefile.am): Link test-signal-c++ against
79747         $(LIB_PTHREAD_SIGMASK).
79749 2011-07-07  Bruno Haible  <bruno@clisp.org>
79751         pthread_sigmask: Fix link requirements on OSF/1 5.1 and with pth.
79752         * lib/signal.in.h (pthread_sigmask): Override if
79753         REPLACE_PTHREAD_SIGMASK is 1.
79754         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Initialize
79755         REPLACE_PTHREAD_SIGMASK.
79756         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Set also
79757         REPLACE_PTHREAD_SIGMASK. Set and substitute LIB_PTHREAD_SIGMASK.
79758         * modules/signal (Makefile.am): Substitute REPLACE_PTHREAD_SIGMASK.
79759         * modules/pthread_sigmask (Depends-on, configure.ac): Update condition.
79760         (Link): Set to $(LIB_PTHREAD_SIGMASK), not $(LIBMULTITHREAD).
79762 2011-07-07  Bruno Haible  <bruno@clisp.org>
79764         pthread_sigmask: Ensure declaration in <signal.h>.
79765         * lib/signal.in.h: On MacOS X, FreeBSD, OpenBSD, OSF/1, Solaris 2.6,
79766         include <pthread.h>.
79767         * doc/posix-functions/pthread_sigmask.texi: Mention the header file
79768         problem.
79770 2011-07-07  Bruno Haible  <bruno@clisp.org>
79772         pthread_sigmask: Document the module.
79773         * doc/posix-functions/pthread_sigmask.texi: Mention the new module.
79775 2011-07-07  Bruno Haible  <bruno@clisp.org>
79777         pthread_sigmask: Follow gnulib conventions.
79778         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Renamed from
79779         gl_PTHREAD_SIGMASK.
79780         * modules/pthread_sigmask (configure.ac): Update.
79782 2011-07-07  Bruno Haible  <bruno@clisp.org>
79784         pthread_sigmask: Make declaration C++ safe.
79785         * lib/signal.in.h: In two special conditions, just do an #include_next.
79786         (pthread_sigmask): Test HAVE_PTHREAD_SIGMASK, not REPLACE_PTHREAD_MASK.
79787         Invoke _GL_CXXALIAS_SYS and _GL_CXXALIASWARN.
79788         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Initialize
79789         HAVE_PTHREAD_SIGMASK, not REPLACE_PTHREAD_MASK.
79790         * m4/pthread_sigmask.m4 (gl_PTHREAD_SIGMASK): Set HAVE_PTHREAD_SIGMASK,
79791         not REPLACE_PTHREAD_MASK.
79792         * modules/signal (Makefile.am): Substitute HAVE_PTHREAD_SIGMASK,
79793         not REPLACE_PTHREAD_MASK.
79794         * modules/pthread_sigmask (Depends-on, configure.ac): Update condition.
79796 2011-07-07  Bruno Haible  <bruno@clisp.org>
79798         pthread_sigmask: Fix return value.
79799         * lib/signal.in.h (pthread_sigmask): Declare. Don't define as a macro.
79800         * lib/pthread_sigmask.c: New file.
79801         * modules/pthread_sigmask (Files): Add it.
79802         (configure.ac): Invoke AC_LIBOBJ.
79804 2011-07-07  Eric Blake  <eblake@redhat.com>
79806         getopt: more portable argv creation
79807         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADRS): Rather than casting away
79808         const, use char arrays rather than strings.
79809         Suggested by Paul Eggert.
79811 2011-07-07  Bruno Haible  <bruno@clisp.org>
79813         Tests for module 'sigprocmask'.
79814         * modules/sigprocmask-tests: New file.
79815         * tests/test-sigprocmask.c: New file.
79817 2011-07-07  Bruno Haible  <bruno@clisp.org>
79819         float tests: Tweak.
79820         * tests/test-float.c (main): Tweak skip message.
79822 2011-07-07  Eric Blake  <eblake@redhat.com>
79824         getopt: avoid compiler warning during configure
79825         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADRS): Avoid problems with
79826         assigning string literals to non-const pointer.
79828         getopt-gnu: avoid crash in glibc getopt
79829         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADRS): Detect the problem.
79830         * tests/test-getopt.h (test_getopt): Enhance test.
79831         * tests/test-getopt_long.h (test_getopt_long): Likewise.
79832         * doc/posix-functions/getopt.texi (getopt): Document it.
79833         * doc/glibc-functions/getopt_long.texi (getopt_long): Likewise.
79834         * doc/glibc-functions/getopt_long_only.texi (getopt_long_only):
79835         Likewise.
79837 2011-07-07  Ulrich Drepper  <drepper@gmail.com>
79839         getopt: handle W; without long options in getopt [BZ #12922]
79840         * lib/getopt.c (_getopt_internal_r): When "W;" is in short options
79841         but no long options are defined, just return 'W'.
79843 2011-07-07  Bruno Haible  <bruno@clisp.org>
79845         Avoid literal tabs.
79846         * m4/po,m4 (AM_PO_SUBDIRS, AM_POSTPROCESS_PO_MAKEFILE): Use a shell
79847         variable containing a tab instead of a literal tab.
79848         Reported by Jim Meyering.
79850 2011-07-07  Bruno Haible  <bruno@clisp.org>
79852         Comments.
79853         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Update comments about mingw.
79855 2011-07-06  Bruno Haible  <bruno@clisp.org>
79857         sys_select: Fix compilation error on mingw, introduced on 2011-06-30.
79858         * lib/sys_select.in.h: Don't include <sys/socket.h>. Instead, include
79859         <winsock2.h>.
79860         (rpl_fd_isset, FD_ISSET): New definitions, copied from
79861         lib/sys_socket.in.h.
79862         (close, gethostname): Hide declarations from <winsock2.h>.
79863         (socket, connect, accept, bind, getpeername, getsockname, getsockopt,
79864         listen, recv, send, recvfrom, sendto, setsockopt, shutdown): Likewise.
79865         * lib/sys_socket.in.h (close, gethostname): Tweak indentation.
79866         (select): Don't override if gnulib's <sys/select.h> was already
79867         included.
79868         * lib/unistd.in.h (socket, connect, accept, bind, getpeername,
79869         getsockname, getsockopt, listen, recv, send, recvfrom, sendto,
79870         setsockopt, shutdown, select): Tweak indentation.
79872 2011-07-06  Paul Eggert  <eggert@cs.ucla.edu>
79874         * modules/pthread_sigmask (configure.ac): gl_SIGNAL_MODULE_INDICATOR
79875         and not gl_SYS_SELECT_MODULE_INDICATOR, fixing a typo exposed
79876         in an application that does not use the sys_select module.
79878 2011-07-06  Erik Faye-Lund  <kusmabite@gmail.com>
79880         poll: do not return 0 on timeout=-1
79881         * lib/poll.c: Loop with yield if no events occurred.
79883 2011-07-06  Eric Blake  <eblake@redhat.com>
79885         pthread_sigmask: always replace when not using pthread
79886         * m4/pthread_sigmask.m4 (gl_PTHREAD_SIGMASK): Force sigprocmask
79887         replacement when using some threading other than pthread.  Fix
79888         logic bug.
79890 2011-07-06  Bruno Haible  <bruno@clisp.org>
79892         Comments.
79893         * m4/printf.m4: Update comments about mingw.
79895 2011-07-06  Paul Eggert  <eggert@cs.ucla.edu>
79897         sys_select: define sigset_t more portably
79898         * lib/sys_select.in.h: Always include <sys/types.h>, since
79899         we now need sigset_t and mingw defines it there.
79900         Include <signal.h> before split inclusion guard, to avoid
79901         mishaps on Solaris, whose <signal.h> eventually includes us.
79902         * m4/signal_h.m4 (gl_SIGNAL_H): Require gl_CHECK_TYPE_SIGSET_T.
79903         (gl_CHECK_TYPE_SIGSET_T): New macro, most of the contents of
79904         which come from ...
79905         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Require
79906         gl_CHECK_TYPE_SIGSET_T.
79907         (gl_PREREQ_SIGPROCMASK): Now a no-op, since gl_CHECK_TYPE_SIGSET_T
79908         does the real work.
79909         * modules/sys_select (Depends-on): Add 'signal'.
79911         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Poison pselect.
79912         Suggested by Bruno Haible.
79914         pselect: Use pthread_sigmask, not sigprocmask.
79915         * lib/pselect.c (pselect): Use pthread_sigmask, as it supports
79916         multithreaded apps better than sigprocmask does.
79917         * modules/pselect (Depends-on): Depend on pthread_sigmask, not
79918         sigprocmask directly.
79920 2011-07-05  Paul Eggert  <eggert@cs.ucla.edu>
79922         * lib/pselect.c (pselect): Use plain name, without "rpl_".
79923         Don't #undef,  since we don't need any underlying pselect.
79924         * modules/pselect (configure.ac): Use our pselect.o if !HAVE_PSELECT.
79925         (Depends-on): Add select.
79926         (Link): Add $(LIBSOCKET).
79927         These changes suggested by Bruno Haible.
79929         pselect: document better
79930         * MODULES.html.sh (Support for systems lacking POSIX:2008): Add it.
79931         * doc/posix-functions/pselect.texi (pselect): Document new module.
79933         pthread_sigmask: new module
79934         * MODULES.html.sh (Support for systems lacking POSIX:2008): Add it.
79935         * doc/posix-functions/pthread_sigmask.texi: Document new module.
79936         * lib/signal.in.h (pthread_sigmask): Arrange for replacement.
79937         This is done only as a macro; I don't know how well that'll
79938         work for C++.  Move <sys/types.h> include before the include_next,
79939         to avoid mishap on Solaris.
79940         * m4/signal_h.m4 (gl_SIGNAL_H, gl_SIGNAL_H_DEFAULTS): Check for it.
79941         * modules/signal (Makefile.am): Substitute the check's results.
79942         * modules/pthread_sigmask, m4/pthread_sigmask.m4: New files.
79944         test-pselect: new module
79945         * modules/pselect-tests, tests/test-pselect.c: New files.
79946         * tests/test-select.c, tests/test-sys_select-c++.cc:
79947         If TEST_PSELECT is defined, test pselect instead of testing select.
79949         * tests/test-sys_select.c (sigset_t): Test for it, too.
79950         Suggested by Bruno Haible.
79952 2011-07-05  Eric Blake  <eblake@redhat.com>
79954         snprintf: guarantee %1$d, for libintl
79955         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require %1$d support.
79956         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Likewise.
79957         * doc/posix-functions/snprintf.texi (snprintf): Update.
79958         * doc/posix-functions/vsnprintf.texi (vsnprintf): Likewise.
79959         * tests/test-snprintf.c (main): Enhance test.
79960         * tests/test-vsnprintf.c (main): Likewise.
79962 2011-07-05  Jim Meyering  <meyering@redhat.com>
79964         maint: exempt stdio-read.c and stdio-write.c from the cppi check
79965         * Makefile (sc_cpp_indent_check): Exempt stdio-read.c and stdio-write.c
79966         per Bruno's request, to accommodate this idiom (no space after "#")
79967         even when the function is inside an #if block:
79968         char *
79969         gets (char *s)
79970         #undef gets
79971         {
79972           ...
79973         }
79975 2011-07-04  Jim Meyering  <meyering@redhat.com>
79977         maint: indent with spaces, not TABs, and add a rule to check this
79978         * tests/test-userspec.c: Indent with spaces, not TABs.
79979         * tests/test-argp.c: Likewise.
79980         * tests/test-c-stack2.sh: Likewise.
79981         * tests/test-parse-duration.sh: Likewise
79982         * m4/strtod.m4: Likewise.
79983         * m4/alloca.m4: Likewise.
79984         * m4/pselect.m4: Likewise.
79985         * Makefile (sc_prohibit_leading_TABs): Prohibit leading TABs.
79987 2011-07-03  Jim Meyering  <meyering@redhat.com>
79989         maint.mk: correct omissions in prohibit_argmatch_without_use check
79990         This rule would mistakenly report that argmatch.h is included without
79991         use even when both the argmatch and invalid_arg macro were used.
79992         * top/maint.mk (sc_prohibit_argmatch_without_use): Also detect uses
79993         of argmatch and invalid_arg.
79995 2011-07-03  Bruno Haible  <bruno@clisp.org>
79997         Comments about EINTR.
79998         * lib/safe-read.h: Explain the purpose of this module.
79999         * lib/safe-write.h: Likewise.
80000         * doc/posix-functions/read.texi: Mention EINTR and the 'safe-read'
80001         module.
80002         * doc/posix-functions/write.texi: Mention EINTR and the 'safe-write'
80003         module.
80004         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
80006 2011-06-30  Paul Eggert  <eggert@cs.ucla.edu>
80008         xnanosleep: Rewrite to use new dtotimespec module.
80009         It has the conversion code that used to be in xnanosleep.
80010         * lib/xnanosleep.c: Do not include limits.h, stdbool.h, stdio.h,
80011         assert.h, sys/types.h, or intprops.h.  Include timespec.h instead.
80012         (TIME_T_MAX): Remove.
80013         (xnanosleep): Rewrite in terms of dtotimespec.
80014         * modules/xnanosleep (Depends-on): Add dtotimespec.
80015         Remove intprops, stdbool.
80017         timespec-add, timespec-sub: new modules
80018         * lib/timespec.h (timespec_add, timespec_sub): New decls.
80019         * lib/timespec-add.c, lib/timespec-sub.c:
80020         * modules/timespec-add, modules/timespec-sub: New files.
80022         dtotimespec: new module
80023         * lib/timespec.h (dtotimespec): New decl.
80024         * lib/dtotimespec.c, modules/dtotimespec: New files.
80026         * lib/timespec.h (timespec_sign, timespectod): New inline functions.
80028         pselect: new module
80029         * lib/sys_select.in.h: Include <signal.h>, for 'sigset_t'.
80030         (pselect): New decls.
80031         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Require AC_C_RESTRICT,
80032         since the standard pselect decl uses 'restrict'.
80033         (gl_SYS_SELECT_H_DEFAULTS): Add defaults for GNULIB_PSELECT,
80034         HAVE_PSELECT, REPLACE_PSELECT.
80035         * modules/sys_select (sys/select.h): Substitute GNULIB_PSELECT,
80036         HAVE_PSELECT, REPLACE_PSELECT.
80037         * lib/pselect.c, m4/pselect.m4, modules/pselect: New files.
80039         sys_select: don't depend on sys_socket
80040         This is so that Emacs doesn't have to drag in m4/sockpfaf.m4 etc; see
80041         <http://lists.gnu.org/r/bug-gnulib/2011-06/msg00358.html>.
80042         This fix works on GNU and GNU-like platforms, but has not been tested
80043         on native Windows.
80044         * lib/sys_select.in.h: Include <sys/socket.h> only if native Windows.
80045         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Do not require
80046         gl_HEADER_SYS_SOCKET.
80047         * modules/sys_select (Files): Add m4/sys_socket_h.m4, for
80048         gl_PREREQ_SYS_H_WINSOCK2.
80050 2011-06-29  Eric Blake  <eblake@redhat.com>
80052         pipe2: fix C89 compile problem
80053         * lib/pipe2.c (pipe2): Avoid C99 array initialization.
80054         Reported by Bruno Haible.
80056         pipe, pipe2: don't corrupt fd on error
80057         * lib/pipe.c (pipe): Leave fd unchanged on error.
80058         * lib/pipe2.c (pipe2): Likewise.
80059         * doc/posix-functions/pipe.texi (pipe): Document cygwin issue.
80060         * doc/glibc-functions/pipe2.texi (pipe2): Likewise.
80062 2011-06-27  Paolo Bonzini  <bonzini@gnu.org>
80064         mmap-anon: do not use regular expressions inadvertently
80065         * m4/mmap-anon.m4: Remove trailing period from strings sought
80066         in the output.
80068 2011-06-25  Paul Eggert  <eggert@cs.ucla.edu>
80070         nanosleep: fix integer overflow problem
80071         * lib/nanosleep.c (my_usleep): Don't assume signed integer
80072         arithmetic wraps around on overflow.
80074         nanosleep: simplify carrying
80075         * lib/nanosleep.c (nanosleep): Use the requested tv_nsec for the
80076         first call to the underyling nanosleep, not for the last one.
80077         This doesn't fix any bugs, but it simplifies the computation of
80078         the remaining delay.  Found while auditing integer overflow issues.
80080         dup2: remove test for existence of fcntl
80081         * m4/dup2.m4 (gl_FUNC_DUP2): Use "#ifdef FD_CLOEXEC", not
80082         "#if HAVE_FCNTL", in the configure-time test program.
80083         This removes the need for the AC_CHECK_FUNCS_ONCE([fcntl]),
80084         and therefore speeds up "configure" a bit.  Found while
80085         adding the dup2 module to Emacs.
80087 2011-06-24  Eric Blake  <eblake@redhat.com>
80089         maint.mk: enhance useless header checks
80090         * top/maint.mk (_sc_header_without_use): Check both include
80091         styles.
80092         (sc_prohibit_assert_without_use)
80093         (sc_prohibit_close_stream_without_use)
80094         (sc_prohibit_getopt_without_use)
80095         (sc_prohibit_quotearg_without_use)
80096         (sc_prohibit_quote_without_use)
80097         (sc_prohibit_long_options_without_use)
80098         (sc_prohibit_inttostr_without_use)
80099         (sc_prohibit_ignore_value_without_use)
80100         (sc_prohibit_error_without_use, sc_prohibit_xalloc_without_use)
80101         (sc_prohibit_hash_without_use, sc_prohibit_cloexec_without_use)
80102         (sc_prohibit_posixver_without_use, sc_prohibit_same_without_use)
80103         (sc_prohibit_hash_pjw_without_use)
80104         (sc_prohibit_safe_read_without_use)
80105         (sc_prohibit_argmatch_without_use)
80106         (sc_prohibit_canonicalize_without_use)
80107         (sc_prohibit_root_dev_ino_without_use)
80108         (sc_prohibit_openat_without_use)
80109         (sc_prohibit_c_ctype_without_use)
80110         (sc_prohibit_signal_without_use)
80111         (sc_prohibit_stdio--_without_use)
80112         (sc_prohibit_stdio-safer_without_use)
80113         (sc_prohibit_strings_without_use)
80114         (sc_prohibit_intprops_without_use)
80115         (sc_prohibit_stddef_without_use)
80116         (sc_prohibit_xfreopen_without_use): Update clients.
80118 2011-06-24  Jim Meyering  <meyering@redhat.com>
80120         syntax-check: keep one maint.mk rule in sync with its header
80121         * Makefile (sc_check_sym_list): Add a rule to prevent a repeat
80122         of the bug Eric has just fixed, with today's commit 25e4c2ec.
80123         I prefer to avoid temporary files here, so use <(...), but that
80124         is not supported by /bin/sh, so...
80125         (SHELL): Define to /bin/bash.
80127 2011-06-24  Eric Blake  <eblake@redhat.com>
80129         maint.mk: update sc_prohibit_intprops_without_use
80130         * top/maint.mk (_intprops_names): Match recent changes.
80132 2011-06-24  Bruno Haible  <bruno@clisp.org>
80134         strerror-override: No-op tweak.
80135         * lib/strerror-override.h (strerror_override): Reorder conditions,
80136         for consistency with lib/strerror-override.c.
80138 2011-06-23  Eric Blake  <eblake@redhat.com>
80140         maint.mk: test further PATH_MAX issues
80141         * top/maint.mk (sc_prohibit_path_max_array): Rename...
80142         (sc_prohibit_path_max_allocation): ...and also test alloca.
80143         Suggested by Jim Meyering.
80145 2011-06-22  Eric Blake  <eblake@redhat.com>
80147         maint.mk: add syntax-check to avoid char[PATH_MAX]
80148         * top/maint.mk (sc_prohibit_path_max_array): New rule.
80150         stat: be robust to PATH_MAX definition
80151         * lib/stat.c (rpl_stat): Require reasonable PATH_MAX.
80152         * modules/stat (Depends-on): Add verify.
80154         link: work around IRIX bug
80155         * m4/link.m4 (gl_FUNC_LINK): Expose the bug.
80156         * lib/link.c (rpl_link): Work around it.
80157         * tests/test-link.h (test_link): Enhance test.
80158         * doc/posix-functions/link.texi (link): Document the bug.
80160         getopt: silence clang warning
80161         * lib/getopt.c (_getopt_internal_r): Avoid unlikely NULL
80162         dereference.
80163         Reported by Gustavo Martin Domato.
80165 2011-06-22  Jim Meyering  <meyering@redhat.com>
80167         bootstrap: do not insert a blank line into each .gitignore file
80168         * build-aux/bootstrap (sort_patterns): Filter out blank lines.
80170 2011-06-21  Eric Blake  <eblake@redhat.com>
80172         perror: test for output mismatch
80173         * m4/perror.m4 (gl_FUNC_PERROR): Add test, in order to replace
80174         perror on IRIX.
80176         strerror_r: fix OpenBSD behavior on out-of-range
80177         * lib/strerror_r.c (strerror_r): Always use maximal string.
80178         * doc/posix-functions/strerror_r.texi (strerror_r): Document it.
80180         strerror_r: fix OpenBSD behavior on 0
80181         * lib/strerror-override.c (strerror_override): Also override 0
80182         when needed.
80183         * lib/strerror-override.h (strerror_override): Likewise.
80184         * lib/strerror.c (strerror): Simplify, now that 0 override is done
80185         earlier.
80186         * lib/strerror_r.c (strerror_r): Likewise.
80187         * m4/strerror.m4 (gl_FUNC_STRERROR): Split detection of 0
80188         behavior...
80189         (gl_FUNC_STRERROR_0): ...into new macro.
80190         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Replace strerror_r if 0
80191         is overridden.
80192         (gl_FUNC_STRERROR_R_WORKS): Avoid extra tests if 0 is broken.
80193         * modules/strerror-override (Files): Add strerror.m4.
80194         (configure.ac): Also provide override for 0 when needed.
80195         * doc/posix-functions/strerror.texi (strerror): Document this.
80196         * doc/posix-functions/perror.texi (perror): Likewise.
80198         perror: adjust array size
80199         * modules/perror (Depends-on): Add strerror-override.
80200         * lib/perror.c (perror): Use it to avoid magic number.
80202         strerror-override: reduce size
80203         * lib/strerror-override.c (strerror_override): Use fewer lines.
80205 2011-06-20  Bruno Haible  <bruno@clisp.org>
80207         pathmax: Ensure correct value for PATH_MAX on HP-UX.
80208         * lib/pathmax.h (PATH_MAX) [HP-UX]: Define to 1024.
80210 2011-06-20  Paul Eggert  <eggert@cs.ucla.edu>
80212         alloca: port to compilers that can optimize like GCC 4.6.0
80213         * lib/alloca.c (find_stack_direction): New signature, taken from
80214         Autoconf git.  This works with GCC 4.6.0.  This code should never
80215         be used with GCC 4.6.0 itself, as GCC has alloca, but it might
80216         be used with other compilers that optimize as well as GCC 4.6.0 does.
80217         (alloca): Adjust to new signature.
80218         * m4/alloca.m4 (__AC_LIBOBJ_ALLOCA) [Autoconf version < 2.69]:
80219         New macro, which patches Autoconf in a similar way.
80221         c-stack: stop worrying about stack direction
80222         * lib/c-stack.c (find_stack_direction): Remove.
80223         (segv_handler): Don't worry about stack direction growth, as it's
80224         too much of a pain to configure this correctly, given how compilers
80225         are optimizing-away our stack-growth detection code.  Instead, assume
80226         that any access to just before or just after the stack is OK.
80227         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
80228         Don't require AC_FUNC_ALLOCA; no longer needed.
80230 2011-06-20  Eric Blake  <eblake@redhat.com>
80232         test-stat: don't allocate PATH_MAX bytes
80233         * tests/test-stat.h (test_stat_func): Don't stack-allocate a
80234         PATH_MAX-sized buffer.
80235         * modules/openat-tests (Depends-on): Add getcwd-lgpl, drop pathmax.
80236         * modules/stat-tests (Depends-on): Likewise.
80237         * tests/test-fstatat.c (includes): Drop pathmax.h.
80238         * tests/test-stat.c (includes): Likewise.
80239         Reported by Bruno Haible.
80241 2011-06-20  Bruno Haible  <bruno@clisp.org>
80243         float: Work around <float.h> bugs on FreeBSD/x86, AIX with GCC, IRIX.
80244         * lib/float.in.h: Add workarounds for FreeBSD/x86, AIX with GCC, IRIX.
80245         * lib/float.c: New file.
80246         * m4/float_h.m4 (gl_FLOAT_H): Also handle FreeBSD, AIX, IRIX. Set
80247         REPLACE_FLOAT_LDBL.
80248         * modules/float (Files): Add lib/float.c.
80249         (configure.ac): Invoke AC_LIBOBJ.
80250         * doc/posix-headers/float.texi: Mention problems on FreeBSD, AIX, IRIX.
80252 2011-06-20  Bruno Haible  <bruno@clisp.org>
80254         Tests for module 'float'.
80255         * modules/float-tests: New file.
80256         * tests/test-float.c: New file.
80258 2011-06-19  Bruno Haible  <bruno@clisp.org>
80260         isinf: Coding style.
80261         * lib/isinf.c: Use GNU coding style.
80263 2011-06-19  Bruno Haible  <bruno@clisp.org>
80265         linkat test: Avoid test failure on AIX 7.1.
80266         * tests/test-linkat.c (main): Allow EINVAL as alternate error value.
80267         * tests/test-link.h (test_link): Likewise.
80269 2011-06-19  Bruno Haible  <bruno@clisp.org>
80271         pread test: Avoid test failure on OpenBSD 4.9.
80272         * tests/test-pread.c (main): Allow EFBIG instead of EINBAL.
80274 2011-06-19  Bruno Haible  <bruno@clisp.org>
80276         sprintf-posix: Fix test failure on AIX 7.1.
80277         * m4/printf.m4 (gl_PRINTF_PRECISION): Test against AIX bug.
80278         * doc/posix-functions/dprintf.texi: Mention limited precision problem
80279         on AIX.
80280         * doc/posix-functions/fprintf.texi: Likewise.
80281         * doc/posix-functions/printf.texi: Likewise.
80282         * doc/posix-functions/snprintf.texi: Likewise.
80283         * doc/posix-functions/sprintf.texi: Likewise.
80284         * doc/posix-functions/vdprintf.texi: Likewise.
80285         * doc/posix-functions/vfprintf.texi: Likewise.
80286         * doc/posix-functions/vprintf.texi: Likewise.
80287         * doc/posix-functions/vsnprintf.texi: Likewise.
80288         * doc/posix-functions/vsprintf.texi: Likewise.
80290 2011-06-19  Bruno Haible  <bruno@clisp.org>
80292         roundl-ieee: Fix test failure on AIX 7.1.
80293         * m4/roundl.m4 (gl_FUNC_ROUNDL): Test also the sign of roundl (-0.3L).
80294         * doc/posix-functions/roundl.texi: Mention problem with negative
80295         arguments.
80297 2011-06-19  Bruno Haible  <bruno@clisp.org>
80299         round-ieee: Fix test failures on AIX 7.1 and OSF/1 5.1.
80300         * modules/round-ieee (Depends-on): Add floor-ieee, ceil-ieee.
80301         * doc/posix-functions/round.texi: Mention problem with negative
80302         arguments.
80303         * doc/posix-functions/ceil.texi: Mention problem on OSF/1 5.1.
80305 2011-06-19  Bruno Haible  <bruno@clisp.org>
80307         roundf-ieee: Fix test failures on AIX 7.1 and OSF/1 5.1.
80308         * m4/roundf.m4 (gl_FUNC_ROUNDF): Test also the sign of roundf (-0.3f).
80309         * modules/roundf-ieee (Depends-on): Add floorf-ieee, ceilf-ieee.
80310         * doc/posix-functions/roundf.texi: Mention problem with negative
80311         arguments.
80312         * doc/posix-functions/ceilf.texi: Mention problem on OSF/1 5.1.
80314 2011-06-19  Bruno Haible  <bruno@clisp.org>
80316         ceilf-ieee: Work around bug on MacOS X 10.5.
80317         * doc/posix-functions/ceilf.texi: Mention the MacOS X 10.5 problem.
80319         floor*-ieee, ceil*-ieee, trunc*-ieee, round*-ieee: More robust checks.
80320         * m4/floorf.m4 (gl_FUNC_FLOORF): In the test whether the function is
80321         IEEE compliant, avoid compiler optimizations.
80322         * m4/floor.m4 (gl_FUNC_FLOOR): Likewise.
80323         * m4/ceilf.m4 (gl_FUNC_CEILF): Likewise.
80324         * m4/ceil.m4 (gl_FUNC_CEIL): Likewise.
80325         * m4/ceill.m4 (gl_FUNC_CEILL): Likewise.
80326         * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
80327         * m4/trunc.m4 (gl_FUNC_TRUNC): Likewise.
80328         * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
80329         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
80330         * m4/round.m4 (gl_FUNC_ROUND): Likewise.
80331         * m4/roundl.m4 (gl_FUNC_ROUNDL): Likewise.
80333 2011-06-19  Bruno Haible  <bruno@clisp.org>
80335         ceilf-ieee: Work around bug on AIX 7.1.
80336         * m4/ceilf.m4 (gl_FUNC_CEILF): Test also the sign of ceilf (-0.3f).
80337         * doc/posix-functions/ceilf.texi: Mention the AIX 7.1 problem.
80339 2011-06-19  Bruno Haible  <bruno@clisp.org>
80341         ceil-ieee: Work around bug on AIX 7.1.
80342         * m4/ceil.m4 (gl_FUNC_CEIL): Test also the sign of ceil (-0.3).
80343         * doc/posix-functions/ceil.texi: Mention the AIX 7.1 problem.
80345 2011-06-18  Bruno Haible  <bruno@clisp.org>
80347         fsync test: Avoid test failure on MacOS X and AIX.
80348         * tests/test-fsync.c (fsync): Allow ENOTSUP and EBADF instead of
80349         EINVAL.
80351 2011-06-18  Bruno Haible  <bruno@clisp.org>
80353         openat, fdopendir tests: Fix link errors.
80354         * modules/openat-tests (Depends-on): Add progname.
80355         * modules/fdopendir-tests (Depends-on): Likewise.
80356         * tests/test-fchownat.c: Include progname.h.
80357         (main): Call set_program_name.
80358         * tests/test-fstatat.c: Include progname.h.
80359         (main): Call set_program_name.
80360         * tests/test-mkdirat.c: Include progname.h.
80361         (main): Call set_program_name.
80362         * tests/test-openat.c: Include progname.h.
80363         (main): Call set_program_name.
80364         * tests/test-unlinkat.c: Include progname.h.
80365         (main): Call set_program_name.
80366         * tests/test-fdopendir.c: Include progname.h.
80367         (main): Call set_program_name.
80369 2011-06-18  Bruno Haible  <bruno@clisp.org>
80371         Doc update.
80372         * doc/posix-functions/pthread_attr_getstack.texi: Update info regarding
80373         HP-UX.
80374         * doc/posix-functions/pthread_attr_setstack.texi: Likewise.
80376 2011-06-18  Bruno Haible  <bruno@clisp.org>
80378         getcwd tests: Avoid compilation error on HP-UX 11.31.
80379         * modules/getcwd-tests (Depends-on): Add pathmax.
80380         * tests/test-getcwd.c: Include pathmax.h.
80382 2011-06-18  Bruno Haible  <bruno@clisp.org>
80384         isfinite, isinf: Fix link error on AIX 6 and 7.
80385         * m4/isfinite.m4 (gl_ISFINITE): When determining whether libm is
80386         needed, also test the macro with a 'float' argument.
80387         * m4/isinf.m4 (gl_ISINF): Likewise.
80389 2011-06-18  Bruno Haible  <bruno@clisp.org>
80391         getloadavg: Don't clobber LIBS. Regression from previous commit.
80392         * m4/getloadavg.m4 (gl_PREREQ_GETLOADAVG): Move tests that use
80393         AC_CHECK_LIB from here...
80394         (gl_GETLOADAVG): ... to here, inside the experiment with LIBS.
80395         (gl_GETLOADAVG, gl_PREREQ_GETLOADAVG): Rename gl_have_func to
80396         gl_func_getloadavg_done.
80397         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
80399 2011-06-18  Bruno Haible  <bruno@clisp.org>
80401         clean-temp: Improve documentation.
80402         * lib/clean-temp.h: Explain better how to use this module.
80403         Reported by John Darrington <john@darrington.wattle.id.au>.
80405 2011-06-17  Bruno Haible  <bruno@clisp.org>
80407         pread, pwrite: Avoid cc warning on AIX.
80408         * lib/unistd.in.h (pread): Undefine before defining as a macro.
80409         (pwrite): Likewise.
80411 2011-06-17  Bruno Haible  <bruno@clisp.org>
80413         spawn-pipe tests: Fix link error.
80414         * tests/test-spawn-pipe-child.c: Undefine fprintf.
80415         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
80417 2011-06-17  Bruno Haible  <bruno@clisp.org>
80419         Tests: Remove unnecessary dependency.
80420         * modules/canonicalize-tests (Depends-on): Remove progname.
80421         * modules/chown-tests (Depends-on): Likewise.
80422         * modules/dirname-tests (Depends-on): Likewise.
80423         * modules/fdopendir-tests (Depends-on): Likewise.
80424         * modules/fdutimensat-tests (Depends-on): Likewise.
80425         * modules/hash-tests (Depends-on): Likewise.
80426         * modules/lchown-tests (Depends-on): Likewise.
80427         * modules/linkat-tests (Depends-on): Likewise.
80428         * modules/renameat-tests (Depends-on): Likewise.
80429         * modules/spawn-pipe-tests (Depends-on): Likewise.
80430         * modules/utimensat-tests (Depends-on): Likewise.
80432 2011-06-17  Bruno Haible  <bruno@clisp.org>
80434         spawn-pipe tests: Fix link error.
80435         * tests/test-spawn-pipe-child.c: Undefine fflush.
80437 2011-06-17  Bruno Haible  <bruno@clisp.org>
80439         Fix tests link errors.
80440         * modules/ceil-ieee-tests (Makefile.am): Use CEIL_LIBM, not FLOOR_LIBM.
80441         * modules/chown-tests (Makefile.am): Don't link test-chown with
80442         LIBINTL.
80443         * modules/lchown-tests (Makefile.am): Don't link test-lchown with
80444         LIBINTL.
80445         * modules/utimens-tests (Makefile.am): Don't link test-utimens with
80446         LIBINTL.
80447         * modules/futimens-tests (Makefile.am): Don't link test-futimens with
80448         LIBINTL.
80450 2011-06-16  Bruno Haible  <bruno@clisp.org>
80452         crypto/gc-sha1: Fix recent regression.
80453         * modules/crypto/gc-sha1 (configure.ac): Invoke AC_LIBOBJ here.
80454         * m4/gc-sha1.m4 (gl_GC_SHA1): Don't invoke gl_SHA1.
80456         crypto/gc-md5: Fix recent regression.
80457         * modules/crypto/gc-md5 (configure.ac): Invoke AC_LIBOBJ here.
80459         crypto/gc-md4: Fix recent regression.
80460         * modules/crypto/gc-md4 (configure.ac): Invoke AC_LIBOBJ here.
80461         * m4/md4.m4 (gl_MD4): Ensure the expansion is non-empty.
80463         crypto/gc-arctwo: Fix recent regression.
80464         * modules/crypto/gc-arctwo (configure.ac): Invoke AC_LIBOBJ here.
80465         * m4/arctwo.m4 (gl_ARCTWO): Ensure the expansion is non-empty.
80467         crypto/gc-rijndael: Fix recent regression.
80468         * modules/crypto/gc-rijndael (Files): Remove m4/rijndael.m4.
80469         (configure.ac): Invoke AC_LIBOBJ here.
80470         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Don't invoke gl_RIJNDAEL.
80471         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
80473         crypto/gc-hmac-sha1: Fix recent regression.
80474         * modules/crypto/gc-hmac-sha1 (Files): Remove m4/hmac-sha1.m4.
80475         (configure.ac): Invoke AC_LIBOBJ here.
80476         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Don't invoke gl_HMAC_SHA1.
80477         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
80479         crypto/gc-hmac-md5: Fix recent regression.
80480         * modules/crypto/gc-hmac-md5 (Files): Remove m4/hmac-md5.m4.
80481         (configure.ac): Invoke AC_LIBOBJ here.
80482         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Don't invoke gl_HMAC_MD5.
80483         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
80485         crypto/gc-des: Fix recent regression.
80486         * modules/crypto/gc-des (Files): Remove m4/des.m4.
80487         (configure.ac): Invoke AC_LIBOBJ here.
80488         * m4/gc-des.m4 (gl_GC_DES): Don't invoke gl_DES.
80489         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
80491         crypto/gc-arcfour: Fix recent regression.
80492         * modules/crypto/gc-arcfour (Files): Remove m4/arcfour.m4.
80493         (configure.ac): Invoke AC_LIBOBJ here.
80494         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Don't invoke gl_ARCFOUR.
80495         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
80497 2011-06-16  Paul Eggert  <eggert@cs.ucla.edu>
80499         * m4/lstat.m4 (gl_FUNC_LSTAT): Fix typo in prerequisite.
80500         After the 2011-05-21 change, this macro requires
80501         gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, not
80502         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
80504 2011-06-16  Bruno Haible  <bruno@clisp.org>
80506         fprintftime: Move AC_LIBOBJ invocations to module description.
80507         * m4/fprintftime.m4: Remove file.
80508         * modules/fprintftime (Files): Remove m4/fprintftime.m4.
80509         (configure.ac): Remove gl_FPRINTFTIME call.
80510         (Makefile.am): Augment lib_SOURCES.
80511         Reported by Jim Meyering.
80513 2011-06-16  Bruno Haible  <bruno@clisp.org>
80515         tmpfile-safer: Finish 2011-05-23 commit.
80516         * m4/stdio-safer.m4: Really remove file.
80517         Reported by Jim Meyering.
80519 2011-06-16  Bruno Haible  <bruno@clisp.org>
80521         syntax-check: Fix typo.
80522         * Makefile (allow_AC_LIBOBJ): Mention printf-posix-rpl.m4, not
80523         printf-posix.m4.
80524         Reported by Jim Meyering.
80526 2011-06-13  Jim Meyering  <meyering@redhat.com>
80528         syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
80529         * Makefile (sc_prohibit_AC_LIBOBJ_in_m4): New rule.
80531 2011-05-23  Bruno Haible  <bruno@clisp.org>
80533         yesno: Move AC_LIBOBJ invocations to module description.
80534         * m4/yesno.m4 (gl_YESNO): Remove AC_LIBOBJ invocation.
80535         * modules/yesno (Makefile.am): Augment lib_SOURCES.
80537 2011-05-23  Bruno Haible  <bruno@clisp.org>
80539         xstrtol: Move AC_LIBOBJ invocations to module description.
80540         * m4/xstrtol.m4 (gl_XSTRTOL): Remove AC_LIBOBJ invocations.
80541         * modules/xstrtol (Makefile.am): Augment lib_SOURCES.
80543 2011-05-23  Bruno Haible  <bruno@clisp.org>
80545         xstrtold: Move AC_LIBOBJ invocations to module description.
80546         * m4/xstrtod.m4 (gl_XSTRTOLD): Remove AC_LIBOBJ invocation.
80547         * modules/xstrtold (Makefile.am): Augment lib_SOURCES.
80549 2011-05-23  Bruno Haible  <bruno@clisp.org>
80551         xstrtod: Move AC_LIBOBJ invocations to module description.
80552         * m4/xstrtod.m4 (gl_XSTRTOD): Remove AC_LIBOBJ invocation.
80553         * modules/xstrtod (Makefile.am): Augment lib_SOURCES.
80555 2011-05-23  Bruno Haible  <bruno@clisp.org>
80557         xnanosleep: Move AC_LIBOBJ invocations to module description.
80558         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove AC_LIBOBJ invocation.
80559         * modules/xnanosleep (Makefile.am): Augment lib_SOURCES.
80561 2011-05-23  Bruno Haible  <bruno@clisp.org>
80563         xgetcwd: Move AC_LIBOBJ invocations to module description.
80564         * m4/xgetcwd.m4 (gl_XGETCWD): Remove AC_LIBOBJ invocation.
80565         * modules/xgetcwd (Makefile.am): Augment lib_SOURCES.
80567 2011-05-23  Bruno Haible  <bruno@clisp.org>
80569         xalloc: Move AC_LIBOBJ invocations to module description.
80570         * m4/xalloc.m4 (gl_XALLOC): Remove AC_LIBOBJ invocation.
80571         * modules/xalloc (Makefile.am): Augment lib_SOURCES.
80573 2011-05-23  Bruno Haible  <bruno@clisp.org>
80575         write-any-file: Move AC_LIBOBJ invocations to module description.
80576         * m4/write-any-file.m4 (gl_WRITE_ANY_FILE): Remove AC_LIBOBJ
80577         invocation.
80578         * modules/write-any-file (Makefile.am): Augment lib_SOURCES.
80580 2011-05-23  Bruno Haible  <bruno@clisp.org>
80582         utimens: Move AC_LIBOBJ invocations to module description.
80583         * m4/utimens.m4 (gl_UTIMENS): Remove AC_LIBOBJ invocation.
80584         * modules/utimens (Makefile.am): Augment lib_SOURCES.
80586 2011-05-23  Bruno Haible  <bruno@clisp.org>
80588         utimecmp: Move AC_LIBOBJ invocations to module description.
80589         * m4/utimecmp.m4 (gl_UTIMECMP): Remove AC_LIBOBJ invocation.
80590         * modules/utimecmp (Makefile.am): Augment lib_SOURCES.
80592 2011-05-23  Bruno Haible  <bruno@clisp.org>
80594         userspec: Move AC_LIBOBJ invocations to module description.
80595         * m4/userspec.m4 (gl_USERSPEC): Remove AC_LIBOBJ invocation.
80596         * modules/userspec (Makefile.am): Augment lib_SOURCES.
80598 2011-05-23  Bruno Haible  <bruno@clisp.org>
80600         unlinkdir: Move AC_LIBOBJ invocations to module description.
80601         * m4/unlinkdir.m4 (gl_UNLINKDIR): Remove AC_LIBOBJ invocation.
80602         * modules/unlinkdir (Makefile.am): Augment lib_SOURCES.
80604 2011-05-23  Bruno Haible  <bruno@clisp.org>
80606         unistd-safer: Move AC_LIBOBJ invocations to module description.
80607         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Remove AC_LIBOBJ invocations.
80608         * modules/unistd-safer (Makefile.am): Augment lib_SOURCES.
80610 2011-05-23  Bruno Haible  <bruno@clisp.org>
80612         tempname: Move AC_LIBOBJ invocations to module description.
80613         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Remove AC_LIBOBJ invocation.
80614         * modules/tempname (Makefile.am): Augment lib_SOURCES.
80616 2011-05-23  Bruno Haible  <bruno@clisp.org>
80618         strftime: Move AC_LIBOBJ invocations to module description.
80619         * m4/strftime.m4 (gl_FUNC_STRFTIME): Remove AC_LIBOBJ invocation.
80620         * modules/strftime (Makefile.am): Augment lib_SOURCES.
80622 2011-05-23  Bruno Haible  <bruno@clisp.org>
80624         stdlib-safer: Move AC_LIBOBJ invocations to module description.
80625         * m4/stdlib-safer.m4: Remove file.
80626         * modules/stdlib-safer (Files): Remove m4/stdlib-safer.m4.
80627         (configure.ac): Remove gl_STDLIB_SAFER call.
80628         (Makefile.am): Augment lib_SOURCES.
80630 2011-05-23  Bruno Haible  <bruno@clisp.org>
80632         tmpfile-safer: Move AC_LIBOBJ invocations to module description.
80633         * m4/stdio-safer.m4: Remove file.
80634         * modules/tmpfile-safer (Files): Remove m4/stdio-safer.m4.
80635         (configure.ac): Remove gl_TMPFILE_SAFER call.
80636         (Makefile.am): Augment lib_SOURCES.
80638 2011-05-23  Bruno Haible  <bruno@clisp.org>
80640         popen-safer: Move AC_LIBOBJ invocations to module description.
80641         * m4/stdio-safer.m4 (gl_POPEN_SAFER): Remove macro.
80642         * modules/popen-safer (Files): Remove m4/stdio-safer.m4.
80643         (configure.ac): Remove gl_POPEN_SAFER call.
80644         (Makefile.am): Augment lib_SOURCES.
80646 2011-05-23  Bruno Haible  <bruno@clisp.org>
80648         freopen-safer: Move AC_LIBOBJ invocations to module description.
80649         * m4/stdio-safer.m4 (gl_FREOPEN_SAFER): Remove macro.
80650         * modules/freopen-safer (Files): Remove m4/stdio-safer.m4.
80651         (configure.ac): Remove gl_FREOPEN_SAFER call.
80652         (Makefile.am): Augment lib_SOURCES.
80654 2011-05-23  Bruno Haible  <bruno@clisp.org>
80656         fopen-safer: Move AC_LIBOBJ invocations to module description.
80657         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove macro.
80658         * modules/fopen-safer (Files): Remove m4/stdio-safer.m4.
80659         (configure.ac): Remove gl_FOPEN_SAFER call.
80660         (Makefile.am): Augment lib_SOURCES.
80662 2011-05-23  Bruno Haible  <bruno@clisp.org>
80664         crypto/sha512: Move AC_LIBOBJ invocations to module description.
80665         * m4/sha512.m4 (gl_SHA512): Remove AC_LIBOBJ invocation.
80666         * modules/crypto/sha512 (Makefile.am): Augment lib_SOURCES.
80668 2011-05-23  Bruno Haible  <bruno@clisp.org>
80670         crypto/sha256: Move AC_LIBOBJ invocations to module description.
80671         * m4/sha256.m4 (gl_SHA256): Remove AC_LIBOBJ invocation.
80672         * modules/crypto/sha256 (Makefile.am): Augment lib_SOURCES.
80674 2011-05-23  Bruno Haible  <bruno@clisp.org>
80676         crypto/sha1: Move AC_LIBOBJ invocations to module description.
80677         * m4/sha1.m4 (gl_SHA1): Remove AC_LIBOBJ invocation.
80678         * modules/crypto/sha1 (Makefile.am): Augment lib_SOURCES.
80680 2011-05-23  Bruno Haible  <bruno@clisp.org>
80682         settime: Move AC_LIBOBJ invocations to module description.
80683         * m4/settime.m4 (gl_SETTIME): Remove AC_LIBOBJ invocation.
80684         * modules/settime (Makefile.am): Augment lib_SOURCES.
80686 2011-05-23  Bruno Haible  <bruno@clisp.org>
80688         savedir: Move AC_LIBOBJ invocations to module description.
80689         * m4/savedir.m4 (gl_SAVEDIR): Remove AC_LIBOBJ invocation.
80690         * modules/savedir (Makefile.am): Augment lib_SOURCES.
80692 2011-05-23  Bruno Haible  <bruno@clisp.org>
80694         save-cwd: Move AC_LIBOBJ invocations to module description.
80695         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove AC_LIBOBJ invocation.
80696         * modules/save-cwd (Makefile.am): Augment lib_SOURCES.
80698 2011-05-23  Bruno Haible  <bruno@clisp.org>
80700         same: Move AC_LIBOBJ invocations to module description.
80701         * m4/same.m4 (gl_SAME): Remove AC_LIBOBJ invocation.
80702         * modules/same (Makefile.am): Augment lib_SOURCES.
80704 2011-05-23  Bruno Haible  <bruno@clisp.org>
80706         safe-write: Move AC_LIBOBJ invocations to module description.
80707         * m4/safe-write.m4 (gl_SAFE_WRITE): Remove macro.
80708         * modules/safe-write (configure.ac): Invoke gl_PREREQ_SAFE_WRITE
80709         instead of gl_SAFE_WRITE.
80710         (Makefile.am): Augment lib_SOURCES.
80712 2011-05-23  Bruno Haible  <bruno@clisp.org>
80714         safe-read: Move AC_LIBOBJ invocations to module description.
80715         * m4/safe-read.m4 (gl_SAFE_READ): Remove macro.
80716         * modules/safe-read (configure.ac): Invoke gl_PREREQ_SAFE_READ instead
80717         of gl_SAFE_READ.
80718         (Makefile.am): Augment lib_SOURCES.
80720 2011-05-23  Bruno Haible  <bruno@clisp.org>
80722         safe-alloc: Move AC_LIBOBJ invocations to module description.
80723         * m4/safe-alloc.m4 (gl_SAFE_ALLOC): Remove AC_LIBOBJ invocation.
80724         * modules/safe-alloc (Makefile.am): Augment lib_SOURCES.
80726 2011-05-23  Bruno Haible  <bruno@clisp.org>
80728         crypto/rijndael: Move AC_LIBOBJ invocations to module description.
80729         * m4/rijndael.m4: Remove file.
80730         * modules/crypto/rijndael (Files): Remove it.
80731         (configure.ac): Remove gl_RIJNDAEL call.
80732         (Makefile.am): Augment lib_SOURCES.
80734 2011-05-23  Bruno Haible  <bruno@clisp.org>
80736         readtokens: Move AC_LIBOBJ invocations to module description.
80737         * m4/readtokens.m4 (gl_READTOKENS): Remove AC_LIBOBJ invocation.
80738         * modules/readtokens (Makefile.am): Augment lib_SOURCES.
80740 2011-05-23  Bruno Haible  <bruno@clisp.org>
80742         read-file: Move AC_LIBOBJ invocations to module description.
80743         * m4/read-file.m4 (gl_FUNC_READ_FILE): Remove macro.
80744         * modules/read-file (configure.ac): Invoke gl_PREREQ_READ_FILE instead
80745         of gl_FUNC_READ_FILE.
80746         (Makefile.am): Augment lib_SOURCES.
80748 2011-05-23  Bruno Haible  <bruno@clisp.org>
80750         quotearg: Move AC_LIBOBJ invocations to module description.
80751         * m4/quotearg.m4 (gl_QUOTEARG): Remove AC_LIBOBJ invocation.
80752         * modules/quotearg (Makefile.am): Augment lib_SOURCES.
80754 2011-05-23  Bruno Haible  <bruno@clisp.org>
80756         quote: Move AC_LIBOBJ invocations to module description.
80757         * m4/quote.m4 (gl_QUOTE): Remove AC_LIBOBJ invocation.
80758         * modules/quote (Makefile.am): Augment lib_SOURCES.
80760 2011-05-23  Bruno Haible  <bruno@clisp.org>
80762         posixver: Move AC_LIBOBJ invocations to module description.
80763         * m4/posixver.m4 (gl_POSIXVER): Remove AC_LIBOBJ invocation.
80764         * modules/posixver (Makefile.am): Augment lib_SOURCES.
80766 2011-05-23  Bruno Haible  <bruno@clisp.org>
80768         posixtm: Move AC_LIBOBJ invocations to module description.
80769         * m4/posixtm.m4 (gl_POSIXTM): Remove AC_LIBOBJ invocation.
80770         * modules/posixtm (Makefile.am): Augment lib_SOURCES.
80772 2011-05-23  Bruno Haible  <bruno@clisp.org>
80774         physmem: Move AC_LIBOBJ invocations to module description.
80775         * m4/physmem.m4 (gl_PHYSMEM): Remove AC_LIBOBJ invocation.
80776         * modules/physmem (Makefile.am): Augment lib_SOURCES.
80778 2011-05-23  Bruno Haible  <bruno@clisp.org>
80780         pagealign_alloc: Move AC_LIBOBJ invocations to module description.
80781         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC): Remove AC_LIBOBJ
80782         invocation.
80783         * modules/pagealign_alloc (Makefile.am): Augment lib_SOURCES.
80785 2011-05-23  Bruno Haible  <bruno@clisp.org>
80787         mpsort: Move AC_LIBOBJ invocations to module description.
80788         * m4/mpsort.m4 (gl_MPSORT): Remove AC_LIBOBJ invocation.
80789         * modules/mpsort (Makefile.am): Augment lib_SOURCES.
80791 2011-05-23  Bruno Haible  <bruno@clisp.org>
80793         modechange: Move AC_LIBOBJ invocations to module description.
80794         * m4/modechange.m4 (gl_MODECHANGE): Remove AC_LIBOBJ invocation.
80795         * modules/modechange (Makefile.am): Augment lib_SOURCES.
80797 2011-05-23  Bruno Haible  <bruno@clisp.org>
80799         mkdir-p: Move AC_LIBOBJ invocations to module description.
80800         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Remove AC_LIBOBJ invocations.
80801         * modules/mkdir-p (Makefile.am): Augment lib_SOURCES.
80803 2011-05-23  Bruno Haible  <bruno@clisp.org>
80805         mkancesdirs: Move AC_LIBOBJ invocations to module description.
80806         * m4/mkancesdirs.m4 (gl_MKANCESDIRS): Remove AC_LIBOBJ invocation.
80807         * modules/mkancesdirs (Makefile.am): Augment lib_SOURCES.
80809 2011-05-23  Bruno Haible  <bruno@clisp.org>
80811         mgetgroups: Move AC_LIBOBJ invocations to module description.
80812         * m4/mgetgroups.m4 (gl_MGETGROUPS): Remove AC_LIBOBJ invocation.
80813         * modules/mgetgroups (Makefile.am): Augment lib_SOURCES.
80815 2011-05-23  Bruno Haible  <bruno@clisp.org>
80817         memxor: Move AC_LIBOBJ invocations to module description.
80818         * m4/memxor.m4 (gl_MEMXOR): Remove AC_LIBOBJ invocation.
80819         * modules/memxor (Makefile.am): Augment lib_SOURCES.
80821 2011-05-23  Bruno Haible  <bruno@clisp.org>
80823         memcoll: Move AC_LIBOBJ invocations to module description.
80824         * m4/memcoll.m4 (gl_MEMCOLL): Remove AC_LIBOBJ invocation.
80825         * modules/memcoll (Makefile.am): Augment lib_SOURCES.
80827 2011-05-23  Bruno Haible  <bruno@clisp.org>
80829         memcasecmp: Move AC_LIBOBJ invocations to module description.
80830         * m4/memcasecmp.m4 (gl_MEMCASECMP): Remove AC_LIBOBJ invocation.
80831         * modules/memcasecmp (Makefile.am): Augment lib_SOURCES.
80833 2011-05-23  Bruno Haible  <bruno@clisp.org>
80835         crypto/md5: Move AC_LIBOBJ invocations to module description.
80836         * m4/md5.m4 (gl_MD5): Remove AC_LIBOBJ invocation.
80837         * modules/crypto/md5 (Makefile.am): Augment lib_SOURCES.
80839 2011-05-23  Bruno Haible  <bruno@clisp.org>
80841         crypto/md4: Move AC_LIBOBJ invocations to module description.
80842         * m4/md4.m4 (gl_MD4): Remove AC_LIBOBJ invocation.
80843         * modules/crypto/md4 (Makefile.am): Augment lib_SOURCES.
80845 2011-05-23  Bruno Haible  <bruno@clisp.org>
80847         crypto/md2: Move AC_LIBOBJ invocations to module description.
80848         * m4/md2.m4: Remove file.
80849         * modules/crypto/md2 (Files): Remove it.
80850         (configure.ac): Remove gl_MD2 call.
80851         (Makefile.am): Augment lib_SOURCES.
80853 2011-05-23  Bruno Haible  <bruno@clisp.org>
80855         long-options: Move AC_LIBOBJ invocations to module description.
80856         * m4/long-options.m4: Remove file.
80857         * modules/long-options (Files): Remove it.
80858         (configure.ac): Remove gl_LONG_OPTIONS call.
80859         (Makefile.am): Augment lib_SOURCES.
80861 2011-05-23  Bruno Haible  <bruno@clisp.org>
80863         i-ring: Move AC_LIBOBJ invocations to module description.
80864         * m4/i-ring.m4 (gl_I_RING): Remove AC_LIBOBJ invocation.
80865         * modules/i-ring (Makefile.am): Augment lib_SOURCES.
80867 2011-05-23  Bruno Haible  <bruno@clisp.org>
80869         idcache: Move AC_LIBOBJ invocations to module description.
80870         * m4/idcache.m4 (gl_IDCACHE): Remove AC_LIBOBJ invocation.
80871         * modules/idcache (Makefile.am): Augment lib_SOURCES.
80873 2011-05-23  Bruno Haible  <bruno@clisp.org>
80875         human: Move AC_LIBOBJ invocations to module description.
80876         * m4/human.m4 (gl_HUMAN): Remove AC_LIBOBJ invocation.
80877         * modules/human (Makefile.am): Augment lib_SOURCES.
80879 2011-05-23  Bruno Haible  <bruno@clisp.org>
80881         crypto/hmac-sha1: Move AC_LIBOBJ invocations to module description.
80882         * m4/hmac-sha1.m4: Remove file.
80883         * modules/crypto/hmac-sha1 (Files): Remove it.
80884         (configure.ac): Remove gl_HMAC_SHA1 call.
80885         (Makefile.am): Augment lib_SOURCES.
80887 2011-05-23  Bruno Haible  <bruno@clisp.org>
80889         crypto/hmac-md5: Move AC_LIBOBJ invocations to module description.
80890         * m4/hmac-md5.m4: Remove file.
80891         * modules/crypto/hmac-md5 (Files): Remove it.
80892         (configure.ac): Remove gl_HMAC_MD5 call.
80893         (Makefile.am): Augment lib_SOURCES.
80895 2011-05-23  Bruno Haible  <bruno@clisp.org>
80897         hash: Move AC_LIBOBJ invocations to module description.
80898         * m4/hash.m4: Remove file.
80899         * modules/hash (Files): Remove it.
80900         (configure.ac): Remove gl_HASH call.
80901         (Makefile.am): Augment lib_SOURCES.
80903 2011-05-23  Bruno Haible  <bruno@clisp.org>
80905         hard-locale: Move AC_LIBOBJ invocations to module description.
80906         * m4/hard-locale.m4 (gl_HARD_LOCALE): Remove AC_LIBOBJ invocation.
80907         * modules/hard-locale (Makefile.am): Augment lib_SOURCES.
80909 2011-05-23  Bruno Haible  <bruno@clisp.org>
80911         getugroups: Move AC_LIBOBJ invocations to module description.
80912         * m4/getugroups.m4 (gl_GETUGROUPS): Remove AC_LIBOBJ invocation.
80913         * modules/getugroups (Makefile.am): Augment lib_SOURCES.
80915 2011-05-23  Bruno Haible  <bruno@clisp.org>
80917         gettime: Move AC_LIBOBJ invocations to module description.
80918         * m4/gettime.m4 (gl_GETTIME): Remove AC_LIBOBJ invocation.
80919         * modules/gettime (Makefile.am): Augment lib_SOURCES.
80921 2011-05-23  Bruno Haible  <bruno@clisp.org>
80923         getndelim2: Move AC_LIBOBJ invocations to module description.
80924         * m4/getndelim2.m4 (gl_GETNDELIM2): Remove AC_LIBOBJ invocation.
80925         * modules/getndelim2 (Makefile.am): Augment lib_SOURCES.
80927 2011-05-23  Bruno Haible  <bruno@clisp.org>
80929         crypto/gc-pbkdf2-sha1: Move AC_LIBOBJ invocations to module description.
80930         * m4/gc-pbkdf2-sha1.m4: Remove file.
80931         * modules/crypto/gc-pbkdf2-sha1 (Files): Remove it.
80932         (configure.ac): Remove gl_GC_PBKDF2_SHA1 call.
80933         (Makefile.am): Augment lib_SOURCES.
80935 2011-05-23  Bruno Haible  <bruno@clisp.org>
80937         fts: Move AC_LIBOBJ invocations to module description.
80938         * m4/fts.m4 (gl_FUNC_FTS_CORE): Move AC_LIBOBJ invocation from here...
80939         * modules/fts (configure.ac): ... to here.
80941 2011-05-23  Bruno Haible  <bruno@clisp.org>
80943         file-type: Move AC_LIBOBJ invocations to module description.
80944         * m4/file-type.m4: Remove file.
80945         * modules/file-type (Files): Remove it.
80946         (configure.ac): Remove gl_FILE_TYPE call.
80947         (Makefile.am): Augment lib_SOURCES.
80949 2011-05-23  Bruno Haible  <bruno@clisp.org>
80951         filenamecat*: Respect rules for use of AC_LIBOBJ.
80952         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT, gl_FILE_NAME_CONCAT_LGPL):
80953         Remove AC_LIBOBJ invocation.
80954         * modules/filenamecat (Makefile.am): Augment lib_SOURCES.
80955         * modules/filenamecat-lgpl (Makefile.am): Augment lib_SOURCES.
80957 2011-05-23  Bruno Haible  <bruno@clisp.org>
80959         filemode: Move AC_LIBOBJ invocations to module description.
80960         * m4/filemode.m4 (gl_FILEMODE): Remove AC_LIBOBJ invocation.
80961         * modules/filemode (Makefile.am): Augment lib_SOURCES.
80963 2011-05-23  Bruno Haible  <bruno@clisp.org>
80965         openat-safer: Move AC_LIBOBJ invocations to module description.
80966         * m4/fcntl-safer.m4 (gl_OPENAT_SAFER): Remove AC_LIBOBJ invocation.
80967         * modules/openat-safer (Makefile.am): Augment lib_SOURCES.
80969 2011-05-23  Bruno Haible  <bruno@clisp.org>
80971         fcntl-safer: Move AC_LIBOBJ invocations to module description.
80972         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove AC_LIBOBJ invocations.
80973         * modules/fcntl-safer (Makefile.am): Augment lib_SOURCES.
80975 2011-05-23  Bruno Haible  <bruno@clisp.org>
80977         exclude: Move AC_LIBOBJ invocations to module description.
80978         * m4/exclude.m4: Remove file.
80979         * modules/exclude (Files): Remove it.
80980         (configure.ac): Remove gl_EXCLUDE call.
80981         (Makefile.am): Augment lib_SOURCES.
80983 2011-05-23  Bruno Haible  <bruno@clisp.org>
80985         dirname*: Respect rules for use of AC_LIBOBJ.
80986         * m4/dirname.m4 (gl_DIRNAME, gl_DIRNAME_LGPL): Remove AC_LIBOBJ
80987         invocations.
80988         * modules/dirname (Makefile.am): Augment lib_SOURCES.
80989         * modules/dirname-lgpl (Makefile.am): Augment lib_SOURCES.
80991 2011-05-23  Bruno Haible  <bruno@clisp.org>
80993         dirent-safer: Move AC_LIBOBJ invocations to module description.
80994         * m4/dirent-safer.m4 (gl_DIRENT_SAFER): Remove AC_LIBOBJ invocation.
80995         * modules/dirent-safer (Makefile.am): Augment lib_SOURCES.
80997 2011-05-23  Bruno Haible  <bruno@clisp.org>
80999         crypto/des: Move AC_LIBOBJ invocations to module description.
81000         * m4/des.m4: Remove file.
81001         * modules/crypto/des (Files): Remove it.
81002         (configure.ac): Remove gl_DES call.
81003         (Makefile.am): Augment lib_SOURCES.
81005 2011-05-23  Bruno Haible  <bruno@clisp.org>
81007         cycle-check: Move AC_LIBOBJ invocations to module description.
81008         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Remove AC_LIBOBJ invocation.
81009         * modules/cycle-check (Makefile.am): Augment lib_SOURCES.
81011 2011-05-23  Bruno Haible  <bruno@clisp.org>
81013         c-strtold: Move AC_LIBOBJ invocations to module description.
81014         * m4/c-strtod.m4 (gl_C_STRTOLD): Remove AC_LIBOBJ invocation.
81015         * modules/c-strtold (Makefile.am): Augment lib_SOURCES.
81017 2011-05-23  Bruno Haible  <bruno@clisp.org>
81019         c-strtod: Move AC_LIBOBJ invocations to module description.
81020         * m4/c-strtod.m4 (gl_C_STRTOD): Remove AC_LIBOBJ invocation.
81021         * modules/c-strtod (Makefile.am): Augment lib_SOURCES.
81023 2011-05-23  Bruno Haible  <bruno@clisp.org>
81025         crc: Move AC_LIBOBJ invocations to module description.
81026         * m4/crc.m4: Remove file.
81027         * modules/crc (Files): Remove it.
81028         (configure.ac): Remove gl_CRC call.
81029         (Makefile.am): Augment lib_SOURCES.
81031 2011-05-23  Bruno Haible  <bruno@clisp.org>
81033         close-stream: Move AC_LIBOBJ invocations to module description.
81034         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove AC_LIBOBJ invocation.
81035         * modules/close-stream (Makefile.am): Augment lib_SOURCES.
81037 2011-05-23  Bruno Haible  <bruno@clisp.org>
81039         closeout: Move AC_LIBOBJ invocations to module description.
81040         * m4/closeout.m4 (gl_CLOSEOUT): Remove AC_LIBOBJ invocation.
81041         * modules/closeout (Makefile.am): Augment lib_SOURCES.
81043 2011-05-23  Bruno Haible  <bruno@clisp.org>
81045         closein: Move AC_LIBOBJ invocations to module description.
81046         * m4/closein.m4 (gl_CLOSEIN): Remove AC_LIBOBJ invocation.
81047         * modules/closein (Makefile.am): Augment lib_SOURCES.
81049 2011-05-23  Bruno Haible  <bruno@clisp.org>
81051         cloexec: Move AC_LIBOBJ invocations to module description.
81052         * m4/cloexec.m4: Remove file.
81053         * modules/cloexec (Files): Remove it.
81054         (configure.ac): Remove gl_CLOEXEC call.
81055         (Makefile.am): Augment lib_SOURCES.
81057 2011-05-23  Bruno Haible  <bruno@clisp.org>
81059         check-version: Move AC_LIBOBJ invocations to module description.
81060         * m4/check-version.m4: Remove file.
81061         * modules/check-version (Files): Remove it.
81062         (configure.ac): Remove gl_CHECK_VERSION call.
81063         (Makefile.am): Augment lib_SOURCES.
81065 2011-05-23  Bruno Haible  <bruno@clisp.org>
81067         chdir-safer: Move AC_LIBOBJ invocations to module description.
81068         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Remove AC_LIBOBJ invocation.
81069         * modules/chdir-safer (Makefile.am): Augment lib_SOURCES.
81071 2011-05-23  Bruno Haible  <bruno@clisp.org>
81073         canonicalize: Move AC_LIBOBJ invocations to module description.
81074         * m4/canonicalize.m4 (gl_FUNC_CANONICALIZE_FILENAME_MODE): Remove
81075         AC_LIBOBJ invocation.
81076         * modules/canonicalize (Makefile.am): Augment lib_SOURCES.
81078 2011-05-23  Bruno Haible  <bruno@clisp.org>
81080         canon-host: Move AC_LIBOBJ invocations to module description.
81081         * m4/canon-host.m4 (gl_CANON_HOST): Remove macro.
81082         * modules/canon-host (configure.ac): Invoke gl_PREREQ_CANON_HOST
81083         instead of gl_CANON_HOST.
81084         (Makefile.am): Augment lib_SOURCES.
81086 2011-05-23  Bruno Haible  <bruno@clisp.org>
81088         backupfile: Move AC_LIBOBJ invocations to module description.
81089         * m4/backupfile.m4 (gl_BACKUPFILE): Remove AC_LIBOBJ invocation.
81090         * modules/backupfile (Makefile.am): Augment lib_SOURCES.
81092 2011-05-23  Bruno Haible  <bruno@clisp.org>
81094         argmatch: Move AC_LIBOBJ invocations to module description.
81095         * m4/argmatch.m4: Remove file.
81096         * modules/argmatch (Files): Remove it.
81097         (configure.ac): Remove gl_ARGMATCH call.
81098         (Makefile.am): Augment lib_SOURCES.
81100 2011-05-23  Bruno Haible  <bruno@clisp.org>
81102         crypto/arctwo: Move AC_LIBOBJ invocations to module description.
81103         * m4/arctwo.m4 (gl_ARCTWO): Remove AC_LIBOBJ invocation.
81104         * modules/crypto/arctwo (Makefile.am): Augment lib_SOURCES.
81106 2011-05-23  Bruno Haible  <bruno@clisp.org>
81108         crypto/arcfour: Move AC_LIBOBJ invocations to module description.
81109         * m4/arcfour.m4: Remove file.
81110         * modules/crypto/arcfour (Files): Remove it.
81111         (configure.ac): Remove gl_ARCFOUR call.
81112         (Makefile.am): Augment lib_SOURCES.
81114 2011-05-22  Bruno Haible  <bruno@clisp.org>
81116         write: Move AC_LIBOBJ invocations to module description.
81117         * m4/write.m4 (gl_FUNC_WRITE): Move AC_LIBOBJ invocation from here...
81118         * modules/write (configure.ac): ... to here.
81120 2011-05-22  Bruno Haible  <bruno@clisp.org>
81122         wmemset: Move AC_LIBOBJ invocations to module description.
81123         * m4/wmemset.m4 (gl_FUNC_WMEMSET): Move AC_LIBOBJ invocation from
81124         here...
81125         * modules/wmemset (configure.ac): ... to here.
81127 2011-05-22  Bruno Haible  <bruno@clisp.org>
81129         wmemmove: Move AC_LIBOBJ invocations to module description.
81130         * m4/wmemmove.m4 (gl_FUNC_WMEMMOVE): Move AC_LIBOBJ invocation from
81131         here...
81132         * modules/wmemmove (configure.ac): ... to here.
81134 2011-05-22  Bruno Haible  <bruno@clisp.org>
81136         wmemcpy: Move AC_LIBOBJ invocations to module description.
81137         * m4/wmemcpy.m4 (gl_FUNC_WMEMCPY): Move AC_LIBOBJ invocation from
81138         here...
81139         * modules/wmemcpy (configure.ac): ... to here.
81141 2011-05-22  Bruno Haible  <bruno@clisp.org>
81143         wmemcmp: Move AC_LIBOBJ invocations to module description.
81144         * m4/wmemcmp.m4 (gl_FUNC_WMEMCMP): Move AC_LIBOBJ invocation from
81145         here...
81146         * modules/wmemcmp (configure.ac): ... to here.
81148 2011-05-22  Bruno Haible  <bruno@clisp.org>
81150         wmemchr: Move AC_LIBOBJ invocations to module description.
81151         * m4/wmemchr.m4 (gl_FUNC_WMEMCHR): Move AC_LIBOBJ invocation from
81152         here...
81153         * modules/wmemchr (configure.ac): ... to here.
81155 2011-05-22  Bruno Haible  <bruno@clisp.org>
81157         wcswidth: Move AC_LIBOBJ invocations to module description.
81158         * m4/wcswidth.m4 (gl_FUNC_WCSWIDTH): Move AC_LIBOBJ invocation from
81159         here...
81160         * modules/wcswidth (configure.ac): ... to here.
81162 2011-05-22  Bruno Haible  <bruno@clisp.org>
81164         wcwidth: Respect rules for use of AC_LIBOBJ.
81165         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Set HAVE_WCWIDTH. Move AC_LIBOBJ
81166         invocation from here...
81167         * modules/wcwidth (configure.ac): ... to here.
81168         (Depends-on): Update conditions.
81170 2011-05-22  Bruno Haible  <bruno@clisp.org>
81172         wctype: Move AC_LIBOBJ invocations to module description.
81173         * m4/wctype.m4 (gl_FUNC_WCTYPE): Set HAVE_WCTYPE. Move AC_LIBOBJ
81174         invocation from here...
81175         * modules/wctype (configure.ac): ... to here.
81176         (Depends-on): Update conditions.
81178 2011-05-22  Bruno Haible  <bruno@clisp.org>
81180         wctrans: Move AC_LIBOBJ invocations to module description.
81181         * m4/wctrans.m4 (gl_FUNC_WCTRANS): Set HAVE_WCTRANS. Move AC_LIBOBJ
81182         invocation from here...
81183         * modules/wctrans (configure.ac): ... to here.
81185 2011-05-22  Bruno Haible  <bruno@clisp.org>
81187         wctomb: Move AC_LIBOBJ invocations to module description.
81188         * m4/wctomb.m4 (gl_FUNC_WCTOMB): Move AC_LIBOBJ and gl_PREREQ_WCTOMB
81189         invocations from here...
81190         * modules/wctomb (configure.ac): ... to here.
81192 2011-05-22  Bruno Haible  <bruno@clisp.org>
81194         wctob: Move AC_LIBOBJ invocations to module description.
81195         * m4/wctob.m4 (gl_FUNC_WCTOB): Set HAVE_WCTOB. Move AC_LIBOBJ and
81196         gl_PREREQ_WCTOB invocations from here...
81197         * modules/wctob (configure.ac): ... to here.
81198         (Depends-on): Update conditions.
81200 2011-05-22  Bruno Haible  <bruno@clisp.org>
81202         wcsxfrm: Move AC_LIBOBJ invocations to module description.
81203         * m4/wcsxfrm.m4 (gl_FUNC_WCSXFRM): Move AC_LIBOBJ invocation from
81204         here...
81205         * modules/wcsxfrm (configure.ac): ... to here.
81207 2011-05-22  Bruno Haible  <bruno@clisp.org>
81209         wcstok: Move AC_LIBOBJ invocations to module description.
81210         * m4/wcstok.m4 (gl_FUNC_WCSTOK): Move AC_LIBOBJ invocation from here...
81211         * modules/wcstok (configure.ac): ... to here.
81213 2011-05-22  Bruno Haible  <bruno@clisp.org>
81215         wcsstr: Move AC_LIBOBJ invocations to module description.
81216         * m4/wcsstr.m4 (gl_FUNC_WCSSTR): Move AC_LIBOBJ invocation from here...
81217         * modules/wcsstr (configure.ac): ... to here.
81219 2011-05-22  Bruno Haible  <bruno@clisp.org>
81221         wcsspn: Move AC_LIBOBJ invocations to module description.
81222         * m4/wcsspn.m4 (gl_FUNC_WCSSPN): Move AC_LIBOBJ invocation from here...
81223         * modules/wcsspn (configure.ac): ... to here.
81225 2011-05-22  Bruno Haible  <bruno@clisp.org>
81227         wcsrtombs: Move AC_LIBOBJ invocations to module description.
81228         * m4/wcsrtombs.m4 (gl_FUNC_WCSRTOMBS): Move AC_LIBOBJ and
81229         gl_PREREQ_WCSRTOMBS invocations from here...
81230         * modules/wcsrtombs (configure.ac): ... to here.
81232 2011-05-22  Bruno Haible  <bruno@clisp.org>
81234         wcsrchr: Move AC_LIBOBJ invocations to module description.
81235         * m4/wcsrchr.m4 (gl_FUNC_WCSRCHR): Move AC_LIBOBJ invocation from
81236         here...
81237         * modules/wcsrchr (configure.ac): ... to here.
81239 2011-05-22  Bruno Haible  <bruno@clisp.org>
81241         wcspbrk: Move AC_LIBOBJ invocations to module description.
81242         * m4/wcspbrk.m4 (gl_FUNC_WCSPBRK): Move AC_LIBOBJ invocation from
81243         here...
81244         * modules/wcspbrk (configure.ac): ... to here.
81246 2011-05-22  Bruno Haible  <bruno@clisp.org>
81248         wcsnrtombs: Move AC_LIBOBJ invocations to module description.
81249         * m4/wcsnrtombs.m4 (gl_FUNC_WCSNRTOMBS): Move AC_LIBOBJ and
81250         gl_PREREQ_WCSNRTOMBS invocations from here...
81251         * modules/wcsnrtombs (configure.ac): ... to here.
81253 2011-05-22  Bruno Haible  <bruno@clisp.org>
81255         wcsnlen: Move AC_LIBOBJ invocations to module description.
81256         * m4/wcsnlen.m4 (gl_FUNC_WCSNLEN): Move AC_LIBOBJ invocation from
81257         here...
81258         * modules/wcsnlen (configure.ac): ... to here.
81260 2011-05-22  Bruno Haible  <bruno@clisp.org>
81262         wcsncpy: Move AC_LIBOBJ invocations to module description.
81263         * m4/wcsncpy.m4 (gl_FUNC_WCSNCPY): Move AC_LIBOBJ invocation from
81264         here...
81265         * modules/wcsncpy (configure.ac): ... to here.
81267 2011-05-22  Bruno Haible  <bruno@clisp.org>
81269         wcsncmp: Move AC_LIBOBJ invocations to module description.
81270         * m4/wcsncmp.m4 (gl_FUNC_WCSNCMP): Move AC_LIBOBJ invocation from
81271         here...
81272         * modules/wcsncmp (configure.ac): ... to here.
81274 2011-05-22  Bruno Haible  <bruno@clisp.org>
81276         wcsncat: Move AC_LIBOBJ invocations to module description.
81277         * m4/wcsncat.m4 (gl_FUNC_WCSNCAT): Move AC_LIBOBJ invocation from
81278         here...
81279         * modules/wcsncat (configure.ac): ... to here.
81281 2011-05-22  Bruno Haible  <bruno@clisp.org>
81283         wcsncasecmp: Move AC_LIBOBJ invocations to module description.
81284         * m4/wcsncasecmp.m4 (gl_FUNC_WCSNCASECMP): Move AC_LIBOBJ invocation
81285         from here...
81286         * modules/wcsncasecmp (configure.ac): ... to here.
81288 2011-05-22  Bruno Haible  <bruno@clisp.org>
81290         wcslen: Move AC_LIBOBJ invocations to module description.
81291         * m4/wcslen.m4 (gl_FUNC_WCSLEN): Move AC_LIBOBJ invocation from here...
81292         * modules/wcslen (configure.ac): ... to here.
81294 2011-05-22  Bruno Haible  <bruno@clisp.org>
81296         wcsdup: Move AC_LIBOBJ invocations to module description.
81297         * m4/wcsdup.m4 (gl_FUNC_WCSDUP): Move AC_LIBOBJ invocation from here...
81298         * modules/wcsdup (configure.ac): ... to here.
81300 2011-05-22  Bruno Haible  <bruno@clisp.org>
81302         wcscspn: Move AC_LIBOBJ invocations to module description.
81303         * m4/wcscspn.m4 (gl_FUNC_WCSCSPN): Move AC_LIBOBJ invocation from
81304         here...
81305         * modules/wcscspn (configure.ac): ... to here.
81307 2011-05-22  Bruno Haible  <bruno@clisp.org>
81309         wcscpy: Move AC_LIBOBJ invocations to module description.
81310         * m4/wcscpy.m4 (gl_FUNC_WCSCPY): Move AC_LIBOBJ invocation from here...
81311         * modules/wcscpy (configure.ac): ... to here.
81313 2011-05-22  Bruno Haible  <bruno@clisp.org>
81315         wcscoll: Move AC_LIBOBJ invocations to module description.
81316         * m4/wcscoll.m4 (gl_FUNC_WCSCOLL): Move AC_LIBOBJ invocation from
81317         here...
81318         * modules/wcscoll (configure.ac): ... to here.
81320 2011-05-22  Bruno Haible  <bruno@clisp.org>
81322         wcscmp: Move AC_LIBOBJ invocations to module description.
81323         * m4/wcscmp.m4 (gl_FUNC_WCSCMP): Move AC_LIBOBJ invocation from here...
81324         * modules/wcscmp (configure.ac): ... to here.
81326 2011-05-22  Bruno Haible  <bruno@clisp.org>
81328         wcschr: Move AC_LIBOBJ invocations to module description.
81329         * m4/wcschr.m4 (gl_FUNC_WCSCHR): Move AC_LIBOBJ invocation from here...
81330         * modules/wcschr (configure.ac): ... to here.
81332 2011-05-22  Bruno Haible  <bruno@clisp.org>
81334         wcscat: Move AC_LIBOBJ invocations to module description.
81335         * m4/wcscat.m4 (gl_FUNC_WCSCAT): Move AC_LIBOBJ invocation from here...
81336         * modules/wcscat (configure.ac): ... to here.
81338 2011-05-22  Bruno Haible  <bruno@clisp.org>
81340         wcscasecmp: Move AC_LIBOBJ invocations to module description.
81341         * m4/wcscasecmp.m4 (gl_FUNC_WCSCASECMP): Move AC_LIBOBJ invocation from
81342         here...
81343         * modules/wcscasecmp (configure.ac): ... to here.
81345 2011-05-22  Bruno Haible  <bruno@clisp.org>
81347         wcrtomb: Move AC_LIBOBJ invocations to module description.
81348         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Move AC_LIBOBJ and gl_PREREQ_WCRTOMB
81349         invocations from here...
81350         * modules/wcrtomb (configure.ac): ... to here.
81352 2011-05-22  Bruno Haible  <bruno@clisp.org>
81354         wcpncpy: Move AC_LIBOBJ invocations to module description.
81355         * m4/wcpncpy.m4 (gl_FUNC_WCPNCPY): Move AC_LIBOBJ invocation from
81356         here...
81357         * modules/wcpncpy (configure.ac): ... to here.
81359 2011-05-22  Bruno Haible  <bruno@clisp.org>
81361         wcpcpy: Move AC_LIBOBJ invocations to module description.
81362         * m4/wcpcpy.m4 (gl_FUNC_WCPCPY): Move AC_LIBOBJ invocation from here...
81363         * modules/wcpcpy (configure.ac): ... to here.
81365 2011-05-22  Bruno Haible  <bruno@clisp.org>
81367         waitpid: Move AC_LIBOBJ invocations to module description.
81368         * m4/waitpid.m4 (gl_FUNC_WAITPID): Set HAVE_WAITPID. Move AC_LIBOBJ
81369         invocation from here...
81370         * modules/waitpid (configure.ac): ... to here.
81372 2011-05-22  Bruno Haible  <bruno@clisp.org>
81374         utimensat: Move AC_LIBOBJ invocations to module description.
81375         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Move AC_LIBOBJ invocations from
81376         here...
81377         * modules/utimensat (configure.ac): ... to here.
81379 2011-05-22  Bruno Haible  <bruno@clisp.org>
81381         usleep: Move AC_LIBOBJ invocations to module description.
81382         * m4/usleep.m4 (gl_FUNC_USLEEP): Move AC_LIBOBJ invocations from
81383         here...
81384         * modules/usleep (configure.ac): ... to here.
81386 2011-05-22  Bruno Haible  <bruno@clisp.org>
81388         unlockpt: Move AC_LIBOBJ invocations to module description.
81389         * m4/unlockpt.m4 (gl_FUNC_UNLOCKPT): Move AC_LIBOBJ and
81390         gl_PREREQ_UNLOCKPT invocations from here...
81391         * modules/unlockpt (configure.ac): ... to here.
81393 2011-05-22  Bruno Haible  <bruno@clisp.org>
81395         unlink: Respect rules for use of AC_LIBOBJ.
81396         * m4/unlink.m4 (gl_FUNC_UNLINK): Move AC_LIBOBJ invocation from here...
81397         * modules/unlink (configure.ac): ... to here.
81399 2011-05-22  Bruno Haible  <bruno@clisp.org>
81401         uname: Move AC_LIBOBJ invocations to module description.
81402         * m4/uname.m4 (gl_FUNC_UNAME): Call AC_CHECK_FUNCS instead of
81403         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_UNAME invocations from
81404         here...
81405         * modules/uname (configure.ac): ... to here.
81407 2011-05-22  Bruno Haible  <bruno@clisp.org>
81409         ttyname_r: Move AC_LIBOBJ invocations to module description.
81410         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Move AC_LIBOBJ and
81411         gl_PREREQ_TTYNAME_R invocations from here...
81412         * modules/ttyname_r (configure.ac): ... to here.
81414 2011-05-22  Bruno Haible  <bruno@clisp.org>
81416         tsearch: Move AC_LIBOBJ invocations to module description.
81417         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Move AC_LIBOBJ and gl_PREREQ_TSEARCH
81418         invocations from here...
81419         * modules/tsearch (configure.ac): ... to here.
81421 2011-05-22  Bruno Haible  <bruno@clisp.org>
81423         towctrans: Move AC_LIBOBJ invocations to module description.
81424         * m4/towctrans.m4 (gl_FUNC_TOWCTRANS): Set HAVE_TOWCTRANS. Move
81425         AC_LIBOBJ invocation from here...
81426         * modules/towctrans (configure.ac): ... to here.
81428 2011-05-22  Bruno Haible  <bruno@clisp.org>
81430         tmpfile: Move AC_LIBOBJ invocations to module description.
81431         * m4/tmpfile.m4 (gl_FUNC_TMPFILE): Move AC_LIBOBJ and gl_PREREQ_TMPFILE
81432         invocations from here...
81433         * modules/tmpfile (configure.ac): ... to here.
81435 2011-05-22  Bruno Haible  <bruno@clisp.org>
81437         times: Move AC_LIBOBJ invocations to module description.
81438         * m4/times.m4 (gl_FUNC_TIMES): Move AC_LIBOBJ invocation from here...
81439         * modules/times (configure.ac): ... to here.
81441 2011-05-22  Bruno Haible  <bruno@clisp.org>
81443         time_r: Move AC_LIBOBJ invocations to module description.
81444         * m4/time_r.m4 (gl_TIME_R): Move AC_LIBOBJ and gl_PREREQ_TIME_R
81445         invocations from here...
81446         * modules/time_r (configure.ac): ... to here.
81448 2011-05-22  Bruno Haible  <bruno@clisp.org>
81450         timegm: Move AC_LIBOBJ invocations to module description.
81451         * m4/timegm.m4 (gl_FUNC_TIMEGM): Move AC_LIBOBJ and gl_PREREQ_TIMEGM
81452         invocations from here...
81453         * modules/timegm (configure.ac): ... to here.
81455 2011-05-22  Bruno Haible  <bruno@clisp.org>
81457         tcgetsid: Move AC_LIBOBJ invocations to module description.
81458         * m4/tcgetsid.m4 (gl_FUNC_TCGETSID): Set HAVE_TCGETSID. Move AC_LIBOBJ
81459         and gl_PREREQ_TCGETSID invocations from here...
81460         * modules/tcgetsid (configure.ac): ... to here.
81461         (Depends-on): Update conditions.
81463 2011-05-22  Bruno Haible  <bruno@clisp.org>
81465         symlinkat: Move AC_LIBOBJ invocations to module description.
81466         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Move AC_LIBOBJ invocation from
81467         here...
81468         * modules/symlinkat (configure.ac): ... to here.
81470 2011-05-22  Bruno Haible  <bruno@clisp.org>
81472         symlink: Move AC_LIBOBJ invocations to module description.
81473         * m4/symlink.m4 (gl_FUNC_SYMLINK): Move AC_LIBOBJ invocations from
81474         here...
81475         * modules/symlink (configure.ac): ... to here.
81477 2011-05-22  Bruno Haible  <bruno@clisp.org>
81479         strverscmp: Move AC_LIBOBJ invocations to module description.
81480         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP): Call AC_CHECK_FUNCS instead of
81481         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STRVERSCMP invocations
81482         from here...
81483         * modules/strverscmp (configure.ac): ... to here.
81485 2011-05-22  Bruno Haible  <bruno@clisp.org>
81487         strtok_r: Move AC_LIBOBJ invocations to module description.
81488         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_STRTOK_R. Move AC_LIBOBJ
81489         and gl_PREREQ_STRTOK_R invocations from here...
81490         * modules/strtok_r (configure.ac): ... to here.
81491         (Depends-on): Update conditions.
81493 2011-05-22  Bruno Haible  <bruno@clisp.org>
81495         strtoumax: Move AC_LIBOBJ invocations to module description.
81496         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Call AC_CHECK_FUNCS instead of
81497         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STRTOUMAX invocations
81498         from here...
81499         * modules/strtoumax (configure.ac): ... to here.
81501 2011-05-22  Bruno Haible  <bruno@clisp.org>
81503         strtoimax: Move AC_LIBOBJ invocations to module description.
81504         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Call AC_CHECK_FUNCS instead of
81505         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STRTOIMAX invocations
81506         from here...
81507         * modules/strtoimax (configure.ac): ... to here.
81509 2011-05-22  Bruno Haible  <bruno@clisp.org>
81511         strtoull: Move AC_LIBOBJ invocations to module description.
81512         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Call AC_CHECK_FUNCS instead of
81513         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STRTOULL invocations
81514         from here...
81515         * modules/strtoull (configure.ac): ... to here.
81517 2011-05-22  Bruno Haible  <bruno@clisp.org>
81519         strtoll: Move AC_LIBOBJ invocations to module description.
81520         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Call AC_CHECK_FUNCS instead of
81521         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STRTOLL invocations from
81522         here...
81523         * modules/strtoll (configure.ac): ... to here.
81525 2011-05-22  Bruno Haible  <bruno@clisp.org>
81527         strtoul: Move AC_LIBOBJ invocations to module description.
81528         * m4/strtoul.m4 (gl_FUNC_STRTOUL): Call AC_CHECK_FUNCS instead of
81529         AC_REPLACE_FUNCS. Move AC_LIBOBJ invocation from here...
81530         * modules/strtoul (configure.ac): ... to here.
81532 2011-05-22  Bruno Haible  <bruno@clisp.org>
81534         strtol: Move AC_LIBOBJ invocations to module description.
81535         * m4/strtol.m4 (gl_FUNC_STRTOL): Call AC_CHECK_FUNCS instead of
81536         AC_REPLACE_FUNCS. Move AC_LIBOBJ invocation from here...
81537         * modules/strtol (configure.ac): ... to here.
81539 2011-05-22  Bruno Haible  <bruno@clisp.org>
81541         strtod: Move AC_LIBOBJ invocations to module description.
81542         * m4/strtod.m4 (gl_FUNC_STRTOD): Move AC_LIBOBJ and gl_PREREQ_STRTOD
81543         invocations from here...
81544         * modules/strtod (configure.ac): ... to here.
81546 2011-05-22  Bruno Haible  <bruno@clisp.org>
81548         strstr*: Move AC_LIBOBJ invocations to module description.
81549         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE, gl_FUNC_STRSTR): Move AC_LIBOBJ
81550         invocations from here...
81551         * modules/strstr-simple (configure.ac): ... to here.
81552         * modules/strstr (configure.ac): ... and here.
81554 2011-05-22  Bruno Haible  <bruno@clisp.org>
81556         strsignal: Move AC_LIBOBJ invocations to module description.
81557         * m4/strsignal.m4 (gl_FUNC_STRSIGNAL): Set HAVE_STRSIGNAL. Move
81558         AC_LIBOBJ and gl_PREREQ_STRSIGNAL invocations from here...
81559         * modules/strsignal (configure.ac): ... to here.
81560         (Depends-on): Update conditions.
81562 2011-05-22  Bruno Haible  <bruno@clisp.org>
81564         strsep: Move AC_LIBOBJ invocations to module description.
81565         * m4/strsep.m4 (gl_FUNC_STRSEP): Call AC_CHECK_FUNCS instead of
81566         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STRSEP invocations from
81567         here...
81568         * modules/strsep (configure.ac): ... to here.
81570 2011-05-22  Bruno Haible  <bruno@clisp.org>
81572         strptime: Move AC_LIBOBJ invocations to module description.
81573         * m4/strptime.m4 (gl_FUNC_STRPTIME): Move AC_LIBOBJ and
81574         gl_PREREQ_STRPTIME invocations from here...
81575         * modules/strptime (configure.ac): ... to here.
81577 2011-05-22  Bruno Haible  <bruno@clisp.org>
81579         strpbrk: Move AC_LIBOBJ invocations to module description.
81580         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Call AC_CHECK_FUNCS instead of
81581         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STRPBRK invocations from
81582         here...
81583         * modules/strpbrk (configure.ac): ... to here.
81585 2011-05-22  Bruno Haible  <bruno@clisp.org>
81587         strnlen: Move AC_LIBOBJ invocations to module description.
81588         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Move AC_LIBOBJ and gl_PREREQ_STRNLEN
81589         invocations from here...
81590         * modules/strnlen (configure.ac): ... to here.
81592 2011-05-22  Bruno Haible  <bruno@clisp.org>
81594         strndup: Move AC_LIBOBJ invocations to module description.
81595         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_STRNDUP. Move AC_LIBOBJ
81596         invocations from here...
81597         * modules/strndup (configure.ac): ... to here.
81598         (Depends-on): Update conditions.
81600 2011-05-22  Bruno Haible  <bruno@clisp.org>
81602         strncat: Move AC_LIBOBJ invocations to module description.
81603         * m4/strncat.m4 (gl_FUNC_STRNCAT): Move AC_LIBOBJ and gl_PREREQ_STRNCAT
81604         invocations from here...
81605         * modules/strncat (configure.ac): ... to here.
81607 2011-05-22  Bruno Haible  <bruno@clisp.org>
81609         strdup, strdup-posix: Move AC_LIBOBJ invocations to module description.
81610         * m4/strdup.m4 (gl_FUNC_STRDUP): Move AC_LIBOBJ and gl_PREREQ_STRDUP
81611         invocations from here...
81612         * modules/strdup (configure.ac): ... to here.
81613         * modules/strdup-posix (configure.ac): ... and here.
81615 2011-05-22  Bruno Haible  <bruno@clisp.org>
81617         strcspn: Move AC_LIBOBJ invocations to module description.
81618         * m4/strcspn.m4 (gl_FUNC_STRCSPN): Call AC_CHECK_FUNCS instead of
81619         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STRCSPN invocations from
81620         here...
81621         * modules/strcspn (configure.ac): ... to here.
81623 2011-05-22  Bruno Haible  <bruno@clisp.org>
81625         strchrnul: Move AC_LIBOBJ invocations to module description.
81626         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Move AC_LIBOBJ and
81627         gl_PREREQ_STRCHRNUL invocations from here...
81628         * modules/strchrnul (configure.ac): ... to here.
81630 2011-05-22  Bruno Haible  <bruno@clisp.org>
81632         strcasestr*: Move AC_LIBOBJ invocations to module description.
81633         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE, gl_FUNC_STRCASESTR):
81634         Move AC_LIBOBJ and gl_PREREQ_STRCASESTR invocations from here...
81635         * modules/strcasestr-simple (configure.ac): ... to here.
81636         * modules/strcasestr (configure.ac): ... and here.
81638 2011-05-22  Bruno Haible  <bruno@clisp.org>
81640         strcase: Move AC_LIBOBJ invocations to module description.
81641         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Set HAVE_STRNCASECMP.
81642         (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Call AC_CHECK_FUNCS instead
81643         of AC_REPLACE_FUNCS. Move AC_LIBOBJ, gl_PREREQ_STRCASECMP,
81644         gl_PREREQ_STRNCASECMP invocations from here...
81645         * modules/strcase (configure.ac): ... to here.
81647 2011-05-22  Bruno Haible  <bruno@clisp.org>
81649         stpncpy: Move AC_LIBOBJ invocations to module description.
81650         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Move AC_LIBOBJ invocations from
81651         here...
81652         * modules/stpncpy (configure.ac): ... to here.
81654 2011-05-22  Bruno Haible  <bruno@clisp.org>
81656         stpcpy: Move AC_LIBOBJ invocations to module description.
81657         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Call AC_CHECK_FUNCS instead of
81658         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STPCPY invocations from
81659         here...
81660         * modules/stpcpy (configure.ac): ... to here.
81662 2011-05-21  Bruno Haible  <bruno@clisp.org>
81664         stat: Move AC_LIBOBJ invocations to module description.
81665         * m4/stat.m4 (gl_PREREQ_STAT): New macro, extracted from gl_FUNC_STAT.
81666         (gl_FUNC_STAT): Move AC_LIBOBJ and gl_PREREQ_STAT invocations from
81667         here...
81668         * modules/stat (configure.ac): ... to here.
81670 2011-05-21  Bruno Haible  <bruno@clisp.org>
81672         sleep: Move AC_LIBOBJ invocations to module description.
81673         * m4/sleep.m4 (gl_FUNC_SLEEP): Move AC_LIBOBJ invocations from here...
81674         * modules/sleep (configure.ac): ... to here.
81676 2011-05-21  Bruno Haible  <bruno@clisp.org>
81678         signbit: Move AC_LIBOBJ invocations to module description.
81679         * m4/signbit.m4 (gl_SIGNBIT): Move AC_LIBOBJ invocations from here...
81680         * modules/signbit (configure.ac): ... to here.
81682 2011-05-21  Bruno Haible  <bruno@clisp.org>
81684         sigprocmask: Move AC_LIBOBJ invocations to module description.
81685         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Move AC_LIBOBJ and
81686         gl_PREREQ_SIGPROMASK invocations from here...
81687         * modules/sigprocmask (configure.ac): ... to here.
81689 2011-05-21  Bruno Haible  <bruno@clisp.org>
81691         sigaction: Move AC_LIBOBJ invocations to module description.
81692         * m4/sigaction.m4 (gl_SIGACTION): Move AC_LIBOBJ and
81693         gl_PREREQ_SIGACTION invocations from here...
81694         * modules/sigaction (configure.ac): ... to here.
81696 2011-05-21  Bruno Haible  <bruno@clisp.org>
81698         sig2str: Move AC_LIBOBJ invocations to module description.
81699         * m4/sig2str.m4 (gl_FUNC_SIG2STR): Call AC_CHECK_FUNCS instead of
81700         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_SIG2STR invocations from
81701         here...
81702         * modules/sig2str (configure.ac): ... to here.
81704 2011-05-21  Bruno Haible  <bruno@clisp.org>
81706         setlocale: Move AC_LIBOBJ invocations to module description.
81707         * m4/setlocale.m4 (gl_FUNC_SETLOCALE): Move AC_LIBOBJ and
81708         gl_PREREQ_SETLOCALE invocations from here...
81709         * modules/setlocale (configure.ac): ... to here.
81711 2011-05-21  Bruno Haible  <bruno@clisp.org>
81713         unsetenv: Move AC_LIBOBJ invocations to module description.
81714         * m4/setenv.m4 (gl_FUNC_UNSETENV): Set HAVE_UNSETENV. Move AC_LIBOBJ
81715         and gl_PREREQ_UNSETENV invocations from here...
81716         * modules/unsetenv (configure.ac): ... to here.
81717         (Depends-on): Update.
81719 2011-05-21  Bruno Haible  <bruno@clisp.org>
81721         setenv: Move AC_LIBOBJ invocations to module description.
81722         * m4/setenv.m4 (gl_FUNC_SETENV): Move AC_LIBOBJ invocations from
81723         here...
81724         * modules/setenv (configure.ac): ... to here.
81726 2011-05-21  Bruno Haible  <bruno@clisp.org>
81728         selinux-h: Move AC_LIBOBJ invocations to module description.
81729         * m4/selinux-selinux-h.m4 (gl_HEADERS_SELINUX_SELINUX_H): Move
81730         AC_LIBOBJ invocation from here...
81731         * modules/selinux-h (configure.ac): ... to here.
81733 2011-05-21  Bruno Haible  <bruno@clisp.org>
81735         select: Respect rules for use of AC_LIBOBJ.
81736         * m4/select.m4 (gl_FUNC_SELECT): Move AC_LIBOBJ invocations from
81737         here...
81738         * modules/select (configure.ac): ... to here.
81740 2011-05-21  Bruno Haible  <bruno@clisp.org>
81742         scandir: Move AC_LIBOBJ invocations to module description.
81743         * m4/scandir.m4 (gl_FUNC_SCANDIR): Move AC_LIBOBJ and gl_PREREQ_SCANDIR
81744         invocations from here...
81745         * modules/scandir (configure.ac): ... to here.
81747 2011-05-21  Bruno Haible  <bruno@clisp.org>
81749         rpmatch: Move AC_LIBOBJ invocations to module description.
81750         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Call AC_CHECK_FUNCS instead of
81751         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_RPMATCH invocations from
81752         here...
81753         * modules/rpmatch (configure.ac): ... to here.
81755 2011-05-21  Bruno Haible  <bruno@clisp.org>
81757         rmdir: Respect rules for use of AC_LIBOBJ.
81758         * m4/rmdir.m4 (gl_FUNC_RMDIR): Move AC_LIBOBJ invocation from here...
81759         * modules/rmdir (configure.ac): ... to here.
81761 2011-05-21  Bruno Haible  <bruno@clisp.org>
81763         renameat: Move AC_LIBOBJ invocations to module description.
81764         * m4/renameat.m4 (gl_FUNC_RENAMEAT): Move AC_LIBOBJ invocations from
81765         here...
81766         * modules/renameat (configure.ac): ... to here.
81768 2011-05-21  Bruno Haible  <bruno@clisp.org>
81770         rename: Respect rules for use of AC_LIBOBJ.
81771         * m4/rename.m4 (gl_FUNC_RENAME): Move AC_LIBOBJ invocations from
81772         here...
81773         * modules/rename (configure.ac): ... to here.
81775 2011-05-21  Bruno Haible  <bruno@clisp.org>
81777         remove: Move AC_LIBOBJ invocations to module description.
81778         * m4/remove.m4 (gl_FUNC_REMOVE): Move AC_LIBOBJ invocations from
81779         here...
81780         * modules/remove (configure.ac): ... to here.
81782 2011-05-21  Bruno Haible  <bruno@clisp.org>
81784         relocatable-lib: Move AC_LIBOBJ invocations to module description.
81785         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_SEPARATE): Remove
81786         macro.
81787         (gl_RELOCATABLE_LIBRARY): Move AC_LIBOBJ invocation from here...
81788         * modules/relocatable-lib (configure.ac): ... to here.
81789         * modules/relocatable-prog-wrapper (configure.ac): Invoke
81790         gl_RELOCATABLE_LIBRARY instead of gl_RELOCATABLE_LIBRARY_SEPARATE.
81792 2011-05-21  Bruno Haible  <bruno@clisp.org>
81794         relocatable-prog: Move AC_LIBOBJ invocations to module description.
81795         * m4/relocatable.m4 (gl_RELOCATABLE): Move AC_LIBOBJ invocation from
81796         here...
81797         * modules/relocatable-prog (configure.ac): ... to here.
81799 2011-05-21  Bruno Haible  <bruno@clisp.org>
81801         regex: Move AC_LIBOBJ invocations to module description.
81802         * m4/regex.m4 (gl_REGEX): Move AC_LIBOBJ and gl_PREREQ_REGEX
81803         invocations from here...
81804         * modules/regex (configure.ac): ... to here.
81806 2011-05-21  Bruno Haible  <bruno@clisp.org>
81808         realloc-*: Move AC_LIBOBJ invocations to module description.
81809         * m4/realloc.m4 (gl_REPLACE_REALLOC): Remove macro.
81810         (gl_FUNC_REALLOC_GNU, gl_FUNC_REALLOC_POSIX): Inline it here. Move
81811         AC_LIBOBJ invocations from here...
81812         * modules/realloc-gnu (configure.ac): ... to here.
81813         * modules/realloc-posix (configure.ac): ... and here.
81815 2011-05-21  Bruno Haible  <bruno@clisp.org>
81817         readutmp: Move AC_LIBOBJ invocations to module description.
81818         * m4/readutmp.m4 (gl_READUTMP): Move AC_LIBOBJ invocation from here...
81819         * modules/readutmp (configure.ac): ... to here.
81821 2011-05-21  Bruno Haible  <bruno@clisp.org>
81823         readlinkat: Move AC_LIBOBJ invocations to module description.
81824         * m4/readlinkat.m4 (gl_FUNC_READLINKAT): Move AC_LIBOBJ invocation from
81825         here...
81826         * modules/readlinkat (configure.ac): ... to here.
81828 2011-05-21  Bruno Haible  <bruno@clisp.org>
81830         readlink: Move AC_LIBOBJ invocations to module description.
81831         * m4/readlink.m4 (gl_FUNC_READLINK): Move AC_LIBOBJ and
81832         gl_PREREQ_READLINK invocations from here...
81833         * modules/readlink (configure.ac): ... to here.
81835 2011-05-21  Bruno Haible  <bruno@clisp.org>
81837         readline: Move AC_LIBOBJ invocations to module description.
81838         * m4/readline.m4 (gl_FUNC_READLINE): Move AC_LIBOBJ and
81839         gl_PREREQ_READLINE invocations from here...
81840         * modules/readline (configure.ac): ... to here.
81842 2011-05-21  Bruno Haible  <bruno@clisp.org>
81844         read: Move AC_LIBOBJ invocations to module description.
81845         * m4/read.m4 (gl_FUNC_READ): Move AC_LIBOBJ invocation from here...
81846         * modules/read (configure.ac): ... to here.
81848 2011-05-21  Bruno Haible  <bruno@clisp.org>
81850         rawmemchr: Move AC_LIBOBJ invocations to module description.
81851         * m4/rawmemchr.m4 (gl_FUNC_RAWMEMCHR): Call AC_CHECK_FUNCS instead of
81852         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_RAWMEMCHR invocations
81853         from here...
81854         * modules/rawmemchr (configure.ac): ... to here.
81856 2011-05-21  Bruno Haible  <bruno@clisp.org>
81858         random_r: Move AC_LIBOBJ invocations to module description.
81859         * m4/random_r.m4 (gl_FUNC_RANDOM_R): Move AC_LIBOBJ and
81860         gl_PREREQ_RANDOM_R invocations from here...
81861         * modules/random_r (configure.ac): ... to here.
81863 2011-05-21  Bruno Haible  <bruno@clisp.org>
81865         pwrite: Move AC_LIBOBJ invocations to module description.
81866         * m4/pwrite.m4 (gl_FUNC_PWRITE): Move AC_LIBOBJ invocation from here...
81867         * modules/pwrite (configure.ac): ... to here.
81869 2011-05-21  Bruno Haible  <bruno@clisp.org>
81871         putenv: Move AC_LIBOBJ invocations to module description.
81872         * m4/putenv.m4 (gl_FUNC_PUTENV): Move AC_LIBOBJ invocation from here...
81873         * modules/putenv (configure.ac): ... to here.
81875 2011-05-21  Bruno Haible  <bruno@clisp.org>
81877         login_tty: Move AC_LIBOBJ invocations to module description.
81878         * m4/pty.m4 (gl_FUNC_LOGIN_TTY): Move AC_LIBOBJ invocation from here...
81879         * modules/login_tty (configure.ac): ... to here.
81881 2011-05-21  Bruno Haible  <bruno@clisp.org>
81883         openpty: Move AC_LIBOBJ invocations to module description.
81884         * m4/pty.m4 (gl_FUNC_OPENPTY): Move AC_LIBOBJ invocations from here...
81885         * modules/openpty (configure.ac): ... to here.
81887 2011-05-21  Bruno Haible  <bruno@clisp.org>
81889         forkpty: Move AC_LIBOBJ invocations to module description.
81890         * m4/pty.m4 (gl_FUNC_FORKPTY): Move AC_LIBOBJ invocations from here...
81891         * modules/forkpty (configure.ac): ... to here.
81893 2011-05-21  Bruno Haible  <bruno@clisp.org>
81895         ptsname: Move AC_LIBOBJ invocations to module description.
81896         * m4/ptsname.m4 (gl_FUNC_PTSNAME): Move AC_LIBOBJ and gl_PREREQ_PTSNAME
81897         invocations from here...
81898         * modules/ptsname (configure.ac): ... to here.
81900 2011-05-21  Bruno Haible  <bruno@clisp.org>
81902         pread: Move AC_LIBOBJ invocations to module description.
81903         * m4/pread.m4 (gl_FUNC_PREAD): Move AC_LIBOBJ invocation from here...
81904         * modules/pread (configure.ac): ... to here.
81906 2011-05-21  Bruno Haible  <bruno@clisp.org>
81908         posix_spawn*: Move AC_LIBOBJ invocations to module description.
81909         * m4/posix_spawn.m4 (gl_PREREQ_POSIX_SPAWN_INTERNAL): Renamed from
81910         gl_POSIX_SPAWN_INTERNAL. Move AC_LIBOBJ invocation from here...
81911         * modules/posix_spawn (configure.ac): ... to here.
81912         * modules/posix_spawnp (configure.ac): ... and here.
81914 2011-05-21  Bruno Haible  <bruno@clisp.org>
81916         popen: Move AC_LIBOBJ invocations to module description.
81917         * m4/popen.m4 (gl_FUNC_POPEN): Move AC_LIBOBJ and gl_PREREQ_POPEN
81918         invocations from here...
81919         * modules/popen (configure.ac): ... to here.
81921 2011-05-21  Bruno Haible  <bruno@clisp.org>
81923         poll: Move AC_LIBOBJ invocations to module description.
81924         * m4/poll.m4 (gl_FUNC_POLL): Move AC_LIBOBJ and gl_PREREQ_POLL
81925         invocations from here...
81926         * modules/poll (configure.ac): ... to here.
81928 2011-05-21  Bruno Haible  <bruno@clisp.org>
81930         pipe-posix: Move AC_LIBOBJ invocations to module description.
81931         * m4/pipe.m4 (gl_FUNC_PIPE): Move AC_LIBOBJ invocation from here...
81932         * modules/pipe-posix (configure.ac): ... to here.
81934 2011-05-21  Bruno Haible  <bruno@clisp.org>
81936         openat: Respect rules for use of AC_LIBOBJ.
81937         * m4/openat.m4 (gl_FUNC_OPENAT): Call AC_CHECK_FUNCS instead of
81938         AC_REPLACE_FUNCS. Move AC_LIBOBJ invocations from here...
81939         * modules/openat (configure.ac): ... to here.
81941 2011-05-21  Bruno Haible  <bruno@clisp.org>
81943         obstack-printf*: Move AC_LIBOBJ invocations to module description.
81944         * m4/obstack-printf.m4 (gl_REPLACE_OBSTACK_PRINTF): Move AC_LIBOBJ
81945         invocation from here...
81946         * modules/obstack-printf (configure.ac): ... to here.
81947         * modules/obstack-printf-posix (configure.ac): ... and here.
81949 2011-05-21  Bruno Haible  <bruno@clisp.org>
81951         nl_langinfo: Move AC_LIBOBJ invocations to module description.
81952         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Move AC_LIBOBJ invocations
81953         from here...
81954         * modules/nl_langinfo (configure.ac): ... to here.
81956 2011-05-21  Bruno Haible  <bruno@clisp.org>
81958         nanosleep: Move AC_LIBOBJ invocations to module description.
81959         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Move AC_LIBOBJ and
81960         gl_PREREQ_NANOSLEEP invocations from here...
81961         * modules/nanosleep (configure.ac): ... to here.
81963 2011-05-21  Bruno Haible  <bruno@clisp.org>
81965         mountlist: Move AC_LIBOBJ invocations to module description.
81966         * m4/mountlist.m4 (gl_MOUNTLIST): Move AC_LIBOBJ and
81967         gl_PREREQ_MOUNTLIST_EXTRA invocations from here...
81968         * modules/mountlist (configure.ac): ... to here.
81970 2011-05-21  Bruno Haible  <bruno@clisp.org>
81972         mktime: Respect rules for use of AC_LIBOBJ.
81973         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove macro.
81974         (gl_FUNC_MKTIME): Inline it here. Set gl_cv_func_working_mktime. Move
81975         AC_LIBOBJ and gl_PREREQ_MKTIME invocations from here...
81976         (gl_FUNC_MKTIME_INTERNAL): ... and here...
81977         * modules/mktime (configure.ac): ... to here.
81978         * modules/mktime-internal (configure.ac): ... and here.
81979         * m4/timegm.m4 (gl_FUNC_TIMEGM): Update.
81981 2011-05-21  Bruno Haible  <bruno@clisp.org>
81983         mkstemps: Move AC_LIBOBJ invocations to module description.
81984         * m4/mkstemps.m4 (gl_FUNC_MKSTEMPS): Move AC_LIBOBJ invocation from
81985         here...
81986         * modules/mkstemps (configure.ac): ... to here.
81988 2011-05-21  Bruno Haible  <bruno@clisp.org>
81990         mkstemp: Move AC_LIBOBJ invocations to module description.
81991         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Move AC_LIBOBJ and
81992         gl_PREREQ_MKSTEMP invocations from here...
81993         * modules/mkstemp (configure.ac): ... to here.
81995 2011-05-21  Bruno Haible  <bruno@clisp.org>
81997         mkostemps: Move AC_LIBOBJ invocations to module description.
81998         * m4/mkostemps.m4 (gl_FUNC_MKOSTEMPS): Move AC_LIBOBJ invocation from
81999         here...
82000         * modules/mkostemps (configure.ac): ... to here.
82002 2011-05-21  Bruno Haible  <bruno@clisp.org>
82004         mkostemp: Move AC_LIBOBJ invocations to module description.
82005         * m4/mkostemp.m4 (gl_FUNC_MKOSTEMP): Move AC_LIBOBJ and
82006         gl_PREREQ_MKOSTEMP invocations from here...
82007         * modules/mkostemp (configure.ac): ... to here.
82009 2011-05-21  Bruno Haible  <bruno@clisp.org>
82011         mknod: Move AC_LIBOBJ invocations to module description.
82012         * m4/mknod.m4 (gl_FUNC_MKNOD): Move AC_LIBOBJ invocations from here...
82013         * modules/mknod (configure.ac): ... to here.
82015 2011-05-21  Bruno Haible  <bruno@clisp.org>
82017         mkfifoat: Move AC_LIBOBJ invocations to module description.
82018         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Move AC_LIBOBJ invocations from
82019         here...
82020         * modules/mkfifoat (configure.ac): ... to here.
82022 2011-05-21  Bruno Haible  <bruno@clisp.org>
82024         mkfifo: Respect rules for use of AC_LIBOBJ.
82025         * m4/mkfifo.m4 (gl_FUNC_MKFIFO): Move AC_LIBOBJ invocations from
82026         here...
82027         * modules/mkfifo (configure.ac): ... to here.
82029 2011-05-21  Bruno Haible  <bruno@clisp.org>
82031         mkdtemp: Move AC_LIBOBJ invocations to module description.
82032         * m4/mkdtemp.m4 (gl_FUNC_MKDTEMP): Move AC_LIBOBJ and gl_PREREQ_MKDTEMP
82033         invocations from here...
82034         * modules/mkdtemp (configure.ac): ... to here.
82036 2011-05-21  Bruno Haible  <bruno@clisp.org>
82038         mkdir: Move AC_LIBOBJ invocations to module description.
82039         * m4/mkdir.m4 (gl_FUNC_MKDIR): Move AC_LIBOBJ invocations from here...
82040         * modules/mkdir (configure.ac): ... to here.
82042 2011-05-21  Bruno Haible  <bruno@clisp.org>
82044         memset: Move AC_LIBOBJ invocations to module description.
82045         * m4/memset.m4 (gl_FUNC_MEMSET): Call AC_CHECK_FUNCS instead of
82046         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_MEMSET invocations from
82047         here...
82048         * modules/memset (configure.ac): ... to here.
82050 2011-05-21  Bruno Haible  <bruno@clisp.org>
82052         memrchr: Move AC_LIBOBJ invocations to module description.
82053         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Call AC_CHECK_FUNCS instead of
82054         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_MEMRCHR invocations from
82055         here...
82056         * modules/memrchr (configure.ac): ... to here.
82058 2011-05-21  Bruno Haible  <bruno@clisp.org>
82060         mempcpy: Move AC_LIBOBJ invocations to module description.
82061         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Call AC_CHECK_FUNCS instead of
82062         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_MEMPCPY invocations from
82063         here...
82064         * modules/mempcpy (configure.ac): ... to here.
82066 2011-05-21  Bruno Haible  <bruno@clisp.org>
82068         memmove: Move AC_LIBOBJ invocations to module description.
82069         * m4/memmove.m4 (gl_FUNC_MEMMOVE): Call AC_CHECK_FUNCS instead of
82070         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_MEMMOVE invocations from
82071         here...
82072         * modules/memmove (configure.ac): ... to here.
82074 2011-05-21  Bruno Haible  <bruno@clisp.org>
82076         memmem*: Move AC_LIBOBJ invocations to module description.
82077         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): Call AC_CHECK_FUNCS instead of
82078         AC_REPLACE_FUNCS. Set HAVE_MEMMEM. Move AC_LIBOBJ invocations from
82079         here...
82080         (gl_FUNC_MEMMEM): ... and here...
82081         * modules/memmem-simple (configure.ac): ... to here.
82082         * modules/memmem (configure.ac): ... and here.
82084 2011-05-21  Bruno Haible  <bruno@clisp.org>
82086         memcpy: Move AC_LIBOBJ invocations to module description.
82087         * m4/memcpy.m4 (gl_FUNC_MEMCPY): Call AC_CHECK_FUNCS instead of
82088         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_MEMCPY invocations from
82089         here...
82090         * modules/memcpy (configure.ac): ... to here.
82092 2011-05-21  Bruno Haible  <bruno@clisp.org>
82094         memcmp: Simplify autoconf macro.
82095         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Merge the cross-compilation code into
82096         the AC_RUN_IFELSE invocation. Set gl_func_memcmp.
82097         * modules/memcmp (Depends-on, configure.ac): Test gl_func_memcmp.
82099 2011-05-21  Bruno Haible  <bruno@clisp.org>
82101         memcmp: Move AC_LIBOBJ invocations to module description.
82102         * m4/memcmp.m4 (AC_FUNC_MEMCMP): Remove macro.
82103         (gl_FUNC_MEMCMP): Inline it here. Set gl_cv_func_memcmp_working. Move
82104         AC_LIBOBJ and gl_PREREQ_MEMCMP invocations from here...
82105         * modules/memcmp (configure.ac): ... to here.
82106         (Depends-on): Update conditions.
82108 2011-05-21  Bruno Haible  <bruno@clisp.org>
82110         memchr: Respect rules for use of AC_LIBOBJ.
82111         * m4/memchr.m4 (gl_FUNC_MEMCHR): Move AC_LIBOBJ and gl_PREREQ_MEMCHR
82112         invocations from here...
82113         * modules/memchr (configure.ac): ... to here.
82115 2011-05-21  Bruno Haible  <bruno@clisp.org>
82117         mbtowc: Move AC_LIBOBJ invocations to module description.
82118         * m4/mbtowc.m4 (gl_FUNC_MBTOWC): Move AC_LIBOBJ and gl_PREREQ_MBTOWC
82119         invocations from here...
82120         * modules/mbtowc (configure.ac): ... to here.
82122 2011-05-21  Bruno Haible  <bruno@clisp.org>
82124         mbsrtowcs: Move AC_LIBOBJ invocations to module description.
82125         * m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS): Move AC_LIBOBJ and
82126         gl_PREREQ_MBSRTOWCS invocations from here...
82127         * modules/mbsrtowcs (configure.ac): ... to here.
82129 2011-05-21  Bruno Haible  <bruno@clisp.org>
82131         mbsnrtowcs: Move AC_LIBOBJ invocations to module description.
82132         * m4/mbsnrtowcs.m4 (gl_FUNC_MBSNRTOWCS): Move AC_LIBOBJ and
82133         gl_PREREQ_MBSNRTOWCS invocations from here...
82134         * modules/mbsnrtowcs (configure.ac): ... to here.
82136 2011-05-21  Bruno Haible  <bruno@clisp.org>
82138         mbsinit: Move AC_LIBOBJ invocations to module description.
82139         * m4/mbsinit.m4 (gl_FUNC_MBSINIT): Move AC_LIBOBJ and gl_PREREQ_MBSINIT
82140         invocations from here...
82141         * modules/mbsinit (configure.ac): ... to here.
82143 2011-05-21  Bruno Haible  <bruno@clisp.org>
82145         mbrlen: Move AC_LIBOBJ invocations to module description.
82146         * m4/mbrlen.m4 (gl_FUNC_MBRLEN): Move AC_LIBOBJ and gl_PREREQ_MBRLEN
82147         invocations from here...
82148         * modules/mbrlen (configure.ac): ... to here.
82150 2011-05-21  Bruno Haible  <bruno@clisp.org>
82152         mbrtowc: Respect rules for use of AC_LIBOBJ.
82153         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Move AC_LIBOBJ and gl_PREREQ_MBRTOWC
82154         invocations from here...
82155         * modules/mbrtowc (configure.ac): ... to here.
82157 2011-05-21  Bruno Haible  <bruno@clisp.org>
82159         malloc-*: Move AC_LIBOBJ invocations to module description.
82160         * m4/malloc.m4 (gl_REPLACE_MALLOC): Remove macro.
82161         (gl_FUNC_MALLOC_GNU, gl_FUNC_MALLOC_POSIX): Inline it here. Move
82162         AC_LIBOBJ invocations from here...
82163         * modules/malloc-gnu (configure.ac): ... to here.
82164         * modules/malloc-posix (configure.ac): ... and here.
82166 2011-05-21  Bruno Haible  <bruno@clisp.org>
82168         lstat, openat: Respect rules for use of AC_LIBOBJ.
82169         * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Renamed from
82170         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK. Set variable
82171         gl_cv_func_lstat_dereferences_slashed_symlink. Don't invoke AC_LIBOBJ.
82172         (gl_PREREQ_LSTAT): New macro, extracted from gl_FUNC_LSTAT.
82173         (gl_FUNC_LSTAT): Update. Remove gl_PREREQ_LSTAT code.
82174         * modules/lstat (configure.ac): Invoke AC_LIBOBJ and gl_PREREQ_LSTAT
82175         here.
82176         * m4/openat.m4 (gl_FUNC_OPENAT): Update.
82178 2011-05-21  Bruno Haible  <bruno@clisp.org>
82180         lseek: Move AC_LIBOBJ invocations to module description.
82181         * m4/lseek.m4 (gl_REPLACE_LSEEK): Remove macro.
82182         (gl_FUNC_LSEEK): Inline it here. Move AC_LIBOBJ invocation from here...
82183         * modules/lseek (configure.ac): ... to here.
82185 2011-05-21  Bruno Haible  <bruno@clisp.org>
82187         linkat: Move AC_LIBOBJ invocations to module description.
82188         * m4/linkat.m4 (gl_FUNC_LINKAT): Move AC_LIBOBJ invocations from
82189         here...
82190         * modules/linkat (configure.ac): ... to here.
82192 2011-05-21  Bruno Haible  <bruno@clisp.org>
82194         link: Respect rules for use of AC_LIBOBJ.
82195         * m4/link.m4 (gl_FUNC_LINK): Move AC_LIBOBJ invocations from here...
82196         * modules/link (configure.ac): ... to here.
82198 2011-05-21  Bruno Haible  <bruno@clisp.org>
82200         lchown: Move AC_LIBOBJ invocations to module description.
82201         * m4/lchown.m4 (gl_FUNC_EUIDACCESS): Call AC_CHECK_FUNCS instead of
82202         AC_REPLACE_FUNCS. Move AC_LIBOBJ invocations from here...
82203         * modules/lchown (configure.ac): ... to here.
82205 2011-05-21  Bruno Haible  <bruno@clisp.org>
82207         iswctype: Move AC_LIBOBJ invocations to module description.
82208         * m4/iswctype.m4 (gl_FUNC_ISWCTYPE): Move AC_LIBOBJ invocation from
82209         here...
82210         * modules/iswctype (configure.ac): ... to here.
82212 2011-05-21  Bruno Haible  <bruno@clisp.org>
82214         iswblank: Move AC_LIBOBJ invocations to module description.
82215         * m4/iswblank.m4 (gl_FUNC_ISWBLANK): Move AC_LIBOBJ invocation from
82216         here...
82217         * modules/iswblank (configure.ac): ... to here.
82219 2011-05-21  Bruno Haible  <bruno@clisp.org>
82221         atanl: Move AC_LIBOBJ invocations to module description.
82222         * m4/atanl.m4 (gl_FUNC_ATANL): Move AC_LIBOBJ invocation from here...
82223         * modules/atanl (configure.ac): ... to here.
82225 2011-05-21  Bruno Haible  <bruno@clisp.org>
82227         acosl: Move AC_LIBOBJ invocations to module description.
82228         * m4/acosl.m4 (gl_FUNC_ACOSL): Move AC_LIBOBJ invocation from here...
82229         * modules/acosl (configure.ac): ... to here.
82231 2011-05-21  Bruno Haible  <bruno@clisp.org>
82233         asinl: Respect rules for use of AC_LIBOBJ.
82234         * m4/asinl.m4 (gl_FUNC_ASINL): Move AC_LIBOBJ invocation from here...
82235         * modules/asinl (configure.ac): ... to here.
82237 2011-05-21  Bruno Haible  <bruno@clisp.org>
82239         tanl: Move AC_LIBOBJ invocations to module description.
82240         * m4/tanl.m4 (gl_FUNC_TANL): Move AC_LIBOBJ invocations from here...
82241         * modules/tanl (configure.ac): ... to here.
82243 2011-05-21  Bruno Haible  <bruno@clisp.org>
82245         cosl: Move AC_LIBOBJ invocations to module description.
82246         * m4/cosl.m4 (gl_FUNC_COSL): Move AC_LIBOBJ invocations from here...
82247         * modules/cosl (configure.ac): ... to here.
82249 2011-05-21  Bruno Haible  <bruno@clisp.org>
82251         sinl: Move AC_LIBOBJ invocations to module description.
82252         * m4/sinl.m4 (gl_FUNC_SINL): Move AC_LIBOBJ invocations from here...
82253         * modules/sinl (configure.ac): ... to here.
82255 2011-05-21  Bruno Haible  <bruno@clisp.org>
82257         logl: Move AC_LIBOBJ invocations to module description.
82258         * m4/logl.m4 (gl_FUNC_LOGL): Move AC_LIBOBJ invocation from here...
82259         * modules/logl (configure.ac): ... to here.
82261 2011-05-21  Bruno Haible  <bruno@clisp.org>
82263         expl: Move AC_LIBOBJ invocations to module description.
82264         * m4/expl.m4 (gl_FUNC_EXPL): Move AC_LIBOBJ invocation from here...
82265         * modules/expl (configure.ac): ... to here.
82267 2011-05-21  Bruno Haible  <bruno@clisp.org>
82269         roundl: Move AC_LIBOBJ invocations to module description.
82270         * m4/roundl.m4 (gl_FUNC_ROUNDL): Move AC_LIBOBJ invocation from here...
82271         * modules/roundl (configure.ac): ... to here.
82273 2011-05-21  Bruno Haible  <bruno@clisp.org>
82275         round: Move AC_LIBOBJ invocations to module description.
82276         * m4/round.m4 (gl_FUNC_ROUND): Move AC_LIBOBJ invocation from here...
82277         * modules/round (configure.ac): ... to here.
82279 2011-05-21  Bruno Haible  <bruno@clisp.org>
82281         roundf: Move AC_LIBOBJ invocations to module description.
82282         * m4/roundf.m4 (gl_FUNC_ROUNDF): Move AC_LIBOBJ invocation from here...
82283         * modules/roundf (configure.ac): ... to here.
82285 2011-05-21  Bruno Haible  <bruno@clisp.org>
82287         truncl: Move AC_LIBOBJ invocations to module description.
82288         * m4/truncl.m4 (gl_FUNC_TRUNCL): Move AC_LIBOBJ invocation from here...
82289         * modules/truncl (configure.ac): ... to here.
82291 2011-05-21  Bruno Haible  <bruno@clisp.org>
82293         trunc: Move AC_LIBOBJ invocations to module description.
82294         * m4/trunc.m4 (gl_FUNC_TRUNC): Move AC_LIBOBJ invocation from here...
82295         * modules/trunc (configure.ac): ... to here.
82297 2011-05-21  Bruno Haible  <bruno@clisp.org>
82299         truncf: Move AC_LIBOBJ invocations to module description.
82300         * m4/truncf.m4 (gl_FUNC_TRUNCF): Move AC_LIBOBJ invocation from here...
82301         * modules/truncf (configure.ac): ... to here.
82303 2011-05-21  Bruno Haible  <bruno@clisp.org>
82305         ceill: Move AC_LIBOBJ invocations to module description.
82306         * m4/ceill.m4 (gl_FUNC_CEILL): Move AC_LIBOBJ invocation from here...
82307         * modules/ceill (configure.ac): ... to here.
82309 2011-05-21  Bruno Haible  <bruno@clisp.org>
82311         ceil: Move AC_LIBOBJ invocations to module description.
82312         * m4/ceil.m4 (gl_FUNC_CEIL): Move AC_LIBOBJ invocation from here...
82313         * modules/ceil (configure.ac): ... to here.
82315 2011-05-21  Bruno Haible  <bruno@clisp.org>
82317         ceilf: Move AC_LIBOBJ invocations to module description.
82318         * m4/ceilf.m4 (gl_FUNC_CEILF): Move AC_LIBOBJ invocation from here...
82319         * modules/ceilf (configure.ac): ... to here.
82321 2011-05-21  Bruno Haible  <bruno@clisp.org>
82323         floorl: Respect rules for use of AC_LIBOBJ.
82324         * m4/floorl.m4 (gl_FUNC_FLOORL): Move AC_LIBOBJ invocation from here...
82325         * modules/floorl (configure.ac): ... to here.
82327 2011-05-21  Bruno Haible  <bruno@clisp.org>
82329         floor: Respect rules for use of AC_LIBOBJ.
82330         * m4/floor.m4 (gl_FUNC_FLOOR): Move AC_LIBOBJ invocation from here...
82331         * modules/floor (configure.ac): ... to here.
82333 2011-05-21  Bruno Haible  <bruno@clisp.org>
82335         floorf: Move AC_LIBOBJ invocations to module description.
82336         * m4/floorf.m4 (gl_FUNC_FLOORF): Move AC_LIBOBJ invocation from here...
82337         * modules/floorf (configure.ac): ... to here.
82339 2011-05-20  Bruno Haible  <bruno@clisp.org>
82341         sqrtl: Respect rules for use of AC_LIBOBJ.
82342         * m4/sqrtl.m4 (gl_FUNC_SQRTL): Move AC_LIBOBJ invocation from here...
82343         * modules/sqrtl (configure.ac): ... to here.
82345 2011-05-20  Bruno Haible  <bruno@clisp.org>
82347         ldexpl: Respect rules for use of AC_LIBOBJ.
82348         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Move AC_LIBOBJ invocation from here...
82349         * modules/ldexpl (configure.ac): ... to here.
82351 2011-05-20  Bruno Haible  <bruno@clisp.org>
82353         frexpl*: Respect rules for use of AC_LIBOBJ.
82354         * m4/frexpl.m4 (gl_FUNC_FREXPL, gl_FUNC_FREXPL_NO_LIBM): Move AC_LIBOBJ
82355         invocation from here...
82356         * modules/frexpl (configure.ac): ... to here.
82357         * modules/frexpl-nolibm (configure.ac): ... and here.
82359 2011-05-20  Bruno Haible  <bruno@clisp.org>
82361         frexp, frexp-nolibm: Move AC_LIBOBJ invocations to module description.
82362         * m4/frexp.m4 (gl_FUNC_FREXP, gl_FUNC_FREXP_NO_LIBM): Move AC_LIBOBJ
82363         invocation from here...
82364         * modules/frexp (configure.ac): ... to here.
82365         * modules/frexp-nolibm (configure.ac): ... and here.
82367 2011-05-20  Bruno Haible  <bruno@clisp.org>
82369         isnan: Respect rules for use of AC_LIBOBJ.
82370         * m4/isnan.m4 (gl_ISNAN): Don't do the AC_LIBOBJ and gl_PREREQ_ISNAN*
82371         invocations here.
82372         * modules/isnanf (configure.ac): Require gl_ISNAN if it exists. Test
82373         REPLACE_ISNAN.
82374         * modules/isnand (configure.ac): Likewise.
82375         * modules/isnanl (configure.ac): Likewise.
82377 2011-05-20  Bruno Haible  <bruno@clisp.org>
82379         isnanl*: Respect rules for use of AC_LIBOBJ.
82380         * m4/isnanl.m4 (gl_FUNC_ISNANL, gl_FUNC_ISNANL_NO_LIBM): Move AC_LIBOBJ
82381         invocation from here...
82382         * modules/isnanl (configure.ac): ... to here.
82383         * modules/isnanl-nolibm (configure.ac): ... and here.
82385 2011-05-20  Bruno Haible  <bruno@clisp.org>
82387         isnand*: Move AC_LIBOBJ invocations to module description.
82388         * m4/isnand.m4 (gl_FUNC_ISNAND, gl_FUNC_ISNAND_NO_LIBM): Move AC_LIBOBJ
82389         invocation from here...
82390         * modules/isnand (configure.ac): ... to here.
82391         * modules/isnand-nolibm (configure.ac): ... and here.
82393 2011-05-20  Bruno Haible  <bruno@clisp.org>
82395         isnanf*: Move AC_LIBOBJ invocations to module description.
82396         * m4/isnanf.m4 (gl_FUNC_ISNANF, gl_FUNC_ISNANF_NO_LIBM): Move AC_LIBOBJ
82397         invocation from here...
82398         * modules/isnanf (configure.ac): ... to here.
82399         * modules/isnanf-nolibm (configure.ac): ... and here.
82401 2011-05-20  Bruno Haible  <bruno@clisp.org>
82403         isnan*: Separate the AC_LIBOBJ invocations.
82404         * m4/isnanf.m4 (gl_PREREQ_ISNANF): Renamed from gl_BUILD_ISNANF. Remove
82405         AC_LIBOBJ invocation.
82406         (gl_FUNC_ISNANF, gl_FUNC_ISNANF_NO_LIBM): Update. Invoke AC_LIBOBJ
82407         here.
82408         * m4/isnand.m4 (gl_PREREQ_ISNAND): Renamed from gl_BUILD_ISNAND. Remove
82409         AC_LIBOBJ invocation.
82410         (gl_FUNC_ISNAND, gl_FUNC_ISNAND_NO_LIBM): Update. Invoke AC_LIBOBJ
82411         here.
82412         * m4/isnanl.m4 (gl_PREREQ_ISNANL): Renamed from gl_BUILD_ISNANL. Remove
82413         AC_LIBOBJ invocation.
82414         (gl_FUNC_ISNANL, gl_FUNC_ISNANL_NO_LIBM): Update. Invoke AC_LIBOBJ
82415         here.
82416         * m4/isnan.m4 (gl_ISNAN): Update. Invoke AC_LIBOBJ here.
82418 2011-05-08  Bruno Haible  <bruno@clisp.org>
82420         isinf: Move AC_LIBOBJ invocations to module description.
82421         * m4/isinf.m4 (gl_ISINF): Move AC_LIBOBJ invocation from here...
82422         * modules/isinf (configure.ac): ... to here.
82424 2011-05-08  Bruno Haible  <bruno@clisp.org>
82426         isfinite: Move AC_LIBOBJ invocations to module description.
82427         * m4/isfinite.m4 (gl_ISFINITE): Move AC_LIBOBJ invocation from here...
82428         * modules/isfinite (configure.ac): ... to here.
82430 2011-05-08  Bruno Haible  <bruno@clisp.org>
82432         isblank: Move AC_LIBOBJ invocations to module description.
82433         * m4/isblank.m4 (gl_FUNC_ISBLANK): Move AC_LIBOBJ invocation from
82434         here...
82435         * modules/isblank (configure.ac): ... to here.
82437 2011-05-08  Bruno Haible  <bruno@clisp.org>
82439         isapipe: Move AC_LIBOBJ invocations to module description.
82440         * m4/isapipe.m4 (gl_ISAPIPE): Set HAVE_ISAPIPE. Move AC_LIBOBJ and
82441         gl_PREREQ_ISAPIPE invocations from here...
82442         * modules/isapipe (configure.ac): ... to here.
82443         (Depends-on): Update condition.
82445 2011-05-08  Bruno Haible  <bruno@clisp.org>
82447         ioctl: Move AC_LIBOBJ invocations to module description.
82448         * m4/ioctl.m4 (gl_FUNC_IOCTL): Set HAVE_IOCTL. Move AC_LIBOBJ
82449         invocations from here...
82450         * modules/ioctl (configure.ac): ... to here.
82451         (Depends-on): Update condition.
82453 2011-05-08  Bruno Haible  <bruno@clisp.org>
82455         imaxdiv: Move AC_LIBOBJ invocations to module description.
82456         * m4/imaxdiv.m4 (gl_FUNC_IMAXDIV): Move AC_LIBOBJ and gl_PREREQ_IMAXDIV
82457         invocations from here...
82458         * modules/imaxdiv (configure.ac): ... to here.
82460 2011-05-08  Bruno Haible  <bruno@clisp.org>
82462         imaxabs: Move AC_LIBOBJ invocations to module description.
82463         * m4/imaxabs.m4 (gl_FUNC_IMAXABS): Move AC_LIBOBJ and gl_PREREQ_IMAXABS
82464         invocations from here...
82465         * modules/imaxabs (configure.ac): ... to here.
82467 2011-05-08  Bruno Haible  <bruno@clisp.org>
82469         getaddrinfo: Move AC_LIBOBJ invocations to module description.
82470         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Set HAVE_GETADDRINFO, Move
82471         AC_LIBOBJ invocations from here...
82472         * modules/getaddrinfo (configure.ac): ... to here.
82473         (Depends-on): Add conditions.
82475 2011-05-08  Bruno Haible  <bruno@clisp.org>
82477         inet_pton. getaddrinfo: Respect rules for use of AC_LIBOBJ.
82478         * m4/inet_pton.m4 (gl_FUNC_INET_PTON): Set HAVE_INET_PTON. Call
82479         AC_CHECK_FUNCS instead of AC_REPLACE_FUNCS. Don't invoke
82480         gl_PREREQ_INET_PTON. Move tests for declaration of inet_pton here...
82481         (gl_PREREQ_INET_PTON): ... from here.
82482         * modules/inet_pton (configure.ac): Invoke AC_LIBOBJ and
82483         gl_PREREQ_INET_PTON here.
82484         (Depends-on): Update condition.
82486 2011-05-08  Bruno Haible  <bruno@clisp.org>
82488         inet_ntop. getaddrinfo: Respect rules for use of AC_LIBOBJ.
82489         * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): Set HAVE_INET_NTOP. Call
82490         AC_CHECK_FUNCS instead of AC_REPLACE_FUNCS. Don't invoke
82491         gl_PREREQ_INET_NTOP. Move tests for declaration of inet_ntop here...
82492         (gl_PREREQ_INET_NTOP): ... from here.
82493         * modules/inet_ntop (configure.ac): Invoke AC_LIBOBJ and
82494         gl_PREREQ_INET_NTOP here.
82495         (Depends-on): Update condition.
82497 2011-05-08  Bruno Haible  <bruno@clisp.org>
82499         iconv_open: Move AC_LIBOBJ invocations to module description.
82500         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN, gl_REPLACE_ICONV_OPEN): Move
82501         AC_LIBOBJ invocations from here...
82502         * modules/iconv_open (configure.ac): ... to here.
82504 2011-05-08  Bruno Haible  <bruno@clisp.org>
82506         iconv_open, iconv_open-utf: Respect rules for use of AC_LIBOBJ.
82507         If module 'iconv_open' is among the main modules and module
82508         'iconv_open-utf' is among the tests dependencies, then
82509         REPLACE_ICONV_UTF will be defined to 1, hence iconv_open() in lib may
82510         return the special iconv_t values. Therefore iconv() and iconv_close()
82511         must support these special iconv_t values, already in lib, not only in
82512         tests.
82513         * m4/iconv_open-utf.m4: New file, extracted from m4/iconv_open.m4.
82514         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): Invoke
82515         gl_FUNC_ICONV_OPEN_UTF_SUPPORT if present.
82516         (gl_FUNC_ICONV_OPEN_UTF): Remove macro.
82517         * modules/iconv_open (Files): Add lib/iconv.c, lib/iconv_close.c.
82518         (Depends-on): Add the dependencies of iconv_open-utf.
82519         * modules/iconv_open-utf (Files): Add m4/iconv_open-utf.m4. Remove
82520         m4/iconv_open.m4, lib/iconv.c, lib/iconv_close.c.
82521         (Depends-on): Remove modules needed by lib/iconv.c, lib/iconv_close.c.
82523 2011-05-08  Bruno Haible  <bruno@clisp.org>
82525         group-member: Move AC_LIBOBJ invocations to module description.
82526         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER): Move AC_LIBOBJ and
82527         gl_PREREQ_GROUP_MEMBER invocations from here...
82528         * modules/group-member (configure.ac): ... to here.
82530 2011-05-08  Bruno Haible  <bruno@clisp.org>
82532         grantpt: Move AC_LIBOBJ invocations to module description.
82533         * m4/grantpt.m4 (gl_FUNC_GRANTPT): Move AC_LIBOBJ and gl_PREREQ_GRANTPT
82534         invocations from here...
82535         * modules/grantpt (configure.ac): ... to here.
82537 2011-05-08  Bruno Haible  <bruno@clisp.org>
82539         glob: Move AC_LIBOBJ invocations to module description.
82540         * m4/glob.m4 (gl_GLOB): Move AC_LIBOBJ and gl_PREREQ_GLOB invocations
82541         from here...
82542         * modules/glob (configure.ac): ... to here.
82544 2011-05-08  Bruno Haible  <bruno@clisp.org>
82546         getusershell: Move AC_LIBOBJ invocations to module description.
82547         * m4/getusershell.m4 (gl_FUNC_GETUSERSHELL): Set HAVE_GETUSERSHELL.
82548         Move AC_LIBOBJ invocation from here...
82549         * modules/getusershell (configure.ac): ... to here.
82550         (Depends-on): Update condition.
82552 2011-05-08  Bruno Haible  <bruno@clisp.org>
82554         gettimeofday: Move AC_LIBOBJ invocations to module description.
82555         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
82556         gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Move AC_LIBOBJ and
82557         gl_PREREQ_GETTIMEOFDAY invocations from here...
82558         * modules/gettimeofday (configure.ac): ... to here.
82560 2011-05-08  Bruno Haible  <bruno@clisp.org>
82562         gettimeofday, tzset: Respect rules for use of AC_LIBOBJ.
82563         * modules/tzset (configure.ac): Don't invoke gl_FUNC_TZSET_CLOBBER,
82564         just gl_FUNC_TZSET.
82565         * m4/tzset.m4 (gl_FUNC_TZSET): New macro.
82566         (gl_FUNC_TZSET_CLOBBER): Remove actions.
82567         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Invoke
82568         gl_FUNC_TZSET_CLOBBER and its actions here, if present.
82570 2011-05-08  Bruno Haible  <bruno@clisp.org>
82572         getsubopt: Move AC_LIBOBJ invocations to module description.
82573         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Move AC_LIBOBJ and
82574         gl_PREREQ_GETSUBOPT invocations from here...
82575         * modules/getsubopt (configure.ac): ... to here.
82577 2011-05-08  Bruno Haible  <bruno@clisp.org>
82579         getpass-gnu: Move AC_LIBOBJ invocations to module description.
82580         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): Set REPLACE_GETPASS. Move
82581         AC_LIBOBJ and gl_PREREQ_GETPASS invocations from here...
82582         * modules/getpass-gnu (configure.ac): ... to here.
82584 2011-05-08  Bruno Haible  <bruno@clisp.org>
82586         getpass: Move AC_LIBOBJ invocations to module description.
82587         * m4/getpass.m4 (gl_FUNC_GETPASS): Set HAVE_GETPASS. Move AC_LIBOBJ and
82588         gl_PREREQ_GETPASS invocations from here...
82589         * modules/getpass (configure.ac): ... to here.
82591 2011-05-08  Bruno Haible  <bruno@clisp.org>
82593         getpagesize: Move AC_LIBOBJ invocations to module description.
82594         * m4/getpagesize.m4 (gl_FUNC_GETPAGESIZE): Move AC_LIBOBJ invocation
82595         from here...
82596         * modules/getpagesize (configure.ac): ... to here.
82598 2011-05-08  Bruno Haible  <bruno@clisp.org>
82600         getopt: Move AC_LIBOBJ invocations to module description.
82601         * m4/getopt.m4 (gl_REPLACE_GETOPT): Remove macro.
82602         (gl_FUNC_GETOPT): Inline it here. Move AC_LIBOBJ and gl_PREREQ_GETOPT
82603         invocations from here...
82604         * modules/getopt-gnu (configure.ac): ... to here.
82605         * modules/getopt-posix (configure.ac): ... and here.
82606         (Depends-on): Update condition.
82608 2011-05-08  Bruno Haible  <bruno@clisp.org>
82610         getopt, argp: Respect rules for use of AC_LIBOBJ.
82611         * m4/argp.m4 (gl_ARGP): Don't invoke gl_REPLACE_GETOPT.
82612         (gl_REPLACE_GETOPT_ALWAYS): New macro.
82613         * m4/getopt.m4 (gl_FUNC_GETOPT_POSIX): Test whether
82614         gl_REPLACE_GETOPT_ALWAYS is defined. Set REPLACE_GETOPT.
82616 2011-05-08  Bruno Haible  <bruno@clisp.org>
82618         getlogin_r: Move AC_LIBOBJ invocations to module description.
82619         * m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Move AC_LIBOBJ and
82620         gl_PREREQ_GETLOGIN_R invocations from here...
82621         * modules/getlogin_r (configure.ac): ... to here.
82623 2011-05-08  Bruno Haible  <bruno@clisp.org>
82625         getlogin: Move AC_LIBOBJ invocations to module description.
82626         * m4/getlogin.m4 (gl_FUNC_GETLOGIN): Move AC_LIBOBJ invocation from
82627         here...
82628         * modules/getlogin (configure.ac): ... to here.
82630 2011-05-08  Bruno Haible  <bruno@clisp.org>
82632         getloadavg: Move AC_LIBOBJ invocations to module description.
82633         * m4/getloadavg.m4 (gl_FUNC_GETDELIM): Set HAVE_GETLOADAVG. Move
82634         AC_LIBOBJ and gl_PREREQ_GETLOADAVG invocations from here...
82635         * modules/getloadavg (configure.ac): ... to here.
82637 2011-05-08  Bruno Haible  <bruno@clisp.org>
82639         gethrxtime: Move AC_LIBOBJ invocations to module description.
82640         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Move code that determines
82641         LIB_GETHRXTIME from here...
82642         (gl_GETHRXTIME): ... to here. Move AC_LIBOBJ and gl_PREREQ_GETHRXTIME
82643         invocations from here...
82644         * modules/gethrxtime (configure.ac): ... to here.
82646 2011-05-08  Bruno Haible  <bruno@clisp.org>
82648         gethostname: Move AC_LIBOBJ invocations to module description.
82649         * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): Move AC_LIBOBJ and
82650         gl_PREREQ_GETHOSTNAME invocations from here...
82651         * modules/gethostname (configure.ac): ... to here.
82653 2011-05-08  Bruno Haible  <bruno@clisp.org>
82655         getgroups: Move AC_LIBOBJ invocations to module description.
82656         * m4/getgroups.m4 (gl_FUNC_GETGROUPS): Move AC_LIBOBJ invocations from
82657         here...
82658         * modules/getgroups (configure.ac): ... to here.
82660 2011-05-08  Bruno Haible  <bruno@clisp.org>
82662         getdtablesize: Move AC_LIBOBJ invocations to module description.
82663         * m4/getdtablesize.m4 (gl_FUNC_GETDTABLESIZE): Move AC_LIBOBJ
82664         invocation from here...
82665         * modules/getdtablesize (configure.ac): ... to here.
82667 2011-05-08  Bruno Haible  <bruno@clisp.org>
82669         getdomainname: Move AC_LIBOBJ invocations to module description.
82670         * m4/getdomainname.m4 (gl_FUNC_GETDOMAINNAME): Move AC_LIBOBJ and
82671         gl_PREREQ_GETDOMAINNAME invocations from here...
82672         * modules/getdomainname (configure.ac): ... to here.
82674 2011-05-08  Bruno Haible  <bruno@clisp.org>
82676         getline: Move AC_LIBOBJ invocations to module description.
82677         * m4/getline.m4 (gl_FUNC_GETLINE): Move AC_LIBOBJ and gl_PREREQ_GETLINE
82678         invocations from here...
82679         * modules/getline (configure.ac): ... to here.
82681 2011-05-08  Bruno Haible  <bruno@clisp.org>
82683         getline: Simplify.
82684         * m4/getline.m4 (gl_PREREQ_GETLINE): Don't invoke gl_FUNC_GETDELIM.
82685         It's already handled through the module dependency.
82687 2011-05-08  Bruno Haible  <bruno@clisp.org>
82689         getdelim: Move AC_LIBOBJ invocations to module description.
82690         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Set HAVE_GETDELIM. Move AC_LIBOBJ
82691         and gl_PREREQ_GETDELIM invocations from here...
82692         * modules/getdelim (configure.ac): ... to here.
82693         (Depends-on): Fix condition.
82695 2011-05-08  Bruno Haible  <bruno@clisp.org>
82697         getcwd: Move AC_LIBOBJ invocations to module description.
82698         * m4/getcwd.m4 (gl_FUNC_GETCWD): Move AC_LIBOBJ and gl_PREREQ_GETCWD
82699         invocations from here...
82700         * modules/getcwd (configure.ac): ... to here.
82702 2011-05-08  Bruno Haible  <bruno@clisp.org>
82704         getcwd-lgpl: Move AC_LIBOBJ invocations to module description.
82705         * m4/getcwd.m4 (gl_FUNC_GETCWD_LGPL): Move AC_LIBOBJ invocation from
82706         here...
82707         * modules/getcwd-lgpl (configure.ac): ... to here.
82709 2011-05-07  Bruno Haible  <bruno@clisp.org>
82711         crypto/gc: Move AC_LIBOBJ invocations to module description.
82712         * m4/gc.m4 (gl_GC): Move AC_LIBOBJ invocations from here...
82713         * modules/crypto/gc (configure.ac): ... to here.
82715 2011-05-07  Bruno Haible  <bruno@clisp.org>
82717         fwriting: Move AC_LIBOBJ invocations to module description.
82718         * m4/fwriting.m4 (gl_FUNC_FWRITINT): Move AC_LIBOBJ invocation from
82719         here...
82720         * modules/fwriting (configure.ac): ... to here.
82722 2011-05-07  Bruno Haible  <bruno@clisp.org>
82724         fwritable: Move AC_LIBOBJ invocations to module description.
82725         * m4/fwritable.m4 (gl_FUNC_FWRITABLE): Move AC_LIBOBJ invocation from
82726         here...
82727         * modules/fwritable (configure.ac): ... to here.
82729 2011-05-07  Bruno Haible  <bruno@clisp.org>
82731         futimens: Move AC_LIBOBJ invocations to module description.
82732         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Move AC_LIBOBJ invocations from
82733         here...
82734         * modules/futimens (configure.ac): ... to here.
82736 2011-05-07  Bruno Haible  <bruno@clisp.org>
82738         ftruncate: Move AC_LIBOBJ invocations to module description.
82739         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Move AC_LIBOBJ and
82740         gl_PREREQ_FTRUNCATE invocations from here...
82741         * modules/ftruncate (configure.ac): ... to here.
82743 2011-05-07  Bruno Haible  <bruno@clisp.org>
82745         fsync: Move AC_LIBOBJ invocations to module description.
82746         * m4/fsync.m4 (gl_FUNC_FSYNC): Move AC_LIBOBJ and gl_PREREQ_FSYNC
82747         invocations from here...
82748         * modules/fsync (configure.ac): ... to here.
82750 2011-05-07  Bruno Haible  <bruno@clisp.org>
82752         fsusage: Move AC_LIBOBJ invocations to module description.
82753         * m4/fsusage.m4 (gl_FUNC_FREOPEN): Move AC_LIBOBJ and
82754         gl_PREREQ_FSUSAGE_EXTRA invocations from here...
82755         * modules/fsusage (configure.ac): ... to here.
82757 2011-05-07  Bruno Haible  <bruno@clisp.org>
82759         freopen: Move AC_LIBOBJ invocations to module description.
82760         * m4/freopen.m4 (gl_FUNC_FREOPEN): Move AC_LIBOBJ and gl_PREREQ_FREOPEN
82761         invocations from here...
82762         * modules/freopen (configure.ac): ... to here.
82764 2011-05-07  Bruno Haible  <bruno@clisp.org>
82766         free: Move AC_LIBOBJ invocations to module description.
82767         * m4/free.m4 (gl_FUNC_FREE): Move AC_LIBOBJ and missing gl_PREREQ_FREE
82768         invocations from here...
82769         * modules/free (configure.ac): ... to here.
82771 2011-05-07  Bruno Haible  <bruno@clisp.org>
82773         freadable: Move AC_LIBOBJ invocations to module description.
82774         * m4/freadable.m4 (gl_FUNC_FREADABLE): Move AC_LIBOBJ invocation from
82775         here...
82776         * modules/freadable (configure.ac): ... to here.
82778 2011-05-07  Bruno Haible  <bruno@clisp.org>
82780         fpurge: Move AC_LIBOBJ invocations to module description.
82781         * m4/fpurge.m4 (gl_FUNC_FPURGE): Set HAVE_FPURGE. Move AC_LIBOBJ
82782         invocations from here...
82783         * modules/fpurge (configure.ac): ... to here.
82785 2011-05-07  Bruno Haible  <bruno@clisp.org>
82787         fpending: Move AC_LIBOBJ invocations to module description.
82788         * m4/fpending.m4 (gl_PREREQ_FPENDING): New macro, extracted from
82789         gl_FUNC_FPENDING.
82790         (gl_FUNC_FPENDING): Move AC_LIBOBJ and gl_PREREQ_FPENDING
82791         invocations from here...
82792         * modules/fpending (configure.ac): ... to here.
82794 2011-05-07  Bruno Haible  <bruno@clisp.org>
82796         fopen: Move AC_LIBOBJ invocations to module description.
82797         * m4/fopen.m4 (gl_FUNC_FOPEN): Move AC_LIBOBJ and gl_PREREQ_FOPEN
82798         invocations from here...
82799         * modules/fopen (configure.ac): ... to here.
82801 2011-05-07  Bruno Haible  <bruno@clisp.org>
82803         fnmatch, fnmatch-gnu: Move AC_LIBOBJ invocations to module description.
82804         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH): New macro, extracted from
82805         gl_FUNC_FNMATCH_POSIX.
82806         (gl_FUNC_FNMATCH_POSIX): Move AC_LIBOBJ and gl_PREREQ_FNMATCH
82807         invocations from here...
82808         * modules/fnmatch (configure.ac): ... to here.
82809         * modules/fnmatch-gnu (configure.ac): ... and here.
82811 2011-05-07  Bruno Haible  <bruno@clisp.org>
82813         flock: Move AC_LIBOBJ invocations to module description.
82814         * m4/flock.m4 (gl_FUNC_FLOCK): Move AC_LIBOBJ and gl_PREREQ_FLOCK
82815         invocations from here...
82816         * modules/flock (configure.ac): ... to here.
82818 2011-05-07  Bruno Haible  <bruno@clisp.org>
82820         fileblocks: Move AC_LIBOBJ invocations to module description.
82821         * m4/fileblocks.m4 (gl_FILEBLOCKS): Move AC_LIBOBJ and
82822         gl_PREREQ_FILEBLOCKS invocations from here...
82823         * modules/fileblocks (configure.ac): ... to here.
82825 2011-05-06  Bruno Haible  <bruno@clisp.org>
82827         fflush: Move AC_LIBOBJ invocations to module description.
82828         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Remove macro.
82829         (gl_FUNC_FFLUSH): Inline it here. Move AC_LIBOBJ and gl_PREREQ_FFLUSH
82830         invocations from here...
82831         * modules/fflush (configure.ac): ... to here.
82833 2011-05-06  Bruno Haible  <bruno@clisp.org>
82835         fdopendir: Move AC_LIBOBJ invocations to module description.
82836         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Move AC_LIBOBJ invocations from
82837         here...
82838         * modules/fdopendir (configure.ac): ... to here.
82839         (Depends-on): Improve conditions.
82841 2011-05-06  Bruno Haible  <bruno@clisp.org>
82843         _Exit: Move AC_LIBOBJ invocations to module description.
82844         * m4/_Exit.m4 (gl_FUNC__EXIT): Move AC_LIBOBJ and gl_PREREQ__EXIT
82845         invocations from here...
82846         * modules/_Exit (configure.ac): ... to here.
82848 2011-05-21  Bruno Haible  <bruno@clisp.org>
82850         euidaccess: Respect rules for use of AC_LIBOBJ.
82851         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Call AC_CHECK_FUNCS instead of
82852         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_EUIDACCESS invocations
82853         from here...
82854         * modules/euidaccess (configure.ac): ... to here.
82856 2011-05-06  Bruno Haible  <bruno@clisp.org>
82858         error: Move AC_LIBOBJ invocations to module description.
82859         * m4/error.m4 (gl_ERROR): Inline AC_FUNC_ERROR_AT_LINE. Remove
82860         AC_LIBSOURCES invocation. Move AC_LIBOBJ and gl_PREREQ_ERROR
82861         invocations from here...
82862         * modules/error (configure.ac): ... to here.
82864 2011-05-06  Bruno Haible  <bruno@clisp.org>
82866         duplocale: Move AC_LIBOBJ invocations to module description.
82867         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Move AC_LIBOBJ and
82868         gl_PREREQ_DUPLOCALE invocations from here...
82869         * modules/duplocale (configure.ac): ... to here.
82871 2011-05-05  Bruno Haible  <bruno@clisp.org>
82873         dirfd: Move AC_LIBOBJ invocations to module description.
82874         * m4/dirfd.m4 (gl_PREREQ_DIRFD): New macro, extracted from
82875         gl_FUNC_DIRFD.
82876         (gl_FUNC_DIRFD): Move AC_LIBOBJ and gl_PREREQ_DIRFD invocations from
82877         here...
82878         * modules/dirfd (configure.ac): ... to here.
82879         (Depends-on): Fix condition.
82881 2011-05-05  Bruno Haible  <bruno@clisp.org>
82883         chown: Respect rules for use of AC_LIBOBJ.
82884         * m4/chown.m4 (gl_FUNC_CHOWN): Move AC_LIBOBJ invocations from here...
82885         * modules/chown (configure.ac): ... to here.
82887 2011-05-05  Bruno Haible  <bruno@clisp.org>
82889         chdir-long: Move AC_LIBOBJ invocations to module description.
82890         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Move AC_LIBOBJ and
82891         gl_PREREQ_CHDIR_LONG invocations from here...
82892         * modules/chdir-long (configure.ac): ... to here.
82894 2011-05-05  Bruno Haible  <bruno@clisp.org>
82896         canonicalize-lgpl: Move AC_LIBOBJ invocations to module description.
82897         * m4/canonicalize.m4 (gl_CANONICALIZE_LGPL): Move AC_LIBOBJ invocation
82898         from here...
82899         * modules/canonicalize-lgpl (configure.ac): ... to here.
82901 2011-05-05  Bruno Haible  <bruno@clisp.org>
82903         calloc-posix, calloc-gnu: Move AC_LIBOBJs to module description.
82904         * m4/calloc.m4 (gl_REPLACE_CALLOC): Remove macro.
82905         (gl_FUNC_CALLOC_GNU, gl_FUNC_CALLOC_POSIX): Instead, just set
82906         REPLACE_CALLOC.
82907         * modules/calloc-posix (configure.ac): Invoke AC_LIBOBJ here.
82908         * modules/calloc-gnu (configure.ac): Likewise.
82910 2011-05-05  Bruno Haible  <bruno@clisp.org>
82912         btowc: Move AC_LIBOBJ invocations to module description.
82913         * m4/btowc.m4 (gl_FUNC_BTOWC): Move AC_LIBOBJ and gl_PREREQ_BTOWC
82914         invocations from here...
82915         * modules/btowc (configure.ac): ... to here.
82917 2011-05-21  Bruno Haible  <bruno@clisp.org>
82919         atexit: Move AC_LIBOBJ invocations to module description.
82920         * m4/atexit.m4 (gl_FUNC_ATEXIT): Call AC_CHECK_FUNCS instead of
82921         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_ATEXIT invocations from
82922         here...
82923         * modules/atexit (configure.ac): ... to here.
82925 2011-05-05  Bruno Haible  <bruno@clisp.org>
82927         atoll: Move AC_LIBOBJ invocations to module description.
82928         * m4/atoll.m4 (gl_FUNC_ATOLL): Move AC_LIBOBJ and gl_PREREQ_ATOLL
82929         invocations from here...
82930         * modules/atoll (configure.ac): ... to here.
82932 2011-05-05  Bruno Haible  <bruno@clisp.org>
82934         argz: Move AC_LIBOBJ invocations to module description.
82935         * m4/argz.m4 (gl_FUNC_ARGZ): Move AC_LIBOBJ invocation from here...
82936         * modules/argz (configure.ac): ... to here.
82938 2011-05-05  Bruno Haible  <bruno@clisp.org>
82940         alphasort: Move AC_LIBOBJ invocations to module description.
82941         * m4/alphasort.m4 (gl_FUNC_ALPHASORT): Move AC_LIBOBJ and
82942         gl_PREREQ_ALPHASORT invocations from here...
82943         * modules/alphasort (configure.ac): ... to here.
82945 2011-06-15  Paul Eggert  <eggert@cs.ucla.edu>
82947         verify: new macro verify_expr; verify_true deprecated
82948         * NEWS: Mention this.
82949         * doc/verify.texi (Compile-time Assertions): Document this.
82950         * lib/verify.h (verify_true): Deprecate.
82951         (verify_expr): New macro.
82952         * tests/test-verify.c (function): Test verify_expr.
82954 2011-06-14  Jim Meyering  <meyering@redhat.com>
82956         init.sh: give more portable redirection-related advice in a comment
82957         * tests/init.sh (stderr_fileno_): Update the advice in comments.
82958         See http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/22488
82959         for lots of discussion.  Stefano Lattarini suggested the solution
82960         of putting "9>&2" after the command.  Reported by Bruno Haible.
82962 2011-06-13  Bruno Haible  <bruno@clisp.org>
82964         locale-zh: Reject zh_CN.GB18030 locale on Solaris 8.
82965         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): On Solaris 8, set LOCALE_ZH_CN to
82966         'none'.
82968 2011-06-13  Paul Eggert  <eggert@cs.ucla.edu>
82970         ftoastr: use strtof only if HAVE_STRTOF
82971         This is needed on HP-UX 11.11 with GCC 4.2.4; see Bruno Haible's report
82972         <http://lists.gnu.org/r/bug-gnulib/2011-06/msg00154.html>.
82973         * lib/ftoastr.c (STRTOF) [LENGTH == 1]: Use strtof only if HAVE_STRTOF.
82974         * modules/ftoastr (configure.ac): Check for strtof.
82976 2011-06-13  Bruno Haible  <bruno@clisp.org>
82978         gnulib-tool: Addendum to 2011-06-08 commit.
82979         * gnulib-tool (func_emit_lib_Makefile_am): If options --makefile-name
82980         and --witness-c-macro have been given, augment AM_CPPFLAGS.
82982 2011-06-13  Bruno Haible  <bruno@clisp.org>
82984         fseeko: Provide a non-inline replacement of fseek().
82985         * lib/stdio.in.h (fseek): Don't provide if module 'fseek' is not used.
82986         * modules/fseeko (Depends-on): Add fseek.
82987         * modules/fseek (License): Change to LGPLv2+.
82989 2011-06-13  Bruno Haible  <bruno@clisp.org>
82991         ftello: Provide a non-inline replacement of ftell().
82992         * lib/stdio.in.h (ftell): Don't provide if module 'ftell' is not used.
82993         * m4/ftell.m4 (gl_FUNC_FTELL): Replace ftell also if the system does
82994         not have ftello() (such as on mingw).
82995         * modules/ftello (Depends-on): Add ftell.
82996         * modules/ftell (License): Change to LGPLv2+.
82998 2011-05-07  Bruno Haible  <bruno@clisp.org>
83000         ftell: Move AC_LIBOBJ invocations to module description.
83001         * m4/ftell.m4 (gl_FUNC_FTELL): Move AC_LIBOBJ invocation from here...
83002         * modules/ftell (configure.ac): ... to here.
83004 2011-05-07  Bruno Haible  <bruno@clisp.org>
83006         ftello: Respect rules for use of AC_LIBOBJ.
83007         * m4/ftello.m4 (gl_REPLACE_FTELLO): Remove macro.
83008         (gl_FUNC_FTELLO): Inline it here. Move AC_LIBOBJ invocation from
83009         here...
83010         * modules/ftello (configure.ac): ... to here.
83012 2011-05-07  Bruno Haible  <bruno@clisp.org>
83014         fseeko: Simplify.
83015         * m4/fseeko.m4 (gl_HAVE_FSEEKO): Remove macro.
83016         (gl_FUNC_FSEEKO): Inline it here.
83018 2011-05-07  Bruno Haible  <bruno@clisp.org>
83020         fseek: Move AC_LIBOBJ invocations to module description.
83021         * m4/fseek.m4 (gl_REPLACE_FSEEK): Remove macro.
83022         (gl_FUNC_FSEEK): Inline it here. Move AC_LIBOBJ invocation from here...
83023         * modules/fseek (configure.ac): ... to here.
83025 2011-05-07  Bruno Haible  <bruno@clisp.org>
83027         fseek: Respect rules for use of AC_LIBOBJ.
83028         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Move gl_REPLACE_FSEEK invocation from
83029         here...
83030         * m4/fseek.m4 (gl_FUNC_FSEEK): ... to here.
83032 2011-05-07  Bruno Haible  <bruno@clisp.org>
83034         fseeko: Respect rules for use of AC_LIBOBJ.
83035         * m4/fseeko.m4 (gl_REPLACE_FSEEKO): Remove macro.
83036         (gl_FUNC_FSEEKO): Inline it here. Move AC_LIBOBJ invocation from
83037         here...
83038         * modules/fseeko (configure.ac): ... to here.
83040 2011-06-13  Bruno Haible  <bruno@clisp.org>
83042         gnulib-tool: Allow comments in the 'Depends-on' section.
83043         * doc/gnulib.texi (Module description): Mention comment syntax in the
83044         Depends-on section.
83045         * gnulib-tool (func_get_dependencies): Filter out comment lines.
83047 2011-06-13  Bruno Haible  <bruno@clisp.org>
83049         file-set.h: guard __attibute__ use, now that it's not always defined
83050         * lib/file-set.h (record_file): Use __attribute__ only with compiler
83051         versions that support it.  This fixes a coreutils build failure with
83052         the vendor cc on HP-UX 11.31.
83054 2011-06-12  Bruno Haible  <bruno@clisp.org>
83056         acl: Add support for HP-UX >= 11.11 JFS ACLs.
83057         * doc/acl-resources.txt: Add info about the ACL APIs on HP-UX.
83058         * m4/acl.m4 (gl_FUNC_ACL): Also test for HP-UX 11.11 API.
83059         * lib/acl-internal.h [HP-UX 11.11]: Include <aclv.h>.
83060         (acl, aclsort): New declarations.
83061         (aclv_nontrivial): New declaration.
83062         * lib/file-has-acl.c (aclv_nontrivial) [HP-UX 11.11]: New function.
83063         (file_has_acl): Read also the second kind of HP-UX ACLs.
83064         * lib/set-mode-acl.c (qset_acl) [HP-UX 11.11]: Try to set the second
83065         kind of HP-UX ACLs if the first kind fails.
83066         * lib/copy-acl.c (qcopy_acl) [HP-UX 11.11]: Read and set also the
83067         second kind of HP-UX ACLs.
83068         * tests/test-sameacls.c [HP-UX 11.11]: Include <aclv.h>.
83069         (main) [HP-UX 11.11]: Test also whether the second kind of HP-UX ACLs
83070         agree.
83071         * tests/test-file-has-acl.sh (acl_flavor) [HP-UX 11.11]: Set to
83072         hpuxjfs.
83073         Handle hpuxjfs.
83074         * tests/test-set-mode-acl.sh (acl_flavor) [HP-UX 11.11]: Set to
83075         hpuxjfs.
83076         Handle hpuxjfs.
83077         * tests/test-copy-acl.sh (acl_flavor) [HP-UX 11.11]: Set to hpuxjfs.
83078         (func_test_same_acls): Use both lsacl and getacl.
83079         Handle hpuxjfs.
83080         * tests/test-copy-file.sh (acl_flavor) [HP-UX 11.11]: Set to hpuxjfs.
83081         (func_test_same_acls): Use both lsacl and getacl.
83082         Handle hpuxjfs.
83084 2011-06-12  Bruno Haible  <bruno@clisp.org>
83086         acl: Complete the 2010-08-10 fix.
83087         * lib/file-has-acl.c (file_has_acl) [HP-UX]: Also test against ENOTSUP.
83088         * lib/set-mode-acl.c (qset_acl) [HP-UX]: Likewise.
83089         * lib/copy-acl.c (qcopy_acl) [HP-UX]: Test for the errno values
83090         explicitly.
83091         * tests/test-sameacls.c (main) [HP-UX]: Also test against ENOTSUP.
83092         Reported in <http://debbugs.gnu.org/db/60/6053.html>.
83094 2011-06-12  Bruno Haible  <bruno@clisp.org>
83096         spawn-pipe tests: Comments.
83097         * tests/test-spawn-pipe-child.c (main): Update comment.
83098         Reported by James Youngman <jay@gnu.org>.
83100 2011-06-11  James Youngman  <jay@gnu.org>
83102         New module 'stat-size'.
83103         * modules/stat-size: New module.  Provides macros for accessing
83104         file size information in instances of struct stat.  Depends on the
83105         fileblocks module because it calls st_blocks.
83106         * lib/stat-size.h: New file, adapted from coreutils' system.h.
83107         * doc/gnulib.texi: Include stat-size.texi.
83108         * doc/stat-size.texi: Documentation for this module.
83109         * m4/stat-size.m4: New file; defines gl_STAT_SIZE.
83110         * m4/fileblocks.m4: Mention that stat-size depends on the call to
83111         AC_STRUCT_ST_BLOCKS.
83113 2011-06-09  Bruno Haible  <bruno@clisp.org>
83115         thread: Support pthreads-win32.
83116         * lib/glthread/thread.h (gl_thread_self): Define differently on
83117         pthreads-win32.
83118         (gl_null_thread): New declaration.
83119         (gl_thread_self_pointer): New macro.
83120         * lib/glthread/thread.c (gl_null_thread): New constant.
83121         * tests/test-lock.c: Use gl_thread_self_pointer instead of
83122         gl_thread_self.
83123         * tests/test-tls.c: Likewise.
83124         Suggested by Paul Eggert. Reported by Eric Blake.
83126 2011-06-09  Bruno Haible  <bruno@clisp.org>
83128         thread: Fix confusion between NULL and 0.
83129         * lib/glthread/thread.h (gl_thread_self): Use NULL and 0 appropriately.
83130         Reported by Paul Eggert.
83132 2011-06-09  Bruno Haible  <bruno@clisp.org>
83134         spawn-pipe tests: Avoid test failure on HP-UX 11.
83135         * tests/test-spawn-pipe-child.c (main) [HP-UX]: Don't assert that fd 2
83136         is closed.
83138 2011-06-09  Bruno Haible  <bruno@clisp.org>
83140         acl tests: Fix compilation error on HP-UX 11.
83141         * tests/test-sameacls.c: Include <sys/acl.h> also on HP-UX.
83143 2011-06-09  Bruno Haible  <bruno@clisp.org>
83145         rmdir: Avoid test failure on HP-UX 10.20.
83146         * tests/test-rmdir.h (test_rmdir_func): Accept ENOTEMPTY error, like
83147         EEXIST.
83149 2011-06-08  Eric Blake  <eblake@redhat.com>
83151         perror: fix test on mingw
83152         * modules/perror-tests (Depends-on): Add dup2.
83154         strerror_r-posix: fix on MacOS
83155         * m4/strerror.m4 (gl_FUNC_STRERROR): Flush out MacOS bug.
83156         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R_WORKS): Likewise, and fix
83157         logic bug.
83158         * lib/strerror_r.c (strerror_r): Fix the bug.
83159         * lib/strerror.c (strerror): Likewise.
83160         * doc/posix-functions/strerror_r.texi (strerror_r): Document the
83161         problem.
83162         * doc/posix-functions/strerror.texi (strerror): Likewise.
83163         * doc/posix-functions/perror.texi (perror): Likewise.
83164         * tests/test-strerror.c (main): Enhance test.
83165         * tests/test-strerror_r.c (main): Likewise.
83167 2011-06-08  Bruno Haible  <bruno@clisp.org>
83169         gnulib-tool: Better isolation between different gnulib-tool invocations.
83170         * gnulib-tool: New option --witness-c-macro.
83171         (witness_c_macro): New variable.
83172         (func_emit_lib_Makefile_am): If --witness-c-macro was specified, let
83173         AM_CPPFLAGS define it as a C macro.
83174         (func_emit_tests_Makefile_am): Likewise.
83175         (func_import): Store witness_c_macro setting in gnulib-cache.m4 and
83176         read it from there.
83177         * m4/gnulib-common.m4 (gl_MODULE_INDICATOR_CONDITION): Define through
83178         m4_define, not AC_DEFUN.
83179         (gl_MODULE_INDICATOR_SET_VARIABLE_AUX,
83180         gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR): New macros.
83181         (gl_MODULE_INDICATOR_SET_VARIABLE): Use them.
83182         * modules/arpa_inet (Makefile.am): Use sed expression s/.../.../, not
83183         s|...|...|, to substitute the values of the GNULIB_* module indicator
83184         variables.
83185         * modules/dirent (Makefile.am): Likewise.
83186         * modules/fcntl-h (Makefile.am): Likewise.
83187         * modules/iconv-h (Makefile.am): Likewise.
83188         * modules/langinfo (Makefile.am): Likewise.
83189         * modules/locale (Makefile.am): Likewise.
83190         * modules/math (Makefile.am): Likewise.
83191         * modules/netdb (Makefile.am): Likewise.
83192         * modules/poll-h (Makefile.am): Likewise.
83193         * modules/pty (Makefile.am): Likewise.
83194         * modules/search (Makefile.am): Likewise.
83195         * modules/signal (Makefile.am): Likewise.
83196         * modules/spawn (Makefile.am): Likewise.
83197         * modules/stdio (Makefile.am): Likewise.
83198         * modules/stdlib (Makefile.am): Likewise.
83199         * modules/string (Makefile.am): Likewise.
83200         * modules/sys_ioctl (Makefile.am): Likewise.
83201         * modules/sys_select (Makefile.am): Likewise.
83202         * modules/sys_socket (Makefile.am): Likewise.
83203         * modules/sys_stat (Makefile.am): Likewise.
83204         * modules/sys_times (Makefile.am): Likewise.
83205         * modules/sys_utsname (Makefile.am): Likewise.
83206         * modules/sys_wait (Makefile.am): Likewise.
83207         * modules/termios (Makefile.am): Likewise.
83208         * modules/time (Makefile.am): Likewise.
83209         * modules/unistd (Makefile.am): Likewise.
83210         * modules/wchar (Makefile.am): Likewise.
83212 2011-06-08  Eric Blake  <eblake@redhat.com>
83214         strerror: simplify replacement
83215         * m4/strerror.m4 (gl_PREREQ_STRERROR): Delete.
83216         * modules/strerror (configure.ac): No prereqs needed here...
83217         * modules/strerror-override (configure.ac): ...but this needs it.
83218         (Files): Add file for needed prereq macro.
83220 2011-06-08  Bruno Haible  <bruno@clisp.org>
83222         strerror_r-posix: Tweaks.
83223         * m4/strerror.m4 (gl_FUNC_STRERROR): Omit the code that tests
83224         gl_cv_func_strerror_r_works if gl_FUNC_STRERROR_R_WORKS is not present.
83225         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R_WORKS): Fix AC_CACHE_CHECK
83226         message. Move gl_HEADER_STRING_H_DEFAULTS invocation from here...
83227         (gl_FUNC_STRERROR_R): ... to here.
83228         (gl_PREREQ_STRERROR_R): Test for __xpg_strerror_r.
83230 2011-06-07  Eric Blake  <eblake@redhat.com>
83232         perror: document fixed bugs
83233         * doc/posix-functions/perror.texi (perror): Document recent
83234         patches.
83236 2011-06-07  Paul Eggert  <eggert@cs.ucla.edu>
83238         stat-time: get_stat_birthtime failure is better-defined
83239         * lib/stat-time.h (get_stat_birthtime): If the time is not available,
83240         return a timestamp whose tv_sec and tv_nsec values are both -1.
83241         Previously, the spec said only that the tv_nsec value was negative.
83242         This upward-compatible change simplifies GNU tar a bit.
83244 2011-06-07  Eric Blake  <eblake@redhat.com>
83246         strerror_r-posix: work around cygwin 1.7.9
83247         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Split...
83248         (gl_FUNC_STRERROR_R_WORKS): ...into new macro, to detect Cygwin
83249         bug without replacing strerror_r.
83250         * m4/strerror.m4 (gl_FUNC_STRERROR): Replace strerror if
83251         strerror_r is buggy, but without requiring strerror_r compilation.
83252         * doc/posix-functions/strerror_r.texi (strerror_r): Fix docs.
83254         test-perror: relax test to ignore cygwin bug
83255         * tests/test-perror2.c (main): Relax test on requiring detection
83256         of stream errors, and use unbuffered stream.
83257         * doc/posix-functions/dprintf.texi (dprintf): Document bug.
83258         * doc/posix-functions/fprintf.texi (fprintf): Likewise.
83259         * doc/posix-functions/fputc.texi (fputc): Likewise.
83260         * doc/posix-functions/fputs.texi (fputs): Likewise.
83261         * doc/posix-functions/fputws.texi (fputws): Likewise.
83262         * doc/posix-functions/fwprintf.texi (fwprintf): Likewise.
83263         * doc/posix-functions/fwrite.texi (fwrite): Likewise.
83264         * doc/posix-functions/getopt.texi (getopt): Likewise.
83265         * doc/posix-functions/perror.texi (perror): Likewise.
83266         * doc/posix-functions/printf.texi (printf): Likewise.
83267         * doc/posix-functions/psiginfo.texi (psiginfo): Likewise.
83268         * doc/posix-functions/psignal.texi (psignal): Likewise.
83269         * doc/posix-functions/putc.texi (putc): Likewise.
83270         * doc/posix-functions/putc_unlocked.texi (putc_unlocked):
83271         Likewise.
83272         * doc/posix-functions/putchar.texi (putchar): Likewise.
83273         * doc/posix-functions/putchar_unlocked.texi (putchar_unlocked):
83274         Likewise.
83275         * doc/posix-functions/puts.texi (puts): Likewise.
83276         * doc/posix-functions/putwc.texi (putwc): Likewise.
83277         * doc/posix-functions/putwchar.texi (putwchar): Likewise.
83278         * doc/posix-functions/vdprintf.texi (vdprintf): Likewise.
83279         * doc/posix-functions/vfprintf.texi (vfprintf): Likewise.
83280         * doc/posix-functions/vfwprintf.texi (vfwprintf): Likewise.
83281         * doc/posix-functions/vprintf.texi (vprintf): Likewise.
83282         * doc/posix-functions/vwprintf.texi (vwprintf): Likewise.
83283         * doc/posix-functions/wordexp.texi (wordexp): Likewise.
83284         * doc/posix-functions/wprintf.texi (wprintf): Likewise.
83286 2011-05-22  Bruno Haible  <bruno@clisp.org>
83288         strerror: Move AC_LIBOBJ invocations to module description.
83289         * m4/strerror.m4 (gl_FUNC_STRERROR): Move AC_LIBOBJ and
83290         gl_PREREQ_STRERROR invocations from here...
83291         * modules/strerror (configure.ac): ... to here.
83293 2011-05-21  Bruno Haible  <bruno@clisp.org>
83295         perror: Use common idiom.
83296         * modules/perror (configure.ac): Reorder statements.
83298 2011-06-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
83300         tests: fix usage message in 'mktempd_'
83301         * tests/init.sh (mktempd_): In the usage message, use literal
83302         'mktempd_', not '$ME' (which is even undefined), as the name of
83303         the subroutine.
83305 2011-06-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
83307         tests init: new function 'fatal_', for hard errors
83308         Before this patch, the only way offered by tests/init.sh to
83309         properly signal a hard error was the `framework_failure_'
83310         function.  But the error message issued by that function,
83311         as its name would suggest, refers to a set-up failure in the
83312         testsuite, while hard errors can obviously also be due to
83313         other reasons.  The best way to fix this inconsistency is to
83314         introduce a new function with a more general error message.
83315         * tests/init.sh (fatal_): New function.
83317 2011-06-06  Eric Blake  <eblake@redhat.com>
83319         canonicalize-lgpl: use common idiom
83320         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Prefer older rm -rf
83321         over newer POSIX -Rf.
83322         Reported by Bruno Haible.
83324         canonicalize-lgpl: work around AIX realpath bug
83325         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Expose AIX bug.
83326         * doc/posix-functions/realpath.texi (realpath): Document it.
83327         Reported by Bruno Haible.
83329         strerror: work around FreeBSD bug
83330         * lib/strerror.c (strerror): Special case 0.
83331         Reported by Bruno Haible.
83333         strerror-override: avoid bloating errno module
83334         * modules/errno (Files, configure.ac): Move replacement strings...
83335         * modules/strerror-override: ...to new module.
83336         * modules/strerror (Depends-on): Add strerror-override.
83337         * modules/strerror_r-posix (Depends-on): Likewise.
83338         * MODULES.html.sh: Document new module.
83339         Reported by Bruno Haible.
83341 2011-06-06  Bruno Haible  <bruno@clisp.org>
83343         spawn-pipe tests: Rename program.
83344         * tests/test-spawn-pipe-main.c: Renamed from tests/test-spawn-pipe.c.
83345         * tests/test-spawn-pipe-child.c: Update comment.
83346         * tests/test-spawn-pipe.sh: Update.
83347         * modules/spawn-pipe-tests (Files, Makefile.am): Update.
83349         spawn-pipe tests: Link the child program only against libc.
83350         * tests/test-spawn-pipe-child.c: New file, extracted from
83351         tests/test-spawn-pipe.c.
83352         (main): Expect only one argument.
83353         (is_open): New function, copied from tests/test-pipe.c.
83354         * tests/test-spawn-pipe.c: Don't include <errno.h>.
83355         (child_main): Remove function.
83356         (test_pipe): Pass only one argument to the child program.
83357         (main): Remove child process code. Expect the child program's name as
83358         first argument.
83359         * tests/test-spawn-pipe.sh: Pass the child program's name as first
83360         argument.
83361         * modules/spawn-pipe-tests (Files): Add tests/test-spawn-pipe-child.c.
83362         (Makefile.am): Add test-spawn-pipe-child to check_PROGRAMS. Link
83363         test-spawn-pipe-child against no libraries.
83365 2011-06-06  Bruno Haible  <bruno@clisp.org>
83367         careadlinkat: Avoid mismatch between ssize_t and int.
83368         * lib/careadlinkat.h (careadlinkatcwd): Declare as a function always.
83369         * lib/careadlinkat.c (careadlinkatcwd): Define always.
83371 2011-06-06  Jim Meyering  <meyering@redhat.com>
83373         gnulib-common.m4: add _GL_ATTRIBUTE_CONST and _GL_ATTRIBUTE_PURE
83374         * m4/gnulib-common.m4 (gl_COMMON): Emit definitions of
83375         _GL_ATTRIBUTE_CONST and _GL_ATTRIBUTE_PURE.
83377 2011-06-05  Bruno Haible  <bruno@clisp.org>
83379         ansi-c++-opt: Interoperability with libtool.
83380         * m4/ansi-c++.m4 (gl_PROG_ANSI_CXX): When a C++ compiler is not found,
83381         set the variable to "no", not to ":".
83382         * NEWS: Mention the change.
83384 2011-06-05  Bruno Haible  <bruno@clisp.org>
83386         acl: Fix test failure on AIX 7.
83387         * tests/test-sameacls.c (main) [AIX]: Fix aclx_printStr invocation.
83388         Based on a patch by Jørn Amundsen <Jorn.Amundsen@ntnu.no>.
83390 2011-06-05  Bruno Haible  <bruno@clisp.org>
83392         pipe-filter-ii: Fix test failure on AIX and IRIX.
83393         * lib/pipe-filter-ii.c (pipe_filter_ii_execute): When write() fails
83394         with EAGAIN, retry with a smaller buffer size.
83396 2011-06-05  Bruno Haible  <bruno@clisp.org>
83398         localename: Fix link dependencies.
83399         * modules/localename (Link): Mention $(LIBTHREAD) or $(LTLIBTHREAD).
83400         * modules/localename-tests (Makefile.am): Link test-localename with
83401         $(LIBTHREAD).
83403 2011-06-05  Bruno Haible  <bruno@clisp.org>
83405         error: Avoid gcc warning.
83406         * lib/error.c (strerror_r): Declare also when its return type is 'int'.
83408 2011-06-05  Bruno Haible  <bruno@clisp.org>
83410         unsetenv: Avoid gcc warning.
83411         * lib/unsetenv.c (unsetenv): Provide declaration if system lacks it.
83413 2011-06-05  Bruno Haible  <bruno@clisp.org>
83415         setenv: Avoid gcc warning.
83416         * lib/setenv.c (setenv): Provide declaration if system lacks it.
83418 2011-06-05  Bruno Haible  <bruno@clisp.org>
83420         sys_select: Ensure memset is declared also on AIX 7.
83421         * lib/sys_select.in.h: Include <string.h> also on AIX.
83422         * doc/posix-headers/sys_select.texi: Mention that <sys/select.h> is not
83423         self-contained also on AIX 7.1.
83425 2011-06-04  Jim Meyering  <meyering@redhat.com>
83427         maint.mk: sc_unmarked_diagnostics: don't hard-code "error"
83428         * top/maint.mk (sc_unmarked_diagnostics): Don't hard-code the
83429         function name, "error".
83430         (_gl_translatable_diag_func_re): New configurable variable.
83432 2011-06-04  Bruno Haible  <bruno@clisp.org>
83434         getopt: Avoid gcc warning.
83435         * lib/getopt.c (_getopt_internal_r): Remove unused variable 'ambig'.
83437 2011-06-04  Bruno Haible  <bruno@clisp.org>
83439         strerror_r: Fix comments.
83440         * lib/strerror_r.c (strerror_r): Update comments after 2011-06-01
83441         commit.
83443 2011-06-04  Bruno Haible  <bruno@clisp.org>
83445         perror: Fix compilation error.
83446         * lib/perror.c: Don't include intprops.h, verify.h, strerror-impl.h.
83447         Undefine fprintf, not sprintf.
83448         * modules/perror (Depends-on): Remove intprops, verify.
83450 2011-06-04  Bruno Haible  <bruno@clisp.org>
83452         setlocale: Enable replacement on Cygwin 1.5.
83453         * m4/setlocale.m4 (gl_FUNC_SETLOCALE): Set REPLACE_SETLOCALE also on
83454         Cygwin 1.5.x.
83455         * doc/posix-functions/setlocale.texi: Mention that the problem with the
83456         LC_CTYPE category also exists on Cygwin 1.5.x.
83458 2011-06-04  Bruno Haible  <bruno@clisp.org>
83460         strerror-override: Don't disable symbol renamings.
83461         * lib/strerror-override.h: Include errno.h and stddef.h, not string.h.
83462         * lib/strerror-override.c: Include config.h.
83463         (strerror_override): Don't undefine.
83465 2011-06-03  Bruno Haible  <bruno@clisp.org>
83467         Copyright: Use LGPL 2.1 instead of LGPL 2.0.
83468         * lib/localename.h: Update copyright header.
83469         * lib/localename.c: Likewise.
83470         * lib/relocatable.h: Likewise.
83471         * lib/relocatable.c: Likewise.
83473 2011-06-02  Bruno Haible  <bruno@clisp.org>
83475         doc: Fix a module name.
83476         * doc/posix-functions/open.texi: Fix module name 'nonblocking'.
83478 2011-06-02  Bruno Haible  <bruno@clisp.org>
83480         pipe2: Remove dependency on 'nonblocking' module.
83481         * lib/pipe2.c: Include verify.h. Include nonblocking.h only if
83482         O_NONBLOCK is defined by gnulib.
83483         (pipe2) [WIN32]: If O_NONBLOCK is not defined by gnulib, verify that it
83484         is zero.
83485         * modules/pipe2 (Depends-on): Add verify. Remove nonblocking.
83486         * tests/test-pipe2.c: Include nonblocking.h only if O_NONBLOCK is
83487         defined by gnulib.
83488         (get_nonblocking_flag): New function.
83489         (main): Test O_NONBLOCK flag only if it is nonzero.
83490         * doc/glibc-functions/pipe2.texi: Mention the 'nonblocking' module.
83492 2011-06-03  Jim Meyering  <meyering@redhat.com>
83494         maint: three new prohibit-header-without-use rules
83495         Prohibit use of cloexec.h, posixver.h, same.h without use.
83496         * top/maint.mk (sc_prohibit_cloexec_without_use): New rule.
83497         (sc_prohibit_posixver_without_use): Likewise.
83498         (sc_prohibit_same_without_use): Likewise.
83500 2011-06-02  Paul Eggert  <eggert@cs.ucla.edu>
83502         allocator: 'die' routine is now given requested size
83503         * lib/allocator.h (struct allocator.die): New size arg.
83504         * lib/careadlinkat.c (careadlinkat): Pass size to 'die' function.
83505         If the actual problem is an ssize_t limitation, not a size_t or
83506         malloc failure, fail with errno==ENAMETOOLONG instead of calling 'die'.
83508 2011-06-01  Eric Blake  <eblake@redhat.com>
83510         strerror: drop strerror_r dependency
83511         * lib/strerror_r.c (strerror_r): Move gnulib replacement strings...
83512         * lib/strerror-override.c (strerror_override): ...to new file.
83513         * lib/strerror-override.h: Add prototype.
83514         * lib/strerror-impl.h: Delete.
83515         * lib/strerror.c (strerror): New implementation.
83516         * modules/errno (Files): Add new files.
83517         (configure.ac): Compile new file as appropriate.
83518         * modules/strerror (Files): Drop unused file.
83519         (Depends-on): Drop strerror_r-posix.
83520         * MODULES.html.sh: Document strerror_r-posix.
83521         Requested by Sam Steingold.
83523         perror: call strerror_r directly
83524         * modules/perror (Files): Drop strerror-impl.h.
83525         * lib/perror.c (perror): Use our own stack buffer, rather than
83526         calling a wrapper that uses static storage.
83527         * doc/posix-functions/perror.texi (perror): Document a limitation
83528         of our replacement.
83530         strerror_r: fix includes for FreeBSD
83531         * lib/strerror_r.c (includes): Use <stdlib.h> unconditionally,
83532         since we use abort on some platforms.
83533         Reported by Matthias Bolte.
83535 2011-05-31  Bruno Haible  <bruno@clisp.org>
83537         Fix link errors in tests: openat-die uses gettext-h.
83538         * modules/areadlinkat-tests (Makefile.am): Link test-areadlinkat
83539         against $(LIBINTL).
83540         * modules/dirent-safer-tests (Makefile.am): Link test-dirent-safer
83541         against $(LIBINTL).
83542         * modules/fdopendir-tests (Makefile.am): Link test-fdopendir against
83543         $(LIBINTL).
83544         * modules/fdutimensat-tests (Makefile.am): Link test-fdutimensat
83545         against $(LIBINTL).
83546         * modules/linkat-tests (Makefile.am): Link test-linkat against
83547         $(LIBINTL).
83548         * modules/mkfifoat-tests (Makefile.am): Link test-mkfifoat against
83549         $(LIBINTL).
83550         * modules/openat-safer-tests (Makefile.am): Link test-openat-safer
83551         against $(LIBINTL).
83552         * modules/openat-tests (Makefile.am): Link test-fchownat, test-fstatat,
83553         test-mkdirat, test-openat, test-unlinkat against $(LIBINTL).
83554         * modules/readlinkat-tests (Makefile.am): Link test-readlinkat against
83555         $(LIBINTL).
83556         * modules/symlinkat-tests (Makefile.am): Link test-symlinkat against
83557         $(LIBINTL).
83558         * modules/utimensat-tests (Makefile.am): Link test-utimensat against
83559         $(LIBINTL).
83560         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
83562 2011-05-31  Bruno Haible  <bruno@clisp.org>
83564         Fix link errors in tests: wait-process uses gettext-h.
83565         * modules/nonblocking-pipe-tests (Makefile.am): Set
83566         test_nonblocking_pipe_main_LDADD.
83567         * modules/nonblocking-socket-tests (Makefile.am): Link
83568         test-nonblocking-socket-main against $(LIBINTL).
83569         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
83571 2011-05-29  Paul Eggert  <eggert@cs.ucla.edu>
83573         assert-h: work around 'verify' incompatibility
83574         * lib/verify.h: Use @...@ directives, not ifdef.
83575         * modules/assert-h (assert.h): Implement the directives.
83576         (assert.h): Substitute the symbol-prefix more consistently.
83578 2011-05-29  Jim Meyering  <meyering@redhat.com>
83580         trim: remove three superfluous assignments
83581         * lib/trim.c (trim2): Remove three superfluous assignments
83582         and correct brace positioning.
83584 2011-05-29  Bruno Haible  <bruno@clisp.org>
83586         wctype-h: Avoid namespace pollution on Solaris 2.6.
83587         * lib/wctype.in.h: On Solaris, undefine 'multibyte' and a few other
83588         identifiers.
83589         * doc/posix-headers/wctype.texi: Mention the problem.
83590         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
83592 2011-05-28  Jim Meyering  <meyering@redhat.com>
83594         parse-datetime.y: accommodate -Wstrict-overflow
83595         * lib/parse-datetime.y (yylex): Rearrange pointer arithmetic to
83596         placate -Wstrict-overflow.
83598         trim: avoid a warning from -O2 -Wstrict-overflow
83599         * lib/trim.c (trim2): Declare local to be "unsigned int", not "int".
83601 2011-05-29  Bruno Haible  <bruno@clisp.org>
83603         gnulib-tool: Fix bug in yesterday's commit.
83604         * gnulib-tool (func_create_testdir): Don't add gltests to $subdirs
83605         twice.
83607 2011-05-29  Bruno Haible  <bruno@clisp.org>
83609         Allow multiple gnulib generated include files to be combined.
83610         * gnulib-tool (func_compute_include_guard_prefix): New function.
83611         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Resolve also
83612         ${gl_include_guard_prefix} references.
83613         (func_import, func_create_testdir): Invoke
83614         func_compute_include_guard_prefix.
83615         * lib/arpa_inet.in.h: Use the @GUARD_PREFIX@ placeholder.
83616         * lib/ctype.in.h: Likewise.
83617         * lib/dirent.in.h: Likewise.
83618         * lib/errno.in.h: Likewise.
83619         * lib/fcntl.in.h: Likewise.
83620         * lib/float.in.h: Likewise.
83621         * lib/getopt.in.h: Likewise.
83622         * lib/iconv.in.h: Likewise.
83623         * lib/langinfo.in.h: Likewise.
83624         * lib/locale.in.h: Likewise.
83625         * lib/math.in.h: Likewise.
83626         * lib/netdb.in.h: Likewise.
83627         * lib/netinet_in.in.h: Likewise.
83628         * lib/poll.in.h: Likewise.
83629         * lib/pthread.in.h: Likewise.
83630         * lib/pty.in.h: Likewise.
83631         * lib/sched.in.h: Likewise.
83632         * lib/se-selinux.in.h: Likewise.
83633         * lib/search.in.h: Likewise.
83634         * lib/signal.in.h: Likewise.
83635         * lib/spawn.in.h: Likewise.
83636         * lib/stdarg.in.h: Likewise.
83637         * lib/stddef.in.h: Likewise.
83638         * lib/stdint.in.h: Likewise.
83639         * lib/stdio.in.h: Likewise.
83640         * lib/stdlib.in.h: Likewise.
83641         * lib/string.in.h: Likewise.
83642         * lib/strings.in.h: Likewise.
83643         * lib/sys_file.in.h: Likewise.
83644         * lib/sys_ioctl.in.h: Likewise.
83645         * lib/sys_select.in.h: Likewise.
83646         * lib/sys_socket.in.h: Likewise.
83647         * lib/sys_stat.in.h: Likewise.
83648         * lib/sys_time.in.h: Likewise.
83649         * lib/sys_times.in.h: Likewise.
83650         * lib/sys_uio.in.h: Likewise.
83651         * lib/sys_utsname.in.h: Likewise.
83652         * lib/sys_wait.in.h: Likewise.
83653         * lib/sysexits.in.h: Likewise.
83654         * lib/termios.in.h: Likewise.
83655         * lib/time.in.h: Likewise.
83656         * lib/unistd.in.h: Likewise.
83657         * lib/wchar.in.h: Likewise.
83658         * lib/wctype.in.h: Likewise.
83659         * modules/arpa_inet (Makefile.am): Substitute @GUARD_PREFIX@.
83660         * modules/ctype (Makefile.am): Likewise.
83661         * modules/dirent (Makefile.am): Likewise.
83662         * modules/errno (Makefile.am): Likewise.
83663         * modules/fcntl-h (Makefile.am): Likewise.
83664         * modules/float (Makefile.am): Likewise.
83665         * modules/getopt-posix (Makefile.am): Likewise.
83666         * modules/iconv-h (Makefile.am): Likewise.
83667         * modules/langinfo (Makefile.am): Likewise.
83668         * modules/locale (Makefile.am): Likewise.
83669         * modules/math (Makefile.am): Likewise.
83670         * modules/netdb (Makefile.am): Likewise.
83671         * modules/netinet_in (Makefile.am): Likewise.
83672         * modules/poll-h (Makefile.am): Likewise.
83673         * modules/pthread (Makefile.am): Likewise.
83674         * modules/pty (Makefile.am): Likewise.
83675         * modules/sched (Makefile.am): Likewise.
83676         * modules/search (Makefile.am): Likewise.
83677         * modules/selinux-h (Makefile.am): Likewise.
83678         * modules/signal (Makefile.am): Likewise.
83679         * modules/spawn (Makefile.am): Likewise.
83680         * modules/stdarg (Makefile.am): Likewise.
83681         * modules/stddef (Makefile.am): Likewise.
83682         * modules/stdint (Makefile.am): Likewise.
83683         * modules/stdio (Makefile.am): Likewise.
83684         * modules/stdlib (Makefile.am): Likewise.
83685         * modules/string (Makefile.am): Likewise.
83686         * modules/strings (Makefile.am): Likewise.
83687         * modules/sys_file (Makefile.am): Likewise.
83688         * modules/sys_ioctl (Makefile.am): Likewise.
83689         * modules/sys_select (Makefile.am): Likewise.
83690         * modules/sys_socket (Makefile.am): Likewise.
83691         * modules/sys_stat (Makefile.am): Likewise.
83692         * modules/sys_time (Makefile.am): Likewise.
83693         * modules/sys_times (Makefile.am): Likewise.
83694         * modules/sys_uio (Makefile.am): Likewise.
83695         * modules/sys_utsname (Makefile.am): Likewise.
83696         * modules/sys_wait (Makefile.am): Likewise.
83697         * modules/sysexits (Makefile.am): Likewise.
83698         * modules/termios (Makefile.am): Likewise.
83699         * modules/time (Makefile.am): Likewise.
83700         * modules/unistd (Makefile.am): Likewise.
83701         * modules/wchar (Makefile.am): Likewise.
83702         * modules/wctype-h (Makefile.am): Likewise.
83703         * modules/assert-h (Makefile.am): Replace _GL_VERIFY_H specially.
83705 2011-05-29  Bruno Haible  <bruno@clisp.org>
83707         assert-h: Allow multiple gnulib generated replacements to coexist.
83708         * lib/verify.h (struct _gl_verify_type): Avoid identical redefinition.
83710 2011-05-29  Bruno Haible  <bruno@clisp.org>
83712         argp: Allow coexistence with strerror_r-posix module.
83713         * lib/argp-help.c (__argp_failure): If strerror_r is defined as a macro
83714         (either to __xpg_strerror_r by glibc's <string.h> or to rpl_strerror_r
83715         by gnulib's <string.h> replacement), assume it has the POSIX signature,
83716         not the glibc signature.
83718 2011-05-28  Bruno Haible  <bruno@clisp.org>
83720         gnulib-tool: Alternative structure of testdirs, similar to --import.
83721         * gnulib-tool: New option --single-configure.
83722         (func_usage): Document it.
83723         (single_configure): New variable.
83724         (func_modules_transitive_closure_separately,
83725         func_modules_transitive_closure_separately,
83726         func_determine_use_libtests, func_modules_add_dummy_separately,
83727         func_modules_to_filelist_separately): New functions, extracted from
83728         func_import.
83729         (func_emit_tests_Makefile_am): Handle $single_configure = true case.
83730         (func_import): Use the new functions.
83731         (func_create_testdir): Set final_modules. Handle $single_configure =
83732         true case.
83734 2011-05-28  Bruno Haible  <bruno@clisp.org>
83736         getloadavg: Remove an unreliable safety check.
83737         * m4/getloadavg.m4 (gl_GETLOADAVG): Drop argument. Remove test whether
83738         getloadavg.c is in place.
83739         * modules/getloadavg (configure.ac): Drop argument of gl_GETLOADAVG.
83740         Reported by Sam Steingold <sds@gnu.org>.
83742 2011-05-28  Bruno Haible  <bruno@clisp.org>
83744         doc: Cleanup yet another file produced by texinfo.tex.
83745         * doc/Makefile (mostlyclean): Remove also gnulib.cn.
83747 2011-05-28  Bruno Haible  <bruno@clisp.org>
83749         Finish the conditional dependencies mechanism.
83750         * gnulib-tool: New option --no-conditional-dependencies.
83751         (func_usage): Document it. Don't mark --conditional-dependencies as
83752         experimental.
83753         (cond_dependencies): The possible values can now be true, false, empty.
83754         (func_modules_transitive_closure, func_emit_autoconf_snippets): Update.
83755         (func_import): Store setting in gnulib-cache.m4 and read it from there.
83756         * doc/gnulib-tool.texi (Conditional dependencies): New section.
83758 2011-05-28  Bruno Haible  <bruno@clisp.org>
83760         doc: Use a recent texinfo.tex.
83761         * doc/Makefile (tex_opts): New variable.
83762         (%.dvi, %.pdf): Pass it to texi2dvi and texi2pdf.
83764 2011-05-28  Jim Meyering  <meyering@redhat.com>
83766         intprops.h: adjust comment to match code change
83767         * lib/intprops.h (_GL_INT_CONVERT): Adjust comment: now that E is used
83768         only once, it *may* have side effects.  Also fix an unrelated typo.
83769         (_GL_INT_SIGNED): Likewise.
83771 2011-05-26  Simon Josefsson  <simon@josefsson.org>
83773         * lib/gen-uni-tables.c: Say "gen-uni-tables.c" consistently.
83775 2011-05-26  Bruno Haible  <bruno@clisp.org>
83777         mbsrchr: Avoid collision with system function on Interix.
83778         * lib/string.in.h (mbsrchr): Define as rpl_mbsrchr also on Interix.
83779         Reported by Markus Duft <mduft@gentoo.org>.
83781 2011-05-15  James Youngman  <jay@gnu.org>
83783         getopt: for ambiguous options, enumerate the possibilities.
83784         * lib/getopt.c (_getopt_internal_r): Merge glibc change printing
83785         the ambiguous options when an ambiguous prefix is given. This was
83786         http://sourceware.org/bugzilla/show_bug.cgi?id=7101.  The merged
83787         glibc change was
83788         http://sourceware.org/git/?p=glibc.git;a=commit;h=bd25564e1e98910ed69043ed6a6f884ce60e5780.
83790 2011-05-25  Eric Blake  <eblake@redhat.com>
83792         getcwd: work around mingw bug
83793         * lib/getcwd-lgpl.c (rpl_getcwd): Guarantee correct error.
83794         * doc/posix-functions/getcwd.texi (getcwd): Document it.
83795         Reported by Matthias Bolte.
83797 2011-05-24  Paul Eggert  <eggert@cs.ucla.edu>
83799         test-intprops: disable -Wtype-limits diagnostics
83800         * tests/test-intprops.c: Use a pragma to ignore -Wtype-limits
83801         diagnostics.  Otherwise, the integer overflow macros generate many
83802         diagnostics.  Reported by Jim Meyering in
83803         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00528.html>.
83805         intprops: shorten, to pacify gcc -Woverlength-strings
83806         * lib/intprops.h (_GL_INT_CONVERT, _GL_INT_NEGATE_CONVERT):
83807         (_GL_BINARY_OP_OVERFLOW): Say "0 * (x)" rather than "(x) - (x)",
83808         so that, for example, verify (INT_MULTIPLY_OVERFLOW (...)) is less
83809         likely to run afoul of C compiler limits for string constant lengths.
83810         See <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00528.html>.
83812 2011-05-24  Eric Blake  <eblake@redhat.com>
83814         docs: document recently fixed glibc printf bug
83815         * doc/posix-functions/fprintf.texi (fprintf): Document it.
83816         * doc/posix-functions/printf.texi (printf): Likewise.
83817         * doc/posix-functions/vfprintf.texi (vfprintf): Likewise.
83818         * doc/posix-functions/vprintf.texi (vprintf): Likewise.
83820         closein-tests: convert to init.sh
83821         * modules/closein-tests (Files): Add init.sh
83822         * tests/test-closein.sh Use it.
83824         yesno-tests: convert to init.sh
83825         * modules/yesno-tests (Files): Add init.sh.
83826         * tests/test-yesno.sh: Use it.
83828         atexit-tests: ensure reliable exit status
83829         * tests/test-atexit.sh: Prefer 'Exit' over 'exit'.
83830         Reported by Bruno Haible.
83832 2011-05-24  Bruno Haible  <bruno@clisp.org>
83834         strerror_r-posix: Respect rules for use of AC_LIBOBJ.
83835         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Move AC_LIBOBJ and
83836         gl_PREREQ_STRERROR_R invocations from here...
83837         * modules/strerror_r-posix (configure.ac): ... to here.
83839 2011-05-24  Eric Blake  <eblake@redhat.com>
83841         strerror_r: fix missing header
83842         * lib/strerror_r.c: Avoid compiler warning about snprintf.
83844         strerror_r: fix AIX test failures
83845         * lib/strerror_r.c (strerror_r): Convert silent truncation to
83846         ERANGE failure.
83848         strerror_r: fix Solaris test failures
83849         * lib/strerror_r.c (strerror_r): Partially populate buf on ERANGE
83850         failures.
83851         * doc/posix-functions/strerror_r.texi (strerror_r): Document this.
83853         strerror_r: enforce POSIX recommendations
83854         * lib/strerror_r.c (safe_copy): New helper method.
83855         (strerror_r): Guarantee a non-empty string.
83856         * tests/test-strerror_r.c (main): Enhance tests to incorporate
83857         recent POSIX rulings and to match our strerror guarantees.
83858         * doc/posix-functions/strerror_r.texi (strerror_r): Document this.
83860 2011-05-24  Jim Meyering  <meyering@redhat.com>
83862         test-perror2.c: avoid warning about unused variable
83863         * tests/test-perror2.c (main): Remove declaration of unused "fp".
83865 2011-05-24  Eric Blake  <eblake@redhat.com>
83867         perror: avoid spurious test failure on HP-UX
83868         * tests/test-perror.sh: Use Exit to avoid wrong exit status.
83870         tests: fix logic bug in init.sh
83871         * tests/init.sh: (gl_set_x_corrupts_stderr_): Clear for successful
83872         shell.
83874 2011-05-24  Jim Meyering  <meyering@redhat.com>
83876         utimensat: do not reference an out-of-scope buffer
83877         Otherwise, with __linux__ defined, "times" would point to a buffer, "ts"
83878         declared in an inner scope, yet "times" would be dereferenced outside
83879         the scope in which "ts" was valid.
83880         * lib/utimensat.c (rpl_utimensat) [__linux__]: Move the declaration
83881         of ts[2] "out/up", so that the use of aliased "times" (via
83882         "times = ts;") does not end up referencing an out-of-scope "ts"
83884         opendir-safer.c: don't clobber errno; don't close negative FD
83885         * lib/opendir-safer.c (opendir_safer):
83886         [HAVE_FDOPENDIR || GNULIB_FDOPENDIR]: Don't close a negative
83887         file descriptor, and more importantly, don't clobber the
83888         offending errno value with EINVAL.  Before, upon failure
83889         of dup_safer, we would pass the negative file descriptor to
83890         fdopendir, which would clobber errno.
83892 2011-05-23  Bruno Haible  <bruno@clisp.org>
83894         idcache: Fix module description.
83895         * modules/idcache (Include): Set to "idcache.h".
83897 2011-05-23  Paul Eggert  <eggert@cs.ucla.edu>
83899         gnulib-tool: fix portability problem with MacOS sed
83900         A sed command like "/x/{s/a/b/}" is not portable; a newline is needed
83901         before the "}".  Problem reported by Leo in
83902         <http://lists.gnu.org/r/emacs-devel/2011-05/msg00717.html>.
83903         * gnulib-tool (func_modules_transitive_closure): Insert newlines in
83904         sed_extract_condition1, sed_extract_condition2.
83906 2011-05-23  Bruno Haible  <bruno@clisp.org>
83908         hash: Simplify autoconf macro.
83909         * m4/hash.m4 (gl_HASH): Don't require AM_STDBOOL_H.
83911 2011-05-23  Bruno Haible  <bruno@clisp.org>
83913         getugroups: Fix module description.
83914         * modules/getugroups (Include): Set to "getugroups.h".
83916 2011-05-23  Bruno Haible  <bruno@clisp.org>
83918         linkat: Simplify autoconf macro.
83919         * m4/linkat.m4 (gl_FUNC_LINKAT): Don't require gl_FUNC_LINK.
83921 2011-05-23  Bruno Haible  <bruno@clisp.org>
83922             Eric Blake  <eblake@redhat.com>
83924         linkat, renameat: Update dependencies.
83925         * modules/renameat (Depends-on): Add dosname, save-cwd. Remove stpcpy.
83926         * modules/linkat (Depends-on): Likewise. Remove also readlink,
83927         symlinkat.
83929 2011-05-23  Jim Meyering  <meyering@redhat.com>
83931         maint.mk: more tight_scope improvements
83932         * top/maint.mk: (_gl_TS_var_match): Use $(_gl_TS_extern) here, too.
83933         (_gl_TS_headers): Define only in if-0'd block.
83934         (_gl_TS_dir): Omit the $(srcdir)/ prefix.  Sometimes we need it,
83935         sometimes we must *not* use it.  Adjust uses accordingly.
83936         (sc_tight_scope): Use much simpler grep-based test to determine
83937         whether we skip this rule.
83939         maint.mk: generalize/improve the tight-scope rule
83940         * top/maint.mk: Emit a warning when the test is skipped.
83941         (_gl_TS_dir): Add $(srcdir)/ prefix.
83942         (_gl_TS_function_match): Simplify, rather than trying
83943         to enumerate common types.  Otherwise, it would fail to match an
83944         "extern unsigned char const *" declaration in idutils.
83945         (_gl_TS_extern): Do not endorse use of "XTERN", but do provide
83946         a way to support use of that type of macro.
83947         (_gl_TS_var_match): Simplify regexp.
83948         (_gl_TS_obj_files): New configurable variable.
83949         (_gl_TS_headers): Likewise.
83951 2011-05-22  Paul Eggert  <eggert@cs.ucla.edu>
83953         verify: fix bug when gnulib <assert.h> is also included
83954         * lib/verify.h (verify, verify_true): Define if _GL_VERIFY_H
83955         is defined, not if _GL_STATIC_ASSERT_H is not defined.
83956         Perhaps there's a better way, but this fixes the immediate problem.
83957         Problem reported by Bruno Haible in
83958         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00478.html>.
83960 2011-05-22  Bruno Haible  <bruno@clisp.org>
83962         xgetcwd: Simplify autoconf macro.
83963         * m4/xgetcwd.m4 (gl_XGETCWD): Don't require gl_FUNC_GETCWD.
83965 2011-05-22  Bruno Haible  <bruno@clisp.org>
83967         New module 'mktime-internal'.
83968         * modules/mktime-internal: New file.
83969         * m4/timegm.m4 (gl_PREREQ_TIMEGM): Move contents to ...
83970         * m4/mktime.m4 (gl_FUNC_MKTIME_INTERNAL): New macro. Define
83971         mktime_internal as a C macro if libc has __mktime_internal.
83972         * modules/timegm (Depends-on): Add mktime-internal. Remove mktime. Add
83973         conditions.
83974         * MODULES.html.sh (Date and time <time.h>): Add mktime-internal.
83976 2011-05-22  Bruno Haible  <bruno@clisp.org>
83978         timegm: Correct mktime replacement statements.
83979         * m4/timegm.m4 (gl_PREREQ_TIMEGM): Set REPLACE_MKTIME, instead of
83980         defining mktime as a C macro. This completes a 2009-07-28 commit.
83982 2011-05-22  Bruno Haible  <bruno@clisp.org>
83984         timegm: Simplify autoconf macro.
83985         * m4/timegm.m4 (gl_PREREQ_TIMEGM): Don't require gl_TIME_R.
83987 2011-05-21  Paul Eggert  <eggert@cs.ucla.edu>
83989         clock-time: change to LGPLv2+.
83990         * modules/clock-time: Change from GPL to LGPLv2+.  Actually, it's
83991         BSD-like but we have no mark for that; this is good enough for now.
83993 2011-05-21  Bruno Haible  <bruno@clisp.org>
83995         strerror_r: Fix comments.
83996         * lib/strerror_r.c (strerror_r): Fix comment about Cygwin and sys_nerr.
83998 2011-05-21  Bruno Haible  <bruno@clisp.org>
84000         relocatable-prog-wrapper: Fix possible link error.
84001         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): Move determination of
84002         HAVE_SETENV and REPLACE_SETENV and AC_LIBOBJ invocation from here...
84003         (gl_FUNC_SETENV): ... to here.
84004         * m4/canonicalize.m4 (gl_CANONICALIZE_LGPL_SEPARATE): Update comment.
84005         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): Likewise.
84007 2011-05-21  Bruno Haible  <bruno@clisp.org>
84009         relocatable-prog-wrapper: Assume strerror() exists.
84010         * modules/relocatable-prog-wrapper (Files): Remove lib/strerror.c,
84011         m4/strerror.m4.
84012         (configure.ac): Don't invoke gl_FUNC_STRERROR_SEPARATE.
84013         * lib/relocwrapper.c: Remove mention of strerror module.
84014         * lib/strerror.c: Assume REPLACE_STRERROR is 1.
84015         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): Remove macro.
84016         (gl_FUNC_STRERROR): Inline it here. Don't define REPLACE_STRERROR as a
84017         C macro.
84019 2011-05-21  Bruno Haible  <bruno@clisp.org>
84021         select: Simplify replacement idiom.
84022         * m4/select.m4 (gl_FUNC_SELECT): Set REPLACE_SELECT also on native
84023         Win32 platforms.
84024         * lib/sys_select.in.h (select): Simplify accordingly.
84025         * modules/select (Depends-on): Likewise.
84027 2011-05-21  Bruno Haible  <bruno@clisp.org>
84029         mkdir-p: Simplify autoconf macro.
84030         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't require gl_FUNC_LCHMOD,
84031         gl_FUNC_LCHOWN.
84033 2011-05-21  Eric Blake  <eblake@redhat.com>
84035         strerror_r: avoid clobbering strerror on cygwin
84036         * lib/strerror_r.c (strerror_r): Don't use cygwin's strerror_r;
84037         fall back instead to sys_errlist.
84038         * modules/strerror (configure.ac): Add witness.
84039         * tests/test-strerror_r.c (main): Enhance test.
84040         * doc/posix-functions/strerror_r.texi (strerror_r): Document it.
84041         * tests/test-perror2.c (main): Free memory before exit.
84043 2011-05-21  Bruno Haible  <bruno@clisp.org>
84045         mkdtemp: Use gnulib naming conventions.
84046         * m4/mkdtemp.m4 (gl_FUNC_MKDTEMP): Renamed from gt_FUNC_MKDTEMP.
84047         * modules/mkdtemp (configure.ac): Update.
84049 2011-05-20  Eric Blake  <eblake@redhat.com>
84051         strerror_r: avoid corrupting errno on Solaris
84052         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Check for Solaris behavior.
84053         * doc/posix-functions/strerror_r.texi (strerror_r): Document it.
84055         strerror_r: avoid compiler warning
84056         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Don't return a char*.
84058         strerror_r: simplify AIX code
84059         * lib/strerror_r.c (strerror_r): Filter out buflen of 1 up front.
84061         test-perror: avoid spurious failure on FreeBSD
84062         * modules/perror-tests (Depends-on): Add strerror, now that
84063         strerror_r no longer pulls it in.
84065 2011-05-20  Bruno Haible  <bruno@clisp.org>
84067         strerror_r-posix: Remove unused dependencies.
84068         * modules/strerror_r-posix (Depends-on): Remove strerror.
84069         Reported by Eric Blake.
84071 2011-05-20  Paul Eggert  <eggert@cs.ucla.edu>
84073         intprops: remove assumption about A|B representation
84074         * lib/intprops.h (_GL_BINARY_OP_OVERFLOW): Do not assume that A|B
84075         is a valid integer if both A and B are.  Although this is true for
84076         all known practical hosts, the C standard doesn't guarantee it,
84077         and the code need not assume it.  Also, this change may work around
84078         HP-UX 11.23 and IRIX 6.5 cc bugs reported by Bruno Haible in
84079         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00426.html>.
84081 2011-05-20  Eric Blake  <eblake@redhat.com>
84083         perror: work around FreeBSD bug
84084         * m4/perror.m4 (gl_FUNC_PERROR): Also replace perror if strerror_r
84085         is broken.  Move AC_LIBOBJ...
84086         * modules/perror (configure.ac): Here.
84087         * doc/posix-functions/perror.texi (perror): Document this.
84088         * tests/test-perror2.c (main): Enhance test.
84090         test-perror: check for strerror interactions
84091         * tests/macros.h (STREQ): Add macro.
84092         * modules/perror-tests (Files): Add second test.
84093         * tests/test-perror2.c (main): New file.
84094         * doc/posix-functions/perror.texi (perror): Document glibc bug.
84096         test-perror: rewrite to use init script
84097         * modules/perror-tests (Files): Add init.sh.
84098         * tests/test-perror.sh: Use temporary directory.
84100 2011-05-20  Jim Meyering  <meyering@redhat.com>
84102         maint: replace misused "a" with "an"
84103         * doc/intprops.texi: "a integer"
84104         * doc/regex.texi: "a explanation"
84105         * lib/alignof.h: "a object"
84106         * lib/argmatch.h: "a explanation"
84107         * lib/argp-help.c: "a option" and "a OPTION_DOC"
84108         * lib/stdint.in.h: "a integer"
84109         * lib/userspec.c: "a owner"
84110         * doc/gnulib.texi: Fix "a idea", and reword.
84112 2011-05-19  Jim Meyering  <meyering@redhat.com>
84114         maint: correct misuse of "a" and "an"
84115         * doc/regex.texi (Collating Symbol Operators): s/an close.../a close/
84116         * lib/argp-help.c: "an docum...": s/an/a/
84117         * lib/argp-parse.c: "An vector": s/An/A/
84118         * lib/execute.c: "an native": s/an/a/
84119         * lib/spawn-pipe.c: Likewise.
84120         * lib/gc.h: "an Gc_rc": s/an/a/
84121         * lib/unigbrk.in.h: "an grapheme": s/an/a/
84122         * lib/fts.c: "an stat.st_dev": s/an/a/
84124 2011-05-19  Paul Eggert  <eggert@cs.ucla.edu>
84126         intprops-tests: work around HP-UX 11.23 cc bug with constants
84127         * tests/test-intprops.c (VERIFY): New macro.
84128         (main): Use it, instead of verify, to work around the compiler bug; see
84129         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00401.html>.
84131         intprops: work around IRIX 6.5 cc bug with 0u - 0u + -1
84132         See http://lists.gnu.org/r/bug-gnulib/2011-05/msg00406.html
84133         * lib/intprops.h (_GL_INT_NEGATE_CONVERT): New macro.
84134         (_GL_INT_SIGNED, _GL_INT_MAXIMUM, _GL_DIVIDE_OVERFLOW):
84135         (_GL_REMAINDER_OVERFLOW): Use it.
84137         intprops-tests: revert unsigned part of previous change
84138         * tests/test-intprops.c (UINT_MAX, ULONG_MAX, UINTMAX_MAX, U0, U1):
84139         Remove; they weren't actually needed.  All uses of U0 and U1 removed,
84140         and other casts to 'unsigned int' reverted to 'u' suffixes.  See
84141         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00406.html>.
84143 2011-05-19  Bruno Haible  <bruno@clisp.org>
84145         strerror_r: Work around strerror_r() change in Cygwin 1.7.8.
84146         * lib/strerror_r.c (strerror_r) [CYGWIN]: Recognize when the system's
84147         strerror_r() returned without filling the buffer.
84148         Reported by Eric Blake.
84150 2011-05-19  Eric Blake  <eblake@redhat.com>
84152         strerror_r: guarantee unchanged errno
84153         * lib/strerror_r.c (strerror_r): Guarantee unchanged errno.
84154         * lib/strerror-impl.h (strerror): Set errno to match strerror_r
84155         failure.
84156         * tests/test-strerror_r.c (main): Enhance test.
84158 2011-05-19  Bruno Haible  <bruno@clisp.org>
84160         strerror_r: Reorder #if blocks.
84161         * lib/strerror_r.c (strerror_r): Reorder conditionals in the function
84162         for consistency with the previous commit.
84164 2011-05-19  Bruno Haible  <bruno@clisp.org>
84166         perror: Avoid clobbering the strerror buffer when possible.
84167         * lib/strerror-impl.h: New file, extracted from lib/strerror.c.
84168         * lib/strerror.c: Include it.
84169         * modules/strerror (Files): Add lib/strerror-impl.h.
84170         * lib/perror.c: Include <stdlib.h>, intprops.h, verify.h.
84171         (my_strerror): New function, defined through lib/strerror-impl.h.
84172         (perror): Use it instead of strerror.
84173         * modules/perror (Files): Add lib/strerror-impl.h.
84174         (Depends-on): Remove strerror. Add intprops, verify, strerror_r-posix.
84176 2011-05-19  Eric Blake  <eblake@redhat.com>
84178         strerror_r: fix on newer cygwin
84179         * lib/strerror_r.c (strerror_r): Cygwin now has
84180         __xpg_strerror_r, use it.
84182 2011-05-19  Bruno Haible  <bruno@clisp.org>
84184         strerror_r: Avoid clobbering the strerror buffer when possible.
84185         * lib/strerror.c: Define _NETBSD_SOURCE. Include <nl_types.h>.
84186         (sys_nerr, sys_errlist): New declarations.
84187         (strerror_r): Be careful not to clobber the strerror buffer on NetBSD,
84188         HP-UX, native Win32, IRIX, and 32-bit Solaris.
84189         * m4/strerror_r.m4 (gl_PREREQ_STRERROR_R): Test whether catgets exists.
84191 2011-05-19  Bruno Haible  <bruno@clisp.org>
84193         strerror_r: Fix test failure on mingw.
84194         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Don't define
84195         EXTEND_STRERROR_R.
84196         * lib/strerror_r.c (strerror_r): Test the various GNULIB_defined_*
84197         macros from errno.in.h instead.
84199 2011-05-19  Eric Blake  <eblake@redhat.com>
84201         strerror: relax test for Solaris
84202         * tests/test-strerror.c (main): Permit Solaris behavior.
84203         * tests/test-strerror_r.c (main): Likewise.
84205         strerror: enforce POSIX ruling on strerror(0)
84206         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): Expose BSD bug.
84207         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Likewise.
84208         * lib/strerror_r.c (rpl_strerror_r): Work around it.
84209         * doc/posix-functions/strerror.texi (strerror): Document it.
84210         * doc/posix-functions/strerror_r.texi (strerror_r): Likewise.
84211         * tests/test-strerror.c (main): Strengthen test.
84212         * tests/test-strerror_r.c (main): Likewise.
84214 2011-05-19  Paul Eggert  <eggert@cs.ucla.edu>
84216         intprop-tests: port to older and more-pedantic compilers
84217         * modules/intprops-tests (Files): Add tests/macros.h.
84218         * tests/test-intprops.c: Include macros.h.
84219         (TYPE_IS_INTEGER): Use ASSERT, not verify, to test this macro, as
84220         it's no longer documented to expand to an integer constant expression.
84221         (TYPE_SIGNED): Use ASSERT, not verify, to test this macro when the
84222         argument is floating point, as it's no longer documented to expand
84223         to an integer constant expression in that case.
84224         (UINT_MAX, ULONG_MAX, UINTMAX_MAX): Redefine to work around
84225         compiler bugs reported by Bruno Haible.  See
84226         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00401.html>.
84227         (U0, U1): New constants, to work around the same bugs.  Also,
84228         in tests, use e.g., "(unsigned int) 39" rather than "39u".
84230         intprops: work around C compiler bugs
84231         * lib/intprops.h (INT_MULTIPLY_RANGE_OVERFLOW): Work around compiler
84232         bug in Sun C 5.11 2010/08/13 and other compilers; see
84233         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00401.html>.
84235         intprops: TYPE_IS_INTEGER, TYPE_SIGNED not integer constant exprs
84236         * doc/intprops.texi (Integer Type Determination): Fix
84237         documentation for TYPE_IS_INTEGER: it returns an constant
84238         expression, not an integer constant expression.  Fix doc for
84239         TYPE_SIGNED: it returns an integer constant expression only if its
84240         argument is an integer type.  (TYPE_IS_INTEGER is the same, but is
84241         hardly worth documented that way....)
84243 2011-05-18  Bruno Haible  <bruno@clisp.org>
84245         strerror_r: Avoid clobbering the strerror buffer when possible.
84246         * lib/strerror_r.c (strerror_r): Merge the three implementations.
84247         Handle gnulib defined errno values here. When strerror() returns NULL
84248         or an empty string, return EINVAL.
84249         * lib/strerror.c (strerror): Always call strerror_r. Don't handle
84250         gnulib defined errno values here.
84251         * modules/strerror (Depends-on): Add verify, strerror_r-posix.
84253 2011-05-18  Eric Blake  <eblake@redhat.com>
84255         fnmatch: avoid compiler warning
84256         * lib/fnmatch_loop.c (FCT): Use correct type.
84257         Reported by Matthias Bolte.
84259 2011-05-13  Jim Meyering  <meyering@redhat.com>
84261         maint.mk: three new prohibit_<HDR>_without_use rules
84262         * top/maint.mk (sc_prohibit_stdio--_without_use): New rule.
84263         (sc_prohibit_stdio-safer_without_use): Likewise.
84264         (sc_prohibit_xfreopen_without_use): Likewise.
84266 2011-05-17  Jim Meyering  <meyering@redhat.com>
84268         announce-gen: fail if the NEWS delta is empty
84269         If there's nothing noteworthy in NEWS, then either you forgot
84270         or you shouldn't be releasing.
84271         * build-aux/announce-gen: Die if the NEWS delta is effectively empty.
84273 2011-05-17  Pádraig Brady  <P@draigBrady.com>
84275         * top/maint.mk (_gl_tight_scope:): Automatically exclude compiler
84276         reserved symbols starting with double underscore from the check.
84278 2011-05-17  Paul Eggert  <eggert@cs.ucla.edu>
84280         intprops: add doc
84281         * doc/intprops.texi: New file, documenting intprops.
84282         * doc/gnulib.texi (Particular Modules): Include it.
84284         verify: add doc to gnulib manual and fix example
84285         * doc/gnulib.texi (Compile-time Assertions): New node, for 'verify'.
84286         * doc/verify.texi (Compile-time Assertions): Update 'assert' doc.
84287         (Compile-time Assertions): Fix example so it can't overflow.
84289 2011-05-17  Jim Meyering  <meyering@redhat.com>
84291         warnings.m4: don't usurp save_CPPFLAGS variable name
84292         * m4/warnings.m4: Prefix local temporary variable name with gl_.
84294         doc: fix typo
84295         * doc/gnulib-intro.texi (Target Platforms): s/is/are/
84297 2011-05-16  Paul Eggert  <eggert@cs.ucla.edu>
84298             Bruno Haible  <bruno@clisp.org>
84300         doc: Tweak recent change.
84301         * README (Portability guidelines): Tweak new text.
84302         * doc/gnulib-intro.texi (Target Platforms): Likewise. Mention
84303         Interix 6.1.
84305 2011-05-16  Eric Blake  <eblake@redhat.com>
84307         inttypes: avoid autoconf warning
84308         * m4/inttypes.m4 (gl_INTTYPES_INCOMPLETE): Only expand once.
84309         * m4/stdint.m4 (gl_STDINT_H): Likewise.
84311 2011-05-16  Sam Steingold  <sds@gnu.org>
84312         and Eric Blake  <eblake@redhat.com>
84314         vc-list-files: accept multiple directory operands
84315         * build-aux/vc-list-files: Iterate over all remaining operands.
84317 2011-05-16  Bruno Haible  <bruno@clisp.org>
84319         Fix confusion regarding deprecated modules.
84320         * modules/calloc (Status, Notice): Mark module as deprecated, not
84321         obsolete.
84322         * modules/fnmatch-posix (Status, Notice): Likewise.
84323         * modules/getdate (Status, Notice): Likewise.
84324         * modules/getopt (Status, Notice): Likewise.
84325         * modules/malloc (Status, Notice): Likewise.
84326         * modules/pipe (Status, Notice): Likewise.
84327         * modules/realloc (Status, Notice): Likewise.
84328         * modules/rename-dest-slash (Status, Notice): Likewise.
84329         * modules/unictype/bidicategory-all (Status, Notice): Likewise.
84330         * modules/unictype/bidicategory-byname (Status, Notice): Likewise.
84331         * modules/unictype/bidicategory-name (Status, Notice): Likewise.
84332         * modules/unictype/bidicategory-of (Status, Notice): Likewise.
84333         * modules/unictype/bidicategory-test (Status, Notice): Likewise.
84335 2011-05-16  Bruno Haible  <bruno@clisp.org>
84337         doc: List the target platforms.
84338         * doc/gnulib-intro.texi (Target Platforms): New section.
84339         * doc/gnulib.texi (Introduction): Update menu.
84340         * README (Portability guidelines): Refer to the new section. Update
84341         statement about oldest supported environment. Remove rationale why
84342         <errno.h>, <string.h>, <stdlib.h> are assumed. Update example of an
84343         unportable C89 function.
84344         Reported by Bastien Roucariès <roucaries.bastien@gmail.com> and
84345         Charles Wilson <cygwin@cwilson.fastmail.fm>. Feedback from Paul Eggert.
84347 2011-05-16  Paul Eggert  <eggert@cs.ucla.edu>
84349         * build-aux/bootstrap (gnulib_tool): Handle symlink timestamps better.
84351 2011-05-13  Paul Eggert  <eggert@cs.ucla.edu>
84353         intprops-tests: new module
84354         * modules/intprops-tests, tests/test-intprops.c: New files.
84356         intprops: add safe, portable integer overflow checking
84357         * lib/intprops.h (_GL_INT_CONVERT, _GL_INT_TWOS_COMPLEMENT):
84358         (_GL_INT_SIGNED, _GL_INT_MINIMUM, _GL_INT_MAXIMUM):
84359         (_GL_SIGNED_INT_MINIMUM, INT_ADD_RANGE_OVERFLOW):
84360         (INT__SUBTRACT__RANGE_OVERFLOW, INT_NEGATE_RANGE_OVERFLOW):
84361         (INT_MULTIPLY_RANGE_OVERFLOW, INT_REMAINDER_RANGE_OVERFLOW):
84362         (INT_LEFT_SHIFT_RANGE_OVERFLOW, _GL_ADD_OVERFLOW):
84363         (_GL__SUBTRACT__OVERFLOW, _GL_MULTIPLY_OVERFLOW, _GL_DIVIDE_OVERFLOW):
84364         (_GL_REMAINDER_OVERFLOW, _GL_UNSIGNED_NEG_MULTIPLE, INT_ADD_OVERFLOW):
84365         (INT__SUBTRACT__OVERFLOW, INT_NEGATE_OVERFLOW, INT_MULTIPLY_OVERFLOW):
84366         (INT_DIVIDE_OVERFLOW, INT_REMAINDER_OVERFLOW):
84367         (INT_LEFT_SHIFT_OVERFLOW, _GL_BINARY_OP_OVERFLOW): New macros.
84369 2011-05-12  James Youngman  <jay@gnu.org>
84371         Add a test for glibc's Bugzilla bug #12378.
84372         * m4/fnmatch.m4: Use gnulib's fnmatch if the system fnmatch
84373         doesn't allow the literal matching of a lone "[" (which is
84374         required by POSIX).
84375         * tests/test-fnmatch.c (main): Check that "[/b" matches itself.
84377 2011-05-11  Ulrich Drepper  <drepper@gmail.com>
84379         Sync glibc change fixing Bugzilla bug #12378.
84380         * lib/fnmatch_loop.c (FCT): When matching '[' keep track of
84381         beginning and fall back to matching as normal character if the
84382         string ends before the matching ']' is found.  This is what POSIX
84383         requires.
84385 2011-05-13  Eric Blake  <eblake@redhat.com>
84387         getcwd-lgpl: relax test for FreeBSD
84388         * doc/posix-functions/getcwd.texi (getcwd): Document portability
84389         issue.
84390         * tests/test-getcwd-lgpl.c (main): Relax test.
84391         Reported by Matthias Bolte.
84393 2011-05-11  Eric Blake  <eblake@redhat.com>
84395         test-fflush: silence compiler warning
84396         * tests/test-fflush.c (main): Don't fclose a NULL pointer.
84398 2011-05-11  Bruno Haible  <bruno@clisp.org>
84400         canonicalize, canonicalize-lgpl: Avoid crash dialog on MacOS X.
84401         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Add GL_NOCRASH code.
84402         * modules/canonicalize (Depends-on): Add 'nocrash'.
84403         * modules/canonicalize-lgpl (Depends-on): Likewise.
84404         * doc/posix-functions/realpath.texi: Update platforms list.
84405         Reported by Ryan Schmidt <ryandesign@macports.org>.
84407 2011-05-11  Bruno Haible  <bruno@clisp.org>
84409         group-member: Declare function in <unistd.h>.
84410         * lib/unistd.in.h (group_member): New declaration.
84411         * lib/group-member.h: Remove file.
84412         * lib/group-member.c: Include <unistd.h> instead of group-member.h.
84413         * tests/test-unistd-c++.cc: Check signature of group_member.
84414         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER): Require
84415         gl_UNISTD_H_DEFAULTS. Set HAVE_GROUP_MEMBER.
84416         * m4/unistd_h.m4 (gl_UNISTD_H): Check whether group_member is declared.
84417         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_GROUP_MEMBER,
84418         HAVE_GROUP_MEMBER.
84419         * modules/group-member (Files): Remove lib/group-member.h.
84420         (Depends-on): Add unistd. Specify conditions.
84421         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
84422         (Include): Change to <unistd.h>.
84423         * modules/unistd (Makefile.am): Substitute GNULIB_GROUP_MEMBER,
84424         HAVE_GROUP_MEMBER.
84425         * NEWS: Mention the change.
84426         * lib/euidaccess.c: Don't include group-member.h.
84428 2011-05-11  Bruno Haible  <bruno@clisp.org>
84430         group-member: Document module.
84431         * doc/glibc-functions/group_member.texi: Mention the 'group-member'
84432         module.
84434 2011-05-11  Bruno Haible  <bruno@clisp.org>
84436         fclose: Fix mistake earlier today.
84437         * lib/fclose.c (rpl_fclose): Don't assume that EOF < 0.
84439 2011-05-11  Eric Blake  <eblake@redhat.com>
84441         fclose: preserve fflush errors
84442         * lib/fclose.c (rpl_fclose): Don't lose fflush errors.
84443         Reported by Jim Meyering.
84445         bootstrap: support a prereq of 'rpcgen -' on RHEL5
84446         * build-aux/bootstrap (check_versions): When no specific version
84447         is required, merely check that the app produces an exit status
84448         that indicates its existence.
84450         maint.mk: drop redundant check
84451         * top/maint.mk (sc_the_the): Delete; sc_prohibit_doubled_word does
84452         the same but better.
84454 2011-05-11  Bruno Haible  <bruno@clisp.org>
84456         fclose: Fix possible link error.
84457         * lib/fclose.c (rpl_fclose): Invoke _gl_unregister_fd, not
84458         unregister_shadow_fd. Improve comments.
84459         * lib/sockets.c (close_fd_maybe_socket): Add comments. Reported by
84460         Eric Blake.
84462 2011-05-11  Jim Meyering  <meyering@redhat.com>
84464         maint.mk: improve "can not" detection and generalize rule name
84465         * top/maint.mk (sc_prohibit_undesirable_word_seq): Renamed from
84466         sc_prohibit_can_not, since we'll probably add a few more word pairs here.
84467         Use the same technique as in sc_prohibit_doubled_word, so that
84468         we recognize "can not" also when the words are separated by a newline.
84469         Suggested by Eric Blake.
84470         (perl_filename_lineno_text_): Define.  Factored out of...
84471         (prohibit_doubled_word_): ...here.  Use the new definition.
84472         (prohibit_undesirable_word_seq_): New var.  Use it here, too.
84473         (prohibit_undesirable_word_seq_RE_): New overridable variable.
84474         (ignore_undesirable_word_sequence_RE_): New overridable variable.
84476 2011-05-10  Eric Blake  <eblake@redhat.com>
84478         fclose: avoid double close race when possible
84479         * lib/fclose.c (rpl_fclose): Rewrite to avoid double-close race on
84480         all but WINDOWS_SOCKETS.
84482 2011-05-10  Bastien Roucariès  <roucaries.bastien@gmail.com>
84484         openat: correct new comment
84485         * lib/openat-proc.c (openat_proc_name): Correct the comment.
84487 2011-05-10  Jim Meyering  <meyering@redhat.com>
84489         openat: add comments
84490         * lib/openat-proc.c (openat_proc_name): Add comments,
84491         mostly from Eric Blake.
84493 2011-05-09  Eric Blake  <eblake@redhat.com>
84495         openat: reduce syscalls in first probe of /proc
84496         * lib/openat-proc.c (openat_proc_name): Require that /proc/self/fd
84497         be a directory.  Simplify the probe for .. bugs.
84498         * modules/openat (Depends-on): Drop same-inode.
84499         Reported by Bastien ROUCARIES.
84501 2011-05-09  Jim Meyering  <meyering@redhat.com>
84503         maint.mk: change semantics/name of tight_scope variables
84504         * top/maint.mk (_gl_TS_var_match, _gl_TS_function_match):
84505         Rename variables to align with semantics that make them more useful.
84507         maint.mk: tweak new rule's name not to impinge
84508         * top/maint.mk (_gl_tight_scope): Rename from sc_tight_scope-0.
84509         (sc_tight_scope): Use new rule name rather than $@-0.
84511         maint.mk: add a syntax-check rule to ensure tightly-scoped symbols
84512         * top/maint.mk (sc_tight_scope): New rule.
84513         (sc_tight_scope-0): New rule, ifdef'd out.
84514         (_gl_TS_dir): Default.
84515         (_gl_TS_unmarked_extern_functions, _gl_TS_function_regex): Define.
84516         (_gl_TS_unmarked_extern_vars, _gl_TS_var_regex): Define.
84518 2011-05-09  Simon Josefsson  <simon@josefsson.org>
84520         * m4/gc.m4: Remove gl_PREREQ_GC (not used).  Reported by Bruno
84521         Haible <bruno@clisp.org>.
84523 2011-05-08  Bruno Haible  <bruno@clisp.org>
84525         Comments.
84526         * m4/isnanf.m4: Add comment.
84527         * m4/isnanl.m4: Likewise.
84529 2011-05-08  Bruno Haible  <bruno@clisp.org>
84531         glob: Remove obsolete macro.
84532         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): Remove macro.
84534 2011-05-08  Paul Eggert  <eggert@cs.ucla.edu>
84536         intprops: Sun C 5.11 supports __typeof__
84537         * lib/intprops.h (_GL_HAVE___TYPEOF__): New macro, which is set
84538         for either GCC 2 or later, as before, or for Sun C 5.11 or later,
84539         which is new.
84540         (_GL_SIGNED_TYPE_OR_EXPR): Use it.
84542         intprops: switch to usual gnulib indenting and naming
84543         * lib/intprops.h (_GL_INTPROPS_H): Rename from GL_INTPROPS_H.
84544         (_GL_SIGNED_TYPE_OR_EXPR): Rename from signed_type_or_expr__.
84546         * tests/test-inttostr.c (IS_TIGHT): Adjust to above renaming.
84548 2011-05-08  Jim Meyering  <meyering@redhat.com>
84550         maint.mk: suppress "Entering/Leaving directory" diag in announcement
84551         * top/maint.mk (release-prep): Use make's --no-print-directory
84552         option when generating the announcement.  This eliminates the
84553         pesky "make[2]: Entering/Leaving directory" diagnostics in the
84554         generated announcement template.
84556 2011-05-08  Bruno Haible  <bruno@clisp.org>
84558         tzset: Fix gettimeofday wrapper on Solaris 2.6.
84559         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): When invoking
84560         gl_GETTIMEOFDAY_REPLACE_LOCALTIME, also set REPLACE_GETTIMEOFDAY.
84562 2011-05-07  Paul Eggert  <eggert@cs.ucla.edu>
84564         ignore-value, verify: Omit include files from lib_SOURCES.
84565         * modules/ignore-value, modules/verify (Makefile.am):
84566         Don't put ignore-value.h, or verify.h, into lib_SOURCES, as
84567         that leads Automake to duplicate use of am__objects_... variables
84568         in Makefile.in.  See
84569         <http://lists.gnu.org/r/emacs-devel/2011-05/msg00257.html>.
84571 2011-05-07  Bruno Haible  <bruno@clisp.org>
84573         fclose: Simplify autoconf macro.
84574         * m4/fclose.m4 (gl_FUNC_FCLOSE): Assume gl_FUNC_FFLUSH_STDIN is
84575         defined.
84577 2011-05-07  Bruno Haible  <bruno@clisp.org>
84579         canonicalize-lgpl: Fix autoconf macro ordering bug.
84580         * m4/canonicalize.m4 (gl_CANONICALIZE_LGPL): Require
84581         gl_STDLIB_H_DEFAULTS.
84583 2011-05-06  Eric Blake  <eblake@redhat.com>
84585         maintainer-makefile: make sc_po_check easier to tune
84586         * top/maint.mk (sc_po_check): Allow overriding which non-VC files
84587         to probe for strings, such as an alternate location for gnulib.
84589         fclose: guarantee behavior on seekable stdin
84590         * modules/fclose (Depends-on): Add fflush.
84591         * doc/posix-functions/fclose.texi (fclose): Document this.
84592         * tests/test-fclose.c (main): Make test for this unconditional.
84594 2011-05-06  Bruno Haible  <bruno@clisp.org>
84596         fflush, fpurge: Relicense under LGPLv2+.
84597         * modules/fflush (License): Change from LGPLv3+ to LGPLv2+.
84598         * modules/fpurge (License): Likewise.
84599         With permission from Eric Blake and Jim Meyering.
84600         Suggested by Eric Blake.
84602 2011-05-06  Karl Berry  <karl@gnu.org>
84604         * MODULES.html.sh (func_all_modules): remove exit.
84606 2011-05-06  Jim Meyering  <meyering@redhat.com>
84608         maint.mk: use info-gnu@ as the default only for a stable release
84609         * top/maint.mk: Don't default to info-gnu for alpha or beta releases.
84610         For those, just use $(PACKAGE_BUGREPORT), in which case we don't have
84611         to set the Mail-Followup-To header.  Prompted by Reuben Thomas in
84612         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/26488
84614 2011-05-05  Paul Eggert  <eggert@cs.ucla.edu>
84616         assert-h: new module, which supports C1X-style static_assert
84617         * lib/assert.in.h, m4/assert_h.m4, modules/assert-h: New files.
84618         * lib/verify.h: Revamp so that this can be copied into assert.h,
84619         while retaining the ability to use it standalone as before.
84620         Rename private identifiers so as not to encroach on the
84621         standard C namespace, since this is now used by assert.h.
84622         (_GL_VERIFY_TYPE): New macro, factoring out differing parts of
84623         the old verify_true.
84624         (_GL_VERIFY_TRUE): New macro, with much of the contents of
84625         the old verify_true.  Use _GL_VERIFY_TYPE.
84626         (_GL_VERIFY): New macro, with much of the contents of the old verify.
84627         (static_assert): New macro, if _GL_STATIC_ASSERT_H
84628         is defined and static_assert is not; _GL_STATIC_ASSERT_H is
84629         defined when this file is copied into the replacement assert.h.
84630         (_Static_assert): New macro, if _GL_STATIC_ASSERT_H is defined
84631         and _Static_assert is not built in.
84632         (verify_true, verify): Define only if _GL_STATIC_ASSERT_H is not
84633         defined, and use the new macros mentioned above.
84634         * doc/posix-headers/assert.texi: Document this.
84636 2011-05-05  Bruno Haible  <bruno@clisp.org>
84638         fclose, fflush: Respect rules for use of AC_LIBOBJ.
84639         * m4/fflush.m4 (gl_FUNC_FFLUSH): Don't invoke gl_REPLACE_FCLOSE.
84640         * m4/fclose.m4 (gl_FUNC_FCLOSE): Invoke gl_FUNC_FFLUSH_STDIN and
84641         gl_REPLACE_FCLOSE here.
84642         * modules/fflush (Depends-on): Remove fclose.
84643         * doc/posix-functions/fclose.texi: Mention module 'fflush' only in
84644         combination with module 'fclose'.
84646 2011-05-05  Bruno Haible  <bruno@clisp.org>
84648         fflush, fseeko: Respect rules for use of AC_LIBOBJ.
84649         * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): New macro, extracted from
84650         gl_FUNC_FFLUSH.
84651         (gl_FUNC_FFLUSH): Use it.
84652         (gl_REPLACE_FFLUSH): Don't invoke gl_REPLACE_FSEEKO.
84653         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Invoke gl_FUNC_FFLUSH_STDIN and
84654         gl_REPLACE_FSEEKO here.
84656 2011-05-05  Bruno Haible  <bruno@clisp.org>
84658         tzset: Relicense under LGPL.
84659         * modules/tzset (License): Change to LGPL.
84660         No agreement needed; it's a no-op.
84662         strtoimax, strtoumax: Relicense under LGPL.
84663         * modules/strtoimax (License): Change to LGPL.
84664         * modules/strtoumax (License): Likewise.
84665         With permission from Jim Meyering, Paul Eggert:
84666         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00124.html>
84667         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00109.html>
84669         getgroups: Relicense under LGPL.
84670         * modules/getgroups (License): Change to LGPL.
84671         With permission from Jim Meyering, Paul Eggert, Eric Blake:
84672         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00111.html>
84673         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00148.html>
84674         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00138.html>
84676         nanosleep: Relicense under LGPL.
84677         * modules/nanosleep (License): Change to LGPL.
84678         With permission from Jim Meyering, Paul Eggert, Eric Blake, Bruno
84679         Haible:
84680         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00111.html>
84681         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00148.html>
84682         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00138.html>
84683         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00131.html>
84685         futimens: Relicense under LGPL.
84686         * modules/futimens (License): Change to LGPL.
84687         With permission from Eric Blake:
84688         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00138.html>
84690         fflush: Relicense under LGPL.
84691         * modules/fflush (License): Change to LGPL.
84692         With permission from Eric Blake, Bruno Haible, Jim Meyering:
84693         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00138.html>
84694         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00131.html>
84695         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00133.html>
84697         tmpfile: Relicense under LGPL.
84698         * modules/tmpfile (License): Change to LGPL.
84699         With permission from Ben Pfaff:
84700         <http://lists.gnu.org/r/bug-gnulib/2010-12/msg00185.html>
84702         isfinite: Relicense under LGPL.
84703         * modules/isfinite (License): Change to LGPL.
84704         With permission from Ben Pfaff, Bruno Haible:
84705         <http://lists.gnu.org/r/bug-gnulib/2010-12/msg00185.html>
84706         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00130.html>
84708         acosl..tanl: Relicense under LGPL.
84709         * modules/acosl (License): Change to LGPL.
84710         * modules/asinl (License): Likewise.
84711         * modules/atanl (License): Likewise.
84712         * modules/cosl (License): Likewise.
84713         * modules/expl (License): Likewise.
84714         * modules/logl (License): Likewise.
84715         * modules/sinl (License): Likewise.
84716         * modules/sqrtl (License): Likewise.
84717         * modules/tanl (License): Likewise.
84718         Source code originally from glibc and Paolo Bonzini. Agreements:
84719         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00137.html>
84720         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00128.html>
84722 2011-05-05  Bruno Haible  <bruno@clisp.org>
84724         signal: Define sighandler_t.
84725         * lib/signal.in.h (sighandler_t): New type.
84726         * m4/signal_h.m4 (gl_SIGNAL_H): Require AC_USE_SYSTEM_EXTENSIONS. Test
84727         whether sighandler_t is defined.
84728         (gl_SIGNAL_H_DEFAULTS): Initialize HAVE_SIGHANDLER_T.
84729         * modules/signal (Depends-on): Add extensions.
84730         (Makefile.am): Substitute HAVE_SIGHANDLER_T.
84731         * doc/posix-headers/signal.texi: Mention the problem with sighandler_t.
84732         Suggested by Markus Steinborn <gnugv_maintainer@yahoo.de>.
84734 2011-05-05  Eric Blake  <eblake@redhat.com>
84736         maint: remove useless REPLACE_*_H macros
84737         * m4/arpa_inet_h.m4 (gl_REPLACE_ARPA_INET_H): Delete.
84738         * m4/dirent_h.m4 (gl_REPLACE_DIRENT_H): Likewise.
84739         * m4/locale_h.m4 (gl_REPLACE_LOCALE_H): Likewise.
84740         * m4/poll_h.m4 (gl_REPLACE_POLL_H): Likewise.
84741         * m4/spawn_h.m4 (gl_REPLACE_SPAWN_H): Likewise.
84742         * m4/sys_ioctl_h.m4 (gl_REPLACE_SYS_IOCTL_H): Likewise.
84743         * m4/wchar_h.m4 (gl_REPLACE_WCHAR_H): Likewise.
84744         * m4/btowc.m4: Update callers.
84745         * m4/dirfd.m4: Likewise.
84746         * m4/duplocale.m4: Likewise.
84747         * m4/fchdir.m4: Likewise.
84748         * m4/fdopendir.m4: Likewise.
84749         * m4/inet_ntop.m4: Likewise.
84750         * m4/inet_pton.m4: Likewise.
84751         * m4/ioctl.m4: Likewise.
84752         * m4/mbrlen.m4: Likewise.
84753         * m4/mbrtowc.m4: Likewise.
84754         * m4/mbsinit.m4: Likewise.
84755         * m4/mbsnrtowcs.m4: Likewise.
84756         * m4/mbsrtowcs.m4: Likewise.
84757         * m4/poll.m4: Likewise.
84758         * m4/setlocale.m4: Likewise.
84759         * m4/wcrtomb.m4: Likewise.
84760         * m4/wcsnrtombs.m4: Likewise.
84761         * m4/wcsrtombs.m4: Likewise.
84762         * m4/wctob.m4: Likewise.
84763         * m4/wcwidth.m4: Likewise.
84764         * modules/posix_spawn: Likewise.
84765         * modules/posix_spawn_file_actions_addclose: Likewise.
84766         * modules/posix_spawn_file_actions_adddup2: Likewise.
84767         * modules/posix_spawn_file_actions_addopen: Likewise.
84768         * modules/posix_spawn_file_actions_destroy: Likewise.
84769         * modules/posix_spawn_file_actions_init: Likewise.
84770         * modules/posix_spawnattr_destroy: Likewise.
84771         * modules/posix_spawnattr_getflags: Likewise.
84772         * modules/posix_spawnattr_getpgroup: Likewise.
84773         * modules/posix_spawnattr_getschedparam: Likewise.
84774         * modules/posix_spawnattr_getschedpolicy: Likewise.
84775         * modules/posix_spawnattr_getsigdefault: Likewise.
84776         * modules/posix_spawnattr_getsigmask: Likewise.
84777         * modules/posix_spawnattr_init: Likewise.
84778         * modules/posix_spawnattr_setflags: Likewise.
84779         * modules/posix_spawnattr_setpgroup: Likewise.
84780         * modules/posix_spawnattr_setschedparam: Likewise.
84781         * modules/posix_spawnattr_setschedpolicy: Likewise.
84782         * modules/posix_spawnattr_setsigdefault: Likewise.
84783         * modules/posix_spawnattr_setsigmask: Likewise.
84784         * modules/posix_spawnp: Likewise.
84786 2011-05-04  Reuben Thomas  <rrt@sc3d.org>
84788         Add option to do-release-commit-and-tag to specify branch.
84789         * build-aux/do-release-commit-and-tag: Add --branch.
84791 2011-05-03  Bruno Haible  <bruno@clisp.org>
84793         Avoid unnecessary compilation units, through conditional dependencies.
84794         * modules/accept (Depends-on): Add conditions to the dependencies.
84795         * modules/acosl (Depends-on): Likewise.
84796         * modules/argz (Depends-on): Likewise.
84797         * modules/asinl (Depends-on): Likewise.
84798         * modules/atanl (Depends-on): Likewise.
84799         * modules/atoll (Depends-on): Likewise.
84800         * modules/bind (Depends-on): Likewise.
84801         * modules/btowc (Depends-on): Likewise.
84802         * modules/canonicalize-lgpl (Depends-on): Likewise.
84803         * modules/ceil (Depends-on): Likewise.
84804         * modules/ceilf (Depends-on): Likewise.
84805         * modules/ceill (Depends-on): Likewise.
84806         * modules/chdir-long (Depends-on): Likewise.
84807         * modules/chown (Depends-on): Likewise.
84808         * modules/close (Depends-on): Likewise.
84809         * modules/connect (Depends-on): Likewise.
84810         * modules/cosl (Depends-on): Likewise.
84811         * modules/dirfd (Depends-on): Likewise.
84812         * modules/dprintf (Depends-on): Likewise.
84813         * modules/dprintf-posix (Depends-on): Likewise.
84814         * modules/error (Depends-on): Likewise.
84815         * modules/euidaccess (Depends-on): Likewise.
84816         * modules/expl (Depends-on): Likewise.
84817         * modules/faccessat (Depends-on): Likewise.
84818         * modules/fchdir (Depends-on): Likewise.
84819         * modules/fclose (Depends-on): Likewise.
84820         * modules/fcntl (Depends-on): Likewise.
84821         * modules/fdopendir (Depends-on): Likewise.
84822         * modules/fflush (Depends-on): Likewise.
84823         * modules/floor (Depends-on): Likewise.
84824         * modules/floorf (Depends-on): Likewise.
84825         * modules/floorl (Depends-on): Likewise.
84826         * modules/fnmatch (Depends-on): Likewise.
84827         * modules/fopen (Depends-on): Likewise.
84828         * modules/fprintf-posix (Depends-on): Likewise.
84829         * modules/frexp (Depends-on): Likewise.
84830         * modules/frexp-nolibm (Depends-on): Likewise.
84831         * modules/frexpl (Depends-on): Likewise.
84832         * modules/frexpl-nolibm (Depends-on): Likewise.
84833         * modules/fseek (Depends-on): Likewise.
84834         * modules/fsusage (Depends-on): Likewise.
84835         * modules/ftell (Depends-on): Likewise.
84836         * modules/ftello (Depends-on): Likewise.
84837         * modules/futimens (Depends-on): Likewise.
84838         * modules/getcwd (Depends-on): Likewise.
84839         * modules/getcwd-lgpl (Depends-on): Likewise.
84840         * modules/getdelim (Depends-on): Likewise.
84841         * modules/getdomainname (Depends-on): Likewise.
84842         * modules/getgroups (Depends-on): Likewise.
84843         * modules/gethostname (Depends-on): Likewise.
84844         * modules/getline (Depends-on): Likewise.
84845         * modules/getlogin_r (Depends-on): Likewise.
84846         * modules/getopt-posix (Depends-on): Likewise.
84847         * modules/getpeername (Depends-on): Likewise.
84848         * modules/getsockname (Depends-on): Likewise.
84849         * modules/getsockopt (Depends-on): Likewise.
84850         * modules/getsubopt (Depends-on): Likewise.
84851         * modules/getusershell (Depends-on): Likewise.
84852         * modules/glob (Depends-on): Likewise.
84853         * modules/grantpt (Depends-on): Likewise.
84854         * modules/iconv_open (Depends-on): Likewise.
84855         * modules/iconv_open-utf (Depends-on): Likewise.
84856         * modules/inet_ntop (Depends-on): Likewise.
84857         * modules/inet_pton (Depends-on): Likewise.
84858         * modules/ioctl (Depends-on): Likewise.
84859         * modules/isapipe (Depends-on): Likewise.
84860         * modules/isfinite (Depends-on): Likewise.
84861         * modules/isinf (Depends-on): Likewise.
84862         * modules/lchown (Depends-on): Likewise.
84863         * modules/ldexpl (Depends-on): Likewise.
84864         * modules/link (Depends-on): Likewise.
84865         * modules/linkat (Depends-on): Likewise.
84866         * modules/listen (Depends-on): Likewise.
84867         * modules/logl (Depends-on): Likewise.
84868         * modules/lstat (Depends-on): Likewise.
84869         * modules/mbrlen (Depends-on): Likewise.
84870         * modules/mbrtowc (Depends-on): Likewise.
84871         * modules/mbsinit (Depends-on): Likewise.
84872         * modules/mbsnrtowcs (Depends-on): Likewise.
84873         * modules/mbsrtowcs (Depends-on): Likewise.
84874         * modules/mbtowc (Depends-on): Likewise.
84875         * modules/memcmp (Depends-on): Likewise.
84876         * modules/mkdir (Depends-on): Likewise.
84877         * modules/mkdtemp (Depends-on): Likewise.
84878         * modules/mkfifo (Depends-on): Likewise.
84879         * modules/mkfifoat (Depends-on): Likewise.
84880         * modules/mknod (Depends-on): Likewise.
84881         * modules/mkostemp (Depends-on): Likewise.
84882         * modules/mkostemps (Depends-on): Likewise.
84883         * modules/mkstemp (Depends-on): Likewise.
84884         * modules/mkstemps (Depends-on): Likewise.
84885         * modules/mktime (Depends-on): Likewise.
84886         * modules/nanosleep (Depends-on): Likewise.
84887         * modules/open (Depends-on): Likewise.
84888         * modules/openat (Depends-on): Likewise.
84889         * modules/perror (Depends-on): Likewise.
84890         * modules/poll (Depends-on): Likewise.
84891         * modules/popen (Depends-on): Likewise.
84892         * modules/posix_spawn (Depends-on): Likewise.
84893         * modules/posix_spawn_file_actions_addclose (Depends-on): Likewise.
84894         * modules/posix_spawn_file_actions_adddup2 (Depends-on): Likewise.
84895         * modules/posix_spawn_file_actions_addopen (Depends-on): Likewise.
84896         * modules/posix_spawnp (Depends-on): Likewise.
84897         * modules/pread (Depends-on): Likewise.
84898         * modules/printf-posix (Depends-on): Likewise.
84899         * modules/ptsname (Depends-on): Likewise.
84900         * modules/putenv (Depends-on): Likewise.
84901         * modules/pwrite (Depends-on): Likewise.
84902         * modules/readline (Depends-on): Likewise.
84903         * modules/readlink (Depends-on): Likewise.
84904         * modules/readlinkat (Depends-on): Likewise.
84905         * modules/recv (Depends-on): Likewise.
84906         * modules/recvfrom (Depends-on): Likewise.
84907         * modules/regex (Depends-on): Likewise.
84908         * modules/remove (Depends-on): Likewise.
84909         * modules/rename (Depends-on): Likewise.
84910         * modules/renameat (Depends-on): Likewise.
84911         * modules/rmdir (Depends-on): Likewise.
84912         * modules/round (Depends-on): Likewise.
84913         * modules/roundf (Depends-on): Likewise.
84914         * modules/roundl (Depends-on): Likewise.
84915         * modules/rpmatch (Depends-on): Likewise.
84916         * modules/select (Depends-on): Likewise.
84917         * modules/send (Depends-on): Likewise.
84918         * modules/sendto (Depends-on): Likewise.
84919         * modules/setenv (Depends-on): Likewise.
84920         * modules/setlocale (Depends-on): Likewise.
84921         * modules/setsockopt (Depends-on): Likewise.
84922         * modules/shutdown (Depends-on): Likewise.
84923         * modules/sigaction (Depends-on): Likewise.
84924         * modules/signbit (Depends-on): Likewise.
84925         * modules/sigprocmask (Depends-on): Likewise.
84926         * modules/sinl (Depends-on): Likewise.
84927         * modules/sleep (Depends-on): Likewise.
84928         * modules/snprintf (Depends-on): Likewise.
84929         * modules/snprintf-posix (Depends-on): Likewise.
84930         * modules/socket (Depends-on): Likewise.
84931         * modules/sprintf-posix (Depends-on): Likewise.
84932         * modules/sqrtl (Depends-on): Likewise.
84933         * modules/stat (Depends-on): Likewise.
84934         * modules/strchrnul (Depends-on): Likewise.
84935         * modules/strdup-posix (Depends-on): Likewise.
84936         * modules/strerror (Depends-on): Likewise.
84937         * modules/strerror_r-posix (Depends-on): Likewise.
84938         * modules/strndup (Depends-on): Likewise.
84939         * modules/strnlen (Depends-on): Likewise.
84940         * modules/strptime (Depends-on): Likewise.
84941         * modules/strsep (Depends-on): Likewise.
84942         * modules/strsignal (Depends-on): Likewise.
84943         * modules/strstr-simple (Depends-on): Likewise.
84944         * modules/strtod (Depends-on): Likewise.
84945         * modules/strtoimax (Depends-on): Likewise.
84946         * modules/strtok_r (Depends-on): Likewise.
84947         * modules/strtoumax (Depends-on): Likewise.
84948         * modules/symlink (Depends-on): Likewise.
84949         * modules/symlinkat (Depends-on): Likewise.
84950         * modules/tanl (Depends-on): Likewise.
84951         * modules/tcgetsid (Depends-on): Likewise.
84952         * modules/tmpfile (Depends-on): Likewise.
84953         * modules/trunc (Depends-on): Likewise.
84954         * modules/truncf (Depends-on): Likewise.
84955         * modules/truncl (Depends-on): Likewise.
84956         * modules/uname (Depends-on): Likewise.
84957         * modules/unlink (Depends-on): Likewise.
84958         * modules/unlockpt (Depends-on): Likewise.
84959         * modules/unsetenv (Depends-on): Likewise.
84960         * modules/usleep (Depends-on): Likewise.
84961         * modules/utimensat (Depends-on): Likewise.
84962         * modules/vasprintf (Depends-on): Likewise.
84963         * modules/vdprintf (Depends-on): Likewise.
84964         * modules/vdprintf-posix (Depends-on): Likewise.
84965         * modules/vfprintf-posix (Depends-on): Likewise.
84966         * modules/vprintf-posix (Depends-on): Likewise.
84967         * modules/vsnprintf (Depends-on): Likewise.
84968         * modules/vsnprintf-posix (Depends-on): Likewise.
84969         * modules/vsprintf-posix (Depends-on): Likewise.
84970         * modules/wcrtomb (Depends-on): Likewise.
84971         * modules/wcscasecmp (Depends-on): Likewise.
84972         * modules/wcscspn (Depends-on): Likewise.
84973         * modules/wcsdup (Depends-on): Likewise.
84974         * modules/wcsncasecmp (Depends-on): Likewise.
84975         * modules/wcsnrtombs (Depends-on): Likewise.
84976         * modules/wcspbrk (Depends-on): Likewise.
84977         * modules/wcsrtombs (Depends-on): Likewise.
84978         * modules/wcsspn (Depends-on): Likewise.
84979         * modules/wcsstr (Depends-on): Likewise.
84980         * modules/wcstok (Depends-on): Likewise.
84981         * modules/wcswidth (Depends-on): Likewise.
84982         * modules/wctob (Depends-on): Likewise.
84983         * modules/wctomb (Depends-on): Likewise.
84984         * modules/wctype (Depends-on): Likewise.
84985         * modules/wcwidth (Depends-on): Likewise.
84986         * modules/write (Depends-on): Likewise.
84988 2011-05-03  Bruno Haible  <bruno@clisp.org>
84990         Support for conditional dependencies.
84991         * doc/gnulib.texi (Module description): Document the syntax of
84992         conditional dependencies.
84993         * gnulib-tool: New option --conditional-dependencies.
84994         (func_usage): Document it.
84995         (cond_dependencies): New variable.
84996         (func_get_automake_snippet_conditional,
84997         func_get_automake_snippet_unconditional): New functions, extracted from
84998         func_get_automake_snippet.
84999         (func_get_automake_snippet): Use them.
85000         (sed_first_32_chars): New variable.
85001         (func_module_shellfunc_name): New function.
85002         (func_module_shellvar_name): New function.
85003         (func_module_conditional_name): New function.
85004         (func_uncond_add_module, func_conddep_add_module, func_cond_module_p,
85005         func_cond_module_condition): New functions.
85006         (func_modules_transitive_closure): Add support for conditional
85007         dependencies.
85008         (func_emit_lib_Makefile_am): For a conditional module, enclose the
85009         conditional automake snippet in an automake conditional.
85010         (func_emit_autoconf_snippets): Emit shell functions that contain the
85011         code for conditional modules.
85012         (func_import, func_create_testdir): Update specification.
85014 2011-05-03  Eric Blake  <eblake@redhat.com>
85016         test-getaddrinfo: report error information
85017         * tests/test-getaddrinfo.c (simple): Use err outside of dbprintf.
85019 2011-05-03  Jim Meyering  <meyering@redhat.com>
85021         bootstrap: avoid build failure when $GZIP is set
85022         * build-aux/bootstrap (check_versions): Do not treat $GZIP as a
85023         program name.  If defined at all, it is supposed to list gzip options.
85024         Reported by Alan Curry in http://debbugs.gnu.org/8609
85026 2011-05-03  Reuben Thomas  <rrt@sc3d.org>
85028         readme-release: new module with release instructions
85029         * modules/readme-release: New module.
85030         * top/README-release: New file, from coreutils, grep, diffutils.
85031         * MODULES.html.sh (Support for maintaining and releasing): Add it.
85033 2011-05-02  Eric Blake  <eblake@redhat.com>
85035         fflush: also replace fclose when fixing fflush
85036         * modules/fflush (Depends-on): Add fclose.
85037         * m4/fflush.m4 (gl_FUNC_FFLUSH): Also replace fclose.
85038         * lib/fclose.c (rpl_fclose): Don't cause spurious failures on
85039         memstreams with no backing fd.
85040         * doc/posix-functions/fclose.texi (fclose): Document the use of
85041         fflush module to fix the bug.
85042         * tests/test-fclose.c (main): Relax test when fclose is used in
85043         isolation.
85045         fclose: add some tests
85046         * modules/fclose-tests: New test module.
85047         * tests/test-fclose.c: New file.
85048         * doc/posix-functions/fclose.texi (fclose): Document the bug.
85050         fclose: reduced dependencies
85051         * modules/fclose (Depends-on): Switch from fflush/fseeko to
85052         simpler lseek.
85053         * lib/fclose.c (rpl_fclose): Likewise.
85054         Reported by Simon Josefsson.
85056         exit: drop remaining clients
85057         * modules/argmatch (Depends-on): Replace exit with stdlib.
85058         * modules/copy-file (Depends-on): Likewise.
85059         * modules/execute (Depends-on): Likewise.
85060         * modules/exitfail (Depends-on): Likewise.
85061         * modules/obstack (Depends-on): Likewise.
85062         * modules/pagealign_alloc (Depends-on): Likewise.
85063         * modules/pipe-filter-gi (Depends-on): Likewise.
85064         * modules/pipe-filter-ii (Depends-on): Likewise.
85065         * modules/savewd (Depends-on): Likewise.
85066         * modules/spawn-pipe (Depends-on): Likewise.
85067         * modules/wait-process (Depends-on): Likewise.
85068         * modules/xsetenv (Depends-on): Likewise.
85069         * modules/chdir-long (Depends-on): Add stdlib, for EXIT_FAILURE.
85070         * modules/git-merge-changelog (Depends-on): Likewise.
85071         * modules/long-options (Depends-on): Likewise.
85072         * modules/pt_chown (Depends-on): Likewise.
85073         * modules/sysexits (Depends-on): Likewise.
85075         freading: relax license from LGPLv3+ to LGPLv2+
85076         * modules/freading (License): Relax LGPL version.
85078 2011-05-02  Bruno Haible  <bruno@clisp.org>
85080         fchdir: Remove unused dependencies.
85081         * modules/fchdir (Depends-on): Remove include_next.
85083 2011-05-02  Bruno Haible  <bruno@clisp.org>
85085         gnulib-tool: Refactor.
85086         * gnulib-tool (func_emit_autoconf_snippet): New function, extracted
85087         from func_emit_autoconf_snippets.
85088         (func_emit_autoconf_snippets): Use it.
85090 2011-05-02  Simon Josefsson  <simon@josefsson.org>
85092         * NEWS: Document removal of 'exit'.
85093         * modules/exit: Remove file.
85095 2011-05-01  Bruno Haible  <bruno@clisp.org>
85097         Update DEPENDENCIES.
85098         * DEPENDENCIES (gettext): Recommend the newest release.
85099         Reported by Simon Josefsson.
85101 2011-05-01  Bruno Haible  <bruno@clisp.org>
85103         gnulib-tool: Reduce code duplication.
85104         * gnulib-tool (func_emit_autoconf_snippets): New function.
85105         (func_import, func_create_testdir): Use it.
85107 2011-04-30  Eric Blake  <eblake@redhat.com>
85109         fclose: don't fail on non-seekable input stream
85110         * modules/fclose (Depends-on): Add freading, fflush, fseeko.
85111         * lib/fclose.c (rpl_fclose): Skip fflush for non-seekable input,
85112         since fflush is allowed to fail in that case.
85114 2011-04-30  Bruno Haible  <bruno@clisp.org>
85116         dup3: cleanup
85117         * lib/dup3.c: Remove old code, leftover from 2009-12-16.
85119 2011-04-30  Bruno Haible  <bruno@clisp.org>
85121         netdb: Make it work in C++ mode.
85122         * lib/netdb.in.h (struct addrinfo): In C++, define as a C struct.
85123         (getaddrinfo, freeaddrinfo, getnameinfo): Use macros from c++defs
85124         module.
85125         * m4/netdb_h.m4 (gl_NETDB_MODULE_INDICATOR): Invoke
85126         gl_MODULE_INDICATOR_FOR_TESTS.
85127         * modules/netdb-tests (Depends-on): Add netdb-c++-tests.
85128         * modules/netdb-c++-tests: New file.
85129         * tests/test-netdb-c++.cc: New file.
85131 2011-04-30  Bruno Haible  <bruno@clisp.org>
85133         New modules 'vfscanf', 'vscanf'.
85134         * modules/vfscanf: New file.
85135         * modules/vscanf: New file.
85136         * m4/stdio_h.m4 (gl_STDIO_H): Don't set GNULIB_VFSCANF, GNULIB_VSCANF
85137         here.
85138         * doc/posix-functions/vfscanf.texi: Mention module 'vfscanf'.
85139         * doc/posix-functions/vscanf.texi: Mention module 'vscanf'.
85141 2011-04-30  Bruno Haible  <bruno@clisp.org>
85143         passfd: Add comments.
85144         * lib/passfd.c: Add comments about platforms.
85146 2011-04-30  Bruno Haible  <bruno@clisp.org>
85148         sys_uio: Make <sys/uio.h> self-contained.
85149         * lib/sys_uio.in.h: Include <sys/types.h> before <sys/uio.h>.
85150         * doc/posix-headers/sys_uio.texi: Mention the OpenBSD problem.
85152 2011-04-30  Bruno Haible  <bruno@clisp.org>
85154         sys_socket: Ensure 'struct iovec' definition.
85155         * lib/sys_socket.in.h: Include <sys/uio.h> also on platforms that have
85156         <sys/socket.h>.
85157         * doc/posix-headers/sys_socket.texi: Mention the OpenBSD problem.
85159 2011-04-30  Bruno Haible  <bruno@clisp.org>
85161         sys_uio: Protect definition of 'struct iovec'.
85162         * lib/sys_uio.in.h (struct iovec): Avoid redefinition. In C++, define
85163         it as a C struct.
85165 2011-04-30  Bruno Haible  <bruno@clisp.org>
85167         manywarnings: fix indentation
85168         * m4/manywarnings.m4: Indent by 2 spaces consistently.
85170 2011-04-30  Pádraig Brady  <P@draigBrady.com>
85172         manywarnings: add -Wno-missing-field-initializers if needed.
85173         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add the above
85174         option if it's needed to allow initialization with { 0, }
85176 2011-04-29  Reuben Thomas  <rrt@sc3d.org>
85178         announce-gen: cosmetic improvement
85179         * build-aux/announce-gen: Strip any leading ./ from the NEWS file name.
85181 2011-04-29  Jim Meyering  <meyering@redhat.com>
85183         vc-list-files: indent with spaces, not TABs
85184         * build-aux/vc-list-files: Convert leading TABs to spaces,
85185         to match the style of most other files in gnulib.
85187         announce-gen: indent with spaces, not TABs
85188         * build-aux/announce-gen: Convert all TABs to spaces, to match
85189         the style of most other files in gnulib.
85191 2011-04-29  Eric Blake  <eblake@redhat.com>
85193         quotearg: avoid uninitialized variable use
85194         * lib/quotearg.c (quoting_options_from_style): Initialize
85195         remaining fields, and ensure that custom styles are only used via
85196         quoting_options rather than quoting_style.
85198 2011-04-29  Jim Meyering  <meyering@redhat.com>
85200         maint.mk: remove unused VC-tag variable
85201         * top/maint.mk (VC-tag): Remove unused variable.
85203 2011-04-29  Bruno Haible  <bruno@clisp.org>
85205         netdb: fix gai_strerror replacements
85206         * lib/netdb.in.h: Add _GL_FUNCDECL_RPL definitions.
85207         * modules/netdb: Substitute it.
85209 2011-04-29  Jim Meyering  <meyering@redhat.com>
85211         test-getcwd.c: avoid new set-but-not-used warning
85212         * tests/test-getcwd.c (test_abort_bug): Exit nonzero for any problem,
85213         not just the glibc/abort one that getcwd-abort-bug.m4 detects.
85214         * m4/getcwd-abort-bug.m4: Update this now-duplicated code to match,
85215         and adjust the code that sets gl_cv_func_getcwd_abort_bug accordingly.
85217         test-hash.c: avoid a new shadowing warning
85218         * tests/test-hash.c (main): Don't shadow "dup".
85220 2011-04-28  Eric Blake  <eblake@redhat.com>
85222         getaddrinfo: fix gai_strerror signature
85223         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Detect broken signatures,
85224         and work around mingw with UNICODE defined.
85225         (gl_PREREQ_GETADDRINFO): Drop redundant decl check.
85226         * m4/netdb_h.m4 (gl_NETDB_H_DEFAULTS): Add witness.
85227         * modules/netdb (Makefile.am): Substitute it.
85228         * lib/netdb.in.h (gai_strerror): Declare replacement.
85229         * lib/gai_strerror.c (rpl_gai_strerror): Fix signature.
85230         * doc/posix-functions/gai_strerror.texi (gai_strerror): Document
85231         the fix.
85233         getsockopt: avoid compiler warning
85234         * lib/getsockopt.c (rpl_getsockopt): Add a cast for mingw.
85235         Reported by Matthias Bolte.
85237         tests: drop unused link dependency
85238         * modules/areadlinkat-tests (Makefile.am): Drop stale LDADD.
85239         * modules/dirent-safer-tests (Makefile.am): Likewise.
85240         * modules/fdopendir-tests (Makefile.am): Likewise.
85241         * modules/mkfifoat-tests (Makefile.am): Likewise.
85242         * modules/openat-safer-tests (Makefile.am): Likewise.
85243         * modules/openat-tests (Makefile.am): Likewise.
85244         * modules/readlinkat-tests (Makefile.am): Likewise.
85245         * modules/symlinkat-tests (Makefile.am): Likewise.
85246         * modules/linkat-tests (Makefile.am): Likewise.
85247         (Depends-on): Switch to filenamecat-lgpl.
85248         * modules/fdutimensat-tests (test_fdutimensat_LDADD): Drop unused
85249         LIBINTL.
85250         * modules/utimensat-tests (test_utimensat_LDADD): Likewise.
85251         * tests/test-linkat.c (main): Don't require xalloc.
85253         hash, mgetgroups: drop xalloc dependency
85254         * lib/hash.c (includes): Adjust includes.
85255         * lib/mgetgroups.c (includes): Likewise.
85256         (xgetgroups): Move...
85257         * lib/xgetgroups.c: ...to new file.
85258         * lib/mgetgroups.h (xgetgroups): Make declaration conditional.
85259         * modules/xgetgroups: New file, split from...
85260         * modules/mgetgroups: ...here.
85261         (Depends-on): Add xalloc-oversized.
85262         * modules/hash (Depends-on): Likewise.
85263         * modules/hash-tests (Depends-on): Drop xalloc.
85264         (test_hash_LDADD): Drop unused library.
85265         * tests/test-hash.c (main): Break xalloc dependency.
85266         (includes): Drop unused include.
85268         xalloc-oversized: new module
85269         * modules/xalloc-oversized: New module.
85270         * modules/xalloc (Depends-on): Add it.
85271         * lib/xalloc.h (xalloc_oversized): Move...
85272         * lib/xalloc-oversized.h: ...into new file.
85274         utimecmp: drop dependency on xmalloc
85275         * lib/utimecmp.c (utimecmp): Work even if hash table cache fails
85276         due to memory pressure.
85277         * modules/utimecmp (Depends-on): Drop xalloc.
85279 2011-04-27  Eric Blake  <eblake@redhat.com>
85281         getcwd: fix mingw bugs
85282         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Detect one mingw bug.
85283         * doc/posix-functions/getcwd.texi (getcwd): Document the problems.
85284         * lib/getcwd-lgpl.c (rpl_getcwd): Fix return type.
85286 2011-04-27  Bruno Haible  <bruno@clisp.org>
85288         mkstemps: Ensure declaration on MacOS X 10.5.
85289         * lib/stdlib.in.h: Include <unistd.h> when mkstemps is requested.
85290         * doc/glibc-functions/mkstemps.texi: Document header file problem on
85291         MacOS X.
85293 2011-04-27  Bruno Haible  <bruno@clisp.org>
85295         mkstemp: More documentation.
85296         * doc/posix-functions/mkstemp.texi: Document header file problem on
85297         MacOS X.
85299 2011-04-27  Bruno Haible  <bruno@clisp.org>
85301         mkstemp: Tweak configure message when cross-compiling.
85302         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): When cross-compiling, qualify the
85303         result as a guess.
85305 2011-04-27  Bruno Haible  <bruno@clisp.org>
85307         clean-temp: Clarify what it does.
85308         * lib/clean-temp.h: Add more comments.
85309         * doc/posix-functions/mkstemp.texi: Tweak reference to 'clean-temp'
85310         module.
85311         * doc/glibc-functions/mkostemp.texi: Mention 'clean-temp' here too.
85312         * doc/glibc-functions/mkstemps.texi: Likewise.
85313         * doc/glibc-functions/mkostemps.texi: Likewise.
85315 2011-04-27  Eric Blake  <eblake@redhat.com>
85317         fchdir: avoid extra chdir and fix test
85318         * modules/fchdir (Depends-on): Add dosname, filenamecat-lgpl,
85319         getcwd-lgpl.
85320         * lib/fchdir.c (get_name): Any absolute name will do; it does not
85321         have to be canonical.
85322         (canonicalize_file_name): Drop unused macro.
85323         * m4/dup2.m4 (gl_REPLACE_DUP2): Ensure dup2 is replaced.
85325         filenamecat-lgpl: fix licence
85326         * modules/filenamecat-lgpl (License): Mark as LGPLv2+, as intended
85327         when it was first created.
85329         linkat, renameat: add missing dependency
85330         * modules/linkat (Depends-on): Require getcwd-lgpl.
85331         * modules/renameat (Depends-on): Likewise.
85333         tests: reduce dependencies
85334         * tests/test-linkat.c (main): Use lighter-weight getcwd.
85335         * tests/test-renameat.c (main): Likewise.
85336         * modules/linkat-tests (Depends-on): Relax dependency.
85337         * modules/renameat-tests (Depends-on): Likewise.
85338         * modules/fchdir-tests (Depends-on): Likewise.  Also make cloexec
85339         dependency explicit.
85341         save-cwd: reduce default dependency
85342         * modules/save-cwd (Depends-on): Use getcwd-lgpl.
85343         * lib/save-cwd.c: Update comments.
85344         * NEWS: Document the semantic change.
85346         getcwd: enhance tests
85347         * tests/test-getcwd-lgpl.c: New file, taken from...
85348         * tests/test-getcwd.c: ...old contents.  Rewrite this file to
85349         repeat long path stress tests from m4 probe.
85350         * modules/getcwd-lgpl-tests: New module.
85351         * modules/getcwd-tests (Depends-on): Depend on lgpl tests.
85352         * m4/getcwd-abort-bug.m4: Update comment.
85353         * m4/getcwd-path-max.m4: Likewise.
85355         getcwd-lgpl: new module
85356         * modules/getcwd-lgpl: New module.
85357         * lib/getcwd-lgpl.c: New file.
85358         * doc/posix-functions/getcwd.texi (getcwd): Document it.
85359         * MODULES.html.sh (lacking POSIX:2008): Likewise.
85360         * modules/getcwd (configure.ac): Set C witness.
85361         * m4/getcwd.m4 (gl_FUNC_GETCWD_LGPL): New macro.
85363         getcwd: tweak comments
85364         * m4/getcwd-abort-bug.m4: Fix comments.
85365         * m4/getcwd-path-max.m4: Likewise.
85366         * m4/getcwd.m4: Likewise.
85368 2011-04-27  Reuben Thomas  <rrt@sc3d.org>
85369         and Eric Blake  <eblake@redhat.com>
85371         mkstemp: replace if system version uses wrong permissions
85372         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Add test for non-owner
85373         read/write mode bits set in file created by mkstemp.
85374         * doc/posix-functions/mkstemp.texi (mkstemp): Document the fix.
85376 2011-04-27  Eric Blake  <eblake@redhat.com>
85378         passfd: avoid compiler warning
85379         * lib/passfd.c (sendfd, recvfd): Avoid shadowing names.
85380         Reported by Laine Stump.
85382 2011-04-27  J.T. Conklin  <jtc@acorntoolworks.com>  (tiny change)
85384         * gnulib-tool: change "join -a 2" to "join -a2", the latter is
85385         required by the NetBSD (and perhaps other 4.4BSD derived) join.
85387 2011-04-27  Reuben Thomas  <rrt@sc3d.org>
85388         and Eric Blake  <eblake@redhat.com>
85390         mkstemp: mention clean-temp module
85391         * lib/mkstemp.c: Add comment.
85392         * doc/posix-functions/mkstemp.texi (mkstemp): Likewise.
85394 2011-04-26  Paul Eggert  <eggert@cs.ucla.edu>
85396         inttypes: also provide default values for 32-bit tests
85397         * m4/inttypes.m4 (gl_INTTYPES_H_DEFAULTS): Also provide default values
85398         for INT32_MAX_LT_INTMAX_MAX and for UINT32_MAX_LT_UINTMAX_MAX.
85400 2011-04-25  Paul Eggert  <eggert@cs.ucla.edu>
85402         strtoumax: remove dependency on strtoimax
85403         This is like the strtoull change of yesterday.
85404         * modules/strtoumax (Files): Add lib/strtoimax.c.
85405         (Depends-on): Remove strtoimax and add verify.
85407         inttypes-incomplete: new module
85408         * m4/inttypes.m4 (gl_INTTYPES_INCOMPLETE): New macro, containing
85409         all but the PRI* and SCN* parts of gl_INTTYPES_H.
85410         (gl_INTTYPES_PRI_SCN): New macro, containing the PRI* and SCN* parts
85411         of gl_INTTYPES_H.
85412         (gl_INTTYPES_H): Rewrite in terms of these new macros.
85413         (gl_INTTYPES_H_DEFAULTS): Provide defaults for the PRI* and SCN*
85414         parts, in case gl_INTTYPE_PRI_SCN is not invoked.
85415         * modules/imaxabs, modules/imaxdiv, modules/strtoimax (Depends-on):
85416         * modules/strtoumax, modules/xstrtol (Depends-on):
85417         Depend on inttypes-incomplete, not inttypes.
85418         * modules/inttypes-incomplete: New module, containing the contents
85419         of the old modules/inttypes module, except that the Files: section
85420         omits m4/inttypes-pri.m4, and the configure.ac section invokes
85421         gl_INTTYPES_INCOMPLETE rather than gl_INTTYPES_H.
85422         * modules/inttypes (Files): Remove lib/inttypes.in.h, m4/inttypes.m4.
85423         (Depends-on): Depend only on inttypes-incomplete.
85424         (Makefile.am): Remove everything; this is now in inttypes-incomplete.
85426         inttypes: omit now-redundant strtoimax and strtoumax work
85427         * m4/inttypes.m4 (gl_INTTYPES_H): Do not check for strtoimax and
85428         strtoumax decls; gl_FUNC_STRTOIMAX and gl_FUNC_STRTOUMAX now do this.
85430         strtoimax, strtoumax: simplify, port to HP-UX 11.00 64-bit
85431         This supports apps that need pointers to strtoimax and strtoumax,
85432         and ports to HP-UX 11.00 64.bit, which has macros that expand to
85433         nonexistent functions.  See
85434         <http://lists.gnu.org/r/bug-gnulib/2011-04/msg00241.html>
85435         et seq.
85436         * lib/inttypes.in.h (strtoimax, strtoumax): #undef before declaring.
85437         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Don't check whether it's
85438         a macro.
85439         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
85441 2011-04-25  Simon Josefsson  <simon@josefsson.org>
85443         * modules/gnumakefile (configure.ac): Replace TAB with SPCs.
85445 2011-04-25  Bruno Haible  <bruno@clisp.org>
85447         strtol, strtoul: Mark modules as obsolete.
85448         * modules/strtol (Status, Notice): New sections.
85449         * modules/strtoul (Status, Notice): New sections.
85451 2011-04-25  Bruno Haible  <bruno@clisp.org>
85453         strtod: Remove check for strtod, unless supporting old platforms.
85454         * modules/strtod-obsolete: New file.
85455         * m4/strtod-obsolete.m4: New file.
85456         * m4/strtod.m4 (gl_FUNC_STRTOD): Don't check whether strtod is declared
85457         if gl_FUNC_STRTOD_OBSOLETE is not also defined.
85458         * modules/strtod (Depends-on): Add strtod-obsolete.
85459         * doc/posix-functions/strtod.texi: Mention module strtod-obsolete.
85461 2011-04-25  Bruno Haible  <bruno@clisp.org>
85463         strcase: Make module obsolete.
85464         * modules/strcase (Status, Notice): New sections.
85466 2011-04-25  Bruno Haible  <bruno@clisp.org>
85468         dup2: Remove check for dup2, unless supporting old obsolete platforms.
85469         * modules/dup2-obsolete: New file.
85470         * m4/dup2-obsolete.m4: New file.
85471         * m4/dup2.m4 (gl_FUNC_DUP2): Don't check whether dup2 exists if
85472         gl_FUNC_DUP2_OBSOLETE is not also defined.
85473         * modules/dup2 (Depends-on): Add dup2-obsolete.
85474         * doc/posix-functions/dup2.texi: Mention module dup2-obsolete.
85476 2011-04-25  Bruno Haible  <bruno@clisp.org>
85478         strnlen: Avoid memchr related link error on old obsolete platforms.
85479         * modules/memchr-obsolete: New file.
85480         * m4/memchr-obsolete.m4: New file.
85481         * m4/memchr.m4 (gl_FUNC_MEMCHR): Don't check whether memchr exists if
85482         gl_FUNC_MEMCHR_OBSOLETE is not also defined.
85483         * modules/memchr (Depends-on): Add memchr-obsolete.
85484         * modules/strnlen (Depends-on): Likewise.
85485         * doc/posix-functions/memchr.texi: Mention module memchr-obsolete.
85487 2011-04-25  Jim Meyering  <meyering@redhat.com>
85489         maint.mk: makefile_at_at_check extend and clean up
85490         * top/maint.mk (sc_makefile_at_at_check): Check *.mk files
85491         in addition to */Makefile.am.
85492         Exempt legitimate uses of @VAR@ notation, e.g.,
85493         MAKEINFO = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= @MAKEINFO@
85494         Remove obsolete coreutils-specific comment.
85495         Prompted by discussion here:
85496         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/26074
85498 2011-04-24  Paul Eggert  <eggert@cs.ucla.edu>
85500         strtoul: remove dependency on strtol
85501         This is so that 'configure' need not check for strtol merely because
85502         the application needs strtoul.
85503         * modules/strtoul (Files): Add lib/strtol.c.
85504         (Depends-on): Remove strtol.
85506         strtoull: remove dependency on strtoul
85507         This is like the strtoll change.
85508         * modules/strtoull (Files): Add lib/strtol.c, lib/strtoul.c.
85509         (Depends-on): Remove strtoul.
85511         strtoll: remove dependency on strtol
85512         This is so that 'configure' need not check for strtol merely because
85513         the application needs strtoll.
85514         * modules/strtoll (Files): Add lib/strtol.c.
85515         (Depends-on): Remove strtol.
85517 2011-04-22  Paul Eggert  <eggert@cs.ucla.edu>
85519         inttypes: Move some configure check to module 'imaxdiv'.
85520         * m4/imaxdiv.m4 (gl_FUNC_IMAXDIV): Require gl_INTTYPES_H_DEFAULTS
85521         instead of gl_INTTYPES_H.  Check for imaxdiv decl here.
85522         * m4/inttypes.m4 (gl_INTTYPES_H): Don't check for imaxdiv decl here.
85524 2011-04-22  Paul Eggert  <eggert@cs.ucla.edu>
85526         inttypes: Move some configure check to module 'imaxabs'.
85527         * m4/imaxabs.m4 (gl_FUNC_IMAXABS): Require gl_INTTYPES_H_DEFAULTS
85528         instead of gl_INTTYPES_H.  Check for imaxabs decl here.
85529         * m4/inttypes.m4 (gl_INTTYPES_H): Don't check for imaxabs decl here.
85531 2011-04-22  Paul Eggert  <eggert@cs.ucla.edu>
85533         inttypes: Remove configure tests that are not needed since 2009-12-31.
85534         * m4/inttypes.m4 (gl_INTTYPES_H): Remove determination of
85535         gl_cv_header_working_inttypes_h.
85537 2011-04-22  Paul Eggert  <eggert@cs.ucla.edu>
85539         * modules/strnlen (Depends-on): Remove memchr.
85540         The strnlen implementation doesn't need the memchr module's fixes; see
85541         <http://lists.gnu.org/r/bug-gnulib/2011-04/msg00237.html>.
85543         strtol: remove dependency on wchar
85544         * lib/strtol.c: Include <wchar.h> only if USE_WIDE_CHAR is defined.
85545         * modules/strtol (Depends-on): Remove wchar.
85547 2011-04-21  Eric Blake  <eblake@redhat.com>
85549         passfd: fix test regression on Linux
85550         * modules/passfd-tests (configure.ac): Correct socketpair check.
85552         passfd: speed up configure and drop unused code
85553         * m4/afunix.m4 (gl_SOCKET_AFUNIX): Rename...
85554         * m4/passfd.m4 (gl_PASSFD): ...to something more fitting of
85555         its use.  Drop test for setting unused HAVE_UNIXSOCKET_SCM_RIGHTS.
85556         Instead of probing at configure for unix_scm_rights_bsd44_way,
85557         instead probe for CMSG_FIRSTHDR at compile time.  Simplify BSD 4.3
85558         check to a struct member probe.
85559         * lib/passfd.c (includes): Nothing here requires <sys/un.h>.
85560         (sendfd, recvfd): Update preprocessor checks.
85561         * modules/passfd (Files): Reflect rename, and drop unused file.
85562         (Depends-on): Drop unused dependency.
85564         passfd: allow compilation on mingw
85565         * modules/sys_socket (Depends-on): Add sys_uio.
85566         * lib/sys_socket.in.h [!@HAVE_SYS_SOCKET_H@]: Use it for struct
85567         iovec and a minimal struct msghdr.
85568         * m4/afunix.m4 (gl_SOCKET_AFUNIX): Detect recvmsg/sendmsg.
85569         * tests/test-sys_socket.c (main): Enhance test.
85570         * lib/passfd.c (include): Drop <sys/uio.h>; <sys/sockets.h> is
85571         guaranteed to provide what we need.
85572         (sendmsg, recvmsg): Declare fallbacks if we lack sendmsg.
85573         * modules/passfd-tests (Depends-on): Add sys_wait.
85574         * tests/test-passfd.c (main): Skip test on mingw, for now.
85575         * doc/posix-headers/sys_socket.texi (sys/socket.h): Document the
85576         partial 'struct msghdr' implementation.
85578         sys_uio: new module
85579         * modules/sys_uio: New module.
85580         * modules/sys_uio-tests: Likewise.
85581         * lib/sys_uio.in.h: New file.
85582         * m4/sys_uio_h.m4: Likewise.
85583         * tests/test-sys_uio.c: Likewise.
85584         * doc/posix-headers/sys_uio.texi (sys/uio.h): Document it.
85585         * MODULES.html.sh (systems lacking POSIX:2008): Likewise.
85587 2011-04-20  Jim Meyering  <meyering@redhat.com>
85589         useless-if-before-free: avoid false-positive
85590         * build-aux/useless-if-before-free: Adjust regexp for the non-brace
85591         disjunct so that it too requires a terminating ";".  Without that,
85592         this script would identify as useless one statement from gcc that
85593         was not:
85594           if (aligned_ptr)
85595             free (((void **) aligned_ptr) [-1]);
85597 2011-04-20  Giuseppe Scrivano  <gscrivano@gnu.org>
85599         doc: update users.txt.
85600         * users.txt: Add barcode.
85602 2011-04-19  Bruno Haible  <bruno@clisp.org>
85604         ioctl: Remove link dependency on native Windows.
85605         * lib/fd-hook.h: Renamed from lib/close-hook.h.
85606         (gl_close_fn, gl_ioctl_fn): New types.
85607         (struct fd_hook): Renamed from struct close_hook. Change type of
85608         private_close_fn field. Add private_ioctl_fn field.
85609         (close_hook_fn): Add parameter for primary close method.
85610         (execute_close_hooks, execute_all_close_hooks): Likewise.
85611         (ioctl_hook_fn): New type.
85612         (execute_ioctl_hooks, execute_all_ioctl_hooks): New declarations.
85613         (register_fd_hook): Renamed from register_close_hook. Add ioctl_hook
85614         argument.
85615         (unregister_fd_hook): Renamed from unregister_close_hook.
85616         * lib/fd-hook.c: Renamed from lib/close-hook.c.
85617         Don't include <unistd.h>.
85618         (close): Remove undef.
85619         (anchor): Update.
85620         (execute_close_hooks): Add argument for primary close method.
85621         (execute_all_close_hooks): Likewise.
85622         (execute_ioctl_hooks, execute_all_ioctl_hooks): New functions.
85623         (register_fd_hook): Renamed from register_close_hook. Add ioctl_hook
85624         argument. Allow each argument to be NULL.
85625         (unregister_fd_hook): Renamed from unregister_close_hook.
85626         * lib/close.c (rpl_close): Pass 'close' function pointer to
85627         execute_all_close_hooks.
85628         * lib/ioctl.c: Include <errno.h>, fd-hook.h.
85629         (primary_ioctl): New function.
85630         (ioctl): Don't call ioctlsocket here. Instead, call
85631         execute_all_ioctl_hooks.
85632         * lib/sockets.c (close_fd_maybe_socket): Add argument for primary
85633         close method.
85634         (ioctl_fd_maybe_socket): New function, with code from lib/ioctl.c.
85635         (fd_sockets_hook): Renamed from close_sockets_hook.
85636         (gl_sockets_startup, gl_sockets_cleanup): Update.
85637         * modules/fd-hook: Renamed from modules/close-hook. Update.
85638         * modules/close (Depends-on): Add fd-hook, remove close-hook.
85639         * modules/sockets (Depends-on): Likewise.
85640         * modules/ioctl (Depends-on): Add fd-hook.
85641         * tests/test-nonblocking.c (main): Use GNULIB_TEST_SOCKET, not
85642         GNULIB_SOCKET.
85644 2011-04-19  Bruno Haible  <bruno@clisp.org>
85646         Move the support of O_NONBLOCK in open() to the 'open' module.
85647         * modules/nonblocking (Depends-on): Remove 'open'.
85648         * m4/nonblocking.m4 (gl_NONBLOCKING_IO_BODY): Set
85649         gl_cv_have_open_O_NONBLOCK.
85650         * m4/open.m4 (gl_FUNC_OPEN): Replace open() also when required for
85651         O_NONBLOCK support.
85652         * doc/posix-functions/open.texi: Document support for O_NONBLOCK.
85654 2011-04-17  Bruno Haible  <bruno@clisp.org>
85656         pipe2: Simplify code.
85657         * lib/pipe2.c (pipe2): Reduce code duplication.
85659 2011-04-17  Bruno Haible  <bruno@clisp.org>
85661         nonblocking: Add comment.
85662         * lib/fcntl.in.h (O_NONBLOCK): Add comment.
85664 2011-04-17  Bruno Haible  <bruno@clisp.org>
85666         nonblocking: Add tests for sockets.
85667         * tests/test-nonblocking-socket.sh: New file.
85668         * tests/test-nonblocking-socket-main.c: New file.
85669         * tests/test-nonblocking-socket-child.c: New file.
85670         * tests/test-nonblocking-socket.h: New file.
85671         * tests/socket-server.h: New file.
85672         * tests/socket-client.h: New file.
85673         * modules/nonblocking-socket-tests: New file.
85674         * modules/nonblocking-tests (Depends-on): Add nonblocking-socket-tests.
85676 2011-04-17  Bruno Haible  <bruno@clisp.org>
85678         nonblocking: Add tests for pipes.
85679         * tests/test-nonblocking-pipe.sh: New file.
85680         * tests/test-nonblocking-pipe-main.c: New file.
85681         * tests/test-nonblocking-pipe-child.c: New file.
85682         * tests/test-nonblocking-pipe.h: New file.
85683         * tests/test-nonblocking-writer.h: New file.
85684         * tests/test-nonblocking-reader.h: New file.
85685         * tests/test-nonblocking-misc.h: New file.
85686         * modules/nonblocking-pipe-tests: New file.
85687         * modules/nonblocking-tests (Depends-on): Add nonblocking-pipe-tests.
85689 2011-04-16  Bruno Haible  <bruno@clisp.org>
85691         gettext: Clarify the needed programmer actions.
85692         * modules/gettext (Notice): New field.
85693         Suggested by Ben Pfaff <blp@cs.stanford.edu>.
85695 2011-04-16  Bruno Haible  <bruno@clisp.org>
85697         strchrnul: Tweak last commit.
85698         * doc/glibc-functions/strchrnul.texi: Add more details about Cygwin
85699         bug.
85700         * lib/string.in.h (strchrnul): Use same arguments in _GL_FUNCDECL_RPL
85701         as in _GL_FUNCDECL_SYS.
85702         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Invoke gl_PREREQ_STRCHRNUL after
85703         AC_LIBOBJ. When cross-compiling, say "guessing yes" not "yes".
85705 2011-04-15  Eric Blake  <eblake@redhat.com>
85707         strchrnul: work around cygwin bug
85708         * doc/glibc-functions/strchrnul.texi (strchrnul): Document bug.
85709         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Detect it.
85710         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New witness.
85711         * modules/string (Makefile.am): Substitute it.
85712         * lib/string.in.h (strchrnul): Use it.
85714 2011-04-15  Bruno Haible  <bruno@clisp.org>
85716         Don't require lib/stdio-write.c when only module 'stdio' is used.
85717         * m4/stdio_h.m4 (gl_STDIO_H): Move the AC_LIBOBJ back into the m4_ifdef
85718         invocation.
85719         Reported by Rob Vermaas <rob.vermaas@gmail.com>.
85721 2011-04-14  Bruno Haible  <bruno@clisp.org>
85723         Support non-blocking pipe I/O in read() on native Windows.
85724         * lib/unistd.in.h: Include <sys/types.h> also for 'read'.
85725         (read): New declaration.
85726         * lib/read.c: New file.
85727         * lib/stdio.in.h (_GL_ATTRIBUTE_FORMAT_SCANF,
85728         _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM): New macros.
85729         (fgetc, fgets, fread, fscanf, getc, getchar, gets, scanf, vfscanf,
85730         vscanf): New declarations.
85731         * lib/stdio-read.c: New file.
85732         * m4/read.m4: New file.
85733         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_READ,
85734         REPLACE_READ.
85735         * m4/stdio_h.m4 (gl_STDIO_H): Set GNULIB_FGETC, GNULIB_FGETS,
85736         GNULIB_FREAD, GNULIB_FSCANF, GNULIB_GETC, GNULIB_GETCHAR, GNULIB_GETS,
85737         GNULIB_SCANF, GNULIB_VFSCANF, GNULIB_VSCANF. In non-blocking I/O is
85738         desired and needs workarounds, set REPLACE_STDIO_READ_FUNCS.
85739         (gl_STDIO_H_DEFAULTS): Initialize GNULIB_FGETC, GNULIB_FGETS,
85740         GNULIB_FREAD, GNULIB_FSCANF, GNULIB_GETC, GNULIB_GETCHAR, GNULIB_GETS,
85741         GNULIB_SCANF, GNULIB_VFSCANF, GNULIB_VSCANF, REPLACE_STDIO_READ_FUNCS.
85742         * modules/read: New file.
85743         * modules/nonblocking (Files): Add lib/stdio-read.c.
85744         * modules/unistd (Makefile.am): Substitute GNULIB_READ, REPLACE_READ.
85745         * modules/stdio (Makefile.am): Substitute GNULIB_FGETC, GNULIB_FGETS,
85746         GNULIB_FREAD, GNULIB_FSCANF, GNULIB_GETC, GNULIB_GETCHAR, GNULIB_GETS,
85747         GNULIB_SCANF, GNULIB_VFSCANF, GNULIB_VSCANF, REPLACE_STDIO_READ_FUNCS.
85748         * modules/pread (Depends-on): Add read.
85749         * modules/safe-read (Depends-on): Likewise.
85750         * tests/test-stdio-c++.cc (fgetc, fgets, fread, fscanf, getc, getchar,
85751         gets, scanf, vfscanf, vscanf): Verify signatures.
85752         * doc/posix-functions/read.texi: Mention 'nonblocking' module and
85753         problem with non-blocking pipes.
85754         * doc/posix-functions/fgetc.texi: Likewise.
85755         * doc/posix-functions/fgets.texi: Likewise.
85756         * doc/posix-functions/fread.texi: Likewise.
85757         * doc/posix-functions/fscanf.texi: Likewise.
85758         * doc/posix-functions/getc.texi: Likewise.
85759         * doc/posix-functions/getchar.texi: Likewise.
85760         * doc/posix-functions/gets.texi: Likewise.
85761         * doc/posix-functions/scanf.texi: Likewise.
85762         * doc/posix-functions/vfscanf.texi: Likewise.
85763         * doc/posix-functions/vscanf.texi: Likewise.
85765 2011-04-14  Bruno Haible  <bruno@clisp.org>
85767         Support non-blocking pipe I/O in write() on native Windows.
85768         * lib/write.c (rpl_write): Split a write request that failed merely
85769         because the byte count was larger than the pipe buffer's size.
85770         * doc/posix-functions/write.texi: Mention the problem with large byte
85771         counts.
85773 2011-04-14  Bruno Haible  <bruno@clisp.org>
85775         wchar: Ensure that wchar_t gets defined on uClibc.
85776         * lib/wchar.in.h: On uClibc, include <stddef.h>.
85777         Reported by Giuseppe Scrivano <gscrivano@gnu.org>.
85779 2011-04-13  Bruno Haible  <bruno@clisp.org>
85781         safe-write, full-read: Avoid unnecessary compilation units.
85782         * modules/safe-write (Files): Add lib/safe-read.c, m4/safe-read.m4.
85783         (Depends-on): Remove safe-read. Add ssize_t.
85784         * modules/full-read (Files): Add lib/full-write.c.
85785         (Depends-on): Add full-write.
85787 2011-04-13  Bruno Haible  <bruno@clisp.org>
85789         Support non-blocking pipe I/O and SIGPIPE in pwrite().
85790         * modules/pwrite (Depends-on): Add 'write'.
85792 2011-04-13  Bruno Haible  <bruno@clisp.org>
85794         Support non-blocking pipe I/O in write() on native Windows.
85795         * lib/unistd.in.h (write): Enable replacement also if
85796         GNULIB_UNISTD_H_NONBLOCKING is 1.
85797         * lib/write.c: Enable replacement also if GNULIB_NONBLOCKING.
85798         (rpl_write): When failing to write on a non-blocking pipe, change
85799         errno from ENOSPC to EAGAIN.
85800         * lib/stdio.in.h (fprintf, fputc, fputs, fwrite, printf, putc,
85801         putchar, puts, vfprintf, vprintf): Enable replacement also if
85802         GNULIB_STDIO_H_NONBLOCKING is 1.
85803         * lib/stdio-write.c: Enable replacements also if GNULIB_NONBLOCKING.
85804         (CLEAR_ERRNO, HANDLE_ENOSPC): New macros.
85805         (CLEAR_LastError, HANDLE_ERROR_NO_DATA): New macros, extracted from
85806         CALL_WITH_SIGPIPE_EMULATION.
85807         (CALL_WITH_SIGPIPE_EMULATION): Use them.
85808         * m4/nonblocking.m4: New file.
85809         * m4/write.m4 (gl_FUNC_WRITE): Enable REPLACE_WRITE also if required
85810         for non-blocking I/O support.
85811         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
85812         GNULIB_UNISTD_H_NONBLOCKING.
85813         * m4/stdio_h.m4 (gl_STDIO_H): Enable REPLACE_STDIO_WRITE_FUNCS also if
85814         required for non-blocking I/O support.
85815         (gl_STDIO_H_DEFAULTS): Initialize GNULIB_STDIO_H_NONBLOCKING.
85816         * modules/nonblocking (Files): Add m4/nonblocking.m4,
85817         lib/stdio-write.c, m4/asm-underscore.m4.
85818         (Depends-on): Add stdio, unistd.
85819         (configure.ac): Invoke gl_NONBLOCKING_IO. Define GNULIB_NONBLOCKING.
85820         Set GNULIB_STDIO_H_NONBLOCKING, GNULIB_UNISTD_H_NONBLOCKING.
85821         * modules/unistd (Makefile.am): Substitute GNULIB_UNISTD_H_NONBLOCKING.
85822         * modules/stdio (Makefile.am): Substitute GNULIB_STDIO_H_NONBLOCKING.
85823         * doc/posix-functions/fprintf.texi: Mention 'nonblocking' module and
85824         problem with non-blocking pipes.
85825         * doc/posix-functions/fputc.texi: Likewise.
85826         * doc/posix-functions/fputs.texi: Likewise.
85827         * doc/posix-functions/fwrite.texi: Likewise.
85828         * doc/posix-functions/printf.texi: Likewise.
85829         * doc/posix-functions/putc.texi: Likewise.
85830         * doc/posix-functions/putchar.texi: Likewise.
85831         * doc/posix-functions/puts.texi: Likewise.
85832         * doc/posix-functions/vfprintf.texi: Likewise.
85833         * doc/posix-functions/vprintf.texi: Likewise.
85834         * doc/posix-functions/write.texi: Likewise.
85836 2011-04-10  Jim Meyering  <meyering@redhat.com>
85838         maint.mk: prohibit doubled words
85839         Detect them also when they're separated by a newline.
85840         There are 3 ways to customize it:
85841           - disable the test on a per file basis, as usual with rules using
85842             $(VC_LIST_EXCEPT)
85843           - replace the default doubled-word-selecting regexp (affects all files)
85844           - ignore a particular file-vs-doubled-word match
85845         I nearly used that last one to ignore the "is is" match in
85846         coreutils' NEWS file, since the text was "ls -is is ..."
85847         To do that, I would have added this line to cfg.mk:
85848           ignore_doubled_word_match_RE_ = ^NEWS:[0-9]+:is[ ]is$
85849         but it would have ignored any "is is" match in NEWS.
85850         Low probability, but still...
85851         Instead, I changed the text, slightly:
85852           -  ls -is is now consistent with ls -lis in ignoring values returned
85853           +  "ls -is" is now consistent with ls -lis in ignoring values returned
85854         * top/maint.mk (prohibit_double_word_RE_): Provide default.
85855         (prohibit_doubled_word_): Define.
85856         (sc_prohibit_doubled_word): New rule.
85857         (sc_prohibit_the_the): Remove.  Subsumed by the above.
85859 2011-04-10  Jim Meyering  <meyering@redhat.com>
85861         maint: fix doubled-word typo in comment
85862         * m4/gethostname.m4: s/is is/it is/
85863         * m4/getdomainname.m4: Likewise.
85865 2011-04-10  Jim Meyering  <meyering@redhat.com>
85867         maint: remove doubled word: s/it it/it/
85868         * lib/stat-time.h (get_stat_birthtime): s/it it/it/
85870 2011-04-10  Jim Meyering  <meyering@redhat.com>
85872         maint.mk: remove useless semicolon and backslash
85873         * top/maint.mk (sc_prohibit_empty_lines_at_EOF): Remove stray
85874         semicolon and backslash.
85876 2011-04-10  Bruno Haible  <bruno@clisp.org>
85878         stdint test: Fix compilation failure on OSF/1 with DTK compiler.
85879         * modules/stdint-tests (Depends-on): Add wchar.
85881 2011-04-10  Jim Meyering  <meyering@redhat.com>
85883         maint: remove doubled words in comments, e.g., s/a a/a/
85884         * lib/strptime.c (day_of_the_week): s/the the/the/
85885         * tests/test-chown.h (test_chown): s/a a/a/
85887         test-chown.h: correct a cast
85888         * tests/test-chown.h (test_chown): Cast -1 to gid_t (not uid_t)
85889         when the destination is a stat.st_gid.
85891 2011-04-09  Mats Erik Andersson  <mats.andersson@gisladisker.se>  (tiny change)
85893         getaddrinfo: Fix test for sa_len member.
85894         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): When testing for sa_len,
85895         include <sys/types.h> before <sys/socket.h>.
85897 2011-04-09  Paul Eggert  <eggert@cs.ucla.edu>
85899         maint: change "can not" to "cannot"
85900         * doc/posix-functions/iconv.texi (iconv): This one crossed line
85901         boundaries.
85903 2011-04-09  Jim Meyering  <meyering@redhat.com>
85905         maint: change "a a" to "a"
85906         * tests/test-lchown.h (test_lchown): s/a a/a/
85908         maint.mk: prohibit \<the the\>
85909         * top/maint.mk (sc_prohibit_the_the): New rule.
85911         maint: fix "the the" in comment
85912         * lib/count-one-bits.h: s/the the/the/
85914         maint: change "can not" to "cannot"
85915         But do not change the occurrences in maintain.texi or in
85916         build-aux/po/Makefile.in.in, which I presume comes from gettext.
85917         * doc/gnulib-tool.texi: s/can not/cannot/
85918         * doc/posix-functions/accept.texi (accept): Likewise.
85919         * doc/posix-functions/socket.texi (socket): Likewise.
85920         * lib/mbrtowc.c: Likewise.
85922         maint.mk: prohibit use of "can not"
85923         * top/maint.mk (sc_prohibit_can_not): New rule.
85924         Writing "can not" (rather than "cannot") is too common.  Prohibit it.
85926 2011-04-09  Bruno Haible  <bruno@clisp.org>
85928         careadlinkat: Guard against misuse of careadlinkatcwd.
85929         * lib/careadlinkat.c: Include <stdlib.h>.
85930         (careadlinkatcwd): Check that the fd argument is as expected.
85932 2011-04-09  Bruno Haible  <bruno@clisp.org>
85934         careadlinkat: Use common coding style.
85935         * lib/careadlinkat.c: Move gnulib includes after system includes.
85937 2011-04-09  Bruno Haible  <bruno@clisp.org>
85939         careadlinkat: Clarify specification.
85940         * lib/careadlinkat.h (careadlinkat): Clarify preadlinkat argument.
85941         (careadlinkatcwd): Add comment.
85942         * lib/careadlinkat.c (careadlinkat): Clarify preadlinkat argument.
85944 2011-04-09  Bruno Haible  <bruno@clisp.org>
85946         areadlinkat: Avoid link error on many platforms.
85947         * modules/areadlinkat (Depends-on): Add areadlink.
85949 2011-04-09  Bruno Haible  <bruno@clisp.org>
85951         allocator, careadlinkat: Fix double-inclusion guard.
85952         * lib/allocator.h: Fix double-inclusion guard.
85953         * lib/careadlinkat.h: Likewise.
85955 2011-04-09  Bruno Haible  <bruno@clisp.org>
85957         relocatable-prog-wrapper: Update after module 'areadlink' changed.
85958         * lib/relocwrapper.c: Update dependencies hierarchy.
85959         * build-aux/install-reloc: Update list of files to be compiled.
85960         * modules/relocatable-prog-wrapper (Files): Add lib/careadlinkat.[hc],
85961         lib/allocator.[hc].
85963 2011-04-08  Eric Blake  <eblake@redhat.com>
85965         strftime: silence gnulib-tool warning
85966         * modules/strftime-tests (Depends-on): Drop automatic dependency.
85968 2011-04-08  Bruno Haible  <bruno@clisp.org>
85970         verify: Fix syntax error with GCC 4.6 in C++ mode.
85971         * lib/verify.h (HAVE__STATIC_ASSERT): Don't define in C++ mode.
85972         (HAVE_STATIC_ASSERT): New macro.
85973         (verify_true, verify): Use 'static_assert' if it is supported and
85974         '_Static_assert' is not supported.
85976 2011-04-08  Paul Eggert  <eggert@cs.ucla.edu>
85978         allocator: New module.
85979         * modules/allocator, lib/allocator.c: New files.
85980         * lib/allocator.h (stdlib_allocator): New decl.
85981         * lib/careadlinkat.c (_GL_USE_STDLIB_ALLOC, standard_allocator):
85982         Remove.  Do not include <stdlib.h>.
85983         (careadlinkat): Use stdlib_allocator instead of rolling our own.
85984         * modules/careadlinkat (Files): Remove lib/allocator.h.
85985         (Depends-on): Add allocator.
85987         stdlib: let modules use system malloc, realloc
85988         * lib/stdlib.in.h (malloc, realloc): Don't #define or add warnings
85989         if !_GL_USE_STDLIB_ALLOC.
85990         (malloc, realloc): Limit this change to a smaller scope.
85992         * lib/careadlinkat.c (_GL_USE_STDLIB_ALLOC): Define.
85993         (malloc, realloc): Don't #undef; no longer needed.
85994         * lib/malloca.c (_GL_USE_STDLIB_ALLOC, malloc): Likewise.
85995         * lib/progreloc.c (_GL_USE_STDLIB_ALLOC, malloc): Likewise.
85996         * lib/setenv.c (_GL_USE_STDLIB_ALLOC, malloc, realloc): Likewise.
85997         * lib/canonicalize-lgpl.c (_GL_USE_STDLIB_ALLOC, malloc): Likewise.
85998         * lib/relocatable.c (_GL_USE_STDLIB_ALLOC, malloc): Likewise.
85999         * lib/relocwrapper.c (_GL_USE_STDLIB_ALLOC, malloc): Likewise.
86000         * lib/malloc.c (_GL_USE_STDLIB_ALLOC, malloc): Likewise.
86001         * lib/realloc.c (_GL_USE_STDLIB_ALLOC, malloc, realloc): Likewise.
86003         careadlinkat: rename members to avoid problem
86004         * lib/allocator.h (struct allocator): Rename members from
86005         malloc/realloc to allocate/reallocate, to avoid problems if malloc
86006         and realloc are #define'd.  Reported by Eric Blake in
86007         <http://lists.gnu.org/r/bug-gnulib/2011-04/msg00091.html>.
86008         * lib/careadlinkat.c (careadlinkat): Adjust to renaming.
86010 2011-04-08  Eric Blake  <eblake@redhat.com>
86012         nonblocking: reduce dependency
86013         * tests/test-nonblocking.c: Only test sockets when in use.
86014         * modules/nonblocking-tests (Depends-on): Drop socket.
86015         (Makefile.am): Link even if sockets are not present.
86016         * modules/pipe2-tests (Makefile.am): Likewise.
86017         * lib/ioctl.c (ioctl) [WIN32]: Fail if sockets are not also in use.
86019         pipe2: fix O_NONBLOCK support on mingw
86020         * modules/pipe2 (Depends-on): Add nonblocking.
86021         * lib/pipe2.c (pipe2) [WIN32]: Add O_NONBLOCK support.
86022         * tests/test-pipe2.c (is_nonblocking): Adjust test accordingly.
86023         * tests/test-nonblocking.c (main): Likewise.
86024         * modules/pipe2-tests (Makefile.am): Avoid link failure.
86026         fcntl-h: fix O_ACCMODE on cygwin
86027         * doc/posix-headers/fcntl.texi (fcntl.h): Document the bug.
86028         * lib/fcntl.in.h (O_ACCMODE): Fix it.
86030         pipe-filter: drop O_NONBLOCK workarounds
86031         * modules/pipe-filter-gi (Depends-on): Add fcntl-h.
86032         * modules/pipe-filter-ii (Depends-on): Likewise.
86033         * lib/pipe-filter-aux.h (O_NONBLOCK): Delete workaround.
86035         nonblocking: provide O_NONBLOCK for mingw
86036         * modules/nonblocking (Depends-on): Add open.
86037         (configure.ac): Set new witness macro.
86038         * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Provide default for it.
86039         * modules/fcntl-h (Makefile.am): Substitute it.
86040         * lib/fcntl.in.h (O_NONBLOCK): Guarantee non-zero definition when
86041         nonblocking module is in use.
86042         * lib/nonblocking.c: Adjust portability test.
86043         * lib/open.c (open): Don't let native open see gnulib flag.
86044         * tests/test-fcntl-h.c (main): Enhance test.
86045         * tests/test-open.h (test_open): Likewise.
86046         * doc/posix-headers/fcntl.texi (fcntl.h): Document the replacement.
86048         careadlinkat: fix compilation error on mingw
86049         * lib/careadlinkat.c (standard_allocator): Avoid renaming fields
86050         within struct allocator.
86052 2011-04-06  Eric Blake  <eblake@redhat.com>
86054         binary-io: relicense under LGPLv2+
86055         * modules/binary-io (License): Relax to LGPLv2+.
86056         Requested for libvirt, and required by pipe2.
86058 2011-04-06  Paul Eggert  <eggert@cs.ucla.edu>
86060         verify: use _Static_assert if available
86061         * lib/verify.h (HAVE__STATIC_ASSERT): New macro.
86062         (verify_true, verify): Use it if available.  This generates better
86063         diagnostics with GCC 4.6.0 and later.
86065 2011-04-05  Bruno Haible  <bruno@clisp.org>
86067         Remove leftover generated .h files after config.status changed.
86069         * m4/alloca.m4 (gl_FUNC_ALLOCA): New automake conditional
86070         GL_GENERATE_ALLOCA_H.
86071         * modules/alloca-opt (Makefile.am): Remove alloca.h if
86072         GL_GENERATE_ALLOCA_H evaluates to false.
86074         * m4/argz.m4 (gl_FUNC_ARGZ): New automake conditional
86075         GL_GENERATE_ARGZ_H.
86076         * modules/argz (Makefile.am): Remove argz.h if GL_GENERATE_ARGZ_H
86077         evaluates to false.
86079         * m4/byteswap.m4 (gl_BYTESWAP): New automake conditional
86080         GL_GENERATE_BYTESWAP_H.
86081         * modules/byteswap (Makefile.am): Remove byteswap.h if
86082         GL_GENERATE_BYTESWAP_H evaluates to false.
86084         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): New automake conditional
86085         GL_GENERATE_ERRNO_H.
86086         * modules/errno (Makefile.am): Remove errno.h if GL_GENERATE_ERRNO_H
86087         evaluates to false.
86089         * m4/float_h.m4 (gl_FLOAT_H): New automake conditional
86090         GL_GENERATE_FLOAT_H.
86091         * modules/float (Makefile.am): Remove float.h if GL_GENERATE_FLOAT_H
86092         evaluates to false.
86094         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): New automake conditional
86095         GL_GENERATE_FNMATCH_H.
86096         * modules/fnmatch (Makefile.am): Remove fnmatch.h if
86097         GL_GENERATE_FNMATCH_H evaluates to false.
86099         * m4/glob.m4 (gl_GLOB_SUBSTITUTE, gl_GLOB): New automake conditional
86100         GL_GENERATE_GLOB_H.
86101         * modules/glob (Makefile.am): Remove glob.h if GL_GENERATE_GLOB_H
86102         evaluates to false.
86104         * m4/iconv_h.m4 (gl_REPLACE_ICONV_H, gl_ICONV_H_DEFAULTS): New
86105         automake conditional GL_GENERATE_ICONV_H.
86106         * modules/iconv-h (Makefile.am): Remove iconv.h if GL_GENERATE_ICONV_H
86107         evaluates to false.
86109         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): New automake conditional
86110         GL_GENERATE_NETINET_IN_H.
86111         * modules/netinet_in (Makefile.am): Remove netinet/in.h if
86112         GL_GENERATE_NETINET_IN_H evaluates to false.
86114         * m4/pthread.m4 (gl_PTHREAD_CHECK): Set PTHREAD_H here. New automake
86115         conditional GL_GENERATE_PTHREAD_H.
86116         (gl_PTHREAD_DEFAULTS): Don't set PTHREAD_H here.
86117         * modules/pthread (Makefile.am): Remove pthread.h if
86118         GL_GENERATE_PTHREAD_H evaluates to false.
86120         * m4/sched_h.m4 (gl_SCHED_H): New automake conditional
86121         GL_GENERATE_SCHED_H.
86122         * modules/sched (Makefile.am): Remove sched.h if GL_GENERATE_SCHED_H
86123         evaluates to false.
86125         * m4/selinux-context-h.m4 (gl_HEADERS_SELINUX_CONTEXT_H): New automake
86126         conditional GL_GENERATE_SELINUX_CONTEXT_H.
86127         * modules/selinux-h (Makefile.am): Remove selinux/context.h if
86128         GL_GENERATE_SELINUX_CONTEXT_H evaluates to false.
86130         * m4/stdarg.m4 (gl_STDARG_H): New automake conditional
86131         GL_GENERATE_STDARG_H.
86132         * modules/stdarg (Makefile.am): Remove stdarg.h if
86133         GL_GENERATE_STDARG_H evaluates to false.
86135         * m4/stdbool.m4 (AM_STDBOOL_H): New automake conditional
86136         GL_GENERATE_STDBOOL_H.
86137         * modules/stdbool (Makefile.am): Remove stdbool.h if
86138         GL_GENERATE_STDBOOL_H evaluates to false.
86140         * m4/stddef_h.m4 (gl_STDDEF_H): Set STDDEF_H here. New automake
86141         conditional GL_GENERATE_STDDEF_H.
86142         (gl_STDDEF_H_DEFAULTS): Don't set STDDEF_H here.
86143         * modules/stddef (Makefile.am): Remove stddef.h if
86144         GL_GENERATE_STDDEF_H evaluates to false.
86146         * m4/stdint.m4 (gl_STDINT_H): New automake conditional
86147         GL_GENERATE_STDINT_H.
86148         * modules/stdint (Makefile.am): Remove stdint.h if
86149         GL_GENERATE_STDINT_H evaluates to false.
86151         * m4/sysexits.m4 (gl_SYSEXITS): New automake conditional
86152         GL_GENERATE_SYSEXITS_H.
86153         * modules/sysexits (Makefile.am): Remove sysexits.h if
86154         GL_GENERATE_SYSEXITS_H evaluates to false.
86156         Reported by Karl Berry and Ralf Wildenhues.
86158 2011-04-05  Bruno Haible  <bruno@clisp.org>
86160         Ensure to rebuild generated .h files when config.status has changed.
86161         * modules/arpa_inet (Makefile.am): Add dependency from .h file to
86162         config.status.
86163         * modules/ctype (Makefile.am): Likewise.
86164         * modules/dirent (Makefile.am): Likewise.
86165         * modules/errno (Makefile.am): Likewise.
86166         * modules/fcntl-h (Makefile.am): Likewise.
86167         * modules/float (Makefile.am): Likewise.
86168         * modules/getopt-posix (Makefile.am): Likewise.
86169         * modules/glob (Makefile.am): Likewise.
86170         * modules/iconv-h (Makefile.am): Likewise.
86171         * modules/inttypes (Makefile.am): Likewise.
86172         * modules/langinfo (Makefile.am): Likewise.
86173         * modules/locale (Makefile.am): Likewise.
86174         * modules/math (Makefile.am): Likewise.
86175         * modules/netdb (Makefile.am): Likewise.
86176         * modules/netinet_in (Makefile.am): Likewise.
86177         * modules/poll-h (Makefile.am): Likewise.
86178         * modules/pthread (Makefile.am): Likewise.
86179         * modules/pty (Makefile.am): Likewise.
86180         * modules/sched (Makefile.am): Likewise.
86181         * modules/search (Makefile.am): Likewise.
86182         * modules/selinux-h (Makefile.am): Likewise.
86183         * modules/signal (Makefile.am): Likewise.
86184         * modules/spawn (Makefile.am): Likewise.
86185         * modules/stdarg (Makefile.am): Likewise.
86186         * modules/stdbool (Makefile.am): Likewise.
86187         * modules/stddef (Makefile.am): Likewise.
86188         * modules/stdint (Makefile.am): Likewise.
86189         * modules/stdio (Makefile.am): Likewise.
86190         * modules/stdlib (Makefile.am): Likewise.
86191         * modules/string (Makefile.am): Likewise.
86192         * modules/strings (Makefile.am): Likewise.
86193         * modules/sys_file (Makefile.am): Likewise.
86194         * modules/sys_ioctl (Makefile.am): Likewise.
86195         * modules/sys_select (Makefile.am): Likewise.
86196         * modules/sys_socket (Makefile.am): Likewise.
86197         * modules/sys_stat (Makefile.am): Likewise.
86198         * modules/sys_time (Makefile.am): Likewise.
86199         * modules/sys_times (Makefile.am): Likewise.
86200         * modules/sys_utsname (Makefile.am): Likewise.
86201         * modules/sys_wait (Makefile.am): Likewise.
86202         * modules/sysexits (Makefile.am): Likewise.
86203         * modules/termios (Makefile.am): Likewise.
86204         * modules/time (Makefile.am): Likewise.
86205         * modules/unistd (Makefile.am): Likewise.
86206         * modules/wchar (Makefile.am): Likewise.
86207         * modules/wctype-h (Makefile.am): Likewise.
86208         Reported by Karl Berry, Eric Blake, and Ralf Wildenhues.
86210 2011-04-05  Bruno Haible  <bruno@clisp.org>
86212         pipe2: Relicense under LGPLv2+.
86213         * modules/pipe2 (License): Change to LGPLv2+.
86214         Requested by Eric Blake, for libvirt.
86216 2011-04-05  Bruce Korb  <bkorb@gnu.org>
86218         bootstrap: compute gnulib_extra_files after updating build_aux
86219         * build-aux/bootstrap (gnulib_extra_files): bootstrap.conf may
86220         change build_aux or also supply gnulib_extra_files.  Handle correctly.
86222 2011-04-05  Eric Blake  <eblake@redhat.com>
86224         bootstrap: preserve git whitelist item sorting
86225         * build-aux/bootstrap (sort_patterns): New function.
86226         (insert_sorted_if_absent): Use it to sink ! lines to the bottom.
86228 2011-04-05  Simon Josefsson  <simon@josefsson.org>
86230         * top/maint.mk (sc_prohibit_empty_lines_at_EOF): Don't trigger
86231         sc_space_tab check.
86233 2011-04-05  Paul Eggert  <eggert@cs.ucla.edu>
86235         areadlink, areadlinkat: rewrite in terms of careadlinkat
86236         * lib/areadlink.c, lib/areadlinkat.c: Include careadlinkat.h
86237         instead of errno.h, limits.h, stdint.h, stdlib.h, string.h, unistd.h.
86238         (SSIZE_MAX, INITIAL_BUF_SIZE): Remove.
86239         (malloc, realloc): Remove #undefs.
86240         (areadlink, areadlinkat): Rewrite in terms of careadlinkat.
86241         * modules/areadlink (Depends-on): Add careadlinkat.  Remove
86242         readlink, ssize_t, stdint, unistd.
86243         * modules/areadlinkat (Depends-on): Add careadlinkat.  Remove
86244         areadlink, stdint.
86246         careadlinkat: new module
86247         * lib/allocator.h, lib/careadlinkat.h, lib/careadlinkat.c:
86248         * modules/careadlinkat: New files, written by me with
86249         a review and feedback from Ben Pfaff in
86250         <http://lists.gnu.org/r/bug-gnulib/2011-04/msg00008.html>.
86252 2011-04-01  Bruno Haible  <bruno@clisp.org>
86254         wmemchr, wcschr, wcsrchr, wcspbrk, wcsstr: Avoid errors in C++ mode.
86255         * lib/wchar.in.h (wmemchr, wcschr, wcsrchr, wcspbrk, wcsstr): Use
86256         _GL_CXXALIAS_SYS_CAST2 instead of _GL_CXXALIAS_SYS. On glibc >= 2.10
86257         systems, use _GL_CXXALIASWARN1 instead of _GL_CXXALIASWARN.
86258         Reported by Bruce Korb <bruce.korb@gmail.com>.
86260 2011-04-01  Bruno Haible  <bruno@clisp.org>
86262         wcpcpy, wcpncpy: Ensure declaration on glibc >= 2.13 systems.
86263         * m4/wcpcpy.m4 (gl_FUNC_WCPCPY): Require AC_USE_SYSTEM_EXTENSIONS.
86264         * m4/wcpncpy.m4 (gl_FUNC_WCPNCPY): Likewise.
86265         * modules/wcpcpy (Depends-on): Add extensions.
86266         * modules/wcpncpy (Depends-on): Likewise.
86267         * doc/posix-functions/wcpcpy.texi: Mention missing declaration on glibc
86268         systems.
86269         * doc/posix-functions/wcpncpy.texi: Likewise.
86270         * doc/posix-functions/wcwidth.texi: Likewise.
86272 2011-03-31  Eric Blake  <eblake@redhat.com>
86274         nonblocking: fix mingw test failures
86275         * lib/nonblocking.c (set_nonblocking_flag): Succeed when clearing
86276         non-blocking flag on regular file.
86277         (get_nonblocking_flag): Set errno on invalid fd.
86278         * tests/test-nonblocking.c (main): Avoid test failure on
86279         directories if fchdir is not active.
86280         * modules/nonblocking-tests (Depends-on): Drop unused dependency.
86282 2011-03-31  Bruno Haible  <bruno@clisp.org>
86284         Fix bug with gl_WARN_ON_USE_PREPARE, introduced on 2011-01-23.
86285         * m4/gnulib-common.m4 (gl_ASSERT_NO_GNULIB_POSIXCHECK): Hide the
86286         gl_WARN_ON_USE_PREPARE definition from 'aclocal'.
86287         Reported by Simon Josefsson <simon@josefsson.org>.
86289 2011-03-31  Bruno Haible  <bruno@clisp.org>
86290         and Eric Blake  <eblake@redhat.com>
86292         nonblocking: new module
86293         * modules/nonblocking: New module.
86294         * modules/nonblocking-tests: Likewise.
86295         * lib/nonblocking.h: New file.
86296         * lib/nonblocking.c: Likewise.
86297         * tests/test-nonblocking.c: New test.
86298         * lib/ioctl.c (ioctl) [mingw]: Update comment.
86300 2011-03-30  Bruno Haible  <bruno@clisp.org>
86302         stdio: Avoid GCC >= 4.4 warnings when using %lld and similar on mingw.
86303         * lib/stdio.in.h (_GL_ATTRIBUTE_FORMAT_PRINTF): Use 'gnu_printf' format
86304         instead of 'printf' format for GCC >= 4.4.
86305         (_GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM): New macro.
86306         (fprintf, printf, vfprintf, vprintf): Declare with
86307         _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM when the function ends up calling
86308         the system's vfprintf() function.
86309         Reported by Daniel P. Berrange <berrange@redhat.com> via Eric Blake.
86311 2011-03-30  Eric Blake  <eblake@redhat.com>
86313         passfd: fix scoping bug
86314         * lib/passfd.c (sendfd, recvfd): Don't let buf go out of scope
86315         before sendmsg/recvmsg.
86317         passfd: standardize coding conventions
86318         * m4/afunix.m4 (gl_SOCKET_AFUNIX): Drop check for something that
86319         can be learned at compile time.
86320         * lib/passfd.c (MSG_CMSG_CLOEXEC): Reduce number of in-function
86321         ifdefs.
86322         (sendfd, recvfd): Follow gnulib code conventions.
86324         passfd: fix incorrect sendmsg arguments
86325         * lib/passfd.c (sendfd): Avoid uninitialized msg_flags field, and
86326         incorrect msg_controllen value.
86327         * modules/passfd-tests (Depends-on): Check for alarm.
86328         * tests/test-passfd.c (main) [HAVE_DECL_ALARM]: Avoid hanging test.
86329         Reported by Bastien ROUCARIES.
86331 2011-03-30  Bruno Haible  <bruno@clisp.org>
86333         c-strcasestr: Relicense under LGPLv2+.
86334         * modules/c-strcasestr (License): Change to LGPLv2+.
86335         Requested by Eric Blake, for libvirt.
86337 2011-03-30  Simon Josefsson  <simon@josefsson.org>
86339         * users.txt: Add libidn2.  Fix libtasn1 link.
86341 2011-03-30  Jim Meyering  <meyering@redhat.com>
86343         tests: readlink* ("",... fails with EINVAL on newer kernels
86344         readlink and readlinkat have typically failed with ENOENT for
86345         the invalid, empty file name,  "".  However, with the advent
86346         of linux-2.6.39, they fail with EINVAL.
86347         * tests/test-areadlink.h (test_areadlink): Also accept EINVAL
86348         when operating on the empty file name.
86349         * tests/test-readlink.h (test_readlink): Likewise.
86351 2011-03-29  Bruno Haible  <bruno@clisp.org>
86353         Relicense some modules under LGPLv2+, for libidn2.
86354         * modules/array-mergesort (License): Change to LGPLv2+.
86355         * modules/c-strcaseeq (License): Likewise.
86356         * modules/striconveh (License): Likewise.
86357         * modules/striconveha (License): Likewise.
86358         * modules/uniconv/base (License): Likewise.
86359         * modules/uniconv/u8-conv-from-enc (License): Likewise.
86360         * modules/uniconv/u8-strconv-from-enc (License): Likewise.
86361         * modules/uniconv/u8-strconv-from-locale (License): Likewise.
86362         * modules/unictype/base (License): Likewise.
86363         * modules/unictype/bidiclass-of (License): Likewise.
86364         * modules/unictype/category-M (License): Likewise.
86365         * modules/unictype/category-none (License): Likewise.
86366         * modules/unictype/category-of (License): Likewise.
86367         * modules/unictype/category-test (License): Likewise.
86368         * modules/unictype/category-test-withtable (License): Likewise.
86369         * modules/unictype/combining-class (License): Likewise.
86370         * modules/unictype/joiningtype-of (License): Likewise.
86371         * modules/unictype/scripts (License): Likewise.
86372         * modules/uninorm/base (License): Likewise.
86373         * modules/uninorm/canonical-decomposition (License): Likewise.
86374         * modules/uninorm/composition (License): Likewise.
86375         * modules/uninorm/decompose-internal (License): Likewise.
86376         * modules/uninorm/decomposition-table (License): Likewise.
86377         * modules/uninorm/nfc (License): Likewise.
86378         * modules/uninorm/nfd (License): Likewise.
86379         * modules/uninorm/u32-normalize (License): Likewise.
86380         * modules/unistr/base (License): Likewise.
86381         * modules/unistr/u32-cpy (License): Likewise.
86382         * modules/unistr/u32-mbtouc-unsafe (License): Likewise.
86383         * modules/unistr/u32-to-u8 (License): Likewise.
86384         * modules/unistr/u32-uctomb (License): Likewise.
86385         * modules/unistr/u8-check (License): Likewise.
86386         * modules/unistr/u8-mblen (License): Likewise.
86387         * modules/unistr/u8-mbtouc (License): Likewise.
86388         * modules/unistr/u8-mbtouc-unsafe (License): Likewise.
86389         * modules/unistr/u8-mbtoucr (License): Likewise.
86390         * modules/unistr/u8-prev (License): Likewise.
86391         * modules/unistr/u8-strlen (License): Likewise.
86392         * modules/unistr/u8-to-u32 (License): Likewise.
86393         * modules/unistr/u8-uctomb (License): Likewise.
86394         * modules/unitypes (License): Likewise.
86395         Requested by Simon Josefsson.
86397 2011-03-29  Simon Josefsson  <simon@josefsson.org>
86399         lib-symbol-visibility: Add a notice.
86400         * modules/lib-symbol-visibility (Notice): New field.
86402 2011-03-29  Bruno Haible  <bruno@clisp.org>
86404         getaddrinfo: Doc fix.
86405         * doc/posix-functions/getaddrinfo.texi: Mention Windows problem in the
86406         section "fixed in Gnulib".
86408 2011-03-28  Simon Josefsson  <simon@josefsson.org>
86410         * doc/posix-functions/getaddrinfo.texi: Drop netdb.h discussion.
86411         Reported by Bastien ROUCARIES <roucaries.bastien@gmail.com>.
86413 2011-03-26  Bruno Haible  <bruno@clisp.org>
86415         unictype/property-byname: Reduce the number of load-time relocations.
86416         * lib/unictype/pr_byname.c: Include <stdlib.h>.
86417         (UC_PROPERTY_INDEX_*): New enumeration values.
86418         (uc_property_byname): Convert an index from the lookup table to an
86419         uc_property_t.
86420         * lib/unictype/pr_byname.gperf: Store indices instead of uc_property_t
86421         values.
86423 2011-03-26  Bruno Haible  <bruno@clisp.org>
86425         unictype/property-byname: Allow omitted word separators and aliases.
86426         * lib/unictype/pr_byname.gperf: Add property names without word
86427         separators. Add aliases from Unicode 6.0 PropertyAliases.txt, except
86428         for 'space'.
86430 2011-03-26  Bruno Haible  <bruno@clisp.org>
86432         unictype/joininggroup-byname: Allow hyphens, omitted word separators.
86433         * lib/unictype/joininggroup_byname.c (uc_joining_group_byname): Convert
86434         also hyphens to space.
86435         * lib/unictype/joininggroup_byname.gperf: Recognize the names also
86436         without spaces.
86437         * tests/unictype/test-joininggroup_byname.c (main): Add more tests.
86439 2011-03-26  Bruno Haible  <bruno@clisp.org>
86441         unictype/joiningtype-byname: Recognize long names as well.
86442         * lib/unictype.in.h (uc_joiningtype_class_byname): Allow argument to be
86443         a long name.
86444         * lib/unictype/joiningtype_byname.c: Include <string.h>,
86445         unictype/joiningtype_byname.h.
86446         (uc_joiningtype_class_byname): Use uc_joining_type_lookup.
86447         * lib/unictype/joiningtype_byname.gperf: New file.
86448         * modules/unictype/joiningtype-byname (Files): Add
86449         lib/unictype/joiningtype_byname.gperf.
86450         (Depends-on): Add gperf.
86451         (Makefile.am): Add rule for generating unictype/joiningtype_byname.h.
86452         * tests/unictype/test-joiningtype_byname.c (main): Test the recognition of
86453         long names.
86455         Tests for module 'unictype/joiningtype-longname'.
86456         * modules/unictype/joiningtype-longname-tests: New file.
86457         * tests/unictype/test-joiningtype_longname.c: New file.
86459         New module 'unictype/joiningtype-longname'.
86460         * lib/unictype.in.h (uc_joiningtype_class_long_name): New declaration.
86461         * lib/unictype/joiningtype_longname.c: New file.
86462         * modules/unictype/joiningtype-longname: New file.
86463         * modules/unictype/joiningtype-all (Depends-on): Add
86464         unictype/joiningtype-longname.
86466 2011-03-26  Bruno Haible  <bruno@clisp.org>
86468         unictype/bidiclass-byname: Recognize long names as well.
86469         * lib/unictype.in.h (uc_bidi_class_byname): Allow argument to be a long
86470         name.
86471         * lib/unictype/bidi_byname.c: Include <string.h>,
86472         unictype/bidi_byname.h.
86473         (uc_bidi_class_byname): Use uc_bidi_class_lookup.
86474         * lib/unictype/bidi_byname.gperf: New file.
86475         * modules/unictype/bidiclass-byname (Files): Add
86476         lib/unictype/bidi_byname.gperf.
86477         (Depends-on): Add gperf.
86478         (Makefile.am): Add rule for generating unictype/bidi_byname.h.
86479         * tests/unictype/test-bidi_byname.c (main): Test the recognition of
86480         long names.
86482         Tests for module 'unictype/bidiclass-longname'.
86483         * modules/unictype/bidiclass-longname-tests: New file.
86484         * tests/unictype/test-bidi_longname.c: New file.
86486         New module 'unictype/bidiclass-longname'.
86487         * lib/unictype.in.h (uc_bidi_class_long_name): New declaration.
86488         * lib/unictype/bidi_longname.c: New file.
86489         * modules/unictype/bidiclass-longname: New file.
86490         * modules/unictype/bidiclass-all (Depends-on): Add
86491         unictype/bidiclass-longname.
86493 2011-03-26  Bruno Haible  <bruno@clisp.org>
86495         unictype/bidi*: Rename modules.
86496         * modules/unictype/bidiclass-all: Renamed from
86497         modules/unictype/bidicategory-all.
86498         * modules/unictype/bidiclass-name: Renamed from
86499         modules/unictype/bidiclass-name.
86500         (Description): Update.
86501         * modules/unictype/bidiclass-name-tests: Renamed from
86502         modules/unictype/bidicategory-name-tests.
86503         * modules/unictype/bidiclass-byname: Renamed from
86504         modules/unictype/bidicategory-byname.
86505         (Description): Update.
86506         * modules/unictype/bidiclass-byname-tests: Renamed from
86507         modules/unictype/bidicategory-byname-tests.
86508         * modules/unictype/bidiclass-of: Renamed from
86509         modules/unictype/bidicategory-of.
86510         (Description): Update.
86511         * modules/unictype/bidiclass-of-tests: Renamed from
86512         modules/unictype/bidicategory-of-tests.
86513         * modules/unictype/bidiclass-test: Renamed from
86514         modules/unictype/bidicategory-test.
86515         (Description): Update.
86516         * modules/unictype/bidiclass-test-tests: Renamed from
86517         modules/unictype/bidicategory-test-tests.
86518         * modules/unictype/bidicategory-all: New file, a simple redirection.
86519         * modules/unictype/bidicategory-name: Likewise.
86520         * modules/unictype/bidicategory-byname: Likewise.
86521         * modules/unictype/bidicategory-of: Likewise.
86522         * modules/unictype/bidicategory-test: Likewise.
86523         * modules/unictype/property-bidi-* (Dependencies): Update.
86524         * lib/unictype/bidi_*.c: Update comment.
86526 2011-03-26  Bruno Haible  <bruno@clisp.org>
86528         unictype/bidi*: Rename functions, part 2.
86529         * modules/unictype/bidicategory-name (configure.ac): Update required
86530         libunistring version.
86531         * modules/unictype/bidicategory-byname (configure.ac): Likewise.
86533 2011-03-25  Bruno Haible  <bruno@clisp.org>
86535         New module 'unictype/combining-class-all'.
86536         * modules/unictype/combining-class-all: New file.
86538         Tests for module 'unictype/combining-class-byname'.
86539         * modules/unictype/combining-class-byname-tests: New file.
86540         * tests/unictype/test-combiningclass_byname.c: New file.
86542         New module 'unictype/combining-class-byname'.
86543         * lib/unictype.in.h (uc_combining_class_byname): New declaration.
86544         * lib/unictype/combiningclass_byname.c: New file.
86545         * lib/unictype/combiningclass_byname.gperf: New file.
86546         * modules/unictype/combining-class-byname: New file.
86548         Tests for module 'unictype/combining-class-longname'.
86549         * modules/unictype/combining-class-longname-tests: New file.
86550         * tests/unictype/test-combiningclass_longname.c: New file.
86552         New module 'unictype/combining-class-longname'.
86553         * lib/unictype.in.h (uc_combining_class_long_name): New declaration.
86554         * lib/unictype/combiningclass_longname.c: New file.
86555         * modules/unictype/combining-class-longname: New file.
86557         Tests for module 'unictype/combining-class-name'.
86558         * modules/unictype/combining-class-name-tests: New file.
86559         * tests/unictype/test-combiningclass_name.c: New file.
86561         New module 'unictype/combining-class-name'.
86562         * lib/unictype.in.h (uc_combining_class_name): New declaration.
86563         * lib/unictype/combiningclass_name.c: New file.
86564         * modules/unictype/combining-class-name: New file.
86566 2011-03-25  Bruno Haible  <bruno@clisp.org>
86568         unictype/combining-class: Rename source files.
86569         * lib/gen-uni-tables.c (main): Emit unictype/combiningclass.h instead
86570         of unictype/combining.h.
86571         * lib/unictype/combiningclass.c: Renamed from lib/unictype/combining.c.
86572         Update.
86573         * lib/unictype/combiningclass.h: Renamed from lib/unictype/combining.h.
86574         * modules/unictype/combining-class (Description): Fix.
86575         (Files, Makefile.am): Update.
86576         * tests/unictype/test-combiningclass.c: Renamed from
86577         tests/unictype/test-combining.c.
86578         * modules/unictype/combining-class-tests (Files, Makefile.am): Update.
86580 2011-03-25  Bruno Haible  <bruno@clisp.org>
86582         unictype: Update list of canonical combining classes.
86583         * lib/unictype.in.h (UC_CCC_ATA): New enumeration value.
86585 2011-03-25  Bruno Haible  <bruno@clisp.org>
86587         unictype/category-byname: Recognize long names as well.
86588         * lib/unictype.in.h (uc_general_category_byname): Allow argument to be
86589         a long name.
86590         * lib/unictype/categ_byname.c: Include <stdlib.h>, <string.h>,
86591         unictype/categ_byname.h.
86592         (UC_CATEGORY_INDEX_*): New enumeration values.
86593         (uc_general_category_byname): Use uc_general_category_lookup and
86594         convert from index to value.
86595         * lib/unictype/categ_byname.gperf: New file.
86596         * modules/unictype/category-byname (Files): Add
86597         lib/unictype/categ_byname.gperf.
86598         (Depends-on): Add gperf.
86599         (Makefile.am): Add rule for generating unictype/categ_byname.h.
86600         * tests/unictype/test-categ_byname.c (main): Test the recognition of
86601         long names.
86603         Tests for module 'unictype/category-longname'.
86604         * modules/unictype/category-longname-tests: New file.
86605         * tests/unictype/test-categ_longname.c: New file.
86607         New module 'unictype/category-longname'.
86608         * lib/unictype.in.h (uc_general_category_long_name): New declaration.
86609         * lib/unictype/categ_longname.c: New file.
86610         * modules/unictype/category-longname: New file.
86611         * modules/unictype/category-all (Depends-on): Add it.
86613 2011-03-25  Bruno Haible  <bruno@clisp.org>
86615         Tests for module 'unictype/category-LC'.
86616         * modules/unictype/category-LC-tests: New file.
86617         * tests/unictype/test-categ_LC.c: New file, automatically generated.
86619         New module 'unictype/category-LC'.
86620         * lib/unictype.in.h (UC_CATEGORY_MASK_LC): New enumeration value.
86621         (UC_CATEGORY_LC): New declaration.
86622         (UC_CASED_LETTER): New macro.
86623         * lib/gen-uni-tables.c (is_category_LC): New function.
86624         (output_categories): Also handle category LC.
86625         (UC_CATEGORY_MASK_LC): New enumeration value.
86626         (general_category_byname): Also handle category LC.
86627         * lib/unictype/categ_LC.c: New file.
86628         * lib/unictype/categ_LC.h: New file, automatically generated.
86629         * lib/unictype/categ_name.c (uc_general_category_name): Also handle
86630         category LC.
86631         * lib/unictype/categ_byname.c (uc_general_category_byname): Likewise.
86632         * modules/unictype/category-LC: New file.
86633         * modules/unictype/category-byname (Depends-on): Add
86634         unictype/category-LC.
86635         * modules/unictype/category-all (Depends-on): Likewise.
86637 2011-03-25  Eric Blake  <eblake@redhat.com>
86639         xmalloc: revert yesterday's regression
86640         * lib/xmalloc.c (xrealloc): Once again forward xrealloc(NULL,0) to
86641         realloc's underlying behavior (allowing allocation of zero-size
86642         objects, especially if malloc-gnu is also in use).
86644 2011-03-25  Reuben Thomas  <rrt@sc3d.org>
86646         maint.mk: add missing version to VC-tag
86647         * top/maint.mk: git tag was missing actual tag name; add it.
86649         valgrind: do leak checking, and exit with code 1 on error (not 0)
86650         * m4/valgrind-tests.m4: Add `--error-exitcode=1 --leak-check=full'
86651         to VALGRIND.
86653 2010-11-30  Reuben Thomas  <rrt@sc3d.org>
86655         posix-modules: say what it does.
86656         * posix-modules: Add a line to the --help output saying what it does.
86658 2011-03-24  Paul Eggert  <eggert@cs.ucla.edu>
86660         xmalloc: Do not leak if underlying realloc is C99 compatible.
86661         * lib/xmalloc.c (xrealloc): If N is zero, call 'free' directly.
86662         This avoids a leak on C99-based systems.  See
86663         <http://lists.gnu.org/r/bug-gnulib/2011-03/msg00243.html>.
86665 2011-03-24  Eric Blake  <eblake@redhat.com>
86667         realloc: document portability problem
86668         * doc/posix-functions/realloc.texi (realloc): Mention pitfalls of
86669         passing 0 size to realloc.
86671 2011-03-23  Ben Walton  <bwalton@artsci.utoronto.ca>
86673         doc: update users.txt
86674         * users.txt: Add cvsps, tmpwatch
86676 2011-03-23  Matt Rice  <ratmice@gmail.com>
86678         doc: update users.txt
86679         * users.txt: Add gdb.
86681 2011-03-23  Jim Meyering  <meyering@redhat.com>
86683         doc: update users.txt
86684         Looking through matches up to the following URL (there are still
86685         several more pages), I found several projects that use gnulib:
86686         http://codesearch.google.com/codesearch?start=50&q=gnulib-cache\.m4
86687         * users.txt: Add nagios plugins (nagiosplug), acct, gengetopt,
86688         gmediaserver, gtkreindeer, jugtail, libunistring, mini-httpd, reindeer.
86690 2011-03-22  Bruno Haible  <bruno@clisp.org>
86692         unictype/bidi*: Rename functions.
86693         * lib/unictype.in.h (uc_bidi_class_name, uc_bidi_class_byname,
86694         uc_bidi_class, uc_is_bidi_class): New declarations.
86695         * lib/unictype/bidi_byname.c (uc_bidi_class_byname): Renamed from
86696         uc_bidi_category_byname.
86697         (uc_bidi_category_byname): New function.
86698         * lib/unictype/bidi_name.c (u_bidi_class_name): Renamed from
86699         u_bidi_category_name.
86700         (uc_bidi_class_name): Renamed from uc_bidi_category_name.
86701         (uc_bidi_category_name): New function.
86702         * lib/unictype/bidi_of.c (uc_bidi_class): Renamed from
86703         uc_bidi_category.
86704         (uc_bidi_category): New function.
86705         * lib/unictype/bidi_test.c (uc_is_bidi_class): Renamed from
86706         uc_is_bidi_category. Invoke uc_bidi_class.
86707         (uc_is_bidi_category): New function.
86708         * tests/unictype/test-bidi_byname.c (main): Test uc_bidi_class_byname
86709         instead of uc_bidi_category_byname.
86710         * tests/unictype/test-bidi_name.c (main): Test uc_bidi_class_name
86711         instead of uc_bidi_category_name.
86712         * tests/unictype/test-bidi_of.c (main): Test uc_bidi_class instead of
86713         uc_bidi_category.
86714         * tests/unictype/test-bidi_test.c (main): Test uc_is_bidi_class
86715         instead of uc_is_bidi_category.
86717 2011-03-21  Bruno Haible  <bruno@clisp.org>
86719         New module 'unictype/joininggroup-all'.
86720         * modules/unictype/joininggroup-all: New file.
86722         Tests for module 'unictype/joininggroup-of'.
86723         * modules/unictype/joininggroup-of-tests: New file.
86724         * tests/unictype/test-joininggroup_of.c: New file.
86725         * tests/unictype/test-joininggroup_of.h: New file, automatically
86726         generated by gen-uni-tables.
86728         New module 'unictype/joininggroup-of'.
86729         * modules/unictype/joininggroup-of: New file.
86730         * lib/unictype/joininggroup_of.c: New file.
86731         * lib/unictype/joininggroup_of.h: New file, automatically generated by
86732         gen-uni-tables.
86734         Tests for module 'unictype/joininggroup-byname'.
86735         * modules/unictype/joininggroup-byname-tests: New file.
86736         * tests/unictype/test-joininggroup_byname.c: New file.
86738         New module 'unictype/joininggroup-byname'.
86739         * modules/unictype/joininggroup-byname: New file.
86740         * lib/unictype/joininggroup_byname.c: New file.
86741         * lib/unictype/joininggroup_byname.gperf: New file.
86743         Tests for module 'unictype/joininggroup-name'.
86744         * modules/unictype/joininggroup-name-tests: New file.
86745         * tests/unictype/test-joininggroup_name.c: New file.
86747         New module 'unictype/joininggroup-name'.
86748         * modules/unictype/joininggroup-name: New file.
86749         * lib/unictype/joininggroup_name.c: New file.
86750         * lib/unictype/joininggroup_name.h: New file.
86752         New module 'unictype/joiningtype-all'.
86753         * modules/unictype/joiningtype-all: New file.
86755         Tests for module 'unictype/joiningtype-of'.
86756         * modules/unictype/joiningtype-of-tests: New file.
86757         * tests/unictype/test-joiningtype_of.c: New file.
86758         * tests/unictype/test-joiningtype_of.h: New file, automatically
86759         generated by gen-uni-tables.
86761         New module 'unictype/joiningtype-of'.
86762         * modules/unictype/joiningtype-of: New file.
86763         * lib/unictype/joiningtype_of.c: New file.
86764         * lib/unictype/joiningtype_of.h: New file, automatically generated by
86765         gen-uni-tables.
86767         Tests for module 'unictype/joiningtype-byname'.
86768         * modules/unictype/joiningtype-byname-tests: New file.
86769         * tests/unictype/test-joiningtype_byname.c: New file.
86771         New module 'unictype/joiningtype-byname'.
86772         * modules/unictype/joiningtype-byname: New file.
86773         * lib/unictype/joiningtype_byname.c: New file.
86775         Tests for module 'unictype/joiningtype-name'.
86776         * modules/unictype/joiningtype-name-tests: New file.
86777         * tests/unictype/test-joiningtype_name.c: New file.
86779         New module 'unictype/joiningtype-name'.
86780         * modules/unictype/joiningtype-name: New file.
86781         * lib/unictype/joiningtype_name.c: New file.
86783         unictype: Add support for Arabic shaping properties.
86784         * lib/unictype.in.h (UC_JOINING_TYPE_*): New enumeration values.
86785         (uc_joining_type_name, uc_joining_type_byname, uc_joining_type): New
86786         declarations.
86787         (UC_JOINING_GROUP_*): New enumeration values.
86788         (uc_joining_group_name, uc_joining_group_byname, uc_joining_group): New
86789         declarations.
86790         * lib/gen-uni-tables.c (UC_JOINING_TYPE_*): New enumeration values.
86791         (unicode_joining_type): New variable.
86792         (UC_JOINING_GROUP_*): New enumeration values.
86793         (unicode_joining_group): New variable.
86794         (fill_arabicshaping, joining_type_as_c_identifier,
86795         output_joining_type_test, output_joining_type,
86796         joining_group_as_c_identifier, output_joining_group_test,
86797         output_joining_group): New functions.
86798         (main); Add an argument denoting the ArabicShaping.txt file. Invoke
86799         fill_arabicshaping and output_joining_type_test, output_joining_type,
86800         output_joining_group_test, output_joining_group.
86801         Reported by Simon Josefsson.
86803 2011-03-21  Jim Meyering  <meyering@redhat.com>
86805         strftime: fix a bug in yesterday's change
86806         * lib/strftime.c (add): Accommodate width's initial value of -1.
86807         Otherwise, nstrftime would copy uninitialized data into
86808         the result buffer.
86810 2011-03-21  Jim Meyering  <meyering@redhat.com>
86812         tests: add strftime-tests module
86813         * tests/test-strftime.c: New file.
86814         * modules/strftime-tests: New module.
86816 2011-03-20  Paul Eggert  <eggert@cs.ucla.edu>
86818         strftime: don't assume a byte count fits in 'int'
86819         * lib/strftime.c (add): Don't assume first arg fits in 'int'.  I
86820         found this problem by static analysis, using gcc -Wstrict-overflow
86821         (GCC 4.5.2, x86-64).  This reported an optimization that depended
86822         on an integer overflow having undefined behavior, but it turns out
86823         that the argument is a size, which might not fit in 'int' anyway,
86825 2011-03-20  Paul Eggert  <eggert@cs.ucla.edu>
86827         stdio: don't require ignore_value around fwrite
86829         This patch works around libc bug 11959
86830         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=11959>.
86831         Without this patch, applications must often write
86832         ignore_value (fwrite (...)) even though the ignore_value is
86833         not helpful here.  It's common to write many objects, using
86834         fwrite/printf/etc., and then use ferror to detect output error.
86836         I considered making this patch optional, but decided against it,
86837         because libc is obviously being inconsistent here: there is no
86838         reason libc should insist that user code must inspect fwrite
86839         return's value without also insisting that it inspect printf's,
86840         putchar's, etc.  If user code wants to have a strict style where
86841         all these functions' values are checked (so that ferror need not
86842         be checked), we could add support for that style in a new gnulib
86843         module, but in the meantime it's better to be consistent and to
86844         support common usage.
86846         * lib/stdio.in.h (rpl_fwrite): Define this wrapper around fwrite,
86847         to work around libc bug 11959, if __USE_FORTIFY_LEVEL indicates
86848         that we are compiling in checking mode, and if not C++, and
86849         if not already wrapping fwrite for some other reason.
86850         (fwrite): #define to rpl_fwrite if the latter is defined.
86852 2011-03-20  Bruno Haible  <bruno@clisp.org>
86854         verror: Fix compilation error introduced on 2011-02-13.
86855         * lib/verror.h (verror, verror_at_line): Use _GL_ATTRIBUTE_FORMAT macro
86856         instead of __attribute__.
86857         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
86859 2011-03-20  Paul Eggert  <eggert@cs.ucla.edu>
86860             Bruno Haible  <bruno@clisp.org>
86862         socklen: do not depend on sys_socket
86863         While trying to modify Emacs to use gnulib's socklen module,
86864         I discovered a circular dependency: socklen depends on sys_socket
86865         and vice versa.  Emacs can use socklen, but it does not need
86866         sys_socket because it has its own substitute for sys/socket.h.
86867         * m4/socklen.m4 (gl_SOCKET_HEADERS): New macro, extracted from
86868         gl_TYPE_SOCKLEN_T.
86869         (gl_CHECK_SOCKET_HEADERS): New macro, taken from parts of
86870         gl_PREREQ_SYS_H_SOCKET.
86871         (gl_TYPE_SOCKLEN_T): Require it instead of requiring
86872         gl_PREREQ_SYS_H_SOCKET.
86873         * m4/sys_socket_h.m4 (gl_PREREQ_SYS_H_SOCKET): Require
86874         gl_CHECK_SOCKET_HEADERS instead of doing its work ourselves.
86875         * modules/socklen (Depends-on): Do not depend on sys_socket.
86876         (Include): Adjust to match the code used in gl_SOCKET_HEADERS.
86878 2011-03-20  Jim Meyering  <meyering@redhat.com>
86880         maint.mk: sort file names *after* new transformation
86881         * top/maint.mk (sc_po_check): Sorting before removing the $(srcdir)/
86882         prefix would have led to an unwarranted failure in GNU parted.
86883         Sort after that transformation.
86885 2011-03-19  Jim Meyering  <meyering@redhat.com>
86887         maint.mk: fix po-file syntax-check rule
86888         * top/maint.mk (sc_po_check): Fix fatal typo in yesterday's change.
86889         Patch by Bruno Haible.
86891 2011-03-19  Bruno Haible  <bruno@clisp.org>
86893         socklen: Update comment.
86894         * m4/socklen.m4: Update comment about platforms.
86896 2011-03-19  Paul Eggert  <eggert@cs.ucla.edu>
86897             Bruno Haible  <bruno@clisp.org>
86899         inet_ntop, inet_pton: Simplify.
86900         * modules/inet_ntop (Depends-on): Remove socklen, since sys_socket is
86901         documented to provide socklen_t and we already depend on sys_socket.
86902         * modules/inet_pton (Depends-on): Likewise.
86903         * lib/arpa_inet.in.h: Adjust comment.
86905 2011-03-19  Paul Eggert  <eggert@cs.ucla.edu>
86906             Bruno Haible  <bruno@clisp.org>
86908         netdb: Simplify.
86909         * modules/netdb (Depends-on): Remove socklen, since sys_socket is
86910         documented to provide socklen_t and we already depend on sys_socket.
86911         * lib/netdb.in.h: Adjust comment.
86913 2011-03-19  Bruno Haible  <bruno@clisp.org>
86915         sys_socket, netdb: Document problem with socklen_t.
86916         * doc/posix-headers/sys_socket.texi: Mention lack of socklen_t on some
86917         platforms.
86918         * doc/posix-headers/netdb.texi: Likewise.
86920 2011-03-18  Eric Blake  <eblake@redhat.com>
86922         maint.mk: let po check work in VPATH build
86923         * top/maint.mk (po_file): Allow cfg.mk override.
86924         (sc_po_check): Allow VPATH use.
86925         Reported by Jiri Denemark.
86927 2011-03-16  Jim Meyering  <meyering@redhat.com>
86929         maint.mk: allow fine-grained syntax-check exclusion via Make variables
86930         Before, you would have had to create one .x-sc_ file per rule in order
86931         to exempt offending files.  Now, you may instead use a Make variable --
86932         usually defined in cfg.mk -- whose name identifies the affected rule.
86933         * top/maint.mk (_sc_excl): Define.
86934         (VC_LIST_EXCEPT): Use it to exclude names on a per-rule basis.
86935         (_sc_search_regexp): When not using VC_LIST_EXCEPT, exclude here, too.
86937 2011-03-13  Bruno Haible  <bruno@clisp.org>
86939         ignore-value tests: Avoid warnings.
86940         * tests/test-ignore-value.c (_GL_ATTRIBUTE_RETURN_CHECK): Define to
86941         empty for gcc < 3.4.
86943 2011-03-13  Bruno Haible  <bruno@clisp.org>
86945         passfd: Fix link error on Solaris.
86946         * modules/passfd (Description): Correct.
86947         (Depends-on): Add socketlib.
86948         (Link): New section.
86949         * modules/passfd-tests (Makefile.am): Link test-passfd with LIBSOCKET.
86951 2011-03-13  Bruno Haible  <bruno@clisp.org>
86953         passfd: Fix link error on AIX 5.2.
86954         * m4/afunix.m4 (gl_SOCKET_AFUNIX): Define _LINUX_SOURCE_COMPAT.
86956 2011-03-13  Bruno Haible  <bruno@clisp.org>
86958         passfd: Work around bug with CMSG_FIRSTHDR on FreeBSD 6.4.
86959         * lib/sys_socket.in.h: Include <stddef.h>.
86960         * m4/afunix.m4 (gl_SOCKET_AFUNIX): Include <stddef.h> before using
86961         CMSG_FIRSTHDR. Remove unused variable.
86963 2011-03-13  Bruno Haible  <bruno@clisp.org>
86965         passfd: Fix compilation error on OpenBSD.
86966         * lib/passfd.c: Include <sys/uio.h>.
86968 2011-03-13  Bruno Haible  <bruno@clisp.org>
86970         passfd test: Fix warnings.
86971         * tests/test-passfd.c: Include <sys/wait.h>.
86972         (main): Fix typo.
86974 2011-03-13  Bruno Haible  <bruno@clisp.org>
86976         passfd module, part 4, tweaks.
86977         * tests/test-passfd.c: Reorder includes.
86978         (main): Fix perror and printf calls.
86980 2011-03-07  Bastien Roucariès  <roucaries.bastien@gmail.com>
86982         passfd module, part 4.
86983         * modules/passfd-tests: New file.
86984         * tests/test-passfd.c: New file.
86986 2011-03-13  Jim Meyering  <meyering@redhat.com>
86988         Makefile: rely on GNU make; derive syntax-check rule names
86989         Rather than requiring that each sc_ rule be listed as a dependent
86990         of "check", use features of GNU make to derive the list.
86991         * Makefile (syntax-check-rules): Define.
86992         (check): Depend on the new variable, not the hard-coded list.
86994 2011-03-13  Bastien Roucariès  <roucaries.bastien@gmail.com>
86995             Bruno Haible  <bruno@clisp.org>
86997         passfd module, part 3.
86998         * lib/passfd.h (recvfd): Add a flags argument.
86999         * lib/passfd.c: Include <fcntl.h>, cloexec.h.
87000         (recvfd): Add a flags argument.
87001         * m4/afunix.m4 (gl_SOCKET_AFUNIX): Test whether MSG_CMSG_CLOEXEC
87002         exists.
87003         * modules/passfd (Depends-on): Add cloexec.
87004         Suggested by Eric Blake.
87006 2011-03-13  Bruno Haible  <bruno@clisp.org>
87008         passfd module, part 2, tweaks.
87009         * modules/passfd (Files): Reorder.
87010         (Depends-on): Remove errno.
87011         (Include): Remove <sys/socket.h>, <sys/un.h>.
87012         * lib/passfd.h: Use a GPLv3+ header. Make C++ safe.
87013         * lib/passfd.c: Untabify. Use a GPLv3+ header. Really include the
87014         specification header. Include <sys/socket.h> always. Don't include
87015         <winsock2.h>. Use "#if HAVE_..." instead of "#ifdef HAVE_...".
87016         (sendfd): Clarify that it sets errno when it fails.
87017         (recvfd): Fix specification.
87019 2011-03-07  Bastien Roucariès  <roucaries.bastien@gmail.com>
87021         passfd module, part 2.
87022         * modules/passfd: New file.
87023         * lib/passfd.h: New file.
87024         * lib/passfd.c: New file.
87026 2011-03-12  Bruno Haible  <bruno@clisp.org>
87028         wcswidth, mbswidth: Avoid integer overflow.
87029         * lib/wcswidth.c: Include <limits.h>.
87030         * lib/wcswidth-impl.h (wcswidth): Avoid 'int' overflow.
87031         * lib/mbswidth.c: Include <limits.h>.
87032         (mbsnwidth): Avoid 'int' overflow.
87033         Reported by Jim Meyering.
87035 2011-03-12  Bruno Haible  <bruno@clisp.org>
87037         futimens, utimensat: Avoid endless recursion on Solaris 10.
87038         * lib/sys_stat.in.h (futimens, utimensat): Define with rpl_ prefix on
87039         Solaris.
87040         Reported by Ben Walton <bwalton@artsci.utoronto.ca> via Eric Blake
87041         in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8230>.
87043 2011-03-11  Jim Meyering  <meyering@redhat.com>
87045         maint.mk: relax a regexp to accommodate other formatting styles
87046         * top/maint.mk (sc_unmarked_diagnostics): Allow 0 or 1 space
87047         between "ngettext" and the following "(".
87049 2011-03-11  Pádraig Brady  <P@draigBrady.com>
87051         maint.mk: suppress a false positive warning
87052         * top/maint.mk ((sc_unmarked_diagnostics): Don't warn when
87053         diagnostics are marked with ngettext.
87055 2011-03-10  Eric Blake  <eblake@redhat.com>
87057         wchar: add explicit dependencies, for Tru64
87058         * modules/mbmemcasecoll (Depends-on): Add wchar.
87059         * modules/mbtowc (Depends-on): Likewise.
87060         * modules/vasnprintf (Depends-on): Likewise.
87061         * modules/unistdio/u-printf-args (Depends-on): Likewise.
87062         * modules/wctomb (Depends-on): Likewise.
87063         Reported by Peter O'Gorman.
87065 2011-03-08  Bruno Haible  <bruno@clisp.org>
87067         passfd module, part 1, tweaks.
87068         * m4/afunix.m4 (gl_SOCKET_AFUNIX): Update AC_REQUIRE invocation.
87069         Improve indentation. Improve AC_MSG_CHECKING messages.
87070         * m4/sockpfaf.m4 (gl_SOCKET_FAMILY_UNIX): New macro, extracted from
87071         gl_SOCKET_FAMILIES.
87073 2011-03-07  Bastien Roucariès  <roucaries.bastien@gmail.com>
87075         passfd module, part 1.
87076         * m4/afunix.m4: New file.
87077         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Also test for UNIX domain
87078         sockets.
87080 2011-03-08  Bruno Haible  <bruno@clisp.org>
87082         regex-quote: New API.
87083         * lib/regex-quote.h: Include <stdbool.h>.
87084         (struct regex_quote_spec): New type.
87085         (regex_quote_spec_posix, regex_quote_spec_gnu, regex_quote_spec_pcre):
87086         New declarations.
87087         (regex_quote_length, regex_quote_copy, regex_quote): Take a
87088         'const struct regex_quote_spec *' argument.
87089         * lib/regex-quote.c (RE_*, PCRE_*): New macros.
87090         (pcre_special): New constant.
87091         (regex_quote_spec_posix, regex_quote_spec_gnu, regex_quote_spec_pcre):
87092         New functions.
87093         (regex_quote_length, regex_quote_copy, regex_quote): Take a
87094         'const struct regex_quote_spec *' argument.
87095         * modules/regex-quote (Depends-on): Add stdbool.
87096         * tests/test-regex-quote.c (check): Update for new API. Add test for
87097         anchored results.
87098         * NEWS: Mention the API change.
87099         Reported by Reuben Thomas and Eric Blake.
87101 2011-03-06  Bruno Haible  <bruno@clisp.org>
87103         regex-quote: Fix creation of POSIX extended regular expressions.
87104         * lib/regex-quote.c (ere_special): Add grouping and alternation
87105         operators.
87107 2011-03-05  Bruno Haible  <bruno@clisp.org>
87109         doc: Improve doc regarding autopoint vs. gnulib.
87110         * doc/gnulib-tool.texi (gettextize and autopoint): Recommend to
87111         disable autopoint while running autoreconf.
87112         Suggested by Ralf Wildenhues.
87114 2011-03-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
87116         Update AC_OPENMP macro for Lahey compiler on GNU/Linux.
87117         * m4/openmp.m4 (AC_OPENMP): Sync from Autoconf.
87119 2011-03-03  Bruce Korb  <bkorb@gnu.org>
87121         parse-duration: remove xalloc.h dependency
87122         * lib/parse-duration.c (parse_period): handle NULL return from
87123         strdup instead of calling xstrdup().
87124         * modules/parse-duration: remove "xalloc" dependency
87126 2011-03-03  Matthew Booth  <mbooth@redhat.com>
87128         bootstrap: honor m4_base when running aclocal
87129         * build-aux/bootstrap: Fix hard-coded use of m4 directory name.
87131 2011-03-02  Jim Meyering  <meyering@redhat.com>
87133         getopt-gnu: relax license from LGPLv3+ to LGPLv2+
87134         * modules/getopt-gnu (License): Relax to LGPLv2+, for augeas,
87135         on request from Matt Booth.
87137 2011-03-01  Eric Blake  <eblake@redhat.com>
87139         test-link: work on Hurd
87140         * tests/test-link.h (test_link): Hurd rejects linking directories
87141         with EISDIR instead of the POSIX-mandated EPERM.
87143 2011-02-28  Paul Eggert  <eggert@cs.ucla.edu>
87145         stdio: simplify by moving files to printf-posix, sigpipe
87146         * m4/stdio_h.m4 (gl_STDIO_H): Do not require gl_ASM_SYMBOL_PREFIX,
87147         since this symbol is needed only if printf is replaced.
87148         * m4/printf-posix-rpl.m4 (gl_REPLACE_PRINTF):
87149         Require gl_ASM_SYMBOL_PREFIX.
87150         * modules/printf-posix (Files): Add m4/asm-underscore.m4.
87151         * modules/sigpipe (Files): Likewise.  Also, add m4/stdio-write.c.
87152         (Depends-on): Add 'raise'.
87153         (configure.ac): Require gl_ASM_SYMBOL_PREFIX.
87154         * modules/stdio (Files): Remove lib/stdio-write.c,
87155         m4/asm-underscore.m4.
87156         (Depends-on): Remove 'raise'.
87158         stdio: simplify by moving gl_STDIN_LARGE_OFFSET to fseeko, ftello
87159         * m4/fseeko.m4 (gl_STDIN_LARGE_OFFSET): Moved here, from ...
87160         * m4/stdio_h.m4 (gl_STDIN_LARGE_OFFSET): ... here, because
87161         * modules/ftello (Files): Add m4/fseeko.m4, for gl_STDIN_LARGE_OFFSET.
87163 2011-02-28  Bruno Haible  <bruno@clisp.org>
87165         localcharset: Assume ANSI C behaviour of free().
87166         * lib/localcharset.c (get_charset_aliases): Remove NULL test before
87167         calling free().
87168         Suggested by Simon Josefsson <simon@josefsson.org>.
87170 2011-02-28  Corinna Vinschen  <vinschen@redhat.com>  (tiny change)
87171             Charles Wilson  <cygwin@cwilson.fastmail.fm>  (tiny change)
87172             Bruno Haible  <bruno@clisp.org>  (tiny change)
87174         On Cygwin, use /proc file system instead of win32 API.
87175         * lib/relocatable.c: On Cygwin, use file names from /proc, rather than
87176         Win32 file names.
87177         (DllMain): Simplify by removing Cygwin specific code.
87178         (find_shared_library_fullname): Use Linux specific implementation also
87179         for Cygwin.
87180         (get_shared_library_fullname): Update accordingly.
87181         * lib/progreloc.c: On Cygwin, use file names from /proc, rather than
87182         Win32 file names.
87183         (find_executable): On Cygwin, use /proc, like on Linux. Remove previous
87184         Cygwin specific code.
87186 2011-02-28  Christian Rössel  <christian.roessel@gmx.de>  (tiny change)
87187             Markus Geimer  <m.geimer@fz-juelich.de>  (tiny change)
87189         Fix OpenMP flag detection for various Fortran compilers.
87190         * m4/openmp.m4 (_AC_LANG_OPENMP(Fortran 77)): Use '!$'
87191         OpenMP-conditional compilation construct, to force compile
87192         failure with missing OpenMP flag.
87193         (AC_OPENMP): Add flags for Cray CCE and NEC SX compilers.
87195 2011-02-25  Eric Blake  <eblake@redhat.com>
87197         strstr: expand test coverage
87198         * tests/test-strstr.c (main): Add much shorter trigger.  Fix C89
87199         compilation.
87200         * tests/test-memmem.c (main): Duplicate tests.
87201         * tests/test-strcasestr.c (main): Likewise.
87202         * tests/test-c-strcasestr.c (main): Likewise.
87204 2011-02-25  Jim Meyering  <meyering@redhat.com>
87206         maint.mk: detect missing-NL-at-EOF, too
87207         * top/maint.mk (sc_prohibit_empty_lines_at_EOF): Adjust so that
87208         it also detects when a file lacks a newline at EOF.
87209         (require_exactly_one_NL_at_EOF_): Renamed from
87210         detect_empty_lines_at_EOF_.  I opted not to rename the rule,
87211         since people may well have .x-sc_... file names tied to the
87212         existing name.  Suggested by Eric Blake.
87214 2011-02-25  Paul Eggert  <eggert@cs.ucla.edu>
87216         dirname: move m4/dos.m4 functionality into lib/dosname.h
87218         m4/dos.m4 needs to go.  It laboriously invokes the C compiler, and
87219         extracts symbols from it, puts them into config.h; but it's much
87220         easier to use the symbols directly.  filename.h already does this,
87221         but it disagrees with dos.m4 in some respects.  This patch
87222         introduces a different include file dosname.h that packages up
87223         dos.m4, and then later we can work on merging filename.h and
87224         dosname.h.  Applications that need only the easy-to-configure
87225         symbols should consider including dosname.h rather than dirname.h.
87226         * NEWS: Mention incompatible changes.
87227         * m4/dos.m4: Remove.
87228         * lib/dosname.h, modules/dosname: New files.
87229         * lib/dirname.h (ISSLASH, FILE_SYSTEM_PREFIX_LEN):
87230         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE):
87231         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): Move to lib/dosname.h.
87232         * lib/at-func.c, lib/at-func2.c, lib/openat.c, lib/savewd.c:
87233         Include dosname.h, not dirname.h.
87234         * lib/rmdir.c, lib/stat.c, lib/unlink.c, lib/unlinkat.c:
87235         Include dosname.h, for definitions of symbols like ISSLASH
87236         that used to be in config.h.
87237         * m4/dirname.m4 (gl_DIRNAME_LGPL): Do not require gl_AC_DOS.
87238         * m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise.
87239         * m4/stat.m4 (gl_FUNC_STAT): Likewise.
87240         * m4/unlink.m4 (gl_FUNC_UNLINK): Likewise.
87241         * modules/dirname-lgpl (Files): Omit m4/dos.m4.
87242         * modules/rmdir (Files): Likewise.
87243         * modules/stat (Files): Likewise.
87244         * modules/unlink (Files): Likewise.
87245         * modules/dirname-lgpl (Depends-on): Add dosname.
87246         * modules/lstat (Depends-on): Likewise.
87247         * modules/openat (Depends-on): Likewise.
87248         * modules/rmdir (Depends-on): Likewise.
87249         * modules/savewd (Depends-on): Likewise.
87250         * modules/stat (Depends-on): Likewise.
87251         * modules/unlink (Depends-on): Likewise.
87252         * modules/openat (Depends-on): Remove dirname-lgpl.
87253         * modules/savewd (Depends-on): Likewise.
87254         * tests/test-dirname.c: Do not use removed symbols like
87255         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.  Instead, use
87256         the remaining symbols, e.g., ISSLASH ('\\').
87258 2011-02-25  Eric Blake  <eblake@redhat.com>
87260         strstr: revert patches that introduced bug and pessimization
87261         * lib/str-two-way.h: Add another reference.
87262         (two_way_short_needle, two_way_long_needle): Revert changes from
87263         2011-02-24; they pessimize search speed.
87264         (critical_factorization): Partially revert changes from
87265         2010-06-22; they violate the requirement that the left half of the
87266         needle be smaller than the period of the needle.
87268 2011-02-24  Paul Eggert  <eggert@cs.ucla.edu>
87270         filenamecat: remove unnecessary dependency on dirname-lgpl
87271         * modules/filenamecat (Depends-on): Remove dirname-lgpl, as there
87272         is no direct dependency, just an indirect one via filenamecat-lgpl.
87274         remove: remove unnecessary use of m4/dos.m4
87275         * m4/remove.m4 (gl_FUNC_REMOVE): Don't require gl_AC_DOS; not needed.
87276         * modules/remove (FILES): Remove m4/dos.m4.
87278         * lib/openat-proc.c: Don't include dirname.h; not needed.
87280         backupfile: remove unnecessary use of m4/dos.m4
87281         * m4/backupfile.m4 (gl_BACKUPFILE): Don't require gl_AC_DOS; none
87282         of its symbols are used by the backupfile code.  backupfile.c does
87283         use a symbol HAVE_DOS_FILE_NAMES, but that symbol is meant only
87284         for the rare case of programs that want all their backup file
87285         names to live within 8+3 limits, and dos.m4 doesn't address that.
87286         * modules/backupfile (Files): Remove m4/dos.m4.
87288 2011-02-24  Jim Meyering  <meyering@redhat.com>
87290         strstr: fix a bug whereby strstr would mistakenly return NULL
87291         * lib/str-two-way.h (two_way_short_needle): Correct off-by-one error
87292         in period calculation.
87293         (two_way_long_needle): Likewise.
87294         The original problem was reported by Mike Stump in
87295         http://thread.gmane.org/gmane.comp.sysutils.autoconf.bugs/7834
87296         Ralf Wildenhues provided the short needle and haystack.
87297         * tests/test-strstr.c: Add Ralf's test case to trigger the bug.
87298         Add a more involved test to trigger the bug in two_way_long_needle.
87300 2011-02-24  Stefano Lattarini  <stefano.lattarini@gmail.com>  (tiny change)
87302         gnulib-tool: remove use of bold display in help screen
87303         * gnulib-tool (func_usage): Do not use bold display anymore in the
87304         help screen.  That was just meant to be a temporary emphasis for a
87305         backward-incompatible change.
87307 2011-02-23  Bruno Haible  <bruno@clisp.org>
87309         Fix misindentation of preprocessor directives.
87310         * lib/argp-namefrob.h: Reindent preprocessor directives.
87311         * lib/getopt_int.h (struct _getopt_data): Likewise.
87312         * lib/progreloc.c (maybe_executable, find_executable): Likewise.
87313         * lib/vasnprintf.c (decode_long_double): Likewise.
87314         * tests/test-argmatch.c: Insert blank lines, for clarity.
87315         * tests/test-exclude.c: Likewise.
87317 2011-02-22  Bruno Haible  <bruno@clisp.org>
87319         ioctl: Fix for MacOS X in 64-bit mode.
87320         * lib/ioctl.c (rpl_ioctl): Zero-extend, not sign-extend, the request
87321         value.
87322         Suggested by Eric Blake.
87323         Reported by Markus Gothe <nietzsche@lysator.liu.se>.
87325 2011-02-22  Jim Meyering  <meyering@redhat.com>
87327         maint: sc_cpp_indent_check: remove the "only in lib/" restriction
87328         * Makefile (sc_cpp_indent_check): Don't limit the check to files
87329         in lib/.
87331 2011-02-22  Eric Blake  <eblake@redhat.com>
87333         maint: avoid any CDPATH issue
87334         * Makefile (sc_cpp_indent_check): Anchor cd argument.
87336         maint: adjust cpp indentation for my modules, as well
87337         * Makefile (sc_cpp_indent_check): Add my name.
87338         * lib/fbufmode.c: Filter through cppi.
87339         * lib/fpurge.c: Likewise.
87340         * lib/freadable.c: Likewise.
87341         * lib/freading.c: Likewise.
87342         * lib/fwritable.c: Likewise.
87343         * lib/fwriting.c: Likewise.
87344         * lib/sigaction.c: Likewise.
87346 2011-02-22  Jim Meyering  <meyering@redhat.com>
87348         maint: adjust cpp indentation to reflect nesting depth
87349         I.e., in a block of code that begins with an unnested "#if",
87350         put one space between the "#" in column 1 and following token.
87351         For example,
87352         -#include <sys/vfs.h>
87353         +# include <sys/vfs.h>
87354         Do this only in .c files that are part of a module I maintain.
87355         * lib/linkat.c: Filter through cppi.
87356         * lib/nanosleep.c: Likewise.
87357         * lib/openat.c: Likewise.
87358         * lib/openat-die.c: Likewise.
87359         * lib/dup3.c: Likewise.
87360         * lib/fchownat.c: Likewise.
87361         * lib/flock.c: Likewise.
87362         * lib/fsync.c: Likewise.
87363         * lib/fts.c: Likewise.
87364         * lib/getpass.c: Likewise.
87365         * lib/gettimeofday.c: Likewise.
87366         * lib/userspec.c: Likewise.
87367         * Makefile (sc_cpp_indent_check): New rule, to check this.
87369 2011-02-22  Bruno Haible  <bruno@clisp.org>
87371         New module 'wctomb'.
87372         * lib/stdlib.in.h (wctomb): New declaration.
87373         * lib/wctomb.c: New file.
87374         * lib/wctomb-impl.h: New file.
87375         * m4/wctomb.m4: New file.
87376         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_WCTOMB,
87377         REPLACE_WCTOMB.
87378         * modules/stdlib (Makefile.am): Substitute GNULIB_WCTOMB,
87379         REPLACE_WCTOMB.
87380         * modules/wctomb: New file.
87381         * tests/test-stdlib-c++.cc: Test signature of wctomb.
87382         * doc/posix-functions/wctomb.texi: Mention the new module.
87383         * modules/wctob (Depends-on): Add wctomb.
87385 2011-02-22  Bruno Haible  <bruno@clisp.org>
87387         New module 'mbtowc'.
87388         * lib/stdlib.in.h (mbtowc): New declaration.
87389         * lib/mbtowc.c: New file.
87390         * lib/mbtowc-impl.h: New file, from libutf8 with modifications.
87391         * m4/mbtowc.m4: New file.
87392         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_MBTOWC,
87393         REPLACE_MBTOWC.
87394         * modules/stdlib (Makefile.am): Substitute GNULIB_MBTOWC,
87395         REPLACE_MBTOWC.
87396         * modules/mbtowc: New file.
87397         * tests/test-stdlib-c++.cc: Test signature of mbtowc.
87398         * doc/posix-functions/mbtowc.texi: Mention the new module.
87399         * modules/btowc (Depends-on): Add mbtowc.
87401 2011-02-22  Bruno Haible  <bruno@clisp.org>
87403         wcrtomb: Add more tests for native Windows platforms.
87404         * tests/test-wcrtomb-w32-1.sh: New file.
87405         * tests/test-wcrtomb-w32-2.sh: New file.
87406         * tests/test-wcrtomb-w32-3.sh: New file.
87407         * tests/test-wcrtomb-w32-4.sh: New file.
87408         * tests/test-wcrtomb-w32-5.sh: New file.
87409         * tests/test-wcrtomb-w32.c: New file.
87410         * modules/wcrtomb-tests (Files): Add them.
87411         (Makefile.am): Arrange to run these tests.
87412         * tests/test-wcrtomb-w32-6.sh: New file, currently unused.
87413         * tests/test-wcrtomb-w32-7.sh: New file, currently unused.
87415 2011-02-20  Bruno Haible  <bruno@clisp.org>
87417         wcrtomb: Enhance test.
87418         * tests/test-wcrtomb.c (main): Add test against bug with NULL argument.
87420 2011-02-20  Bruno Haible  <bruno@clisp.org>
87422         mbrtowc: Tiny optimization.
87423         * lib/mbrtowc.c (mbrtowc): Delay pstate assignment until it is needed.
87425 2011-02-20  Jim Meyering  <meyering@redhat.com>
87427         test-exclude.c: remove unmatched #endif
87428         * tests/test-exclude.c: Remove stray #endif, left over from
87429         the change of a week ago.
87431 2011-02-19  Jim Meyering  <meyering@redhat.com>
87433         git-version-gen: skip "-dirty" check when appropriate
87434         * build-aux/git-version-gen: Don't run any git commands when the
87435         version string comes from .tarball-version.  Prior to this, we
87436         would run git update-index --refresh even from a just-unpacked
87437         tarball directory, and that could affect a .git/ directory in a
87438         parent of the build directory.  Reported by Mike Frysinger.
87440 2011-02-19  Bruno Haible  <bruno@clisp.org>
87442         unictype/property-byname: Reduce the size of the 'data' segment.
87443         * lib/unictype/pr_byname.gperf: Add gperf option '%pic'.
87445 2011-02-19  Bruno Haible  <bruno@clisp.org>
87447         unictype/scripts: Reduce the size of the 'data' segment.
87448         * lib/gen-uni-tables.c (output_scripts_byname): Emit gperf option
87449         '%pic'.
87450         * lib/unictype/scripts_byname.gperf: Regenerated.
87452 2011-02-19  Bruno Haible  <bruno@clisp.org>
87454         stdint: Update documentation.
87455         * doc/posix-headers/stdint.texi: Mention WCHAR_MIN, WCHAR_MAX problem.
87457 2011-02-18  Paul Eggert  <eggert@cs.ucla.edu>
87459         stdint: omit redundant check for wchar.h
87460         * m4/stdint.m4 (gl_STDINT_H): The earlier part of this macro now
87461         always tests whether wchar.h exists, so remove the now-redundant test.
87463 2011-02-18  Bruno Haible  <bruno@clisp.org>
87465         stdint: Cut dependency to module 'wchar'.
87466         * lib/stdint.in.h: Include wchar.h only when HAVE_WCHAR_H is 1. Also
87467         include the necessary prerequisites.
87468         * m4/stdint.m4 (gl_STDINT_H): Test whether wchar.h exists.
87469         * modules/stdint (Depends-on): Remove wchar.
87470         (Makefile.am): Substitute HAVE_WCHAR_H.
87471         This reverts part of a 2007-01-06 commit. Reported by Paul Eggert.
87473 2011-02-18  Eric Blake  <eblake@redhat.com>
87475         longlong: skip, rather than fail, on cross-compilation
87476         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Avoid aborting configure
87477         when cross-compiling; regression from 2011-02-16.
87479 2011-02-17  Paul Eggert  <eggert@cs.ucla.edu>
87481         * NEWS: Mention 2011-02-08 change to stdlib.
87483 2011-02-17  Bruno Haible  <bruno@clisp.org>
87485         getloadavg: Add comments about platforms.
87486         * m4/getloadavg.m4: Add comment.
87487         * lib/getloadavg.c: Likewise.
87489 2011-02-17  Bruno Haible  <bruno@clisp.org>
87491         getloadavg: Fix link error on Solaris 2.6.
87492         * modules/getloadavg (Link): New section.
87493         * modules/getloadavg-tests (Makefile.am): Use GETLOADAVG_LIBS for
87494         linking test-getloadavg.
87495         * doc/glibc-functions/getloadavg.texi: Mention that Solaris 2.6 lacks
87496         getloadavg.
87498 2011-02-17  Paul Eggert  <eggert@cs.ucla.edu>
87500         * lib/getloadavg.c (getloadavg) [sgi]: Make ldav_off of type ptrdiff_t.
87501         It was 'int', but this doesn't match the IRIX 6.5 manual.
87502         Suggested by Bruno Haible in
87503         <http://lists.gnu.org/r/bug-gnulib/2011-02/msg00207.html>.
87505 2011-02-17  Bruno Haible  <bruno@clisp.org>
87507         havelib: Fix comments.
87508         * m4/lib-link.m4 (AC_LIB_RPATH): Update comments after 2007-01-02
87509         change.
87511 2011-02-17  Bruno Haible  <bruno@clisp.org>
87513         havelib: Update config.rpath.
87514         * build-aux/config.rpath: Update to match libtool.m4 from libtool-2.4.
87516 2011-02-17  Bruno Haible  <bruno@clisp.org>
87518         getloadavg test: Add some plausibility checks.
87519         * tests/test-getloadavg.c (check_avg): Print a warning when the value
87520         is improbable.
87522 2011-02-16  Eric Blake  <eblake@redhat.com>
87524         maintainer-makefile: make syntax-check a no-op from tarballs
87525         * top/maint.mk (no-vc-detected): New rule.
87526         (local-checks-available): Use it to avoid hanging if someone tries
87527         'make syntax-check' from a tarball.  Also append to any non-syntax
87528         checks already defined in cfg.mk.
87530 2011-02-16  Paul Eggert  <eggert@cs.ucla.edu>
87532         longlong: tune, particularly for common case of c99
87534         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Don't bother compiling
87535         or running anything if c99, or if unsigned long long int does not
87536         work.  In either case, we know the answer without further tests.
87537         Do not compile _AC_TYPE_LONG_LONG_SNIPPET twice.  Instead, compile
87538         it at most once, and use its results for both long long int and
87539         unsigned long long int.  This is more likely to be efficient in
87540         the common case where the program wants to check for both long
87541         long int and unsigned long long int.
87542         (AC_TYPE_UNSIGNED_LONG_LONG_INT): Don't bother compiling if c99,
87543         since the answer is already known.
87545 2011-02-15  Paul Eggert  <eggert@cs.ucla.edu>
87547         getloadavg: set errno
87548         * lib/getloadavg.c: Set errno when returning -1.  If no other
87549         error number looks appropriate, set it to ENOSYS if the getloadavg
87550         looks like it can't possibly ever work, ENOTSUP otherwise.
87551         Suggested by Bruno Haible in
87552         <http://lists.gnu.org/r/bug-gnulib/2011-02/msg00187.html>.
87554         getloadavg: trim unused parts and speed up 'configure'
87555         * NEWS: Document this.
87556         * lib/getloadavg.c: Ignore HAVE_GETLOADAVG; this file is now
87557         always compiled if getloadavg is absent.
87558         Move test code to ...
87559         * tests/test-getloadavg.c: New file, containing previous
87560         contents of test from lib/getloadavg.c.  It also contains
87561         suggestions by Bruno Haible in
87562         <http://lists.gnu.org/r/bug-gnulib/2011-02/msg00186.html>.
87563         * modules/getloadavg-tests: New file.
87564         * m4/getloadavg.m4 (gl_GETLOADAVG): Do not check for getloadavg twice.
87565         Do tests in the same order as they're needed for getloadavg.c.
87566         Omit setgid-related tests that generate symbols KMEM_GROUP,
87567         NEET_SETGID, GETLOADAVG_PRIVILEGED; nobody seems to use those any more.
87568         Do only the tests that are needed to see whether the system has
87569         getloadavg, moving the other tests into ...
87570         (gl_PREREQ_GETLOADAVG): ... here.  Do not define obsolete symbol
87571         NLIST_NAME_UNION; nobody should be using it.  Do not define
87572         symbols C_GETLOADAVG and HAVE_GETLOADAVG; they're no longer
87573         relevant, as the user of this module shouldn't care how getloadavg
87574         is implemented.
87576         getloadavg: omit unused var
87577         * lib/getloadavg.c (getloadavg): Omit unused local variable.
87579 2011-02-15  Jim Meyering  <meyering@redhat.com>
87581         doc: update users.txt
87582         * users.txt: Update iwhd's URL.
87584 2011-02-13  Bruno Haible  <bruno@clisp.org>
87586         Consistent macro naming for macros that use GCC __attribute__.
87587         * lib/di-set.h (_GL_ATTRIBUTE_NONNULL): Renamed from
87588         _ATTRIBUTE_NONNULL_.
87589         * lib/ino-map.h (_GL_ATTRIBUTE_NONNULL): Likewise.
87590         * lib/hash.h (_GL_ATTRIBUTE_WUR): Renamed from ATTRIBUTE_WUR.
87591         * lib/ignore-value.h (_GL_ATTRIBUTE_DEPRECATED): Renamed from
87592         ATTRIBUTE_DEPRECATED.
87593         * lib/openat.h (_GL_ATTRIBUTE_NORETURN): Renamed from
87594         ATTRIBUTE_NORETURN.
87595         * lib/sigpipe-die.h (_GL_ATTRIBUTE_NORETURN): Likewise.
87596         * lib/xmemdup0.h (_GL_ATTRIBUTE_NORETURN): Likewise.
87597         * lib/xstrtol.h (_GL_ATTRIBUTE_NORETURN): Likewise.
87598         * lib/xalloc.h (_GL_ATTRIBUTE_NORETURN): Likewise.
87599         (_GL_ATTRIBUTE_MALLOC): Renamed from ATTRIBUTE_MALLOC.
87600         (_GL_ATTRIBUTE_ALLOC_SIZE): Renamed from ATTRIBUTE_ALLOC_SIZE.
87601         * lib/version-etc.h (_GL_ATTRIBUTE_SENTINEL): Renamed from
87602         ATTRIBUTE_SENTINEL.
87603         * lib/safe-alloc.h (_GL_ATTRIBUTE_RETURN_CHECK): Renamed from
87604         ATTRIBUTE_RETURN_CHECK.
87605         * tests/test-ignore-value.c (_GL_ATTRIBUTE_RETURN_CHECK): Likewise.
87606         * tests/test-argmatch.c (_GL_ATTRIBUTE_NORETURN): Renamed from
87607         ATTRIBUTE_NORETURN.
87608         * tests/test-exclude.c (_GL_ATTRIBUTE_NORETURN): Likewise.
87609         Reported by Paul Eggert.
87611 2011-02-13  Bruno Haible  <bruno@clisp.org>
87613         Don't interfere with a program's definition of __attribute__.
87614         * lib/argp.h (__attribute__): Remove definition.
87615         (_GL_ATTRIBUTE_FORMAT): New macro.
87616         (argp_error, __argp_error, argp_failure, __argp_failure): Use it.
87617         * lib/argp-fmtstream.h (__attribute__): Remove definition.
87618         (_GL_ATTRIBUTE_FORMAT): New macro.
87619         (__argp_fmtstream_printf, argp_fmtstream_printf): Use it.
87620         * lib/argp-help.c (hol_entry_long_iterate): Use __attribute__ only for
87621         GCC 3 or newer.
87622         * lib/error.h (__attribute__): Remove definition.
87623         (_GL_ATTRIBUTE_FORMAT): New macro.
87624         (error, error_at_line): Use it.
87625         * lib/hash.h (__attribute__): Remove definition.
87626         (ATTRIBUTE_WUR): Update definition. Define always.
87627         * lib/openat.h (__attribute__): Remove definition.
87628         (ATTRIBUTE_NORETURN): Update definition. Define always.
87629         * lib/sigpipe-die.h (__attribute__): Remove definition.
87630         (ATTRIBUTE_NORETURN): Update definition. Define always.
87631         * lib/vasnprintf.h (__attribute__): Remove definition.
87632         (_GL_ATTRIBUTE_FORMAT): New macro.
87633         (asnprintf, vasnprintf): Use it.
87634         * lib/xalloc.h (__attribute__): Remove definition.
87635         (ATTRIBUTE_NORETURN): Update definition. Define always.
87636         (ATTRIBUTE_MALLOC, ATTRIBUTE_ALLOC_SIZE): Define always.
87637         * lib/xmemdup0.h (__attribute__): Remove definition.
87638         (ATTRIBUTE_NORETURN): Update definition. Define always.
87639         * lib/xprintf.h (__attribute__): Remove definition.
87640         (_GL_ATTRIBUTE_FORMAT): New macro.
87641         (xprintf, xvprintf, xfprintf, xvfprintf): Use it.
87642         * lib/xstrtol.h (__attribute__): Remove definition.
87643         (ATTRIBUTE_NORETURN): Update definition. Define always.
87644         * lib/xvasprintf.h (__attribute__): Remove definition.
87645         (_GL_ATTRIBUTE_FORMAT): New macro.
87646         (xasprintf, xvasprintf): Use it.
87647         * tests/test-argmatch.c (__attribute__): Remove definition.
87648         (ATTRIBUTE_NORETURN): Update definition. Define always.
87649         * tests/test-exclude.c (__attribute__): Remove definition.
87650         (ATTRIBUTE_NORETURN): Update definition. Define always.
87651         Reported by Paul Eggert.
87653 2011-02-13  Bruno Haible  <bruno@clisp.org>
87655         mbrtowc: Add more tests for native Windows platforms.
87656         * tests/test-mbrtowc-w32-1.sh: New file.
87657         * tests/test-mbrtowc-w32-2.sh: New file.
87658         * tests/test-mbrtowc-w32-3.sh: New file.
87659         * tests/test-mbrtowc-w32-4.sh: New file.
87660         * tests/test-mbrtowc-w32-5.sh: New file.
87661         * tests/test-mbrtowc-w32.c: New file.
87662         * modules/mbrtowc-tests (Files): Add them.
87663         (Makefile.am): Arrange to run these tests.
87664         * tests/test-mbrtowc-w32-6.sh: New file, currently unused.
87665         * tests/test-mbrtowc-w32-7.sh: New file, currently unused.
87667 2011-02-13  Bruno Haible  <bruno@clisp.org>
87669         mbrtowc: Work around native Windows bug.
87670         * m4/mbrtowc.m4 (gl_MBRTOWC_RETVAL): Detect native Windows bug. Use the
87671         guess when no suitable locale for testing was found.
87672         * doc/posix-functions/mbrtowc.texi: Mention the native Windows bug.
87674 2011-02-13  Bruno Haible  <bruno@clisp.org>
87676         mbsinit: Work around mingw bug.
87677         * m4/mbsinit.m4 (gl_FUNC_MBSINIT): Replace mbsinit also on mingw.
87678         * lib/mbsinit.c (mbsinit): Provide an alternate definition for native
87679         Windows.
87680         * doc/posix-functions/mbsinit.texi: Mention the mingw bug.
87682 2011-02-13  Bruno Haible  <bruno@clisp.org>
87684         mbsinit: Don't crash for a NULL argument.
87685         * lib/mbsinit.c (mbsinit): When the argument is NULL, return 1.
87686         * tests/test-mbsinit.c (mbsinit): Check this behaviour.
87688 2011-02-13  Bruno Haible  <bruno@clisp.org>
87690         Don't interfere with a program's definition of __attribute__.
87691         * lib/stdio.in.h (__attribute__): Remove definition.
87692         (_GL_ATTRIBUTE_FORMAT, _GL_ATTRIBUTE_FORMAT_PRINTF): New macros.
87693         (dprintf, fprintf, obstack_printf, obstack_printf, obstack_vprintf,
87694         printf, snprintf, sprintf, asprintf, vasprintf, vdprintf, vfprintf,
87695         vsnprintf, vsprintf): Use _GL_ATTRIBUTE_FORMAT_PRINTF.
87696         * lib/string.in.h (__attribute__): Remove definition.
87697         Reported by Paul Eggert.
87699 2011-02-12  Paul Eggert  <eggert@cs.ucla.edu>
87701         stdlib: don't get in the way of non-GCC __attribute__
87702         See thread starting at
87703         <http://lists.gnu.org/r/bug-gnulib/2011-02/msg00161.html>.
87704         Revert previous stdlib change, installing the following instead:
87705         * lib/stdlib.in.h (__attribute__): Remove.  We do not want
87706         to get in the way of a non-GCC compiler that supports __attribute__.
87707         (_GL_ATTRIBUTE_RETURN): New macro.
87708         (_Exit): Use it instead of __attribute__.
87710 2011-02-12  Bruno Haible  <bruno@clisp.org>
87712         quotearg test: Avoid test failure on mingw.
87713         * tests/test-quotearg.sh: Convert the locale identifier from native
87714         Windows syntax to Unix syntax.
87716 2011-02-12  Bruno Haible  <bruno@clisp.org>
87718         setlocale: Prefer gnulib's override over libintl's override.
87719         * lib/locale.in.h (GNULIB_defined_setlocale): New macro.
87720         * lib/gettext.h (setlocale): Redefine to rpl_setlocale if
87721         GNULIB_defined_setlocale is set.
87723 2011-02-12  Paul Eggert  <eggert@cs.ucla.edu>
87725         stdlib: support non-GCC __attribute__
87727         Fix a serious and tricky problem encountered when attempting to
87728         add the getloadavg module to Emacs.  Emacs worked fine on RHEL
87729         5.5, but it crashed due to memory corruption on Solaris 10 with
87730         Sun C 5.11.  Emacs normally ORs 3-bit tags into their low-order
87731         bits that are otherwise zero.  This tagging is optional inside
87732         Emacs but is preferred and is used when __attribute__ ((__aligned
87733         (8))) works, as it does with both recent-enough GCC and with Sun C
87734         5.11.  However, Sun C 5.11 is not GCC and does not #define
87735         __GNUC__ and __GNUC_MINOR__.
87737         When I added the getloadavg module to Emacs, it brought in
87738         stdlib.in.h, which contained this fragment:
87740            #ifndef __attribute__
87741            # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
87742            #  define __attribute__(Spec)   /* empty */
87743            # endif
87744            #endif
87746         When files that include <stdlib.h> were compiled with Sun C 5.11,
87747         the above code disabled __attribute__ ((__aligned (8))), which
87748         caused variables to not be properly aligned, which eventually led
87749         to the pointer corruption mentioned above.  (This was a bit hard
87750         to diagnose, unfortunately.)
87752         Several "#define __attribute__(X) /* empty */" code snippets need
87753         to be eradicated from Gnulib to work with non-GCC compilers that
87754         support __attribute__.  The Autoconf way to do this is to test for
87755         each kind of attribute that we want support for, and selectively
87756         enable that in source code.
87758         Fix this problem just for stdlib.h, by adding a test for the
87759         __noreturn__ attribute, and change stdlib.in.h to use that test
87760         when needed.  This technique can be easily generalized to the
87761         other *.in.h files and attributes, and a similar technique can be
87762         used for *.h and *.c files.  This patch is enough to solve the
87763         problem for Emacs + getloadavg, and I thought I'd publish it for
87764         feedback before undertaking further, similar fixes in other
87765         modules.
87767         This patch does not arrange to #define HAVE_ATTRIBUTE_NORETURN
87768         because it's not needed for stdlib.h.  It merely substitutes the
87769         value directly into stdlib.h.  We may well need to #define it, or
87770         similar symbols, for other modules, but it's nice to also have an
87771         option to not #define it for applications like Emacs that do not
87772         need it.
87774         * lib/stdlib.in.h (__attribute__): Do not #define.
87775         (_GL_ATTRIBUTE_NORETURN): New macro, which in stdlib.h needs to
87776         be defined only if the _Exit module is also used.
87777         * m4/_Exit.m4 (gl_FUNC__EXIT): Require gl_ATTRIBUTE_NORETURN.
87778         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Subst
87779         HAVE_ATTRIBUTE_NORETURN and default it to 1, its value on GNU
87780         platforms.
87781         * modules/_Exit (Files): Add m4/attribute.m4.
87782         * modules/stdlib (Makefile.am): Substitute HAVE_ATTRIBUTE_NORETURN.
87783         * m4/attribute.m4: New file.
87785 2011-02-12  Bruno Haible  <bruno@clisp.org>
87787         wcsrtombs: Work around bug on native Windows.
87788         * m4/wcsrtombs.m4 (gl_WCSRTOMBS_NULL): Test against mingw bug.
87789         * lib/wcsrtombs.c (rpl_wcsrtombs): When dest is NULL, pass SIZE_MAX
87790         instead of len.
87791         * doc/posix-functions/wcsrtombs.texi: Document mingw bug.
87793 2011-02-12  Bruno Haible  <bruno@clisp.org>
87795         mbsrtowcs: Work around bug on native Windows.
87796         * m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): Require gt_LOCALE_FR. Test
87797         against mingw bug.
87798         * doc/posix-functions/mbsrtowcs.texi: Document mingw bug.
87800 2011-02-12  Bruno Haible  <bruno@clisp.org>
87802         Avoid setlocale bugs in tests.
87803         * modules/btowc (Dependencies): Add setlocale.
87804         * modules/c-strcase (Dependencies): Likewise.
87805         * modules/mbmemcasecmp (Dependencies): Likewise.
87806         * modules/mbmemcasecoll (Dependencies): Likewise.
87807         * modules/mbrtowc (Dependencies): Likewise.
87808         * modules/mbscasecmp (Dependencies): Likewise.
87809         * modules/mbscasestr (Dependencies): Likewise.
87810         * modules/mbschr (Dependencies): Likewise.
87811         * modules/mbscspn (Dependencies): Likewise.
87812         * modules/mbsinit (Dependencies): Likewise.
87813         * modules/mbsncasecmp (Dependencies): Likewise.
87814         * modules/mbsnrtowcs (Dependencies): Likewise.
87815         * modules/mbspbrk (Dependencies): Likewise.
87816         * modules/mbspcasecmp (Dependencies): Likewise.
87817         * modules/mbsrchr (Dependencies): Likewise.
87818         * modules/mbsrtowcs (Dependencies): Likewise.
87819         * modules/mbsspn (Dependencies): Likewise.
87820         * modules/mbsstr (Dependencies): Likewise.
87821         * modules/nl_langinfo (Dependencies): Likewise.
87822         * modules/quotearg (Dependencies): Likewise.
87823         * modules/unicase/locale-language (Dependencies): Likewise.
87824         * modules/unicase/ulc-casecmp (Dependencies): Likewise.
87825         * modules/unicase/ulc-casecoll (Dependencies): Likewise.
87826         * modules/unigbrk/ulc-grapheme-breaks (Dependencies): Likewise.
87827         * modules/unistdio/u8-vasnprintf (Dependencies): Likewise.
87828         * modules/unistdio/u16-vasnprintf (Dependencies): Likewise.
87829         * modules/unistdio/u32-vasnprintf (Dependencies): Likewise.
87830         * modules/unistdio/ulc-vasnprintf (Dependencies): Likewise.
87831         * modules/uniwbrk/ulc-wordbreaks (Dependencies): Likewise.
87832         * modules/vasnprintf-posix (Dependencies): Likewise.
87833         * modules/wcrtomb (Dependencies): Likewise.
87834         * modules/wcsnrtombs (Dependencies): Likewise.
87835         * modules/wcsrtombs (Dependencies): Likewise.
87837 2011-02-12  Bruno Haible  <bruno@clisp.org>
87839         setlocale: Workaround native Windows bug.
87840         * lib/setlocale.c (rpl_setlocale): On native Windows, when setlocale
87841         succeeds but sets LC_CTYPE to "C", report a failure.
87842         * tests/test-setlocale2.sh: New file.
87843         * tests/test-setlocale2.c: New file.
87844         * modules/setlocale-tests (Files): Add the new files.
87845         (Makefile.am): Enable test-setlocale2.sh test.
87846         * doc/posix-functions/setlocale.texi: Mention workaround.
87848 2011-02-11  Bruno Haible  <bruno@clisp.org>
87850         Tests for module 'setlocale'.
87851         * modules/setlocale-tests: New file.
87852         * tests/test-setlocale1.sh: New file.
87853         * tests/test-setlocale1.c: New file.
87855         New module 'setlocale'.
87856         * lib/locale.in.h (setlocale): New declaration.
87857         * lib/setlocale.c: New file, based on
87858         gettext/gettext-runtime/intl/setlocale.c.
87859         * m4/setlocale.m4: New file.
87860         * m4/locale_h.m4 (gl_LOCALE_H): Test whether setlocale is declared.
87861         (gl_LOCALE_H_DEFAULTS): Initialize GNULIB_SETLOCALE, REPLACE_SETLOCALE.
87862         * modules/locale (Makefile.am): Substitute GNULIB_SETLOCALE,
87863         REPLACE_SETLOCALE.
87864         * modules/setlocale: New file.
87865         * tests/test-locale-c++.cc: Test the declaration of setlocale.
87866         * doc/posix-functions/setlocale.texi: Mention the new module.
87868 2011-02-11  Bruno Haible  <bruno@clisp.org>
87870         Prepare for locale dependent tests on mingw.
87871         * m4/locale-ar.m4 (gt_LOCALE_AR): On native Windows, don't try "ar"
87872         because it has the wrong locale encoding.
87873         * m4/locale-fr.m4 (gt_LOCALE_FR): On native Windows, try
87874         French_France.1252 instead of "fr".
87875         (gt_LOCALE_FR_UTF8): On native Windows, try French_France.65001.
87876         * m4/locale-ja.m4 (gt_LOCALE_JA): On native Windows, don't try "ja"
87877         because it has the wrong locale encoding.
87878         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Require AC_CANONICAL_HOST. On
87879         native Windows, try Turkish_Turkey.65001.
87880         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): On native Windows, try
87881         Chinese_China.54936.
87883         Prepare for locale dependent tests on mingw.
87884         * m4/locale-ar.m4 (gt_LOCALE_AR): On native Windows, call setlocale
87885         differently.
87886         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Likewise.
87887         * m4/locale-ja.m4 (gt_LOCALE_JA): Likewise.
87888         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise.
87889         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
87891 2011-02-11  Eric Blake  <eblake@redhat.com>
87893         strptime: avoid compiler warnings
87894         * lib/strptime.c (__strptime_internal) [!_NL_CURRENT]: Avoid
87895         compiler warnings about dead code.
87896         Reported by Daniel P. Berrange.
87898 2011-02-11  Thien-Thi Nguyen  <ttn@gnuvola.org>
87900         doc: update users.txt
87901         * users.txt: Add rcs.
87903 2011-02-10  John W. Eaton  <jwe@gnu.org>
87905         doc: update users.txt
87906         * users.txt: Add octave.
87908 2011-02-10  Jim Meyering  <meyering@redhat.com>
87910         doc: update users.txt
87911         * users.txt: Add iwhd.
87913 2011-02-09  Bruno Haible  <bruno@clisp.org>
87915         gnulib-tool: Make copyright notice adjustment more robust.
87916         * gnulib-tool (func_import): In sed_transform_main_lib_file,
87917         sed_transform_build_aux_file, sed_transform_testsrelated_lib_file,
87918         allow a line break to occur after "GNU" in "GNU [Lesser] General Public
87919         License".
87920         Reported by Glenn Morris <rgm@gnu.org> via Paul Eggert.
87922 2011-02-06  Bruno Haible  <bruno@clisp.org>
87924         New module 'towctrans'.
87925         * modules/towctrans: New file.
87926         * lib/wctype.in.h (towctrans): New declaration.
87927         * lib/towctrans.c: New file.
87928         * lib/towctrans-impl.h: New file.
87929         * m4/towctrans.m4: New file.
87930         * m4/wctype_h.m4 (gl_WCTYPE_H): Test whether towctrans is declared.
87931         (gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_TOWCTRANS.
87932         * modules/wctype-h (Makefile.am): Substitute GNULIB_TOWCTRANS.
87933         * tests/test-wctype-h-c++.cc: Test the declaration of towctrans.
87934         * doc/posix-functions/towctrans.texi: Mention the new module.
87936 2011-02-06  Bruno Haible  <bruno@clisp.org>
87938         New module 'wctrans'.
87939         * modules/wctrans: New file.
87940         * lib/wctype.in.h (wctrans): New declaration.
87941         * lib/wctrans.c: New file.
87942         * lib/wctrans-impl.h: New file.
87943         * m4/wctrans.m4: New file.
87944         * m4/wctype_h.m4 (gl_WCTYPE_H): Test whether wctrans is declared.
87945         (gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_WCTRANS.
87946         * modules/wctype-h (Makefile.am): Substitute GNULIB_WCTRANS.
87947         * tests/test-wctype-h-c++.cc: Test the declaration of wctrans.
87948         * doc/posix-functions/wctrans.texi: Mention the new module.
87950 2011-02-06  Bruno Haible  <bruno@clisp.org>
87952         New module 'iswctype'.
87953         * modules/iswctype: New file.
87954         * lib/wctype.in.h (iswctype): New declaration.
87955         * lib/iswctype.c: New file.
87956         * lib/iswctype-impl.h: New file.
87957         * m4/iswctype.m4: New file.
87958         * m4/wctype_h.m4 (gl_WCTYPE_H): Test whether iswctype is declared.
87959         (gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_ISWCTYPE.
87960         * modules/wctype-h (Makefile.am): Substitute GNULIB_ISWCTYPE.
87961         * tests/test-wctype-h-c++.cc: Test the declaration of iswctype.
87962         * doc/posix-functions/iswctype.texi: Mention the new module and the
87963         HP-UX 11.00 problem.
87965 2011-02-06  Bruno Haible  <bruno@clisp.org>
87967         New module 'wctype'.
87968         * modules/wctype: Change to represent the wctype() substitute.
87969         * lib/wctype.in.h (wctype): New declaration.
87970         * lib/wctype.c: New file.
87971         * lib/wctype-impl.h: New file.
87972         * m4/wctype.m4: New file.
87973         * m4/wctype_h.m4 (gl_WCTYPE_H): Test whether wctype is declared.
87974         (gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_WCTYPE.
87975         * modules/wctype-h (Makefile.am): Substitute GNULIB_WCTYPE.
87976         * tests/test-wctype-h-c++.cc: Test the declaration of wctype.
87977         * doc/posix-functions/wctype.texi: Mention the new module and the
87978         HP-UX 11.00 problem.
87980 2011-02-06  Bruno Haible  <bruno@clisp.org>
87982         wctype-h: Ensure wctype_t and wctrans_t are defined.
87983         * lib/wctype.in.h (wctype_t, wctrans_t): New type declarations.
87984         * m4/wctype_h.m4 (gl_WCTYPE_H): Determine HAVE_WCTYPE_T, HAVE_WCTRANS_T.
87985         (gl_WCTYPE_H_DEFAULTS): Initialize HAVE_WCTYPE_T, HAVE_WCTRANS_T.
87986         * modules/wctype-h (Makefile.am): Substitute HAVE_WCTYPE_T,
87987         HAVE_WCTRANS_T.
87988         * tests/test-wctype-h.c: Check that wctype_t and wctrans_t are defined.
87990 2011-02-09  Paul Eggert  <eggert@cs.ucla.edu>
87992         flock: fix license typo
87994         * lib/flock.c: Fix typo in license.  One of the "Lesser"s was
87995         omitted.
87997 2011-02-08  Bruno Haible  <bruno@clisp.org>
87999         Split large sed scripts, for HP-UX sed.
88000         * modules/math (Makefile.am): Split sed scripts around 50 sed commands,
88001         to avoid HP-UX limit of 99 commands, in the near future.
88002         * modules/stdlib (Makefile.am): Likewise.
88003         * modules/unistd (Makefile.am): Likewise.
88004         * modules/wchar (Makefile.am): Likewise.
88005         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
88006         Suggestion by Ralf Wildenhues <Ralf.Wildenhues@gmx.de> in
88007         <http://lists.gnu.org/r/bug-gnulib/2010-01/msg00216.html>.
88009 2011-02-08  Paul Eggert  <eggert@cs.ucla.edu>
88010             Bruno Haible  <bruno@clisp.org>
88012         stdlib: improve random_r modularization
88013         * lib/stdlib.in.h: Encapsulate all the stuff having to do with
88014         random_r inside "#if @GNULIB_RANDOM_R@", so that it's clearer that
88015         you also need the random_r module to get this material right.
88016         * m4/random_r.m4 (gl_FUNC_RANDOM_R): Move check for random.h here ...
88017         * m4/stdlib_h.m4 (gl_STDLIB_H): ... from here.
88018         (gl_STDLIB_H_DEFAULTS): Default HAVE_RANDOM_H to 1, and AC_SUBST it.
88020 2011-02-08  Paul Eggert  <eggert@cs.ucla.edu>
88022         stdlib: don't depend on stdint
88023         * lib/stdlib.in.h: Don't include <stdint.h> merely because
88024         GNULIB_POSIXCHECK is defined.  GNULIB_POSIXCHECK seems to
88025         be independent of whether stdint.h is needed.
88026         * m4/random_r.m4 (gl_FUNC_RANDOM_R): Check for struct random_data
88027         here, instead of ...
88028         * m4/stdlib_h.m4 (gl_STDLIB_H): ... here.  Applications that need
88029         struct random_data should be using the random_r module, not just
88030         the stdlib module (which wouldn't make sense: what package needs
88031         just struct random_data without also needing random_r?).
88032         * modules/stdlib (Depends-on): Remove stdint.
88034         getloadavg: don't depend on c-strtod, cloexec, fcntl-safer
88035         See the thread rooted at
88036         <http://lists.gnu.org/r/bug-gnulib/2011-02/msg00090.html>.
88037         * lib/getloadavg.c: Do not include c-strtod.h, cloexec.h, or fcntl--.h.
88038         Include <fcntl.h> only if (defined __linux__ || defined __CYGWIN__
88039         || defined SUNOS_5 || (defined LOAD_AVE_TYPE && !  defined
88040         __VMS)); previously it was always included (via fcntl--.h).
88041         (getloadavg): Do not use c_strtod.  Instead, approximate it by
88042         hand; this is good enough for load averages.  Also, do not use
88043         set_cloexec_flag; instead, use the O_CLOEXEC and F_DUPFD_CLOEXEC
88044         flags directly if available and don't bother otherwise.  (Packages
88045         that need the extra reliability should use the modules that define
88046         these flags on older platforms that lack them.)
88047         * modules/getloadavg (Depends-on): Remove c-strtod, cloexec,
88048         fcntl-safer.
88050 2011-02-08  Jim Meyering  <meyering@redhat.com>
88052         di-set.h, ino-map.h: add multiple-inclusion guard
88053         Technically, the guard is required only for ino-map.h, due to its
88054         INO_MAP_INSERT_FAILURE definition, but do both for consistency.
88055         * lib/di-set.h: Add file-spanning #ifndef _GL_DI_SET_H.
88056         * lib/ino-map.h: Likewise.
88058 2011-02-06  Bruno Haible  <bruno@clisp.org>
88060         iswblank: Ensure declaration on glibc systems.
88061         * m4/iswblank.m4 (gl_FUNC_ISWBLANK): Require gl_USE_SYSTEM_EXTENSIONS.
88062         * modules/iswblank (Dependencies): Add 'extensions'.
88063         * doc/posix-functions/iswblank.texi: Document the glibc problem.
88065 2011-02-06  Bruno Haible  <bruno@clisp.org>
88067         New module 'iswblank'.
88068         * lib/wctype.in.h (iswblank): Don't declare if GNULIB_ISWBLANK is 0.
88069         * modules/iswblank: New file.
88070         * modules/wctype-h (Files): Remove lib/iswblank.c.
88071         (Makefile.am): Substitute GNULIB_ISWBLANK.
88072         * m4/iswblank.m4: New file, partially extracted from m4/wctype_h.m4.
88073         * m4/wctype_h.m4 (gl_WCTYPE_MODULE_INDICATOR): New macro.
88074         (gl_WCTYPE_H_DEFAULTS): New macro.
88075         (gl_WCTYPE_H): Require it. Remove iswblank related code.
88076         * modules/iswblank-tests: New file.
88077         * tests/test-iswblank.c: New file, extraced from tests/test-wctype-h.c.
88078         * tests/test-wctype-h.c (main): Remove iswblank tests.
88079         * tests/test-wctype-h-c++.cc: Guard the signature test of iswblank.
88080         * doc/posix-functions/iswblank.texi: Mention module 'iswblank' instead
88081         of 'wctype-h'.
88082         * NEWS: Mention the change.
88083         * modules/mbchar (Depends-on): Add iswblank.
88085 2011-02-08  Bruno Haible  <bruno@clisp.org>
88087         di-set tests: Refactor.
88088         * tests/test-di-set.c: Include di-set.h early. Include macros.h. Drop
88089         unnecessary includes.
88090         (ASSERT): Remove macro.
88091         (main): Make C90 compliant by avoiding variable declaration after
88092         statement.
88093         * modules/di-set-tests (Files): Add tests/macros.h.
88095 2011-02-08  Bruno Haible  <bruno@clisp.org>
88097         ino-map tests: Refactor.
88098         * tests/test-ino-map.c: Include ino-map.h early. Include macros.h. Drop
88099         unnecessary includes.
88100         (ASSERT): Remove macro.
88101         (main): Make C90 compliant by avoiding variable declaration after
88102         statement.
88103         * modules/ino-map-tests (Files): Add tests/macros.h.
88105 2011-02-08  Jim Meyering  <meyering@redhat.com>
88107         di-set: add "const" to a cast
88108         * lib/di-set.c (di_set_insert): Cast hash_insert0 argument to
88109         "(void const *)", not "(void *)".  Spotted by Bruno Haible.
88111 2011-02-06  Bruno Haible  <bruno@clisp.org>
88113         Rename module 'wctype' to 'wctype-h'.
88114         * modules/wctype-h: Renamed from modules/wctype.
88115         * modules/wctype: Simplyfy to a redirection to 'wctype-h'.
88116         * modules/wctype-h-tests: Renamed from modules/wctype-tests.
88117         (Files, Depends-on, Makefile.am): Update.
88118         * modules/wctype-h-c++-tests: Renamed from modules/wctype-c++-tests.
88119         (Files, Makefile.am): Update.
88120         * tests/test-wctype-h.c: Renamed from tests/test-wctype.c.
88121         * tests/test-wctype-h-c++.cc: Renamed from tests/test-wctype-c++.cc.
88122         * doc/posix-headers/wctype.texi: Update.
88123         * doc/posix-functions/iswalnum.texi: Update.
88124         * doc/posix-functions/iswalpha.texi: Update.
88125         * doc/posix-functions/iswblank.texi: Update.
88126         * doc/posix-functions/iswcntrl.texi: Update.
88127         * doc/posix-functions/iswdigit.texi: Update.
88128         * doc/posix-functions/iswgraph.texi: Update.
88129         * doc/posix-functions/iswlower.texi: Update.
88130         * doc/posix-functions/iswprint.texi: Update.
88131         * doc/posix-functions/iswpunct.texi: Update.
88132         * doc/posix-functions/iswspace.texi: Update.
88133         * doc/posix-functions/iswupper.texi: Update.
88134         * doc/posix-functions/iswxdigit.texi: Update.
88135         * doc/posix-functions/towlower.texi: Update.
88136         * doc/posix-functions/towupper.texi: Update.
88137         * NEWS: Mention the change.
88138         * modules/fnmatch (Dependencies): Add wctype-h, remove wctype.
88139         * modules/mbchar (Dependencies): Likewise.
88140         * modules/mbswidth (Dependencies): Likewise.
88141         * modules/quotearg (Dependencies): Likewise.
88142         * modules/regex (Dependencies): Likewise.
88143         * modules/wcscasecmp (Dependencies): Likewise.
88144         * modules/wcsncasecmp (Dependencies): Likewise.
88145         * modules/wcwidth (Dependencies): Likewise.
88147 2011-02-06  Bruno Haible  <bruno@clisp.org>
88149         New module 'wcswidth'.
88150         * modules/wcswidth: New file.
88151         * lib/wchar.in.h (wcswidth): New declaration.
88152         * lib/wcswidth.c: New file.
88153         * lib/wcswidth-impl.h: New file, from libutf8 with modifications.
88154         * m4/wcswidth.m4: New file.
88155         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcswidth is declared.
88156         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSWIDTH, HAVE_WCSWIDTH,
88157         REPLACE_WCSWIDTH.
88158         * modules/wchar (Makefile.am): Substitute GNULIB_WCSWIDTH,
88159         HAVE_WCSWIDTH, REPLACE_WCSWIDTH.
88160         * tests/test-wchar-c++.cc: Test the declaration of wcswidth.
88161         * doc/posix-functions/wcswidth.texi: Mention the new module.
88163 2011-02-06  Bruno Haible  <bruno@clisp.org>
88165         New module 'wcstok'.
88166         * modules/wcstok: New file.
88167         * lib/wchar.in.h (wcstok): New declaration.
88168         * lib/wcstok.c: New file.
88169         * lib/wcstok-impl.h: New file, from libutf8 with modifications.
88170         * m4/wcstok.m4: New file.
88171         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcstok is declared.
88172         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSTOK, HAVE_WCSTOK.
88173         * modules/wchar (Makefile.am): Substitute GNULIB_WCSTOK, HAVE_WCSTOK.
88174         * tests/test-wchar-c++.cc: Test the declaration of wcstok.
88175         * doc/posix-functions/wcstok.texi: Mention the new module.
88177 2011-02-06  Bruno Haible  <bruno@clisp.org>
88179         New module 'wcsstr'.
88180         * modules/wcsstr: New file.
88181         * lib/wchar.in.h (wcsstr): New declaration.
88182         * lib/wcsstr.c: New file.
88183         * lib/wcsstr-impl.h: New file, from libutf8 with modifications.
88184         * m4/wcsstr.m4: New file.
88185         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsstr is declared.
88186         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSSTR, HAVE_WCSSTR.
88187         * modules/wchar (Makefile.am): Substitute GNULIB_WCSSTR, HAVE_WCSSTR.
88188         * tests/test-wchar-c++.cc: Test the declaration of wcsstr.
88189         * doc/posix-functions/wcsstr.texi: Mention the new module.
88191 2011-02-06  Bruno Haible  <bruno@clisp.org>
88193         New module 'wcspbrk'.
88194         * modules/wcspbrk: New file.
88195         * lib/wchar.in.h (wcspbrk): New declaration.
88196         * lib/wcspbrk.c: New file.
88197         * lib/wcspbrk-impl.h: New file, from libutf8 with modifications.
88198         * m4/wcspbrk.m4: New file.
88199         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcspbrk is declared.
88200         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSPBRK, HAVE_WCSPBRK.
88201         * modules/wchar (Makefile.am): Substitute GNULIB_WCSPBRK, HAVE_WCSPBRK.
88202         * tests/test-wchar-c++.cc: Test the declaration of wcspbrk.
88203         * doc/posix-functions/wcspbrk.texi: Mention the new module.
88205 2011-02-06  Bruno Haible  <bruno@clisp.org>
88207         New module 'wcsspn'.
88208         * modules/wcsspn: New file.
88209         * lib/wchar.in.h (wcsspn): New declaration.
88210         * lib/wcsspn.c: New file.
88211         * lib/wcsspn-impl.h: New file, from libutf8 with modifications.
88212         * m4/wcsspn.m4: New file.
88213         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsspn is declared.
88214         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSSPN, HAVE_WCSSPN.
88215         * modules/wchar (Makefile.am): Substitute GNULIB_WCSSPN, HAVE_WCSSPN.
88216         * tests/test-wchar-c++.cc: Test the declaration of wcsspn.
88217         * doc/posix-functions/wcsspn.texi: Mention the new module.
88219 2011-02-06  Bruno Haible  <bruno@clisp.org>
88221         New module 'wcscspn'.
88222         * modules/wcscspn: New file.
88223         * lib/wchar.in.h (wcscspn): New declaration.
88224         * lib/wcscspn.c: New file.
88225         * lib/wcscspn-impl.h: New file, from libutf8 with modifications.
88226         * m4/wcscspn.m4: New file.
88227         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcscspn is declared.
88228         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCSPN, HAVE_WCSCSPN.
88229         * modules/wchar (Makefile.am): Substitute GNULIB_WCSCSPN, HAVE_WCSCSPN.
88230         * tests/test-wchar-c++.cc: Test the declaration of wcscspn.
88231         * doc/posix-functions/wcscspn.texi: Mention the new module.
88233 2011-02-06  Bruno Haible  <bruno@clisp.org>
88235         New module 'wcsrchr'.
88236         * modules/wcsrchr: New file.
88237         * lib/wchar.in.h (wcsrchr): New declaration.
88238         * lib/wcsrchr.c: New file.
88239         * lib/wcsrchr-impl.h: New file, from libutf8 with modifications.
88240         * m4/wcsrchr.m4: New file.
88241         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsrchr is declared.
88242         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSRCHR, HAVE_WCSRCHR.
88243         * modules/wchar (Makefile.am): Substitute GNULIB_WCSRCHR, HAVE_WCSRCHR.
88244         * tests/test-wchar-c++.cc: Test the declaration of wcsrchr.
88245         * doc/posix-functions/wcsrchr.texi: Mention the new module.
88247 2011-02-06  Bruno Haible  <bruno@clisp.org>
88249         New module 'wcschr'.
88250         * modules/wcschr: New file.
88251         * lib/wchar.in.h (wcschr): New declaration.
88252         * lib/wcschr.c: New file.
88253         * lib/wcschr-impl.h: New file, from libutf8 with modifications.
88254         * m4/wcschr.m4: New file.
88255         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcschr is declared.
88256         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCHR, HAVE_WCSCHR.
88257         * modules/wchar (Makefile.am): Substitute GNULIB_WCSCHR, HAVE_WCSCHR.
88258         * tests/test-wchar-c++.cc: Test the declaration of wcschr.
88259         * doc/posix-functions/wcschr.texi: Mention the new module.
88261 2011-02-06  Bruno Haible  <bruno@clisp.org>
88263         New module 'wcsdup'.
88264         * modules/wcsdup: New file.
88265         * lib/wchar.in.h (wcsdup): New declaration.
88266         * lib/wcsdup.c: New file.
88267         * lib/wcsdup-impl.h: New file, from libutf8 with modifications.
88268         * m4/wcsdup.m4: New file.
88269         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsdup is declared.
88270         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSDUP, HAVE_WCSDUP.
88271         * modules/wchar (Makefile.am): Substitute GNULIB_WCSDUP, HAVE_WCSDUP.
88272         * tests/test-wchar-c++.cc: Test the declaration of wcsdup.
88273         * doc/posix-functions/wcsdup.texi: Mention the new module.
88275 2011-02-06  Bruno Haible  <bruno@clisp.org>
88277         New module 'wcsxfrm'.
88278         * modules/wcsxfrm: New file.
88279         * lib/wchar.in.h (wcsxfrm): New declaration.
88280         * lib/wcsxfrm.c: New file.
88281         * lib/wcsxfrm-impl.h: New file.
88282         * m4/wcsxfrm.m4: New file.
88283         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsxfrm is declared.
88284         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSXFRM, HAVE_WCSXFRM.
88285         * modules/wchar (Makefile.am): Substitute GNULIB_WCSXFRM, HAVE_WCSXFRM.
88286         * tests/test-wchar-c++.cc: Test the declaration of wcsxfrm.
88287         * doc/posix-functions/wcsxfrm.texi: Mention the new module.
88289 2011-02-06  Bruno Haible  <bruno@clisp.org>
88291         New module 'wcscoll'.
88292         * modules/wcscoll: New file.
88293         * lib/wchar.in.h (wcscoll): New declaration.
88294         * lib/wcscoll.c: New file.
88295         * lib/wcscoll-impl.h: New file.
88296         * m4/wcscoll.m4: New file.
88297         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcscoll is declared.
88298         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCOLL, HAVE_WCSCOLL.
88299         * modules/wchar (Makefile.am): Substitute GNULIB_WCSCOLL, HAVE_WCSCOLL.
88300         * tests/test-wchar-c++.cc: Test the declaration of wcscoll.
88301         * doc/posix-functions/wcscoll.texi: Mention the new module.
88303 2011-02-06  Bruno Haible  <bruno@clisp.org>
88305         New module 'wcsncasecmp'.
88306         * modules/wcsncasecmp: New file.
88307         * lib/wchar.in.h (wcsncasecmp): New declaration.
88308         * lib/wcsncasecmp.c: New file.
88309         * lib/wcsncasecmp-impl.h: New file, from libutf8 with modifications.
88310         * m4/wcsncasecmp.m4: New file.
88311         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsncasecmp is declared.
88312         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSNCASECMP, HAVE_WCSNCASECMP.
88313         * modules/wchar (Makefile.am): Substitute GNULIB_WCSNCASECMP,
88314         HAVE_WCSNCASECMP.
88315         * tests/test-wchar-c++.cc: Test the declaration of wcsncasecmp.
88316         * doc/posix-functions/wcsncasecmp.texi: Mention the new module.
88318 2011-02-06  Bruno Haible  <bruno@clisp.org>
88320         New module 'wcscasecmp'.
88321         * modules/wcscasecmp: New file.
88322         * lib/wchar.in.h (wcscasecmp): New declaration.
88323         * lib/wcscasecmp.c: New file.
88324         * lib/wcscasecmp-impl.h: New file, from libutf8 with modifications.
88325         * m4/wcscasecmp.m4: New file.
88326         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcscasecmp is declared.
88327         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCASECMP, HAVE_WCSCASECMP.
88328         * modules/wchar (Makefile.am): Substitute GNULIB_WCSCASECMP,
88329         HAVE_WCSCASECMP.
88330         * tests/test-wchar-c++.cc: Test the declaration of wcscasecmp.
88331         * doc/posix-functions/wcscasecmp.texi: Mention the new module.
88333 2011-02-05  Bruno Haible  <bruno@clisp.org>
88335         New module 'wcsncmp'.
88336         * modules/wcsncmp: New file.
88337         * lib/wchar.in.h (wcsncmp): New declaration.
88338         * lib/wcsncmp.c: New file.
88339         * lib/wcsncmp-impl.h: New file, from libutf8 with modifications.
88340         * m4/wcsncmp.m4: New file.
88341         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsncmp is declared.
88342         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSNCMP, HAVE_WCSNCMP.
88343         * modules/wchar (Makefile.am): Substitute GNULIB_WCSNCMP, HAVE_WCSNCMP.
88344         * tests/test-wchar-c++.cc: Test the declaration of wcsncmp.
88345         * doc/posix-functions/wcsncmp.texi: Mention the new module.
88347 2011-02-05  Bruno Haible  <bruno@clisp.org>
88349         New module 'wcscmp'.
88350         * modules/wcscmp: New file.
88351         * lib/wchar.in.h (wcscmp): New declaration.
88352         * lib/wcscmp.c: New file.
88353         * lib/wcscmp-impl.h: New file, from libutf8 with modifications.
88354         * m4/wcscmp.m4: New file.
88355         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcscmp is declared.
88356         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCMP, HAVE_WCSCMP.
88357         * modules/wchar (Makefile.am): Substitute GNULIB_WCSCMP, HAVE_WCSCMP.
88358         * tests/test-wchar-c++.cc: Test the declaration of wcscmp.
88359         * doc/posix-functions/wcscmp.texi: Mention the new module.
88361 2011-02-05  Bruno Haible  <bruno@clisp.org>
88363         New module 'wcsncat'.
88364         * modules/wcsncat: New file.
88365         * lib/wchar.in.h (wcsncat): New declaration.
88366         * lib/wcsncat.c: New file.
88367         * lib/wcsncat-impl.h: New file, from libutf8 with modifications.
88368         * m4/wcsncat.m4: New file.
88369         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsncat is declared.
88370         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSNCAT, HAVE_WCSNCAT.
88371         * modules/wchar (Makefile.am): Substitute GNULIB_WCSNCAT, HAVE_WCSNCAT.
88372         * tests/test-wchar-c++.cc: Test the declaration of wcsncat.
88373         * doc/posix-functions/wcsncat.texi: Mention the new module.
88375 2011-02-05  Bruno Haible  <bruno@clisp.org>
88377         New module 'wcscat'.
88378         * modules/wcscat: New file.
88379         * lib/wchar.in.h (wcscat): New declaration.
88380         * lib/wcscat.c: New file.
88381         * lib/wcscat-impl.h: New file, from libutf8 with modifications.
88382         * m4/wcscat.m4: New file.
88383         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcscat is declared.
88384         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCAT, HAVE_WCSCAT.
88385         * modules/wchar (Makefile.am): Substitute GNULIB_WCSCAT, HAVE_WCSCAT.
88386         * tests/test-wchar-c++.cc: Test the declaration of wcscat.
88387         * doc/posix-functions/wcscat.texi: Mention the new module.
88389 2011-02-05  Bruno Haible  <bruno@clisp.org>
88391         New module 'wcpncpy'.
88392         * modules/wcpncpy: New file.
88393         * lib/wchar.in.h (wcpncpy): New declaration.
88394         * lib/wcpncpy.c: New file.
88395         * lib/wcpncpy-impl.h: New file, from libutf8 with modifications.
88396         * m4/wcpncpy.m4: New file.
88397         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcpncpy is declared.
88398         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCPNCPY, HAVE_WCPNCPY.
88399         * modules/wchar (Makefile.am): Substitute GNULIB_WCPNCPY, HAVE_WCPNCPY.
88400         * tests/test-wchar-c++.cc: Test the declaration of wcpncpy.
88401         * doc/posix-functions/wcpncpy.texi: Mention the new module.
88403 2011-02-05  Bruno Haible  <bruno@clisp.org>
88405         New module 'wcsncpy'.
88406         * modules/wcsncpy: New file.
88407         * lib/wchar.in.h (wcsncpy): New declaration.
88408         * lib/wcsncpy.c: New file.
88409         * lib/wcsncpy-impl.h: New file, from libutf8 with modifications.
88410         * m4/wcsncpy.m4: New file.
88411         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsncpy is declared.
88412         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSNCPY, HAVE_WCSNCPY.
88413         * modules/wchar (Makefile.am): Substitute GNULIB_WCSNCPY, HAVE_WCSNCPY.
88414         * tests/test-wchar-c++.cc: Test the declaration of wcsncpy.
88415         * doc/posix-functions/wcsncpy.texi: Mention the new module.
88417 2011-02-05  Bruno Haible  <bruno@clisp.org>
88419         New module 'wcpcpy'.
88420         * modules/wcpcpy: New file.
88421         * lib/wchar.in.h (wcpcpy): New declaration.
88422         * lib/wcpcpy.c: New file.
88423         * lib/wcpcpy-impl.h: New file, from libutf8 with modifications.
88424         * m4/wcpcpy.m4: New file.
88425         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcpcpy is declared.
88426         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCPCPY, HAVE_WCPCPY.
88427         * modules/wchar (Makefile.am): Substitute GNULIB_WCPCPY, HAVE_WCPCPY.
88428         * tests/test-wchar-c++.cc: Test the declaration of wcpcpy.
88429         * doc/posix-functions/wcpcpy.texi: Mention the new module.
88431 2011-02-05  Bruno Haible  <bruno@clisp.org>
88433         New module 'wcscpy'.
88434         * modules/wcscpy: New file.
88435         * lib/wchar.in.h (wcscpy): New declaration.
88436         * lib/wcscpy.c: New file.
88437         * lib/wcscpy-impl.h: New file, from libutf8 with modifications.
88438         * m4/wcscpy.m4: New file.
88439         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcscpy is declared.
88440         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCPY, HAVE_WCSCPY.
88441         * modules/wchar (Makefile.am): Substitute GNULIB_WCSCPY, HAVE_WCSCPY.
88442         * tests/test-wchar-c++.cc: Test the declaration of wcscpy.
88443         * doc/posix-functions/wcscpy.texi: Mention the new module.
88445 2011-02-05  Bruno Haible  <bruno@clisp.org>
88447         New module 'wcsnlen'.
88448         * modules/wcsnlen: New file.
88449         * lib/wchar.in.h (wcsnlen): New declaration.
88450         * lib/wcsnlen.c: New file.
88451         * lib/wcsnlen-impl.h: New file, from libutf8 with modifications.
88452         * m4/wcsnlen.m4: New file.
88453         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsnlen is declared.
88454         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSNLEN, HAVE_WCSNLEN.
88455         * modules/wchar (Makefile.am): Substitute GNULIB_WCSNLEN, HAVE_WCSNLEN.
88456         * tests/test-wchar-c++.cc: Test the declaration of wcsnlen.
88457         * doc/posix-functions/wcsnlen.texi: Mention the new module.
88459 2011-02-05  Bruno Haible  <bruno@clisp.org>
88461         New module 'wcslen'.
88462         * modules/wcslen: New file.
88463         * lib/wchar.in.h (wcslen): New declaration.
88464         * lib/wcslen.c: New file.
88465         * lib/wcslen-impl.h: New file, from libutf8 with modifications.
88466         * m4/wcslen.m4: New file.
88467         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcslen is declared.
88468         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSLEN, HAVE_WCSLEN.
88469         * modules/wchar (Makefile.am): Substitute GNULIB_WCSLEN, HAVE_WCSLEN.
88470         * tests/test-wchar-c++.cc: Test the declaration of wcslen.
88471         * doc/posix-functions/wcslen.texi: Mention the new module.
88473 2011-02-05  Bruno Haible  <bruno@clisp.org>
88475         New module 'wmemset'.
88476         * modules/wmemset: New file.
88477         * lib/wchar.in.h (wmemset): New declaration.
88478         * lib/wmemset.c: New file.
88479         * lib/wmemset-impl.h: New file, from libutf8 with modifications.
88480         * m4/wmemset.m4: New file.
88481         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wmemset is declared.
88482         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WMEMSET, HAVE_WMEMSET.
88483         * modules/wchar (Makefile.am): Substitute GNULIB_WMEMSET, HAVE_WMEMSET.
88484         * tests/test-wchar-c++.cc: Test the declaration of wmemset.
88485         * doc/posix-functions/wmemset.texi: Mention the new module.
88487 2011-02-05  Bruno Haible  <bruno@clisp.org>
88489         New module 'wmemmove'.
88490         * modules/wmemmove: New file.
88491         * lib/wchar.in.h (wmemmove): New declaration.
88492         * lib/wmemmove.c: New file.
88493         * lib/wmemmove-impl.h: New file, from libutf8 with modifications.
88494         * m4/wmemmove.m4: New file.
88495         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wmemmove is declared.
88496         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WMEMMOVE, HAVE_WMEMMOVE.
88497         * modules/wchar (Makefile.am): Substitute GNULIB_WMEMMOVE,
88498         HAVE_WMEMMOVE.
88499         * tests/test-wchar-c++.cc: Test the declaration of wmemmove.
88500         * doc/posix-functions/wmemmove.texi: Mention the new module.
88502 2011-02-05  Bruno Haible  <bruno@clisp.org>
88504         New module 'wmemcpy'.
88505         * modules/wmemcpy: New file.
88506         * lib/wchar.in.h (wmemcpy): New declaration.
88507         * lib/wmemcpy.c: New file.
88508         * lib/wmemcpy-impl.h: New file, from libutf8 with modifications.
88509         * m4/wmemcpy.m4: New file.
88510         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wmemcpy is declared.
88511         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WMEMCPY, HAVE_WMEMCPY.
88512         * modules/wchar (Makefile.am): Substitute GNULIB_WMEMCPY, HAVE_WMEMCPY.
88513         * tests/test-wchar-c++.cc: Test the declaration of wmemcpy.
88514         * doc/posix-functions/wmemcpy.texi: Mention the new module.
88516 2011-02-05  Bruno Haible  <bruno@clisp.org>
88518         New module 'wmemcmp'.
88519         * modules/wmemcmp: New file.
88520         * lib/wchar.in.h (wmemcmp): New declaration.
88521         * lib/wmemcmp.c: New file.
88522         * lib/wmemcmp-impl.h: New file, from libutf8 with modifications.
88523         * m4/wmemcmp.m4: New file.
88524         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wmemcmp is declared.
88525         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WMEMCMP, HAVE_WMEMCMP.
88526         * modules/wchar (Makefile.am): Substitute GNULIB_WMEMCMP, HAVE_WMEMCMP.
88527         * tests/test-wchar-c++.cc: Test the declaration of wmemcmp.
88528         * doc/posix-functions/wmemcmp.texi: Mention the new module.
88530 2011-02-07  Jim Meyering  <meyering@redhat.com>
88532         di-set, ino-map: new modules, from coreutils
88533         * lib/di-set.c: New file.
88534         * lib/di-set.h: Likewise.
88535         * lib/ino-map.c: Likewise.
88536         * lib/ino-map.h: Likewise.
88537         * modules/di-set: Likewise.
88538         * modules/di-set-tests: Likewise.
88539         * modules/ino-map: Likewise.
88540         * modules/ino-map-tests: Likewise.
88541         * tests/test-di-set.c: Likewise.
88542         * tests/test-ino-map.c: Likewise.
88544 2011-02-06  Paul Eggert  <eggert@cs.ucla.edu>
88546         getloadavg: merge minor changes from Emacs
88548         * lib/getloadavg.c (getloadavg_initialized): More-accurate comment.
88549         (getloadavg): Use memset, not bzero.
88551         2008-07-25  Chong Yidong  <cyd@stupidchicken.com>
88552         * lib/getloadavg.c (nl): Rename to name_list to avoid ncurses.h
88553         clash (bug#86).
88555 2010-11-14  Bruno Haible  <bruno@clisp.org>
88557         Allow multiple gnulib generated replacements to coexist.
88558         * lib/getopt.in.h (struct option): Avoid identical redefinition.
88559         * lib/inttypes.in.h (imaxdiv_t): Likewise.
88560         * lib/langinfo.in.h (nl_item): Likewise.
88561         * lib/math.in.h (_NaN, NAN): Likewise.
88562         * lib/netdb.in.h (struct addrinfo): Likewise.
88563         * lib/poll.in.h (struct pollfd, nfds_t): Likewise.
88564         * lib/pthread.in.h (pthread_t, pthread_attr_t, pthread_barrier_t,
88565         pthread_barrierattr_t, pthread_cond_t, pthread_condattr_t,
88566         pthread_key_t, pthread_mutex_t, pthread_mutexattr_t, pthread_once_t,
88567         pthread_rwlock_t, pthread_rwlockattr_t, pthread_cond_destroy,
88568         pthread_cond_init, pthread_cond_signal, pthread_cond_wait,
88569         pthread_create, pthread_exit, pthread_join, pthread_mutexattr_destroy,
88570         pthread_mutexattr_init, pthread_mutexattr_settype,
88571         pthread_mutex_destroy, pthread_mutex_init, pthread_mutex_lock,
88572         pthread_mutex_trylock, pthread_mutex_unlock, pthread_spinlock_t,
88573         pthread_spin_init, pthread_spin_destroy, pthread_spin_lock,
88574         pthread_spin_trylock, pthread_spin_unlock): Likewise.
88575         * lib/sched.in.h (struct sched_param): Likewise.
88576         * lib/se-selinux.in.h (security_class_t, security_context_t,
88577         is_selinux_enabled, getcon, freecon, getfscreatecon, setfscreatecon,
88578         matchpathcon, getfilecon, lgetfilecon, fgetfilecon, setfilecon,
88579         lsetfilecon, fsetfilecon, security_check_context,
88580         security_check_context_raw, setexeccon, matchpathcon_init_prefix):
88581         Likewise.
88582         * lib/search.in.h (VISIT, _gl_search_compar_fn, _gl_search_action_fn):
88583         Likewise.
88584         * lib/signal.in.h (sig_atomic_t, sigset_t, verify_NSIG_constraint,
88585         _gl_function_taking_int_returning_void_t, union sigval,
88586         struct siginfo_t, siginfo_t, struct sigaction): Likewise.
88587         * lib/spawn.in.h (posix_spawnattr_t, posix_spawn_file_actions_t,
88588         verify_POSIX_SPAWN_USEVFORK_no_overlap): Likewise.
88589         * lib/stdint.in.h (gl_int8_t, gl_uint8_t, gl_int16_t, gl_uint16_t,
88590         gl_int32_t, gl_uint32_t, gl_int64_t, gl_uint64_t, int_least8_t,
88591         uint_least8_t, int_least16_t, uint_least16_t, int_least32_t,
88592         uint_least32_t, int_least64_t, uint_least64_t, gl_int_fast8_t,
88593         gl_uint_fast8_t, gl_int_fast16_t, gl_uint_fast16_t, gl_int_fast32_t,
88594         gl_uint_fast32_t, int_fast64_t, uint_fast64_t, gl_intptr_t,
88595         gl_uintptr_t, intmax_t, uintmax_t, _verify_intmax_size): Likewise.
88596         * lib/stdio.in.h (rpl_fseek, rpl_ftell): Likewise.
88597         * lib/sys_socket.in.h (sa_family_t, struct sockaddr_storage,
88598         socklen_t, rpl_fd_isset): Likewise.
88599         * lib/sys_stat.in.h (rpl_mkdir): Likewise.
88600         * lib/sys_time.in.h (struct timeval): Likewise.
88601         * lib/sys_times.in.h (struct tms): Likewise.
88602         * lib/sys_utsname.in.h (struct utsname):
88603         * lib/time.in.h (struct timespec, __time_t_must_be_integral): Likewise.
88604         * lib/unistd.in.h (getpagesize): Likewise.
88605         * lib/wchar.in.h (mbstate_t): Likewise.
88606         * lib/wctype.in.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
88607         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit,
88608         towlower, towupper): Likewise.
88609         Reported by Sam Steingold <sds@gnu.org>.
88611 2011-02-05  Eric Blake  <eblake@redhat.com>
88613         unsetenv: work around Haiku issues
88614         * m4/setenv.m4 (gl_FUNC_UNSETENV): Also detect Haiku issue.
88615         * doc/posix-functions/unsetenv.texi (unsetenv): Document it.
88617 2010-12-30  Bruce Korb  <bkorb@gnu.org>
88619         libposix: avoid calling error() within libposix
88620         * lib/openat-die.c: remove error module stuff when GNULIB_LIBPOSIX
88621         is defined.
88623 2011-02-05  Eric Blake  <eblake@redhat.com>
88625         strerror_r-posix: port to cygwin
88626         * lib/strerror_r.c (strerror_r) [__CYGWIN__]: Add cygwin
88627         implementation.
88628         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Adjust comment.
88629         * tests/test-strerror_r.c (main): Fix test.
88630         * doc/posix-functions/strerror_r.texi (strerror_r): Document the
88631         issue.
88633 2011-02-05  Bruno Haible  <bruno@clisp.org>
88635         New module 'wmemchr'.
88636         * modules/wmemchr: New file.
88637         * lib/wchar.in.h (wmemchr): New declaration.
88638         * lib/wmemchr.c: New file.
88639         * lib/wmemchr-impl.h: New file, from libutf8 with modifications.
88640         * m4/wmemchr.m4: New file.
88641         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wmemchr is declared.
88642         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WMEMCHR, HAVE_WMEMCHR.
88643         * modules/wchar (Makefile.am): Substitute GNULIB_WMEMCHR, HAVE_WMEMCHR.
88644         * tests/test-wchar-c++.cc: Test the declaration of wmemchr.
88645         * doc/posix-functions/wmemchr.texi: Mention the new module.
88647 2011-02-04  Eric Blake  <eblake@redhat.com>
88649         fdopendir: detect FreeBSD bug
88650         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Detect bug.
88651         * doc/posix-functions/fdopendir.texi (fdopendir): Document it.
88653 2011-02-04  Paul Eggert  <eggert@cs.ucla.edu>
88655         stdbool: do not define HAVE_STDBOOL_H
88656         * m4/stdbool.m4 (AC_CHECK_HEADER_STDBOOL): Renamed from
88657         AC_HEADER_STDBOOL.  All uses changed.  Do not define
88658         HAVE_STDBOOL_H, as gnulib does not need this.  This change is
88659         imported from the latest Autoconf git.  It was motivated by Emacs,
88660         which uses gnulib but does not need HAVE_STDBOOL_H.
88662 2011-02-04  Bruno Haible  <bruno@clisp.org>
88664         wcsnrtombs: Prepare for new module wwcsnrtombs.
88665         * lib/wcsnrtombs-impl.h: New file, extracted from lib/wcsnrtombs.c.
88666         * lib/wcsnrtombs.c: Include it.
88667         * modules/wcsnrtombs (Files): Add lib/wcsnrtombs-impl.h.
88669         wcsrtombs: Prepare for new module wwcsrtombs.
88670         * lib/wcsrtombs-impl.h: New file, extracted from lib/wcsrtombs.c.
88671         * lib/wcsrtombs.c: Include it.
88672         * modules/wcsrtombs (Files): Add lib/wcsrtombs-impl.h.
88674         mbsnrtowcs: Prepare for new module mbsnrtowwcs.
88675         * lib/mbsnrtowcs-impl.h: New file, extracted from lib/mbsnrtowcs.c.
88676         * lib/mbsnrtowcs.c: Include it.
88677         * modules/mbsnrtowcs (Files): Add lib/mbsnrtowcs-impl.h.
88679         mbsrtowcs: Prepare for new module mbsrtowwcs.
88680         * lib/mbsrtowcs-impl.h: New file, extracted from lib/mbsrtowcs.c.
88681         * lib/mbsrtowcs.c: Include it.
88682         * modules/mbsrtowcs (Files): Add lib/mbsrtowcs-impl.h.
88684 2011-02-04  Bruno Haible  <bruno@clisp.org>
88686         vasnprintf: Reduce use of malloc for small format strings.
88687         * lib/printf-args.h (N_DIRECT_ALLOC_ARGUMENTS): New macro.
88688         (arguments): Add room for the first 7 arguments.
88689         * lib/printf-parse.h (N_DIRECT_ALLOC_DIRECTIVES): New macro.
88690         (char_directives, u8_directives, u16_directives, u32_directives): Add
88691         room for the first 7 directives.
88692         * lib/printf-parse.c: Include <string.h>.
88693         (PRINTF_PARSE): Change memory handling code so that it uses the first
88694         7 preallocated elements in an 'arguments' or 'DIRECTIVES' struct.
88695         * lib/vasnprintf.c (VASNPRINTF): Update memory handling code.
88696         Reported by Pádraig Brady <P@draigbrady.com>.
88698 2011-01-31  Eric Blake  <eblake@redhat.com>
88700         dup2: work around Haiku bug
88701         * m4/dup2.m4 (gl_FUNC_DUP2): Test for bug.
88702         * lib/dup2.c (rpl_dup2) [!WIN32]: Add workaround.
88703         * doc/posix-functions/dup2.texi (dup2): Document the bug.
88704         * tests/test-dup2.c (main): Enhance test.
88706 2011-01-31  Simon Josefsson  <simon@josefsson.org>
88708         doc: off_t is not available in eglibc 2.11.2 stdio.h.
88709         * doc/posix-headers/stdio.texi (stdio.h): Mention that off_t isn't
88710         declared by eglibc 2.11.2.
88711         * lib/stdio.in.h: Likewise.
88713 2011-01-31  Eric Blake  <eblake@redhat.com>
88715         ignore-value: add missing test dependency
88716         * tests/test-ignore-value.c: Revert previous change; stdio.h
88717         provides off_t.
88718         * modules/ignore-value-tests (Depends-on): Add missing dependency.
88720 2011-01-30  Paul Eggert  <eggert@cs.ucla.edu>
88722         mktime: clarify long_int width checking
88723         * lib/mktime.c (long_int_is_wide_enough): Move this assertion to
88724         the top level, to make it clearer that the assumption about
88725         long_int width is being checked.  See
88726         <http://lists.gnu.org/r/bug-gnulib/2011-01/msg00554.html>.
88728 2011-01-30  Simon Josefsson  <simon@josefsson.org>
88730         ignore-value: Fix self-test.
88731         * tests/test-ignore-value.c: Include sys/types.h for off_t.
88733 2011-01-29  Paul Eggert  <eggert@cs.ucla.edu>
88735         TYPE_MAXIMUM: avoid theoretically undefined behavior
88736         * lib/intprops.h (TYPE_MINIMUM, TYPE_MAXIMUM): Do not shift a
88737         negative number, which the C Standard says has undefined behavior.
88738         In practice this is not a problem, but might as well do it by the book.
88739         Reported by Rich Felker and Eric Blake; see
88740         <http://lists.gnu.org/r/bug-gnulib/2011-01/msg00493.html>.
88741         * lib/strtol.c (TYPE_MINIMUM, TYPE_MAXIMUM): Likewise.
88742         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
88743         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
88744         * m4/parse-datetime.m4 (gl_PARSE_DATETIME): Likewise.
88745         * m4/stdint.m4 (gl_STDINT_H): Likewise.
88746         * lib/mktime.c (TYPE_MAXIMUM): Redo slightly to match the others.
88748         mktime: #undef mktime before #defining it
88749         * lib/mktime.c (mktime) [DEBUG]: #undef mktime before #defining it.
88751         mktime: systematically normalize tm_isdst comparisons
88752         * lib/mktime.c (isdst_differ): New function.
88753         (__mktime_internal): Use it systematically for all isdst comparisons.
88754         This completes the fix for libc BZ #6723, and removes the need for
88755         normalizing tm_isdst.  See
88756         <http://sourceware.org/bugzilla/show_bug.cgi?id=6723>
88757         (not_equal_tm) [DEBUG]: Use isdst_differ here, too.
88759         mktime: fix some integer overflow issues and sidestep the rest
88761         This was prompted by a bug report by Benjamin Lindner for MinGW
88762         <http://lists.gnu.org/r/bug-gnulib/2011-01/msg00472.html>.
88763         His bug is due to signed integer overflow (0 - INT_MIN), and I
88764         I scanned through mktime.c looking for other integer overflow
88765         problems, fixing all the bugs I found.
88767         Although the C Standard says the resulting code is still not safe
88768         in the presence of integer overflow, in practice it should be good
88769         enough for all real-world two's-complement implementations, except
88770         for debugging environments that deliberately trap on integer
88771         overflow (e.g., gcc -ftrapv).
88773         * lib/mktime.c (WRAPV): New macro.
88774         (SHR): Also check that long_int and time_t shift right in the
88775         usual way, before using the fast-but-unportable method.
88776         (TYPE_ONES_COMPLEMENT, TYPE_SIGNED_MAGNITUDE): Remove, no longer
88777         used.  The code already assumed two's complement, so there's
88778         no need to test for alternatives.  All uses removed.
88779         (TYPE_MAXIMUM): Don't rely here on overflow behavior not defined by
88780         the C standard.  Problem reported by Rich Felker in
88781         <http://lists.gnu.org/r/bug-gnulib/2011-01/msg00488.html>.
88782         (twos_complement_arithmetic): Also check long_int and time_t.
88783         (time_t_avg, time_t_add_ok, time_t_int_add_ok): New functions.
88784         (guess_time_tm, ranged_convert, __mktime_internal): Use them.
88785         (__mktime_internal): Avoid integer overflow with unary subtraction
88786         in two instances where -1 - X is an adequate replacement for -X,
88787         since the calculations are approximate.
88789 2011-01-29  Eric Blake  <eblake@redhat.com>
88791         mktime: avoid infinite loop
88792         * m4/mktime.m4 (AC_FUNC_MKTIME): Avoid overflow on possibly-signed
88793         type; behavior is still undefined but portable to all known targets.
88794         Reported by Rich Felker.
88796 2011-01-29  Simon Josefsson  <simon@josefsson.org>
88798         rename, unlink, same-inode: Relicense.
88799         * modules/rename (License): Relax from LGPLv3+ to LGPLv2+.
88800         * modules/unlink (License): Likewise.
88801         * modules/same-inode (License): Likewise.
88803 2011-01-28  Paul Eggert  <eggert@cs.ucla.edu>
88805         mktime: avoid problems on NetBSD 5 / i386
88806         * lib/mktime.c (long_int): New type.  This works around a problem
88807         on NetBSD 5 / i386, where 'long int' and 'int' are both 32 bits
88808         but time_t is 64 bits, and where I expect the existing code is
88809         wrong in some cases.
88810         (leapyear, ydhms_diff, guess_time_tm, __mktime_internal): Use it.
88811         (ydhms_diff): Bring back the compile-time check for wide-enough
88812         year and yday.
88814         mktime: fix misspelling in comment
88815         * lib/mktime.c (__mktime_internal): Fix misspelling in comment.
88816         This merges all recent glibc changes of importance.
88818 2011-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
88820         move-if-change: cope with concurrent mv of identical file.
88821         * build-aux/move-if-change (CMPPROG): Accept environment
88822         variable as an override for `cmp'.
88823         (usage): Document CMPPROG.
88824         Adjust comparison to drop stdout.  Cope with failure of mv if
88825         the target file exists and is identical to the source, for
88826         parallel builds.
88827         Report from H.J. Lu against binutils in PR binutils/12283.
88829 2011-01-28  Bruce Korb  <bkorb@gnu.org>
88831         * users.txt: Mention sharutils.
88833 2011-01-28  Simon Josefsson  <simon@josefsson.org>
88835         * users.txt: Mention OATH Toolkit.
88837 2011-01-27  Bruno Haible  <bruno@clisp.org>
88839         Prepare for supporting FreeBSD 10.
88840         * build-aux/config.libpath: Remove handling of freebsd1*.
88842 2011-01-27  Gerald Pfeifer  <gerald@pfeifer.com>  (tiny change)
88844         Prepare for supporting FreeBSD 10.
88845         * build-aux/config.rpath: Remove handling of freebsd1* which soon would
88846         match FreeBSD 10.0.
88848 2011-01-27  Bruno Haible  <bruno@clisp.org>
88850         vma-iter, get-rusage-as: Add OpenBSD support.
88851         * modules/vma-iter (configure.ac): Test for mquery.
88852         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define also on OpenBSD.
88853         * lib/vma-iter.c: Include <sys/mman.h>.
88854         (vma_iterate): Add an implementation based on mquery().
88855         * lib/resource-ext.h (get_rusage_as): Update comments.
88856         * lib/get-rusage-as.c: Likewise.
88857         * lib/get-rusage-data.c: Likewise.
88859 2011-01-26  Karl Berry  <karl@gnu.org>
88861         * doc/Makefile (lang_env, makeinfo_prog, manual_opts): new
88862         variables to make it easier to override the makeinfo program used.
88864 2011-01-26  Eric Blake  <eblake@redhat.com>
88866         fcntl: work around Haiku F_DUPFD bugs
88867         * m4/fcntl.m4 (gl_FUNC_FCNTL): Also catch Haiku errno bug.
88868         * lib/fcntl.c (rpl_fcntl) [F_DUPFD]: Work around Haiku losing
88869         cloexec bit on duplication.
88870         * doc/posix-functions/fcntl.texi (fcntl): Document the bug.
88872 2011-01-26  Bruno Haible  <bruno@clisp.org>
88874         Enable memory leak tests on AIX.
88875         * tests/test-dprintf-posix2.c (main): Don't skip the test on AIX.
88876         * tests/test-fprintf-posix3.c (main): Likewise.
88878 2011-01-26  Bruno Haible  <bruno@clisp.org>
88880         Tests for module 'get-rusage-data'.
88881         * modules/get-rusage-data-tests: New file.
88882         * tests/test-get-rusage-data.c: New file.
88884         New module 'get-rusage-data'.
88885         * lib/resource-ext.h (get_rusage_data): New declaration.
88886         * lib/get-rusage-data.c: New file.
88887         * modules/get-rusage-data: New file.
88889 2011-01-25  Bruno Haible  <bruno@clisp.org>
88891         get-rusage-as: Allow for easier testing.
88892         * lib/resource-ext.h (get_rusage_as): Add comment.
88893         * lib/get-rusage-as.c (get_rusage_as_via_setrlimit): Define always.
88894         (main): New function for interactive testing.
88896 2011-01-25  Bruno Haible  <bruno@clisp.org>
88898         vma-iter: Treat Haiku like BeOS.
88899         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define on Haiku as well.
88900         * lib/vma-iter.c (vma_iterate) [Haiku]: Use the BeOS API.
88902 2011-01-25  Eric Blake  <eblake@redhat.com>
88904         c-stack: fix regression on cygwin when libsigsegv is present
88905         * lib/c-stack.c (die): Don't flatten error if sigsegv is present.
88907 2011-01-24  Bruno Haible  <bruno@clisp.org>
88909         vma-iter: Avoid empty intervals.
88910         * lib/vma-iter.c (vma_iterate) [IRIX, OSF/1]: Don't call the callback
88911         on an empty interval.
88913 2011-01-24  Jim Meyering  <meyering@redhat.com>
88915         u64: remove unnecessary #include
88916         * lib/u64.h: Don't include <stddef.h>.  It was not used.
88918 2011-01-23  Paul Eggert  <eggert@cs.ucla.edu>
88920         Allow the user to avoid the HAVE_RAW_DECL_* macros.
88921         * m4/gnulib-common.m4 (gl_ASSERT_NO_GNULIB_POSIXCHECK): New macro.
88923 2011-01-23  Bruno Haible  <bruno@clisp.org>
88925         New module 'vma-iter'.
88926         * lib/vma-iter.h: New file.
88927         * lib/vma-iter.c: New file, based on lib/get-rusage-as.c.
88928         * modules/vma-iter: New file.
88929         * lib/get-rusage-as.c: Include vma-iter.h. Don't include system headers
88930         for get_rusage_as_via_iterator.
88931         (vma_iterate_callback): New function.
88932         (get_rusage_as_via_iterator): Rewritten to use vma_iterate.
88933         * modules/get-rusage-as (Depends-on): Add vma-iter.
88935 2011-01-23  Bruno Haible  <bruno@clisp.org>
88937         uninorm: Tweak includes.
88938         * lib/uninorm/normalize-internal.h: Don't include <stddef.h>.
88939         Reported by Jim Meyering.
88941 2011-01-23  Bruno Haible  <bruno@clisp.org>
88943         get-rusage-as: Improve on NetBSD.
88944         * lib/get-rusage-as.c (get_rusage_as_via_iterator): On NetBSD, use
88945         /proc, like on FreeBSD.
88947 2011-01-23  Jim Meyering  <meyering@redhat.com>
88949         xreadlink.h: remove unnecessary #include
88950         * lib/xreadlink.h: Don't include <stddef.h>.  It was not used.
88952         maint.mk: add syntax-check rule: detect unnecessary #include <stddef.h>
88953         * top/maint.mk (sc_prohibit_stddef_without_use): New rule.
88955 2011-01-23  Bruno Haible  <bruno@clisp.org>
88957         get-rusage-as: Fix bug.
88958         * lib/get-rusage-as.c (get_rusage_as_via_setrlimit): Restore the
88959         original limit when aborting the first loop.
88961 2011-01-23  Bruno Haible  <bruno@clisp.org>
88963         wctype: Ensure valid C syntax.
88964         * m4/wctype_h.m4 (gl_WCTYPE_H): Invoke gl_CHECK_NEXT_HEADERS
88965         unconditionally, instead of gl_NEXT_HEADERS conditionally.
88967 2011-01-21  Paul Eggert  <eggert@cs.ucla.edu>
88969         getopt: omit HAVE_OPTRESET, HAVE_GETOPT_CLIP from config.h
88970         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not put the
88971         symbols HAVE_OPTRESET and HAVE_GETOPT_CLIP into config.h,
88972         as they are needed only for configure's test case.
88973         This removes two unnecessary symbols from config.h.
88975         gl_CHECK_NEXT_HEADERS implies AC_CHECK_HEADERS_ONCE
88976         * m4/include_next.m4 (gl_CHECK_HEXT_HEADERS): Document this.
88977         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Don't bother to invoke
88978         AC_CHECK_HEADERS_ONCE on a header that we also invoke
88979         gl_CHECK_NEXT_HEADERS on, since the latter invokes the former.
88980         * m4/netdb_h.m4 (gl_HEADER_NETDB): Likewise.
88981         * m4/pthread.m4 (gl_PTHREAD_CHECK): Likewise.
88982         * m4/sched_h.m4 (gl_SCHED_H): Likewise.
88983         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
88984         * m4/spawn_h.m4 (gl_SPAWN_H): Likewise.
88985         * m4/sys_file_h.m4 (gl_HEADER_SYS_FILE_H): Likewise.
88986         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
88987         * m4/sys_times_h.m4 (gl_SYS_TIMES_H): Likewise.
88988         * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H): Likewise.
88989         * m4/termios_h.m4 (gl_TERMIOS_H): Likewise.
88990         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
88991         * m4/wchar_h.m4 (gl_WCHAR_H): Likewise.
88992         * m4/wctype_h.m4 (gl_WCTYPE_H): Likewise.
88994 2011-01-21  Eric Blake  <eblake@redhat.com>
88996         maintainer-makefile: work with older git for submodule check
88997         * top/maint.mk (public-submodule-commit): Rewrite to avoid
88998         merge-base --independent, which Ubuntu 10.04 git 1.7.0.4 lacks.
88999         Reported by Matthias Bolte.
89001         bootstrap: minor portability fixes
89002         * build-aux/bootstrap (me): Use $me instead of $0 in functions.
89003         (usage): Omit leading capital and trailing . on help phrases, per
89004         GNU Coding Standards.
89005         (check_versions, top level): Prefix messages with script name.
89007 2011-01-21  Benjamin Lindner  <bjmldn@gmail.com>  (tiny change)
89009         bootstrap: support --no-git option
89010         * build-aux/bootstrap: Add --no-git option, to be used when
89011         --gnulib-srcdir points to the exact desired checkout.
89013 2011-01-21  Eric Blake  <eblake@redhat.com>
89015         strerror_r-posix: work with glibc 2.13
89016         * lib/strerror_r.c (strerror_r): Fix return type.
89018 2011-01-21  Pádraig Brady  <P@draigBrady.com>
89019             Bruno Haible  <bruno@clisp.org>
89021         uN_strstr: New unit tests.
89022         * modules/unistr/u8-strstr-tests: New file.
89023         * modules/unistr/u16-strstr-tests: New file.
89024         * modules/unistr/u32-strstr-tests: New file.
89025         * tests/unistr/test-u-strstr.h: New file, based on tests/test-strstr.c.
89026         * tests/unistr/test-u8-strstr.c: New file.
89027         * tests/unistr/test-u16-strstr.c: New file.
89028         * tests/unistr/test-u32-strstr.c: New file.
89030 2011-01-21  Pádraig Brady  <P@draigBrady.com>
89031             Bruno Haible  <bruno@clisp.org>
89033         Make uN_strstr functions O(n) worst-case.
89034         * lib/unistr/u-strstr.h (FUNC): In the 8-bit case, use strstr. In the
89035         16-bit and 32-bit unit cases, use the unibyte algorithm from
89036         lib/mbsstr.c.
89037         * lib/unistr/u8-strstr.c: Include <string.h>.
89038         (UNIT_IS_UINT8_T): New macro.
89039         * lib/unistr/u16-strstr.c: Include malloca.h and str-kmp.h.
89040         (U_STRLEN, U_STRNLEN): New macros.
89041         * lib/unistr/u32-strstr.c: Include malloca.h and str-kmp.h.
89042         (U_STRLEN, U_STRNLEN): New macros.
89043         * modules/unistr/u8-strstr (Depends-on): Add strstr.
89044         (configure.ac): Update required libunistring version.
89045         * modules/unistr/u16-strstr (Files): Add lib/str-kmp.h.
89046         (Depends-on): Add unistr/u16-strlen, unistr/u16-strnlen, stdbool,
89047         malloca.
89048         (configure.ac): Update required libunistring version.
89049         * modules/unistr/u32-strstr (Files): Add lib/str-kmp.h.
89050         (Depends-on): Add unistr/u32-strlen, unistr/u32-strnlen, stdbool,
89051         malloca.
89052         (configure.ac): Update required libunistring version.
89054 2011-01-21  Pádraig Brady  <P@draigBrady.com>
89055             Bruno Haible  <bruno@clisp.org>
89057         Prepare for faster uN_strstr functions.
89058         * lib/str-kmp.h: Support definable UNITs.
89059         (knuth_morris_pratt): Renamed from knuth_morris_pratt_unibyte. Add
89060         needle_len argument.
89061         * lib/mbsstr.c (mbsstr): Adjust for the changed str-kmp.h.
89062         * lib/mbscasestr.c (mbscasestr): Likewise.
89064 2011-01-21  Pádraig Brady  <P@draigBrady.com>
89066         malloca-tests: make faster by unsetting MALLOC_PERTURB_
89067         * tests/test-malloca.c (main): Unset the environment variable
89068         to greatly speed up the test.
89069         * tests/init.sh: Don't say that MALLOC_PERTURB_ is cheap.
89070         * modules/malloca-tests: Depend on unsetenv.
89072 2011-01-21  Pádraig Brady  <P@draigBrady.com>
89074         ignore-value: remove stdint dependency
89075         * lib/ignore-value.h: Remove <stdint.h>
89076         * modules/ignore-value: Remove stdint dependency.
89078 2011-01-21  Jim Meyering  <meyering@redhat.com>
89080         maint.mk: adjust variable name to be consistent with other gl_ vars
89081         * top/maint.mk (gl_public_submodule_commit): Rename the variable
89082         to be lower case.
89084 2011-01-20  Jim Meyering  <meyering@redhat.com>
89086         maint.mk: make "check" depend on public-submodule-commit by default
89087         * top/maint.mk (GL_PUBLIC_SUBMODULE_COMMIT): New overridable variable.
89089 2011-01-20  Bruno Haible  <bruno@clisp.org>
89091         mbfile, mbiter: Complete change from 2008-12-21.
89092         * m4/mbfile.m4 (gl_MBFILE): Don't require AC_FUNC_MBRTOWC.
89093         * m4/mbiter.m4 (gl_MBITER): Likewise.
89095 2011-01-20  Jim Meyering  <meyering@redhat.com>
89097         init.sh: insert space between each function name and "()"
89098         * tests/init.sh: Make it a little easier to see that a function's
89099         name is "warn_", and not "warn" when looking at the first part of
89100         its definition: "warn_ ()".  Suggested by Ralf Wildenhues.
89102 2011-01-20  Jim Meyering  <meyering@redhat.com>
89104         mountlist: clean up code formatting
89105         * lib/mountlist.c (read_file_system_list): Split a long line,
89106         correct bracing style, use NULL in place of "(struct statfs *)0",
89107         don't parenthesize return value, add spaces around "=" and after
89108         ";-in-for-stmt".
89110 2011-01-14  Markus Duft  <mduft@gentoo.org>
89112         mountlist: add support for Interix
89113         * lib/mountlist.c (read_file_system_list) [MOUNTED_INTERIX_STATVFS]:
89114         Apply statvfs to all entries of /dev/fs.
89115         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for statvfs,
89116         and if found, AC_DEFINE MOUNTED_INTERIX_STATVFS.
89118 2011-01-20  Jim Meyering  <meyering@redhat.com>
89120         maint.mk: improve the public-submodule-commit rule
89121         * top/maint.mk (public-submodule-commit): Prefix with $(AM_V_GEN),
89122         to suppress printing of its commands... unless V=1.
89123         Add git submodule's --quiet option to suppress printing of e.g.,
89124         "Entering gnulib" output.
89125         "cd" into $(srcdir) before running git submodule.
89127 2011-01-20  Bruno Haible  <bruno@clisp.org>
89129         include_next: Fix bug introduced on 2011-01-18.
89130         * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): New macro, extracted
89131         from gl_CHECK_NEXT_HEADERS and gl_NEXT_HEADERS. Omit test of
89132         ac_cv_header_... variable if the second argument is not 'check'.
89133         (gl_CHECK_NEXT_HEADERS, gl_NEXT_HEADERS): Invoke
89134         gl_NEXT_HEADERS_INTERNAL.
89136 2011-01-20  Bruno Haible  <bruno@clisp.org>
89138         Allow the user to avoid the GNULIB_TEST_* macros.
89139         * m4/gnulib-common.m4 (gl_ASSERT_NO_GNULIB_TESTS): New macro.
89140         Suggested by Paul Eggert.
89142 2011-01-14  Jim Meyering  <meyering@redhat.com>
89144         bootstrap: avoid failure when there is no .gitmodules file
89145         ": ${gnulib_path=gnulib}" fails to set $gnulib_path when that variable
89146         has been assigned to, even when its value is the empty string.
89147         * build-aux/bootstrap (gnulib_path): Test explicitly for an empty
89148         "$gnulib_path", rather than using ${gnulib_path=gnulib}.
89149         Reported by John W. Eaton <jwe@gnu.org>.
89151 2011-01-19  Paul Eggert  <eggert@cs.ucla.edu>
89153         assume <ctype.h>, ..., <time.h> exist
89154         For years gnulib has been assuming the existence of the headers
89155         <ctype.h>, <errno.h>, <fcntl.h>, <locale.h>, <signal.h>,
89156         <stdio.h>, <stdlib.h>, <string.h>, and <time.h>.  Omit checks for
89157         them, since they don't appear to be needed.
89158         * README (Portability guidelines): Document this.
89159         * lib/flock.c: Assume <fcntl.h> exists.
89160         * lib/regex_internal.h: Assume <locale.h> exists.
89161         * m4/ctype.m4 (gl_CTYPE_H): Assume <ctype.h> exists.
89162         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Assume <errno.h> exists.
89163         * m4/fcntl_h.m4 (gl_FCNTL_H): Assume <fcntl.h> exists.
89164         * m4/flock.m4 (gl_PREREQ_FLOCK): Likewise.
89165         * m4/locale_h.m4 (gl_LOCALE_H): Assume <locale.h> exists.
89166         * m4/regex.m4 (gl_REGEX): Likewise.
89167         * m4/signal_h.m4 (gl_SIGNAL_H): Assume <signal.h> exists.
89168         * m4/stdio_h.m4 (gl_STDIO_H): Assume <stdio.h> exists.
89169         * m4/stdlib_h.m4 (gl_STDLIB_H): Assume <stdlib.h> exists.
89170         * m4/string_h.m4 (gl_STRING_H): Assume <string.h> exists.
89171         * tests/test-argp.c: Likewise.
89172         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Assume <time.h> exists.
89174         multiarch: remove AA_APPLE_UNIVERSAL_BUILD
89175         * m4/multiarch.m4 (gl_MULTIARCH): Don't AC_DEFINE
89176         AA_APPLE_UNIVERSAL_BUILD.  See
89177         <http://lists.gnu.org/r/bug-gnulib/2011-01/msg00247.html>.
89178         * NEWS: Document this.
89180 2011-01-19  Eric Blake  <eblake@redhat.com>
89182         c-stack: assume stack overflow if SA_SIGINFO unsupported
89183         * lib/c-stack.c (SIGACTION_WORKS): Rename...
89184         (SIGINFO_WORKS): ...since gnulib module guarantees that (most) of
89185         sigaction will work.
89186         (die): Assume stack overflow if siginfo doesn't work, to let Haiku
89187         behavior match Linux.
89188         * tests/test-c-stack.c (main): Prefer NULL for pointers.
89190         stdbool-tests: accommodate Haiku
89191         * tests/test-stdbool.c: Haiku's gcc 2.95 lacks native _Bool.
89193         binary-io: fix O_TEXT on Haiku
89194         * modules/binary-io (Depends-on): Add fcntl-h.
89195         * lib/binary-io.h (O_TEXT): Rely on replacement <fcntl.h> rather
89196         than blindly undefining O_TEXT.
89197         Reported by Scott McCreary.
89199 2011-01-18  Paul Eggert  <eggert@cs.ucla.edu>
89201         include_next: do not check for standard headers like stddef.h
89203         I found this problem when modifying Emacs to use gnulib.
89204         I noticed that it added HAVE_STDDEF_H to config.h, even though
89205         gnulib always assumes <stddef.h> exists as per README and this
89206         symbol is unnecessary.
89207         * m4/include_next.m4 (gl_NEXT_HEADERS): New macro, which does not
89208         use AC_CHECK_HEADERS_ONCE, but which otherwise contains what
89209         gl_CHECK_NEXT_HEADERS used to contain.  This makes 'configure' run
89210         faster for headers like stddef.h that are known to exist.
89211         (gl_CHECK_NEXT_HEADERS): Use it.
89212         * m4/float_h.m4 (gl_FLOAT_H): For float.h, use gl_NEXT_HEADERS
89213         rather than gl_CHECK_NEXT_HEADERS.
89214         * m4/stdarg.m4 (gl_STDARG_H): Likewise, for stdarg.h.
89215         * m4/stddef_h.m4 (gl_STDDEF_H): Likewise, for stddef.h.
89217 2011-01-18  Eric Blake  <eblake@redhat.com>
89219         ansi-c++-opt: skip C++ dependency style if C++ is unused
89220         * m4/ansi-c++.m4 (gl_PROG_ANSI_CXX): Avoid full-blown dependency
89221         tests when we know C++ compilation is not desired.
89222         Reported by Scott McCreary.
89224 2011-01-18  Bruno Haible  <bruno@clisp.org>
89226         *printf-posix: Avoid test failures. Make tests work on MacOS X, Cygwin.
89227         * tests/test-fprintf-posix3.c: Include "resource-ext.h".
89228         (main): Perform test also when getrlimit and setrlimit don't exist or
89229         when setrlimit of RLIMIT_DATA fails (like on Cygwin). Instead of
89230         limiting the address space size using setrlimit, compare the address
89231         space size before and after the test.
89232         * tests/test-dprintf-posix2.c: Likewise.
89233         * tests/test-fprintf-posix3.sh: Update skip messages.
89234         * tests/test-dprintf-posix2.sh: Likewise.
89235         * modules/fprintf-posix-tests (Depends-on): Add get-rusage-as.
89236         * modules/dprintf-posix-tests (Depends-on): Likewise.
89237         Reported by Bruce Korb <bkorb@gnu.org> and
89238         Gary V. Vaughan <gary@gnu.org>.
89240 2011-01-18  Bruno Haible  <bruno@clisp.org>
89242         get-rusage-as: Improvement for Cygwin.
89243         * lib/get-rusage-as.c (get_rusage_as_via_iterator): On Windows, ignore
89244         areas that are merely reserved.
89246 2011-01-18  Paul Eggert  <eggert@cs.ucla.edu>
89248         strftime: remove dependencies on multibyte modules
89250         strftime depended on mbrlen, mbsinit, and wchar, but these modules
89251         are needed only if ! MULTIBYTE_IS_FORMAT_SAFE, and that is true
89252         only if __osf__ is defined, and I suspect OSF doesn't need these
89253         other modules.  If my guess is wrong, we'll need to come up with a
89254         variant of strftime that doesn't need the multibyte modules.
89256         I discovered this problem when attempting modify Emacs to use the
89257         strftime module.  With the previous gnulib, this caused Emacs to
89258         need 31 new files, ranging from lib/config.charset to
89259         m4/wint_t.m4.  This was overkill and I expect would be offputting
89260         to the Emacs maintainers.  After this change, only 6 new files are
89261         needed, namely strftime.[ch], srtftime.m4, stdbool.in.h,
89262         stdbool.m4, and tm_gmtoff.m4.
89264         * lib/strftime.c (MULTIBYTE_IS_FORMAT_SAFE): Define to 1 always.
89265         Suggested by Bruno Haible in
89266         <http://lists.gnu.org/r/bug-gnulib/2011-01/msg00238.html>.
89267         * m4/strftime.m4 (gl_FUNC_STRFTIME): Do not require AC_TYPE_MBSTATE_T,
89268         and do not check for wchar.h.
89269         * modules/strftime (Files): Remove m4/mbstate_t.m4.
89270         (Depends-on): Remove mbrlen, mbsinit, wchar.
89272 2011-01-18  Bruno Haible  <bruno@clisp.org>
89274         Tests for module 'get-rusage-as'.
89275         * modules/get-rusage-as-tests: New file.
89276         * tests/test-get-rusage-as.c: New file.
89278         New module 'get-rusage-as'.
89279         * modules/get-rusage-as: New file.
89280         * lib/resource-ext.h: New file.
89281         * lib/get-rusage-as.c: New file.
89283 2011-01-17  Eric Blake  <eblake@redhat.com>
89285         sigaction: relax license from LGPLv3+ to LGPLv2+
89286         * modules/sigaction (License): Relax to LGPLv2+.
89288 2011-01-14  Bruno Haible  <bruno@clisp.org>
89290         filemode: Make function declarations usable in C++ mode.
89291         * lib/filemode.h: Enclose function declarations in extern "C" block.
89292         Reported by John W. Eaton <jwe@gnu.org>.
89294 2011-01-12  Rob Vermaas  <rob.vermaas@gmail.com>
89296         save-cwd: no longer include "xgetcwd.h"
89297         * lib/save-cwd.c: Don't include "xgetcwd.h"; it's no longer used.
89298         This avoids a compilation failure in projects that use save-cwd
89299         without also using the xgetcwd module.
89301 2011-01-11  Paul Eggert  <eggert@cs.ucla.edu>
89303         ftoastr: split into 3 modules ftoastr, dtoastr, ldtoastr
89304         This is so that a program like Emacs, which needs only dtoastr,
89305         does not have to bother with distributing and compiling ftoastr
89306         and ldtoastr.
89307         * MODULES.html.sh: Document these modules (ftoastr wasn't documented).
89308         * modules/dtoastr, modules/ldtoastr: New files.
89309         * modules/ftoastr: Now works just for 'float'.
89310         (Files): Remove lib/dtoastr.c, lib/ldtoastr.c.
89311         (Makefile.am): Remove ftoastr.h (not needed and no effect),
89312         dtoastr.c, ldtoastr.c.
89314 2011-01-11  Jim Meyering  <meyering@redhat.com>
89316         save-cwd: remove #if-!HAVE_FCHDIR'd code; use the fchdir module
89317         There is no need to work around the lack of the fchdir function,
89318         since gnulib can now provide a replacement when required.
89319         * lib/save-cwd.c: Remove #if !HAVE_FCHDIR...#endif code.
89320         * modules/save-cwd (Depends-on): Add fchdir.
89322 2011-01-11  Paul Eggert  <eggert@cs.ucla.edu>
89324         openat, save-cwd: avoid xmalloc
89326         This removes a direct (but undocumented) dependency of openat on
89327         xalloc, along with an indirect dependency via save-cwd.  It also
89328         removes a dependency of save-cwd on xgetcwd, and thereby
89329         indirectly on xalloc.  This change causes the openat substitute
89330         to fall back on save_cwd when memory is tight, and for save_cwd to
89331         fail instead of dying when memory is tight, but that's good enough.
89332         Problem and initial idea for fix reported by Bastien Roucaries in
89333         <http://lists.gnu.org/r/bug-gnulib/2011-01/msg00170.html>.
89335         * lib/openat-proc.c: Include stdlib.h (for malloc), not
89336         xalloc.h (for xmalloc).
89337         (openat_proc_name): Use malloc, not xmalloc.
89338         * lib/save-cwd.c (save_cwd): Use getcwd, not xgetcwd.
89339         * modules/save-cwd (Files): Depend on getcwd, not xgetcwd.
89341         openat: Increase OPENAT_BUFFER_SIZE from 512 to at least 1024
89342         This avoids heap allocation for file names whose lengths are in
89343         the range 512..1023, with the upper bound increasing to at most
89344         4031 depending on the platform's PATH_MAX.  (We do not want
89345         pathmax.h here as it might supply a non-constant PATH_MAX.)
89346         * lib/openat-priv.h (SAFER_ALLOCA_MAX, SAFER_ALLOCA): New macros.
89347         Perhaps they should be moved to malloca.h?
89348         (OPENAT_BUFFER_SIZE): Use them.
89350 2011-01-10  Bruno Haible  <bruno@clisp.org>
89352         doc: Update users.txt.
89353         * users.txt: Add recutils.
89355 2011-01-09  Karl Berry  <karl@gnu.org>
89357         * doc/posix-functions/gai_strerror.texi: Insert missing @item.
89359         * doc/configmake.texi: New file.
89360         * doc/gnulib.texi: Include it.
89361         * modules/configmake: Move documentation from here.
89363 2011-01-09  Bruno Haible  <bruno@clisp.org>
89365         Update to Unicode 6.0.0.
89366         * lib/gen-uni-tables.c (symbolic_width): Fix bounds of planes.
89367         (get_lbp): Update for Unicode 6.0.0.
89368         * lib/uniwidth/width.c (nonspacing_table_data): Add U+065F,
89369         U+0859..U+085B, U+093A, U+0956..U+0957, U+0F8D..U+0F8F, U+135D..U+135E,
89370         U+1BE6, U+1BE8..U+1BE9, U+1BED, U+1BEF..U+1BF1, U+1DFC, U+2D7F,
89371         U+11001, U+11038..U+11046. Remove U+06DE.
89372         (uc_width): Fix bounds of planes.
89373         * tests/uniwidth/test-uc_width2.sh: Same updates as in
89374         lib/uniwidth/width.c.
89375         * tests/unigbrk/GraphemeBreakTest.txt: Copied from Unicode 6.0.0, with
89376         trailing whitespace removed.
89377         * tests/uninorm/NormalizationTest.txt: Update from Unicode 6.0.0,
89378         without comments, but with the original copyright notice.
89379         * lib/unicase/cased.h: Regenerated for Unicode 6.0.0.
89380         * lib/unicase/ignorable.h: Likewise.
89381         * lib/unicase/tocasefold.h: Likewise.
89382         * lib/unicase/tolower.h: Likewise.
89383         * lib/unicase/totitle.h: Likewise.
89384         * lib/unicase/toupper.h: Likewise.
89385         * lib/unictype/bidi_of.h: Likewise.
89386         * lib/unictype/blocks.h: Likewise.
89387         * lib/unictype/categ_C.h: Likewise.
89388         * lib/unictype/categ_Cn.h: Likewise.
89389         * lib/unictype/categ_L.h: Likewise.
89390         * lib/unictype/categ_Ll.h: Likewise.
89391         * lib/unictype/categ_Lm.h: Likewise.
89392         * lib/unictype/categ_Lo.h: Likewise.
89393         * lib/unictype/categ_Lu.h: Likewise.
89394         * lib/unictype/categ_M.h: Likewise.
89395         * lib/unictype/categ_Mc.h: Likewise.
89396         * lib/unictype/categ_Me.h: Likewise.
89397         * lib/unictype/categ_Mn.h: Likewise.
89398         * lib/unictype/categ_N.h: Likewise.
89399         * lib/unictype/categ_Nd.h: Likewise.
89400         * lib/unictype/categ_No.h: Likewise.
89401         * lib/unictype/categ_P.h: Likewise.
89402         * lib/unictype/categ_Po.h: Likewise.
89403         * lib/unictype/categ_S.h: Likewise.
89404         * lib/unictype/categ_Sc.h: Likewise.
89405         * lib/unictype/categ_Sk.h: Likewise.
89406         * lib/unictype/categ_Sm.h: Likewise.
89407         * lib/unictype/categ_So.h: Likewise.
89408         * lib/unictype/categ_of.h: Likewise.
89409         * lib/unictype/combining.h: Likewise.
89410         * lib/unictype/ctype_alnum.h: Likewise.
89411         * lib/unictype/ctype_alpha.h: Likewise.
89412         * lib/unictype/ctype_graph.h: Likewise.
89413         * lib/unictype/ctype_lower.h: Likewise.
89414         * lib/unictype/ctype_print.h: Likewise.
89415         * lib/unictype/ctype_punct.h: Likewise.
89416         * lib/unictype/ctype_upper.h: Likewise.
89417         * lib/unictype/decdigit.h: Likewise.
89418         * lib/unictype/digit.h: Likewise.
89419         * lib/unictype/numeric.h: Likewise.
89420         * lib/unictype/pr_alphabetic.h: Likewise.
89421         * lib/unictype/pr_bidi_arabic_digit.h: Likewise.
89422         * lib/unictype/pr_bidi_arabic_right_to_left.h: Likewise.
89423         * lib/unictype/pr_bidi_boundary_neutral.h: Likewise.
89424         * lib/unictype/pr_bidi_eur_num_terminator.h: Likewise.
89425         * lib/unictype/pr_bidi_hebrew_right_to_left.h: Likewise.
89426         * lib/unictype/pr_bidi_left_to_right.h: Likewise.
89427         * lib/unictype/pr_bidi_non_spacing_mark.h: Likewise.
89428         * lib/unictype/pr_bidi_other_neutral.h: Likewise.
89429         * lib/unictype/pr_case_ignorable.h: Likewise.
89430         * lib/unictype/pr_cased.h: Likewise.
89431         * lib/unictype/pr_changes_when_casefolded.h: Likewise.
89432         * lib/unictype/pr_changes_when_casemapped.h: Likewise.
89433         * lib/unictype/pr_changes_when_lowercased.h: Likewise.
89434         * lib/unictype/pr_changes_when_titlecased.h: Likewise.
89435         * lib/unictype/pr_changes_when_uppercased.h: Likewise.
89436         * lib/unictype/pr_combining.h: Likewise.
89437         * lib/unictype/pr_composite.h: Likewise.
89438         * lib/unictype/pr_currency_symbol.h: Likewise.
89439         * lib/unictype/pr_decimal_digit.h: Likewise.
89440         * lib/unictype/pr_deprecated.h: Likewise.
89441         * lib/unictype/pr_format_control.h: Likewise.
89442         * lib/unictype/pr_grapheme_base.h: Likewise.
89443         * lib/unictype/pr_grapheme_extend.h: Likewise.
89444         * lib/unictype/pr_grapheme_link.h: Likewise.
89445         * lib/unictype/pr_id_continue.h: Likewise.
89446         * lib/unictype/pr_id_start.h: Likewise.
89447         * lib/unictype/pr_ideographic.h: Likewise.
89448         * lib/unictype/pr_lowercase.h: Likewise.
89449         * lib/unictype/pr_math.h: Likewise.
89450         * lib/unictype/pr_numeric.h: Likewise.
89451         * lib/unictype/pr_other_alphabetic.h: Likewise.
89452         * lib/unictype/pr_other_id_continue.h: Likewise.
89453         * lib/unictype/pr_other_math.h: Likewise.
89454         * lib/unictype/pr_punctuation.h: Likewise.
89455         * lib/unictype/pr_sentence_terminal.h: Likewise.
89456         * lib/unictype/pr_terminal_punctuation.h: Likewise.
89457         * lib/unictype/pr_unassigned_code_value.h: Likewise.
89458         * lib/unictype/pr_unified_ideograph.h: Likewise.
89459         * lib/unictype/pr_uppercase.h: Likewise.
89460         * lib/unictype/pr_xid_continue.h: Likewise.
89461         * lib/unictype/pr_xid_start.h: Likewise.
89462         * lib/unictype/scripts.h: Likewise.
89463         * lib/unictype/scripts_byname.gperf: Likewise.
89464         * lib/unictype/sy_java_ident.h: Likewise.
89465         * lib/unigbrk/gbrkprop.h: Likewise.
89466         * lib/unilbrk/lbrkprop1.h: Likewise.
89467         * lib/unilbrk/lbrkprop2.h: Likewise.
89468         * lib/uninorm/decomposition-table2.h: Likewise.
89469         * lib/uniwbrk/wbrkprop.h: Likewise.
89470         * tests/unicase/test-cased.c: Likewise.
89471         * tests/unicase/test-ignorable.c: Likewise.
89472         * tests/unicase/test-uc_tolower.c: Likewise.
89473         * tests/unicase/test-uc_totitle.c: Likewise.
89474         * tests/unicase/test-uc_toupper.c: Likewise.
89475         * tests/unictype/test-categ_C.c: Likewise.
89476         * tests/unictype/test-categ_Cn.c: Likewise.
89477         * tests/unictype/test-categ_L.c: Likewise.
89478         * tests/unictype/test-categ_Ll.c: Likewise.
89479         * tests/unictype/test-categ_Lm.c: Likewise.
89480         * tests/unictype/test-categ_Lo.c: Likewise.
89481         * tests/unictype/test-categ_Lu.c: Likewise.
89482         * tests/unictype/test-categ_M.c: Likewise.
89483         * tests/unictype/test-categ_Mc.c: Likewise.
89484         * tests/unictype/test-categ_Me.c: Likewise.
89485         * tests/unictype/test-categ_Mn.c: Likewise.
89486         * tests/unictype/test-categ_N.c: Likewise.
89487         * tests/unictype/test-categ_Nd.c: Likewise.
89488         * tests/unictype/test-categ_No.c: Likewise.
89489         * tests/unictype/test-categ_P.c: Likewise.
89490         * tests/unictype/test-categ_Po.c: Likewise.
89491         * tests/unictype/test-categ_S.c: Likewise.
89492         * tests/unictype/test-categ_Sc.c: Likewise.
89493         * tests/unictype/test-categ_Sk.c: Likewise.
89494         * tests/unictype/test-categ_Sm.c: Likewise.
89495         * tests/unictype/test-categ_So.c: Likewise.
89496         * tests/unictype/test-ctype_alnum.c: Likewise.
89497         * tests/unictype/test-ctype_alpha.c: Likewise.
89498         * tests/unictype/test-ctype_graph.c: Likewise.
89499         * tests/unictype/test-ctype_lower.c: Likewise.
89500         * tests/unictype/test-ctype_print.c: Likewise.
89501         * tests/unictype/test-ctype_punct.c: Likewise.
89502         * tests/unictype/test-ctype_upper.c: Likewise.
89503         * tests/unictype/test-decdigit.h: Likewise.
89504         * tests/unictype/test-digit.h: Likewise.
89505         * tests/unictype/test-numeric.h: Likewise.
89506         * tests/unictype/test-pr_alphabetic.c: Likewise.
89507         * tests/unictype/test-pr_bidi_arabic_digit.c: Likewise.
89508         * tests/unictype/test-pr_bidi_arabic_right_to_left.c: Likewise.
89509         * tests/unictype/test-pr_bidi_boundary_neutral.c: Likewise.
89510         * tests/unictype/test-pr_bidi_eur_num_terminator.c: Likewise.
89511         * tests/unictype/test-pr_bidi_hebrew_right_to_left.c: Likewise.
89512         * tests/unictype/test-pr_bidi_left_to_right.c: Likewise.
89513         * tests/unictype/test-pr_bidi_non_spacing_mark.c: Likewise.
89514         * tests/unictype/test-pr_bidi_other_neutral.c: Likewise.
89515         * tests/unictype/test-pr_case_ignorable.c: Likewise.
89516         * tests/unictype/test-pr_cased.c: Likewise.
89517         * tests/unictype/test-pr_changes_when_casefolded.c: Likewise.
89518         * tests/unictype/test-pr_changes_when_casemapped.c: Likewise.
89519         * tests/unictype/test-pr_changes_when_lowercased.c: Likewise.
89520         * tests/unictype/test-pr_changes_when_titlecased.c: Likewise.
89521         * tests/unictype/test-pr_changes_when_uppercased.c: Likewise.
89522         * tests/unictype/test-pr_combining.c: Likewise.
89523         * tests/unictype/test-pr_composite.c: Likewise.
89524         * tests/unictype/test-pr_currency_symbol.c: Likewise.
89525         * tests/unictype/test-pr_decimal_digit.c: Likewise.
89526         * tests/unictype/test-pr_deprecated.c: Likewise.
89527         * tests/unictype/test-pr_format_control.c: Likewise.
89528         * tests/unictype/test-pr_grapheme_base.c: Likewise.
89529         * tests/unictype/test-pr_grapheme_extend.c: Likewise.
89530         * tests/unictype/test-pr_grapheme_link.c: Likewise.
89531         * tests/unictype/test-pr_id_continue.c: Likewise.
89532         * tests/unictype/test-pr_id_start.c: Likewise.
89533         * tests/unictype/test-pr_ideographic.c: Likewise.
89534         * tests/unictype/test-pr_lowercase.c: Likewise.
89535         * tests/unictype/test-pr_math.c: Likewise.
89536         * tests/unictype/test-pr_numeric.c: Likewise.
89537         * tests/unictype/test-pr_other_alphabetic.c: Likewise.
89538         * tests/unictype/test-pr_other_id_continue.c: Likewise.
89539         * tests/unictype/test-pr_other_math.c: Likewise.
89540         * tests/unictype/test-pr_punctuation.c: Likewise.
89541         * tests/unictype/test-pr_sentence_terminal.c: Likewise.
89542         * tests/unictype/test-pr_terminal_punctuation.c: Likewise.
89543         * tests/unictype/test-pr_unassigned_code_value.c: Likewise.
89544         * tests/unictype/test-pr_unified_ideograph.c: Likewise.
89545         * tests/unictype/test-pr_uppercase.c: Likewise.
89546         * tests/unictype/test-pr_xid_continue.c: Likewise.
89547         * tests/unictype/test-pr_xid_start.c: Likewise.
89548         * tests/unigbrk/test-uc-gbrk-prop.h: Likewise.
89549         * lib/unicase/special-casing-table.gperf: Regenerated; only comment
89550         changes.
89551         * lib/unictype/categ_Cc.h: Likewise.
89552         * lib/unictype/categ_Cf.h: Likewise.
89553         * lib/unictype/categ_Co.h: Likewise.
89554         * lib/unictype/categ_Cs.h: Likewise.
89555         * lib/unictype/categ_Lt.h: Likewise.
89556         * lib/unictype/categ_Nl.h: Likewise.
89557         * lib/unictype/categ_Pc.h: Likewise.
89558         * lib/unictype/categ_Pd.h: Likewise.
89559         * lib/unictype/categ_Pe.h: Likewise.
89560         * lib/unictype/categ_Pf.h: Likewise.
89561         * lib/unictype/categ_Pi.h: Likewise.
89562         * lib/unictype/categ_Ps.h: Likewise.
89563         * lib/unictype/categ_Z.h: Likewise.
89564         * lib/unictype/categ_Zl.h: Likewise.
89565         * lib/unictype/categ_Zp.h: Likewise.
89566         * lib/unictype/categ_Zs.h: Likewise.
89567         * lib/unictype/ctype_blank.h: Likewise.
89568         * lib/unictype/ctype_cntrl.h: Likewise.
89569         * lib/unictype/ctype_digit.h: Likewise.
89570         * lib/unictype/ctype_space.h: Likewise.
89571         * lib/unictype/ctype_xdigit.h: Likewise.
89572         * lib/unictype/mirror.h: Likewise.
89573         * lib/unictype/pr_ascii_hex_digit.h: Likewise.
89574         * lib/unictype/pr_bidi_block_separator.h: Likewise.
89575         * lib/unictype/pr_bidi_common_separator.h: Likewise.
89576         * lib/unictype/pr_bidi_control.h: Likewise.
89577         * lib/unictype/pr_bidi_embedding_or_override.h: Likewise.
89578         * lib/unictype/pr_bidi_eur_num_separator.h: Likewise.
89579         * lib/unictype/pr_bidi_european_digit.h: Likewise.
89580         * lib/unictype/pr_bidi_pdf.h: Likewise.
89581         * lib/unictype/pr_bidi_segment_separator.h: Likewise.
89582         * lib/unictype/pr_bidi_whitespace.h: Likewise.
89583         * lib/unictype/pr_dash.h: Likewise.
89584         * lib/unictype/pr_default_ignorable_code_point.h: Likewise.
89585         * lib/unictype/pr_diacritic.h: Likewise.
89586         * lib/unictype/pr_extender.h: Likewise.
89587         * lib/unictype/pr_hex_digit.h: Likewise.
89588         * lib/unictype/pr_hyphen.h: Likewise.
89589         * lib/unictype/pr_ids_binary_operator.h: Likewise.
89590         * lib/unictype/pr_ids_trinary_operator.h: Likewise.
89591         * lib/unictype/pr_ignorable_control.h: Likewise.
89592         * lib/unictype/pr_iso_control.h: Likewise.
89593         * lib/unictype/pr_join_control.h: Likewise.
89594         * lib/unictype/pr_left_of_pair.h: Likewise.
89595         * lib/unictype/pr_line_separator.h: Likewise.
89596         * lib/unictype/pr_logical_order_exception.h: Likewise.
89597         * lib/unictype/pr_non_break.h: Likewise.
89598         * lib/unictype/pr_not_a_character.h: Likewise.
89599         * lib/unictype/pr_other_default_ignorable_code_point.h: Likewise.
89600         * lib/unictype/pr_other_grapheme_extend.h: Likewise.
89601         * lib/unictype/pr_other_id_start.h: Likewise.
89602         * lib/unictype/pr_other_lowercase.h: Likewise.
89603         * lib/unictype/pr_other_uppercase.h: Likewise.
89604         * lib/unictype/pr_paired_punctuation.h: Likewise.
89605         * lib/unictype/pr_paragraph_separator.h: Likewise.
89606         * lib/unictype/pr_pattern_syntax.h: Likewise.
89607         * lib/unictype/pr_pattern_white_space.h: Likewise.
89608         * lib/unictype/pr_private_use.h: Likewise.
89609         * lib/unictype/pr_quotation_mark.h: Likewise.
89610         * lib/unictype/pr_radical.h: Likewise.
89611         * lib/unictype/pr_soft_dotted.h: Likewise.
89612         * lib/unictype/pr_space.h: Likewise.
89613         * lib/unictype/pr_titlecase.h: Likewise.
89614         * lib/unictype/pr_variation_selector.h: Likewise.
89615         * lib/unictype/pr_white_space.h: Likewise.
89616         * lib/unictype/pr_zero_width.h: Likewise.
89617         * lib/unictype/sy_c_ident.h: Likewise.
89618         * lib/unictype/sy_c_whitespace.h: Likewise.
89619         * lib/unictype/sy_java_whitespace.h: Likewise.
89620         * lib/uninorm/composition-table.gperf: Likewise.
89621         * lib/uninorm/decomposition-table1.h: Likewise.
89622         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Add test for rule
89623         LB8.
89624         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
89625         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
89626         * modules/unictype/*: Bump version number of expected libunistring
89627         version.
89629 2011-01-09  Bruno Haible  <bruno@clisp.org>
89631         Update to Unicode 5.2.0.
89632         * tests/unigbrk/GraphemeBreakTest.txt: Copied from Unicode 5.2.0, with
89633         trailing whitespace removed.
89635 2011-01-09  Bruno Haible  <bruno@clisp.org>
89637         New Unicode character properties, from Unicode 5.2.0.
89638         * lib/unictype.in.h (UC_PROPERTY_CASED, UC_PROPERTY_CASE_IGNORABLE,
89639         UC_PROPERTY_CHANGES_WHEN_LOWERCASED,
89640         UC_PROPERTY_CHANGES_WHEN_UPPERCASED,
89641         UC_PROPERTY_CHANGES_WHEN_TITLECASED,
89642         UC_PROPERTY_CHANGES_WHEN_CASEFOLDED,
89643         UC_PROPERTY_CHANGES_WHEN_CASEMAPPED,
89644         uc_is_property_cased, uc_is_property_case_ignorable,
89645         uc_is_property_changes_when_lowercased,
89646         uc_is_property_changes_when_uppercased,
89647         uc_is_property_changes_when_titlecased,
89648         uc_is_property_changes_when_casefolded,
89649         uc_is_property_changes_when_casemapped): New declarations.
89650         * lib/unictype/pr_byname.gperf: Add the new properties.
89651         * modules/unictype/property-byname (Depends-on): Depend on the new
89652         properties modules.
89653         * modules/unictype/property-all (Depends-on): Likewise.
89654         * MODULES.html.sh (Unicode string functions): Add
89655         unictype/property-case-ignorable, unictype/property-cased,
89656         unictype/property-changes-when-casefolded,
89657         unictype/property-changes-when-casemapped,
89658         unictype/property-changes-when-lowercased,
89659         unictype/property-changes-when-titlecased,
89660         unictype/property-changes-when-uppercased.
89662         New module 'unictype/property-changes-when-casemapped'.
89663         * modules/unictype/property-changes-when-casemapped: New file.
89664         * lib/unictype/pr_changes_when_casemapped.c: New file.
89665         * lib/unictype/pr_changes_when_casemapped.h: New file, automatically
89666         generated by gen-uni-tables.
89667         * modules/unictype/property-changes-when-casemapped-tests: New file.
89668         * tests/unictype/test-pr_changes_when_casemapped.c: New file,
89669         automatically generated by gen-uni-tables.
89671         New module 'unictype/property-changes-when-casefolded'.
89672         * modules/unictype/property-changes-when-casefolded: New file.
89673         * lib/unictype/pr_changes_when_casefolded.c: New file.
89674         * lib/unictype/pr_changes_when_casefolded.h: New file, automatically
89675         generated by gen-uni-tables.
89676         * modules/unictype/property-changes-when-casefolded-tests: New file.
89677         * tests/unictype/test-pr_changes_when_casefolded.c: New file,
89678         automatically generated by gen-uni-tables.
89680         New module 'unictype/property-changes-when-titlecased'.
89681         * modules/unictype/property-changes-when-titlecased: New file.
89682         * lib/unictype/pr_changes_when_titlecased.c: New file.
89683         * lib/unictype/pr_changes_when_titlecased.h: New file, automatically
89684         generated by gen-uni-tables.
89685         * modules/unictype/property-changes-when-titlecased-tests: New file.
89686         * tests/unictype/test-pr_changes_when_titlecased.c: New file,
89687         automatically generated by gen-uni-tables.
89689         New module 'unictype/property-changes-when-uppercased'.
89690         * modules/unictype/property-changes-when-uppercased: New file.
89691         * lib/unictype/pr_changes_when_uppercased.c: New file.
89692         * lib/unictype/pr_changes_when_uppercased.h: New file, automatically
89693         generated by gen-uni-tables.
89694         * modules/unictype/property-changes-when-uppercased-tests: New file.
89695         * tests/unictype/test-pr_changes_when_uppercased.c: New file,
89696         automatically generated by gen-uni-tables.
89698         New module 'unictype/property-changes-when-lowercased'.
89699         * modules/unictype/property-changes-when-lowercased: New file.
89700         * lib/unictype/pr_changes_when_lowercased.c: New file.
89701         * lib/unictype/pr_changes_when_lowercased.h: New file, automatically
89702         generated by gen-uni-tables.
89703         * modules/unictype/property-changes-when-lowercased-tests: New file.
89704         * tests/unictype/test-pr_changes_when_lowercased.c: New file,
89705         automatically generated by gen-uni-tables.
89707         New module 'unictype/property-case-ignorable'.
89708         * modules/unictype/property-case-ignorable: New file.
89709         * lib/unictype/pr_case_ignorable.c: New file.
89710         * lib/unictype/pr_case_ignorable.h: New file, automatically generated
89711         by gen-uni-tables.
89712         * modules/unictype/property-case-ignorable-tests: New file.
89713         * tests/unictype/test-pr_case_ignorable.c: New file, automatically
89714         generated by gen-uni-tables.
89716         New module 'unictype/property-cased'.
89717         * modules/unictype/property-cased: New file.
89718         * lib/unictype/pr_cased.c: New file.
89719         * lib/unictype/pr_cased.h: New file, automatically generated by
89720         gen-uni-tables.
89721         * modules/unictype/property-cased-tests: New file.
89722         * tests/unictype/test-pr_cased.c: New file, automatically generated by
89723         gen-uni-tables.
89725 2011-01-09  Bruno Haible  <bruno@clisp.org>
89727         Update to Unicode 5.2.0.
89728         * lib/gen-uni-tables.c (output_predicate, output_category,
89729         output_combclass, output_bidi_category, output_decimal_digit_test,
89730         output_decimal_digit, output_digit_test, output_digit,
89731         output_numeric_test, output_numeric, output_mirror, output_scripts,
89732         output_scripts_byname, output_blocks, output_ident_category): Fix
89733         comment header.
89734         (is_WBP_MIDNUMLET, is_WBP_MIDLETTER): New functions, extracted from
89735         get_wbp.
89736         (PROP_CASED, PROP_CASE_IGNORABLE, PROP_CHANGES_WHEN_*): New enumeration
89737         items.
89738         (fill_properties): Also fill the peoperties Cased, Case_Ignorable,
89739         Changes_When_Lowercased, Changes_When_Uppercased,
89740         Changes_When_Titlecased, Changes_When_Casefolded,
89741         Changes_When_Casemapped.
89742         (is_property_alphabetic, is_property_default_ignorable_code_point):
89743         Update for Unicode 5.2.0.
89744         (is_property_cased, is_property_case_ignorable,
89745         is_property_changes_when_lowercased,
89746         is_property_changes_when_uppercased,
89747         is_property_changes_when_titlecased,
89748         is_property_changes_when_casefolded,
89749         is_property_changes_when_casemapped): New functions.
89750         (output_properties): Output also the properties cased, case_ignorable,
89751         changes_when_lowercased, changes_when_uppercased,
89752         changes_when_titlecased, changes_when_casefolded,
89753         changes_when_casemapped.
89754         (symbolic_width): Update for Unicode 5.2.0, incorporating changes from
89755         Unicode TR#11 revision 17 -> 19.
89756         (LBP_CP): New enumeration value.
89757         (LBP_*): Adjust values accordingly.
89758         (get_lbp): Update for Unicode 5.2.0, incorporating changes from Unicode
89759         TR#14 revision 22 -> 24.
89760         (debug_output_lbp): Allow for LBP_* bits >= 32. Support LBP_CP.
89761         (fill_org_lbp, debug_output_org_lbp, output_lbp): Support LBP_CP.
89762         (get_wbp): Update for Unicode 5.2.0, incorporating changes from Unicode
89763         TR#29 revision 13 -> 15. Use functions is_WBP_MIDNUMLET,
89764         is_WBP_MIDLETTER.
89765         (output_composition_tables): Allow for 24 bits instead of 16 bits in
89766         the code1 and code2 of each composition rule.
89767         * lib/unicase/cased.h: Regenerated for Unicode 5.2.0.
89768         * lib/unicase/ignorable.h: Likewise.
89769         * lib/unicase/tocasefold.h: Likewise.
89770         * lib/unicase/tolower.h: Likewise.
89771         * lib/unicase/totitle.h: Likewise.
89772         * lib/unicase/toupper.h: Likewise.
89773         * lib/unictype/bidi_of.h: Likewise.
89774         * lib/unictype/blocks.h: Likewise.
89775         * lib/unictype/categ_C.h: Likewise.
89776         * lib/unictype/categ_Cf.h: Likewise.
89777         * lib/unictype/categ_Cn.h: Likewise.
89778         * lib/unictype/categ_L.h: Likewise.
89779         * lib/unictype/categ_Ll.h: Likewise.
89780         * lib/unictype/categ_Lm.h: Likewise.
89781         * lib/unictype/categ_Lo.h: Likewise.
89782         * lib/unictype/categ_Lu.h: Likewise.
89783         * lib/unictype/categ_M.h: Likewise.
89784         * lib/unictype/categ_Mc.h: Likewise.
89785         * lib/unictype/categ_Mn.h: Likewise.
89786         * lib/unictype/categ_N.h: Likewise.
89787         * lib/unictype/categ_Nd.h: Likewise.
89788         * lib/unictype/categ_Nl.h: Likewise.
89789         * lib/unictype/categ_No.h: Likewise.
89790         * lib/unictype/categ_P.h: Likewise.
89791         * lib/unictype/categ_Pd.h: Likewise.
89792         * lib/unictype/categ_Po.h: Likewise.
89793         * lib/unictype/categ_S.h: Likewise.
89794         * lib/unictype/categ_Sc.h: Likewise.
89795         * lib/unictype/categ_So.h: Likewise.
89796         * lib/unictype/categ_of.h: Likewise.
89797         * lib/unictype/combining.h: Likewise.
89798         * lib/unictype/ctype_alnum.h: Likewise.
89799         * lib/unictype/ctype_alpha.h: Likewise.
89800         * lib/unictype/ctype_graph.h: Likewise.
89801         * lib/unictype/ctype_lower.h: Likewise.
89802         * lib/unictype/ctype_print.h: Likewise.
89803         * lib/unictype/ctype_punct.h: Likewise.
89804         * lib/unictype/ctype_upper.h: Likewise.
89805         * lib/unictype/decdigit.h: Likewise.
89806         * lib/unictype/digit.h: Likewise.
89807         * lib/unictype/numeric.h: Likewise.
89808         * lib/unictype/pr_alphabetic.h: Likewise.
89809         * lib/unictype/pr_bidi_arabic_digit.h: Likewise.
89810         * lib/unictype/pr_bidi_eur_num_terminator.h: Likewise.
89811         * lib/unictype/pr_bidi_european_digit.h: Likewise.
89812         * lib/unictype/pr_bidi_hebrew_right_to_left.h: Likewise.
89813         * lib/unictype/pr_bidi_left_to_right.h: Likewise.
89814         * lib/unictype/pr_bidi_non_spacing_mark.h: Likewise.
89815         * lib/unictype/pr_bidi_other_neutral.h: Likewise.
89816         * lib/unictype/pr_combining.h: Likewise.
89817         * lib/unictype/pr_composite.h: Likewise.
89818         * lib/unictype/pr_currency_symbol.h: Likewise.
89819         * lib/unictype/pr_dash.h: Likewise.
89820         * lib/unictype/pr_decimal_digit.h: Likewise.
89821         * lib/unictype/pr_deprecated.h: Likewise.
89822         * lib/unictype/pr_diacritic.h: Likewise.
89823         * lib/unictype/pr_extender.h: Likewise.
89824         * lib/unictype/pr_grapheme_base.h: Likewise.
89825         * lib/unictype/pr_grapheme_extend.h: Likewise.
89826         * lib/unictype/pr_grapheme_link.h: Likewise.
89827         * lib/unictype/pr_id_continue.h: Likewise.
89828         * lib/unictype/pr_id_start.h: Likewise.
89829         * lib/unictype/pr_ideographic.h: Likewise.
89830         * lib/unictype/pr_ignorable_control.h: Likewise.
89831         * lib/unictype/pr_logical_order_exception.h: Likewise.
89832         * lib/unictype/pr_lowercase.h: Likewise.
89833         * lib/unictype/pr_numeric.h: Likewise.
89834         * lib/unictype/pr_other_alphabetic.h: Likewise.
89835         * lib/unictype/pr_punctuation.h: Likewise.
89836         * lib/unictype/pr_sentence_terminal.h: Likewise.
89837         * lib/unictype/pr_terminal_punctuation.h: Likewise.
89838         * lib/unictype/pr_unassigned_code_value.h: Likewise.
89839         * lib/unictype/pr_unified_ideograph.h: Likewise.
89840         * lib/unictype/pr_uppercase.h: Likewise.
89841         * lib/unictype/pr_xid_continue.h: Likewise.
89842         * lib/unictype/pr_xid_start.h: Likewise.
89843         * lib/unictype/pr_zero_width.h: Likewise.
89844         * lib/unictype/scripts.h: Likewise.
89845         * lib/unictype/scripts_byname.gperf: Likewise.
89846         * lib/unictype/sy_java_ident.h: Likewise.
89847         * lib/unigbrk/gbrkprop.h: Likewise.
89848         * lib/unilbrk/lbrkprop1.h: Likewise.
89849         * lib/unilbrk/lbrkprop2.h: Likewise.
89850         * lib/unilbrk/lbrktables.h: Likewise.
89851         * lib/unilbrk/lbrktables.c (unilbrk_table): Add a row and column for
89852         LBP_CP. Implement rule LB30.
89853         * lib/uniwidth/width.c (nonspacing_table_data): Add U+0816..U+0819,
89854         U+081B..U+0823, U+0825..U+0827, U+0829..U+082D, U+0900, U+0955, U+109D,
89855         U+1A56, U+1A58..U+1A5E, U+1A60, U+1A62, U+1A65..U+1A6C, U+1A73..U+1A7C,
89856         U+1A7F, U+1CD0..U+1CD2, U+1CD4..U+1CE0, U+1CE2..U+1CE8, U+1CED, U+1DFD,
89857         U+2CEF..U+2CF1, U+A6F0..U+A6F1, U+A8E0..U+A8F1, U+A980..U+A982, U+A9B3,
89858         U+A9B6..U+A9B9, U+A9BC, U+AAB0, U+AAB2..U+AAB4, U+AAB7..U+AAB8,
89859         U+AABE..U+AABF, U+AAC1, U+ABE5, U+ABE8, U+ABED, U+11080..U+11081,
89860         U+110B3..U+110B6, U+110B9..U+110BA, U+110BD.
89861         (uc_width): Return 2 also for unassigned code points of planes 2 and 3.
89862         * lib/uninorm/composition-table.gperf: Regenerated for Unicode 5.2.0.
89863         * lib/uninorm/composition.c (struct composition_rule): Allow for 24
89864         bits instead of 16 bits in the code1 and code2 of each composition
89865         rule.
89866         (uc_composition): Update for Unicode 5.2.0.
89867         * lib/uninorm/decomposition-table1.h: Regenerated for Unicode 5.2.0.
89868         * lib/uninorm/decomposition-table2.h: Likewise.
89869         * lib/uniwbrk/wbrkprop.h: Likewise.
89870         * tests/unicase/test-cased.c: Likewise.
89871         * tests/unicase/test-ignorable.c: Likewise.
89872         * tests/unicase/test-uc_tolower.c: Likewise.
89873         * tests/unicase/test-uc_totitle.c: Likewise.
89874         * tests/unicase/test-uc_toupper.c: Likewise.
89875         * tests/unictype/test-categ_C.c: Likewise.
89876         * tests/unictype/test-categ_Cf.c: Likewise.
89877         * tests/unictype/test-categ_Cn.c: Likewise.
89878         * tests/unictype/test-categ_L.c: Likewise.
89879         * tests/unictype/test-categ_Ll.c: Likewise.
89880         * tests/unictype/test-categ_Lm.c: Likewise.
89881         * tests/unictype/test-categ_Lo.c: Likewise.
89882         * tests/unictype/test-categ_Lu.c: Likewise.
89883         * tests/unictype/test-categ_M.c: Likewise.
89884         * tests/unictype/test-categ_Mc.c: Likewise.
89885         * tests/unictype/test-categ_Mn.c: Likewise.
89886         * tests/unictype/test-categ_N.c: Likewise.
89887         * tests/unictype/test-categ_Nd.c: Likewise.
89888         * tests/unictype/test-categ_Nl.c: Likewise.
89889         * tests/unictype/test-categ_No.c: Likewise.
89890         * tests/unictype/test-categ_P.c: Likewise.
89891         * tests/unictype/test-categ_Pd.c: Likewise.
89892         * tests/unictype/test-categ_Po.c: Likewise.
89893         * tests/unictype/test-categ_S.c: Likewise.
89894         * tests/unictype/test-categ_Sc.c: Likewise.
89895         * tests/unictype/test-categ_So.c: Likewise.
89896         * tests/unictype/test-ctype_alnum.c: Likewise.
89897         * tests/unictype/test-ctype_alpha.c: Likewise.
89898         * tests/unictype/test-ctype_graph.c: Likewise.
89899         * tests/unictype/test-ctype_lower.c: Likewise.
89900         * tests/unictype/test-ctype_print.c: Likewise.
89901         * tests/unictype/test-ctype_punct.c: Likewise.
89902         * tests/unictype/test-ctype_upper.c: Likewise.
89903         * tests/unictype/test-decdigit.h: Likewise.
89904         * tests/unictype/test-digit.h: Likewise.
89905         * tests/unictype/test-numeric.h: Likewise.
89906         * tests/unictype/test-pr_alphabetic.c: Likewise.
89907         * tests/unictype/test-pr_bidi_arabic_digit.c: Likewise.
89908         * tests/unictype/test-pr_bidi_eur_num_terminator.c: Likewise.
89909         * tests/unictype/test-pr_bidi_european_digit.c: Likewise.
89910         * tests/unictype/test-pr_bidi_hebrew_right_to_left.c: Likewise.
89911         * tests/unictype/test-pr_bidi_left_to_right.c: Likewise.
89912         * tests/unictype/test-pr_bidi_non_spacing_mark.c: Likewise.
89913         * tests/unictype/test-pr_bidi_other_neutral.c: Likewise.
89914         * tests/unictype/test-pr_combining.c: Likewise.
89915         * tests/unictype/test-pr_composite.c: Likewise.
89916         * tests/unictype/test-pr_currency_symbol.c: Likewise.
89917         * tests/unictype/test-pr_dash.c: Likewise.
89918         * tests/unictype/test-pr_decimal_digit.c: Likewise.
89919         * tests/unictype/test-pr_deprecated.c: Likewise.
89920         * tests/unictype/test-pr_diacritic.c: Likewise.
89921         * tests/unictype/test-pr_extender.c: Likewise.
89922         * tests/unictype/test-pr_grapheme_base.c: Likewise.
89923         * tests/unictype/test-pr_grapheme_extend.c: Likewise.
89924         * tests/unictype/test-pr_grapheme_link.c: Likewise.
89925         * tests/unictype/test-pr_id_continue.c: Likewise.
89926         * tests/unictype/test-pr_id_start.c: Likewise.
89927         * tests/unictype/test-pr_ideographic.c: Likewise.
89928         * tests/unictype/test-pr_ignorable_control.c: Likewise.
89929         * tests/unictype/test-pr_logical_order_exception.c: Likewise.
89930         * tests/unictype/test-pr_lowercase.c: Likewise.
89931         * tests/unictype/test-pr_numeric.c: Likewise.
89932         * tests/unictype/test-pr_other_alphabetic.c: Likewise.
89933         * tests/unictype/test-pr_punctuation.c: Likewise.
89934         * tests/unictype/test-pr_sentence_terminal.c: Likewise.
89935         * tests/unictype/test-pr_terminal_punctuation.c: Likewise.
89936         * tests/unictype/test-pr_unassigned_code_value.c: Likewise.
89937         * tests/unictype/test-pr_unified_ideograph.c: Likewise.
89938         * tests/unictype/test-pr_uppercase.c: Likewise.
89939         * tests/unictype/test-pr_xid_continue.c: Likewise.
89940         * tests/unictype/test-pr_xid_start.c: Likewise.
89941         * tests/unictype/test-pr_zero_width.c: Likewise.
89942         * tests/unigbrk/test-uc-gbrk-prop.h: Likewise.
89943         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Update for
89944         changed behaviour: line breaking is now disallowed between a letter
89945         or '=' and '('.
89946         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
89947         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
89948         * tests/unilbrk/test-ulc-possible-linebreaks.c (main): Likewise.
89949         * tests/unilbrk/test-ulc-width-linebreaks.c (main): Likewise.
89950         * tests/uniwidth/test-uc_width2.sh: Same updates as in
89951         lib/uniwidth/width.c.
89952         * tests/uninorm/NormalizationTest.txt: Update from Unicode 5.2.0,
89953         without comments, but with the original copyright notice.
89954         * lib/unicase/special-casing-table.gperf: Regenerated; only comment
89955         changes.
89956         * lib/unictype/categ_Cc.h: Likewise.
89957         * lib/unictype/categ_Co.h: Likewise.
89958         * lib/unictype/categ_Cs.h: Likewise.
89959         * lib/unictype/categ_Lt.h: Likewise.
89960         * lib/unictype/categ_Me.h: Likewise.
89961         * lib/unictype/categ_Pc.h: Likewise.
89962         * lib/unictype/categ_Pe.h: Likewise.
89963         * lib/unictype/categ_Pf.h: Likewise.
89964         * lib/unictype/categ_Pi.h: Likewise.
89965         * lib/unictype/categ_Ps.h: Likewise.
89966         * lib/unictype/categ_Sk.h: Likewise.
89967         * lib/unictype/categ_Sm.h: Likewise.
89968         * lib/unictype/categ_Z.h: Likewise.
89969         * lib/unictype/categ_Zl.h: Likewise.
89970         * lib/unictype/categ_Zp.h: Likewise.
89971         * lib/unictype/categ_Zs.h: Likewise.
89972         * lib/unictype/ctype_blank.h: Likewise.
89973         * lib/unictype/ctype_cntrl.h: Likewise.
89974         * lib/unictype/ctype_digit.h: Likewise.
89975         * lib/unictype/ctype_space.h: Likewise.
89976         * lib/unictype/ctype_xdigit.h: Likewise.
89977         * lib/unictype/mirror.h: Likewise.
89978         * lib/unictype/pr_ascii_hex_digit.h: Likewise.
89979         * lib/unictype/pr_bidi_arabic_right_to_left.h: Likewise.
89980         * lib/unictype/pr_bidi_block_separator.h: Likewise.
89981         * lib/unictype/pr_bidi_boundary_neutral.h: Likewise.
89982         * lib/unictype/pr_bidi_common_separator.h: Likewise.
89983         * lib/unictype/pr_bidi_control.h: Likewise.
89984         * lib/unictype/pr_bidi_embedding_or_override.h: Likewise.
89985         * lib/unictype/pr_bidi_eur_num_separator.h: Likewise.
89986         * lib/unictype/pr_bidi_pdf.h: Likewise.
89987         * lib/unictype/pr_bidi_segment_separator.h: Likewise.
89988         * lib/unictype/pr_bidi_whitespace.h: Likewise.
89989         * lib/unictype/pr_default_ignorable_code_point.h: Likewise.
89990         * lib/unictype/pr_format_control.h: Likewise.
89991         * lib/unictype/pr_hex_digit.h: Likewise.
89992         * lib/unictype/pr_hyphen.h: Likewise.
89993         * lib/unictype/pr_ids_binary_operator.h: Likewise.
89994         * lib/unictype/pr_ids_trinary_operator.h: Likewise.
89995         * lib/unictype/pr_iso_control.h: Likewise.
89996         * lib/unictype/pr_join_control.h: Likewise.
89997         * lib/unictype/pr_left_of_pair.h: Likewise.
89998         * lib/unictype/pr_line_separator.h: Likewise.
89999         * lib/unictype/pr_math.h: Likewise.
90000         * lib/unictype/pr_non_break.h: Likewise.
90001         * lib/unictype/pr_not_a_character.h: Likewise.
90002         * lib/unictype/pr_other_default_ignorable_code_point.h: Likewise.
90003         * lib/unictype/pr_other_grapheme_extend.h: Likewise.
90004         * lib/unictype/pr_other_id_continue.h: Likewise.
90005         * lib/unictype/pr_other_id_start.h: Likewise.
90006         * lib/unictype/pr_other_lowercase.h: Likewise.
90007         * lib/unictype/pr_other_math.h: Likewise.
90008         * lib/unictype/pr_other_uppercase.h: Likewise.
90009         * lib/unictype/pr_paired_punctuation.h: Likewise.
90010         * lib/unictype/pr_paragraph_separator.h: Likewise.
90011         * lib/unictype/pr_pattern_syntax.h: Likewise.
90012         * lib/unictype/pr_pattern_white_space.h: Likewise.
90013         * lib/unictype/pr_private_use.h: Likewise.
90014         * lib/unictype/pr_quotation_mark.h: Likewise.
90015         * lib/unictype/pr_radical.h: Likewise.
90016         * lib/unictype/pr_soft_dotted.h: Likewise.
90017         * lib/unictype/pr_space.h: Likewise.
90018         * lib/unictype/pr_titlecase.h: Likewise.
90019         * lib/unictype/pr_variation_selector.h: Likewise.
90020         * lib/unictype/pr_white_space.h: Likewise.
90021         * lib/unictype/sy_c_ident.h: Likewise.
90022         * lib/unictype/sy_c_whitespace.h: Likewise.
90023         * lib/unictype/sy_java_whitespace.h: Likewise.
90024         * modules/uni*/*: Bump version number of expected libunistring version.
90025         Reported by Simon Josefsson.
90027 2011-01-09  Karl Heuer  <kwzh@gnu.org>
90029         useless-if-before-free: fix typo in --help and make the internal,
90030         automatic version date update process work once again.
90031         --help output contained a NUL character instead of the
90032         backslash-zero that was intended.  Also, the "must lie within
90033         the first 8 lines" line is on line 9, and hence not getting
90034         automatically updated.
90035         * build-aux/useless-if-before-free: Fix the former by adding a
90036         backslash, and the latter by condensing the three lines of what-it-does
90037         to a single line, leaving one line of slack for the future.
90039 2011-01-09  Bruno Haible  <bruno@clisp.org>
90041         uniwidth/width: Fix width of U+1D173..U+1D17A.
90042         * lib/gen-uni-tables.c (is_nonspacing, output_nonspacing_property,
90043         symbolic_width, output_width_property_test): New functions.
90044         (main): Invoke output_nonspacing_property, output_width_property_test.
90045         * lib/uniwidth/width.c (nonspacing_table_data): Set bits for
90046         U+1D173..U+1D17A.
90047         * tests/uniwidth/test-uc_width2.sh: For U+1D173..U+1D17A, expect 0, not
90048         1.
90049         * modules/uniwidth/*: Bump version number of expected libunistring
90050         version.
90051         * modules/unilbrk/*: Likewise.
90053 2011-01-08  Bruno Haible  <bruno@clisp.org>
90055         uninorm tests: Preserve copyright of Unicode data file.
90056         * tests/uninorm/NormalizationTest.txt: Re-add original copyright.
90057         Mention modifications.
90059 2011-01-08  Bruno Haible  <bruno@clisp.org>
90061         gen-uni-tables: Prepare for Unicode 5.2.0.
90062         * lib/gen-uni-tables.c (get_lbp): Allow for more than 32 LBP_* values.
90063         (debug_output_lbp, output_lbp): Update.
90065 2011-01-08  Bruno Haible  <bruno@clisp.org>
90067         unilbrk: Clarify gen-uni-tables.c code.
90068         * lib/gen-uni-tables.c (get_lbp): Assume REVISION_22 to be false. These
90069         were mistakes in UAX #14 revision 22 that are corrected in revision 24.
90070         Clarify what to do with unilbrk/lbrkprop.txt and uniwbrk/wbrkprop.txt.
90072 2011-01-07  Bruno Haible  <bruno@clisp.org>
90074         strtod: Restore errno when successfully parsing Infinity or NaN.
90075         * lib/strtod.c (strtod): After successfully parsing an Infinity or NaN,
90076         restore the original errno.
90078 2011-01-07  Bruno Haible  <bruno@clisp.org>
90080         remove test: Avoid failure on HP-UX 11.
90081         * tests/test-remove.c (main): Allow EEXIST as alternative error code.
90083 2011-01-07  Bruno Haible  <bruno@clisp.org>
90085         mkdir, mkdirat tests: Avoid failure on HP-UX 11.11.
90086         * tests/test-mkdir.h (test_mkdir): Allow EOPNOTSUPP as alternative
90087         error code.
90089 2011-01-07  Pádraig Brady  <P@draigBrady.com>
90091         ignore-value: fixup comments, and add Eric Blake
90092         as an author since he rewrote the macros.
90093         * lib/ignore-value.h (ignore_value):  State that
90094         we now support aggregates.  Also specify exactly
90095         when the GCC warn_unused_result feature was added.
90097 2011-01-06  Eric Blake  <eblake@redhat.com>
90099         ignore-value: support aggregate types
90100         * lib/ignore-value.h (ignore_value): Provide separate gcc
90101         definition.
90102         * modules/ignore-value-tests: New test module.
90103         * tests/test-ignore-value.c: New test.
90105         maint.mk: improve sc_prohibit_strcmp regex
90106         * top/maint.mk (sc_prohibit_strcmp): Detect strcmp()!=0, as
90107         documented.  Also, detect strcmp((expr),expr) == 0.  Exempt the
90108         definition of STRNEQ.
90110         signal: work around Haiku issue with SIGBUS
90111         * lib/siglist.h: Add comment.
90112         * lib/sig2str.c (numname_table): Swap SIGBUS order, to match
90113         strsignal's favoring of SIGSEGV.
90114         * tests/test-signal.c (main): Avoid test failure.
90115         * doc/posix-headers/signal.texi (signal.h): Document the issue.
90116         Reported by Scott McCreary.
90118         maint.mk: add pre-release check to ensure submodule commits are public
90119         * top/maint.mk (public-submodule-commit): New rule.
90120         (submodule-checks): New variable.
90121         (alpha beta stable): Depend on the variable.
90123 2011-01-05  Pádraig Brady  <P@draigBrady.com>
90124         and Jim Meyering  <meyering@redhat.com>
90126         ignore-value: make ignore_value more generic; deprecate ignore_ptr
90127         * lib/ignore-value.h: Include <stdint.h>, for decl of intptr_t.
90128         (ATTRIBUTE_DEPRECATED): Define.
90129         (_ignore_case): New function.
90130         (ignore_value): New macro, to replace the old function.
90131         (ignore_ptr): Arrange for any use to evoke a deprecation warning.
90132         * modules/ignore-value (Depends-on): Add stdint.
90134 2011-01-04  Eric Blake  <eblake@redhat.com>
90136         doc: regenerate INSTALL
90137         * doc/Makefile (INSTALL, INSTALL.ISO, INSTALL.UTF-8): Re-add
90138         @firstparagraphindent support, now that autoconf dropped it.
90139         (INSTALL_PRELUDE): Reinstate old macro.
90140         * doc/install.texi: Resync from autoconf.
90141         * doc/INSTALL: Reflect recent autoconf update.
90142         * doc/INSTALL.ISO: Likewise.
90143         * doc/INSTALL.UTF-8: Likewise.
90144         Reported by Karl Berry.
90146 2011-01-04  Bruce Korb  <address@hidden>
90148         git-version-gen: avoid a sub-shell
90149         * build-aux/git-version-gen: Redirect stderr in `...` via
90150         "exec 2>...", rather than via an added sub-shell.
90152 2011-01-03  Ben Pfaff  <blp@cs.stanford.edu>
90154         git-version-gen: use (...) rather than sh -c '...'
90155         * build-aux/git-version-gen: Rather than hard-coding a shell's name
90156         with "sh -c '...'", just use "(...)".  Less syntax is better, too.
90158 2011-01-03  Jim Meyering  <meyering@redhat.com>
90160         git-version-gen: convert leading TABs to spaces
90161         * build-aux/git-version-gen: Expand leading TABs.
90163         git-version-gen: handle failed "git rev-list"
90164         * build-aux/git-version-gen: Rather than leaking a "fatal" error
90165         from git and proceeding as if it had succeeded but printed no SHA1
90166         checksums, suppress the diagnostic and handle the failure.
90167         Reported by Bruce Korb in http://marc.info/?l=git&m=129399145930450&w=2
90169         git-version-gen: include command name in one more diagnostic
90170         * build-aux/git-version-gen: When the required .tarball-version file
90171         was missing or unreadable, you might see the diagnostic from "cat",
90172         but no trace of the name of the invoking script.  Now, you still see
90173         the diagnostic from cat, but also get one from "git-version-gen: ".
90174         Inspired by a patch from Bruce Korb.
90176         update-copyright: adjust test to match changed code
90177         * tests/test-update-copyright.sh: Change test's expected output
90178         to match new actual output.
90180 2011-01-02  Bruno Haible  <bruno@clisp.org>
90182         getlogin_r: Avoid test failure on HP-UX 11.
90183         * tests/test-getlogin_r.c (main): Allow an error code EINVAL instead of
90184         ERANGE when the second argument is zero.
90185         * doc/posix-functions/getlogin_r.texi: Document the HP-UX 11
90186         portability problem.
90188 2011-01-02  Bruce Korb  <bkorb@gnu.org>
90190         * build-aux/update-copyright: doc Simon's changes
90192 2011-01-02  Simon Josefsson  <simon@josefsson.org>
90194         * build-aux/update-copyright: Support UPDATE_COPYRIGHT_HOLDER
90195         environment variable.
90197 2011-01-02  Bruno Haible  <bruno@clisp.org>
90199         unigbrk: Avoid gcc warnings.
90200         * lib/unigbrk/u16-grapheme-breaks.c (u16_grapheme_breaks): Remove
90201         unused variable.
90202         * lib/unigbrk/u16-grapheme-prev.c (u16_grapheme_prev): Likewise.
90203         * lib/unigbrk/u8-grapheme-prev.c (u8_grapheme_prev): Likewise.
90204         * tests/unigbrk/test-u16-grapheme-breaks.c (main): Likewise.
90205         * tests/unigbrk/test-u32-grapheme-breaks.c (main): Likewise.
90206         * tests/unigbrk/test-u8-grapheme-breaks.c (test_u8_grapheme_breaks):
90207         Change type of first argument to 'const char *'.
90208         (main): Remove unused variable.
90209         * tests/unigbrk/test-u8-grapheme-next.c (test_u8_grapheme_next): Change
90210         type of first argument to 'const char *'.
90211         * tests/unigbrk/test-u8-grapheme-prev.c (test_u8_grapheme_prev):
90212         Likewise.
90213         (main): Change type of variable 's'.
90214         * tests/unigbrk/test-uc-is-grapheme-break.c (main): Cast column number
90215         to 'int'.
90217 2011-01-02  Bruno Haible  <bruno@clisp.org>
90219         pwrite: Fix test whether it works and make it work on HP-UX 11.11.
90220         * m4/pwrite.m4 (gl_FUNC_PWRITE): Use AC_LANG_PROGRAM, not
90221         AC_LANG_SOURCE. Extend the test program to catch another HP-UX 11.11
90222         bug.
90223         * lib/pwrite.c: Undo 2010-12-31 patch.
90224         * doc/posix-functions/pwrite.texi: Document another HP-UX 11.11 bug.
90226 2011-01-02  Bruno Haible  <bruno@clisp.org>
90228         pread: Fix test whether it works.
90229         * m4/pread.m4 (gl_FUNC_PREAD): Use AC_LANG_PROGRAM, not AC_LANG_SOURCE.
90231 2011-01-02  Bruno Haible  <bruno@clisp.org>
90233         Fix detection of traditional Arabic locale on HP-UX, Solaris, Cygwin.
90234         * m4/locale-ar.m4 (gt_LOCALE_AR): Require that the locale encoding name
90235         ends in "6". Don't require a specific month name. Try also the locale
90236         names found on HP-UX 11 and Solaris 7.
90238 2011-01-02  Bruno Haible  <bruno@clisp.org>
90240         tcgetsid: Correct linkage in C++ mode on HP-UX 11.00.
90241         * lib/termios.in.h: In C++ mode, on HP-UX, include <sys/termios.h> with
90242         C linkage.
90243         * doc/posix-functions/tcgetsid.texi: Mention the HP-UX 11.00 bug.
90245 2011-01-01  Ben Pfaff  <blp@cs.stanford.edu>
90247         Rename uc_is_grapheme_cluster_break() to uc_is_grapheme_break()
90248         for consistency, since the "cluster" term is not used elsewhere.
90249         * lib/unigbrk.in.h: Update name.
90250         * lib/unigbrk/u16-grapheme-breaks.c: Update name.
90251         * lib/unigbrk/u16-grapheme-next.c: Update name.
90252         * lib/unigbrk/u16-grapheme-prev.c: Update name.
90253         * lib/unigbrk/u32-grapheme-breaks.c: Update name.
90254         * lib/unigbrk/u32-grapheme-next.c: Update name.
90255         * lib/unigbrk/u32-grapheme-prev.c: Update name.
90256         * lib/unigbrk/u8-grapheme-breaks.c: Update name.
90257         * lib/unigbrk/u8-grapheme-next.c: Update name.
90258         * lib/unigbrk/u8-grapheme-prev.c: Update name.
90259         * lib/unigbrk/uc-is-grapheme-break.c: Update name.
90260         * tests/unigbrk/test-uc-is-grapheme-break.c: Update name.
90261         Suggested by Bruno Haible.
90263 2011-01-01  Ben Pfaff  <blp@cs.stanford.edu>
90265         Remove module 'u8-grapheme-len' as too redundant with
90266         'u8-grapheme-next'.
90267         * modules/unigbrk/u8-grapheme-len: Delete file.
90268         * modules/unigbrk/u8-grapheme-len-tests: Delete file.
90269         * lib/unigbrk.in.h: Remove prototype for deleted function.
90270         * lib/unigbrk/u8-grapheme-len.c: Delete file.
90271         * tests/unigbrk/test-u8-grapheme-len.c: Delete file.
90273         Remove module 'u16-grapheme-len' as too redundant with
90274         'u16-grapheme-next'.
90275         * modules/unigbrk/u16-grapheme-len: Delete file.
90276         * modules/unigbrk/u16-grapheme-len-tests: Delete file.
90277         * lib/unigbrk.in.h: Remove prototype for deleted function.
90278         * lib/unigbrk/u16-grapheme-len.c: Delete file.
90279         * tests/unigbrk/test-u16-grapheme-len.c: Delete file.
90281         Remove module 'u32-grapheme-len' as too redundant with
90282         'u32-grapheme-next'.
90283         * modules/unigbrk/u32-grapheme-len: Delete file.
90284         * modules/unigbrk/u32-grapheme-len-tests: Delete file.
90285         * lib/unigbrk.in.h: Remove prototype for deleted function.
90286         * lib/unigbrk/u32-grapheme-len.c: Delete file.
90287         * tests/unigbrk/test-u32-grapheme-len.c: Delete file.
90289         Suggested by Bruno Haible.
90291 2011-01-01  Ben Pfaff  <blp@cs.stanford.edu>
90293         * unigbrk.in.h: Fix typo: "ben" => "been".
90294         Reported by Bruno Haible.
90296 2011-01-01  Jim Meyering  <meyering@redhat.com>
90298         maint: update almost all copyright ranges to include 2011
90299         Run the new "make update-copyright" rule.
90301 2011-01-01  Jim Meyering  <meyering@redhat.com>
90303         maint: update-copyright: exempt doc/INSTALL*
90304         * Makefile (update-copyright): Also exclude doc/INSTALL*,
90305         since they are generated.  Suggested by Bruno Haible.
90307 2011-01-01  Jim Meyering  <meyering@redhat.com>
90309         maint: refine the update-copyright rule
90310         * Makefile (update-copyright): Also exclude any file that includes
90311         the "GENERATED AUTOMATICALLY" comment, being careful not to exclude
90312         code that merely generates the comment.
90314 2010-12-31  Ben Pfaff  <blp@cs.stanford.edu>
90316         New module 'u8-grapheme-len'.
90317         * modules/unigbrk/u8-grapheme-len: New file.
90318         * modules/unigbrk/u8-grapheme-len-tests: New file.
90319         * lib/unigbrk.in.h: Add prototype for new function.
90320         * lib/unigbrk/u8-grapheme-len.c: New file.
90321         * tests/unigbrk/test-u8-grapheme-len.c: New file.
90323         New module 'u16-grapheme-len'.
90324         * modules/unigbrk/u16-grapheme-len: New file.
90325         * modules/unigbrk/u16-grapheme-len-tests: New file.
90326         * lib/unigbrk.in.h: Add prototype for new function.
90327         * lib/unigbrk/u16-grapheme-len.c: New file.
90328         * tests/unigbrk/test-u16-grapheme-len.c: New file.
90330         New module 'u32-grapheme-len'.
90331         * modules/unigbrk/u32-grapheme-len: New file.
90332         * modules/unigbrk/u32-grapheme-len-tests: New file.
90333         * lib/unigbrk.in.h: Add prototype for new function.
90334         * lib/unigbrk/u32-grapheme-len.c: New file.
90335         * tests/unigbrk/test-u32-grapheme-len.c: New file.
90337         New module 'u8-grapheme-next'.
90338         * modules/unigbrk/u8-grapheme-next: New file.
90339         * modules/unigbrk/u8-grapheme-next-tests: New file.
90340         * lib/unigbrk.in.h: Add prototype for new function.
90341         * lib/unigbrk/u8-grapheme-next.c: New file.
90342         * tests/unigbrk/test-u8-grapheme-next.c: New file.
90344         New module 'u16-grapheme-next'.
90345         * modules/unigbrk/u16-grapheme-next: New file.
90346         * modules/unigbrk/u16-grapheme-next-tests: New file.
90347         * lib/unigbrk.in.h: Add prototype for new function.
90348         * lib/unigbrk/u16-grapheme-next.c: New file.
90349         * tests/unigbrk/test-u16-grapheme-next.c: New file.
90351         New module 'u32-grapheme-next'.
90352         * modules/unigbrk/u32-grapheme-next: New file.
90353         * modules/unigbrk/u32-grapheme-next-tests: New file.
90354         * lib/unigbrk.in.h: Add prototype for new function.
90355         * lib/unigbrk/u32-grapheme-next.c: New file.
90356         * tests/unigbrk/test-u32-grapheme-next.c: New file.
90358         New module 'u8-grapheme-prev'.
90359         * modules/unigbrk/u8-grapheme-prev: New file.
90360         * modules/unigbrk/u8-grapheme-prev-tests: New file.
90361         * lib/unigbrk.in.h: Add prototype for new function.
90362         * lib/unigbrk/u8-grapheme-prev.c: New file.
90363         * tests/unigbrk/test-u8-grapheme-prev.c: New file.
90365         New module 'u16-grapheme-prev'.
90366         * modules/unigbrk/u16-grapheme-prev: New file.
90367         * modules/unigbrk/u16-grapheme-prev-tests: New file.
90368         * lib/unigbrk.in.h: Add prototype for new function.
90369         * lib/unigbrk/u16-grapheme-prev.c: New file.
90370         * tests/unigbrk/test-u16-grapheme-prev.c: New file.
90372         New module 'u32-grapheme-prev'.
90373         * modules/unigbrk/u32-grapheme-prev: New file.
90374         * modules/unigbrk/u32-grapheme-prev-tests: New file.
90375         * lib/unigbrk.in.h: Add prototype for new function.
90376         * lib/unigbrk/u32-grapheme-prev.c: New file.
90377         * tests/unigbrk/test-u32-grapheme-prev.c: New file.
90379         New module 'u8-grapheme-breaks'.
90380         * modules/unigbrk/u8-grapheme-breaks: New file.
90381         * modules/unigbrk/u8-grapheme-breaks-tests: New file.
90382         * lib/unigbrk.in.h: Add prototype for new function.
90383         * lib/unigbrk/u8-grapheme-breaks.c: New file.
90384         * tests/unigbrk/test-u8-grapheme-breaks.c: New file.
90386         New module 'u16-grapheme-breaks'.
90387         * modules/unigbrk/u16-grapheme-breaks: New file.
90388         * modules/unigbrk/u16-grapheme-breaks-tests: New file.
90389         * lib/unigbrk.in.h: Add prototype for new function.
90390         * lib/unigbrk/u16-grapheme-breaks.c: New file.
90391         * tests/unigbrk/test-u16-grapheme-breaks.c: New file.
90393         New module 'u32-grapheme-breaks'.
90394         * modules/unigbrk/u32-grapheme-breaks: New file.
90395         * modules/unigbrk/u32-grapheme-breaks-tests: New file.
90396         * lib/unigbrk.in.h: Add prototype for new function.
90397         * lib/unigbrk/u32-grapheme-breaks.c: New file.
90398         * tests/unigbrk/test-u32-grapheme-breaks.c: New file.
90400         New module 'ulc-grapheme-breaks'.
90401         * modules/unigbrk/ulc-grapheme-breaks: New file.
90402         * modules/unigbrk/ulc-grapheme-breaks-tests: New file.
90403         * m4/locale-ar.m4: New file.
90404         * lib/unigbrk/ulc-grapheme-breaks.c: New file.
90405         * tests/unigbrk/test-ulc-grapheme-breaks.c: New file.
90406         * tests/unigbrk/test-ulc-grapheme-breaks.sh: New file.
90408 2010-12-31  Ben Pfaff  <blp@cs.stanford.edu>
90410         gbrkprop: Fix implementation of uc_graphemeclusterbreak_property.
90411         * lib/unigbrk/gbrkprop.h: Regenerate with gen-uni-tables.c.  I had
90412         modified how this file was generated before I initially submitted
90413         the module, but failed to regenerate it.  This meant that several
90414         of the level2 entries were wrong.
90415         * lib/unigbrk/uc-gbrk-prop.h (uc_graphemeclusterbreak_property):
90416         Remove the division-by-2 that is folded into the table now that
90417         gbrkprop.h has been regenerated properly.  Now -1 entries are
90418         handled correctly.
90420         New module 'unigbrk/uc-gbrk-prop-tests'.
90421         * modules/unigbrk/uc-gbrk-prop-tests: New file.
90422         * lib/gen-uni-tables.c: Generate tests/test-uc-gbrk-prop.h.
90423         * tests/unigbrk/test-uc-gbrk-prop.c: New file.
90424         * tests/unigbrk/test-uc-gbrk-prop.h: New file.
90426 2011-01-01  Bruno Haible  <bruno@clisp.org>
90428         Avoid use of hexadecimal escapes.
90429         * tests/unigbrk/test-uc-is-grapheme-break.c (main): Use octal escapes
90430         instead of hexadecimal escapes.
90432 2011-01-01  Jim Meyering  <meyering@redhat.com>
90434         maint: new rule to update copyright year ranges
90435         * Makefile (update-copyright): New rule.
90437         maint: indent with TABs in Makefile
90438         * Makefile: Expand leading sequences of spaces to TABs
90440         version-etc: update the copyright year it reports
90441         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2011.
90443 2010-12-31  Bruno Haible  <bruno@clisp.org>
90445         isfinite: Avoid compiler bug of "cc -O" on HP-UX 11.11.
90446         * lib/isfinite.c (zerof, zerod, zerol): New variables.
90447         (gl_isfinitef, gl_isfinited, gl_isfinitel): Use them instead of literal
90448         zero.
90450 2010-12-31  Bruno Haible  <bruno@clisp.org>
90452         pwrite: Work around HP-UX 11.11 bug.
90453         * m4/pwrite.m4 (gl_FUNC_PWRITE): When pwrite exists, test whether it
90454         works and set REPLACE_PWRITE if not.
90455         * lib/pwrite.c (pwrite): Add an implementation that uses the system
90456         function.
90457         * doc/posix-functions/pwrite.texi: Document the HP-UX 11 bug.
90459 2010-12-31  Bruno Haible  <bruno@clisp.org>
90461         pread: Work around HP-UX 11 bugs.
90462         * m4/pread.m4 (gl_FUNC_PREAD): When pread exists, test whether it works
90463         and set REPLACE_PREAD if not.
90464         * doc/posix-functions/pread.texi: Document the HP-UX 11 bugs.
90466 2010-12-31  Eric Blake  <eblake@redhat.com>
90468         nl_langinfo: fix YESEXPR on Irix 6.5
90469         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Test for Irix bug.
90470         * lib/nl_langinfo.c (rpl_nl_langinfo): Work around it.
90471         * doc/posix-functions/nl_langinfo.texi (nl_langinfo): Document
90472         it.
90474 2010-12-31  Bruno Haible  <bruno@clisp.org>
90476         iconv: Document HP-UX 11 bug.
90477         * doc/posix-functions/iconv.texi: Document HP-UX 11 return value bug.
90479 2010-12-31  Bruno Haible  <bruno@clisp.org>
90481         ldexpl: Fix link error on HP-UX 11.
90482         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): When replacing ldexpl, set
90483         LDEXPL_LIBM, using $ISNANL_LIBM.
90485 2010-12-31  Eric Blake  <eblake@redhat.com>
90487         ftello: avoid compilation failure with SunStudio c89
90488         * lib/ftello.c (ftello): Use lseek, not llseek.
90490         tests: avoid failing coreutils tests on cygwin
90491         * tests/init.sh (find_exe_basenames_): Exempt [.exe.
90492         (create_exe_shims_): Return 0 when skipping.
90494 2010-12-31  Bruno Haible  <bruno@clisp.org>
90496         sys_select: Avoid warning about missing memset declaration on HP-UX 11.
90497         * lib/sys_select.in.h: On HP-UX, include also <string.h>.
90499 2010-12-31  Bruno Haible  <bruno@clisp.org>
90501         waitpid: Fix link error in C++ mode.
90502         * lib/sys_wait.in.h: Remove extern "C" { ... } group.
90504 2010-12-31  Bruno Haible  <bruno@clisp.org>
90506         isnan: Use GCC built-ins when possible.
90507         * lib/math.in.h (gl_isnan_f): Use __builtin_isnanf instead of
90508         __builtin_isnan.
90509         (gl_isnan_l): Use __builtin_isnanl instead of __builtin_isnan.
90510         (isnan): Define using GCC built-ins for GCC >= 4.0.
90512 2010-12-31  Bruno Haible  <bruno@clisp.org>
90514         isnand: Fix mistake.
90515         * m4/isnand.m4 (gl_HAVE_ISNAND_IN_LIBM): Use __builtin_isnan, not
90516         __builtin_isnand.
90518 2010-12-31  Bruno Haible  <bruno@clisp.org>
90520         open: Avoid C++ error on HP-UX 11.
90521         * lib/fcntl.in.h (open): Disable _GL_CXXALIASWARN invocation on HP-UX.
90523 2010-12-31  Bruno Haible  <bruno@clisp.org>
90525         time_r: Add missing declarations on HP-UX 11.
90526         * lib/time.in.h (localtime_r, gmtime_r): Test HAVE_DECL_LOCALTIME_R
90527         instead of HAVE_LOCALTIME_R.
90528         * m4/time_r.m4 (gl_TIME_R): Test whether localtime_r is declared. Set
90529         HAVE_LOCALTIME_R always.
90530         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize
90531         HAVE_DECL_LOCALTIME_R, not HAVE_LOCALTIME_R.
90532         * modules/time (Makefile.am): Substitute HAVE_DECL_LOCALTIME_R, not
90533         HAVE_LOCALTIME_R.
90534         * doc/posix-functions/gmtime_r.texi: Document the HP-UX 11 problem.
90535         * doc/posix-functions/localtime_r.texi: Likewise.
90537 2010-12-29  Eric Blake  <eblake@redhat.com>
90539         mountlist: tweak previous commit
90540         * lib/mountlist.c (me_remote): Guarantee trailing backslash.
90541         Reported by Paul Eggert.
90543         mountlist: fix local drive detection on cygwin
90544         * lib/mountlist.c (ME_REMOTE) [__CYGWIN__]: Provide implementation
90545         that works for cygwin.
90547 2010-12-29  Paul Eggert  <eggert@cs.ucla.edu>
90549         ftoastr, snprintf: ftoastr + snprintf module
90550         * lib/ftoastr.c: Use GNULIB_SNPRINTF, not GNULIB_SNPRINTF_POSIX,
90551         since the snprintf module now should be good enough here.
90552         * modules/snprintf (configure.ac): Add gl_MODULE_INDICATOR([snprintf]).
90553         It seems odd to have both gl_STDIO_MODULE_INDICATOR([snprintf])
90554         and gl_MODULE_INDICATOR([snprintf]), but the former enables
90555         GNULIB_SNPRINTF only for the test directory, and the latter
90556         doesn't arrange for gl_STDIO_H_DEFAULTS to be called, so neither
90557         seems to suffice by itself.
90559 2010-12-28  Paul Eggert  <eggert@cs.ucla.edu>
90561         alloca: one step towards thread-safety
90562         * lib/alloca.c (find_stack_direction): New arg PTR, to avoid the
90563         need for a static variable.  All callers changed.  This does not
90564         make the alloca replacement thread-safe, but it's one step.
90566         tests: minor indenting change
90567         * tests/init.sh: Sync from coreutils housekeeping patch
90568         <http://lists.gnu.org/r/coreutils/2010-12/msg00116.html>
90569         to keep lines within 80 columns.
90571 2010-12-28  Jim Meyering  <meyering@redhat.com>
90573         regex: don't infloop on persistent failing calloc
90574         * lib/regexec.c (build_trtable): Return failure indication upon
90575         calloc failure.  Otherwise, re_search_internal could infloop on OOM.
90576         In glibc, this was fixed for version 2.13:
90577         http://sourceware.org/bugzilla/show_bug.cgi?id=12348
90579 2010-12-28  Bruno Haible  <bruno@clisp.org>
90580             Paul Eggert <eggert@cs.ucla.edu>
90582         linkat: Make implementation robust against system behaviour variations.
90583         * m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): Define
90584         LINK_FOLLOWS_SYMLINKS to -1 if it needs a runtime test in the Solaris
90585         way, and to -2 if it needs a generic runtime test.
90586         * lib/linkat.c (solaris_optimized_link_immediate,
90587         solaris_optimized_link_follow): New functions.
90588         * tests/test-linkat.c (EXPECT_LINK_HARDLINKS_SYMLINKS): New macro.
90589         (check_same_link): Use it.
90591 2010-12-26  Ben Pfaff  <blp@cs.stanford.edu>
90593         New module 'unigbrk/base'.
90594         * modules/unigbrk/base: New file.
90595         * lib/unigbrk.in.h: New file.
90597         New module 'unigbrk/uc-gbrk-prop'.
90598         * lib/gen-uni-tables.c: Generate lib/unigbrk/gbrkprop.h.
90599         * modules/unigbrk/uc-gbrk-prop: New file.
90600         * lib/unigbrk/gbrkprop.h: New file.
90601         * lib/unigbrk/uc-gbrk-prop.c: New file.
90603         New module 'unigbrk/uc-is-grapheme-break'.
90604         * modules/unigbrk/uc-is-grapheme-break: New file.
90605         * modules/unigbrk/uc-is-grapheme-break-tests: New file.
90606         * lib/unigbrk/uc-is-grapheme-break.c: New file.
90607         * tests/unigbrk/test-uc-is-grapheme-break.c: New file.
90608         * tests/unigbrk/test-uc-is-grapheme-break.sh: New file.
90609         * tests/unigbrk/GraphemeBreakTest.txt: New file.
90611         With corrections and tweaks by Bruno Haible <bruno@clisp.org>.
90613 2010-12-27  Bruno Haible  <bruno@clisp.org>
90615         linkat test: Avoid failure on Solaris 11 2010-11.
90616         * tests/test-linkat.c (main): Allow ENOTDIR as alternative error code.
90618 2010-12-27  Paul Eggert  <eggert@cs.ucla.edu>
90620         utimens: work around glibc rounding bug on more platforms
90621         * lib/utimens.c (fdutimens): Work around rounding bug even if
90622         HAVE_WORKING_UTIMES.  Reported for Linux 2.4.21 by Bruno Haible in
90623         <http://lists.gnu.org/r/bug-gnulib/2010-12/msg00298.html>.
90625 2010-12-27  Bruno Haible  <bruno@clisp.org>
90627         select tests: Improve comments.
90628         * tests/test-select.c (do_select): Add comments.
90630 2010-12-27  Bruno Haible  <bruno@clisp.org>
90632         select tests: Safer way of handling timeout.
90633         * tests/test-select.c (do_select_nowait): Zero-initialize the timeout
90634         at every invocation.
90636 2010-12-27  Bruno Haible  <bruno@clisp.org>
90638         select tests: Use 'bool' where appropriate.
90639         * tests/test-select.c (connect_to_socket): Change argument type to
90640         'bool'.
90642 2010-12-27  Bruno Haible  <bruno@clisp.org>
90644         select tests: Use existing modules.
90645         * modules/select-tests (Depends-on): Add pipe-posix, unistd.
90646         (configure.ac): Don't test for unistd.h.
90647         * tests/test-select.c: Include <unistd.h> always. Use pipe() as
90648         declared in <unistd.h>.
90650 2010-12-27  Bruno Haible  <bruno@clisp.org>
90652         mbrtowc: Work around a Solaris 7 bug.
90653         * m4/mbrtowc.m4 (gl_MBRTOWC_NULL_ARG1): New macro.
90654         (gl_MBRTOWC_NULL_ARG2): Renamed from gl_MBRTOWC_NULL_ARG.
90655         (gl_FUNC_MBRTOWC): Update. Define MBRTOWC_NULL_ARG2_BUG instead of
90656         MBRTOWC_NULL_ARG_BUG. Invoke gl_MBRTOWC_NULL_ARG1 and define
90657         MBRTOWC_NULL_ARG1_BUG.
90658         * lib/mbrtowc.c (rpl_mbrtowc): Use MBRTOWC_NULL_ARG2_BUG instead of
90659         MBRTOWC_NULL_ARG_BUG. Handle MBRTOWC_NULL_ARG1_BUG.
90660         * tests/test-mbrtowc.c (main): Test support of a NULL first argument.
90661         * doc/posix-functions/mbrtowc.texi: Mention the Solaris 7 bug.
90663 2010-12-27  Jim Meyering  <meyering@redhat.com>
90665         read-file.c: tweak syntax
90666         * lib/read-file.c (fread_file): Remove space after "*" in function
90667         definitions.
90669 2010-12-27  Bruno Haible  <bruno@clisp.org>
90671         times test: Avoid gcc warnings on OSF/1.
90672         * tests/test-times.c (main): Cast printf arguments from clock_t to
90673         'long int'.
90675 2010-12-27  Paul Eggert  <eggert@cs.ucla.edu>
90677         utimens: work around glibc rounding bug on older Linux kernels
90678         * lib/utimens.c (fdutimens): If invoking futimesat or futimes
90679         on Linux with a glibc whose utimes might not work, then work
90680         around a longstanding glibc bug involving rounding rather than
90681         truncated time stamps.  Reported for Linux 2.4.21 by Bruno Haible in
90682         <http://lists.gnu.org/r/bug-gnulib/2010-11/msg00113.html>.
90684 2010-12-26  Bruno Haible  <bruno@clisp.org>
90686         inet_ntop: Hide mismatch of declaration on NonStop Kernel.
90687         * lib/arpa_inet.in.h (inet_ntop): Use _GL_CXXALIAS_SYS_CAST instead of
90688         _GL_CXXALIAS_SYS.
90689         Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
90691 2010-12-26  Bruno Haible  <bruno@clisp.org>
90693         inet_ntop, inet_pton: Ensure declaration on NonStop Kernel.
90694         * lib/arpa_inet.in.h: On NonStop Kernel, include also <netdb.h>.
90695         * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET): Likewise.
90696         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Include also <netdb.h> when
90697         looking for the declaration.
90698         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
90699         * doc/posix-functions/inet_ntop.texi: Document the NonStop Kernel
90700         problem.
90701         * doc/posix-functions/inet_pton.texi: Likewise.
90703 2010-12-26  Bruno Haible  <bruno@clisp.org>
90705         arpa_inet: Use the common idioms with C++ support.
90706         * lib/arpa_inet.in.h: Include c++defs.h.
90707         (inet_ntop, inet_pton): Declare using the macros with C++ namespace
90708         support.
90709         * modules/arpa_inet (Depends-on): Add c++defs.
90710         (Makefile.am): Substitute the contents of c++defs.h.
90711         * modules/arpa_inet-tests (Depends-on): Add arpa_inet-c++-tests.
90712         * modules/arpa_inet-c++-tests: New file.
90713         * tests/test-arpa_inet-c++.cc: New file.
90715 2010-12-25  Bruno Haible  <bruno@clisp.org>
90717         Fix more C++ link errors on Solaris 8.
90718         * modules/fcntl-h-c++-tests (test_fcntl_h_c___LDADD): Add
90719         $(LIB_EACCESS).
90720         * modules/stdio-c++-tests (test_stdio_c___LDADD): Likewise.
90721         * modules/stdlib-c++-tests (test_stdlib_c___LDADD): Likewise.
90722         * modules/sys_ioctl-c++-tests (test_sys_ioctl_c___LDADD): Likewise.
90723         * modules/wchar-c++-tests (test_wchar_c___LDADD): Likewise.
90724         * modules/wctype-c++-tests (test_wctype_c___LDADD): Likewise.
90726 2010-12-25  Bruno Haible  <bruno@clisp.org>
90728         printf-posix: Fix link error when a non-GCC compiler is used.
90729         * lib/stdio.in.h (printf): When not using GCC, override printf
90730         correctly.
90731         Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
90733 2010-12-25  Bruno Haible  <bruno@clisp.org>
90735         strerror_r-posix: Update doc.
90736         * doc/posix-functions/strerror_r.texi: Update doc about the return
90737         value. See <http://sources.redhat.com/bugzilla/show_bug.cgi?id=12204>.
90739 2010-12-25  Paul Eggert  <eggert@cs.ucla.edu>
90741         utimens: simplify the logic of the previous change
90742         * m4/utimes.m4 (gl_FUNC_UTIMES): Simplify the logic a bit.
90743         This should not affect whether the test succeeds or fails.
90745         utimens: configure better on hosts with NFS clock skew
90746         * m4/utimes.m4 (gl_FUNC_UTIMES): Don't assume that utimes (f, NULL)
90747         uses the clock of the local host.  It might use the clock of the
90748         NFS server.  Reported for Linux 2.4.21 client by Bruno Haible in
90749         <http://lists.gnu.org/r/bug-gnulib/2010-11/msg00113.html>.
90751 2010-12-25  Bruno Haible  <bruno@clisp.org>
90753         ptsname test: Avoid failure on Solaris.
90754         * tests/test-ptsname.c (main): For Solaris, use the recommended way to
90755         open a pseudo-terminal; don't use BSD-style ptys.
90756         * doc/posix-functions/ptsname.texi: Document the limitation on Solaris.
90758 2010-12-25  Bruno Haible  <bruno@clisp.org>
90760         ptsname: Avoid ERANGE failure on some systems.
90761         * lib/ptsname.c (buffer): Increase size.
90763 2010-12-25  Bruno Haible  <bruno@clisp.org>
90765         rename, renameat: Avoid test failures at NFS mounted locations.
90766         * tests/test-rename.h (assert_nonexistent): Remove the old directory,
90767         so that subsequent mkdir calls succeed.
90769 2010-12-25  Bruno Haible  <bruno@clisp.org>
90771         iswblank: Fix C++ link error on Solaris 8.
90772         * lib/wctype.in.h (iswblank): Declare using _GL_FUNCDECL_RPL or
90773         _GL_FUNCDECL_SYS.
90775 2010-12-25  Bruno Haible  <bruno@clisp.org>
90777         unistd: Fix C++ link error on Solaris 8.
90778         * modules/unistd-c++-tests (test_unistd_c___LDADD): Add $(LIB_EACCESS).
90780 2010-12-25  Bruno Haible  <bruno@clisp.org>
90782         readlink doc: Mention an old glibc bug.
90783         * doc/posix-functions/readlink.texi: Mention glibc 2.4 bug (BZ #2450).
90785 2010-12-25  Bruno Haible  <bruno@clisp.org>
90787         fcntl-h: Fix for use of C++ on glibc systems.
90788         * lib/fcntl.in.h: Include <sys/stat.h> before include_next <fcntl.h>
90789         also on glibc systems in C++ mode.
90790         Reported by Gary V. Vaughan <gary@gnu.org>.
90792 2010-12-25  Bruno Haible  <bruno@clisp.org>
90794         roundl-ieee: Make it work on OSF/1 5.1 with cc.
90795         * modules/roundl-ieee (Depends-on): Add floorl-ieee, ceill-ieee.
90797 2010-12-25  Bruno Haible  <bruno@clisp.org>
90799         truncl-ieee: Make it work on OSF/1 5.1 with cc.
90800         * doc/posix-functions/truncl.texi: Mention the OSF/1 5.1 bug.
90801         * m4/truncl.m4 (gl_FUNC_TRUNCL): If gl_FUNC_TRUNCL_IEEE is also used,
90802         test whether truncl works according to ISO C 99 with IEC 60559.
90803         * m4/truncl-ieee.m4: New file.
90804         * modules/truncl-ieee (Files): Add it and m4/minus-zero.m4,
90805         m4/signbit.m4.
90806         (configure.ac): Invoke gl_FUNC_TRUNCL_IEEE.
90808 2010-12-25  Bruno Haible  <bruno@clisp.org>
90810         ceill-ieee: Make it work on OSF/1 5.1 with cc.
90811         * doc/posix-functions/ceill.texi: Mention the OSF/1 5.1 bug.
90812         * m4/ceill.m4 (gl_FUNC_CEILL): If gl_FUNC_CEILL_IEEE is also used,
90813         test whether ceill works according to ISO C 99 with IEC 60559.
90814         * m4/ceill-ieee.m4: New file.
90815         * modules/ceill-ieee (Files): Add it and m4/minus-zero.m4,
90816         m4/signbit.m4.
90817         (configure.ac): Invoke gl_FUNC_CEILL_IEEE.
90819 2010-12-25  Bruno Haible  <bruno@clisp.org>
90821         Ensure all prerequisites of <wchar.h> are included.
90822         * m4/btowc.m4 (gl_FUNC_BTOWC): Include <stddef.h>, <stdio.h>, <time.h>
90823         before <wchar.h>.
90824         * m4/mbrlen.m4 (gl_MBRLEN_INCOMPLETE_STATE, gl_MBRLEN_RETVAL,
90825         gl_MBRLEN_NUL_RETVAL): Likewise.
90826         * m4/mbrtowc.m4 (gl_MBRTOWC_INCOMPLETE_STATE, gl_MBRTOWC_SANITYCHECK,
90827         gl_MBRTOWC_NULL_ARG, gl_MBRTOWC_RETVAL, gl_MBRTOWC_NUL_RETVAL,
90828         AC_FUNC_MBRTOWC): Likewise.
90829         * m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): Likewise.
90830         * m4/mbstate_t.m4 (AC_TYPE_MBSTATE_T): Likewise.
90831         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise.
90832         * m4/wcsrtombs.m4 (gl_WCSRTOMBS_TERMINATION, gl_WCSRTOMBS_NULL):
90833         Likewise.
90834         * m4/wctob.m4 (gl_FUNC_WCTOB): Likewise.
90835         * m4/wchar_h.m4 (gl_WCHAR_H_INLINE_OK): Likewise.
90836         (gl_WCHAR_H): Improve comments.
90837         * m4/wctype_h.m4 (gl_WCTYPE_H): Likewise.
90839 2010-12-25  Bruno Haible  <bruno@clisp.org>
90841         strtok_r: Fix C syntax error in autoconf macro.
90842         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Don't use UTF-8 encoded U+00A0
90843         characters in test program.
90845 2010-12-24  Bruno Haible  <bruno@clisp.org>
90847         ceil, trunc, round: Fix gcc warnings.
90848         * lib/ceil.c (MIN): Undefine before redefining.
90849         * lib/trunc.c (MIN): Likewise.
90850         * lib/round.c (MIN): Likewise.
90851         Include <math.h> first.
90853 2010-12-24  Bruno Haible  <bruno@clisp.org>
90855         select tests: Avoid failures on OSF/1 5.1.
90856         * tests/test-select.c (test_accept_first, test_socket_pair): Ignore
90857         failure of closing the last socket; it may fail with ECONNRESET.
90859 2010-12-24  Eric Blake  <eblake@redhat.com>
90861         stdint: avoid HP-UX 10.20 preprocessor bug
90862         * lib/stdint.in.h (INT64_MAX, UINT64_MAX): Check via #ifdef rather
90863         than #if.
90864         * tests/test-floor2.c (main): Likewise.
90865         Reported by Peter O'Gorman.
90867         pipe: make obsoletion transition easier
90868         * lib/pipe.h: Restore file as thin shim around "spawn-pipe.h".
90869         * modules/pipe (Files): Include revived file.
90870         (Include): Drop reference, to mirror getdate's behavior.
90872 2010-12-24  Bruno Haible  <bruno@clisp.org>
90874         sys_socket: Hide mismatch of declarations on NonStop Kernel.
90875         * lib/sys_socket.in.h (connect, bind, sendto, setsockopt): Use
90876         _GL_CXXALIAS_SYS_CAST instead of _GL_CXXALIAS_SYS.
90877         Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
90879 2010-12-24  Bruno Haible  <bruno@clisp.org>
90881         gethostname: Ensure declaration on NonStop Kernel.
90882         * lib/unistd.in.h: Include <netdb.h> also on NonStop Kernel systems.
90883         Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
90885 2010-12-24  Bruno Haible  <bruno@clisp.org>
90887         sys_select: Ensure all necessary types on NonStop Kernel.
90888         * lib/sys_select.in.h: If the system does not have <sys/select.h>,
90889         include <sys/time.h>.
90890         * doc/posix-headers/sys_select.texi: Mention that it's missing on
90891         NonStop Kernel.
90892         Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
90894 2010-12-24  Bruno Haible  <bruno@clisp.org>
90896         sys_select: Remove unneeded include.
90897         * lib/sys_select.in.h: Don't include <sys/socket.h> on platforms that
90898         have <sys/select.h>.
90900 2010-12-24  Bruno Haible  <bruno@clisp.org>
90902         gethostname: Provide a fallback for HOST_NAME_MAX.
90903         * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): When neither HOST_NAME_MAX
90904         nor MAXHOSTNAMELEN is found in the usual system headers, use 256
90905         instead.
90906         Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
90908 2010-12-24  Bruno Haible  <bruno@clisp.org>
90910         sigaction tests: Allow missing SA_RESETHAND and SA_RESTART.
90911         * tests/test-sigaction.c (SA_RESETHAND): Fall back to 0.
90912         (SA_RESTART): Likewise.
90913         Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
90915 2010-12-24  Bruno Haible  <bruno@clisp.org>
90917         signal: Define NSIG.
90918         * lib/signal.in.h (NSIG): Define to 32 on NonStop Kernel.
90919         * tests/test-signal.c (nsig): New variable.
90920         Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
90922 2010-12-24  Bruno Haible  <bruno@clisp.org>
90924         rename, renameat: Avoid test failures on OSF/1 5.1.
90925         * tests/test-rename.h (test_rename): Allow EEXIST and ENOTDIR as
90926         alternative error codes.
90927         * tests/test-renameat.c (main): Likewise.
90929 2010-12-24  Bruno Haible  <bruno@clisp.org>
90931         *printf: Detect large precisions bug on Solaris 10/SPARC.
90932         * m4/printf.m4 (gl_PRINTF_PRECISION): Add one more test code, provided
90933         by Paul Eggert.
90934         * tests/test-snprintf-posix.h (test_function): Add this test code here
90935         too.
90936         * tests/test-sprintf-posix.h (test_function): Likewise.
90937         * tests/test-vasnprintf-posix.c (test_function): Likewise.
90938         * tests/test-vasprintf-posix.c (test_function): Likewise.
90939         * doc/posix-functions/fprintf.texi: Mention Solaris 10 bug as worked
90940         around by gnulib.
90941         * doc/posix-functions/printf.texi: Likewise.
90942         * doc/posix-functions/snprintf.texi: Likewise.
90943         * doc/posix-functions/sprintf.texi: Likewise.
90944         * doc/posix-functions/vfprintf.texi: Likewise.
90945         * doc/posix-functions/vprintf.texi: Likewise.
90946         * doc/posix-functions/vsnprintf.texi: Likewise.
90947         * doc/posix-functions/vsprintf.texi: Likewise.
90948         * doc/posix-functions/dprintf.texi: Undo last commit.
90949         * doc/posix-functions/vdprintf.texi: Likewise.
90951 2010-12-23  Paul Eggert  <eggert@cs.ucla.edu>
90953         tests: port test-fdutimensat.c to Solaris 8
90954         * tests/test-fdutimensat.c (do_fdutimens): Don't assume
90955         fdutimensat works with a nonnegative fd and AT_SYMLINK_NOFOLLOW.
90956         On Solaris 8, it fails with errno == ENOSYS, because there is no
90957         futimens (so it can't use the fd), and there is no lutimens (so it
90958         can't implement AT_SYMLINK_NOFOLLOW on symlinks).
90960         vsnprintf: make more consistent with snprintf; doc fixes
90962         * doc/posix-functions/snprintf.texi (snprintf): The workaround for
90963         the byte count return problem was promoted from the snprintf-posix
90964         to the snprintf module.
90965         * doc/posix-functions/vsnprintf.texi (vsnprintf): Likewise.
90966         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Also check
90967         gl_SNPRINTF_RETVAL_C99, for consistency with gl_FUNC_SNPRINTF.
90968         * tests/test-snprintf.c (main): Check the byte count returned.
90969         * tests/test-vsnprintf.c (main): Likewise.
90971 2010-12-23  Eric Blake  <eblake@redhat.com>
90973         sigpipe: relax to LGPLv2+, since it did not have any LGPLv3+ parts
90974         * modules/sigpipe (License): Relax license.
90976 2010-12-22  Paul Eggert  <eggert@cs.ucla.edu>
90978         doc: document Solaris printf bug with large float precisions
90979         * doc/posix-functions/dprintf.texi (dprintf):
90980         * doc/posix-functions/fprintf.texi (fprintf):
90981         * doc/posix-functions/printf.texi (printf):
90982         * doc/posix-functions/snprintf.texi (snprintf):
90983         * doc/posix-functions/sprintf.texi (sprintf):
90984         * doc/posix-functions/vdprintf.texi (vdprintf):
90985         * doc/posix-functions/vfprintf.texi (vfprintf):
90986         * doc/posix-functions/vprintf.texi (vprintf):
90987         * doc/posix-functions/vsnprintf.texi (vsnprintf):
90988         * doc/posix-functions/vsprintf.texi (vsprintf):
90989         Mention that these functions mishandle large floating point
90990         precisions on Solaris 10.  The same bug is also present in Solaris
90991         8, and I assume earlier.  This causes "cd gnulib-tests; make
90992         check" to fail on Solaris 8 (and I assume, later) when building
90993         the latest coreutils, in test-vasprintf-posix's call to
90994         my_asprintf (&result, "%.4000f %d", 1.0, 99).  I have not checked
90995         the wide flavors (e.g., wprintf) so this patch just updates the
90996         documentation for the narrow ones.
90998         test-posixtm.c: add two tests
90999         * tests/test-posixtm.c: Add two tests, to highlight the
91000         bug in Solaris 10 (and earlier) localtime.  Gnulib doesn't work
91001         around this bug; this is merely to document it.
91003 2010-12-22  Bruno Haible  <bruno@clisp.org>
91005         getlogin_r: Work around portability problem on OSF/1.
91006         * m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Detect the OSF/1 problem.
91007         * lib/unistd.in.h (getlogin_r): Replace if REPLACE_GETLOGIN_R is set.
91008         * lib/getlogin_r.c (getlogin_r): When getlogin_r exists, invoke it and
91009         test for a truncated result.
91010         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_GETLOGIN_R.
91011         * modules/unistd (Makefile.am): Substitute REPLACE_GETLOGIN_R.
91012         * modules/getlogin_r (Depends-on): Add memchr.
91013         * doc/posix-functions/getlogin_r.texi: Mention the OSF/1 problem.
91015 2010-12-22  Bruno Haible  <bruno@clisp.org>
91017         ptsname: Avoid test failure on OSF/1 5.1.
91018         * modules/ptsname-tests (Depends-on): Add 'same-inode'.
91019         * tests/test-ptsname.c: Include <sys/stat.h>, same-inode.h.
91020         (same_slave): New function.
91021         (main): Use it to compare ptsname's result with the expected file name.
91023 2010-12-22  Bruno Haible  <bruno@clisp.org>
91025         Port extended stdio modules to HP NonStop Kernel.
91026         * lib/stdio-impl.h (_IOERR, _IOREAD, _IOWRT, _IORW) [__TANDEM]: New
91027         macros.
91028         * lib/fbufmode.c: Update comments.
91029         * lib/fflush.c: Likewise.
91030         * lib/fpurge.c: Likewise.
91031         * lib/freadable.c: Likewise.
91032         * lib/freadahead.c: Likewise.
91033         * lib/freading.c: Likewise.
91034         * lib/freadptr.c: Likewise.
91035         * lib/freadseek.c: Likewise.
91036         * lib/fseeko.c: Likewise.
91037         * lib/fseterr.c: Likewise.
91038         * lib/fwritable.c: Likewise.
91039         * lib/fwriting.c: Likewise.
91040         Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
91042 2010-12-22  Bruno Haible  <bruno@clisp.org>
91044         ttyname_r: Work around bug on OSF/1 5.1.
91045         * doc/posix-functions/ttyname_r.texi: Mention the OSF/1 bug.
91046         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Detect the OSF/1 bug. Say "no"
91047         instead of "guessing no" when the OSF/1 bug or the Solaris bug is
91048         present.
91049         * lib/ttyname_r.c (ttyname_r): Update comments.
91051 2010-12-22  Bruno Haible  <bruno@clisp.org>
91053         round: Implement result sign according to IEEE 754.
91054         * lib/round.c (MIN, MINUS_ZERO): New macros.
91055         (FLOOR_FREE_ROUND): Return -0.0 for -0.5 < x < 0.
91056         * tests/test-roundf-ieee.c (main): Test also values between -1 and 1.
91057         * tests/test-round-ieee.c (main): Likewise.
91058         * tests/test-roundl-ieee.c (main): Likewise.
91060         trunc: Implement result sign according to IEEE 754.
91061         * lib/trunc.c (MIN, MINUS_ZERO): New macros.
91062         (FUNC): Return +0.0 for 0 < x < 1 and -0.0 for -1 < x < 0.
91063         * tests/test-trunc2.c: Include minus-zero.h.
91064         (MINUS_ZERO): New macro.
91065         (trunc_reference): Keep in sync with lib/trunc.c.
91066         * tests/test-truncf2.c: Include minus-zero.h.
91067         (MINUS_ZERO): New macro.
91068         (truncf_reference): Keep in sync with lib/trunc.c.
91069         * tests/test-truncf-ieee.c (main): Test also values between -1 and 1.
91070         * tests/test-trunc-ieee.c (main): Likewise.
91071         * tests/test-truncl-ieee.c (main): Likewise.
91073         ceil: Implement result sign according to IEEE 754.
91074         * lib/ceil.c (MIN, MINUS_ZERO): New macros.
91075         (FUNC): Return -0.0 for -1 < x < 0.
91076         * tests/test-ceil2.c: Include minus-zero.h.
91077         (MINUS_ZERO): New macro.
91078         (ceil_reference): Keep in sync with lib/ceil.c.
91079         * tests/test-ceilf2.c: Include minus-zero.h.
91080         (MINUS_ZERO): New macro.
91081         (ceilf_reference): Keep in sync with lib/ceil.c.
91082         * tests/test-ceilf-ieee.c (main): Test also values between -1 and 1.
91083         * tests/test-ceil-ieee.c (main): Likewise.
91084         * tests/test-ceill-ieee.c (main): Likewise.
91086         floor: Implement result sign according to IEEE 754.
91087         * lib/floor.c (FUNC): Return +0.0 for 0 < x < 1.
91088         * tests/test-floor2.c (floor_reference): Keep in sync with lib/floor.c.
91089         * tests/test-floorf2.c (floorf_reference): Likewise.
91090         * tests/test-floorf-ieee.c (main): Test also values between -1 and 1.
91091         * tests/test-floor-ieee.c (main): Likewise.
91092         * tests/test-floorl-ieee.c (main): Likewise.
91094 2010-12-22  Bruno Haible  <bruno@clisp.org>
91096         getaddrinfo: Update doc.
91097         * doc/posix-functions/gai_strerror.texi: Return type is also different
91098         on AIX and HP-UX.
91100 2010-12-22  Paul Eggert  <eggert@cs.ucla.edu>
91102         getaddrinfo, inet_ntop: Update doc for Solaris.
91103         * doc/posix-functions/gai_strerror.texi: Return type is also an
91104         issue on Solaris 9 and earlier.
91105         * doc/posix-functions/inet_ntop.texi: 4th arg type is also an issue
91106         on Solaris 10 and earlier.
91108 2010-12-21  Bruno Haible  <bruno@clisp.org>
91110         New module 'roundl-ieee'.
91111         * modules/roundl-ieee: New file.
91112         * m4/roundl.m4 (gl_FUNC_ROUNDL): If gl_FUNC_ROUNDL_IEEE is also used,
91113         test whether roundl works according to ISO C 99 with IEC 60559.
91114         * m4/roundl-ieee.m4: New file.
91115         * modules/roundl-ieee-tests: New file.
91116         * tests/test-roundl-ieee.c: New file, based on tests/test-roundl.c.
91117         * tests/test-roundl.c (main): Remove signbit tests.
91118         * modules/roundl-tests (Depends-on): Remove signbit.
91119         * doc/posix-functions/roundl.texi: Mention the new module.
91121 2010-12-21  Bruno Haible  <bruno@clisp.org>
91123         New module 'truncl-ieee'.
91124         * modules/truncl-ieee: New file.
91125         * modules/truncl-ieee-tests: New file.
91126         * tests/test-truncl-ieee.c: New file, based on tests/test-truncl.c.
91127         * tests/test-truncl.c (main): Remove signbit tests.
91128         * modules/truncl-tests (Depends-on): Remove signbit.
91129         * doc/posix-functions/truncl.texi: Mention the new module.
91131 2010-12-21  Bruno Haible  <bruno@clisp.org>
91133         New module 'ceill-ieee'.
91134         * modules/ceill-ieee: New file.
91135         * modules/ceill-ieee-tests: New file.
91136         * tests/test-ceill-ieee.c: New file, based on tests/test-ceill.c.
91137         * tests/test-ceill.c (main): Remove signbit tests.
91138         * modules/ceill-tests (Depends-on): Remove signbit.
91139         * doc/posix-functions/ceill.texi: Mention the new module.
91141 2010-12-21  Bruno Haible  <bruno@clisp.org>
91143         New module 'floorl-ieee'.
91144         * modules/floorl-ieee: New file.
91145         * modules/floorl-ieee-tests: New file.
91146         * tests/test-floorl-ieee.c: New file, based on tests/test-floorl.c.
91147         * tests/test-floorl.c (main): Remove signbit tests.
91148         * modules/floorl-tests (Depends-on): Remove signbit.
91149         * doc/posix-functions/floorl.texi: Mention the new module.
91151 2010-12-21  Bruno Haible  <bruno@clisp.org>
91153         New module 'round-ieee'.
91154         * modules/round-ieee: New file.
91155         * m4/round.m4 (gl_FUNC_ROUND): If gl_FUNC_ROUND_IEEE is also used, test
91156         whether round works according to ISO C 99 with IEC 60559.
91157         * m4/round-ieee.m4: New file.
91158         * modules/round-ieee-tests: New file.
91159         * tests/test-round-ieee.c: New file, based on tests/test-roundf-ieee.c.
91160         * tests/test-round1.c (main): Remove signbit tests.
91161         * modules/round-tests (Depends-on): Remove 'signbit'.
91162         * doc/posix-functions/round.texi: Mention the new module.
91164 2010-12-21  Bruno Haible  <bruno@clisp.org>
91166         New module 'trunc-ieee'.
91167         * modules/trunc-ieee: New file.
91168         * m4/trunc.m4 (gl_FUNC_TRUNC): If gl_FUNC_TRUNC_IEEE is also used, test
91169         whether trunc works according to ISO C 99 with IEC 60559.
91170         * m4/trunc-ieee.m4: New file.
91171         * lib/math.in.h (trunc): Replace if REPLACE_TRUNC is set.
91172         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_TRUNC.
91173         * modules/math (Makefile.am): Substitute REPLACE_TRUNC.
91174         * modules/trunc-ieee-tests: New file.
91175         * tests/test-trunc-ieee.c: New file, based on tests/test-truncf-ieee.c.
91176         * tests/test-trunc1.c (main): Remove signbit tests.
91177         * modules/trunc-tests (Depends-on): Remove 'signbit'.
91178         * doc/posix-functions/trunc.texi: Mention the new module.
91180 2010-12-21  Bruno Haible  <bruno@clisp.org>
91182         New module 'ceil-ieee'.
91183         * modules/ceil-ieee: New file.
91184         * m4/ceil.m4 (gl_FUNC_CEIL): Require gl_MATH_H_DEFAULTS. If
91185         gl_FUNC_CEIL_IEEE is also used, test whether ceil works according to
91186         ISO C 99 with IEC 60559.
91187         * m4/ceil-ieee.m4: New file.
91188         * modules/ceil (Files): Add lib/ceil.c.
91189         (Depends-on): Add 'float'.
91190         (configure.ac): Invoke gl_MATH_MODULE_INDICATOR.
91191         * lib/math.in.h (ceil): New declaration.
91192         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_CEIL,
91193         REPLACE_CEIL.
91194         * modules/math (Makefile.am): Substitute GNULIB_CEIL, REPLACE_CEIL.
91195         * modules/ceil-ieee-tests: New file.
91196         * tests/test-ceil-ieee.c: New file, based on tests/test-ceilf-ieee.c.
91197         * tests/test-math-c++.cc: Check the signature of 'ceil'.
91198         * doc/posix-functions/ceil.texi: Mention the new module.
91200 2010-12-21  Bruno Haible  <bruno@clisp.org>
91202         New module 'floor-ieee'.
91203         * modules/floor-ieee: New file.
91204         * m4/floor.m4 (gl_FUNC_FLOOR): Require gl_MATH_H_DEFAULTS. If
91205         gl_FUNC_FLOOR_IEEE is also used, test whether floor works according to
91206         ISO C 99 with IEC 60559.
91207         * m4/floor-ieee.m4: New file.
91208         * modules/floor (Files): Add lib/floor.c.
91209         (Depends-on): Add 'float'.
91210         (configure.ac): Invoke gl_MATH_MODULE_INDICATOR.
91211         * lib/math.in.h (floor): New declaration.
91212         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FLOOR,
91213         REPLACE_FLOOR.
91214         * modules/math (Makefile.am): Substitute GNULIB_FLOOR, REPLACE_FLOOR.
91215         * modules/floor-ieee-tests: New file.
91216         * tests/test-floor-ieee.c: New file, based on tests/test-floorf-ieee.c.
91217         * tests/test-math-c++.cc: Check the signature of 'floor'.
91218         * doc/posix-functions/floor.texi: Mention the new module.
91220 2010-12-21  Bruno Haible  <bruno@clisp.org>
91222         New module 'roundf-ieee'.
91223         * modules/roundf-ieee: New file.
91224         * m4/roundf.m4 (gl_FUNC_ROUNDF): If gl_FUNC_ROUNDF_IEEE is also used,
91225         test whether roundf works according to ISO C 99 with IEC 60559.
91226         * m4/roundf-ieee.m4: New file.
91227         * modules/roundf-ieee-tests: New file.
91228         * tests/test-roundf-ieee.c: New file, based on tests/test-roundf1.c.
91229         * tests/test-roundf1.c (main): Remove signbit tests.
91230         * modules/roundf-tests (Depends-on): Remove 'signbit'.
91231         * doc/posix-functions/roundf.texi: Mention the new module.
91233 2010-12-21  Bruno Haible  <bruno@clisp.org>
91235         New module 'truncf-ieee'.
91236         * modules/truncf-ieee: New file.
91237         * m4/truncf.m4 (gl_FUNC_TRUNCF): If gl_FUNC_TRUNCF_IEEE is also used,
91238         test whether truncf works according to ISO C 99 with IEC 60559.
91239         * m4/truncf-ieee.m4: New file.
91240         * lib/math.in.h (truncf): Replace if REPLACE_TRUNCF is set.
91241         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_TRUNCF.
91242         * modules/math (Makefile.am): Substitute REPLACE_TRUNCF.
91243         * modules/truncf-ieee-tests: New file.
91244         * tests/test-truncf-ieee.c: New file, based on tests/test-truncf1.c.
91245         * tests/test-truncf1.c (main): Remove signbit tests.
91246         * modules/truncf-tests (Depends-on): Remove 'signbit'.
91247         * doc/posix-functions/truncf.texi: Mention the new module.
91249 2010-12-21  Bruno Haible  <bruno@clisp.org>
91251         New module 'ceilf-ieee'.
91252         * modules/ceilf-ieee: New file.
91253         * m4/ceilf.m4 (gl_FUNC_FLOORF): If gl_FUNC_CEILF_IEEE is also used,
91254         test whether ceilf works according to ISO C 99 with IEC 60559.
91255         * m4/ceilf-ieee.m4: New file.
91256         * modules/ceilf-ieee-tests: New file.
91257         * tests/test-ceilf-ieee.c: New file, based on tests/test-ceilf1.c.
91258         * tests/test-ceilf1.c (main): Remove signbit tests.
91259         * modules/ceilf-tests (Depends-on): Remove 'signbit'.
91260         * doc/posix-functions/ceilf.texi: Mention the new module.
91262 2010-12-21  Bruno Haible  <bruno@clisp.org>
91264         New module 'floorf-ieee'.
91265         * modules/floorf-ieee: New file.
91266         * m4/floorf.m4 (gl_FUNC_FLOORF): If gl_FUNC_FLOORF_IEEE is also used,
91267         test whether floorf works according to ISO C 99 with IEC 60559.
91268         * m4/floorf-ieee.m4: New file.
91269         * modules/floorf-ieee-tests: New file.
91270         * tests/test-floorf-ieee.c: New file, based on tests/test-floorf1.c.
91271         * tests/test-floorf1.c (main): Remove signbit tests.
91272         * modules/floorf-tests (Depends-on): Remove 'signbit'.
91273         * doc/posix-functions/floorf.texi: Mention the new module.
91275 2010-12-21  Bruno Haible  <bruno@clisp.org>
91277         Support for minus zero in autoconf macros.
91278         * m4/minus-zero.m4: New file, based on tests/minus-zero.h.
91279         * m4/signbit.m4 (gl_FLOAT_SIGNBIT_CODE, gl_DOUBLE_SIGNBIT_CODE,
91280         gl_LONG_DOUBLE_SIGNBIT_CODE, gl_FLOATTYPE_SIGNBIT_CODE): New macros.
91281         * tests/minus-zero.h: Update comments.
91283 2010-12-21  Bruno Haible  <bruno@clisp.org>
91285         Tests for module 'ceil'.
91286         * modules/ceil-tests: New file.
91287         * tests/test-ceil1.c: New file, based on tests/test-ceill.c.
91288         * tests/test-ceil2.c: New file, based on tests/test-ceilf2.c.
91290 2010-12-21  Bruno Haible  <bruno@clisp.org>
91292         Tests for module 'floor'.
91293         * modules/floor-tests: New file.
91294         * tests/test-floor1.c: New file, based on tests/test-floorl.c.
91295         * tests/test-floor2.c: New file, based on tests/test-floorf2.c.
91297 2010-12-21  Bruno Haible  <bruno@clisp.org>
91299         math: Fix indentation.
91300         * lib/math.in.h (floorf): Fix indentation.
91302 2010-12-21  Bruno Haible  <bruno@clisp.org>
91304         Fix cross-compilation guesses on Solaris.
91305         * m4/fopen.m4 (gl_FUNC_FOPEN): Correct shell pattern so that it does
91306         not match "solaris2.10".
91307         * m4/open.m4 (gl_FUNC_OPEN): Likewise.
91308         * m4/printf.m4 (gl_SNPRINTF_TRUNCATION_C99, gl_SNPRINTF_DIRECTIVE_N,
91309         gl_VSNPRINTF_ZEROSIZE_C99): Likewise.
91311 2010-12-21  Paul Eggert  <eggert@cs.ucla.edu>
91313         snprintf: port snprintf (NULL, 0, ...) to Solaris 8 and 9
91314         This fixes a problem observed with the latest coreutils snapshot
91315         that caused a test to fail on Solaris 8.  src/csplit.c's call
91316         snprintf (NULL, 0, format, UINT_MAX) returns -1 on Solaris 9 and
91317         earlier, instead of returning the number of bytes that would have
91318         been generated; this causes csplit to incorrectly report memory
91319         exhaustion.
91320         * m4/printf.m4 (gl_SNPRINTF_RETVAL_C99): Also check for
91321         snprintf (NULL, 0, ...) and (for good measure) snprintf (buf, 0, ...).
91322         Guess that it doesn't work on Solaris 2.6 through 9.  Adjust
91323         comments to match.
91324         (gl_PRINTF_SIZES_C99, gl_PRINTF_DIRECTIVE_F, gl_SNPRINTF_RETVAL_C99):
91325         Fix typo in matching older versions of Solaris: "solaris2.10"
91326         is matched by the shell pattern "solaris2.[0-9]*".  This matters
91327         only for guessing while cross-compiling.
91328         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Also check gl_SNPRINTF_RETVAL_C99.
91330 2010-12-20  Paul Eggert  <eggert@cs.ucla.edu>
91332         ftoastr: fix comment again
91333         * lib/ftoastr.h: Fix typo in comment.  Noted by Ben Pfaff in
91334         <http://lists.gnu.org/r/bug-gnulib/2010-12/msg00149.html>.
91335         Also, simplify example a bit by using flags = 0.
91337 2010-12-20  Bruno Haible  <bruno@clisp.org>
91339         round*, trunc*: Update documentation regarding glibc.
91340         * doc/posix-functions/roundf.texi: Mention missing declaration problem.
91341         * doc/posix-functions/round.texi: Likewise.
91342         * doc/posix-functions/roundl.texi: Likewise.
91343         * doc/posix-functions/truncf.texi: Likewise.
91344         * doc/posix-functions/trunc.texi: Likewise.
91345         * doc/posix-functions/truncl.texi: Likewise.
91347 2010-12-20  Bruno Haible  <bruno@clisp.org>
91349         roundf, round, roundl: Update documentation regarding OSF/1 5.1.
91350         * doc/posix-functions/roundf.texi: Mention OSF/1 5.1 problem.
91351         * doc/posix-functions/round.texi: Likewise.
91352         * doc/posix-functions/roundl.texi: Likewise.
91354 2010-12-20  Bruno Haible  <bruno@clisp.org>
91356         ttyname_r: Add missing declaration on HP-UX 11.
91357         * lib/unistd.in.h (ttyname_r): Test HAVE_DECL_TTYNAME_R instead of
91358         HAVE_TTYNAME_R.
91359         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Test whether ttyname_r is
91360         declared. Set HAVE_TTYNAME_R always.
91361         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
91362         HAVE_DECL_TTYNAME_R, not HAVE_TTYNAME_R.
91363         * modules/unistd (Makefile.am): Substitute HAVE_DECL_TTYNAME_R, not
91364         HAVE_TTYNAME_R.
91365         * doc/posix-functions/ttyname_r.texi: Document the HP-UX 11 problem.
91367 2010-12-20  Bruno Haible  <bruno@clisp.org>
91369         getlogin, getlogin_r: Document HP-UX 11.11 bugs.
91370         * doc/posix-functions/getlogin.texi: Document HP-UX 11.11 bug.
91371         * doc/posix-functions/getlogin_r.texi: Likewise.
91372         * tests/test-getlogin.c: Include <errno.h>.
91373         (main): Avoid test failure on HP-UX 11.11.
91374         * tests/test-getlogin_r.c (main): Likewise.
91376 2010-12-20  Bruno Haible  <bruno@clisp.org>
91378         getlogin_r: Add missing declaration on HP-UX 11.
91379         * m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Test whether getlogin_r is
91380         declared also when it exists as a function.
91381         * doc/posix-functions/getlogin_r.texi: Document this workaround.
91383 2010-12-20  Bruno Haible  <bruno@clisp.org>
91385         wcsrtombs: Don't confuse mbstate_t with rpl_mbstate_t.
91386         * lib/wcsrtombs.c: If gnulib overrides mbstate_t, define wcsrtombs
91387         through wcrtomb.
91389 2010-12-19  Paul Eggert  <eggert@cs.ucla.edu>
91391         ftoastr: fix comment
91392         * lib/ftoastr.h: Fix typo in comment.  Noted by Ben Pfaff in
91393         <http://lists.gnu.org/r/bug-gnulib/2010-12/msg00130.html>.
91395 2010-12-19  Bruno Haible  <bruno@clisp.org>
91397         isnan: Ensure it is a macro.
91398         * lib/math.in.h (isnan): Define as a macro if not already a macro.
91399         * doc/posix-functions/isnan.texi: Mention problem on IRIX, OSF/1,
91400         Solaris.
91402 2010-12-19  Bruno Haible  <bruno@clisp.org>
91404         ldexpl test: Fix link error on OSF/1 5.1.
91405         * modules/ldexpl-tests (Makefile.am): Define test_ldexpl_LDADD.
91407 2010-12-19  Bruno Haible  <bruno@clisp.org>
91409         wctype: Make it work in C++ mode on OSF/1 5.1.
91410         * lib/wctype.in.h (iswblank): Declare but not define here.
91411         * lib/iswblank.c: New file, extracted from lib/wctype.in.h.
91412         * m4/wctype_h.m4 (gl_WCTYPE_H): Arrange to compile it if needed.
91413         * modules/wctype (Files): Add lib/iswblank.c.
91415 2010-12-19  Bruno Haible  <bruno@clisp.org>
91417         signal: Document problem with type of SIGRTMIN, SIGRTMAX on OSF/1 5.1.
91418         * doc/posix-headers/signal.texi: Document OSF/1 5.1 problem.
91419         * lib/strsignal.c (strsignal): Cast SIGRTMIN to 'int'.
91421 2010-12-19  Bruno Haible  <bruno@clisp.org>
91423         sys_socket: Use POSIX compatible declarations on OSF/1 5.1.
91424         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): On OSF/1, define
91425         _POSIX_PII_SOCKET.
91426         * doc/posix-functions/recv.texi: Document the OSF/1 problem.
91427         * doc/posix-functions/recvfrom.texi: Likewise.
91428         * doc/posix-functions/send.texi: Likewise.
91429         * doc/posix-functions/sendto.texi: Likewise.
91431 2010-12-19  Bruno Haible  <bruno@clisp.org>
91433         tcgetsid: Add missing declaration on OSF/1 5.1.
91434         * lib/termios.in.h (tcgetsid): Test HAVE_DECL_TCGETSID instead of
91435         HAVE_TCGETSID.
91436         * m4/tcgetsid.m4 (gl_FUNC_TCGETSID): Test whether tcgetsid is declared.
91437         Don't set HAVE_TCGETSID.
91438         * m4/termios_h.m4 (gl_TERMIOS_H_DEFAULTS): Initialize
91439         HAVE_DECL_TCGETSID, not HAVE_TCGETSID.
91440         * modules/termios (Makefile.am): Substitute HAVE_DECL_TCGETSID, not
91441         HAVE_TCGETSID.
91442         * doc/posix-functions/tcgetsid.texi: Mention the OSF/1 5.1 problem.
91444 2010-12-19  Bruno Haible  <bruno@clisp.org>
91446         stdio: Fix problem with popen() declaration on OSF/1 5.1.
91447         * lib/stdio.in.h: During the include_next statement, let recursive
91448         includes of this file include only the system header file.
91450 2010-12-19  Bruno Haible  <bruno@clisp.org>
91452         iconv_open: Fix regression from 2010-12-04.
91453         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN_UTF): Fix typo.
91454         Reported by Noah Lavine <noah.b.lavine@gmail.com>.
91456 2010-12-19  Bruno Haible  <bruno@clisp.org>
91458         stdbool test: Avoid a gcc warning.
91459         * tests/test-stdbool.c (main): Fail if e1 is false.
91460         Reported by Jim Meyering.
91462 2010-12-19  Jim Meyering  <meyering@redhat.com>
91464         setenv: restore to working order
91465         $HAVE_SETENV is used in gl_FUNC_SETENV, yet its definitions were
91466         mistakenly removed.
91467         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): Restore code to set
91468         HAVE_SETENV.
91469         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Restore code to initialize
91470         HAVE_SETENV.
91472 2010-12-19  Bruno Haible  <bruno@clisp.org>
91474         Document some different function declarations on OSF/1 5.1.
91475         * doc/posix-functions/gai_strerror.texi: Mention different declaration.
91476         * doc/posix-functions/inet_ntop.texi: Likewise.
91477         * doc/posix-functions/gethostname.texi: Likewise.
91478         * lib/unistd.in.h (gethostname): Update comment.
91480 2010-12-19  Bruno Haible  <bruno@clisp.org>
91482         doc: Mention vasprintf-posix module.
91483         * doc/glibc-functions/asprintf.texi: Mention the workarounds present in
91484         the 'vasprintf-posix' module.
91485         * doc/glibc-functions/vasprintf.texi: Likewise.
91487 2010-12-19  Bruno Haible  <bruno@clisp.org>
91489         unsetenv: Add missing declaration on OSF/1 5.1.
91490         * lib/stdlib.in.h (setenv): Test HAVE_DECL_UNSETENV, not HAVE_UNSETENV.
91491         * m4/setenv.m4 (gl_FUNC_UNSETENV): Test whether unsetenv is declared.
91492         Don't set HAVE_UNSETENV. In the test program, set _BSD.
91493         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_DECL_UNSETENV,
91494         not HAVE_UNSETENV.
91495         * modules/stdlib (Makefile.am): Substitute HAVE_DECL_UNSETENV, not
91496         HAVE_UNSETENV.
91497         * doc/posix-functions/unsetenv.texi: Mention the OSF/1 5.1 problem.
91499 2010-12-19  Bruno Haible  <bruno@clisp.org>
91501         setenv: Add missing declaration on OSF/1 5.1.
91502         * lib/stdlib.in.h (setenv): Test HAVE_DECL_SETENV, not HAVE_SETENV.
91503         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): Test whether setenv is
91504         declared. Don't set HAVE_SETENV.
91505         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_DECL_SETENV,
91506         not HAVE_SETENV.
91507         * modules/stdlib (Makefile.am): Substitute HAVE_DECL_SETENV, not
91508         HAVE_SETENV.
91509         * doc/posix-functions/setenv.texi: Mention the OSF/1 5.1 problem.
91511 2010-12-19  Bruno Haible  <bruno@clisp.org>
91513         nl_langinfo tests: Avoid gcc warning.
91514         * tests/test-nl_langinfo.c: Don't enable the GCC pragma for GCC 4.2.
91516 2010-12-19  Bruno Haible  <bruno@clisp.org>
91518         mknod: Avoid error in C++ mode on OSF/1 with GCC.
91519         * lib/sys_stat.in.h (mknod): Use _GL_CXXALIAS_SYS_CAST instead of
91520         _GL_CXXALIAS_SYS.
91522 2010-12-19  Bruno Haible  <bruno@clisp.org>
91524         stdbool: Relax test.
91525         * tests/test-stdbool.c (e): Don't require that casts from a variable's
91526         address to 'bool' work in static initializer, for compilers other than
91527         GCC.
91529 2010-12-19  Bruno Haible  <bruno@clisp.org>
91531         ftello: Add missing declaration on OSF/1 5.1.
91532         * lib/stdio.in.h (ftello): Test HAVE_DECL_FTELLO, not HAVE_FTELLO.
91533         * m4/ftello.m4 (gl_FUNC_FTELLO): Test whether ftello is declared.
91534         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize HAVE_DECL_FTELLO.
91535         * modules/stdio (Makefile.am): Substitute HAVE_DECL_FTELLO.
91536         * doc/posix-functions/ftello.texi: Mention the OSF/1 5.1 problem.
91538 2010-12-19  Bruno Haible  <bruno@clisp.org>
91540         fseeko: Add missing declaration on OSF/1 5.1.
91541         * lib/stdio.in.h (fseeko): Test HAVE_DECL_FSEEKO, not HAVE_FSEEKO.
91542         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Test whether fseeko is declared.
91543         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize HAVE_DECL_FSEEKO.
91544         * modules/stdio (Makefile.am): Substitute HAVE_DECL_FSEEKO.
91545         * doc/posix-functions/fseeko.texi: Mention the OSF/1 5.1 problem.
91547 2010-12-19  Bruno Haible  <bruno@clisp.org>
91549         fchdir: Add missing declaration on OSF/1 5.1.
91550         * lib/unistd.in.h (fchdir): Provide declaration if systems lacks it.
91551         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Check whether fchdir is declared.
91552         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize HAVE_DECL_FCHDIR.
91553         * modules/unistd (Makefile.am): Substitute HAVE_DECL_FCHDIR.
91554         * doc/posix-functions/fchdir.texi: Mention the OSF/1 5.1 problem.
91556 2010-12-19  Bruno Haible  <bruno@clisp.org>
91558         relocatable-prog-wrapper: Separate from relocatable-prog.
91559         * modules/relocatable-prog (Makefile.am): Define uninstall-hook and
91560         uninstall-relocwrapper rule here.
91561         * modules/relocatable-prog-wrapper (Makefile.am): ... not here.
91562         Reported by Ian Beckwith <ianb@erislabs.net>.
91564 2010-12-19  Bruno Haible  <bruno@clisp.org>
91566         unistr/u8-mbsnlen: Add missing dependency.
91567         * modules/unistr/u8-mbsnlen (Depends-on): Add unistr/u8-mbtouc.
91568         Reported by Ian Beckwith <ianb@erislabs.net>.
91570 2010-12-19  Bruno Haible  <bruno@clisp.org>
91572         iconv: Make it possible again to use this module without 'iconv-h'.
91573         * modules/iconv (configure.ac): Don't invoke gl_ICONV_MODULE_INDICATOR
91574         if it is not defined.
91575         Reported by Ian Beckwith <ianb@erislabs.net>.
91577 2010-12-18  Paul Eggert  <eggert@cs.ucla.edu>
91579         acl: port to Solaris 8 when copying from tmpfs to ufs
91580         * lib/copy-acl.c (qcopy_acl): Also allow EINVAL as an ignorable
91581         error number.  Problem observed on Solaris 8 with latest
91582         coreutils, with "mv A B", where A is on a tmpfs file system and B
91583         is on a ufs file system.  This caused coreutils' mv/part-symlink
91584         test to fail.
91586         tests: set fail=0 at start
91587         * tests/init.sh (setup_): Move fail=0 initialization here ...
91588         (mktempd_): ... from here, so that tests can rely on fail being
91589         set to 0 initially.  This fixes a problem in coreutils; see:
91590         http://lists.gnu.org/r/coreutils/2010-12/msg00083.html
91592 2010-12-18  Bruno Haible  <bruno@clisp.org>
91594         memmem-simple: Stylistic changes.
91595         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): Avoid possible gcc warning.
91596         Fix preprocessor directive indentation.
91598 2010-12-15  Pádraig Brady  <P@draigBrady.com>
91600         memmem, memmem-simple: reorganize and expand empty needle check
91601         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE, gl_FUNC_MEMMEM): Move all
91602         functional checks to memmem-simple so that one has a fully functional
91603         memmem by using just this module.
91604         Restrict the performance only check to the memmem module.
91605         Also expand the empty needle check to ensure the correct
91606         pointer is returned, not just a non NULL pointer.
91607         * doc/glibc-functions/memmem.texi: Rearrange the portability
91608         documentation to correlate with the rearranged checks.
91609         Clarify exactly how the memmem and memmem-simple modules
91610         relate to each other.
91612 2010-12-15  Pádraig Brady  <P@draigBrady.com>
91613             Bruno Haible  <bruno@clisp.org>
91615         Improve cross-compilation guesses for uClibc.
91616         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): When cross-compiling, assume
91617         that uClibc does not have the glibc bug.
91618         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Likewise.
91619         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE): Likewise.
91621 2010-12-14  Eric Blake  <eblake@redhat.com>
91623         configmake: provide fallbacks for oldest supported autotools
91624         * m4/configmake.m4: New file.
91625         * modules/configmake (Files): Ship it.
91626         (configure.ac): Use it to guarantee fallbacks.
91628 2010-12-13  Pádraig Brady  <P@draigBrady.com>
91630         read-file: Improve handling of large files
91631         * lib/read-file.c (fread_file): Minimize realloc()s
91632         for regular files, and better manage sizes around SIZE_MAX.
91634 2010-12-13  Eric Blake  <eblake@redhat.com>
91636         cloexec, fcntl: relax license
91637         * modules/cloexec (License): Change from LGPLv3+ to LGPLv2+, with
91638         consent from all contributors.
91639         * modules/fcntl (License): Likewise.
91641 2010-12-10  Bruno Haible  <bruno@clisp.org>
91643         Tests for module 'pipe-posix'.
91644         * modules/pipe-posix-tests: New file.
91645         * tests/test-pipe.c: New file, based on tests/test-pipe2.c.
91647 2010-12-10  Bruno Haible  <bruno@clisp.org>
91649         pipe-posix: Make it work in C++ mode.
91650         * lib/unistd.in.h: Don't include <io.h>, <fcntl.h> for pipe.
91651         (pipe): Use common idiom, not a macro definition.
91652         * lib/pipe.c: New file.
91653         * m4/pipe.m4: New file.
91654         * modules/pipe-posix (Description): Enhance.
91655         (Files): Add lib/pipe.c, m4/pipe.m4.
91656         (configure.ac): Invoke gl_FUNC_PIPE.
91657         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize HAVE_PIPE.
91658         * modules/unistd (Makefile.am): Substitute HAVE_PIPE.
91659         * tests/test-unistd-c++.cc: Check the signature of pipe.
91661 2010-12-10  Bruno Haible  <bruno@clisp.org>
91663         Rename module 'pipe' to 'spawn-pipe'.
91664         * modules/spawn-pipe: New file, renamed from modules/pipe.
91665         (Files, configure.ac, Makefile.am): Update.
91666         (Include): Mention "spawn-pipe.h" instead of "pipe.h".
91667         * modules/pipe: Reduce to an obsolete indirection to 'spawn-pipe'.
91668         * lib/spawn-pipe.h: New file, renamed from lib/pipe.h.
91669         * lib/spawn-pipe.c: New file, renamed from lib/pipe.c. Include
91670         "spawn-pipe.h" instead of "pipe.h".
91671         * m4/spawn-pipe.m4: New file, renamed from m4/pipe.m4. Rename gl_PIPE
91672         to gl_SPAWN_PIPE.
91673         * modules/spawn-pipe-tests: New file, renamed from modules/pipe-tests.
91674         (Files, Makefile.am): Update.
91675         * tests/test-spawn-pipe.sh: New file, renamed from tests/test-pipe.sh.
91676         Update.
91677         * tests/test-spawn-pipe.c: New file, renamed from tests/test-pipe.c.
91678         Include "spawn-pipe.h" instead of "pipe.h".
91679         * lib/csharpcomp.c: Include "spawn-pipe.h" instead of "pipe.h".
91680         * lib/javacomp.c: Likewise.
91681         * lib/javaversion.c: Likewise.
91682         * lib/pipe-filter-gi.c: Likewise.
91683         * lib/pipe-filter-ii.c: Likewise.
91684         * modules/csharpcomp (Depends-on): Add 'spawn-pipe', remove 'pipe'.
91685         * modules/javacomp (Depends-on): Likewise.
91686         * modules/javaversion (Depends-on): Likewise.
91687         * modules/pipe-filter-gi (Depends-on): Likewise.
91688         * modules/pipe-filter-ii (Depends-on): Likewise.
91689         * MODULES.html.sh (Executing programs): Update.
91690         * NEWS: Mention the change.
91692 2010-12-10  Eric Blake  <eblake@redhat.com>
91694         pipe-posix: new module
91695         * modules/pipe-posix: New file.
91696         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set default.
91697         (gl_UNISTD_H): Check for declaration.
91698         * modules/unistd (Makefile.am): Substitute it.
91699         * lib/unistd.in.h (pipe): Provide it for mingw.
91700         * doc/posix-functions/pipe.texi (pipe): Update documentation.
91701         * MODULES.html.sh (File descriptor based Input/Output): Likewise.
91703 2010-12-07  Bruno Haible  <bruno@clisp.org>
91705         unistr/u8-strcmp: Avoid collision with libc function on Solaris 11.
91706         * lib/unistr.in.h (u8_strcmp) [__sun]: Declare with real name
91707         u8_strcmp_gnu.
91708         * modules/unistr/u8-strcmp (configure.ac): Bump version number.
91710 2010-12-06  Bruno Haible  <bruno@clisp.org>
91712         Update internal documentation.
91713         * m4/README: Document new idioms for AC_RUN_IFELSE invocations.
91715 2010-12-04  Bruno Haible  <bruno@clisp.org>
91717         Put more information about failed tests into the test return codes.
91718         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Change test
91719         program so that it returns an enumerated value (0, 1, 2, 3, 4, ...).
91720         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
91721         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
91722         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Likewise.
91723         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise.
91724         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
91725         * m4/intdiv0.m4 (gt_INTDIV0): Likewise.
91726         * m4/isapipe.m4 (gl_PREREQ_ISAPIPE): Likewise.
91727         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
91728         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): Likewise.
91729         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
91730         * m4/sleep.m4 (gl_FUNC_SLEEP): Likewise.
91731         * m4/stdint.m4 (gl_STDINT_H): Likewise.
91732         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Change test program so that it
91733         returns a bit mask.
91734         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Likewise.
91735         * m4/chown.m4 (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): Likewise.
91736         * m4/dup2.m4 (gl_FUNC_DUP2): Likewise.
91737         * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Likewise.
91738         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Likewise.
91739         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Likewise.
91740         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Likewise.
91741         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Likewise.
91742         * m4/iconv.m4 (AM_ICONV_LINK): Likewise.
91743         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN_UTF): Likewise.
91744         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Likewise.
91745         * m4/isnanf.m4 (gl_ISNANF_WORKS): Likewise.
91746         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Likewise.
91747         * m4/ldexpl.m4 (gl_FUNC_LDEXPL_WORKS): Likewise.
91748         * m4/link.m4 (gl_FUNC_LINK): Likewise.
91749         * m4/linkat.m4 (gl_FUNC_LINKAT): Likewise.
91750         * m4/mbrlen.m4 (gl_MBRLEN_RETVAL): Likewise.
91751         * m4/mbrtowc.m4 (gl_MBRTOWC_RETVAL): Likewise.
91752         * m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): Likewise.
91753         * m4/memchr.m4 (gl_FUNC_MEMCHR): Likewise.
91754         * m4/memmem.m4 (gl_FUNC_MEMMEM): Likewise.
91755         * m4/mkfifo.m4 (gl_FUNC_MKFIFO): Likewise.
91756         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Likewise.
91757         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
91758         * m4/open.m4 (gl_FUNC_OPEN): Likewise.
91759         * m4/poll.m4 (gl_FUNC_POLL): Likewise.
91760         * m4/popen.m4 (gl_FUNC_POPEN): Likewise.
91761         * m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_LONG_DOUBLE,
91762         gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE,
91763         gl_PRINTF_DIRECTIVE_A, gl_PRINTF_DIRECTIVE_F, gl_PRINTF_DIRECTIVE_LS,
91764         gl_PRINTF_PRECISION): Likewise.
91765         * m4/regex.m4 (gl_REGEX): Likewise.
91766         * m4/rename.m4 (gl_FUNC_RENAME): Likewise.
91767         * m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise.
91768         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): Likewise.
91769         * m4/stat.m4 (gl_FUNC_STAT): Likewise.
91770         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
91771         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
91772         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Likewise.
91773         * m4/strsignal.m4 (gl_FUNC_STRSIGNAL): Likewise.
91774         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
91775         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
91776         * m4/symlink.m4 (gl_FUNC_SYMLINK): Likewise.
91777         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Likewise.
91778         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Likewise.
91779         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
91780         * m4/unlink.m4 (gl_FUNC_UNLINK): Likewise.
91781         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Likewise.
91782         * m4/utimes.m4 (gl_FUNC_UTIMES): Likewise.
91783         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise.
91784         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
91785         * m4/signbit.m4 (gl_SIGNBIT_TEST_PROGRAM): Likewise.
91786         (gl_FLOATTYPE_SIGN_LOCATION): Change test program so that it returns an
91787         enumerated value.
91788         * m4/acl.m4 (gl_ACL_GET_FILE): Use "if ... return 1; return 0;" style.
91790 2010-12-04  Bruno Haible  <bruno@clisp.org>
91792         Update for Solaris 11 2010-11.
91793         * doc/{glibc,posix}-{functions,headers}: Add info about Solaris 11
91794         Express, released in November 2010.
91796 2010-12-04  Bruno Haible  <bruno@clisp.org>
91798         nproc: Relax license.
91799         * modules/nproc (License): Change to LGPL, with consent by Glen Lenker
91800         and Paul Eggert.
91801         Requested by Ludovic Courtès <ludo@gnu.org>.
91803 2010-12-01  Paul Eggert  <eggert@cs.ucla.edu>
91805         utimecmp: fine-grained src to nearby coarse-grained dest
91807         * lib/utimecmp.c (utimecmp): When UTIMECMP_TRUNCATE_SOURCE is set,
91808         and the source is on a file system with higher-resolution time
91809         stamps, than the destination, and _PC_TIMESTAMP_RESOLUTION does
91810         not work, and the time stamps are close together, the algorithm to
91811         determine the exact resolution from the read-back mtime was buggy:
91812         it had a "!=" where it should have had an "==".  This bug has been
91813         in the code ever since it was introduced to gnulib.
91814         Problem reported by Dan Jacobson in
91815         <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7529>.
91817 2010-11-30  Bruno Haible  <bruno@clisp.org>
91819         strerror_r-posix: Fix autoconf test.
91820         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Fix typo.
91822 2010-11-28  Bruno Haible  <bruno@clisp.org>
91823             Paul Eggert  <eggert@cs.ucla.edu>
91825         Tests for module 'getdomainname'.
91826         * modules/getdomainname-tests: New file.
91827         * tests/test-getdomainname.c: New file, based on
91828         tests/test-gethostname.c.
91830 2010-11-28  Bruno Haible  <bruno@clisp.org>
91831             Paul Eggert  <eggert@cs.ucla.edu>
91833         getdomainname: Use the system function when possible.
91834         * lib/unistd.in.h: Include <netdb.h>, for getdomainname's declaration.
91835         (getdomainname): Replace if needed. Provide the declaration if it is
91836         missing. Don't use _GL_CXXALIAS_SYS_CAST.
91837         * lib/getdomainname.c: Include <limits.h> and <sys/systeminfo.h>.
91838         (getdomainname): When the system has getdomainname, call the system
91839         function. When sysinfo (SI_SRPC_DOMAIN, ...) is possible, use that.
91840         * m4/getdomainname.m4 (gl_FUNC_GETDOMAINNAME): Require
91841         gl_HEADER_SYS_SOCKET and gl_HEADER_NETDB. Test whether the function is
91842         found in libnsl. Look for the declaration also in <netdb.h>. Replace
91843         the function if its second argument is of type 'int' or if it is found
91844         in libnsl.
91845         (gl_PREREQ_GETDOMAINNAME): Define HAVE_GETDOMAINNAME. Check for
91846         <sys/systeminfo.h> and sysinfo().
91847         * modules/getdomainname (Depends-on): Add netdb, sys_socket.
91848         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
91849         HAVE_DECL_GETDOMAINNAME and REPLACE_GETDOMAINNAME instead of
91850         HAVE_GETDOMAINNAME.
91851         * modules/unistd (Makefile.am): Substitute HAVE_DECL_GETDOMAINNAME and
91852         REPLACE_GETDOMAINNAME instead of HAVE_GETDOMAINNAME.
91853         * doc/glibc-functions/getdomainname.texi: Document the problems with
91854         the getdomainname declaration.
91856 2010-11-28  Bruno Haible  <bruno@clisp.org>
91858         sys_socket: Ensure ss_family field on AIX.
91859         * lib/sys_socket.in.h (ss_family): New macro definition.
91860         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Set
91861         HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY. Set SYS_SOCKET_H if necessary.
91862         (gl_SYS_SOCKET_H_DEFAULTS): Initialize
91863         HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY.
91864         * modules/sys_socket (Makefile.am): Substitute
91865         HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY.
91866         * doc/posix-headers/sys_socket.texi: Mention the AIX bug.
91868 2010-11-27  Bruno Haible  <bruno@clisp.org>
91870         readline: Improve configure output.
91871         * m4/readline.m4 (gl_FUNC_READLINE): Make the
91872         "checking for readline..." result understandable.
91874 2010-11-27  Bruno Haible  <bruno@clisp.org>
91876         *printf-posix: Detect a bug on Solaris 10/x86.
91877         * m4/printf.m4 (gl_PRINTF_PRECISION): Detect crash with large precision
91878         for floating-point output.
91879         * tests/test-vasnprintf-posix.c (test_function): Test precision with %f
91880         directive.
91881         * tests/test-snprintf-posix.h (test_function): Likewise.
91882         * tests/test-sprintf-posix.h (test_function): Likewise.
91883         * tests/test-vasprintf-posix.c (test_function): Likewise.
91884         * doc/posix-functions/fprintf.texi: Mention Solaris/x86 bug.
91885         * doc/posix-functions/printf.texi: Likewise.
91886         * doc/posix-functions/snprintf.texi: Likewise.
91887         * doc/posix-functions/sprintf.texi: Likewise.
91888         * doc/posix-functions/vfprintf.texi: Likewise.
91889         * doc/posix-functions/vprintf.texi: Likewise.
91890         * doc/posix-functions/vsnprintf.texi: Likewise.
91891         * doc/posix-functions/vsprintf.texi: Likewise.
91892         * doc/glibc-functions/obstack_printf.texi: Likewise.
91893         * doc/glibc-functions/obstack_vprintf.texi: Likewise.
91895 2010-11-27  Bruno Haible  <bruno@clisp.org>
91897         Fix link error when module libunistring-optional is in use.
91898         * modules/striconveh-tests (Makefile.am): Link with $(LIBUNISTRING).
91899         * modules/striconveha-tests (Makefile.am): Likewise.
91901 2010-11-27  Bruno Haible  <bruno@clisp.org>
91903         regex: Mention link dependencies.
91904         * modules/regex (Link): New section.
91905         * modules/rpmatch (Link): Likewise.
91906         * modules/regex-quote-tests (Makefile.am): Link with $(LIBINTL).
91908 2010-11-27  Bruno Haible  <bruno@clisp.org>
91910         ftoastr: Fix compilation error on Solaris.
91911         * lib/ftoastr.c: Include <config.h>.
91913 2010-11-27  Bruno Haible  <bruno@clisp.org>
91915         getloadavg: Update documentation.
91916         * doc/glibc-functions/getloadavg.texi: Mention the Solaris problem.
91918 2010-11-27  Bruno Haible  <bruno@clisp.org>
91920         sys_socket: Fix test whether the functions are declared.
91921         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Include <sys/socket.h>,
91922         not <sys/select.h>.
91924 2010-11-27  Bruno Haible  <bruno@clisp.org>
91926         getpass: Make sure to get system declaration on some platforms.
91927         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU): Require
91928         gl_USE_SYSTEM_EXTENSIONS.
91929         * modules/getpass (Depends-on): Add extensions.
91931 2010-11-26  Bruno Haible  <bruno@clisp.org>
91933         iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
91934         * lib/iconv.in.h (iconv_open, iconv, iconv_close): Define only if the
91935         'iconv' module is present.
91936         (ICONV_CONST): New macro.
91937         * m4/iconv_h.m4 (gl_ICONV_H_DEFAULTS): Initialize GNULIB_ICONV and
91938         ICONV_CONST.
91939         * m4/iconv.m4 (AM_ICONV): If the gnulib module 'iconv-h' is present,
91940         set ICONV_CONST.
91941         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN_UTF): Don't set ICONV_CONST
91942         here.
91943         * modules/iconv (configure.ac): Invoke gl_ICONV_MODULE_INDICATOR.
91944         * modules/iconv-h (Makefile.am): Substitute GNULIB_ICONV.
91945         * tests/test-iconv-h.c (ICONV_CONST): Don't define here.
91946         * tests/test-iconv-h-c++.cc (ICONV_CONST): Don't define here.
91947         (iconv_open, iconv, iconv_close): Test only if the 'iconv' module is
91948         present.
91950 2010-11-25  Paul Eggert  <eggert@cs.ucla.edu>
91952         ftoastr: comment fix
91953         * lib/ftoastr.c: "little" -> "little or no" in comment
91955 2010-11-24  Paul Eggert  <eggert@cs.ucla.edu>
91957         stdint: port to GCC 4.3 + OSX + Octave
91958         On this platform, stdint.h is buggy and defines int64_t to long
91959         long int.  The replacement defined it to long int, causing
91960         problems with C++ style name mangling.  Instead, trust the system
91961         definition if INT64_MAX is defined, and likewise for the unsigned
91962         variant.   Problem reported by Jarno Rajahalme in
91963         <http://lists.gnu.org/r/bug-gnulib/2010-04/msg00143.html>.
91964         * lib/stdint.in.h (GL_INT64_T): Define if INT64_MAX is defined,
91965         and don't mess with int64_t and INT64_MAX in this case.
91966         (GL_UINT64_T): Likewise for UINT64_MAX and uint64_t.
91968 2010-11-24  Bruno Haible  <bruno@clisp.org>
91970         doc: Corrections regarding MacOS X 10.4 and 10.5.
91971         * doc/{glibc,posix,pastposix}-functions/*.texi: Update info about
91972         MacOS X.
91973         Reported by Simon Josefsson.
91975 2010-11-22  Ben Pfaff  <blp@cs.stanford.edu>
91977         Uninstall ".bin" files installed by relocwrapper.
91978         * modules/relocatable-prog-wrapper (uninstall-relocwrapper):
91979         Recursively run "make uninstall" with ".bin" prefixed to EXEEXT,
91980         unless it is already there.
91982 2010-11-21  Bruno Haible  <bruno@clisp.org>
91984         Update for NetBSD 5.0.
91985         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Don't guess yes on
91986         NetBSD; the test fails on NetBSD 5.0.
91987         * doc/{glibc,posix,pastposix}-{headers,functions}/*.texi: Update info
91988         about NetBSD.
91990 2010-11-21  Bruno Haible  <bruno@clisp.org>
91992         Update for HP-UX 11.23 and HP-UX 11.31.
91993         * doc/{glibc,posix}-{headers,functions}/*.texi: Update info about
91994         HP-UX.
91996 2010-11-21  Bruno Haible  <bruno@clisp.org>
91998         Update for MacOS X 10.5.
91999         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Don't guess yes on
92000         MacOS X; the test fails on MacOS X 10.5.8.
92001         * doc/{glibc,posix,pastposix}-{headers,functions}/*.texi: Update info
92002         about MacOS X.
92004 2010-11-20  Joel E. Denny  <joeldenny@joeldenny.org>
92006         bootstrap: add bootstrap_sync option.
92007         See discussion at
92008         <http://lists.gnu.org/r/bug-gnulib/2010-10/msg00369.html>,
92009         <http://lists.gnu.org/r/bug-gnulib/2010-11/msg00200.html>.
92010         * build-aux/bootstrap: Accept --bootstrap-sync to update
92011         bootstrap if it is not identical to the local gnulib's
92012         bootstrap.  Accept bootstrap_sync=true in bootstrap.conf to
92013         enable this by default.  Accept --no-bootstrap-sync to disable
92014         it.
92016 2010-11-20  Bruno Haible  <bruno@clisp.org>
92018         Ensure that <features.h> is included before __GLIBC__ is tested.
92019         * lib/printf-parse.h: Include <features.h>.
92020         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gl_FEATURES_H.
92021         Reported by Mike Frysinger <vapier@gentoo.org>.
92023         Ensure that <features.h> is included before __GLIBC__ is tested.
92024         * lib/wchar.in.h: Include <features.h>.
92025         * m4/wchar_h.m4 (gl_WCHAR_H): Require gl_FEATURES_H.
92026         * modules/wchar (Makefile.am): Substitute HAVE_FEATURES_H.
92027         Reported by Mike Frysinger <vapier@gentoo.org>.
92029         Ensure that <features.h> is included before __GLIBC__ is tested.
92030         * lib/arpa_inet.in.h: Include <features.h>.
92031         * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET): Require gl_FEATURES_H.
92032         * modules/arpa_inet (Makefile.am): Substitute HAVE_FEATURES_H.
92033         Reported by Mike Frysinger <vapier@gentoo.org>.
92035         Ensure that <features.h> is included before __GLIBC__ is tested.
92036         * build-aux/link-warning.h: Include <features.h>.
92037         * modules/link-warning (configure.ac): Require gl_FEATURES_H.
92038         (Makefile.am): Substitute HAVE_FEATURES_H into link-warning.h.
92039         Reported by Mike Frysinger <vapier@gentoo.org>.
92041         Ensure that <features.h> is included before __GLIBC__ is tested.
92042         * m4/gnulib-common.m4 (gl_FEATURES_H): New macro.
92043         Reported by Mike Frysinger <vapier@gentoo.org>.
92045 2010-11-20  Bruno Haible  <bruno@clisp.org>
92047         memmem: Fix autoconf test.
92048         * m4/memmem.m4 (gl_FUNC_MEMMEM): Test HAVE_DECL_MEMMEM, not HAVE_MEMMEM.
92050 2010-11-20  Bruno Haible  <bruno@clisp.org>
92052         Port to uClibc.
92053         * build-aux/link-warning.h (GL_LINK_WARNING): Treat uClibc like glibc.
92054         * lib/fcntl.in.h: Likewise.
92055         * lib/hard-locale.c (GLIBC_VERSION): Likewise.
92056         * lib/mbrtowc.c (mbrtowc): Likewise.
92057         * lib/relocatable.c (find_shared_library_fullname): Likewise.
92058         * lib/strerror_r.c: Likewise.
92059         * lib/unistr/u8-strnlen.c: Likewise.
92060         * lib/vasnprintf.c (decimal_point_char): Likewise.
92061         * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET): Likewise.
92062         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Likewise.
92063         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Likewise.
92064         * m4/glibc21.m4 (gl_GLIBC21): Likewise.
92065         * tests/test-sigaction.c (handler, main): Likewise.
92066         * lib/freading.h: Treat uClibc like a non-glibc platform.
92067         * lib/freading.c: Likewise.
92068         * lib/gettext.h: Likewise.
92069         * lib/localename.c (gl_locale_name_thread_unsafe, HAVE_LOCALE_NULL):
92070         Likewise.
92071         * lib/printf-parse.h (FLAG_LOCALIZED): Likewise.
92072         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
92073         * lib/propername.c (proper_name_utf8): Likewise.
92074         * lib/spawn.in.h: Likewise.
92075         * lib/striconv.c (mem_cd_iconv, str_cd_iconv, str_iconv): Likewise.
92076         * lib/striconveh.c (iconveh_open, iconv_carefully, iconv_carefully_1,
92077         mem_cd_iconveh_internal): Likewise.
92078         * lib/striconveha.c (mem_iconveha, str_iconveha): Likewise.
92079         * lib/string.in.h (memchr, memrchr, rawmemchr, strchrnul, strpbrk,
92080         strstr, strcasestr): Likewise.
92081         * lib/unicodeio.c (unicode_to_mb): Likewise.
92082         * lib/uniconv/u16-conv-from-enc.c (UTF16_NAME): Likewise.
92083         * lib/uniconv/u16-conv-to-enc.c (UTF16_NAME): Likewise.
92084         * lib/uniconv/u16-strconv-to-enc.c (UTF16_NAME): Likewise.
92085         * lib/uniconv/u32-conv-from-enc.c (UTF32_NAME): Likewise.
92086         * lib/uniconv/u32-conv-to-enc.c (UTF32_NAME): Likewise.
92087         * lib/uniconv/u32-strconv-to-enc.c (UTF32_NAME): Likewise.
92088         * lib/unistr/u8-stpncpy.c: Likewise.
92089         * lib/vasnprintf.c (VASNPRINTF): Likewise.
92090         * lib/xmalloc.c (HAVE_GNU_CALLOC): Likewise.
92091         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise.
92092         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
92093         * m4/glibc2.m4 (gt_GLIBC2): Likewise.
92094         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): Likewise.
92095         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE, gl_FUNC_MEMMEM): Likewise.
92096         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Likewise.
92097         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE, gl_FUNC_STRCASESTR):
92098         Likewise.
92099         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE, gl_FUNC_STRSTR): Likewise.
92100         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
92101         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H): Likewise.
92102         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
92103         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
92104         * m4/sys_times_h.m4 (gl_SYS_TIMES_H): Likewise.
92105         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
92106         * m4/wchar_h.m4 (gl_WCHAR_H): Likewise.
92107         * tests/test-getopt.h (OPTIND_MIN): Likewise.
92108         * tests/test-striconveha.c (main): Likewise.
92109         * tests/test-vasnprintf-posix.c (test_function): Likewise.
92110         * tests/test-vasnprintf-posix3.c (test_function, main): Likewise.
92111         * doc/posix-functions/getdelim.texi: Mention an uClibc bug.
92112         * doc/posix-functions/getline.texi: Likewise.
92113         Reported by Mike Frysinger <vapier@gentoo.org>.
92115 2010-11-20  Bruno Haible  <bruno@clisp.org>
92117         nproc: Fix condition.
92118         * lib/nproc.c: Test HAVE_PTHREAD_GETAFFINITY_NP, not
92119         HAVE_PTHREAD_AFFINITY_NP.
92121 2010-11-20  Bruno Haible  <bruno@clisp.org>
92123         Fix a comment.
92124         * lib/vasnprintf.c (VASNPRINTF): Fix comment.
92126 2010-11-19  Paul Eggert  <eggert@cs.ucla.edu>
92128         ftoastr: don't assume snprintf
92129         * lib/ftoastr.c (snprintf) [! GNULIB_SNPRINTF_POSIX]:
92130         Implement a subset of snprintf here, by using sprintf safely.
92131         * modules/ftoastr (Depends-on): Remove snprintf.
92133 2010-11-19  Jim Meyering  <meyering@redhat.com>
92135         test-rename.h: fix compilation failure
92136         * tests/test-rename.h (test_rename): Add omitted "}".
92138 2010-11-17  Jim Meyering  <meyering@redhat.com>
92140         maint.mk: add a URL discussing the no-@acronym policy
92141         * top/maint.mk (sc_texinfo_acronym): Add a URL in a comment.
92143 2010-11-18  Paul Eggert  <eggert@cs.ucla.edu>
92145         ftoastr: depend on snprintf, improve comments
92146         * lib/ftoastr.c: Also mention Loitsch's draft.
92147         * lib/ftoastr.h: Require WIDTH to be nonnegative.  This isn't
92148         needed in the current implementation, but it might simplify
92149         speeding up the code later.
92150         * modules/ftoastr: Depend on snprintf; this improves portability.
92151         Suggested by Bruno Haible in the same email.
92153         ftoastr: port to hosts lacking strtof and strtold
92154         Problem reported by Bruno Haible in
92155         <http://lists.gnu.org/r/bug-gnulib/2010-11/msg00242.html>.
92156         * lib/ftoastr.c (STRTOF): Define to strtod if in a pre-C99
92157         environment and strtold (and presumably strtof) are not available.
92158         * modules/ftoastr (Files): Add m4/c-strtod.m4.
92159         (configure.ac): Require gl_C99_STRTOLD.
92161 2010-11-18  Bruno Haible  <bruno@clisp.org>
92163         c-strtold: Avoid link error on AIX 7.
92164         * lib/c-strtod.c: Test also HAVE_STRTOD_L or HAVE_STRTOLD_L.
92165         * m4/c-strtod.m4 (gl_C_STRTOD): Test whether strtod_l exists.
92166         (gl_C_STRTOLD): Test whether strtold_l exists.
92167         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
92169 2010-11-17  Paul Eggert  <eggert@cs.ucla.edu>
92171         intprops: new macro INT_BITS_STRLEN_BOUND
92172         * lib/intprops.h (INT_BITS_STRLEN_BOUND): New macro, needed by
92173         ftoastr.h.  This exposes an internal of intprops.h that was formerly
92174         not exposed.  Also, it uses a slightly tighter bound than before;
92175         though this makes no practical difference, we might as well be as
92176         tight as we easily can.
92178         ftoastr: new module, for lossless conversion of floats to short strings
92179         * lib/ftoastr.h, lib/ftoastr.c, lib/dtoastr.c, lib/ldtoastr.c:
92180         * modules/ftoastr: New files.
92182 2010-11-15  Paul Eggert  <eggert@cs.ucla.edu>
92184         bootstrap: port to Solaris sed
92185         * build-aux/bootstrap (get_version): Port to Solaris sed.
92186         See Ralf Wildenhues's note in
92187         <http://lists.gnu.org/r/bug-gnulib/2010-11/msg00156.html>.
92189 2010-11-14  Jim Meyering  <meyering@redhat.com>
92191         maint.mk: rename variable: s/noteworthy/gl_noteworthy_news_/
92192         * top/maint.mk (gl_noteworthy_news_): Rename from "noteworthy"
92193         and move definition closer to sole use.
92195 2010-11-13  Jim Meyering  <meyering@redhat.com>
92197         remove autoconf-2.57 work-around requiring AC_PROG_EGREP and AC_PROG_CPP
92198         Now we require at least autoconf-2.59, which means the work-around
92199         is no longer needed.
92200         * m4/alloca.m4 (gl_FUNC_ALLOCA): Remove work-around.
92201         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
92202         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Likewise.
92203         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
92204         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
92206 2010-11-13  Bruno Haible  <bruno@clisp.org>
92208         rename, renameat: Avoid test failures at NFS mounted locations.
92209         * tests/test-rename.h (dentry_exists, assert_nonexistent): New
92210         functions.
92211         (test_rename): Use assert_nonexistent.
92212         * tests/test-rename.c: Include <dirent.h>.
92213         * tests/test-renameat.c: Likewise.
92214         Reported by Gary V. Vaughan <gary@gnu.org>.
92216         rename, renameat: Document Linux bug with NFS
92217         <http://lists.gnu.org/r/bug-gnulib/2010-11/msg00154.html>.
92218         * doc/posix-functions/rename.texi: Mention the NFS bug on Linux.
92219         * doc/posix-functions/renameat.texi: Likewise.
92220         Suggested by Eric Blake.
92222 2010-11-13  Bruno Haible  <bruno@clisp.org>
92224         rename test: Add comments.
92225         * tests/test-rename.h (test_rename): Add structure and comments.
92227 2010-11-13  Eric Blake  <eblake@redhat.com>
92229         maintainer-makefile: cover a few more files
92230         * top/maint.mk (sc_prohibit_test_double_equal): Also cover shell
92231         scripts generated within C files, for libvirt.
92233 2010-11-13  Bruno Haible  <bruno@clisp.org>
92235         unistr/u8-mbtouc: Improve handling of ill-formed UTF-8 input.
92236         * lib/unistr/u8-mbtouc.c (u8_mbtouc): For an invalid multibyte
92237         character, return the number of bytes that belong together, not always
92238         1.
92239         * lib/unistr/u8-mbtouc-unsafe.c (u8_mbtouc_unsafe): Likewise.
92240         * lib/unistr/u8-mbtouc-aux.c (u8_mbtouc_aux): Likewise.
92241         * lib/unistr/u8-mbtouc-unsafe-aux.c (u8_mbtouc_unsafe_aux): Likewise.
92242         * lib/unistr/u8-mbsnlen.c (u8_mbsnlen): Use u8_mbtouc to determine the
92243         number of bytes of an invalid character.
92244         * tests/unistr/test-u8-mbtouc.c (test_safe_function): New function.
92245         (main): Invoke it.
92246         * tests/unistr/test-u8-mbtouc.h (test_function): Update two test
92247         results.
92248         * tests/unistr/test-u8-mbsnlen.c (main): Test various kinds of
92249         malformed byte sequences.
92250         * modules/unistr/u8-mbtouc (configure.ac): Bump version number.
92251         * modules/unistr/u8-mbtouc-unsafe (configure.ac): Likewise.
92252         * modules/unistr/u8-mbsnlen (configure.ac): Likewise.
92253         Reported by Ben Pfaff and Paolo Bonzini.
92255 2010-11-13  Bruno Haible  <bruno@clisp.org>
92257         openat: Work around glibc bug with fchownat() and empty file names.
92258         * m4/openat.m4 (gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG): New macro.
92259         (gl_FUNC_FCHOWNAT): Invoke it.
92260         * lib/fchownat.c (rpl_fchownat): Handle the empty file name specially.
92261         * doc/posix-functions/fchownat.texi: Document the glibc bug.
92262         Reported by Gary V. Vaughan <gary@gnu.org>.
92264 2010-11-13  Bruno Haible  <bruno@clisp.org>
92266         openat: Ensure autoconf macro ordering.
92267         * m4/openat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Require
92268         gl_USE_SYSTEM_EXTENSIONS.
92269         (gl_FUNC_FCHOWNAT): Require gl_UNISTD_H_DEFAULTS.
92271 2010-11-13  Bruno Haible  <bruno@clisp.org>
92273         Update comments.
92274         * lib/unistr/u8-check.c: Update file name in comments.
92275         * lib/unistr/u8-mblen.c: Likewise.
92276         * lib/unistr/u8-prev.c: Likewise.
92277         * lib/unistr/u8-strmblen.c: Likewise.
92278         * lib/unistr/u8-strmbtouc.c: Likewise.
92280 2010-11-13  Jim Meyering  <meyering@redhat.com>
92282         tests: avoid test failure on Solaris 10 due to lack of PATH export
92283         * tests/test-update-copyright.sh: Don't forget to export PATH.
92285         init.sh: ensure that IFS is defined, just in case...
92286         * tests/init.sh (setup_): Ensure that IFS is defined,
92287         so that saving and restoring it works as expected.  This
92288         appears to be useful at least for an old version of dash
92289         from a long time ago (RH 6).  See here for details:
92290         http://thread.gmane.org/gmane.comp.gnu.coreutils.general/436/focus=455
92292         maint.mk: tighten "test a == b" check
92293         * top/maint.mk (sc_prohibit_test_double_equal): Restrict this
92294         test to files that contain something like #!/bin/sh.
92295         Without this, coreutils would get two false positives in
92296         the comments of C source files.
92298 2010-11-12  Eric Blake  <eblake@redhat.com>
92300         bootstrap: fix typo in previous attempt
92301         * build-aux/bootstrap (buildreq): Correct the grouping.
92302         Reported by Paul Eggert.
92304         maintainer-makefile: prohibit test x == x
92305         * top/maint.mk (sc_prohibit_test_double_equal): New rule.
92306         Based on a report by Matthias Bolte.
92308         bootstrap: allow FreeBSD gzip
92309         * build-aux/bootstrap (get_version): Parse FreeBSD gzip version,
92310         which has no '.' and goes to stderr.
92311         * build-aux/bootstrap.conf (buildreq): Improve the sample file.
92312         Reported by Matthias Bolte.
92314         maintainer-makefile: check for i18n setup
92315         * top/maint.mk (sc_bindtextdomain): Check for evidence that _()
92316         will likely work.
92318 2010-11-12  Bruno Haible  <bruno@clisp.org>
92320         sleep, nanosleep: Work around Linux 2.6.9 nanosleep bug.
92321         * lib/sleep.c (rpl_sleep): Split in chunks no larger than 24 days.
92322         * lib/nanosleep.c (nanosleep): Likewise.
92324 2010-11-11  Bruno Haible  <bruno@clisp.org>
92326         fcntl-h: Fix for use of C++ on glibc systems.
92327         * lib/fcntl.in.h: Include <sys/stat.h> before include_next <fcntl.h>
92328         also on glibc systems in C++ mode.
92329         Reported by Gary V. Vaughan <gary@gnu.org>.
92331 2010-11-11  Christian Weisgerber  <naddy@mips.inka.de>  (tiny change)
92333         mknod: avoid false failure with dash
92334         * m4/mknod.m4 (gl_FUNC_MKNOD): Use portable shell syntax.
92336 2010-11-11  Paul Eggert  <eggert@cs.ucla.edu>
92338         unlink: Fix "is it should" typo in diagnostic.
92339         * m4/unlink.m4 (gl_FUNC_UNLINK): Fix typo, as per Reuben Thomas in
92340         <http://lists.gnu.org/r/bug-gnulib/2010-11/msg00106.html>.
92342 2010-11-11  Bruno Haible  <bruno@clisp.org>
92344         Tests for module 'strerror_r-posix'.
92345         * modules/strerror_r-posix-tests: New file.
92346         * tests/test-strerror_r.c: New file.
92347         * tests/test-string-c++.cc: Check the signature of strerror_r.
92349         New module 'strerror_r-posix'.
92350         * lib/string.in.h (strerror_r): New declaration.
92351         * lib/strerror_r.c: New file.
92352         * m4/strerror_r.m4: New file.
92353         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Check for the declaration
92354         of strerror_r.
92355         (gl_HEADER_STRING_H_DEFAULTS): Initialize GNULIB_STRERROR_R,
92356         HAVE_DECL_STRERROR_R, REPLACE_STRERROR_R.
92357         * modules/strerror_r-posix: New file.
92358         * modules/string (Makefile.am): Substitute GNULIB_STRERROR_R,
92359         HAVE_DECL_STRERROR_R, REPLACE_STRERROR_R.
92360         * doc/posix-functions/strerror_r.texi: Mention the new module and the
92361         portability problems.
92363 2010-11-11  Torsten Scheck  <Torsten.Scheck@Leica-Microsystems.com> (tiny change)
92365         * build-aux/pmccabe2html: Fixed a off-by-one error, so last input
92366         line is also considered for output. Quoted function name in shell
92367         command, so temporary files for functions like MyClass::operator()
92368         are removed correctly without errors.
92370 2010-11-09  Bruno Haible  <bruno@clisp.org>
92372         * doc/posix-functions/strerror.texi: List more failing platforms.
92374         * doc/posix-functions/strerror.texi: Add a comment.
92376 2010-11-07  Paul Eggert  <eggert@cs.ucla.edu>
92378         fdopendir: fix bug on MacOS X when low on file descriptors
92380         * lib/fdopendir.c (REPLACE_FCHDIR): #define to 0 if not defined.
92381         (fdopendir_with_dup, fd_clone_opendir): Now have extra CWD arg.
92382         All callers changed.
92383         (fdopendir): Invoke save_cwd at the top level, not after using
92384         multiple dup() calls to use up file descriptors.  Then retry
92385         fdopendir_with_dup.  This avoids failure with EMFILE if FD is 1
92386         less than the maximum number of open file descriptors, because
92387         save_cwd fails with errno == EMFILE.  Problem reported by tsteven4
92388         on Mac OS X 10.6.4 for tar 1.24
92389         <http://lists.gnu.org/r/bug-tar/2010-10/msg00084.html>
92390         <http://lists.gnu.org/r/bug-tar/2010-11/msg00000.html>
92391         and for tar 1.25
92392         <http://lists.gnu.org/r/bug-tar/2010-11/msg00038.html>.
92394 2010-11-07  Bruno Haible  <bruno@clisp.org>
92396         vasnprintf: Support I flag on glibc systems.
92397         * lib/printf-parse.h (FLAG_LOCALIZED): New macro.
92398         * lib/printf-parse.c (PRINTF_PARSE): Handle the 'I' flag.
92399         * lib/vasnprintf.c (VASNPRINTF): Pass the 'I' flag on to the system's
92400         snprintf function.
92401         * tests/test-vasnprintf-posix.c (test_function): Test the 'I' flag on
92402         glibc systems.
92403         * tests/test-vasnprintf-posix3.c: New file.
92404         * modules/vasnprintf-posix-tests (Files): Add it.
92405         (TESTS, check_PROGRAMS): Add test-vasnprintf-posix3.
92407 2010-11-05  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
92409         [html] Fix copy/paste bug: Use unique name for compiler warnings.
92410         * MODULES.html.sh: For compiler warnings, use name
92411         `ansic_ext_compwarn' since `ansic_ext_misc' is already taken.
92413 2010-11-05  Eric Blake  <eblake@redhat.com>
92415         ceil, floor: avoid spurious failure with icc
92416         * tests/test-ceilf2.c (ceilf_reference): Avoid icc's use of DAZ
92417         [denormals-as-zero] when optimizing without -mieee-fp option.
92418         * tests/test-floorf2.c (floorf_reference): Likewise.
92419         * tests/test-ceilf1.c (dummy): New function.
92420         (main): Use it to outsmart icc's optimization.
92421         * tests/test-floorf1.c (dummy, main): Likewise.
92423         tests: require working signbit
92424         * modules/ceilf-tests (Depends-on): Add signbit.
92425         * modules/ceill-tests (Depends-on): Likewise.
92426         * modules/floorf-tests (Depends-on): Likewise.
92427         * modules/floorl-tests (Depends-on): Likewise.
92428         * modules/round-tests (Depends-on): Likewise.
92429         * modules/roundf-tests (Depends-on): Likewise.
92430         * modules/roundl-tests (Depends-on): Likewise.
92431         * modules/trunc-tests (Depends-on): Likewise.
92432         * modules/truncf-tests (Depends-on): Likewise.
92433         * modules/truncl-tests (Depends-on): Likewise.
92435         strtod: work around icc bug
92436         * lib/strtod.c (minus_zero): Define to working value.
92437         (strtod): Use it to avoid icc bug.
92439         copysign: enhance tests
92440         * modules/copysign-tests (Files): Add minus-zero.h.
92441         * tests/test-copysign.c (main): Also test zeros.
92443 2010-11-04  Eric Blake  <eblake@redhat.com>
92445         ceil, floor, round, trunc: enhance tests of -0
92446         * tests/test-ceilf1.c (main): Ensure correct sign of result.
92447         * tests/test-ceill.c (main): Likewise.
92448         * tests/test-floorf1.c (main): Likewise.
92449         * tests/test-floorl.c (main): Likewise.
92450         * tests/test-round1.c (main): Likewise.
92451         * tests/test-roundf1.c (main): Likewise.
92452         * tests/test-roundl.c (main): Likewise.
92453         * tests/test-trunc1.c (main): Likewise.
92454         * tests/test-truncf1.c (main): Likewise.
92455         * tests/test-truncl.c (main): Likewise.
92457 2010-11-04  Eric Blake  <eblake@redhat.com>
92459         frexp, tests: work around ICC bug with -zero
92460         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Compute -0.0 in a way that
92461         works with more compilers.
92462         * tests/minus-zero.h: New file.
92463         * modules/ceilf-tests (Files): Include it.
92464         * modules/ceill-tests (Files): Likewise.
92465         * modules/floorf-tests (Files): Likewise.
92466         * modules/floorl-tests (Files): Likewise.
92467         * modules/frexp-nolibm-tests (Files): Likewise.
92468         * modules/frexp-tests (Files): Likewise.
92469         * modules/frexpl-nolibm-tests (Files): Likewise.
92470         * modules/frexpl-tests (Files): Likewise.
92471         * modules/isnan-tests (Files): Likewise.
92472         * modules/isnand-nolibm-tests (Files): Likewise.
92473         * modules/isnand-tests (Files): Likewise.
92474         * modules/isnanf-nolibm-tests (Files): Likewise.
92475         * modules/isnanf-tests (Files): Likewise.
92476         * modules/isnanl-nolibm-tests (Files): Likewise.
92477         * modules/isnanl-tests (Files): Likewise.
92478         * modules/round-tests (Files): Likewise.
92479         * modules/roundf-tests (Files): Likewise.
92480         * modules/roundl-tests (Files): Likewise.
92481         * modules/ldexpl-tests (Files): Likewise.
92482         * modules/signbit-tests (Files): Likewise.
92483         * modules/snprintf-posix-tests (Files): Likewise.
92484         * modules/sprintf-posix-tests (Files): Likewise.
92485         * modules/strtod-tests (Files): Likewise.
92486         * modules/trunc-tests (Files): Likewise.
92487         * modules/truncf-tests (Files): Likewise.
92488         * modules/truncl-tests (Files): Likewise.
92489         * modules/vsnprintf-posix-tests (Files): Likewise.
92490         * modules/vsprintf-posix-tests (Files): Likewise.
92491         * modules/vasnprintf-posix-tests (Files): Likewise.
92492         * modules/vasprintf-posix-tests (Files): Likewise.
92493         * tests/test-ceilf1.c (main): Use it.
92494         * tests/test-ceill.c (main): Likewise.
92495         * tests/test-floorf1.c (main): Likewise.
92496         * tests/test-floorl.c (main): Likewise.
92497         * tests/test-frexp.c (main): Likewise.
92498         * tests/test-frexpl.c (main): Likewise.
92499         * tests/test-isnan.c (main): Likewise.
92500         * tests/test-isnand.h (main): Likewise.
92501         * tests/test-isnanf.h (main): Likewise.
92502         * tests/test-isnanl.h (main): Likewise.
92503         * tests/test-ldexpl.c (main): Likewise.
92504         * tests/test-round.c (main): Likewise.
92505         * tests/test-roundf.c (main): Likewise.
92506         * tests/test-roundl.c (main): Likewise.
92507         * tests/test-signbit.c (test_signbitf, test_signbitd)
92508         (test_signbitl): Likewise.
92509         * tests/test-snprintf-posix.h (test_function): Likewise.
92510         * tests/test-sprintf-posix.h (test_function): Likewise.
92511         * tests/test-strtod.c (main): Likewise.
92512         * tests/test-trunc1.c (main): Likewise.
92513         * tests/test-truncf1.c (main): Likewise.
92514         * tests/test-truncl.c (main): Likewise.
92516         isnanl: work around icc bug
92517         * lib/isnan.c (FUNC): Compute run-time NaN under ICC as well.
92519 2010-11-03  Eric Blake  <eblake@redhat.com>
92521         tests: fix compiler warnings
92522         * tests/test-getopt.h (test_getopt): Fix condition.
92523         * tests/test-getopt_long.h (test_getopt_long): Likewise.
92524         * tests/test-pipe2.c (main): Likewise.
92525         * tests/test-quotearg-simple.c (main): Avoid icc warning.
92527         utimens: fix broken m4 test
92528         * m4/utimens.m4 (gl_UTIMENS): Include correct headers.
92530 2010-10-28  Bruno Haible  <bruno@clisp.org>
92532         posix_spawn*, getdtablesize: Relax license.
92533         * modules/posix_spawn (License): Change to LGPLv2+.
92534         * modules/posix_spawnp (License): Likewise.
92535         * modules/posix_spawn-internal (License): Likewise.
92536         * modules/posix_spawnattr_init (License): Likewise.
92537         * modules/posix_spawnattr_getflags (License): Likewise.
92538         * modules/posix_spawnattr_setflags (License): Likewise.
92539         * modules/posix_spawnattr_getpgroup (License): Likewise.
92540         * modules/posix_spawnattr_setpgroup (License): Likewise.
92541         * modules/posix_spawnattr_getschedparam (License): Likewise.
92542         * modules/posix_spawnattr_setschedparam (License): Likewise.
92543         * modules/posix_spawnattr_getschedpolicy (License): Likewise.
92544         * modules/posix_spawnattr_setschedpolicy (License): Likewise.
92545         * modules/posix_spawnattr_getsigdefault (License): Likewise.
92546         * modules/posix_spawnattr_setsigdefault (License): Likewise.
92547         * modules/posix_spawnattr_getsigmask (License): Likewise.
92548         * modules/posix_spawnattr_setsigmask (License): Likewise.
92549         * modules/posix_spawnattr_destroy (License): Likewise.
92550         * modules/posix_spawn_file_actions_init (License): Likewise.
92551         * modules/posix_spawn_file_actions_addclose (License): Likewise.
92552         * modules/posix_spawn_file_actions_adddup2 (License): Likewise.
92553         * modules/posix_spawn_file_actions_addopen (License): Likewise.
92554         * modules/posix_spawn_file_actions_destroy (License): Likewise.
92555         * modules/getdtablesize (License): Likewise.
92556         Requested by Adam Stokes <ajs@redhat.com> for use in netcf.
92558 2010-10-26  Bruno Haible  <bruno@clisp.org>
92560         unistd: Refine workaround from 2009-12-23 against Cygwin bug.
92561         * lib/unistd.in.h: Don't include <stdio.h> and <fcntl.h>, except on
92562         Cygwin and mingw.
92563         Suggested by Eric Blake.
92565 2010-10-26  Bruno Haible  <bruno@clisp.org>
92567         stdio: Work around compilation error due to renameat() on Solaris 10.
92568         * lib/stdio.in.h: Include <unistd.h> on Solaris.
92569         * lib/renameat.c: Don't include <unistd.h> here.
92570         * doc/posix-functions/renameat.texi: Mention the Solaris problem.
92571         Reported by Paul Eggert and Eric Blake.
92573 2010-10-26  Paul Eggert  <eggert@cs.ucla.edu>
92575         renameat: port to Solaris 10, which declares renameat in unistd.h
92577         * lib/renameat.c: Include unistd.h before stdio.h, because
92578         Solaris 10 declares renameat in unistd.h.  Problem encountered
92579         when building GNU tar 1.24 on Solaris 10.
92581 2010-10-26  Christian Weisgerber  <naddy@mips.inka.de>  (tiny change)
92583         fdopendir: fix C89 compilation
92584         * lib/fdopendir.c (fd_clone_opendir): Move declaration for older
92585         compilers.
92587 2010-10-23  Paul Eggert  <eggert@cs.ucla.edu>
92589         inttostr: simplify by removing unnecessary redundancy
92590         * lib/anytostr.c: Don't include verify.h.
92591         (anytostr): Don't verify that TYPE_SIGNED (inttype) equals
92592         inttype_is_signed.  Instead, disable the bogus GCC warnings, so that
92593         there's no need for inttype_is_signed and for calling TYPE_SIGNED.
92594         * lib/imaxtostr.c (inttype_is_signed): Remove; no longer needed.
92595         * lib/inttostr.c, lib/offtostr.c, lib/uinttostr.c, lib/umaxtostr.c:
92596         Likewise.
92597         * modules/inttostr (Depends-on): Remove 'verify'.
92599 2010-10-23  Bruno Haible  <bruno@clisp.org>
92601         nl_langinfo: Mention problem with CRNCYSTR on NetBSD 5.0.
92602         * doc/posix-functions/nl_langinfo.texi: Mention problem with CRNCYSTR.
92603         Reported by Eric Blake.
92605 2010-10-23  Bruno Haible  <bruno@clisp.org>
92607         Tests: Fix LOCALE_JA on MirBSD 10.
92608         * m4/locale-ja.m4 (gt_LOCALE_JA): Reject a locale identifier that leads
92609         to an UTF-8 locale.
92610         * m4/locale-fr.m4 (gt_LOCALE_FR): Likewise.
92611         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
92612         Reported by Eric Blake.
92614 2010-10-21  Bruno Haible  <bruno@clisp.org>
92616         nl_langinfo test: Avoid test failure on NetBSD 5.
92617         * tests/test-nl_langinfo.c (main): Relax test of nl_langinfo(CRNCYSTR).
92618         Reported by Eric Blake.
92620 2010-10-21  Eric Blake  <eblake@redhat.com>
92622         c-stack: work around libsigsegv 2.8 bug
92623         * lib/c-stack.c (SIGSTKSZ): Increase size to avoid alternate stack
92624         overflow on at least PowerPC64.
92626 2010-10-17  Bruno Haible  <bruno@clisp.org>
92628         userspec: Drop redundant file.
92629         * modules/userspec (Files): Remove lib/inttostr.h.
92631 2010-10-17  Bruno Haible  <bruno@clisp.org>
92633         nl_langinfo tests: Silence some warnings.
92634         * tests/test-nl_langinfo.c: Silence -Wtype-limits warnings.
92635         Reported by Jim Meyering.
92637 2010-10-17  Bruno Haible  <bruno@clisp.org>
92639         Make use of GCC's attribute __alloc_size__.
92640         * lib/xalloc.h (ATTRIBUTE_ALLOC_SIZE): New macro.
92641         (xmalloc, xzalloc, xcalloc, xrealloc, xmemdup, xnmalloc, xnrealloc,
92642         xcharalloc): Declare with ATTRIBUTE_ALLOC_SIZE.
92643         * lib/eealloc.h (eemalloc, eerealloc): Declare with attribute
92644         __alloc_size__.
92645         * lib/pagealign_alloc.h (pagealign_alloc, pagealign_xalloc): Likewise.
92646         Suggested by Jim Meyering.
92648 2010-10-16  Joel E. Denny  <joeldenny@joeldenny.org>
92650         bootstrap: anchor .gitignore entries.
92651         * build-aux/bootstrap (insert_sorted_if_absent): Replace all uses
92652         with...
92653         (insert_vc_ignore): ... this new function, which prepends `/' to
92654         all .gitignore entries before passing them to
92655         insert_sorted_if_absent.
92657 2010-10-16  Bruno Haible  <bruno@clisp.org>
92659         nextafter: Fix configure check.
92660         * modules/nextafter (configure.ac): Correct expected prototype.
92662 2010-10-16  Bruno Haible  <bruno@clisp.org>
92664         termios: Update documentation.
92665         * doc/posix-headers/termios.texi: Mention remaining mingw problems.
92667 2010-10-16  Bruno Haible  <bruno@clisp.org>
92669         tests: Make them compile with TinyCC.
92670         * tests/test-strstr.c (main): Remove parentheses around array
92671         initializer.
92673 2010-10-15  Eric Blake  <eblake@redhat.com>
92675         ignore-value: make header idempotent
92676         * lib/ignore-value.h: Add double-inclusion guards.
92677         Reported by Stefan Berger.
92679 2010-10-15  Jim Meyering  <meyering@redhat.com>
92681         GNUmakefile: handle "stable" target, not "major"
92682         * top/GNUmakefile (_is-dist-target): s/major/stable/ to match the
92683         lists in maint.mk and announce-gen.  Without this, "make stable"
92684         would fail to ensure that $(VERSION) is up to date.
92686 2010-10-15  Ludovic Courtès  <ludo@gnu.org>
92688         * lib/isnan.c (FUNC): Treat TinyCC (`__TINYC__') like `__SUNPRO_C'
92689         & co.
92691 2010-10-14  Bruno Haible  <bruno@clisp.org>
92693         vasnprintf: Don't set errno to 0.
92694         * lib/vasnprintf.c (VASNPRINTF): Save and restore errno around the
92695         block that sets it to 0.
92696         Reported by Gianluigi Tiesi <sherpya@netfarm.it>.
92698 2010-10-14  Bruno Haible  <bruno@clisp.org>
92700         socketlib: Fix.
92701         * modules/socketlib (Files): Add m4/sys_socket_h.m4. Needed for
92702         gl_PREREQ_SYS_H_WINSOCK2.
92703         Reported by Ian Beckwith <ianb@erislabs.net>.
92705 2010-10-13  Jim Meyering  <meyering@redhat.com>
92707         test-select-stdin.c: avoid warn_unused_result warnings
92708         * tests/test-select-stdin.c: Include "macros.h".
92709         ASSERT that read and fflush succeed.
92711 2010-10-13  Jim Meyering  <meyering@redhat.com>
92713         git-version-gen: do require git-VC'd files in cwd
92714         * build-aux/git-version-gen: Reject a git version string
92715         if there are no commits associated with the current directory.
92716         This avoids an unlikely false-positive (unrelated dir whose parent
92717         repository also contains a tag matching v*), as pointed out
92718         by Giuseppe Scrivano in
92719         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/21843/focus=23664
92721 2010-10-13  Paul Eggert  <eggert@cs.ucla.edu>
92723         argv-iter: omit nonconforming declaration
92724         * lib/argv-iter.h (enum argv_iter_err): Omit the useless
92725         enum arg_iter_err declaration, which doesn't conform to C99.
92726         Solaris 10 cc warns about this.
92728 2010-10-13  Eric Blake  <eblake@redhat.com>
92730         termios: fix compilation on mingw
92731         * m4/termios_h.m4 (gl_TERMIOS_H_DEFAULTS): Set default.
92732         (gl_TERMIOS_H): Adjust it on mingw.
92733         * modules/termios (Makefile.am): Substitute new key.
92734         * lib/termios.in.h (includes): Make include_next conditional.
92735         * doc/posix-headers/termios.texi (termios.h): Update
92736         documentation.
92737         Reported by Daniel P. Berrange.
92739 2010-10-13  Jim Meyering  <meyering@redhat.com>
92741         git-version-gen: don't require that .git/ be in the current dir
92742         * build-aux/git-version-gen: Adjust this script so that it works
92743         when run from any working directory beneath the top-level .git/-
92744         containing directory.  Inspired by a patch from Giuseppe Scrivano,
92745         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/21843/focus=21847
92747         test-select: avoid warn_unused_result warnings
92748         * tests/test-select.c: Include "macros.h".
92749         ASSERT that each call to read, write, and pipe succeeds.
92750         While not technically required, also check each "close".
92751         * modules/select-tests (Files): Add tests/macros.h.
92753         test-symlinkat: remove declaration of unused local
92754         * tests/test-symlinkat.c (main): Remove unused local, "buf".
92756         test-inttostr: avoid shadowing warnings
92757         * tests/test-inttostr.c (main): Rename local, "buf" to "b",
92758         and use malloc rather than the stack for the same reason as
92759         mentioned in the comment justifying the other allocation.
92761 2010-10-11  Bruno Haible  <bruno@clisp.org>
92763         stdlib: Allow multiple gnulib generated replacements to coexist.
92764         * lib/stdlib.in.h (struct random_data): Avoid identical redefinition.
92765         Reported by Sam Steingold <sds@gnu.org>.
92767 2010-10-11  Jim Meyering  <meyering@redhat.com>
92769         fix a documentation typo
92770         * doc/posix-functions/futimens.texi (futimens): Fix typo: s/itme/item/
92772 2010-10-11  Eric Blake  <eblake@redhat.com>
92774         futimens: work around Solaris 11 bug
92775         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Detect the bug.
92776         * tests/test-futimens.h (test_futimens): Enhance, rather than
92777         weaken test.
92778         * doc/posix-functions/futimens.texi (futimens): Document the bug.
92780 2010-10-11  Paul Eggert  <eggert@cs.ucla.edu>
92782         Indentation.
92783         * lib/spawn.in.h (verify_POSIX_SPAWN_USEVFORK_no_overlap): Indent
92784         higher-level operators more to the left.
92786 2010-10-11  Jim Meyering  <meyering@redhat.com>
92788         test-futimens: avoid unwarranted test failure on Solaris 5.11
92789         * tests/test-futimens.h (test_futimens): When provoking EBADF, use an
92790         invalid file descriptor, so we don't provoke EFAULT from Solaris 5.11,
92791         because it tries to dereference the NULL name argument.
92793 2010-10-11  Bruno Haible  <bruno@clisp.org>
92795         Indentation.
92796         * lib/spawn.in.h (verify_POSIX_SPAWN_USEVFORK_no_overlap): Improve
92797         indentation.
92799 2010-10-11  Jim Meyering  <meyering@redhat.com>
92801         spawn.in.h: make indentation consistent with parentheses
92802         * lib/spawn.in.h (verify_POSIX_SPAWN_USEVFORK_no_overlap):
92803         Make indentation consistent with parentheses.
92805 2010-10-11  Gary V. Vaughan  <gary@gnu.org>
92807         Fix mismatched parens in previous commit
92808         * lib/spawn.in.h (verify_POSIX_SPAWN_USEVFORK_no_overlap): Fix mismatched
92809         parens.
92811 2010-10-10  Paul Eggert  <eggert@cs.ucla.edu>
92813         rewrite int foo[2*X-1] to verify(X) or to int foo[X?1:-1]
92815         * lib/float+.h (verify_sizeof_flt, verify_sizeof_dbl):
92816         (verify_sizeof_ldbl): Rewrite 2*X-1 to X?1:-1.
92817         * lib/malloca.c: Include "verify.h".
92818         (verify1): Remove, replacing with a verify call.
92819         * lib/relocwrapper.c (verify1): Likewise.
92820         * lib/vasnprintf.c (mp_limb_verify, mp_twolimb_verify, TCHAR_T_verify):
92821         Likewise.
92822         * modules/malloca (Depends-on): Add 'verify'.
92823         * modules/relocatable-prog-wrapper (Depends-on): Add 'verify'.
92824         * modules/vasnprintf (Depends-on): Add 'verify'.
92825         * modules/unistdio/u8-vasnprintf (Depends-on): Likewise.
92826         * modules/unistdio/u8-u8-vasnprintf (Depends-on): Likewise.
92827         * modules/unistdio/u16-vasnprintf (Depends-on): Likewise.
92828         * modules/unistdio/u16-u16-vasnprintf (Depends-on): Likewise.
92829         * modules/unistdio/u32-vasnprintf (Depends-on): Likewise.
92830         * modules/unistdio/u32-u32-vasnprintf (Depends-on): Likewise.
92831         * modules/unistdio/ulc-vasnprintf (Depends-on): Likewise.
92833         prefer (X ? 1 : -1) when converting from boolean (1,0) to int (1,-1)
92835         Formerly the style was sometimes 2*X - 1, because the C standard
92836         was wrongly thought to disallow ?: in integral constant expressions.
92837         * lib/inet_ntop.c (verify_int_size): Rewrite 2*X-7 (!) to 4<=X?1:-1.
92838         * lib/signal.in.h (verify_NSIG_constraint): Rewrite 2*X-1 to X?1:-1.
92839         * lib/spawn.in.h (verify_POSIX_SPAWN_USEVFORK_no_overlap): Likewise.
92840         * lib/stdint.in.h (_verify_intmax_size): Likewise.
92841         * lib/time.in.h (struct __time_t_must_be_integral): Rewrite
92842         2 * ((time_t) 1 / 2 == 0) - 1 to (time_t) 1; this suffices to
92843         verify that time_t cannot be floating.
92845 2010-10-08  Eric Blake  <eblake@redhat.com>
92847         time: enforce recent POSIX ruling that time_t is integral
92848         * lib/time.in.h (__time_t_must_be_integral): Detect any
92849         problematic systems, allowing the rest of gnulib to assume POSIX.
92851 2010-10-08  Jim Meyering  <meyering@redhat.com>
92853         fdopendir: fix a bug on systems lacking openat and /proc support
92854         OpenBSD 4.7 is one such system.  The most noticeable effect was
92855         failure of any application making nontrivial use of fts: rm, du,
92856         chown, chmod etc.  E.g., "mkdir -p a/b; ./rm -rf a" would fail with
92857           ./rm: traversal failed: `a': Bad file descriptor
92858         Debugging that, you see that even though FD 6 was closed just
92859         prior to the opendir call in fd_clone_opendir, its resulting
92860         dir->dd_fd was 8, rather than the expected value of 6:
92862         Breakpoint 3, fdopendir_with_dup (fd=6, older_dupfd=-1) at fdopendir.c:93
92863         93                close (fd);
92864         (gdb) n
92865         94                dir = fd_clone_opendir (dupfd);
92866         (gdb) n
92867         95                saved_errno = errno;
92868         (gdb) p dir->dd_fd
92869         $11 = 8
92871         Notice how it closes FD 6, then gets a DIR* pointer using FD 8.
92872         The problem is that on OpenBSD, fd_clone_opendir has to resort
92873         to using the old-style save/restore CWD mechanism, due to its
92874         lack of openat/proc support, and *that* would steal the FD (6)
92875         that opendir was supposed to use.
92877         The fix is to squirrel away the desired FD so that save_cwd uses a
92878         different one, and then free the dest FD right before calling opendir.
92879         That guarantees opendir will use the required file descriptor.
92881         * lib/fdopendir.c (fd_clone_opendir): Handle the above.
92883 2010-10-08  Bruno Haible  <bruno@clisp.org>
92885         sys_select: Avoid warning due to undeclared memset() on OpenBSD 4.5.
92886         * lib/sys_select.in.h: Include <string.h> also on OpenBSD.
92888 2010-10-08  Bruno Haible  <bruno@clisp.org>
92890         nanosleep: Make replacement POSIX compliant.
92891         * lib/nanosleep.c (nanosleep): Return -1/EINVAL if the delay's tv_nsec
92892         is out of range.
92893         Reported by Jim Meyering.
92895 2010-10-08  Paul Eggert  <eggert@cs.ucla.edu>
92897         bootstrap: add hook for altering gnulib.mk, for Bison
92898         * build-aux/bootstrap (gnulib_mk_hook): New function, so that
92899         the Bison bootstrapping process can rewrite file names and variables
92900         in this file before later parts of 'bootstrap' use the file.
92901         Bison wants to include lib/gnulib.mk from the top-level makefile,
92902         so it needs the file names in this file to be relative to the top
92903         level, not relative to lib; plus it needs variable names to be
92904         rewritten.
92905         (slurp): Use the new function.
92907         bootstrap: reformat for readability
92908         * build-aux/bootstrap: Rewrite to avoid lines longer than 80 columns.
92910 2010-10-08  Eric Blake  <eblake@redhat.com>
92912         docs: update cygwin progress
92913         * doc/posix-functions/cacos.texi (cacos): Added after cygwin
92914         1.7.7.
92915         * doc/posix-functions/cacosf.texi (cacosf): Likewise.
92916         * doc/posix-functions/cacosh.texi (cacosh): Likewise.
92917         * doc/posix-functions/cacoshf.texi (cacoshf): Likewise.
92918         * doc/posix-functions/carg.texi (carg): Likewise.
92919         * doc/posix-functions/cargf.texi (cargf): Likewise.
92920         * doc/posix-functions/casin.texi (casin): Likewise.
92921         * doc/posix-functions/casinf.texi (casinf): Likewise.
92922         * doc/posix-functions/casinh.texi (casinh): Likewise.
92923         * doc/posix-functions/casinhf.texi (casinhf): Likewise.
92924         * doc/posix-functions/catan.texi (catan): Likewise.
92925         * doc/posix-functions/catanf.texi (catanf): Likewise.
92926         * doc/posix-functions/catanh.texi (catanh): Likewise.
92927         * doc/posix-functions/catanhf.texi (catanhf): Likewise.
92928         * doc/posix-functions/ccos.texi (ccos): Likewise.
92929         * doc/posix-functions/ccosf.texi (ccosf): Likewise.
92930         * doc/posix-functions/ccosh.texi (ccosh): Likewise.
92931         * doc/posix-functions/ccoshf.texi (ccoshf): Likewise.
92932         * doc/posix-functions/cexp.texi (cexp): Likewise.
92933         * doc/posix-functions/cexpf.texi (cexpf): Likewise.
92934         * doc/posix-functions/cimag.texi (cimag): Likewise.
92935         * doc/posix-functions/cimagf.texi (cimagf): Likewise.
92936         * doc/posix-functions/clog.texi (clog): Likewise.
92937         * doc/posix-functions/clogf.texi (clogf): Likewise.
92938         * doc/posix-functions/conj.texi (conj): Likewise.
92939         * doc/posix-functions/conjf.texi (conjf): Likewise.
92940         * doc/posix-functions/cpow.texi (cpow): Likewise.
92941         * doc/posix-functions/cpowf.texi (cpowf): Likewise.
92942         * doc/posix-functions/cproj.texi (cproj): Likewise.
92943         * doc/posix-functions/cprojf.texi (cprojf): Likewise.
92944         * doc/posix-functions/creal.texi (creal): Likewise.
92945         * doc/posix-functions/crealf.texi (crealf): Likewise.
92946         * doc/posix-functions/csin.texi (csin): Likewise.
92947         * doc/posix-functions/csinf.texi (csinf): Likewise.
92948         * doc/posix-functions/csinh.texi (csinh): Likewise.
92949         * doc/posix-functions/csinhf.texi (csinhf): Likewise.
92950         * doc/posix-functions/csqrt.texi (csqrt): Likewise.
92951         * doc/posix-functions/csqrtf.texi (csqrtf): Likewise.
92952         * doc/posix-functions/ctan.texi (ctan): Likewise.
92953         * doc/posix-functions/ctanf.texi (ctanf): Likewise.
92954         * doc/posix-functions/ctanh.texi (ctanh): Likewise.
92955         * doc/posix-functions/ctanhf.texi (ctanhf): Likewise.
92956         * doc/posix-headers/complex.texi (complex.h): Likewise.
92958 2010-10-07  Jim Meyering  <meyering@redhat.com>
92960         parse-datetime: avoid compilation failure on OpenBSD 4.7
92961         * lib/parse-datetime.y (_STDLIB_H) [_STDLIB_H_]: Define.
92962         This works around a compilation failure on OpenBSD 4.7:
92963         http://thread.gmane.org/gmane.comp.parsers.bison.bugs/3418
92965 2010-10-07  Eric Blake  <eblake@redhat.com>
92967         docs: update cygwin progress
92968         * doc/glibc-functions/mkostemp.texi (mkostemp): Added in cygwin
92969         1.7.6.
92970         * doc/glibc-functions/mkostemps.texi (mkostemps): Likewise.
92971         * doc/posix-headers/fenv.texi (fenv.h): Added after cygwin 1.7.7.
92972         * doc/posix-functions/feclearexcept.texi (feclearexcept): Likewise.
92973         * doc/posix-functions/fegetenv.texi (fegetenv): Likewise.
92974         * doc/posix-functions/fegetexceptflag.texi (fegetexceptflag):
92975         Likewise.
92976         * doc/posix-functions/fegetround.texi (fegetround): Likewise.
92977         * doc/posix-functions/feholdexcept.texi (feholdexcept): Likewise.
92978         * doc/posix-functions/feraiseexcept.texi (feraiseexcept):
92979         Likewise.
92980         * doc/posix-functions/fesetenv.texi (fesetenv): Likewise.
92981         * doc/posix-functions/fesetexceptflag.texi (fesetexceptflag):
92982         Likewise.
92983         * doc/posix-functions/fesetround.texi (fesetround): Likewise.
92984         * doc/posix-functions/fetestexcept.texi (fetestexcept): Likewise.
92985         * doc/posix-functions/feupdateenv.texi (feupdateenv): Likewise.
92986         * doc/glibc-functions/feenableexcept.texi (feenableexcept):
92987         Likewise.
92988         * doc/glibc-functions/fedisableexcept.texi (fedisableexcept):
92989         Likewise.
92990         * doc/glibc-functions/fegetexcept.texi (fegetexcept): Likewise.
92992         docs: update parse-datetime history
92993         * doc/parse-datetime.texi (Authors of parse_datetime): Better
92994         documentation of this function's history and alternatives.
92996         cygwin: use more robust version check
92997         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE, gl_FUNC_MEMMEM): Don't
92998         exclude an eventual cygwin 1.9.1.
92999         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE, gl_FUNC_STRSTR): Likewise.
93000         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE)
93001         (gl_FUNC_STRCASESTR): Likewise.
93002         Reported by Bruno Haible.
93004 2010-10-06  Bruno Haible  <bruno@clisp.org>
93006         string, sys_select: Avoid #including large headers unless necessary.
93007         * lib/string.in.h: Don't include <unistd.h> except on NetBSD.
93008         * lib/sys_select.in.h: Don't include <string.h> except on Solaris,
93009         OSF/1, BeOS, Haiku.
93010         Reported by Jim Meyering.
93012 2010-10-05  Eric Blake  <eblake@redhat.com>
93014         memmem, strstr, strcasestr: fix bug with long periodic needle
93015         * lib/str-two-way.h (two_way_long_needle): Avoid bug with long
93016         periodic needle having false positive.
93017         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): Detect bug in glibc 2.12
93018         and cygwin 1.7.7.
93019         (gl_FUNC_MEMMEM): Be more pessimistic when cross-compiling.
93020         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE)
93021         (gl_FUNC_STRCASESTR): Likewise.
93022         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE, gl_FUNC_STRSTR): Likewise.
93023         * tests/test-memmem.c (main): Expose the bug.
93024         * tests/test-strcasestr.c (main): Likewise.
93025         * tests/test-strstr.c (main): Likewise.
93026         * tests/test-c-strcasestr.c (main): Likewise.
93027         * doc/glibc-functions/memmem.texi (memmem): Document the bug.
93028         * doc/posix-functions/strstr.texi (strstr): Likewise.
93029         * doc/glibc-functions/strcasestr.texi (strcasestr): Likewise.
93030         Reported via http://sourceware.org/bugzilla/show_bug.cgi?id=12092
93032 2010-10-05  Paul Eggert  <eggert@cs.ucla.edu>
93034         parse-datetime: do some more renaming
93035         * doc/parse-datetime.texi (Authors of parse_datetime): Call it
93036         parse_datetime, not get_date.  Mention the renaming.
93037         * lib/parse-datetime.y:  Call it parse_datetime, not getdate,
93038         in comments.
93039         * m4/bison.m4: Likewise.
93041 2010-10-05  Eric Blake  <eblake@redhat.com>
93043         parse-datetime: better name than get_date
93044         * NEWS: Reword the deprecation notice.
93045         * modules/get_date: Rename to modules/parse-datetime.
93046         * modules/get_date-tests: Rename to modules/parse-datetime-tests.
93047         * m4/get_date.m4: Rename to m4/parse-datetime.m4.
93048         * lib/get_date.y: Rename to lib/parse-datetime.y.
93049         * tests/test-get_date.c: Rename to tests/test-parse-datetime.c.
93050         * doc/get_date.texi: Rename to doc/parse-datetime.texi.
93051         * doc/getdate.texi: Provide fallback wrapper.
93052         * lib/getdate.h: Move guts, and wrap...
93053         * lib/parse-datetime.h: ...new file.
93054         * lib/parse-datetime.y (get_date): Rename...
93055         (parse_datetime): ...to this.
93056         * m4/parse-datetime.m4 (gl_GET_DATE): Rename...
93057         (gl_PARSE_DATETIME): ...to this.
93058         * doc/posix-functions/getdate.texi (get_date): Provide fallback
93059         documentation.
93060         * modules/getdate (Files): Provide fallback docs and header.
93061         (Notice, Depends-on): Update references.
93062         * tests/test-parse-datetime.c: Likewise.
93063         * DEPENDENCIES: Likewise.
93064         * MODULES.html.sh (Date and time <time.h>): Likewise.
93065         * doc/parse-datetime.texi (Date input formats)
93066         (Authors of parse_datetime): Likewise.
93067         * modules/parse-datetime (Files, configure.ac, Makefile.am)
93068         (Include): Likewise.
93069         * modules/parse-datetime-tests (Files, Makefile.am): Likewise.
93070         * gnulib-tool: Likewise.
93071         * m4/bison.m4 (gl_BISON): Likewise.
93072         Suggested by Bruno Haible.
93074 2010-10-05  Paul Eggert  <eggert@cs.ucla.edu>
93076         more ports to Solaris tr, which needs [] around ranges
93077         * gnulib-tool: Solaris tr needs [] around ranges.
93078         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Likewise.
93079         * tests/test-pipe-filter-gi1.c (main): Likewise.
93080         * tests/test-pipe-filter-ii1.c (main): Likewise.
93082 2010-10-05  Eric Blake  <eblake@redhat.com>
93084         bootstrap: fix Solaris regression
93085         * build-aux/bootstrap (check_versions): Solaris tr still needs []
93086         around ranges.
93087         Reported by Pádraig Brady.
93089         bootstrap: work with pkg-config
93090         * build-aux/bootstrap (check_versions): Also transliterate - in
93091         prerequisite name.
93092         (print_versions): Be robust to any \ in $buildreq.  Avoid listing
93093         prerequisites that were already found, to avoid confusion.
93094         Reported by Justin Clift.
93096         faccessat: remove unused wrappers
93097         * lib/openat.h (accessat, euidaccesat): Delete, since the mere
93098         presence of these wrappers dragged in -lgen on Solaris.
93099         Reported by Clemens Brogi; fix suggested by Paul Eggert.
93101 2010-10-05  Jim Meyering  <meyering@redhat.com>
93103         tests: require @PRAGMA_COLUMNS@ with each @PRAGMA_SYSTEM_HEADER@
93104         * Makefile (sc_pragma_columns): New syntax-check rule.
93106 2010-10-04  Bruno Haible  <bruno@clisp.org>
93108         gnulib-tool: Synthesize appropriate _LDFLAGS for a libtool library.
93109         * gnulib-tool (func_emit_lib_Makefile_am): When preparing for a libtool
93110         library, put '-no-undefined' and the link dependencies into _LDFLAGS.
93111         Reported by Bruce Korb and Eric Blake.
93113 2010-10-04  Bruno Haible  <bruno@clisp.org>
93115         threadlib: Make option --with-libpth-prefix work.
93116         * m4/threadlib.m4 (gl_THREADLIB_BODY): When testing whether pth works,
93117         use $LIBPTH, not just -lpth.
93119 2010-10-04  Bruno Haible  <bruno@clisp.org>
93121         Avoid line length limitation from HP NonStop system header files.
93122         * m4/include_next.m4 (gl_INCLUDE_NEXT): Define also PRAGMA_COLUMNS.
93123         * lib/arpa_inet.in.h: Use PRAGMA_COLUMNS.
93124         * lib/ctype.in.h: Likewise.
93125         * lib/dirent.in.h: Likewise.
93126         * lib/errno.in.h: Likewise.
93127         * lib/fcntl.in.h: Likewise.
93128         * lib/float.in.h: Likewise.
93129         * lib/getopt.in.h: Likewise.
93130         * lib/iconv.in.h: Likewise.
93131         * lib/inttypes.in.h: Likewise.
93132         * lib/langinfo.in.h: Likewise.
93133         * lib/locale.in.h: Likewise.
93134         * lib/math.in.h: Likewise.
93135         * lib/netdb.in.h: Likewise.
93136         * lib/netinet_in.in.h: Likewise.
93137         * lib/poll.in.h: Likewise.
93138         * lib/pthread.in.h: Likewise.
93139         * lib/pty.in.h: Likewise.
93140         * lib/sched.in.h: Likewise.
93141         * lib/se-selinux.in.h: Likewise.
93142         * lib/search.in.h: Likewise.
93143         * lib/signal.in.h: Likewise.
93144         * lib/spawn.in.h: Likewise.
93145         * lib/stdarg.in.h: Likewise.
93146         * lib/stddef.in.h: Likewise.
93147         * lib/stdint.in.h: Likewise.
93148         * lib/stdio.in.h: Likewise.
93149         * lib/stdlib.in.h: Likewise.
93150         * lib/string.in.h: Likewise.
93151         * lib/strings.in.h: Likewise.
93152         * lib/sys_file.in.h: Likewise.
93153         * lib/sys_ioctl.in.h: Likewise.
93154         * lib/sys_select.in.h: Likewise.
93155         * lib/sys_socket.in.h: Likewise.
93156         * lib/sys_stat.in.h: Likewise.
93157         * lib/sys_time.in.h: Likewise.
93158         * lib/sys_times.in.h: Likewise.
93159         * lib/sys_utsname.in.h: Likewise.
93160         * lib/sys_wait.in.h: Likewise.
93161         * lib/sysexits.in.h: Likewise.
93162         * lib/termios.in.h: Likewise.
93163         * lib/time.in.h: Likewise.
93164         * lib/unistd.in.h: Likewise.
93165         * lib/wchar.in.h: Likewise.
93166         * lib/wctype.in.h: Likewise.
93167         * modules/arpa_inet (Makefile.am): Substitute PRAGMA_COLUMNS.
93168         * modules/ctype (Makefile.am): Likewise.
93169         * modules/dirent (Makefile.am): Likewise.
93170         * modules/errno (Makefile.am): Likewise.
93171         * modules/fcntl-h (Makefile.am): Likewise.
93172         * modules/float (Makefile.am): Likewise.
93173         * modules/getopt-posix (Makefile.am): Likewise.
93174         * modules/iconv-h (Makefile.am): Likewise.
93175         * modules/inttypes (Makefile.am): Likewise.
93176         * modules/langinfo (Makefile.am): Likewise.
93177         * modules/locale (Makefile.am): Likewise.
93178         * modules/math (Makefile.am): Likewise.
93179         * modules/netdb (Makefile.am): Likewise.
93180         * modules/netinet_in (Makefile.am): Likewise.
93181         * modules/poll-h (Makefile.am): Likewise.
93182         * modules/pthread (Makefile.am): Likewise.
93183         * modules/pty (Makefile.am): Likewise.
93184         * modules/sched (Makefile.am): Likewise.
93185         * modules/search (Makefile.am): Likewise.
93186         * modules/selinux-h (Makefile.am): Likewise.
93187         * modules/signal (Makefile.am): Likewise.
93188         * modules/spawn (Makefile.am): Likewise.
93189         * modules/stdarg (Makefile.am): Likewise.
93190         * modules/stddef (Makefile.am): Likewise.
93191         * modules/stdint (Makefile.am): Likewise.
93192         * modules/stdio (Makefile.am): Likewise.
93193         * modules/stdlib (Makefile.am): Likewise.
93194         * modules/string (Makefile.am): Likewise.
93195         * modules/strings (Makefile.am): Likewise.
93196         * modules/sys_file (Makefile.am): Likewise.
93197         * modules/sys_ioctl (Makefile.am): Likewise.
93198         * modules/sys_select (Makefile.am): Likewise.
93199         * modules/sys_socket (Makefile.am): Likewise.
93200         * modules/sys_stat (Makefile.am): Likewise.
93201         * modules/sys_time (Makefile.am): Likewise.
93202         * modules/sys_times (Makefile.am): Likewise.
93203         * modules/sys_utsname (Makefile.am): Likewise.
93204         * modules/sys_wait (Makefile.am): Likewise.
93205         * modules/sysexits (Makefile.am): Likewise.
93206         * modules/termios (Makefile.am): Likewise.
93207         * modules/time (Makefile.am): Likewise.
93208         * modules/unistd (Makefile.am): Likewise.
93209         * modules/wchar (Makefile.am): Likewise.
93210         * modules/wctype (Makefile.am): Likewise.
93212 2010-10-04  Bruno Haible  <bruno@clisp.org>
93214         read-file tests: Avoid a test failure on NonStop Kernel.
93215         * tests/test-read-file.c (main): Don't assume that /etc/resolv.conf is
93216         a regular file.
93217         Reported by Joachim Schmitz <schmitz@hp.com>.
93219 2010-10-03  Bruno Haible  <bruno@clisp.org>
93221         gnulib-tool: Fixes for --create-testdir with --libtool.
93222         * gnulib-tool (func_get_automake_snippet): Don't augment
93223         EXTRA_lib_SOURCES for the pt_chown module, since pt_chown.o goes into
93224         an executable.
93225         (func_create_testdir): Handle module 'alloca' like func_import.
93226         Reported by Bruce Korb <bruce.korb@gmail.com>.
93228 2010-10-03  Paul Eggert  <eggert@cs.ucla.edu>
93230         Avoid some lines longer than 80 characters.
93231         * lib/stdint.in.h: Break long comment lines.
93232         * lib/math.in.h: Likewise.
93233         (_GL_NUM_UINT_WORDS): New macro, for readability.
93234         (gl_signbitf, gl_signbitd, gl_signbitl): Use it.
93235         * lib/stdio.in.h: Break lines in _GL_WARN_ON_USE calls.
93236         * lib/stdlib.in.h: Likewise.
93237         * lib/spawn.in.h: Likewise.
93238         * lib/sys_socket.in.h: Update an URL.
93239         * lib/sys_stat.in.h: Break long line.
93241 2010-10-03  Reuben Thomas  <rrt@sc3d.org>
93243         Improve pmccabe2html.
93244         * build-aux/pmccabe2html: Add CYCLO_SRCS variable, and make
93245         cyclo-$(PACKAGE).html depend on it, so the HTML file is remade
93246         when the sources change. Remove the line in the HTML about "Used
93247         ranges" (which implied that there might be other unused ranges),
93248         rename "Resume" to "Summary" (easier to understand for more users).
93249         * build-aux/pmccabe.css: Removing the dashed dividers, some unused
93250         styles, and some unnecessary blank lines.
93252 2010-10-03  Bruno Haible  <bruno@clisp.org>
93253             Joachim Schmitz  <schmitz@hp.com>  (tiny change)
93255         acl: Add support for ACLs on NonStop Kernel.
93256         * m4/acl.m4 (gl_FUNC_ACL): For Solaris, test for facl(), not for acl().
93257         Check whether the function aclsort() exists.
93258         * lib/acl-internal.h: For Solaris, test HAVE_FACL, not HAVE_ACL.
93259         (acl_nontrivial) [HAVE_ACLSORT]: New declaration.
93260         * lib/file-has-acl.c: For Solaris, test HAVE_FACL, not HAVE_ACL.
93261         (acl_nontrivial [HAVE_ACLSORT]: New function.
93262         (file_has_acl): Implement for NonStop Kernel.
93263         * lib/set-mode-acl.c: For Solaris, test HAVE_FACL, not HAVE_ACL.
93264         (qset_acl): Implement for NonStop Kernel.
93265         * lib/copy-acl.c (qcopy_acl): Implement for NonStop Kernel.
93266         * tests/test-sameacls.c: For Solaris, test HAVE_FACL, not HAVE_ACL.
93267         (main): Implement for NonStop Kernel.
93268         * tests/test-file-has-acl.sh (acl_flavor): Set to 'nsk' on NonStop
93269         Kernel. Handle this flavor.
93270         * tests/test-set-mode-acl.sh: Likewise.
93271         * tests/test-copy-acl.sh: Likewise.
93272         * tests/test-copy-file.sh: Likewise.
93274 2010-10-03  Bruno Haible  <bruno@clisp.org>
93276         Info about ACLs on NonStop Kernel.
93277         * doc/acl-resources.txt: Add info about NonStop Kernel.
93278         References by Joachim Schmitz <schmitz@hp.com>.
93280 2010-10-02  Bruno Haible  <bruno@clisp.org>
93282         Define missing EDQUOT on NonStop Kernel.
93283         * lib/errno.in.h (EDQUOT): Assign a value if missing.
93284         * lib/strerror.c (rpl_strerror): Handle missing EDQUOT.
93285         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Also test whether EDQUOT is
93286         missing.
93287         * doc/posix-headers/errno.texi: Mention the NSK bug.
93288         * doc/posix-functions/strerror.texi: Mention the workaround on NSK.
93289         Reported by Joachim Schmitz <schmitz@hp.com>.
93291 2010-10-02  Bruno Haible  <bruno@clisp.org>
93293         Update doc for POSIX:2008.
93294         * doc/posix-headers/*.texi [except ucontext.texi, sys_timeb.texi]:
93295         Update URL of POSIX specification.
93297 2010-10-02  Bruno Haible  <bruno@clisp.org>
93299         gnulib-tool: In testdirs, use the newest available config.{guess.sub}.
93300         * gnulib-tool (func_create_testdir): Use config.guess and config.sub
93301         from gnulib, not from Automake.
93303 2010-10-02  Bruno Haible  <bruno@clisp.org>
93305         New module 'system-posix'.
93306         * modules/system-posix: New file.
93307         * lib/stdlib.in.h: Include <sys/wait.h> only when the 'system-posix'
93308         module is present.
93309         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
93310         GNULIB_SYSTEM_POSIX.
93311         * modules/stdlib (Depends-on): Remove sys_wait.
93312         (Makefile.am): Substitute GNULIB_SYSTEM_POSIX.
93313         * doc/posix-functions/system.texi: Mention the new module.
93314         * doc/posix-headers/stdlib.texi: Likewise.
93315         * tests/test-stdlib.c: If GNULIB_TEST_SYSTEM_POSIX is not defined,
93316         define test_sys_wait_macros to a no-op.
93317         Reported by Sam Steingold <sds@gnu.org>.
93319 2010-09-30  Bruno Haible  <bruno@clisp.org>
93321         More renaming from 'getdate' to 'get_date'.
93322         * doc/get_date.texi: Renamed from doc/getdate.texi.
93323         * modules/get_date (Files): Update.
93324         * MODULES.html.sh (Date and time <time.h>): Update.
93325         * DEPENDENCIES: Update.
93326         * gnulib-tool: Update comment.
93327         * m4/bison.m4 (gl_BISON): Likewise.
93328         * m4/get_date.m4 (gl_GET_DATE): Likewise.
93330 2010-09-30  Justin Clift  <jclift@redhat.com>  (tiny change)
93332         bootstrap: support ACLOCAL_FLAGS during aclocal
93333         * build-aux/bootstrap (aclocal): Honor ACLOCAL_FLAGS, so the user
93334         can add additional -I dir for third-party .m4 files.
93336 2010-09-30  Eric Blake  <eblake@redhat.com>
93338         bootstrap: use glibtoolize on MacOS
93339         * build-aux/bootstrap (check_versions): Convert libtool into
93340         libtoolize.
93341         (tool search): Move libtool check earlier, and look for
93342         glibtoolize for MacOS.
93343         (gnulib_tool_options): Auto-add --libtool when appropriate.
93344         Reported by Justin Clift.
93346         poll: fix typo that broke test on MacOS
93347         * m4/poll.m4 (gl_FUNC_POLL): Add missing test.
93348         Reported by Justin Clift.
93350         getdate: rename to get_date
93351         Note: getdate.h is not renamed, to minimize client impact.
93352         * modules/getdate: Mark obsolete.  Move old contents...
93353         * modules/get_date: ...to new module name.
93354         * modules/getdate-tests: Move...
93355         * modules/get_date-tests: ...here.
93356         * m4/getdate.m4: Move...
93357         * m4/get_date.m4: ...here, and rename gl_GETDATE to gl_GET_DATE.
93358         * lib/getdate.y: Move...
93359         * lib/get_date.y: ...here.
93360         * tests/test-getdate.c: Move...
93361         * tests/test-get_date.c: ...here.
93362         * doc/posix-functions/getdate.texi (getdate): Update name.
93363         * NEWS: Mention the change.
93365 2010-09-29  Bruno Haible  <bruno@clisp.org>
93367         Separate the module 'waitpid' from the module 'sys_wait'.
93368         * lib/sys_wait.in.h (waitpid): Declare only if the 'waitpid' module is
93369         present.
93370         * m4/sys_wait_h.m4 (gl_SYS_WAIT_MODULE_INDICATOR): Invoke
93371         gl_MODULE_INDICATOR_FOR_TESTS.
93372         (gl_SYS_WAIT_H_DEFAULTS): Initialize GNULIB_WAITPID.
93373         * modules/sys_wait (Depends-on): Remove waitpid.
93374         (Makefile.am): Substitute GNULIB_WAITPID.
93375         * modules/waitpid (configure.ac): Invoke gl_SYS_WAIT_MODULE_INDICATOR.
93376         * tests/test-sys_wait-c++.cc (GNULIB_NAMESPACE::waitpid): Check the
93377         signature only if the 'waitpid' module is present.
93378         * doc/posix-functions/waitpid.texi: Mention the 'waitpid' module.
93379         * NEWS: Mention the change.
93380         * modules/grantpt (Depends-on): Add waitpid.
93381         * modules/wait-process (Depends-on): Likewise.
93383 2010-09-29  Bruno Haible  <bruno@clisp.org>
93385         More tests for module 'sys_wait'.
93386         * modules/sys_wait-c++-tests: New file.
93387         * tests/test-sys_wait-c++.cc: New file.
93388         * modules/sys_wait-tests (Depends-on): Add sys_wait-c++-tests.
93389         Reported by Tatsuro MATSUOKA <tmacchant5@yahoo.co.jp>.
93391 2010-09-29  Bruno Haible  <bruno@clisp.org>
93393         New module 'waitpid'.
93394         * lib/waitpid.c: New file, extracted from lib/sys_wait.in.h.
93395         * lib/sys_wait.in.h: Include <sys/types.h>, c++defs.h, warn-on-use.h.
93396         Don't include <process.h>.
93397         (waitpid): Declare only, using modern idiom.
93398         * m4/waitpid.m4: New file.
93399         * m4/sys_wait_h.m4 (gl_SYS_WAIT_H): Check whether waitpid is declared.
93400         * modules/waitpid: New file.
93401         * modules/sys_wait (Depends-on): Add c++defs, warn-on-use, waitpid.
93402         (Makefile.am): Update.
93403         Reported by Tatsuro MATSUOKA <tmacchant5@yahoo.co.jp>.
93405 2010-09-28  Bruno Haible  <bruno@clisp.org>
93407         poll: Assume ANSI C.
93408         * lib/poll.c (poll): Use an ANSI C declaration.
93410 2010-09-28  Bruno Haible  <bruno@clisp.org>
93412         poll-h: Create poll.h on all platforms.
93413         * lib/poll.in.h: Use double-inclusion guard. Don't define POLL*,
93414         struct pollfd, nfds_t, INFTIM when the system has <poll.h>.
93415         * m4/poll_h.m4 (gl_POLL_H): Set HAVE_POLL_H. Invoke
93416         gl_CHECK_NEXT_HEADERS. Don't set POLL_H.
93417         (gl_REPLACE_POLL_H): Don't set POLL_H.
93418         (gl_POLL_H_DEFAULTS): Don't initialize POLL_H.
93419         * modules/poll-h (Depends-on): Add include_next.
93420         (Makefile.am): Create poll.h unconditionally. Substitute also
93421         HAVE_POLL_H, INCLUDE_NEXT, PRAGMA_SYSTEM_HEADER, NEXT_POLL_H.
93423 2010-09-28  Bruno Haible  <bruno@clisp.org>
93425         Tests for module 'poll-h'.
93426         * modules/poll-h-c++-tests: New file.
93427         * tests/test-poll-h-c++.cc: New file.
93429         Tests for module 'poll-h'.
93430         * modules/poll-h-tests: New file.
93431         * tests/test-poll-h.c: New file.
93433 2010-09-28  Bruno Haible  <bruno@clisp.org>
93435         poll-h: Ensure POLL{RD,WR}{NORM,BAND} are defined on glibc platforms.
93436         * modules/poll-h (Depends-on): Add 'extensions'.
93438 2010-09-28  Bruno Haible  <bruno@clisp.org>
93440         New module 'poll-h'.
93441         * lib/poll.in.h: Include c++defs.h and warn-on-use.h.
93442         (poll): Use modern idiom.
93443         * modules/poll-h: New file.
93444         * modules/poll (Files): Remove lib/poll.in.h.
93445         (Depends-on): Add poll-h.
93446         (configure.ac): Invoke gl_POLL_MODULE_INDICATOR.
93447         (Makefile.am): Move code for generation of poll.h to modules/poll-h.
93448         * m4/poll_h.m4: New file.
93449         * m4/poll.m4 (gl_FUNC_POLL): Require gl_POLL_H. Don't check for poll.h
93450         here. Don't set POLL_H here. Instead, set HAVE_POLL and REPLACE_POLL
93451         and invoke gl_REPLACE_POLL_H.
93452         * lib/poll.c: Use common idiom.
93453         * tests/test-poll.c: Likewise.
93454         * doc/posix-headers/poll.texi: Mention the poll-h module.
93455         Suggested by Eric Blake.
93457 2010-09-26  Bruno Haible  <bruno@clisp.org>
93459         sys_wait: Implement WSTOPSIG.
93460         * lib/sys_wait.in.h (WSTOPSIG): New macro.
93461         Reported by Simon Josefsson.
93463 2010-09-26  Simon Josefsson  <simon@josefsson.org>
93465         stdlib, sys_wait: Avoid compilation error on mingw.
93466         * lib/sys_wait.in.h: Include <signal.h>, for SIGTERM.
93468 2010-09-26  Bruno Haible  <bruno@clisp.org>
93470         stdlib tests: Avoid code duplication.
93471         * modules/stdlib-tests (Files): Add tests/test-sys_wait.h.
93472         * modules/sys_wait-tests (Files): Likewise.
93473         * tests/test-sys_wait.h: New file, extracted from tests/test-stdlib.c.
93474         * tests/test-stdlib.c: Include test-sys_wait.h.
93475         (main): Invoke test_sys_wait_macros.
93476         * tests/test-sys_wait.c: Include test-sys_wait.h.
93477         (main): Invoke test_sys_wait_macros.
93479 2010-09-25  Simon Josefsson  <simon@josefsson.org>
93481         * modules/getaddrinfo (Depends-on): Depend on the sockets module.
93482         * lib/getaddrinfo.c (use_win32_p): Call gl_sockets_startup to make
93483         sure Windows sockets are working before calling getaddrinfo.
93484         * tests/test-getaddrinfo.c (main): Don't call WSAStartup here.
93485         * doc/gnulib.texi (Windows sockets): Fix typo.
93487 2010-09-25  Bruno Haible  <bruno@clisp.org>
93489         Tests for module 'regex-quote'.
93490         * modules/regex-quote-tests: New file.
93491         * tests/test-regex-quote.c: New file.
93493         New module 'regex-quote'.
93494         * lib/regex-quote.h: New file.
93495         * lib/regex-quote.c: New file.
93496         * modules/regex-quote: New file.
93497         Suggested by Reuben Thomas <rrt@sc3d.org>.
93499 2010-09-24  Bruno Haible  <bruno@clisp.org>
93501         unistr/u8-strchr: Fix a test failure on i586 glibc systems.
93502         * tests/unistr/test-strchr.h (test_strchr): Disable an invalid check.
93504 2010-09-23  Bruno Haible  <bruno@clisp.org>
93506         setenv: Relax license.
93507         * modules/setenv (License): Change to LGPLv2+, with consent by Eric
93508         Blake.
93509         Requested by Eric Blake.
93511 2010-09-22  Bruno Haible  <bruno@clisp.org>
93513         termios: Relax license.
93514         * modules/termios (License): Change to LGPLv2+.
93515         Requested by Eric Blake.
93517 2010-09-22  Bruno Haible  <bruno@clisp.org>
93519         threadlib: Allow the package to change the default to 'no'.
93520         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): When
93521         gl_THREADLIB_DEFAULT_NO is defined, change the default to 'no'.
93522         Reported by Paul Eggert.
93524 2010-09-22  Pádraig Brady  <P@draigbrady.com>
93525             Bruno Haible  <bruno@clisp.org>
93527         Fix endless loop in mbmemcasecoll.
93528         * lib/mbmemcasecoll.c (apply_towlower): When mbrtowc returns 0, copy 1
93529         byte.
93530         * tests/test-mbmemcasecmp.h (test_ascii): Test embedded NULs.
93532 2010-09-22  Bruno Haible  <bruno@clisp.org>
93534         Tests for module 'memcoll'.
93535         * modules/memcoll-tests: New file.
93536         * tests/test-memcoll.c: New file, based on tests/test-memcmp.c.
93538         memcoll, xmemcoll: Clarify size vs. length.
93539         * modules/memcoll.c (memcoll0): Clarify specification.
93540         * modules/xmemcoll.c (xmemcoll0): Likewise. Reduce by 1 the lengths
93541         passed to collate_error.
93543 2010-09-22  Bruno Haible  <bruno@clisp.org>
93545         Tests for module 'memcasecmp'.
93546         * modules/memcasecmp-tests: New file.
93547         * tests/test-memcasecmp.c: New file, based on tests/test-memcmp.c.
93549 2010-09-22  Paul Eggert  <eggert@cs.ucla.edu>
93551         * lib/pthread.in.h: Add split double-inclusion guard, and include
93552         system <pthread.h> if there is one.  Use @@-style as in other
93553         .in.h files.  Define PTHREAD_COND_INITIALIZER etc. only if system
93554         pthread.h doesn't.
93555         (pthread_mutexattr_destroy, pthread_mutexattr_init):
93556         (pthread_mutexattr_settype, pthread_mutex_trylock):
93557         New static inline functions, if there's no system <pthread.h>.
93558         (pthread_spinlock_t, pthread_spin_init, pthread_spin_destroy):
93559         (pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock):
93560         Approximate with mutexes if the system lacks spinlocks, as in
93561         MacOS.
93562         * m4/pthread.m4 (gl_PTHREAD_CHECK): Require gl_PTHREAD_DEFAULTS.
93563         Add gl_CHECK_NEXT_HEADERS for pthread.h, and support the usual
93564         @@-style.  Check for spinlocks separately.
93565         (gl_PTHREAD_DEFAULTS): New macro.
93566         * modules/pthread: Redo to use a more typical style for in.h files.
93568 2010-09-21  Eric Blake  <eblake@redhat.com>
93570         net_if: enhance tests
93571         * tests/test-net_if.c (main): Move signature checks earlier.
93572         Print failures to stderr.
93573         * doc/posix-functions/if_freenameindex.texi (if_freenameindex):
93574         Document the bug that we do not yet fix.
93576 2010-09-21  Reuben Thomas  <rrt@sc3d.org>
93578         * doc/gnulib.texi (Out of memory handling): Rewrite section to be
93579         about gnulib, not GSS.
93581 2010-09-21  Reuben Thomas  <rrt@sc3d.org>
93583         * build-aux/pmccabe2html: Look for sources in src/ instead of lib/.
93584         * build-aux/pmccabe2html: Set cut_dir properly, and add mode line
93585         for Emacs.
93586         * build-aux/pmccabe2html: Make Makefile.am example code more
93587         cut-and-paste friendly.
93589 2010-09-21  Simon Josefsson  <simon@josefsson.org>
93591         * tests/test-net_if.c: New file.
93592         * modules/net_if-tests: New file.
93594 2010-09-20  Paul Eggert  <eggert@cs.ucla.edu>
93596         pthread: add pthread_spin_destroy
93597         * lib/pthread.in.h (pthread_spin_destroy): New function.
93599 2010-09-19  Bruno Haible  <bruno@clisp.org>
93601         gnulib-tool: Fix --help output.
93602         * gnulib-tool (func_usage): Fix help message.
93603         Reported by Reuben Thomas <rrt@sc3d.org>.
93605 2010-09-18  Jim Meyering  <meyering@redhat.com>
93607         maint.mk: avoid unexpanded \n in two diagnostics
93608         * top/maint.mk (sc_prohibit_always_true_header_tests):
93609         Don't use a literal \n in a halt=... assignment.  It would not be
93610         expanded, and the two \n bytes would appear in the diagnostic output
93611         rather than the desired newline.  Use halt=$$(printf ... instead.
93612         (sc_vulnerable_makefile_CVE-2009-4029): Likewise.
93614 2010-09-18  Bruno Haible  <bruno@clisp.org>
93616         netinet_in: Doc tweak.
93617         * doc/posix-headers/netinet_in.texi: Mention an affected platform.
93618         Reported by Mats Erik Andersson <mats.andersson@gisladisker.se>.
93620 2010-09-18  Jim Meyering  <meyering@redhat.com>
93622         init.sh: correct an outdated comment
93623         * tests/init.sh (create_exe_shims_):  s/function/alias/
93625         init.sh: don't let an ephemeral "*.exe" make us skip all dir entries
93626         * tests/init.sh (find_exe_basenames_): Don't give up on a directory if
93627         a file named "*.exe" is removed between the glob expansion and the
93628         processing of that oddly named file.
93630 2010-09-17  Eric Blake  <eblake@redhat.com>
93632         mirbsd: add some more support
93633         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): MirBSD is
93634         in BSD family.
93635         * m4/gc-random.m4 (gl_GC_RANDOM): MirBSD supports same random
93636         devices as OpenBSD.
93637         * m4/host-os.m4 (mirbsd): Add MirBSD.
93639         tests: fix unportable assumption on sys/wait.h
93640         * tests/test-sys_wait.c (main): Relax test.
93641         * tests/test-stdlib.c (main): Likewise.
93643         init.sh: accommodate directory with no .exes
93644         * tests/init.sh: Accomodate directory containing only scripts.
93646         tests: avoid compiler warning
93647         * tests/test-stdlib.c (main): Use the variable.
93649         fdutimens, fdutimensat: update signature, again
93650         * lib/utimens.h (gl_futimens): Delete, and move signature...
93651         (fdutimens): ...here.
93652         (fdutimensat): Rearrange signature.
93653         (lutimensat): Rename variable for clarity.
93654         * lib/fdutimensat.c (fdutimensat): Update signature.
93655         * lib/utimens.c (fdutimens): Likewise.
93656         (gl_futimens): Delete.
93657         (utimens, lutimens): Update callers.
93658         * lib/futimens.c (futimens): Likewise.
93659         * tests/test-fdutimensat.c: Likewise.
93660         * tests/test-utimens.c: Likewise.
93661         * tests/test-futimens.h: Update comment.
93662         * NEWS: Mention this.
93663         Suggested by Paul Eggert.
93665 2010-09-17  Bruno Haible  <bruno@clisp.org>
93667         Take over the maintenance of some older macros from Autoconf.
93668         * m4/error.m4 (AC_FUNC_ERROR_AT_LINE): New macro, from GNU Autoconf.
93669         * m4/lstat.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): New macro, from
93670         GNU Autoconf.
93671         * m4/memcmp.m4 (AC_FUNC_MEMCMP): New macro, from GNU Autoconf.
93672         * m4/mktime.m4 (AC_FUNC_MKTIME): Change comment.
93674 2010-09-17  Eric Blake  <eblake@redhat.com>
93676         fdutimensat: drop atflag validation
93677         * lib/fdutimensat.c (fdutimensat): Allow AT_SYMLINK_NOFOLLOW even
93678         with valid fd, to close a race scenario where futimens is
93679         unsupported and FILE was replaced by a symlink.
93680         * tests/test-fdutimensat.c (do_fdutimens, main): Adjust test
93681         accordingly.
93682         Suggested by Paul Eggert.
93684 2010-09-16  Bruno Haible  <bruno@clisp.org>
93686         unlockpt: Fix declaration within GNULIB_POSIXCHECK.
93687         * lib/stdlib.in.h (unlockpt): Fix warning declaration.
93689 2010-09-16  Bruno Haible  <bruno@clisp.org>
93691         login_tty: Fix detection of function on FreeBSD, OpenBSD, NetBSD.
93692         * m4/pty.m4 (gl_FUNC_LOGIN_TTY): Augment LIBS while checking whether
93693         login_tty exists.
93694         Reported by Mats Erik Andersson <mats.andersson@gisladisker.se>.
93696 2010-09-16  Bruno Haible  <bruno@clisp.org>
93698         login_tty: Make the replacement code work on BSD systems.
93699         * lib/login_tty.c: Include <sys/ioctl.h>.
93700         (login_tty): Use ioctl TIOCSCTTY when available.
93701         * modules/login_tty (Depends-on): Add sys_ioctl.
93702         Reported by Mats Erik Andersson <mats.andersson@gisladisker.se>.
93704 2010-09-16  Bruno Haible  <bruno@clisp.org>
93706         login_tty: Stricter unit test.
93707         * modules/login_tty-tests (Depends-on): Add tcgetsid.
93708         * tests/test-login_tty.c (main): Also check the results of tcgetpgrp()
93709         and tcgetsid() after login_tty.
93710         Reported by Mats Erik Andersson <mats.andersson@gisladisker.se>.
93712 2010-09-16  Bruno Haible  <bruno@clisp.org>
93714         New module 'tcgetsid'.
93715         * lib/tcgetsid.c: New file.
93716         * m4/tcgetsid.m4: New file.
93717         * modules/tcgetsid: New file.
93718         * modules/termios (Depends-on): Add c++defs, warn-on-use.
93719         (Makefile.am): Ensure c++defs.h, warn-on-use.h get included. Substitute
93720         GNULIB_TCGETSID, HAVE_TCGETSID.
93721         * lib/termios.in.h: Include <sys/types.h>.
93722         (tcgetsid): New declaration.
93723         * m4/termios_h.m4 (gl_TERMIOS_H): Check whether tcgetsid is declared.
93724         (gl_TERMIOS_H_DEFAULTS): Initialize GNULIB_TCGETSID, HAVE_TCGETSID.
93725         * doc/posix-functions/tcgetsid.texi: Mention the new module.
93726         * tests/test-termios-c++.cc: Check GNULIB_NAMESPACE::tcgetsid.
93728 2010-09-16  Bruno Haible  <bruno@clisp.org>
93730         Tests for module 'termios'.
93731         * modules/termios-c++-tests: New file.
93732         * modules/termios-tests: New file.
93733         * tests/test-termios-c++.cc: New file.
93734         * tests/test-termios.c: New file.
93736         New module 'termios'.
93737         * modules/termios: New file.
93738         * lib/termios.in.h: New file.
93739         * m4/termios_h.m4: New file.
93740         * doc/posix-headers/termios.texi: Mention the new module.
93742 2010-09-16  Eric Blake  <eblake@redhat.com>
93744         fdutimensat: add an atflag parameter
93745         * lib/fdutimensat.c (fdutimensat): Add new parameter.
93746         * lib/utimens.h (fdutimensat): Update prototype.
93747         * tests/test-fdutimensat.c: Adjust test to match.
93748         * NEWS: Document the change.
93749         Suggested by Paul Eggert.
93751 2010-09-16  Bruno Haible  <bruno@clisp.org>
93753         Fix typos in comments.
93754         * lib/striconveh.h: Fix typo in comment.
93755         * lib/login_tty.c (login_tty): Likewise.
93757 2010-09-15  Bruno Haible  <bruno@clisp.org>
93759         stdlib: clarify MirBSD WEXITSTATUS bug
93760         * lib/stdlib.in.h: Clarify the MirBSD bug regarding WEXITSTATUS.
93761         * doc/posix-headers/stdlib.texi (stdlib.h): Likewise.
93763 2010-09-15  Eric Blake  <eblake@redhat.com>
93765         stdlib: work around MirBSD WEXITSTATUS bug
93766         * lib/stdlib.in.h (includes): Guarantee WEXITSTATUS.
93767         * modules/stdlib (Depends-on): Add sys_wait.
93768         * tests/test-sys_wait.c (main): Enhance test.
93769         * tests/test-stdlib.c (main): Likewise.
93770         * doc/posix-headers/stdlib.texi (stdlib.h): Document the bug.
93772         docs: mention MacOS issue with WEXITSTATUS(constant)
93773         * doc/posix-headers/sys_wait.texi (sys/wait.h): Document the
93774         issue.
93775         * doc/posix-headers/stdlib.texi (stdlib.h): Likewise.
93777         strnlen: add tests
93778         * modules/strnlen-tests: New file.
93779         * tests/test-strnlen.c: Likewise.
93781 2010-09-14  Bruno Haible  <bruno@clisp.org>
93783         unistr/base: Avoid link errors when module 'libunistring' is also used.
93784         * lib/unistr.in.h (u8_mbtouc_unsafe, u16_mbtouc_unsafe,
93785         u32_mbtouc_unsafe, u8_mbtouc, u16_mbtouc, u32_mbtouc, u8_mbtoucr,
93786         u16_mbtoucr, u32_mbtoucr, u8_uctomb_aux, u16_uctomb_aux, u32_uctomb):
93787         Declare also when HAVE_LIBUNISTRING is set.
93788         Reported by Pádraig Brady <P@draigbrady.com>.
93790 2010-09-14  Eric Blake  <eblake@redhat.com>
93792         test-rawmemchr: make more robust
93793         * modules/rawmemchr-tests (Files): Add zerosize-ptr.h, mmap-anon.m4.
93794         (Depends-on, configure.ac): Add needed prerequisites to use it.
93795         * modules/memchr-tests (Files, Depends-on, configure.ac):
93796         Likewise, to avoid implicit reliance on memchr module prereqs.
93797         * tests/test-memchr.c (main): Ensure proper masking.
93798         * tests/test-rawmemchr.c (main): Likewise.  Detect oversized
93799         reads.
93801         memchr: detect glibc Alpha bug
93802         Avoids http://sourceware.org/bugzilla/show_bug.cgi?id=12019.
93803         * m4/memchr.m4 (gl_FUNC_MEMCHR): Detect glibc 2.11.2 failure on
93804         Alpha.
93805         * doc/posix-functions/memchr.texi (memchr): Tweak wording.
93806         * tests/test-memchr.c (main): Enhance test.
93807         Reported by Nelson H. F. Beebe.
93809 2010-09-13  Paul Eggert  <eggert@cs.ucla.edu>
93811         fts, getcwd, glob: audit for dirfd returning -1
93812         * lib/fts.c (opendir): Remove #define; no longer used.
93813         (opendirat): New arg PDIR_FD.  All callers changed.
93814         (fts_build, _opendir2): Use new opendirat to avoid the need for
93815         dirfd, or for checking whether dirfd returns a negative value.
93816         Don't use opendir; always use openat followed by fdopendir.
93817         * lib/getcwd.c (__getcwd): Don't reset fd; fdopendir no longer clobbers
93818         it.
93819         * lib/glob.c (link_exists_p): Add comment explaining why dirfd never
93820         returns -1 here.
93821         * modules/fts (Depends-on): Remove dirfd.
93822         * modules/getcwd (Depends-on): Likewise.
93824 2010-09-13  Eric Blake  <eblake@redhat.com>
93826         float: fix broken MirBSD header
93827         * m4/float_h.m4 (gl_FLOAT_H): MirBSD copied OpenBSD's bug.
93828         * doc/posix-headers/float.texi (float.h): Document it.
93830 2010-09-13  Paul Eggert  <eggert@cs.ucla.edu>
93832         fts: use O_NOFOLLOW to avoid race condition when opening a directory
93833         * lib/fts.c (opendirat): New arg extra_flags.
93834         (__opendir2): Use it to avoid following symlinks when opening
93835         a directory, if symlinks are not supposed to be followed.  See
93836         <http://lists.gnu.org/r/bug-gnulib/2010-09/msg00213.html>.
93838         fdopendir: preserve argument fd before returning
93839         * lib/fdopendir.c: Adjust comments to say POSIX, not Solaris.
93840         (fdopendir_with_dup, fd_clone_opendir): New static functions.
93841         (fdopendir): Use them, arranging for FD to be open to the same
93842         directory that it was when it started.  (It might be temporarily
93843         closed while fdopendir is running, so this not thread- or
93844         signal-safe.)  Be careful to do the right thing even when file
93845         descriptors are scarce and dup fails with errno == EMFILE.  See
93846         <http://lists.gnu.org/r/bug-gnulib/2010-09/msg00208.html>.
93848 2010-09-10  Paolo Bonzini  <bonzini@gnu.org>
93850         regex: Pass the system regex if its only problem is 32-bit regoff_t.
93851         * NEWS: Document change.
93852         * m4/regex.m4: Disable test for regoff_t size.
93854 2010-09-13  Jim Meyering  <meyering@redhat.com>
93856         fts: don't operate on an invalid file descriptor after failed dup
93857         * lib/fts.c (fts_build): Don't call set_cloexec_flag on a
93858         negative file descriptor.
93860 2010-09-12  Paul Eggert  <eggert@cs.ucla.edu>
93862         savedir: add streamsavedir, deprecate fdsavedir
93863         * NEWS: Mention deprecation of fdsavedir.
93864         * lib/savedir.c (streamsavedir): New extern function, whose name
93865         ends in "savedir" to be consistent with the others.  This differs
93866         from savedirstream in that it doesn't close its argument.  The
93867         next version of GNU tar will use this instead of fdsavedir, to
93868         avoid some race conditions and conserve file descriptors.
93869         (savedirstream): Reimplement as a wrapper around streamsavedir.
93870         (fdsavedir): Add a comment deprecating this function.  As far as
93871         I know, only GNU tar used it, and GNU tar doesn't need it any more.
93872         * lib/savedir.h (streamsavedir): New decl.
93873         (fdsavedir): Add a comment deprecating this.
93875 2010-09-10  Bruno Haible  <bruno@clisp.org>
93877         langinfo: Fix last commit.
93878         * m4/langinfo_h.m4 (gl_LANGINFO_H): Initialize
93879         HAVE_LANGINFO_T_FMT_AMPM, HAVE_LANGINFO_YESEXPR.
93880         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
93882 2010-09-10  Bruno Haible  <bruno@clisp.org>
93884         relocatable-prog-wrapper: Fix compilation failure due to O_EXEC.
93885         * lib/progreloc.c (O_EXEC): Define fallback.
93887 2010-09-10  Paul Eggert  <eggert@cs.ucla.edu>
93889         fcntl-h: define O_CLOEXEC and O_EXEC if not defined; use new defines
93890         * NEWS: Document recent changes to fcntl-h.
93891         * doc/posix-headers/fcntl.texi (fcntl.h): Document that
93892         O_CLOEXEC is now defined to 0 if it is not defined, like other flags.
93893         Also, O_EXEC is now defined to be O_RDONLY if O_EXEC is not defined.
93894         Similarly for O_SEARCH; this last was already true, but not documented.
93895         * lib/fcntl.in.h (O_CLOEXEC): Define to 0 if not defined.
93896         * lib/dup-safer-flag.c (O_CLOEXEC): Remove now-useless #define.
93897         * lib/dup3.c, lib/pipe2.c, tests/test-dup-safer.c, tests/test-fcntl.c:
93898         Likewise.
93899         * lib/popen-safer.c (open_noinherit): Check whether O_CLOEXEC
93900         is zero, not whether it is defined.
93901         * tests/test-dup3.c, tests/test-pipe2.c (main): Likewise.
93902         * lib/progreloc.c (find_executable): Use O_EXEC rather than O_RDONLY.
93903         * lib/open.c (open): Check for O_SEARCH as well as for O_RDONLY.
93905 2010-09-10  Bruno Haible  <bruno@clisp.org>
93907         langinfo, nl_langinfo: Fix for IRIX 5.3.
93908         * m4/langinfo_h.m4 (gl_LANGINFO_H): Test whether langinfo.h defines
93909         T_FMT_AMPM, YESEXPR. Set HAVE_LANGINFO_T_FMT_AMPM,
93910         HAVE_LANGINFO_YESEXPR.
93911         * modules/langinfo (Makefile.am): Substitute HAVE_LANGINFO_T_FMT_AMPM,
93912         HAVE_LANGINFO_YESEXPR.
93913         * lib/langinfo.in.h (T_FMT_AMPM, GNULIB_defined_T_FMT_AMPM): Define if
93914         HAVE_LANGINFO_T_FMT_AMPM is 0.
93915         (YESEXPR, NOEXPR, GNULIB_defined_YESEXPR): Define if
93916         HAVE_LANGINFO_YESEXPR is 0.
93917         * lib/nl_langinfo.c (rpl_nl_langinfo): Handle also T_FMT_AMPM, YESEXPR,
93918         NOEXPR.
93919         * doc/posix-headers/langinfo.texi: Mention the IRIX 5.3 problem.
93920         * doc/posix-functions/nl_langinfo.texi: Likewise.
93921         Reported by Eric Blake.
93923 2010-09-10  Bruno Haible  <bruno@clisp.org>
93925         pty, readutmp: Fix for FreeBSD 8.0 and OpenBSD 4.6.
93926         * doc/glibc-functions/login_tty.texi: Mention the include file problem
93927         on FreeBSD 8.0 and OpenBSD 4.6.
93928         * lib/pty.in.h: Include <sys/types.h> before <libutil.h>.
93929         * m4/pty_h.m4 (gl_PTY_H): Likewise.
93930         * m4/pty.m4 (gl_FUNC_FORKPTY, gl_FUNC_OPENPTY): Likewise.
93931         * m4/readutmp.m4 (gl_READUTMP): Include <sys/types.h> before <utmp.h>.
93932         Invoke AC_INCLUDES_DEFAULT instead of using the undocumented variable
93933         ac_includes_default.
93934         Reported by Mats Erik Andersson <mats.andersson@gisladisker.se>.
93936 2010-09-09  Eric Blake  <eblake@redhat.com>
93938         strsignal: work around NetBSD bug
93939         * m4/strsignal.m4 (gl_FUNC_STRSIGNAL): Also check in <unistd.h>.
93940         * lib/string.in.h (includes): Likewise.
93941         * doc/posix-functions/strsignal.texi (strsignal): Document the
93942         bug.
93943         Reported by Nelson H. F. Beebe.
93945         gnulib-tool: work with NetBSD /bin/sh
93946         * gnulib-tool (func_cache_var, func_cache_lookup_module)
93947         (func_get_description, func_get_comment, func_get_status)
93948         (func_get_notice, func_get_applicability, func_get_filelist)
93949         (func_get_dependencies, func_get_autoconf_early_snippet)
93950         (func_get_autoconf_snippet, func_get_automake_snippet)
93951         (func_get_include_directive, func_get_link_directive)
93952         (func_get_license, func_get_maintainer, func_import): Avoid
93953         shell syntax errors from parsing syntax extensions.
93955 2010-09-09  Bruno Haible  <bruno@clisp.org>
93957         gnulib-tool: Avoid stderr output on IRIX related to 'alias', 'unalias'.
93958         * gnulib-tool: Don't fiddle with file descriptors 0, 1, 2. Instead, use
93959         a reliable way to determine whether the 'alias' command works.
93961 2010-09-08  Jim Meyering  <meyering@redhat.com>
93963         init.sh: penalize a set-x-impaired shell; don't disqualify it
93964         * tests/init.sh: Too many shells corrupt application stderr when
93965         you set -x, so we can't afford to disqualify them, since at least
93966         on Irix-6.5, that would disqualify all bourne shells.
93967         Instead, use a two-pass approach.
93968         On the first pass, try to find a shell that meets the stricter
93969         condition that set -x does not corrupt stderr.
93970         If no shell meets the stricter condition, retest each candidate
93971         shell, but without that extra condition.  Finally, when
93972         VERBOSE=yes is requested and set -x might cause trouble, simply
93973         issue a warning and refrain from enabling debug output.
93975 2010-09-08  Eric Blake  <eblake@redhat.com>
93977         unsetenv: fix OpenBSD bug
93978         * m4/setenv.m4 (gl_FUNC_UNSETENV): Check for OpenBSD bug.
93979         * doc/posix-functions/unsetenv.texi (unsetenv): Update
93980         documentation.
93981         Reported by Jim Meyering.
93983         strtod: work around IRIX 6.5 bug
93984         * lib/strtod.c (strtod): Reparse number on shorter string if
93985         exponent parse was invalid.
93986         * tests/test-strtod.c (main): Add check for "0x1p 2".
93987         Reported by Tom G. Christensen.
93989         getopt: optimize previous patch
93990         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Correctly check for
93991         empty variable.  Speed up awk script.
93992         Reported by Paolo Bonzini.
93994 2010-09-08  Jim Meyering  <meyering@redhat.com>
93996         test.sh: disqualify shells for which set -x corrupts stderr
93997         * tests/init.sh: Add a test to disqualify /bin/sh from SunOS 5.11
93998         and OpenBSD 4.7.  They make it so with "set -x", environment settings
93999         appear in stderr output.  For example, this command:
94000             /bin/sh -c 'set -x; P=1 true 2> err' 2>/dev/null; cat err
94001         prints "P=1" on those two systems:
94003 2010-09-08  Bruno Haible  <bruno@clisp.org>
94005         gnulib-tool: Avoid stderr output on IRIX related to 'alias', 'unalias'.
94006         * gnulib-tool: Use stderr redirection around the 'alias' and 'unalias'
94007         commands, because some shells ignore redirections when there is an
94008         error in the command lookup.
94009         Reported by Eric Blake.
94011 2010-09-07  Reuben Thomas  <rrt@sc3d.org>
94013         * lib/regex.h: Fix a mention of `regex_compile' (should be
94014         `re_compile_pattern').
94015         Correct and clarify documentation for RE_CONTEXT_INVALID_DUP.
94016         (re_set_registers): Correct name of parameter in comment.
94018         * doc/regex.texi: Add documentation for missing syntax flags.
94019         Remove commented-out documentation of defunct syntax option
94020         RE_NO_EMPTY_ALTS.
94021         Correct name of RE_CHAR_CLASSES in one incorrect occurrence.
94022         Add documentation of re_set_registers.
94023         Document trick to re-use a pattern buffer by setting fastmap manually.
94024         Update documentation of struct re_pattern_buffer per public members.
94025         Uncomment documentation of equivalence class operators and
94026         collating symbol operators, since they are now implemented,
94027         Explain leftmost-longest matching in relation to alternatives.
94028         Tidy documentation of substring matching.
94029         Remove POSIX documentation, which is done better in
94030         glibc, and refer the reader there. Keep BSD API documentation, as
94031         that is not readily available elsewhere.
94033 2010-09-07  Eric Blake  <eblake@redhat.com>
94035         getopt: handle POSIXLY_CORRECT set but not exported
94036         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Restore pre-existing
94037         export state of POSIXLY_CORRECT, due to bash set -o posix.
94038         Reported by Dustin J. Mitchell.
94040 2010-09-05  Bruno Haible  <bruno@clisp.org>
94042         gnulib-tool: Highlight the changed options.
94043         * gnulib-tool (func_usage): Display the --import, --add-import,
94044         --remove-import explanations in bold font.
94046 2010-09-06  Karl Berry  <karl@gnu.org>
94048         * doc/gnulib-tool.texi (Modified imports): doc tweaks.
94050 2010-09-05  Bruno Haible  <bruno@clisp.org>
94052         uniwidth/width: Update comment.
94053         * lib/uniwidth/width.c (uc_width): Update comment for Unicode >= 3.1.
94054         Reported by Emanuele Giaquinta <emanuele.giaquinta@gmail.com>.
94056 2010-09-05  Bruno Haible  <bruno@clisp.org>
94058         isinf, isnan: Relax license.
94059         * modules/isinf (License): Change from GPL to LGPL, with consent from
94060         Ben Pfaff.
94061         * modules/isnan (License): Likewise.
94062         Requested by Ludovic Courtès.
94064 2010-09-04  Bruno Haible  <bruno@clisp.org>
94066         gnulib-tool: Help migration from --import to --add-import or --update.
94067         * gnulib-tool: Emit a verbose error message when --import is used
94068         without any module name.
94070 2010-09-04  Bruno Haible  <bruno@clisp.org>
94072         Update doc about gnulib-tool.
94073         * doc/gnulib-tool.texi (VCS Issues): Explain 'gnulib-tool --import' vs.
94074         'gnulib-tool --update' in more detail.
94075         Reported by Eric Blake.
94077 2010-09-04  Bruno Haible  <bruno@clisp.org>
94079         gnulib-tool: Change --import. New options --add/remove-import.
94080         * gnulib-tool: New options --add-import, --remove-import.
94081         (func_usage): Document them.
94082         (have_associative): Define always.
94083         (func_import): In import mode, don't merge the specified settings with
94084         the cached settings. Implement remove-import mode.
94085         * doc/gnulib-tool.texi (Modified imports): Mention the new options.
94086         Explain when to use them versus --import.
94087         (Simple update): Use --add-import instead of --import.
94088         * NEWS: Mention the change.
94090 2010-09-04  Bruno Haible  <bruno@clisp.org>
94092         * doc/gnulib-tool.texi (Initial import): Update paragraph about
94093         separate gnulib.mk.
94095 2010-09-04  Bruno Haible  <bruno@clisp.org>
94097         gnulib-tool: Don't talk about CVS any more.
94098         * gnulib-tool (func_usage, func_import): Write "version control"
94099         instead of CVS.
94101 2010-09-04  Jim Meyering  <meyering@redhat.com>
94103         maint.mk: avoid obscure sc_copyright_check failure in coreutils
94104         * top/maint.mk (v_etc_file): Prepend $(gnulib_dir)/, to avoid
94105         false positives (whose names may be ill-chosen) when searching
94106         non-VC'd files.  Otherwise, a file named "a b/lib/version-etc.c"
94107         would cause a false-positive.
94109         avoid coreutils "make distcheck" failure
94110         Coreutils tests with an absolute build directory name that contains
94111         a space.  Not quoting this directory name caused a failure.
94112         * tests/test-vc-list-files-git.sh: Quote PATH dir name.
94113         * tests/test-vc-list-files-cvs.sh: Likewise.
94115 2010-09-04  Bruno Haible  <bruno@clisp.org>
94117         gnulib-tool: Avoid error when run in a package without Makefile.am.
94118         * gnulib-tool: When collecting the m4dirs in a package that does not
94119         have a Makefile.am, eliminate those directories that contain no
94120         gnulib-cache.m4. Fix expression that counts these directories.
94122 2010-09-04  Bruno Haible  <bruno@clisp.org>
94124         update-copyright test: Improve output when perl is missing or too old.
94125         * tests/test-update-copyright.sh: Move test of Perl version down after
94126         the test whether Perl exists. Provide an explanation relating Perl's
94127         error message to Automake's SKIP: message.
94129 2010-09-04  Bruno Haible  <bruno@clisp.org>
94131         Don't augment PATH in TESTS_ENVIRONMENT.
94132         * modules/update-copyright-tests (Makefile.am): In TESTS_ENVIRONMENT,
94133         set abs_aux_dir instead of augmenting PATH.
94134         * modules/vc-list-files-tests (Makefile.am): Likewise.
94135         * tests/test-update-copyright.sh: Augment PATH here.
94136         * tests/test-vc-list-files-cvs.sh: Augment PATH here, through
94137         path_prepend_.
94138         * tests/test-vc-list-files-git.sh: Likewise.
94140 2010-09-04  Jim Meyering  <meyering@redhat.com>
94142         tests: prohibit augmenting PATH via TESTS_ENVIRONMENT
94143         * Makefile (sc_prohibit_augmenting_PATH_via_TESTS_ENVIRONMENT): New rule.
94145 2010-09-04  Bruno Haible  <bruno@clisp.org>
94147         strdup: Fix compilation error in C++ mode.
94148         * lib/string.in.h (strdup): In C++ mode with GNULIB_NAMESPACE, undefine
94149         the macro.
94151 2010-09-04  Bruno Haible  <bruno@clisp.org>
94153         dirfd: Fix compilation error in C++ mode on MacOS X, *BSD, IRIX.
94154         * lib/dirent.in.h (dirfd): In C++ mode with GNULIB_NAMESPACE, turn the
94155         macro into a function.
94156         Reported by Jarno Rajahalme <jarno.rajahalme@nsn.com>.
94158 2010-09-04  Bruno Haible  <bruno@clisp.org>
94160         Set PATH_SEPARATOR the same way autoconf does.
94161         * build-aux/relocatable.sh.in (func_find_curr_installdir): Determine
94162         the value of PATH_SEPARATOR the same way autoconf-generated configure
94163         scripts do.
94164         * m4/lib-ld.m4 (AC_LIB_PROG_LD): Likewise.
94165         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
94167 2010-09-04  Stefano Lattarini  <stefano.lattarini@gmail.com>  (tiny change)
94169         Set PATH_SEPARATOR the same way autoconf does.
94170         * gnulib-tool (func_gnulib_dir): Determine the value of PATH_SEPARATOR
94171         the same way autoconf-generated configure scripts do.
94172         * posix-modules: Likewise.
94174 2010-09-02  Paul Eggert  <eggert@cs.ucla.edu>
94176         hash: fix safe_hasher const typo
94177         * lib/hash.c (safe_hasher): Result is pointer, not pointer to
94178         const; otherwise, there is a type error later.
94180 2010-09-02  Jim Meyering  <meyering@redhat.com>
94182         test-update-copyright.sh: require perl 5.8.0
94183         * tests/test-update-copyright.sh: Require 5.8.0,
94184         which Tom G. Christensen has confirmed is adequate,
94185         while 5.6.1 is not.
94187 2010-09-02  Eric Blake  <eblake@redhat.com>
94189         tests: init.sh improvements for re-exec'ing with zsh
94190         * tests/init.sh: Borrow autoconf POSIX-mode sanitization.  Pass
94191         -vx through shell re-exec.
94192         Reported by Tom G. Christensen.
94194         wctype: fix typo in previous commit
94195         * m4/wctype_h.m4 (gl_WCTYPE_H): Fix spelling.
94196         Reported by Ludovic Courtès.
94198 2010-09-02  Jim Meyering  <meyering@redhat.com>
94200         test-update-copyright.sh: skip test if Perl is too old
94201         * tests/test-update-copyright.sh: Exit 77 if Perl is too old.
94202         Reported by Tom G. Christensen.
94204 2010-09-02  Bruno Haible  <bruno@clisp.org>
94206         wctype: Avoid compilation error on IRIX 6.5.30.
94207         * lib/wctype.in.h (iswblank): Declare with a replacement if
94208         REPLACE_ISWBLANK is set.
94209         * m4/wctype_h.m4 (gl_WCTYPE_H): Check also whether iswblank is
94210         declared. Set REPLACE_ISWBLANK.
94211         * modules/wctype (Makefile.am): Substitute REPLACE_ISWBLANK.
94212         * doc/posix-functions/iswblank.texi: Mention the IRIX 6.5.30 problem.
94213         * doc/posix-headers/wctype.texi: Likewise.
94214         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
94216 2010-09-01  Bruno Haible  <bruno@clisp.org>
94218         New module 'socketlib'.
94219         * modules/socketlib: New file.
94220         * m4/socketlib.m4: New file, extracted from m4/sockets.m4.
94221         * m4/sockets.m4 (gl_SOCKETS): Require gl_SOCKETLIB.
94222         * modules/sockets (Depends-on): Add socketlib.
94223         Suggested by Sam Steingold <sds@gnu.org>.
94225 2010-09-01  Paul Eggert  <eggert@cs.ucla.edu>
94227         fcntl-h, etc.: prefer O_SEARCH to O_RDONLY when applicable
94229         POSIX 2008 specifies a new 'open' flag O_SEARCH, which can be used
94230         when one needs search access to a directory but not read access.
94231         On systems where it is available, it works in some cases where
94232         O_RDONLY does not, namely on directories that are searchable but
94233         not readable, and which need only to be searchable.  If O_SEARCH
94234         is not available, fall back to the traditional method of using
94235         O_RDONLY.
94237         * lib/fcntl.in.h (O_SEARCH): #define to O_RDONLY if not defined.
94238         * lib/chdir-long.c (cdb_advance_fd): Use O_SEARCH, not O_RDONLY,
94239         when opening a directory that needs only to be searchable.
94240         * lib/chdir-safer.c (chdir_no_follow): Likewise.
94241         * lib/fts.c (diropen, fts_open, fd_ring_check): Likewise.
94242         * lib/openat-proc.c (openat_proc_name): Likewise.
94243         * lib/openat.c (openat_needs_fchdir): Likewise.
94244         * lib/save-cwd.c (save_cwd): Likewise.
94245         * lib/savewd.c (savewd_save, savewd_chdir): Likewise.
94247 2010-08-28  Bruno Haible  <bruno@clisp.org>
94249         New module 'host-cpu-c-abi'.
94250         * modules/host-cpu-c-abi: New file.
94251         * m4/host-cpu-c-abi.m4: New file, based on part of
94252         clisp/src/m4/general.m4.
94253         Requested by Sam Steingold <sds@gnu.org>.
94255 2010-08-31  Eric Blake  <eblake@redhat.com>
94256         and Jim Meyering  <meyering@redhat.com>
94258         hash: factor, and guard against misbehaving hasher function
94259         * lib/hash.c (safe_hasher): New function, to encapsulate the checking
94260         of table->hasher's return value.  Also protect against a hash value
94261         so large that adding it to table->bucket results in a NULL pointer.
94262         (hash_lookup, hash_get_next, hash_find_entry, transfer_entries):
94263         Use it in place of open-coded check-and-abort.
94265 2010-08-30  Bruno Haible  <bruno@clisp.org>
94267         hash: silence spurious clang warning
94268         * lib/hash.c (hash_get_next): Remove unnecessary test against NULL.
94269         Reported by Eric Blake.
94271 2010-08-30  Eric Blake  <eblake@redhat.com>
94273         strstr, memmem, strcasestr: avoid leaked shell message
94274         * m4/strstr.m4 (gl_FUNC_STRSTR): Avoid "Alarm clock" message from
94275         FreeBSD.
94276         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
94277         * m4/memmem.m4 (gl_FUNC_MEMMEM): Likewise.
94279         tests: silence clang warning
94280         * tests/test-malloca.c (do_allocation): Avoid dead store.
94282 2010-08-29  Bruno Haible  <bruno@clisp.org>
94284         gettext: Fix recent mistake.
94285         * m4/intl.m4 (gt_CHECK_DECL): Fix typo introduced on 2010-08-26.
94287 2010-08-29  Bruno Haible  <bruno@clisp.org>
94289         selinux-h: Offer a --without-selinux option.
94290         * m4/selinux-selinux-h.m4 (gl_HEADERS_SELINUX_SELINUX_H): If
94291         --without-selinux was specified, skip all tests and define
94292         HAVE_SELINUX_SELINUX_H to 0.
94293         (gl_LIBSELINUX): Offer --without-selinux option. If it is specified,
94294         set LIB_SELINUX to empty.
94295         * m4/selinux-context-h.m4 (gl_HEADERS_SELINUX_CONTEXT_H): Require
94296         gl_LIBSELINUX. If --without-selinux was specified, replace
94297         selinux/context.h.
94298         Reported by Johan Hattne <johan.hattne@utsouthwestern.edu>.
94300 2010-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
94301             Bruno Haible  <bruno@clisp.org>
94303         Make the module 'realloc-gnu' work again on AIX and OSF/1.
94304         * m4/realloc.m4 (gl_FUNC_REALLOC_GNU): Define HAVE_REALLOC_GNU instead
94305         of HAVE_REALLOC.
94306         * lib/realloc.c (NEED_REALLOC_GNU): Enable behaviour also when
94307         GNULIB_REALLOC_GNU && !HAVE_REALLOC_GNU.
94308         (SYSTEM_MALLOC_GLIBC_COMPATIBLE): Adjust definition.
94309         * modules/realloc-gnu (configure.ac): Use gl_MODULE_INDICATOR.
94311 2010-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
94312             Bruno Haible  <bruno@clisp.org>
94314         Make the module 'calloc-gnu' work again on AIX and OSF/1.
94315         * m4/calloc.m4 (gl_FUNC_CALLOC_GNU): Define HAVE_CALLOC_GNU instead of
94316         HAVE_CALLOC.
94317         * lib/xmalloc.c: Update accordingly.
94318         * lib/calloc.c (NEED_CALLOC_GNU): Enable also when
94319         GNULIB_CALLOC_GNU && !HAVE_CALLOC_GNU.
94320         * modules/calloc-gnu (configure.ac): Invoke gl_MODULE_INDICATOR.
94322 2010-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
94323             Bruno Haible  <bruno@clisp.org>
94325         Make the module 'malloc-gnu' work again on AIX and OSF/1.
94326         * m4/malloc.m4 (gl_FUNC_MALLOC_GNU): Define HAVE_MALLOC_GNU instead of
94327         HAVE_MALLOC.
94328         * lib/malloc.c (NEED_MALLOC_GNU): Enable behaviour also when
94329         GNULIB_MALLOC_GNU && !HAVE_MALLOC_GNU.
94330         * modules/malloc-gnu (configure.ac): Use gl_MODULE_INDICATOR.
94332 2010-08-29  Bruno Haible  <bruno@clisp.org>
94334         Update modules list.
94335         * MODULES.html.sh (Memory management functions <stdlib.h>): Add
94336         malloc-gnu, calloc-gnu, realloc-gnu. Remove malloc, calloc, realloc.
94337         (String handling <string.h>): Add astrxfrm.
94338         (File system functions): Add readlinkat.
94340 2010-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
94342         Tests for module 'realloc-gnu'.
94343         * modules/realloc-gnu-tests: New file.
94344         * tests/test-realloc-gnu.c: New file.
94346         Tests for module 'calloc-gnu'.
94347         * modules/calloc-gnu-tests: New file.
94348         * tests/test-calloc-gnu.c: New file.
94350         Tests for module 'malloc-gnu'.
94351         * modules/malloc-gnu-tests: New file.
94352         * tests/test-malloc-gnu.c: New file.
94354 2010-08-28  Bruno Haible  <bruno@clisp.org>
94356         Rename module 'realloc' -> 'realloc-gnu'.
94357         * modules/realloc-gnu: New file, copied from modules/realloc.
94358         * modules/realloc: Convert to a redirection to 'realloc-gnu'. Mark as
94359         obsolete.
94360         * modules/mgetgroups (Depends-on): Update.
94361         * doc/posix-functions/realloc.texi: Update.
94362         * NEWS: Mention the change.
94364         Rename module 'calloc' -> 'calloc-gnu'.
94365         * modules/calloc-gnu: New file, copied from modules/calloc.
94366         * modules/calloc: Convert to a redirection to 'calloc-gnu'. Mark as
94367         obsolete.
94368         * doc/posix-functions/calloc.texi: Update.
94369         * NEWS: Mention the change.
94371         Rename module 'malloc' -> 'malloc-gnu'.
94372         * modules/malloc-gnu: New file, copied from modules/malloc.
94373         * modules/malloc: Convert to a redirection to 'malloc-gnu'. Mark as
94374         obsolete.
94375         * modules/argp (Depends-on): Update.
94376         * modules/regex (Depends-on): Update.
94377         * doc/posix-functions/malloc.texi: Update.
94378         * NEWS: Mention the change.
94380 2010-08-28  Eric Blake  <eblake@redhat.com>
94382         pread, pwrite: add missing dependency
94383         * modules/pread (Depends-on): Add extensions.
94384         * modules/pwrite (Depends-on): Likewise.
94386 2010-08-28  Bruno Haible  <bruno@clisp.org>
94388         unistr/u*-strchr: Fix tests dependencies.
94389         * modules/unistr/u8-strchr-tests (Depends-on): Add unistr/u32-to-u8.
94390         * modules/unistr/u16-strchr-tests (Depends-on): Add unistr/u32-to-u16.
94391         Reported by Ian Beckwith <ianb@erislabs.net>.
94393 2010-08-28  Bruno Haible  <bruno@clisp.org>
94395         read-file: Don't occupy too much unused memory.
94396         * lib/read-file.c (fread_file): Shrink the buffer at the end.
94398 2010-08-28  Giuseppe Scrivano  <gscrivano@gnu.org>
94399             Eric Blake  <eblake@redhat.com>
94400             Bruno Haible  <bruno@clisp.org>
94402         read-file: Avoid memory reallocations with regular files.
94403         * lib/read-file.c: Include <sys/stat.h>, <stdio.h>, <stdint.h>.
94404         (fread_file): With regular files, use the remaining length as the
94405         initial buffer size.  Check against overflow.
94406         * modules/read-file (Depends-on): Add ftello, malloc-posix, stdint,
94407         sys_stat.
94409 2010-08-28  Bruno Haible  <bruno@clisp.org>
94411         ftello: Relax license.
94412         * modules/ftello (License): Relax to LGPLv2+.
94413         Reported by Eric Blake.
94415 2010-08-28  Bruno Haible  <bruno@clisp.org>
94417         Avoid relocwrapper link errors due to gnulib replacement functions.
94418         * lib/canonicalize-lgpl.c [IN_RELOCWRAPPER]: Use the system's getcwd
94419         function.
94420         Reported by Ben Pfaff <blp@cs.stanford.edu>.
94422 2010-08-28  Bruno Haible  <bruno@clisp.org>
94424         Prefer using AC_DEFUN_ONCE over AC_DEFUN in projects with gnulib.
94425         * m4/iconv.m4 (gl_iconv_AC_DEFUN): Use AC_DEFUN_ONCE if gl_00GNULIB is
94426         defined.
94427         * m4/libunistring.m4 (gl_libunistring_AC_DEFUN): Likewise.
94428         Suggested by Eric Blake.
94430 2010-08-28  Bruno Haible  <bruno@clisp.org>
94432         sys_socket, netdb: Ensure socklen_t gets defined.
94433         * modules/sys_socket (Depends-on): Add socklen.
94434         * modules/netdb (Depends-on): Likewise.
94435         * modules/getaddrinfo (Depends-on): Remove socklen.
94436         * modules/getsockopt (Depends-on): Likewise.
94437         * modules/setsockopt (Depends-on): Likewise.
94438         * tests/test-sys_socket.c: Check that socklen_t is defined.
94439         * tests/test-netdb.c: Likewise.
94440         * m4/socklen.m4: Update comments.
94441         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
94443 2010-08-27  Eric Blake  <eblake@redhat.com>
94445         login_tty: add missing dependency
94446         * modules/login_tty (Depends-on): Add pty.
94448 2010-08-26  Eric Blake  <eblake@redhat.com>
94450         lib-symbol-versions: fix m4 quoting
94451         * m4/ld-version-script.m4 (gl_LD_VERSION_SCRIPT): Use correct
94452         format for AC_LINK_IFELSE.
94454         glob: fix compile test
94455         * m4/glob.m4 (gl_GLOB): Use correct format for AC_COMPILE_IFELSE.
94457         btowc: fix missing file
94458         * modules/btowc (Files): Also ship locale-fr.m4.
94460         lseek: fix link test
94461         * m4/lseek.m4 (gl_FUNC_LSEEK): Use correct format for
94462         AC_LINK_IFELSE.
94464         include_next: silence autoconf 2.68 warning
94465         * m4/include_next.m4 (gl_INCLUDE_NEXT): Mark this use of
94466         AC_COMPILE_IFELSE as special.
94467         (AC_LANG_DEFINES_PROVIDED): Provide dummy implementation for
94468         autoconf < 2.68.
94470         acl: fix compilation test
94471         * m4/acl.m4 (gl_FUNC_ALL): Use correct format for
94472         AC_COMPILE_IFELSE.
94474 2010-08-26  Bruno Haible  <bruno@clisp.org>
94476         Modernize AC_TRY_RUN invocations.
94477         * m4/btowc.m4 (gl_FUNC_BTOWC): Use AC_RUN_IFELSE instead of AC_TRY_RUN.
94478         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Likewise.
94479         * m4/exponentd.m4 (gl_DOUBLE_EXPONENT_LOCATION): Likewise.
94480         * m4/exponentf.m4 (gl_FLOAT_EXPONENT_LOCATION): Likewise.
94481         * m4/exponentl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Likewise.
94482         * m4/fopen.m4 (gl_FUNC_FOPEN): Likewise.
94483         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Likewise.
94484         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Likewise.
94485         * m4/ftello.m4 (gl_FUNC_FTELLO): Likewise.
94486         * m4/iconv.m4 (AM_ICONV_LINK): Likewise.
94487         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN_UTF): Likewise.
94488         * m4/intdiv0.m4 (gt_INTDIV0): Likewise.
94489         * m4/isnanf.m4 (gl_ISNANF_WORKS): Likewise.
94490         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Likewise.
94491         * m4/ldexpl.m4 (gl_FUNC_LDEXPL_WORKS): Likewise.
94492         * m4/mbrlen.m4 (gl_MBRLEN_INCOMPLETE_STATE, gl_MBRLEN_RETVAL,
94493         gl_MBRLEN_NUL_RETVAL): Likewise.
94494         * m4/mbrtowc.m4 (gl_MBRTOWC_INCOMPLETE_STATE, gl_MBRTOWC_SANITYCHECK,
94495         gl_MBRTOWC_NULL_ARG, gl_MBRTOWC_RETVAL, gl_MBRTOWC_NUL_RETVAL):
94496         Likewise.
94497         * m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): Likewise.
94498         * m4/open.m4 (gl_FUNC_OPEN): Likewise.
94499         * m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_LONG_DOUBLE,
94500         gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE,
94501         gl_PRINTF_DIRECTIVE_A, gl_PRINTF_DIRECTIVE_F, gl_PRINTF_DIRECTIVE_N,
94502         gl_PRINTF_DIRECTIVE_LS, gl_PRINTF_POSITIONS, gl_PRINTF_FLAG_GROUPING,
94503         gl_PRINTF_FLAG_LEFTADJUST, gl_PRINTF_FLAG_ZERO, gl_PRINTF_PRECISION,
94504         gl_SNPRINTF_TRUNCATION_C99, gl_SNPRINTF_RETVAL_C99,
94505         gl_SNPRINTF_DIRECTIVE_N, gl_SNPRINTF_SIZE1, gl_VSNPRINTF_ZEROSIZE_C99):
94506         Likewise.
94507         * m4/printf-posix.m4 (gt_PRINTF_POSIX): Likewise.
94508         * m4/signbit.m4 (gl_SIGNBIT, gl_FLOATTYPE_SIGN_LOCATION): Likewise.
94509         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
94510         * m4/threadlib.m4 (gl_THREADLIB_BODY): Likewise.
94511         * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
94512         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Likewise.
94513         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise.
94514         * m4/wcsrtombs.m4 (gl_WCSRTOMBS_TERMINATION): Likewise.
94515         * m4/wctob.m4 (gl_FUNC_WCTOB): Likewise.
94516         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
94518 2010-08-26  Bruno Haible  <bruno@clisp.org>
94520         Modernize AC_TRY_LINK invocations.
94521         * m4/acosl.m4 (gl_FUNC_ACOSL): Use AC_LINK_IFELSE instead of
94522         AC_TRY_LINK.
94523         * m4/argp.m4 (gl_ARGP): Likewise.
94524         * m4/asinl.m4 (gl_FUNC_ASINL): Likewise.
94525         * m4/atanl.m4 (gl_FUNC_ATANL): Likewise.
94526         * m4/ceil.m4 (gl_FUNC_CEIL_LIBS): Likewise.
94527         * m4/ceilf.m4 (gl_FUNC_CEILF_LIBS): Likewise.
94528         * m4/ceill.m4 (gl_FUNC_CEILL_LIBS): Likewise.
94529         * m4/codeset.m4 (AM_LANGINFO_CODESET): Likewise.
94530         * m4/cosl.m4 (gl_FUNC_COSL): Likewise.
94531         * m4/expl.m4 (gl_FUNC_EXPL): Likewise.
94532         * m4/floor.m4 (gl_FUNC_FLOOR_LIBS): Likewise.
94533         * m4/floorf.m4 (gl_FUNC_FLOORF_LIBS): Likewise.
94534         * m4/floorl.m4 (gl_FUNC_FLOORL_LIBS): Likewise.
94535         * m4/frexp.m4 (gl_FUNC_FREXP, gl_CHECK_FREXP_NO_LIBM): Likewise.
94536         * m4/frexpl.m4 (gl_FUNC_FREXPL, gl_CHECK_FREXPL_NO_LIBM): Likewise.
94537         * m4/ftello.m4 (gl_FUNC_FTELLO): Likewise.
94538         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
94539         * m4/hostent.m4 (gl_HOSTENT): Likewise.
94540         * m4/iconv.m4 (AM_ICONV_LINK): Likewise.
94541         * m4/intl.m4 (gt_INTL_SUBDIR_CORE): Likewise.
94542         * m4/intlmacosx.m4 (gt_INTL_MACOSX): Likewise.
94543         * m4/isnand.m4 (gl_HAVE_ISNAND_IN_LIBM, gl_HAVE_ISNAND_NO_LIBM):
94544         Likewise.
94545         * m4/isnanf.m4 (gl_HAVE_ISNANF_NO_LIBM, gl_HAVE_ISNANF_IN_LIBM):
94546         Likewise.
94547         * m4/isnanl.m4 (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM):
94548         Likewise.
94549         * m4/lcmessage.m4 (gt_LC_MESSAGES): Likewise.
94550         * m4/ldexpl.m4 (gl_FUNC_LDEXPL, gl_CHECK_LDEXPL_NO_LIBM): Likewise.
94551         * m4/lib-link.m4 (AC_LIB_HAVE_LINKFLAGS): Likewise.
94552         * m4/logb.m4 (gl_FUNC_LOGB): Likewise.
94553         * m4/logl.m4 (gl_FUNC_LOGL): Likewise.
94554         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Likewise.
94555         * m4/servent.m4 (gl_SERVENT): Likewise.
94556         * m4/signbit.m4 (gl_SIGNBIT): Likewise.
94557         * m4/sinl.m4 (gl_FUNC_SINL): Likewise.
94558         * m4/sqrtl.m4 (gl_FUNC_SQRTL): Likewise.
94559         * m4/tanl.m4 (gl_FUNC_TANL): Likewise.
94560         * m4/threadlib.m4 (gl_THREADLIB_BODY): Likewise.
94561         * m4/trunc.m4 (gl_FUNC_TRUNC): Likewise.
94562         * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
94563         * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
94564         * modules/tsearch-tests (configure.ac): Likewise.
94566 2010-08-26  Bruno Haible  <bruno@clisp.org>
94568         Modernize AC_TRY_COMPILE invocations.
94569         * m4/environ.m4 (gt_CHECK_VAR_DECL): Use AC_COMPILE_IFELSE instead of
94570         AC_TRY_COMPILE.
94571         * m4/iconv.m4 (gl_iconv_AC_DEFUN): Likewise.
94572         * m4/intl.m4 (gt_CHECK_DECL): Likewise.
94573         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Likewise.
94574         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
94575         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Likewise.
94576         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
94577         * m4/locale_h.m4 (gl_LOCALE_H): Likewise.
94578         * m4/lock.m4 (gl_LOCK): Likewise.
94579         * m4/malloc.m4 (gl_CHECK_MALLOC_POSIX): Likewise.
94580         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
94581         * m4/minmax.m4 (gl_MINMAX_IN_HEADER): Likewise.
94582         * m4/setenv.m4 (gl_FUNC_UNSETENV): Likewise.
94583         * m4/size_max.m4 (gl_SIZE_MAX): Likewise.
94584         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Likewise.
94585         * m4/stdarg.m4 (gl_STDARG_H): Likewise.
94586         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Likewise.
94587         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Likewise.
94588         * m4/visibility.m4 (gl_VISIBILITY): Likewise.
94589         * m4/wchar_t.m4 (gt_TYPE_WCHAR_T): Likewise.
94590         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
94591         * m4/libunistring.m4 (gl_LIBUNISTRING_CORE): Likewise. Remove
94592         extraneous semicolon.
94594 2010-08-26  Jim Meyering  <meyering@redhat.com>
94596         stat-time: relax license LGPL
94597         * modules/stat-time (License): Change from GPL to LGPL,
94598         with consent from all contributors, for use in libguile.
94599         Requested by Ludovic Courtès.
94601 2010-08-26  Erik Faye-Lund  <kusmabite@gmail.com>
94603         poll: return immediately on POLLHUP.
94604         * lib/poll.c (poll): Always set timeout before wait_timeout is
94605         computed.
94607 2010-08-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
94609         Fix test-unlinkat, test-rmdir failure on AIX 5.3.
94610         * tests/test-rmdir.h (test_rmdir_func): Also accept EEXIST for
94611         rmdir ("dir/.//"), unlinkat.
94613 2010-08-24  Paul Eggert  <eggert@cs.ucla.edu>
94615         stdbool: avoid spurious failure with modern xlc
94616         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Resync with autoconf.
94618 2010-08-24  Bruno Haible  <bruno@clisp.org>
94620         getloadavg: simplify code
94621         * m4/getloadavg.m4 (gl_GETLOADAVG): Remove useless test of
94622         gl_have_func. Update comments.
94624 2010-08-24  Eric Blake  <eblake@redhat.com>
94626         getloadavg: don't define SVR4 on cygwin
94627         * m4/getloadavg.m4 (gl_GETLOADAVG): Sync with autoconf fix, to
94628         only define SVR4 when -lkvm is required.
94629         Reported by Yaakov Selkowitz.
94631 2010-08-24  Bruno Haible  <bruno@clisp.org>
94633         priv-set: fix comment
94634         * lib/priv-set.c (priv_set_restore): Fix typo in comment.
94636 2010-08-23  Paul Eggert  <eggert@cs.ucla.edu>
94638         priv-set: fix comments
94639         * lib/priv-set.c (priv_set_remove, priv_set_restore): Fix comments
94640         to match code, as suggested by David Bartley in:
94641         http://lists.gnu.org/r/bug-tar/2010-08/msg00018.html
94643 2010-08-23  Eric Blake  <eblake@redhat.com>
94645         stdbool: avoid rejecting clang
94646         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Resync with autoconf.
94647         * tests/test-stdbool.c: Enable more tests if using the system
94648         <stdbool.h> instead of the gnulib replacement.
94649         (main): Move xlc bug test to a runtime test for all compilers.
94650         Reported by Anders Kaseorg.
94652         argz: fix shell quoting issue
94653         * m4/argz.m4 (gl_FUNC_ARGZ): Allow for spaces in argument.
94654         Reported by Charles Wilson.
94656 2010-08-22  Paolo Bonzini  <bonzini@gnu.org>
94657             Erik Faye-Lund <kusmabite@gmail.com>
94659         poll, select: handle ERROR_BROKEN_PIPE.
94660         * lib/poll.c (win32_compute_revents): Return POLLHUP when
94661         PeekNamedPipe fails with ERROR_BROKEN_PIPE.
94662         * lib/select.c (win32_compute_revents): Do not mark a pipe
94663         as writeable if PeekNamedPipe fails with ERROR_BROKEN_PIPE.
94665 2010-08-22  Giuseppe Scrivano  <gscrivano@gnu.org>
94667         fts: allow compilation with C++
94668         * lib/fts_.h: Specify extern "C" linkage with C++.
94670 2010-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
94672         Fix gnulib-tool sed script de-commentation for AIX sed.
94673         * gnulib-tool (sed_comments): Try indented comments, for AIX 5.3
94674         sed.
94676 2010-08-17  Eric Blake  <eblake@redhat.com>
94678         test-stddef: test for (some) offsetof bugs
94679         * tests/test-stddef.c: Enhance test to ensure correct type of
94680         offsetof.
94681         * doc/posix-headers/stddef.texi (stddef.h): Document a Solaris bug
94682         that we are not fixing at this time.
94684 2010-08-15  Bruno Haible  <bruno@clisp.org>
94686         stpncpy: Allow stpncpy to be defined as a macro.
94687         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Don't attempt to redeclare stpncpy
94688         if it's already correctly declared.
94689         * lib/string.in.h (stpncpy): Undefine before redefining.
94690         Reported by Jeremy Huddleston <jeremyhu@macports.org>.
94692 2010-08-14  Bruno Haible  <bruno@clisp.org>
94694         Rename module 'memxfrm' to 'amemxfrm'.
94695         * lib/amemxfrm.h: Renamed from lib/memxfrm.h.
94696         (amemxfrm): Renamed from memxfrm.
94697         * lib/amemxfrm.c: Renamed from lib/memxfrm.h. Include amemxfrm.h.
94698         (amemxfrm): Renamed from memxfrm.
94699         * modules/amemxfrm: Renamed from modules/memxfrm. Update.
94700         * NEWS: Mention the change.
94701         * MODULES.html.sh (String handling <string.h>): Update.
94702         * lib/unicase/u-casexfrm.h: Invoke amemxfrm instead of memxfrm.
94703         * lib/unicase/u8-casexfrm.c: Include amemxfrm.h instead of memxfrm.h.
94704         * lib/unicase/u16-casexfrm.c: Likewise.
94705         * lib/unicase/u32-casexfrm.c: Likewise.
94706         * lib/uninorm/u-normxfrm.h: Invoke amemxfrm instead of memxfrm.
94707         * lib/uninorm/u8-normxfrm.c: Include amemxfrm.h instead of memxfrm.h.
94708         * lib/uninorm/u16-normxfrm.c: Likewise.
94709         * lib/uninorm/u32-normxfrm.c: Likewise.
94710         * modules/unicase/u8-casexfrm (Depends-on): Add amemxfrm, remove
94711         memxfrm.
94712         * modules/unicase/u16-casexfrm (Depends-on): Likewise.
94713         * modules/unicase/u32-casexfrm (Depends-on): Likewise.
94714         * modules/uninorm/u8-normxfrm (Depends-on): Likewise.
94715         * modules/uninorm/u16-normxfrm (Depends-on): Likewise.
94716         * modules/uninorm/u32-normxfrm (Depends-on): Likewise.
94717         Suggested by Paul Eggert.
94719 2010-08-14  Bruno Haible  <bruno@clisp.org>
94721         Tests for module 'astrxfrm'.
94722         * modules/astrxfrm-tests: New file.
94723         * tests/test-astrxfrm.c: New file.
94725         New module 'astrxfrm'.
94726         * lib/astrxfrm.h: New file.
94727         * lib/astrxfrm.c: New file, based on lib/memxfrm.c.
94728         * modules/astrxfrm: New file.
94730 2010-08-14  Reuben Thomas  <rrt@sc3d.org>
94732         regex: Tweak doc.
94733         * doc/regex.texi (Overview): Don't mention regex.c.
94734         (GNU Regular Expression Compiling): Likewise.
94735         (Match-end-of-line Operator): Mention 'not_eol'.
94737 2010-08-14  Brian Gough  <bjg@gnu.org>
94738             Bruno Haible  <bruno@clisp.org>
94740         git-merge-changelog: add doc relating to use with bzr and hg.
94741         * lib/git-merge-changelog.c: Add comments regarding bzr, hg, diff3.
94743 2010-08-14  Matthias Bolte  <matthias.bolte@googlemail.com>
94745         pthread: fix pthread.h creation for srcdir != builddir
94746         * modules/pthread (Makefile.am): Fix the rule to work also in a
94747         non-srcdir build.
94749 2010-08-13  Karl Berry  <karl@gnu.org>
94751         * doc/regex.texi (Predefined Syntaxes): @smallexample.
94752         * doc/posix-*/*: force line break before @url of POSIX
94753         specifications.
94754         Suggested by Werner Lemberg.
94756 2010-08-10  Paul Eggert  <eggert@cs.ucla.edu>
94758         strtod: fix const diagnostic
94759         * lib/strtod.c (strtod): Don't assign const char * to char *,
94760         as this elicits a warning from GCC when warnings are enabled.
94762 2010-08-10  Pádraig Brady  <P@draigbrady.com>
94763         and Eric Blake  <eblake@redhat.com>
94765         copy-acl: ignore ENOTSUP on HP-UX
94766         * lib/acl-internal.h (ACL_NOT_WELL_SUPPORTED): Move definition up,
94767         so that it is available for HP-UX.
94768         * lib/copy-acl.c (qcopy_acl): Use it.
94769         Reported by Patrick M. Callahan.
94771 2010-08-10  Eric Blake  <eblake@redhat.com>
94773         open, chown: relax license
94774         * modules/open (License): Change to LGPLv2+, with consent by all
94775         authors, for use in augeas.
94776         * modules/chown (License): Likewise.
94777         * modules/lchown (Likewise): Likewise.
94778         Requested by Adam Stokes.
94780 2010-08-09  Karl Berry  <karl@gnu.org>
94782         * build-aux/ar-lib: new file, import from Automake.
94783         * config/srclist.txt: autocheck for updates.
94785 2010-08-09  Eric Blake  <eblake@redhat.com>
94787         readlinkat: adjust client modules
94788         * modules/areadlinkat (Depends-on): Use readlinkat, not
94789         symlinkat.
94790         * modules/areadlinkat-with-size (Depends-on): Likewise.
94792         mknod: be more vocal about danger of running tests as root
94793         * m4/mknod.m4 (gl_FUNC_MKNOD): Make it harder to run configure as
94794         root, since that is just asking for problems.
94795         Suggested by Bruno Haible, based on a report by Rainer Tammer.
94797         readlinkat: split into its own module
94798         * modules/symlinkat: Split readlinkat...
94799         * modules/readlinkat: ...into separate module.
94800         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Move readlinkat check...
94801         * m4/readlinkat.m4 (gl_FUNC_READLINAT): ...to new file.
94802         * lib/symlinkat.c (readlinkat): Move...
94803         * lib/readlinkat.c: ...into new file.
94804         * modules/symlinkat-tests: Split readlinkat test...
94805         * modules/readlinkat-tests: ...into separate module.
94806         * tests/test-symlinkat.c: Split...
94807         * tests/test-readlinkat.c: ...into new file.
94808         * NEWS: Document the split.
94809         * doc/posix-functions/readlinkat.texi (readlinkat): Likewise.
94810         * lib/unistd.in.h (readlinkat): Likewise.
94811         Suggested by Bruno Haible.
94813 2010-08-08  Bruno Haible  <bruno@clisp.org>
94815         memxfrm: Speed up.
94816         * lib/memxfrm.c (memxfrm): Allocate enough memory ahead of time, so
94817         that usually only one call to strxfrm is necessary for each string
94818         part.
94819         Reported by Paul Eggert <eggert@cs.ucla.edu>.
94821 2010-08-07  Karl Berry  <karl@gnu.org>
94823         * doc/posix-headers/limits.texi,
94824         * doc/posix-functions/malloc.texi,
94825         * doc/posix-functions/strsignal.texi: missing @item.
94826         * doc/ld-version-script.texi: spurious leading i.
94827         * doc/regex.texi (Interval Operators): no commas inside @var.
94829 2010-08-01  Bruno Haible  <bruno@clisp.org>
94831         Integrate the regex documentation.
94832         * doc/gnulib.texi: Define 'cn' index.
94833         (Regular expressions): New a chapter that includes regex.texi and
94834         regexprops-generic.texi.
94835         * doc/regex.texi: Remove boilerplate stuff. Use simplified @node
94836         syntax.
94838         Whitespace cleanup.
94839         * doc/regex.texi: Remove trailing spaces.
94841         Add regex documentation.
94842         * doc/regex.texi: New file. Taken from regex-0.12/doc/regex.texi in
94843         http://ftp.gnu.org/old-gnu/regex/regex-0.12.tar.gz.
94844         Written by Kathy A. Hargreaves and Karl Berry.
94846 2010-08-01  Bruno Haible  <bruno@clisp.org>
94848         link: Update documentation.
94849         * doc/posix-functions/link.texi: Update regarding Solaris.
94851 2010-07-31  Bruno Haible  <bruno@clisp.org>
94853         Update modules list.
94854         * MODULES.html.sh (Sorting functions <stdlib.h>): Add array-mergesort.
94855         (String handling <string.h>): Add memcmp2, memxfrm.
94856         (Container data structures): Add xlist, xsublist, xoset.
94857         (Core language properties): Add alignof, unused-parameter.
94858         (Process control, Numeric conversion functions <stdlib.h>): Renamed
94859         from Numeric conversion functions <stdlib.h>. Add _Exit, atoll.
94860         (Unibyte characters <ctype.h>): New section.
94861         (String handling <string.h>): New section.
94862         (Mathematics <math.h>): Add acos, acosl, asin, asinl, atan, atan2,
94863         atanl, cbrt, copysign, cos, cosh, cosl, erf, erfc, exp, expl, fabs,
94864         fmod, hypot, j0, j1, jn, ldexp, lgamma, log, log10, log1p, logb, logl,
94865         modf, nextafter, pow, remainder, rint, sin, sinh, sinl, sqrt, sqrtl,
94866         tan, tanh, tanl, y0, y1, yn.
94867         (Support for systems lacking POSIX:2008): Add alphasort, dirent,
94868         dprintf, dprintf-posix, duplocale, fcntl, getlogin, getopt-posix,
94869         grantpt, iconv-h, ioctl, isblank, langinfo, nl_langinfo, pread,
94870         ptsname, pwrite, scandir, servent, sys_utsname, ttyname_r, uname,
94871         unlockpt, vdprintf, vdprintf-posix.
94872         (Enhancements for POSIX:2008 functions): Add getopt-gnu. Remove getopt.
94873         (File system functions): Add concat-filename, sys_file, sys_ioctl,
94874         xconcat-filename.
94875         (File descriptor based Input/Output): Add dup3, fd-safer-flag,
94876         getdtablesize, pipe2, pipe2-safer.
94877         (Security): New section.
94878         (Networking functions): Add accept4.
94879         (Signal handling): Add sigpipe.
94880         (Internationalization functions): Add xstriconveh, mbmemcasecmp,
94881         mbmemcasecoll.
94882         (Unicode string functions): Add libunistring-optional, unistr/u*-cmp2,
94883         unistr/u*-strcoll, uniwbrk/*, uninorm/*, unicase/*.
94884         (Executing programs): Add findprog-lgpl, pipe-filter-gi,
94885         pipe-filter-ii.
94886         (Misc): Add argp-version-etc, login_tty, parse-duration.
94888 2010-07-31  Bruno Haible  <bruno@clisp.org>
94890         Improve doc in MODULES.html.
94891         * modules/linkat (Description): Add the word "function".
94892         * modules/mkfifo (Description): Likewise.
94893         * modules/mknod (Description): Likewise.
94894         * modules/remove (Description): Likewise.
94895         * modules/renameat (Description): Likewise.
94896         * modules/stat (Description): Likewise.
94897         * modules/symlink (Description): Likewise.
94898         * modules/unlink (Description): Likewise.
94900 2010-07-31  Bruno Haible  <bruno@clisp.org>
94902         ansi-c++-opt: Provide option --enable-c++/--disable-c++ when possible.
94903         * m4/ansi-c++.m4 (gl_CXX_CHOICE): In Autoconf 2.66 or newer, provide
94904         option --enable/disable-c++ instead of --enable/disable-cxx.
94905         * NEWS: Mention the change.
94907 2010-07-31  Bruno Haible  <bruno@clisp.org>
94909         readlink, areadlink: Relax test a bit.
94910         * tests/test-readlink.h (test_readlink): Accept EINVAL as an
94911         alternative to ENOTDIR.
94912         * tests/test-areadlink.h (test_areadlink): Likewise.
94913         Reported by Rainer Tammer.
94915 2010-07-31  Bruno Haible  <bruno@clisp.org>
94917         unistr/u8-strstr, unistr/u16-strstr: Optimize the one-character case.
94918         * lib/unistr/u-strstr.h (FUNC): When the needle contains only one
94919         character, perform the search using U_STRCHR.
94920         * lib/unistr/u8-strstr.c (U_STRMBTOUC): New macro.
94921         * lib/unistr/u16-strstr.c (U_STRMBTOUC): Likewise.
94922         * modules/unistr/u8-strstr (Depends-on): Add unistr/u8-strmbtouc.
94923         * modules/unistr/u16-strstr (Depends-on): Add unistr/u16-strmbtouc.
94924         Suggested by Paolo Bonzini.
94926 2010-07-31  Bruno Haible  <bruno@clisp.org>
94928         unistr/u*-strstr: Fix dependencies.
94929         * modules/unistr/u8-strstr (Depends-on): Add unistr/u8-strchr.
94930         * modules/unistr/u16-strstr (Depends-on): Add unistr/u16-strchr.
94931         * modules/unistr/u32-strstr (Depends-on): Add unistr/u32-strchr.
94933 2010-07-31  Bruno Haible  <bruno@clisp.org>
94935         unistr/u8-chr, unistr/u8-strchr: Optimize and add comments.
94936         * lib/unistr/u8-chr.c (u8_chr): Add comments. Remove a useless test at
94937         the beginning of the loop.
94938         * lib/unistr/u8-strchr.c (u8_strchr): Add comments. Don't fall through
94939         cases in 'switch' statement.
94941         unistr/u8-strchr: Fix several bugs.
94942         * lib/unistr/u8-strchr.c (u8_strchr): Don't search beyond the end of
94943         the string. When not found, return NULL, not a pointer near the end.
94945         More tests for unistr/u8-strchr.
94946         * tests/unistr/test-strchr.h (test_strchr): Renamed from main. Check
94947         that the function does not read past the first occurrence of the byte
94948         being searched.
94949         * tests/unistr/test-u8-strchr.c (main): New function, with more tests.
94950         * tests/unistr/test-u16-strchr.c (main): New function.
94951         * tests/unistr/test-u32-strchr.c (main): New function.
94953 2010-07-31  Bruno Haible  <bruno@clisp.org>
94955         posix-modules: Ignore backup files of documentation files.
94956         * posix-modules: grep only through files named *.texi.
94958 2010-07-31  Bruno Haible  <bruno@clisp.org>
94960         symlinkat: Fix documentation.
94961         * doc/posix-functions/readlinkat.texi: Fix module name.
94963 2010-07-31  Bruno Haible  <bruno@clisp.org>
94965         fchownat: Replace also when chown has the trailing slash bug.
94966         * m4/openat.m4 (gl_FUNC_FCHOWNAT): Move the test of REPLACE_CHOWN
94967         outside the gl_FUNC_FCHOWNAT_DEREF_BUG invocation. Fixes regression
94968         introduced on 2010-04-10.
94969         Reported by Rainer Tammer.
94971 2010-07-31  Bruno Haible  <bruno@clisp.org>
94973         linkat: Work around AIX 7.1 bug.
94974         * m4/linkat.m4 (gl_FUNC_LINKAT): Require AC_CANONICAL_HOST. Test
94975         whether linkat handles trailing slash correctly. If not, replace linkat
94976         and define LINKAT_TRAILING_SLASH_BUG.
94977         * lib/linkat.c (rpl_linkat): If LINKAT_TRAILING_SLASH_BUG is defined,
94978         check whether (fd1,file1) points to a directory if file1 or file2 ends
94979         in a slash. Code taken from lib/link.c.
94980         * doc/posix-functions/linkat.texi: Mention trailing slash bug.
94981         Reported by Rainer Tammer.
94983 2010-07-31  Bruno Haible  <bruno@clisp.org>
94985         Correctly determine whether pow is available in libc on AIX 7 with xlc.
94986         * m4/mathfunc.m4 (gl_MATHFUNC): Actually use the 'funcptr' variable.
94987         This disables an xlc optimization that was causing wrong test results.
94988         Reported by Rainer Tammer.
94990 2010-07-31  Bruno Haible  <bruno@clisp.org>
94992         iconv: Work around AIX 6.1..7.1 bug.
94993         * doc/posix-functions/iconv.texi: Mention AIX 6.1, 7.1 bug.
94994         * m4/iconv.m4 (AM_ICONV_LINK): Test against AIX 6.1, 7.1 bug. When
94995         cross-compiling, guess no on all versions of AIX.
94996         Reported by Rainer Tammer.
94998 2010-07-31  Bruno Haible  <bruno@clisp.org>
95000         readlink: Relax test a bit.
95001         * tests/test-readlink.h (test_readlink): Allow different errno value
95002         when readlink is called with a file name that ends in / and refers to
95003         a file.
95004         Suggested by Eric Blake.
95005         Reported by Rainer Tammer.
95007 2010-07-31  Bruno Haible  <bruno@clisp.org>
95009         copysign: Does not require -lm on glibc systems.
95010         * modules/copysign (configure.ac): Use gl_MATHFUNC, not
95011         gl_COMMON_DOUBLE_MATHFUNC.
95012         * m4/mathfunc.m4 (gl_COMMON_DOUBLE_MATHFUNC): Update comments.
95014 2010-07-31  Bruno Haible  <bruno@clisp.org>
95016         duplocale: Work around AIX 7.1 bug.
95017         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Let the test fail also when
95018         duplocale(LC_GLOBAL_LOCALE) returns (locale_t)0.
95019         * lib/duplocale.c (rpl_duplocale): Update comment.
95020         * doc/posix-functions/duplocale.texi: Mention the AIX 7.1 bug.
95021         Reported by Rainer Tammer.
95023 2010-07-30  Bruno Haible  <bruno@clisp.org>
95025         dirfd: Avoid link error on AIX 7.1.
95026         * lib/dirent.in.h (dirfd): Use modern idiom with REPLACE_DIRFD.
95027         * m4/dirfd.m4 (gl_FUNC_DIRFD): If the function is declared but does not
95028         exist, set REPLACE_DIRFD.
95029         * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): Initialize REPLACE_DIRFD.
95030         * modules/dirent (Makefile.am): Substitute REPLACE_DIRFD.
95031         * doc/posix-functions/dirfd.texi: Update.
95032         Reported by Rainer Tammer.
95034 2010-07-30  Eric Blake  <eblake@redhat.com>
95036         strtod: next round of AIX fixes
95037         * lib/strtod.c (strtod): Work around AIX bug of parsing p with no
95038         exponent.
95039         * tests/test-strtod.c (main): Enhance tests.
95040         * doc/posix-functions/strtod.texi (strtod): Document next bug.
95041         Reported by Rainer Tammer.
95043         futimens: fix configure check
95044         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Use correct logic.
95045         Reported by Bruno Haible.
95047 2010-07-30  Bruno Haible  <bruno@clisp.org>
95049         getline: Update regarding AIX.
95050         * doc/posix-functions/getline.texi: Mention bug on AIX 7.1.
95051         Reported by Rainer Tammer.
95053 2010-07-30  Bruno Haible  <bruno@clisp.org>
95055         wcwidth: Drop replacement on AIX 7.
95056         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): When cross-compiling, guess yes on
95057         AIX 7.
95058         Reported by Rainer Tammer.
95060 2010-07-30  Bruno Haible  <bruno@clisp.org>
95062         strtok_r: Avoid triggering bug in AIX 7.1 xlc compiler.
95063         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Don't cast an invalid address to
95064         a 'char *'.
95065         Reported by Rainer Tammer.
95067 2010-07-30  Bruno Haible  <bruno@clisp.org>
95069         unlink: Update regarding AIX.
95070         * doc/posix-functions/unlink.texi: Mention bug on AIX 7.1.
95071         * m4/unlink.m4 (gl_FUNC_UNLINK): Update comment.
95072         Reported by Rainer Tammer.
95074 2010-07-30  Bruno Haible  <bruno@clisp.org>
95076         symlink: Update regarding AIX.
95077         * doc/posix-functions/symlink.texi: Mention bug on AIX 7.1.
95078         * m4/symlink.m4 (gl_FUNC_SYMLINK): Update comment.
95079         Reported by Rainer Tammer.
95081 2010-07-30  Bruno Haible  <bruno@clisp.org>
95083         strndup: Update regarding AIX.
95084         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, guess yes on
95085         AIX 7.
95086         Reported by Rainer Tammer.
95088 2010-07-30  Bruno Haible  <bruno@clisp.org>
95090         stat: Update regarding AIX.
95091         * doc/posix-functions/stat.texi: Mention bug on AIX 7.1.
95092         * m4/stat.m4 (gl_FUNC_STAT): Update comment.
95093         Reported by Rainer Tammer.
95095 2010-07-30  Bruno Haible  <bruno@clisp.org>
95097         truncl: Fix autoconf test.
95098         * m4/truncl.m4 (gl_FUNC_TRUNCL): Add TRUNCL_LIBM to LIBS while testing
95099         whether truncl works.
95100         Reported by Rainer Tammer.
95102 2010-07-30  Bruno Haible  <bruno@clisp.org>
95104         round: Update regarding AIX.
95105         * m4/round.m4 (gl_FUNC_ROUND): When cross-compiling, guess no on AIX 7.
95106         * doc/posix-functions/round.texi: Mention bug on AIX 7.1.
95107         Reported by Rainer Tammer.
95109 2010-07-30  Bruno Haible  <bruno@clisp.org>
95111         rename: Update regarding AIX.
95112         * doc/posix-functions/rename.texi: Mention bug on AIX 7.1.
95113         * m4/rename.m4 (gl_FUNC_RENAME): Update comment.
95114         Reported by Rainer Tammer.
95116 2010-07-30  Bruno Haible  <bruno@clisp.org>
95118         printf.m4: Update regarding AIX.
95119         * m4/printf.m4: Update comments regarding AIX.
95120         Reported by Rainer Tammer.
95122 2010-07-30  Bruno Haible  <bruno@clisp.org>
95124         iconv: Update regarding AIX.
95125         * m4/iconv.m4 (AM_ICONV_LINK): When cross-compiling, guess yes on
95126         AIX 7.
95127         Reported by Rainer Tammer.
95129 2010-07-30  Bruno Haible  <bruno@clisp.org>
95131         getopt: Update regarding AIX.
95132         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): When cross-compiling, guess
95133         no on AIX.
95134         * doc/posix-functions/getopt.texi: Mention that AIX has the optind bug.
95135         Reported by Rainer Tammer.
95137 2010-07-30  Bruno Haible  <bruno@clisp.org>
95139         ldexpl; Update regarding AIX.
95140         * m4/ldexpl.m4 (gl_FUNC_LDEXPL_WORKS): When cross-compiling, guess yes
95141         on AIX 7.
95142         Reported by Rainer Tammer.
95144 2010-07-30  Bruno Haible  <bruno@clisp.org>
95146         frexpl: Update regarding AIX.
95147         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): When cross-compiling, guess yes
95148         on AIX 7.
95149         Reported by Rainer Tammer.
95151 2010-07-30  Bruno Haible  <bruno@clisp.org>
95153         open, fopen: Update regarding AIX.
95154         * m4/open.m4 (gl_FUNC_OPEN): Adjust cross-compiling guess for AIX.
95155         * m4/fopen.m4 (gl_FUNC_FOPEN): Likewise.
95156         * doc/posix-functions/open.texi: Mention the trailing-slash bug on AIX.
95157         * doc/posix-functions/fopen.texi: Likewise.
95158         Reported by Rainer Tammer.
95160 2010-07-30  Bruno Haible  <bruno@clisp.org>
95162         chown: Update doc regarding AIX.
95163         * doc/posix-functions/chown.texi: Mention bug on AIX 7.1.
95164         * m4/chown.m4 (gl_FUNC_CHOWN): Update comment.
95165         Reported by Rainer Tammer.
95167 2010-07-30  Eric Blake  <eblake@redhat.com>
95169         strtod: fix bug in replacement function on AIX
95170         * lib/strtod.c (strtod): Special case broken "0x" parse in
95171         underlying strtod.
95172         * tests/test-strtod.c (main): Document AIX 7.1 bugs.
95173         * doc/posix-functions/strtod.texi (strtod): Likewise.
95174         Reported by Rainer Tammer.
95176 2010-07-30  Bruno Haible  <bruno@clisp.org>
95178         mbrlen: Fix cross-compilation guess for AIX.
95179         * m4/mbrlen.m4 (gl_MBRLEN_INCOMPLETE_STATE): Fix cross-compilation
95180         guess. Leftover from 2008-12-22.
95182 2010-07-30  Bruno Haible  <bruno@clisp.org>
95184         mbrtowc: Fix cross-compilation guess for AIX.
95185         * m4/mbrtowc.m4 (gl_MBRTOWC_INCOMPLETE_STATE): Fix cross-compilation
95186         guess. Leftover from 2008-12-21.
95188 2010-07-29  Peter O'Gorman  <pogma@thewrittenword.com>  (tiny change)
95190         init.sh: work around trap limitation of some shells
95191         * tests/init.sh (setup_): Move exit trap outside of shell function.
95193 2010-07-29  Eric Blake  <eblake@redhat.com>
95195         strtod: aid debugging
95196         * m4/strtod.m4(gl_FUNC_STRTOD): Use distinct exit status to aid
95197         understanding why strtod is rejected.
95199 2010-07-28  Bruno Haible  <bruno@clisp.org>
95201         unistr/u*-chr, unistr/u*-strchr: Fix link errors and warnings.
95202         * lib/unistr/u8-chr.c: Include <string.h>.
95203         * tests/unistr/test-u8-chr.c: Likewise.
95204         * tests/unistr/test-u16-chr.c: Likewise.
95205         * tests/unistr/test-u32-chr.c: Likewise.
95206         * tests/unistr/test-u8-strchr.c: Likewise.
95207         * tests/unistr/test-u16-strchr.c: Likewise.
95208         * tests/unistr/test-u32-strchr.c: Likewise.
95209         * modules/unistr/u8-chr-tests (Depends-on): Add unistr/u32-set.
95210         * modules/unistr/u16-chr-tests (Depends-on): Likewise.
95211         * modules/unistr/u8-strchr-tests (Depends-on): Likewise.
95212         * modules/unistr/u16-strchr-tests (Depends-on): Likewise.
95214 2010-07-28  Bruno Haible  <bruno@clisp.org>
95216         Use spaces for indentation, not tabs.
95217         * lib/**/*.[hcy] except lib/reg*.[hc]: Untabify.
95219 2010-07-27  Bruno Haible  <bruno@clisp.org>
95221         mbspcasecmp: Fix function specification.
95222         * lib/string.in.h (mbspcasecmp): Fix specification comment.
95223         * lib/mbspcasecmp.c (mbspcasecmp): Likewise.
95224         Reported by Eric Blake <eblake@redhat.com>.
95226 2010-07-26  Paul R. Eggert  <eggert@cs.ucla.edu>
95228         timespec: use cast and not conditional, as truncation isn't possible
95229         * lib/timespec.h (timespec_cmp): Use cast to pacify gcc -Wconversion
95230         instead of a conditional.  Comment about the situation in more detail.
95231         This undoes most of the 2009-10-29 patch.
95233 2010-07-23  Paolo Bonzini  <pbonzini@redhat.com>
95235         unistr/u8-chr, unistr/u8-strchr: use Boyer-Moore like algorithm.
95236         * lib/unistr/u8-chr.c: Add Boyer-Moore like operation.
95237         * lib/unistr/u8-strchr.c: Likewise.
95238         * modules/unistr/u8-chr: Depend on memchr.
95240         unistr/u*-strchr: add tests
95241         * modules/unistr/u8-strchr-tests: New file.
95242         * modules/unistr/u16-strchr-tests: New file.
95243         * modules/unistr/u32-strchr-tests: New file.
95244         * tests/unistr/test-strchr.h: New file.
95245         * tests/unistr/test-u8-strchr.c: New file.
95246         * tests/unistr/test-u16-strchr.c: New file.
95247         * tests/unistr/test-u32-strchr.c: New file.
95249         unistr/u*-chr: test multibyte sequences more
95250         * tests/unistr/test-chr.h: Do complete testing of the characters in the
95251         test vector.
95252         * tests/unistr/test-u8-chr.c (U_UCTOMB): Define.
95253         * tests/unistr/test-u16-chr.c (U_UCTOMB): Likewise.
95254         * tests/unistr/test-u32-chr.c (U_UCTOMB): Likewise.
95256         unistr/u*-chr: test multibyte sequences
95257         * tests/unistr/test-chr.h: Put characters above 0-127 in the test input.
95259         unistr/u*-chr: prepare for multibyte tests
95260         * modules/unistr/u8-chr-tests: Depend on u32-to-u8.
95261         * modules/unistr/u16-chr-tests: Depend on u32-to-u16.
95262         * tests/unistr/test-chr.h: Build initial version as UCS-4 then convert.
95263         * tests/unistr/test-u8-chr.c (U32_TO_U): Define.
95264         * tests/unistr/test-u16-chr.c (U32_TO_U): Likewise.
95265         * tests/unistr/test-u32-chr.c (U32_TO_U): Likewise.
95267 2010-07-18  Bruno Haible  <bruno@clisp.org>
95269         unistr/u8-strchr: Optimize non-ASCII argument case.
95270         * lib/unistr/u8-strchr.c (u8_strchr): Compare the last byte first,
95271         because the first byte often matches anyway.
95272         Reported by Pádraig Brady <P@draigbrady.com>.
95274 2010-07-15  Karl Berry  <karl@gnu.org>
95276         * config/srclist.txt (fdl.texi): only one copy, from gnustandards.
95278 2010-07-14  Paul R. Eggert  <eggert@cs.ucla.edu>
95280         getcwd: on Solaris, work better if ancestors are inaccessible
95281         * lib/getcwd.c (__getcwd): If getcwd returns EINVAL for zero
95282         buffer and size, try again with a large buffer.  This works better
95283         on Solaris, since its getcwd succeeds even if the path to the root
95284         is inaccessible, and this is helpful in common cases such as .zfs
95285         hidden directories.  Problem reported by J Chapman Flack in
95286         http://lists.gnu.org/r/bug-tar/2010-06/msg00000.html
95287         Use system getcwd if it's declared, not merely if it's partly
95288         working; use the partly-working test only to avoid needless effort
95289         if the system getcwd fails.
95290         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Omit
95291         comment that was already obsolete and is now even more obsolete.
95292         * modules/getcwd (Depends-on): Depend on strdup, since __getcwd
95293         now might call strdup.
95295 2010-07-13  Paul R. Eggert  <eggert@cs.ucla.edu>
95297         pthread: Add enough so that coreutils/src/sort.c compiles.
95298         * lib/pthread.in.h: Add self to author comment.  Conditionalize on
95299         _GL_PTHREAD_H, not PTHREAD_H_, for consistency with the rest of
95300         gnulib. Include <sched.h> and <time.h>, as per POSIX.
95301         Include <sys/types.h>, in case it defines pthread_t.
95302         (pthread_t, pthread_attr_t, pthread_barrier_t, pthread_barrierattr_t):
95303         (pthread_cond_t, pthread_condattr_t, pthread_key_t, pthread_mutex_t):
95304         (pthread_mutexattr_t, pthread_once_t, pthread_rwlock_t):
95305         (pthread_rwlockattr_t, pthread_spinlock_t):
95306         New typedefs, if HAVE_PTHREAD_T is not defined.
95307         (PTHREAD_COND_INITIALIZER, PTHREAD_MUTEX_INITIALIZER):
95308         (PTHREAD_ONCE_INIT, PTHREAD_RWLOCK_INITIALIZER):
95309         (PTHREAD_BARRIER_SERIAL_THREAD, PTHREAD_CANCEL_DEFERRED):
95310         (PTHREAD_CANCEL_ASYNCHRONOUS, PTHREAD_CANCEL_ENABLE):
95311         (PTHREAD_CANCEL_DISABLE, PTHREAD_CANCELED, PTHREAD_CREATE_JOINABLE):
95312         (PTHREAD_CREATE_DETACHED, PTHREAD_INHERIT_SCHED):
95313         (PTHREAD_EXPLICIT_SCHED, PTHREAD_MUTEX_DEFAULT, PTHREAD_MUTEX_NORMAL):
95314         (PTHREAD_MUTEX_ERRORCHECK, PTHREAD_MUTEX_RECURSIVE):
95315         (PTHREAD_MUTEX_STALLED, PTHREAD_MUTEX_ROBUST, PTHREAD_PRIO_NONE):
95316         (PTHREAD_PRIO_INHERIT, PTHREAD_PRIO_PROTECT, PTHREAD_PROCESS_PRIVATE):
95317         (PTHREAD_PROCESS_SHARED, PTHREAD_SCOPE_SYSTEM, PTHREAD_SCOPE_PROCESS):
95318         New macros.
95319         (pthread_cond_destroy, pthread_cond_init, pthread_cond_signal):
95320         (pthread_cond_wait, pthread_exit, pthread_mutex_destroy):
95321         (pthread_mutex_init, pthread_mutex_lock, pthread_mutex_unlock):
95322         (pthread_spin_init, pthread_spin_lock, pthread_spin_trylock);
95323         (pthread_spin_unlock): New dummy functions.
95324         (pthread_create): Return EAGAIN; don't set errno.
95325         * m4/pthread.m4 (gl_PTHREAD_CHECK): Check for pthread_t, and
95326         require AC_C_INLINE.
95327         * modules/pthread (Depends-on): Add sched, time.
95328         (pthread.h): Use AM_V_GEN.
95330 2010-07-13  Bruno Haible  <bruno@clisp.org>
95332         striconveh: Don't malloc memory if the result buffer is sufficient.
95333         * lib/striconveh.c (mem_cd_iconveh_internal): Use the provided result
95334         buffer if its size is sufficient.
95335         Reported by Ludovic Courtès <ludo@gnu.org>.
95337 2010-07-13  Bruno Haible  <bruno@clisp.org>
95339         strtod: Add safety check.
95340         * lib/strtod.c (ldexp): Abort if this dummy replacement gets called.
95342 2010-07-12  Bruno Haible  <bruno@clisp.org>
95344         Unify tests that set gl_cv_func_ldexpl_no_libm.
95345         * m4/ldexpl.m4 (gl_CHECK_LDEXPL_NO_LIBM): New macro, extracted from
95346         gl_FUNC_LDEXPL.
95347         (gl_FUNC_LDEXPL): Invoke it.
95348         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Likewise.
95350 2010-07-12  Bruno Haible  <bruno@clisp.org>
95352         Unify tests that set gl_cv_func_ldexp_no_libm.
95353         * m4/ldexp.m4: New file, based on m4/mathfunc.m4.
95354         * m4/strtod.m4 (gl_PREREQ_STRTOD): Require gl_CHECK_LDEXP_NO_LIBM.
95355         * modules/ldexp (Files): Remove m4/mathfunc.m4. Add m4/ldexp.m4.
95356         (configure.ac): Simply invoke gl_FUNC_LDEXP.
95357         * modules/strtod (Files): Add m4/ldexp.m4.
95359 2010-07-12  Bruno Haible  <bruno@clisp.org>
95361         Unify tests that set gl_cv_func_frexpl_no_libm.
95362         * m4/frexpl.m4 (gl_CHECK_FREXPL_NO_LIBM): New macro, extracted from
95363         gl_FUNC_FREXPL_NO_LIBM.
95364         (gl_FUNC_FREXPL, gl_FUNC_FREXPL_NO_LIBM): Invoke it.
95365         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Likewise.
95367 2010-07-12  Bruno Haible  <bruno@clisp.org>
95369         Unify tests that set gl_cv_func_frexp_no_libm.
95370         * m4/frexp.m4 (gl_CHECK_FREXP_NO_LIBM): New macro, extracted from
95371         gl_FUNC_FREXP_NO_LIBM.
95372         (gl_FUNC_FREXP, gl_FUNC_FREXP_NO_LIBM): Require it.
95373         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Likewise.
95375 2010-07-12  Paul R. Eggert  <eggert@cs.ucla.edu>
95377         memcoll: clarify sizes versus lengths, document better, and tweak perf
95378         * lib/memcoll.c (strcoll_loop, memcoll0):
95379         Improve quality of descriptive comments.  Name variables
95380         consistently as to whether they are lengths (which do not include
95381         terminating null) versus sizes (which do).
95382         * lib/xmemcoll.c (xmemcoll0): Likewise.
95383         * lib/memcoll.c (strcoll_loop): Tweak the way that the diff is
95384         returned when s1size == 0; this is easier to compile and saves
95385         about 17% of memcoll's code space on x86-64 with GCC 4.1.2.
95387 2010-07-12  Bruno Haible  <bruno@clisp.org>
95389         Tests for module '_Exit'.
95390         * modules/_Exit-tests: New file.
95391         * tests/test-_Exit.sh: New file.
95392         * tests/test-_Exit.c: New file.
95394         New module '_Exit'.
95395         * lib/stdlib.in.h (__attribute__): New macro.
95396         (_Exit): New declaration.
95397         * lib/_Exit.c: New file.
95398         * m4/_Exit.m4: New file.
95399         * m4/stdlib_h.m4 (gl_STDLIB_H): Check whether _Exit is declared.
95400         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB__EXIT and HAVE__EXIT.
95401         * modules/stdlib (Makefile.am): Substitute GNULIB__EXIT and HAVE__EXIT.
95402         * modules/_Exit: New file.
95403         * tests/test-stdlib-c++.cc (_Exit): Check signature.
95404         * doc/posix-functions/_Exit_C99.texi: Mention the new module.
95406 2010-07-12  Paul R. Eggert  <eggert@cs.ucla.edu>
95408         strtod: make it more-accurate typically, and don't require libm
95409         * lib/strtod.c (_GL_ARG_NONNULL): Remove; no longer needed.
95410         Include limits.h.  Don't include string.h.
95411         (HAVE_LDEXP_IN_LIBC, HAVE_RAW_DECL_STRTOD): Define to 0 if not defined.
95412         (locale_isspace): New function, so that no casts are needed to
95413         check whether *s is a space.
95414         (ldexp): Provide an unused dummy if not available.
95415         (scale_radix_exp, parse_number, underlying_strtod): New functions.
95416         (strtod): Use them.  This implementation prefers to use the
95417         underlying strtod if available, falling back on our own code
95418         only to fix known bugs.  This is more likely to produce an
95419         accurate result.  Also, it avoids the use of libm functions.
95420         * m4/strtod.m4 (gl_FUNC_STRTOD): Don't invoke _AC_LIBOBJ_STRTOD;
95421         no longer needed.  Invoke AC_LIBOBJ([strtod]); don't know why this
95422         was absent, but it caused a test failure with coreutils.
95423         (gl_PREREQ_STRTOD): Check wither ldexp can be used without linking
95424         with libm.
95425         * modules/strtod (Makefile.am, Link): libm is no longer needed.
95426         * modules/strtod-tests (Makefile.am): Likewise.
95428 2010-07-11  Pádraig Brady  <P@draigBrady.com>
95429             Bruno Haible  <bruno@clisp.org>
95431         unistr/u8-strchr: Optimize ASCII argument case.
95432         * lib/unistr/u8-strchr.c (u8_strchr): For ASCII arguments, use strchr.
95434 2010-07-08  Paul Eggert  <eggert@cs.ucla.edu>
95436         (x)memcoll: minor tweaks
95437         * lib/memcoll.c (strcoll_loop): Prefer the style where 'const'
95438         is after the type that it qualifies.
95439         (memcoll0): Likewise.
95440         * lib/memcoll.h (memcoll0): Likewise.
95441         * lib/xmemcoll.c (collate_error, xmemcoll0): Likewise.
95442         * lib/xmemcoll.h (xmemcoll0): Likewise.
95443         * lib/memcoll.c (memcoll0): Correct the comment.  This function
95444         differs from memcoll in that the NUL byte is part of the argument.
95445         Omit the abort-checks, as performance is a real issue here.  Plus,
95446         the checks were wrong anyway (an off-by-one error).  Omit local
95447         variable 'diff', as it's a bit clearer that way.
95448         * m4/memcoll.m4 (gl_MEMCOLL): Omit AC_FUNC_STRCOLL, as it's
95449         no longer needed.
95451 2010-07-08  Chen Guo  <chenguo4@yahoo.com>
95453         (x)memcoll: speedup when input is known to be NUL delimited
95454         * lib/memcoll.c: Include stdlib.
95455         (memcoll0): New function.
95456         (strcoll_loop): New function, refactored for use in both memcoll
95457         and memcoll0.
95458         * lib/memcoll.h (memcoll0): Add prototype.
95459         * lib/xmemcoll.c (xmemcoll0): New function.
95460         (collate_error): New function, refactored for use in both xmemcoll
95461         and xmemcoll0.
95462         * lib/xmemcoll.h (xmemcoll0): Add prototype.
95463         * m4/memcoll.m4: add inline invocation.
95465 2010-07-06  Pádraig Brady  <P@draigBrady.com>
95467         * build-aux/bootstrap: Remove any local translations
95468         from the translation project synchronization directory,
95469         so that local only translations are not distributed.
95471 2010-07-04  Bruno Haible  <bruno@clisp.org>
95473         fsusage: Clarify which code applies to which platforms.
95474         * m4/fsusage.m4 (gl_FSUSAGE): Clarify which test succeeds on which
95475         platform.
95476         * lib/fsusage.c (get_fs_usage): Likewise.
95478 2010-07-04  Bruno Haible  <bruno@clisp.org>
95480         havelib: Fix bug when AC_LIB_FROMPACKAGE is used more than twice.
95481         * m4/lib-link.m4 (AC_LIB_FROMPACKAGE): Use m4_defn.
95482         Reported by Martin Lambers <marlam@marlam.de>.
95484 2010-07-04  Jim Meyering  <meyering@redhat.com>
95486         hash: once again explicitly disallow insertion of NULL
95487         * lib/hash.c (hash_insert0): Reinstate just-removed test:
95488         inserting a NULL pointer cannot work with these functions.
95489         Add a comment with details.
95490         This reverts part of the 2010-07-01 commit, 5bef1a35
95491         "hash: extend module to deal with non-pointer keys".
95493 2010-07-01  Bruno Haible  <bruno@clisp.org>
95495         stdbool: Update doc.
95496         * doc/posix-headers/stdbool.texi: Mention OpenBSD bug.
95497         Info from Christian Weisgerber <naddy@mips.inka.de>.
95499 2010-07-01  Jim Meyering  <meyering@redhat.com>
95501         hash: extend module to deal with non-pointer keys
95502         * lib/hash.c (hash_insert0): New interface, much like hash_insert
95503         but that allows insertion of non-pointer entries.
95504         Do not disallow an ENTRY value of NULL.
95505         (hash_insert): This is now just a thin wrapper.  Call hash_insert0.
95506         * lib/hash.h (hash_insert0): Declare.
95508 2010-07-01  Christian Weisgerber  <naddy@mips.inka.de>  (tiny change)
95510         gettext: Use AC_GNU_SOURCE as a fallback for AC_USE_SYSTEM_EXTENSIONS.
95511         * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): When AC_USE_SYSTEM_EXTENSIONS is
95512         not present (i.e. with autoconf 2.59 and when using gettextize, not
95513         gnulib), require AC_GNU_SOURCE instead.
95515 2010-07-01  Ian Beckwith  <ianb@erislabs.net>
95517         idpriv-drop: Fix tests.
95518         * tests/test-idpriv-drop.su.sh: Refer to the test-idpriv-drop program,
95519         not to the test-idpriv-droptemp program.
95521 2010-06-29  Bruno Haible  <bruno@clisp.org>
95523         string: Fix syntax error with g++ 2.96.
95524         * lib/string.in.h (__pure__): Remove definition.
95525         (_GL_ATTRIBUTE_PURE): New macro.
95526         (memchr, memmem, memrchr, rawmemchr, strchrnul, strnlen, strpbrk,
95527         strstr, strcasestr): Use it instead of __attribute__ ((__pure__)).
95528         Reported by Christian Weisgerber <naddy@mips.inka.de>.
95530 2010-06-28  Ian Beckwith  <ianb@erislabs.net>
95532         unitypes: Fix bug introduced on 2010-05-18.
95533         * modules/unitypes (Files): Really add m4/libunistring-base.m4.
95535 2010-06-22  Eric Blake  <eblake@redhat.com>
95537         memmem: slight optimization
95538         * lib/str-two-way.h (critical_factorization): Update comments.
95539         Reduce work during factorization phase.
95540         Reported by Carlos Bueno <carlos@bueno.org>.
95542 2010-06-21  Bruno Haible  <bruno@clisp.org>
95544         Fix HAVE_CALLOC_POSIX misnomer.
95545         * lib/stdlib.in.h (calloc): Use REPLACE_CALLOC instead of
95546         !HAVE_CALLOC_POSIX.
95547         * m4/calloc.m4 (gl_REPLACE_CALLOC): Set REPLACE_CALLOC instead of
95548         HAVE_CALLOC_POSIX.
95549         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_CALLOC
95550         instead of HAVE_CALLOC_POSIX.
95551         * modules/stdlib (Makefile.am): Substitute REPLACE_CALLOC instead of
95552         HAVE_CALLOC_POSIX.
95554         Use modern idiom for calloc() replacement.
95555         * modules/calloc (configure.ac): Invoke gl_FUNC_CALLOC_GNU instead of
95556         AC_FUNC_CALLOC.
95557         * m4/calloc.m4 (gl_FUNC_CALLOC_GNU): Renamed from AC_FUNC_CALLOC.
95558         Require gl_STDLIB_H_DEFAULTS. Invoke gl_REPLACE_CALLOC.
95559         (gl_FUNC_CALLOC_POSIX): Rely on gl_STDLIB_H_DEFAULTS to initialize
95560         HAVE_CALLOC_POSIX. Invoke gl_REPLACE_CALLOC.
95561         (gl_REPLACE_CALLOC): New macro.
95563 2010-06-21  Bruno Haible  <bruno@clisp.org>
95565         Fix HAVE_REALLOC_POSIX misnomer.
95566         * lib/stdlib.in.h (realloc): Use REPLACE_REALLOC instead of
95567         !HAVE_REALLOC_POSIX.
95568         * m4/realloc.m4 (gl_REPLACE_REALLOC): Set REPLACE_REALLOC instead of
95569         HAVE_REALLOC_POSIX.
95570         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_REALLOC
95571         instead of HAVE_REALLOC_POSIX.
95572         * modules/stdlib (Makefile.am): Substitute REPLACE_REALLOC instead of
95573         HAVE_REALLOC_POSIX.
95575         Use modern idiom for realloc() replacement.
95576         * modules/realloc (configure.ac): Invoke gl_FUNC_REALLOC_GNU instead of
95577         AC_FUNC_REALLOC.
95578         * m4/realloc.m4 (gl_FUNC_REALLOC_GNU): New macro, mostly copied from
95579         Autoconf's AC_FUNC_REALLOC.
95580         (gl_FUNC_REALLOC_POSIX): Rely on gl_STDLIB_H_DEFAULTS to initialize
95581         HAVE_REALLOC_POSIX. Invoke gl_REPLACE_REALLOC.
95582         (gl_REPLACE_REALLOC): New macro.
95583         Reported by Richard Lloyd <richard.lloyd@connectinternetsolutions.com>.
95585 2010-06-21  Bruno Haible  <bruno@clisp.org>
95587         Fix HAVE_MALLOC_POSIX misnomer.
95588         * lib/stdlib.in.h (malloc): Use REPLACE_MALLOC instead of
95589         !HAVE_MALLOC_POSIX.
95590         * m4/malloc.m4 (gl_REPLACE_MALLOC): Set REPLACE_MALLOC instead of
95591         HAVE_MALLOC_POSIX.
95592         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_MALLOC
95593         instead of HAVE_MALLOC_POSIX.
95594         * modules/stdlib (Makefile.am): Substitute REPLACE_MALLOC instead of
95595         HAVE_MALLOC_POSIX.
95597         Use modern idiom for malloc() replacement.
95598         * modules/malloc (configure.ac): Invoke gl_FUNC_MALLOC_GNU instead of
95599         AC_FUNC_MALLOC.
95600         * m4/malloc.m4 (gl_FUNC_MALLOC_GNU): New macro, mostly copied from
95601         Autoconf's AC_FUNC_MALLOC.
95602         (gl_FUNC_MALLOC_POSIX): Rely on gl_STDLIB_H_DEFAULTS to initialize
95603         HAVE_MALLOC_POSIX. Invoke gl_REPLACE_MALLOC.
95604         (gl_REPLACE_MALLOC): New macro.
95605         Reported by Richard Lloyd <richard.lloyd@connectinternetsolutions.com>.
95607 2010-06-20  Richard Lloyd  <richard.lloyd@connectinternetsolutions.com>
95609         stdio.in.h: fix compilation failure when using HP-UX 11's C compiler
95610         * lib/stdio.in.h: Remove excess _GL_CXXALIAS_RPL macro argument.
95611         This macro takes 3 arguments, not 4.
95613 2010-06-15  Giuseppe Scrivano  <gscrivano@gnu.org>
95615         ipv6: fix detection under mingw
95616         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Include <ws2tcpip.h> for struct
95617         in6_addr.
95619 2010-06-14  Ben Pfaff  <blp@cs.stanford.edu>
95621         * m4/strtod.m4 (gl_FUNC_STRTOD): Factor out common code.  Assume
95622         that strtod() works when cross-compiling to a glibc version known
95623         to work.
95625 2010-06-15  Bruno Haible  <bruno@clisp.org>
95627         * m4/strtod.m4 (gl_FUNC_STRTOD): Stop using AC_FUNC_STRTOD.
95629 2010-06-15  René Berber  <r.berber@computer.org>  (tiny change)
95631         select: Correct timeout.
95632         * lib/select.c (rpl_select): Compute wait_timeout correctly.
95634 2010-06-14  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
95636         git-version-gen: init shell var to avoid env var influence
95637         * build-aux/git-version-gen (v): Init shell var to empty.
95639 2010-06-14  Paul Eggert  <eggert@cs.ucla.edu>
95641         priv-set: Don't assume that priv.h exists merely because getppriv does.
95642         See Jan Andersen's bug report about AIX 5L in
95643         http://lists.gnu.org/r/bug-tar/2010-06/msg00019.html
95644         * m4/priv-set.m4 (gl_PRIV_SET): Check for priv.h.
95645         * lib/priv-set.c: Do nothing unless HAVE_PRIV_H.
95646         * lib/priv-set.h: Likewise.
95647         * tests/test-priv-set.c: Likewise.
95649 2010-06-13  Bruno Haible  <bruno@clisp.org>
95651         relocatable: Make it easier to test whether to install wrappers.
95652         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): New automake conditional
95653         RELOCATABLE_VIA_WRAPPER.
95655 2010-06-13  Bruno Haible  <bruno@clisp.org>
95657         gnulib-tool: Display specified modules and dependencies differently.
95658         * gnulib-tool (func_show_module_list): New function.
95659         (func_import, func_create_testdir): Invoke it.
95660         Reported by Thien-Thi Nguyen <ttn@gnuvola.org>.
95662 2010-06-13  Bruno Haible  <bruno@clisp.org>
95664         gnulib-tool: Align code of func_import and func_create_testdir.
95665         * gnulib-tool (func_create_testdir): Rename variable saved_modules to
95666         specified_modules.
95668 2010-06-12  Jim Meyering  <meyering@redhat.com>
95670         test-inttostr: avoid spurious failure on Solaris 9
95671         * tests/test-inttostr.c (main): Skip the test when snprintf fails
95672         to accept "%ju".  Reported by Bruno Haible.
95674 2010-06-11  Jim Meyering  <meyering@redhat.com>
95676         test-sys_socket: mark variables as used more readably
95677         * tests/test-sys_socket.c (main): Mark otherwise unused variables
95678         as "used" explicitly via (void) statement casts.  This is more
95679         readable than using them in an artificial return expression.
95680         Suggestion from Bruno Haible.
95682 2010-06-11  Bruno Haible  <bruno@clisp.org>
95684         Avoid some more warnings from "gcc -Wwrite-strings".
95685         * tests/test-argp.c (test_optional): Change 5th and 6th argument type
95686         to 'const char *'.
95687         * tests/test-c-strstr.c (main): Add 'const' to variable declaration.
95688         * tests/test-c-strcasestr.c (main): Likewise.
95689         * tests/test-mbscasestr1.c (main): Likewise.
95690         * tests/test-mbscasestr2.c (main): Likewise.
95691         * tests/test-memmem.c (main): Likewise.
95692         * tests/test-strstr.c (main): Likewise.
95693         * tests/test-strcasestr.c (main): Likewise.
95695 2010-06-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
95697         init.sh: change framework_failure_ to fail with status 99, not 1
95698         * tests/init.sh (framework_failure_): Exit 99, not 1.  This informs
95699         automake's parallel-tests rule that this is an unexpected failure,
95700         even if the test is listed in XFAIL_TESTS.
95702 2010-06-11  Jim Meyering  <meyering@redhat.com>
95704         test-inttostr: avoid warnings about 4-6KB literal strings
95705         * tests/test-inttostr.c: Don't use <assert.h>.  Instead, ...
95706         Include "macros.h", for its definition of ASSERT.
95707         (CK): s/assert/ASSERT/
95708         * modules/inttostr-tests (Files): Add macros.h.
95710         init.sh: don't use $ME_ or skip_ before they are defined
95711         * tests/init.sh: Hoist definitions of $ME_ and skip_ to precede
95712         their first uses.  Also hoist their companions: warn_, fail_,
95713         framework_failure_, $stderr_fileno.  Prompted by a patch from
95714         Stefano Lattarini.
95716         test-sys_socket: avoid set-but-not-used warnings from gcc
95717         * tests/test-sys_socket.c (main): Use "i" and "x", in order to
95718         avoid warning about set-but-not-used variables.
95720         test-xvasprintf: avoid 'const' discard warnings
95721         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Use
95722         "const" when assigning from literal strings.
95723         (test_xasprintf): Add "void" in function argument list to placate
95724         -Wstrict-prototypes and to be consistent with test_xvasprintf above.
95726         tests: avoid compilation warnings in argmatch and exclude tests...
95727         in packages that define ARGMATCH_DIE_DECL, like coreutils.
95728         * tests/test-exclude.c [ARGMATCH_DIE_DECL]: Also declare the function.
95729         Since it always exits, declare with the "noreturn" attribute.
95730         * tests/test-argmatch.c: Likewise.
95732         tests: avoid 'const' discard warnings in mbsstr tests
95733         * tests/test-mbsstr1.c (main): Add "const" to avoid trivial warning.
95734         * tests/test-mbsstr2.c (main): Likewise.
95736         test-verify: avoid warning from gcc's -Wmissing-declarations
95737         * tests/test-verify.c (function): Declare to be static.
95739         test-inttostr.c: include <string.h> for use of strcmp
95740         * tests/test-inttostr.c: Include <string.h> for strcmp declaration.
95742         test-linkat: avoid failed assertion on "other" architectures
95743         * tests/test-linkat.c: Include <sys/stat.h>, for declarations of stat,
95744         lstat, mkdir.  Patch by John Rigby, to fix FTBFS on armel, powerpc,
95745         sparc: https://bugs.launchpad.net/bugs/591968
95747 2010-06-11  Jim Meyering  <meyering@redhat.com>
95749         printf.m4: avoid autoconf's "Expanded Before Required" warning
95750         * m4/printf.m4 (gl_SNPRINTF_RETVAL_C99): Define using AC_DEFUN_ONCE,
95751         rather than AC_DEFUN, to avoid the classic "Expanded Before Required"
95752         autoconf warning.
95754 2010-06-10  Ben Pfaff  <blp@cs.stanford.edu>
95756         Replacement header templates are now named with ".in", not "_".
95757         * doc/gnulib-intro.texi: Correct.
95759 2010-06-10  Jim Meyering  <meyering@redhat.com>
95761         inttostr-tests: depend on snprintf, not snprintf-posix
95762         * modules/inttostr-tests (Depends-on): Depend on snprintf, not
95763         snprintf-posix, to avoid this aclocal failure:
95764           missing file gnulib-tests/vasnprintf.c
95765           configure.ac:45: error: expected source file, required through \
95766           AC_LIBSOURCES, not found
95768 2010-06-10  Jim Meyering  <meyering@redhat.com>
95770         inttostr: add a new function, inttostr, and tests
95771         The namesake function was not available.  The existence of the
95772         template file, inttostr.c makes its addition nontrivial.
95773         * lib/anytostr.c: Rename from inttostr.c.
95774         (anytostr): Rename from inttostr.
95775         * lib/inttostr.c: New file.
95776         * modules/inttostr (Files): Add anytostr.c.
95777         (Makefile.am): Set lib_SOURCES instead of ...
95778         * m4/inttostr.m4: Remove uses of AC_LIBOBJ.
95779         * lib/imaxtostr.c: Update use.  s/inttostr/anytostr/
95780         * lib/offtostr.c: Likewise.
95781         * lib/uinttostr.c: Likewise.
95782         * lib/umaxtostr.c: Likewise.
95783         * modules/inttostr-tests: New file.
95784         * tests/test-inttostr.c: New file.  Test these functions.
95786 2010-06-09  Ben Pfaff  <blp@cs.stanford.edu>
95787             Bruno Haible  <bruno@clisp.org>
95789         Add "Extending Gnulib" chapter to manual.
95790         * doc/gnulib.texi (Writing Modules): Add cross-reference to new
95791         chapter.
95792         (Extending Gnulib): New chapter.
95793         * doc/gnulib-intro.texi (Openness): Add cross-reference to new
95794         chapter.
95796 2010-06-09  Bruno Haible  <bruno@clisp.org>
95798         Avoid relocwrapper link errors due to gnulib replacement functions.
95799         * lib/areadlink.c: Use the system's malloc, realloc functions.
95800         (areadlink): Set errno to ENOMEM explicitly.
95801         * modules/areadlink (Depends-on): Remove malloc-posix.
95802         Reported by Ben Pfaff <blp@cs.stanford.edu>.
95804 2010-06-09  Bruno Haible  <bruno@clisp.org>
95806         Avoid relocwrapper link errors due to gnulib replacement functions.
95807         * lib/canonicalize-lgpl.c: Use the system's malloc function.
95808         * lib/malloca.c: Likewise.
95809         * lib/relocatable.c: Likewise.
95810         * lib/progreloc.c: Use the system's malloc, sprintf functions.
95811         * lib/relocwrapper.c: Use the system's fprintf, malloc functions.
95812         * lib/setenv.c: Use the system's malloc, realloc functions.
95813         * lib/strerror.c: Use the system's sprintf function.
95814         Reported by Ben Pfaff <blp@cs.stanford.edu>.
95816 2010-06-04  Bruno Haible  <bruno@clisp.org>
95818         Prefer documented low-level autoconf macro names.
95819         * m4/lib-link.m4: Use m4_translit instead of translit.
95820         * m4/environ.m4: Likewise.
95821         * m4/mathfunc.m4: Likewise.
95822         * m4/onceonly.m4: Likewise.
95823         * m4/stdint.m4: Likewise.
95824         Suggested by Eric Blake.
95826 2010-06-04  Martin Lambers  <marlam@marlam.de>
95827             Bruno Haible  <bruno@clisp.org>
95829         havelib: Allow library names with '+' characters.
95830         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
95831         AC_LIB_FROMPACKAGE, AC_LIB_LINKFLAGS_BODY): Convert '+' in name to '_'.
95833 2010-06-09  Bruno Haible  <bruno@clisp.org>
95835         Module setenv does not depend on 'malloc-posix', 'realloc-posix'.
95836         * lib/setenv.c (__add_to_environ): Set errno to ENOMEM when malloc or
95837         realloc failed.
95839 2010-06-08  Peter Simons  <simons@cryp.to>
95841         maint.mk: make the news-check rule more configurable
95842         * top/maint.mk (news-check-lines-spec): New variable.
95843         (news-check): Use "sed -n 1,10p" in place of "head".
95845 2010-06-07  Jim Meyering  <meyering@redhat.com>
95847         do-release-commit-and-tag: fix typo in --help
95848         * build-aux/do-release-commit-and-tag (Usage): Fix typo in --help.
95850         regex: avoid new dead-code warning with gcc-4.6.0
95851         * lib/regex_internal.c (re_string_reconstruct): #if-0-out a dead
95852         if-block containing a while-loop.  It's been unused for at least
95853         5 years.
95855 2010-06-05  Bruno Haible  <bruno@clisp.org>
95857         * doc/posix-functions/strcoll.texi: Mention Solaris limitation.
95858         Reported by River Tarnell <river.tarnell@wikimedia.de> via Eric Blake.
95860 2010-06-04  Bruno Haible  <bruno@clisp.org>
95862         Update to GNU gettext 0.18.1.
95863         * modules/gettext (configure.ac): Require gettext infrastructure from
95864         version 0.18.1.
95866 2010-06-03  Bruno Haible  <bruno@clisp.org>
95868         Don't use AC_LIBOBJ with file names in subdirectories.
95869         * m4/libunistring-base.m4 (gl_LIBUNISTRING_MODULE): Renamed from
95870         gl_LIBUNISTRING_LIBSOURCE. Take a module name as argument, not a file
95871         name. Define an automake conditional. Don't invoke AC_LIBOBJ.
95872         * m4/libunistring.m4 (gl_LIBUNISTRING): Update AC_BEFORE invocation.
95873         * modules/uni*/* (configure.ac): Use gl_LIBUNISTRING_MODULE instead of
95874         gl_LIBUNISTRING_LIBSOURCE.
95875         (Makefile.am): Augment lib_SOURCES here, conditionally.
95876         * NEWS: Drop requirement for Automake option 'subdir-objects'.
95878 2010-06-03  Bruno Haible  <bruno@clisp.org>
95880         Simplify gl_LIBUNISTRING_VERSION_CMP expansion.
95881         * m4/libunistring-base.m4 (gl_LIBUNISTRING_VERSION_CMP): Ensure
95882         expansion does not end with a newline.
95883         (gl_LIBUNISTRING_LIBSOURCE, gl_LIBUNISTRING_LIBHEADER): Avoid
95884         unnecessary newline.
95886 2010-06-03  Bruno Haible  <bruno@clisp.org>
95888         Reduce dependencies.
95889         * tests/test-quotearg.h: New file, extracted from
95890         tests/test-quotearg.c.
95891         * tests/test-quotearg-simple.c: New file, extracted from
95892         tests/test-quotearg.c.
95893         * tests/test-quotearg.c: Don't include <ctype.h>.
95894         (struct result_strings, struct result_groups, LQ, RQ, LQ_ENC, RQ_ENC,
95895         RQ_ESC, inputs, compare, use_quotearg_buffer, use_quotearg,
95896         use_quote_double_quotes, use_quotearg_colon): Moved to
95897         tests/test-quotearg.h.
95898         (results_g, flag_results, custom_quotes, custom_results): Moved
95899         to tests/test-quotearg-simple.c.
95900         (main): Moved the part that does not depend on gettext to
95901         tests/test-quotearg-simple.c. Return 77 if the test cannot be
95902         performed.
95903         * modules/quotearg-simple: New file.
95904         * modules/quotearg-simple-tests: New file.
95905         * modules/quotearg (Depends-on): Add quotearg-simple.
95906         * modules/quotearg-tests (Status): Mark as gettext-dependent-test.
95907         (Files): Add tests/test-quotearg.h.
95908         Reported by Paolo Bonzini.
95910 2010-06-03  Bruno Haible  <bruno@clisp.org>
95912         Reduce dependencies.
95913         * modules/acl (Depends-on): Add gettext-h. Remove gettext.
95915 2010-06-03  Bruno Haible  <bruno@clisp.org>
95917         time: Undefine more broken macros.
95918         * lib/time.in.h: Undefine broken localtime_r and gmtime_r macros only
95919         for pthread-win32. Undefine also asctime_r, ctime_r, rand_r, strtok_r.
95920         Reported by Eric Blake.
95922 2010-06-03  Bruno Haible  <bruno@clisp.org>
95924         Choose among AC_DEFUN_ONCE, AC_DEFUN in a way that aclocal understands.
95925         * m4/iconv.m4 (gl_iconv_AC_DEFUN): New macro.
95926         (AM_ICONV): Define it through gl_iconv_AC_DEFUN.
95927         * m4/libunistring.m4 (gl_libunistring_AC_DEFUN): New macro.
95928         (gl_LIBUNISTRING): Define it through gl_libunistring_AC_DEFUN.
95929         Reported by Ludovic Courtès <ludo@gnu.org>.
95931 2010-06-02  Eric Blake  <eblake@redhat.com>
95933         time: work with mingw + pthreads-win32 library
95934         * m4/time_h.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Set new variable
95935         if timespec is defined only in pthread.h.
95936         * modules/time (Makefile.am): Substitute it.
95937         * lib/time.in.h (!TIME_H_DEFINES_STRUCT_TIMESPEC): Include
95938         <pthread.h>, when needed.
95939         (GNULIB_TIME_R): Undefine broken localtime_r and gmtime_r macros
95940         from the library.
95942 2010-05-31  Bruno Haible  <bruno@clisp.org>
95944         Avoid expanding two macros in the wrong order.
95945         * m4/libunistring-base.m4 (gl_LIBUNISTRING_LIB_PREPARE): Require
95946         gl_LIBUNISTRING if it is defined.
95947         * m4/libunistring.m4 (gl_LIBUNISTRING): Define using AC_DEFUN_ONCE for
95948         autoconf >= 2.64.
95949         Reported by Ludovic Courtès <ludo@gnu.org>.
95951 2010-05-27  Jim Meyering  <meyering@redhat.com>
95953         maint.mk: also prohibit "#undef" of always-defined symbols
95954         * top/maint.mk (def_sym_regex): Handle #undef as well as #define.
95955         Allow more than one space before the symbol name.
95956         (sc_prohibit_always-defined_macros): Use grep's -E, now that
95957         the regexp uses alternation.
95959 2010-05-26  Eric Blake  <eblake@redhat.com>
95961         maint.mk: avoid echo -e
95962         * top/maint.mk (gzip_rsyncable, _ignore_case, _sc_say_and_exit):
95963         Convert all uses of echo -* to printf.
95964         Reported by Matthias Bolte.
95966 2010-05-25  Bruno Haible  <bruno@clisp.org>
95968         Update to GNU gettext 0.18, part 2.
95969         * build-aux/po/Makefile.in.in: Update to GNU gettext 0.18.
95970         Reported by Martin von Gagern <Martin.vGagern@gmx.net>.
95972 2010-05-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
95974         Add missing include in test-pwrite.c.
95975         * tests/test-pwrite.c: Include string.h, for strcmp.
95977 2010-05-24  Bruno Haible  <bruno@clisp.org>
95979         * NEWS: Mention requirement for Automake option 'subdir-objects'.
95981 2010-05-24  Bruno Haible  <bruno@clisp.org>
95983         Don't use conversion with transliteration in u{8,16,32}_strcoll.
95984         * lib/unistr/u-strcoll.h (FUNC): Use U_STRCONV_TO_ENCODING with
95985         iconveh_error argument.
95986         * lib/unistr/u8-strcoll.c: Define U_STRCONV_TO_ENCODING instead of
95987         U_STRCONV_TO_LOCALE.
95988         * lib/unistr/u16-strcoll.c: Likewise.
95989         * lib/unistr/u32-strcoll.c: Likewise.
95990         * modules/unistr/u8-strcoll (Depends-on): Add
95991         uniconv/u8-strconv-to-enc, localcharset. Remove
95992         uniconv/u8-strconv-to-locale.
95993         (configure.ac): Bump version number.
95994         * modules/unistr/u16-strcoll (Depends-on): Add
95995         uniconv/u16-strconv-to-enc, localcharset. Remove
95996         uniconv/u16-strconv-to-locale.
95997         (configure.ac): Bump version number.
95998         * modules/unistr/u32-strcoll (Depends-on): Add
95999         uniconv/u32-strconv-to-enc, localcharset. Remove
96000         uniconv/u32-strconv-to-locale.
96001         (configure.ac): Bump version number.
96003 2010-05-24  Bruno Haible  <bruno@clisp.org>
96005         Avoid a test failure on NetBSD 5.0.
96006         * tests/test-striconveh.c (main): On NetBSD, skip a test that triggers
96007         an iconv() bug.
96009 2010-05-24  Bruno Haible  <bruno@clisp.org>
96011         Adjust #include directive style.
96012         * modules/regex (Includes): Recommend to write <regex.h>.
96014 2010-05-24  Bruno Haible  <bruno@clisp.org>
96016         regex: Don't require alloca.
96017         * modules/regex (Depends-on): Remove alloca. Add alloca-opt.
96018         * lib/regex_internal.h (alloca): Ensure it's defined even if we call it
96019         only inside if (0).
96021 2010-05-23  Jim Meyering  <meyering@redhat.com>
96023         test-renameat.c: include <sys/stat.h>
96024         * tests/test-renameat.c: Include <sys/stat.h>; required for
96025         definition of S_IS* macros.
96027 2010-05-23  Ben Pfaff  <blp@cs.stanford.edu>
96029         Update maintainer documentation for 'relocatable-prog' module.
96030         * doc/relocatable-maint.texi: Update.
96031         Comments by Bruno Haible.
96033 2010-05-23  Bruno Haible  <bruno@clisp.org>
96035         git-merge-changelog: Enable --split-merged-entry by default.
96036         * lib/git-merge-changelog.c (main): Set split_merged_entry to true.
96037         (usage): Don't mention this option any more.
96038         Reported by Ralf Wildenhues.
96040 2010-05-23  Jim Meyering  <meyering@redhat.com>
96042         test-pwrite: do not leave behind a test file named "out"
96043         Revert commit d8fa18472a54c1cb2674c296b3d82443f234d5f7.
96044         The trivial-looking use of init.sh is really necessary.
96045         It ensures that the temporary file, "out", is created in
96046         a temporary directory, and removed upon termination.
96047         * tests/test-pwrite.sh: Re-add file.
96048         * modules/pwrite-tests: Reference it.
96050 2010-05-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
96052         Fix output redirection buglet in init.sh.
96053         * tests/init.sh: Fix redirection of stderr.
96055 2010-05-20  Simon Josefsson  <simon@josefsson.org>
96057         * modules/valgrind-tests (configure.ac): Invoke gl_VALGRIND_TESTS.
96059 2010-05-17  Simon Josefsson  <simon@josefsson.org>
96061         * modules/valgrind-tests: New file.
96062         * m4/valgrind-tests.m4: New file.
96063         * doc/valgrind-tests.texi: New file.
96064         * doc/gnulib.texi (Running self-tests under valgrind): New
96065         section.
96067 2010-05-19  Bruno Haible  <bruno@clisp.org>
96069         Clean up dead code in recent commit.
96070         * m4/libunistring-base.m4 (gl_LIBUNISTRING_VERSION_CMP): Include the
96071         body of gl_LIBUNISTRING_VERSION_CMP_ORIG as fallback.
96072         (gl_LIBUNISTRING_VERSION_CMP_ORIG): Remove macro.
96073         Suggested by Paolo Bonzini.
96075 2010-05-19  Bruno Haible  <bruno@clisp.org>
96077         Avoid valgrind error reports from libunistring.
96078         * lib/libunistring.valgrind: New file, based on lib/malloca.valgrind.
96079         * modules/libunistring (Files): Add it.
96080         * modules/libunistring-optional (Files): Likewise.
96082 2010-05-18  Paolo Bonzini  <bonzini@gnu.org>
96083             Bruno Haible  <bruno@clisp.org>
96085         New module 'libunistring-optional'.
96086         * modules/libunistring-optional: New file.
96087         * m4/libunistring-base.m4: New file.
96088         * m4/libunistring-optional.m4: New file.
96089         * lib/unicase.in.h: Renamed from lib/unicase.h.
96090         * lib/uniconv.in.h: Renamed from lib/uniconv.h.
96091         * lib/unictype.in.h: Renamed from lib/unictype.h.
96092         * lib/unilbrk.in.h: Renamed from lib/unilbrk.h.
96093         * lib/uniname.in.h: Renamed from lib/uniname.h.
96094         * lib/uninorm.in.h: Renamed from lib/uninorm.h.
96095         * lib/unistdio.in.h: Renamed from lib/unistdio.h.
96096         * lib/unistr.in.h: Renamed from lib/unistr.h.
96097         * lib/unitypes.in.h: Renamed from lib/unitypes.h.
96098         * lib/uniwbrk.in.h: Renamed from lib/uniwbrk.h.
96099         * lib/uniwidth.in.h: Renamed from lib/uniwidth.h.
96100         * m4/libunistring.m4 (gl_LIBUNISTRING_CORE): Renamed from
96101         gl_LIBUNISTRING. If the library was found, determine the installed
96102         version and set LIBUNISTRING_VERSION.
96103         (gl_LIBUNISTRING): New macro, as a wrapper arount it. Document that it
96104         sets LIBUNISTRING_VERSION. If the module libunistring-optional is used,
96105         handle a configuration option --with-included-libunistring.
96106         * modules/libunistring (Files): Add m4/absolute-header.m4.
96107         * modules/unicase/base (Files): Use unicase.in.h instead of unicase.h.
96108         Add m4/libunistring-base.m4.
96109         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
96110         (Makefile.am): Build unicase.h from unicase.in.h.
96111         * modules/uniconv/base (Files): Use uniconv.in.h instead of uniconv.h.
96112         Add m4/libunistring-base.m4.
96113         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
96114         (Makefile.am): Build uniconv.h from uniconv.in.h.
96115         * modules/unictype/base (Files): Use unictype.in.h instead of
96116         unictype.h. Add m4/libunistring-base.m4.
96117         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
96118         (Makefile.am): Build unictype.h from unictype.in.h.
96119         * modules/unilbrk/base (Files): Use unilbrk.in.h instead of unilbrk.h.
96120         Add m4/libunistring-base.m4.
96121         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
96122         (Makefile.am): Build unilbrk.h from unilbrk.in.h.
96123         * modules/uniname/base (Files): Use uniname.in.h instead of uniname.h.
96124         Add m4/libunistring-base.m4.
96125         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
96126         (Makefile.am): Build uniname.h from uniname.in.h.
96127         * modules/uninorm/base (Files): Use uninorm.in.h instead of uninorm.h.
96128         Add m4/libunistring-base.m4.
96129         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
96130         (Makefile.am): Build uninorm.h from uninorm.in.h.
96131         * modules/unistdio/base (Files): Use unistdio.in.h instead of
96132         unistdio.h. Add m4/libunistring-base.m4.
96133         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
96134         (Makefile.am): Build unistdio.h from unistdio.in.h.
96135         * modules/unistr/base (Files): Use unistr.in.h instead of unistr.h.
96136         Add m4/libunistring-base.m4.
96137         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
96138         (Makefile.am): Build unistr.h from unistr.in.h.
96139         * modules/unitypes (Files): Use unitypes.in.h instead of unitypes.h.
96140         Add m4/libunistring-base.m4.
96141         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
96142         (Makefile.am): Build unitypes.h from unitypes.in.h.
96143         * modules/uniwbrk/base (Files): Use uniwbrk.in.h instead of uniwbrk.h.
96144         Add m4/libunistring-base.m4.
96145         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
96146         (Makefile.am): Build uniwbrk.h from uniwbrk.in.h.
96147         * modules/uniwidth/base (Files): Use uniwidth.in.h instead of
96148         uniwidth.h. Add m4/libunistring-base.m4.
96149         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
96150         (Makefile.am): Build uniwidth.h from uniwidth.in.h.
96151         * modules/unicase/empty-prefix-context: Use gl_LIBUNISTRING_LIBSOURCE
96152         instead of augmenting lib_SOURCES.
96153         * modules/unicase/empty-suffix-context: Likewise.
96154         * modules/unicase/locale-language: Likewise.
96155         * modules/unicase/tolower: Likewise.
96156         * modules/unicase/totitle: Likewise.
96157         * modules/unicase/toupper: Likewise.
96158         * modules/unicase/u8-casecmp: Likewise.
96159         * modules/unicase/u8-casecoll: Likewise.
96160         * modules/unicase/u8-casefold: Likewise.
96161         * modules/unicase/u8-casexfrm: Likewise.
96162         * modules/unicase/u8-ct-casefold: Likewise.
96163         * modules/unicase/u8-ct-tolower: Likewise.
96164         * modules/unicase/u8-ct-totitle: Likewise.
96165         * modules/unicase/u8-ct-toupper: Likewise.
96166         * modules/unicase/u8-is-cased: Likewise.
96167         * modules/unicase/u8-is-casefolded: Likewise.
96168         * modules/unicase/u8-is-lowercase: Likewise.
96169         * modules/unicase/u8-is-titlecase: Likewise.
96170         * modules/unicase/u8-is-uppercase: Likewise.
96171         * modules/unicase/u8-prefix-context: Likewise.
96172         * modules/unicase/u8-suffix-context: Likewise.
96173         * modules/unicase/u8-tolower: Likewise.
96174         * modules/unicase/u8-totitle: Likewise.
96175         * modules/unicase/u8-toupper: Likewise.
96176         * modules/unicase/u16-casecmp: Likewise.
96177         * modules/unicase/u16-casecoll: Likewise.
96178         * modules/unicase/u16-casefold: Likewise.
96179         * modules/unicase/u16-casexfrm: Likewise.
96180         * modules/unicase/u16-ct-casefold: Likewise.
96181         * modules/unicase/u16-ct-tolower: Likewise.
96182         * modules/unicase/u16-ct-totitle: Likewise.
96183         * modules/unicase/u16-ct-toupper: Likewise.
96184         * modules/unicase/u16-is-cased: Likewise.
96185         * modules/unicase/u16-is-casefolded: Likewise.
96186         * modules/unicase/u16-is-lowercase: Likewise.
96187         * modules/unicase/u16-is-titlecase: Likewise.
96188         * modules/unicase/u16-is-uppercase: Likewise.
96189         * modules/unicase/u16-prefix-context: Likewise.
96190         * modules/unicase/u16-suffix-context: Likewise.
96191         * modules/unicase/u16-tolower: Likewise.
96192         * modules/unicase/u16-totitle: Likewise.
96193         * modules/unicase/u16-toupper: Likewise.
96194         * modules/unicase/u32-casecmp: Likewise.
96195         * modules/unicase/u32-casecoll: Likewise.
96196         * modules/unicase/u32-casefold: Likewise.
96197         * modules/unicase/u32-casexfrm: Likewise.
96198         * modules/unicase/u32-ct-casefold: Likewise.
96199         * modules/unicase/u32-ct-tolower: Likewise.
96200         * modules/unicase/u32-ct-totitle: Likewise.
96201         * modules/unicase/u32-ct-toupper: Likewise.
96202         * modules/unicase/u32-is-cased: Likewise.
96203         * modules/unicase/u32-is-casefolded: Likewise.
96204         * modules/unicase/u32-is-lowercase: Likewise.
96205         * modules/unicase/u32-is-titlecase: Likewise.
96206         * modules/unicase/u32-is-uppercase: Likewise.
96207         * modules/unicase/u32-prefix-context: Likewise.
96208         * modules/unicase/u32-suffix-context: Likewise.
96209         * modules/unicase/u32-tolower: Likewise.
96210         * modules/unicase/u32-totitle: Likewise.
96211         * modules/unicase/u32-toupper: Likewise.
96212         * modules/unicase/ulc-casecmp: Likewise.
96213         * modules/unicase/ulc-casecoll: Likewise.
96214         * modules/unicase/ulc-casexfrm: Likewise.
96215         * modules/uniconv/u8-conv-from-enc: Likewise.
96216         * modules/uniconv/u8-conv-to-enc: Likewise.
96217         * modules/uniconv/u8-strconv-from-enc: Likewise.
96218         * modules/uniconv/u8-strconv-from-locale: Likewise.
96219         * modules/uniconv/u8-strconv-to-enc: Likewise.
96220         * modules/uniconv/u8-strconv-to-locale: Likewise.
96221         * modules/uniconv/u16-conv-from-enc: Likewise.
96222         * modules/uniconv/u16-conv-to-enc: Likewise.
96223         * modules/uniconv/u16-strconv-from-enc: Likewise.
96224         * modules/uniconv/u16-strconv-from-locale: Likewise.
96225         * modules/uniconv/u16-strconv-to-enc: Likewise.
96226         * modules/uniconv/u16-strconv-to-locale: Likewise.
96227         * modules/uniconv/u32-conv-from-enc: Likewise.
96228         * modules/uniconv/u32-conv-to-enc: Likewise.
96229         * modules/uniconv/u32-strconv-from-enc: Likewise.
96230         * modules/uniconv/u32-strconv-from-locale: Likewise.
96231         * modules/uniconv/u32-strconv-to-enc: Likewise.
96232         * modules/uniconv/u32-strconv-to-locale: Likewise.
96233         * modules/unictype/bidicategory-byname: Likewise.
96234         * modules/unictype/bidicategory-name: Likewise.
96235         * modules/unictype/bidicategory-of: Likewise.
96236         * modules/unictype/bidicategory-test: Likewise.
96237         * modules/unictype/block-list: Likewise.
96238         * modules/unictype/block-test: Likewise.
96239         * modules/unictype/category-C: Likewise.
96240         * modules/unictype/category-Cc: Likewise.
96241         * modules/unictype/category-Cf: Likewise.
96242         * modules/unictype/category-Cn: Likewise.
96243         * modules/unictype/category-Co: Likewise.
96244         * modules/unictype/category-Cs: Likewise.
96245         * modules/unictype/category-L: Likewise.
96246         * modules/unictype/category-Ll: Likewise.
96247         * modules/unictype/category-Lm: Likewise.
96248         * modules/unictype/category-Lo: Likewise.
96249         * modules/unictype/category-Lt: Likewise.
96250         * modules/unictype/category-Lu: Likewise.
96251         * modules/unictype/category-M: Likewise.
96252         * modules/unictype/category-Mc: Likewise.
96253         * modules/unictype/category-Me: Likewise.
96254         * modules/unictype/category-Mn: Likewise.
96255         * modules/unictype/category-N: Likewise.
96256         * modules/unictype/category-Nd: Likewise.
96257         * modules/unictype/category-Nl: Likewise.
96258         * modules/unictype/category-No: Likewise.
96259         * modules/unictype/category-P: Likewise.
96260         * modules/unictype/category-Pc: Likewise.
96261         * modules/unictype/category-Pd: Likewise.
96262         * modules/unictype/category-Pe: Likewise.
96263         * modules/unictype/category-Pf: Likewise.
96264         * modules/unictype/category-Pi: Likewise.
96265         * modules/unictype/category-Po: Likewise.
96266         * modules/unictype/category-Ps: Likewise.
96267         * modules/unictype/category-S: Likewise.
96268         * modules/unictype/category-Sc: Likewise.
96269         * modules/unictype/category-Sk: Likewise.
96270         * modules/unictype/category-Sm: Likewise.
96271         * modules/unictype/category-So: Likewise.
96272         * modules/unictype/category-Z: Likewise.
96273         * modules/unictype/category-Zl: Likewise.
96274         * modules/unictype/category-Zp: Likewise.
96275         * modules/unictype/category-Zs: Likewise.
96276         * modules/unictype/category-and: Likewise.
96277         * modules/unictype/category-and-not: Likewise.
96278         * modules/unictype/category-byname: Likewise.
96279         * modules/unictype/category-name: Likewise.
96280         * modules/unictype/category-none: Likewise.
96281         * modules/unictype/category-of: Likewise.
96282         * modules/unictype/category-or: Likewise.
96283         * modules/unictype/category-test: Likewise.
96284         * modules/unictype/combining-class: Likewise.
96285         * modules/unictype/ctype-alnum: Likewise.
96286         * modules/unictype/ctype-alpha: Likewise.
96287         * modules/unictype/ctype-blank: Likewise.
96288         * modules/unictype/ctype-cntrl: Likewise.
96289         * modules/unictype/ctype-digit: Likewise.
96290         * modules/unictype/ctype-graph: Likewise.
96291         * modules/unictype/ctype-lower: Likewise.
96292         * modules/unictype/ctype-print: Likewise.
96293         * modules/unictype/ctype-punct: Likewise.
96294         * modules/unictype/ctype-space: Likewise.
96295         * modules/unictype/ctype-upper: Likewise.
96296         * modules/unictype/ctype-xdigit: Likewise.
96297         * modules/unictype/decimal-digit: Likewise.
96298         * modules/unictype/digit: Likewise.
96299         * modules/unictype/mirror: Likewise.
96300         * modules/unictype/numeric: Likewise.
96301         * modules/unictype/property-alphabetic: Likewise.
96302         * modules/unictype/property-ascii-hex-digit: Likewise.
96303         * modules/unictype/property-bidi-arabic-digit: Likewise.
96304         * modules/unictype/property-bidi-arabic-right-to-left: Likewise.
96305         * modules/unictype/property-bidi-block-separator: Likewise.
96306         * modules/unictype/property-bidi-boundary-neutral: Likewise.
96307         * modules/unictype/property-bidi-common-separator: Likewise.
96308         * modules/unictype/property-bidi-control: Likewise.
96309         * modules/unictype/property-bidi-embedding-or-override: Likewise.
96310         * modules/unictype/property-bidi-eur-num-separator: Likewise.
96311         * modules/unictype/property-bidi-eur-num-terminator: Likewise.
96312         * modules/unictype/property-bidi-european-digit: Likewise.
96313         * modules/unictype/property-bidi-hebrew-right-to-left: Likewise.
96314         * modules/unictype/property-bidi-left-to-right: Likewise.
96315         * modules/unictype/property-bidi-non-spacing-mark: Likewise.
96316         * modules/unictype/property-bidi-other-neutral: Likewise.
96317         * modules/unictype/property-bidi-pdf: Likewise.
96318         * modules/unictype/property-bidi-segment-separator: Likewise.
96319         * modules/unictype/property-bidi-whitespace: Likewise.
96320         * modules/unictype/property-byname: Likewise.
96321         * modules/unictype/property-combining: Likewise.
96322         * modules/unictype/property-composite: Likewise.
96323         * modules/unictype/property-currency-symbol: Likewise.
96324         * modules/unictype/property-dash: Likewise.
96325         * modules/unictype/property-decimal-digit: Likewise.
96326         * modules/unictype/property-default-ignorable-code-point: Likewise.
96327         * modules/unictype/property-deprecated: Likewise.
96328         * modules/unictype/property-diacritic: Likewise.
96329         * modules/unictype/property-extender: Likewise.
96330         * modules/unictype/property-format-control: Likewise.
96331         * modules/unictype/property-grapheme-base: Likewise.
96332         * modules/unictype/property-grapheme-extend: Likewise.
96333         * modules/unictype/property-grapheme-link: Likewise.
96334         * modules/unictype/property-hex-digit: Likewise.
96335         * modules/unictype/property-hyphen: Likewise.
96336         * modules/unictype/property-id-continue: Likewise.
96337         * modules/unictype/property-id-start: Likewise.
96338         * modules/unictype/property-ideographic: Likewise.
96339         * modules/unictype/property-ids-binary-operator: Likewise.
96340         * modules/unictype/property-ids-trinary-operator: Likewise.
96341         * modules/unictype/property-ignorable-control: Likewise.
96342         * modules/unictype/property-iso-control: Likewise.
96343         * modules/unictype/property-join-control: Likewise.
96344         * modules/unictype/property-left-of-pair: Likewise.
96345         * modules/unictype/property-line-separator: Likewise.
96346         * modules/unictype/property-logical-order-exception: Likewise.
96347         * modules/unictype/property-lowercase: Likewise.
96348         * modules/unictype/property-math: Likewise.
96349         * modules/unictype/property-non-break: Likewise.
96350         * modules/unictype/property-not-a-character: Likewise.
96351         * modules/unictype/property-numeric: Likewise.
96352         * modules/unictype/property-other-alphabetic: Likewise.
96353         * modules/unictype/property-other-default-ignorable-code-point: Likewise.
96354         * modules/unictype/property-other-grapheme-extend: Likewise.
96355         * modules/unictype/property-other-id-continue: Likewise.
96356         * modules/unictype/property-other-id-start: Likewise.
96357         * modules/unictype/property-other-lowercase: Likewise.
96358         * modules/unictype/property-other-math: Likewise.
96359         * modules/unictype/property-other-uppercase: Likewise.
96360         * modules/unictype/property-paired-punctuation: Likewise.
96361         * modules/unictype/property-paragraph-separator: Likewise.
96362         * modules/unictype/property-pattern-syntax: Likewise.
96363         * modules/unictype/property-pattern-white-space: Likewise.
96364         * modules/unictype/property-private-use: Likewise.
96365         * modules/unictype/property-punctuation: Likewise.
96366         * modules/unictype/property-quotation-mark: Likewise.
96367         * modules/unictype/property-radical: Likewise.
96368         * modules/unictype/property-sentence-terminal: Likewise.
96369         * modules/unictype/property-soft-dotted: Likewise.
96370         * modules/unictype/property-space: Likewise.
96371         * modules/unictype/property-terminal-punctuation: Likewise.
96372         * modules/unictype/property-test: Likewise.
96373         * modules/unictype/property-titlecase: Likewise.
96374         * modules/unictype/property-unassigned-code-value: Likewise.
96375         * modules/unictype/property-unified-ideograph: Likewise.
96376         * modules/unictype/property-uppercase: Likewise.
96377         * modules/unictype/property-variation-selector: Likewise.
96378         * modules/unictype/property-white-space: Likewise.
96379         * modules/unictype/property-xid-continue: Likewise.
96380         * modules/unictype/property-xid-start: Likewise.
96381         * modules/unictype/property-zero-width: Likewise.
96382         * modules/unictype/scripts: Likewise.
96383         * modules/unictype/syntax-c-ident: Likewise.
96384         * modules/unictype/syntax-c-whitespace: Likewise.
96385         * modules/unictype/syntax-java-ident: Likewise.
96386         * modules/unictype/syntax-java-whitespace: Likewise.
96387         * modules/unilbrk/u8-possible-linebreaks: Likewise.
96388         * modules/unilbrk/u8-width-linebreaks: Likewise.
96389         * modules/unilbrk/u16-possible-linebreaks: Likewise.
96390         * modules/unilbrk/u16-width-linebreaks: Likewise.
96391         * modules/unilbrk/u32-possible-linebreaks: Likewise.
96392         * modules/unilbrk/u32-width-linebreaks: Likewise.
96393         * modules/unilbrk/ulc-possible-linebreaks: Likewise.
96394         * modules/unilbrk/ulc-width-linebreaks: Likewise.
96395         * modules/uniname/uniname: Likewise.
96396         * modules/uninorm/canonical-decomposition: Likewise.
96397         * modules/uninorm/composition: Likewise.
96398         * modules/uninorm/decomposing-form: Likewise.
96399         * modules/uninorm/decomposition: Likewise.
96400         * modules/uninorm/filter: Likewise.
96401         * modules/uninorm/nfc: Likewise.
96402         * modules/uninorm/nfd: Likewise.
96403         * modules/uninorm/nfkc: Likewise.
96404         * modules/uninorm/nfkd: Likewise.
96405         * modules/uninorm/u8-normalize: Likewise.
96406         * modules/uninorm/u8-normcmp: Likewise.
96407         * modules/uninorm/u8-normcoll: Likewise.
96408         * modules/uninorm/u8-normxfrm: Likewise.
96409         * modules/uninorm/u16-normalize: Likewise.
96410         * modules/uninorm/u16-normcmp: Likewise.
96411         * modules/uninorm/u16-normcoll: Likewise.
96412         * modules/uninorm/u16-normxfrm: Likewise.
96413         * modules/uninorm/u32-normalize: Likewise.
96414         * modules/uninorm/u32-normcmp: Likewise.
96415         * modules/uninorm/u32-normcoll: Likewise.
96416         * modules/uninorm/u32-normxfrm: Likewise.
96417         * modules/unistdio/u8-asnprintf: Likewise.
96418         * modules/unistdio/u8-asprintf: Likewise.
96419         * modules/unistdio/u8-snprintf: Likewise.
96420         * modules/unistdio/u8-sprintf: Likewise.
96421         * modules/unistdio/u8-u8-asnprintf: Likewise.
96422         * modules/unistdio/u8-u8-asprintf: Likewise.
96423         * modules/unistdio/u8-u8-snprintf: Likewise.
96424         * modules/unistdio/u8-u8-sprintf: Likewise.
96425         * modules/unistdio/u8-u8-vasnprintf: Likewise.
96426         * modules/unistdio/u8-u8-vasprintf: Likewise.
96427         * modules/unistdio/u8-u8-vsnprintf: Likewise.
96428         * modules/unistdio/u8-u8-vsprintf: Likewise.
96429         * modules/unistdio/u8-vasnprintf: Likewise.
96430         * modules/unistdio/u8-vasprintf: Likewise.
96431         * modules/unistdio/u8-vsnprintf: Likewise.
96432         * modules/unistdio/u8-vsprintf: Likewise.
96433         * modules/unistdio/u16-asnprintf: Likewise.
96434         * modules/unistdio/u16-asprintf: Likewise.
96435         * modules/unistdio/u16-snprintf: Likewise.
96436         * modules/unistdio/u16-sprintf: Likewise.
96437         * modules/unistdio/u16-u16-asnprintf: Likewise.
96438         * modules/unistdio/u16-u16-asprintf: Likewise.
96439         * modules/unistdio/u16-u16-snprintf: Likewise.
96440         * modules/unistdio/u16-u16-sprintf: Likewise.
96441         * modules/unistdio/u16-u16-vasnprintf: Likewise.
96442         * modules/unistdio/u16-u16-vasprintf: Likewise.
96443         * modules/unistdio/u16-u16-vsnprintf: Likewise.
96444         * modules/unistdio/u16-u16-vsprintf: Likewise.
96445         * modules/unistdio/u16-vasnprintf: Likewise.
96446         * modules/unistdio/u16-vasprintf: Likewise.
96447         * modules/unistdio/u16-vsnprintf: Likewise.
96448         * modules/unistdio/u16-vsprintf: Likewise.
96449         * modules/unistdio/u32-asnprintf: Likewise.
96450         * modules/unistdio/u32-asprintf: Likewise.
96451         * modules/unistdio/u32-snprintf: Likewise.
96452         * modules/unistdio/u32-sprintf: Likewise.
96453         * modules/unistdio/u32-u32-asnprintf: Likewise.
96454         * modules/unistdio/u32-u32-asprintf: Likewise.
96455         * modules/unistdio/u32-u32-snprintf: Likewise.
96456         * modules/unistdio/u32-u32-sprintf: Likewise.
96457         * modules/unistdio/u32-u32-vasnprintf: Likewise.
96458         * modules/unistdio/u32-u32-vasprintf: Likewise.
96459         * modules/unistdio/u32-u32-vsnprintf: Likewise.
96460         * modules/unistdio/u32-u32-vsprintf: Likewise.
96461         * modules/unistdio/u32-vasnprintf: Likewise.
96462         * modules/unistdio/u32-vasprintf: Likewise.
96463         * modules/unistdio/u32-vsnprintf: Likewise.
96464         * modules/unistdio/u32-vsprintf: Likewise.
96465         * modules/unistdio/ulc-asnprintf: Likewise.
96466         * modules/unistdio/ulc-asprintf: Likewise.
96467         * modules/unistdio/ulc-fprintf: Likewise.
96468         * modules/unistdio/ulc-snprintf: Likewise.
96469         * modules/unistdio/ulc-sprintf: Likewise.
96470         * modules/unistdio/ulc-vasnprintf: Likewise.
96471         * modules/unistdio/ulc-vasprintf: Likewise.
96472         * modules/unistdio/ulc-vfprintf: Likewise.
96473         * modules/unistdio/ulc-vsnprintf: Likewise.
96474         * modules/unistdio/ulc-vsprintf: Likewise.
96475         * modules/unistr/u8-check: Likewise.
96476         * modules/unistr/u8-chr: Likewise.
96477         * modules/unistr/u8-cmp: Likewise.
96478         * modules/unistr/u8-cmp2: Likewise.
96479         * modules/unistr/u8-cpy: Likewise.
96480         * modules/unistr/u8-cpy-alloc: Likewise.
96481         * modules/unistr/u8-endswith: Likewise.
96482         * modules/unistr/u8-mblen: Likewise.
96483         * modules/unistr/u8-mbsnlen: Likewise.
96484         * modules/unistr/u8-mbtouc: Likewise.
96485         * modules/unistr/u8-mbtouc-unsafe: Likewise.
96486         * modules/unistr/u8-mbtoucr: Likewise.
96487         * modules/unistr/u8-move: Likewise.
96488         * modules/unistr/u8-next: Likewise.
96489         * modules/unistr/u8-prev: Likewise.
96490         * modules/unistr/u8-set: Likewise.
96491         * modules/unistr/u8-startswith: Likewise.
96492         * modules/unistr/u8-stpcpy: Likewise.
96493         * modules/unistr/u8-stpncpy: Likewise.
96494         * modules/unistr/u8-strcat: Likewise.
96495         * modules/unistr/u8-strchr: Likewise.
96496         * modules/unistr/u8-strcmp: Likewise.
96497         * modules/unistr/u8-strcoll: Likewise.
96498         * modules/unistr/u8-strcpy: Likewise.
96499         * modules/unistr/u8-strcspn: Likewise.
96500         * modules/unistr/u8-strdup: Likewise.
96501         * modules/unistr/u8-strlen: Likewise.
96502         * modules/unistr/u8-strmblen: Likewise.
96503         * modules/unistr/u8-strmbtouc: Likewise.
96504         * modules/unistr/u8-strncat: Likewise.
96505         * modules/unistr/u8-strncmp: Likewise.
96506         * modules/unistr/u8-strncpy: Likewise.
96507         * modules/unistr/u8-strnlen: Likewise.
96508         * modules/unistr/u8-strpbrk: Likewise.
96509         * modules/unistr/u8-strrchr: Likewise.
96510         * modules/unistr/u8-strspn: Likewise.
96511         * modules/unistr/u8-strstr: Likewise.
96512         * modules/unistr/u8-strtok: Likewise.
96513         * modules/unistr/u8-to-u16: Likewise.
96514         * modules/unistr/u8-to-u32: Likewise.
96515         * modules/unistr/u8-uctomb: Likewise.
96516         * modules/unistr/u16-check: Likewise.
96517         * modules/unistr/u16-chr: Likewise.
96518         * modules/unistr/u16-cmp: Likewise.
96519         * modules/unistr/u16-cmp2: Likewise.
96520         * modules/unistr/u16-cpy: Likewise.
96521         * modules/unistr/u16-cpy-alloc: Likewise.
96522         * modules/unistr/u16-endswith: Likewise.
96523         * modules/unistr/u16-mblen: Likewise.
96524         * modules/unistr/u16-mbsnlen: Likewise.
96525         * modules/unistr/u16-mbtouc: Likewise.
96526         * modules/unistr/u16-mbtouc-unsafe: Likewise.
96527         * modules/unistr/u16-mbtoucr: Likewise.
96528         * modules/unistr/u16-move: Likewise.
96529         * modules/unistr/u16-next: Likewise.
96530         * modules/unistr/u16-prev: Likewise.
96531         * modules/unistr/u16-set: Likewise.
96532         * modules/unistr/u16-startswith: Likewise.
96533         * modules/unistr/u16-stpcpy: Likewise.
96534         * modules/unistr/u16-stpncpy: Likewise.
96535         * modules/unistr/u16-strcat: Likewise.
96536         * modules/unistr/u16-strchr: Likewise.
96537         * modules/unistr/u16-strcmp: Likewise.
96538         * modules/unistr/u16-strcoll: Likewise.
96539         * modules/unistr/u16-strcpy: Likewise.
96540         * modules/unistr/u16-strcspn: Likewise.
96541         * modules/unistr/u16-strdup: Likewise.
96542         * modules/unistr/u16-strlen: Likewise.
96543         * modules/unistr/u16-strmblen: Likewise.
96544         * modules/unistr/u16-strmbtouc: Likewise.
96545         * modules/unistr/u16-strncat: Likewise.
96546         * modules/unistr/u16-strncmp: Likewise.
96547         * modules/unistr/u16-strncpy: Likewise.
96548         * modules/unistr/u16-strnlen: Likewise.
96549         * modules/unistr/u16-strpbrk: Likewise.
96550         * modules/unistr/u16-strrchr: Likewise.
96551         * modules/unistr/u16-strspn: Likewise.
96552         * modules/unistr/u16-strstr: Likewise.
96553         * modules/unistr/u16-strtok: Likewise.
96554         * modules/unistr/u16-to-u32: Likewise.
96555         * modules/unistr/u16-to-u8: Likewise.
96556         * modules/unistr/u16-uctomb: Likewise.
96557         * modules/unistr/u32-check: Likewise.
96558         * modules/unistr/u32-chr: Likewise.
96559         * modules/unistr/u32-cmp: Likewise.
96560         * modules/unistr/u32-cmp2: Likewise.
96561         * modules/unistr/u32-cpy: Likewise.
96562         * modules/unistr/u32-cpy-alloc: Likewise.
96563         * modules/unistr/u32-endswith: Likewise.
96564         * modules/unistr/u32-mblen: Likewise.
96565         * modules/unistr/u32-mbsnlen: Likewise.
96566         * modules/unistr/u32-mbtouc: Likewise.
96567         * modules/unistr/u32-mbtouc-unsafe: Likewise.
96568         * modules/unistr/u32-mbtoucr: Likewise.
96569         * modules/unistr/u32-move: Likewise.
96570         * modules/unistr/u32-next: Likewise.
96571         * modules/unistr/u32-prev: Likewise.
96572         * modules/unistr/u32-set: Likewise.
96573         * modules/unistr/u32-startswith: Likewise.
96574         * modules/unistr/u32-stpcpy: Likewise.
96575         * modules/unistr/u32-stpncpy: Likewise.
96576         * modules/unistr/u32-strcat: Likewise.
96577         * modules/unistr/u32-strchr: Likewise.
96578         * modules/unistr/u32-strcmp: Likewise.
96579         * modules/unistr/u32-strcoll: Likewise.
96580         * modules/unistr/u32-strcpy: Likewise.
96581         * modules/unistr/u32-strcspn: Likewise.
96582         * modules/unistr/u32-strdup: Likewise.
96583         * modules/unistr/u32-strlen: Likewise.
96584         * modules/unistr/u32-strmblen: Likewise.
96585         * modules/unistr/u32-strmbtouc: Likewise.
96586         * modules/unistr/u32-strncat: Likewise.
96587         * modules/unistr/u32-strncmp: Likewise.
96588         * modules/unistr/u32-strncpy: Likewise.
96589         * modules/unistr/u32-strnlen: Likewise.
96590         * modules/unistr/u32-strpbrk: Likewise.
96591         * modules/unistr/u32-strrchr: Likewise.
96592         * modules/unistr/u32-strspn: Likewise.
96593         * modules/unistr/u32-strstr: Likewise.
96594         * modules/unistr/u32-strtok: Likewise.
96595         * modules/unistr/u32-to-u16: Likewise.
96596         * modules/unistr/u32-to-u8: Likewise.
96597         * modules/unistr/u32-uctomb: Likewise.
96598         * modules/uniwbrk/u8-wordbreaks: Likewise.
96599         * modules/uniwbrk/u16-wordbreaks: Likewise.
96600         * modules/uniwbrk/u32-wordbreaks: Likewise.
96601         * modules/uniwbrk/ulc-wordbreaks: Likewise.
96602         * modules/uniwbrk/wordbreak-property: Likewise.
96603         * modules/uniwidth/u8-strwidth: Likewise.
96604         * modules/uniwidth/u8-width: Likewise.
96605         * modules/uniwidth/u16-strwidth: Likewise.
96606         * modules/uniwidth/u16-width: Likewise.
96607         * modules/uniwidth/u32-strwidth: Likewise.
96608         * modules/uniwidth/u32-width: Likewise.
96609         * modules/uniwidth/width: Likewise.
96610         * modules/unicase/cased-tests (Makefile.am): Link all test programs
96611         with $(LIBUNISTRING).
96612         * modules/unicase/ignorable-tests: Likewise.
96613         * modules/unicase/locale-language-tests: Likewise.
96614         * modules/unicase/tolower-tests: Likewise.
96615         * modules/unicase/totitle-tests: Likewise.
96616         * modules/unicase/toupper-tests: Likewise.
96617         * modules/unicase/u8-casecmp-tests: Likewise.
96618         * modules/unicase/u8-casecoll-tests: Likewise.
96619         * modules/unicase/u8-casefold-tests: Likewise.
96620         * modules/unicase/u8-is-cased-tests: Likewise.
96621         * modules/unicase/u8-is-casefolded-tests: Likewise.
96622         * modules/unicase/u8-is-lowercase-tests: Likewise.
96623         * modules/unicase/u8-is-titlecase-tests: Likewise.
96624         * modules/unicase/u8-is-uppercase-tests: Likewise.
96625         * modules/unicase/u8-tolower-tests: Likewise.
96626         * modules/unicase/u8-totitle-tests: Likewise.
96627         * modules/unicase/u8-toupper-tests: Likewise.
96628         * modules/unicase/u16-casecmp-tests: Likewise.
96629         * modules/unicase/u16-casecoll-tests: Likewise.
96630         * modules/unicase/u16-casefold-tests: Likewise.
96631         * modules/unicase/u16-is-cased-tests: Likewise.
96632         * modules/unicase/u16-is-casefolded-tests: Likewise.
96633         * modules/unicase/u16-is-lowercase-tests: Likewise.
96634         * modules/unicase/u16-is-titlecase-tests: Likewise.
96635         * modules/unicase/u16-is-uppercase-tests: Likewise.
96636         * modules/unicase/u16-tolower-tests: Likewise.
96637         * modules/unicase/u16-totitle-tests: Likewise.
96638         * modules/unicase/u16-toupper-tests: Likewise.
96639         * modules/unicase/u32-casecmp-tests: Likewise.
96640         * modules/unicase/u32-casecoll-tests: Likewise.
96641         * modules/unicase/u32-casefold-tests: Likewise.
96642         * modules/unicase/u32-is-cased-tests: Likewise.
96643         * modules/unicase/u32-is-casefolded-tests: Likewise.
96644         * modules/unicase/u32-is-lowercase-tests: Likewise.
96645         * modules/unicase/u32-is-titlecase-tests: Likewise.
96646         * modules/unicase/u32-is-uppercase-tests: Likewise.
96647         * modules/unicase/u32-tolower-tests: Likewise.
96648         * modules/unicase/u32-totitle-tests: Likewise.
96649         * modules/unicase/u32-toupper-tests: Likewise.
96650         * modules/unicase/ulc-casecmp-tests: Likewise.
96651         * modules/unicase/ulc-casecoll-tests: Likewise.
96652         * modules/uniconv/u8-conv-from-enc-tests: Likewise.
96653         * modules/uniconv/u8-conv-to-enc-tests: Likewise.
96654         * modules/uniconv/u8-strconv-from-enc-tests: Likewise.
96655         * modules/uniconv/u8-strconv-to-enc-tests: Likewise.
96656         * modules/uniconv/u16-conv-from-enc-tests: Likewise.
96657         * modules/uniconv/u16-conv-to-enc-tests: Likewise.
96658         * modules/uniconv/u16-strconv-from-enc-tests: Likewise.
96659         * modules/uniconv/u16-strconv-to-enc-tests: Likewise.
96660         * modules/uniconv/u32-conv-from-enc-tests: Likewise.
96661         * modules/uniconv/u32-conv-to-enc-tests: Likewise.
96662         * modules/uniconv/u32-strconv-from-enc-tests: Likewise.
96663         * modules/uniconv/u32-strconv-to-enc-tests: Likewise.
96664         * modules/unictype/bidicategory-byname-tests: Likewise.
96665         * modules/unictype/bidicategory-name-tests: Likewise.
96666         * modules/unictype/bidicategory-of-tests: Likewise.
96667         * modules/unictype/bidicategory-test-tests: Likewise.
96668         * modules/unictype/block-list-tests: Likewise.
96669         * modules/unictype/block-of-tests: Likewise.
96670         * modules/unictype/block-test-tests: Likewise.
96671         * modules/unictype/category-C-tests: Likewise.
96672         * modules/unictype/category-Cc-tests: Likewise.
96673         * modules/unictype/category-Cf-tests: Likewise.
96674         * modules/unictype/category-Cn-tests: Likewise.
96675         * modules/unictype/category-Co-tests: Likewise.
96676         * modules/unictype/category-Cs-tests: Likewise.
96677         * modules/unictype/category-L-tests: Likewise.
96678         * modules/unictype/category-Ll-tests: Likewise.
96679         * modules/unictype/category-Lm-tests: Likewise.
96680         * modules/unictype/category-Lo-tests: Likewise.
96681         * modules/unictype/category-Lt-tests: Likewise.
96682         * modules/unictype/category-Lu-tests: Likewise.
96683         * modules/unictype/category-M-tests: Likewise.
96684         * modules/unictype/category-Mc-tests: Likewise.
96685         * modules/unictype/category-Me-tests: Likewise.
96686         * modules/unictype/category-Mn-tests: Likewise.
96687         * modules/unictype/category-N-tests: Likewise.
96688         * modules/unictype/category-Nd-tests: Likewise.
96689         * modules/unictype/category-Nl-tests: Likewise.
96690         * modules/unictype/category-No-tests: Likewise.
96691         * modules/unictype/category-P-tests: Likewise.
96692         * modules/unictype/category-Pc-tests: Likewise.
96693         * modules/unictype/category-Pd-tests: Likewise.
96694         * modules/unictype/category-Pe-tests: Likewise.
96695         * modules/unictype/category-Pf-tests: Likewise.
96696         * modules/unictype/category-Pi-tests: Likewise.
96697         * modules/unictype/category-Po-tests: Likewise.
96698         * modules/unictype/category-Ps-tests: Likewise.
96699         * modules/unictype/category-S-tests: Likewise.
96700         * modules/unictype/category-Sc-tests: Likewise.
96701         * modules/unictype/category-Sk-tests: Likewise.
96702         * modules/unictype/category-Sm-tests: Likewise.
96703         * modules/unictype/category-So-tests: Likewise.
96704         * modules/unictype/category-Z-tests: Likewise.
96705         * modules/unictype/category-Zl-tests: Likewise.
96706         * modules/unictype/category-Zp-tests: Likewise.
96707         * modules/unictype/category-Zs-tests: Likewise.
96708         * modules/unictype/category-and-not-tests: Likewise.
96709         * modules/unictype/category-and-tests: Likewise.
96710         * modules/unictype/category-byname-tests: Likewise.
96711         * modules/unictype/category-name-tests: Likewise.
96712         * modules/unictype/category-none-tests: Likewise.
96713         * modules/unictype/category-of-tests: Likewise.
96714         * modules/unictype/category-or-tests: Likewise.
96715         * modules/unictype/category-test-withtable-tests: Likewise.
96716         * modules/unictype/combining-class-tests: Likewise.
96717         * modules/unictype/ctype-alnum-tests: Likewise.
96718         * modules/unictype/ctype-alpha-tests: Likewise.
96719         * modules/unictype/ctype-blank-tests: Likewise.
96720         * modules/unictype/ctype-cntrl-tests: Likewise.
96721         * modules/unictype/ctype-digit-tests: Likewise.
96722         * modules/unictype/ctype-graph-tests: Likewise.
96723         * modules/unictype/ctype-lower-tests: Likewise.
96724         * modules/unictype/ctype-print-tests: Likewise.
96725         * modules/unictype/ctype-punct-tests: Likewise.
96726         * modules/unictype/ctype-space-tests: Likewise.
96727         * modules/unictype/ctype-upper-tests: Likewise.
96728         * modules/unictype/ctype-xdigit-tests: Likewise.
96729         * modules/unictype/decimal-digit-tests: Likewise.
96730         * modules/unictype/digit-tests: Likewise.
96731         * modules/unictype/mirror-tests: Likewise.
96732         * modules/unictype/numeric-tests: Likewise.
96733         * modules/unictype/property-alphabetic-tests: Likewise.
96734         * modules/unictype/property-ascii-hex-digit-tests: Likewise.
96735         * modules/unictype/property-bidi-arabic-digit-tests: Likewise.
96736         * modules/unictype/property-bidi-arabic-right-to-left-tests: Likewise.
96737         * modules/unictype/property-bidi-block-separator-tests: Likewise.
96738         * modules/unictype/property-bidi-boundary-neutral-tests: Likewise.
96739         * modules/unictype/property-bidi-common-separator-tests: Likewise.
96740         * modules/unictype/property-bidi-control-tests: Likewise.
96741         * modules/unictype/property-bidi-embedding-or-override-tests: Likewise.
96742         * modules/unictype/property-bidi-eur-num-separator-tests: Likewise.
96743         * modules/unictype/property-bidi-eur-num-terminator-tests: Likewise.
96744         * modules/unictype/property-bidi-european-digit-tests: Likewise.
96745         * modules/unictype/property-bidi-hebrew-right-to-left-tests: Likewise.
96746         * modules/unictype/property-bidi-left-to-right-tests: Likewise.
96747         * modules/unictype/property-bidi-non-spacing-mark-tests: Likewise.
96748         * modules/unictype/property-bidi-other-neutral-tests: Likewise.
96749         * modules/unictype/property-bidi-pdf-tests: Likewise.
96750         * modules/unictype/property-bidi-segment-separator-tests: Likewise.
96751         * modules/unictype/property-bidi-whitespace-tests: Likewise.
96752         * modules/unictype/property-byname-tests: Likewise.
96753         * modules/unictype/property-combining-tests: Likewise.
96754         * modules/unictype/property-composite-tests: Likewise.
96755         * modules/unictype/property-currency-symbol-tests: Likewise.
96756         * modules/unictype/property-dash-tests: Likewise.
96757         * modules/unictype/property-decimal-digit-tests: Likewise.
96758         * modules/unictype/property-default-ignorable-code-point-tests: Likewise.
96759         * modules/unictype/property-deprecated-tests: Likewise.
96760         * modules/unictype/property-diacritic-tests: Likewise.
96761         * modules/unictype/property-extender-tests: Likewise.
96762         * modules/unictype/property-format-control-tests: Likewise.
96763         * modules/unictype/property-grapheme-base-tests: Likewise.
96764         * modules/unictype/property-grapheme-extend-tests: Likewise.
96765         * modules/unictype/property-grapheme-link-tests: Likewise.
96766         * modules/unictype/property-hex-digit-tests: Likewise.
96767         * modules/unictype/property-hyphen-tests: Likewise.
96768         * modules/unictype/property-id-continue-tests: Likewise.
96769         * modules/unictype/property-id-start-tests: Likewise.
96770         * modules/unictype/property-ideographic-tests: Likewise.
96771         * modules/unictype/property-ids-binary-operator-tests: Likewise.
96772         * modules/unictype/property-ids-trinary-operator-tests: Likewise.
96773         * modules/unictype/property-ignorable-control-tests: Likewise.
96774         * modules/unictype/property-iso-control-tests: Likewise.
96775         * modules/unictype/property-join-control-tests: Likewise.
96776         * modules/unictype/property-left-of-pair-tests: Likewise.
96777         * modules/unictype/property-line-separator-tests: Likewise.
96778         * modules/unictype/property-logical-order-exception-tests: Likewise.
96779         * modules/unictype/property-lowercase-tests: Likewise.
96780         * modules/unictype/property-math-tests: Likewise.
96781         * modules/unictype/property-non-break-tests: Likewise.
96782         * modules/unictype/property-not-a-character-tests: Likewise.
96783         * modules/unictype/property-numeric-tests: Likewise.
96784         * modules/unictype/property-other-alphabetic-tests: Likewise.
96785         * modules/unictype/property-other-default-ignorable-code-point-tests:
96786         Likewise.
96787         * modules/unictype/property-other-grapheme-extend-tests: Likewise.
96788         * modules/unictype/property-other-id-continue-tests: Likewise.
96789         * modules/unictype/property-other-id-start-tests: Likewise.
96790         * modules/unictype/property-other-lowercase-tests: Likewise.
96791         * modules/unictype/property-other-math-tests: Likewise.
96792         * modules/unictype/property-other-uppercase-tests: Likewise.
96793         * modules/unictype/property-paired-punctuation-tests: Likewise.
96794         * modules/unictype/property-paragraph-separator-tests: Likewise.
96795         * modules/unictype/property-pattern-syntax-tests: Likewise.
96796         * modules/unictype/property-pattern-white-space-tests: Likewise.
96797         * modules/unictype/property-private-use-tests: Likewise.
96798         * modules/unictype/property-punctuation-tests: Likewise.
96799         * modules/unictype/property-quotation-mark-tests: Likewise.
96800         * modules/unictype/property-radical-tests: Likewise.
96801         * modules/unictype/property-sentence-terminal-tests: Likewise.
96802         * modules/unictype/property-soft-dotted-tests: Likewise.
96803         * modules/unictype/property-space-tests: Likewise.
96804         * modules/unictype/property-terminal-punctuation-tests: Likewise.
96805         * modules/unictype/property-test-tests: Likewise.
96806         * modules/unictype/property-titlecase-tests: Likewise.
96807         * modules/unictype/property-unassigned-code-value-tests: Likewise.
96808         * modules/unictype/property-unified-ideograph-tests: Likewise.
96809         * modules/unictype/property-uppercase-tests: Likewise.
96810         * modules/unictype/property-variation-selector-tests: Likewise.
96811         * modules/unictype/property-white-space-tests: Likewise.
96812         * modules/unictype/property-xid-continue-tests: Likewise.
96813         * modules/unictype/property-xid-start-tests: Likewise.
96814         * modules/unictype/property-zero-width-tests: Likewise.
96815         * modules/unictype/scripts-tests: Likewise.
96816         * modules/unictype/syntax-c-ident-tests: Likewise.
96817         * modules/unictype/syntax-c-whitespace-tests: Likewise.
96818         * modules/unictype/syntax-java-ident-tests: Likewise.
96819         * modules/unictype/syntax-java-whitespace-tests: Likewise.
96820         * modules/unilbrk/u8-possible-linebreaks-tests: Likewise.
96821         * modules/unilbrk/u8-width-linebreaks-tests: Likewise.
96822         * modules/unilbrk/u16-possible-linebreaks-tests: Likewise.
96823         * modules/unilbrk/u16-width-linebreaks-tests: Likewise.
96824         * modules/unilbrk/u32-possible-linebreaks-tests: Likewise.
96825         * modules/unilbrk/u32-width-linebreaks-tests: Likewise.
96826         * modules/unilbrk/ulc-possible-linebreaks-tests: Likewise.
96827         * modules/unilbrk/ulc-width-linebreaks-tests: Likewise.
96828         * modules/uniname/uniname-tests: Likewise.
96829         * modules/uninorm/canonical-decomposition-tests: Likewise.
96830         * modules/uninorm/compat-decomposition-tests: Likewise.
96831         * modules/uninorm/composition-tests: Likewise.
96832         * modules/uninorm/decomposing-form-tests: Likewise.
96833         * modules/uninorm/decomposition-tests: Likewise.
96834         * modules/uninorm/filter-tests: Likewise.
96835         * modules/uninorm/nfc-tests: Likewise.
96836         * modules/uninorm/nfd-tests: Likewise.
96837         * modules/uninorm/nfkc-tests: Likewise.
96838         * modules/uninorm/nfkd-tests: Likewise.
96839         * modules/uninorm/u8-normcmp-tests: Likewise.
96840         * modules/uninorm/u8-normcoll-tests: Likewise.
96841         * modules/uninorm/u16-normcmp-tests: Likewise.
96842         * modules/uninorm/u16-normcoll-tests: Likewise.
96843         * modules/uninorm/u32-normcmp-tests: Likewise.
96844         * modules/uninorm/u32-normcoll-tests: Likewise.
96845         * modules/unistdio/u8-asnprintf-tests: Likewise.
96846         * modules/unistdio/u8-vasnprintf-tests: Likewise.
96847         * modules/unistdio/u8-vasprintf-tests: Likewise.
96848         * modules/unistdio/u8-vsnprintf-tests: Likewise.
96849         * modules/unistdio/u8-vsprintf-tests: Likewise.
96850         * modules/unistdio/u16-asnprintf-tests: Likewise.
96851         * modules/unistdio/u16-vasnprintf-tests: Likewise.
96852         * modules/unistdio/u16-vasprintf-tests: Likewise.
96853         * modules/unistdio/u16-vsnprintf-tests: Likewise.
96854         * modules/unistdio/u16-vsprintf-tests: Likewise.
96855         * modules/unistdio/u32-asnprintf-tests: Likewise.
96856         * modules/unistdio/u32-vasnprintf-tests: Likewise.
96857         * modules/unistdio/u32-vasprintf-tests: Likewise.
96858         * modules/unistdio/u32-vsnprintf-tests: Likewise.
96859         * modules/unistdio/u32-vsprintf-tests: Likewise.
96860         * modules/unistdio/ulc-asnprintf-tests: Likewise.
96861         * modules/unistdio/ulc-vasnprintf-tests: Likewise.
96862         * modules/unistdio/ulc-vasprintf-tests: Likewise.
96863         * modules/unistdio/ulc-vsnprintf-tests: Likewise.
96864         * modules/unistdio/ulc-vsprintf-tests: Likewise.
96865         * modules/unistr/u8-check-tests: Likewise.
96866         * modules/unistr/u8-chr-tests: Likewise.
96867         * modules/unistr/u8-cmp-tests: Likewise.
96868         * modules/unistr/u8-cmp2-tests: Likewise.
96869         * modules/unistr/u8-cpy-alloc-tests: Likewise.
96870         * modules/unistr/u8-cpy-tests: Likewise.
96871         * modules/unistr/u8-mblen-tests: Likewise.
96872         * modules/unistr/u8-mbsnlen-tests: Likewise.
96873         * modules/unistr/u8-mbtouc-tests: Likewise.
96874         * modules/unistr/u8-mbtouc-unsafe-tests: Likewise.
96875         * modules/unistr/u8-mbtoucr-tests: Likewise.
96876         * modules/unistr/u8-move-tests: Likewise.
96877         * modules/unistr/u8-next-tests: Likewise.
96878         * modules/unistr/u8-prev-tests: Likewise.
96879         * modules/unistr/u8-set-tests: Likewise.
96880         * modules/unistr/u8-stpcpy-tests: Likewise.
96881         * modules/unistr/u8-stpncpy-tests: Likewise.
96882         * modules/unistr/u8-strcat-tests: Likewise.
96883         * modules/unistr/u8-strcmp-tests: Likewise.
96884         * modules/unistr/u8-strcoll-tests: Likewise.
96885         * modules/unistr/u8-strcpy-tests: Likewise.
96886         * modules/unistr/u8-strdup-tests: Likewise.
96887         * modules/unistr/u8-strlen-tests: Likewise.
96888         * modules/unistr/u8-strmblen-tests: Likewise.
96889         * modules/unistr/u8-strmbtouc-tests: Likewise.
96890         * modules/unistr/u8-strncat-tests: Likewise.
96891         * modules/unistr/u8-strncmp-tests: Likewise.
96892         * modules/unistr/u8-strncpy-tests: Likewise.
96893         * modules/unistr/u8-strnlen-tests: Likewise.
96894         * modules/unistr/u8-to-u16-tests: Likewise.
96895         * modules/unistr/u8-to-u32-tests: Likewise.
96896         * modules/unistr/u8-uctomb-tests: Likewise.
96897         * modules/unistr/u16-check-tests: Likewise.
96898         * modules/unistr/u16-chr-tests: Likewise.
96899         * modules/unistr/u16-cmp-tests: Likewise.
96900         * modules/unistr/u16-cmp2-tests: Likewise.
96901         * modules/unistr/u16-cpy-alloc-tests: Likewise.
96902         * modules/unistr/u16-cpy-tests: Likewise.
96903         * modules/unistr/u16-mblen-tests: Likewise.
96904         * modules/unistr/u16-mbsnlen-tests: Likewise.
96905         * modules/unistr/u16-mbtouc-tests: Likewise.
96906         * modules/unistr/u16-mbtouc-unsafe-tests: Likewise.
96907         * modules/unistr/u16-mbtoucr-tests: Likewise.
96908         * modules/unistr/u16-move-tests: Likewise.
96909         * modules/unistr/u16-next-tests: Likewise.
96910         * modules/unistr/u16-prev-tests: Likewise.
96911         * modules/unistr/u16-set-tests: Likewise.
96912         * modules/unistr/u16-stpcpy-tests: Likewise.
96913         * modules/unistr/u16-stpncpy-tests: Likewise.
96914         * modules/unistr/u16-strcat-tests: Likewise.
96915         * modules/unistr/u16-strcmp-tests: Likewise.
96916         * modules/unistr/u16-strcoll-tests: Likewise.
96917         * modules/unistr/u16-strcpy-tests: Likewise.
96918         * modules/unistr/u16-strdup-tests: Likewise.
96919         * modules/unistr/u16-strlen-tests: Likewise.
96920         * modules/unistr/u16-strmblen-tests: Likewise.
96921         * modules/unistr/u16-strmbtouc-tests: Likewise.
96922         * modules/unistr/u16-strncat-tests: Likewise.
96923         * modules/unistr/u16-strncmp-tests: Likewise.
96924         * modules/unistr/u16-strncpy-tests: Likewise.
96925         * modules/unistr/u16-strnlen-tests: Likewise.
96926         * modules/unistr/u16-to-u32-tests: Likewise.
96927         * modules/unistr/u16-to-u8-tests: Likewise.
96928         * modules/unistr/u16-uctomb-tests: Likewise.
96929         * modules/unistr/u32-check-tests: Likewise.
96930         * modules/unistr/u32-chr-tests: Likewise.
96931         * modules/unistr/u32-cmp-tests: Likewise.
96932         * modules/unistr/u32-cmp2-tests: Likewise.
96933         * modules/unistr/u32-cpy-alloc-tests: Likewise.
96934         * modules/unistr/u32-cpy-tests: Likewise.
96935         * modules/unistr/u32-mblen-tests: Likewise.
96936         * modules/unistr/u32-mbsnlen-tests: Likewise.
96937         * modules/unistr/u32-mbtouc-tests: Likewise.
96938         * modules/unistr/u32-mbtouc-unsafe-tests: Likewise.
96939         * modules/unistr/u32-mbtoucr-tests: Likewise.
96940         * modules/unistr/u32-move-tests: Likewise.
96941         * modules/unistr/u32-next-tests: Likewise.
96942         * modules/unistr/u32-prev-tests: Likewise.
96943         * modules/unistr/u32-set-tests: Likewise.
96944         * modules/unistr/u32-stpcpy-tests: Likewise.
96945         * modules/unistr/u32-stpncpy-tests: Likewise.
96946         * modules/unistr/u32-strcat-tests: Likewise.
96947         * modules/unistr/u32-strcmp-tests: Likewise.
96948         * modules/unistr/u32-strcoll-tests: Likewise.
96949         * modules/unistr/u32-strcpy-tests: Likewise.
96950         * modules/unistr/u32-strdup-tests: Likewise.
96951         * modules/unistr/u32-strlen-tests: Likewise.
96952         * modules/unistr/u32-strmblen-tests: Likewise.
96953         * modules/unistr/u32-strmbtouc-tests: Likewise.
96954         * modules/unistr/u32-strncat-tests: Likewise.
96955         * modules/unistr/u32-strncmp-tests: Likewise.
96956         * modules/unistr/u32-strncpy-tests: Likewise.
96957         * modules/unistr/u32-strnlen-tests: Likewise.
96958         * modules/unistr/u32-to-u16-tests: Likewise.
96959         * modules/unistr/u32-to-u8-tests: Likewise.
96960         * modules/unistr/u32-uctomb-tests: Likewise.
96961         * modules/uniwbrk/u8-wordbreaks-tests: Likewise.
96962         * modules/uniwbrk/u16-wordbreaks-tests: Likewise.
96963         * modules/uniwbrk/u32-wordbreaks-tests: Likewise.
96964         * modules/uniwbrk/ulc-wordbreaks-tests: Likewise.
96965         * modules/uniwidth/u8-strwidth-tests: Likewise.
96966         * modules/uniwidth/u8-width-tests: Likewise.
96967         * modules/uniwidth/u16-strwidth-tests: Likewise.
96968         * modules/uniwidth/u16-width-tests: Likewise.
96969         * modules/uniwidth/u32-strwidth-tests: Likewise.
96970         * modules/uniwidth/u32-width-tests: Likewise.
96971         * modules/uniwidth/width-tests: Likewise.
96973 2010-05-18  Richard Jones  <rjones@redhat.com>
96975         doc: users.txt: list hivex
96976         * users.txt: Add hivex.
96978 2010-05-18  Richard Jones  <rjones@redhat.com>
96980         doc: users.txt: list febootstrap
96981         * users.txt: Add febootstrap.
96983 2010-05-17  Giuseppe Scrivano  <gscrivano@gnu.org>
96985         bootstrap: fix an error when gnulib is not used as a git submodule
96986         * build-aux/bootstrap (gnulib_path): If its length is zero then
96987         assign "gnulib" to it.
96988         * build-aux/bootstrap: Redirect "git clone -h" stderr to stdout.
96990 2010-05-16  Bruno Haible  <bruno@clisp.org>
96992         Avoid autoconf warnings about AM_ICONV.
96993         * m4/iconv.m4 (AM_ICONV): Define using AC_DEFUN_ONCE for autoconf >=
96994         2.64.
96996 2010-05-16  Bruno Haible  <bruno@clisp.org>
96998         absolute-header: Make the macro usable in more situations.
96999         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER_ONE): New macro, extracted
97000         from gl_ABSOLUTE_HEADER.
97001         (gl_ABSOLUTE_HEADER): Use it. Fix comment.
97003 2010-05-16  James Youngman  <jay@gnu.org>
97005         doc: update users.txt
97006         * users.txt: Add CSSC.
97008 2010-05-16  Jim Meyering  <meyering@redhat.com>
97010         init.sh: fix an error in the previous change; add more comments
97011         * tests/init.sh: Compare exit code in loop against 9, not 2.
97012         Patch by Bruno Haible.
97013         Make the two tests more similar by adding an empty "then" clause.
97014         Add comments.
97016         init.sh: avoid unnecessary shell re-exec
97017         * tests/init.sh: Improve the re-exec-required check to first test the
97018         current shell.  If it passes the test, do not search for a shell that
97019         does pass, and do not re-exec.  This test is particularly contorted to
97020         avoid triggering misbehavior in Solaris 10's /bin/sh whereby any use
97021         of $(...) evokes a syntax error and causes immediate shell exit with
97022         status 2.  Bruno Haible reported that the re-exec made it impossible
97023         to single-step through any init.sh-using script.
97025 2010-05-16  Bruno Haible  <bruno@clisp.org>
97027         Fix collision between gnulib's and libintl's printf replacements.
97028         * lib/stdio.in.h (_GL_STDIO_STRINGIZE,
97029         _GL_STDIO_MACROEXPAND_AND_STRINGIZE): New macros.
97030         (printf): When using GNU C, map the __printf__ function to rpl_printf
97031         via __asm__. When not using GNU C, define rpl_printf instead of
97032         __printf__.
97033         * lib/printf.c: Ignore DEPENDS_ON_LIBINTL. Undoes the 2010-03-25
97034         commit.
97035         * lib/stdio-write.c: Ignore DEPENDS_ON_LIBINTL. Undoes the 2009-08-10
97036         commit.
97037         * m4/asm-underscore.m4: New file.
97038         * m4/stdio_h.m4 (gl_STDIO_H): Require gl_ASM_SYMBOL_PREFIX.
97039         * modules/stdio (Files): Add m4/asm-underscore.m4.
97040         (Makefile.am): Substitute ASM_SYMBOL_PREFIX.
97041         Reported by Ben Pfaff.
97043 2010-05-16  Bruno Haible  <bruno@clisp.org>
97045         verify: Avoid skipping the test on openSUSE 11.0.
97046         * tests/test-verify.sh: Unset MALLOC_PERTURB_.
97048 2010-05-13  Bruno Haible  <bruno@clisp.org>
97050         Avoid useless warnings from G++.
97051         * build-aux/c++defs.h (_GL_CXXALIASWARN_2, _GL_CXXALIASWARN1_2): Don't
97052         use _GL_WARN_ON_USE or _GL_WARN_ON_USE_CXX when optimizing.
97053         Reported by Jarno Rajahalme <jarno.rajahalme@nsn.com>.
97055 2010-05-11  Jim Meyering  <meyering@redhat.com>
97057         maint.mk: tweak preceding change
97058         * top/maint.mk (gl_extract_significant_defines_): Make exclusion
97059         regexps tighter by anchoring at EOL, and make the new group "shy"
97060         for slightly decreased overhead.
97062 2010-05-11  Eric Blake  <eblake@redhat.com>
97064         maint.mk: gnulib doesn't guarantee NSIG
97065         * top/maint.mk (gl_extract_significant_defines_): Exclude NSIG.
97067 2010-05-10  Peter O'Gorman  <pogma@thewrittenword.com>
97069         test-pwrite.c: Remove unused variable declaration.
97070         * tests/test-pwrite.c (main): Remove read_buf declaration.
97072         Remove useless test-pwrite.sh file.
97073         * tests/test-pwrite.sh: Delete file.
97074         * modules/pwrite-tests: Remove references.
97075         Reported by Bruno Haible.
97077 2010-05-10  Peter O'Gorman  <pogma@thewrittenword.com>
97079         init.sh: fix a typo
97080         * tests/init.sh: Correct typo in MALLOC_PERTURB_ initialization.
97082 2010-05-10  Jim Meyering  <meyering@redhat.com>
97084         maint.mk: avoid using a temporary file in the always-defined-macros check
97085         * top/maint.mk (.re-defmac): Remove rule.
97086         (gl_trap_): Remove definition.
97087         (sc_prohibit_always-defined_macros): Rewrite not to create and
97088         depend on a temporary file.  Instead, depend on GNU grep's ability
97089         to read a list of regular expressions from stdin when given "-f -".
97091 2010-05-09  Bruno Haible  <bruno@clisp.org>
97093         Update to GNU gettext 0.18, part 1.
97094         * m4/gettext.m4: Update to GNU gettext 0.18.
97095         * m4/intl.m4: Likewise.
97096         * m4/po.m4: Likewise.
97097         * modules/gettext (Files): Add m4/fcntl-o.m4.
97098         (configure.ac): Require gettext infrastructure from version 0.18.
97100 2010-05-09  Jim Meyering  <meyering@redhat.com>
97102         init.sh: enable MALLOC_PERTURB_
97103         * tests/init.sh: Enable glibc's malloc-perturbing option.
97105         maint.mk: improve sc_cross_check_PATH_usage_in_tests
97106         With my recent change in init.sh from the two-line form:
97107             -#   : ${srcdir=.}
97108             -#   . "$srcdir/init.sh"; path_prepend_ .
97109             +#   . "${srcdir=.}/init.sh"; path_prepend_ .
97110         I noticed that using the one-line form would cause this test
97111         to fail with a false-positive, or to stop working altogether,
97112         depending on whether help-version changed or all the tests did.
97113         * top/maint.mk (_hv_regex): Remove this definition.
97114         (_hv_regex_weak): Use a weak regex to select all init.sh-sourcing files.
97115         (_hv_regex_strong): Use a stronger regex to check for conformance.
97116         (sc_cross_check_PATH_usage_in_tests): Rewrite to use the above.
97117         Give a separate diagnostic for lack of conforming use.
97119         maint.mk: prohibit definition of symbols defined by gnulib
97120         * top/maint.mk (sc_prohibit_always-defined_macros): Reject the
97121         definition of symbols defined by gnulib.
97123 2010-05-09  Bruno Haible  <bruno@clisp.org>
97125         acl: Avoid test failure on Cygwin-hosted mingw.
97126         * tests/test-set-mode-acl.sh: Skip test if USE_ACL is 0.
97128 2010-05-09  Bruno Haible  <bruno@clisp.org>
97130         error: Use system's fcntl function.
97131         * lib/error.c (fcntl): Undefine.
97133 2010-05-09  Jim Meyering  <meyering@redhat.com>
97135         verify: adjust formatting to be more consistent
97136         * lib/verify.h (_GL_GENSYM): Add a space before each of a few
97137         argument-list '('s, and after one comma.
97139 2010-05-09  Bruno Haible  <bruno@clisp.org>
97141         error: More reliable output on mingw.
97142         * lib/error.c: Include <windows.h>.
97143         (is_open): New function.
97144         (flush_stdout): Call it instead of fcntl, also if F_GETFL is not
97145         defined.
97147 2010-05-09  Bruno Haible  <bruno@clisp.org>
97149         vasnprintf: Fix syntax errors in libintl build on mingw.
97150         * lib/vasnprintf.c (VASNPRINTF): Move a closing brace. Undefine
97151         pad_ourselves and prec_ourselves after use.
97153 2010-05-08  Bruno Haible  <bruno@clisp.org>
97155         * lib/config.charset: Update comments for Cygwin 1.7.
97156         * lib/localcharset.c: Likewise.
97158 2010-05-07  Jim Meyering  <meyering@redhat.com>
97160         init.sh: improve comments
97161         * tests/init.sh: Recommend the one-line init.sh-sourcing idiom:
97162         . "${srcdir=.}/init.sh"; path_prepend_ .
97163         Add a note about path_prepend_ and the alternative of using
97164         TESTS_ENVIRONMENT.
97166 2010-05-06  Sergey Poznyakoff  <gray@gnu.org.ua>
97168         exclude: Unescape hashed patterns in wildcard mode.
97169         * lib/exclude.c (add_exclude): Unescape the pattern before adding it
97170         to the hash list.
97171         * tests/test-exclude8.sh: New test case.
97172         * modules/exclude-tests: Add new test.
97174 2010-05-05  Eric Blake  <eblake@redhat.com>
97176         verify: automate tests
97177         * modules/verify-tests: New module.
97178         * tests/test-verify.sh: New file.
97179         * tests/test-verify.c: Guard each negative test with a unique id.
97180         Also avoid warning about unused left hand of comma expressions.
97182 2010-05-05  Paul Eggert  <eggert@cs.ucla.edu>
97184         Further improvements to verify.h, suggested by Eric Blake.
97185         * lib/verify.h (_GL_CONCAT, _GL_CONCAT0, _GL_GENSYM): Renamed from
97186         the GL_* versions, to avoid collision with OpenGL.
97187         (_GL_COUNTER): New macro, so that we can fall back on __LINE__ if
97188         __COUNTER__ doesn't work.  Test that __COUNTER__ increments rather
97189         than testing merely whether it's defined.
97191         Modify verify.h to pacify gcc -Wredundant_decls.
97192         * lib/verify.h (GL_CONCAT, GL_CONCAT0, GL_GENSYM): New macros.
97193         These use the prefix "GL_" since they're likely to be useful elsewhere.
97194         We may need to break them out into a different .h file.
97195         (__COUNTER__): Define to 0 if the compiler doesn't support it.
97196         (verify) [!defined __cplusplus]: Use them to avoid duplicate decls
97197         of verify_function__.
97199 2010-05-05  Peter O'Gorman  <pogma@thewrittenword.com>
97201         Tests for module pwrite.
97202         * modules/pwrite-tests: New file.
97203         * tests/test-pwrite.sh: New file.
97204         * tests/test-pwrite.c: New file.
97206         New module pwrite.
97207         * lib/unistd.in.h (pwrite): New declaration.
97208         * lib/pwrite.c: New file, from glibc with modifications.
97209         * m4/pwrite.m4: New file.
97210         * m4/unistd_h.m4 (gl_UNISTD_H): Test whether pwrite is declared.
97211         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_PWRITE, HAVE_PWRITE,
97212         REPLACE_PWRITE.
97213         * modules/pwrite: New file.
97214         * modules/unistd (Makefile.am): Substitute GNULIB_PWRITE, HAVE_PWRITE,
97215         REPLACE_PWRITE.
97216         * tests/test-unistd-c++.cc: Check GNULIB_NAMESPACE::pwrite.
97217         * doc/posix-functions/pwrite.texi: Mention the new module.
97219 2010-05-05  Peter O'Gorman  <pogma@thewrittenword.com>
97221         pread: Update documentation.
97222         * doc/posix-functions/pread.texi: Mention the 'pread' module.
97224 2010-05-04  Eric Blake  <eblake@redhat.com>
97226         docs: update cygwin progress
97227         * doc/posix-functions/wctob.texi (wctob): Cygwin 1.7.6 will fix
97228         this bug.
97229         * doc/glibc-functions/get_nprocs_conf.texi (get_nprocs_conf):
97230         Added in cygwin 1.7.2.
97231         * doc/glibc-functions/get_phys_pages.texi (get_phys_pages):
97232         Likewise.
97233         * doc/glibc-functions/get_avphys_pages.texi (get_avphys_pages):
97234         Likewise.
97235         * doc/glibc-functions/dup3.texi (dup3): Likewise.
97236         * doc/glibc-functions/pipe2.texi (pipe2): Likewise.
97237         * doc/glibc-functions/accept4.texi (accept4): Likewise.
97238         * doc/posix-functions/strfmon.texi (strfmon): Likewise.
97239         * doc/glibc-functions/get_nprocs.texi (get_nprocs): Likewise.
97240         Mention nproc module.
97241         * doc/glibc-functions/xdr_uint16_t.texi (xdr_uint16_t): Mention
97242         bug in cygwin 1.7.5 addition.
97243         * doc/glibc-functions/xdr_uint32_t.texi (xdr_uint32_t): Likewise.
97244         * doc/glibc-functions/xdr_uint64_t.texi (xdr_uint64_t): Likewise.
97245         * doc/glibc-functions/xdr_uint8_t.texi (xdr_uint8_t): Likewise.
97246         * doc/glibc-functions/xdr_array.texi (xdr_array): Added in cygwin
97247         1.7.5.
97248         * doc/glibc-functions/xdr_bool.texi (xdr_bool): Likewise.
97249         * doc/glibc-functions/xdr_bytes.texi (xdr_bytes): Likewise.
97250         * doc/glibc-functions/xdr_char.texi (xdr_char): Likewise.
97251         * doc/glibc-functions/xdr_double.texi (xdr_double): Likewise.
97252         * doc/glibc-functions/xdr_enum.texi (xdr_enum): Likewise.
97253         * doc/glibc-functions/xdr_float.texi (xdr_float): Likewise.
97254         * doc/glibc-functions/xdr_free.texi (xdr_free): Likewise.
97255         * doc/glibc-functions/xdr_hyper.texi (xdr_hyper): Likewise.
97256         * doc/glibc-functions/xdr_int.texi (xdr_int): Likewise.
97257         * doc/glibc-functions/xdr_int16_t.texi (xdr_int16_t): Likewise.
97258         * doc/glibc-functions/xdr_int32_t.texi (xdr_int32_t): Likewise.
97259         * doc/glibc-functions/xdr_int64_t.texi (xdr_int64_t): Likewise.
97260         * doc/glibc-functions/xdr_int8_t.texi (xdr_int8_t): Likewise.
97261         * doc/glibc-functions/xdr_long.texi (xdr_long): Likewise.
97262         * doc/glibc-functions/xdr_longlong_t.texi (xdr_longlong_t):
97263         Likewise.
97264         * doc/glibc-functions/xdr_netobj.texi (xdr_netobj): Likewise.
97265         * doc/glibc-functions/xdr_opaque.texi (xdr_opaque): Likewise.
97266         * doc/glibc-functions/xdr_pointer.texi (xdr_pointer): Likewise.
97267         * doc/glibc-functions/xdr_reference.texi (xdr_reference):
97268         Likewise.
97269         * doc/glibc-functions/xdr_short.texi (xdr_short): Likewise.
97270         * doc/glibc-functions/xdr_sizeof.texi (xdr_sizeof): Likewise.
97271         * doc/glibc-functions/xdr_string.texi (xdr_string): Likewise.
97272         * doc/glibc-functions/xdr_u_char.texi (xdr_u_char): Likewise.
97273         * doc/glibc-functions/xdr_u_hyper.texi (xdr_u_hyper): Likewise.
97274         * doc/glibc-functions/xdr_u_int.texi (xdr_u_int): Likewise.
97275         * doc/glibc-functions/xdr_u_long.texi (xdr_u_long): Likewise.
97276         * doc/glibc-functions/xdr_u_longlong_t.texi (xdr_u_longlong_t):
97277         Likewise.
97278         * doc/glibc-functions/xdr_u_short.texi (xdr_u_short): Likewise.
97279         * doc/glibc-functions/xdr_union.texi (xdr_union): Likewise.
97280         * doc/glibc-functions/xdr_vector.texi (xdr_vector): Likewise.
97281         * doc/glibc-functions/xdr_void.texi (xdr_void): Likewise.
97282         * doc/glibc-functions/xdr_wrapstring.texi (xdr_wrapstring):
97283         Likewise.
97284         * doc/glibc-functions/xdrmem_create.texi (xdrmem_create):
97285         Likewise.
97286         * doc/glibc-functions/xdrrec_create.texi (xdrrec_create):
97287         Likewise.
97288         * doc/glibc-functions/xdrrec_endofrecord.texi
97289         (xdrrec_endofrecord): Likewise.
97290         * doc/glibc-functions/xdrrec_eof.texi (xdrrec_eof): Likewise.
97291         * doc/glibc-functions/xdrrec_skiprecord.texi (xdrrec_skiprecord):
97292         Likewise.
97293         * doc/glibc-functions/xdrstdio_create.texi (xdrstdio_create):
97294         Likewise.
97296 2010-05-04  Jim Meyering  <meyering@redhat.com>
97298         gendocs.sh: make its "-s FILE" option more useful
97299         * build-aux/gendocs.sh: When honoring the -s FILE option, update
97300         $PACKAGE to reflect the probably-different basename of "FILE".
97302 2010-05-03  Giuseppe Scrivano  <gscrivano@gnu.org>
97304         bootstrap: don't ignore download_po_files failure
97305         * build-aux/bootstrap (update_po_files): Don't ignore download_po_files
97306         failure.
97308 2010-05-03  Jim Meyering  <meyering@redhat.com>
97310         maint.mk: allow to pass options to gendocs.sh
97311         * top/maint.mk (web-manual): Pass gendocs_options_ to gendocs.sh.
97312         (gendocs_options_): New overridable variable.
97314         gnu-web-doc-update: don't ignore configure or build failure
97315         * build-aux/gnu-web-doc-update: Exit nonzero upon internal failure.
97317         announce-gen: backslash-escape '@'s in --help output
97318         * build-aux/announce-gen: Fix syntax errors.
97320         maint.mk, announce-gen: allow project-specific announcement mail headers
97321         * top/maint.mk (translation_project_): Define default.
97322         (announcement_Cc_, announcement_mail_headers_): Likewise.
97323         (announcement): Invoke announce-gen with new --mail-headers option.
97324         * build-aux/announce-gen: New option: --mail-headers=HEADERS.
97326         test-xalloc-die: avoid unwarranted test failure on OpenSolaris 5.11
97327         * tests/test-xalloc-die.sh: Redirect stdout before stderr, (i.e.,
97328         "> out 2> err", rather than "2> err > out").  Otherwise, with /bin/sh
97329         on OpenSolaris 5.11 snv_134, we would end up with a stray "1> out"
97330         line in the "err2" output file when running "make check" in verbose
97331         mode (i.e., with set -x enabled).
97333 2010-05-03  Bruno Haible  <bruno@clisp.org>
97335         wctob: Fix for weird platforms.
97336         * lib/wctob.c (wctob): When wint_t is larger than wchar_t, check the
97337         argument value.
97339 2010-05-03  Jim Meyering  <meyering@redhat.com>
97341         maint.mk: prohibit unwarranted use of <strings.h>
97342         * top/maint.mk (sc_prohibit_strings_without_use): Reject inclusion of
97343         strings.h in a file that does not also use strcasecmp, strncasecmp,
97344         ffs or ffsll.
97346         maint.mk: remove obsolete comments
97347         * top/maint.mk: Remove stale, commented-out rules.
97349 2010-05-02  Bruno Haible  <bruno@clisp.org>
97351         wcwidth: Declare also when it's aliased.
97352         * lib/wchar.in.h (wcwidth): Don't test whether wcwidth is defined as a
97353         macro.
97355 2010-05-02  Bruno Haible  <bruno@clisp.org>
97357         Fix regression from 2010-04-25.
97358         * gnulib-tool (func_modules_transitive_closure): Check the status of
97359         all modules, not only of the tests that are of the form foo-tests where
97360         foo is a module.
97362 2010-05-02  Bruno Haible  <bruno@clisp.org>
97364         wctob: Work around nasty Cygwin 1.7.2 bug.
97365         * m4/wctob.m4 (gl_FUNC_WCTOB): Detect the Cygwin bug.
97366         * doc/posix-functions/wctob.texi: Mention the Cygwin bug.
97368 2010-05-01  Bruno Haible  <bruno@clisp.org>
97370         fpurge: Sharper test.
97371         * tests/test-fpurge.c (main): Add one more ftell check.
97372         * modules/fpurge-tests (Depends-on): Add ftell.
97373         Suggested by Eric Blake.
97375 2010-05-01  Bruno Haible  <bruno@clisp.org>
97377         ftello: Another test.
97378         * tests/test-ftello3.c: New file.
97379         * modules/ftello-tests (Files): Add it.
97380         (Makefile.am): Add it to TESTS and check_PROGRAMS. Augment
97381         MOSTLYCLEANFILES.
97383         ftell: Another test.
97384         * tests/test-ftell3.c: New file.
97385         * modules/ftell-tests (Files): Add it.
97386         (Makefile.am): Add it to TESTS and check_PROGRAMS. Augment
97387         MOSTLYCLEANFILES.
97389 2010-05-01  Bruno Haible  <bruno@clisp.org>
97391         ftell, ftello: Work around Solaris bug.
97392         * m4/ftello.m4 (gl_FUNC_FTELLO): Detect Solaris bug.
97393         * lib/ftello.c: Include stdio-impl.h.
97394         (ftello): On Solaris, when _IOWRT is set, compute the result without
97395         looking at _IOREAD.
97396         * modules/ftello (Files): Add lib/stdio-impl.h.
97397         * doc/posix-functions/ftell.texi: Mention Solaris bug.
97398         * doc/posix-functions/ftello.texi: Likewise.
97399         Reported by Eric Blake.
97401 2010-05-01  Bruno Haible  <bruno@clisp.org>
97403         freading: Adapt to special meaning of _IOREAD flag on Solaris.
97404         * lib/freading.c (freading): On Solaris, ignore the _IOREAD flag if
97405         the _IOWRT flag is also set.
97407 2010-05-01  Bruno Haible  <bruno@clisp.org>
97409         Fix doc about a HP-UX stdio bug.
97410         * doc/posix-functions/ftell.texi: Mark HP-UX bug as unfixed.
97411         * doc/posix-functions/ftello.texi: Likewise.
97413 2010-05-01  Bruno Haible  <bruno@clisp.org>
97415         lseek test: Fix failure on Solaris.
97416         * tests/test-lseek.sh: Partially revert 2010-04-20 commit. Consume all
97417         output.
97419 2010-04-30  Jim Meyering  <meyering@redhat.com>
97421         bootstrap: don't ignore failure to generate po*/Makevars
97422         * build-aux/bootstrap (with_gettext): Don't ignore failure
97423         to create po/Makevars or runtime-po/Makevars.
97425 2010-04-29  Eric Blake  <eblake@redhat.com>
97427         headers: relax license to LGPLv2+
97428         * modules/fcntl-h (License): Relax license.
97429         * modules/getopt-posix (License): Likewise.
97430         * modules/locale (License): Likewise.
97431         * modules/math (License): Likewise.
97432         * modules/pty (License): Likewise.
97433         * modules/sched (License): Likewise.
97434         * modules/search (License): Likewise.
97435         * modules/spawn (License): Likewise.
97436         * modules/stdarg (License): Likewise.
97437         * modules/sysexits (License): Likewise.
97439 2010-04-29  Jim Meyering  <meyering@redhat.com>
97441         inttypes: relax license to LGPLv2+
97442         * modules/inttypes (License): Relax license.
97444 2010-04-29  Simon Josefsson  <simon@josefsson.org>
97446         * top/maint.mk (indent): Run twice to produce idempotent results.
97448 2010-04-28  Bruno Haible  <bruno@clisp.org>
97450         getdate: Generate getdate.c in the source directory.
97451         * modules/getdate (Makefile.am): Add rule for getdate.c. Augment
97452         MOSTLYCLEANFILES.
97453         Suggested by Daniel Richard G. <skunk@iskunk.org> and Ralf Wildenhues.
97455 2010-04-27  Andreas Gruenbacher  <agruen@suse.de>  (tiny change)
97457         * lib/utimens.c: On Tru64, the timestamp parameter of utimens(2)
97458         is not declared as a const *; avoid warnings in that case.
97460 2010-04-28  Eric Blake  <eblake@redhat.com>
97462         canonicalize-lgpl: avoid compiler warning
97463         * lib/canonicalize-lgpl.c (versioned_symbol): Avoid an 'empty
97464         declaration' / 'extraneous semicolon' warning with some compilers.
97465         Reported by Andreas Gruenbacher.
97467 2010-04-28  Jim Meyering  <meyering@redhat.com>
97469         init.sh: ensure a more reliable exit status when exiting via trap
97470         * tests/init.sh (setup_): Don't rely on $? in signal handler.
97471         Inspired by patches from Dmitry V. Levin.
97472         Also trap on signal 3 (SIGQUIT).
97474 2010-04-27  Bruno Haible  <bruno@clisp.org>
97476         Update doc about utimes().
97477         * doc/posix-functions/utimes.texi: Mention the OSF/1 problem and the
97478         'utimens' module.
97479         Reported by Andreas Gruenbacher <agruen@suse.de>.
97481 2010-04-27  Eric Blake  <eblake@redhat.com>
97483         full-read, full-write: relax license
97484         * modules/full-read (License): Drop to LGPLv2+.
97485         * modules/full-write (License): Likewise.
97486         * modules/safe-read (License): Likewise.
97487         * modules/safe-write (License): Likewise.
97489         pthread: mention library for linking
97490         * modules/pthread (Link): Mention $(LIB_PTHREAD).
97492 2010-04-27  Jim Meyering  <meyering@redhat.com>
97494         maint.mk: fix a bug introduced in last change
97495         * top/maint.mk (gl_assured_headers_): Now that all names are on
97496         one line, use sed's "g" modifier.  Note that while the \.in\.h LHS
97497         is not anchored to end of word, it should be adequate.
97499         maint.mk: avoid side-effect in latest syntax-check
97500         * top/maint.mk (sc_prohibit_always_true_header_tests): Rework not
97501         to run commands via $(shell...), and hence to incur cost only when
97502         the new rule is actually run.
97504         maint.mk: syntax-check: prohibit HAVE_<header>_H that are always true
97505         Derive the list of guaranteed header names from gnulib/lib/*.in.h,
97506         and use that to create a regexp used to detect all #if HAVE_..._H uses.
97507         * top/maint.mk (sc_prohibit_always_true_header_tests): New rule.
97508         (gl_assured_headers_, az_, AZ_): Define.
97509         (gl_header_upper_case_or_, gl_have_header_regex_): Define.
97511 2010-04-26  Jim Meyering  <jim@meyering.net>
97512             Bruno Haible  <bruno@clisp.org>
97514         gnulib-common.m4: make glibc write diagnostics to stderr, not /dev/tty
97515         * m4/gnulib-common.m4 (gl_COMMON_BODY): Set LIBC_FATAL_STDERR_.
97516         Prompted by an exchange with Gilles Espinasse.
97518 2010-04-26  Jim Meyering  <meyering@redhat.com>
97520         git-version-gen: aesthetic tweak
97521         * build-aux/git-version-gen: Use "$nl" rather than a literal,
97522         so that the command remains on a single line.
97524 2010-04-26  Eric Blake  <eblake@redhat.com>
97526         git-version-gen: allow use on EBCDIC hosts
97527         * build-aux/git-version-gen (dirty): Use literal rather than tying
97528         ourselves to ascii.
97529         Reported by Steve Goetze.
97531 2010-04-25  Bruno Haible  <bruno@clisp.org>
97533         netdb: Add support for GNULIB_POSIXCHECK.
97534         * lib/netdb.in.h: Include warn-on-use.h.
97535         (getaddrinfo, freeaddrinfo, gai_strerror, getnameinfo): Warn if these
97536         functions are used when GNULIB_POSIXCHECK is defined and the
97537         getaddrinfo module is not in use.
97538         * m4/netdb_h.m4 (gl_HEADER_NETDB): Test whether getaddrinfo,
97539         freeaddrinfo, gai_strerror, getnameinfo are declared.
97540         * modules/netdb (Depends-on): Add warn-on-use.
97541         (Makefile.am): Include warn-on-use.h in netdb.h.
97543 2010-04-24  Ian Beckwith  <ianb@erislabs.net>
97545         build: avoid "make check" failure without .git/ directory
97546         * Makefile (sc_prefer_ac_check_funcs_once): Skip this test when
97547         there is no .git/ directory.
97549 2010-04-25  Bruno Haible  <bruno@clisp.org>
97551         ptsname: Fix misuse of ttyname_r.
97552         * lib/ptsname.c (__ptsname_r): Use __ttyname_r's return value instead
97553         of errno.
97555 2010-04-25  Bruno Haible  <bruno@clisp.org>
97557         ttyname_r: Make it work on Solaris 10.
97558         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Define HAVE_POSIXDECL_TTYNAME_R
97559         if the system function has the POSIX declaration. Test whether the
97560         function fails if the buffer is less than 128 bytes large.
97561         * lib/ttyname_r.c (ttyname_r): Handle both possible declarations of the
97562         system's ttyname_r function. Provide a reasonably large buffer.
97563         * modules/ttyname_r (Depends-on): Add extensions.
97564         * doc/posix-functions/ttyname_r.texi: Mention the Solaris problem.
97566 2010-04-25  Bruno Haible  <bruno@clisp.org>
97568         Use the 'extensions' module for some more functions on Solaris.
97569         * doc/posix-functions/asctime_r.texi: Recommend to use the 'extensions'
97570         module.
97571         * doc/posix-functions/ctime_r.texi: Likewise.
97572         * doc/posix-functions/getgrgid_r.texi: Likewise.
97573         * doc/posix-functions/getgrnam_r.texi: Likewise.
97574         * doc/posix-functions/getpwnam_r.texi: Likewise.
97575         * doc/posix-functions/getpwuid_r.texi: Likewise.
97576         * doc/posix-functions/readdir_r.texi: Likewise.
97577         * doc/posix-functions/sigwait.texi: Likewise.
97578         * m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Add comment.
97579         * doc/posix-functions/getlogin_r.texi: Mark Solaris problem as fixed.
97581 2010-04-25  Bruno Haible  <bruno@clisp.org>
97583         ttyname_r: Make it work on MacOS X 10.4 and Solaris 10.
97584         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Test whether the system function
97585         has the POSIX declaration. Set REPLACE_TTYNAME_R if not.
97586         * lib/ttyname_r.c: Include <limits.h>.
97587         (ttyname_r): Define using the system's ttyname_r function, if it exists
97588         and not on Solaris.
97589         * lib/unistd.in.h (ttyname_r): Replace function if REPLACE_TTYNAME_R is
97590         set.
97591         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_TTYNAME_R.
97592         * modules/unistd (Makefile.am): Substitute REPLACE_TTYNAME_R.
97593         * doc/posix-functions/ttyname_r.texi: Mark the problem as fixed.
97594         Reported by Simon Josefsson.
97596 2010-04-25  Bruno Haible  <bruno@clisp.org>
97598         Mention effects of _POSIX_PTHREAD_SEMANTICS on Solaris.
97599         * doc/posix-functions/asctime_r.texi: Mention the Solaris problem.
97600         * doc/posix-functions/ctime_r.texi: Likewise.
97601         * doc/posix-functions/getgrgid_r.texi: Likewise.
97602         * doc/posix-functions/getgrnam_r.texi: Likewise.
97603         * doc/posix-functions/getlogin_r.texi: Likewise.
97604         * doc/posix-functions/getpwnam_r.texi: Likewise.
97605         * doc/posix-functions/getpwuid_r.texi: Likewise.
97606         * doc/posix-functions/readdir_r.texi: Likewise.
97607         * doc/posix-functions/sigwait.texi: Likewise.
97608         * doc/posix-functions/ttyname_r.texi: Likewise.
97609         Reported by Simon Josefsson.
97611 2010-04-25  Bruno Haible  <bruno@clisp.org>
97613         gnulib-tool: Don't include hairy tests of dependencies in testdirs.
97614         * gnulib-tool (func_usage): Document that --with-*-tests options apply
97615         also to --create-testdir.
97616         (func_acceptable): Don't consider the status of *-tests modules here.
97617         (func_modules_transitive_closure): Consider it here, before including a
97618         test module.
97619         (func_import, func_create_testdir): Set inc_all_direct_tests,
97620         inc_all_indirect_tests.
97621         * doc/gnulib.texi (Extra tests modules): Document new behaviour of
97622         --create-testdir and --create-megatestdir.
97624 2010-04-25  Bruno Haible  <bruno@clisp.org>
97626         gnulib-tool: Add --without-*-tests options.
97627         * gnulib-tool (func_usage): Document the --without-*-tests options.
97628         (excl_cxx_tests, excl_longrunning_tests, excl_privileged_tests,
97629         excl_unportable_tests): New variables.
97630         Fail if they are specified with --import or --update.
97631         (func_acceptable): Respect the excl_*_tests variables.
97632         (func_import): Set the excl_*_tests variables to empty.
97634 2010-04-25  Simon Josefsson  <simon@josefsson.org>
97635             Bruno Haible  <bruno@clisp.org>
97637         Work around a MacOS X 10.4 bug with openpty.
97638         * doc/glibc-functions/openpty.texi: Mention the MacOS X 10.4 bug.
97639         * tests/test-openpty.c (main): Close the master side explicitly.
97641 2010-04-25  Bruno Haible  <bruno@clisp.org>
97643         strnlen: Fix a C++ test error on MacOS X and Solaris.
97644         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Don't set REPLACE_STRNLEN to 1 if
97645         the function is not declared.
97646         Reported by Jarno Rajahalme <jarno.rajahalme@nsn.com> and
97647         Simon Josefsson.
97649 2010-04-24  Bruno Haible  <bruno@clisp.org>
97651         Avoid a gcc warning.
97652         * tests/test-vasprintf.c (test_vasprintf, test_asprintf): Pass argument
97653         of correct type for %08lx directive.
97654         Reported by Eric Blake.
97656 2010-04-24  Bruno Haible  <bruno@clisp.org>
97658         vasnprintf: Correct errno value in case of out-of-memory.
97659         * lib/vasnprintf.c (VASNPRINTF): Set errno to 0 before calling SNPRINTF
97660         or sprintf. Use the errno value from SNPRINTF or sprintf.
97661         Reported by Ian Beckwith <ianb@erislabs.net>.
97663 2010-04-24  Bruno Haible  <bruno@clisp.org>
97665         ansi-c++-opt: Find correct compiler when cross-compiling.
97666         * m4/ansi-c++.m4 (gl_PROG_ANSI_CXX): Use AC_CHECK_TOOLS instead of
97667         AC_CHECK_PROGS.
97668         Reported by Simon Josefsson.
97670 2010-04-24  Giuseppe Scrivano  <gscrivano@gnu.org>
97672         vc-list-files: Add support for subversion
97673         * build-aux/vc-list-files: Use "svn list" to generate the list of
97674         files controlled by subversion.
97676 2010-04-23  Jim Meyering  <meyering@redhat.com>
97678         vc-list-files tests: convert to use init.sh
97679         * tests/test-vc-list-files-cvs.sh: Invoke "$srcdir/init.sh" and
97680         path_prepend_.
97681         Use Exit, not exit.
97682         Use skip_ rather than open coding it.
97683         Remove trap set-up and compare definitions.
97684         * tests/test-vc-list-files-git.sh: Likewise.
97685         * modules/vc-list-files-tests (Files): Add tests/init.sh.
97687 2010-04-22  Simon Josefsson  <simon@josefsson.org>
97689         * top/maint.mk (sc_prohibit_backup_files): Prohibit checked in
97690         backup files.
97692 2010-04-21  Simon Josefsson  <simon@josefsson.org>
97694         * tests/test-vasprintf.c (test_vasprintf, test_asprintf): Test %08lx.
97696 2010-04-20  Eric Blake  <eblake@redhat.com>
97698         tests: be robust to ignored SIGPIPE
97699         * tests/test-select-in.sh: Consume all output.
97700         * tests/test-lseek.sh: Check correct exit status, while avoiding
97701         EPIPE.
97703 2010-04-20  Simon Josefsson  <simon@josefsson.org>
97704             Bruno Haible  <bruno@clisp.org>
97706         visibility: Don't use -fvisibility if it leads to a warning.
97707         * m4/visibility.m4 (gl_VISIBILITY): Check whether -Werror is usable. If
97708         yes, don't pretend that visibility works if it leads to a warning.
97709         Reported by Mike Gran <spk121@yahoo.com>.
97711 2010-04-20  Andreas Gruenbacher  <agruen@suse.de>
97713         * build-aux/bootstrap: Use "git -h" for testing for supported options
97714         instead of "git --help".  The short-form option only shows a summary,
97715         and doesn't layout the full man page.  Grep for the full option name
97716         in the summary, too.
97718 2010-04-19  Bruno Haible  <bruno@clisp.org>
97720         relocatable: Drop the need to define RELOCATABLE_STRIP in Makefile.am.
97721         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Set RELOCATABLE_STRIP.
97722         * doc/relocatable-maint.texi (Supporting Relocation): Remove the
97723         mention of RELOCATABLE_STRIP.
97724         Reported by Sylvain Beucler <beuc@beuc.net>.
97726 2010-04-19  Bruno Haible  <bruno@clisp.org>
97728         * lib/diffseq.h: Fix typo in comment.
97729         Reported by Eric Blake.
97731 2010-04-19  Bruno Haible  <bruno@clisp.org>
97733         ioctl: Move autoconf macro to a .m4 file.
97734         * m4/ioctl.m4: New file, extracted from modules/ioctl.
97735         * modules/ioctl (Files): Add it.
97736         (configure.ac): Simply invoke gl_FUNC_IOCTL.
97737         Reported by Ian Beckwith <ianb@erislabs.net>.
97739 2010-04-18  Andreas Gruenbacher  <agruen@suse.de>
97740             Bruno Haible  <bruno@clisp.org>
97742         diffseq: Accommodate use-case with abstract arrays.
97743         * lib/diffseq.h (struct context): Remove xvec, yvec fields if ELEMENT
97744         is not defined.
97745         (diag, compareseq): Remove local variables xv, yv if ELEMENT is not
97746         defined. Use local macro XREF_YREF_EQUAL instead of EQUAL.
97748 2010-04-18  Bruno Haible  <bruno@clisp.org>
97750         * doc/posix-headers/stdbool.texi: More precise wording.
97752 2010-04-17  Jim Meyering  <meyering@redhat.com>
97754         maint.mk: use gnu-style indentation in an embedded perl script
97755         * top/maint.mk (detect_empty_lines_at_EOF_): Clean up formatting.
97756         Rename variable: s/two/last_two_bytes/
97758 2010-04-16  Eric Blake  <eblake@redhat.com>
97760         test-stdbool: skip test that fails with Solaris CC
97761         * tests/test-stdbool.c (f): Skip test that causes compilation
97762         error under buggy C++ compiler.
97763         * lib/stdbool.in.h: Document the limitation.
97764         * doc/posix-headers/stdbool.texi (stdbool.h): Likewise.
97766         setenv: allow compilation with C++
97767         * lib/setenv.c (__add_to_environ): Add a cast.  Also, drop use of
97768         register keyword.
97770         stdint: allow test to pass with C++
97771         * tests/test-stdint.c: Define __STDC_CONSTANT_MACROS, for glibc.
97773         getopt: allow compilation with C++
97774         * lib/getopt_int.h (__ordering): Hoist enum declaration outside
97775         struct.
97776         * lib/getopt.c (_getopt_internal_r): Use correct type.
97777         Reported by Dagobert Michelson, via Joel E. Denny.
97779 2010-04-16  Bruno Haible  <bruno@clisp.org>
97781         Override netdb.h always.
97782         * modules/netdb (Makefile.am): Augment BUILT_SOURCES always.
97783         * m4/netdb_h.m4 (gl_HEADER_NETDB): Don't set NETDB_H.
97784         Reported by Ludovic Courtès <ludo@gnu.org>.
97786 2010-04-15  Bruno Haible  <bruno@clisp.org>
97788         openpty: Fix mistake from 2010-03-21.
97789         * m4/pty.m4 (gl_FUNC_OPENPTY): Define HAVE_OPENPTY when openpty exists.
97790         Reported by Simon Josefsson.
97792 2010-04-15  Eric Blake  <eblake@redhat.com>
97794         test-forkpty: fix expected signature
97795         * tests/test-forkpty.c (SIGNATURE_CHECK): Add appropriate const.
97796         Reported by Simon Josefsson.
97798 2010-04-15  Jim Meyering  <meyering@redhat.com>
97800         maint.mk: texinfo_suffix_re_: correct the default regexp
97801         * top/maint.mk (texinfo_suffix_re_): Fix default regexp.
97803         * top/maint.mk (sc_texinfo_acronym): Improve filename regexp, and
97804         make it configurable via texinfo_suffix_re_.
97806 2010-04-14  Eric Blake  <eblake@redhat.com>
97808         strtok_r: relax license to LGPLv2+
97809         * modules/strtok_r (License): Relax license.
97810         Reported by Matthias Bolte.
97812 2010-04-14  Simon Josefsson  <simon@josefsson.org>
97814         * lib/gc-libgcrypt.c (gc_init): Use MIN_GCRYPT_VERSION set to
97815         version 1.4.4 by default instead of requiring the libgcrypt
97816         version used during build.  This makes it possible to use the
97817         application with older but still binary compatible libgcrypt
97818         versions.
97820 2010-04-13  Eric Blake  <eblake@redhat.com>
97822         getopt-gnu: match recent glibc fixes and posix ruling
97823         * tests/test-getopt.h (test_getopt): Strengthen tests of leading
97824         '+' handling, when requesting extensions.
97825         * tests/test-getopt_long.h (test_getopt_long): Strengthen test of
97826         'W;' handling.
97827         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Detect glibc 2.11 bug.
97828         * doc/posix-functions/getopt.texi (getopt): Document this.
97829         * doc/glibc-functions/getopt_long.texi (getopt_long): Likewise.
97830         * doc/glibc-functions/getopt_long_only.texi (getopt_long_only):
97831         Likewise.
97833         getopt: merge bug fixes from glibc
97834         * lib/getopt.c (_getopt_internal_r): Use correct message for 'W;'
97835         diagnostics.  Honor '+:' correctly.  Reject ';'.
97837         getopt-posix: detect MacOS bug
97838         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Reject MacOS botch of
97839         optind when missing a required argument.
97840         * doc/posix-functions/getopt.texi (getopt): Document the bug.
97841         * doc/glibc-functions/getopt_long.texi (getopt_long): Likewise.
97842         * doc/glibc-functions/getopt_long_only.texi (getopt_long_only):
97843         Likewise.
97845         getopt-posix: avoid spurious failure on Solaris
97846         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Check for getopt_clip as
97847         an indicator that setting optind=1 is sufficient for reset.
97849         getopt-posix: avoid spurious failure on FreeBSD
97850         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Check for optreset even
97851         in POSIX mode, since the m4 test uses it.
97853         gnulib-tool: silence warning on BSD sh
97854         * gnulib-tool: Avoid leaking warning about unknown 'declare'.
97856 2010-04-13  Jim Meyering  <meyering@redhat.com>
97858         doc: users.txt: GNU patch now uses gnulib
97859         * users.txt: Add patch.
97861 2010-04-12  Jim Meyering  <meyering@redhat.com>
97863         maint.mk: generate more concise timing data for syntax-check rules
97864         * top/maint.mk ($(sc_z_rules_)): Remove the ":", "sc_" prefix and
97865         " done" from each line that reports a syntax-check test duration.
97867 2010-04-12  Andreas Gruenbacher  <agruen@suse.de>
97869         git-version-gen: use "git update-index..." rather than "git status"
97870         * build-aux/git-version-gen: Use git update-index --refresh, not
97871         "git status".  With some versions of git, "git status" would fail
97872         to update the index and result in an unwarranted "-dirty" suffix.
97874 2010-04-11  Jim Meyering  <meyering@redhat.com>
97876         openat: correct formatting (no semantic change)
97877         * m4/openat.m4 (gl_FUNC_FCHOWNAT): Correct formatting in AC_DEFINE.
97878         Suggested by Bruno Haible.
97880 2010-04-11  Bruno Haible  <bruno@clisp.org>
97882         Stricter declaration checking in testdirs.
97883         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
97884         If for_tests is true, augment AM_CPPFLAGS to define
97885         GNULIB_STRICT_CHECKING.
97886         * build-aux/warn-on-use.h (_GL_WARN_ON_USE, _GL_WARN_ON_USE_CXX): When
97887         GNULIB_STRICT_CHECKING is defined, verify that the function is
97888         declared.
97890 2010-04-11  Paolo Bonzini  <bonzini@gnu.org>
97891             Bruno Haible  <bruno@clisp.org>
97893         libunistring: Improve configure output.
97894         * m4/libunistring.m4 (gl_LIBUNISTRING): Check for libiconv first.
97895         Don't say "consider installing GNU libunistring" when checking again
97896         with libiconv.
97898 2010-04-11  Bruno Haible  <bruno@clisp.org>
97900         libunistring: Correct value of $LTLIBUNISTRING.
97901         * m4/libunistring.m4 (gl_LIBUNISTRING): When it depends on libiconv,
97902         correct the value of $LTLIBUNISTRING.
97904 2010-04-11  Bruno Haible  <bruno@clisp.org>
97906         havelib: Add static libraries to LIBS in the right order.
97907         * m4/lib-link.m4 (AC_LIB_HAVE_LINKFLAGS): When $LIB[]NAME contains no
97908         -l options, prepend it to $LIBS, instead of appending it to $LIBS.
97910 2010-04-11  Bruno Haible  <bruno@clisp.org>
97912         libunistring: Detect libunistring also when it depends on libiconv.
97913         * m4/libunistring.m4 (gl_LIBUNISTRING): Unset the cached result before
97914         the second AC_LIB_HAVE_LINKFLAGS invocation.
97916 2010-04-11  James Youngman  <jay@gnu.org>
97918         close-stream: declare local scalars to be "const"
97919         * lib/close-stream.c (close_stream): Make boolean variables const
97920         to document the fact that we set but do not change them.
97922 2010-04-11  Bruno Haible  <bruno@clisp.org>
97924         * m4/libunistring.m4 (gl_LIBUNISTRING): Fix typo in comment.
97926 2010-04-11  Jim Meyering  <meyering@redhat.com>
97928         maint.mk: don't include dist-check.mk
97929         * top/maint.mk: Remove bogus include directive.
97931         maint.mk: improve empty-line-at-EOF check
97932         * top/maint.mk (sc_prohibit_empty_lines_at_EOF): Use Perl-based
97933         solution, rather than tail+Perl-based one.  The latter would read
97934         a few kilobytes from the end of each file, and did not handle empty
97935         files properly.
97937         maint.mk: print the elapsed time for each syntax-check rule
97938         * top/maint.mk (sc_m_rules_): Save start time in a file.
97939         (sc_z_rules_): New rules: remove temp file and print elapsed time.
97940         (local-check): Interpose the .z rules
97942 2010-04-11  Jim Meyering  <meyering@redhat.com>
97944         maint.mk: detect_empty_lines_at_EOF_: avoid FP for an empty file
97945         * top/maint.mk (detect_empty_lines_at_EOF_): Don't confuse an
97946         empty file with one that ends in an empty line.
97948 2010-04-10  Bruno Haible  <bruno@clisp.org>
97950         mkdir: Make it work on mingw64.
97951         * lib/sys_stat.in.h: Include <direct.h> together with <io.h>.
97952         * lib/mkdir.c: Update comment.
97953         Reported by Roman Donchenko (Роман Донченко) <dxdragon@yandex.ru>.
97955 2010-04-10  Bruno Haible  <bruno@clisp.org>
97957         Don't override improved macro from newer autoconf.
97958         * m4/gnulib-common.m4 (AC_C_RESTRICT): Don't define for
97959         autoconf >= 2.62.
97960         Reported by Joel E. Denny <jdenny@clemson.edu>.
97962 2010-04-10  Jim Meyering  <meyering@redhat.com>
97964         maint.mk: new syntax-check rule: prohibit empty lines at end of file
97965         * top/maint.mk (sc_prohibit_empty_lines_at_EOF): New rule.
97967         maint.mk: correct a diagnostic
97968         * top/maint.mk (sc_prohibit_HAVE_MBRTOWC): Fix obsolete use of $re
97969         in diagnostic; now use $prohibit.
97971 2010-04-10  Bruno Haible  <address@hidden>
97973         fchownat: Fix a C++ test error on Solaris 8.
97974         * m4/openat.m4 (gl_FUNC_FCHOWNAT): Don't set REPLACE_FCHOWNAT to 1 if
97975         the function does not exist.
97977 2010-04-10  Bruno Haible  <bruno@clisp.org>
97979         vasnprintf: Add more tests.
97980         * tests/test-vasnprintf-posix.c: Include <errno.h>.
97981         (test_function): Test converting an invalid wide string.
97983         vasnprintf: Correct handling of unconvertible wide string arguments.
97984         * lib/vasnprintf.c (MAX_ROOM_NEEDED): New function, extracted from
97985         VASNPRINTF.
97986         (VASNPRINTF): Use it. After snprintf failed, allocate more memory only
97987         if HAVE_SNPRINTF_RETVAL_C99 is false and the allocated memory is
97988         smaller than the expected maximum need for the directive. Set errno to
97989         EILSEQ, not EINVAL, when the directive is 'c' or 's'.
97990         (local_strnlen, local_wcslen, local_wcsnlen): Update conditions.
97991         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Require AC_C_INLINE and
97992         gl_SNPRINTF_RETVAL_C99. Define HAVE_SNPRINTF_RETVAL_C99.
97993         * modules/vasnprintf (Files): Add m4/printf.m4.
97994         Reported by Jarno Rajahalme <jarno.rajahalme@nsn.com>.
97996 2010-04-10  Bruno Haible  <bruno@clisp.org>
97998         vasnprintf: Fix crash in %ls directive.
97999         * lib/vasnprintf.c (VASNPRINTF): Don't abort when a unconvertible wide
98000         string is passed as argument to %ls, with no precision and no width.
98001         Reported by Jarno Rajahalme <jarno.rajahalme@nsn.com>.
98003 2010-04-10  Bruno Haible  <bruno@clisp.org>
98005         vasnprintf: Fix multiple test failures on mingw.
98006         * lib/vasnprintf.c (SNPRINTF) [mingw]: Define to snprintf, not
98007         _snprintf, or snwprintf, not _snwprintf.
98009 2010-04-10  Bruno Haible  <bruno@clisp.org>
98011         write: Fix a C++ test error on mingw.
98012         * lib/unistd.in.h (write): Use _GL_CXXALIAS_SYS_CAST.
98014 2010-04-10  Bruno Haible  <bruno@clisp.org>
98016         vasnprintf test: Reduce code duplication.
98017         * tests/test-vasnprintf.c (test_function): New function, extracted from
98018         test_vasnprintf.
98019         (test_vasnprintf, test_asnprintf): Invoke it.
98021 2010-04-10  Bruno Haible  <bruno@clisp.org>
98023         strnlen: Fix warning in C++ mode on MacOS X.
98024         * lib/string.in.h (strnlen): Use the modern idiom.
98025         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set REPLACE_STRNLEN to 1, instead of
98026         defining strnlen as a macro already in <config.h>.
98027         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
98028         REPLACE_STRNLEN.
98029         * modules/string (Makefile.am): Substitute REPLACE_STRNLEN.
98030         Reported by Jarno Rajahalme <jarno.rajahalme@nsn.com>.
98032 2010-04-08  James Youngman  <jay@gnu.org>
98034         * doc/manywarnings.texi (manywarnings): Add missing parenthesis in
98035         the example.
98037 2010-04-09  Jim Meyering  <meyering@redhat.com>
98039         maint.mk: print better diagnostic when there is no $(_hv_file)
98040         * top/maint.mk (sc_cross_check_PATH_usage_in_tests): Skip test and
98041         announce that when $(_hv_file) (aka help-version) does not exist.
98043         init.sh: run tr in the "C" locale to avoid multibyte interpretation
98044         * tests/init.sh (rand_bytes_): Run tr in the "C" locale so it does
98045         not try to interpret its random input bytes.  Jarno Rajahalme reported
98046         that ./test-xalloc-die.sh would fail with "tr: Illegal byte sequence".
98047         on Darwin 10.3.0 with LC_CTYPE=UTF-8.
98048         (mktempd_): Likewise, just in case.
98050         ftruncate: add two years to projected module removal date: 2012
98051         * m4/ftruncate.m4: Adjust comments.
98053         ftruncate: mark module as obsolete; even MinGW provides it, now
98054         * modules/ftruncate (Status): Obsolete.
98055         (Notice): Say that.
98056         * doc/posix-functions/ftruncate.texi: Don't say MinGW lacks it.
98057         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/9203
98059 2010-04-08  Bruno Haible  <bruno@clisp.org>
98061         Fix side effects from tests-related modules.
98062         * modules/dprintf-posix (Comment): New section.
98063         * modules/fprintf-posix (Comment): Likewise.
98064         * modules/obstack-printf-posix (Comment): Likewise.
98065         * modules/printf-posix (Comment): Likewise.
98066         * modules/snprintf-posix (Comment): Likewise.
98067         * modules/sprintf-posix (Comment): Likewise.
98068         * modules/vasnprintf-posix (Comment): Likewise.
98069         * modules/vasprintf-posix (Comment): Likewise.
98070         * modules/vdprintf-posix (Comment): Likewise.
98071         * modules/vfprintf-posix (Comment): Likewise.
98072         * modules/vprintf-posix (Comment): Likewise.
98073         * modules/vsnprintf-posix (Comment): Likewise.
98074         * modules/vsprintf-posix (Comment): Likewise.
98075         * modules/xprintf-posix (Comment): Likewise.
98076         * modules/xvasprintf-posix (Comment): Likewise.
98077         * modules/ceilf-tests (Depends-on): Remove fprintf-posix.
98078         * modules/floorf-tests (Depends-on): Likewise.
98079         * modules/round-tests (Depends-on): Likewise.
98080         * modules/roundf-tests (Depends-on): Likewise.
98081         * modules/trunc-tests (Depends-on): Likewise.
98082         * modules/truncf-tests (Depends-on): Likewise.
98083         * tests/test-ceilf2.c (check): Don't invoke fprintf if the
98084         'fprintf-posix' module is not present.
98085         * tests/test-floorf2.c (check): Likewise.
98086         * tests/test-trunc2.c (check): Likewise.
98087         * tests/test-truncf2.c (check): Likewise.
98088         * tests/test-round2.c (equal): Likewise.
98089         Reported by Jarno Rajahalme <jarno.rajahalme@nsn.com>.
98091 2010-04-07  Karl Berry  <karl@gnu.org>
98093         * config/srclist.txt,
98094         * config/srclistvars.sh,
98095         * config/srclist-update: doc fixes.
98097 2010-04-07  Jim Meyering  <meyering@redhat.com>
98099         maint.mk: add a PATH crosschecking syntax-check rule
98100         * top/maint.mk (sc_cross_check_PATH_usage_in_tests): New rule.
98101         Useful if you use a test like the one in help-version (coreutils,
98102         diffutils, grep, gzip) that ensures $(VERSION) matches what is
98103         printed by prog --version.
98105 2010-04-06  Bruno Haible  <bruno@clisp.org>
98107         Fix link error on mingw.
98108         * modules/unistd-c++-tests (test_unistd_c___LDADD): Add LIBSOCKET.
98109         * modules/fcntl-h-c++-tests (test_fcntl_h_c___LDADD): Likewise.
98111 2010-04-06  Bruno Haible  <bruno@clisp.org>
98113         Assume rmdir exists.
98114         * lib/rmdir.c (rpl_rmdir): Remove code that invokes the rmdir program.
98116 2010-04-06  Giuseppe Scrivano  <gscrivano@gnu.org>
98118         doc: update users.txt
98119         * users.txt: Add gcal.
98121 2010-04-06  Jim Meyering  <meyering@redhat.com>
98123         init.sh: simply unset TMPDIR rather than risking env -i
98124         * tests/init.sh (mktempd_): Using env -i is rather harsh, and
98125         although it probably works fine on all Unix-based systems, some
98126         systems (Cygwin?) cannot tolerate a totally cleared environment.
98127         Suggestion from Eric Blake.
98129 2010-04-06  Jim Meyering  <meyering@redhat.com>
98131         init.sh: portability fix: use env's POSIX-specified -i option not -u
98132         * tests/init.sh (mktempd_): Use env -i and set PATH explicitly rather
98133         than unportable env -u.  Solaris 5.11's env lacks support for -u.
98135 2010-04-05  Bruno Haible  <bruno@clisp.org>
98137         btowc: Work around Cygwin 1.7.2 bug.
98138         * m4/btowc.m4 (gl_FUNC_BTOWC): Set REPLACE_BTOWC to 1 if the function
98139         does not map NUL to 0.
98140         * doc/posix-functions/btowc.texi: Mention the Cygwin bug.
98142 2010-04-05  Bruno Haible  <bruno@clisp.org>
98144         Make the multithread modules work on Cygwin 1.7.2.
98145         * m4/threadlib.m4 (gl_THREADLIB_BODY): Improve the test whether
98146         imported symbols can be declared weak, so that it returns "no" on
98147         Cygwin 1.7.2.
98149 2010-04-05  Bruno Haible  <bruno@clisp.org>
98151         Use the module 'strncat'.
98152         * modules/unistr/u8-strncat (Depends-on): Add strncat.
98154         Tests for module 'strncat'.
98155         * modules/strncat-tests: New file.
98156         * tests/test-strncat.c: New file.
98158         New module 'strncat'.
98159         * lib/string.in.h (strncat): New declaration.
98160         * lib/strncat.c: New file, based on lib/unistr/u-strncat.h.
98161         * m4/strncat.m4: New file, based on m4/memchr.m4.
98162         * modules/strncat: New file.
98163         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Also check whether strncat
98164         is declared.
98165         (gl_HEADER_STRING_H_DEFAULTS): Initialize GNULIB_STRNCAT,
98166         REPLACE_STRNCAT.
98167         * modules/string (Makefile.am): Substitute GNULIB_STRNCAT,
98168         REPLACE_STRNCAT.
98169         * doc/posix-functions/strncat.texi: Mention the Solaris bug and the new
98170         module.
98171         * tests/test-string-c++.cc: Check signature of strncat.
98173 2010-04-05  Jim Meyering  <meyering@redhat.com>
98175         xstrtoumax-tests: convert to use init.sh
98176         * modules/xstrtoumax-tests (Files): Add tests/init.sh.
98177         * tests/test-xstrtoumax.sh: Invoke "$srcdir/init.sh" and path_prepend_.
98178         Use Exit, not exit.
98179         Remove uses of $EXEEXT and "./" to run a program in the current dir.
98181         xstrtoimax-tests: convert to use init.sh
98182         * modules/xstrtoimax-tests (Files): Add tests/init.sh.
98183         * tests/test-xstrtoimax.sh: Invoke "$srcdir/init.sh" and path_prepend_.
98184         Use Exit, not exit.
98185         Remove uses of $EXEEXT and "./" to run a program in the current dir.
98187 2010-04-05  Bruno Haible  <bruno@clisp.org>
98189         sys_socket: Avoid #define replacements in C++ mode.
98190         * lib/sys_socket.in.h (close, gethostname, select): In C++, attach a
98191         warning to the function if possible, rather than #defining the symbol
98192         to a dysfunctional alias.
98194 2010-04-05  Bruno Haible  <bruno@clisp.org>
98196         fseeko: Fix C++ test error on mingw.
98197         * m4/fseeko.m4 (gl_HAVE_FSEEKO): New macro, extracted from
98198         gl_FUNC_FSEEKO.
98199         (gl_REPLACE_FSEEKO): Also set REPLACE_FSEEKO if appropriate.
98200         (gl_FUNC_FSEEKO): Require gl_HAVE_FSEEKO. Update.
98201         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Don't fiddle with internals of the
98202         fseeko module. Instead, invoke gl_REPLACE_FSEEKO.
98204 2010-04-05  Bruno Haible  <bruno@clisp.org>
98206         duplocale: Improve test output.
98207         * tests/test-duplocale.c (main): Print reason for skipped test.
98209 2010-04-05  Bruno Haible  <bruno@clisp.org>
98211         Assume rmdir exists.
98212         * m4/rmdir.m4 (gl_FUNC_RMDIR): Remove test whether rmdir exists.
98213         * doc/posix-functions/rmdir.texi: Remove mention of "old platforms".
98215 2010-04-05  Bruno Haible  <bruno@clisp.org>
98217         Fix link error on Solaris 8 with cc.
98218         * modules/pty-c++-tests (test_pty_c___LDADD): Add LIBINTL.
98220 2010-04-05  Bruno Haible  <bruno@clisp.org>
98222         frexpl: Fix a C++ test error on Solaris 8 and Cygwin.
98223         * lib/math.in.h (frexpl): Fix condition on _GL_CXXALIASWARN invocation.
98225 2010-04-05  Bruno Haible  <bruno@clisp.org>
98227         vasprintf: Update documentation.
98228         * doc/glibc-functions/asprintf.texi: Mention the 'vasprintf' module.
98230 2010-04-05  Bruno Haible  <bruno@clisp.org>
98232         ptsname: Improve test.
98233         * tests/test-ptsname.c (main): Also try the various master names of BSD
98234         systems.
98236 2010-04-05  Bruno Haible  <bruno@clisp.org>
98238         memchr: Avoid a possible C++ test error.
98239         * lib/string.in.h (memchr): Provide declaration if function is missing.
98240         * m4/memchr.m4 (gl_FUNC_MEMCHR): If the function is missing, set
98241         HAVE_MEMCHR to 0, not REPLACE_MEMCHR to 1.
98242         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize HAVE_MEMCHR.
98243         * modules/string (Makefile.am): Substitute HAVE_MEMCHR.
98245 2010-04-05  Bruno Haible  <bruno@clisp.org>
98247         strtok_r: Improve idiom.
98248         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Invoke gl_PREREQ_STRDUP only when
98249         AC_LIBOBJ is used.
98251 2010-04-05  Bruno Haible  <bruno@clisp.org>
98253         strdup: Improve idiom.
98254         * m4/strdup.m4 (gl_FUNC_STRDUP): Invoke gl_PREREQ_STRDUP only when
98255         AC_LIBOBJ is used.
98256         (gl_FUNC_STRDUP_POSIX): When strdup is missing and malloc is not POSIX
98257         compliant, don't set REPLACE_STRDUP to 1. Invoke gl_PREREQ_STRDUP only
98258         when AC_LIBOBJ is used.
98260 2010-04-05  Bruno Haible  <bruno@clisp.org>
98262         mbsinit, mbrtowc, wcrtomb: Improve idioms.
98263         * m4/mbsinit.m4 (gl_FUNC_MBSINIT): When the function does not exist,
98264         don't set REPLACE_MBSINIT to 1.
98265         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): When the function does not exist,
98266         don't set REPLACE_MBRTOWC to 1.
98267         * m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS): When the function does not
98268         exist, don't set REPLACE_MBSRTOWCS to 1.
98269         * m4/mbsnrtowcs.m4 (gl_FUNC_MBSNRTOWCS): When the function does not
98270         exist, don't set REPLACE_MBSNRTOWCS to 1.
98271         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): When the function does not exist,
98272         don't set REPLACE_WCRTOMB to 1.
98273         * m4/wcsrtombs.m4 (gl_FUNC_WCSRTOMBS): When the function does not
98274         exist, don't set REPLACE_WCSRTOMBS to 1.
98275         * m4/wcsnrtombs.m4 (gl_FUNC_WCSNRTOMBS): When the function does not
98276         exist, don't set REPLACE_WCSNRTOMBS to 1.
98278 2010-04-05  Bruno Haible  <bruno@clisp.org>
98280         ldexpl: Improve idiom.
98281         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): When the function is not declared,
98282         make sure to set HAVE_DECL_LDEXPL to 0.
98284 2010-04-05  Jim Meyering  <meyering@redhat.com>
98286         xstrtol-tests: convert to use init.sh
98287         * modules/xstrtol-tests (Files): Add tests/init.sh.
98288         * tests/test-xstrtol.sh: Invoke "$srcdir/init.sh" and path_prepend_.
98289         Use Exit, not exit.
98290         Remove uses of $EXEEXT and "./" to run a program in the current dir.
98292         atexit-tests: convert to use init.sh
98293         * modules/atexit-tests (Files): Add tests/init.sh.
98294         * tests/test-atexit.sh: Invoke "$srcdir/init.sh" and path_prepend_.
98295         Use Exit, not exit.
98296         Remove uses of $EXEEXT and "./" to run a program in the current dir.
98298         init.sh: fix typo
98299         * tests/init.sh: Restore omitted ":" before stderr_fileno_ initialization.
98301         init.sh: make it easier for a test script to write to the tty, ...
98302         when using automake's parallel-tests mode.
98303         * tests/init.sh (stderr_fileno_): Define overridable variable.
98304         (warn_): New function, to use it.
98305         (fail_, skip_, framework_failure_): Use warn_.
98307 2010-04-04  Bruno Haible  <bruno@clisp.org>
98309         btowc: Avoid warning.
98310         * lib/btowc.c: Include <stdlib.h>.
98311         Reported by Hauke Fath <hauke@espresso.rhein-neckar.de>.
98313 2010-04-04  Hauke Fath  <hauke@espresso.rhein-neckar.de>  (tiny change)
98314             Bruno Haible  <bruno@clisp.org>
98316         wchar: Port to NetBSD 1.5.
98317         * lib/wchar.in.h (WEOF): Provide fallback also when wint_t exists.
98318         * lib/wctype.in.h (WEOF): Likewise.
98320 2010-04-04  Hauke Fath  <hauke@espresso.rhein-neckar.de>  (tiny change)
98321             Bruno Haible  <bruno@clisp.org>
98323         Port extended stdio to NetBSD 1.5.
98324         * lib/stdio-impl.h [NetBSD]: Include <sys/param.h>.
98325         (struct __sfileext, fp_ub): Define the "old way" for NetBSD 1.5Z and
98326         older.
98328 2010-04-04  Bruno Haible  <bruno@clisp.org>
98330         string: Remove unused substitution.
98331         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
98332         HAVE_DECL_STRERROR.
98333         * modules/string (Makefile.am): Don't substitute HAVE_DECL_STRERROR.
98335 2010-04-04  Bruno Haible  <bruno@clisp.org>
98337         strtod: Avoid a possible C++ test error.
98338         * m4/strtod.m4 (gl_FUNC_STRTOD): When setting HAVE_STRTOD to 0, don't
98339         set REPLACE_STRTOD.
98341 2010-04-04  Bruno Haible  <bruno@clisp.org>
98343         strerror: Update documentation.
98344         * doc/posix-functions/strerror.texi: Remove mention of old platforms.
98346 2010-04-04  Bruno Haible  <bruno@clisp.org>
98348         stdio: Fix some C++ test errors on Solaris 8 with GCC.
98349         * lib/stdio.in.h (vdprintf, vfprintf, vprintf, vsprintf): Use
98350         _GL_CXXALIAS_SYS_CAST.
98352 2010-04-04  Bruno Haible  <bruno@clisp.org>
98354         frexpl: Fix a C++ test error on Solaris 8 and Cygwin.
98355         * m4/frexpl.m4 (gl_FUNC_FREXPL, gl_FUNC_FREXPL_NO_LIBM): When the
98356         function is not declared, set HAVE_DECL_FREXPL to 0, instead of setting
98357         REPLACE_FREXPL to 1.
98358         * doc/posix-functions/frexpl.texi: Update documentation.
98360 2010-04-04  Bruno Haible  <bruno@clisp.org>
98362         math: Fix some C++ test errors on Solaris 8 and Cygwin.
98363         * lib/math.in.h (cosl, logl, sinl): Use simpler idiom.
98365 2010-04-04  Bruno Haible  <bruno@clisp.org>
98367         Implement nanosleep for native Windows.
98368         * lib/nanosleep.c (nanosleep): New implementation for native Windows.
98370 2010-04-04  Bruno Haible  <bruno@clisp.org>
98372         math: Fix some C++ test errors on Solaris 8.
98373         * lib/math.in.h (truncf, trunc): Use simpler idiom.
98375 2010-04-04  Bruno Haible  <bruno@clisp.org>
98377         math: Fix some C++ test errors on Cygwin.
98378         * lib/math.in.h (ceilf, ceill, floorf, floorl, roundf, round, roundl,
98379         truncl): Provide declaration if the system does not have it.
98380         * m4/ceilf.m4 (gl_FUNC_CEILF): If the function is not declared, set
98381         HAVE_DECL_CEILF to 0, not REPLACE_CEILF to 1.
98382         * m4/ceill.m4 (gl_FUNC_CEILL): If the function is not declared, set
98383         HAVE_DECL_CEILL to 0, not REPLACE_CEILL to 1.
98384         * m4/floorf.m4 (gl_FUNC_FLOORF): If the function is not declared, set
98385         HAVE_DECL_FLOORF to 0, not REPLACE_FLOORF to 1.
98386         * m4/floorl.m4 (gl_FUNC_FLOORL): If the function is not declared, set
98387         HAVE_DECL_FLOORL to 0, not REPLACE_FLOORL to 1.
98388         * m4/round.m4 (gl_FUNC_ROUND): If the function is not declared, set
98389         HAVE_DECL_ROUND to 0, not REPLACE_ROUND to 1.
98390         * m4/roundf.m4 (gl_FUNC_ROUNDF): If the function is not declared, set
98391         HAVE_DECL_ROUNDF to 0, not REPLACE_ROUNDF to 1.
98392         * m4/roundl.m4 (gl_FUNC_ROUNDL): If the function is not declared, set
98393         HAVE_DECL_ROUNDL to 0, not REPLACE_ROUNDL to 1.
98394         * m4/truncl.m4 (gl_FUNC_TRUNCL): If the function is not declared, set
98395         HAVE_DECL_TRUNCL to 0, not REPLACE_TRUNCL to 1.
98396         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize HAVE_DECL_CEILF,
98397         HAVE_DECL_CEILL, HAVE_DECL_FLOORF, HAVE_DECL_FLOORL, HAVE_DECL_ROUND,
98398         HAVE_DECL_ROUNDF, HAVE_DECL_ROUNDL, HAVE_DECL_TRUNCL.
98399         * modules/math (Makefile.am): Substitute HAVE_DECL_CEILF,
98400         HAVE_DECL_CEILL, HAVE_DECL_FLOORF, HAVE_DECL_FLOORL, HAVE_DECL_ROUND,
98401         HAVE_DECL_ROUNDF, HAVE_DECL_ROUNDL, HAVE_DECL_TRUNCL.
98403 2010-04-04  Bruno Haible  <bruno@clisp.org>
98405         * m4/ceilf.m4 (gl_FUNC_CEILF): Remove redundant AC_SUBST invocation.
98406         * m4/ceill.m4 (gl_FUNC_CEILL): Likewise.
98407         * m4/floorf.m4 (gl_FUNC_FLOORF): Likewise.
98408         * m4/floorl.m4 (gl_FUNC_FLOORL): Likewise.
98409         * m4/isfinite.m4 (gl_ISFINITE): Likewise.
98410         * m4/isinf.m4 (gl_ISINF): Likewise.
98411         * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
98413 2010-04-04  Bruno Haible  <bruno@clisp.org>
98415         * m4/trunc.m4 (gl_FUNC_TRUNC): Remove redundant AC_SUBST invocation.
98416         * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
98418 2010-04-04  Bruno Haible  <bruno@clisp.org>
98420         * m4/tmpfile.m4 (gl_FUNC_TMPFILE): Renamed from gl_TMPFILE.
98421         * modules/tmpfile (configure.ac): Update.
98423         tmpfile: Fix C++ test error on mingw.
98424         * lib/stdio.in.h (tmpfile): New declaration.
98425         * m4/tmpfile.m4 (gl_TMPFILE): Require gl_STDIO_H_DEFAULTS. Set
98426         REPLACE_TMPFILE instead of defining tmpfile as a macro in config.h.
98427         * modules/tmpfile (Depends-on): Add stdio.
98428         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
98429         * m4/stdio_h.m4 (gl_STDIO_H): Also check whether tmpfile is declared.
98430         (gl_STDIO_H_DEFAULTS): Initialize GNULIB_TMPFILE and REPLACE_TMPFILE.
98431         * modules/stdio (Makefile.am): Substitute GNULIB_TMPFILE and
98432         REPLACE_TMPFILE.
98433         * tests/test-stdio-c++.cc (tmpfile): Verify signature.
98435 2010-04-04  Bruno Haible  <bruno@clisp.org>
98437         ioctl: Fix C++ test error on mingw.
98438         * lib/ioctl.c (ioctl): Renamed from rpl_ioctl.
98439         * lib/sys_ioctl.in.h (ioctl): When SYS_IOCTL_H_HAVE_WINSOCK2_H is 1,
98440         use _GL_FUNCDECL_SYS, not _GL_FUNCDECL_RPL.
98442 2010-04-03  Bruno Haible  <bruno@clisp.org>
98444         wcwidth: Fix C++ test error on mingw.
98445         * lib/wcwidth.c (wcwidth): Renamed from rpl_wcwidth.
98446         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): If the wcwidth function does not
98447         exist, don't set REPLACE_WCWIDTH. Instead, rely on HAVE_DECL_WCWIDTH.
98449 2010-04-03  Bruno Haible  <bruno@clisp.org>
98451         nanosleep: Fix C++ test error on mingw.
98452         * lib/nanosleep.c (nanosleep): Renamed from rpl_nanosleep.
98453         * lib/time.in.h (nanosleep): Use modern idiom.
98454         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): When the system does not have a
98455         nanosleep function, set HAVE_NANOSLEEP to 0, instead of setting
98456         REPLACE_NANOSLEEP to 1.
98457         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize HAVE_NANOSLEEP.
98458         * modules/time (Makefile.am): Substitute HAVE_NANOSLEEP.
98460 2010-04-03  Bruno Haible  <bruno@clisp.org>
98462         strptime: Fix C++ test error on mingw.
98463         * lib/time.in.h (strptime): Use HAVE_STRPTIME, not REPLACE_STRPTIME.
98464         * m4/strptime.m4 (gl_FUNC_STRPTIME): Set HAVE_STRPTIME, not
98465         REPLACE_STRPTIME. Invoke gl_PREREQ_STRPTIME.
98466         (gl_PREREQ_STRPTIME): New macro, extracted from gl_FUNC_STRPTIME.
98467         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize HAVE_STRPTIME,
98468         not REPLACE_STRPTIME.
98469         * modules/time (Makefile.am): Substitute HAVE_STRPTIME, not
98470         REPLACE_STRPTIME.
98472 2010-04-03  Bruno Haible  <bruno@clisp.org>
98474         timegm: Fix C++ test error on mingw.
98475         * lib/time.in.h (timegm): Use modern idiom.
98476         * m4/timegm.m4 (gl_FUNC_TIMEGM): When timegm does not exist, set
98477         HAVE_TIMEGM to 0, not REPLACE_TIMEGM to 1.
98478         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize HAVE_TIMEGM.
98479         * modules/time (Makefile.am): Substitute HAVE_TIMEGM.
98481 2010-04-03  Bruno Haible  <bruno@clisp.org>
98483         timegm: Assume declaration if function exists.
98484         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume timegm is declared if and only
98485         if it exists. Don't clobber ac_cv_func_timegm.
98487 2010-04-03  Bruno Haible  <bruno@clisp.org>
98489         time_r: Fix C++ test error on mingw.
98490         * lib/time.in.h (localtime_r, gmtime_r): Use modern idiom.
98491         * m4/time_r.m4 (gl_TIME_R): When localtime_r does not exist, set
98492         HAVE_LOCALTIME_R to 0, not REPLACE_LOCALTIME_R to 1.
98493         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize HAVE_LOCALTIME_R.
98494         * modules/time (Makefile.am): Substitute HAVE_LOCALTIME_R.
98496 2010-04-03  Bruno Haible  <bruno@clisp.org>
98498         time_r: Minor updates.
98499         * modules/time_r (Description): Mention the provided functions.
98500         * lib/time_r.c: Don't include <string.h>.
98501         * doc/posix-functions/gmtime_r.texi: Mention the 'time_r' module.
98502         * doc/posix-functions/localtime_r.texi: Likewise.
98504 2010-04-03  Bruno Haible  <bruno@clisp.org>
98506         time: Fix regression introduced on 2010-03-08.
98507         * m4/time_h.m4 (gl_TIME_MODULE_INDICATOR): Require
98508         gl_HEADER_TIME_H_DEFAULTS, not gl_HEADER_STRING_H_DEFAULTS.
98510 2010-04-03  Jim Meyering  <meyering@redhat.com>
98512         maint.mk: don't silently disable project-specific syntax-check rules
98513         * top/maint.mk (_prohibit_regexp): Define, to help people realize
98514         that they need to convert their project-specific syntax-check rules
98515         to use the new _sc_search_regexp.
98517 2010-04-03  Bruno Haible  <bruno@clisp.org>
98519         fchdir: Fix regression introduced on 2010-03-08.
98520         * lib/unistd.in.h (fchdir): Fix declaration.
98521         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Set HAVE_FCHDIR, not REPLACE_FCHDIR.
98522         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize HAVE_FCHDIR, not
98523         REPLACE_FCHDIR.
98524         * modules/unistd (Makefile.am): Substitute HAVE_FCHDIR, not
98525         REPLACE_FCHDIR.
98527 2010-04-03  Bruno Haible  <bruno@clisp.org>
98529         getpagesize: Fix C++ test error on mingw.
98530         * lib/unistd.in.h (getpagesize): Don't use _GL_CXXALIASWARN if the
98531         system does not declare the function.
98532         * m4/getpagesize.m4 (gl_FUNC_GETPAGESIZE): Also check whether it's
98533         declared.
98534         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
98535         HAVE_DECL_GETPAGESIZE.
98536         * modules/unistd (Makefile.am): Substitute HAVE_DECL_GETPAGESIZE.
98538 2010-04-03  Bruno Haible  <bruno@clisp.org>
98540         stdio: Make C++ tests work on mingw.
98541         * lib/stdio.in.h (getline): Don't use _GL_CXXALIASWARN if the system
98542         does not declare the function.
98544 2010-04-03  Bruno Haible  <bruno@clisp.org>
98546         ftello: Fix C++ test error on mingw.
98547         * lib/stdio.in.h (ftello): Use modern idiom.
98548         * lib/ftello.c (ftello): Renamed from rpl_ftello.
98549         * m4/ftello.m4 (gl_FUNC_FTELLO): Distinguish the case that the function
98550         is missing and that it needs to be replaced.
98551         (gl_REPLACE_FTELLO): Don't set REPLACE_FTELLO here.
98552         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize HAVE_FTELLO.
98553         * modules/stdio (Makefile.am): Substitute HAVE_FTELLO.
98555 2010-04-03  Bruno Haible  <bruno@clisp.org>
98557         fseeko: Fix C++ test error on mingw.
98558         * lib/stdio.in.h (fseeko): Use modern idiom.
98559         * lib/fseeko.c (fseeko): Renamed from rpl_fseeko.
98560         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Distinguish the case that the function
98561         is missing and that it needs to be replaced.
98562         (gl_REPLACE_FSEEKO): Don't set REPLACE_FSEEKO here.
98563         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize HAVE_FSEEKO.
98564         * modules/stdio (Makefile.am): Substitute HAVE_FSEEKO.
98566 2010-04-03  Bruno Haible  <bruno@clisp.org>
98568         mkstemp: Fix C++ test error on mingw.
98569         * lib/stdlib.in.h (mkstemp): Use modern idiom.
98570         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Distinguish the case that the
98571         function is missing and that it needs to be replaced.
98572         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_MKSTEMP.
98573         * modules/stdlib (Makefile.am): Substitute HAVE_MKSTEMP.
98575 2010-04-03  Bruno Haible  <bruno@clisp.org>
98577         stpncpy: Fix C++ test error on mingw.
98578         * lib/string.in.h (stpncpy): Use modern idiom.
98579         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Distinguish the case that the
98580         function is missing and that it needs to be replaced.
98581         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
98582         REPLACE_STPNCPY.
98583         * modules/string (Makefile.am): Substitute REPLACE_STPNCPY.
98585 2010-04-03  Bruno Haible  <bruno@clisp.org>
98587         sys_stat: Fix C++ test error on mingw.
98588         * build-aux/c++defs.h (_GL_CXXALIAS_RPL_CAST_1): New macro.
98589         * lib/sys_stat.in.h (lchmod): Use it instead of _GL_CXXALIAS_RPL_1.
98591 2010-04-03  Bruno Haible  <bruno@clisp.org>
98593         pty: Update doc.
98594         * doc/glibc-headers/pty.texi: Mention changes done since 2010-03-18.
98596 2010-04-03  Bruno Haible  <bruno@clisp.org>
98598         unistd: Fix C++ test error on mingw.
98599         * lib/unistd.in.h (getcwd): Use _GL_CXXALIAS_SYS_CAST.
98601 2010-04-03  Bruno Haible  <bruno@clisp.org>
98603         Update doc regarding mingw.
98604         * doc/glibc-functions/openpty.texi: Update regarding mingw.
98605         * doc/glibc-functions/login_tty.texi: Likewise.
98606         * doc/glibc-functions/forkpty.texi: Likewise.
98608 2010-04-03  Bruno Haible  <bruno@clisp.org>
98610         stdlib: Avoid compilation failure of c-strtold on mingw.
98611         * lib/stdlib.in.h: Don't include <unistd.h> on native Windows systems.
98613 2010-04-03  Bruno Haible  <bruno@clisp.org>
98615         locale: Make C++ tests work on Cygwin and mingw.
98616         * lib/locale.in.h (duplocale): Don't use _GL_CXXALIASWARN if gnulib
98617         cannot provide the function.
98618         Reported by Simon Josefsson.
98620 2010-04-03  Bruno Haible  <bruno@clisp.org>
98622         localename: Port to MacOS X 10.6.
98623         * lib/localename.c (gl_locale_name_thread_unsafe): On MacOS X, try the
98624         memory layout of the locales in MacOS X 10.6 as well.
98625         Reported by Panu Kekäläinen <panu@kekalainen.eu>.
98627 2010-04-02  Bruno Haible  <bruno@clisp.org>
98629         gnulib-tool: Ensure that long-running tests are executed last.
98630         * gnulib-tool (func_emit_tests_Makefile_am): Emit the code for long-
98631         running tests after the one for the other tests.
98633 2010-04-02  Bruno Haible  <bruno@clisp.org>
98635         gnulib-tool: Ensure the tests in the main directory are executed first.
98636         * gnulib-tool (func_emit_tests_Makefile_am): Initialize SUBDIRS to
98637         start with the current directory.
98639 2010-04-02  Bruno Haible  <bruno@clisp.org>
98641         Tests for module 'havelib', moved here from GNU gettext.
98642         * modules/havelib-tests: New file, from gettext/autoconf-lib-link with
98643         modifications.
98644         * tests/havelib/README: New file, from gettext/autoconf-lib-link.
98645         * tests/havelib/Makefile.am: New file, from gettext/autoconf-lib-link
98646         with modifications.
98647         * tests/havelib/rpath-1: New file, from gettext/autoconf-lib-link with
98648         modifications.
98649         * tests/havelib/rpath-1a: New file, from gettext/autoconf-lib-link.
98650         * tests/havelib/rpath-1b: New file, from gettext/autoconf-lib-link.
98651         * tests/havelib/rpath-2_a: New file, from gettext/autoconf-lib-link
98652         with modifications.
98653         * tests/havelib/rpath-2_b: New file, from gettext/autoconf-lib-link
98654         with modifications.
98655         * tests/havelib/rpath-2aaa: New file, from gettext/autoconf-lib-link.
98656         * tests/havelib/rpath-2aab: New file, from gettext/autoconf-lib-link.
98657         * tests/havelib/rpath-2aac: New file, from gettext/autoconf-lib-link.
98658         * tests/havelib/rpath-2aad: New file, from gettext/autoconf-lib-link.
98659         * tests/havelib/rpath-2aba: New file, from gettext/autoconf-lib-link.
98660         * tests/havelib/rpath-2abb: New file, from gettext/autoconf-lib-link.
98661         * tests/havelib/rpath-2abc: New file, from gettext/autoconf-lib-link.
98662         * tests/havelib/rpath-2abd: New file, from gettext/autoconf-lib-link.
98663         * tests/havelib/rpath-2baa: New file, from gettext/autoconf-lib-link.
98664         * tests/havelib/rpath-2bab: New file, from gettext/autoconf-lib-link.
98665         * tests/havelib/rpath-2bac: New file, from gettext/autoconf-lib-link.
98666         * tests/havelib/rpath-2bad: New file, from gettext/autoconf-lib-link.
98667         * tests/havelib/rpath-2bba: New file, from gettext/autoconf-lib-link.
98668         * tests/havelib/rpath-2bbb: New file, from gettext/autoconf-lib-link.
98669         * tests/havelib/rpath-2bbc: New file, from gettext/autoconf-lib-link.
98670         * tests/havelib/rpath-2bbd: New file, from gettext/autoconf-lib-link.
98671         * tests/havelib/rpath-3_a: New file, from gettext/autoconf-lib-link
98672         with modifications.
98673         * tests/havelib/rpath-3_b: New file, from gettext/autoconf-lib-link
98674         with modifications.
98675         * tests/havelib/rpath-3aaa: New file, from gettext/autoconf-lib-link.
98676         * tests/havelib/rpath-3aab: New file, from gettext/autoconf-lib-link.
98677         * tests/havelib/rpath-3aac: New file, from gettext/autoconf-lib-link.
98678         * tests/havelib/rpath-3aad: New file, from gettext/autoconf-lib-link.
98679         * tests/havelib/rpath-3aae: New file, from gettext/autoconf-lib-link.
98680         * tests/havelib/rpath-3aaf: New file, from gettext/autoconf-lib-link.
98681         * tests/havelib/rpath-3aag: New file, from gettext/autoconf-lib-link.
98682         * tests/havelib/rpath-3aah: New file, from gettext/autoconf-lib-link.
98683         * tests/havelib/rpath-3aba: New file, from gettext/autoconf-lib-link.
98684         * tests/havelib/rpath-3abb: New file, from gettext/autoconf-lib-link.
98685         * tests/havelib/rpath-3abc: New file, from gettext/autoconf-lib-link.
98686         * tests/havelib/rpath-3abd: New file, from gettext/autoconf-lib-link.
98687         * tests/havelib/rpath-3abe: New file, from gettext/autoconf-lib-link.
98688         * tests/havelib/rpath-3abf: New file, from gettext/autoconf-lib-link.
98689         * tests/havelib/rpath-3abg: New file, from gettext/autoconf-lib-link.
98690         * tests/havelib/rpath-3abh: New file, from gettext/autoconf-lib-link.
98691         * tests/havelib/rpath-3baa: New file, from gettext/autoconf-lib-link.
98692         * tests/havelib/rpath-3bab: New file, from gettext/autoconf-lib-link.
98693         * tests/havelib/rpath-3bac: New file, from gettext/autoconf-lib-link.
98694         * tests/havelib/rpath-3bad: New file, from gettext/autoconf-lib-link.
98695         * tests/havelib/rpath-3bae: New file, from gettext/autoconf-lib-link.
98696         * tests/havelib/rpath-3baf: New file, from gettext/autoconf-lib-link.
98697         * tests/havelib/rpath-3bag: New file, from gettext/autoconf-lib-link.
98698         * tests/havelib/rpath-3bah: New file, from gettext/autoconf-lib-link.
98699         * tests/havelib/rpath-3bba: New file, from gettext/autoconf-lib-link.
98700         * tests/havelib/rpath-3bbb: New file, from gettext/autoconf-lib-link.
98701         * tests/havelib/rpath-3bbc: New file, from gettext/autoconf-lib-link.
98702         * tests/havelib/rpath-3bbd: New file, from gettext/autoconf-lib-link.
98703         * tests/havelib/rpath-3bbe: New file, from gettext/autoconf-lib-link.
98704         * tests/havelib/rpath-3bbf: New file, from gettext/autoconf-lib-link.
98705         * tests/havelib/rpath-3bbg: New file, from gettext/autoconf-lib-link.
98706         * tests/havelib/rpath-3bbh: New file, from gettext/autoconf-lib-link.
98707         * tests/havelib/rpathx/rpathx.c: New file, from
98708         gettext/autoconf-lib-link.
98709         * tests/havelib/rpathx/Makefile.am: New file, from
98710         gettext/autoconf-lib-link.
98711         * tests/havelib/rpathx/configure.ac: New file, from
98712         gettext/autoconf-lib-link with modifications.
98713         * tests/havelib/rpathy/rpathy.c: New file, from
98714         gettext/autoconf-lib-link.
98715         * tests/havelib/rpathy/Makefile.am: New file, from
98716         gettext/autoconf-lib-link.
98717         * tests/havelib/rpathy/configure.ac: New file, from
98718         gettext/autoconf-lib-link with modifications.
98719         * tests/havelib/rpathz/rpathz.c: New file, from
98720         gettext/autoconf-lib-link.
98721         * tests/havelib/rpathz/Makefile.am: New file, from
98722         gettext/autoconf-lib-link.
98723         * tests/havelib/rpathz/configure.ac: New file, from
98724         gettext/autoconf-lib-link with modifications.
98725         * tests/havelib/rpathlx/usex.c: New file, from
98726         gettext/autoconf-lib-link.
98727         * tests/havelib/rpathlx/Makefile.am: New file, from
98728         gettext/autoconf-lib-link.
98729         * tests/havelib/rpathlx/configure.ac: New file, from
98730         gettext/autoconf-lib-link with modifications.
98731         * tests/havelib/rpathly/usey.c: New file, from
98732         gettext/autoconf-lib-link.
98733         * tests/havelib/rpathly/Makefile.am: New file, from
98734         gettext/autoconf-lib-link.
98735         * tests/havelib/rpathly/configure.ac: New file, from
98736         gettext/autoconf-lib-link with modifications.
98737         * tests/havelib/rpathlz/usez.c: New file, from
98738         gettext/autoconf-lib-link.
98739         * tests/havelib/rpathlz/Makefile.am: New file, from
98740         gettext/autoconf-lib-link.
98741         * tests/havelib/rpathlz/configure.ac: New file, from
98742         gettext/autoconf-lib-link with modifications.
98743         * tests/havelib/rpathlyx/usey.c: New file, from
98744         gettext/autoconf-lib-link.
98745         * tests/havelib/rpathlyx/Makefile.am: New file, from
98746         gettext/autoconf-lib-link.
98747         * tests/havelib/rpathlyx/configure.ac: New file, from
98748         gettext/autoconf-lib-link with modifications.
98749         * tests/havelib/rpathlzyx/usez.c: New file, from
98750         gettext/autoconf-lib-link.
98751         * tests/havelib/rpathlzyx/Makefile.am: New file, from
98752         gettext/autoconf-lib-link.
98753         * tests/havelib/rpathlzyx/configure.ac: New file, from
98754         gettext/autoconf-lib-link with modifications.
98755         * tests/havelib/rpathcfg.sh: New file, from gettext/autoconf-lib-link
98756         with modifications.
98758 2010-04-02  Bruno Haible  <bruno@clisp.org>
98760         gnulib-tool: Create distributed built sources also for the tests.
98761         * gnulib-tool (func_create_testdir): Also generate distributed built
98762         sources in the tests directory.
98764 2010-04-02  Bruno Haible  <bruno@clisp.org>
98766         gnulib-tool: Obey user's environment variables.
98767         * gnulib-tool (func_create_testdir): When creating built sources,
98768         respect the environment variables for autoconf, automake, etc. given by
98769         the user.
98771 2010-04-02  Bruno Haible  <bruno@clisp.org>
98773         gnulib-tool: Provide the value of --m4-base to modules.
98774         * gnulib-tool (func_import, func_create_testdir): Emit a definition
98775         of gl_m4_base.
98777 2010-04-02  Eric Blake  <eblake@redhat.com>
98779         maint.mk: fix some fallout
98780         * NEWS: Document the incompatible change, and its effect on cfg.mk.
98781         * top/maint.mk (sc_prohibit_test_minus_ao): Update.
98783 2010-03-28  Jose E. Marchesi  <jemarch@gnu.org>
98785         maint.mk: _sc_search_regexp: generalize and rename from _prohibit_regexp
98786         * top/maint.mk (_sc_search_regexp): Rename from _prohibit_regexp.
98787         (sc_cast_of_argument_to_free): Adapt to use _sc_search_regexp.
98788         (sc_cast_of_x_alloc_return_value): Likewise.
98789         (sc_cast_of_alloca_return_value): Likewise.
98790         (sc_space_tab): Likewise.
98791         (sc_prohibit_atoi_atof): Likewise.
98792         (sc_prohibit_magic_number_exit): Likewise.
98793         (sc_error_exit_success): Likewise.
98794         (sc_file_system): Likewise.
98795         (sc_prohibit_have_config_h): Likewise.
98796         (sc_require_config_h): Likewise.
98797         (sc_prohibit_HAVE_MBRTOWC): Likewise.
98798         (sc_obsolete_symbols): Likewise.
98799         (sc_changelog): Likewise.
98800         (sc_program_name): Likewise.
98801         (sc_the_the): Likewise.
98802         (sc_trailing_blank): Likewise.
98803         (sc_two_space_separator_in_usage): Likewise.
98804         (sc_useless_cpp_parens): Likewise.
98805         (sc_GPL_version): Likewise.
98806         (sc_GFDL_version): Likewise.
98807         (sc_texinfo_acronym): Likewise.
98808         (sc_prohibit_cvs_keyword): Likewise.
98809         (sc_prohibit_stat_st_blocks): Likewise.
98810         (sc_prohibit_S_IS_definition): Likewise.
98811         (sc_redundant_const): Likewise.
98812         (sc_makefile_TAB_only_indentation): Likewise.
98813         (sc_m4_quote_check): Likewise.
98814         (sc_makefile_path_separator_check): Likewise.
98815         (sc_copyright_check): Likewise.
98816         (sc_Wundef_boolean): Likewise.
98817         (sc_vulnerable_makefile_CVE-2009-4029): Likewise.
98819         maint.mk: match 0 or more whitespace-before-function-call '('
98820         * top/maint.mk (sc_error_exit_success): Relax regexp to match uses
98821         that have zero or two-and-more spaces between the function name
98822         and the open parenthesis.
98823         (sc_error_message_warn_fatal): Likewise.
98824         (sc_error_message_uppercase): Likewise.
98825         (sc_error_message_period): Likewise.
98827 2010-03-31  Eric Blake  <eblake@redhat.com>
98829         maint.mk: check for [ as well as test
98830         * top/maint.mk (sc_prohibit_test_minus_ao): Extend test.
98831         Based on a libvirt report by Matthias Bolte.
98833         gnumakefile: don't squelch _version output
98834         * top/GNUmakefile (_version): Create one-shot dependency rather
98835         than using $(shell) when version must be regenerated.
98836         (_autoreconf): Run verbosely, by default.
98838         sys_time: avoid compiler warnings
98839         * lib/sys_time.in.h (includes): Ensure gcc pragma is
98840         unconditional, fixing regression from 2010-03-29.
98841         Reported by Simon Josefsson.
98843 2010-03-28  Jose E. Marchesi  <jemarch@gnu.org>
98845         maint.mk: s/_header_without_use/_sc_header_without_use/
98846         * top/maint.mk (_sc_header_without_use): Rename from _header_without_use.
98847         (sc_prohibit_assert_without_use): Use the new name.
98848         (sc_prohibit_close_stream_without_use): Likewise.
98849         (sc_prohibit_getopt_without_use): Likewise.
98850         (sc_prohibit_quotearg_without_use): Likewise.
98851         (sc_prohibit_quote_without_use): Likewise.
98852         (sc_prohibit_long_options_without_use): Likewise.
98853         (sc_prohibit_inttostr_without_use): Likewise.
98854         (sc_prohibit_ignore_value_without_use): Likewise.
98855         (sc_prohibit_error_without_use): Likewise.
98856         (sc_prohibit_xalloc_without_use): Likewise.
98857         (sc_prohibit_hash_without_use): Likewise.
98858         (sc_prohibit_hash_pjw_without_use): Likewise.
98859         (sc_prohibit_safe_read_without_use): Likewise.
98860         (sc_prohibit_argmatch_without_use): Likewise.
98861         (sc_prohibit_canonicalize_without_use): Likewise.
98862         (sc_prohibit_root_dev_ino_without_use): Likewise.
98863         (sc_prohibit_openat_without_use): Likewise.
98864         (sc_prohibit_c_ctype_without_use): Likewise.
98865         (sc_prohibit_signal_without_use): Likewise.
98866         (sc_prohibit_intprops_without_use): Likewise.
98868 2010-03-30  Eric Blake  <eblake@redhat.com>
98870         maint: improve module indicators
98871         * m4/gnulib-common.m4 (gl_MODULE_INDICATOR_SET_VARIABLE)
98872         (gl_MODULE_INDICATOR, gl_MODULE_INDICATOR_FOR_TESTS): Fit in 80
98873         columns, and avoid extra macro expansion.
98875         fdopendir: work around FreeBSD bug
98876         * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): New witness.
98877         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Set it.
98878         * modules/dirent (Makefile.am): Substitute it.
98879         * lib/dirent.in.h (fdopendir): Supply missing FreeBSD
98880         declaration.
98881         * doc/posix-functions/fdopendir.texi (fdopendir): Document the
98882         fix.
98883         Reported by Christian Weisgerber <naddy@mips.inka.de>.
98885 2010-03-29  Bruno Haible  <bruno@clisp.org>
98887         Emit #pragma system_header after the inclusion guard, not before.
98888         * lib/arpa_inet.in.h: Emit #pragma system_header after the inclusion
98889         guard that spans the entire file, not before. This enables an
98890         optimization in GCC's preprocessor.
98891         * lib/ctype.in.h: Likewise.
98892         * lib/dirent.in.h: Likewise.
98893         * lib/errno.in.h: Likewise.
98894         * lib/float.in.h: Likewise.
98895         * lib/getopt.in.h: Likewise.
98896         * lib/iconv.in.h: Likewise.
98897         * lib/langinfo.in.h: Likewise.
98898         * lib/locale.in.h: Likewise.
98899         * lib/math.in.h: Likewise.
98900         * lib/netdb.in.h: Likewise.
98901         * lib/netinet_in.in.h: Likewise.
98902         * lib/pty.in.h: Likewise.
98903         * lib/sched.in.h: Likewise.
98904         * lib/se-selinux.in.h: Likewise.
98905         * lib/search.in.h: Likewise.
98906         * lib/spawn.in.h: Likewise.
98907         * lib/stdarg.in.h: Likewise.
98908         * lib/stdint.in.h: Likewise.
98909         * lib/string.in.h: Likewise.
98910         * lib/strings.in.h: Likewise.
98911         * lib/sys_file.in.h: Likewise.
98912         * lib/sys_ioctl.in.h: Likewise.
98913         * lib/sys_time.in.h: Likewise.
98914         * lib/sys_times.in.h: Likewise.
98915         * lib/sys_utsname.in.h: Likewise.
98916         * lib/sys_wait.in.h: Likewise.
98917         * lib/sysexits.in.h: Likewise.
98918         * lib/wctype.in.h: Likewise.
98920 2010-03-28  James Youngman  <jay@gnu.org>
98922         save-cwd: don't leak a file descriptor when the caller execs.
98923         * lib/save-cwd.c (save_cwd): set the close-on-exec flag for the
98924         saved file descriptor.
98925         * modules/save-cwd (Depends-on): Depend on cloexec.
98927 2010-03-29  Bruno Haible  <bruno@clisp.org>
98929         Remove vestiges of fts-lgpl module.
98930         * lib/fts_.h: Assume GNULIB_FTS is 1.
98931         * lib/fts.c: Likewise.
98932         * modules/fts (configure.ac): Remove gl_MODULE_INDICATOR invocation.
98934 2010-03-28  Bruno Haible  <bruno@clisp.org>
98936         Fix definition of tests witness macro.
98937         * gnulib-tool (func_import): Fix definition of witness macro.
98939 2010-03-28  Bruno Haible  <bruno@clisp.org>
98941         Fix ioctl's protoype on glibc systems.
98942         * lib/sys_ioctl.in.h (ioctl): If REPLACE_IOCTL is 1, use a wrapper. Use
98943         _GL_CXXALIAS_SYS, not _GL_CXXALIAS_SYS_CAST.
98944         * lib/ioctl.c (rpl_ioctl) [HAVE_IOCTL]: New wrapper.
98945         * modules/ioctl (configure.ac): Test whether ioctl has the POSIX
98946         signature. If not, arrange to replace the ioctl function.
98947         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H_DEFAULTS): Initialize
98948         REPLACE_IOCTL.
98949         * modules/sys_ioctl (Makefile.am): Substitute REPLACE_IOCTL.
98950         * doc/posix-functions/ioctl.texi: Mention the glibc problem.
98951         Reported by Ludovic Courtès <ludo@gnu.org>.
98953 2010-03-28  Javier Villavicencio  <the_paya@gentoo.org>
98955         exclude: fix the case of globs vs. EXCLUDE_INCLUDE
98956         * lib/exclude.c (excluded_file_pattern_p): Fix logic error that
98957         made it so grep -r --include=GLOB* ... did not work.
98959 2010-03-26  Jim Meyering  <meyering@redhat.com>
98960             Eric Blake  <eblake@redhat.com>
98962         maint.mk: prohibit use of test's -o and -a operators
98963         * top/maint.mk (sc_prohibit_test_minus_ao): New rule.
98965 2010-03-28  Bruno Haible  <bruno@clisp.org>
98967         Remove unused GNULIB_XYZ macro definitions.
98968         * modules/crypto/gc-camellia (configure.ac): Remove gl_MODULE_INDICATOR
98969         invocation.
98971 2010-03-28  Bruno Haible  <bruno@clisp.org>
98973         Mark privileged tests modules.
98974         * modules/idpriv-drop-tests (Status): New section.
98975         * modules/idpriv-droptemp-tests (Status): New section.
98977 2010-03-28  Bruno Haible  <bruno@clisp.org>
98979         Split C++ tests into separate tests modules.
98980         * modules/dirent-c++-tests: New file, extracted from
98981         modules/dirent-tests.
98982         * modules/dirent-tests: Depend on it.
98983         * modules/fcntl-h-c++-tests: New file, extracted from
98984         modules/fcntl-h-tests.
98985         * modules/fcntl-h-tests: Depend on it.
98986         * modules/glob-c++-tests: New file, extracted from modules/glob-tests.
98987         * modules/glob-tests: Depend on it.
98988         * modules/iconv-h-c++-tests: New file, extracted from
98989         modules/iconv-h-tests.
98990         * modules/iconv-h-tests: Depend on it.
98991         * modules/langinfo-c++-tests: New file, extracted from
98992         modules/langinfo-tests.
98993         * modules/langinfo-tests: Depend on it.
98994         * modules/locale-c++-tests: New file, extracted from
98995         modules/locale-tests.
98996         * modules/locale-tests: Depend on it.
98997         * modules/math-c++-tests: New file, extracted from modules/math-tests.
98998         * modules/math-tests: Depend on it.
98999         * modules/pty-c++-tests: New file, extracted from modules/pty-tests.
99000         * modules/pty-tests: Depend on it.
99001         * modules/search-c++-tests: New file, extracted from
99002         modules/search-tests.
99003         * modules/search-tests: Depend on it.
99004         * modules/signal-c++-tests: New file, extracted from
99005         modules/signal-tests.
99006         * modules/signal-tests: Depend on it.
99007         * modules/spawn-c++-tests: New file, extracted from
99008         modules/spawn-tests.
99009         * modules/spawn-tests: Depend on it.
99010         * modules/stdio-c++-tests: New file, extracted from
99011         modules/stdio-tests.
99012         * modules/stdio-tests: Depend on it.
99013         * modules/stdlib-c++-tests: New file, extracted from
99014         modules/stdlib-tests.
99015         * modules/stdlib-tests: Depend on it.
99016         * modules/string-c++-tests: New file, extracted from
99017         modules/string-tests.
99018         * modules/string-tests: Depend on it.
99019         * modules/sys_ioctl-c++-tests: New file, extracted from
99020         modules/sys_ioctl-tests.
99021         * modules/sys_ioctl-tests: Depend on it.
99022         * modules/sys_select-c++-tests: New file, extracted from
99023         modules/sys_select-tests.
99024         * modules/sys_select-tests: Depend on it.
99025         * modules/sys_socket-c++-tests: New file, extracted from
99026         modules/sys_socket-tests.
99027         * modules/sys_socket-tests: Depend on it.
99028         * modules/sys_stat-c++-tests: New file, extracted from
99029         modules/sys_stat-tests.
99030         * modules/sys_stat-tests: Depend on it.
99031         * modules/sys_time-c++-tests: New file, extracted from
99032         modules/sys_time-tests.
99033         * modules/sys_time-tests: Depend on it.
99034         * modules/time-c++-tests: New file, extracted from modules/time-tests.
99035         * modules/time-tests: Depend on it.
99036         * modules/unistd-c++-tests: New file, extracted from
99037         modules/unistd-tests.
99038         * modules/unistd-tests: Depend on it.
99039         * modules/wchar-c++-tests: New file, extracted from
99040         modules/wchar-tests.
99041         * modules/wchar-tests: Depend on it.
99042         * modules/wctype-c++-tests: New file, extracted from
99043         modules/wctype-tests.
99044         * modules/wctype-tests: Depend on it.
99045         Reported by Simon Josefsson.
99047 2010-03-28  Bruno Haible  <bruno@clisp.org>
99049         gnulib-tool: Allow 'foo-tests' module even if there is no module 'foo'.
99050         * gnulib-tool (func_exists_module): New function, extracted from
99051         func_verify_module.
99052         (func_verify_module): Use it.
99053         (func_get_dependencies): Synthetize a dependency from 'foo-tests' to
99054         'foo' only if 'foo' exists.
99055         * doc/gnulib.texi (Extra tests modules): Explain how to split a tests
99056         module.
99058 2010-03-28  Bruno Haible  <bruno@clisp.org>
99060         gnulib-tool: Add support for special categories of tests.
99061         * gnulib-tool: New options --with-c++-tests, --with-longrunning-tests,
99062         --with-privileged-tests, --with-unportable-tests, --with-all-tests.
99063         (func_usage): Document them.
99064         (inc_cxx_tests, inc_longrunning_tests, inc_privileged_tests,
99065         inc_unportable_tests, inc_all_tests): New variables.
99066         (func_acceptable): Consider these variables.
99067         (func_modules_transitive_closure): Make it work when the 'Status' field
99068         consists of multiple words.
99069         (func_import): Store and restore the values of inc_cxx_tests,
99070         inc_longrunning_tests, inc_privileged_tests, inc_unportable_tests,
99071         inc_all_tests in gnulib-comp.m4.
99072         (func_create_testdir): Set inc_all_tests to true.
99073         * doc/gnulib.texi (Extra tests modules): New section.
99074         Suggested by Jim Meyering.
99076 2010-03-28  Bruno Haible  <bruno@clisp.org>
99078         ansi-c++-opt: Allow turning off the C++ build by default.
99079         * m4/ansi-c++.m4 (gl_CXX_CHOICE): Let CXX_CHOICE default to 'no' if
99080         gl_CXX_CHOICE_DEFAULT_NO is defined.
99081         Requested by Eric Blake.
99083 2010-03-28  Bruno Haible  <bruno@clisp.org>
99085         unistd: Avoid #define replacements in C++ mode.
99086         * lib/unistd.in.h (socket, connect, accept, bind, getpeername,
99087         getsockname, getsockopt, listen, recv, send, recvfrom, sendto,
99088         setsockopt, shutdown, select): In C++, attach a warning to the function
99089         if possible, rather than #defining the symbol to a dysfunctional alias.
99090         Reported by John W. Eaton <jwe@gnu.org>.
99092 2010-03-28  Bruno Haible  <bruno@clisp.org>
99094         Fix link errors on mingw.
99095         * lib/sys_ioctl.in.h (ioctl): Fix declaration idiom.
99096         * modules/sys_ioctl-tests (Makefile.am): Link test-sys_ioctl-c++ with
99097         $(LIBSOCKET).
99098         * modules/sys_select-tests (Makefile.am): Link test-sys_select-c++ with
99099         $(LIBSOCKET).
99101 2010-03-28  Bruno Haible  <bruno@clisp.org>
99102             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
99104         lib-ignore: Determine different options for different compilers.
99105         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Set a variable which
99106         depends on the current language (C/C++/Fortran). Don't set LDFLAGS.
99107         Add comments.
99108         (_gl_IGNORE_UNUSED_LIBRARIES_OPTIONS): New macro.
99109         * NEWS: Mention the change.
99111 2010-03-27  Bruno Haible  <bruno@clisp.org>
99113         Remove unused GNULIB_XYZ macro definitions.
99114         * modules/dup3 (configure.ac): Remove gl_MODULE_INDICATOR invocation.
99115         * modules/fseek (configure.ac): Likewise.
99116         * modules/ioctl (configure.ac): Likewise.
99117         * modules/open (configure.ac): Likewise.
99118         * modules/stdlib-safer (configure.ac): Likewise.
99120 2010-03-27  Bruno Haible  <bruno@clisp.org>
99122         Add a remark about certain modules.
99123         * modules/malloc (Comment): New section.
99124         * modules/realloc (Comment): Likewise.
99125         * modules/sigpipe (Comment): Likewise.
99127 2010-03-27  Bruno Haible  <bruno@clisp.org>
99129         Resolve conflict between the two kinds of module indicators.
99130         * m4/gnulib-common.m4 (gl_MODULE_INDICATOR_FOR_TESTS): Define
99131         GNULIB_TEST_XYZ instead of GNULIB_XYZ.
99132         * modules/canonicalize (configure.ac): Invoke
99133         gl_MODULE_INDICATOR_FOR_TESTS.
99134         * tests/test-canonicalize-lgpl.c: Test GNULIB_TEST_XYZ instead of
99135         GNULIB_XYZ.
99136         * tests/test-dirent-c++.cc: Likewise.
99137         * tests/test-dirent-safer.c: Likewise.
99138         * tests/test-dup2.c: Likewise.
99139         * tests/test-fchdir.c: Likewise.
99140         * tests/test-fcntl-h-c++.cc: Likewise.
99141         * tests/test-getopt.c: Likewise.
99142         * tests/test-getopt.h: Likewise.
99143         * tests/test-langinfo-c++.cc: Likewise.
99144         * tests/test-locale-c++.cc: Likewise.
99145         * tests/test-math-c++.cc: Likewise.
99146         * tests/test-pty-c++.cc: Likewise.
99147         * tests/test-search-c++.cc: Likewise.
99148         * tests/test-signal-c++.cc: Likewise.
99149         * tests/test-spawn-c++.cc: Likewise.
99150         * tests/test-stdio-c++.cc: Likewise.
99151         * tests/test-stdlib-c++.cc: Likewise.
99152         * tests/test-string-c++.cc: Likewise.
99153         * tests/test-sys_ioctl-c++.cc: Likewise.
99154         * tests/test-sys_select-c++.cc: Likewise.
99155         * tests/test-sys_socket-c++.cc: Likewise.
99156         * tests/test-sys_stat-c++.cc: Likewise.
99157         * tests/test-sys_time-c++.cc: Likewise.
99158         * tests/test-time-c++.cc: Likewise.
99159         * tests/test-unistd-c++.cc: Likewise.
99160         * tests/test-wchar-c++.cc: Likewise.
99161         * tests/uninorm/test-u8-nfc.c: Likewise.
99162         * tests/uninorm/test-u8-nfd.c: Likewise.
99163         * tests/uninorm/test-u8-nfkc.c: Likewise.
99164         * tests/uninorm/test-u8-nfkd.c: Likewise.
99165         * tests/uninorm/test-u16-nfc.c: Likewise.
99166         * tests/uninorm/test-u16-nfd.c: Likewise.
99167         * tests/uninorm/test-u16-nfkc.c: Likewise.
99168         * tests/uninorm/test-u16-nfkd.c: Likewise.
99169         * tests/uninorm/test-u32-nfc.c: Likewise.
99170         * tests/uninorm/test-u32-nfc-big.c: Likewise.
99171         * tests/uninorm/test-u32-nfd.c: Likewise.
99172         * tests/uninorm/test-u32-nfd-big.c: Likewise.
99173         * tests/uninorm/test-u32-nfkc.c: Likewise.
99174         * tests/uninorm/test-u32-nfkc-big.c: Likewise.
99175         * tests/uninorm/test-u32-nfkd.c: Likewise.
99176         * tests/uninorm/test-u32-nfkd-big.c: Likewise.
99177         * tests/uninorm/test-u32-normalize-big.c: Likewise.
99179 2010-03-27  Bruno Haible  <bruno@clisp.org>
99181         Distinguish two kinds of module indicators.
99182         * m4/gnulib-common.m4 (gl_MODULE_INDICATOR_FOR_TESTS): Renamed from
99183         gl_MODULE_INDICATOR.
99184         (gl_MODULE_INDICATOR): New macro.
99185         * m4/dirent_h.m4 (gl_DIRENT_MODULE_INDICATOR): Invoke
99186         gl_MODULE_INDICATOR_FOR_TESTS instead of gl_MODULE_INDICATOR.
99187         * m4/fcntl_h.m4 (gl_FCNTL_MODULE_INDICATOR): Likewise.
99188         * m4/langinfo_h.m4 (gl_LANGINFO_MODULE_INDICATOR): Likewise.
99189         * m4/locale_h.m4 (gl_LOCALE_MODULE_INDICATOR): Likewise.
99190         * m4/math_h.m4 (gl_MATH_MODULE_INDICATOR): Likewise.
99191         * m4/pty_h.m4 (gl_PTY_MODULE_INDICATOR): Likewise.
99192         * m4/search_h.m4 (gl_SEARCH_MODULE_INDICATOR): Likewise.
99193         * m4/signal_h.m4 (gl_SIGNAL_MODULE_INDICATOR): Likewise.
99194         * m4/spawn_h.m4 (gl_SPAWN_MODULE_INDICATOR): Likewise.
99195         * m4/stdio_h.m4 (gl_STDIO_MODULE_INDICATOR): Likewise.
99196         * m4/stdlib_h.m4 (gl_STDLIB_MODULE_INDICATOR): Likewise.
99197         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Likewise.
99198         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_MODULE_INDICATOR): Likewise.
99199         * m4/sys_select_h.m4 (gl_SYS_SELECT_MODULE_INDICATOR): Likewise.
99200         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_MODULE_INDICATOR): Likewise.
99201         * m4/sys_stat_h.m4 (gl_SYS_STAT_MODULE_INDICATOR): Likewise.
99202         * m4/sys_time_h.m4 (gl_SYS_TIME_MODULE_INDICATOR): Likewise.
99203         * m4/time_h.m4 (gl_TIME_MODULE_INDICATOR): Likewise.
99204         * m4/unistd_h.m4 (gl_UNISTD_MODULE_INDICATOR): Likewise.
99205         * m4/wchar_h.m4 (gl_WCHAR_MODULE_INDICATOR): Likewise.
99206         * modules/cloexec (configure.ac): Likewise.
99207         * modules/getopt-gnu (configure.ac): Likewise.
99208         * modules/uninorm/u8-normalize (configure.ac): Likewise.
99209         * modules/uninorm/u16-normalize (configure.ac): Likewise.
99210         * modules/uninorm/u32-normalize (configure.ac): Likewise.
99211         * modules/fdopendir (configure.ac): Invoke gl_MODULE_INDICATOR.
99213 2010-03-27  Bruno Haible  <bruno@clisp.org>
99215         New module description field 'Comment'.
99216         * gnulib-tool: New option --extract-comment.
99217         (func_usage): Document it.
99218         (sed_extract_prog, sed_extract_field_header): Support 'Comment' field.
99219         (func_get_comment): New function.
99220         * modules/TEMPLATE-EXTENDED: Add a blank Comment field.
99222 2010-03-27  Bruno Haible  <bruno@clisp.org>
99224         Addendum to 2010-02-07 commit.
99225         * gnulib-tool (func_usage): Document --extract-applicability option.
99227 2010-03-27  Bruno Haible  <bruno@clisp.org>
99229         Use GNULIB_POSIXCHECK instead of GNULIB_PORTCHECK.
99230         * lib/time.in.h (asctime, asctime_r, ctime, ctime_r): Test
99231         GNULIB_POSIXCHECK, not GNULIB_PORTCHECK. Provide compile-time warnings
99232         rather than link errors.
99234 2010-03-27  Bruno Haible  <bruno@clisp.org>
99236         Avoid side effects from tests-related modules on the compilation of lib.
99237         * m4/gnulib-common.m4 (gl_MODULE_INDICATOR_CONDITION): New macro.
99238         (gl_MODULE_INDICATOR_SET_VARIABLE): Use its expansion as a value.
99239         * gnulib-tool (func_emit_tests_Makefile_am): Accept a witness_macro
99240         parameter. Emit into AM_CPPFLAGS a definition of the designated C
99241         macro.
99242         (func_import): Define a witness macro. Assign it a value that depends
99243         on the current package. Override gl_MODULE_INDICATOR_CONDITION for the
99244         tests-related modules.
99245         (func_create_testdir): Update func_emit_tests_Makefile_am invocation.
99246         Reported by Jim Meyering.
99248 2010-03-27  Bruno Haible  <bruno@clisp.org>
99250         Factorize common .m4 code.
99251         * m4/gnulib-common.m4 (gl_MODULE_INDICATOR_SET_VARIABLE): New macro.
99252         * m4/arpa_inet_h.m4 (gl_ARPA_INET_MODULE_INDICATOR): Use it.
99253         * m4/ctype.m4 (gl_CTYPE_MODULE_INDICATOR): Likewise.
99254         * m4/dirent_h.m4 (gl_DIRENT_MODULE_INDICATOR): Likewise.
99255         * m4/fcntl_h.m4 (gl_FCNTL_MODULE_INDICATOR): Likewise.
99256         * m4/iconv_h.m4 (gl_ICONV_MODULE_INDICATOR): Likewise.
99257         * m4/inttypes.m4 (gl_INTTYPES_MODULE_INDICATOR): Likewise.
99258         * m4/langinfo_h.m4 (gl_LANGINFO_MODULE_INDICATOR): Likewise.
99259         * m4/locale_h.m4 (gl_LOCALE_MODULE_INDICATOR): Likewise.
99260         * m4/math_h.m4 (gl_MATH_MODULE_INDICATOR): Likewise.
99261         * m4/netdb_h.m4 (gl_NETDB_MODULE_INDICATOR): Likewise.
99262         * m4/pty_h.m4 (gl_PTY_MODULE_INDICATOR): Likewise.
99263         * m4/search_h.m4 (gl_SEARCH_MODULE_INDICATOR): Likewise.
99264         * m4/signal_h.m4 (gl_SIGNAL_MODULE_INDICATOR): Likewise.
99265         * m4/spawn_h.m4 (gl_SPAWN_MODULE_INDICATOR): Likewise.
99266         * m4/stddef_h.m4 (gl_STDDEF_MODULE_INDICATOR): Likewise.
99267         * m4/stdio_h.m4 (gl_STDIO_MODULE_INDICATOR): Likewise.
99268         * m4/stdlib_h.m4 (gl_STDLIB_MODULE_INDICATOR): Likewise.
99269         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Likewise.
99270         * m4/strings_h.m4 (gl_STRINGS_MODULE_INDICATOR): Likewise.
99271         * m4/sys_file_h.m4 (gl_HEADER_SYS_FILE_MODULE_INDICATOR): Likewise.
99272         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_MODULE_INDICATOR): Likewise.
99273         * m4/sys_select_h.m4 (gl_SYS_SELECT_MODULE_INDICATOR): Likewise.
99274         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_MODULE_INDICATOR): Likewise.
99275         * m4/sys_stat_h.m4 (gl_SYS_STAT_MODULE_INDICATOR): Likewise.
99276         * m4/sys_time_h.m4 (gl_SYS_TIME_MODULE_INDICATOR): Likewise.
99277         * m4/sys_times_h.m4 (gl_SYS_TIMES_MODULE_INDICATOR): Likewise.
99278         * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_MODULE_INDICATOR): Likewise.
99279         * m4/sys_wait_h.m4 (gl_SYS_WAIT_MODULE_INDICATOR): Likewise.
99280         * m4/time_h.m4 (gl_TIME_MODULE_INDICATOR): Likewise.
99281         * m4/unistd_h.m4 (gl_UNISTD_MODULE_INDICATOR): Likewise.
99282         * m4/wchar_h.m4 (gl_WCHAR_MODULE_INDICATOR): Likewise.
99284 2010-03-27  Bruno Haible  <bruno@clisp.org>
99286         Fix a compilation error on Cygwin with g++ >= 4.3.
99287         * lib/sys_stat.in.h (lchmod): Don't warn about the use of this function
99288         if it is undefined or if we alias it to chmod.
99289         (lstat): Don't warn about the use of this function if it is undefined
99290         or if we alias it to stat.
99291         Reported by Simon Josefsson.
99293 2010-03-27  Bruno Haible  <bruno@clisp.org>
99295         * m4/getlogin.m4 (gl_FUNC_GETLOGIN): Renamed from gl_GETLOGIN.
99296         * modules/getlogin (configure.ac): Update.
99298         * m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Renamed from gl_GETLOGIN_R.
99299         * modules/getlogin_r (configure.ac): Update.
99301         * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): Renamed from gl_INET_NTOP.
99302         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Update.
99303         * modules/inet_ntop (configure.ac): Update.
99305         * m4/inet_pton.m4 (gl_FUNC_INET_PTON): Renamed from gl_INET_PTON.
99306         * modules/inet_pton (configure.ac): Update.
99308         * m4/mbslen.m4 (gl_FUNC_MBSLEN): Renamed from gl_MBSLEN.
99309         * modules/mbslen (configure.ac): Update.
99311         * m4/pty.m4 (gl_FUNC_FORKPTY): Renamed from gl_FORKPTY.
99312         (gl_FUNC_OPENPTY): Renamed from gl_OPENPTY.
99313         * modules/forkpty (configure.ac): Update.
99314         * modules/openpty (configure.ac): Update.
99316 2010-03-26  Simon Josefsson  <simon@josefsson.org>
99318         * top/maint.mk (sc_texinfo_acronym): Don't infloop if there is
99319         no *.texi files.  Reported by Eric Blake <eblake@redhat.com>.
99321 2010-03-25  Eric Blake  <eblake@redhat.com>
99323         maint: use pragma consistently across replacement headers
99324         * lib/ctype.in.h (system_header): Hoist for consistent placement.
99325         * lib/dirent.in.h (system_header): Likewise.
99326         * lib/errno.in.h (system_header): Likewise.
99327         * lib/float.in.h (system_header): Likewise.
99328         * lib/getopt.in.h (system_header): Likewise.
99329         * lib/iconv.in.h (system_header): Likewise.
99330         * lib/inttypes.in.h (system_header): Likewise.
99331         * lib/langinfo.in.h (system_header): Likewise.
99332         * lib/locale.in.h (system_header): Likewise.
99333         * lib/math.in.h (system_header): Likewise.
99334         * lib/netdb.in.h (system_header): Likewise.
99335         * lib/netinet_in.in.h (system_header): Likewise.
99336         * lib/pty.in.h (system_header): Likewise.
99337         * lib/sched.in.h (system_header): Likewise.
99338         * lib/se-selinux.in.h (system_header): Likewise.
99339         * lib/search.in.h (system_header): Likewise.
99340         * lib/spawn.in.h (system_header): Likewise.
99341         * lib/stdarg.in.h (system_header): Likewise.
99342         * lib/stdint.in.h (system_header): Likewise.
99343         * lib/string.in.h (system_header): Likewise.
99344         * lib/strings.in.h (system_header): Likewise.
99345         * lib/sys_file.in.h (system_header): Likewise.
99346         * lib/sys_ioctl.in.h (system_header): Likewise.
99347         * lib/sys_socket.in.h (system_header): Likewise.
99348         * lib/sys_times.in.h (system_header): Likewise.
99349         * lib/sys_utsname.in.h (system_header): Likewise.
99350         * lib/sys_wait.in.h (system_header): Likewise.
99351         * lib/sysexits.in.h (system_header): Likewise.
99352         * lib/unistd.in.h (system_header): Likewise.
99353         * lib/wctype.in.h (system_header): Likewise.
99355         arpa/inet: fix mingw compilation warning
99356         * lib/arpa_inet.in.h (system_header): Hoist to be unconditional.
99357         Reported by Matthew Bolte.
99359 2010-03-25  Bruno Haible  <bruno@clisp.org>
99361         Avoid collision between gnulib wrapper and libintl wrapper.
99362         * lib/printf.c (printf): Don't define if a printf wrapper is already
99363         defined in intl/printf.c.
99364         Reported by Michel Boaventura <michel@michelboaventura.com>.
99366 2010-03-25  Bruno Haible  <bruno@clisp.org>
99368         Use ANSI C.
99369         * lib/readutmp.h (getutent): Provide ANSI C prototype.
99371 2010-03-25  Bruno Haible  <bruno@clisp.org>
99373         Minor formatting changes.
99374         * lib/acosl.c: Insert space before function argument list.
99375         * lib/argz.c: Likewise.
99376         * lib/asinl.c: Likewise.
99377         * lib/expl.c: Likewise.
99378         * lib/gen-uni-tables.c: Likewise.
99379         * lib/gettext.h: Likewise.
99380         * lib/glthread/lock.h: Likewise.
99381         * lib/tanl.c: Likewise.
99382         * lib/uniname/uniname.c: Likewise.
99383         * tests/test-idpriv-drop.c: Likewise.
99384         * tests/test-idpriv-droptemp.c: Likewise.
99385         * tests/test-lock.c: Likewise.
99386         * tests/test-tls.c: Likewise.
99387         * lib/argp-help.c: Insert space before function-like macro argument
99388         list.
99389         * lib/memcmp.c: Likewise.
99390         * tests/test-base64.c: Likewise.
99391         * lib/localename.c: Insert space before sizeof's argument list.
99392         * lib/safe-alloc.h: Likewise.
99393         * lib/file-set.h: Insert space before macro argument list.
99394         * tests/test-argp.c: Likewise.
99395         * lib/argp-namefrob.h: Insert space before function parameter list.
99396         * lib/getaddrinfo.c: Likewise.
99397         * lib/netdb.in.h: Likewise.
99398         * lib/parse-duration.h: Likewise.
99399         * lib/parse-duration.c: Likewise.
99400         * lib/poll.c: Likewise.
99401         * lib/select.c: Likewise.
99402         * lib/trim.h: Likewise.
99403         * tests/test-usleep.c: Likewise.
99404         * lib/ldexpl.c: Insert space before function parameter list and before
99405         function argument list.
99406         * lib/logl.c: Likewise.
99407         * lib/sqrtl.c: Likewise.
99408         * lib/trim.c: Likewise.
99409         * lib/cosl.c: Use GNU style indentation. Insert space before function
99410         argument list.
99411         * lib/sinl.c: Likewise.
99412         * lib/tsearch.c: Insert space after 'for'.
99413         Reported by Jim Meyering.
99415 2010-03-23  Pádraig Brady  <P@draigBrady.com>  (tiny change)
99417         * maint.mk (sc_Wundef_boolean): Check for the presence of the
99418         config header before grepping, as it's not present before
99419         autoreconf/configure are run.  Reported by Simon Josefsson.
99421 2010-03-23  Bruno Haible  <bruno@clisp.org>
99423         pt_chown: Make it work with automake < 1.11.
99424         * modules/pt_chown (Makefile.am): Define pkglibexecdir.
99425         Reported by Simon Josefsson.
99427 2010-03-23  Bruno Haible  <bruno@clisp.org>
99429         pt_chown: Don't depend on GPLed modules.
99430         * lib/pt_chown.c: Don't include idpriv.h.
99431         (main): Don't drop privileges.
99432         * modules/pt_chown (Depends-on): Remove idpriv-drop.
99433         Reported by Simon Josefsson.
99435 2010-03-24  Simon Josefsson  <simon@josefsson.org>
99437         * top/maint.mk (sc_texinfo_acronym): Add rule, based on
99438         suggestions from karl@freefriends.org (Karl Berry).
99440 2010-03-22  Eric Blake  <eblake@redhat.com>
99442         gethostname: further tweaks
99443         * lib/unistd.in.h (includes): Only worry about <winsock2.h> if we
99444         are overriding gethostname.
99445         Suggested by Bruno Haible.
99447 2010-03-21  Bruno Haible  <bruno@clisp.org>
99449         Fix comments.
99450         * lib/forkpty.c (rpl_forkpty): Fix comment.
99451         * lib/openpty.c (rpl_openpty): Likewise.
99452         Reported by Eric Blake.
99454 2010-03-22  Eric Blake  <eblake@redhat.com>
99456         gethostname: fix build on mingw
99457         * lib/unistd.in.h (includes): Work around fact that mingw
99458         <winsock2.h> re-includes <unistd.h>, by avoiding any
99459         redeclarations if we are being included by <winsock2.h>.
99460         Reported by Matthias Bolte.
99462 2010-03-21  Bruno Haible  <bruno@clisp.org>
99464         forkpty: Provide replacement on AIX, HP-UX, IRIX, Solaris.
99465         * lib/forkpty.c (forkpty): New replacement function, from glibc with
99466         modifications.
99467         * lib/pty.in.h (forkpty): Update declaration. Add comments.
99468         * m4/pty.m4 (gl_FORKPTY): If forkpty is not declared, arrange to
99469         provide the replacement.
99470         * modules/forkpty (Depends-on): Add openpty, login_tty.
99471         * m4/pty_h.m4 (gl_PTY_H_DEFAULTS): Initialize HAVE_FORKPTY.
99472         * modules/pty (Makefile.am): Substitute HAVE_FORKPTY.
99473         * doc/glibc-functions/forkpty.texi: More supported platforms.
99474         * config/srclist.txt: Add forkpty.c (commented).
99476 2010-03-21  Bruno Haible  <bruno@clisp.org>
99478         * modules/forkpty-tests: Use the common TEMPLATE-TESTS.
99479         (Makefile.am): Verify that PTY_LIB is defined.
99481         * modules/openpty-tests: Use the common TEMPLATE-TESTS.
99483 2010-03-21  Bruno Haible  <bruno@clisp.org>
99485         Tests for module 'login_tty'.
99486         * modules/login_tty-tests: New file.
99487         * tests/test-login_tty.c: New file.
99489         New module 'login_tty'.
99490         * lib/login_tty.c: New file.
99491         * m4/pty.m4 (gl_FUNC_LOGIN_TTY): New macro.
99492         * modules/login_tty: New file.
99493         * doc/glibc-functions/login_tty.texi: Mention the new module.
99495 2010-03-21  Bruno Haible  <bruno@clisp.org>
99497         login_tty: Documentation.
99498         * doc/glibc-functions/login_tty.texi: New file.
99499         * doc/gnulib.texi (Glibc <utmp.h>): Include it.
99501 2010-03-21  Bruno Haible  <bruno@clisp.org>
99503         pty: Consistent macro naming.
99504         * m4/pty_h.m4 (gl_PTY_H): Renamed from gl_PTY.
99505         * m4/pty.m4 (gl_FORKPTY, gl_OPENPTY): Update.
99506         * modules/pty (configure.ac): Update.
99508 2010-03-21  Bruno Haible  <bruno@clisp.org>
99510         Tests for openpty: Make stricter.
99511         * tests/test-openpty.c (main): Add test of canonical processing and
99512         erase.
99513         * modules/openpty-tests (Makefile.am): Verify that PTY_LIB is defined.
99515         openpty: Provide replacement on AIX, HP-UX, IRIX, Solaris.
99516         * lib/openpty.c (openpty): New replacement function.
99517         * lib/pty.in.h: Include <termios.h>.
99518         (openpty): Update declaration. Add comments.
99519         * m4/pty.m4 (gl_OPENPTY): Require AC_USE_SYSTEM_EXTENSIONS. If openpty
99520         is not declared, arrange to provide the replacement. Check for _getpty
99521         and posix_openpt.
99522         * modules/openpty (Depends-on): Add extensions, fcntl-h, ioctl.
99523         * m4/pty_h.m4 (gl_PTY_H_DEFAULTS): Initialize HAVE_OPENPTY.
99524         * modules/pty (Makefile.am): Substitute HAVE_OPENPTY.
99525         * modules/pty-tests (test_pty_c___LDADD): New variable.
99526         * doc/glibc-functions/openpty.texi: More supported platforms.
99528 2010-03-21  Bruno Haible  <bruno@clisp.org>
99530         setenv: Tweaks.
99531         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): Include necessary headers in
99532         the test program.
99533         * doc/posix-functions/setenv.texi: Update platforms list.
99535 2010-03-21  Bruno Haible  <bruno@clisp.org>
99537         New module 'unlockpt'.
99538         * lib/unlockpt.c: New file, from glibc with modifications.
99539         * m4/unlockpt.m4: New file.
99540         * modules/unlockpt: New file.
99541         * lib/stdlib.in.h (unlockpt): New declaration.
99542         * m4/stdlib_h.m4 (gl_STDLIB_H): Check whether unlockpt is declared.
99543         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_UNLOCKPT, HAVE_UNLOCKPT.
99544         * modules/stdlib (Makefile.am): Substitute GNULIB_UNLOCKPT,
99545         HAVE_UNLOCKPT.
99546         * doc/posix-functions/unlockpt.texi: Mention the new module.
99547         * tests/test-stdlib-c++.cc: Check GNULIB_NAMESPACE::unlockpt.
99548         * config/srclist.txt: Add unlockpt.c (commented).
99550 2010-03-21  Jim Meyering  <meyering@redhat.com>
99552         maint.mk: prohibit inclusion of "intprops.h" without use
99553         * top/maint.mk (sc_prohibit_intprops_without_use): New rule.
99555 2010-03-21  Bruno Haible  <bruno@clisp.org>
99557         New module 'grantpt'.
99558         * lib/grantpt.c: New file, from glibc with modifications.
99559         * m4/grantpt.m4: New file.
99560         * modules/grantpt: New file.
99561         * lib/stdlib.in.h (grantpt): New declaration.
99562         * m4/stdlib_h.m4 (gl_STDLIB_H): Check whether grantpt is declared.
99563         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_GRANTPT, HAVE_GRANTPT.
99564         * modules/stdlib (Makefile.am): Substitute GNULIB_GRANTPT,
99565         HAVE_GRANTPT.
99566         * doc/posix-functions/grantpt.texi: Mention the new module.
99567         * tests/test-stdlib-c++.cc: Check GNULIB_NAMESPACE::grantpt.
99568         * config/srclist.txt: Add grantpt.c (commented).
99570 2010-03-21  Bruno Haible  <bruno@clisp.org>
99572         New module 'pt_chown'.
99573         * lib/pt_chown.c: New file, from glibc with modifications.
99574         * lib/pty-private.h: New file, from glibc with modifications.
99575         * modules/pt_chown: New file.
99576         * config/srclist.txt: Add pt_chown.c, pty-private.h (commented).
99578 2010-03-21  Bruno Haible  <bruno@clisp.org>
99580         Tests for module 'ptsname'.
99581         * modules/ptsname-tests: New file.
99582         * tests/test-ptsname.c: New file.
99584         New module 'ptsname'.
99585         * lib/ptsname.c: New file, from glibc with modifications.
99586         * m4/ptsname.m4: New file.
99587         * modules/ptsname: New file.
99588         * lib/stdlib.in.h (ptsname): New declaration.
99589         * m4/stdlib_h.m4 (gl_STDLIB_H): Check whether ptsname is declared.
99590         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_PTSNAME, HAVE_PTSNAME.
99591         * modules/stdlib (Makefile.am): Substitute GNULIB_PTSNAME,
99592         HAVE_PTSNAME.
99593         * doc/posix-functions/ptsname.texi: Mention the new module.
99594         * tests/test-stdlib-c++.cc: Check GNULIB_NAMESPACE::ptsname.
99595         * config/srclist.txt: Add ptsname.c (commented).
99597 2010-03-21  Bruno Haible  <bruno@clisp.org>
99599         Tests for module 'ttyname_r'.
99600         * modules/ttyname_r-tests: New file.
99601         * tests/test-ttyname_r.c: New file.
99603         New module 'ttyname_r'.
99604         * lib/ttyname_r.c: New file.
99605         * m4/ttyname_r.m4: New file.
99606         * modules/ttyname_r: New file.
99607         * lib/unistd.in.h (ttyname_r): New declaration.
99608         * m4/unistd_h.m4 (gl_UNISTD_H): Check whether ttyname_r is declared.
99609         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_TTYNAME_R, HAVE_TTYNAME_R.
99610         * modules/unistd (Makefile.am): Substitute GNULIB_TTYNAME_R,
99611         HAVE_TTYNAME_R.
99612         * tests/test-unistd-c++.cc: Check GNULIB_NAMESPACE::ttyname_r.
99613         * doc/posix-functions/ttyname_r.texi: Mention the new module.
99615 2010-03-20  Bruno Haible  <bruno@clisp.org>
99617         signal: Undefine macro definitions in C++ mode.
99618         * lib/signal.in.h (sigismember, sigemptyset, sigaddset, sigdelset,
99619         sigfillset): Undefine macro definitions from the system header in C++
99620         mode.
99621         Reported by John W. Eaton <jwe@gnu.org>.
99623 2010-03-20  Bruno Haible  <bruno@clisp.org>
99625         Ensure no #include statements inside extern "C" { ... }.
99626         * lib/obstack.h: Shrink extern "C" { ... } region so that it does not
99627         contain #include statements.
99628         * lib/time.in.h: Likewise.
99630 2010-03-20  Bruno Haible  <bruno@clisp.org>
99632         Make _GL_WARN_ON_USE usable in C++ and C mode in the same compilation.
99633         * build-aux/warn-on-use.h (_GL_WARN_EXTERN_C): New macro.
99634         (_GL_WARN_ON_USE, _GL_WARN_ON_USE_CXX): Likewise.
99635         Reported by John W. Eaton <jwe@gnu.org>.
99637 2010-03-20  Bruno Haible  <bruno@clisp.org>
99639         * m4/unlink.m4 (gl_FUNC_UNLINK): Fix last commit.
99640         Reported by Jim Meyering.
99642 2010-03-20  Bruno Haible  <bruno@clisp.org>
99644         pipe: Set errno upon failure.
99645         * lib/pipe.h: Specify that when -1 is returned, errno is set.
99646         * lib/pipe.c (create_pipe): Set errno when returning -1. Use the right
99647         errno value in error message.
99649 2010-03-20  Bruno Haible  <bruno@clisp.org>
99650             Jim Meyering  <meyering@redhat.com>
99652         lchown: Avoid "unused variable" warning.
99653         * lib/lchown.c (rpl_lchown): Move variable 'st' into #if block.
99655 2010-03-20  Bruno Haible  <bruno@clisp.org>
99657         Work around unlink() bug on MacOS X 10.5.6.
99658         * lib/unlink.c (rpl_unlink): If UNLINK_PARENT_BUG is defined, fail when
99659         attempting to unlink a parent directory.
99660         * m4/unlink.m4 (gl_FUNC_UNLINK): Require AC_CANONICAL_HOST. Test for
99661         MacOS X 10.5 bug. If the bug is present, define UNLINK_PARENT_BUG and
99662         activate for the replacement function.
99663         * doc/posix-functions/unlink.texi: Mention the MacOS X 10.5 bug.
99665 2010-03-20  Bruno Haible  <bruno@clisp.org>
99667         Fix link errors on Solaris 8.
99668         * modules/dirent-tests (test_dirent_c___LDADD): Add LIB_NANOSLEEP.
99669         * modules/wctype-tests (test_wctype_c___LDADD): Likewise.
99671 2010-03-19  Jim Meyering  <meyering@redhat.com>
99673         regcomp.c: make non-_LIBC implementation of build_range_exp consistent
99674         The _LIBC implementation of build_range_exp correctly honors the
99675         RE_NO_EMPTY_RANGES flag when checking for reversed range endpoints.
99676         However, the non-_LIBC implementation would ignore that syntax-bit
99677         flag and return REG_ERANGE unconditionally.
99678         This change makes it honor that flag.
99679         * lib/regcomp.c (build_range_exp) [!_LIBC]: Add a parameter: "syntax".
99680         Make two pointer parameters "const".
99681         Use "syntax" bits in order to honor RE_NO_EMPTY_RANGES.
99682         (parse_bracket_exp): Update caller.
99684         regex.m4: correct the reversed range endpoint ([b-a]) test
99685         * m4/regex.m4: When requiring that [b-a] evoke failure,
99686         use RE_NO_EMPTY_RANGES.  This makes this entire configure-time
99687         test pass once again for x86-based systems.
99689 2010-03-19  Bruno Haible  <bruno@clisp.org>
99691         scandir: Fix link error on Solaris 8.
99692         * lib/scandir.c (_D_EXACT_NAMLEN, _D_ALLOC_NAMLEN): New fallback
99693         macros.
99695 2010-03-19  Bruno Haible  <bruno@clisp.org>
99697         getusershell: Fix documentation.
99698         * doc/glibc-functions/endusershell.texi: Refer to the getusershell
99699         module.
99700         * doc/glibc-functions/setusershell.texi: Likewise.
99702         getusershell: Provide declaration, missing on Solaris 9.
99703         * lib/unistd.in.h (getusershell, setusershell, endusershell): Declare
99704         also if HAVE_GETUSERSHELL && !HAVE_DECL_GETUSERSHELL.
99705         * m4/getusershell.m4 (gl_FUNC_GETUSERSHELL): When the function exists,
99706         check whether it is declared. Set HAVE_DECL_GETUSERSHELL.
99707         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
99708         HAVE_DECL_GETUSERSHELL, not HAVE_GETUSERSHELL.
99709         * modules/unistd (Makefile.am): Substitute HAVE_DECL_GETUSERSHELL, not
99710         HAVE_GETUSERSHELL.
99711         * doc/glibc-functions/getusershell.texi: Mention the Solaris problem.
99713 2010-03-19  Bruno Haible  <bruno@clisp.org>
99715         wctype: Provide iswblank function.
99716         * lib/wctype.in.h (iswblank): Provide a replacement also when iswcntrl
99717         exists and is fine.
99718         * m4/wctype_h.m4 (gl_WCTYPE_H): Also check whether iswcntrl exists.
99719         * modules/wctype (Makefile.am): Substitute HAVE_ISWBLANK.
99720         * tests/test-wctype.c (main): Re-enable the iswblank tests.
99721         * doc/posix-functions/iswblank.texi: Update.
99723 2010-03-19  Bruno Haible  <bruno@clisp.org>
99725         Tests of module 'pty' in C++ mode.
99726         * modules/pty-tests: New file.
99727         * tests/test-pty-c++.cc: New file.
99728         * m4/pty_h.m4 (gl_PTY_MODULE_INDICATOR): Invoke gl_MODULE_INDICATOR.
99730 2010-03-19  Eric Blake  <eblake@redhat.com>
99732         logb: fix documentation
99733         * doc/posix-functions/logb.texi (logb): Gnulib fixes the cygwin
99734         1.5 declaration bug.
99736         forkpty, openpty: prefer glibc's const-safe prototype
99737         * lib/forkpty.c (rpl_forkpty): New file.
99738         * lib/openpty.c (rpl_openpty): Likewise.
99739         * modules/forkpty (Files): Distribute it.
99740         * modules/openpty (Files): Likewise.
99741         * m4/pty_h.m4 (gl_PTY_H_DEFAULTS): Add new witnesses.  Move decl
99742         check...
99743         * m4/pty.m4 (gl_FORKPTY, gl_OPENPTY): ...here.  Request
99744         replacement for non-const BSD signature.
99745         * modules/pty (Makefile.am): Substitute witnesses.
99746         * lib/pty.in.h (forkpty, openpty): Declare replacements.
99747         * tests/test-forkpty.c: Update signature check.
99748         * tests/test-openpty.c: Likewise.
99749         * doc/glibc-functions/forkpty.texi (forkpty): Document the fix.
99750         * doc/glibc-functions/openpty.texi (openpty): Likewise.
99752         forkpty, openpty: split functions into new modules
99753         * modules/pty (Makefile.am): Substitute new witnesses.
99754         (Libraries): Move library detection...
99755         * modules/forkpty: ...into new module.
99756         * modules/openpty: Another new module.
99757         * modules/pty-tests: Rename and split...
99758         * modules/forkpty-tests: ...to this...
99759         * modules/openpty-tests: ...and this.
99760         * tests/test-pty.c: Rename and split...
99761         * tests/test-forkpty.c: ...to this...
99762         * tests/test-openpty.c: ...and this.
99763         * m4/pty_h.m4 (gl_PTY_H_DEFAULTS): Add new witnesses.
99764         (gl_PTY): Split library searching...
99765         * m4/pty.m4 (gl_PTY_LIB): ...into new file.
99766         (gl_FORKPTY, gl_OPENPTY): New macros.
99767         * lib/pty.in.h (forkpty, openpty): Honor new witnesses.
99768         * NEWS: Mention the split.
99769         * MODULES.html.sh (Misc): Document the modules.
99770         * doc/glibc-functions/forkpty.texi (forkpty): Likewise.
99771         * doc/glibc-functions/openpty.texi (openpty): Likewise.
99773         pty: improve replacement header
99774         * lib/pty.in.h: New file.
99775         * modules/pty (Files): Ship it.
99776         (Makefile.am): Always build replacement.
99777         * m4/pty.m4: Rename...
99778         * m4/pty_h.m4: ...to this.
99779         (gl_PTY): Modernize setting of witness macros; update check of
99780         forkpty to take proper advantage of cache.
99781         (gl_PTY_MODULE_INDICATOR, gl_PTY_H_DEFAULTS): New macros.
99783         getopt: avoid compiler warning
99784         * lib/getopt.c (attribute_hidden): Remove unused macro.
99786 2010-03-18  Bruno Haible  <bruno@clisp.org>
99788         Fix link errors on Solaris 8.
99789         * modules/iconv-h-tests (test_iconv_h_c___LDADD): Add LIB_NANOSLEEP.
99790         * modules/search-tests (test_search_c___LDADD): Likewise.
99791         * modules/signal-tests (test_signal_c___LDADD): Likewise.
99792         * modules/spawn-tests (test_spawn_c___LDADD): Likewise.
99793         * modules/stdio-tests (test_stdio_c___LDADD): Likewise.
99794         * modules/sys_select-tests (test_sys_select_c___LDADD): Likewise.
99795         * modules/sys_socket-tests (test_sys_socket_c___LDADD): Likewise.
99796         * modules/sys_time-tests (test_sys_time_c___LDADD): Likewise.
99797         * modules/wchar-tests (test_wchar_c___LDADD): Likewise.
99799 2010-03-18  Bruno Haible  <bruno@clisp.org>
99801         Fix bug introduced on 2010-03-14.
99802         * m4/spawn_h.m4 (gl_HAVE_POSIX_SPAWN): New macro.
99803         (gl_SPAWN_H): Require it.
99804         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): Likewise.
99805         Reported by Simon Josefsson.
99807 2010-03-18  Bruno Haible  <bruno@clisp.org>
99809         Fix typo introduced on 2009-12-31.
99810         * m4/spawn_h.m4 (gl_SPAWN_H): Check for the declaration of
99811         posix_spawn_file_actions_adddup2.
99813 2010-03-17  Bert Wesarg  <bert.wesarg@googlemail.com>  (tiny change)
99814         and Eric Blake  <eblake@redhat.com>
99816         test-vc-list-files-git: make more robust
99817         * tests/test-vc-list-files-git.sh: Unset problematic environment
99818         variables.  Chain commands together.
99820 2010-03-17  Ludovic Courtès  <ludo@gnu.org>  (tiny change)
99822         * m4/pty.m4: Unset $ac_cv_have_decl_forkpty before the second
99823         `AC_CHECK_DECL' invocation.
99825 2010-03-15  Sergey Poznyakoff  <gray@gnu.org.ua>
99827         * lib/inttostr.c (inttostr): Make sure the invocation of verify
99828         appears before executable statements. Suggested by Petr Sumbera
99829         <Petr.Sumbera@Sun.COM>.
99831 2010-03-14  Bruno Haible  <bruno@clisp.org>
99833         * tests/test-flock.c (test_exclusive): Comment out a test that causes
99834         portability problems. Instead use a simpler test.
99835         (main): Check that invalid arguments are rejected only on Linux.
99837 2010-03-14  Bruno Haible  <bruno@clisp.org>
99839         Fix bug introduced on 2009-12-31.
99840         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Invoke
99841         gl_PREREQ_SYS_H_WINSOCK2 always.
99842         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise. Remove
99843         SYS_SOCKET_H variable.
99844         * m4/sys_file_h.m4 (gl_HEADER_SYS_FILE_H): Remove test for flock.
99845         Update comments.
99846         * m4/ctype.m4 (gl_CTYPE_H): Update comments.
99847         * m4/langinfo_h.m4 (gl_LANGINFO_H): Likewise.
99848         * m4/sys_times_h.m4 (gl_SYS_TIMES_H): Likewise.
99849         * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H): Likewise.
99850         * m4/sys_wait_h.m4 (gl_SYS_WAIT_H): Likewise.
99852 2010-03-14  Bruno Haible  <bruno@clisp.org>
99854         Fix values returned by sinl, cosl.
99855         * lib/trigl.h: Add specification comments.
99856         * lib/sincosl.c (kernel_sinl, kernel_cosl): Fix comments and formula
99857         that combines the values from the precomputed table with the values of
99858         the Chebyshev polynomials.
99860 2010-03-14  Bruno Haible  <bruno@clisp.org>
99862         Fix compilation error when modules 'posix_spawn[p]' are not used.
99863         * m4/spawn_h.m4 (gl_SPAWN_H): Set HAVE_POSIX_SPAWN here.
99864         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): ... not here.
99866 2010-03-14  Bruno Haible  <bruno@clisp.org>
99868         Fix compilation error on mingw when module 'time_r' is not used.
99869         * lib/time.in.h (localtime_r, gmtime_r): Declare only if GNULIB_TIME_R
99870         is 1.
99871         * tests/test-time-c++.cc (localtime_r, gmtime_r): Likewise.
99872         * modules/time_r (configure.ac): Invoke gl_TIME_MODULE_INDICATOR.
99873         * modules/time (Makefile.am): Substitute GNULIB_TIME_R.
99874         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_TIME_R.
99876 2010-03-14  Bruno Haible  <bruno@clisp.org>
99878         Fix compilation error with Sun C.
99879         * lib/strtol.c: Use LLONG_MIN instead of GCC specific LONG_LONG_MIN.
99880         Use LLONG_MAX instead of GCC specific LONG_LONG_MAX. Use ULLONG_MAX
99881         instead of GCC specific ULONG_LONG_MAX.
99882         * lib/xstrtoll.c: Likewise.
99883         * lib/xstrtoull.c: Likewise.
99885 2010-03-13  Bruno Haible  <bruno@clisp.org>
99887         Allow the user to disable C++ code and tests.
99888         * m4/ansi-c++.m4 (gl_CXX_CHOICE): New macro.
99889         (gl_PROG_ANSI_CXX): Require it.
99891 2010-03-13  Bruno Haible  <bruno@clisp.org>
99893         * DEPENDENCIES (libtool): Mention libtool 2.2.x requirement in special
99894         cases.
99896 2010-03-13  Bruno Haible  <bruno@clisp.org>
99898         Test that gnulib does not break the standard C++ headers.
99899         * tests/test-locale-c++2.cc: New file.
99900         * modules/locale-tests (Files): Add it.
99901         (Makefile.am): Compile it for test-locale-c++.
99902         * tests/test-math-c++2.cc: New file.
99903         * modules/math-tests (Files): Add it.
99904         (Makefile.am): Compile it for test-math-c++.
99905         * tests/test-signal-c++2.cc: New file.
99906         * modules/signal-tests (Files): Add it.
99907         (Makefile.am): Compile it for test-signal-c++.
99908         * tests/test-stdio-c++2.cc: New file.
99909         * modules/stdio-tests (Files): Add it.
99910         (Makefile.am): Compile it for test-stdio-c++.
99911         * tests/test-stdlib-c++2.cc: New file.
99912         * modules/stdlib-tests (Files): Add it.
99913         (Makefile.am): Compile it for test-stdlib-c++.
99914         * tests/test-string-c++2.cc: New file.
99915         * modules/string-tests (Files): Add it.
99916         (Makefile.am): Compile it for test-string-c++.
99917         * tests/test-time-c++2.cc: New file.
99918         * modules/time-tests (Files): Add it.
99919         (Makefile.am): Compile it for test-time-c++.
99920         Reported by John W. Eaton <jwe@gnu.org>.
99922 2010-03-13  Bruno Haible  <bruno@clisp.org>
99924         * gnulib-tool (func_usage): Clarify which options are available for
99925         --create-testdir and --create-megatestdir.
99927 2010-03-13  Bruno Haible  <bruno@clisp.org>
99929         Fix compilation error with glibc >= 2.10 and g++ >= 4.4.
99930         * build-aux/warn-on-use.h (_GL_WARN_ON_USE_CXX): New macro.
99931         * build-aux/c++defs.h (_GL_CXXALIASWARN1): New macro.
99932         * lib/string.in.h (memchr, memrchr, rawmemchr, strchrnul, strpbrk,
99933         strstr, strcasestr): Use _GL_CXXALIASWARN1 instead of _GL_CXXALIASWARN
99934         when appropriate.
99935         Reported by Jim Meyering.
99937 2010-03-12  Simon Josefsson  <simon@josefsson.org>
99939         * gnulib-tool (func_import): Explain origin of code.
99941 2010-03-12  Bruno Haible  <bruno@clisp.org>
99943         Fix problem with automake's definition of CXXLINK.
99944         * gnulib-tool (func_create_testdir): After LT_INIT, also use LT_LANG.
99945         Reported by Simon Josefsson and Ludovic Courtès.
99947 2010-03-12  Bruno Haible  <bruno@clisp.org>
99949         * doc/gnulib-intro.texi (Steady Development): Mention Ian Beckwith's
99950         stable releases.
99952 2010-03-11  Bruno Haible  <bruno@clisp.org>
99954         Fix problems with overloaded C++ definitions of memchr, strpbrk, etc.
99955         * build-aux/c++defs.h (_GL_CXXALIAS_SYS_CAST2): Make it work regardless
99956         whether the system provides one variant or multiple variants of the
99957         function.
99958         * lib/string.in.h (memchr, strpbrk): Use _GL_CXXALIAS_SYS_CAST2 for all
99959         C++ compilers.
99960         (memrchr, rawmemchr, strchrnul, strstr, strcasestr): Use
99961         _GL_CXXALIAS_SYS_CAST2 instead of _GL_CXXALIAS_SYS.
99962         Reported by Jim Meyering.
99964 2010-03-09  Simon Josefsson  <simon@josefsson.org>
99966         * gnulib-tool (LIBTOOLPATH): Fix cut'n'paste bug.
99968 2010-03-08  Bruno Haible  <bruno@clisp.org>
99970         gnulib-tool: Add support for --libtool in --create-testdir.
99971         * gnulib-tool (LIBTOOLPATH, LIBTOOLIZE): New variables.
99972         (func_create_testdir): Emit LT_INIT invocations. Invoke LIBTOOLIZE.
99974 2010-03-08  Eric Blake  <eblake@redhat.com>
99976         gnulib-tool.texi: mention possibility of git submodule
99977         * doc/gnulib-tool.texi (VCS Issues): Add details about using git
99978         submodules.
99979         * doc/.gitignore: Ignore another generated file.
99981 2010-03-08  Karl Berry  <karl@gnu.org>
99983         * doc/gnulib-tool.texi (VCS Issues): Mention third option
99984         of committing gnulib files while skipping others.
99986 2010-03-07  Bruno Haible  <bruno@clisp.org>
99988         Tests of module 'wctype' in C++ mode.
99989         * tests/test-wctype-c++.cc: New file.
99990         * modules/wctype-tests (Files): Add it and tests/signature.h.
99991         (Depends-on): Add ansi-c++-opt.
99992         (Makefile.am): Arrange to compile and run test-wctype-c++.
99994         Tests of module 'wchar' in C++ mode.
99995         * tests/test-wchar-c++.cc: New file.
99996         * modules/wchar-tests (Files): Add it and tests/signature.h.
99997         (Depends-on): Add ansi-c++-opt.
99998         (Makefile.am): Arrange to compile and run test-wchar-c++.
99999         * m4/wchar_h.m4 (gl_WCHAR_MODULE_INDICATOR): Invoke
100000         gl_MODULE_INDICATOR.
100002         Tests of module 'unistd' in C++ mode.
100003         * tests/test-unistd-c++.cc: New file.
100004         * modules/unistd-tests (Files): Add it and tests/signature.h.
100005         (Depends-on): Add ansi-c++-opt.
100006         (Makefile.am): Arrange to compile and run test-unistd-c++.
100007         * m4/unistd_h.m4 (gl_UNISTD_MODULE_INDICATOR): Invoke
100008         gl_MODULE_INDICATOR.
100010         Tests of module 'time' in C++ mode.
100011         * tests/test-time-c++.cc: New file.
100012         * modules/time-tests (Files): Add it and tests/signature.h.
100013         (Depends-on): Add ansi-c++-opt.
100014         (Makefile.am): Arrange to compile and run test-time-c++.
100015         * m4/time_h.m4 (gl_TIME_MODULE_INDICATOR): Invoke gl_MODULE_INDICATOR.
100017         Tests of module 'sys_time' in C++ mode.
100018         * tests/test-sys_time-c++.cc: New file.
100019         * modules/sys_time-tests (Files): Add it and tests/signature.h.
100020         (Depends-on): Add ansi-c++-opt.
100021         (Makefile.am): Arrange to compile and run test-sys_time-c++.
100022         * m4/sys_time_h.m4 (gl_SYS_TIME_MODULE_INDICATOR): Invoke
100023         gl_MODULE_INDICATOR.
100025         Tests of module 'sys_stat' in C++ mode.
100026         * tests/test-sys_stat-c++.cc: New file.
100027         * modules/sys_stat-tests (Files): Add it and tests/signature.h.
100028         (Depends-on): Add ansi-c++-opt.
100029         (Makefile.am): Arrange to compile and run test-sys_stat-c++.
100030         * m4/sys_stat_h.m4 (gl_SYS_STAT_MODULE_INDICATOR): Invoke
100031         gl_MODULE_INDICATOR.
100033         Tests of module 'sys_socket' in C++ mode.
100034         * tests/test-sys_socket-c++.cc: New file.
100035         * modules/sys_socket-tests (Files): Add it and tests/signature.h.
100036         (Depends-on): Add ansi-c++-opt.
100037         (Makefile.am): Arrange to compile and run test-sys_socket-c++.
100038         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_MODULE_INDICATOR): Invoke
100039         gl_MODULE_INDICATOR.
100041         Tests of module 'sys_select' in C++ mode.
100042         * tests/test-sys_select-c++.cc: New file.
100043         * modules/sys_select-tests (Files): Add it and tests/signature.h.
100044         (Depends-on): Add ansi-c++-opt.
100045         (Makefile.am): Arrange to compile and run test-sys_select-c++.
100046         * m4/sys_select_h.m4 (gl_SYS_SELECT_MODULE_INDICATOR): Invoke
100047         gl_MODULE_INDICATOR.
100049         Tests of module 'sys_ioctl' in C++ mode.
100050         * tests/test-sys_ioctl-c++.cc: New file.
100051         * modules/sys_ioctl-tests (Files): Add it and tests/signature.h.
100052         (Depends-on): Add ansi-c++-opt.
100053         (Makefile.am): Arrange to compile and run test-sys_ioctl-c++.
100054         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_MODULE_INDICATOR): Invoke
100055         gl_MODULE_INDICATOR.
100057         Tests of module 'string' in C++ mode.
100058         * tests/test-string-c++.cc: New file.
100059         * modules/string-tests (Files): Add it and tests/signature.h.
100060         (Depends-on): Add ansi-c++-opt.
100061         (Makefile.am): Arrange to compile and run test-string-c++.
100062         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Invoke
100063         gl_MODULE_INDICATOR.
100065         Tests of module 'stdlib' in C++ mode.
100066         * tests/test-stdlib-c++.cc: New file.
100067         * modules/stdlib-tests (Files): Add it and tests/signature.h.
100068         (Depends-on): Add ansi-c++-opt.
100069         (Makefile.am): Arrange to compile and run test-stdlib-c++.
100070         * m4/stdlib_h.m4 (gl_STDLIB_MODULE_INDICATOR): Invoke
100071         gl_MODULE_INDICATOR.
100073         Tests of module 'stdio' in C++ mode.
100074         * tests/test-stdio-c++.cc: New file.
100075         * modules/stdio-tests (Files): Add it and tests/signature.h.
100076         (Depends-on): Add ansi-c++-opt.
100077         (Makefile.am): Arrange to compile and run test-stdio-c++.
100078         * m4/stdio_h.m4 (gl_STDIO_MODULE_INDICATOR): Invoke
100079         gl_MODULE_INDICATOR.
100081         Tests of module 'spawn' in C++ mode.
100082         * tests/test-spawn-c++.cc: New file.
100083         * modules/spawn-tests (Files): Add it and tests/signature.h.
100084         (Depends-on): Add ansi-c++-opt.
100085         (Makefile.am): Arrange to compile and run test-spawn-c++.
100086         * m4/spawn_h.m4 (gl_SPAWN_MODULE_INDICATOR): Invoke
100087         gl_MODULE_INDICATOR.
100089         Tests of module 'signal' in C++ mode.
100090         * tests/test-signal-c++.cc: New file.
100091         * modules/signal-tests (Files): Add it and tests/signature.h.
100092         (Depends-on): Add ansi-c++-opt.
100093         (Makefile.am): Arrange to compile and run test-signal-c++.
100094         * m4/signal_h.m4 (gl_SIGNAL_MODULE_INDICATOR): Invoke
100095         gl_MODULE_INDICATOR.
100097         Tests of module 'search' in C++ mode.
100098         * tests/test-search-c++.cc: New file.
100099         * modules/search-tests (Files): Add it and tests/signature.h.
100100         (Depends-on): Add ansi-c++-opt.
100101         (Makefile.am): Arrange to compile and run test-search-c++.
100102         * m4/search_h.m4 (gl_SEARCH_MODULE_INDICATOR): Invoke
100103         gl_MODULE_INDICATOR.
100105         Tests of module 'math' in C++ mode.
100106         * tests/test-math-c++.cc: New file.
100107         * modules/math-tests (Files): Add it and tests/signature.h.
100108         (Depends-on): Add ansi-c++-opt.
100109         (Makefile.am): Arrange to compile and run test-math-c++.
100110         * m4/math_h.m4 (gl_MATH_MODULE_INDICATOR): Invoke gl_MODULE_INDICATOR.
100112         Tests of module 'locale' in C++ mode.
100113         * tests/test-locale-c++.cc: New file.
100114         * modules/locale-tests (Files): Add it and tests/signature.h.
100115         (Depends-on): Add ansi-c++-opt.
100116         (Makefile.am): Arrange to compile and run test-locale-c++.
100117         * m4/locale_h.m4 (gl_LOCALE_MODULE_INDICATOR): Invoke
100118         gl_MODULE_INDICATOR.
100120         Tests of module 'langinfo' in C++ mode.
100121         * tests/test-langinfo-c++.cc: New file.
100122         * modules/langinfo-tests (Files): Add it and tests/signature.h.
100123         (Depends-on): Add ansi-c++-opt.
100124         (Makefile.am): Arrange to compile and run test-langinfo-c++.
100125         * m4/langinfo_h.m4 (gl_LANGINFO_MODULE_INDICATOR): Invoke
100126         gl_MODULE_INDICATOR.
100128         Tests of module 'iconv-h' in C++ mode.
100129         * tests/test-iconv-h-c++.cc: New file.
100130         * modules/iconv-h-tests (Files): Add it and tests/signature.h.
100131         (Depends-on): Add ansi-c++-opt.
100132         (Makefile.am): Arrange to compile and run test-iconv-h-c++.
100134         Tests of module 'glob' in C++ mode.
100135         * tests/test-glob-c++.cc: New file.
100136         * modules/glob-tests (Files): Add it.
100137         (Depends-on): Add ansi-c++-opt.
100138         (Makefile.am): Arrange to compile and run test-glob-c++.
100140         Tests of module 'fcntl-h' in C++ mode.
100141         * tests/test-fcntl-h-c++.cc: New file.
100142         * modules/fcntl-h-tests (Files): Add it and tests/signature.h.
100143         (Depends-on): Add ansi-c++-opt.
100144         (Makefile.am): Arrange to compile and run test-fcntl-h-c++.
100145         * m4/fcntl_h.m4 (gl_FCNTL_MODULE_INDICATOR): Invoke
100146         gl_MODULE_INDICATOR.
100148         Tests of module 'dirent' in C++ mode.
100149         * tests/test-dirent-c++.cc: New file.
100150         * modules/dirent-tests (Files): Add it and tests/signature.h.
100151         (Depends-on): Add ansi-c++-opt.
100152         (Makefile.am): Arrange to compile and run test-dirent-c++.
100153         * m4/dirent_h.m4 (gl_DIRENT_MODULE_INDICATOR): Invoke
100154         gl_MODULE_INDICATOR.
100156         New module 'ansi-c++-opt'.
100157         * modules/ansi-c++-opt: New file.
100158         * m4/ansi-c++.m4: New file, from GNU gettext with modifications.
100160         Document C++ namespace mode.
100161         * doc/gnulib.texi (A C++ namespace for gnulib): New section.
100163         wctype: Avoid #define replacements in C++ mode.
100164         * lib/wctype.in.h: Include c++defs.h, warn-on-use.h.
100165         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower,
100166         iswprint, iswpunct, iswspace, iswupper, iswxdigit, towlower, towupper):
100167         In C++, define a namespaced alias symbol.
100168         * m4/wctype_h.m4 (gl_WCTYPE_H): Don't set WCTYPE_H.
100169         * modules/wctype (Depends-on): Add c++defs, warn-on-use.
100170         (Makefile.am): Provide a wctype.h replacement always. Update wctype.h
100171         rule.
100173         wchar: Avoid #define replacements in C++ mode.
100174         * lib/wchar.in.h: Include c++defs.h.
100175         (btowc, wctob, mbsinit, mbrtowc, mbrlen, mbsrtowcs, mbsnrtowcs,
100176         wcrtomb, wcsrtombs, wcsnrtombs): In C++, define a namespaced alias
100177         symbol.
100178         (wcwidth): Likewise. Fix prototype to be POSIX compliant.
100179         * modules/wchar (Depends-on): Add c++defs.
100180         (Makefile.am): Update wchar.h rule.
100182         unistd: Avoid #define replacements in C++ mode.
100183         * lib/unistd.in.h: Include c++defs.h.
100184         (chown, close, dup, dup2, dup3, euidaccess, faccessat, fchdir,
100185         fchownat, fsync, ftruncate, getcwd, getdomainname, getdtablesize,
100186         getgroups, gethostname, getlogin, getlogin_r, getpagesize,
100187         getusershell, setusershell, endusershell, lchown, link, linkat, lseek,
100188         pipe2, pread, readlink, readlinkat, rmdir, sleep, symlink, symlinkat,
100189         unlink, unlinkat, usleep, write): In C++, define a namespaced alias
100190         symbol.
100191         (environ): Update.
100192         * modules/unistd (Depends-on): Add c++defs.
100193         (Makefile.am): Update unistd.h rule.
100195         time: Avoid #define replacements in C++ mode.
100196         * lib/time.in.h: Include c++defs.h, warn-on-use.h.
100197         (nanosleep, mktime, localtime_r, gmtime_r, strptime, timegm): In C++,
100198         define a namespaced alias symbol.
100199         * m4/time_h.m4 (gl_TIME_MODULE_INDICATOR): New macro.
100200         (gl_HEADER_TIME_H_DEFAULTS): Initialize also GNULIB_MKTIME,
100201         GNULIB_NANOSLEEP, GNULIB_STRPTIME, GNULIB_TIMEGM.
100202         * modules/time (Depends-on): Add c++defs, warn-on-use.
100203         (Makefile.am): Update time.h rule.
100204         * modules/mktime (configure.ac): Invoke gl_TIME_MODULE_INDICATOR.
100205         * modules/nanosleep (configure.ac): Likewise.
100206         * modules/strptime (configure.ac): Likewise.
100207         * modules/timegm (configure.ac): Likewise.
100209         sys_time: Avoid #define replacements in C++ mode.
100210         * lib/sys_time.in.h: Include c++defs.h.
100211         (gettimeofday): In C++, define a namespaced alias symbol.
100212         * modules/sys_time (Depends-on): Add c++defs.
100213         (Makefile.am): Update sys/time.h rule.
100215         sys_stat: Avoid #define replacements in C++ mode.
100216         * lib/sys_stat.in.h: Include c++defs.h.
100217         (fchmodat, fstat, fstatat, futimens, lchmod, lstat, mkdir, mkdirat,
100218         mkfifo, mkfifoat, mknod, mknodat, utimensat): In C++, define a
100219         namespaced alias symbol.
100220         In C++, define a namespaced alias symbol.
100221         * modules/sys_stat (Depends-on): Add c++defs.
100222         (Makefile.am): Update sys/stat.h rule.
100224         sys_socket: Avoid #define replacements in C++ mode.
100225         * lib/sys_socket.in.h: Handle the case of recursive include on Cygwin.
100226         Include c++defs.h. Include warn-on-use.h earlier. Enable the function
100227         definitions also when the system has a <sys/socket.h>.
100228         (socket, connect, accept, bind, getpeername, getsockname, getsockopt,
100229         listen, recv, send, recvfrom, sendto, setsockopt, shutdown, accept4):
100230         In C++, define a namespaced alias symbol.
100231         * modules/sys_socket (Depends-on): Add c++defs.
100232         (Makefile.am): Update sys/socket.h rule.
100234         sys_select: Avoid #define replacements in C++ mode.
100235         * lib/sys_select.in.h: Include c++defs.h. Enable the function
100236         definitions also when the system has a <sys/select.h>.
100237         (select): In C++, define a namespaced alias symbol.
100238         * modules/sys_select (Depends-on): Add c++defs.
100239         (Makefile.am): Update sys/select.h rule.
100241         sys_ioctl: Avoid #define replacements in C++ mode.
100242         * lib/sys_ioctl.in.h: Include c++defs.h.
100243         (ioctl): In C++, define a namespaced alias symbol.
100244         * modules/sys_ioctl (Depends-on): Add c++defs.
100245         (Makefile.am): Update sys/ioctl.h rule.
100247         string: Avoid #define replacements in C++ mode.
100248         * lib/string.in.h: Include c++defs.h.
100249         (stpncpy): Define to rpl_stpncpy, not gnu_stpncpy.
100250         (memchr, memmem, mempcpy, memrchr, rawmemchr, stpcpy, stpncpy,
100251         strchrnul, strdup, strndup, strnlen, strpbrk, strsep, strstr,
100252         strcasestr, strtok_r, mbslen, mbschr, mbsrchr, mbspbrk, strerror,
100253         strsignal, strverscmp): In C++, define a namespaced alias symbol.
100254         * modules/string (Depends-on): Add c++defs.
100255         (Makefile.am): Update string.h rule.
100257         stdlib: Avoid #define replacements in C++ mode.
100258         * lib/stdlib.in.h: Include c++defs.h.
100259         (atoll, calloc, canonicalize_file_name, getloadavg, getsubopt, malloc,
100260         mkdtemp, mkostemp, mkostemps, mkstemp, mkstemps, putenv, random_r,
100261         srandom_r, initstate_r, setstate_r, realloc, realpath, rpmatch, setenv,
100262         strtod, strtoll, strtoull, unsetenv): In C++, define a namespaced alias
100263         symbol.
100264         * modules/stdlib (Depends-on): Add c++defs.
100265         (Makefile.am): Update stdlib.h rule.
100267         stdio: Avoid #define replacements in C++ mode.
100268         * lib/stdio.in.h: Include c++defs.h.
100269         (dprintf, fclose, fflush, fopen, fprintf, fpurge, fputc, fputs,
100270         freopen, fseek, fseeko, ftell, ftello, fwrite, getdelim, getline,
100271         obstack_printf, obstack_vprintf, perror, popen, printf, fputc, putchar,
100272         puts, remove, rename, renameat, snprintf, sprintf, asprintf, vasprintf,
100273         vdprintf, vfprintf, vprintf, vsnprintf, vsprintf): In C++, define a
100274         namespaced alias symbol.
100275         * modules/stdio (Depends-on): Add c++defs.
100276         (Makefile.am): Update stdio.h rule.
100278         spawn: Avoid #define replacements in C++ mode.
100279         * lib/spawn.in.h: Include c++defs.h.
100280         (posix_spawn, posix_spawnp, posix_spawnattr_init,
100281         posix_spawnattr_destroy, posix_spawnattr_getsigdefault,
100282         posix_spawnattr_setsigdefault, posix_spawnattr_getsigmask,
100283         posix_spawnattr_setsigmask, posix_spawnattr_getflags,
100284         posix_spawnattr_setflags, posix_spawnattr_getpgroup,
100285         posix_spawnattr_setpgroup, posix_spawnattr_getschedpolicy,
100286         posix_spawnattr_setschedpolicy, posix_spawnattr_getschedparam,
100287         posix_spawnattr_setschedparam, posix_spawn_file_actions_init,
100288         posix_spawn_file_actions_destroy, posix_spawn_file_actions_addopen,
100289         posix_spawn_file_actions_addclose, posix_spawn_file_actions_adddup2):
100290         In C++, define a namespaced alias symbol.
100291         * modules/spawn (Depends-on): Add c++defs.
100292         (Makefile.am): Update spawn.h rule.
100294         signal: Avoid #define replacements in C++ mode.
100295         * lib/signal.in.h: Include c++defs.h.
100296         (sigismember, sigemptyset, sigaddset, sigdelset, sigfillset,
100297         sigpending, sigprocmask, signal, raise, sigaction): In C++, define a
100298         namespaced alias symbol.
100299         * modules/signal (Depends-on): Add c++defs.
100300         (Makefile.am): Update signal.h rule.
100302         search: Avoid #define replacements in C++ mode.
100303         * lib/search.in.h: Include c++defs.h.
100304         (_gl_search_compar_fn, _gl_search_action_fn): New types.
100305         (tsearch, tfind, tdelete, twalk): In C++, define a namespaced alias
100306         symbol.
100307         * modules/search (Depends-on): Add c++defs.
100308         (Makefile.am): Update search.h rule.
100310         math: Avoid #define replacements in C++ mode.
100311         * lib/math.in.h: Include c++defs.h.
100312         (frexp, acosl, asinl, atanl, ceilf, ceill, cosl, expl, floorf, floorl,
100313         frexpl, ldexpl, logl, roundf, round, roundl, sinl, sqrtl, tanl, truncf,
100314         trunc, truncl): In C++, define a namespaced alias symbol.
100315         * modules/math (Depends-on): Add c++defs.
100316         (Makefile.am): Update math.h rule.
100318         locale: Avoid #define replacements in C++ mode.
100319         * lib/locale.in.h: Include c++defs.h.
100320         (duplocale): In C++, define a namespaced alias symbol.
100321         * m4/locale_h.m4 (gl_LOCALE_H_DEFAULTS): Initialize HAVE_DUPLOCALE.
100322         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Set HAVE_DUPLOCALE.
100323         * modules/locale (Depends-on): Add c++defs.
100324         (Makefile.am): Update locale.h rule. Substitute HAVE_DUPLOCALE.
100326         langinfo: Avoid #define replacements in C++ mode.
100327         * lib/langinfo.in.h: Include c++defs.h.
100328         (nl_langinfo): In C++, define a namespaced alias symbol.
100329         * modules/langinfo (Depends-on): Add c++defs.
100330         (Makefile.am): Update langinfo.h rule.
100332         iconv-h: Avoid #define replacements in C++ mode.
100333         * lib/iconv.in.h: Include c++defs.h, warn-on-use.h.
100334         (iconv_open, iconv, iconv_close): In C++, define a namespaced alias
100335         symbol.
100336         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): Invoke gl_REPLACE_ICONV_H
100337         whenever iconv is present.
100338         * modules/iconv-h (Depends-on): Add c++defs, warn-on-use.
100339         (Makefile.am): Update iconv.h rule.
100341         glob: Avoid #define replacements in C++ mode.
100342         * lib/glob.in.h: Include c++defs.h, warn-on-use.h.
100343         (_gl_glob_errfunc_fn): New type.
100344         (glob, globfree, glob_pattern_p): In C++, define a namespaced alias
100345         symbol.
100346         * modules/glob (Depends-on): Add c++defs, warn-on-use.
100347         (Makefile.am): Update glob.h rule.
100349         fcntl-h: Avoid #define replacements in C++ mode.
100350         * lib/fcntl.in.h: Include c++defs.h.
100351         (fcntl, open, openat): In C++, define a namespaced alias symbol.
100352         * modules/fcntl-h (Depends-on): Add c++defs.
100353         (Makefile.am): Update fcntl.h rule.
100355         dirent: Avoid #define replacements in C++ mode.
100356         * lib/dirent.in.h: Include c++defs.h.
100357         (closedir, fdopendir, opendir, scandir, alphasort): In C++, define a
100358         namespaced alias symbol.
100359         (dirfd): Update declaration.
100360         * modules/dirent (Depends-on): Add c++defs.
100361         (Makefile.am): Update dirent.h rule.
100363         ctype: Make it usable in C++ code.
100364         * lib/ctype.in.h: Include c++defs.h.
100365         (isblank): Declare as extern "C".
100366         * modules/ctype (Depends-on): Add c++defs.
100367         (Makefile.am): Update ctype.h rule.
100369         New module 'c++defs'.
100370         * modules/c++defs: New file.
100371         * build-aux/c++defs.h: New file.
100372         Reported by John W. Eaton <jwe@gnu.org>.
100374 2010-03-07  Bruno Haible  <bruno@clisp.org>
100376         logb: Provide missing declaration for Cygwin.
100377         * lib/math.in.h (logb): New declaration.
100378         * m4/logb.m4: New file.
100379         * modules/logb (Files): Add m4/logb.m4.
100380         (Depends-on): Add math.
100381         (configure.ac): Invoke gl_FUNC_LOGB, gl_MATH_MODULE_INDICATOR.
100382         * m4/math_h.m4 (gl_MATH_H): Check also for logb declaration.
100383         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOGB, HAVE_DECL_LOGB.
100384         * modules/math (Makefile.am): Substitute GNULIB_LOGB, HAVE_DECL_LOGB.
100385         * doc/posix-functions/logb.texi: Mention the Cygwin bug.
100387 2010-03-07  Bruno Haible  <bruno@clisp.org>
100389         Fix test-cond link error.
100390         * tests/test-cond.c: Include <stdio.h>.
100392 2010-03-07  Bruno Haible  <bruno@clisp.org>
100394         Fix test-dirent-safer link error.
100395         * modules/dirent-safer-tests (Makefile.am): Define
100396         test_dirent_safer_LDADD.
100398 2010-03-07  Bruno Haible  <bruno@clisp.org>
100400         * gnulib-tool (func_create_testdir): Don't use 'lib-ignore' module
100401         among default module list.
100403 2010-03-07  Bruno Haible  <bruno@clisp.org>
100405         Fix link error on platforms with GNU libiconv.
100406         * modules/unistr/u8-strcoll-tests (Makefile): Define
100407         test_u8_strcoll_LDADD.
100408         * modules/unistr/u16-strcoll-tests (Makefile): Define
100409         test_u16_strcoll_LDADD.
100410         * modules/unistr/u32-strcoll-tests (Makefile): Define
100411         test_u32_strcoll_LDADD.
100413 2010-03-07  Bruno Haible  <bruno@clisp.org>
100415         Use POSIX declarations for socket functions.
100416         * lib/sys_socket.in.h (rpl_connect, rpl_accept, rpl_bind,
100417         rpl_getpeername, rpl_getsockname, rpl_recv, rpl_send, rpl_recvfrom,
100418         rpl_sendto): Change declaration to match POSIX.
100419         * lib/connect.c (rpl_connect): Likewise.
100420         * lib/accept.c (rpl_accept): Likewise.
100421         * lib/bind.c (rpl_bind): Likewise.
100422         * lib/getpeername.c (rpl_getpeername): Likewise.
100423         * lib/getsockname.c (rpl_getsockname): Likewise.
100424         * lib/recv.c (rpl_recv): Likewise.
100425         * lib/send.c (rpl_send): Likewise.
100426         * lib/recvfrom.c (rpl_recvfrom): Likewise.
100427         * lib/sendto.c (rpl_sendto): Likewise.
100429 2010-03-06  Bruno Haible  <bruno@clisp.org>
100431         Clarify access, euidaccess, faccessat.
100432         * doc/posix-functions/faccessat.texi: Mention security problem under
100433         "Other problems", not "Portability problems".
100434         * doc/posix-functions/access.texi: Likewise. Mention a related security
100435         problem.
100436         * doc/glibc-functions/euidaccess.texi: Mention security problems.
100437         * lib/euidaccess.c: Add comments about platforms.
100438         * lib/unistd.in.h (access, euidaccess): Add warnings.
100440 2010-03-07  Bruno Haible  <bruno@clisp.org>
100442         Ensure posix_spawnattr_{get,set}sched{policy,param} are defined.
100443         * lib/spawn.in.h (POSIX_SPAWN_SETSCHEDPARAM): Define fallback.
100444         (POSIX_SPAWN_SETSCHEDULER): Likewise.
100445         (POSIX_SPAWN_USEVFORK): Define in a way that works when
100446         POSIX_SPAWN_SETSCHEDPARAM and POSIX_SPAWN_SETSCHEDULER are zero.
100447         (posix_spawnattr_getschedpolicy, posix_spawnattr_setschedpolicy): Also
100448         declare when POSIX_SPAWN_SETSCHEDULER is zero.
100449         (posix_spawnattr_getschedparam, posix_spawnattr_setschedparam): Also
100450         declare when POSIX_SPAWN_SETSCHEDPARAM is zero.
100451         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): Test whether
100452         POSIX_SPAWN_SETSCHEDULER or POSIX_SPAWN_SETSCHEDPARAM are zero.
100453         * modules/posix_spawnattr_getschedparam (configure.ac): Enable the
100454         replacement also when POSIX_SPAWN_SETSCHEDPARAM is zero.
100455         * modules/posix_spawnattr_setschedparam (configure.ac): Likewise.
100456         * modules/posix_spawnattr_getschedpolicy (configure.ac): Enable the
100457         replacement also when POSIX_SPAWN_SETSCHEDULER is zero.
100458         * modules/posix_spawnattr_setschedpolicy (configure.ac): Likewise.
100459         * lib/spawnattr_getschedparam.c (posix_spawnattr_getschedparam): Do
100460         nothing if POSIX_SPAWN_SETSCHEDPARAM is zero.
100461         * lib/spawnattr_setschedparam.c (posix_spawnattr_setschedparam):
100462         Likewise.
100463         * lib/spawnattr_getschedpolicy.c (posix_spawnattr_getschedpolicy): Do
100464         nothing if POSIX_SPAWN_SETSCHEDULER is zero.
100465         * lib/spawnattr_setschedpolicy.c (posix_spawnattr_setschedpolicy):
100466         Likewise.
100467         * tests/test-spawn.c (main): Make it work when
100468         POSIX_SPAWN_SETSCHEDPARAM and POSIX_SPAWN_SETSCHEDULER are zero.
100470 2010-03-07  Bruno Haible  <bruno@clisp.org>
100472         Fix incorrect Makefile.am generation in German locale.
100473         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
100474         Execute sed command with character range in C locale.
100476 2010-03-06  Bruno Haible  <bruno@clisp.org>
100478         Tests for module 'iconv-h'.
100479         * modules/iconv-h-tests: New file.
100480         * tests/test-iconv-h.c: New file.
100482         New module 'iconv-h'.
100483         * modules/iconv-h: New file.
100484         * modules/iconv_open (Files): Remove lib/iconv.in.h, m4/iconv_h.m4.
100485         (Depends-on): Add iconv-h. Remove include_next, arg-nonnull.
100486         (configure.ac): Remove gl_ICONV_H.
100487         (Makefile.am): Remove rule for iconv.h.
100489 2010-03-06  Bruno Haible  <bruno@clisp.org>
100491         More consistent naming of *.m4 files.
100492         * m4/wctype_h.m4: Renamed from m4/wctype.m4.
100493         * modules/wctype (Files): Update.
100495         More consistent naming of *.m4 files.
100496         * m4/wchar_h.m4: Renamed from m4/wchar.m4.
100497         * modules/wchar (Files): Update.
100499 2010-03-06  Jim Meyering  <meyering@redhat.com>
100501         euidaccess: relax license to LGPLv2+
100502         * modules/euidaccess (License): Relax to LGPLv2+.
100504 2010-03-06  Bruno Haible  <bruno@clisp.org>
100506         Prefer lib_SOURCES over unconditional AC_LIBOBJ.
100507         * modules/exitfail (configure.ac): Remove AC_LIBOBJ invocation.
100508         (Makefile.am): Augment lib_SOURCES instead.
100510 2010-03-04  Jim Meyering  <meyering@redhat.com>
100512         utime: remove obsolete module
100513         This module, like autoconf's AC_FUNC_UTIME_NULL macro, has been
100514         unnecessary for years, and has been marked as obsolete for 10 months.
100515         * modules/utime: Remove file.
100516         * lib/utime.c: Remove file.
100517         * m4/utime.m4: Remove file.
100518         * m4/utimes-null.m4: Remove file.
100519         * doc/posix-functions/utime.texi (utime): Remove reference to
100520         the module.  Move the sole "fixed by gnulib" item into the
100521         "problems not fixed by Gnulib" list.
100522         * MODULES.html.sh (func_all_modules): Remove reference to "utime".
100524 2010-03-05  Simon Josefsson  <simon@josefsson.org>
100526         * modules/exit (License): Relax license to LGPLv2+.
100527         (Status): Mark as obsolete.
100528         * NEWS: Mention deprecated 'exit' module.
100529         * doc/posix-functions/exit.texi: Recommend 'stdlib' module instead
100530         of now obsolete 'exit'.
100532 2010-03-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
100534         fts-lgpl: remove unused module
100535         * modules/fts-lgpl: Remove.
100536         * MODULES.html.sh (func_all_modules): Adjust.
100537         * check-module (find_included_lib_files): Adjust.
100538         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove.
100540 2010-03-02  Ben Walton  <bwalton@artsci.utoronto.ca>  (tiny change)
100542         copy-acl: enhance Solaris ACL error handling
100543         * lib/copy-acl.c (qcopy_acl): Also ignore EOPNOTSUPP.
100544         * lib/set-mode-acl.c (qset_acl): Likewise.
100546 2010-03-02  Bruno Haible  <bruno@clisp.org>
100548         spawn: Don't override the system defined values on FreeBSD 8.
100549         * lib/spawn.in.h (POSIX_SPAWN_RESETIDS, POSIX_SPAWN_SETPGROUP,
100550         POSIX_SPAWN_SETSIGDEF, POSIX_SPAWN_SETSIGMASK,
100551         POSIX_SPAWN_SETSCHEDPARAM, POSIX_SPAWN_SETSCHEDULER): Don't redefine
100552         if HAVE_POSIX_SPAWN is 1.
100553         Reported by Johan van Selst <johans@stack.nl> via Eric Blake.
100555 2010-03-01  Bruno Haible  <bruno@clisp.org>
100557         * doc/gnulib-tool.texi (Initial import): Clarify the requirements
100558         regarding Automake.
100560 2010-02-25  Bruno Haible  <bruno@clisp.org>
100562         Fix breakage of gnulib-tool with ksh, introduced on 2010-02-21.
100563         * gnulib-tool: Define 'echo' as a function only before the ksh alias
100564         setting, not afterwards.
100565         Reported by Ben Walton <bwalton@artsci.utoronto.ca>.
100567 2010-02-24  Eric Blake  <eblake@redhat.com>
100569         bootstrap, git-version-gen: use timestamp
100570         * build-aux/git-version-gen (scriptversion): Force UTC.
100571         * build-aux/bootstrap (scriptversion): New variable.
100573         bootstrap: allow older git
100574         * build-aux/bootstrap (GNULIB_SRCDIR): Add fallback if git is
100575         older than 1.6.4.  Requested by the libvirt project.
100577 2010-02-23  Eric Blake  <eblake@redhat.com>
100579         warn-on-use: work with old autoconf
100580         * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Accomodate older
100581         AS_VAR semantics of autoconf 2.60.
100582         Reported by Bruno Haible.
100584         bootstrap: improve some comments
100585         * build-aux/bootstrap: Drop unneeded emacs hint.  Add some
100586         clarification comments.
100588         gettimeofday: provide correct function
100589         * lib/gettimeofday.c (gettimeofday): Provide rpl_gettimeofday only
100590         when replacement is declared, otherwise provide gettimeofday.
100591         Reported by Michael Goffioul.
100593 2010-02-23  Jim Meyering  <meyering@redhat.com>
100595         lib-ignore: relax license to "unlimited", not LGPLv2+
100596         * modules/lib-ignore (License): Relax to "unlimited".
100598 2010-02-23  Jim Meyering  <meyering@redhat.com>
100600         lib-ignore: relax license to LGPLv2+
100601         * modules/lib-ignore (License): Relax to LGPLv2+.
100603 2010-02-22  Eric Blake  <eblake@redhat.com>
100605         lseek: avoid bash 3.2 broken pipe bug
100606         * m4/lseek.m4 (gl_FUNC_LSEEK): Drain pipe, to avoid spurious
100607         warning from bash 3.2.
100608         Reported by Ben Pfaff, with analysis from Bruno Haible.
100610         bootstrap: support non-FSF copyright holder
100611         * build-aux/bootstrap (COPYRIGHT_HOLDER, with_gettext): Allow
100612         bootstrap.conf override of COPYRIGHT_HOLDER.
100613         (MSGID_BUGS_ADDRESS): Allow URL rather than email.
100615         bootstrap: interoperate with gettext 0.14.1
100616         * build-aux/bootstrap (slurp): Fix typo when using older gettext.
100618         bootstrap: allow for alternate submodule location
100619         * build-aux/bootstrap (gnulib_path): New variable; use instead of
100620         hardcoding submodule location.
100621         (gnulib_mk): Allow direct use of Makefile.am.
100623         bootstrap: use GNULIB_SRCDIR to reduce disk usage
100624         * build-aux/bootstrap (GNULIB_SRCDIR): If set, use as a reference,
100625         rather than reconfiguring where the submodule points.
100627         gettimeofday: restore support for platforms that lack function
100628         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Also compile
100629         replacement if function is missing.
100630         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_DEFAULTS): New witness.
100631         * modules/sys_time (Makefile.am): Substitute it.
100632         * lib/sys_time.in.h (gettimeofday): Check it.
100633         Reported by Michael Goffioul.
100635 2010-02-21  Bruno Haible  <bruno@clisp.org>
100637         * lib/stdio.in.h (obstack_printf): Fix typo.
100639 2010-02-21  Jose E. Marchesi  <jemarch@gnu.org>
100641         vc-list-files: use bzr ls's -R option
100642         * build-aux/vc-list-files: Invoke bazaar to generate a recursive
100643         list of versioned files based on 'dir' (usage of -R in 'bzr ls').
100645 2010-02-21  Jim Meyering  <meyering@redhat.com>
100647         init.sh: fix EXEEXT shims to work also for names like test-prog
100648         * tests/init.sh: Re-exec a better shell, when needed.
100649         If the current shell lacks support for posix $(...), an init.sh-using
100650         test will now try to find a shell that supports that.  If EXEEXT is
100651         nonempty, we also require support for hyphen-in-alias-name and shell
100652         substitutions like ${var#glob}.  Failure to find such a shell results
100653         in a skipped test.
100655 2010-02-21  Bruno Haible  <bruno@clisp.org>
100657         Really work around "broken pipe" error message from bash 3.2.
100658         * gnulib-tool (func_reset_sigpipe): Remove function.
100659         (echo): In bash 3.2, define to a function that uses printf.
100660         Analyzed by Ralf Wildenhues, Chet Ramey, Ben Pfaff.
100662 2010-02-20  Bruno Haible  <bruno@clisp.org>
100664         Restore support for automake 1.9.6 with autoconf 2.61.
100665         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): Ensure MKDIR_P is AC_SUBSTed.
100666         Reported by James Youngman <jay@gnu.org>.
100668 2010-02-20  Bruno Haible  <bruno@clisp.org>
100670         Improve *printf warning condition.
100671         * lib/stdio.in.h (fprintf, printf, vfprintf, vprintf): Emit warning
100672         also if GNULIB_POSIXCHECK is defined, the *-posix module is not used,
100673         and the function is overridden due to SIGPIPE emulation.
100675 2010-02-20  Bruno Haible  <bruno@clisp.org>
100677         * lib/stdio.in.h: Tweak comments.
100679 2010-02-19  Bruno Haible  <bruno@clisp.org>
100681         Make it easier to find modules. New gnulib-tool option '--find'.
100682         * gnulib-tool: New option --find.
100683         (func_usage): Document it.
100684         (func_sanitize_modulelist): New function, extracted from
100685         func_all_modules.
100686         (func_all_modules): Invoke it.
100687         * doc/gnulib-tool.texi (Which modules?): New node.
100689 2010-02-18  Markus Duft  <mduft@gentoo.org>  (tiny change)
100691         * lib/sys_select.in.h: Provide select replacement even if
100692         sys/select.h exists on a system, for Interix.
100694 2010-02-18  Jim Meyering  <meyering@redhat.com>
100696         init.sh: don't use $(...) just yet
100697         * tests/init.sh (create_exe_shim_functions_): Use `...`, not $(...),
100698         to accommodate e.g., Solaris' /bin/sh.
100700 2010-02-17  Bruno Haible  <bruno@clisp.org>
100702         * doc/posix-headers/netdb.texi: Mention NetBSD 5.0 problem.
100703         Reported by Ludovic Courtès <ludo@gnu.org>.
100705 2010-02-16  Simon Josefsson  <simon@josefsson.org>
100707         * modules/userspec-tests (test_userspec_LDADD): Add variable, for
100708         linking with -lintl.
100710 2010-02-17  Simon Josefsson  <simon@josefsson.org>
100712         * lib/netdb.in.h (AI_V4MAPPED, AI_ALL, AI_ADDRCONFIG): Define to 0
100713         if not provided by the system's netdb.h.  Reported by
100714         ludo@gnu.org (Ludovic Courtès).
100716 2010-02-15  Jim Meyering  <meyering@redhat.com>
100718         init.sh: improve portability and efficiency
100719         * tests/init.sh (find_exe_basenames_): Remove unnecessary use of
100720         "dummy" in a for loop.
100721         Use '!', not '^' to select the complement of a character set used
100722         in a "case" statement.
100723         Use shell variable manipulation, a la ${...%.exe}, rather than sed.
100724         Suggestions from Eric Blake.
100726         init.sh: automatically accommodate programs with the .exe suffix
100727         Automatically arrange for an invocation of "prog" to execute the
100728         program named "prog$EXEEXT" (usually prog.exe).  Thus, all invocations
100729         may use the simpler "prog", yet still work when built on a system
100730         that requires specifying the added suffix.
100731         Do this by constructing a function named "prog" that invokes
100732         "prog.exe" for each .exe file in selected directories.
100733         * tests/init.sh (find_exe_basenames_): New function.
100734         (create_exe_shim_functions_): New function.
100735         (path_prepend_): Use it.
100737         maint.mk: mark syntax-check sc_*.m rules as .PHONY
100738         * top/maint.mk ($(syntax-check-rules)): Add .PHONY, so that
100739         "make -t syntax-check" doesn't create a ton of sc_*.m files.
100741 2010-02-14  Jim Meyering  <meyering@redhat.com>
100743         maint.mk: prohibit inclusion of "hash-pjw.h" without_use
100744         * top/maint.mk (sc_prohibit_hash_without_use): Re-add "@".
100745         (sc_prohibit_hash_pjw_without_use): New rule.
100747         maint.mk: allow the default upload destination dir to be overridden
100748         * top/maint.mk (upload_dest_dir_): Define with a default that
100749         preserves the status quo.
100750         (emit_upload_commands): Use it, rather than hard-coding $(PACKAGE).
100751         Reported by Peter Simons.
100753         maint.mk: prohibit inclusion of "hash.h" without_use
100754         * top/maint.mk (sc_prohibit_hash_without_use): New rule.
100756 2010-02-10  Jim Meyering  <meyering@redhat.com>
100758         maint.mk: prohibit inclusion of "ignore-value.h" without_use
100759         * top/maint.mk (sc_prohibit_ignore_value_without_use): New rule.
100761 2010-02-09  Eric Blake  <ebb9@byu.net>
100762         and Bruno Haible  <bruno@clisp.org>
100764         obstack-printf-posix: ensure declaration
100765         * m4/obstack-printf.m4 (gl_DECL_OBSTACK_PRINTF): New macro,
100766         extracted from gl_FUNC_OBSTACK_PRINTF.
100767         (gl_FUNC_OBSTACK_PRINTF): Invoke it.
100768         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_POSIX):
100769         Likewise.
100770         * lib/stdio.in.h (obstack_printf, obstack_vprintf): Declare also
100771         if GNULIB_OBSTACK_PRINTF_POSIX is 1 and GNULIB_OBSTACK_PRINTF is
100772         0.
100774 2010-02-08  Bruno Haible  <bruno@clisp.org>
100776         gnulib-tool: Fix typo in 2010-02-07 commit.
100777         * gnulib-tool (func_get_dependencies): Fix typo in last commit.
100778         Reported by Eric Blake.
100780 2010-02-07  Bruno Haible  <bruno@clisp.org>
100782         gnulib-tool: Fix up caching patches.
100783         * gnulib-tool: New options --cache-modules, --no-cache-modules. Remove
100784         option --no-cache. Use associative arrays when supported by the shell.
100785         (sed_comments): New variable.
100786         (modcache): Renamed from do_cache.
100787         (sed_extract_field_header): Renamed from sed_extract_cache_prog. Don't
100788         abbreviate unnecessarily.
100789         (have_associative): New variable.
100790         (func_cache_var): Define correctly for bash 1.x. Define in an optimized
100791         way also for ksh and zsh.
100792         (func_init_sed_convert_to_cache_statements): New function, extracted
100793         from func_cache_lookup_module. Add support for associative arrays.
100794         Don't set the c_MODULE_cached variable here. Ignore all lines before
100795         the first field header. Remove only the final newline, not all trailing
100796         newlines. Support empty fields correctly. Limit the use of 'eval' to
100797         assignments.
100798         (func_get_description, func_get_status, func_get_notice,
100799         func_get_applicability, func_get_filelist, func_get_dependencies,
100800         func_get_autoconf_early_snippet, func_get_autoconf_snippet,
100801         func_get_automake_snippet, func_get_include_directive,
100802         func_get_link_directive, func_get_license, func_get_maintainer):
100803         Update documentation. List the unoptimized code first. Add support for
100804         associative arrays. Limit the use of 'eval' to assignments.
100805         (func_get_applicability): Undo stylistic pessimisations.
100806         (func_get_automake_snippet, func_get_include_directive): Reduce code
100807         duplication.
100808         (func_modules_transitive_closure, func_modules_add_dummy,
100809         func_modules_notice, func_modules_to_filelist, func_add_file,
100810         func_update_file, func_emit_lib_Makefile_am, func_emit_po_Makevars,
100811         func_emit_po_POTFILES_in, func_emit_tests_Makefile_am, func_import,
100812         func_create_testdir, func_create_megatestdir): Update documentation.
100814 2010-01-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
100816         * gnulib-tool (func_cache_lookup_module): Store the module name
100817         belonging to the cache variable; error out if two different
100818         module names map to the same cache variable name.
100820 2010-01-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
100822         gnulib-tool: Make caching optional.
100823         * gnulib-tool: Accept option --no-cache, turning off $do_cache.
100824         Update matching short versions of --no-changelog.
100825         (func_usage): Update.
100826         (sed_extract_cache_prog): Renamed from ...
100827         (sed_extract_prog): ... this; revert to old extraction script.
100828         (func_get_description, func_get_status)
100829         (func_get_notice, func_get_applicability, func_get_filelist)
100830         (func_get_dependencies, func_get_autoconf_early_snippet)
100831         (func_get_autoconf_snippet, func_get_automake_snippet)
100832         (func_get_include_directive, func_get_link_directive)
100833         (func_get_license, func_get_maintainer): If $do_cache is false,
100834         use old, non-caching extraction scripts.
100835         Suggestion by Bruno Haible.
100837 2010-01-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
100839         gnulib-tool: cache module metainformation.
100840         * gnulib-tool (sed_extract_prog): Match newline before each
100841         header, and rewrite header to a shell variable suffix.
100842         (func_cache_var, func_cache_lookup_module): New functions,
100843         to turn a module name into a cache variable prefix, and to
100844         look up and cache module metainformation.
100845         (func_get_description, func_get_status)
100846         (func_get_notice, func_get_applicability, func_get_filelist)
100847         (func_get_dependencies, func_get_autoconf_early_snippet)
100848         (func_get_autoconf_snippet, func_get_automake_snippet)
100849         (func_get_include_directive, func_get_link_directive)
100850         (func_get_license, func_get_maintainer): Use
100851         func_cache_lookup_module.
100853 2010-02-07  Bruno Haible  <bruno@clisp.org>
100855         fnctl: Fix missing dependency.
100856         * modules/fcntl (Depends-on): Add getdtablesize.
100857         Reported by John W. Eaton <jwe@gnu.org>.
100859 2010-02-05  Sergey Poznyakoff  <gray@gnu.org.ua>
100861         Argp: fix recognition of short alias options.
100863         * lib/argp-parse.c (convert_options): Fix improper use of
100864         `|' between character values.
100865         * tests/test-argp.c (group1_option): New alias option
100866         --read (-r).
100867         (group1_parser): Special handling for 'r'.
100868         (test15): New test case.
100869         (test_fun): Add test15.
100870         * tests/test-argp-2.sh: Update expected --help and --usage
100871         outputs.
100873 2010-02-05  Sergey Poznyakoff  <gray@gnu.org.ua>
100875         * tests/test-argp.c: Fix indentation.
100877 2010-02-04  Eric Blake  <ebb9@byu.net>
100879         gettimeofday: expose type of second argument
100880         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Do better detection
100881         of glibc extension signature, and define GETTIMEOFDAY_TIMEZONE.
100882         * tests/test-gettimeofday.c: Use it to silence warning.
100883         * doc/posix-functions/gettimeofday.texi (gettimeofday): Document
100884         the issue.
100886 2010-02-03  Jim Meyering  <meyering@redhat.com>
100888         regcomp.c: avoid the sole warning from gcc's -Wtype-limits
100889         * lib/regcomp.c (TYPE_SIGNED): Define.
100890         (parse_dup_op): Use it to avoid the sole warning from -Wtype-limits.
100892         regcomp.c: avoid a new -Wshadow warning
100893         * lib/regcomp.c (create_initial_state): Do not shadow local "err".
100895 2010-02-01  Jim Meyering  <meyering@redhat.com>
100897         removing useless parentheses in cpp #define directives
100898         For motivation, see commit c0221df4, "define STREQ(a,b)
100899         consistently, removing useless parentheses"
100900         * lib/memcmp.c (CMP_LT_OR_GT): Remove useless parentheses.
100901         * lib/mountlist.c (MNT_IGNORE): Likewise.
100902         * lib/trim.h (trim, trim_trailing, trim_leading): Likewise.
100904 2010-02-01  Eric Blake  <ebb9@byu.net>
100906         sys_time: use link-warning
100907         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Split defaults...
100908         (gl_HEADER_SYS_TIME_H_DEFAULTS): ...into new macro.
100909         (gl_SYS_TIME_MODULE_INDICATOR): New macro.
100910         * modules/sys_time (Depends-on): Add warn-on-use.
100911         (Makefile.am): Always build replacement.
100912         (configure.ac): Update substitutions.
100913         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY)
100914         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Include defaults, and no longer
100915         bother with SYS_TIME_H.
100916         * modules/gettimeofday (configure.ac): Declare indicator.
100917         * lib/sys_time.in.h (gettimeofday): Warn if gnulib module is not
100918         in use.
100920         closein-tests: silence compiler warning
100921         * tests/test-closein.c (main): Ignore fread result.
100922         * modules/closein-tests (Depends-on): Add ignore-value.
100924         tests: silence warning about system return
100925         * tests/test-areadlink-with-size.c (main): Ignore system result.
100926         * tests/test-areadlink.c (main): Likewise.
100927         * tests/test-areadlinkat-with-size.c (main): Likewise.
100928         * tests/test-areadlinkat.c (main): Likewise.
100929         * tests/test-canonicalize-lgpl.c (main): Likewise.
100930         * tests/test-canonicalize.c (main): Likewise.
100931         * tests/test-chown.c (main): Likewise.
100932         * tests/test-fchownat.c (main): Likewise.
100933         * tests/test-fdutimensat.c (main): Likewise.
100934         * tests/test-fstatat.c (main): Likewise.
100935         * tests/test-futimens.c (main): Likewise.
100936         * tests/test-lchown.c (main): Likewise.
100937         * tests/test-link.c (main): Likewise.
100938         * tests/test-linkat.c (main): Likewise.
100939         * tests/test-lstat.c (main): Likewise.
100940         * tests/test-mkdir.c (main): Likewise.
100941         * tests/test-mkdirat.c (main): Likewise.
100942         * tests/test-mkfifo.c (main): Likewise.
100943         * tests/test-mkfifoat.c (main): Likewise.
100944         * tests/test-mknod.c (main): Likewise.
100945         * tests/test-readlink.c (main): Likewise.
100946         * tests/test-remove.c (main): Likewise.
100947         * tests/test-rename.c (main): Likewise.
100948         * tests/test-renameat.c (main): Likewise.
100949         * tests/test-rmdir.c (main): Likewise.
100950         * tests/test-symlink.c (main): Likewise.
100951         * tests/test-symlinkat.c (main): Likewise.
100952         * tests/test-unlink.c (main): Likewise.
100953         * tests/test-unlinkat.c (main): Likewise.
100954         * tests/test-utimens.c (main): Likewise.
100955         * tests/test-utimensat.c (main): Likewise.
100956         * modules/areadlink-tests (Depends-on): Add ignore-value.
100957         * modules/areadlink-with-size-tests (Depends-on): Likewise.
100958         * modules/areadlinkat-tests (Depends-on): Likewise.
100959         * modules/areadlinkat-with-size-tests (Depends-on): Likewise.
100960         * modules/canonicalize-lgpl-tests (Depends-on): Likewise.
100961         * modules/canonicalize-tests (Depends-on): Likewise.
100962         * modules/chown-tests (Depends-on): Likewise.
100963         * modules/fdutimensat-tests (Depends-on): Likewise.
100964         * modules/futimens-tests (Depends-on): Likewise.
100965         * modules/lchown-tests (Depends-on): Likewise.
100966         * modules/link-tests (Depends-on): Likewise.
100967         * modules/linkat-tests (Depends-on): Likewise.
100968         * modules/lstat-tests (Depends-on): Likewise.
100969         * modules/mkdir-tests (Depends-on): Likewise.
100970         * modules/mkfifo-tests (Depends-on): Likewise.
100971         * modules/mkfifoat-tests (Depends-on): Likewise.
100972         * modules/mknod-tests (Depends-on): Likewise.
100973         * modules/openat-tests (Depends-on): Likewise.
100974         * modules/readlink-tests (Depends-on): Likewise.
100975         * modules/remove-tests (Depends-on): Likewise.
100976         * modules/rename-tests (Depends-on): Likewise.
100977         * modules/renameat-tests (Depends-on): Likewise.
100978         * modules/rmdir-tests (Depends-on): Likewise.
100979         * modules/symlink-tests (Depends-on): Likewise.
100980         * modules/symlinkat-tests (Depends-on): Likewise.
100981         * modules/unlink-tests (Depends-on): Likewise.
100982         * modules/utimens-tests (Depends-on): Likewise.
100983         * modules/utimensat-tests (Depends-on): Likewise.
100985 2010-01-31  Bruno Haible  <bruno@clisp.org>
100987         Perform the same test for many <math.h> functions.
100988         * m4/mathfunc.m4 (gl_COMMON_DOUBLE_MATHFUNC,
100989         gl_COMMON_DOUBLE_MATHFUNC_TEST): New macros.
100990         * m4/sqrt.m4 (gl_FUNC_SQRT): Invoke gl_COMMON_DOUBLE_MATHFUNC instead
100991         of gl_MATHFUNC.
100992         * modules/acos (configure.ac): Likewise.
100993         * modules/asin (configure.ac): Likewise.
100994         * modules/atan (configure.ac): Likewise.
100995         * modules/atan2 (configure.ac): Likewise.
100996         * modules/cbrt (configure.ac): Likewise.
100997         * modules/copysign (configure.ac): Likewise.
100998         * modules/cos (configure.ac): Likewise.
100999         * modules/cosh (configure.ac): Likewise.
101000         * modules/erf (configure.ac): Likewise.
101001         * modules/erfc (configure.ac): Likewise.
101002         * modules/exp (configure.ac): Likewise.
101003         * modules/fmod (configure.ac): Likewise.
101004         * modules/hypot (configure.ac): Likewise.
101005         * modules/j0 (configure.ac): Likewise.
101006         * modules/j1 (configure.ac): Likewise.
101007         * modules/jn (configure.ac): Likewise.
101008         * modules/lgamma (configure.ac): Likewise.
101009         * modules/log (configure.ac): Likewise.
101010         * modules/log10 (configure.ac): Likewise.
101011         * modules/log1p (configure.ac): Likewise.
101012         * modules/pow (configure.ac): Likewise.
101013         * modules/remainder (configure.ac): Likewise.
101014         * modules/sin (configure.ac): Likewise.
101015         * modules/sinh (configure.ac): Likewise.
101016         * modules/tan (configure.ac): Likewise.
101017         * modules/tanh (configure.ac): Likewise.
101018         * modules/y0 (configure.ac): Likewise.
101019         * modules/y1 (configure.ac): Likewise.
101020         * modules/yn (configure.ac): Likewise.
101021         Suggested by Paolo Bonzini.
101023 2010-01-31  Bruno Haible  <bruno@clisp.org>
101025         * m4/getline.m4 (gl_FUNC_GETLINE): Add comment about REPLACE_GETLINE.
101027 2010-01-31  Bruno Haible  <bruno@clisp.org>
101029         Work around getdelim() bug on FreeBSD 8.0.
101030         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Test whether getdelim supports an
101031         initially NULL line. Set REPLACE_GETDELIM if getdelim exists but does
101032         not work.
101033         * lib/stdio.in.h (getdelim): Define as an alias if REPLACE_GETDELIM
101034         is 1.
101035         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize REPLACE_GETDELIM.
101036         * modules/stdio (Makefile.am): Also substitute REPLACE_GETDELIM.
101037         * tests/test-getdelim.c (main): Also test result for a NULL buffer and
101038         a non-zero size.
101039         * doc/posix-functions/getdelim.texi: Mention the FreeBSD bug.
101041 2010-01-31  Bruno Haible  <bruno@clisp.org>
101043         Work around getline() bug on FreeBSD 8.0.
101044         * m4/getline.m4 (gl_FUNC_GETLINE): Also test result for a NULL buffer
101045         and a non-zero size.
101046         * tests/test-getline.c (main): Likewise.
101047         * doc/posix-functions/getline.texi: Mention the FreeBSD bug.
101048         Reported by Dennis <noordsij@cs.helsinki.fi> via Eric Blake.
101050 2010-01-28  Eric Blake  <ebb9@byu.net>
101052         regex: fix build failure
101053         * lib/regex_internal.h (__GNUC_PREREQ): Define for non-glibc
101054         platforms.
101056 2010-01-28  Jim Meyering  <meyering@redhat.com>
101058         regex: do not ignore memory allocation failure
101059         * lib/regex_internal.c (create_cd_newstate): Detect
101060         re_node_set_init_copy failure.   Extracted from glibc commit
101061         2da42bc06566bc89785e580fa1ac89b4c9f2a63c.
101063         regex: sync more white-space changes from libc
101064         * lib/regex_internal.c: White-space only changes.
101065         * lib/regexec.c: Likewise.
101067         regex: add many uses of __attribute_warn_unused_result__
101068         * lib/regex_internal.c: Use __attribute_warn_unused_result__.
101069         * lib/regexec.c: Likewise.
101070         Extracted from a messy glibc commit.
101072         regcomp.c: spelling and merge-artifact from glibc
101073         * lib/regcomp.c: Merge remainder of glibc's
101074         2da42bc06566bc89785e580fa1ac89b4c9f2a63c.
101076         regcomp.c: sync white-space changes from glibc
101077         * lib/regcomp.c: Merge to accommodate white space
101078         changes from glibc's 2da42bc06566bc89785e580fa1ac89b4c9f2a63c.
101080         regcomp.c: do not ignore internal return values
101081         * lib/regcomp.c: Do not ignore internal return values.
101082         This is from glibc's 2da42bc06566bc89785e580fa1ac89b4c9f2a63c,
101083         but without its white-space changes and spelling fixes.
101085         regex_internal.h: define __attribute_warn_unused_result__
101086         * lib/regex_internal.h (__attribute_warn_unused_result__): Define.
101088         maint: add a syntax-check rule to check for vulnerable Makefile.in
101089         * top/maint.mk (sc_vulnerable_makefile_CVE-2009-4029): New rule.
101091 2010-01-27  Jim Meyering  <meyering@redhat.com>
101093         ncftpput-ftp: clean up spaces
101094         * build-aux/ncftpput-ftp: Make Copyright line consistent.
101095         Remove trailing blanks.
101097 2010-01-27  Simon Josefsson  <simon@josefsson.org>
101099         * build-aux/git-version-gen: Fix copyright statement.
101100         * build-aux/gnupload: Likewise.
101101         * tests/test-arcfour.c: Likewise.
101102         * tests/test-arctwo.c: Likewise.
101103         * tests/test-count-one-bits.c: Likewise.
101104         * tests/test-crc.c: Likewise.
101105         * tests/test-des.c: Likewise.
101106         * tests/test-gc-arcfour.c: Likewise.
101107         * tests/test-gc-arctwo.c: Likewise.
101108         * tests/test-gc-des.c: Likewise.
101109         * tests/test-gc-hmac-md5.c: Likewise.
101110         * tests/test-gc-hmac-sha1.c: Likewise.
101111         * tests/test-gc-md2.c: Likewise.
101112         * tests/test-gc-md4.c: Likewise.
101113         * tests/test-gc-md5.c: Likewise.
101114         * tests/test-gc-pbkdf2-sha1.c: Likewise.
101115         * tests/test-gc-rijndael.c: Likewise.
101116         * tests/test-gc-sha1.c: Likewise.
101117         * tests/test-gc.c: Likewise.
101118         * tests/test-gethostname.c: Likewise.
101119         * tests/test-gettimeofday.c: Likewise.
101120         * tests/test-hash.c: Likewise.
101121         * tests/test-hmac-md5.c: Likewise.
101122         * tests/test-hmac-sha1.c: Likewise.
101123         * tests/test-md2.c: Likewise.
101124         * tests/test-md4.c: Likewise.
101125         * tests/test-md5.c: Likewise.
101126         * tests/test-memchr.c: Likewise.
101127         * tests/test-memchr2.c: Likewise.
101128         * tests/test-memcmp.c: Likewise.
101129         * tests/test-memmem.c: Likewise.
101130         * tests/test-memrchr.c: Likewise.
101131         * tests/test-rawmemchr.c: Likewise.
101132         * tests/test-read-file.c: Likewise.
101133         * tests/test-rijndael.c: Likewise.
101134         * tests/test-sockets.c: Likewise.
101135         * tests/test-strchrnul.c: Likewise.
101136         * tests/test-strstr.c: Likewise.
101137         * tests/test-strtod.c: Likewise.
101138         * build-aux/ncftpput-ftp: Likewise.
101140 2010-01-26  Eric Blake  <ebb9@byu.net>
101142         ignore-value: update recommended header name
101143         * modules/ignore-value (Include): Only use <> for headers that
101144         exist in glibc.
101146 2010-01-26  Jim Meyering  <meyering@redhat.com>
101148         test-userspec.c: avoid compiler warnings
101149         * tests/test-userspec.c (main): Avoid shadowing ("uid"),
101150         and "initialization discards qualifiers..." warnings.
101151         Put the first "uid" in its own scope, and make char* members "const".
101153 2010-01-25  Bruno Haible  <bruno@clisp.org>
101155         gnulib-tool: Make warning diagnostics consistent.
101156         * gnulib-tool (func_warning): New function.
101157         Use it everywhere where gnulib-tool produces output to stderr and it is
101158         not a fatal error.
101160 2010-01-25  Bruno Haible  <bruno@clisp.org>
101162         Fix test dependencies.
101163         * modules/xstrtol-tests (Depends-on): Add inttypes.
101164         * modules/xstrtoll-tests (Depends-on): Likewise. Remove xstrtoll.
101166 2010-01-25  Pádraig Brady  <P@draigBrady.com>
101168         syntax-check: detect incorrect boolean macro values in config.h
101169         * modules/maintainer-makefile (configure.ac): Parameterize the location
101170         of config.h which will be available to makefiles as $(CONFIG_INCLUDE).
101171         The logic is from Eric Blake and the location indicated by Jim Meyering.
101172         Note the more natural CONFIG_HEADER name is prohibited by automake
101173         for backwards compatibility reasons.
101174         * top/maint.mk (sc_Wundef_boolean): New rule.
101176 2010-01-25  Jim Meyering  <meyering@redhat.com>
101178         bootstrap: detect MacOS 10.6's shasum, too
101179         * build-aux/bootstrap: Also recognize MacOS 10.6's shasum.
101180         Suggested by Thomas Treichl <Thomas.Treichl@gmx.net>.
101182 2010-01-23  Jim Meyering  <meyering@redhat.com>
101184         xstrtoll: new module
101185         * modules/xstrtoll: New file.
101186         * MODULES.html.sh (Numeric conversion functions): Add xstrtoll.
101187         * lib/xstrtol.h [HAVE_LONG_LONG_INT]: Declare xstrtoll and xstrtoull.
101188         * lib/xstrtoll.c, lib/xstrtoull.c: New files.
101189         ./configure fails if you use this module and lack "long long".
101190         * modules/xstrtoll-tests: New module.
101191         * tests/test-xstrtoll.c, tests/test-xstrtoull.c: New files.
101192         * tests/test-xstrtoll.sh: Like test-xstrtol.c, but use the
101193         new init.sh-based test framework.
101195 2010-01-24  Bruno Haible  <bruno@clisp.org>
101197         Tests for module 'yn'.
101198         * modules/yn-tests: New file.
101199         * tests/test-yn.c: New file.
101201         Tests for module 'y1'.
101202         * modules/y1-tests: New file.
101203         * tests/test-y1.c: New file.
101205         Tests for module 'y0'.
101206         * modules/y0-tests: New file.
101207         * tests/test-y0.c: New file.
101209         Tests for module 'tanh'.
101210         * modules/tanh-tests: New file.
101211         * tests/test-tanh.c: New file.
101213         Tests for module 'tan'.
101214         * modules/tan-tests: New file.
101215         * tests/test-tan.c: New file.
101217         Tests for module 'sqrt'.
101218         * modules/sqrt-tests: New file.
101219         * tests/test-sqrt.c: New file.
101221         Tests for module 'sinh'.
101222         * modules/sinh-tests: New file.
101223         * tests/test-sinh.c: New file.
101225         Tests for module 'sin'.
101226         * modules/sin-tests: New file.
101227         * tests/test-sin.c: New file.
101229         Tests for module 'rint'.
101230         * modules/rint-tests: New file.
101231         * tests/test-rint.c: New file.
101233         Tests for module 'remainder'.
101234         * modules/remainder-tests: New file.
101235         * tests/test-remainder.c: New file.
101237         Tests for module 'pow'.
101238         * modules/pow-tests: New file.
101239         * tests/test-pow.c: New file.
101241         Tests for module 'nextafter'.
101242         * modules/nextafter-tests: New file.
101243         * tests/test-nextafter.c: New file.
101245         Tests for module 'modf'.
101246         * modules/modf-tests: New file.
101247         * tests/test-modf.c: New file.
101249         Tests for module 'logb'.
101250         * modules/logb-tests: New file.
101251         * tests/test-logb.c: New file.
101253         Tests for module 'log1p'.
101254         * modules/log1p-tests: New file.
101255         * tests/test-log1p.c: New file.
101257         Tests for module 'log10'.
101258         * modules/log10-tests: New file.
101259         * tests/test-log10.c: New file.
101261         Tests for module 'log'.
101262         * modules/log-tests: New file.
101263         * tests/test-log.c: New file.
101265         Tests for module 'lgamma'.
101266         * modules/lgamma-tests: New file.
101267         * tests/test-lgamma.c: New file.
101269         Tests for module 'ldexp'.
101270         * modules/ldexp-tests: New file.
101271         * tests/test-ldexp.c: New file.
101273         Tests for module 'jn'.
101274         * modules/jn-tests: New file.
101275         * tests/test-jn.c: New file.
101277         Tests for module 'j1'.
101278         * modules/j1-tests: New file.
101279         * tests/test-j1.c: New file.
101281         Tests for module 'j0'.
101282         * modules/j0-tests: New file.
101283         * tests/test-j0.c: New file.
101285         Tests for module 'hypot'.
101286         * modules/hypot-tests: New file.
101287         * tests/test-hypot.c: New file.
101289         Tests for module 'fmod'.
101290         * modules/fmod-tests: New file.
101291         * tests/test-fmod.c: New file.
101293         Tests for module 'fabs'.
101294         * modules/fabs-tests: New file.
101295         * tests/test-fabs.c: New file.
101297         Tests for module 'exp'.
101298         * modules/exp-tests: New file.
101299         * tests/test-exp.c: New file.
101301         Tests for module 'erfc'.
101302         * modules/erfc-tests: New file.
101303         * tests/test-erfc.c: New file.
101305         Tests for module 'erf'.
101306         * modules/erf-tests: New file.
101307         * tests/test-erf.c: New file.
101309         Tests for module 'cosh'.
101310         * modules/cosh-tests: New file.
101311         * tests/test-cosh.c: New file.
101313         Tests for module 'cos'.
101314         * modules/cos-tests: New file.
101315         * tests/test-cos.c: New file.
101317         Tests for module 'copysign'.
101318         * modules/copysign-tests: New file.
101319         * tests/test-copysign.c: New file.
101321         Tests for module 'cbrt'.
101322         * modules/cbrt-tests: New file.
101323         * tests/test-cbrt.c: New file.
101325         Tests for module 'atan2'.
101326         * modules/atan2-tests: New file.
101327         * tests/test-atan2.c: New file.
101329         Tests for module 'atan'.
101330         * modules/atan-tests: New file.
101331         * tests/test-atan.c: New file.
101333         Tests for module 'asin'.
101334         * modules/asin-tests: New file.
101335         * tests/test-asin.c: New file.
101337         Tests for module 'acos'.
101338         * modules/acos-tests: New file.
101339         * tests/test-acos.c: New file.
101341 2010-01-24  Bruno Haible  <bruno@clisp.org>
101343         Fix tests for common <math.h> functions.
101344         * m4/mathfunc.m4 (gl_MATHFUNC): Take two additional parameters. Use a
101345         code snippet that references the function pointer, rather than merely
101346         calling the function. Substitute the FUNC_LIBM variable.
101347         * m4/sqrt.m4 (gl_FUNC_SQRT): Update gl_MATHFUNC invocation.
101348         * modules/acos (configure.ac): Likewise.
101349         * modules/asin (configure.ac): Likewise.
101350         * modules/atan (configure.ac): Likewise.
101351         * modules/atan2 (configure.ac): Likewise.
101352         * modules/cbrt (configure.ac): Likewise.
101353         * modules/copysign (configure.ac): Likewise.
101354         * modules/cos (configure.ac): Likewise.
101355         * modules/cosh (configure.ac): Likewise.
101356         * modules/erf (configure.ac): Likewise.
101357         * modules/erfc (configure.ac): Likewise.
101358         * modules/exp (configure.ac): Likewise.
101359         * modules/fabs (configure.ac): Likewise.
101360         * modules/fmod (configure.ac): Likewise.
101361         * modules/hypot (configure.ac): Likewise.
101362         * modules/j0 (configure.ac): Likewise.
101363         * modules/j1 (configure.ac): Likewise.
101364         * modules/jn (configure.ac): Likewise.
101365         * modules/ldexp (configure.ac): Likewise.
101366         * modules/lgamma (configure.ac): Likewise.
101367         * modules/log (configure.ac): Likewise.
101368         * modules/log10 (configure.ac): Likewise.
101369         * modules/log1p (configure.ac): Likewise.
101370         * modules/logb (configure.ac): Likewise.
101371         * modules/modf (configure.ac): Likewise.
101372         * modules/nextafter (configure.ac): Likewise.
101373         * modules/pow (configure.ac): Likewise.
101374         * modules/remainder (configure.ac): Likewise.
101375         * modules/rint (configure.ac): Likewise.
101376         * modules/sin (configure.ac): Likewise.
101377         * modules/sinh (configure.ac): Likewise.
101378         * modules/tan (configure.ac): Likewise.
101379         * modules/tanh (configure.ac): Likewise.
101380         * modules/y0 (configure.ac): Likewise.
101381         * modules/y1 (configure.ac): Likewise.
101382         * modules/yn (configure.ac): Likewise.
101384 2010-01-24  Bruno Haible  <bruno@clisp.org>
101386         Tests: Defeat inlining of math functions by GCC >= 4.3.0.
101387         * tests/test-acosl.c (x): New variable.
101388         (main): Store argument in x and fetch it from x.
101389         * tests/test-asinl.c (x): New variable.
101390         (main): Store argument in x and fetch it from x.
101391         * tests/test-atanl.c (x): New variable.
101392         (main): Store argument in x and fetch it from x.
101393         * tests/test-cosl.c (x): New variable.
101394         (main): Store argument in x and fetch it from x.
101395         * tests/test-expl.c (x): New variable.
101396         (main): Store argument in x and fetch it from x.
101397         * tests/test-logl.c (x): New variable.
101398         (main): Store argument in x and fetch it from x.
101399         * tests/test-sinl.c (x): New variable.
101400         (main): Store argument in x and fetch it from x.
101401         * tests/test-sqrtl.c (x): New variable.
101402         (main): Store argument in x and fetch it from x.
101403         * tests/test-tanl.c (x): New variable.
101404         (main): Store argument in x and fetch it from x.
101406 2010-01-24  Bruno Haible  <bruno@clisp.org>
101408         Provide EXEEXT and srcdir in TESTS_ENVIRONMENT by default.
101409         * gnulib-tool (func_emit_tests_Makefile_am): Add EXEEXT and srcdir
101410         assignments to the initial TESTS_ENVIRONMENT.
101411         * doc/gnulib.texi (Unit test modules): Document it.
101412         * modules/acl-tests (Makefile.am): Drop EXEEXT assignment from
101413         TESTS_ENVIRONMENT.
101414         * modules/btowc-tests (Makefile.am): Likewise.
101415         * modules/c-stack-tests (Makefile.am): Likewise.
101416         * modules/c-strcase-tests (Makefile.am): Likewise.
101417         * modules/copy-file-tests (Makefile.am): Likewise.
101418         * modules/mbmemcasecmp-tests (Makefile.am): Likewise.
101419         * modules/mbmemcasecoll-tests (Makefile.am): Likewise.
101420         * modules/mbrtowc-tests (Makefile.am): Likewise.
101421         * modules/mbscasecmp-tests (Makefile.am): Likewise.
101422         * modules/mbscasestr-tests (Makefile.am): Likewise.
101423         * modules/mbschr-tests (Makefile.am): Likewise.
101424         * modules/mbscspn-tests (Makefile.am): Likewise.
101425         * modules/mbsinit-tests (Makefile.am): Likewise.
101426         * modules/mbsncasecmp-tests (Makefile.am): Likewise.
101427         * modules/mbsnrtowcs-tests (Makefile.am): Likewise.
101428         * modules/mbspbrk-tests (Makefile.am): Likewise.
101429         * modules/mbspcasecmp-tests (Makefile.am): Likewise.
101430         * modules/mbsrchr-tests (Makefile.am): Likewise.
101431         * modules/mbsrtowcs-tests (Makefile.am): Likewise.
101432         * modules/mbsspn-tests (Makefile.am): Likewise.
101433         * modules/mbsstr-tests (Makefile.am): Likewise.
101434         * modules/nl_langinfo-tests (Makefile.am): Likewise.
101435         * modules/unicase/locale-language-tests (Makefile.am): Likewise.
101436         * modules/unistdio/u16-vasnprintf-tests (Makefile.am): Likewise.
101437         * modules/unistdio/u32-vasnprintf-tests (Makefile.am): Likewise.
101438         * modules/unistdio/u8-vasnprintf-tests (Makefile.am): Likewise.
101439         * modules/unistdio/ulc-vasnprintf-tests (Makefile.am): Likewise.
101440         * modules/uniwbrk/ulc-wordbreaks-tests (Makefile.am): Likewise.
101441         * modules/vasnprintf-posix-tests (Makefile.am): Likewise.
101442         * modules/wcrtomb-tests (Makefile.am): Likewise.
101443         * modules/wcsnrtombs-tests (Makefile.am): Likewise.
101444         * modules/wcsrtombs-tests (Makefile.am): Likewise.
101445         * modules/quotearg-tests (Makefile.am): Drop EXEEXT and srcdir
101446         assignments from TESTS_ENVIRONMENT.
101447         * modules/argp-tests (Makefile.am): Drop TESTS_ENVIRONMENT
101448         augmentation.
101449         * modules/argp-version-etc-tests (Makefile.am): Likewise.
101450         * modules/atexit-tests (Makefile.am): Likewise.
101451         * modules/binary-io-tests (Makefile.am): Likewise.
101452         * modules/closein-tests (Makefile.am): Likewise.
101453         * modules/dprintf-posix-tests (Makefile.am): Likewise.
101454         * modules/exclude-tests (Makefile.am): Likewise.
101455         * modules/fflush-tests (Makefile.am): Likewise.
101456         * modules/fpending-tests (Makefile.am): Likewise.
101457         * modules/fprintf-posix-tests (Makefile.am): Likewise.
101458         * modules/freadahead-tests (Makefile.am): Likewise.
101459         * modules/freadptr-tests (Makefile.am): Likewise.
101460         * modules/freadseek-tests (Makefile.am): Likewise.
101461         * modules/fseek-tests (Makefile.am): Likewise.
101462         * modules/fseeko-tests (Makefile.am): Likewise.
101463         * modules/ftell-tests (Makefile.am): Likewise.
101464         * modules/ftello-tests (Makefile.am): Likewise.
101465         * modules/idpriv-drop-tests (Makefile.am): Likewise.
101466         * modules/idpriv-droptemp-tests (Makefile.am): Likewise.
101467         * modules/lseek-tests (Makefile.am): Likewise.
101468         * modules/parse-duration-tests (Makefile.am): Likewise.
101469         * modules/perror-tests (Makefile.am): Likewise.
101470         * modules/pipe-filter-gi-tests (Makefile.am): Likewise.
101471         * modules/pipe-filter-ii-tests (Makefile.am): Likewise.
101472         * modules/pipe-tests (Makefile.am): Likewise.
101473         * modules/pread-tests (Makefile.am): Likewise.
101474         * modules/printf-posix-tests (Makefile.am): Likewise.
101475         * modules/select-tests (Makefile.am): Likewise.
101476         * modules/sigpipe-tests (Makefile.am): Likewise.
101477         * modules/tsearch-tests (Makefile.am): Likewise.
101478         * modules/unicase/ulc-casecmp-tests (Makefile.am): Likewise.
101479         * modules/unicase/ulc-casecoll-tests (Makefile.am): Likewise.
101480         * modules/uniname/uniname-tests (Makefile.am): Likewise.
101481         * modules/uniwidth/width-tests (Makefile.am): Likewise.
101482         * modules/vdprintf-posix-tests (Makefile.am): Likewise.
101483         * modules/version-etc-tests (Makefile.am): Likewise.
101484         * modules/vfprintf-posix-tests (Makefile.am): Likewise.
101485         * modules/vprintf-posix-tests (Makefile.am): Likewise.
101486         * modules/xalloc-die-tests (Makefile.am): Likewise.
101487         * modules/xprintf-posix-tests (Makefile.am): Likewise.
101488         * modules/xstrtoimax-tests (Makefile.am): Likewise.
101489         * modules/xstrtol-tests (Makefile.am): Likewise.
101490         * modules/xstrtoumax-tests (Makefile.am): Likewise.
101491         * modules/yesno-tests (Makefile.am): Likewise.
101492         Suggested by Jim Meyering.
101494 2010-01-24  Bruno Haible  <bruno@clisp.org>
101496         More documentation.
101497         * doc/gnulib.texi (Writing modules): New chapter.
101498         (Miscellaneous Notes): Move sections "Comments" and "Header files" to
101499         the new chapter.
101501 2010-01-24  Jim Meyering  <meyering@redhat.com>
101503         maint.mk: do not prepend "./" after filtering
101504         * top/maint.mk (_prepend_srcdir_prefix): New variable
101505         (VC_LIST_EXCEPT): Use it to avoid prepending (post-filter)
101506         "./" when $(srcdir) is ".".
101508         define STREQ(a,b) consistently, removing useless parentheses
101509         #define STREQ(a, b) (strcmp ((a), (b)) == 0) is over-parenthesized,
101510         since the only risk is that "a" or "b" contains an unparenthesized
101511         comma, but if either did that, STREQ would have 3 or more arguments.
101512         Hence, #define STREQ(a, b) (strcmp (a, b) == 0) is better.
101513         * lib/fts.c (STREQ): Remove unnecessary parentheses.
101514         * lib/hash-triple.c (STREQ): Likewise.
101515         * tests/test-argv-iter.c (STREQ): Use a and b, not s1 and s2.
101516         * lib/getugroups.c (STREQ): Likewise.
101518 2010-01-23  Jim Meyering  <meyering@redhat.com>
101520         maint.mk: fix syntax-check in a non-srcdir build directory
101521         * top/maint.mk (_dot_escaped_srcdir): Remove erroneous backslash,
101522         introduced in my 2010-01-21 commit, a6da6c45.  Reported by Eric Blake.
101524 2010-01-22  Jim Meyering  <meyering@redhat.com>
101526         userspec: add unit tests
101527         * tests/test-userspec.c: New file.
101528         * modules/userspec-tests: Likewise.
101530 2010-01-21  Jim Meyering  <meyering@redhat.com>
101532         maint.mk: handle source file names containing "." robustly
101533         * top/maint.mk (_dot_escaped_srcdir): Define.
101534         (VC_LIST): Use it in LHS of sed substitution.
101536 2010-01-21  Jiri Denemark  <jdenemar@redhat.com>
101538         maint.mk: fix VC_LIST_EXCEPT for srcdir != builddir
101539         * top/maint.mk (VC_LIST_EXCEPT): Preprocess the output of
101540         $(VC_LIST) to remove a prefix of '$(srcdir)/', so that it works
101541         from a non-srcdir build.
101543 2010-01-20  Eric Blake  <ebb9@byu.net>
101545         warn-on-use: use instead of link-warning
101546         * modules/stdio (Depends-on, Makefile.am): Drop link-warning.
101547         * modules/unistd (Depends-on, Makefile.am): Likewise.
101548         * modules/arpa_inet (Depends-on): Replace link-warning with
101549         warn-on-use.
101550         (Makefile.am): Update rules accordingly.
101551         * modules/ctype (Depends-on, Makefile.am): Likewise.
101552         * modules/dirent (Depends-on, Makefile.am): Likewise.
101553         * modules/fcntl-h (Depends-on, Makefile.am): Likewise.
101554         * modules/inttypes (Depends-on, Makefile.am): Likewise.
101555         * modules/langinfo (Depends-on, Makefile.am): Likewise.
101556         * modules/locale (Depends-on, Makefile.am): Likewise.
101557         * modules/math (Depends-on, Makefile.am): Likewise.
101558         * modules/search (Depends-on, Makefile.am): Likewise.
101559         * modules/signal (Depends-on, Makefile.am): Likewise.
101560         * modules/spawn (Depends-on, Makefile.am): Likewise.
101561         * modules/stdlib (Depends-on, Makefile.am): Likewise.
101562         * modules/string (Depends-on, Makefile.am): Likewise.
101563         * modules/strings (Depends-on, Makefile.am): Likewise.
101564         * modules/sys_file (Depends-on, Makefile.am): Likewise.
101565         * modules/sys_ioctl (Depends-on, Makefile.am): Likewise.
101566         * modules/sys_select (Depends-on, Makefile.am): Likewise.
101567         * modules/sys_socket (Depends-on, Makefile.am): Likewise.
101568         * modules/sys_stat (Depends-on, Makefile.am): Likewise.
101569         * modules/sys_times (Depends-on, Makefile.am): Likewise.
101570         * modules/sys_utsname (Depends-on, Makefile.am): Likewise.
101571         * modules/wchar (Depends-on, Makefile.am): Likewise.
101572         * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET): Check which functions
101573         should be poisoned.
101574         * m4/ctype.m4 (gl_CTYPE_H): Likewise.
101575         * m4/dirent_h.m4 (gl_DIRENT_H): Likewise.
101576         * m4/fcntl_h.m4 (gl_FCNTL_H): Likewise.
101577         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise.
101578         * m4/langinfo_h.m4 (gl_LANGINFO_H): Likewise.
101579         * m4/locale_h.m4 (gl_LOCALE_H): Likewise.
101580         * m4/math_h.m4 (gl_MATH_H): Likewise.
101581         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
101582         * m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
101583         * m4/spawn_h.m4 (gl_SPAWN_H): Likewise.
101584         * m4/stdio_h.m4 (gl_STDIO_H): Likewise.
101585         * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
101586         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Likewise.
101587         * m4/strings_h.m4 (gl_HEADER_STRINGS_H_BODY): Likewise.
101588         * m4/sys_file_h.m4 (gl_HEADER_SYS_FILE_H_DEFAULTS): Likewise.
101589         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H): Likewise.
101590         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
101591         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
101592         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
101593         * m4/sys_times_h.m4 (gl_SYS_TIMES_H): Likewise.
101594         * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H): Likewise.
101595         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
101596         * m4/wchar.m4 (gl_WCHAR_H): Likewise.
101597         * lib/arpa_inet.in.h: Use _GL_WARN_ON_USE instead of
101598         GL_LINK_WARNING.
101599         * lib/ctype.in.h: Likewise.
101600         * lib/dirent.in.h: Likewise.
101601         * lib/fcntl.in.h: Likewise.
101602         * lib/inttypes.in.h: Likewise.
101603         * lib/langinfo.in.h: Likewise.
101604         * lib/locale.in.h: Likewise.
101605         * lib/math.in.h: Likewise.
101606         * lib/search.in.h: Likewise.
101607         * lib/signal.in.h: Likewise.
101608         * lib/spawn.in.h: Likewise.
101609         * lib/stdio.in.h: Likewise.
101610         * lib/stdlib.in.h: Likewise.
101611         * lib/string.in.h: Likewise.
101612         * lib/strings.in.h: Likewise.
101613         * lib/sys_file.in.h: Likewise.
101614         * lib/sys_ioctl.in.h: Likewise.
101615         * lib/sys_select.in.h: Likewise.
101616         * lib/sys_socket.in.h: Likewise.
101617         * lib/sys_stat.in.h: Likewise.
101618         * lib/sys_times.in.h: Likewise.
101619         * lib/sys_utsname.in.h: Likewise.
101620         * lib/unistd.in.h: Likewise.
101621         * lib/wchar.in.h: Likewise.
101623 2010-01-20  Bruno Haible  <bruno@clisp.org>
101625         Avoid duplicate -lm.
101626         * m4/isnan.m4 (gl_ISNAN): Avoid duplicate -lm in $ISNAN_LIBM.
101627         * m4/round.m4 (gl_FUNC_ROUND): Avoid duplicate -lm in $ROUND_LIBM.
101628         * m4/roundf.m4 (gl_FUNC_ROUNDF): Avoid duplicate -lm in $ROUNDF_LIBM.
101629         * m4/roundl.m4 (gl_FUNC_ROUNDL): Avoid duplicate -lm in $ROUNDL_LIBM.
101630         * m4/acosl.m4 (gl_FUNC_ACOSL): Avoid duplicate -lm in $ACOSL_LIBM.
101631         * m4/cosl.m4 (gl_FUNC_COSL): Avoid duplicate -lm in $COSL_LIBM.
101632         * m4/logl.m4 (gl_FUNC_LOGL): Avoid duplicate -lm in $LOGL_LIBM.
101633         * m4/sinl.m4 (gl_FUNC_SINL): Avoid duplicate -lm in $SINL_LIBM.
101634         * m4/sqrtl.m4 (gl_FUNC_SQRTL): Avoid duplicate -lm in $SQRTL_LIBM.
101635         * m4/tanl.m4 (gl_FUNC_TANL): Avoid duplicate -lm in $TANL_LIBM.
101636         * m4/asinl.m4 (gl_FUNC_ASINL): Same change, for consistency.
101637         * m4/atanl.m4 (gl_FUNC_ATANL): Likewise.
101638         Reported by Paolo Bonzini.
101640 2010-01-19  Bruno Haible  <bruno@clisp.org>
101642         langinfo, nl_langinfo: Relicense under LGPLv2+.
101643         * modules/langinfo (License): Change to LGPLv2+.
101644         * modules/nl_langinfo (License): Likewise.
101645         Patch by David Lutterkort <lutter@redhat.com>.
101647 2010-01-19  Bruno Haible  <bruno@clisp.org>
101649         Avoid compilation error with cc on OSF/1 5.1.
101650         * lib/fcntl.in.h: Include <unistd.h> after the #include_next <fcntl.h>
101651         statement, not before.
101652         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
101654 2010-01-18  Bruno Haible  <bruno@clisp.org>
101656         Avoid a link error due to the __printf__ symbol.
101657         * lib/stdio.in.h (__attribute__): Define to empty also for gcc 2.5.x
101658         and 2.6.x.
101659         (__format__, __printf__): Remove definitions.
101660         * lib/argp-fmtstream.h: Likewise.
101661         * lib/argp.h: Likewise.
101662         * lib/error.h: Likewise.
101663         * lib/vasnprintf.h: Likewise.
101664         * lib/xprintf.h: Likewise.
101665         * lib/xvasprintf.h: Likewise.
101666         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
101668 2010-01-18  Bruno Haible  <bruno@clisp.org>
101670         Tests for module 'tanl'.
101671         * modules/tanl-tests: New file.
101672         * tests/test-tanl.c: New file.
101674         Tests for module 'sqrtl'.
101675         * modules/sqrtl-tests: New file.
101676         * tests/test-sqrtl.c: New file.
101678         Tests for module 'sinl'.
101679         * modules/sinl-tests: New file.
101680         * tests/test-sinl.c: New file.
101682         Tests for module 'logl'.
101683         * modules/logl-tests: New file.
101684         * tests/test-logl.c: New file.
101686         Tests for module 'expl'.
101687         * modules/expl-tests: New file.
101688         * tests/test-expl.c: New file.
101690         Tests for module 'cosl'.
101691         * modules/cosl-tests: New file.
101692         * tests/test-cosl.c: New file.
101694         Tests for module 'atanl'.
101695         * modules/atanl-tests: New file.
101696         * tests/test-atanl.c: New file.
101698         Tests for module 'asinl'.
101699         * modules/asinl-tests: New file.
101700         * tests/test-asinl.c: New file.
101702         Tests for module 'acosl'.
101703         * modules/acosl-tests: New file.
101704         * tests/test-acosl.c: New file.
101706         New modules acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl, tanl.
101707         * lib/math.in.h (acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl,
101708         tanl): Use the standard gnulib idiom.
101709         * lib/cosl.c: Don't include trigl.c and sincosl.c.
101710         * lib/sinl.c: Likewise.
101711         * lib/tanl.c: Don't include trigl.c.
101712         (kernel_tanl): Make static.
101713         * lib/sincosl.c: Include trigl.h first.
101714         * lib/trigl.c: Likewise.
101715         * m4/acosl.m4: New file.
101716         * m4/asinl.m4: New file.
101717         * m4/atanl.m4: New file.
101718         * m4/cosl.m4: New file.
101719         * m4/expl.m4: New file.
101720         * m4/logl.m4: New file.
101721         * m4/sinl.m4: New file.
101722         * m4/sqrtl.m4: New file.
101723         * m4/tanl.m4: New file.
101724         * m4/mathl.m4: Remove file.
101725         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_* and HAVE_*
101726         variables for acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl, tanl.
101727         Don't initialize GNULIB_MATHL.
101728         * modules/acosl: New file.
101729         * modules/asinl: New file.
101730         * modules/atanl: New file.
101731         * modules/cosl: New file.
101732         * modules/expl: New file.
101733         * modules/logl: New file.
101734         * modules/sinl: New file.
101735         * modules/sqrtl: New file.
101736         * modules/tanl: New file.
101737         * modules/math (Makefile.am): Substitute GNULIB_* and HAVE_* variables
101738         for acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl, tanl. Don't
101739         substitute GNULIB_MATHL.
101740         * modules/mathl: Rewritten.
101741         * doc/posix-functions/acosl.texi: Mention the 'acosl' module.
101742         * doc/posix-functions/asinl.texi: Mention the 'asinl' module.
101743         * doc/posix-functions/atanl.texi: Mention the 'atanl' module.
101744         * doc/posix-functions/cosl.texi: Mention the 'cosl' module.
101745         * doc/posix-functions/expl.texi: Mention the 'expl' module.
101746         * doc/posix-functions/logl.texi: Mention the 'logl' module.
101747         * doc/posix-functions/sinl.texi: Mention the 'sinl' module.
101748         * doc/posix-functions/sqrtl.texi: Mention the 'sqrtl' module.
101749         * doc/posix-functions/tanl.texi: Mention the 'tanl' module.
101751 2010-01-18  Bruno Haible  <bruno@clisp.org>
101753         sqrt: Make gl_FUNC_SQRT requirable.
101754         * m4/sqrt.m4: New file.
101755         * modules/sqrt (Files): Add it.
101756         (configure.ac): Invoke gl_FUNC_SQRT.
101758 2010-01-18  Bruno Haible  <bruno@clisp.org>
101760         New modules for common <math.h> functions.
101761         * m4/mathfunc.m4: New file.
101762         * modules/acos: New file.
101763         * modules/asin: New file.
101764         * modules/atan: New file.
101765         * modules/atan2: New file.
101766         * modules/cbrt: New file.
101767         * modules/copysign: New file.
101768         * modules/cos: New file.
101769         * modules/cosh: New file.
101770         * modules/erf: New file.
101771         * modules/erfc: New file.
101772         * modules/exp: New file.
101773         * modules/fabs: New file.
101774         * modules/fmod: New file.
101775         * modules/hypot: New file.
101776         * modules/j0: New file.
101777         * modules/j1: New file.
101778         * modules/jn: New file.
101779         * modules/ldexp: New file.
101780         * modules/lgamma: New file.
101781         * modules/log: New file.
101782         * modules/log10: New file.
101783         * modules/log1p: New file.
101784         * modules/logb: New file.
101785         * modules/modf: New file.
101786         * modules/nextafter: New file.
101787         * modules/pow: New file.
101788         * modules/remainder: New file.
101789         * modules/rint: New file.
101790         * modules/sin: New file.
101791         * modules/sinh: New file.
101792         * modules/sqrt: New file.
101793         * modules/tan: New file.
101794         * modules/tanh: New file.
101795         * modules/y0: New file.
101796         * modules/y1: New file.
101797         * modules/yn: New file.
101798         * doc/posix-functions/acos.texi: Mention the 'acos' module.
101799         * doc/posix-functions/asin.texi: Mention the 'asin' module.
101800         * doc/posix-functions/atan.texi: Mention the 'atan' module.
101801         * doc/posix-functions/atan2.texi: Mention the 'atan2' module.
101802         * doc/posix-functions/cbrt.texi: Mention the 'cbrt' module.
101803         * doc/posix-functions/copysign.texi: Mention the 'copysign' module.
101804         * doc/posix-functions/cos.texi: Mention the 'cos' module.
101805         * doc/posix-functions/cosh.texi: Mention the 'cosh' module.
101806         * doc/posix-functions/erf.texi: Mention the 'erf' module.
101807         * doc/posix-functions/erfc.texi: Mention the 'erfc' module.
101808         * doc/posix-functions/exp.texi: Mention the 'exp' module.
101809         * doc/posix-functions/fabs.texi: Mention the 'fabs' module.
101810         * doc/posix-functions/fmod.texi: Mention the 'fmod' module.
101811         * doc/posix-functions/hypot.texi: Mention the 'hypot' module.
101812         * doc/posix-functions/j0.texi: Mention the 'j0' module.
101813         * doc/posix-functions/j1.texi: Mention the 'j1' module.
101814         * doc/posix-functions/jn.texi: Mention the 'jn' module.
101815         * doc/posix-functions/ldexp.texi: Mention the 'ldexp' module.
101816         * doc/posix-functions/lgamma.texi: Mention the 'lgamma' module.
101817         * doc/posix-functions/log.texi: Mention the 'log' module.
101818         * doc/posix-functions/log10.texi: Mention the 'log10' module.
101819         * doc/posix-functions/log1p.texi: Mention the 'log1p' module.
101820         * doc/posix-functions/logb.texi: Mention the 'logb' module.
101821         * doc/posix-functions/modf.texi: Mention the 'modf' module.
101822         * doc/posix-functions/nextafter.texi: Mention the 'nextafter' module.
101823         * doc/posix-functions/pow.texi: Mention the 'pow' module.
101824         * doc/posix-functions/remainder.texi: Mention the 'remainder' module.
101825         * doc/posix-functions/rint.texi: Mention the 'rint' module.
101826         * doc/posix-functions/sin.texi: Mention the 'sin' module.
101827         * doc/posix-functions/sinh.texi: Mention the 'sinh' module.
101828         * doc/posix-functions/sqrt.texi: Mention the 'sqrt' module.
101829         * doc/posix-functions/tan.texi: Mention the 'tan' module.
101830         * doc/posix-functions/tanh.texi: Mention the 'tanh' module.
101831         * doc/posix-functions/y0.texi: Mention the 'y0' module.
101832         * doc/posix-functions/y1.texi: Mention the 'y1' module.
101833         * doc/posix-functions/yn.texi: Mention the 'yn' module.
101835 2010-01-18  Jim Meyering  <meyering@redhat.com>
101837         ignore-value: relax license to LGPLv2+
101838         * modules/ignore-value (License): Relax to LGPLv2+.
101840         getdate: don't leak when TZ contains two or more '"'s
101841         * lib/getdate.y (get_date): Don't leak a copy of TZ for each
101842         double quote in TZ after the first one.
101844         readtokens: do not leak internal token_lengths buffer
101845         * lib/readtokens.c (readtokens): Free the local, lengths,
101846         when the supplied "token_lengths" parameter is NULL.
101848 2010-01-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
101850         Fix a couple of missing LIBTHREAD link failures on AIX.
101851         * modules/git-merge-changelog (git_merge_changelog_LDADD): Add
101852         $(LIBTHREAD).
101853         * modules/strsignal-tests (test_strsignal_LDADD): Likewise.
101855         Link test-poll against INET_PTON_LIB.
101856         * modules/poll-tests (test_poll_LDADD): Add $(INET_PTON_LIB),
101857         for inet_pton on Solaris 10.
101859 2010-01-17  Bruno Haible  <bruno@clisp.org>
101861         unistdio/*-sprintf: Fix typo in module description.
101862         * modules/unistdio/u8-sprintf (Depends-on): Fix typo.
101863         * modules/unistdio/u8-u8-sprintf (Depends-on): Likewise.
101864         * modules/unistdio/u16-sprintf (Depends-on): Likewise.
101865         * modules/unistdio/u16-u16-sprintf (Depends-on): Likewise.
101866         * modules/unistdio/u32-sprintf (Depends-on): Likewise.
101867         * modules/unistdio/u32-u32-sprintf (Depends-on): Likewise.
101868         * modules/unistdio/ulc-sprintf (Depends-on): Likewise.
101869         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
101871 2010-01-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
101873         gnulib-tool: fix filelist for AIX, HP-UX ksh.
101874         * gnulib-tool (func_filter_filelist): Do not quote possibly-empty
101875         variables in shell case patterns, for AIX and HP-UX ksh.
101877         Split large sed scripts, for HP-UX sed.
101878         * modules/stdio: Split sed scripts around 50 sed commands,
101879         to avoid HP-UX limit of 99 commands, in the near future.
101880         * modules/string: Likewise.
101881         * modules/unistd: Likewise.
101883         gnulib-tool: avoid writing in the current directory.
101884         * gnulib-tool (func_emit_lib_Makefile_am)
101885         (func_emit_tests_Makefile_am): Put temporary files in $tmp,
101886         not in the current directory, so concurrent gnulib-tool
101887         instances do not interfere.
101889 2010-01-16  Jim Meyering  <meyering@redhat.com>
101891         doc: update users.txt
101892         * users.txt: Add grep.
101893         (diffutils, gzip): Update URLs.
101895 2010-01-12  Bruno Haible  <bruno@clisp.org>
101897         posix_spawn: Avoid test failure on Cygwin.
101898         * tests/test-posix_spawn3.c (DATA_FILENAME) [CYGWIN]: Use less risky
101899         characters.
101900         Reported by Simon Josefsson.
101902 2010-01-12  Bruno Haible  <bruno@clisp.org>
101904         * tests/test-cond.c (main): When skipping the test, show the reason.
101906 2010-01-12  Simon Josefsson  <simon@josefsson.org>
101908         * lib/striconv.c (str_cd_iconv): Avoid if before free.
101910 2010-01-12  Simon Josefsson  <simon@josefsson.org>
101912         * top/maint.mk (VC_LIST_EXCEPT): Filter list through
101913         VC_LIST_ALWAYS_EXCLUDE_REGEX.
101915 2010-01-12  Eric Blake  <ebb9@byu.net>
101917         build: guarantee AS_VAR_IF
101918         * m4/warnings.m4 (gl_WARN_ADD): Use autoconf name.
101919         (gl_AS_VAR_IF): Move...
101920         * m4/gnulib-common.m4 (AS_VAR_IF): ...here.
101921         Reported by Simon Josefsson.
101923 2010-01-12  Simon Josefsson  <simon@josefsson.org>
101925         * lib/stdio.in.h: Fix typo.
101927 2010-01-12  Simon Josefsson  <simon@josefsson.org>
101929         * m4/gc.m4: Check if linking to libgcrypt also needs linking to
101930         libgpg-error.
101932 2010-01-12  Simon Josefsson  <simon@josefsson.org>
101934         * tests/test-xalloc-die.sh: Use $EXEEXT.
101936 2010-01-12  Simon Josefsson  <simon@josefsson.org>
101937             Bruno Haible  <bruno@clisp.org>
101939         getlogin, getlogin_r: Avoid test failure.
101940         * tests/test-getlogin.c: Include <stdio.h>.
101941         (main): Skip the test when the function fails because stdin is not a
101942         tty.
101943         * tests/test-getlogin_r.c: Include <stdio.h>.
101944         (main): Skip the test when the function fails because stdin is not a
101945         tty.
101947 2010-01-11  Eric Blake  <ebb9@byu.net>
101949         tests: avoid more large file warnings
101950         * tests/test-fflush.c: Avoid warning about ftell use.
101951         * tests/test-fseek.c: Avoid warning about fseek use.
101953 2010-01-10  Bruno Haible  <bruno@clisp.org>
101955         nproc: Work better on Linux when /proc and /sys are not mounted.
101956         * lib/nproc.c (num_processors): Use num_processors_via_affinity_mask ()
101957         as lower bound when, on glibc/Linux systems,
101958         sysconf (_SC_NPROCESSORS_CONF) returns 1.
101959         Suggested by Pádraig Brady <P@draigbrady.com>.
101960         Reported by Dmitry V. Levin <ldv@altlinux.org>.
101962         nproc: Refactor.
101963         * lib/nproc.c (num_processors_via_affinity_mask): New function,
101964         extracted from num_processors.
101965         (num_processors): Call it.
101967 2010-01-11  Jim Meyering  <meyering@redhat.com>
101969         utimecmp: avoid new warning from upcoming gcc-4.5.0
101970         * lib/utimecmp.c (BILLION): Define using #define rather than an
101971         anonymous enum, to placate upcoming gcc-4.5.0's -Wenum-compare.
101973 2010-01-11  Eric Blake  <ebb9@byu.net>
101975         math: add portability warnings for classification macros
101976         * modules/math (Depends-on): Add warn-on-use.
101977         (Makefile.am): Provide new substitutions.
101978         * m4/math_h.m4 (gl_MATH_H): Require inline.
101979         * lib/math.in.h (_GL_WARN_REAL_FLOATING_DECL)
101980         (_GL_WARN_REAL_FLOATING_IMPL): New helper macros.
101981         (isfinite, isinf, isnan, signbit) [GNULIB_POSIXCHECK]: Use them to
101982         implement warnings.
101984         unistd: warn on use of environ without module
101985         * modules/unistd (Depends-on): Add warn-on-use.
101986         (Makefile.am): Provide new substitutions.
101987         * m4/unistd_h.m4 (gl_UNISTD_H): Check for inline and environ.
101988         * lib/unistd.in.h (environ): Wrap with a warning helper function.
101990         stdio: warn on suspicious uses
101991         * modules/stdio (Depends-on): Add warn-on-use.
101992         (Makefile.am): Provide new substitutions.
101993         * m4/stdio_h.m4 (gl_STDIO_H): Check for inline, ftello, and
101994         fseeko.
101995         * lib/stdio.in.h (gets): Always warn on use.
101996         (fseek, ftell): Adjust when warnings are issued, and honor
101997         _GL_NO_LARGE_FILES as a way to silence the warning.
101998         * tests/test-fpurge.c [!GNULIB_FSEEK]: Use new means to squelch
101999         any warning about large file offsets.
102000         * tests/test-freadable.c [!GNULIB_FSEEK]: Likewise.
102001         * tests/test-freading.c [!GNULIB_FSEEK]: Likewise.
102002         * tests/test-fseeko.c [!GNULIB_FSEEK]: Likewise.
102003         * tests/test-ftell.c [!GNULIB_FSEEK]: Likewise.
102004         * tests/test-ftello.c [!GNULIB_FSEEK]: Likewise.
102005         * tests/test-fwritable.c [!GNULIB_FSEEK]: Likewise.
102006         * tests/test-fwriting.c [!GNULIB_FSEEK]: Likewise.
102007         * tests/test-getopt.c [!GNULIB_FTELL]: Likewise.
102009         warn-on-use: new module
102010         * modules/warn-on-use: New file.
102011         * build-aux/warn-on-use.h: Likewise.
102012         * m4/warn-on-use.m4: Likewise.
102013         * MODULES.html.sh (Support for building): Mention it.
102015 2010-01-10  Bruno Haible  <bruno@clisp.org>
102017         Tests for module 'unistr/u32-strdup'.
102018         * modules/unistr/u32-strdup-tests: New file.
102019         * tests/unistr/test-u32-strdup.c: New file.
102021         Tests for module 'unistr/u16-strdup'.
102022         * modules/unistr/u16-strdup-tests: New file.
102023         * tests/unistr/test-u16-strdup.c: New file.
102025         Tests for module 'unistr/u8-strdup'.
102026         * modules/unistr/u8-strdup-tests: New file.
102027         * tests/unistr/test-u8-strdup.c: New file.
102028         * tests/unistr/test-strdup.h: New file.
102030         Tests for module 'unistr/u32-strncmp'.
102031         * modules/unistr/u32-strncmp-tests: New file.
102032         * tests/unistr/test-u32-strncmp.c: New file.
102034         Tests for module 'unistr/u16-strncmp'.
102035         * modules/unistr/u16-strncmp-tests: New file.
102036         * tests/unistr/test-u16-strncmp.c: New file.
102038         Tests for module 'unistr/u8-strncmp'.
102039         * modules/unistr/u8-strncmp-tests: New file.
102040         * tests/unistr/test-u8-strncmp.c: New file.
102041         * tests/unistr/test-strncmp.h: New file.
102043         Tests for module 'unistr/u32-strcoll'.
102044         * modules/unistr/u32-strcoll-tests: New file.
102045         * tests/unistr/test-u32-strcoll.c: New file.
102047         Tests for module 'unistr/u16-strcoll'.
102048         * modules/unistr/u16-strcoll-tests: New file.
102049         * tests/unistr/test-u16-strcoll.c: New file.
102051         Tests for module 'unistr/u8-strcoll'.
102052         * modules/unistr/u8-strcoll-tests: New file.
102053         * tests/unistr/test-u8-strcoll.c: New file.
102055         Tests for module 'unistr/u32-strcmp'.
102056         * modules/unistr/u32-strcmp-tests: New file.
102057         * tests/unistr/test-u32-strcmp.c: New file.
102058         * tests/unistr/test-u32-strcmp.h: New file.
102060         Tests for module 'unistr/u16-strcmp'.
102061         * modules/unistr/u16-strcmp-tests: New file.
102062         * tests/unistr/test-u16-strcmp.c: New file.
102063         * tests/unistr/test-u16-strcmp.h: New file.
102065         Tests for module 'unistr/u8-strcmp'.
102066         * modules/unistr/u8-strcmp-tests: New file.
102067         * tests/unistr/test-u8-strcmp.c: New file.
102068         * tests/unistr/test-u8-strcmp.h: New file.
102069         * tests/unistr/test-strcmp.h: New file.
102071         Tests for module 'unistr/u32-strncat'.
102072         * modules/unistr/u32-strncat-tests: New file.
102073         * tests/unistr/test-u32-strncat.c: New file.
102075         Tests for module 'unistr/u16-strncat'.
102076         * modules/unistr/u16-strncat-tests: New file.
102077         * tests/unistr/test-u16-strncat.c: New file.
102079         Tests for module 'unistr/u8-strncat'.
102080         * modules/unistr/u8-strncat-tests: New file.
102081         * tests/unistr/test-u8-strncat.c: New file.
102082         * tests/unistr/test-strncat.h: New file.
102084         Tests for module 'unistr/u32-strcat'.
102085         * modules/unistr/u32-strcat-tests: New file.
102086         * tests/unistr/test-u32-strcat.c: New file.
102088         Tests for module 'unistr/u16-strcat'.
102089         * modules/unistr/u16-strcat-tests: New file.
102090         * tests/unistr/test-u16-strcat.c: New file.
102092         Tests for module 'unistr/u8-strcat'.
102093         * modules/unistr/u8-strcat-tests: New file.
102094         * tests/unistr/test-u8-strcat.c: New file.
102095         * tests/unistr/test-strcat.h: New file.
102097         Tests for module 'unistr/u32-stpncpy'.
102098         * modules/unistr/u32-stpncpy-tests: New file.
102099         * tests/unistr/test-u32-stpncpy.c: New file.
102101         Tests for module 'unistr/u16-stpncpy'.
102102         * modules/unistr/u16-stpncpy-tests: New file.
102103         * tests/unistr/test-u16-stpncpy.c: New file.
102105         Tests for module 'unistr/u8-stpncpy'.
102106         * modules/unistr/u8-stpncpy-tests: New file.
102107         * tests/unistr/test-u8-stpncpy.c: New file.
102108         * tests/unistr/test-stpncpy.h: New file.
102110         Tests for module 'unistr/u32-strncpy'.
102111         * modules/unistr/u32-strncpy-tests: New file.
102112         * tests/unistr/test-u32-strncpy.c: New file.
102114         Tests for module 'unistr/u16-strncpy'.
102115         * modules/unistr/u16-strncpy-tests: New file.
102116         * tests/unistr/test-u16-strncpy.c: New file.
102118         Tests for module 'unistr/u8-strncpy'.
102119         * modules/unistr/u8-strncpy-tests: New file.
102120         * tests/unistr/test-u8-strncpy.c: New file.
102121         * tests/unistr/test-strncpy.h: New file.
102123         Tests for module 'unistr/u32-stpcpy'.
102124         * modules/unistr/u32-stpcpy-tests: New file.
102125         * tests/unistr/test-u32-stpcpy.c: New file.
102127         Tests for module 'unistr/u16-stpcpy'.
102128         * modules/unistr/u16-stpcpy-tests: New file.
102129         * tests/unistr/test-u16-stpcpy.c: New file.
102131         Tests for module 'unistr/u8-stpcpy'.
102132         * modules/unistr/u8-stpcpy-tests: New file.
102133         * tests/unistr/test-u8-stpcpy.c: New file.
102134         * tests/unistr/test-stpcpy.h: New file.
102136         Tests for module 'unistr/u32-strcpy'.
102137         * modules/unistr/u32-strcpy-tests: New file.
102138         * tests/unistr/test-u32-strcpy.c: New file.
102140         Tests for module 'unistr/u16-strcpy'.
102141         * modules/unistr/u16-strcpy-tests: New file.
102142         * tests/unistr/test-u16-strcpy.c: New file.
102144         Tests for module 'unistr/u8-strcpy'.
102145         * modules/unistr/u8-strcpy-tests: New file.
102146         * tests/unistr/test-u8-strcpy.c: New file.
102147         * tests/unistr/test-strcpy.h: New file.
102149         Tests for module 'unistr/u32-strnlen'.
102150         * modules/unistr/u32-strnlen-tests: New file.
102151         * tests/unistr/test-u32-strnlen.c: New file.
102153         Tests for module 'unistr/u16-strnlen'.
102154         * modules/unistr/u16-strnlen-tests: New file.
102155         * tests/unistr/test-u16-strnlen.c: New file.
102157         Tests for module 'unistr/u8-strnlen'.
102158         * modules/unistr/u8-strnlen-tests: New file.
102159         * tests/unistr/test-u8-strnlen.c: New file.
102160         * tests/unistr/test-strnlen.h: New file.
102162         Tests for module 'unistr/u32-strlen'.
102163         * modules/unistr/u32-strlen-tests: New file.
102164         * tests/unistr/test-u32-strlen.c: New file.
102166         Tests for module 'unistr/u16-strlen'.
102167         * modules/unistr/u16-strlen-tests: New file.
102168         * tests/unistr/test-u16-strlen.c: New file.
102170         Tests for module 'unistr/u8-strlen'.
102171         * modules/unistr/u8-strlen-tests: New file.
102172         * tests/unistr/test-u8-strlen.c: New file.
102174         Tests for module 'unistr/u32-prev'.
102175         * modules/unistr/u32-prev-tests: New file.
102176         * tests/unistr/test-u32-prev.c: New file.
102178         Tests for module 'unistr/u16-prev'.
102179         * modules/unistr/u16-prev-tests: New file.
102180         * tests/unistr/test-u16-prev.c: New file.
102182         Tests for module 'unistr/u8-prev'.
102183         * modules/unistr/u8-prev-tests: New file.
102184         * tests/unistr/test-u8-prev.c: New file.
102186         Tests for module 'unistr/u32-next'.
102187         * modules/unistr/u32-next-tests: New file.
102188         * tests/unistr/test-u32-next.c: New file.
102190         Tests for module 'unistr/u16-next'.
102191         * modules/unistr/u16-next-tests: New file.
102192         * tests/unistr/test-u16-next.c: New file.
102194         Tests for module 'unistr/u8-next'.
102195         * modules/unistr/u8-next-tests: New file.
102196         * tests/unistr/test-u8-next.c: New file.
102198         Tests for module 'unistr/u32-strmbtouc'.
102199         * modules/unistr/u32-strmbtouc-tests: New file.
102200         * tests/unistr/test-u32-strmbtouc.c: New file.
102202         Tests for module 'unistr/u16-strmbtouc'.
102203         * modules/unistr/u16-strmbtouc-tests: New file.
102204         * tests/unistr/test-u16-strmbtouc.c: New file.
102206         Tests for module 'unistr/u8-strmbtouc'.
102207         * modules/unistr/u8-strmbtouc-tests: New file.
102208         * tests/unistr/test-u8-strmbtouc.c: New file.
102210         Tests for module 'unistr/u32-strmblen'.
102211         * modules/unistr/u32-strmblen-tests: New file.
102212         * tests/unistr/test-u32-strmblen.c: New file.
102214         Tests for module 'unistr/u16-strmblen'.
102215         * modules/unistr/u16-strmblen-tests: New file.
102216         * tests/unistr/test-u16-strmblen.c: New file.
102218         Tests for module 'unistr/u8-strmblen'.
102219         * modules/unistr/u8-strmblen-tests: New file.
102220         * tests/unistr/test-u8-strmblen.c: New file.
102222         Tests for module 'unistr/u32-cpy-alloc'.
102223         * modules/unistr/u32-cpy-alloc-tests: New file.
102224         * tests/unistr/test-u32-cpy-alloc.c: New file.
102226         Tests for module 'unistr/u16-cpy-alloc'.
102227         * modules/unistr/u16-cpy-alloc-tests: New file.
102228         * tests/unistr/test-u16-cpy-alloc.c: New file.
102230         Tests for module 'unistr/u8-cpy-alloc'.
102231         * modules/unistr/u8-cpy-alloc-tests: New file.
102232         * tests/unistr/test-u8-cpy-alloc.c: New file.
102233         * tests/unistr/test-cpy-alloc.h: New file.
102235         Tests for module 'unistr/u32-mbsnlen'.
102236         * modules/unistr/u32-mbsnlen-tests: New file.
102237         * tests/unistr/test-u32-mbsnlen.c: New file.
102239         Tests for module 'unistr/u16-mbsnlen'.
102240         * modules/unistr/u16-mbsnlen-tests: New file.
102241         * tests/unistr/test-u16-mbsnlen.c: New file.
102243         Tests for module 'unistr/u8-mbsnlen'.
102244         * modules/unistr/u8-mbsnlen-tests: New file.
102245         * tests/unistr/test-u8-mbsnlen.c: New file.
102247         Tests for module 'unistr/u32-chr'.
102248         * modules/unistr/u32-chr-tests: New file.
102249         * tests/unistr/test-u32-chr.c: New file.
102251         Tests for module 'unistr/u16-chr'.
102252         * modules/unistr/u16-chr-tests: New file.
102253         * tests/unistr/test-u16-chr.c: New file.
102255         Tests for module 'unistr/u8-chr'.
102256         * modules/unistr/u8-chr-tests: New file.
102257         * tests/unistr/test-u8-chr.c: New file.
102258         * tests/unistr/test-chr.h: New file, based on tests/test-memchr.c.
102260         Tests for module 'unistr/u32-cmp2'.
102261         * modules/unistr/u32-cmp2-tests: New file.
102262         * tests/unistr/test-u32-cmp2.c: New file.
102264         Tests for module 'unistr/u16-cmp2'.
102265         * modules/unistr/u16-cmp2-tests: New file.
102266         * tests/unistr/test-u16-cmp2.c: New file.
102268         Tests for module 'unistr/u8-cmp2'.
102269         * modules/unistr/u8-cmp2-tests: New file.
102270         * tests/unistr/test-u8-cmp2.c: New file.
102271         * tests/unistr/test-cmp2.h: New file, based on tests/unistr/test-cmp.h.
102273         Tests for module 'unistr/u32-cmp'.
102274         * modules/unistr/u32-cmp-tests: New file.
102275         * tests/unistr/test-u32-cmp.c: New file.
102277         Tests for module 'unistr/u16-cmp'.
102278         * modules/unistr/u16-cmp-tests: New file.
102279         * tests/unistr/test-u16-cmp.c: New file.
102281         Tests for module 'unistr/u8-cmp'.
102282         * modules/unistr/u8-cmp-tests: New file.
102283         * tests/unistr/test-u8-cmp.c: New file.
102284         * tests/unistr/test-cmp.h: New file, based on tests/test-memcmp.c.
102286         Tests for module 'unistr/u32-set'.
102287         * modules/unistr/u32-set-tests: New file.
102288         * tests/unistr/test-u32-set.c: New file.
102290         Tests for module 'unistr/u16-set'.
102291         * modules/unistr/u16-set-tests: New file.
102292         * tests/unistr/test-u16-set.c: New file.
102294         Tests for module 'unistr/u8-set'.
102295         * modules/unistr/u8-set-tests: New file.
102296         * tests/unistr/test-u8-set.c: New file.
102297         * tests/unistr/test-set.h: New file.
102299         Tests for module 'unistr/u32-move'.
102300         * modules/unistr/u32-move-tests: New file.
102301         * tests/unistr/test-u32-move.c: New file.
102303         Tests for module 'unistr/u16-move'.
102304         * modules/unistr/u16-move-tests: New file.
102305         * tests/unistr/test-u16-move.c: New file.
102307         Tests for module 'unistr/u8-move'.
102308         * modules/unistr/u8-move-tests: New file.
102309         * tests/unistr/test-u8-move.c: New file.
102310         * tests/unistr/test-move.h: New file.
102312         Tests for module 'unistr/u32-cpy'.
102313         * modules/unistr/u32-cpy-tests: New file.
102314         * tests/unistr/test-u32-cpy.c: New file.
102316         Tests for module 'unistr/u16-cpy'.
102317         * modules/unistr/u16-cpy-tests: New file.
102318         * tests/unistr/test-u16-cpy.c: New file.
102320         Tests for module 'unistr/u8-cpy'.
102321         * modules/unistr/u8-cpy-tests: New file.
102322         * tests/unistr/test-u8-cpy.c: New file.
102323         * tests/unistr/test-cpy.h: New file.
102325 2010-01-09  Bruno Haible  <bruno@clisp.org>
102327         Tests for module 'unistr/u32-uctomb'.
102328         * modules/unistr/u32-uctomb-tests: New file.
102329         * tests/unistr/test-u32-uctomb.c: New file.
102331         Tests for module 'unistr/u16-uctomb'.
102332         * modules/unistr/u16-uctomb-tests: New file.
102333         * tests/unistr/test-u16-uctomb.c: New file.
102335         Tests for module 'unistr/u8-uctomb'.
102336         * modules/unistr/u8-uctomb-tests: New file.
102337         * tests/unistr/test-u8-uctomb.c: New file.
102339         Tests for module 'unistr/u32-mbtoucr'.
102340         * modules/unistr/u32-mbtoucr-tests: New file.
102341         * tests/unistr/test-u32-mbtoucr.c: New file.
102343         Tests for module 'unistr/u16-mbtoucr'.
102344         * modules/unistr/u16-mbtoucr-tests: New file.
102345         * tests/unistr/test-u16-mbtoucr.c: New file.
102347         Tests for module 'unistr/u8-mbtoucr'.
102348         * modules/unistr/u8-mbtoucr-tests: New file.
102349         * tests/unistr/test-u8-mbtoucr.c: New file.
102351         Tests for module 'unistr/u32-mbtouc'.
102352         * modules/unistr/u32-mbtouc-tests: New file.
102353         * tests/unistr/test-u32-mbtouc.c: New file.
102355         Tests for module 'unistr/u16-mbtouc'.
102356         * modules/unistr/u16-mbtouc-tests: New file.
102357         * tests/unistr/test-u16-mbtouc.c: New file.
102359         Tests for module 'unistr/u8-mbtouc'.
102360         * modules/unistr/u8-mbtouc-tests: New file.
102361         * tests/unistr/test-u8-mbtouc.c: New file.
102363         Tests for module 'unistr/u32-mbtouc-unsafe'.
102364         * modules/unistr/u32-mbtouc-unsafe-tests: New file.
102365         * tests/unistr/test-u32-mbtouc-unsafe.c: New file.
102366         * tests/unistr/test-u32-mbtouc.h: New file.
102368         Tests for module 'unistr/u16-mbtouc-unsafe'.
102369         * modules/unistr/u16-mbtouc-unsafe-tests: New file.
102370         * tests/unistr/test-u16-mbtouc-unsafe.c: New file.
102371         * tests/unistr/test-u16-mbtouc.h: New file.
102373         Tests for module 'unistr/u8-mbtouc-unsafe'.
102374         * modules/unistr/u8-mbtouc-unsafe-tests: New file.
102375         * tests/unistr/test-u8-mbtouc-unsafe.c: New file.
102376         * tests/unistr/test-u8-mbtouc.h: New file.
102378         Tests for module 'unistr/u32-mblen'.
102379         * modules/unistr/u32-mblen-tests: New file.
102380         * tests/unistr/test-u32-mblen.c: New file.
102382         Tests for module 'unistr/u16-mblen'.
102383         * modules/unistr/u16-mblen-tests: New file.
102384         * tests/unistr/test-u16-mblen.c: New file.
102386         Tests for module 'unistr/u8-mblen'.
102387         * modules/unistr/u8-mblen-tests: New file.
102388         * tests/unistr/test-u8-mblen.c: New file.
102390         Tests for module 'unistr/u32-to-u16'.
102391         * modules/unistr/u32-to-u16-tests: New file.
102392         * tests/unistr/test-u32-to-u16.c: New file.
102394         Tests for module 'unistr/u32-to-u8'.
102395         * modules/unistr/u32-to-u8-tests: New file.
102396         * tests/unistr/test-u32-to-u8.c: New file.
102398         Tests for module 'unistr/u16-to-u32'.
102399         * modules/unistr/u16-to-u32-tests: New file.
102400         * tests/unistr/test-u16-to-u32.c: New file.
102402         Tests for module 'unistr/u16-to-u8'.
102403         * modules/unistr/u16-to-u8-tests: New file.
102404         * tests/unistr/test-u16-to-u8.c: New file.
102406         Tests for module 'unistr/u8-to-u32'.
102407         * modules/unistr/u8-to-u32-tests: New file.
102408         * tests/unistr/test-u8-to-u32.c: New file.
102410         Tests for module 'unistr/u8-to-u16'.
102411         * modules/unistr/u8-to-u16-tests: New file.
102412         * tests/unistr/test-u8-to-u16.c: New file.
102414         Tests for module 'unistr/u32-check'.
102415         * modules/unistr/u32-check-tests: New file.
102416         * tests/unistr/test-u32-check.c: New file.
102418         Tests for module 'unistr/u16-check'.
102419         * modules/unistr/u16-check-tests: New file.
102420         * tests/unistr/test-u16-check.c: New file.
102422         Tests for module 'unistr/u8-check'.
102423         * modules/unistr/u8-check-tests: New file.
102424         * tests/unistr/test-u8-check.c: New file.
102426         * tests/unictype/test-categ_byname.c: Include <stdbool.h>.
102427         (category_equals): New function.
102428         (main): Add more tests.
102429         * modules/unictype/category-byname-tests (Depends-on): Add stdbool.
102431         * tests/unictype/test-bidi_byname.c (main): Add more tests.
102433 2010-01-10  Bruno Haible  <bruno@clisp.org>
102435         unistr/u*-strcoll: Try harder to distinguish different strings.
102436         * lib/unistr/u-strcoll.h (FUNC): When sl1 and sl2 are the same,
102437         compare s1 and s2 to see if they are different.
102439 2010-01-10  Bruno Haible  <bruno@clisp.org>
102441         unistr/u*-stpncpy: Fix the return value.
102442         * lib/unistr.h (u8_stpncpy, u16_stpncpy, u32_stpncpy): Make the
102443         description of the return value consistent with stpncpy in glibc.
102444         * lib/unistr/u-stpncpy.h (FUNC): Return the pointer past the last
102445         written non-NUL unit.
102447 2010-01-10  Bruno Haible  <bruno@clisp.org>
102449         unistr/u*-next: Add missing dependencies.
102450         * modules/unistr/u8-next (Depends-on): Add unistr/u8-strmbtouc.
102451         * modules/unistr/u16-next (Depends-on): Add unistr/u16-strmbtouc.
102452         * modules/unistr/u32-next (Depends-on): Add unistr/u32-strmbtouc.
102454 2010-01-10  Bruno Haible  <bruno@clisp.org>
102456         unistr/u8-mbsnlen: Fix return value for incomplete character.
102457         * lib/unistr/u8-mbsnlen.c (u8_mbsnlen): Use u8_mbtoucr instead of
102458         u8_mblen.
102459         * modules/unistr/u8-mbsnlen (Depends-on): Add unistr/u8-mbtoucr.
102460         Remove unistr/u8-mblen.
102461         * lib/unistr/u16-mbsnlen.c (u16_mbsnlen): Use u16_mbtoucr instead of
102462         u16_mblen.
102463         * modules/unistr/u16-mbsnlen (Depends-on): Add unistr/u16-mbtoucr.
102464         Remove unistr/u16-mblen.
102466 2010-01-10  Bruno Haible  <bruno@clisp.org>
102468         wchar: Fix compilation error when <wchar.h> is used from coreutils.
102469         * lib/wchar.in.h: Treat __need_wint_t like __need_mbstate_t.
102470         Reported by Brian Gough <bjg@gnu.org> and
102471         Chris Clayton <chris2553@googlemail.com> via
102472         Mike Frysinger <vapier@gentoo.org> and Jim Meyering <jim@meyering.net>.
102474 2010-01-09  Bruno Haible  <bruno@clisp.org>
102476         unistr/u16-to-u32: Reject invalid input.
102477         * lib/unistr/u16-to-u32.c (u16_to_u32): Call u16_mbtoucr instead of
102478         u16_mbtouc.
102479         * modules/unistr/u16-to-u32 (Depends-on): Add unistr/u16-mbtoucr.
102480         Remove unistr/u16-mbtouc.
102482         unistr/u16-to-u8: Reject invalid input.
102483         * lib/unistr/u16-to-u8.c (u16_to_u8): Call u16_mbtoucr instead of
102484         u16_mbtouc.
102485         * modules/unistr/u16-to-u8 (Depends-on): Add unistr/u16-mbtoucr.
102486         Remove unistr/u16-mbtouc.
102488         unistr/u8-to-u32: Reject invalid input.
102489         * lib/unistr/u8-to-u32.c (u8_to_u32): Call u8_mbtoucr instead of
102490         u8_mbtouc.
102491         * modules/unistr/u8-to-u32 (Depends-on): Add unistr/u8-mbtoucr.
102492         Remove unistr/u8-mbtouc.
102494         unistr/u8-to-u16: Reject invalid input.
102495         * lib/unistr/u8-to-u16.c (u8_to_u16): Call u8_mbtoucr instead of
102496         u8_mbtouc.
102497         * modules/unistr/u8-to-u16 (Depends-on): Add unistr/u8-mbtoucr.
102498         Remove unistr/u8-mbtouc.
102500 2010-01-09  Bruno Haible  <bruno@clisp.org>
102502         Tests for module 'getlogin'.
102503         * modules/getlogin-tests: New file.
102504         * tests/test-getlogin.c: New file.
102506         New module 'getlogin'.
102507         * lib/unistd.in.h (getlogin): New declaration.
102508         * lib/getlogin.c: New file.
102509         * m4/getlogin.m4: New file.
102510         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_GETLOGIN,
102511         HAVE_GETLOGIN.
102512         * modules/unistd (Makefile.am): Substitute GNULIB_GETLOGIN,
102513         HAVE_GETLOGIN.
102514         * modules/getlogin: New file.
102515         * doc/posix-functions/getlogin.texi: Mention the new module.
102516         Reported by John W. Eaton <jwe@gnu.org>.
102518 2010-01-09  Bruno Haible  <bruno@clisp.org>
102520         getlogin_r: Support for native Windows.
102521         * lib/getlogin_r.c: Include <windows.h>
102522         (getlogin_r): Implement for native Windows.
102523         * tests/test-getlogin_r.c (main): Also test with a huge buffer.
102524         Reported by Tatsuro MATSUOKA <tmacchant5@yahoo.co.jp>
102525         via John W. Eaton <jwe@gnu.org>.
102527 2010-01-09  Bruno Haible  <bruno@clisp.org>
102529         getlogin_r: Small fixes.
102530         * lib/getlogin_r.c (getlogin_r): Don't set errno if the function
102531         succeeds.
102532         * m4/getlogin_r.m4 (gl_GETLOGIN_R): Require gl_USE_SYSTEM_EXTENSIONS
102533         before testing whether getlogin_r is declared. No need to set
102534         HAVE_DECL_GETLOGIN_R to 1.
102535         (gl_PREREQ_GETLOGIN_R): Don't check for the getlogin_r declaration.
102537 2010-01-09  Bruno Haible  <bruno@clisp.org>
102539         * lib/unistd.in.h (getlogin_r): Add comment.
102541 2010-01-09  Bruno Haible  <bruno@clisp.org>
102543         Tests for module 'getlogin_r'.
102544         * modules/getlogin_r-tests: New file.
102545         * tests/test-getlogin_r.c: New file.
102547 2010-01-09  Jim Meyering  <meyering@redhat.com>
102549         maint.mk: extend proper_name_utf8-vs-LIBICONV-checking rule
102550         * top/maint.mk (sc_proper_name_utf8_requires_ICONV): Adapt to work
102551         also when $(LIBICONV) is part of LDADD, rather than ${prog}_LDADD.
102553 2010-01-08  Simon Josefsson  <simon@josefsson.org>
102555         * lib/dup2.c (rpl_dup2): Improve comment.
102557 2010-01-08  Eric Blake  <ebb9@byu.net>
102559         maint.mk: allow packages to add makefile @@ exceptions
102560         * top/maint.mk (_makefile_at_at_check_exceptions): New hook.
102561         (sc_makefile_check): Rename...
102562         (sc_makefile_at_at_check): ...to this, and use hook.
102564         dup2: work around mingw bug
102565         * lib/dup2.c (rpl_dup2): Sanitize return value on mingw.
102566         Reported by Simon Josefsson.
102568 2010-01-07  John W. Eaton  <jwe@octave.org>  (tiny change)
102570         glob: Fix C++ compilation.
102571         * lib/glob.in.h [__cplusplus]: Define __BEGIN_DECLS and __END_DECLS for
102572         C++.
102574 2010-01-07  Bruno Haible  <bruno@clisp.org>
102576         Fix indentation of wctype.in.h, broken since 2007-01-06.
102577         * lib/wctype.in.h: Fix indentation of preprocessor directives.
102579 2010-01-07  Bruno Haible  <bruno@clisp.org>
102581         mbslen: Avoid collision with system function.
102582         * lib/string.in.h [MirBSD]: Include <wchar.h>.
102583         (mbslen): Undefine first. Alias mbslen to rpl_mbslen.
102584         * m4/mbslen.m4: New file.
102585         * modules/mbslen (Files): Add it.
102586         (configure.ac): Invoke gl_MBSLEN.
102587         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize HAVE_MBSLEN.
102588         * modules/string (Makefile.am): Substitute HAVE_MBSLEN.
102589         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>
102590         via Ian Beckwith <ianb@erislabs.net>.
102592 2010-01-07  Bruno Haible  <bruno@clisp.org>
102594         dirent: Document the last fix.
102595         * doc/posix-headers/dirent.texi: Document the bug of missing 'ino_t'.
102597 2010-01-07  Bruno Haible  <bruno@clisp.org>
102599         stdio: Ensure <stdio.h> defines off_t, ssize_t, va_list.
102600         * lib/stdio.in.h: Include <sys/types.h> unconditionally.
102601         * tests/test-stdio.c: Verify that fpos_t, off_t, size_t, ssize_t,
102602         va_list are defined.
102603         * doc/posix-headers/stdio.texi: Document the bug of missing types.
102604         Reported by Eric Blake.
102606 2010-01-07  Bruno Haible  <bruno@clisp.org>
102608         xlist, xoset: Fix missing dependency bug, introduced on 2009-12-13.
102609         * modules/xlist (Depends-on): Add 'list',
102610         * modules/xoset (Depends-on): Add 'oset'.
102611         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
102613 2010-01-07  Bruno Haible  <bruno@clisp.org>
102615         * doc/posix-functions/strcasecmp.texi: Clarify the platforms.
102616         * doc/posix-functions/strncasecmp.texi: Likewise.
102618 2010-01-07  Bruno Haible  <bruno@clisp.org>
102620         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Simplify logic.
102622 2010-01-07  John W. Eaton  <jwe@octave.org>
102624         wctype: allow C++ use
102625         * lib/wctype.in.h: Add extern "C" block for C++.
102627 2010-01-06  Eric Blake  <ebb9@byu.net>
102629         maint.mk: detect incorrect GFDL usage
102630         * top/maint.mk (_GFDL_regexp, sc_GFDL_version): New rule.
102632 2010-01-06  Jim Meyering  <meyering@redhat.com>
102633         and Eric Blake  <ebb9@byu.net>
102635         maint.mk: ignore multi-line copyright in NEWS
102636         * top/maint.mk (NEWS_hash): Add immunity to multi-line copyright.
102638 2010-01-06  Eric Blake  <ebb9@byu.net>
102640         select: add missing dependency
102641         * modules/select-tests (Depends-on): Move sockets dependency...
102642         * modules/select (Depends-on): ...here.
102643         Reported by Ian Beckwith.
102645         doc: regenerate INSTALL
102646         * doc/INSTALL: Reflect recent autoconf update.
102647         * doc/INSTALL.ISO: Likewise.
102648         * doc/INSTALL.UTF-8: Likewise.
102650         pread: fix compilation on glibc
102651         * m4/pread.m4 (gl_FUNC_PREAD): Request all interfaces.
102652         Reported by Ralf Wildenhues.
102654         dirent: fix test failure
102655         * lib/dirent.in.h (includes): Guarantee ino_t.
102656         Reported by Ralf Wildenhues.
102658 2010-01-06  Petr Salinger  <Petr.Salinger@seznam.cz>  (tiny change)
102660         linkat, renameat: avoid bad free
102661         * lib/at-func2.c (at_func2): Fix typo.
102662         Reported via Ian Beckwith, from http://bugs.debian.org/561117.
102664 2010-01-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
102666         cleanup after gl_FUNC_READLINK, for gl_FUNC_SYMLINK test
102667         * m4/readlink.m4 (gl_FUNC_READLINK): Remove conftest.lnk2,
102668         to avoid failure of symlink test later.
102670 2010-01-06  Eric Blake  <ebb9@byu.net>
102672         stdio, unistd: guarantee ssize_t
102673         * lib/unistd.in.h (includes): Ensure that types required by POSIX
102674         2008 are exposed when needed.
102675         * lib/stdio.in.h (includes): Likewise.
102676         Reported by Ralf Wildenhues.
102678 2010-01-06  Paolo Bonzini  <bonzini@gnu.org>
102680         nl_langinfo: do not call AC_CHECK_FUNC_ONCE inside if.
102681         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Do not call
102682         AC_CHECK_FUNC_ONCE inside if, do not adjust ac_cv_func_nl_langinfo.
102684 2010-01-06  Jim Meyering  <meyering@redhat.com>
102686         readtokens: this module *does* require xalloc.h
102687         It uses only functions that were omitted by the old syntax-check rule.
102688         * lib/readtokens.c: Include "xalloc.h" once again.
102689         * modules/readtokens (Depends-on): Add xalloc.
102690         This reverts part of 0e0f8f12ec241c0f1c1f21f960bb5cf908a0fa3c.
102692 2010-01-05  Eric Blake  <ebb9@byu.net>
102694         maint: support 'make announcement' from a VPATH build
102695         * top/maint.mk (announcement): Look for correct NEWS file.
102697 2010-01-05  Aurelien Jarno  <aurelien@aurel32.net>  (tiny change)
102699         utimens (fdutimens): ignore a negative FD, per contract
102700         * lib/utimens.c (fdutimens) [HAVE_FUTIMENS]: Call futimens only
102701         when we have a valid file descriptor.  Otherwise, using a brand
102702         new glibc (with just-patched futimens that now fails with EBADF)
102703         would cause this function to fail with ENOSYS.
102704         Reported by Guillaume Ayoub in http://bugs.debian.org/563726.
102705         See also http://bugzilla.redhat.com/552320.
102707 2010-01-05  Eric Blake  <ebb9@byu.net>
102709         strcase: document what it provides
102710         * doc/posix-functions/strcasecmp.texi (strcasecmp): Mention the
102711         gnulib module.
102712         * doc/posix-functions/strncasecmp.texi (strncasecmp): Likewise.
102713         Reported by Dilyan Palauzov <Dilyan.Palauzov@aegee.org>.
102715 2010-01-05  Jim Meyering  <meyering@redhat.com>
102717         maint: remove useless inclusions of "xalloc.h"
102718         * lib/getloadavg.c: Remove useless inclusion of "xalloc.h".
102719         * lib/readtokens.c: Likewise.
102720         * lib/same.c: Likewise.
102721         * modules/getloadavg (Depends-on): Remove xalloc.
102722         * modules/readtokens: Likewise.
102723         * modules/same: Likewise.
102725         maint.mk: include 4 more function names in alloca.h-checking regexp
102726         * top/maint.mk (sc_prohibit_xalloc_without_use): Use more complete
102727         regexp.  Before, we would give a false-positive (saying alloca.h
102728         is included unnecessarily) when the only uses involved omitted symbols.
102730         xalloc.h: use consistent formatting
102731         * lib/xalloc.h: Move declarations to start in the first column.
102733 2010-01-05  Eric Blake  <ebb9@byu.net>
102735         mkdir: avoid xalloc
102736         * lib/mkdir.c (includes): Drop unused header.
102737         Reported by John W. Eaton.
102739 2010-01-04  Jim Meyering  <meyering@redhat.com>
102741         nl_langinfo: avoid configure-time syntax error
102742         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): When we've already tested
102743         for nl_langinfo.h, AC_CHECK_FUNCS_ONCE([nl_langinfo]) expands to
102744         the empty string.  Don't let that provoke a shell syntax error.
102746         regcomp, regexec, fnmatch: avoid array bounds read error
102747         * lib/regcomp.c (build_equiv_class): From glibc:
102748         Use only the low 24 bits of a findidx return value as an index
102749         into the weights array.  Patch by Ulrich Drepper:
102750         http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=b7d1c5fa30
102751         * lib/regexec.c (check_node_accept_bytes): Likewise.
102752         * lib/fnmatch_loop.c (FCT): Likewise.
102754         regcomp: skip collseq lookup when there are no rules
102755         * lib/regcomp.c (lookup_collation_sequence_value): From glibc:
102756         http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a532a41df58
102758         regcomp: recognize ill-formed { } expressions
102759         * lib/regcomp.c (parse_dup_op): From glibc:
102760         http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a87cd2894cb
102762         regcomp: fix typo in comment
102763         * lib/regcomp.c (duplicate_node_closure): Sync from glibc.
102764         s/satisfy/satisfies/.
102766         regcomp: sync from glibc: remove dead store
102767         * lib/regcomp.c (duplicate_node_closure): Remove useless
102768         search_duplicated_node call and dead store.
102770         regcomp: sync from glibc; always use nl_langinfo
102771         * lib/regcomp.c (init_dfa) [!LIBC]: Always use nl_langinfo (CODESET),
102772         now that gnulib provides it.  Recognize UTF8 as well as UTF-8.
102773         * modules/regex (Depends-on): Add nl_langinfo.
102775 2010-01-04  Eric Blake  <ebb9@byu.net>
102777         fdopendir: fix configure test
102778         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Check for existing file.
102780 2010-01-01  Bruno Haible  <bruno@clisp.org>
102782         wchar: Remove unused configure check.
102783         * m4/wchar.m4 (gl_WCHAR_H): Don't test whether <wchar.h> is standalone.
102785 2010-01-01  Eric Blake  <ebb9@byu.net>
102787         headers: make check of system header explicit
102788         * m4/netdb_h.m4 (gl_HEADER_NETDB): Don't exploit knowledge of
102789         gl_CHECK_NEXT_HEADER internals, but call AC_CHECK_HEADERS_ONCE
102790         ourselves.
102791         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
102792         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
102793         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Likewise.
102794         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise, for gt_INTTYPES_PRI
102795         internals.
102796         * m4/wchar.m4 (gl_WCHAR_H): Skip followup test if header is
102797         missing.
102798         Suggested by Bruno Haible.
102800 2010-01-01  Jim Meyering  <meyering@redhat.com>
102802         ChangeLog: tweak to eliminate unnecessary copyright line
102803         * ChangeLog: Remove a copyright line that was mistakenly updated
102804         by today's update-copyright run.  Reported by Eric Blake.
102806         test-update-copyright: don't let envvar setting cause test failure
102807         * tests/test-update-copyright.sh: Set UPDATE_COPYRIGHT_MAX_LINE_LENGTH.
102809 2010-01-01  Bruno Haible  <bruno@clisp.org>
102811         localename: Avoid gcc warning.
102812         * lib/localename.c (gl_locale_name_thread_unsafe): Don't define this
102813         function if it is not used.
102815 2010-01-01  Jim Meyering  <meyering@redhat.com>
102817         update nearly all FSF copyright year lists to include 2010
102818         Use the same procedure as for 2009, outlined in
102819         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
102821         version-etc: set COPYRIGHT_YEAR to 2010
102822         * lib/version-etc.c (COPYRIGHT_YEAR): Manually update the enum.
102824 2009-12-31  Eric Blake  <ebb9@byu.net>
102826         doc: correct availability of cygwin 1.5.x getopt
102827         * doc/posix-functions/optarg.texi (optarg): Cygwin supplies getopt
102828         variables.
102829         * doc/posix-functions/opterr.texi (opterr): Likewise.
102830         * doc/posix-functions/optind.texi (optind): Likewise.
102831         * doc/posix-functions/optopt.texi (optopt): Likewise.
102832         * doc/posix-functions/tzname.texi (tzname): Likewise.
102834         openat: update maintainer
102835         * modules/openat (Maintainer): Add myself.
102837         utimens: avoid shadowing warning
102838         * lib/utimens.c (fdutimens, lutimens): Consolidate separate stat
102839         buffers into one, to avoid shadowing, as well as avoiding a
102840         redundant stat.
102841         Reported by Jim Meyering.
102843         test-dup2: avoid compiler warning
102844         * tests/test-dup2.c (is_inheritable): Only define if used.
102846 2010-01-01  Bruno Haible  <bruno@clisp.org>
102848         vasnprintf: Avoid passing an 'rpl_mbstate_t *' to the system's wcrtomb.
102849         * lib/vasnprintf.c (VASNPRINTF): If GNULIB_defined_mbstate_t is
102850         defined, use wctomb instead of wcrtomb.
102852 2010-01-01  Bruno Haible  <bruno@clisp.org>
102854         iconv: Reject native Solaris iconv.
102855         * m4/iconv.m4 (AM_ICONV_LINK): Recognize native Solaris iconv() bug.
102856         * doc/posix-functions/iconv.texi: Document native Solaris iconv() bug.
102858 2009-12-31  Bruno Haible  <bruno@clisp.org>
102860         * tests/test-signal.c (main): Remove test of 'SIG'.
102862 2009-12-31  Bruno Haible  <bruno@clisp.org>
102864         spawn: Fix incomplete fix.
102865         * lib/spawn.in.h (posix_spawnattr_getflags, posix_spawnattr_setflags,
102866         posix_spawnattr_getpgroup, posix_spawnattr_setpgroup): Correct the link
102867         warnings for GNULIB_POSIXCHECK again.
102868         Reported by Eric Blake.
102870 2009-12-31  Bruno Haible  <bruno@clisp.org>
102872         Avoid namespace pollution on glibc systems.
102873         * lib/spawn.in.h: Don't include <sched.h>, <signal.h> on glibc systems.
102874         * lib/sys_times.in.h: Don't include <time.h> on glibc systems.
102875         * lib/wchar.in.h: Don't include <stddef.h>, <stdio.h>, <time.h> on
102876         glibc systems.
102878 2009-12-31  Bruno Haible  <bruno@clisp.org>
102880         * m4/wchar.m4 (gl_WCHAR_H): Remove gl_STDDEF_H invocation.
102881         (gl_REPLACE_WCHAR_H): Turn into a no-op.
102882         * m4/arpa_inet_h.m4 (gl_REPLACE_ARPA_INET_H): Likewise.
102883         * m4/dirent_h.m4 (gl_REPLACE_DIRENT_H): Likewise.
102884         * m4/locale_h.m4 (gl_REPLACE_LOCALE_H): Likewise.
102885         * m4/spawn_h.m4 (gl_REPLACE_SPAWN_H): Likewise.
102886         * m4/sys_ioctl_h.m4 (gl_REPLACE_SYS_IOCTL_H): Likewise.
102888 2009-12-31  Bruno Haible  <bruno@clisp.org>
102890         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Invoke
102891         gl_CHECK_NEXT_HEADERS before testing ac_cv_header_sys_select_h, not
102892         afterwards.
102894 2009-12-31  Bruno Haible  <bruno@clisp.org>
102896         * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H_DEFAULTS): Don't set
102897         SYS_UTSNAME_H.
102899 2009-12-31  Bruno Haible  <bruno@clisp.org>
102901         spawn: Fix misapplied patch.
102902         * lib/spawn.in.h (posix_spawnattr_getflags, posix_spawnattr_setflags,
102903         posix_spawnattr_getpgroup, posix_spawnattr_setpgroup): Correct the link
102904         warnings for GNULIB_POSIXCHECK.
102906 2009-12-31  Bruno Haible  <bruno@clisp.org>
102908         times: Update after sys_times changed.
102909         * m4/times.m4: New file, extracted from modules/times. Set HAVE_TIMES.
102910         * modules/times (Files): Add it.
102911         (configure.ac): Invoke gl_FUNC_TIMES.
102913 2009-12-31  Bruno Haible  <bruno@clisp.org>
102915         Use AC_C_INLINE where necessary.
102916         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Require AC_C_INLINE.
102917         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Likewise.
102918         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
102919         * m4/mbchar.m4 (gl_MBCHAR): Likewise.
102920         * m4/mbfile.m4 (gl_MBFILE): Likewise.
102921         * m4/mbiter.m4 (gl_MBITER): Likewise.
102922         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
102923         * m4/stat.m4 (gl_FUNC_STAT): Likewise.
102924         * m4/wait-process.m4 (gl_WAIT_PROCESS): Likewise.
102925         * modules/u64 (configure.ac): Likewise.
102927 2009-12-31  Bruno Haible  <bruno@clisp.org>
102929         Use AC_C_INLINE instead of module 'inline' where possible.
102930         * modules/inline (Description): Clarify purpose.
102931         * m4/count-one-bits.m4 (gl_COUNT_ONE_BITS): Require AC_C_INLINE.
102932         * modules/count-one-bits (Depends-on): Remove inline.
102933         * m4/openat.m4 (gl_PREREQ_OPENAT): Require AC_C_INLINE.
102934         * modules/openat (Depends-on): Remove inline.
102935         * modules/fdutimensat (Depends-on, configure.ac): Require AC_C_INLINE
102936         instead of depending on module 'inline'.
102937         * modules/filevercmp (Depends-on, configure.ac): Likewise.
102938         * modules/unicase/cased (Depends-on, configure.ac): Likewise.
102939         * modules/unicase/ignorable (Depends-on, configure.ac): Likewise.
102940         * modules/unictype/category-of (Depends-on, configure.ac): Likewise.
102941         * modules/unictype/category-test (Depends-on, configure.ac): Likewise.
102942         * modules/unictype/ctype-alnum (Depends-on, configure.ac): Likewise.
102943         * modules/unictype/ctype-alpha (Depends-on, configure.ac): Likewise.
102944         * modules/unictype/ctype-blank (Depends-on, configure.ac): Likewise.
102945         * modules/unictype/ctype-cntrl (Depends-on, configure.ac): Likewise.
102946         * modules/unictype/ctype-digit (Depends-on, configure.ac): Likewise.
102947         * modules/unictype/ctype-graph (Depends-on, configure.ac): Likewise.
102948         * modules/unictype/ctype-lower (Depends-on, configure.ac): Likewise.
102949         * modules/unictype/ctype-print (Depends-on, configure.ac): Likewise.
102950         * modules/unictype/ctype-punct (Depends-on, configure.ac): Likewise.
102951         * modules/unictype/ctype-space (Depends-on, configure.ac): Likewise.
102952         * modules/unictype/ctype-upper (Depends-on, configure.ac): Likewise.
102953         * modules/unictype/ctype-xdigit (Depends-on, configure.ac): Likewise.
102954         * modules/unictype/property-alphabetic (Depends-on, configure.ac):
102955         Likewise.
102956         * modules/unictype/property-ascii-hex-digit (Depends-on,
102957         configure.ac): Likewise.
102958         * modules/unictype/property-bidi-arabic-digit (Depends-on,
102959         configure.ac): Likewise.
102960         * modules/unictype/property-bidi-arabic-right-to-left (Depends-on,
102961         configure.ac): Likewise.
102962         * modules/unictype/property-bidi-block-separator (Depends-on,
102963         configure.ac): Likewise.
102964         * modules/unictype/property-bidi-boundary-neutral (Depends-on,
102965         configure.ac): Likewise.
102966         * modules/unictype/property-bidi-common-separator (Depends-on,
102967         configure.ac): Likewise.
102968         * modules/unictype/property-bidi-control (Depends-on, configure.ac):
102969         Likewise.
102970         * modules/unictype/property-bidi-embedding-or-override (Depends-on,
102971         configure.ac): Likewise.
102972         * modules/unictype/property-bidi-eur-num-separator (Depends-on,
102973         configure.ac): Likewise.
102974         * modules/unictype/property-bidi-eur-num-terminator (Depends-on,
102975         configure.ac): Likewise.
102976         * modules/unictype/property-bidi-european-digit (Depends-on,
102977         configure.ac): Likewise.
102978         * modules/unictype/property-bidi-hebrew-right-to-left (Depends-on,
102979         configure.ac): Likewise.
102980         * modules/unictype/property-bidi-left-to-right (Depends-on,
102981         configure.ac): Likewise.
102982         * modules/unictype/property-bidi-non-spacing-mark (Depends-on,
102983         configure.ac): Likewise.
102984         * modules/unictype/property-bidi-other-neutral (Depends-on,
102985         configure.ac): Likewise.
102986         * modules/unictype/property-bidi-pdf (Depends-on, configure.ac):
102987         Likewise.
102988         * modules/unictype/property-bidi-segment-separator (Depends-on,
102989         configure.ac): Likewise.
102990         * modules/unictype/property-bidi-whitespace (Depends-on,
102991         configure.ac): Likewise.
102992         * modules/unictype/property-combining (Depends-on, configure.ac):
102993         Likewise.
102994         * modules/unictype/property-composite (Depends-on, configure.ac):
102995         Likewise.
102996         * modules/unictype/property-currency-symbol (Depends-on,
102997         configure.ac): Likewise.
102998         * modules/unictype/property-dash (Depends-on, configure.ac): Likewise.
102999         * modules/unictype/property-decimal-digit (Depends-on, configure.ac):
103000         Likewise.
103001         * modules/unictype/property-default-ignorable-code-point (Depends-on,
103002         configure.ac): Likewise.
103003         * modules/unictype/property-deprecated (Depends-on, configure.ac):
103004         Likewise.
103005         * modules/unictype/property-diacritic (Depends-on, configure.ac):
103006         Likewise.
103007         * modules/unictype/property-extender (Depends-on, configure.ac):
103008         Likewise.
103009         * modules/unictype/property-format-control (Depends-on, configure.ac):
103010         Likewise.
103011         * modules/unictype/property-grapheme-base (Depends-on, configure.ac):
103012         Likewise.
103013         * modules/unictype/property-grapheme-extend (Depends-on, configure.ac):
103014         Likewise.
103015         * modules/unictype/property-grapheme-link (Depends-on, configure.ac):
103016         Likewise.
103017         * modules/unictype/property-hex-digit (Depends-on, configure.ac):
103018         Likewise.
103019         * modules/unictype/property-hyphen (Depends-on, configure.ac):
103020         Likewise.
103021         * modules/unictype/property-id-continue (Depends-on, configure.ac):
103022         Likewise.
103023         * modules/unictype/property-id-start (Depends-on, configure.ac):
103024         Likewise.
103025         * modules/unictype/property-ideographic (Depends-on, configure.ac):
103026         Likewise.
103027         * modules/unictype/property-ids-binary-operator (Depends-on,
103028         configure.ac): Likewise.
103029         * modules/unictype/property-ids-trinary-operator (Depends-on,
103030         configure.ac): Likewise.
103031         * modules/unictype/property-ignorable-control (Depends-on,
103032         configure.ac): Likewise.
103033         * modules/unictype/property-iso-control (Depends-on, configure.ac):
103034         Likewise.
103035         * modules/unictype/property-join-control (Depends-on, configure.ac):
103036         Likewise.
103037         * modules/unictype/property-left-of-pair (Depends-on, configure.ac):
103038         Likewise.
103039         * modules/unictype/property-line-separator (Depends-on, configure.ac):
103040         Likewise.
103041         * modules/unictype/property-logical-order-exception (Depends-on,
103042         configure.ac): Likewise.
103043         * modules/unictype/property-lowercase (Depends-on, configure.ac):
103044         Likewise.
103045         * modules/unictype/property-math (Depends-on, configure.ac): Likewise.
103046         * modules/unictype/property-non-break (Depends-on, configure.ac):
103047         Likewise.
103048         * modules/unictype/property-not-a-character (Depends-on, configure.ac):
103049         Likewise.
103050         * modules/unictype/property-numeric (Depends-on, configure.ac):
103051         Likewise.
103052         * modules/unictype/property-other-alphabetic (Depends-on,
103053         configure.ac): Likewise.
103054         * modules/unictype/property-other-default-ignorable-code-point
103055         (Depends-on, configure.ac): Likewise.
103056         * modules/unictype/property-other-grapheme-extend (Depends-on,
103057         configure.ac): Likewise.
103058         * modules/unictype/property-other-id-continue (Depends-on,
103059         configure.ac): Likewise.
103060         * modules/unictype/property-other-id-start (Depends-on, configure.ac):
103061         Likewise.
103062         * modules/unictype/property-other-lowercase (Depends-on, configure.ac):
103063         Likewise.
103064         * modules/unictype/property-other-math (Depends-on, configure.ac):
103065         Likewise.
103066         * modules/unictype/property-other-uppercase (Depends-on, configure.ac):
103067         Likewise.
103068         * modules/unictype/property-paired-punctuation (Depends-on,
103069         configure.ac): Likewise.
103070         * modules/unictype/property-paragraph-separator (Depends-on,
103071         configure.ac): Likewise.
103072         * modules/unictype/property-pattern-syntax (Depends-on, configure.ac):
103073         Likewise.
103074         * modules/unictype/property-pattern-white-space (Depends-on,
103075         configure.ac): Likewise.
103076         * modules/unictype/property-private-use (Depends-on, configure.ac):
103077         Likewise.
103078         * modules/unictype/property-punctuation (Depends-on, configure.ac):
103079         Likewise.
103080         * modules/unictype/property-quotation-mark (Depends-on, configure.ac):
103081         Likewise.
103082         * modules/unictype/property-radical (Depends-on, configure.ac):
103083         Likewise.
103084         * modules/unictype/property-sentence-terminal (Depends-on,
103085         configure.ac): Likewise.
103086         * modules/unictype/property-soft-dotted (Depends-on, configure.ac):
103087         Likewise.
103088         * modules/unictype/property-space (Depends-on, configure.ac): Likewise.
103089         * modules/unictype/property-terminal-punctuation (Depends-on,
103090         configure.ac): Likewise.
103091         * modules/unictype/property-titlecase (Depends-on, configure.ac):
103092         Likewise.
103093         * modules/unictype/property-unassigned-code-value (Depends-on,
103094         configure.ac): Likewise.
103095         * modules/unictype/property-unified-ideograph (Depends-on,
103096         configure.ac): Likewise.
103097         * modules/unictype/property-uppercase (Depends-on, configure.ac):
103098         Likewise.
103099         * modules/unictype/property-variation-selector (Depends-on,
103100         configure.ac): Likewise.
103101         * modules/unictype/property-white-space (Depends-on, configure.ac):
103102         Likewise.
103103         * modules/unictype/property-xid-continue (Depends-on, configure.ac):
103104         Likewise.
103105         * modules/unictype/property-xid-start (Depends-on, configure.ac):
103106         Likewise.
103107         * modules/unictype/property-zero-width (Depends-on, configure.ac):
103108         Likewise.
103109         * modules/unictype/syntax-c-ident (Depends-on, configure.ac): Likewise.
103110         * modules/unictype/syntax-java-ident (Depends-on, configure.ac):
103111         Likewise.
103113 2009-12-31  Bruno Haible  <bruno@clisp.org>
103115         Remove unnecessary AC_C_INLINE invocation.
103116         * m4/popen.m4 (gl_PREREQ_POPEN): Don't invoke AC_C_INLINE. Not needed
103117         since 2009-08-21.
103119 2009-12-31  Jim Meyering  <meyering@redhat.com>
103121         maint.mk: don't require explicit gpg_key_ID in cfg.mk
103122         * top/maint.mk (gpg_key_ID): Derive key ID from signed release tag.
103123         With this change, we can all remove the gpg_key_ID = ... definition
103124         from our respective cfg.mk files.
103126         maint.mk: create announcement template in ~/, not in /tmp
103127         * top/maint.mk (emit_upload_commands): Adjust.
103128         (release-prep): Emit into ~/announce-..., not /tmp/announce-...
103129         Remove temporary file, .ci-msg.
103131 2009-12-31  Eric Blake  <ebb9@byu.net>
103133         link-warning: always build headers with link warnings
103134         * modules/arpa_inet (Makefile.am): Always build replacement
103135         header.
103136         * modules/ctype (Makefile.am): Likewise.
103137         * modules/dirent (Makefile.am): Likewise.
103138         * modules/inttypes (Makefile.am): Likewise.
103139         * modules/langinfo (Makefile.am): Likewise.
103140         * modules/locale (Makefile.am): Likewise.
103141         * modules/spawn (Makefile.am): Likewise.
103142         * modules/sys_file (Makefile.am): Likewise.
103143         * modules/sys_ioctl (Makefile.am): Likewise.
103144         * modules/sys_select (Makefile.am): Likewise.
103145         * modules/sys_socket (Makefile.am): Likewise.
103146         * modules/sys_times (Makefile.am): Likewise.
103147         * modules/sys_utsname (Makefile.am): Likewise.
103148         * modules/sys_wait (Makefile.am): Likewise.
103149         * modules/wchar (Makefile.am): Likewise.
103150         * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET)
103151         (gl_ARPA_INET_H_DEFAULTS): Drop unneeded variable.
103152         * m4/ctype.m4 (gl_CTYPE_H_DEFAULTS): Likewise.
103153         * m4/isblank.m4 (gl_FUNC_ISBLANK): Likewise.
103154         * m4/dirent_h.m4 (gl_REPLACE_DIRENT_H, gl_DIRENT_H_DEFAULTS):
103155         Likewise.
103156         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise.
103157         * m4/langinfo_h.m4 (gl_LANGINFO_H): Likewise.
103158         * m4/locale_h.m4 (gl_REPLACE_LOCALE_H, gl_LOCALE_H_DEFAULTS):
103159         Likewise.
103160         * m4/spawn_h.m4 (gl_REPLACE_SPAWN_H, gl_SPAWN_H_DEFAULTS):
103161         Likewise.
103162         * m4/sys_file_h.m4 (gl_HEADER_SYS_FILE_H): Likewise.
103163         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H, gl_REPLACE_SYS_IOCTL_H)
103164         (gl_SYS_IOCTL_H_DEFAULTS): Likewise.
103165         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
103166         * m4/sys_times_h.m4 (gl_SYS_TIMES_H): Likewise.
103167         * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H)
103168         (gl_SYS_UTSNAME_H_DEFAULTS): Likewise.
103169         * m4/wchar.m4 (gl_WCHAR_H, gl_REPLACE_WCHAR_H)
103170         (gl_WCHAR_H_DEFAULTS): Likewise.
103172 2009-12-31  Eric Blake  <ebb9@byu.net>
103174         signal, spawn: use link warnings
103175         * lib/signal.in.h (sigset_t): Make unconditional.
103176         (sigismember, sigemptyset, sigaddset, sigdelset, sigfillset)
103177         (sigpending, sigprocmask, sigaction): Add link warnings.
103178         * lib/spawn.in.h (posix_spawn, posix_spawnp, posix_spawnattr_init)
103179         (posix_spawnattr_destroy, posix_spawnattr_getsigdefault)
103180         (posix_spawnattr_setsigdefault, posix_spawnattr_getsigmask)
103181         (posix_spawnattr_setsigmask, posix_spawnattr_getflags)
103182         (posix_spawnattr_setflags, posix_spawnattr_getpgroup)
103183         (posix_spawnattr_setpgroup, posix_spawnattr_getschedpolicy)
103184         (posix_spawnattr_setschedpolicy, posix_spawnattr_getschedparam)
103185         (posix_spawnattr_setschedparam, posix_spawn_file_actions_init)
103186         (posix_spawn_file_actions_destroy)
103187         (posix_spawn_file_actions_addopen)
103188         (posix_spawn_file_actions_addclose)
103189         (posix_spawn_file_actions_adddup2): Likewise.
103190         * m4/signal_h.m4 (gl_SIGNAL_H): Guarantee uid_t.
103191         * tests/test-signal.c (main): Enhance test.
103193         spawn: improve wrapper support
103194         * m4/spawn_h.m4 (gl_SPAWN_H): Check for type existence.
103195         (gl_SPAWN_H_DEFAULTS): New defaults.
103196         * modules/spawn (Makefile.am): Substitute them.
103197         * lib/spawn.in.h: (posix_spawnattr_t, posix_spawn_file_actions_t):
103198         Only declare if missing or broken.
103200         sys_times, sys_utsname: use include_next
103201         * m4/sys_times_h.m4 (gl_SYS_TIMES_H): Support wrapping an existing
103202         header.
103203         (gl_SYS_TIMES_H_DEFAULTS): Add another variable.
103204         * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H)
103205         (gl_SYS_UTSNAME_H_DEFAULTS): Likewise.
103206         * modules/sys_times (Depends-on): Add include_next.
103207         (Makefile.am): Substitute additional values.
103208         * modules/sys_utsname (Depends-on, Makefile.am): Likewise.
103209         * lib/sys_times.in.h (includes): Include native header, if
103210         available.
103211         * lib/sys_utsname.in.h (includes): Likewise.
103212         * tests/test-sys_times.c (main): Enhance test.
103214         fdutimensat: revert prior patch
103215         * modules/fdutimensat (Depends-on): Re-add inline; it is needed by
103216         utimens.h.
103217         Reported by Bruno Haible.
103219 2009-12-30  Eric Blake  <ebb9@byu.net>
103221         sys_wait: drop link-warning dependency
103222         * modules/sys_wait (Depends-on, Makefile.am): Drop unneeded
103223         link-warning efforts.
103224         * lib/sys_wait.in.h: Likewise.
103226         fdutimensat: remove bogus dependency
103227         * modules/fdutimensat (Depends-on): Drop inline.
103229         unistd: fix typo
103230         * lib/unistd.in.h (linkat) [GNULIB_POSIXCHECK]: Fix typo.
103232 2009-12-30  Bruno Haible  <bruno@clisp.org>
103234         Fix compilation error with Solaris cc.
103235         * lib/unicase/u8-is-invariant.c: Include <stdbool.h>.
103236         * lib/unicase/u16-is-invariant.c: Likewise.
103237         * lib/unicase/u32-is-invariant.c: Likewise.
103238         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
103240 2009-12-30  Bruno Haible  <bruno@clisp.org>
103242         Fix test crash.
103243         * tests/test-localename.c (test_locale_name_thread): Skip unavailable
103244         locales.
103245         Reported by Simon Josefsson <simon@josefsson.org>.
103247 2009-12-30  Bruno Haible  <bruno@clisp.org>
103249         Fix compilation error on most platforms.
103250         * tests/test-localename.c (categories): Define only if HAVE_NEWLOCALE.
103251         Reported by Simon Josefsson <simon@josefsson.org>
103252         and Nelson H. F. Beebe <beebe@math.utah.edu>.
103254 2009-12-30  Eric Blake  <ebb9@byu.net>
103256         futimens, utimensat: work around ntfs-3g bug
103257         * lib/utimensat.c (rpl_utimensat): Drop attempts to cache whether
103258         a ctime bug is present, and expand workaround to cover ntfs-3g.
103259         * lib/utimens.c (fdutimens, lutimens): Likewise.
103260         (utimensat_ctime_really, detect_ctime_bug): Drop cache mechanism.
103261         (validate_timespec): Adjust return value.
103262         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Update comment.
103263         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Likewise.
103264         Reported by ctrn3e8 <ctrn3e8@gmail.com>.
103266 2009-12-29  Eric Blake  <ebb9@byu.net>
103268         link-warning: make usage consistent
103269         * modules/ctype (Depends-on): Add link-warning.
103270         (Makefile.am): Update rules accordingly.
103271         * modules/langinfo (Depends-on, Makefile.am): Likewise.
103272         * modules/locale (Depends-on, Makefile.am): Likewise.
103273         * modules/sys_file (Makefile.am): Likewise.
103274         * modules/getopt-posix (Makefile.am): Delete unused link warning
103275         efforts.
103276         * lib/ctype.in.h (GL_LINK_WARNING): Ensure definition before use.
103277         * lib/langinfo.in.h (GL_LINK_WARNING): Likewise.
103278         * lib/locale.in.h (GL_LINK_WARNING): Likewise.
103279         * lib/sys_file.in.h (GL_LINK_WARNING): Likewise.
103281         stdio: remove unused variables
103282         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Remove unused variables.
103283         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Likewise.
103284         * m4/ftello.m4 (gl_FUNC_FTELLO): Likewise.
103286         tests: test more substitute headers
103287         * modules/ctype-tests: New file.
103288         * modules/dirent-tests: Likewise.
103289         * modules/spawn-tests: Likewise.
103290         * modules/sys_file-tests: Likewise.
103291         * modules/sys_ioctl-tests: Likewise.
103292         * modules/sys_wait-tests: Likewise.
103293         * tests/test-ctype.c: Likewise.
103294         * tests/test-dirent.c: Likewise.
103295         * tests/test-spawn.c: Likewise.
103296         * tests/test-sys_file.c: Likewise.
103297         * tests/test-sys_ioctl.c: Likewise.
103298         * tests/test-sys_wait.c: Likewise.
103299         * m4/spawn_h.m4 (gl_SPAWN_H): Replace header if it is missing.
103300         * lib/sys_file.in.h (LOCK_SH, LOCK_EX, LOCK_UN, LOCK_NB): Provide
103301         whether or not flock is in use.
103303         tests: remove License section from module
103304         * modules/arpa_inet-tests: Remove unneeded section.
103305         * modules/byteswap-tests: Likewise.
103306         * modules/ceilf-tests: Likewise.
103307         * modules/ceill-tests: Likewise.
103308         * modules/crypto/des-tests: Likewise.
103309         * modules/crypto/gc-arcfour-tests: Likewise.
103310         * modules/crypto/gc-arctwo-tests: Likewise.
103311         * modules/crypto/gc-des-tests: Likewise.
103312         * modules/crypto/gc-hmac-md5-tests: Likewise.
103313         * modules/crypto/gc-hmac-sha1-tests: Likewise.
103314         * modules/crypto/gc-md2-tests: Likewise.
103315         * modules/crypto/gc-md4-tests: Likewise.
103316         * modules/crypto/gc-md5-tests: Likewise.
103317         * modules/crypto/gc-pbkdf2-sha1-tests: Likewise.
103318         * modules/crypto/gc-rijndael-tests: Likewise.
103319         * modules/crypto/gc-sha1-tests: Likewise.
103320         * modules/crypto/gc-tests: Likewise.
103321         * modules/crypto/md2-tests: Likewise.
103322         * modules/crypto/md4-tests: Likewise.
103323         * modules/fcntl-h-tests: Likewise.
103324         * modules/floorf-tests: Likewise.
103325         * modules/floorl-tests: Likewise.
103326         * modules/frexp-nolibm-tests: Likewise.
103327         * modules/frexp-tests: Likewise.
103328         * modules/frexpl-nolibm-tests: Likewise.
103329         * modules/frexpl-tests: Likewise.
103330         * modules/getaddrinfo-tests: Likewise.
103331         * modules/inttypes-tests: Likewise.
103332         * modules/isfinite-tests: Likewise.
103333         * modules/isinf-tests: Likewise.
103334         * modules/ldexpl-tests: Likewise.
103335         * modules/locale-tests: Likewise.
103336         * modules/math-tests: Likewise.
103337         * modules/netdb-tests: Likewise.
103338         * modules/netinet_in-tests: Likewise.
103339         * modules/printf-frexp-tests: Likewise.
103340         * modules/printf-frexpl-tests: Likewise.
103341         * modules/priv-set-tests: Likewise.
103342         * modules/random_r-tests: Likewise.
103343         * modules/round-tests: Likewise.
103344         * modules/roundf-tests: Likewise.
103345         * modules/roundl-tests: Likewise.
103346         * modules/search-tests: Likewise.
103347         * modules/select-tests: Likewise.
103348         * modules/signal-tests: Likewise.
103349         * modules/stdbool-tests: Likewise.
103350         * modules/stddef-tests: Likewise.
103351         * modules/stdint-tests: Likewise.
103352         * modules/stdio-tests: Likewise.
103353         * modules/stdlib-tests: Likewise.
103354         * modules/string-tests: Likewise.
103355         * modules/strings-tests: Likewise.
103356         * modules/sys_select-tests: Likewise.
103357         * modules/sys_socket-tests: Likewise.
103358         * modules/sys_stat-tests: Likewise.
103359         * modules/sys_time-tests: Likewise.
103360         * modules/sys_utsname-tests: Likewise.
103361         * modules/sysexits-tests: Likewise.
103362         * modules/time-tests: Likewise.
103363         * modules/trunc-tests: Likewise.
103364         * modules/truncf-tests: Likewise.
103365         * modules/truncl-tests: Likewise.
103366         * modules/tsearch-tests: Likewise.
103367         * modules/unistd-tests: Likewise.
103368         * modules/wchar-tests: Likewise.
103369         * modules/wctype-tests: Likewise.
103371         tests: fix license on several tests
103372         * tests/test-des.c: Update to GPLv3+.
103373         * tests/test-flock.c: Likewise.
103374         * tests/test-fsync.c: Likewise.
103375         * tests/test-futimens.h: Likewise.
103376         * tests/test-gc-arcfour.c: Likewise.
103377         * tests/test-gc-arctwo.c: Likewise.
103378         * tests/test-gc-des.c: Likewise.
103379         * tests/test-gc-hmac-md5.c: Likewise.
103380         * tests/test-gc-hmac-sha1.c: Likewise.
103381         * tests/test-gc-md2.c: Likewise.
103382         * tests/test-gc-md4.c: Likewise.
103383         * tests/test-gc-md5.c: Likewise.
103384         * tests/test-gc-pbkdf2-sha1.c: Likewise.
103385         * tests/test-gc-rijndael.c: Likewise.
103386         * tests/test-gc-sha1.c: Likewise.
103387         * tests/test-gc.c: Likewise.
103388         * tests/test-getcwd.c: Likewise.
103389         * tests/test-link.c: Likewise.
103390         * tests/test-link.h: Likewise.
103391         * tests/test-lutimens.h: Likewise.
103392         * tests/test-md2.c: Likewise.
103393         * tests/test-md4.c: Likewise.
103394         * tests/test-mkdir.h: Likewise.
103395         * tests/test-rename.c: Likewise.
103396         * tests/test-rename.h: Likewise.
103397         * tests/test-safe-alloc.c: Likewise.
103398         * tests/test-utimens-common.h: Likewise.
103399         * tests/test-utimens.h: Likewise.
103401         maint: sync license texts
103402         * config/srclist.txt: Add gpl-1.3.texi, lgpl-1.3.texi.
103403         * doc/gpl-3.0.texi: Revert copyright year update.
103404         * doc/lgpl-3.0.texi: Likewise.
103406 2009-12-29  Jim Meyering  <meyering@redhat.com>
103408         update nearly all FSF copyright year lists to include 2009
103409         The files named by the following are exempted:
103410             grep -v '^#' config/srclist.txt|grep -v '^$' | while read src dst; do
103411               test -f "$dst" && { echo "$dst"; continue; }
103412               test -d "$dst" || continue
103413               echo "$dst"/$(basename "$src")
103414             done > exempt
103415             git ls-files tests/unictype >> exempt
103416         In the remaining files, convert to all-interval notation if
103417         - there is already at least one year interval like 2000-2003
103418         - the file is maintained by me
103419         - the file is in lib/uni*/, where that style already prevails
103420         Otherwise, use update-copyright's default.
103422 2009-12-29  Simon Josefsson  <simon@josefsson.org>
103423         and Eric Blake  <ebb9@byu.net>
103425         tests: don't require debug system() to pass
103426         * tests/test-lstat.h (test_lstat_func): Move debug cleanup...
103427         * tests/test-rmdir.h (test_rmdir_func): Likewise.
103428         * tests/test-unlink.h (test_unlink_func): Likewise.
103429         * tests/test-fstatat.c (main): ...into callers.
103430         * tests/test-lstat.c (main): Likewise.
103431         * tests/test-rmdir.c (main): Likewise.
103432         * tests/test-unlink.c (main): Likewise.
103433         * tests/test-unlinkat.c (main): Likewise.
103434         * tests/test-areadlink-with-size.c (main): Don't require a
103435         debug-only system call to pass, aiding cross-testing to mingw.
103436         * tests/test-areadlink.c (main): Likewise.
103437         * tests/test-areadlinkat-with-size.c (main): Likewise.
103438         * tests/test-areadlinkat.c (main): Likewise.
103439         * tests/test-canonicalize-lgpl.c (main): Likewise.
103440         * tests/test-canonicalize.c (main): Likewise.
103441         * tests/test-chown.c (main): Likewise.
103442         * tests/test-fchownat.c (main): Likewise.
103443         * tests/test-lchown.c (main): Likewise.
103444         * tests/test-fdutimensat.c (main): Likewise.
103445         * tests/test-futimens.c (main): Likewise.
103446         * tests/test-link.c (main): Likewise.
103447         * tests/test-linkat.c (main): Likewise.
103448         * tests/test-mkdir.c (main): Likewise.
103449         * tests/test-mkdirat.c (main): Likewise.
103450         * tests/test-mkfifo.c (main): Likewise.
103451         * tests/test-mkfifoat.c (main): Likewise.
103452         * tests/test-mknod.c (main): Likewise.
103453         * tests/test-readlink.c (main): Likewise.
103454         * tests/test-remove.c (main): Likewise.
103455         * tests/test-rename.c (main): Likewise.
103456         * tests/test-renameat.c (main): Likewise.
103457         * tests/test-symlink.c (main): Likewise.
103458         * tests/test-symlinkat.c (main): Likewise.
103459         * tests/test-utimens.c (main): Likewise.
103460         * tests/test-utimensat.c (main): Likewise.
103462 2009-12-29  Simon Josefsson  <simon@josefsson.org>
103464         * modules/selinux-h (selinux/selinux.h, selinux/context.h): Depend
103465         on $(UNUSED_PARAMETER_H) to avoid build failure.
103467 2009-12-28  Jim Meyering  <meyering@redhat.com>
103469         update-copyright: you may specify a max. line length other than 72
103470         * build-aux/update-copyright: Honor $UPDATE_COPYRIGHT_MAX_LINE_LENGTH.
103472         maint: use consistent FSF copyright line syntax
103473         * lib/posixtm.c: Add missing comma in FSF copyright line.
103474         * lib/posixtm.h: Likewise.
103475         * lib/getugroups.c: Add missing ", Inc.".
103477         pmccabe2html: emit consistent FSF copyright; remove trailing blanks
103478         * build-aux/pmccabe2html: Insert comma before "Inc." in emitted
103479         FSF copyright line.  Remove trailing blanks.
103481 2009-12-28  Eric Blake  <ebb9@byu.net>
103483         test-dup2: reduce dependencies
103484         * modules/cloexec (Configure.ac): Set witness.
103485         * modules/dup2-tests (Depends-on): Drop cloexec.
103486         * tests/test-dup2.c (main): Skip portion of test if cloexec module
103487         not present.
103488         Suggested by Bruno Haible.
103490 2009-12-26  Bruno Haible  <bruno@clisp.org>
103492         Remove an unneeded dependency.
103493         * modules/fseterr (Depends-on): Remove dup2.
103495 2009-12-26  Eric Blake  <ebb9@byu.net>
103497         tests: use macros.h in more places
103498         * tests/macros.h (ASSERT): Depend on ASSERT_STREAM.
103499         (ASSERT_STREAM): Provide default of stderr.
103500         * tests/test-dirent-safer.c: Include macros.h, using alternate
103501         stream for assertions.
103502         * tests/test-dup-safer.c: Likewise.
103503         * tests/test-freopen-safer.c: Likewise.
103504         * tests/test-getopt.c: Likewise.
103505         * tests/test-openat-safer.c: Likewise.
103506         * tests/test-pipe.c: Likewise.
103507         * tests/test-popen-safer.c: Likewise.
103508         * modules/dirent-safer-tests (Files): Include macros.h.
103509         * modules/unistd-safer-tests (Files): Likewise.
103510         * modules/freopen-safer-tests (Files): Likewise.
103511         * modules/getopt-posix-tests (Files): Likewise.
103512         * modules/openat-safer-tests (Files): Likewise.
103513         * modules/pipe-tests (Files): Likewise.
103515 2009-12-26  Bruno Haible  <bruno@clisp.org>
103517         javacomp-script: Portability fix.
103518         * m4/javacomp.m4 (gt_JAVACOMP): Fix creation of conftestver.class so
103519         that it also works on Solaris.
103521 2009-12-26  Bruno Haible  <bruno@clisp.org>
103523         localename: Fix storage allocation of gl_locale_name_thread's result.
103524         * lib/localename.c (SIZE_BITS, string_hash, struct hash_node,
103525         HASH_TABLE_SIZE, struniq_hash_table, struniq_lock, struniq): Define on
103526         all platforms that have 'uselocale'.
103527         (gl_locale_name_thread_unsafe): New function, extracted from
103528         gl_locale_name_thread.
103529         (gl_locale_name_thread): Call struniq on all platforms that have
103530         'uselocale'.
103531         * tests/test-localename.c (test_locale_name_thread): Check that the
103532         resulting strings are permanently allocated.
103533         * modules/localename-tests (Depends-on): Add strdup.
103535 2009-12-26  Bruno Haible  <bruno@clisp.org>
103537         * tests/test-localename.c (categories): Fill in the strings.
103539 2009-12-26  Jim Meyering  <meyering@redhat.com>
103541         isdir: complete the removal of m4/isdir.m4
103542         * modules/isdir (configure.ac): Remove reference to gl_ISDIR.
103544         isdir: clean up, since at least grep still uses it
103545         * lib/isdir.c: Include "isdir.h".
103546         (S_ISDIR): Remove now-unneeded definition.
103547         * modules/isdir (Files): Add lib/isdir.h.
103548         * lib/isdir.h: New file, with declaration.
103549         * m4/isdir.m4: Remove file -- unneeded.
103551 2009-12-25  Bruno Haible  <bruno@clisp.org>
103553         selinux-h: Make generated .h files standalone.
103554         * lib/se-context.in.h: Arrange to include _GL_UNUSED_PARAMETER
103555         definition. Use _GL_UNUSED_PARAMETER instead of _GL_UNUSED.
103556         * lib/se-selinux.in.h: Likewise.
103557         * modules/selinux-h (Depends-on): Add unused-parameter.
103558         (Makefile.am): Insert definition of _GL_UNUSED_PARAMETER into
103559         selinux/selinux.h and selinux/context.h.
103560         Suggested by Eric Blake.
103562 2009-12-25  Bruno Haible  <bruno@clisp.org>
103564         Move gl_FCNTL_O_FLAGS to a separate .m4 file.
103565         * m4/fcntl-o.m4: New file, extracted from m4/fcntl_h.m4.
103566         * m4/fcntl_h.m4 (gl_FCNTL_O_FLAGS): Remove macro.
103567         * modules/fcntl-h (Files): Add m4/fcntl-o.m4.
103568         * modules/localcharset (Files): Likewise. Remove m4/fcntl_h.m4.
103570 2009-12-24  Bruno Haible  <bruno@clisp.org>
103572         openat: Fix warning.
103573         * lib/openat-proc.c: Include <unistd.h>.
103575 2009-12-24  Bruno Haible  <bruno@clisp.org>
103577         New module 'unused-parameter'.
103578         * build-aux/unused-parameter.h: New file, extracted from earlier
103579         gnulib-common.m4.
103580         * modules/unused-parameter: New file.
103581         * lib/unistr.h: Include unused-parameter.h.
103582         (u32_mbtouc_unsafe, u32_mbtouc): Use _GL_UNUSED_PARAMETER instead of
103583         _GL_UNUSED.
103584         * modules/unistr/base (Depends-on): Add unused-parameter.
103586 2009-12-24  Bruno Haible  <bruno@clisp.org>
103588         Add missing dependencies to 'extensions' module.
103589         * m4/extensions.m4: Add comment.
103590         * modules/accept4 (Depends-on): Add extensions.
103591         * modules/dup3 (Depends-on): Likewise.
103592         * modules/fcntl (Depends-on): Likewise.
103593         * modules/futimens (Depends-on): Likewise.
103594         * modules/mknod (Depends-on): Likewise.
103595         * modules/pipe2 (Depends-on): Likewise.
103596         * modules/stat-time (Depends-on): Likewise.
103597         * modules/strcasestr-simple (Depends-on): Likewise.
103598         * modules/strsignal (Depends-on): Likewise.
103599         * modules/utimensat (Depends-on): Likewise.
103600         * modules/localcharset (Depends-on): Likewise. Needed because of
103601         gl_FCNTL_O_FLAGS.
103602         * modules/wcrtomb (Depends-on): Likewise. Needed because of
103603         AC_TYPE_MBSTATE_T.
103604         * modules/wcsnrtombs (Depends-on): Likewise.
103605         * modules/wcsrtombs (Depends-on): Likewise.
103607 2009-12-24  Bruno Haible  <bruno@clisp.org>
103609         binary-io: Avoid gcc warning due to SET_BINARY.
103610         * lib/binary-io.h (SET_BINARY): Cast the result to void.
103611         Reported by Jim Meyering <jim@meyering.net>. Suggestion by Eric Blake.
103613 2009-12-24  Bruno Haible  <bruno@clisp.org>
103615         Avoid future namespace pollution on glibc systems.
103616         * lib/arpa_inet.in.h: Don't include <sys/socket.h> on glibc systems.
103617         * lib/sys_ioctl.in.h: Don't include <unistd.h> on glibc systems.
103618         * lib/sys_select.in.h: Don't include <sys/time.h> and <string.h> on
103619         glibc systems.
103621 2009-12-24  Bruno Haible  <bruno@clisp.org>
103623         Refactor common macros used in tests.
103624         * tests/macros.h: New file.
103625         * tests/test-areadlink.c: Include macros.h. Don't include <stdio.h>
103626         and/or <stdlib.h>, if appropriate.
103627         (ASSERT, SIZEOF): Remove macros.
103628         * tests/test-areadlink-with-size.c: Likewise.
103629         * tests/test-areadlinkat.c: Likewise.
103630         * tests/test-areadlinkat-with-size.c: Likewise.
103631         * tests/test-argmatch.c: Likewise.
103632         * tests/test-argv-iter.c: Likewise.
103633         * tests/test-array-mergesort.c: Likewise.
103634         * tests/test-array_list.c: Likewise.
103635         * tests/test-array_oset.c: Likewise.
103636         * tests/test-avltree_list.c: Likewise.
103637         * tests/test-avltree_oset.c: Likewise.
103638         * tests/test-avltreehash_list.c: Likewise.
103639         * tests/test-base64.c: Likewise.
103640         * tests/test-binary-io.c: Likewise.
103641         * tests/test-bitrotate.c: Likewise.
103642         * tests/test-btowc.c: Likewise.
103643         * tests/test-byteswap.c: Likewise.
103644         * tests/test-c-ctype.c: Likewise.
103645         * tests/test-c-stack.c: Likewise.
103646         * tests/test-c-strcasecmp.c: Likewise.
103647         * tests/test-c-strcasestr.c: Likewise.
103648         * tests/test-c-strncasecmp.c: Likewise.
103649         * tests/test-c-strstr.c: Likewise.
103650         * tests/test-canonicalize-lgpl.c: Likewise.
103651         * tests/test-canonicalize.c: Likewise.
103652         * tests/test-carray_list.c: Likewise.
103653         * tests/test-ceilf1.c: Likewise.
103654         * tests/test-ceilf2.c: Likewise.
103655         * tests/test-ceill.c: Likewise.
103656         * tests/test-chown.c: Likewise.
103657         * tests/test-cloexec.c: Likewise.
103658         * tests/test-copy-acl.c: Likewise.
103659         * tests/test-copy-file.c: Likewise.
103660         * tests/test-count-one-bits.c: Likewise.
103661         * tests/test-dprintf-posix.c: Likewise.
103662         * tests/test-dup2.c: Likewise.
103663         * tests/test-dup3.c: Likewise.
103664         * tests/test-duplocale.c: Likewise.
103665         * tests/test-fbufmode.c: Likewise.
103666         * tests/test-fchdir.c: Likewise.
103667         * tests/test-fchownat.c: Likewise.
103668         * tests/test-fcntl-safer.c: Likewise.
103669         * tests/test-fcntl.c: Likewise.
103670         * tests/test-fdopendir.c: Likewise.
103671         * tests/test-fdutimensat.c: Likewise.
103672         * tests/test-fflush2.c: Likewise.
103673         * tests/test-file-has-acl.c: Likewise.
103674         * tests/test-filevercmp.c: Likewise.
103675         * tests/test-flock.c: Likewise.
103676         * tests/test-floorf1.c: Likewise.
103677         * tests/test-floorf2.c: Likewise.
103678         * tests/test-floorl.c: Likewise.
103679         * tests/test-fnmatch.c: Likewise.
103680         * tests/test-fopen.h: Likewise.
103681         * tests/test-fpending.c: Likewise.
103682         * tests/test-fprintf-posix.c: Likewise.
103683         * tests/test-fpurge.c: Likewise.
103684         * tests/test-freadable.c: Likewise.
103685         * tests/test-freadahead.c: Likewise.
103686         * tests/test-freading.c: Likewise.
103687         * tests/test-freadptr.c: Likewise.
103688         * tests/test-freadptr2.c: Likewise.
103689         * tests/test-freadseek.c: Likewise.
103690         * tests/test-freopen.c: Likewise.
103691         * tests/test-frexp.c: Likewise.
103692         * tests/test-frexpl.c: Likewise.
103693         * tests/test-fseek.c: Likewise.
103694         * tests/test-fseeko.c: Likewise.
103695         * tests/test-fstatat.c: Likewise.
103696         * tests/test-fstrcmp.c: Likewise.
103697         * tests/test-fsync.c: Likewise.
103698         * tests/test-ftell.c: Likewise.
103699         * tests/test-ftello.c: Likewise.
103700         * tests/test-func.c: Likewise.
103701         * tests/test-futimens.c: Likewise.
103702         * tests/test-fwritable.c: Likewise.
103703         * tests/test-fwriting.c: Likewise.
103704         * tests/test-getcwd.c: Likewise.
103705         * tests/test-getdate.c: Likewise.
103706         * tests/test-getdelim.c: Likewise.
103707         * tests/test-getdtablesize.c: Likewise.
103708         * tests/test-getgroups.c: Likewise.
103709         * tests/test-getline.c: Likewise.
103710         * tests/test-getndelim2.c: Likewise.
103711         * tests/test-glob.c: Likewise.
103712         * tests/test-hash.c: Likewise.
103713         * tests/test-i-ring.c: Likewise.
103714         * tests/test-iconv-utf.c: Likewise.
103715         * tests/test-iconv.c: Likewise.
103716         * tests/test-idpriv-drop.c: Likewise.
103717         * tests/test-idpriv-droptemp.c: Likewise.
103718         * tests/test-inet_ntop.c: Likewise.
103719         * tests/test-inet_pton.c: Likewise.
103720         * tests/test-isblank.c: Likewise.
103721         * tests/test-isfinite.c: Likewise.
103722         * tests/test-isinf.c: Likewise.
103723         * tests/test-isnan.c: Likewise.
103724         * tests/test-isnand.h: Likewise.
103725         * tests/test-isnanf.h: Likewise.
103726         * tests/test-isnanl.h: Likewise.
103727         * tests/test-lchown.c: Likewise.
103728         * tests/test-ldexpl.c: Likewise.
103729         * tests/test-link.c: Likewise.
103730         * tests/test-linkat.c: Likewise.
103731         * tests/test-linked_list.c: Likewise.
103732         * tests/test-linkedhash_list.c: Likewise.
103733         * tests/test-localename.c: Likewise.
103734         * tests/test-lseek.c: Likewise.
103735         * tests/test-lstat.c: Likewise.
103736         * tests/test-mbmemcasecmp.c: Likewise.
103737         * tests/test-mbmemcasecoll.c: Likewise.
103738         * tests/test-mbrtowc.c: Likewise.
103739         * tests/test-mbscasecmp.c: Likewise.
103740         * tests/test-mbscasestr1.c: Likewise.
103741         * tests/test-mbscasestr2.c: Likewise.
103742         * tests/test-mbscasestr3.c: Likewise.
103743         * tests/test-mbscasestr4.c: Likewise.
103744         * tests/test-mbschr.c: Likewise.
103745         * tests/test-mbscspn.c: Likewise.
103746         * tests/test-mbsinit.c: Likewise.
103747         * tests/test-mbsncasecmp.c: Likewise.
103748         * tests/test-mbsnrtowcs.c: Likewise.
103749         * tests/test-mbspbrk.c: Likewise.
103750         * tests/test-mbspcasecmp.c: Likewise.
103751         * tests/test-mbsrchr.c: Likewise.
103752         * tests/test-mbsrtowcs.c: Likewise.
103753         * tests/test-mbsspn.c: Likewise.
103754         * tests/test-mbsstr1.c: Likewise.
103755         * tests/test-mbsstr2.c: Likewise.
103756         * tests/test-mbsstr3.c: Likewise.
103757         * tests/test-memchr.c: Likewise.
103758         * tests/test-memchr2.c: Likewise.
103759         * tests/test-memcmp.c: Likewise.
103760         * tests/test-memmem.c: Likewise.
103761         * tests/test-memrchr.c: Likewise.
103762         * tests/test-mkdir.c: Likewise.
103763         * tests/test-mkdirat.c: Likewise.
103764         * tests/test-mkfifo.c: Likewise.
103765         * tests/test-mkfifoat.c: Likewise.
103766         * tests/test-mknod.c: Likewise.
103767         * tests/test-nanosleep.c: Likewise.
103768         * tests/test-nl_langinfo.c: Likewise.
103769         * tests/test-obstack-printf.c: Likewise.
103770         * tests/test-open.c: Likewise.
103771         * tests/test-openat.c: Likewise.
103772         * tests/test-pipe-filter-gi1.c: Likewise.
103773         * tests/test-pipe-filter-gi2-main.c: Likewise.
103774         * tests/test-pipe-filter-ii1.c: Likewise.
103775         * tests/test-pipe-filter-ii2-main.c: Likewise.
103776         * tests/test-pipe2.c: Likewise.
103777         * tests/test-popen.h: Likewise.
103778         * tests/test-posixtm.c: Likewise.
103779         * tests/test-pread.c: Likewise.
103780         * tests/test-printf-frexp.c: Likewise.
103781         * tests/test-printf-frexpl.c: Likewise.
103782         * tests/test-printf-posix.c: Likewise.
103783         * tests/test-priv-set.c: Likewise.
103784         * tests/test-quotearg.c: Likewise.
103785         * tests/test-random_r.c: Likewise.
103786         * tests/test-rawmemchr.c: Likewise.
103787         * tests/test-rbtree_list.c: Likewise.
103788         * tests/test-rbtree_oset.c: Likewise.
103789         * tests/test-rbtreehash_list.c: Likewise.
103790         * tests/test-readlink.c: Likewise.
103791         * tests/test-remove.c: Likewise.
103792         * tests/test-rename.c: Likewise.
103793         * tests/test-renameat.c: Likewise.
103794         * tests/test-rmdir.c: Likewise.
103795         * tests/test-round1.c: Likewise.
103796         * tests/test-roundf1.c: Likewise.
103797         * tests/test-roundl.c: Likewise.
103798         * tests/test-safe-alloc.c: Likewise.
103799         * tests/test-sameacls.c: Likewise.
103800         * tests/test-set-mode-acl.c: Likewise.
103801         * tests/test-setenv.c: Likewise.
103802         * tests/test-sigaction.c: Likewise.
103803         * tests/test-signbit.c: Likewise.
103804         * tests/test-sleep.c: Likewise.
103805         * tests/test-snprintf-posix.c: Likewise.
103806         * tests/test-snprintf.c: Likewise.
103807         * tests/test-sprintf-posix.c: Likewise.
103808         * tests/test-stat-time.c: Likewise.
103809         * tests/test-stat.c: Likewise.
103810         * tests/test-strcasestr.c: Likewise.
103811         * tests/test-strchrnul.c: Likewise.
103812         * tests/test-strerror.c: Likewise.
103813         * tests/test-striconv.c: Likewise.
103814         * tests/test-striconveh.c: Likewise.
103815         * tests/test-striconveha.c: Likewise.
103816         * tests/test-strsignal.c: Likewise.
103817         * tests/test-strstr.c: Likewise.
103818         * tests/test-strtod.c: Likewise.
103819         * tests/test-strverscmp.c: Likewise.
103820         * tests/test-symlink.c: Likewise.
103821         * tests/test-symlinkat.c: Likewise.
103822         * tests/test-trunc1.c: Likewise.
103823         * tests/test-trunc2.c: Likewise.
103824         * tests/test-truncf1.c: Likewise.
103825         * tests/test-truncf2.c: Likewise.
103826         * tests/test-truncl.c: Likewise.
103827         * tests/test-uname.c: Likewise.
103828         * tests/test-unlink.c: Likewise.
103829         * tests/test-unlinkat.c: Likewise.
103830         * tests/test-unsetenv.c: Likewise.
103831         * tests/test-usleep.c: Likewise.
103832         * tests/test-utimens.c: Likewise.
103833         * tests/test-utimensat.c: Likewise.
103834         * tests/test-vasnprintf-posix.c: Likewise.
103835         * tests/test-vasnprintf-posix2.c: Likewise.
103836         * tests/test-vasnprintf.c: Likewise.
103837         * tests/test-vasprintf-posix.c: Likewise.
103838         * tests/test-vasprintf.c: Likewise.
103839         * tests/test-vdprintf-posix.c: Likewise.
103840         * tests/test-vfprintf-posix.c: Likewise.
103841         * tests/test-vprintf-posix.c: Likewise.
103842         * tests/test-vsnprintf-posix.c: Likewise.
103843         * tests/test-vsnprintf.c: Likewise.
103844         * tests/test-vsprintf-posix.c: Likewise.
103845         * tests/test-wcrtomb.c: Likewise.
103846         * tests/test-wcsnrtombs.c: Likewise.
103847         * tests/test-wcsrtombs.c: Likewise.
103848         * tests/test-wctype.c: Likewise.
103849         * tests/test-wcwidth.c: Likewise.
103850         * tests/test-xfprintf-posix.c: Likewise.
103851         * tests/test-xmemdup0.c: Likewise.
103852         * tests/test-xprintf-posix.c: Likewise.
103853         * tests/test-xvasprintf.c: Likewise.
103854         * tests/unicase/test-locale-language.c: Likewise.
103855         * tests/unicase/test-mapping-part1.h: Likewise.
103856         * tests/unicase/test-predicate-part1.h: Likewise.
103857         * tests/unicase/test-u8-casecmp.c: Likewise.
103858         * tests/unicase/test-u8-casecoll.c: Likewise.
103859         * tests/unicase/test-u8-casefold.c: Likewise.
103860         * tests/unicase/test-u8-is-cased.c: Likewise.
103861         * tests/unicase/test-u8-is-casefolded.c: Likewise.
103862         * tests/unicase/test-u8-is-lowercase.c: Likewise.
103863         * tests/unicase/test-u8-is-titlecase.c: Likewise.
103864         * tests/unicase/test-u8-is-uppercase.c: Likewise.
103865         * tests/unicase/test-u8-tolower.c: Likewise.
103866         * tests/unicase/test-u8-totitle.c: Likewise.
103867         * tests/unicase/test-u8-toupper.c: Likewise.
103868         * tests/unicase/test-u16-casecmp.c: Likewise.
103869         * tests/unicase/test-u16-casecoll.c: Likewise.
103870         * tests/unicase/test-u16-casefold.c: Likewise.
103871         * tests/unicase/test-u16-is-cased.c: Likewise.
103872         * tests/unicase/test-u16-is-casefolded.c: Likewise.
103873         * tests/unicase/test-u16-is-lowercase.c: Likewise.
103874         * tests/unicase/test-u16-is-titlecase.c: Likewise.
103875         * tests/unicase/test-u16-is-uppercase.c: Likewise.
103876         * tests/unicase/test-u16-tolower.c: Likewise.
103877         * tests/unicase/test-u16-totitle.c: Likewise.
103878         * tests/unicase/test-u16-toupper.c: Likewise.
103879         * tests/unicase/test-u32-casecmp.c: Likewise.
103880         * tests/unicase/test-u32-casecoll.c: Likewise.
103881         * tests/unicase/test-u32-casefold.c: Likewise.
103882         * tests/unicase/test-u32-is-cased.c: Likewise.
103883         * tests/unicase/test-u32-is-casefolded.c: Likewise.
103884         * tests/unicase/test-u32-is-lowercase.c: Likewise.
103885         * tests/unicase/test-u32-is-titlecase.c: Likewise.
103886         * tests/unicase/test-u32-is-uppercase.c: Likewise.
103887         * tests/unicase/test-u32-tolower.c: Likewise.
103888         * tests/unicase/test-u32-totitle.c: Likewise.
103889         * tests/unicase/test-u32-toupper.c: Likewise.
103890         * tests/unicase/test-ulc-casecmp.c: Likewise.
103891         * tests/unicase/test-ulc-casecoll.c: Likewise.
103892         * tests/uniconv/test-u8-conv-from-enc.c: Likewise.
103893         * tests/uniconv/test-u8-conv-to-enc.c: Likewise.
103894         * tests/uniconv/test-u8-strconv-from-enc.c: Likewise.
103895         * tests/uniconv/test-u8-strconv-to-enc.c: Likewise.
103896         * tests/uniconv/test-u16-conv-from-enc.c: Likewise.
103897         * tests/uniconv/test-u16-conv-to-enc.c: Likewise.
103898         * tests/uniconv/test-u16-strconv-from-enc.c: Likewise.
103899         * tests/uniconv/test-u16-strconv-to-enc.c: Likewise.
103900         * tests/uniconv/test-u32-conv-from-enc.c: Likewise.
103901         * tests/uniconv/test-u32-conv-to-enc.c: Likewise.
103902         * tests/uniconv/test-u32-strconv-from-enc.c: Likewise.
103903         * tests/uniconv/test-u32-strconv-to-enc.c: Likewise.
103904         * tests/unictype/test-bidi_byname.c: Likewise.
103905         * tests/unictype/test-bidi_name.c: Likewise.
103906         * tests/unictype/test-bidi_of.c: Likewise.
103907         * tests/unictype/test-bidi_test.c: Likewise.
103908         * tests/unictype/test-block_list.c: Likewise.
103909         * tests/unictype/test-block_of.c: Likewise.
103910         * tests/unictype/test-block_test.c: Likewise.
103911         * tests/unictype/test-categ_and.c: Likewise.
103912         * tests/unictype/test-categ_and_not.c: Likewise.
103913         * tests/unictype/test-categ_byname.c: Likewise.
103914         * tests/unictype/test-categ_name.c: Likewise.
103915         * tests/unictype/test-categ_none.c: Likewise.
103916         * tests/unictype/test-categ_of.c: Likewise.
103917         * tests/unictype/test-categ_or.c: Likewise.
103918         * tests/unictype/test-categ_test_withtable.c: Likewise.
103919         * tests/unictype/test-combining.c: Likewise.
103920         * tests/unictype/test-decdigit.c: Likewise.
103921         * tests/unictype/test-digit.c: Likewise.
103922         * tests/unictype/test-mirror.c: Likewise.
103923         * tests/unictype/test-numeric.c: Likewise.
103924         * tests/unictype/test-pr_byname.c: Likewise.
103925         * tests/unictype/test-pr_test.c: Likewise.
103926         * tests/unictype/test-predicate-part1.h: Likewise.
103927         * tests/unictype/test-scripts.c: Likewise.
103928         * tests/unictype/test-sy_c_ident.c: Likewise.
103929         * tests/unictype/test-sy_java_ident.c: Likewise.
103930         * tests/unilbrk/test-u8-possible-linebreaks.c: Likewise.
103931         * tests/unilbrk/test-u8-width-linebreaks.c: Likewise.
103932         * tests/unilbrk/test-u16-possible-linebreaks.c: Likewise.
103933         * tests/unilbrk/test-u16-width-linebreaks.c: Likewise.
103934         * tests/unilbrk/test-u32-possible-linebreaks.c: Likewise.
103935         * tests/unilbrk/test-u32-width-linebreaks.c: Likewise.
103936         * tests/unilbrk/test-ulc-possible-linebreaks.c: Likewise.
103937         * tests/unilbrk/test-ulc-width-linebreaks.c: Likewise.
103938         * tests/uninorm/test-canonical-decomposition.c: Likewise.
103939         * tests/uninorm/test-compat-decomposition.c: Likewise.
103940         * tests/uninorm/test-composition.c: Likewise.
103941         * tests/uninorm/test-decomposing-form.c: Likewise.
103942         * tests/uninorm/test-decomposition.c: Likewise.
103943         * tests/uninorm/test-u8-nfc.c: Likewise.
103944         * tests/uninorm/test-u8-nfd.c: Likewise.
103945         * tests/uninorm/test-u8-nfkc.c: Likewise.
103946         * tests/uninorm/test-u8-nfkd.c: Likewise.
103947         * tests/uninorm/test-u8-normcmp.c: Likewise.
103948         * tests/uninorm/test-u8-normcoll.c: Likewise.
103949         * tests/uninorm/test-u16-nfc.c: Likewise.
103950         * tests/uninorm/test-u16-nfd.c: Likewise.
103951         * tests/uninorm/test-u16-nfkc.c: Likewise.
103952         * tests/uninorm/test-u16-nfkd.c: Likewise.
103953         * tests/uninorm/test-u16-normcmp.c: Likewise.
103954         * tests/uninorm/test-u16-normcoll.c: Likewise.
103955         * tests/uninorm/test-u32-nfc.c: Likewise.
103956         * tests/uninorm/test-u32-nfd.c: Likewise.
103957         * tests/uninorm/test-u32-nfkc.c: Likewise.
103958         * tests/uninorm/test-u32-nfkd.c: Likewise.
103959         * tests/uninorm/test-u32-normalize-big.c: Likewise.
103960         * tests/uninorm/test-u32-normcmp.c: Likewise.
103961         * tests/uninorm/test-u32-normcoll.c: Likewise.
103962         * tests/uninorm/test-uninorm-filter-nfc.c: Likewise.
103963         * tests/unistdio/test-u8-asnprintf1.c: Likewise.
103964         * tests/unistdio/test-u8-vasnprintf1.c: Likewise.
103965         * tests/unistdio/test-u8-vasnprintf2.c: Likewise.
103966         * tests/unistdio/test-u8-vasnprintf3.c: Likewise.
103967         * tests/unistdio/test-u8-vasprintf1.c: Likewise.
103968         * tests/unistdio/test-u8-vsnprintf1.c: Likewise.
103969         * tests/unistdio/test-u8-vsprintf1.c: Likewise.
103970         * tests/unistdio/test-u16-asnprintf1.c: Likewise.
103971         * tests/unistdio/test-u16-vasnprintf1.c: Likewise.
103972         * tests/unistdio/test-u16-vasnprintf2.c: Likewise.
103973         * tests/unistdio/test-u16-vasnprintf3.c: Likewise.
103974         * tests/unistdio/test-u16-vasprintf1.c: Likewise.
103975         * tests/unistdio/test-u16-vsnprintf1.c: Likewise.
103976         * tests/unistdio/test-u16-vsprintf1.c: Likewise.
103977         * tests/unistdio/test-u32-asnprintf1.c: Likewise.
103978         * tests/unistdio/test-u32-vasnprintf1.c: Likewise.
103979         * tests/unistdio/test-u32-vasnprintf2.c: Likewise.
103980         * tests/unistdio/test-u32-vasnprintf3.c: Likewise.
103981         * tests/unistdio/test-u32-vasprintf1.c: Likewise.
103982         * tests/unistdio/test-u32-vsnprintf1.c: Likewise.
103983         * tests/unistdio/test-u32-vsprintf1.c: Likewise.
103984         * tests/unistdio/test-ulc-asnprintf1.c: Likewise.
103985         * tests/unistdio/test-ulc-vasnprintf1.c: Likewise.
103986         * tests/unistdio/test-ulc-vasnprintf2.c: Likewise.
103987         * tests/unistdio/test-ulc-vasnprintf3.c: Likewise.
103988         * tests/unistdio/test-ulc-vasprintf1.c: Likewise.
103989         * tests/unistdio/test-ulc-vsnprintf1.c: Likewise.
103990         * tests/unistdio/test-ulc-vsprintf1.c: Likewise.
103991         * tests/uniwbrk/test-u8-wordbreaks.c: Likewise.
103992         * tests/uniwbrk/test-u16-wordbreaks.c: Likewise.
103993         * tests/uniwbrk/test-u32-wordbreaks.c: Likewise.
103994         * tests/uniwbrk/test-ulc-wordbreaks.c: Likewise.
103995         * tests/uniwidth/test-u8-strwidth.c: Likewise.
103996         * tests/uniwidth/test-u8-width.c: Likewise.
103997         * tests/uniwidth/test-u16-strwidth.c: Likewise.
103998         * tests/uniwidth/test-u16-width.c: Likewise.
103999         * tests/uniwidth/test-u32-strwidth.c: Likewise.
104000         * tests/uniwidth/test-u32-width.c: Likewise.
104001         * tests/uniwidth/test-uc_width.c: Likewise.
104002         * tests/uniwidth/test-uc_width2.c: Likewise.
104003         * modules/acl-tests (Files): Add tests/macros.h.
104004         * modules/areadlink-tests (Files): Likewise.
104005         * modules/areadlink-with-size-tests (Files): Likewise.
104006         * modules/areadlinkat-tests (Files): Likewise.
104007         * modules/areadlinkat-with-size-tests (Files): Likewise.
104008         * modules/argmatch-tests (Files): Likewise.
104009         * modules/argv-iter-tests (Files): Likewise.
104010         * modules/array-list-tests (Files): Likewise.
104011         * modules/array-mergesort-tests (Files): Likewise.
104012         * modules/array-oset-tests (Files): Likewise.
104013         * modules/avltree-list-tests (Files): Likewise.
104014         * modules/avltree-oset-tests (Files): Likewise.
104015         * modules/avltreehash-list-tests (Files): Likewise.
104016         * modules/base64-tests (Files): Likewise.
104017         * modules/binary-io-tests (Files): Likewise.
104018         * modules/bitrotate-tests (Files): Likewise.
104019         * modules/btowc-tests (Files): Likewise.
104020         * modules/byteswap-tests (Files): Likewise.
104021         * modules/c-ctype-tests (Files): Likewise.
104022         * modules/c-stack-tests (Files): Likewise.
104023         * modules/c-strcase-tests (Files): Likewise.
104024         * modules/c-strcasestr-tests (Files): Likewise.
104025         * modules/c-strstr-tests (Files): Likewise.
104026         * modules/canonicalize-lgpl-tests (Files): Likewise.
104027         * modules/canonicalize-tests (Files): Likewise.
104028         * modules/carray-list-tests (Files): Likewise.
104029         * modules/ceilf-tests (Files): Likewise.
104030         * modules/ceill-tests (Files): Likewise.
104031         * modules/chown-tests (Files): Likewise.
104032         * modules/cloexec-tests (Files): Likewise.
104033         * modules/copy-file-tests (Files): Likewise.
104034         * modules/count-one-bits-tests (Files): Likewise.
104035         * modules/dprintf-posix-tests (Files): Likewise.
104036         * modules/dup2-tests (Files): Likewise.
104037         * modules/dup3-tests (Files): Likewise.
104038         * modules/duplocale-tests (Files): Likewise.
104039         * modules/fbufmode-tests (Files): Likewise.
104040         * modules/fchdir-tests (Files): Likewise.
104041         * modules/fcntl-safer-tests (Files): Likewise.
104042         * modules/fcntl-tests (Files): Likewise.
104043         * modules/fdopendir-tests (Files): Likewise.
104044         * modules/fdutimensat-tests (Files): Likewise.
104045         * modules/fflush-tests (Files): Likewise.
104046         * modules/filevercmp-tests (Files): Likewise.
104047         * modules/flock-tests (Files): Likewise.
104048         * modules/floorf-tests (Files): Likewise.
104049         * modules/floorl-tests (Files): Likewise.
104050         * modules/fnmatch-tests (Files): Likewise.
104051         * modules/fopen-safer-tests (Files): Likewise.
104052         * modules/fopen-tests (Files): Likewise.
104053         * modules/fpending-tests (Files): Likewise.
104054         * modules/fprintf-posix-tests (Files): Likewise.
104055         * modules/fpurge-tests (Files): Likewise.
104056         * modules/freadable-tests (Files): Likewise.
104057         * modules/freadahead-tests (Files): Likewise.
104058         * modules/freading-tests (Files): Likewise.
104059         * modules/freadptr-tests (Files): Likewise.
104060         * modules/freadseek-tests (Files): Likewise.
104061         * modules/freopen-tests (Files): Likewise.
104062         * modules/frexp-nolibm-tests (Files): Likewise.
104063         * modules/frexp-tests (Files): Likewise.
104064         * modules/frexpl-nolibm-tests (Files): Likewise.
104065         * modules/frexpl-tests (Files): Likewise.
104066         * modules/fseek-tests (Files): Likewise.
104067         * modules/fseeko-tests (Files): Likewise.
104068         * modules/fstrcmp-tests (Files): Likewise.
104069         * modules/fsync-tests (Files): Likewise.
104070         * modules/ftell-tests (Files): Likewise.
104071         * modules/ftello-tests (Files): Likewise.
104072         * modules/func-tests (Files): Likewise.
104073         * modules/futimens-tests (Files): Likewise.
104074         * modules/fwritable-tests (Files): Likewise.
104075         * modules/fwriting-tests (Files): Likewise.
104076         * modules/getcwd-tests (Files): Likewise.
104077         * modules/getdate-tests (Files): Likewise.
104078         * modules/getdelim-tests (Files): Likewise.
104079         * modules/getdtablesize-tests (Files): Likewise.
104080         * modules/getgroups-tests (Files): Likewise.
104081         * modules/getline-tests (Files): Likewise.
104082         * modules/getndelim2-tests (Files): Likewise.
104083         * modules/glob-tests (Files): Likewise.
104084         * modules/hash-tests (Files): Likewise.
104085         * modules/i-ring-tests (Files): Likewise.
104086         * modules/iconv-tests (Files): Likewise.
104087         * modules/iconv_open-utf-tests (Files): Likewise.
104088         * modules/idpriv-drop-tests (Files): Likewise.
104089         * modules/idpriv-droptemp-tests (Files): Likewise.
104090         * modules/inet_ntop-tests (Files): Likewise.
104091         * modules/inet_pton-tests (Files): Likewise.
104092         * modules/isblank-tests (Files): Likewise.
104093         * modules/isfinite-tests (Files): Likewise.
104094         * modules/isinf-tests (Files): Likewise.
104095         * modules/isnan-tests (Files): Likewise.
104096         * modules/isnand-nolibm-tests (Files): Likewise.
104097         * modules/isnand-tests (Files): Likewise.
104098         * modules/isnanf-nolibm-tests (Files): Likewise.
104099         * modules/isnanf-tests (Files): Likewise.
104100         * modules/isnanl-nolibm-tests (Files): Likewise.
104101         * modules/isnanl-tests (Files): Likewise.
104102         * modules/lchown-tests (Files): Likewise.
104103         * modules/ldexpl-tests (Files): Likewise.
104104         * modules/link-tests (Files): Likewise.
104105         * modules/linkat-tests (Files): Likewise.
104106         * modules/linked-list-tests (Files): Likewise.
104107         * modules/linkedhash-list-tests (Files): Likewise.
104108         * modules/localename-tests (Files): Likewise.
104109         * modules/lseek-tests (Files): Likewise.
104110         * modules/lstat-tests (Files): Likewise.
104111         * modules/mbmemcasecmp-tests (Files): Likewise.
104112         * modules/mbmemcasecoll-tests (Files): Likewise.
104113         * modules/mbrtowc-tests (Files): Likewise.
104114         * modules/mbscasecmp-tests (Files): Likewise.
104115         * modules/mbscasestr-tests (Files): Likewise.
104116         * modules/mbschr-tests (Files): Likewise.
104117         * modules/mbscspn-tests (Files): Likewise.
104118         * modules/mbsinit-tests (Files): Likewise.
104119         * modules/mbsncasecmp-tests (Files): Likewise.
104120         * modules/mbsnrtowcs-tests (Files): Likewise.
104121         * modules/mbspbrk-tests (Files): Likewise.
104122         * modules/mbspcasecmp-tests (Files): Likewise.
104123         * modules/mbsrchr-tests (Files): Likewise.
104124         * modules/mbsrtowcs-tests (Files): Likewise.
104125         * modules/mbsspn-tests (Files): Likewise.
104126         * modules/mbsstr-tests (Files): Likewise.
104127         * modules/memchr-tests (Files): Likewise.
104128         * modules/memchr2-tests (Files): Likewise.
104129         * modules/memcmp-tests (Files): Likewise.
104130         * modules/memmem-tests (Files): Likewise.
104131         * modules/memrchr-tests (Files): Likewise.
104132         * modules/mkdir-tests (Files): Likewise.
104133         * modules/mkfifo-tests (Files): Likewise.
104134         * modules/mkfifoat-tests (Files): Likewise.
104135         * modules/mknod-tests (Files): Likewise.
104136         * modules/nanosleep-tests (Files): Likewise.
104137         * modules/nl_langinfo-tests (Files): Likewise.
104138         * modules/obstack-printf-tests (Files): Likewise.
104139         * modules/open-tests (Files): Likewise.
104140         * modules/openat-tests (Files): Likewise.
104141         * modules/pipe-filter-gi-tests (Files): Likewise.
104142         * modules/pipe-filter-ii-tests (Files): Likewise.
104143         * modules/pipe2-tests (Files): Likewise.
104144         * modules/popen-safer-tests (Files): Likewise.
104145         * modules/popen-tests (Files): Likewise.
104146         * modules/posixtm-tests (Files): Likewise.
104147         * modules/pread-tests (Files): Likewise.
104148         * modules/printf-frexp-tests (Files): Likewise.
104149         * modules/printf-frexpl-tests (Files): Likewise.
104150         * modules/printf-posix-tests (Files): Likewise.
104151         * modules/priv-set-tests (Files): Likewise.
104152         * modules/quotearg-tests (Files): Likewise.
104153         * modules/random_r-tests (Files): Likewise.
104154         * modules/rawmemchr-tests (Files): Likewise.
104155         * modules/rbtree-list-tests (Files): Likewise.
104156         * modules/rbtree-oset-tests (Files): Likewise.
104157         * modules/rbtreehash-list-tests (Files): Likewise.
104158         * modules/readlink-tests (Files): Likewise.
104159         * modules/remove-tests (Files): Likewise.
104160         * modules/rename-tests (Files): Likewise.
104161         * modules/renameat-tests (Files): Likewise.
104162         * modules/rmdir-tests (Files): Likewise.
104163         * modules/round-tests (Files): Likewise.
104164         * modules/roundf-tests (Files): Likewise.
104165         * modules/roundl-tests (Files): Likewise.
104166         * modules/safe-alloc-tests (Files): Likewise.
104167         * modules/setenv-tests (Files): Likewise.
104168         * modules/sigaction-tests (Files): Likewise.
104169         * modules/signbit-tests (Files): Likewise.
104170         * modules/sleep-tests (Files): Likewise.
104171         * modules/snprintf-posix-tests (Files): Likewise.
104172         * modules/snprintf-tests (Files): Likewise.
104173         * modules/sprintf-posix-tests (Files): Likewise.
104174         * modules/stat-tests (Files): Likewise.
104175         * modules/stat-time-tests (Files): Likewise.
104176         * modules/strcasestr-tests (Files): Likewise.
104177         * modules/strchrnul-tests (Files): Likewise.
104178         * modules/strerror-tests (Files): Likewise.
104179         * modules/striconv-tests (Files): Likewise.
104180         * modules/striconveh-tests (Files): Likewise.
104181         * modules/striconveha-tests (Files): Likewise.
104182         * modules/strsignal-tests (Files): Likewise.
104183         * modules/strstr-tests (Files): Likewise.
104184         * modules/strtod-tests (Files): Likewise.
104185         * modules/strverscmp-tests (Files): Likewise.
104186         * modules/symlink-tests (Files): Likewise.
104187         * modules/symlinkat-tests (Files): Likewise.
104188         * modules/trunc-tests (Files): Likewise.
104189         * modules/truncf-tests (Files): Likewise.
104190         * modules/truncl-tests (Files): Likewise.
104191         * modules/uname-tests (Files): Likewise.
104192         * modules/unicase/cased-tests (Files): Likewise.
104193         * modules/unicase/ignorable-tests (Files): Likewise.
104194         * modules/unicase/locale-language-tests (Files): Likewise.
104195         * modules/unicase/tolower-tests (Files): Likewise.
104196         * modules/unicase/totitle-tests (Files): Likewise.
104197         * modules/unicase/toupper-tests (Files): Likewise.
104198         * modules/unicase/u8-casecmp-tests (Files): Likewise.
104199         * modules/unicase/u8-casecoll-tests (Files): Likewise.
104200         * modules/unicase/u8-casefold-tests (Files): Likewise.
104201         * modules/unicase/u8-is-cased-tests (Files): Likewise.
104202         * modules/unicase/u8-is-casefolded-tests (Files): Likewise.
104203         * modules/unicase/u8-is-lowercase-tests (Files): Likewise.
104204         * modules/unicase/u8-is-titlecase-tests (Files): Likewise.
104205         * modules/unicase/u8-is-uppercase-tests (Files): Likewise.
104206         * modules/unicase/u8-tolower-tests (Files): Likewise.
104207         * modules/unicase/u8-totitle-tests (Files): Likewise.
104208         * modules/unicase/u8-toupper-tests (Files): Likewise.
104209         * modules/unicase/u16-casecmp-tests (Files): Likewise.
104210         * modules/unicase/u16-casecoll-tests (Files): Likewise.
104211         * modules/unicase/u16-casefold-tests (Files): Likewise.
104212         * modules/unicase/u16-is-cased-tests (Files): Likewise.
104213         * modules/unicase/u16-is-casefolded-tests (Files): Likewise.
104214         * modules/unicase/u16-is-lowercase-tests (Files): Likewise.
104215         * modules/unicase/u16-is-titlecase-tests (Files): Likewise.
104216         * modules/unicase/u16-is-uppercase-tests (Files): Likewise.
104217         * modules/unicase/u16-tolower-tests (Files): Likewise.
104218         * modules/unicase/u16-totitle-tests (Files): Likewise.
104219         * modules/unicase/u16-toupper-tests (Files): Likewise.
104220         * modules/unicase/u32-casecmp-tests (Files): Likewise.
104221         * modules/unicase/u32-casecoll-tests (Files): Likewise.
104222         * modules/unicase/u32-casefold-tests (Files): Likewise.
104223         * modules/unicase/u32-is-cased-tests (Files): Likewise.
104224         * modules/unicase/u32-is-casefolded-tests (Files): Likewise.
104225         * modules/unicase/u32-is-lowercase-tests (Files): Likewise.
104226         * modules/unicase/u32-is-titlecase-tests (Files): Likewise.
104227         * modules/unicase/u32-is-uppercase-tests (Files): Likewise.
104228         * modules/unicase/u32-tolower-tests (Files): Likewise.
104229         * modules/unicase/u32-totitle-tests (Files): Likewise.
104230         * modules/unicase/u32-toupper-tests (Files): Likewise.
104231         * modules/unicase/ulc-casecmp-tests (Files): Likewise.
104232         * modules/unicase/ulc-casecoll-tests (Files): Likewise.
104233         * modules/uniconv/u8-conv-from-enc-tests (Files): Likewise.
104234         * modules/uniconv/u8-conv-to-enc-tests (Files): Likewise.
104235         * modules/uniconv/u8-strconv-from-enc-tests (Files): Likewise.
104236         * modules/uniconv/u8-strconv-to-enc-tests (Files): Likewise.
104237         * modules/uniconv/u16-conv-from-enc-tests (Files): Likewise.
104238         * modules/uniconv/u16-conv-to-enc-tests (Files): Likewise.
104239         * modules/uniconv/u16-strconv-from-enc-tests (Files): Likewise.
104240         * modules/uniconv/u16-strconv-to-enc-tests (Files): Likewise.
104241         * modules/uniconv/u32-conv-from-enc-tests (Files): Likewise.
104242         * modules/uniconv/u32-conv-to-enc-tests (Files): Likewise.
104243         * modules/uniconv/u32-strconv-from-enc-tests (Files): Likewise.
104244         * modules/uniconv/u32-strconv-to-enc-tests (Files): Likewise.
104245         * modules/unictype/bidicategory-byname-tests (Files): Likewise.
104246         * modules/unictype/bidicategory-name-tests (Files): Likewise.
104247         * modules/unictype/bidicategory-of-tests (Files): Likewise.
104248         * modules/unictype/bidicategory-test-tests (Files): Likewise.
104249         * modules/unictype/block-list-tests (Files): Likewise.
104250         * modules/unictype/block-of-tests (Files): Likewise.
104251         * modules/unictype/block-test-tests (Files): Likewise.
104252         * modules/unictype/category-C-tests (Files): Likewise.
104253         * modules/unictype/category-Cc-tests (Files): Likewise.
104254         * modules/unictype/category-Cf-tests (Files): Likewise.
104255         * modules/unictype/category-Cn-tests (Files): Likewise.
104256         * modules/unictype/category-Co-tests (Files): Likewise.
104257         * modules/unictype/category-Cs-tests (Files): Likewise.
104258         * modules/unictype/category-L-tests (Files): Likewise.
104259         * modules/unictype/category-Ll-tests (Files): Likewise.
104260         * modules/unictype/category-Lm-tests (Files): Likewise.
104261         * modules/unictype/category-Lo-tests (Files): Likewise.
104262         * modules/unictype/category-Lt-tests (Files): Likewise.
104263         * modules/unictype/category-Lu-tests (Files): Likewise.
104264         * modules/unictype/category-M-tests (Files): Likewise.
104265         * modules/unictype/category-Mc-tests (Files): Likewise.
104266         * modules/unictype/category-Me-tests (Files): Likewise.
104267         * modules/unictype/category-Mn-tests (Files): Likewise.
104268         * modules/unictype/category-N-tests (Files): Likewise.
104269         * modules/unictype/category-Nd-tests (Files): Likewise.
104270         * modules/unictype/category-Nl-tests (Files): Likewise.
104271         * modules/unictype/category-No-tests (Files): Likewise.
104272         * modules/unictype/category-P-tests (Files): Likewise.
104273         * modules/unictype/category-Pc-tests (Files): Likewise.
104274         * modules/unictype/category-Pd-tests (Files): Likewise.
104275         * modules/unictype/category-Pe-tests (Files): Likewise.
104276         * modules/unictype/category-Pf-tests (Files): Likewise.
104277         * modules/unictype/category-Pi-tests (Files): Likewise.
104278         * modules/unictype/category-Po-tests (Files): Likewise.
104279         * modules/unictype/category-Ps-tests (Files): Likewise.
104280         * modules/unictype/category-S-tests (Files): Likewise.
104281         * modules/unictype/category-Sc-tests (Files): Likewise.
104282         * modules/unictype/category-Sk-tests (Files): Likewise.
104283         * modules/unictype/category-Sm-tests (Files): Likewise.
104284         * modules/unictype/category-So-tests (Files): Likewise.
104285         * modules/unictype/category-Z-tests (Files): Likewise.
104286         * modules/unictype/category-Zl-tests (Files): Likewise.
104287         * modules/unictype/category-Zp-tests (Files): Likewise.
104288         * modules/unictype/category-Zs-tests (Files): Likewise.
104289         * modules/unictype/category-and-not-tests (Files): Likewise.
104290         * modules/unictype/category-and-tests (Files): Likewise.
104291         * modules/unictype/category-byname-tests (Files): Likewise.
104292         * modules/unictype/category-name-tests (Files): Likewise.
104293         * modules/unictype/category-none-tests (Files): Likewise.
104294         * modules/unictype/category-of-tests (Files): Likewise.
104295         * modules/unictype/category-or-tests (Files): Likewise.
104296         * modules/unictype/category-test-withtable-tests (Files): Likewise.
104297         * modules/unictype/combining-class-tests (Files): Likewise.
104298         * modules/unictype/ctype-alnum-tests (Files): Likewise.
104299         * modules/unictype/ctype-alpha-tests (Files): Likewise.
104300         * modules/unictype/ctype-blank-tests (Files): Likewise.
104301         * modules/unictype/ctype-cntrl-tests (Files): Likewise.
104302         * modules/unictype/ctype-digit-tests (Files): Likewise.
104303         * modules/unictype/ctype-graph-tests (Files): Likewise.
104304         * modules/unictype/ctype-lower-tests (Files): Likewise.
104305         * modules/unictype/ctype-print-tests (Files): Likewise.
104306         * modules/unictype/ctype-punct-tests (Files): Likewise.
104307         * modules/unictype/ctype-space-tests (Files): Likewise.
104308         * modules/unictype/ctype-upper-tests (Files): Likewise.
104309         * modules/unictype/ctype-xdigit-tests (Files): Likewise.
104310         * modules/unictype/decimal-digit-tests (Files): Likewise.
104311         * modules/unictype/digit-tests (Files): Likewise.
104312         * modules/unictype/mirror-tests (Files): Likewise.
104313         * modules/unictype/numeric-tests (Files): Likewise.
104314         * modules/unictype/property-alphabetic-tests (Files): Likewise.
104315         * modules/unictype/property-ascii-hex-digit-tests (Files): Likewise.
104316         * modules/unictype/property-bidi-arabic-digit-tests (Files): Likewise.
104317         * modules/unictype/property-bidi-arabic-right-to-left-tests (Files):
104318         Likewise.
104319         * modules/unictype/property-bidi-block-separator-tests (Files):
104320         Likewise.
104321         * modules/unictype/property-bidi-boundary-neutral-tests (Files):
104322         Likewise.
104323         * modules/unictype/property-bidi-common-separator-tests (Files):
104324         Likewise.
104325         * modules/unictype/property-bidi-control-tests (Files): Likewise.
104326         * modules/unictype/property-bidi-embedding-or-override-tests (Files):
104327         Likewise.
104328         * modules/unictype/property-bidi-eur-num-separator-tests (Files):
104329         Likewise.
104330         * modules/unictype/property-bidi-eur-num-terminator-tests (Files):
104331         Likewise.
104332         * modules/unictype/property-bidi-european-digit-tests (Files): Likewise.
104333         * modules/unictype/property-bidi-hebrew-right-to-left-tests (Files):
104334         Likewise.
104335         * modules/unictype/property-bidi-left-to-right-tests (Files): Likewise.
104336         * modules/unictype/property-bidi-non-spacing-mark-tests (Files):
104337         Likewise.
104338         * modules/unictype/property-bidi-other-neutral-tests (Files): Likewise.
104339         * modules/unictype/property-bidi-pdf-tests (Files): Likewise.
104340         * modules/unictype/property-bidi-segment-separator-tests (Files):
104341         Likewise.
104342         * modules/unictype/property-bidi-whitespace-tests (Files): Likewise.
104343         * modules/unictype/property-byname-tests (Files): Likewise.
104344         * modules/unictype/property-combining-tests (Files): Likewise.
104345         * modules/unictype/property-composite-tests (Files): Likewise.
104346         * modules/unictype/property-currency-symbol-tests (Files): Likewise.
104347         * modules/unictype/property-dash-tests (Files): Likewise.
104348         * modules/unictype/property-decimal-digit-tests (Files): Likewise.
104349         * modules/unictype/property-default-ignorable-code-point-tests (Files):
104350         Likewise.
104351         * modules/unictype/property-deprecated-tests (Files): Likewise.
104352         * modules/unictype/property-diacritic-tests (Files): Likewise.
104353         * modules/unictype/property-extender-tests (Files): Likewise.
104354         * modules/unictype/property-format-control-tests (Files): Likewise.
104355         * modules/unictype/property-grapheme-base-tests (Files): Likewise.
104356         * modules/unictype/property-grapheme-extend-tests (Files): Likewise.
104357         * modules/unictype/property-grapheme-link-tests (Files): Likewise.
104358         * modules/unictype/property-hex-digit-tests (Files): Likewise.
104359         * modules/unictype/property-hyphen-tests (Files): Likewise.
104360         * modules/unictype/property-id-continue-tests (Files): Likewise.
104361         * modules/unictype/property-id-start-tests (Files): Likewise.
104362         * modules/unictype/property-ideographic-tests (Files): Likewise.
104363         * modules/unictype/property-ids-binary-operator-tests (Files): Likewise.
104364         * modules/unictype/property-ids-trinary-operator-tests (Files):
104365         Likewise.
104366         * modules/unictype/property-ignorable-control-tests (Files): Likewise.
104367         * modules/unictype/property-iso-control-tests (Files): Likewise.
104368         * modules/unictype/property-join-control-tests (Files): Likewise.
104369         * modules/unictype/property-left-of-pair-tests (Files): Likewise.
104370         * modules/unictype/property-line-separator-tests (Files): Likewise.
104371         * modules/unictype/property-logical-order-exception-tests (Files):
104372         Likewise.
104373         * modules/unictype/property-lowercase-tests (Files): Likewise.
104374         * modules/unictype/property-math-tests (Files): Likewise.
104375         * modules/unictype/property-non-break-tests (Files): Likewise.
104376         * modules/unictype/property-not-a-character-tests (Files): Likewise.
104377         * modules/unictype/property-numeric-tests (Files): Likewise.
104378         * modules/unictype/property-other-alphabetic-tests (Files): Likewise.
104379         * modules/unictype/property-other-default-ignorable-code-point-tests
104380         (Files): Likewise.
104381         * modules/unictype/property-other-grapheme-extend-tests (Files):
104382         Likewise.
104383         * modules/unictype/property-other-id-continue-tests (Files): Likewise.
104384         * modules/unictype/property-other-id-start-tests (Files): Likewise.
104385         * modules/unictype/property-other-lowercase-tests (Files): Likewise.
104386         * modules/unictype/property-other-math-tests (Files): Likewise.
104387         * modules/unictype/property-other-uppercase-tests (Files): Likewise.
104388         * modules/unictype/property-paired-punctuation-tests (Files): Likewise.
104389         * modules/unictype/property-paragraph-separator-tests (Files): Likewise.
104390         * modules/unictype/property-pattern-syntax-tests (Files): Likewise.
104391         * modules/unictype/property-pattern-white-space-tests (Files): Likewise.
104392         * modules/unictype/property-private-use-tests (Files): Likewise.
104393         * modules/unictype/property-punctuation-tests (Files): Likewise.
104394         * modules/unictype/property-quotation-mark-tests (Files): Likewise.
104395         * modules/unictype/property-radical-tests (Files): Likewise.
104396         * modules/unictype/property-sentence-terminal-tests (Files): Likewise.
104397         * modules/unictype/property-soft-dotted-tests (Files): Likewise.
104398         * modules/unictype/property-space-tests (Files): Likewise.
104399         * modules/unictype/property-terminal-punctuation-tests (Files):
104400         Likewise.
104401         * modules/unictype/property-test-tests (Files): Likewise.
104402         * modules/unictype/property-titlecase-tests (Files): Likewise.
104403         * modules/unictype/property-unassigned-code-value-tests (Files):
104404         Likewise.
104405         * modules/unictype/property-unified-ideograph-tests (Files): Likewise.
104406         * modules/unictype/property-uppercase-tests (Files): Likewise.
104407         * modules/unictype/property-variation-selector-tests (Files): Likewise.
104408         * modules/unictype/property-white-space-tests (Files): Likewise.
104409         * modules/unictype/property-xid-continue-tests (Files): Likewise.
104410         * modules/unictype/property-xid-start-tests (Files): Likewise.
104411         * modules/unictype/property-zero-width-tests (Files): Likewise.
104412         * modules/unictype/scripts-tests (Files): Likewise.
104413         * modules/unictype/syntax-c-ident-tests (Files): Likewise.
104414         * modules/unictype/syntax-c-whitespace-tests (Files): Likewise.
104415         * modules/unictype/syntax-java-ident-tests (Files): Likewise.
104416         * modules/unictype/syntax-java-whitespace-tests (Files): Likewise.
104417         * modules/unilbrk/u8-possible-linebreaks-tests (Files): Likewise.
104418         * modules/unilbrk/u8-width-linebreaks-tests (Files): Likewise.
104419         * modules/unilbrk/u16-possible-linebreaks-tests (Files): Likewise.
104420         * modules/unilbrk/u16-width-linebreaks-tests (Files): Likewise.
104421         * modules/unilbrk/u32-possible-linebreaks-tests (Files): Likewise.
104422         * modules/unilbrk/u32-width-linebreaks-tests (Files): Likewise.
104423         * modules/unilbrk/ulc-possible-linebreaks-tests (Files): Likewise.
104424         * modules/unilbrk/ulc-width-linebreaks-tests (Files): Likewise.
104425         * modules/uninorm/canonical-decomposition-tests (Files): Likewise.
104426         * modules/uninorm/compat-decomposition-tests (Files): Likewise.
104427         * modules/uninorm/composition-tests (Files): Likewise.
104428         * modules/uninorm/decomposing-form-tests (Files): Likewise.
104429         * modules/uninorm/decomposition-tests (Files): Likewise.
104430         * modules/uninorm/filter-tests (Files): Likewise.
104431         * modules/uninorm/nfc-tests (Files): Likewise.
104432         * modules/uninorm/nfd-tests (Files): Likewise.
104433         * modules/uninorm/nfkc-tests (Files): Likewise.
104434         * modules/uninorm/nfkd-tests (Files): Likewise.
104435         * modules/uninorm/u8-normcmp-tests (Files): Likewise.
104436         * modules/uninorm/u8-normcoll-tests (Files): Likewise.
104437         * modules/uninorm/u16-normcmp-tests (Files): Likewise.
104438         * modules/uninorm/u16-normcoll-tests (Files): Likewise.
104439         * modules/uninorm/u32-normcmp-tests (Files): Likewise.
104440         * modules/uninorm/u32-normcoll-tests (Files): Likewise.
104441         * modules/unistdio/u8-asnprintf-tests (Files): Likewise.
104442         * modules/unistdio/u8-vasnprintf-tests (Files): Likewise.
104443         * modules/unistdio/u8-vasprintf-tests (Files): Likewise.
104444         * modules/unistdio/u8-vsnprintf-tests (Files): Likewise.
104445         * modules/unistdio/u8-vsprintf-tests (Files): Likewise.
104446         * modules/unistdio/u16-asnprintf-tests (Files): Likewise.
104447         * modules/unistdio/u16-vasnprintf-tests (Files): Likewise.
104448         * modules/unistdio/u16-vasprintf-tests (Files): Likewise.
104449         * modules/unistdio/u16-vsnprintf-tests (Files): Likewise.
104450         * modules/unistdio/u16-vsprintf-tests (Files): Likewise.
104451         * modules/unistdio/u32-asnprintf-tests (Files): Likewise.
104452         * modules/unistdio/u32-vasnprintf-tests (Files): Likewise.
104453         * modules/unistdio/u32-vasprintf-tests (Files): Likewise.
104454         * modules/unistdio/u32-vsnprintf-tests (Files): Likewise.
104455         * modules/unistdio/u32-vsprintf-tests (Files): Likewise.
104456         * modules/unistdio/ulc-asnprintf-tests (Files): Likewise.
104457         * modules/unistdio/ulc-vasnprintf-tests (Files): Likewise.
104458         * modules/unistdio/ulc-vasprintf-tests (Files): Likewise.
104459         * modules/unistdio/ulc-vsnprintf-tests (Files): Likewise.
104460         * modules/unistdio/ulc-vsprintf-tests (Files): Likewise.
104461         * modules/uniwbrk/u8-wordbreaks-tests (Files): Likewise.
104462         * modules/uniwbrk/u16-wordbreaks-tests (Files): Likewise.
104463         * modules/uniwbrk/u32-wordbreaks-tests (Files): Likewise.
104464         * modules/uniwbrk/ulc-wordbreaks-tests (Files): Likewise.
104465         * modules/uniwidth/u8-strwidth-tests (Files): Likewise.
104466         * modules/uniwidth/u8-width-tests (Files): Likewise.
104467         * modules/uniwidth/u16-strwidth-tests (Files): Likewise.
104468         * modules/uniwidth/u16-width-tests (Files): Likewise.
104469         * modules/uniwidth/u32-strwidth-tests (Files): Likewise.
104470         * modules/uniwidth/u32-width-tests (Files): Likewise.
104471         * modules/uniwidth/width-tests (Files): Likewise.
104472         * modules/unlink-tests (Files): Likewise.
104473         * modules/unsetenv-tests (Files): Likewise.
104474         * modules/usleep-tests (Files): Likewise.
104475         * modules/utimens-tests (Files): Likewise.
104476         * modules/utimensat-tests (Files): Likewise.
104477         * modules/vasnprintf-posix-tests (Files): Likewise.
104478         * modules/vasnprintf-tests (Files): Likewise.
104479         * modules/vasprintf-posix-tests (Files): Likewise.
104480         * modules/vasprintf-tests (Files): Likewise.
104481         * modules/vdprintf-posix-tests (Files): Likewise.
104482         * modules/vfprintf-posix-tests (Files): Likewise.
104483         * modules/vprintf-posix-tests (Files): Likewise.
104484         * modules/vsnprintf-posix-tests (Files): Likewise.
104485         * modules/vsnprintf-tests (Files): Likewise.
104486         * modules/vsprintf-posix-tests (Files): Likewise.
104487         * modules/wcrtomb-tests (Files): Likewise.
104488         * modules/wcsnrtombs-tests (Files): Likewise.
104489         * modules/wcsrtombs-tests (Files): Likewise.
104490         * modules/wctype-tests (Files): Likewise.
104491         * modules/wcwidth-tests (Files): Likewise.
104492         * modules/xmemdup0-tests (Files): Likewise.
104493         * modules/xprintf-posix-tests (Files): Likewise.
104494         * modules/xvasprintf-tests (Files): Likewise.
104496 2009-12-24  Eric Blake  <ebb9@byu.net>
104498         test-nanosleep: fix typo
104499         * tests/test-nanosleep.c (SIGNATURE_CHECK): Fix typo in previous
104500         patch.
104501         Reported by Bruno Haible.
104503 2009-12-24  Bruno Haible  <bruno@clisp.org>
104505         Reduce namespace pollution on glibc systems.
104506         * lib/inttypes.in.h: Don't include <stdint.h> on glibc systems.
104507         * lib/stdlib.in.h: Don't include <stdint.h>, <unistd.h> on glibc
104508         systems.
104509         * lib/unistd.in.h: Don't include <stdio.h>, <fcntl.h>, <stdlib.h>,
104510         <getopt.h> on glibc systems.
104511         * lib/fcntl.in.h: Don't include <sys/stat.h>, <unistd.h> on glibc
104512         systems.
104513         * lib/fcntl.c: Include <unistd.h> here instead.
104515 2009-12-24  Bruno Haible  <bruno@clisp.org>
104517         * lib/stdlib.in.h (includes): Fix typo in today's commit.
104519 2009-12-24  Eric Blake  <ebb9@byu.net>
104521         tests: add signature checks
104522         * tests/signature.h (SIGNATURE_CHECK): New file.
104523         * modules/atexit-tests (Files): Use it.
104524         * modules/btowc-tests (Files): Likewise.
104525         * modules/canonicalize-lgpl-tests (Files): Likewise.
104526         * modules/ceilf-tests (Files): Likewise.
104527         * modules/ceill-tests (Files): Likewise.
104528         * modules/chown-tests (Files): Likewise.
104529         * modules/dprintf-posix-tests (Files): Likewise.
104530         * modules/dup2-tests (Files): Likewise.
104531         * modules/dup3-tests (Files): Likewise.
104532         * modules/duplocale-tests (Files): Likewise.
104533         * modules/fchdir-tests (Files): Likewise.
104534         * modules/fcntl-tests (Files): Likewise.
104535         * modules/fdopendir-tests (Files): Likewise.
104536         * modules/fflush-tests (Files): Likewise.
104537         * modules/flock-tests (Files): Likewise.
104538         * modules/floorf-tests (Files): Likewise.
104539         * modules/floorl-tests (Files): Likewise.
104540         * modules/fnmatch-tests (Files): Likewise.
104541         * modules/fopen-tests (Files): Likewise.
104542         * modules/fprintf-posix-tests (Files): Likewise.
104543         * modules/freopen-tests (Files): Likewise.
104544         * modules/frexp-nolibm-tests (Files): Likewise.
104545         * modules/frexp-tests (Files): Likewise.
104546         * modules/frexpl-nolibm-tests (Files): Likewise.
104547         * modules/frexpl-tests (Files): Likewise.
104548         * modules/fseek-tests (Files): Likewise.
104549         * modules/fseeko-tests (Files): Likewise.
104550         * modules/fsync-tests (Files): Likewise.
104551         * modules/ftell-tests (Files): Likewise.
104552         * modules/ftello-tests (Files): Likewise.
104553         * modules/futimens-tests (Files): Likewise.
104554         * modules/getaddrinfo-tests (Files): Likewise.
104555         * modules/getcwd-tests (Files): Likewise.
104556         * modules/getdelim-tests (Files): Likewise.
104557         * modules/getdtablesize-tests (Files): Likewise.
104558         * modules/getgroups-tests (Files): Likewise.
104559         * modules/gethostname-tests (Files): Likewise.
104560         * modules/getline-tests (Files): Likewise.
104561         * modules/getopt-posix-tests (Files): Likewise.
104562         * modules/gettimeofday-tests (Files): Likewise.
104563         * modules/glob-tests (Files): Likewise.
104564         * modules/iconv-tests (Files): Likewise.
104565         * modules/inet_ntop-tests (Files): Likewise.
104566         * modules/inet_pton-tests (Files): Likewise.
104567         * modules/isblank-tests (Files): Likewise.
104568         * modules/lchown-tests (Files): Likewise.
104569         * modules/ldexpl-tests (Files): Likewise.
104570         * modules/link-tests (Files): Likewise.
104571         * modules/linkat-tests (Files): Likewise.
104572         * modules/lseek-tests (Files): Likewise.
104573         * modules/lstat-tests (Files): Likewise.
104574         * modules/mbrtowc-tests (Files): Likewise.
104575         * modules/mbsinit-tests (Files): Likewise.
104576         * modules/mbsnrtowcs-tests (Files): Likewise.
104577         * modules/mbsrtowcs-tests (Files): Likewise.
104578         * modules/memchr-tests (Files): Likewise.
104579         * modules/memcmp-tests (Files): Likewise.
104580         * modules/memmem-tests (Files): Likewise.
104581         * modules/memrchr-tests (Files): Likewise.
104582         * modules/mkdir-tests (Files): Likewise.
104583         * modules/mkfifo-tests (Files): Likewise.
104584         * modules/mkfifoat-tests (Files): Likewise.
104585         * modules/mknod-tests (Files): Likewise.
104586         * modules/nanosleep-tests (Files): Likewise.
104587         * modules/nl_langinfo-tests (Files): Likewise.
104588         * modules/obstack-printf-tests (Files): Likewise.
104589         * modules/open-tests (Files): Likewise.
104590         * modules/openat-tests (Files): Likewise.
104591         * modules/perror-tests (Files): Likewise.
104592         * modules/pipe2-tests (Files): Likewise.
104593         * modules/poll-tests (Files): Likewise.
104594         * modules/popen-tests (Files): Likewise.
104595         * modules/posix_spawn-tests (Files): Likewise.
104596         * modules/posix_spawnp-tests (Files): Likewise.
104597         * modules/pread-tests (Files): Likewise.
104598         * modules/printf-posix-tests (Files): Likewise.
104599         * modules/pty-tests (Files): Likewise.
104600         * modules/random_r-tests (Files): Likewise.
104601         * modules/rawmemchr-tests (Files): Likewise.
104602         * modules/readlink-tests (Files): Likewise.
104603         * modules/remove-tests (Files): Likewise.
104604         * modules/rename-tests (Files): Likewise.
104605         * modules/renameat-tests (Files): Likewise.
104606         * modules/rmdir-tests (Files): Likewise.
104607         * modules/round-tests (Files): Likewise.
104608         * modules/roundf-tests (Files): Likewise.
104609         * modules/roundl-tests (Files): Likewise.
104610         * modules/select-tests (Files): Likewise.
104611         * modules/setenv-tests (Files): Likewise.
104612         * modules/sigaction-tests (Files): Likewise.
104613         * modules/sleep-tests (Files): Likewise.
104614         * modules/snprintf-posix-tests (Files): Likewise.
104615         * modules/snprintf-tests (Files): Likewise.
104616         * modules/sprintf-posix-tests (Files): Likewise.
104617         * modules/stat-tests (Files): Likewise.
104618         * modules/strcasestr-tests (Files): Likewise.
104619         * modules/strchrnul-tests (Files): Likewise.
104620         * modules/strerror-tests (Files): Likewise.
104621         * modules/strsignal-tests (Files): Likewise.
104622         * modules/strstr-tests (Files): Likewise.
104623         * modules/strtod-tests (Files): Likewise.
104624         * modules/strverscmp-tests (Files): Likewise.
104625         * modules/symlink-tests (Files): Likewise.
104626         * modules/symlinkat-tests (Files): Likewise.
104627         * modules/times-tests (Files): Likewise.
104628         * modules/trunc-tests (Files): Likewise.
104629         * modules/truncf-tests (Files): Likewise.
104630         * modules/truncl-tests (Files): Likewise.
104631         * modules/tsearch-tests (Files): Likewise.
104632         * modules/uname-tests (Files): Likewise.
104633         * modules/unlink-tests (Files): Likewise.
104634         * modules/unsetenv-tests (Files): Likewise.
104635         * modules/usleep-tests (Files): Likewise.
104636         * modules/utimensat-tests (Files): Likewise.
104637         * modules/vasprintf-tests (Files): Likewise.
104638         * modules/vdprintf-posix-tests (Files): Likewise.
104639         * modules/vfprintf-posix-tests (Files): Likewise.
104640         * modules/vprintf-posix-tests (Files): Likewise.
104641         * modules/vsnprintf-posix-tests (Files): Likewise.
104642         * modules/vsnprintf-tests (Files): Likewise.
104643         * modules/vsprintf-posix-tests (Files): Likewise.
104644         * modules/wcrtomb-tests (Files): Likewise.
104645         * modules/wcsnrtombs-tests (Files): Likewise.
104646         * modules/wcsrtombs-tests (Files): Likewise.
104647         * modules/wcwidth-tests (Files): Likewise.
104648         * tests/test-isfinite.c (isfinite): Ensure macro declaration.
104649         * tests/test-isinf.c (isinf): Likewise.
104650         * tests/test-isnan.c (isnan): Likewise.
104651         * tests/test-signbit.c (signbit): Likewise.
104652         * tests/test-select.c (FD_CLR, FD_ISSET, FD_SET, FD_ZERO): Ensure
104653         declaration, either as macro or with correct signature.
104654         (select): Ensure function under test is declared with correct
104655         signature in correct header.
104656         * tests/test-atexit.c (atexit): Likewise.
104657         * tests/test-btowc.c (btowc): Likewise.
104658         * tests/test-canonicalize-lgpl.c (realpath)
104659         (canonicalize_file_name): Likewise.
104660         * tests/test-ceilf1.c (ceilf): Likewise.
104661         * tests/test-ceill.c (ceill): Likewise.
104662         * tests/test-chown.c (chown): Likewise.
104663         * tests/test-dprintf-posix.c (dprintf): Likewise.
104664         * tests/test-dup2.c (dup2): Likewise.
104665         * tests/test-dup3.c (dup3): Likewise.
104666         * tests/test-duplocale.c (duplocale): Likewise.
104667         * tests/test-fchdir.c (fchdir): Likewise.
104668         * tests/test-fchownat.c (fchownat): Likewise.
104669         * tests/test-fcntl.c (fcntl): Likewise.
104670         * tests/test-fdopendir.c (fdopendir): Likewise.
104671         * tests/test-fflush.c (fflush): Likewise.
104672         * tests/test-flock.c (flock): Likewise.
104673         * tests/test-floorf1.c (floorf): Likewise.
104674         * tests/test-floorl.c (floorl): Likewise.
104675         * tests/test-fnmatch.c (fnmatch): Likewise.
104676         * tests/test-fopen.c (fopen): Likewise.
104677         * tests/test-fprintf-posix.c (fprintf): Likewise.
104678         * tests/test-freopen.c (freopen): Likewise.
104679         * tests/test-frexp.c (frexp): Likewise.
104680         * tests/test-frexpl.c (frexpl): Likewise.
104681         * tests/test-fseek.c (fseek): Likewise.
104682         * tests/test-fseeko.c (fseeko): Likewise.
104683         * tests/test-fstatat.c (fstatat): Likewise.
104684         * tests/test-fsync.c (fsync): Likewise.
104685         * tests/test-ftell.c (ftell): Likewise.
104686         * tests/test-ftello.c (ftello): Likewise.
104687         * tests/test-futimens.c (futimens): Likewise.
104688         * tests/test-getaddrinfo.c (getaddrinfo, freeaddrinfo)
104689         (gai_strerror): Likewise.
104690         * tests/test-getcwd.c (getcwd): Likewise.
104691         * tests/test-getdelim.c (getdelim): Likewise.
104692         * tests/test-getdtablesize.c (getdtablesize): Likewise.
104693         * tests/test-getgroups.c (getgroups): Likewise.
104694         * tests/test-gethostname.c (gethostname): Likewise.
104695         * tests/test-getline.c (getline): Likewise.
104696         * tests/test-getopt.c (getopt, getopt_long, getopt_long_only):
104697         Likewise.
104698         * tests/test-gettimeofday.c (gettimeofday): Likewise.
104699         * tests/test-glob.c (glob, globfree): Likewise.
104700         * tests/test-iconv.c (iconv, iconv_open, iconv_close): Likewise.
104701         * tests/test-inet_ntop.c (inet_ntop): Likewise.
104702         * tests/test-inet_pton.c (inet_pton): Likewise.
104703         * tests/test-isblank.c (isblank): Likewise.
104704         * tests/test-lchown.c (lchown): Likewise.
104705         * tests/test-ldexpl.c (ldexpl): Likewise.
104706         * tests/test-link.c (link): Likewise.
104707         * tests/test-linkat.c (linkat): Likewise.
104708         * tests/test-lseek.c (lseek): Likewise.
104709         * tests/test-lstat.c (lstat): Likewise.
104710         * tests/test-mbrtowc.c (mbrtowc): Likewise.
104711         * tests/test-mbsinit.c (mbsinit): Likewise.
104712         * tests/test-mbsnrtowcs.c (mbsnrtowcs): Likewise.
104713         * tests/test-mbsrtowcs.c (mbsrtowcs): Likewise.
104714         * tests/test-memchr.c (memchr): Likewise.
104715         * tests/test-memcmp.c (memcmp): Likewise.
104716         * tests/test-memmem.c (memmem): Likewise.
104717         * tests/test-memrchr.c (memrchr): Likewise.
104718         * tests/test-mkdir.c (mkdir): Likewise.
104719         * tests/test-mkdirat.c (mkdirat): Likewise.
104720         * tests/test-mkfifo.c (mkfifo): Likewise.
104721         * tests/test-mkfifoat.c (mkfifoat, mknodat): Likewise.
104722         * tests/test-mknod.c (mknod): Likewise.
104723         * tests/test-nanosleep.c (nanosleep): Likewise.
104724         * tests/test-nl_langinfo.c (nl_langinfo): Likewise.
104725         * tests/test-obstack-printf.c (obstack_printf, obstack_vprintf):
104726         Likewise.
104727         * tests/test-open.c (open): Likewise.
104728         * tests/test-openat.c (openat): Likewise.
104729         * tests/test-perror.c (perror): Likewise.
104730         * tests/test-pipe2.c (pipe2): Likewise.
104731         * tests/test-poll.c (poll): Likewise.
104732         * tests/test-popen.c (popen, pclose): Likewise.
104733         * tests/test-posix_spawn1.c (posix_spawnp, posix_spawnattr_init)
104734         (posix_spawnattr_destroy, posix_spawnattr_setsigmask)
104735         (posix_spawnattr_setflags, posix_spawn_file_actions_init)
104736         (posix_spawn_file_actions_destroy)
104737         (posix_spawn_file_actions_addclose)
104738         (posix_spawn_file_actions_addopen)
104739         (posix_spawn_file_actions_adddup2): Likewise.
104740         * tests/test-posix_spawn3.c (posix_spawn): Likewise.
104741         * tests/test-pread.c (pread): Likewise.
104742         * tests/test-printf-posix.c (printf): Likewise.
104743         * tests/test-pty.c (openpty, forkpty): Likewise.
104744         * tests/test-random_r.c (srandom_r, initstate_r, setstate_r)
104745         (random_r): Likewise.
104746         * tests/test-rawmemchr.c (rawmemchr): Likewise.
104747         * tests/test-readlink.c (readlink): Likewise.
104748         * tests/test-remove.c (remove): Likewise.
104749         * tests/test-rename.c (rename): Likewise.
104750         * tests/test-renameat.c (renameat): Likewise.
104751         * tests/test-rmdir.c (rmdir): Likewise.
104752         * tests/test-round1.c (round): Likewise.
104753         * tests/test-roundf1.c (roundf): Likewise.
104754         * tests/test-roundl.c (roundl): Likewise.
104755         * tests/test-setenv.c (setenv): Likewise.
104756         * tests/test-sigaction.c (sigaction): Likewise.
104757         * tests/test-sleep.c (sleep): Likewise.
104758         * tests/test-snprintf.c (snprintf): Likewise.
104759         * tests/test-sprintf-posix.c (sprintf): Likewise.
104760         * tests/test-stat.c (stat): Likewise.
104761         * tests/test-stpncpy.c (stpncpy): Likewise.
104762         * tests/test-strcasestr.c (strcasestr): Likewise.
104763         * tests/test-strchrnul.c (strchrnul): Likewise.
104764         * tests/test-strerror.c (strerror): Likewise.
104765         * tests/test-strsignal.c (strsignal): Likewise.
104766         * tests/test-strstr.c (strstr): Likewise.
104767         * tests/test-strtod.c (strtod): Likewise.
104768         * tests/test-strverscmp.c (strverscmp): Likewise.
104769         * tests/test-symlink.c (symlink): Likewise.
104770         * tests/test-symlinkat.c (symlinkat, readlinkat): Likewise.
104771         * tests/test-times.c (times): Likewise.
104772         * tests/test-trunc1.c (trunc): Likewise.
104773         * tests/test-truncf1.c (truncf): Likewise.
104774         * tests/test-truncl.c (truncl): Likewise.
104775         * tests/test-tsearch.c (tdelete, tfind, tsearch, twalk):
104776         Likewise.
104777         * tests/test-uname.c (uname): Likewise.
104778         * tests/test-unlink.c (unlink): Likewise.
104779         * tests/test-unlinkat.c (unlinkat): Likewise.
104780         * tests/test-unsetenv.c (unsetenv): Likewise.
104781         * tests/test-usleep.c (usleep): Likewise.
104782         * tests/test-utimensat.c (utimensat): Likewise.
104783         * tests/test-vasprintf.c (asprintf, vasprintf): Likewise.
104784         * tests/test-vdprintf-posix.c (vdprintf): Likewise.
104785         * tests/test-vfprintf-posix.c (vfprintf): Likewise.
104786         * tests/test-vprintf-posix.c (vprintf): Likewise.
104787         * tests/test-vsnprintf.c (vsnprintf): Likewise.
104788         * tests/test-vsprintf-posix.c (vsprintf): Likewise.
104789         * tests/test-wcrtomb.c (wcrtomb): Likewise.
104790         * tests/test-wcsnrtombs.c (wcsnrtombs): Likewise.
104791         * tests/test-wcsrtombs.c (wcsrtombs): Likewise.
104792         * tests/test-wcwidth.c (wcwidth): Likewise.
104794         build: pull in conditional headers during GNULIB_POSIXCHECK
104795         * lib/stdio.in.h (includes): Using GNULIB_POSIXCHECK also requires
104796         definitions from any conditionally-included headers.
104797         * lib/stdlib.in.h (includes): Likewise.
104798         * lib/unistd.in.h (includes): Likewise.
104800 2009-12-24  Bruno Haible  <bruno@clisp.org>
104802         * tests/test-argv-iter.c: Include header file being tested immediately
104803         after config.h.
104804         * tests/test-base64.c: Likewise.
104805         * tests/test-flock.c: Likewise.
104806         * tests/test-fsync.c: Likewise.
104807         * tests/test-getdate.c: Likewise.
104808         * tests/test-getndelim2.c: Likewise.
104809         * tests/test-isfinite.c: Likewise.
104810         * tests/test-isinf.c: Likewise.
104811         * tests/test-strerror.c: Likewise.
104812         * tests/test-strsignal.c: Likewise.
104814 2009-12-23  Eric Blake  <ebb9@byu.net>
104816         unistd: work around cygwin bug
104817         * lib/unistd.in.h (includes): Pick up headers needed for cygwin.
104818         * doc/posix-functions/unlinkat.texi (unlinkat): Document the bug.
104819         * doc/posix-functions/symlinkat.texi (symlinkat): Likewise.
104821 2009-12-23  Bruno Haible  <bruno@clisp.org>
104823         localename: More tests.
104824         * tests/test-localename.c (SIZEOF): New macro.
104825         (categories): New variable.
104826         (test_locale_name, test_locale_name_posix, test_locale_name_environ,
104827         test_locale_name_default): Add test w.r.t. thread locale.
104828         (test_locale_name_thread): New function.
104829         (main): Invoke it.
104831         localename: Make aware of thread locale.
104832         * lib/localename.h (gl_locale_name_thread): New declaration.
104833         (gl_locale_name, gl_locale_name_posix, gl_locale_name_default): Clarify
104834         behaviour with respect to thread locale.
104835         * lib/localename.c: Include <limits.h>, <stddef.h>, <xlocale.h>,
104836         <langinfo.h>, glthread/lock.h.
104837         (SIZE_BITS): New macro.
104838         (string_hash): New function.
104839         (struct hash_node): New type.
104840         (HASH_TABLE_SIZE): New macro.
104841         (struniq_hash_table, struniq_lock): New variables.
104842         (struniq): New function.
104843         (gl_locale_name_thread): New function.
104844         (gl_locale_name): Invoke it.
104845         * m4/localename.m4 (gl_LOCALENAME): Test for uselocale function.
104846         * modules/localename (Depends-on): Add lock.
104847         Reported by Mike Gran <spk121@yahoo.com>.
104849 2009-12-23  Eric Blake  <ebb9@byu.net>
104851         va-args: new module
104852         * modules/va-args: New file.
104853         * m4/va-args.m4 (gl_VA_ARGS): Likewise.
104854         * MODULES.html.sh (Core language properties): Mention it.
104856         gnulib-common: prefer _GL_UNUSED over _UNUSED_PARAMETER_
104857         * m4/gnulib-common.m4 (gl_COMMON): Create a more-appropriately
104858         named alias for __attribute__((__unused__)).
104859         * lib/chown.c: Update client.
104860         * lib/fchmodat.c: Likewise.
104861         * lib/fts.c: Likewise.
104862         * lib/getdate.y: Likewise.
104863         * lib/getgroups.c: Likewise.
104864         * lib/getopt.c: Likewise.
104865         * lib/getugroups.c: Likewise.
104866         * lib/mkdir.c: Likewise.
104867         * lib/mkfifo.c: Likewise.
104868         * lib/mkfifoat.c: Likewise.
104869         * lib/mknod.c: Likewise.
104870         * lib/mknodat.c: Likewise.
104871         * lib/readlink.c: Likewise.
104872         * lib/se-context.in.h: Likewise.
104873         * lib/se-selinux.in.h: Likewise.
104874         * lib/sockets.c: Likewise.
104875         * lib/symlink.c: Likewise.
104876         * lib/symlinkat.c: Likewise.
104877         * lib/unicodeio.c: Likewise.
104878         * lib/unistr.h: Likewise.
104879         * tests/test-areadlink.c: Likewise.
104880         * tests/test-areadlinkat.c: Likewise.
104881         * tests/test-filenamecat.c: Likewise.
104882         * tests/test-fseeko.c: Likewise.
104883         * tests/test-ftello.c: Likewise.
104884         * tests/test-getdate.c: Likewise.
104885         * tests/test-getgroups.c: Likewise.
104886         * tests/test-gethostname.c: Likewise.
104887         * tests/test-quotearg.c: Likewise.
104888         * tests/test-version-etc.c: Likewise.
104889         * tests/test-xalloc-die.c: Likewise.
104890         * tests/test-xfprintf-posix.c: Likewise.
104891         * tests/test-xprintf-posix.c: Likewise.
104892         * tests/test-xvasprintf.c: Likewise.
104894         tests: avoid compiler warnings
104895         * tests/test-fcntl.c (main): Delete unused parameters.
104896         * tests/test-freopen-safer.c (main): Likewise.
104897         * tests/test-xalloc-die.c (main): Mark unused parameters.
104898         * tests/test-fseeko.c (main): Likewise.
104899         * tests/test-ftello.c (main): Likewise.
104900         * tests/test-nanosleep.c (main): Avoid declaration warning.
104901         * tests/test-sleep.c (main): Likewise.
104902         * tests/test-unsetenv.c (main): Silence warning about string
104903         literal.
104904         * m4/setenv.m4 (gl_FUNC_UNSETENV): Likewise.
104906 2009-12-23  Bruno Haible  <bruno@clisp.org>
104908         * tests/test-localename.c (test_locale_name): New function, extracted
104909         from main. Also test mixed situations.
104910         (test_locale_name_posix, test_locale_name_environ,
104911         test_locale_name_default): New functions.
104912         (main): Invoke them all.
104913         * modules/localename-tests (configure.ac): Test for newlocale.
104915 2009-12-23  Bruno Haible  <bruno@clisp.org>
104917         unistd: Ensure getcwd gets declared before being overridden.
104918         * lib/unistd.in.h: Conditionally include <io.h>.
104920 2009-12-22  Bruno Haible  <bruno@clisp.org>
104922         wchar: Diagnose broken combination of glibc and gcc versions and flags.
104923         * m4/wchar.m4 (gl_WCHAR_H_INLINE_OK): New macro.
104924         (gl_WCHAR_H): Invoke it.
104925         * m4/btowc.m4 (gl_FUNC_BTOWC): Require it.
104926         * doc/posix-headers/wchar.texi: Mention the interoperability problem.
104927         Reported by Karl Berry <karl@freefriends.org>.
104929 2009-12-22  Eric Blake  <ebb9@byu.net>
104931         math, unistd: avoid redundant includes
104932         * lib/math.in.h (isnan): No need to re-include <math.h>.
104933         * lib/unistd.in.h (getcwd): Likewise, for <stdlib.h>.
104935         getsubopt: work around cygwin bug
104936         * lib/stdlib.in.h (includes): Move unistd inclusion sooner, to
104937         avoid conflicting with system getsubopt.
104938         * doc/posix-functions/getsubopt.texi (getsubopt): Document the
104939         bug.
104941         getopt: synchronize from glibc
104942         * lib/getopt.c (_getopt_initialize, _getopt_internal_r): Swap
104943         parameter order.  Adjust all callers.
104944         (_getopt_internal_r, main): Adjust quoting in error messages.
104945         Drop considerations for outdated POSIX 1003.2 error message.
104946         * lib/getopt1.c (_getopt_long_r, _getopt_long_only_r): Adjust
104947         callers.
104948         * lib/getopt_int.h (_getopt_internal_r): Adjust prototype.
104950         test-getopt: test stderr behavior
104951         * modules/getopt-posix-tests (Depends-on): Add dup2.
104952         * tests/test-getopt.c (ASSERT): Avoid stderr.
104953         (main): Move stderr to a temporary file.
104954         * tests/test-getopt.h (getopt_loop): No longer manipulate opterr.
104955         Instead, add parameter to inform caller if output occurred.
104956         (test_getopt): Adjust all existing tests to expect silence, and
104957         add new tests of leading ":".
104958         * doc/glibc-functions/getopt_long.texi (getopt_long): Document
104959         glibc shortcomings with leading "-:" or "+:" in optstring.
104960         * doc/glibc-functions/getopt_long_only.texi (getopt_long_only):
104961         Likewise.
104962         * doc/posix-functions/getopt.texi (getopt): Likewise.
104964         test-getopt: enhance test
104965         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Require that getopt_long
104966         supports optind=0.
104967         * tests/test-getopt.c (OPTIND_MIN): Move...
104968         * tests/test-getopt.h (OPTIND_MIN): ...here.
104969         * tests/test-getopt_long.h (test_getopt_long): Add more coverage.
104970         Require that optind=0 works, since modern BSD supports it in
104971         addition to optreset, and since coreutils expects it.
104972         (test_getopt_long_only): New test.
104973         * doc/glibc-functions/getopt_long.texi (getopt_long): Document
104974         glibc shortcomings with 'W;', and enforcement of optind=0.
104975         * doc/glibc-functions/getopt_long_only.texi (getopt_long_only):
104976         Likewise.
104978 2009-12-21  Bruno Haible  <bruno@clisp.org>
104980         localename: Improvements for MacOS X and Cygwin.
104981         * lib/localename.h (gl_locale_name_environ): New declaration.
104982         * lib/localename.c (gl_locale_name_environ): New function, extracted from
104983         gl_locale_name_posix. Ignore dummy LANG values on MacOS X and Cygwin.
104984         (gl_locale_name_posix): Invoke it.
104985         (gl_locale_name_default): Add comments. Use Windows native API also on
104986         Cygwin.
104988 2009-12-21  Bruno Haible  <bruno@clisp.org>
104990         Update list of Win32 locale ids.
104991         * lib/localename.c (LANG_ROMANSH): Renamed from LANG_RHAETO_ROMANCE.
104992         (LANG_SAMI): Renamed from LANG_SAAMI.
104993         (LANG_BASHKIR, LANG_LUXEMBOURGISH, LANG_GREENLANDIC,
104994         LANG_MAPUDUNGUN, LANG_MOHAWK, LANG_BRETON, LANG_OCCITAN, LANG_CORSICAN,
104995         LANG_ALSATIAN, LANG_YAKUT, LANG_KICHE, LANG_KINYARWANDA, LANG_WOLOF,
104996         LANG_DARI, LANG_SCOTTISH_GAELIC): New macros.
104997         (SUBLANG_AFRIKAANS_SOUTH_AFRICA, SUBLANG_ALBANIAN_ALBANIA,
104998         SUBLANG_ALSATIAN_FRANCE, SUBLANG_AMHARIC_ETHIOPIA,
104999         SUBLANG_ARMENIAN_ARMENIA, SUBLANG_ASSAMESE_INDIA,
105000         SUBLANG_BASHKIR_RUSSIA, SUBLANG_BASQUE_BASQUE,
105001         SUBLANG_BELARUSIAN_BELARUS, SUBLANG_BRETON_FRANCE,
105002         SUBLANG_BULGARIAN_BULGARIA, SUBLANG_CAMBODIAN_CAMBODIA,
105003         SUBLANG_CATALAN_SPAIN, SUBLANG_CORSICAN_FRANCE,
105004         SUBLANG_CZECH_CZECH_REPUBLIC, SUBLANG_DANISH_DENMARK,
105005         SUBLANG_DARI_AFGHANISTAN, SUBLANG_DIVEHI_MALDIVES,
105006         SUBLANG_DUTCH_SURINAM, SUBLANG_ESTONIAN_ESTONIA,
105007         SUBLANG_FAEROESE_FAROE_ISLANDS, SUBLANG_FARSI_IRAN,
105008         SUBLANG_FINNISH_FINLAND, SUBLANG_FRISIAN_NETHERLANDS,
105009         SUBLANG_GALICIAN_SPAIN, SUBLANG_GEORGIAN_GEORGIA,
105010         SUBLANG_GREEK_GREECE, SUBLANG_GREENLANDIC_GREENLAND,
105011         SUBLANG_GUJARATI_INDIA, SUBLANG_HAUSA_NIGERIA_LATIN,
105012         SUBLANG_HEBREW_ISRAEL, SUBLANG_HINDI_INDIA, SUBLANG_HUNGARIAN_HUNGARY,
105013         SUBLANG_ICELANDIC_ICELAND, SUBLANG_IGBO_NIGERIA,
105014         SUBLANG_INDONESIAN_INDONESIA, SUBLANG_INUKTITUT_CANADA,
105015         SUBLANG_INUKTITUT_CANADA_LATIN, SUBLANG_IRISH_IRELAND,
105016         SUBLANG_JAPANESE_JAPAN, SUBLANG_KANNADA_INDIA,
105017         SUBLANG_KAZAK_KAZAKHSTAN, SUBLANG_KICHE_GUATEMALA,
105018         SUBLANG_KINYARWANDA_RWANDA, SUBLANG_KONKANI_INDIA,
105019         SUBLANG_KYRGYZ_KYRGYZSTAN, SUBLANG_LAO_LAOS, SUBLANG_LATVIAN_LATVIA,
105020         SUBLANG_LITHUANIAN_LITHUANIA, SUBLANG_LOWER_SORBIAN_GERMANY,
105021         SUBLANG_LUXEMBOURGISH_LUXEMBOURG, SUBLANG_MACEDONIAN_MACEDONIA,
105022         SUBLANG_MALAYALAM_INDIA, SUBLANG_MALTESE_MALTA,
105023         SUBLANG_MAORI_NEW_ZEALAND, SUBLANG_MAPUDUNGUN_CHILE,
105024         SUBLANG_MARATHI_INDIA, SUBLANG_MOHAWK_CANADA, SUBLANG_NEPALI_NEPAL,
105025         SUBLANG_OCCITAN_FRANCE, SUBLANG_ORIYA_INDIA,
105026         SUBLANG_PASHTO_AFGHANISTAN, SUBLANG_POLISH_POLAND,
105027         SUBLANG_ROMANSH_SWITZERLAND, SUBLANG_SAMI_NORTHERN_NORWAY,
105028         SUBLANG_SAMI_NORTHERN_SWEDEN, SUBLANG_SAMI_NORTHERN_FINLAND,
105029         SUBLANG_SAMI_LULE_NORWAY, SUBLANG_SAMI_LULE_SWEDEN,
105030         SUBLANG_SAMI_SOUTHERN_NORWAY, SUBLANG_SAMI_SOUTHERN_SWEDEN,
105031         SUBLANG_SAMI_SKOLT_FINLAND, SUBLANG_SAMI_INARI_FINLAND,
105032         SUBLANG_SANSKRIT_INDIA, SUBLANG_SINHALESE_SRI_LANKA,
105033         SUBLANG_SLOVAK_SLOVAKIA, SUBLANG_SLOVENIAN_SLOVENIA,
105034         SUBLANG_SOTHO_SOUTH_AFRICA, SUBLANG_SWAHILI_KENYA,
105035         SUBLANG_SWEDISH_SWEDEN, SUBLANG_SYRIAC_SYRIA,
105036         SUBLANG_TAGALOG_PHILIPPINES, SUBLANG_TAJIK_TAJIKISTAN,
105037         SUBLANG_TAMIL_INDIA, SUBLANG_TATAR_RUSSIA, SUBLANG_TELUGU_INDIA,
105038         SUBLANG_THAI_THAILAND, SUBLANG_TSWANA_SOUTH_AFRICA,
105039         SUBLANG_TURKISH_TURKEY, SUBLANG_TURKMEN_TURKMENISTAN,
105040         SUBLANG_UKRAINIAN_UKRAINE, SUBLANG_UPPER_SORBIAN_GERMANY,
105041         SUBLANG_VIETNAMESE_VIETNAM, SUBLANG_WELSH_UNITED_KINGDOM,
105042         SUBLANG_WOLOF_SENEGAL, SUBLANG_XHOSA_SOUTH_AFRICA,
105043         SUBLANG_YAKUT_RUSSIA, SUBLANG_YI_PRC, SUBLANG_YORUBA_NIGERIA,
105044         SUBLANG_ZULU_SOUTH_AFRICA): New macros.
105045         (gl_locale_name_from_win32_LANGID): Handle also the territory neutral
105046         locale ids. Add support for Alsatian, Bashkir, Breton, Corsican, Dari,
105047         Greenlandic, K'iche', Kinyarwanda, Luxembourgish, Mapudungun, Mohawk,
105048         Occitan, Scottish Gaelic, Wolof, Yakut. Change language code for Yi.
105049         Add more languages and countries for Sami, Sorbian. Add more countries
105050         for Serbian, Dutch. Add more scripts for Inuktitut. Be more precise
105051         for Pashto. Change country for Syriac, Tswana.
105053 2009-12-21  Eric Blake  <ebb9@byu.net>
105055         test-utimens: avoid spurious failure
105056         * tests/test-chown.h (nap): Factor...
105057         * tests/nap.h: ...into new file.
105058         * tests/test-lchown.h (nap): Avoid duplication.
105059         * tests/test-utimens-common.h (nap): Use shared implementation,
105060         necessary on file systems with 1-second resolution.
105061         * modules/chown-tests (Files): Include new file.
105062         * modules/fdutimensat-tests (Files): Likewise.
105063         * modules/futimens-tests (Files): Likewise.
105064         * modules/lchown-tests (Files): Likewise.
105065         * modules/openat-tests (Files): Likewise.
105066         * modules/utimens-tests (Files): Likewise.
105067         * modules/utimensat-tests (Files): Likewise.
105069 2009-12-19  Eric Blake  <ebb9@byu.net>
105071         futimens, utimensat: work around Linux bug
105072         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Detect ctime bug.
105073         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Likewise.
105074         * lib/utimensat.c (rpl_utimensat): Work around it.
105075         * lib/futimens.c (rpl_futimens): Adjust comment.
105077         utimens: work around Linux ctime bug
105078         * lib/utimens.c (detect_ctime_bug): New helper function.
105079         (update_timespec): Differentiate between workaround needed for
105080         this bug vs. what is needed for systems that lack utimensat.
105081         (fdutimens, lutimens): Work around bug.
105083         utimens: check for ctime update
105084         * tests/test-utimens-common.h (check_ctime): Define.
105085         * tests/test-utimens.h (test_utimens): Expose the Linux bug.
105086         * tests/test-futimens.h (test_futimens): Likewise.
105087         * tests/test-lutimens.h (test_lutimens): Likewise.
105088         * doc/posix-functions/futimens.texi (futimens): Document the bug.
105089         * doc/posix-functions/utimensat.texi (utimensat): Likewise.
105091 2009-12-19  Bruno Haible  <bruno@clisp.org>
105093         dprintf-posix: Check against memory leak fixed on 2009-12-15.
105094         * tests/test-dprintf-posix2.sh: New file.
105095         * tests/test-dprintf-posix2.c: New file.
105096         * modules/dprintf-posix-tests (Files): Add them.
105097         (configure.ac): Check for getrlimit and setrlimit.
105098         (Makefile.am): Augment TESTS and CHECK_PROGRAMS.
105100 2009-12-19  Bruno Haible  <bruno@clisp.org>
105102         fprintf-posix: Check against memory leak fixed on 2009-12-15.
105103         * tests/test-fprintf-posix3.sh: New file.
105104         * tests/test-fprintf-posix3.c: New file.
105105         * modules/fprintf-posix-tests (Files): Add them.
105106         (Makefile.am): Augment TESTS and CHECK_PROGRAMS.
105108 2009-12-19  Eric Blake  <ebb9@byu.net>
105110         dirfd: fix prototype
105111         * lib/dirent.in.h (dirfd): Argument is not const, per POSIX.
105112         * lib/dirfd.c (dirfd): Likewise.
105114         canonicalize: reduce memory usage
105115         * lib/canonicalize.c (canonicalize_filename_mode): Trim the
105116         allocation to size.
105117         Reported by Solar Designer <solar@openwall.com>.
105119 2009-12-19  Bruno Haible  <bruno@clisp.org>
105121         New module attribute 'Applicability'.
105122         * modules/TEMPLATE-EXTENDED: New field 'Applicability'.
105123         * gnulib-tool: New option --extract-applicability.
105124         (func_usage): Document it.
105125         (sed_extract_prog): Recognize it.
105126         (func_get_applicability): New function.
105127         (func_import): Generalize handling of 'link-warning' module.
105128         * modules/link-warning (Applicability): New section.
105129         * modules/arg-nonnull (Applicability): New section.
105130         Repoted by Simon Josefsson <simon@josefsson.org>.
105132 2009-12-19  Bruno Haible  <bruno@clisp.org>
105134         fflush: tweak
105135         * lib/fflush.c (update_fpos_cache): Don't use fpos_t on Cygwin.
105136         * lib/fseeko.c (rpl_fseeko): Likewise.
105138 2009-12-16  José E. Marchesi  <jemarch@gnu.org>  (tiny change)
105140         * lib/gl_list.h: Fix typo in comment.
105142 2009-12-16  Eric Blake  <ebb9@byu.net>
105144         fcntl: use to simplify other modules
105145         * modules/cloexec (Depends-on): Add fcntl.
105146         * modules/fchdir (Depends-on): Likewise.
105147         * modules/fd-safer-flag (Depends-on): Likewise.
105148         * modules/unistd-safer (Depends-on): Likewise.
105149         * modules/dup3 (configure.ac): Set module indicator.
105150         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Replace fcntl if fchdir is
105151         missing.
105152         * lib/fchdir.c (_gl_register_dup): Fix comment.
105153         * lib/cloexec.c (dup_cloexec): Simplify, by relying on fcntl.
105154         * lib/dup-safer.c (dup_safer): Likewise.
105155         * lib/dup-safer-flag.c (dup_safer_flag): Likewise.
105156         * lib/dup3.c (dup3): Likewise.
105157         * tests/test-fchdir.c (main): Enhance test.
105158         Fixes a dup_cloexec bug reported by Ondřej Vašík.
105160         fcntl: port portions of fcntl to mingw
105161         * m4/fcntl.m4 (gl_FUNC_FCNTL): Also build fcntl.c on mingw.
105162         * lib/fcntl.c (fcntl) <F_DUPFD, F_DUPFD_CLOEXEC, F_GETFD>: Provide
105163         replacement for mingw.
105164         * modules/fcntl (Description): Update.
105165         (Depends-on): Add dup2.
105166         * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Add witness.
105167         * modules/fcntl-h (Makefile.am): Substitute it.
105168         * lib/fcntl.in.h (fcntl): Update declaration.
105169         (F_DUPFD, F_GETFD): New macros, when needed.
105170         * doc/posix-headers/fcntl.texi (fcntl.h): Update documentation.
105171         * doc/posix-functions/fcntl.texi (fcntl): Likewise.
105172         * tests/test-fcntl.c (check_flags, main): Enhance test for items
105173         we now guarantee.
105175         fcntl: work around cygwin bug in F_DUPFD
105176         * m4/fcntl.m4 (gl_REPLACE_FCNTL): New macro.
105177         (gl_FUNC_FCNTL): Use it.  Test for F_DUPFD bug.
105178         * lib/fcntl.c (rpl_fcntl) <F_DUPFD>: Work around it.
105179         <F_DUPFD_CLOEXEC>: Reduce calls to _gl_register_dup.
105180         * doc/posix-functions/fcntl.texi (fcntl): Document it.
105182         fcntl: support F_DUPFD_CLOEXEC on systems with fcntl
105183         * modules/fcntl (Files): List new files.
105184         (configure.ac): Run a test.
105185         * m4/fcntl.m4 (gl_FUNC_FCNTL): New file.
105186         * lib/fcntl.c (rpl_fcntl): Likewise.
105187         * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Add witness defaults.
105188         (gl_FCNTL_H): Always replace fcntl.h.
105189         * modules/fcntl-h (Makefile.am): Substitute witnesses.
105190         * lib/fcntl.in.h (fcntl): Declare replacement.
105191         (F_DUPFD_CLOEXEC, GNULIB_defined_F_DUPFD_CLOEXEC): New macro when
105192         needed, plus a witness.
105193         * doc/posix-functions/fcntl.texi (fcntl): Document this.
105194         * doc/posix-headers/fcntl.texi (fcntl.h): Likewise.
105195         * tests/test-fcntl.c: New file.
105196         * modules/fcntl-tests: Likewise.
105198         binary-io: avoid potential compilation warning
105199         * lib/binary-io.h [__DJGPP__]: Avoid null preprocessor
105200         directives.
105202         fflush: avoid compilation error on NetBSD
105203         * lib/fflush.c (update_fpos_cache): Use a union to safely convert
105204         between off_t and fpos_t, since the latter is sometimes a struct.
105205         * lib/fseeko.c (rpl_fseeko): Likewise.
105206         Reported by Alexander Nasonov <alnsn@yandex.ru>.
105208 2009-12-15  Eric Blake  <ebb9@byu.net>
105210         fcntl-h, stdio, sys_ioctl: fix declarations
105211         * lib/stdio.in.h (dprintf): Use of link warning on a variadic
105212         function must not take arguments.
105213         * lib/sys_ioctl.in.h (ioctl): Likewise.
105214         * lib/fcntl.in.h (openat): Likewise.  Declare extern.
105215         (open): Add a link warning.
105217 2009-12-15  Jim Meyering  <meyering@redhat.com>
105219         areadlink, areadlink-with-size: relax license to LGPLv2+
105220         * modules/areadlink (License): Relax to LGPLv2+.
105221         * modules/areadlink-with-size (License): Likewise.
105223 2009-12-15  Joel E. Denny  <jdenny@clemson.edu>
105224             Bruno Haible  <bruno@clisp.org>
105226         *printf: Fix memory leak.
105227         * lib/fprintf.c (fprintf): Free memory allocated by vasnprintf.
105228         * lib/vfprintf.c (vfprintf): Likewise.
105229         * lib/dprintf.c (dprintf): Likewise.
105230         * lib/vdprintf.c (vdprintf): Likewise.
105232 2009-12-14  Eric Blake  <ebb9@byu.net>
105234         accept4: adjust module dependencies
105235         * modules/accept4 (Depends-on): Use fcntl-h, not fcntl.
105237         utimens: one more try at avoiding compiler warning
105238         * lib/utimens.c (lutimens): Lower scope of result.
105240 2009-12-13  Bruno Haible  <bruno@clisp.org>
105242         Move the malloc checking from module 'list' to new module 'xlist'.
105243         * modules/xlist: New file.
105244         * lib/gl_xlist.h: New file.
105245         * lib/gl_xlist.c: New file.
105246         * lib/gl_list.h (gl_list_create_empty, gl_list_create,
105247         gl_list_node_set_value, gl_list_set_at, gl_list_add_first,
105248         gl_list_add_last, gl_list_add_before, gl_list_add_after,
105249         gl_list_nx_add_at, gl_sortedlist_add): Disable declarations.
105250         (gl_list_nx_create_empty, gl_list_nx_create, gl_list_node_nx_set_value,
105251         gl_list_nx_set_at, gl_list_nx_add_first, gl_list_nx_add_last,
105252         gl_list_nx_add_before, gl_list_nx_add_after, gl_list_nx_add_at,
105253         gl_sortedlist_nx_add): New declarations.
105254         (struct gl_list_implementation): Rename and change methods accordingly.
105255         (gl_list_nx_create_empty): Renamed from gl_list_create_empty.
105256         (gl_list_nx_create): Renamed from gl_list_create.
105257         (gl_list_node_nx_set_value): Renamed from gl_list_node_set_value.
105258         (gl_list_nx_set_at): Renamed from gl_list_set_at.
105259         (gl_list_nx_add_first): Renamed from gl_list_add_first.
105260         (gl_list_nx_add_last): Renamed from gl_list_add_last.
105261         (gl_list_nx_add_before): Renamed from gl_list_add_before.
105262         (gl_list_nx_add_after): Renamed from gl_list_add_after.
105263         (gl_list_nx_add_at): Renamed from gl_list_add_at.
105264         (gl_sortedlist_nx_add): Renamed from gl_sortedlist_add.
105265         * lib/gl_list.c (gl_list_nx_create_empty): Renamed from
105266         gl_list_create_empty.
105267         (gl_list_nx_create): Renamed from gl_list_create.
105268         (gl_list_node_nx_set_value): Renamed from gl_list_node_set_value.
105269         (gl_list_nx_set_at): Renamed from gl_list_set_at.
105270         (gl_list_nx_add_first): Renamed from gl_list_add_first.
105271         (gl_list_nx_add_last): Renamed from gl_list_add_last.
105272         (gl_list_nx_add_before): Renamed from gl_list_add_before.
105273         (gl_list_nx_add_after): Renamed from gl_list_add_after.
105274         (gl_list_nx_add_at): Renamed from gl_list_add_at.
105275         (gl_sortedlist_nx_add): Renamed from gl_sortedlist_add.
105276         * lib/gl_array_list.c: Don't include xalloc.h.
105277         (gl_array_nx_create_empty): Renamed from gl_array_create_empty. Return
105278         NULL upon out-of-memory.
105279         (gl_array_nx_create): Renamed from gl_array_create. Return NULL upon
105280         out-of-memory.
105281         (gl_array_node_nx_set_value): Renamed from gl_array_node_set_value.
105282         Change return type to 'int'.
105283         (gl_array_nx_set_at): Renamed from gl_array_set_at.
105284         (grow): Change return type to 'int'. Return -1 upon out-of-memory.
105285         (gl_array_nx_add_first): Renamed from gl_array_add_first. Return NULL
105286         upon out-of-memory.
105287         (gl_array_nx_add_last): Renamed from gl_array_add_last. Return NULL
105288         upon out-of-memory.
105289         (gl_array_nx_add_before): Renamed from gl_array_add_before. Return NULL
105290         upon out-of-memory.
105291         (gl_array_nx_add_after): Renamed from gl_array_add_after. Return NULL
105292         upon out-of-memory.
105293         (gl_array_nx_add_at): Renamed from gl_array_add_at. Return NULL upon
105294         out-of-memory.
105295         (gl_array_sortedlist_nx_add): Renamed from gl_array_sortedlist_add.
105296         Update.
105297         (gl_array_list_implementation): Update.
105298         * lib/gl_carray_list.c: Don't include xalloc.h.
105299         (gl_carray_nx_create_empty): Renamed from gl_carray_create_empty.
105300         Return NULL upon out-of-memory.
105301         (gl_carray_nx_create): Renamed from gl_carray_create. Return NULL upon
105302         out-of-memory.
105303         (gl_carray_node_nx_set_value): Renamed from gl_carray_node_set_value.
105304         Change return type to 'int'.
105305         (gl_carray_nx_set_at): Renamed from gl_carray_set_at.
105306         (grow): Change return type to 'int'. Return -1 upon out-of-memory.
105307         (gl_carray_nx_add_first): Renamed from gl_carray_add_first. Return NULL
105308         upon out-of-memory.
105309         (gl_carray_nx_add_last): Renamed from gl_carray_add_last. Return NULL
105310         upon out-of-memory.
105311         (gl_carray_nx_add_at): Renamed from gl_carray_add_at. Return NULL upon
105312         out-of-memory.
105313         (gl_carray_nx_add_before): Renamed from gl_carray_add_before. Update.
105314         (gl_carray_nx_add_after): Renamed from gl_carray_add_after. Update.
105315         (gl_carray_sortedlist_nx_add): Renamed from gl_carray_sortedlist_add.
105316         Update.
105317         (gl_carray_list_implementation): Update.
105318         * lib/gl_anyhash_list2.h (hash_resize): Do nothing upon out-of-memory.
105319         * lib/gl_anylinked_list2.h (gl_linked_nx_create_empty): Renamed from
105320         gl_linked_create_empty. Return NULL upon out-of-memory.
105321         (gl_linked_nx_create): Renamed from gl_linked_create. Return NULL upon
105322         out-of-memory.
105323         (gl_linked_node_nx_set_value): Renamed from gl_linked_node_set_value.
105324         Change return type to 'int'. Return -1 upon out-of-memory.
105325         (gl_linked_nx_set_at): Renamed from gl_linked_set_at. Return NULL upon
105326         out-of-memory.
105327         (gl_linked_nx_add_first): Renamed from gl_linked_add_first. Return NULL
105328         upon out-of-memory.
105329         (gl_linked_nx_add_last): Renamed from gl_linked_add_last. Return NULL
105330         upon out-of-memory.
105331         (gl_linked_nx_add_before): Renamed from gl_linked_add_before. Return
105332         NULL upon out-of-memory.
105333         (gl_linked_nx_add_after): Renamed from gl_linked_add_after. Return NULL
105334         upon out-of-memory.
105335         (gl_linked_nx_add_at): Renamed from gl_linked_add_at. Return NULL upon
105336         out-of-memory.
105337         (gl_linked_sortedlist_nx_add): Renamed from gl_linked_sortedlist_add.
105338         Update.
105339         * lib/gl_linked_list.c: Don't include xalloc.h.
105340         (gl_linked_list_implementation): Update.
105341         * lib/gl_linkedhash_list.c: Don't include xalloc.h.
105342         (add_to_bucket): Change return type to 'int'.
105343         (gl_linkedhash_list_implementation): Update.
105344         * lib/gl_anytree_list1.h (free_subtree): New function.
105345         * lib/gl_anytree_list2.h (gl_tree_nx_create_empty): Renamed from
105346         gl_tree_create_empty. Return NULL upon out-of-memory.
105347         (gl_tree_node_nx_set_value): Renamed from gl_tree_node_set_value.
105348         Change return type to 'int'. Return -1 upon out-of-memory.
105349         (gl_tree_nx_set_at): Renamed from gl_tree_set_at. Return NULL upon
105350         out-of-memory.
105351         (gl_tree_nx_add_at): Renamed from gl_tree_add_at. Update.
105352         (gl_tree_remove_node): New function, moved here from
105353         lib/gl_anyavltree_list2.h and lib/gl_anyrbtree_list2.h.
105354         (gl_tree_sortedlist_nx_add): Renamed from gl_tree_sortedlist_add.
105355         Update.
105356         * lib/gl_anyavltree_list2.h (create_subtree_with_contents): Use
105357         malloc, not xmalloc. Return NULL upon out-of-memory.
105358         (gl_tree_nx_create): Renamed from gl_tree_create. Return NULL upon
105359         out-of-memory.
105360         (gl_tree_remove_node_from_tree): New function, extracted from
105361         gl_tree_remove_node.
105362         (gl_tree_nx_add_first): Renamed from gl_tree_add_first. Return NULL
105363         upon out-of-memory.
105364         (gl_tree_nx_add_last): Renamed from gl_tree_add_last. Return NULL upon
105365         out-of-memory.
105366         (gl_tree_nx_add_before): Renamed from gl_tree_add_before. Return NULL
105367         upon out-of-memory.
105368         (gl_tree_nx_add_after): Renamed from gl_tree_add_after. Return NULL
105369         upon out-of-memory.
105370         (gl_tree_remove_node): Remove function. Moved to gl_anytree_list2.h.
105371         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents): Use malloc,
105372         not xmalloc. Return NULL upon out-of-memory.
105373         (gl_tree_nx_create): Renamed from gl_tree_create. Return NULL upon
105374         out-of-memory.
105375         (gl_tree_remove_node_from_tree): New function, extracted from
105376         gl_tree_remove_node.
105377         (gl_tree_nx_add_first): Renamed from gl_tree_add_first. Return NULL
105378         upon out-of-memory.
105379         (gl_tree_nx_add_last): Renamed from gl_tree_add_last. Return NULL upon
105380         out-of-memory.
105381         (gl_tree_nx_add_before): Renamed from gl_tree_add_before. Return NULL
105382         upon out-of-memory.
105383         (gl_tree_nx_add_after): Renamed from gl_tree_add_after. Return NULL
105384         upon out-of-memory.
105385         (gl_tree_remove_node): Remove function. Moved to gl_anytree_list2.h.
105386         * lib/gl_avltree_list.c: Don't include xalloc.h. Include
105387         gl_anytree_list1.h before gl_anyavltree_list2.h.
105388         (gl_avltree_list_implementation): Update.
105389         * lib/gl_rbtree_list.c: Don't include xalloc.h. Include
105390         gl_anytree_list1.h before gl_anyavltree_list2.h.
105391         (gl_rbtree_list_implementation): Update.
105392         * lib/gl_anytreehash_list1.h (add_to_bucket, add_nodes_to_buckets):
105393         Change return type to 'int'. Return -1 upon out-of-memory. Use
105394         __builtin_expect.
105395         * lib/gl_avltreehash_list.c: Don't include xalloc.h.
105396         (gl_avltreehash_list_implementation): Update.
105397         * lib/gl_rbtreehash_list.c: Don't include xalloc.h.
105398         (gl_rbtreehash_list_implementation): Update.
105399         * modules/array-list (Depends-on): Remove xalloc.
105400         * modules/carray-list (Depends-on): Likewise.
105401         * modules/linked-list (Depends-on): Likewise.
105402         * modules/linkedhash-list (Depends-on): Likewise.
105403         * modules/avltree-list (Depends-on): Likewise.
105404         * modules/rbtree-list (Depends-on): Likewise.
105405         * modules/avltreehash-list (Depends-on): Likewise.
105406         * modules/rbtreehash-list (Depends-on): Likewise.
105408         * modules/xsublist: New file.
105409         * lib/gl_xsublist.h: New file.
105410         * lib/gl_xsublist.c: New file.
105411         * lib/gl_sublist.h (gl_sublist_create): Disable declaration.
105412         (gl_sublist_nx_create): New declaration.
105413         * lib/gl_sublist.c: Don't include xalloc.h.
105414         (gl_sublist_nx_create_empty): Renamed from gl_sublist_create_empty.
105415         (gl_sublist_nx_create_fill): Renamed from gl_sublist_create_fill.
105416         (gl_sublist_node_nx_set_value): Renamed from gl_sublist_node_set_value.
105417         Change return type to 'int'. Return -1 upon out-of-memory.
105418         (gl_sublist_nx_set_at): Renamed from gl_sublist_set_at. Return NULL
105419         upon out-of-memory.
105420         (gl_sublist_nx_add_first): Renamed from gl_sublist_add_first. Return
105421         NULL upon out-of-memory.
105422         (gl_sublist_nx_add_last): Renamed from gl_sublist_add_last. Return NULL
105423         upon out-of-memory.
105424         (gl_sublist_nx_add_before): Renamed from gl_sublist_add_before. Return
105425         NULL upon out-of-memory.
105426         (gl_sublist_nx_add_after): Renamed from gl_sublist_add_after. Return
105427         NULL upon out-of-memory.
105428         (gl_sublist_nx_add_at): Renamed from gl_sublist_add_at. Return NULL
105429         upon out-of-memory.
105430         (gl_sublist_sortedlist_nx_add): Renamed from gl_sublist_sortedlist_add.
105431         (gl_sublist_list_implementation): Update.
105432         (gl_sublist_nx_create): Renamed from gl_sublist_create. Return NULL
105433         upon out-of-memory.
105434         * modules/sublist (Depends-on): Remove xalloc.
105436         * tests/test-array_list.c: Use gl_list_nx_* functions where possible.
105437         * tests/test-carray_list.c: Likewise.
105438         * tests/test-linked_list.c: Likewise.
105439         * tests/test-linkedhash_list.c: Likewise.
105440         * tests/test-avltree_list.c: Likewise.
105441         * tests/test-rbtree_list.c: Likewise.
105442         * tests/test-avltreehash_list.c: Likewise.
105443         * tests/test-rbtreehash_list.c: Likewise.
105444         * modules/array-list-tests (Makefile.am): Don't link with @LIBINTL@.
105445         * modules/carray-list-tests (Makefile.am): Likewise.
105446         * modules/linked-list-tests (Makefile.am): Likewise.
105447         * modules/linkedhash-list-tests (Makefile.am): Likewise.
105448         * modules/avltree-list-tests (Makefile.am): Likewise.
105449         * modules/rbtree-list-tests (Makefile.am): Likewise.
105450         * modules/avltreehash-list-tests (Makefile.am): Likewise.
105451         * modules/rbtreehash-list-tests (Makefile.am): Likewise.
105453         * NEWS: Mention the changes.
105455         * lib/clean-temp.c: Include gl_xlist.h.
105456         * modules/clean-temp (Depends-on): Add xlist.
105458         * lib/git-merge-changelog.c: Include gl_xlist.h instead of gl_list.h.
105459         * modules/git-merge-changelog (Depends-on): Add xlist. Remove list.
105461         * tests/test-array_oset.c: Include gl_xlist.h.
105462         * modules/array-oset-tests (Depends-on): Add xlist.
105464         Reported by José E. Marchesi <jemarch@gnu.org>.
105466 2009-12-13  Bruno Haible  <bruno@clisp.org>
105468         Move the malloc checking from module 'oset' to new module 'xoset'.
105469         * modules/xoset: New file.
105470         * lib/gl_xoset.h: New file.
105471         * lib/gl_xoset.c: New file.
105472         * lib/gl_oset.h (gl_oset_create_empty, gl_oset_add): Disable
105473         declarations.
105474         (gl_oset_nx_create_empty, gl_oset_nx_add): New declarations.
105475         (struct gl_oset_implementation): Rename and change methods accordingly.
105476         (gl_oset_nx_create_empty): Renamed from gl_oset_create_empty.
105477         (gl_oset_nx_add): Renamed from gl_oset_add. Change return type to
105478         'int'. Mark as __warn_unused_result__.
105479         * lib/gl_oset.c (gl_oset_nx_create_empty): Renamed from
105480         gl_oset_create_empty.
105481         (gl_oset_nx_add): Renamed from gl_oset_add. Change return type to
105482         'int'.
105483         * lib/gl_array_oset.c: Don't include xalloc.h.
105484         (gl_array_nx_create_empty): Renamed from gl_array_create_empty. Use
105485         malloc, not xmalloc.
105486         (grow): Change return type to 'int'. Don't call xalloc_die.
105487         (gl_array_nx_add_at): Renamed from gl_array_add_at. Change return type
105488         to 'int'.
105489         (gl_array_nx_add): Renamed from gl_array_add. Change return type to
105490         'int'.
105491         (gl_array_oset_implementation): Update.
105492         * lib/gl_anytree_oset.h (gl_tree_nx_create_empty): Renamed from
105493         gl_tree_create_empty.
105494         (gl_tree_nx_add): Renamed from gl_tree_add. Change return type to
105495         'int'.
105496         * lib/gl_avltree_oset.c: Don't include xalloc.h.
105497         (gl_tree_nx_add_first): Renamed from gl_tree_add_first. Use malloc, not
105498         xmalloc.
105499         (gl_tree_nx_add_before): Renamed from gl_tree_add_before. Use malloc,
105500         not xmalloc.
105501         (gl_tree_nx_add_after): Renamed from gl_tree_add_after. Use malloc, not
105502         xmalloc.
105503         (gl_avltree_oset_implementation): Update.
105504         * lib/gl_rbtree_oset.c: Don't include xalloc.h.
105505         (gl_tree_nx_add_first): Renamed from gl_tree_add_first. Use malloc, not
105506         xmalloc.
105507         (gl_tree_nx_add_before): Renamed from gl_tree_add_before. Use malloc,
105508         not xmalloc.
105509         (gl_tree_nx_add_after): Renamed from gl_tree_add_after. Use malloc, not
105510         xmalloc.
105511         (gl_rbtree_oset_implementation): Update.
105512         * modules/array-oset (Depends-on): Remove xalloc.
105513         * modules/avltree-oset (Depends-on): Likewise.
105514         * modules/rbtree-oset (Depends-on): Likewise.
105515         * tests/test-array_oset.c: Use gl_oset_nx_* functions where possible.
105516         * tests/test-avltree_oset.c: Likewise.
105517         * tests/test-rbtree_oset.c: Likewise.
105518         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
105519         * modules/avltree-oset-tests (Makefile.am): Don't link with @LIBINTL@.
105520         * modules/rbtree-oset-tests (Makefile.am): Likewise.
105521         * NEWS: Mention the change.
105523 2009-12-05  Alfred M. Szmidt  <ams@gnu.org>
105525         maint.mk: allow a project to override release-prep commands
105526         * top/maint.mk (alpha, beta, stable): Move release-preparatory
105527         commands into a new rule.
105528         (release-prep): New rule.
105529         (release-prep-hook): New overridable variable.
105531 2009-12-13  Bruno Haible  <bruno@clisp.org>
105533         * lib/localcharset.c (locale_charset): Fix comment about use of GetACP.
105535 2009-12-13  Jim Meyering  <meyering@redhat.com>
105537         maint.mk (null_AM_MAKEFLAGS, built_programs): remove unused definitions
105538         * top/maint.mk (null_AM_MAKEFLAGS, built_programs): Remove definitions.
105540 2009-12-12  Bruno Haible  <bruno@clisp.org>
105542         duplocale: Tweak.
105543         * lib/duplocale.c (rpl_duplocale): Mark categories array as 'const'.
105545 2009-12-12  Karl Berry  <karl@gnu.org>
105547         * config/srclist.txt (strtoll.c): tab changes, no more sync.
105549 2009-12-12  Bruno Haible  <bruno@clisp.org>
105551         * m4/po.m4: Undo incorrect untabification.
105553 2009-12-12  Bruno Haible  <bruno@clisp.org>
105555         c-strtod, c-strtold: Use multithread-safe implementation on MacOS X.
105556         * modules/c-strtod (Depends-on): Add locale.
105557         * modules/c-strtold (Depends-on): Likewise.
105559 2009-12-12  Bruno Haible  <bruno@clisp.org>
105561         * lib/localcharset.c (locale_charset): Add comment about use of GetACP.
105563 2009-12-11  Eric Blake  <ebb9@byu.net>
105565         setenv: relax requirement in light of POSIX ruling
105566         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): Test handling of "" but
105567         not NULL.
105568         * tests/test-setenv.c (main): Relax test.
105569         * tests/test-unsetenv.c (main): Likewise.
105570         * doc/posix-functions/setenv.texi (setenv): Document this.
105571         * doc/posix-functions/unsetenv.texi (unsetenv): Likewise.
105573 2009-12-11  Bruno Haible  <bruno@clisp.org>
105575         New module 'fd-safer-flag'.
105576         * lib/dup-safer-flag.c: New file, extracted from lib/dup-safer.c.
105577         * lib/dup-safer.c (dup_safer_flag): Remove function.
105578         * lib/fd-safer-flag.c: New file, extracted from lib/fd-safer.c.
105579         * lib/fd-safer.c (fd_safer_flag): Remove function.
105580         * lib/unistd-safer.h (dup_safer_flag, fd_safer_flag): Update condition.
105581         * modules/cloexec (configure.ac): Drop indicator macro.
105582         * modules/fd-safer-flag: New file.
105583         * modules/pipe2-safer (Depends-on): Add fd-safer-flag. Remove cloexec.
105584         * modules/stdlib-safer (Depends-on): Add fd-safer-flag.
105585         * modules/unistd-safer-tests (Depends-on): Add fd-safer-flag.
105587 2009-12-11  Bruno Haible  <bruno@clisp.org>
105589         Tests for module 'nl_langinfo'.
105590         * modules/nl_langinfo-tests: New file.
105591         * tests/test-nl_langinfo.sh: New file.
105592         * tests/test-nl_langinfo.c: New file.
105594         New module 'nl_langinfo'.
105595         * lib/nl_langinfo.c: New file.
105596         * m4/nl_langinfo.m4: New file.
105597         * modules/nl_langinfo: New file.
105598         * doc/posix-functions/nl_langinfo.texi: Mention the new module.
105600 2009-12-11  Bruno Haible  <bruno@clisp.org>
105602         Tests for module 'langinfo'.
105603         * modules/langinfo-tests: New file.
105604         * tests/test-langinfo.c: New file.
105606         New module 'langinfo'.
105607         * lib/langinfo.in.h: New file.
105608         * m4/langinfo_h.m4: New file.
105609         * modules/langinfo: New file.
105610         * doc/posix-headers/langinfo.texi: Mention the new module.
105612 2009-12-11  Bruno Haible  <bruno@clisp.org>
105614         * lib/config.charset: Untabify.
105616 2009-12-11  Bruno Haible  <bruno@clisp.org>
105618         * modules/unistd-safer (configure.ac): Drop indicator macro.
105620 2009-12-11  Bruno Haible  <bruno@clisp.org>
105622         Move pipe2-safer code to its own file.
105623         * lib/pipe2-safer.c: New file, extracted from lib/pipe-safer.c.
105624         * lib/pipe-safer.c (pipe2_safer): Remove function.
105625         * modules/pipe2-safer (Files): Add lib/pipe2-safer.c.
105626         (Makefile.am): Add it to lib_SOURCES.
105628 2009-12-10  Bruno Haible  <bruno@clisp.org>
105630         * lib/recvfrom.c (rpl_recvfrom): Allow the from argument to be NULL.
105632 2009-12-10  Bruno Haible  <bruno@clisp.org>
105634         Declare which arguments expect non-NULL values, for GCC and clang.
105635         * build-aux/arg-nonnull.h: New file.
105636         * modules/arg-nonnull: New file.
105637         * lib/arpa_inet.in.h (_GL_ARG_NONNULL): New placeholder.
105638         (inet_ntop, inet_pton): Use it.
105639         * lib/dirent.in.h (_GL_ARG_NONNULL): New placeholder.
105640         (closedir, dirfd, opendir, scandir, alphasort): Use it.
105641         * lib/fcntl.in.h (_GL_ARG_NONNULL): New placeholder.
105642         (open, openat): Use it.
105643         * lib/fnmatch.in.h (_GL_ARG_NONNULL): New placeholder.
105644         (fnmatch): Use it.
105645         * lib/getopt.in.h (_GL_ARG_NONNULL): New placeholder.
105646         (getopt, getopt_long, getopt_long_only): Use it.
105647         * lib/glob.in.h (_GL_ARG_NONNULL): New placeholder.
105648         * lib/glob-libc.h (glob, globfree, glob64, globfree64, glob_pattern_p):
105649         Use it.
105650         * lib/iconv.in.h (_GL_ARG_NONNULL): New placeholder.
105651         (iconv_open): Use it.
105652         * lib/inttypes.in.h (_GL_ARG_NONNULL): New placeholder.
105653         (strtoimax, strtoumax): Use it.
105654         * lib/locale.in.h (_GL_ARG_NONNULL): New placeholder.
105655         (duplocale): Use it.
105656         * lib/math.in.h (_GL_ARG_NONNULL): New placeholder.
105657         (frexp, frexpl): Use it.
105658         * lib/netdb.in.h (_GL_ARG_NONNULL): New placeholder.
105659         (getaddrinfo, freeaddrinfo, getnameinfo): Use it.
105660         * lib/search.in.h (_GL_ARG_NONNULL): New placeholder.
105661         (tsearch, tfind, tdelete, twalk): Use it.
105662         * lib/signal.in.h (_GL_ARG_NONNULL): New placeholder.
105663         (sigismember, sigemptyset, sigaddset, sigdelset, sigfillset,
105664         sigpending): Use it.
105665         * lib/spawn.in.h (_GL_ARG_NONNULL): New placeholder.
105666         (posix_spawn, posix_spawnp, posix_spawnattr_init,
105667         posix_spawnattr_destroy, posix_spawnattr_getsigdefault,
105668         posix_spawnattr_setsigdefault, posix_spawnattr_getsigmask,
105669         posix_spawnattr_setsigmask, posix_spawnattr_getflags,
105670         posix_spawnattr_setflags, posix_spawnattr_getpgroup,
105671         posix_spawnattr_setpgroup, posix_spawnattr_getschedpolicy,
105672         posix_spawnattr_setschedpolicy, posix_spawnattr_getschedparam,
105673         posix_spawnattr_setschedparam, posix_spawn_file_actions_init,
105674         posix_spawn_file_actions_destroy, posix_spawn_file_actions_addopen,
105675         posix_spawn_file_actions_addclose, posix_spawn_file_actions_adddup2):
105676         Use it.
105677         * lib/stdio.in.h (_GL_ARG_NONNULL): New placeholder.
105678         (dprintf, fclose, fopen, fprintf, fpurge, fputc, fputs, freopen,
105679         rpl_fseek, fseeko, rpl_ftell, ftello, fwrite, getdelim, getline,
105680         obstack_printf, obstack_vprintf, popen, printf, putc, puts, remove,
105681         rename, renameat, snprintf, sprintf, asprintf, vasprintf, vdprintf,
105682         vfprintf, vprintf, vsnprintf, vsprintf): Use it.
105683         * lib/stdlib.in.h (_GL_ARG_NONNULL): New placeholder.
105684         (atoll, canonicalize_file_name, getloadavg, getsubopt, mkdtemp,
105685         mkostemp, mkostemps, mkstemp, mkstemps, putenv, srandom_r, initstate_r,
105686         setstate_r, random_r, realpath, rpmatch, setenv, strtod, strtoll,
105687         strtoull, unsetenv): Use it.
105688         * lib/string.in.h (_GL_ARG_NONNULL): New placeholder.
105689         (memchr, memmem, mempcpy, memrchr, rawmemchr, stpcpy, stpncpy,
105690         strchrnul, strdup, strndup, strnlen, strpbrk, strsep, strstr,
105691         strcasestr, strtok_r, mbslen, mbsnlen, mbschr, mbsrchr, mbsstr,
105692         mbscasecmp, mbsncasecmp, mbspcasecmp, mbscasestr, mbscspn, mbspbrk,
105693         mbsspn, mbssep, mbstok_r, strverscmp): Use it.
105694         * lib/strings.in.h (_GL_ARG_NONNULL): New placeholder.
105695         (strcasecmp, strncasecmp): Use it.
105696         * lib/sys_socket.in.h (_GL_ARG_NONNULL): New placeholder.
105697         (rpl_connect, rpl_bind, rpl_getpeername, rpl_getsockname,
105698         rpl_getsockopt, rpl_recv, rpl_send, rpl_recvfrom, rpl_sendto,
105699         rpl_setsockopt): Use it.
105700         * lib/sys_stat.in.h (_GL_ARG_NONNULL): New placeholder.
105701         (fchmodat, fstat, fstatat, lchmod, rpl_lstat, mkdir, mkdirat, mkfifo,
105702         mkfifoat, mknod, mknodat, stat, utimensat): Use it.
105703         * lib/sys_time.in.h (_GL_ARG_NONNULL): New placeholder.
105704         (gettimeofday): Use it.
105705         * lib/sys_times.in.h (_GL_ARG_NONNULL): New placeholder.
105706         (times): Use it.
105707         * lib/sys_utsname.in.h (_GL_ARG_NONNULL): New placeholder.
105708         (uname): Use it.
105709         * lib/time.in.h (_GL_ARG_NONNULL): New placeholder.
105710         (nanosleep, mktime, localtime_r, gmtime_r, strptime, timegm): Use it.
105711         * lib/unistd.in.h (_GL_ARG_NONNULL): New placeholder.
105712         (chown, euidaccess, faccessat, _gl_register_fd, fchownat,
105713         getdomainname, gethostname, getlogin_r, lchown, link, linkat, pipe2,
105714         pread, readlink, readlinkat, rmdir, symlink, symlinkat, unlink,
105715         unlinkat, write): Use it.
105716         * lib/wchar.in.h (_GL_ARG_NONNULL): New placeholder.
105717         (mbsrtowcs, mbsnrtowcs, wcsrtombs, wcsnrtombs): Use it.
105718         * lib/argv-iter.h: Include arg-nonnull.h.
105719         (_ATTRIBUTE_NONNULL_): Remove macro.
105720         (argv_iter_init_argv, argv_iter_init_stream, argv_iter,
105721         argv_iter_n_args, argv_iter_free): Use _GL_ARG_NONNULL.
105722         * lib/canonicalize-lgpl.c (_GL_ARG_NONNULL): Define, to defeat gcc
105723         optimization.
105724         * lib/getaddrinfo.c (_GL_ARG_NONNULL): Likewise.
105725         * lib/getdelim.c (_GL_ARG_NONNULL): Likewise.
105726         * lib/glob.c (_GL_ARG_NONNULL): Likewise.
105727         * lib/random_r.c (_GL_ARG_NONNULL): Likewise.
105728         * lib/setenv.c (_GL_ARG_NONNULL): Likewise.
105729         * lib/strtod.c (_GL_ARG_NONNULL): Likewise.
105730         * lib/tsearch.c (_GL_ARG_NONNULL): Likewise.
105731         * lib/unsetenv.c (_GL_ARG_NONNULL): Likewise.
105732         * modules/arpa_inet (Depends-on): Add arg-nonnull.
105733         (Makefile.am): Insert arg-nonnull.h into arpa/inet.h.
105734         * modules/dirent (Depends-on): Add arg-nonnull.
105735         (Makefile.am): Insert arg-nonnull.h into dirent.h.
105736         * modules/fcntl-h (Depends-on): Add arg-nonnull.
105737         (Makefile.am): Insert arg-nonnull.h into fcntl.h.
105738         * modules/fnmatch (Depends-on): Add arg-nonnull.
105739         (Makefile.am): Insert arg-nonnull.h into fnmatch.h.
105740         * modules/getopt-posix (Depends-on): Add arg-nonnull.
105741         (Makefile.am): Insert arg-nonnull.h into getopt.h.
105742         * modules/glob (Depends-on): Add arg-nonnull.
105743         (Makefile.am): Insert arg-nonnull.h into glob.h.
105744         * modules/iconv_open (Depends-on): Add arg-nonnull.
105745         (Makefile.am): Insert arg-nonnull.h into iconv.h.
105746         * modules/inttypes (Depends-on): Add arg-nonnull.
105747         (Makefile.am): Insert arg-nonnull.h into inttypes.h.
105748         * modules/locale (Depends-on): Add arg-nonnull.
105749         (Makefile.am): Insert arg-nonnull.h into locale.h.
105750         * modules/math (Depends-on): Add arg-nonnull.
105751         (Makefile.am): Insert arg-nonnull.h into math.h.
105752         * modules/netdb (Depends-on): Add arg-nonnull.
105753         (Makefile.am): Insert arg-nonnull.h into netdb.h.
105754         * modules/search (Depends-on): Add arg-nonnull.
105755         (Makefile.am): Insert arg-nonnull.h into search.h.
105756         * modules/signal (Depends-on): Add arg-nonnull.
105757         (Makefile.am): Insert arg-nonnull.h into signal.h.
105758         * modules/spawn (Depends-on): Add arg-nonnull.
105759         (Makefile.am): Insert arg-nonnull.h into spawn.h.
105760         * modules/stdio (Depends-on): Add arg-nonnull.
105761         (Makefile.am): Insert arg-nonnull.h into stdio.h.
105762         * modules/stdlib (Depends-on): Add arg-nonnull.
105763         (Makefile.am): Insert arg-nonnull.h into stdlib.h.
105764         * modules/string (Depends-on): Add arg-nonnull.
105765         (Makefile.am): Insert arg-nonnull.h into string.h.
105766         * modules/strings (Depends-on): Add arg-nonnull.
105767         (Makefile.am): Insert arg-nonnull.h into strings.h.
105768         * modules/sys_socket (Depends-on): Add arg-nonnull.
105769         (Makefile.am): Insert arg-nonnull.h into sys/socket.h.
105770         * modules/sys_stat (Depends-on): Add arg-nonnull.
105771         (Makefile.am): Insert arg-nonnull.h into sys/stat.h.
105772         * modules/sys_time (Depends-on): Add arg-nonnull.
105773         (Makefile.am): Insert arg-nonnull.h into sys/time.h.
105774         * modules/sys_times (Depends-on): Add arg-nonnull.
105775         (Makefile.am): Insert arg-nonnull.h into sys/times.h.
105776         * modules/sys_utsname (Depends-on): Add arg-nonnull.
105777         (Makefile.am): Insert arg-nonnull.h into sys/utsname.h.
105778         * modules/time (Depends-on): Add arg-nonnull.
105779         (Makefile.am): Insert arg-nonnull.h into time.h.
105780         * modules/unistd (Depends-on): Add arg-nonnull.
105781         (Makefile.am): Insert arg-nonnull.h into unistd.h.
105782         * modules/wchar (Depends-on): Add arg-nonnull.
105783         (Makefile.am): Insert arg-nonnull.h into wchar.h.
105784         * modules/argv-iter (Depends-on): Add arg-nonnull.
105785         * tests/test-canonicalize.c (null_ptr): New function.
105786         (main): Use it.
105787         * tests/test-canonicalize-lgpl.c (null_ptr): New function.
105788         (main): Use it.
105789         * tests/test-memmem.c (null_ptr): New function.
105790         (main): Use it.
105791         Reported by Jim Meyering.
105793 2009-12-10  Bruno Haible  <bruno@clisp.org>
105795         Use spaces for indentation, not tabs.
105796         * lib/**/*.[hcy] except lib/reg*.[hc]: Untabify.
105797         * m4/*.m4: Untabify.
105798         * build-aux/*.h: Untabify.
105799         * tests/**/*.[hc]: Untabify.
105800         * README: New section "Indent with spaces, not TABs", based on
105801         coreutils/HACKING and comments by Pádraig Brady and Paolo Bonzini.
105802         * NEWS: Mention the change.
105804 2009-12-10  Bruno Haible  <bruno@clisp.org>
105806         pty test: Fix link error.
105807         * modules/pty-tests (Makefile.am): Add the default LDADD value to
105808         test_pty_LDADD.
105810 2009-12-07  Simon Josefsson  <simon@josefsson.org>
105812         * modules/pty: New file.
105813         * modules/pty-tests: New file.
105814         * m4/pty.m4: New file.
105815         * tests/test-pty.c: New file.
105816         * doc/glibc-headers/pty.texi: Modified.
105817         * doc/glibc-functions/forkpty.texi: Modified.
105818         * doc/glibc-functions/openpty.texi: Modified.
105820 2009-12-10  Bruno Haible  <bruno@clisp.org>
105822         Avoid syntax error in C++ mode.
105823         * lib/stdio.in.h (rename): Don't use parameter name 'new'.
105825 2009-12-10  Bruno Haible  <bruno@clisp.org>
105827         Use sed with option -e.
105828         * gnulib-tool (func_version, func_emit_copyright_notice,
105829         func_emit_initmacro_end, func_import, func_create_testdir): Pass
105830         option -e to sed.
105831         * modules/link-warning (Makefile.am): Likewise.
105833 2009-12-10  Jim Meyering  <meyering@redhat.com>
105835         mgetgroups: do not write bytes beyond end of malloc'd buffer
105836         * lib/mgetgroups.c: Fix an off-by-one error.  When we have no
105837         username, we call getgroups with a one-element-shorter buffer,
105838         but still told it the length was original, max_n_groups.
105840 2009-12-09  Eric Blake  <ebb9@byu.net>
105842         cloexec: relax license
105843         * modules/cloexec (Maintainer): Add myself.
105844         (License): Use LGPL, not GPL.
105846         link-warning: optimize generation
105847         * modules/link-warning (Makefile.am): Reduce process usage.
105849 2009-12-09  Bruno Haible  <bruno@clisp.org>
105851         * doc/posix-functions/unsetenv.texi: Mention Solaris 10 bug for which a
105852         workaround was added on 2009-11-17.
105854 2009-12-09  Jim Meyering  <meyering@redhat.com>
105855             Bruno Haible  <bruno@clisp.org>
105857         link-warning: Allow extra lines at the top of build-aux/link-warning.h.
105858         * modules/link-warning (Makefile.am): Make the comment-removing sed
105859         command more robust in the face of bootstrap-prepended comment lines.
105861 2009-12-09  Bruno Haible  <bruno@clisp.org>
105863         * lib/mgetgroups.c (mgetgroups): Don't remove duplicates if there is at
105864         most one group.
105866 2009-12-09  Simon Josefsson  <simon@josefsson.org>
105867             Bruno Haible  <bruno@clisp.org>
105869         * build-aux/link-warning.h: Add copyright notice.
105870         * modules/link-warning (Makefile.am): Generate link-warning.h from
105871         build-aux/link-warning.h. Update LINK_WARNING_H accordingly.
105872         * NEWS: Mention change in link-warning module.
105873         * modules/arpa_inet (Makefile.am): Add dependency to arpa/inet.h.
105874         * modules/dirent (Makefile.am): Add dependency to dirent.h.
105875         * modules/fcntl-h (Makefile.am): Add dependency to fcntl.h.
105876         * modules/getopt-posix (Makefile.am): Add dependency to getopt.h.
105877         * modules/inttypes (Makefile.am): Add dependency to inttypes.h.
105878         * modules/math (Makefile.am): Add dependency to math.h.
105879         * modules/search (Makefile.am): Add dependency to search.h.
105880         * modules/signal (Makefile.am): Add dependency to signal.h.
105881         * modules/spawn (Makefile.am): Add dependency to spawn.h.
105882         * modules/stdio (Makefile.am): Add dependency to stdio.h.
105883         * modules/stdlib (Makefile.am): Add dependency to stdlib.h.
105884         * modules/string (Makefile.am): Add dependency to string.h.
105885         * modules/strings (Makefile.am): Add dependency to strings.h.
105886         * modules/sys_ioctl (Makefile.am): Add dependency to sys/ioctl.h.
105887         * modules/sys_select (Makefile.am): Add dependency to sys/select.h.
105888         * modules/sys_socket (Makefile.am): Add dependency to sys/socket.h.
105889         * modules/sys_stat (Makefile.am): Add dependency to sys/stat.h.
105890         * modules/sys_times (Makefile.am): Add dependency to sys/times.h.
105891         * modules/sys_utsname (Makefile.am): Add dependency to sys/utsname.h.
105892         * modules/sys_wait (Makefile.am): Add dependency to sys/wait.h.
105893         * modules/unistd (Makefile.am): Add dependency to unistd.h.
105894         * modules/wchar (Makefile.am): Add dependency to wchar.h.
105896 2009-12-09  Bruno Haible  <bruno@clisp.org>
105898         fchdir: Optimize away rpl_fstat when possible.
105899         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Set REPLACE_FSTAT only together with
105900         REPLACE_OPEN_DIRECTORY.
105901         * lib/fchdir.c (rpl_fstat): Define only when REPLACE_OPEN_DIRECTORY.
105903 2009-12-09  Bruno Haible  <bruno@clisp.org>
105905         * lib/fchdir.c: Update comment.
105907 2009-12-09  Bruno Haible  <bruno@clisp.org>
105909         * lib/cloexec.c (set_cloexec_flag): Clarify intent of dup2 call.
105911 2009-12-08  Eric Blake  <ebb9@byu.net>
105913         fchdir: avoid memory leak on re-registration.
105914         * lib/fchdir.c (ensure_dirs_slot): Avoid memory leak.
105916 2009-12-08  Jim Meyering  <meyering@redhat.com>
105918         init.sh: avoid Solaris 10 /bin/sh portability problem
105919         Solaris 10's /bin/sh does not pass '.' arguments 2.. to the
105920         sourced script:
105921           $ printf 'echo "$@"\n' > f; /bin/sh -c '. ./f bar'
105922           $ printf 'echo "$@"\n' > f; /bin/bash -c '. ./f bar'
105923           bar
105924         tests/init.sh relied on that, accepting a --set-path=DIR argument,
105925         and two tests used that idiom.
105926         * tests/init.sh: Update suggested usage comments.
105927         (path_prepend_): New function, to be used in place
105928         of the --src-path=DIR option.
105929         (setup_): Move PATH-prepending code into path_prepend_.
105930         * tests/test-pread.sh: Adapt to new usage.
105931         * tests/test-xalloc-die.sh: Likewise.
105933 2009-12-08  Simon Josefsson  <simon@josefsson.org>
105935         * doc/gnulib.texi (Glibc pty.h): Add.
105936         * doc/glibc-functions/forkpty.texi: Add.
105937         * doc/glibc-functions/openpty.texi: Add.
105938         Suggested by Bruno Haible.
105940 2009-12-08  Eric Blake  <ebb9@byu.net>
105942         fchdir: fix logic bugs
105943         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Fix logic bug.
105944         * tests/test-fchdir.c (main): Enhance test.
105945         * lib/fchdir.c (rpl_fstat): Always provide if fchdir replacement
105946         is in use.
105948         dup2: fix logic bugs
105949         * lib/dup2.c (dup2): Fix logic bugs.  Use HAVE_DUP2 rather than
105950         REPLACE_DUP2 to decide when rpl_dup2 is needed.
105951         * m4/dup2.m4 (gl_REPLACE_DUP2): Only define REPLACE_DUP2 when dup2
105952         exists.
105953         (gl_FUNC_DUP2): Drop unneeded AC_DEFINE.
105955 2009-12-07  Eric Blake  <ebb9@byu.net>
105957         unlink: fix m4 detection
105958         * m4/unlink.m4 (gl_FUNC_UNLINK): Include correct header.
105960         unistd-safer: add unit test
105961         * modules/unistd-safer-tests: New file.
105962         * tests/test-dup-safer.c: Likewise.
105963         * tests/test-cloexec.c (setmode): Avoid compiler warning.
105964         * tests/test-dup2.c (setmode): Likewise.
105965         * lib/cloexec.c (dup_cloexec): Fix mingw compile error.
105967         cloexec: preserve text vs. binary across dup_cloexec
105968         * lib/cloexec.c (dup_cloexec) [W32]: Query and use translation
105969         mode.
105970         * modules/dup2-tests (Depends-on): Add binary-io.
105971         * modules/cloexec-tests (Depends-on): Likewise.
105972         * tests/test-dup2.c (setmode, is_mode): New helpers.
105973         (main): Add tests that translation mode is preserved.
105974         * tests/test-cloexec.c (setmode, is_mode, main): Likewise.
105975         Reported by Bruno Haible.
105977         mgetgroups: reduce duplicate listings
105978         * lib/mgetgroups.c (mgetgroups): Reduce duplicates from the
105979         resulting array.
105980         * tests/test-chown.h (test_chown): Simplify client.
105981         * tests/test-lchown.h (test_lchown): Likewise.
105983 2009-12-06  Bruno Haible  <bruno@clisp.org>
105985         * lib/cloexec.c (dup_cloexec): Fix handling of _gl_register_dup return
105986         value.
105988 2009-12-06  Bruno Haible  <bruno@clisp.org>
105990         * lib/progname.c: Include stdio.h, stdlib.h.
105991         (set_program_name): Reject a NULL argument.
105993 2009-12-05  Eric Blake  <ebb9@byu.net>
105995         pipe2-safer: new module
105996         * modules/pipe2-safer: New file.
105997         * lib/unistd-safer.h (pipe2_safer): New prototype.
105998         * lib/unistd--.h (pipe2): New wrapper.
105999         * lib/pipe-safer.c (pipe2_safer): New function.
106000         * modules/pipe (Depends-on): Add pipe2-safer.
106001         * lib/pipe.c (create_pipe) [WIN32]: Let pipe2_safer do the work.
106003         stdlib-safer: preserve cloexec flag for mkostemp[s]
106004         * lib/mkstemp-safer.c (mkostemp_safer, mkostemps_safer): Use new
106005         fd_safer_flag.
106007         unistd-safer: allow preservation of cloexec status via flag
106008         * lib/unistd-safer.h (dup_safer_flag, fd_safer_flag): New
106009         prototypes.
106010         * lib/dup-safer.c (dup_safer_flag): New function.
106011         * lib/fd-safer.c (fd_safer_flag): Likewise.
106012         * modules/cloexec (configure.ac): Set witness.
106014         test-dup2: enhance test
106015         * modules/dup2-tests (Depends-on): Add cloexec.
106016         * tests/test-dup2.c (main): Enhance test.
106018         cloexec: add dup_cloexec
106019         * lib/cloexec.h (dup_cloexec): New prototype.  Add copyright
106020         header and comments.
106021         * lib/cloexec.c (set_cloexec_flag): Add comments.
106022         (dup_cloexec): New function, with mingw implementation borrowed
106023         from...
106024         * lib/w32spawn.h (dup_noinherit): ...here.
106025         * modules/execute (Depends-on): Add cloexec.
106026         * modules/pipe (Depends-on): Likewise.
106027         * modules/cloexec (Depends-on): Add dup2.
106028         * modules/cloexec-tests (Files): New file.
106029         * tests/test-cloexec.c: Likewise.
106031         test-xalloc-die: fix test for mingw
106032         * modules/xalloc-die-tests (Files): Add tests/init.sh.
106033         * tests/test-xalloc-die.sh: Rewrite to use init.sh.  Strip
106034         directory and .exe suffix off argv[0] output.
106036         test-fseeko: fix test for mingw
106037         * tests/test-fseeko.c (fseek): Redefine GL_LINK_WARNING, rather
106038         than undefining fseek, so test will pass on mingw.
106040 2009-12-05  Bruno Haible  <bruno@clisp.org>
106042         * lib/progname.h (set_program_name): Clarify specification.
106043         * lib/progname.c (set_program_name): Likewise.
106044         Reported by Jim Meyering.
106046 2009-12-05  Jim Meyering  <meyering@redhat.com>
106048         maint.mk: backslash-escape parens in default regexp
106049         * top/maint.mk (news-check-regexp): Now that we're using grep -E,
106050         backslash-escape the literal parentheses.
106052         maint.mk: news-date-check: use grep -E
106053         * top/maint.mk (today): Define a Make variable, not a...
106054         (news-date-check): ...shell variable.
106055         (news-date-regexp): Use the Make variable.
106056         Use grep's -E option.  Change the failing diagnostic to mention
106057         the variable, $(news-date-regexp).
106059 2009-12-04  Alfred M. Szmidt  <ams@gnu.org>
106061         maintainer-makefile: allow customization of NEWS entry format
106062         * top/maint.mk (news-date-regexp): New overridable variable.
106063         (news-date-check): Use it.
106065 2009-12-04  Eric Blake  <ebb9@byu.net>
106067         mgetgroups: add xgetgroups, and avoid ENOSYS failures
106068         * lib/mgetgroups.h (xgetgroups): New prototype.
106069         * lib/mgetgroups.c (xgetgroups): New wrapper.
106070         (mgetgroups): Handle ENOSYS.
106071         * modules/mgetgroups (Depends-on): Add realloc.
106072         Reported by Scott Harrison <scott.gnu.2009@scottrix.co.uk>.
106074         mgetgroups: avoid argument promotion issues with -1
106075         * lib/mgetgroups.c (mgetgroups): A cast is required when checking
106076         for invalid gid_t.
106077         * tests/test-chown.h (getegid, test_chown): Likewise.
106078         * tests/test-lchown.h (getegid, test_lchown): Likewise.
106080 2009-12-03  Paolo Bonzini  <bonzini@gnu.org>
106082         exclude: Fix header file problems.
106083         * lib/exclude.h: Add multiple inclusion guards and include stdbool.h.
106085 2009-12-01  Jim Meyering  <meyering@redhat.com>
106087         fts: fts_open: do not let an empty string cause immediate failure
106088         This is required in support of GNU rm, for which the command
106089         "rm A '' B" must process and remove both A and B, in spite of
106090         the empty string argument.
106091         * lib/fts.c (fts_open): Do not let the presence of an empty string
106092         cause fts_open to fail immediately.  Most fts-using tools must be
106093         able to process all arguments, in order, and can be expected to
106094         diagnose such arguments themselves.
106096 2009-11-30  Eric Blake  <ebb9@byu.net>
106098         utimens: fix compilation error
106099         * lib/utimens.c (lutimens) [!HAVE_UTIMENSAT && HAVE_LUTIMES]:
106100         Declare variable at right scope.
106102 2009-11-29  Jim Meyering  <meyering@redhat.com>
106104         bootstrap: handle perl-5.11's changed --version output
106105         * build-aux/bootstrap (get_version): Handle perl separately,
106106         since perl-5.11's --version output is different.
106108 2009-11-28  Jim Meyering  <meyering@redhat.com>
106110         userspec: depend on the inttostr module, too
106111         * modules/userspec (Depends-on): Add inttostr.
106113         userspec: disallow an ID that maps to (uid_t)-1 or (gid_t)-1
106114         * lib/userspec.c (parse_with_separator): Do not accept a user ID
106115         number of MAXUID when it evaluates to (uid_t) -1.
106116         Likewise for group ID.  Reported by Matt McCutchen in
106117         <http://savannah.gnu.org/bugs/?28113>
106119         userspec: reformat to use spaces, not TABs
106120         * lib/userspec.c: Expand TABs to spaces.
106121         Add Emacs' "indent-tabs-mode: nil" hint.
106123 2009-11-27  Eric Blake  <ebb9@byu.net>
106125         getopt-gnu: flush out another BSD bug
106126         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Test for the bug.
106127         * tests/test-getopt.c (main): Check POSIXLY_CORRECT first, to
106128         flush out BSD bug.
106129         * tests/test-getopt.h (test_getopt): End lists with NULL.
106130         * tests/test-getopt_long.h (test_getopt_long): Likewise.
106131         (test_getopt_long_posix): Enhance test.
106132         * modules/getopt-posix-tests (Depends-on): Add stdbool.
106133         * doc/glibc-functions/getopt_long.texi (getopt_long): Mention
106134         getopt-gnu.
106135         * doc/glibc-functions/getopt_long_only.texi (getopt_long_only):
106136         Likewise.
106138 2009-11-27  Simon Josefsson  <simon@josefsson.org>
106140         * modules/idpriv-droptemp-tests (Notice): Fix text.
106142 2009-11-27  Jim Meyering  <meyering@redhat.com>
106144         test-xalloc-die: avoid spurious failure due to libtool argv difference
106145         In a libtool-enabled project, this test would fail due to a difference
106146         in the emitted program name, e.g.,
106147         -test-xalloc-die: memory exhausted
106148         +/tmp/.../tests/.libs/lt-test-xalloc-die: memory exhausted
106149         Use program to avoid that.
106150         * modules/xalloc-die-tests (Depends-on): Add progname.
106151         * tests/test-xalloc-die.c: Include progname.h".
106152         (program_name): Remove decl.
106153         (main): Call set_program_name.
106154         * tests/test-xalloc-die.sh (compare): Remove unnecessary ${EXE}.
106156 2009-11-26  Richard Jones  <rjones@redhat.com>
106158         w32sock: leave win32 error in place.
106159         * lib/w32sock.h (set_winsock_errno): Do not call WSASetLastError.
106161 2009-11-26  Eric Blake  <ebb9@byu.net>
106163         init.sh: suggest to use skip_ and fail_ functions in comments
106164         * tests/init.sh: Add a sentence.
106166 2009-11-25  Bruno Haible  <bruno@clisp.org>
106168         init.sh: add documentation in comments
106169         * tests/init.sh: Add some developer and user documentation.
106171 2009-11-26  Jim Meyering  <meyering@redhat.com>
106173         init.sh: accommodate even those who specify bogus srcdir manually
106174         * tests/init.sh: Normally, srcdir is guaranteed by automake and
106175         configure-time tests to be sanitized, so that there is no need to
106176         use "$srcdir" in Makefile rules and shell scripts.  Using $srcdir
106177         (with no double quotes) suffices.  However, since tests may be
106178         invoked manually, and since you may explicitly set srcdir to the
106179         name of a directory containing spaces, do quote its uses here.
106180         * tests/test-pread.sh: Likewise.
106181         Suggested by Bruno Haible.
106183         test-pread.sh: avoid diagnostics for those who ignore SIGPIPE
106184         * tests/test-pread.sh: Write no data into the pipe, because
106185         test-pread actually reads none.  This avoids a diagnostic,
106186         "bash: echo: write error: Broken pipe", that arises in the unusual
106187         event something is ignoring SIGPIPE, and might be interpreted
106188         as some sort of failure.  Reported by Bruno Haible.
106190 2009-11-25  Jim Meyering  <meyering@redhat.com>
106192         test-pread: cover failure with ESPIPE and EINVAL
106193         * tests/test-pread.c (main): Test for failure, too.
106194         * tests/test-pread.sh: Invoke with stdin on a pipe.
106195         Suggested by Eric Blake.
106197         pread: improvement and fix
106198         * modules/pread (Depends-on): Depend on lseek, for portability to
106199         e.g., mingw.  Suggested by Eric Blake.
106200         * lib/pread.c (__libc_read): Define.  Reported by Richard W.M. Jones.
106202         unistd.in.h: correct declaration of pread
106203         * lib/unistd.in.h: Correct type of "buf" parameter: void*, not char*
106204         Reported by Richard W.M. Jones.
106206         test-pread.sh: distribute the test script
106207         * modules/pread-tests (Files): Include test-pread.sh.
106209         test-pread.sh: clean up
106210         * tests/test-pread.sh: Don't refer to $builddir. Just use equivalent ".".
106211         * modules/pread-tests (TESTS_ENVIRONMENT): Don't export builddir.
106212         That is unnecessary, since it's always ".".
106213         Suggestion from Eric Blake.
106215         test-pread.sh: make executable
106216         * tests/test-pread.sh: Set executable bit.
106217         Reported by Eric Blake.
106219         correct typo in test-pread.sh
106220         * tests/test-pread.sh: Add #! line.
106222         test pread
106223         * tests/test-pread.c: New file.
106224         * tests/test-pread.sh: Likewise.
106225         * modules/pread-tests: Likewise.
106227         pread: new module
106228         * modules/pread: New file.
106229         * lib/unistd.in.h (pread): Define/declare.
106230         * lib/pread.c (pread): New file.
106231         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Define defaults.
106232         * modules/unistd (Makefile.am): Substitute witnesses.
106233         * doc/posix-functions/pread.texi (pread): Update.
106234         * MODULES.html.sh: Add pread.
106236 2009-11-25  Jim Meyering  <meyering@redhat.com>
106238         tests/init.sh: new file to be used via most *.sh tests
106239         * tests/init.sh: New file.
106241 2009-11-25  Eric Blake  <ebb9@byu.net>
106243         utimens: work around older Linux failure with symlinks
106244         * lib/utimens.c (lutimensat_works_really): New variable.
106245         (fdutimens, lutimens): Use it to manage kernels that support
106246         nanosecond times on files, but not on symlinks.
106247         Reported by Ondřej Vašík.
106249         utimes: fix configure grammar
106250         * m4/utimes.m4 (gl_FUNC_UTIMES): Delete spurious word.
106252 2009-11-25  Paolo Bonzini  <bonzini@gnu.org>
106254         regex: Fix fastmap for multibyte character ranges.
106255         * lib/regcomp.c (re_compute_fastmap_iter): Add all multibyte lead
106256         characters when a multibyte character range is included.
106258 2009-11-22  Andy Wingo  <wingo@pobox.com>
106260         version-etc: work also with AM_INIT_AUTOMAKE's no-define option
106261         * lib/version-etc.c [!defined PACKAGE]: Define to PACKAGE_TARNAME.
106263 2009-11-24  Bruno Haible  <bruno@clisp.org>
106265         doc: Most *_l functions exist in MacOS X 10.5.
106266         * doc/posix-functions/duplocale.texi: Update platforms list.
106267         * doc/posix-functions/freelocale.texi: Likewise.
106268         * doc/posix-functions/newlocale.texi: Likewise.
106269         * doc/posix-functions/uselocale.texi: Likewise.
106270         * doc/posix-functions/isalnum_l.texi: Likewise.
106271         * doc/posix-functions/isalpha_l.texi: Likewise.
106272         * doc/posix-functions/isblank_l.texi: Likewise.
106273         * doc/posix-functions/iscntrl_l.texi: Likewise.
106274         * doc/posix-functions/isdigit_l.texi: Likewise.
106275         * doc/posix-functions/isgraph_l.texi: Likewise.
106276         * doc/posix-functions/islower_l.texi: Likewise.
106277         * doc/posix-functions/isprint_l.texi: Likewise.
106278         * doc/posix-functions/ispunct_l.texi: Likewise.
106279         * doc/posix-functions/isspace_l.texi: Likewise.
106280         * doc/posix-functions/isupper_l.texi: Likewise.
106281         * doc/posix-functions/iswalnum_l.texi: Likewise.
106282         * doc/posix-functions/iswalpha_l.texi: Likewise.
106283         * doc/posix-functions/iswblank_l.texi: Likewise.
106284         * doc/posix-functions/iswcntrl_l.texi: Likewise.
106285         * doc/posix-functions/iswctype_l.texi: Likewise.
106286         * doc/posix-functions/iswdigit_l.texi: Likewise.
106287         * doc/posix-functions/iswgraph_l.texi: Likewise.
106288         * doc/posix-functions/iswlower_l.texi: Likewise.
106289         * doc/posix-functions/iswprint_l.texi: Likewise.
106290         * doc/posix-functions/iswpunct_l.texi: Likewise.
106291         * doc/posix-functions/iswspace_l.texi: Likewise.
106292         * doc/posix-functions/iswupper_l.texi: Likewise.
106293         * doc/posix-functions/iswxdigit_l.texi: Likewise.
106294         * doc/posix-functions/isxdigit_l.texi: Likewise.
106295         * doc/posix-functions/nl_langinfo_l.texi: Likewise.
106296         * doc/posix-functions/strcasecmp_l.texi: Likewise.
106297         * doc/posix-functions/strcoll_l.texi: Likewise.
106298         * doc/posix-functions/strfmon_l.texi: Likewise.
106299         * doc/posix-functions/strftime_l.texi: Likewise.
106300         * doc/posix-functions/strncasecmp_l.texi: Likewise.
106301         * doc/posix-functions/strxfrm_l.texi: Likewise.
106302         * doc/posix-functions/tolower_l.texi: Likewise.
106303         * doc/posix-functions/toupper_l.texi: Likewise.
106304         * doc/posix-functions/towctrans_l.texi: Likewise.
106305         * doc/posix-functions/towlower_l.texi: Likewise.
106306         * doc/posix-functions/towupper_l.texi: Likewise.
106307         * doc/posix-functions/wcscoll_l.texi: Likewise.
106308         * doc/posix-functions/wcsxfrm_l.texi: Likewise.
106309         * doc/posix-functions/wctrans_l.texi: Likewise.
106310         * doc/posix-functions/wctype_l.texi: Likewise.
106311         * doc/glibc-functions/strptime_l.texi: Likewise.
106312         * doc/glibc-functions/strtod_l.texi: Likewise.
106313         * doc/glibc-functions/strtof_l.texi: Likewise.
106314         * doc/glibc-functions/strtol_l.texi: Likewise.
106315         * doc/glibc-functions/strtold_l.texi: Likewise.
106316         * doc/glibc-functions/strtoll_l.texi: Likewise.
106317         * doc/glibc-functions/strtoul_l.texi: Likewise.
106318         * doc/glibc-functions/strtoull_l.texi: Likewise.
106319         * doc/glibc-functions/wcsftime_l.texi: Likewise.
106320         * doc/glibc-functions/wcstod_l.texi: Likewise.
106321         * doc/glibc-functions/wcstof_l.texi: Likewise.
106322         * doc/glibc-functions/wcstol_l.texi: Likewise.
106323         * doc/glibc-functions/wcstold_l.texi: Likewise.
106324         * doc/glibc-functions/wcstoll_l.texi: Likewise.
106325         * doc/glibc-functions/wcstoul_l.texi: Likewise.
106326         * doc/glibc-functions/wcstoull_l.texi: Likewise.
106328 2009-11-24  Bruno Haible  <bruno@clisp.org>
106330         duplocale: Fix logic bug.
106331         * lib/duplocale.c: Don't include <langinfo.h>.
106332         (_NL_LOCALE_NAME): Remove macro.
106333         (rpl_duplocale): Use setlocale instead of nl_langinfo.
106334         * tests/test-duplocale.c (main): Also test duplocale after uselocale.
106336 2009-11-23  Jim Meyering  <meyering@redhat.com>
106338         test-update-copyright: don't hard-code /usr/bin/perl
106339         * tests/test-update-copyright.sh (YEAR): Use date +%Y, rather than
106340         perl to print the current year.  Gilles Espinasse reported that
106341         the replaced use of perl was hard-coded as /usr/bin/perl.
106343 2009-11-23  Bruno Haible  <bruno@clisp.org>
106345         duplocale: Add support for glibc 2.3.x.
106346         * lib/duplocale.c (rpl_duplocale): Add fallback code for glibc 2.3.x.
106348 2009-11-22  Bruno Haible  <bruno@clisp.org>
106350         vasnprintf: Tiny optimization.
106351         * lib/vasnprintf.c (decimal_point_char): Choose the fast path also on
106352         MacOS X.
106354 2009-11-22  Bruno Haible  <bruno@clisp.org>
106356         Tests for module 'duplocale'.
106357         * modules/duplocale-tests: New file.
106358         * tests/test-duplocale.c: New file.
106360         New module 'duplocale'.
106361         * m4/duplocale.m4: New file.
106362         * lib/locale.in.h (duplocale): New declaration.
106363         * lib/duplocale.c: New file.
106364         * m4/locale_h.m4 (gl_REPLACE_LOCALE_H, gl_LOCALE_MODULE_INDICATOR,
106365         gl_LOCALE_H_DEFAULTS): New macros.
106366         (gl_LOCALE_H): Require gl_LOCALE_H_DEFAULTS. Invoke
106367         gl_CHECK_NEXT_HEADERS unconditionally. Invoke gl_REPLACE_LOCALE_H.
106368         * modules/locale (Makefile.am): Substitute also GNULIB_DUPLOCALE,
106369         REPLACE_DUPLOCALE.
106370         * modules/duplocale: New file.
106371         * doc/posix-functions/duplocale.texi: Mention the glibc bug.
106373 2009-11-22  Bruno Haible  <bruno@clisp.org>
106375         * modules/locale-tests (configure.ac): Test for newlocale function.
106376         * tests/test-locale.c: When the system has extended locale functions,
106377         verify that <locale.h> defines locale_t and LC_GLOBAL_LOCALE.
106379         locale: Make locale_t available when possible.
106380         * lib/locale.in.h: Include <xlocale.h> when it exists.
106381         * m4/locale_h.m4 (gl_LOCALE_H): Check for <xlocale.h> and arrange to
106382         replace <locale.h> if it does not define locale_t but <xlocale.h> does.
106383         * modules/locale (Depends-on): Add extensions.
106384         (Makefile.am): Also substitute HAVE_XLOCALE_H.
106385         * doc/posix-headers/locale.texi: Document the problem with locale_t.
106387 2009-11-22  Bruno Haible  <bruno@clisp.org>
106389         Add comments.
106390         * m4/dirent_h.m4 (gl_DIRENT_H): Add comment about gl_CHECK_NEXT_HEADERS
106391         invocation.
106392         * m4/iconv_h.m4 (gl_ICONV_H): Likewise.
106393         * m4/spawn_h.m4 (gl_SPAWN_H): Likewise.
106394         * m4/wchar.m4 (gl_WCHAR_H): Likewise.
106396 2009-11-22  Bruno Haible  <bruno@clisp.org>
106398         error: account for the possibility of freopen (stdout).
106399         * lib/error.c: Include <unistd.h>.
106400         (flush_stdout): New function, extracted from error and error_at_line.
106401         Determine stdout's fd dynamically.
106402         (error, error_at_line): Invoke flush_stdout.
106403         * m4/error.m4 (gl_PREREQ_ERROR): Require AC_C_INLINE.
106404         * modules/error (Depends-on): Add unistd.
106406 2009-11-22  Bruno Haible  <bruno@clisp.org>
106408         diffseq: Add comment.
106409         * lib/diffseq.h (IF_LINT): Add comment about pitfall.
106411 2009-11-22  Jim Meyering  <meyering@redhat.com>
106413         c-stack: avoid defining an unused static function
106414         * lib/c-stack.c (find_stack_direction): Do not define this function
106415         when it will not be used.
106417         diffseq: avoid spurious gcc warnings
106418         * lib/diffseq.h (IF_LINT2): Define.
106419         (compareseq): Use it to initialize two members of "part".
106420         This avoids two used-uninitialized warnings.
106422 2009-11-21  Jim Meyering  <meyering@redhat.com>
106424         c-stack: avoid "ignoring return value of `write'" warning
106425         * lib/c-stack.c: Include "ignore-value.h".
106426         (die): Explicitly ignore each write return value.
106427         * modules/c-stack (Depends-on): Add ignore-value.
106429 2009-11-21  Bruno Haible  <bruno@clisp.org>
106431         diffseq: reduce scope of variable 'best'.
106432         * lib/diffseq.h (diag) [USE_HEURISTIC]: Reduce scope of 'best'
106433         variable, earlier used for two different purposes.
106435 2009-11-21  Jim Meyering  <meyering@redhat.com>
106437         diffseq: remove useless assignment to "best"
106438         * lib/diffseq.h (diag) [USE_HEURISTIC]: Remove useless "best = 0"
106439         assignment.  At that point "best" is already guaranteed to be zero.
106441 2009-11-20  Eric Blake  <ebb9@byu.net>
106443         build: mention ftp redirector in release announcements
106444         * top/maint.mk (gnu_rel_host, url_dir_list): Provide defaults for
106445         values that used to come from cfg.mk; mention FTP redirect URL.
106446         * build-aux/announce-gen: Mention the mirror list.
106447         Suggested by Karl Berry.
106449         nanosleep: improve port to mingw
106450         * lib/nanosleep.c (rpl_nanosleep): Reject invalid arguments.
106451         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Incorporate LIBSOCKET into
106452         LIB_NANOSLEEP, but only when needed.
106453         * modules/select (Link): Document LIBSOCKET.
106454         * m4/select.m4 (gl_FUNC_SELECT): Ensure LIBSOCKET is defined early
106455         enough.
106457         nanosleep: work around cygwin bug
106458         * lib/nanosleep.c (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]:
106459         Fix logic bug when nanosleep fails.  Work around cygwin 1.5.x
106460         bug.
106461         (getnow): Delete, not needed.
106462         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): No longer require
106463         LIB_CLOCK_GETTIME.
106464         * modules/nanosleep (Depends-on): Add intprops and verify.  Drop
106465         clock-time, gettime.
106466         * doc/posix-functions/nanosleep.texi (nanosleep): Document the
106467         bug.
106468         * modules/nanosleep-tests: New test.
106469         * tests/test-nanosleep.c: New file.
106471         sleep: work around cygwin bug
106472         * lib/sleep.c (rpl_sleep): Work around the bug.
106473         * m4/sleep.m4 (gl_FUNC_SLEEP): Detect the bug.
106474         (gl_PREREQ_SLEEP): Delete unused macro.
106475         * modules/sleep (Depends-on): Add verify.
106476         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add default.
106477         * modules/unistd (Makefile.am): Substitute witness.
106478         * lib/unistd.in.h (sleep): Update prototype.
106479         * doc/posix-functions/sleep.texi (sleep): Document the bug.
106480         * tests/test-sleep.c (main) [HAVE_DECL_ALARM]: Test it.
106481         * modules/sleep-tests (Depends-on): Check for alarm.
106483 2009-11-20  Jim Meyering  <meyering@redhat.com>
106485         maint.mk: improve sc_prohibit_magic_number_exit
106486         * top/maint.mk (sc_prohibit_magic_number_exit): Tighten regexp
106487         so it does not match uses like System.exit(1).
106488         Add comments showing how to correct all offenders.
106490 2009-11-19  Eric Blake  <ebb9@byu.net>
106492         xalloc-die-tests: add missing library
106493         * modules/xalloc-die-tests (Makefile.am): Add LDADD line.
106495         test-xvasprintf: silence compiler warnings
106496         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Mask
106497         empty string from gcc.
106499 2009-11-19  Jim Meyering  <meyering@redhat.com>
106501         xfreopen: new module, from coreutils
106502         * modules/xfreopen: New module.
106503         * lib/xfreopen.c: New file.
106504         * lib/xfreopen.h: New file.
106505         * MODULES.html.sh (File stream based Input/Output"): Add it.
106507 2009-11-19  Eric Blake  <ebb9@byu.net>
106509         manywarnings: depend on warnings
106510         * modules/manywarnings (Depends-on): Add warnings.
106512         build: avoid compiler warnings
106513         * lib/select.c (rpl_select): Delete unused variable.
106514         * lib/setsockopt.c (rpl_setsockopt): Avoid incompatible pointer.
106516 2009-11-18  Eric Blake  <ebb9@byu.net>
106518         tests: avoid false negative with --with-packager
106519         * tests/test-version-etc.sh: Discard packager information.
106520         * tests/test-argp-version-etc-1.sh: Likewise.
106521         Reported by Mike Frysinger.
106523         utimens: fix regression on Solaris
106524         * m4/utimens.m4 (gl_UTIMENS): Check for BSD bug.
106525         * lib/utimens.c (fdutimens): Revert 2009-11-08 change; Solaris 10
106526         can only change fd timestamps via futimesat.  Instead, use an
106527         additional witness macro to avoid BSD bug.
106528         Reported by Jim Meyering.
106530 2009-11-17  Eric Blake  <ebb9@byu.net>
106532         usleep: use it to simplify tests
106533         * modules/stat-time-tests (Depends-on): Add usleep.
106534         (configure.ac): Drop usleep check.
106535         * modules/chown-tests (Depends-on, configure.ac): Likewise.
106536         * modules/lchown-tests (Depends-on, configure.ac): Likewise.
106537         * modules/fdutimensat-tests (Depends-on, configure.ac): Likewise.
106538         * modules/futimens-tests (Depends-on, configure.ac): Likewise.
106539         * modules/openat-tests (Depends-on, configure.ac): Likewise.
106540         * modules/utimens-tests (Depends-on, configure.ac): Likewise.
106541         * modules/utimensat-tests (Depends-on, configure.ac): Likewise.
106542         * modules/pipe-filter-gi-tests (Depends-on, configure.ac):
106543         Likewise.
106544         * tests/test-chown.h (nap): Rely on nicer usleep semantics.
106545         * tests/test-lchown.h (nap): Likewise.
106546         * tests/test-pipe-filter-gi2-main.c (small_nap): Likewise.
106547         * tests/test-stat-time.c (nap): Likewise.
106548         * tests/test-utimens-common.h (nap): Update comments.
106550         usleep: new module
106551         * modules/usleep: New file.
106552         * m4/usleep.m4 (gl_FUNC_USLEEP): Likewise.
106553         * lib/usleep.c (usleep): Likewise.
106554         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add defaults.
106555         * modules/unistd (Makefile.am): Substitute witnesses.
106556         * lib/unistd.in.h (usleep): Add declaration.
106557         * doc/pastposix-functions/usleep.texi (usleep): Document this.
106558         * MODULES.html.sh (Date and time): Likewise.
106559         * modules/usleep-tests (Depends-on): New test.
106560         * tests/test-usleep.c: New file.
106562         chown: work around OpenBSD bug
106563         * lib/chown.c (rpl_chown): Work around the bug.
106564         * lib/lchown.c (rpl_lchown): Attempt to do likewise.
106565         * m4/chown.m4 (gl_FUNC_CHOWN): Test for ctime bug.
106566         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check for lchmod.
106567         * modules/chown (Depends-on): Add stdbool.
106568         * modules/lchown (Depends-on): Likewise.
106569         * doc/posix-functions/chown.texi (chown): Document the bug.
106570         * doc/posix-functions/lchown.texi (lchown): Likewise.
106571         * tests/test-lchown.h (test_chown): Relax test.
106573         mkstemp: avoid conflict with C++ keyword template
106574         * lib/mkdtemp.c (mkdtemp): Change spelling of template.
106575         * lib/mkostemp.c (mkostemp): Likewise.
106576         * lib/mkostemps.c (mkostemps): Likewise.
106577         * lib/mkstemp.c (mkstemp): Likewise.
106578         * lib/mkstemps.c (mkstemps): Likewise.
106580         xalloc-die-tests: optimize
106581         * tests/test-xalloc-die.sh: Reduce number of processes.
106583 2009-11-17  Simon Josefsson  <simon@josefsson.org>
106585         * gnulib-tool: Support LGPLv3+ licenses in module files.  Tiny
106586         patch from ludo@gnu.org (Ludovic Courtès).
106588 2009-11-17  Jim Meyering  <meyering@redhat.com>
106590         version-etc: use proper license string
106591         * modules/version-etc (License): Use LGPL, not LGPLv3+.
106592         * modules/version-etc-fsf: Likewise.
106594 2009-11-17  Simon Josefsson  <simon@josefsson.org>
106596         * tests/test-xalloc-die.sh: Add license.  Check that nothing is
106597         printed to stdout.  Deal with EOL differences.
106599 2009-11-17  Eric Blake  <ebb9@byu.net>
106601         unsetenv: work around Solaris bug
106602         * m4/setenv.m4 (gl_FUNC_UNSETENV): Check for bug.
106603         * lib/unsetenv.c (rpl_unsetenv): Work around it.
106604         Reported by Jim Meyering.
106606         vasnprintf: avoid compiler warnings
106607         * lib/vasnprintf.c (VASNPRINTF): Avoid shadowing our own local
106608         variables.
106609         * lib/printf-args.c (PRINTF_FETCHARGS): Avoid type mismatch.
106611 2009-11-17  Simon Josefsson  <simon@josefsson.org>
106613         * modules/xalloc-die-tests (Makefile.am): Drop XFAIL_TESTS
106614         settings since xalloc-die is no longer the self test,
106615         xalloc-die.sh is.
106617 2009-11-17  Jim Meyering  <meyering@redhat.com>
106619         test-xalloc-die.sh: make the code agree with the commit log
106620         * tests/test-xalloc-die.sh: Put "." at the front of $PATH, not
106621         at the end, just in case you happen to have a test-xalloc-die
106622         program in some other PATH directory.
106624         test-xalloc-die.sh: fix a portability bug
106625         * tests/test-xalloc-die.sh: Do not invoke via ./test-xalloc-die.
106626         Instead, set PATH to start with "." and invoke via "test-xalloc-die".
106627         Otherwise, argv[0] (as often seen in diagnostics) would be too
106628         system-dependent, sometimes with, and sometimes without the leading "./".
106630         version-etc-fsf: relax license to LGPLv3+
106631         * modules/version-etc-fsf (License): Relax license.
106633 2009-11-16  Eric Blake  <ebb9@byu.net>
106635         xalloc-die-tests: avoid printing null pointer
106636         * modules/xalloc-die-tests (Files, Makefile.am): Wrap execution in
106637         shell script.
106638         * tests/test-xalloc-die.c (program_name): Declare.
106639         * tests/test-xalloc-die.sh (tmpfiles): New file.
106641         setenv, unsetenv: work around various bugs
106642         * lib/setenv.c (setenv) [!HAVE_SETENV]: Resync from glibc.
106643         (setenv) [HAVE_SETENV]: Work around bugs.
106644         * lib/unsetenv.c (unsetenv) [HAVE_UNSETENV]: Work around bugs.
106645         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE, gl_FUNC_UNSETENV): Check
106646         for bugs.
106647         (gl_FUNC_SETENV): Write in terms of gl_FUNC_SETENV_SEPARATE.
106648         * m4/environ.m4 (gl_ENVIRON): Avoid expand-before-require.
106649         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Update defaults.
106650         * modules/stdlib (Makefile.am): Update substitutions.
106651         * lib/stdlib.in.h (setenv, unsetenv): Update prototypes.
106652         * doc/posix-functions/setenv.texi (setenv): Document the bugs.
106653         * doc/posix-functions/unsetenv.texi (unsetenv): Likewise.
106654         * modules/setenv-tests: New test.
106655         * modules/unsetenv-tests: Likewise.
106656         * tests/test-setenv.c: New file.
106657         * tests/test-unsetenv.c: Likewise.
106659 2009-11-16  Jim Meyering  <meyering@redhat.com>
106661         version-etc: relax license to LGPLv3+
106662         * modules/version-etc (License): Relax license.
106664         better AC_REQUIRE expanded-before-required-warning avoidance
106665         * m4/chown.m4 (gl_FUNC_CHOWN, gl_FUNC_CHOWN_FOLLOWS_SYMLINK): Define
106666         with AC_DEFUN_ONCE, rather than AC_DEFUN, to avoid AC_REQUIRE warnings.
106667         Suggested by Eric Blake.  This change also reverts commit 1b712ba8,
106668         which is no longer needed.
106670 2009-11-16  Eric Blake  <ebb9@byu.net>
106672         test-freading: clean up temporary file
106673         * tests/test-freading.c (main): Remove file on success, and use
106674         ASSERT more liberally.
106675         Reported by Jim Meyering.
106677 2009-11-16  Jim Meyering  <meyering@redhat.com>
106679         avoid new AC_REQUIRE expanded-before-required warnings
106680         * modules/chown (configure.ac): Require gl_FUNC_CHOWN, rather than
106681         merely using it.
106682         * modules/euidaccess (configure.ac): Likewise for gl_FUNC_EUIDACCESS.
106683         * modules/faccessat (configure.ac): Likewise for gl_FUNC_FACCESSAT.
106685 2009-11-15  Simon Josefsson  <simon@josefsson.org>
106687         * tests/test-xalloc-die.c: New file.
106688         * modules/xalloc-die-tests: New file.
106689         * gnulib-tool (func_emit_tests_Makefile_am): Also initialize
106690         XFAIL_TESTS so it can be appended by modules.
106692 2009-11-15  Simon Josefsson  <simon@josefsson.org>
106694         * lib/gc-pbkdf2-sha1.c: Remove comments from RFC 2898.  Reported
106695         by Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>.
106697 2009-11-14  Eric Blake  <ebb9@byu.net>
106699         fnmatch: avoid compiler warning
106700         * lib/fnmatch_loop.c (NEW_PATTERN): Coerce addition to unsigned,
106701         to silence compiler warning about mismatch signedness in ?:.
106702         Reported by Robert Millan.
106704         intprops: add double-inclusion guard
106705         * lib/intprops.h: Allow idempotent includes.
106706         Suggested by Bruce Korb.
106708         openat: detect Solaris fchownat bug
106709         * lib/fchownat.c (rpl_fchownat): Work around Solaris bug.  Avoid
106710         penalizing glibc chownat when only lchownat is broken.
106711         * m4/openat.m4 (gl_FUNC_FCHOWNAT): Replace fchownat if there are
106712         trailing slash bugs.
106713         * doc/posix-functions/fchownat.texi (fchownat): Document the bug.
106714         * modules/openat-tests (Files): Include more files.
106715         (Depends-on): Add mgetgroups, sleep, stat-time.
106716         (configure.ac): Add additional checks.
106717         (Makefile.am): Build new test.
106718         * tests/test-fchownat.c: New file.
106720         lchown: detect Solaris and FreeBSD bug
106721         * lib/lchown.c (rpl_lchown): Work around bug.
106722         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check for trailing slash bugs.
106723         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness.
106724         * modules/unistd (Makefile.am): Populate it.
106725         * lib/unistd.in.h (lchown): Update declaration.
106726         * doc/posix-functions/lchown.texi (lchown): Document the bug.
106727         * modules/lchown-tests: New file.
106728         * tests/test-lchown.h (test_lchown): Likewise.
106729         * tests/test-lchown.c (main): Likewise.
106731         chown: detect Solaris and FreeBSD bug
106732         * lib/chown.c (rpl_chown): Work around bug.
106733         * m4/chown.m4 (gl_FUNC_CHOWN): Check for trailing slash bugs.
106734         (gl_PREREQ_CHOWN): Delete.
106735         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness.
106736         * modules/unistd (Makefile.am): Populate it.
106737         * lib/unistd.in.h (chown): Update declaration.
106738         * lib/lchown.c (chown): Update client.
106739         * modules/lchown (Depends-on): Add lstat.
106740         * doc/posix-functions/chown.texi (chown): Document the bug.
106741         * doc/posix-functions/getgroups.texi (getgroups): Document
106742         getgroups pitfall.
106743         * modules/chown-tests: New file.
106744         * tests/test-chown.h (test_chown): Likewise.
106745         * tests/test-chown.c (main): Likewise.
106747 2009-11-14  Robert Millan  <rmh.grub@aybabtu.com>  (tiny change)
106749         gnulib-tool: correctly detect absence of m4 directories
106750         * gnulib-tool: Avoid extra newline on data passed to wc -l.
106752 2009-11-14  Jim Meyering  <meyering@redhat.com>
106754         maint.mk: Prohibit inclusion of "xalloc.h" without use.
106755         * top/maint.mk (sc_prohibit_close_stream_without_use): New rule.
106757 2009-11-14  John W. Eaton  <jwe@gnu.org>
106759         strftime.h: wrap function declaration in extern "C" block
106760         * lib/strftime.h (nstrftime) [__cplusplus]: Wrap declaration.
106762 2009-11-13  Eric Blake  <ebb9@byu.net>
106764         getgroups: avoid compiler warning
106765         * lib/getgroups.c (rpl_getgroups): Delete shadowed variable.
106767         getgroups: work around FreeBSD bug
106768         * lib/getgroups.c (rpl_getgroups): Work around the bug.
106769         * m4/getgroups.m4 (gl_FUNC_GETGROUPS): Detect the bug.
106770         * doc/posix-functions/getgroups.texi (getgroups): Document it.
106771         * tests/test-getgroups.c (main): Fix buffer overrun.
106773         getgroups: avoid compilation failure
106774         * lib/getgroups.c (includes): Include <stdint.h> for SIZE_MAX.
106775         * modules/getgroups (Depends-on): Add stdint.
106777 2009-11-13  Jim Meyering  <meyering@redhat.com>
106779         test-getgroups: avoid compilation failure
106780         * tests/test-getgroups.c: Include <stdint.h> for use of SIZE_MAX.
106782 2009-11-13  Eric Blake  <ebb9@byu.net>
106784         mgetgroups: new module, taken from coreutils
106785         * modules/mgetgroups: New file.
106786         * lib/mgetgroups.h: Likewise.
106787         * lib/mgetgroups.c (mgetgroups): Likewise.
106788         * m4/mgetgroups.m4 (gl_MGETGROUPS): Likewise.
106789         * MODULES.html.sh (Users and groups): Mention it.
106791         getgroups: don't expose GETGROUPS_T to user
106792         * lib/getgroups.c (rpl_getgroups): Change signature.  Copy array
106793         an element at a time if GETGROUPS_T is wrong size.
106794         * lib/getugroups.h (getugroups): Change signature.
106795         * lib/unistd.in.h (getgroups): Likewise.
106796         * m4/getgroups.m4 (gl_FUNC_GETGROUPS): Use replacement if
106797         signature needs fixing.
106798         * m4/getugroups.m4 (gl_GETUGROUPS): No longer need
106799         AC_TYPE_GETGROUPS.
106800         * modules/group-member (Depends-on): Add getgroups.
106801         * lib/group-member.c (group_info, get_group_info): Use gid_t.
106802         (group_member): Rely on getgroups replacement.
106803         * lib/getugroups.c (getugroups): Use gid_t.
106804         * tests/test-getgroups.c (main): Likewise.
106805         * NEWS: Mention the signature change.
106806         * doc/posix-functions/getgroups.texi (getgroups): Mention the
106807         problem with signature.
106808         * doc/glibc-functions/setgroups.texi (setgroups): Mention that
106809         GETGROUPS_T is still useful for setgroups.
106811         getgroups, getugroups: provide stubs for mingw
106812         * lib/getgroups.c (getgroups): Provide ENOSYS stub for mingw.
106813         * lib/getugroups.c (getugroups): Likewise.
106814         * m4/getgroups.m4 (gl_FUNC_GETGROUPS): Check for missing
106815         function.  Modernize replacement scheme.
106816         (gl_PREREQ_GETGROUPS): Delete.
106817         * m4/getugroups.m4 (gl_GETUGROUPS): Check for <grp.h>.
106818         * modules/getgroups (configure.ac): Declare witness.
106819         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add default.
106820         * modules/unistd (Depends-on): Substitute witness.
106821         * lib/unistd.in.h (getgroups): Declare replacement.
106823         getgroups: avoid calling exit
106824         * modules/getgroups (Depends-on): Add malloc-posix and unistd,
106825         drop xalloc.
106826         * modules/getgroups-tests (Depends-on, Makefile.am): Drop unneeded
106827         dependencies.
106828         * lib/getgroups.c (rpl_getgroups): Fail with ENOMEM rather than
106829         exiting, in the rare case of malloc failure.
106831         getgroups: fix logic error
106832         * lib/getgroups.c (rpl_getgroups): Don't fail if current process
106833         has more than 20 groups.
106834         * modules/getgroups-tests: New test.
106835         * tests/test-getgroups.c: New file.
106837 2009-11-13  Simon Josefsson  <simon@josefsson.org>
106839         * tests/test-base64.c: Improve.
106841 2009-11-13  Simon Josefsson  <simon@josefsson.org>
106843         * tests/test-xvasprintf.c: Fix memory leak, suggested by Eric
106844         Blake <ebb9@byu.net>.
106846 2009-11-13  Simon Josefsson  <simon@josefsson.org>
106848         * tests/test-xvasprintf.c: Add %s%s related checks.
106850 2009-11-12  Eric Blake  <ebb9@byu.net>
106852         version-etc: match standards.texi style
106853         * lib/version-etc.c (emit_bug_reporting_address): Drop periods,
106854         and use <> only for URLs.
106856 2009-11-10  Kamil Dudka  <kdudka@redhat.com>
106858         fts: do not fail on a submount during traversal
106859         * lib/fts.c (fts_build): Read the stat info again after opening
106860         a directory if the FTS_TIGHT_CYCLE_CHECK flag is set.
106861         Original report at http://bugzilla.redhat.com/501848.
106863 2009-11-12  Jim Meyering  <meyering@redhat.com>
106865         bootstrap: sync from coreutils
106866         * build-aux/bootstrap (bootstrap_epilogue): New function.
106867         Use git_modules_config in one more place.  This make bootstrap's
106868         --gnulib-srcdir option more useful for testing.
106870         bootstrap: generalize autoheader check
106871         * build-aux/bootstrap: Look for AC_CONFIG_HEADER as well as
106872         AC_CONFIG_HEADERS.
106874 2009-11-11  Eric Blake  <ebb9@byu.net>
106876         mkfifoat: use new modules for Solaris and BSD bugs
106877         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Simplify.
106878         * lib/mkfifoat.c (mknodat): Split...
106879         * lib/mknodat.c (mknodat): ...into new file.
106880         * modules/mkfifoat (Files): Ship new file.
106881         (Depends-on): Add mkfifo, mknod.
106882         * modules/mkfifoat-tests (Files): Reuse mkfifo tests.
106883         (Depends-on): Add symlink.
106884         * tests/test-mkfifoat.c (main): Enhance test.  Drop portions now
106885         redundant with test_mkfifo.h.
106886         (do_mkfifoat, do_mknodat): New helpers.
106888         mknod: new module
106889         * modules/mknod: New file.
106890         * m4/mknod.m4 (gl_FUNC_MKNOD): Likewise.
106891         * lib/mknod.c (mknod): Likewise.
106892         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Set witness
106893         defaults.
106894         * modules/sys_stat (Makefile.am): Substitute them.
106895         * lib/sys_stat.in.h (mknod): Declare replacement.
106896         * MODULES.html.sh (Support for systems lacking POSIX:2008):
106897         Document it.
106898         * doc/posix-functions/mknod.texi (mknod): Likewise.
106899         * modules/mknod-tests: New test.
106900         * tests/test-mknod.c: Likewise.
106902         mkfifo: new module
106903         * modules/mkfifo: New file.
106904         * m4/mkfifo.m4 (gl_FUNC_MKFIFO): Likewise.
106905         * lib/mkfifo.c (mkfifo): Likewise.
106906         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Set witness
106907         defaults.
106908         * modules/sys_stat (Makefile.am): Substitute them.
106909         * lib/sys_stat.in.h (mkfifo): Declare replacement.
106910         * MODULES.html.sh (Support for systems lacking POSIX:2008):
106911         Document it.
106912         * doc/posix-functions/mkfifo.texi (mkfifo): Likewise.
106913         * modules/mkfifo-tests: New test.
106914         * tests/test-mkfifo.h (test_mkfifo): New file, borrowed in part
106915         from test-mkfifoat.c.
106916         * tests/test-mkfifo.c: New file.
106918         readlink: detect FreeBSD bug
106919         * m4/readlink.m4 (gl_FUNC_READLINK): Also detect FreeBSD bug with
106920         slash on symlink.
106921         * doc/posix-functions/readlink.texi (readlink): Document the bug.
106922         * tests/test-readlink.h (test_readlink): Enhance test.
106924         symlink: detect FreeBSD bug
106925         * m4/symlink.m4 (gl_FUNC_SYMLINK): Also detect FreeBSD bug with
106926         slash on symlink.
106927         * doc/posix-functions/symlink.texi (symlink): Document the bug.
106928         * tests/test-symlink.h (test_symlink): Enhance test.
106930 2009-11-10  Eric Blake  <ebb9@byu.net>
106932         link: detect FreeBSD bug
106933         * m4/link.m4 (gl_FUNC_LINK): Also detect FreeBSD bug with slash on
106934         symlink.
106935         * doc/posix-functions/link.texi (link): Document the bug.
106936         * tests/test-link.h (test_link): Enhance test.
106937         * tests/test-linkat.c (main): Update caller.
106939         unlink, remove: detect FreeBSD bug
106940         * m4/unlink.m4 (gl_FUNC_UNLINK): Also detect FreeBSD bug with
106941         slash on symlink.
106942         * doc/posix-functions/unlink.texi (unlink): Document the bug.
106943         * doc/posix-functions/remove.texi (remove): Likewise.
106944         * tests/test-unlink.h (test_unlink): Enhance test.
106945         * tests/test-remove.c (main): Likewise.
106947 2009-11-09  Eric Blake  <ebb9@byu.net>
106949         rename: detect FreeBSD bug
106950         * m4/rename.m4 (gl_FUNC_RENAME): Also detect FreeBSD bug with
106951         slash on symlink.
106952         * modules/renameat-tests (Depends-on): Add filenamecat.
106953         * tests/test-rename.h (test_rename): Allow one more errno.
106954         * tests/test-renameat.c (main): Likewise.
106955         * doc/posix-functions/rename.texi (rename): Document the bug.
106957         open: detect FreeBSD bug
106958         * m4/open.m4 (gl_FUNC_OPEN): Also detect FreeBSD bug with slash on
106959         symlink.
106960         * doc/posix-functions/open.texi (open): Document the bug.
106961         * doc/posix-functions/utimes.texi (utimes): Likewise.
106962         * tests/test-open.h (test_open): Add parameters, and test symlink
106963         handling.
106964         * tests/test-open.c (main): Adjust caller.
106965         * tests/test-fcntl-safer.c (main): Likewise.
106966         * modules/open-tests (Depends-on): Add stdbool, symlink.
106967         * modules/fcntl-safer-tests (Depends-on): Likewise.
106968         * tests/test-openat.c (main): Add test-open tests.
106970         stat: detect FreeBSD bug
106971         * m4/stat.m4 (gl_FUNC_STAT): Also detect FreeBSD bug with slash on
106972         symlink.
106973         * doc/posix-functions/stat.texi (stat): Document the bug.
106974         * tests/test-stat.h (test_stat_func): Add argument.
106975         * tests/test-stat.c (main): Adjust caller.
106976         * tests/test-fstatat.c (main): Likewise.
106977         * modules/stat-tests (Depends-on): Add stdbool, symlink.
106978         Reported by Jim Meyering.
106980 2009-11-09  James Youngman  <jay@gnu.org>
106982         strftime.c: include ignore-value.h only when FPRINTFTIME is defined
106983         * lib/strftime.c: Correct placement of #include "ignore-value.h".
106985 2009-11-08  Jim Meyering  <meyering@redhat.com>
106987         utimens: remove invalid futimesat call
106988         * lib/utimens.c (fdutimens): Remove invalid futimesat call.
106989         It used the file descriptor of the target file as the DIR_FD
106990         parameter and NULL as the file name.  That caused failure with
106991         errno == EFAULT on FreeBSD-8.0-rc2
106993 2009-11-07  Eric Blake  <ebb9@byu.net>
106995         fflush, freadseek: use fseeko, not fseek
106996         * lib/fflush.c (clear_ungetc_buffer_preserving_position)
106997         (clear_ungetc_buffer): Avoid potential problems on large files.
106998         * lib/freadseek.c (freadseek): Likewise.
106999         * modules/freadseek (Depends-on): Add fseeko.
107000         * modules/fseek (configure.ac): Set a witness.
107001         * tests/test-fflush.c (main): Use fseeko.
107002         * tests/test-fpurge.c (fseek): Disable link warning.
107003         * tests/test-freadable.c (fseek): Likewise.
107004         * tests/test-freading.c (fseek): Likewise.
107005         * tests/test-fseeko.c (fseek): Likewise.
107006         * tests/test-ftell.c (fseek): Likewise.
107007         * tests/test-ftello.c (fseek): Likewise.
107008         * tests/test-fwritable.c (fseek): Likewise.
107009         * tests/test-fwriting.c (fseek): Likewise.
107011 2009-11-06  Simon Josefsson  <simon@josefsson.org>
107013         * modules/memchr (Depends-on): Drop getpagesize dependency.
107015 2009-11-06  Simon Josefsson  <simon@josefsson.org>
107017         * build-aux/pmccabe2html: Disable execute bit.  Suggested by
107018         Reported by Ludovic Courtès.
107019         * build-aux/pmccabe2html: Improve example usage.
107020         * build-aux/pmccabe2html: Drop #! header.  Doc fix.
107022 2009-11-06  Jim Meyering  <meyering@redhat.com>
107024         do-release-commit-and-tag: New module.
107025         Automate the release-commit and tag process.
107026         * build-aux/do-release-commit-and-tag: New script, from coreutils.
107027         * modules/do-release-commit-and-tag: New file.
107028         * MODULES.html.sh (Support for maintaining and releasing): Add it.
107030 2009-11-06  Simon Josefsson  <simon@josefsson.org>
107032         * modules/select-tests (test_select_LDADD): Add $(INET_PTON_LIB)
107033         because test-select.c uses inet_pton.
107035 2009-11-06  Simon Josefsson  <simon@josefsson.org>
107037         * m4/getaddrinfo.m4: Add content of INET_NTOP_LIB to
107038         GETADDRINFO_LIB.  Bump serial number.
107039         * modules/getaddrinfo (Link): Only mention GETADDRINFO_LIB again.
107040         Suggested by Eric Blake <ebb9@byu.net>.
107042 2009-11-05  Eric Blake  <ebb9@byu.net>
107044         strtod: detect darwin bug
107045         * m4/strtod.m4 (gl_FUNC_STRTOD): Filter out darwin bug on "nan(".
107046         Reported by Leo Davis.
107048         freopen-safer: new module
107049         * modules/freopen-safer: New module.
107050         * m4/stdio-safer.m4 (gl_FREOPEN_SAFER): New macro.
107051         * lib/freopen-safer.c (freopen_safer): New file.
107052         * lib/stdio-safer.h (freopen_safer): New declaration.
107053         * lib/stdio--.h (freopen): New override.
107054         * MODULES.html.sh (File stream based Input/Output): Mention it.
107055         * doc/posix-functions/freopen.texi (freopen): Mention pitfalls and
107056         freopen-safer module.
107057         * doc/posix-functions/stderr.texi (stderr): Likewise.
107058         * doc/posix-functions/stdin.texi (stdin): Likewise.
107059         * doc/posix-functions/stdout.texi (stdout): Likewise.
107060         * modules/freopen-safer-tests: New test.
107061         * tests/test-reopen-safer.c: New file.
107063 2009-11-05  Jim Meyering  <meyering@redhat.com>
107065         maint.mk: Prohibit inclusion of "close-stream.h" without use.
107066         * top/maint.mk (sc_prohibit_close_stream_without_use): New rule.
107068 2009-11-05  Simon Josefsson  <simon@josefsson.org>
107070         * modules/pmccabe2html (configure.ac): Check for pmccabe tool.
107072 2009-11-05  Simon Josefsson  <simon@josefsson.org>
107074         * modules/getaddrinfo (Link): Add $(INET_NTOP_LIB).
107076 2009-11-05  Simon Josefsson  <simon@josefsson.org>
107078         Fix link error.
107079         * m4/inet_ntop.m4 (gl_INET_NTOP): Fix test of AC_SEARCH_LIBS result.
107080         * m4/inet_pton.m4 (gl_INET_PTON): Likewise.
107082 2009-11-05  Simon Josefsson  <simon@josefsson.org>
107084         * tests/test-func.c: Also test value of __func__.
107086 2009-11-05  Simon Josefsson  <simon@josefsson.org>
107088         * tests/test-sys_socket.c: Use smaller constant value, sa_family_t
107089         may be an 8-bit type.  Reported by Bruno Haible <bruno@clisp.org>.
107091 2009-11-05  Bruno Haible  <bruno@clisp.org>
107093         Fix link error.
107094         * m4/inet_ntop.m4 (gl_INET_NTOP): Fix test of AC_SEARCH_LIBS result.
107095         * m4/inet_pton.m4 (gl_INET_PTON): Likewise.
107096         Reported by Brad Hards <bradh@frogmouth.net> via Simon Josefsson.
107098 2009-11-05  Bruno Haible  <bruno@clisp.org>
107100         Tests for module 'inet_pton'.
107101         * modules/inet_pton-tests: New file.
107102         * tests/test-inet_pton.c: New file.
107104 2009-11-05  Bruno Haible  <bruno@clisp.org>
107106         Tests for module 'inet_ntop'.
107107         * modules/inet_ntop-tests: New file.
107108         * tests/test-inet_ntop.c: New file.
107110 2009-11-04  Eric Blake  <ebb9@byu.net>
107112         stdlib-safer: wrap all mkstemp variants
107113         * modules/mkostemp (configure.ac): Set witness.
107114         * modules/mkostemps (configure.ac): Likewise.
107115         * modules/mkstemps (configure.ac): Likewise.
107116         * lib/stdlib-safer.h (mkostemp_safer, mkostemps_safer)
107117         (mkstemps_safer): Wrap more functions.
107118         * lib/stdlib--.h (mkostemp, mkostemps, mkstemps): Default the
107119         wrapping.
107120         * lib/mkstemp-safer.c (mkostemp_safer, mkostemps_safer)
107121         (mkstemps_safer): Implement the wrappers.
107123         mkstemps, mkostemps: new modules
107124         * modules/mkostemps: New module.
107125         * modules/mkstemps: Likewise.
107126         * lib/mkostemps.c (mkostemps): New file.
107127         * lib/mkstemps.c (mkstemps): Likewise.
107128         * m4/mkostemps.m4 (gl_FUNC_MKOSTEMPS): Likewise.
107129         * m4/mkstemps.m4 (gl_FUNC_MKSTEMPS): Likewise.
107130         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Add witnesses.
107131         * modules/stdlib (Makefile.am): Substitute them.
107132         * lib/stdlib.in.h (mkostemps, mkstemps): Declare them.
107133         * doc/glibc-functions/mkstemps.texi (mkstemps): New file.
107134         * doc/glibc-functions/mkostemps.texi (mkostemps): Likewise.
107135         * doc/gnulib.texi (Glibc stdlib.h): Include them.
107136         * MODULES.html.sh (File system functions): Mention them.
107138         tempname: resync from glibc
107139         * lib/tempname.c (__gen_tempname): Add suffixlen argument.  Use
107140         same values for __GT_FILE as glibc.  Abort even when assertions
107141         are disabled.
107142         * lib/tempname.h (GT_FILE): Use glibc __GT_FILE, if available, and
107143         match its value otherwise.  Allow idempotent inclusion.
107144         * lib/mkdtemp.c (mkdtemp): Adjust caller.
107145         * lib/mkostemp.c (mkostemp): Likewise.
107146         * lib/mkstemp.c (mkstemp): Likewise.
107147         * lib/tmpfile.c (tmpfile): Likewise.
107148         * NEWS: Document this.
107150         utimens: fix use of futimens on older Linux
107151         * lib/utimens.c (fdutimens): Use updated, rather than original,
107152         timespec to avoid bug in older Linux kernel.
107153         Reported by Simon Josefsson.
107155 2009-11-04  Bruno Haible  <bruno@clisp.org>
107157         Make num_processors more flexible and consistent.
107158         * lib/nproc.h (enum nproc_query): New type.
107159         (num_processors): Add a 'query' argument.
107160         * lib/nproc.c: Include <stdlib.h>, <sched.h>, c-ctype.h.
107161         (num_processors): Add a 'query' argument. Test the value of the
107162         OMP_NUM_THREADS environment variable if requested. On Linux, NetBSD,
107163         mingw, count the number of CPUs available for the current process.
107164         * m4/nproc.m4 (gl_PREREQ_NPROC): Require AC_USE_SYSTEM_EXTENSIONS.
107165         Check for sched_getaffinity and sched_getaffinity_np.
107166         * modules/nproc (Depends-on): Add c-ctype, extensions.
107167         * NEWS: Mention the change.
107169 2009-11-03  Bruno Haible  <bruno@clisp.org>
107171         * NEWS: Document the new library dependencies of inet_ntop, inet_pton.
107173 2009-11-03  Jim Meyering  <meyering@redhat.com>
107175         test-getaddrinfo: avoid compilation failure on FreeBSD 7.2
107176         * tests/test-getaddrinfo.c (simple): Test for EAI_NODATA only
107177         if it is defined.
107179 2009-11-02  Eric Blake  <ebb9@byu.net>
107181         mktime, timegm: share common declaration
107182         * lib/mktime-internal.h: New file.
107183         * lib/mktime.c: Use it rather than open-coding a declaration.
107184         * lib/timegm.c: Likewise.
107185         * modules/mktime (Files): Ship it.
107186         * modules/timegm (Files): Likewise.
107187         Suggested by Bruno Haible.
107189         test-update-copyright: update test to match script changes
107190         * tests/test-update-copyright.sh: Avoid hard-coding perl
107191         location.  Don't update *.bak created by earlier runs.
107193 2009-11-02  Paul Eggert  <eggert@cs.ucla.edu>
107194             Simon Josefsson  <simon@josefsson.org>
107195             Bruno Haible  <bruno@clisp.org>
107197         Fix link error on Solaris 8.
107198         * m4/inet_pton.m4 (gl_INET_PTON): Search for the function inet_pton
107199         also in libnsl. Define also INET_PTON_LIB.
107200         * modules/inet_pton (Link): New section.
107202 2009-11-02  Simon Josefsson  <simon@josefsson.org>
107203             Bruno Haible  <bruno@clisp.org>
107205         * m4/inet_ntop.m4 (gl_INET_NTOP): Define also INET_NTOP_LIB.
107206         * modules/inet_ntop (Link): New section.
107207         Reported by Boyan Kasarov <bkasarov@gmail.com>.
107209 2009-11-02  Eric Blake  <ebb9@byu.net>
107211         maint: avoid compiler warnings in m4 macros
107212         * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Avoid unused variable.
107213         * m4/rmdir.m4 (gl_FUNC_RMDIR): Include correct header.
107215 2009-11-02  Simon Josefsson  <simon@josefsson.org>
107217         * m4/pmccabe2html.m4: Remove file.
107218         * modules/pmccabe2html: Drop pmccabe2html.m4.  Don't call m4
107219         function.  Change maintainer.
107220         * build-aux/pmccabe2html: Use /bin/sh with magic instead of
107221         hard-coding path to awk.  Tiny patch from ludo@gnu.org (Ludovic
107222         Courtès).
107224 2009-10-31  Eric Blake  <ebb9@byu.net>
107226         fseeko: fix m4 regression
107227         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Use modern macro.  Fixes
107228         regression from 2009-10-27.
107229         Reported by Ralf Wildenhues.
107231 2009-10-31  Jim Meyering  <meyering@redhat.com>
107233         inttostr: aesthetics and improved (compile-time) safety
107234         Define inttype_is_signed rather than inttype_is_unsigned,
107235         since the sole use is via "#if inttype_is_signed".
107236         * lib/imaxtostr.c (inttype_is_signed): Define this, rather than
107237         inttype_is_unsigned.
107238         * lib/offtostr.c (inttype_is_signed): Likewise.
107239         * lib/uinttostr.c (inttype_is_signed): Likewise.
107240         * lib/umaxtostr.c (inttype_is_signed): Likewise.
107241         * lib/inttostr.c (inttostr): Use verify to cross-check the
107242         inttype_is_signed value and the signedness of the actual type.
107243         * modules/inttostr (Depends-on): Add verify.
107245 2009-10-30  Eric Blake  <ebb9@byu.net>
107247         build: avoid compiler warnings
107248         * lib/fchmodat.c (lchmod): Mark unused variables.
107249         * lib/getopt.c (_getopt_initialize): Likewise.
107250         * lib/mktime.c (__mktime_internal): Provide prototype.
107251         * lib/inttostr.c (inttostr): Avoid compiler warning even with
107252         older gcc that do not understand #pragma GCC diagnostic.
107253         * lib/uinttostr.c (inttype_is_unsigned): Define.
107254         * lib/umaxtostr.c (inttype_is_unsigned): Likewise.
107256 2009-10-30  Michael Haubenwallner  <michael.haubenwallner@salomon.at>
107258         stat: fix compilation on AIX
107259         * lib/sys_stat.in.h (stat): Work with fact that large files on AIX
107260         only see struct stat64.
107262 2009-10-30  Eric Blake  <ebb9@byu.net>
107264         exclude: make more robust
107265         * lib/exclude.c (excluded_file_name): Abort on unexpected value,
107266         rather than masking a coding bug.
107267         Suggested by Bruno Haible.
107269 2009-10-30  Jim Meyering  <meyering@redhat.com>
107271         perl scripts: remove #!/usr/bin/perl in favor of more portable...
107272         Rather than putting #!/usr/bin/perl on the first line,
107273         start with a variant of what's recommended by "man perlrun" that
107274         invokes the first "perl" program from your shell's search path.
107275         * build-aux/gitlog-to-changelog: Replace #!... as above.
107276         Add a "Local Variables" perl mode setting.
107277         Prompted by a patch from Ludovic Courtès.
107278         Improved by Eric Blake.
107279         * build-aux/useless-if-before-free: Likewise.
107280         * build-aux/announce-gen: Likewise.
107281         * build-aux/update-copyright: Likewise.
107283 2009-10-29  Eric Blake  <ebb9@byu.net>
107285         filenamecat-lgpl: adjust clients
107286         * modules/linkat (Depends-on): Use filenamecat-lgpl, not
107287         filenamecat.
107288         * modules/renameat (Depends-on): Likewise.
107290         filenamecat: split into filenamecat-lgpl
107291         * modules/filenamecat-lgpl: New module.
107292         * modules/filenamecat (Files): Move library-safe files into
107293         filenamecat-lgpl.
107294         (Depends-on): Add filenamecat-lgpl.
107295         (configure.ac): Declare witness.
107296         * lib/filenamecat.h (file_name_concat): Only declare when using
107297         GPL module.
107298         * lib/filenamecat.c (longest_relative_suffix, mfile_name_concat):
107299         Move...
107300         * lib/filenamecat-lgpl.c: ...into new file.
107301         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT_LGPL): New macro.
107302         (gl_FILE_NAME_CONCAT): Use it.
107303         * MODULES.html.sh (File system functions): Mention new module.
107305         argp: avoid memory leak
107306         * modules/argp (Depends-on): Use dirname-lgpl, not dirname.
107307         * lib/argp-namefrob.h (__argp_base_name): Use last_component, not
107308         base_name, since the latter malloc()s and can call exit().
107309         Leak introduced 2006-07-03.
107311         dirname-lgpl: adjust clients that don't need full dirname
107312         * modules/backupfile (Depends-on): Use dirname-lgpl, not dirname.
107313         * modules/filenamecat (Depends-on): Likewise.
107314         * modules/linkat (Depends-on): Likewise.
107315         * modules/mkancesdirs (Depends-on): Likewise.
107316         * modules/mkdir (Depends-on): Likewise.
107317         * modules/openat (Depends-on): Likewise.
107318         * modules/savewd (Depends-on): Likewise.
107319         * modules/rename (Depends-on): Likewise.
107320         (License): Relax license.
107321         * modules/mkdir-tests (Depends-on): Drop progname.
107322         (Makefile.am): Delete unneeded LDADD.
107323         * modules/rename-tests (Depends-on, Makefile.am): Likewise.
107325         dirname: split into dirname-lgpl
107326         * modules/dirname-lgpl: New module.
107327         * modules/dirname (Files): Move library-safe files into
107328         dirname-lgpl.
107329         (Depends-on): Add dirname-lgpl.
107330         (configure.ac): Declare witness.
107331         * modules/double-slash-root (License): Relax license.
107332         * lib/dirname.h (base_name, dir_name): Only declare when using GPL
107333         module.
107334         * lib/dirname.c (dir_len, mdir_name): Move...
107335         * lib/dirname-lgpl.c: ...into new file.
107336         * lib/basename.c (last_component, base_len): Move...
107337         * lib/basename-lgpl.c: ...into new file.
107338         * m4/dirname.m4 (gl_DIRNAME_LGPL): New macro.
107339         (gl_DIRNAME): Use it.
107340         * MODULES.html.sh (Enhancements for POSIX:2008 functions):
107341         Mention new module.
107342         * modules/dirname-tests (Depends-on): Add progname.
107343         * tests/test-dirname.c (program_name): Delete.
107345         mkdir: make safe for libraries
107346         * modules/mkdir (Depends-on): Drop xalloc.
107347         * lib/mkdir.c (rpl_mkdir): Fail with ENOMEM rather than calling
107348         exit.
107350         tests: avoid some compiler warnings
107351         * tests/test-getaddrinfo.c (simple): Mark static, and allow string
107352         literals.
107353         * tests/test-memchr.c (main): Avoid type mismatch.
107354         * tests/test-arpa_inet.c (main): Avoid unused parameters.
107355         * tests/test-base64.c (main): Likewise.
107356         * tests/test-getdelim.c (main): Likewise.
107357         * tests/test-gethostname.c (main): Likewise.
107358         * tests/test-getline.c (main): Likewise.
107359         * tests/test-netinet_in.c (main): Likewise.
107360         * tests/test-select.c (open_server_socket, main): Likewise.
107361         * tests/test-select-stdin.c (main): Likewise.
107362         * tests/test-sockets.c (main): Likewise.
107363         * tests/test-strsignal.c (main): Likewise.
107364         * tests/test-sys_select.c (main): Likewise.
107365         * tests/test-sys_socket.c (main): Likewise.
107366         * tests/test-u64.c (main): Likewise.
107367         * tests/test-xfprintf-posix.c (main): Likewise.
107368         * tests/test-xvasprintf.c (test_xvasprintf, main): Likewise.
107370         sockets: avoid compiler warning
107371         * lib/sockets.c (gl_sockets_startup): Mark unused parameter.
107373         maint: detect usage(1) and other suspicious exits
107374         * top/maint.mk (sc_prohibit_magic_number_exit): New rule.
107376 2009-10-29  Jim Meyering  <meyering@redhat.com>
107378         timespec: long-to-int truncation could make timespec_cmp malfunction
107379         * lib/timespec.h (timespec_cmp): Do not interpret a difference of
107380         a multiple of 2^32 nanoseconds as no difference.
107382 2009-10-28  Jim Meyering  <meyering@redhat.com>
107384         fprintftime: wrap macro code argument in "do {...} while(0)"
107385         * lib/strftime.c (cpy) [FPRINTFTIME]: The second argument to the
107386         cpy macro must be a statement that can be followed by a semicolon.
107387         Now that the else clause contains a comment and is hence longer
107388         than one line, I require curly braces.  That in turn requires
107389         that we wrap this code block in the standard do...while(0).
107391         fprintftime: remove stray semicolon from previous change
107392         * lib/strftime.c (cpy) [FPRINTFTIME]: Remove trailing semicolon.
107394         fprintftime: avoid a warning about ignored fwrite return value
107395         * lib/strftime.c [FPRINTFTIME]: Include "ignore-value.h".
107396         (cpy) [FPRINTFTIME]: Ignore fwrite failure, even though technically,
107397         that is unsafe.
107398         * modules/fprintftime (Depends-on): Add ignore-value.
107400         exclude: avoid an unwarranted warning
107401         * lib/exclude.c (excluded_file_name): Initialize "rc" before switch.
107403 2009-10-27  Eric Blake  <ebb9@byu.net>
107405         fseek: avoid compilation failure when fflush is replaced
107406         * m4/fseek.m4 (gl_REPLACE_FSEEK): New macro.
107407         * m4/fseeko.m4 (gl_REPLACE_FSEEKO): Also replace fseek, if fseek
107408         module is in use.
107409         * lib/stdio.in.h (GNULIB_FSEEKO): Only poison fseek if fseek
107410         module is not in use; since REPLACE_FSEEK worked otherwise.
107411         (GNULIB_FTELLO): Likewise for ftell.
107412         Reported by Ian Beckwith and others.
107414 2009-10-27  Bruno Haible  <bruno@clisp.org>
107416         * lib/isnan.c (rpl_isnan[fdl]): Repeat the specification declaration.
107417         Reported by Jim Meyering.
107419 2009-10-27  Jim Meyering  <jim@meyering.net>
107420             Bruno Haible  <bruno@clisp.org>
107422         Avoid warning despite dropping the return value of fwrite.
107423         * lib/unicodeio.c: Include ignore-value.h.
107424         (fwrite_success_callback): Explicitly ignore fwrite's return value.
107425         * modules/unicodeio (Depends-on): Add ignore-value.
107427 2009-10-26  Eric Blake  <ebb9@byu.net>
107429         areadlinkat: fix fallback path
107430         * lib/at-func.c (AT_FUNC_NAME): Avoid signed comparison between
107431         pointer and zero.
107433 2009-10-22  Pádraig Brady  <P@draigBrady.com>
107435         Use a better IO block size for modern systems
107436         * lib/copy-file.c (copy_file_preserving): Used a 32KiB malloced buffer.
107437         * lib/md2.c: Likewise.
107438         * lib/md4.c: Likewise.
107439         * lib/md5.c: Likewise.
107440         * lib/sha1.c: Likewise.
107441         * lib/sha256.c: Likewise.
107442         * lib/sha512.c: Likewise.
107444 2009-10-22  Eric Blake  <ebb9@byu.net>
107446         tests: avoid several compiler warnings
107447         * tests/test-getcwd.c (main): Avoid buffer underflow.
107448         * tests/test-getdate.c (main): String literals are not safe with
107449         putenv, so use setenv.  Declare unused argument.
107450         * modules/getdate-tests (Depends-on): Add setenv.
107451         * tests/test-argv-iter.c (main): Declare unused argument.  Avoid
107452         problems with string literals in char *.
107453         * tests/test-hash.c (main): Avoid shadowing declaration.
107454         (insert_new): Treat string literals as char const *.
107455         * tests/test-getopt.h (test_getopt): Likewise.
107456         (getopt_loop): Alter types to minimize casting elsewhere.
107457         * tests/test-getopt_long.h (test_getopt_long, getopt_long_loop)
107458         (test_getopt_long_posix): Likewise.
107459         (do_getopt_long): Add wrapper to minimize casting.
107460         * tests/test-atexit.c (clear_temp_file): Use void.
107461         * tests/test-areadlink-with-size.c (main): Declare unused
107462         arguments.
107463         * tests/test-areadlink.c (main): Likewise.
107464         * tests/test-areadlinkat-with-size.c (main): Likewise.
107465         * tests/test-areadlinkat.c (main): Likewise.
107466         * tests/test-canonicalize-lgpl.c (main): Likewise.
107467         * tests/test-canonicalize.c (main): Likewise.
107468         * tests/test-dirent-safer.c (main): Likewise.
107469         * tests/test-dirname.c (main): Likewise.
107470         * tests/test-dup2.c (main): Likewise.
107471         * tests/test-fchdir.c (main): Likewise.
107472         * tests/test-fcntl-h.c (main): Likewise.
107473         * tests/test-fcntl-safer.c (main): Likewise.
107474         * tests/test-fdopendir.c (main): Likewise.
107475         * tests/test-fdutimensat.c (main): Likewise.
107476         * tests/test-fflush.c (main): Likewise.
107477         * tests/test-filenamecat.c (main): Likewise.
107478         * tests/test-filevercmp.c (main): Likewise.
107479         * tests/test-fopen-safer.c (main): Likewise.
107480         * tests/test-fopen.c (main): Likewise.
107481         * tests/test-fpending.c (main): Likewise.
107482         * tests/test-fpurge.c (main): Likewise.
107483         * tests/test-freading.c (main): Likewise.
107484         * tests/test-fstatat.c (main): Likewise.
107485         * tests/test-fsync.c (main): Likewise.
107486         * tests/test-futimens.c (main): Likewise.
107487         * tests/test-getndelim2.c (main): Likewise.
107488         * tests/test-gettimeofday.c (main): Likewise.
107489         * tests/test-getopt.c (main): Likewise.
107490         * tests/test-i-ring.c (main): Likewise.
107491         * tests/test-inttypes.c (main): Likewise.
107492         * tests/test-link.c (main): Likewise.
107493         * tests/test-lstat.c (main): Likewise.
107494         * tests/test-math.c (main): Likewise.
107495         * tests/test-md5.c (main): Likewise.
107496         * tests/test-memchr2.c (main): Likewise.
107497         * tests/test-memrchr.c (main): Likewise.
107498         * tests/test-mkdir.c (main): Likewise.
107499         * tests/test-mkdirat.c (main): Likewise.
107500         * tests/test-mkfifoat.c (main): Likewise.
107501         * tests/test-open.c (main): Likewise.
107502         * tests/test-openat-safer.c (main): Likewise.
107503         * tests/test-openat.c (main): Likewise.
107504         * tests/test-quotearg.c (main): Likewise.
107505         * tests/test-rawmemchr.c (main): Likewise.
107506         * tests/test-readlink.c (main): Likewise.
107507         * tests/test-remove.c (main): Likewise.
107508         * tests/test-rename.c (main): Likewise.
107509         * tests/test-renameat.c (main): Likewise.
107510         * tests/test-rmdir.c (main): Likewise.
107511         * tests/test-sha1.c (main): Likewise.
107512         * tests/test-signal.c (main): Likewise.
107513         * tests/test-sigaction.c (main): Likewise.
107514         * tests/test-stat.c (main): Likewise.
107515         * tests/test-stat-time.c (main): Likewise.
107516         * tests/test-stddef.c (main): Likewise.
107517         * tests/test-stdint.c (main): Likewise.
107518         * tests/test-stdio.c (main): Likewise.
107519         * tests/test-stdlib.c (main): Likewise.
107520         * tests/test-strchrnul.c (main): Likewise.
107521         * tests/test-strerror.c (main): Likewise.
107522         * tests/test-string.c (main): Likewise.
107523         * tests/test-strtod.c (main): Likewise.
107524         * tests/test-strverscmp.c (main): Likewise.
107525         * tests/test-symlink.c (main): Likewise.
107526         * tests/test-symlinkat.c (main): Likewise.
107527         * tests/test-sys_stat.c (main): Likewise.
107528         * tests/test-sys_time.c (main): Likewise.
107529         * tests/test-time.c (main): Likewise.
107530         * tests/test-unistd.c (main): Likewise.
107531         * tests/test-unlink.c (main): Likewise.
107532         * tests/test-unlinkat.c (main): Likewise.
107533         * tests/test-utimens.c (main): Likewise.
107534         * tests/test-utimensat.c (main): Likewise.
107535         * tests/test-version-etc.c (main): Likewise.
107536         * tests/test-wchar.c (main): Likewise.
107537         * tests/test-wctype.c (main): Likewise.
107538         * tests/test-xprintf-posix.c (main): Likewise.
107539         * tests/test-posixtm.c (main): Likewise.
107540         (STREQ): Delete unused macro.
107541         * tests/test-linkat.c (main): Declare unused arguments.  Avoid
107542         shadowed variables.
107543         * tests/test-memchr.c (main): Likewise.
107545 2009-10-21  Eric Blake  <ebb9@byu.net>
107547         areadlinkat: avoid failure on older glibc
107548         * lib/at-func.c (AT_FUNC_NAME): Check for explicit FUNC_FAIL,
107549         rather than mis-comparing 0 against FUNC_RESULT of char*.
107551 2009-10-21  Bruno Haible  <bruno@clisp.org>
107553         * modules/stpncpy (License): Relicense under LGPLv2+.
107554         Reported by David Lutterkort <lutter@redhat.com>.
107556 2009-10-20  Eric Blake  <ebb9@byu.net>
107558         utimensat: work around Solaris 9 bug
107559         * lib/utimens.c (fdutimens, lutimens): Force a stat if platform
107560         has trailing slash bugs.
107561         * tests/test-lutimens.h (test_lutimens): Enhance test.
107562         * tests/test-utimens.h (test_utimens): Likewise.
107563         * doc/posix-functions/utime.texi (utime): Enhance documentation.
107564         * doc/posix-functions/utimes.texi (utimes): Likewise.
107565         * doc/posix-functions/utimensat.texi (utimensat): Likewise.
107566         * doc/glibc-functions/futimesat.texi (futimesat): Likewise.
107567         * doc/glibc-functions/lutimes.texi (lutimes): Likewise.
107568         * doc/posix-functions/futimens.texi (futimens): Likewise.
107570         fdutimensat: new module
107571         * modules/fdutimensat: New file.
107572         * lib/fdutimensat.c (fdutimensat): Likewise.
107573         * lib/utimens.h (fdutimensat, lutimensat): Declare new functions.
107574         * MODULES.html.sh (File system functions): Mention module.
107575         * modules/fdutimensat-tests: New test.
107576         * tests/test-fdutimensat.c: Likewise.
107578         doc: regenerate INSTALL
107579         * doc/INSTALL: Reflect recent autoconf update.
107580         * doc/INSTALL.ISO: Likewise.
107581         * doc/INSTALL.UTF-8: Likewise.
107583 2009-10-20  Pádraig Brady  <P@draigBrady.com>
107585         acl: warn if ACL support is not detected
107586         * m4/acl.m4 (gl_FUNC_ACL): Output a warning if ACL support is not found.
107588 2009-10-19  Giuseppe Scrivano  <gscrivano@gnu.org>
107590         * lib/nproc.h: Add extern "C" block for C++.
107592 2009-10-18  Reuben Thomas  <rrt@sc3d.org>
107593             Bruno Haible  <bruno@clisp.org>
107595         * doc/posix-functions/isascii.texi: Document the 2 alternative APIs.
107596         * doc/posix-functions/isalnum.texi: Document the 4 alternative APIs.
107597         * doc/posix-functions/isalpha.texi: Likewise.
107598         * doc/posix-functions/isblank.texi: Likewise.
107599         * doc/posix-functions/iscntrl.texi: Likewise.
107600         * doc/posix-functions/isdigit.texi: Likewise.
107601         * doc/posix-functions/isgraph.texi: Likewise.
107602         * doc/posix-functions/islower.texi: Likewise.
107603         * doc/posix-functions/isprint.texi: Likewise.
107604         * doc/posix-functions/ispunct.texi: Likewise.
107605         * doc/posix-functions/isspace.texi: Likewise.
107606         * doc/posix-functions/isupper.texi: Likewise.
107607         * doc/posix-functions/isxdigit.texi: Likewise.
107609 2009-10-18  Bruno Haible  <bruno@clisp.org>
107611         Tests for module 'isblank'.
107612         * modules/isblank-tests: New file.
107613         * tests/test-isblank.c: New file.
107615         New module 'isblank'.
107616         * lib/isblank.c: New file.
107617         * m4/isblank.m4: New file.
107618         * modules/isblank: New file.
107619         * doc/posix-functions/isblank.texi: Mention the new module.
107621 2009-10-18  Bruno Haible  <bruno@clisp.org>
107623         New module 'ctype'.
107624         * lib/ctype.in.h: New file.
107625         * m4/ctype.m4: New file.
107626         * modules/ctype: New file.
107627         * doc/posix-headers/ctype.texi: Mention the new module.
107629 2009-10-18  Jim Meyering  <meyering@redhat.com>
107631         m4: stylistic-only: hoist AC_SUBST to be adjacent to initialization
107632         Declare a variable like LIB_CLOCK_GETTIME to be AC_SUBSTituted
107633         right after its initialization, rather than farther down.
107634         Keeping these in close proximity makes it easier to ensure
107635         that each such variable is initialized.  E.g.,
107637             LIB_CLOCK_GETTIME=
107638             AC_SUBST([LIB_CLOCK_GETTIME])
107640         This change also increments these serial numbers.
107641         * m4/clock_time.m4 (gl_CLOCK_TIME): Hoist AC_SUBST use.
107642         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
107643         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
107645 2009-10-18  Bruno Haible  <bruno@clisp.org>
107647         Don't let environment variables perturb build.
107648         * m4/gethrxtime.m4 (gl_GETHRXTIME): Initialize LIB_GETHRXTIME here...
107649         (gl_PREREQ_GETHRXTIME): ... not here.
107651 2009-10-18  Bruno Haible  <bruno@clisp.org>
107653         Avoid symlink attack in localcharset module.
107654         * lib/localcharset.c: Include <fcntl.h>, <unistd.h>.
107655         (O_NOFOLLOW): Define fallback.
107656         (get_charset_aliases): Don't open the file if it is a symbolic link.
107657         * m4/fcntl_h.m4 (gl_FCNTL_O_FLAGS): New macro, extracted from
107658         gl_FCNTL_H.
107659         (gl_FCNTL_H): Require it.
107660         * m4/localcharset.m4 (gl_LOCALCHARSET): Likewise.
107661         * modules/localcharset (Files): Add m4/fcntl_h.m4.
107662         Reported by Fergal Glynn <fglynn@veracode.com>.
107664 2009-10-18  Bruno Haible  <bruno@clisp.org>
107666         Implement nproc for mingw.
107667         * lib/nproc.c: Include <windows.h>
107668         (num_processors): On native Windows platforms, try GetSystemInfo.
107670 2009-10-18  Bruno Haible  <bruno@clisp.org>
107672         Implement nproc for IRIX.
107673         * lib/nproc.c: Include <sys/sysmp.h>.
107674         (num_processors): On IRIX systems, try sysmp.
107675         * m4/nproc.m4 (gl_PREREQ_NPROC): Check for sys/sysmp.h and sysmp.
107677 2009-10-18  Bruno Haible  <bruno@clisp.org>
107679         Implement nproc for HP-UX.
107680         * lib/nproc.c: Include <sys/pstat.h>
107681         (num_processors): On HP-UX systems, try pstat_getdynamic.
107682         * m4/nproc.m4 (gl_PREREQ_NPROC): Check for sys/pstat.h and
107683         pstat_getdynamic.
107685 2009-10-18  Giuseppe Scrivano  <gscrivano@gnu.org>
107686             Bruno Haible  <bruno@clisp.org>
107688         Implement nproc for NetBSD, OpenBSD.
107689         * lib/nproc.c: Include <sys/types.h>, <sys/param.h>, <sys/sysctl.h>.
107690         (ARRAY_SIZE): New macro.
107691         (num_processors): On BSD systems, try sysctl of HW_NCPU.
107692         * m4/nproc.m4: New file.
107693         * modules/nproc (Files): Add m4/nproc.m4.
107694         (configure.ac): Invoke gl_NPROC. Remove AC_LIBOBJ invocation.
107695         (Makefile.am): Instead, augment lib_SOURCES.
107697 2009-10-18  Bruno Haible  <bruno@clisp.org>
107699         Fix recognition of sys/sysctl.h on OpenBSD 4.0.
107700         * m4/physmem.m4 (gl_PHYSMEM): Before including sys/sysctl.h, include
107701         sys/param.h.
107703 2009-10-16  Eric Blake  <ebb9@byu.net>
107705         utimensat: new module
107706         * modules/utimensat: New file.
107707         * lib/utimensat.c (utimensat): Likewise.
107708         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Likewise.
107709         * lib/utimens.c (utimensat): Avoid recursion into rpl_utimensat,
107710         so we can work around Linux bugs.
107711         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Add witnesses.
107712         * modules/sys_stat (Makefile.am): Substitute them.
107713         * lib/sys_stat.in.h (utimensat): Declare it.
107714         * MODULES.html.sh (systems lacking POSIX:2008): Mention module.
107715         * doc/posix-functions/utimensat.texi (utimensat): Likewise.
107716         * modules/utimensat-tests: New test.
107717         * tests/test-utimensat.c: Likewise.
107719         utimens: let lutimens work on non-symlinks
107720         * lib/utimens.c (lutimens): Fall back to utimens rather than
107721         failing with ENOSYS, when file is not a symlink.
107722         (utimens): Reduce redirection.
107723         * tests/test-lutimens.h (test_lutimens): Update test to cover
107724         non-symlinks.
107725         * tests/test-utimens.h (test_utimens): Update test to cover
107726         symlinks.
107727         * tests/test-utimens.c (main): Update caller.
107729         utimens: cache whether utimensat syscall works
107730         * lib/utimens.c (utimensat_works_really): New cache variable.
107731         (fdutimens, lutimens): Use it to avoid failing syscall.
107733         test-stat-time, test-utimens: improve portability
107734         * tests/test-stat-time.c (nap): Lengthen delay to 20ms, for
107735         ext4 on alpha, and for cygwin.
107736         * tests/test-utimens-common.h: New file.
107737         (nap): Factor delays into single function.
107738         * tests/test-lutimens.h (test_lutimens): Use new header.
107739         * tests/test-futimens.h (test_futimens): Likewise.
107740         * tests/test-utimens.h (test_utimens): Likewise.  Also, force NFS
107741         timestamps to occur from same machine, as was done previously for
107742         test_utimens.
107743         * modules/utimens-tests (Files): Ship new file.
107744         * modules/futimens-tests (Files): Likewise.
107745         Reported in part by Jim Meyering.
107747         sys_stat: sort replacement declarations
107748         * lib/sys_stat.in.h: Sort declarations.
107749         * lib/futimens.c (futimens): Fix typo.
107751 2009-10-15  Jim Meyering  <meyering@redhat.com>
107753         don't let environment settings perturb build
107754         Setting the envvars, LIB_CLOCK_GETTIME, LIB_EACCESS or LIB_NANOSLEEP
107755         could cause a configure-time and/or build-time malfunction.
107756         Typically, a configure-time function-in-library test is performed
107757         via code like this:
107759           LIB_VAR=
107760           AC_SUBST([LIB_VAR])
107761           prefix_saved_LIBS=$LIBS
107762             AC_SEARCH_LIBS([FUNC], [LIB_NAME],
107763                        [test "$ac_cv_search_FUNC" = "none required" ||
107764                         LIB_VAR=$ac_cv_search_FUNC])
107765           LIBS=$prefix_saved_LIBS
107767         However, in each of the files affected by this change, the LIB_VAR=
107768         initialization was omitted.  Thus, when set in the environment, its
107769         value would propagate into generated Makefiles when FUNC is not found
107770         in LIB_NAME.
107771         * m4/clock_time.m4 (gl_CLOCK_TIME): Initialize AC_SUBST'd var.
107772         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
107773         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
107775 2009-10-14  Eric Blake  <ebb9@byu.net>
107777         fchdir: avoid infinite recursion in mingw
107778         * lib/fchdir.c (rpl_fstat): Call system fstat, rather than
107779         recursing.
107781         test-stat-time: port to mingw
107782         * tests/test-stat-time.c (force_unlink): Return a value.
107783         (test_ctime) [W32]: Fix compilation error.
107784         (nap): Don't call usleep with too large an argument.  Use
107785         force_unlink.
107786         * doc/pastposix-functions/usleep.texi (usleep): Document the
107787         portability issue.
107789 2009-10-13  Jim Meyering  <meyering@redhat.com>
107791         use AC_CHECK_FUNCS_ONCE, not AC_CHECK_FUNCS in modules/*
107792         * modules/pipe-filter-gi: Use AC_CHECK_FUNCS_ONCE, not AC_CHECK_FUNCS.
107793         * modules/pipe-filter-ii: Likewise.
107794         * modules/sys_socket-tests: Likewise.
107795         * modules/tsearch-tests: Likewise.
107796         * Makefile (sc_prefer_ac_check_funcs_once): New rule.
107797         (check): Depend on it.
107799 2009-10-12  Eric Blake  <ebb9@byu.net>
107801         utimens-tests: port to NFS file systems
107802         * tests/test-utimens.h (test_utimens): Refactor utimecmp
107803         comparisons to avoid spurious failures from timestamp drift
107804         between NFS machines.
107806 2009-10-12  Eric Blake  <ebb9@byu.net>
107808         stat-time-tests: minor cleanups
107809         * modules/stat-time-tests (configure.ac): Use AC_CHECK_FUNCS_ONCE.
107810         * tests/test-stat-time.c (nap): Separate assignment from call.
107811         Suggested by Paolo Bonzini and Bruno Haible.
107813         sys_stat: guarantee struct timespec
107814         * lib/sys_stat.in.h (includes): Always include <time.h>
107815         * modules/sys_stat (Depends-on): Add time.
107816         * tests/test-sys_stat.c: Guarantee struct timespec, as well as
107817         mode_t permission values.
107818         * doc/posix-headers/sys_stat.texi (sys/stat.h): Document how to
107819         get at subsecond timestamps.
107821 2009-10-10  Eric Blake  <ebb9@byu.net>
107823         futimens: new module
107824         * modules/futimens: New file.
107825         * lib/futimens.c (futimens): Likewise.
107826         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Likewise.
107827         * lib/utimens.c (futimens): Avoid recursion into rpl_futimens, so
107828         we can work around Linux bugs.
107829         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Add witnesses.
107830         * modules/sys_stat (Makefile.am): Substitute them.
107831         * lib/sys_stat.in.h (futimens): Declare it.
107832         * MODULES.html.sh (systems lacking POSIX:2008): Mention module.
107833         * doc/posix-functions/futimens.texi (futimens): Likewise.
107834         * modules/futimens-tests: New test.
107835         * tests/test-futimens.c: Likewise.
107837         utimens: introduce fdutimens
107838         * lib/utimens.h (fdutimens): New prototype.
107839         * lib/utimens.c (gl_futimens): Move guts...
107840         (fdutimens): ...to new interface.
107841         * tests/test-utimens.c (do_fdutimens): Use it.
107843         utimens: add UTIME_NOW and UTIME_OMIT support
107844         * lib/utimens.c (validate_timespec, update_timespec): New helper
107845         functions.
107846         (gl_futimens, lutimens): Use them.
107847         * modules/utimens (Depends-on): Add gettime, lstat, stat-time,
107848         stdbool, sys_stat.
107849         (Link): Mention resulting library dependency.
107850         * modules/utimecmp (Link): Likewise.
107851         * modules/utimens-tests (Depends-on): Drop stat-time, stdbool.
107852         (Makefile.am): Pick up library dependency.
107853         * lib/sys_stat.in.h (UTIME_NOW, UTIME_OMIT): Guarantee a
107854         definition.
107855         * tests/test-sys_stat.c: Test the definitions.
107856         * doc/posix-headers/sys_stat.texi (sys/stat.h): Document this.
107857         * NEWS: Document library dependency.
107859         utimecmp: support symlink timestamps
107860         * lib/utimecmp.c (utimecmp): Use new interface.  Skip effort of
107861         hashing when possible.  Use pathconf when available.
107862         (SYSCALL_RESOLUTION): Recognize tighter resolution.
107863         * modules/utimecmp (Depends-on): Add lstat.
107865         utimens: add lutimens interface
107866         * lib/utimens.c (lutimens): New function.
107867         * m4/utimens.m4 (gl_UTIMENS): Check for lutimes.
107868         * lib/utimens.h (lutimens): Declare new interface.
107869         * tests/test-utimens.c (main): Enhance test.
107870         * tests/test-lutimens.h (test_lutimens): New file.
107871         * modules/utimens-tests (Files): Distribute it.
107872         (Depends-on): Add symlink.
107873         (configure.ac): Check for usleep.
107875         utimens: validate futimens usage
107876         * lib/utimens.c (gl_futimens): Require valid fd up front, using
107877         fewer syscalls on failure later on.  Avoid compiler warning on
107878         mingw.
107879         * modules/utimens (Depends-on): Add dup2.
107881         utimens: add test
107882         * modules/utimens-tests: New test.
107883         * tests/test-utimens.h: New file.
107884         * tests/test-futimens.h: Likewise.
107885         * tests/test-utimens.c: Likewise.
107887         doc: mention timestamp portability issues
107888         * doc/glibc-functions/lutimes.texi (lutimes): Refer to utimensat
107889         instead.
107890         * doc/posix-functions/utime.texi (utime): Likewise.
107891         * doc/posix-functions/utimes.texi (utimes): Likewise.
107892         * doc/glibc-functions/futimes.texi (futimes): Refer to futimens
107893         instead.
107894         * doc/posix-functions/futimens.texi (futimens): Mention utimens
107895         module.
107896         * doc/posix-functions/utimensat.texi (utimensat): Likewise.
107897         Mention weakness with symlink timestamps.
107898         * doc/glibc-functions/futimesat.texi (futimesat): New file; refer
107899         to utimensat/futimens instead.
107900         * doc/gnulib.texi (Glibc sys/time.h): Include new file.
107902         test-dup2: enhance test
107903         * tests/test-dup2.c (main): Also check AT_FDCWD.
107905         test-stat-time: avoid more spurious failures
107906         * tests/test-stat-time.c (nap): Wait for 15ms rather than 2ms, for
107907         xfs; and avoid race if the two timestamps cross quantization edge.
107909         relocatable: prefer 'file system' over 'filesystem'
107910         * m4/relocatable-lib.m4 (gl_RELOCATABLE_NOP): Use AS_HELP_STRING.
107911         (gl_RELOCATABLE_LIBRARY_BODY): Fix spelling.
107912         * doc/relocatable-maint.texi (Supporting Relocation): Likewise.
107913         * doc/relocatable.texi (Enabling Relocatability): Likewise.
107914         * lib/relocatable.c (compute_curr_prefix): Likewise.
107916 2009-10-10  Jim Meyering  <meyering@redhat.com>
107918         stat-time-tests: check for the usleep function
107919         * modules/stat-time-tests (configure.ac): Now that we test HAVE_USLEEP.
107921 2009-10-10  Bruno Haible  <bruno@clisp.org>
107923         * modules/xnanosleep: Put the Link section after the Include section.
107925 2009-10-09  Eric Blake  <ebb9@byu.net>
107927         dup2: work around FreeBSD 6.1 bug
107928         * m4/dup2.m4 (gl_FUNC_DUP2): Detect bug.
107929         * doc/posix-functions/dup2.texi (dup2): Document it.
107930         Reported by Nelson H. F. Beebe and Jim Meyering.
107932         test-stat-time: port to buggy NFS clients
107933         * tests/test-stat-time.c (main) [W32]: Reduce ifdefs.
107934         (test_ctime): Also skip test if mtime and ctime are skewed.
107936         maint: prefer 'file system' over 'filesystem'
107937         * doc/posix-functions/fstatat.texi (fstatat): Likewise.
107938         * doc/posix-functions/lstat.texi (lstat): Likewise.
107939         * lib/file-has-acl.c (file_has_acl): Likewise.
107940         * lib/fwriteerror.c [TEST]: Likewise.
107941         * tests/test-areadlink.h (test_areadlink): Likewise.
107942         * tests/test-areadlinkat-with-size.c (main): Likewise.
107943         * tests/test-areadlinkat.c (main): Likewise.
107944         * tests/test-canonicalize-lgpl.c (main): Likewise.
107945         * tests/test-canonicalize.c (main): Likewise.
107946         * tests/test-fstatat.c (main): Likewise.
107947         * tests/test-linkat.c (main): Likewise.
107948         * tests/test-lstat.h (test_lstat_func): Likewise.
107949         * tests/test-mkdir.h (test_mkdir): Likewise.
107950         * tests/test-readlink.h (test_readlink): Likewise.
107951         * tests/test-remove.c (main): Likewise.
107952         * tests/test-rename.h (test_rename): Likewise.
107953         * tests/test-renameat.c (main): Likewise.
107954         * tests/test-rmdir.h (test_rmdir_func): Likewise.
107955         * tests/test-symlink.h (test_symlink): Likewise.
107956         * tests/test-symlinkat.c (main): Likewise.
107957         * tests/test-unlink.h (test_unlink_func): Likewise.
107958         * tests/test-unlinkat.c (main): Likewise.
107960         maint: make realtime library usage explicit
107961         * modules/gethrxtime (Link): Mention LIB_GETHRXTIME.
107962         * modules/gettime (Link): Mention LIB_CLOCK_GETTIME.
107963         * modules/settime (Link): Likewise.
107964         * modules/xnanosleep (Link): Mention LIB_NANOSLEEP.
107966         test-stat-time: speed up execution
107967         * tests/test-stat-time.c (test_ctime) [!W32]: Avoid compiler
107968         warning on mingw.
107969         (nap): New helper function.
107970         (prepare_test): Use it to reduce sleep time.
107971         (test_mtime, test_ctime, test_birthtime): Allow for subsecond
107972         execution.
107973         * modules/stat-time-tests (configure.ac): Check for usleep.
107975 2009-10-09  Jim Meyering  <meyering@redhat.com>
107977         selinux-h: always use getfilecon wrappers
107978         * lib/getfilecon.c: New file.
107979         * lib/se-selinux.in.h: Use a better inclusion guard symbol name.
107980         [HAVE_SELINUX_SELINUX_H]: Include-next <selinux/selinux.h>.
107981         [!HAVE_SELINUX_SELINUX_H]: Use better parameter names.
107982         (fgetfilecon): Provide a stub.
107983         * m4/selinux-selinux-h.m4 (gl_HEADERS_SELINUX_SELINUX_H): Don't
107984         AC_SUBST SELINUX_SELINUX_H, since now we're generating that
107985         file unconditionally.
107986         When <selinux/selinux.h> is found, arrange to use wrappers.
107987         * modules/selinux-h (Files): Add getfilecon.c.
107988         (Makefile.am): Substitute include-next-related bits
107989         into the now-always-generated selinux/selinux.h file.
107990         * doc/glibc-functions/lgetfilecon.texi: New file.
107991         * doc/glibc-functions/fgetfilecon.texi: New file.
107992         * doc/glibc-functions/getfilecon.texi: New file.
107993         * doc/glibc-functions/getfilecon-desc.texi: New file.
107994         * doc/gnulib.texi (Glibc selinux/selinux.h): New section, by
107995         which to pull in the new files.
107996         * MODULES.html.sh (Misc): Add selinux-h.
107998 2009-10-08  Jim Meyering  <meyering@redhat.com>
108000         unistd: fix comment typo
108001         * lib/unistd.in.h (euidaccess): Fix a comment typo.
108003 2009-10-08  Eric Blake  <ebb9@byu.net>
108005         areadlink: use SIZE_MAX consistently
108006         * modules/areadlink (Depends-on): Add stdint.
108007         * modules/areadlink-with-size (Depends-on): Likewise.
108008         * lib/areadlink-with-size.c (includes): Drop stdio, since stdlib
108009         gives NULL; drop sys/types, since unistd gives size_t; and add
108010         stdint for SIZE_MAX.
108011         (SIZE_MAX): Rely on headers.
108012         * lib/areadlinkat-with-size.c (includes): Drop stdio, sys/types,
108013         and add stdint.
108014         * lib/areadlink.c (includes): Drop sys/types, and add stdint.
108015         (SIZE_MAX): Likewise.
108016         (INITIAL_BUF_SIZE): Turn into enum.
108017         * lib/areadlinkat.c (INITIAL_BUF_SIZE): Likewise.
108019 2009-10-08  Jim Meyering  <meyering@redhat.com>
108021         areadlinkat: avoid compilation failure
108022         * lib/areadlinkat.c: Include <stdint.h> for use of SIZE_MAX.
108023         Fix typo in comment.
108025 2009-10-07  Eric Blake  <ebb9@byu.net>
108027         areadlinkat-with-size: new module
108028         * modules/areadlinkat-with-size: New module.
108029         * lib/areadlinkat-with-size.c (areadlinkat_with_size): New file.
108030         * lib/areadlink.h (areadlinkat): Declare it.
108031         * MODULES.html.sh (File system functions): Mention it.
108032         * modules/areadlinkat-with-size-tests: New test.
108033         * tests/test-areadlinkat-with-size.c: New file.
108035         xreadlinkat: new module
108036         * modules/xreadlinkat: New module.
108037         * lib/xreadlinkat.c (xreadlinkat): New file.
108038         * lib/xreadlink.h (xreadlinkat): Declare it.
108039         * MODULES.html.sh (File system functions): Mention it.
108041         areadlinkat: new module
108042         * lib/at-func.c (FUNC_FAIL): New define.
108043         (AT_FUNC_NAME, VALIDATE_FLAG): Use it rather than raw -1.
108044         * modules/areadlinkat: New module.
108045         * lib/linkat.c (areadlinkat): Move...
108046         * lib/areadlinkat.c (areadlinkat): ...to new file.
108047         * lib/areadlink.h (areadlinkat): Declare it.
108048         * modules/linkat (Depends-on): Add areadlinkat.
108049         * MODULES.html.sh (File system functions): Mention it.
108050         * modules/areadlinkat-tests: New test.
108051         * tests/test-areadlinkat.c: New file.
108053         areadlink, areadlink-with-size: add tests
108054         * modules/areadlink-tests: New test.
108055         * modules/areadlink-with-size-tests: Likewise.
108056         * tests/test-areadlink.h: New file.
108057         * tests/test-areadlink.c: Likewise.
108058         * tests/test-areadlink-with-size.c: Likewise.
108060         maint: minor cleanups
108061         * lib/fts.c (ATTRIBUTE_UNUSED): Delete; use gnulib-guaranteed
108062         _UNUSED_PARAMETER_ instead.
108063         * lib/getdate.y (ATTRIBUTE_UNUSED): Likewise.
108064         * lib/utimens.c (ATTRIBUTE_UNUSED): Likewise.
108065         * modules/linkat-tests (Files): Distribute test-link.h.
108067         openat, utimens: whitespace cleanup
108068         * lib/openat.c: Prefer space throughout, rather than mix of 8
108069         spaces vs. tabs.
108070         * lib/at-func.c: Likewise.
108071         * lib/utimens.c: Likewise.
108073         openat: avoid using wrong fd
108074         * lib/openat.c (openat_permissive): Reject user's fd if saving the
108075         working directory chooses same fd.
108076         * lib/at-func.c (AT_FUNC_NAME): Likewise.
108078         mkdir, mkdirat: fix cygwin 1.5.x bug
108079         * lib/mkdir.c (rpl_mkdir) [FUNC_MKDIR_DOT_BUG]: Work around bug.
108080         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Move...
108081         * m4/mkdir.m4 (gl_FUNC_MKDIR): ...here, and add check for cygwin
108082         bug.
108083         (gl_PREREQ_MKDIR): Delete unused macro.
108084         * modules/mkdir (Files): Track file rename.
108085         (configure.ac): Update macro name.
108086         * modules/openat (Depends-on): Add mkdir.
108087         * doc/posix-functions/mkdir.texi (mkdir): Document the bug.
108089         mkdir, mkdirat: add tests
108090         * modules/mkdir-tests: New test.
108091         * tests/test-mkdir.h: New file.
108092         * tests/test-mkdir.c: Likewise.
108093         * tests/test-mkdirat.c: Likewise.
108094         * modules/openat-tests (Files): Add new files.
108095         (Makefile.am): Run new test.
108097 2009-10-06  Eric Blake  <ebb9@byu.net>
108099         doc: tweak *at function documentation
108100         * doc/posix-functions/faccessat.texi (faccessat): Mention
108101         known issue with replacement.
108102         * doc/posix-functions/fchdir.texi (fchdir): Likewise.
108103         * doc/posix-functions/linkat.texi (linkat): Likewise.
108104         * doc/posix-functions/mkfifoat.texi (mkfifoat): Likewise.
108105         * doc/posix-functions/mknodat.texi (mknodat): Likewise.
108106         * doc/posix-functions/readlinkat.texi (readlinkat): Likewise.
108107         * doc/posix-functions/renameat.texi (renameat): Likewise.
108108         * doc/posix-functions/symlinkat.texi (symlinkat): Likewise.
108110         openat: fix GNU/Hurd bug in unlinkat
108111         * m4/openat.m4 (gl_FUNC_OPENAT): Replace unlinkat if unlink is
108112         broken.
108113         * doc/posix-functions/unlink.texi (unlink): Document this.
108114         * doc/posix-functions/unlinkat.texi (unlinkat): Likewise.
108116         fdopendir: fix GNU/Hurd bug
108117         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Check for Hurd bug in
108118         allowing non-directory fds.
108119         * lib/fdopendir.c (rpl_fdopendir): Work around it.
108120         * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): New witness.
108121         * modules/dirent (Makefile.am): Substitute it.
108122         * lib/dirent.in.h (fdopendir): Declare replacement.
108123         * doc/posix-functions/fdopendir.texi (fdopendir): Document this.
108124         * tests/test-fdopendir.c (main): Test something other than
108125         /dev/null, since on Hurd that behaves like a directory.
108127         test-symlink: port to GNU/Hurd
108128         * tests/test-symlink.h (test_symlink): Relax expected errno.
108130         doc: tweak more cygwin information
108131         * doc/glibc-headers/getopt.texi (getopt.h): Cygwin 1.7 getopt is
108132         now compatible with glibc.
108133         * doc/posix-functions/getopt.texi (getopt): Likewise.
108135         getopt-gnu: add another test
108136         * tests/test-getopt_long.h (test_getopt_long_posix): New test, to
108137         guarantee behavior relied on by m4.
108138         * tests/test-getopt.c (main): Use it.
108139         * modules/getopt-posix-tests (Depends-on): Add setenv.
108140         See http://lists.gnu.org/r/bug-m4/2006-09/msg00028.html.
108142         getopt: fix compilation on darwin
108143         * lib/getopt.in.h (includes): Leave breadcrumbs during system
108144         include.
108145         * lib/unistd.in.h (getopt): Use them to avoid recursive include.
108146         Reported by Ludovic Courtès.
108148 2009-10-06  Bruno Haible  <bruno@clisp.org>
108150         * modules/size_max (Description): Discourage its use.
108151         Reported by Simon Josefsson.
108153 2009-10-06  Jim Meyering  <meyering@redhat.com>
108155         linkat: avoid compilation failure
108156         * lib/linkat.c: Include <stdint.h> for use of SIZE_MAX.
108158 2009-10-05  Eric Blake  <ebb9@byu.net>
108160         linkat: support Linux 2.6.17
108161         * m4/linkat.m4 (gl_FUNC_LINKAT): Default to always replacing
108162         linkat on Linux, but allow cache variable override.
108163         * lib/linkat.c (rpl_linkat): Define override.
108164         * modules/linkat (Depends-on): Add symlinkat.
108165         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add new default.
108166         * modules/unistd (Makefile.am): Substitute it.
108167         * lib/unistd.in.h (linkat): Declare replacement.
108168         Reported by Pádraig Brady.
108170         quotearg: port test to systems with C.UTF-8 locale
108171         * tests/test-quotearg.c (struct result_strings): Add another
108172         member, differentiating between C.ASCII and C.UTF-8 handling.
108173         (compare_strings): Add parameter.
108174         (main): Adjust all callers.
108176         getopt: avoid clash with FreeBSD _getopt_internal
108177         * lib/getopt.in.h (_getopt_internal): Override the name.
108178         * lib/getopt_int.h (includes): Pick up any overrides.
108179         Reported by Reuben Thomas.
108181         hash: allow C89 compilation
108182         * lib/hash.c (check_tuning): Move declaration before statement.
108183         Reported by Reuben Thomas.
108185 2009-10-05  Karl Berry  <karl@gnu.org>
108187         * doc/gnulib.texi: @include execvpe.texi, missing for several days.
108189 2009-10-04  Paolo Bonzini  <bonzini@gnu.org>
108190             Bruno Haible  <bruno@clisp.org>
108192         * lib/uname.c (uname): Use a table-driven algorithm to compute
108193         Windows NT versions.
108195 2009-10-04  Bruno Haible  <bruno@clisp.org>
108197         * lib/progname.c (set_program_name): Also remove the "lt-" prefix from
108198         program_invocation_short_name.
108199         * modules/progname (configure.ac): Test for presence of
108200         program_invocation_short_name.
108201         Reported by Sergey Poznyakoff <gray@gnu.org.ua>.
108203 2009-10-04  Bruno Haible  <bruno@clisp.org>
108205         * lib/progname.c (set_program_name): Fix comment.
108206         Reported by Jim Meyering.
108208 2009-10-03  Paolo Bonzini  <bonzini@gnu.org>
108209             Bruno Haible  <bruno@clisp.org>
108211         * lib/uname.c: Include <string.h>.
108212         (uname): Do only one call to GetVersionEx in the common case.
108214 2009-10-03  Paolo Bonzini  <bonzini@gnu.org>
108215             Bruno Haible  <bruno@clisp.org>
108217         * lib/uname.c (VER_PLATFORM_WIN32_CE, PROCESSOR_ARCHITECTURE_AMD64,
108218         PROCESSOR_ARCHITECTURE_IA32_ON_WIN64): Define fallbacks.
108219         (uname): Add support for Windows CE and various non-x86 CPU types.
108221 2009-10-03  Bruno Haible  <bruno@clisp.org>
108223         * gnulib-tool (func_create_testdir): Conditionally emit AM_PROG_CC_C_O
108224         invocation to tests/configure.ac.
108225         Reported by Ian Beckwith <ianb@erislabs.net>.
108227 2009-10-02  Eric Blake  <ebb9@byu.net>
108229         fchdir: avoid compiler warning
108230         * lib/fchdir.c (canonicalize_file_name)
108231         [!HAVE_CANONICALIZE_FILE_NAME]: Avoid compiler warning on mingw.
108233         test-open: support mingw errno values
108234         * tests/test-open.h (test_open): Relax test.
108235         * tests/test-fopen.h (test_fopen): Likewise.
108236         * tests/test-openat-safer.c (main): Likewise.
108238         open: fix opening directory on mingw
108239         * lib/open.c (open) [REPLACE_OPEN_DIRECTORY]: Correct typo.
108241         test-open: on GNU/Hurd, /dev/null is a directory
108242         * tests/test-fopen.h (main): Rename...
108243         (test_fopen): ...to this.  Use a guaranteed non-directory when
108244         confirming open behavior on trailing slash.
108245         * tests/test-openat-safer.c (main): Likewise.
108246         * tests/test-open.h (main): Likewise....
108247         (test_open): ...to this.
108248         * tests/test-fopen.c (main): Adjust caller.
108249         * tests/test-fopen-safer.c (main): Likewise.
108250         * tests/test-open.c (main): Likewise.
108251         * tests/test-fcntl-safer.c (main): Likewise.
108252         Reported by Samuel Thibault.
108254         rename, fchdir: don't ignore chdir failure
108255         * lib/fchdir.c (get_name): Abort on unexpected chdir failure.
108256         * lib/rename.c (rpl_rename) [W32]: Likewise.
108257         (rpl_rename) [RENAME_DEST_EXISTS_BUG]: Avoid one case of losing
108258         an empty destination directory if source cannot be renamed,
108259         although there is still possibility for failure.
108260         * doc/posix-functions/rename.texi (rename): Document the race.
108261         Reported by Jim Meyering.
108263         maint: cleanup whitespace in recent commits
108264         * lib/rename.c (rpl_rename): Remove tabs.
108265         * tests/test-link.h (test_link): Likewise.
108266         * lib/fchdir.c (get_name): Likewise.
108267         Reported by Jim Meyering.
108269 2009-10-02  Ben Pfaff  <blp@gnu.org>
108271         relocatable-prog-wrapper: Add missing dependency on
108272         double-slash-root.
108273         * modules/relocatable-prog-wrapper: Add dependency.
108274         Reported by Ian Beckwith <ianb@erislabs.net>.
108276 2009-10-02  Eric Blake  <ebb9@byu.net>
108278         renameat: fix Solaris bugs
108279         * m4/renameat.m4 (gl_FUNC_RENAMEAT): Replace renameat if rename
108280         needed fixing.
108281         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): New witness.
108282         * modules/stdio (Makefile.am): Substitute it.
108283         * lib/stdio.in.h (renameat): Declare replacement.
108284         * lib/renameat.c (rpl_renameat): Implement fix.
108286         renameat: new module
108287         * modules/renameat: New file.
108288         * lib/renameat.c (renameat): Likewise.
108289         * m4/renameat.m4 (gl_FUNC_RENAMEAT): Likewise.
108290         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add witnesses.
108291         * modules/stdio (Makefile.am): Substitute them.
108292         * lib/stdio.in.h (renameat): Declare it.
108293         * MODULES.html.sh (systems lacking POSIX:2008): Mention module.
108294         * doc/posix-functions/renameat.texi (renameat): Likewise.
108295         * modules/renameat-tests: New test.
108296         * tests/test-renameat.c: Likewise.
108298         rename: fix mingw bugs
108299         * lib/rename.c (rpl_rename) [W32]: Fix trailing slash and
108300         directory overwrite bugs.
108302         rename: fix another cygwin 1.5 bug
108303         * m4/rename.m4 (gl_FUNC_RENAME): Split cygwin bugs into two
108304         checks.
108305         * lib/rename.c (rpl_rename): Don't penalize NetBSD with
108306         unnecessary cygwin workarounds.  Also work around bug with moving
108307         full directory onto an empty one.
108308         * modules/rename (Depends-on): Add canonicalize-lgpl, rmdir.
108310         rename-dest-slash: merge into rename module
108311         * modules/rename-dest-slash (Status): Mark obsolete.
108312         (Depends-on): Add rename.
108313         (Files): Let rename do it all.
108314         * m4/rename.m4 (gl_FUNC_RENAME): Also test for NetBSD bugs,
108315         subsuming the test from gl_FUNC_RENAME_TRAILING_DEST_SLASH...
108316         * m4/rename-dest-slash.m4: ...so this file can be deleted.
108317         * lib/rename-dest-slash.c (rpl_rename_dest_slash): Delete.
108318         * lib/rename.c (rpl_rename): Update comments.
108320         rename: fix cygwin 1.5.x bugs
108321         * m4/rename.m4 (gl_FUNC_RENAME): Detect cygwin bugs.
108322         * lib/rename.c (rpl_rename): Work around them.
108323         * modules/rename (Depends-on): Add same-inode.
108325         rename: fix Solaris 10 bug
108326         * m4/rename.m4 (gl_FUNC_RENAME): Detect Solaris bug.
108327         * lib/rename.c (rpl_rename): Don't cripple POSIX behavior if this
108328         was the only bug.
108330         rename: fix Solaris 9 bug
108331         * lib/rename.c (rpl_rename): Rewrite to recognize trailing slash
108332         on non-directory.  Avoid calling exit.
108333         * modules/rename (Depends-on): Drop xalloc; add lstat, stdbool,
108334         strdup.
108335         * modules/rename-tests (Depends-on): Drop lstat.
108336         * m4/rename.m4 (gl_FUNC_RENAME): Detect Solaris bug.
108337         (gl_PREREQ_RENAME): Delete unused macro.
108339         rename-dest-slash: fix NetBSD bug
108340         * lib/rename-dest-slash.c (rpl_rename_dest_slash): Detect hard
108341         links.
108342         * modules/rename-dest-slash (Depends-on): Add same-inode.
108344         rename-tests: new test, exposes several platform bugs
108345         * modules/rename-tests: New file.
108346         * tests/test-rename.h: Likewise.
108347         * tests/test-rename.c: Likewise.
108348         * doc/posix-functions/rename.texi (rename): Improve documentation,
108349         including bugs that will eventually be fixed in gnulib.
108351 2009-10-02  Paolo Bonzini  <bonzini@gnu.org>
108353         * lib/uname.c: Include <stdlib.h>
108354         (uname): Assume version info is available.
108356 2009-10-02  Jim Meyering  <meyering@redhat.com>
108358         gnu-web-doc-update: correct --help output
108359         * build-aux/gnu-web-doc-update: Make --help output relevant.
108361         gnu-web-doc-update: add standard options
108362         * build-aux/gnu-web-doc-update: Add --help, --version, etc.
108364         gnu-web-doc-update: New module.
108365         Use this script to automatically update the on-line web documentation
108366         for your GNU project at http://www.gnu.org/software/$pkg/manual/
108367         * modules/gnu-web-doc-update: New file, from coreutils.
108368         * build-aux/gnu-web-doc-update: New script.
108370 2009-10-01  Paolo Bonzini  <bonzini@gnu.org>
108372         link: LoadLibrary is not needed.
108373         * lib/link.c: Use GetModuleHandle.
108375 2009-10-01  Eric Blake  <ebb9@byu.net>
108377         getopt: bump serial number
108378         * m4/getopt.m4: Increment serial number, to account for 2009-09-24
108379         change.
108381         tests: tighten link, rmdir, and remove tests
108382         * tests/test-link.h (includes): No need to use <config.h> here.
108383         Clean up if directory hard link was created, otherwise test for
108384         trailing '.'.
108385         * tests/test-linkat.c (main): Simplify.
108386         * tests/test-remove.c (main): Enhance test for trailing '.'.
108387         * tests/test-rmdir.h (test_rmdir_func): Likewise.
108389 2009-10-01  Jim Meyering  <meyering@redhat.com>
108391         maint.mk: requiring "make major" was annoying, for a "minor" release.
108392         What is intended is "stable", to contrast with alpha and beta,
108393         so require "make stable", not "make major".
108394         * build-aux/announce-gen (%valid_release_types): s/major/stable/.
108395         (get_tool_versions): Likewise.
108396         * top/maint.mk (ALL_RECURSIVE_TARGETS): s/major/stable/
108398 2009-09-30  Ben Pfaff  <blp@gnu.org>
108400         Fix broken build of replacement for Windows tmpfile().
108401         * lib/tmpfile.c (tmpfile): Fix call to gen_tempname() to provide
108402         flags argument added along with the 'mkostemp' module.
108404 2009-09-28  Bruno Haible  <bruno@clisp.org>
108406         Avoid identifier clash with POSIX function 'remove' defined as a macro.
108407         * lib/gl_list.h (struct gl_list_implementation): Rename field 'remove'
108408         to 'remove_elt'.
108409         (gl_list_remove): Update.
108410         * lib/gl_list.c (gl_list_remove): Update.
108411         * lib/gl_oset.h (struct gl_oset_implementation): Rename field 'remove'
108412         to 'remove_elt'.
108413         (gl_oset_remove): Update.
108414         * lib/gl_list.c (gl_oset_remove): Update.
108415         Reported by Eric Blake.
108417 2009-09-28  Eric Blake  <ebb9@byu.net>
108419         doc: mention yet more cygwin 1.7 status
108420         * doc/posix-functions/fexecve.texi (fexecve): Now implemented in
108421         cygwin.
108422         * doc/glibc-functions/execvpe.texi (execvpe): New file.
108423         * doc/gnulib.texi (Glibc unistd.h): Mention it.
108425         argp: fix test failure
108426         * lib/argp-help.c (hol_entry_cmp): Don't use _tolower on values
108427         that are not upper-case.  Pass correct range to tolower.
108429 2009-09-27  Jim Meyering  <meyering@redhat.com>
108431         test-yesno: work around sparc-dash here-document infelicity
108432         Without this change, the literal \177 byte in a here document
108433         would make dash 0.5.5.1-3 access uninitialized memory.
108434         * tests/test-yesno.sh: Don't put the \177 byte in the here document.
108435         Instead, use a marker, "@", and filter through tr to create the desired
108436         contents.  Reported as <http://bugs.debian.org/548493> by Kurt Roeckx.
108438 2009-09-27  Bruno Haible  <bruno@clisp.org>
108440         Disable untested support for new flavours of ACLs on AIX.
108441         * lib/file-has-acl.c (file_has_acl): Mark newer AIX code as work in
108442         progress.
108443         * lib/set-mode-acl.c (qset_acl): Likewise.
108445 2008-12-07  Bruno Haible  <bruno@clisp.org>
108447         Add support for new flavours of ACLs on AIX. (Untested.)
108448         * lib/file-has-acl.c [AIX] (acl_nfs4_nontrivial): New function.
108449         (file_has_acl): Add support for newer AIX.
108450         * lib/set-mode-acl.c (qset_acl): Likewise.
108451         * tests/test-sameacls.c (main): Fix use of aclx_get function. Hint by
108452         Rainer Tammer <tammer@tammer.net>.
108454 2009-09-26  Eric Blake  <ebb9@byu.net>
108456         argp: fix compilation of getopt
108457         * lib/getopt.in.h (includes): Use different guard than glibc.
108458         Reported by Sergey Poznyakoff.
108460         doc: mention more cygwin 1.7 status
108461         * doc/posix-functions/access.texi (access): Mention cygwin 1.5
108462         bug.
108463         * doc/posix-functions/execl.texi (execl): Likewise.
108464         * doc/posix-functions/execle.texi (execle): Likewise.
108465         * doc/posix-functions/execlp.texi (execlp): Likewise.
108466         * doc/posix-functions/execv.texi (execv): Likewise.
108467         * doc/posix-functions/execve.texi (execve): Likewise.
108468         * doc/posix-functions/execvp.texi (execvp): Likewise.
108469         * doc/glibc-functions/canonicalize_file_name.texi
108470         (canonicalize_file_name): Cygwin 1.7 now provides this.
108471         * doc/glibc-functions/euidaccess.texi (euidaccess): Likewise.
108472         * doc/posix-functions/fchmodat.texi (fchmodat): Mention limitation
108473         on AT_SYMLINK_NOFOLLOW.
108475 2009-09-24  Eric Blake  <ebb9@byu.net>
108477         test-linkat: make test more robust
108478         * tests/test-linkat.c (main): Avoid collision with EEXIST.
108480         getopt: fix inclusion guards for cygwin
108481         * modules/getopt-posix (Depends-on): Add include-next.
108482         (Makefile.am): Substitute more items in replacement header.
108483         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Also check for native
108484         <getopt.h>.
108485         * lib/getopt.in.h (includes): Use split inclusion guard, and
108486         prefer <getopt.h> over include <unistd.h> when one is present.
108487         (option): Also override name of 'struct option'.
108489         same-inode: revert prior change; it is not yet ready
108490         * NEWS: Undo mention of this change.
108491         * lib/same-inode.h (same-inode.h): Undo tri-state change.
108492         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Update caller.
108493         * lib/cycle-check.c (cycle_check): Likewise.
108494         * lib/same.c (same_name): Likewise.
108495         * lib/at-func2.c (at_func2): Likewise.
108497 2009-09-23  Eric Blake  <ebb9@byu.net>
108499         linkat: new module
108500         * modules/linkat: New file.
108501         * lib/at-func2.c (at_func2): Likewise.
108502         * lib/linkat.c (linkat): Likewise.
108503         * m4/linkat.m4 (gl_FUNC_LINKAT): Likewise.
108504         * lib/openat-priv.h (at_func2): Add declaration.
108505         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witnesses.
108506         * modules/unistd (Makefile.am): Substitute them.
108507         * lib/unistd.in.h (linkat): Declare it.
108508         * MODULES.html.sh (systems lacking POSIX:2008): Mention module.
108509         * doc/posix-functions/linkat.texi (linkat): Likewise.
108510         * doc/posix-functions/link.texi (link): Tweak wording.
108511         * tests/test-link.c (main): Move guts...
108512         * tests/test-link.h (test_link): ...into new file.
108513         * modules/linkat-tests: New test.
108514         * tests/test-linkat.c: Likewise.
108515         * modules/link-tests (Files): Ship new file.
108516         (Depends-on): Add stdbool.
108518         dirname: add library-safe mdir_name
108519         * lib/dirname.h (mdir_name): New prototype.
108520         * lib/dirname.c (dir_name): Move guts...
108521         (mdir_name): ...to new function that avoids xalloc_die.
108523         fchdir: another mingw fix
108524         * modules/fchdir (Depends-on): Drop canonicalize-lgpl.
108525         * lib/fchdir.c (get_name): New helper method; skips canonicalize
108526         on mingw (where it has not yet been ported), and make it optional
108527         elsewhere.
108528         (_gl_register_fd): Use it.
108530         same-inode: make SAME_INODE tri-state, to port to mingw
108531         * NEWS: Mention this change.
108532         * lib/same-inode.h (same-inode.h): Recognize mingw limitation of
108533         st_ino always being 0.
108534         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Update caller.
108535         * lib/cycle-check.c (cycle_check): Likewise.
108536         * lib/same.c (same_name): Likewise.
108538         lstat: avoid mingw compilation error
108539         * m4/lstat.m4 (gl_FUNC_LSTAT): Avoid duplicate calls to
108540         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, and deal with missing
108541         lstat ourselves.
108542         * lib/lstat.c [!HAVE_LSTAT]: Do nothing if <sys/stat.h> override
108543         was adequate.
108544         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Let lstat module handle
108545         the checks for lstat.
108546         (gl_SYS_STAT_H_DEFAULTS): Set default for HAVE_LSTAT.
108548         link: fix test failure on Solaris 9
108549         * lib/link.c (rpl_link): Don't assume link will catch bogus
108550         trailing slash on source.
108552         test-symlinkat: enhance test
108553         * tests/test-readlink.c (main): Move guts...
108554         * tests/test-readlink.h (test_readlink): ...into new file.
108555         * tests/test-symlink.c (main): Move guts...
108556         * tests/test-symlink.h (test_symlink): ...into new file.
108557         * tests/test-symlinkat.c (main): Use new files for further
108558         coverage.
108559         (do_symlink, do_readlink): New helper functions.
108560         * modules/symlink-tests (Files): Ship new file.
108561         (Depends-on): Add stdbool.
108562         * modules/readlink-tests (Files): Ship new file.
108563         (Depends-on): Add stdbool.
108564         * modules/symlinkat-tests (Files): Use new files.
108566 2009-09-23  Eric Blake  <ebb9@byu.net>
108568         readlink: document portability issue with symlink length
108569         * doc/posix-functions/lstat.texi (lstat): Mention that some file
108570         systems have bogus st_size on symlinks, and mention the
108571         areadlink-with-size module.
108572         * doc/posix-functions/fstatat.texi (fstatat): Likewise.
108573         * doc/posix-functions/readlink.texi (readlink): Mention the
108574         areadlink module, and ERANGE failure.
108575         * doc/posix-functions/readlinkat.texi (readlinkat): Likewise.
108576         * tests/test-readlink.c (main): Relax test for AIX, HP-UX.
108578         readlink: fix Solaris 9 bug with trailing slash
108579         * lib/readlink.c (rpl_readlink): Work around trailing slash bug.
108580         * m4/readlink.m4 (gl_FUNC_READLINK): Detect the bug.
108581         * doc/posix-functions/readlink.texi (readlink): Document this.
108582         * modules/readlink-tests: New test.
108583         * tests/test-readlink.c: Likewise.
108585         readlink: fix cygwin 1.5.x bug with return type
108586         * m4/readlink.m4 (gl_FUNC_READLINK): Require correct signature.
108587         * lib/unistd.in.h (readlink): Use ssize_t.
108588         * lib/readlink.c (readlink): Likewise.
108589         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness.
108590         * modules/unistd (Makefile.am): Substitute it.
108591         * lib/unistd.in.h (readlink): Declare replacement.
108592         * doc/posix-functions/readlink.texi (readlink): Document this.
108594         symlink: use throughout gnulib
108595         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Omit symlink check.
108596         * lib/symlinkat.c (symlinkat) [!HAVE_SYMLINK]: Document why
108597         symlink is not used.
108598         * modules/symlinkat (Depends-on): Add symlink.
108599         * modules/canonicalize-lgpl-tests (Depends-on): Likewise.
108600         * modules/canonicalize-tests (Depends-on): Likewise.
108601         * modules/lstat-tests (Depends-on): Likewise.
108602         * modules/openat-tests (Depends-on): Likewise.
108603         * modules/remove-tests (Depends-on): Likewise.
108604         * modules/rmdir-tests (Depends-on): Likewise.
108605         * modules/unlink-tests (Depends-on): Likewise.
108606         * tests/test-canonicalize-lgpl.c (symlink): Delete stub.
108607         * tests/test-canonicalize.c (symlink): Likewise.
108608         * tests/test-fstatat.c (symlink): Likewise.
108609         * tests/test-lstat.c (symlink): Likewise.
108610         * tests/test-remove.c (symlink): Likewise.
108611         * tests/test-rmdir.c (symlink): Likewise.
108612         * tests/test-unlink.c (symlink): Likewise.
108613         * tests/test-unlinkat.c (symlink): Likewise.
108615         symlink: new module, for Solaris 9 bug
108616         * modules/symlink: New file.
108617         * m4/symlink.m4 (gl_FUNC_SYMLINK): Likewise.
108618         * lib/symlink.c: Likewise.
108619         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add defaults.
108620         * modules/unistd (Makefile.am): Substitute them.
108621         * lib/unistd.in.h (symlink): Declare replacement.
108622         * MODULES.html.sh (File system functions): Mention it.
108623         * doc/posix-functions/symlink.texi (symlink): Likewise.
108624         * modules/symlink-tests: New test.
108625         * tests/test-symlink.c: Likewise.
108627 2009-09-23  Bruno Haible  <bruno@clisp.org>
108629         * gnulib-tool (func_import): Add 'link-warning' to testsrelated_modules
108630         when needed.
108631         Test case: gnulib-tool --import --with-tests atexit inttypes.
108632         Reported by Pauli Miettinen <pauli.miettinen@cs.helsinki.fi>.
108634 2009-09-23  Bruno Haible  <bruno@clisp.org>
108636         * gnulib-tool (func_emit_tests_Makefile_am): Set uses_subdirs in a
108637         subcommand, not in a subshell.
108639 2009-09-22  Eric Blake  <ebb9@byu.net>
108641         unistd: sort replacement declarations
108642         * lib/unistd.in.h: Sort declarations.
108644         open, openat: minor optimization
108645         * lib/open.c (open): If open succeeded, len is non-zero.
108646         * lib/openat.c (rpl_openat): Likewise.
108648         link-follow: ensure correct result
108649         * m4/fcntl_h.m4 (gl_FCNTL_H): Clean up temporary file.
108650         * m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): Likewise, and
108651         distinguish between possible failures.
108653 2009-09-21  Eric Blake  <ebb9@byu.net>
108655         fts: avoid compiler warning
108656         * lib/fts.c (dirent_inode_sort_may_be_useful)
108657         (leaf_optimization_applies) [!__linux__]: Mark unused parameters.
108659 2009-09-19  Bruno Haible  <bruno@clisp.org>
108661         * lib/progreloc.c (canonicalize_file_name): New declaration.
108663 2009-09-19  Eric Blake  <ebb9@byu.net>
108665         link: fix quoting
108666         * m4/link.m4 (gl_FUNC_LINK): Fix shell quoting.
108668         openat: fix openat bugs on Solaris 9
108669         * lib/openat.c (rpl_openat): Work around Solaris 9 bug.
108670         * m4/openat.m4 (gl_FUNC_OPENAT): Also replace openat on Solaris.
108671         * modules/openat (Depends-on): Add open.
108672         * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Provide new default.
108673         * modules/fcntl-h (Makefile.am): Substitute it.
108674         * lib/fcntl.in.h (openat): Declare replacement.
108675         * doc/posix-functions/openat.texi (openat): Document this.
108677         openat: move fstatat and unlinkat into correct files
108678         * m4/openat.m4 (gl_FUNC_OPENAT): Adjust which files will be
108679         compiled.
108680         * lib/openat.c (fstatat, unlinkat): Move...
108681         * lib/fstatat.c (fstatat): ...into correct files.
108682         * lib/unlinkat.c (unlinkat): Likewise.
108684         openat: fix unlinkat bugs on Solaris 9
108685         * lib/unlinkat.c (unlinkat): New file.
108686         * modules/openat (Depends-on): Add unlink.
108687         (Files): Distribute it.
108688         * m4/openat.m4 (gl_FUNC_OPENAT): Mark unlinkat for replacement if
108689         trailing slash behavior is broken.
108690         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness.
108691         * modules/unistd (Makefile.am): Substitute it.
108692         * lib/unistd.in.h (unlinkat): Declare replacement.
108693         * doc/posix-functions/unlinkat.texi (unlinkat): Document this.
108695         openat: fix fstatat bugs on Solaris 9
108696         * lib/fstatat.c (rpl_fstatat): Copy recent fixes from lstat and
108697         stat.
108698         * doc/posix-functions/fstatat.texi (fstatat): Document this.
108700         test-unlinkat: enhance test, to expose Solaris 9 bug
108701         * tests/test-unlink.c (main): Factor guts...
108702         * tests/test-unlink.h (test_rmdir_func): ...into new file.
108703         * tests/test-rmdir.h (test_rmdir_func): Add parameter.
108704         * tests/test-rmdir.c (main): Adjust caller.
108705         * tests/test-unlinkat.c (main): Likewise.  Add unlink tests.
108706         (unlinker): New helper function.
108707         (rmdirat): Enhance check.
108708         * modules/rmdir-tests (Depends-on): Add stdbool.
108709         * modules/unlink-tests (Depends-on): Likewise.
108710         (Files): Add test-unlink.h.
108711         * modules/openat-tests (Files): Likewise.
108712         (Depends-on): Add unlinkdir.
108714         test-fstatat: new test, to expose Solaris 9 bugs
108715         * tests/test-stat.c (main): Factor guts...
108716         * tests/test-stat.h (test_stat_func): ...into new file.
108717         * tests/test-lstat.c (main): Factor guts...
108718         * tests/test-lstat.h (test_lstat_func): ...into new file.
108719         * tests/test-fstatat.c: New file.
108720         * modules/stat-tests (Files): Add test-stat.h.
108721         * modules/lstat-tests (Files): Add test-lstat.h.
108722         (Depends-on): Add stdbool.
108723         * modules/openat-tests (Depends-on): Add pathmax.
108724         (Files): Add test-lstat.h, test-stat.h, test-fstatat.c.
108725         (Makefile.am): Run new test.
108727         remove: new module, for mingw and Solaris 9 bugs
108728         * modules/remove: New file.
108729         * lib/remove.c: Likewise.
108730         * m4/remove.m4 (gl_FUNC_REMOVE): Likewise.
108731         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add witnesses.
108732         * modules/stdio (Makefile.am): Use them.
108733         * lib/stdio.in.h (remove): Declare replacement.
108734         * MODULES.html.sh (systems lacking POSIX:2008): Mention module.
108735         * doc/posix-functions/remove.texi (remove): Likewise.
108736         * modules/remove-tests: New test.
108737         * tests/test-remove.c: Likewise.
108739         unlink: new module, for Solaris 9 bug
108740         * modules/unlink: New file.
108741         * lib/unlink.c: Likewise.
108742         * m4/unlink.m4 (gl_FUNC_UNLINK): Likewise.
108743         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witnesses.
108744         * modules/unistd (Makefile.am): Use them.
108745         * lib/unistd.in.h (stat): Declare replacement.
108746         * MODULES.html.sh (systems lacking POSIX:2008): Mention module.
108747         * doc/posix-functions/unlink.texi (unlink): Likewise.
108748         * modules/unlink-tests: New test.
108749         * tests/test-unlink.c: Likewise.
108751         lstat: fix Solaris 9 bug
108752         * lib/lstat.c (lstat): Also check for trailing slash on
108753         non-symlink, non-directories.  Use stat module to simplify logic.
108754         * doc/posix-functions/lstat.texi (lstat): Document it.
108755         * modules/lstat-tests (Depends-on): Add errno, same-inode.
108756         (configure.ac): Check for symlink.
108757         * tests/test-lstat.c (main): Add more tests.
108759         stat: add as dependency to other modules
108760         * modules/chown (Depends-on): Add stat.
108761         * modules/euidaccess (Depends-on): Likewise.
108762         * modules/fchdir (Depends-on): Likewise.
108763         * modules/isdir (Depends-on): Likewise.
108764         * modules/link (Depends-on): Likewise.
108765         * modules/lstat (Depends-on): Likewise.
108766         * modules/mkdir-p (Depends-on): Likewise.
108767         * modules/modechange (Depends-on): Likewise.
108768         * modules/open (Depends-on): Likewise.
108769         * modules/readlink (Depends-on): Likewise.
108770         * modules/same (Depends-on): Likewise.
108772         stat: fix Solaris 9 bug
108773         * m4/stat.m4 (gl_FUNC_STAT): Detect Solaris 9 bug with trailing
108774         slash.
108775         * lib/stat.c (rpl_stat): Work around it.
108776         * doc/posix-functions/stat.texi (stat): Update documentation.
108778         stat: new module, for mingw bug
108779         * modules/stat: New file.
108780         * lib/stat.c: Likewise.
108781         * m4/stat.m4 (gl_FUNC_STAT): Likewise.
108782         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Add witnesses.
108783         * modules/sys_stat (Makefile.am): Use them.
108784         * lib/sys_stat.in.h (stat): Declare replacement.
108785         * lib/openat.c (fstatat): Deal with lstat and stat being function
108786         macros.
108787         * modules/openat (Depends-on): Add inline.
108788         * MODULES.html.sh (systems lacking POSIX:2008): Mention module.
108789         * doc/posix-functions/stat.texi (stat): Likewise.
108790         * modules/stat-tests: New test.
108791         * tests/test-stat.c: Likewise.
108793 2009-09-19  Jim Meyering  <meyering@redhat.com>
108795         syntax-check: detect unnecessary inclusion of canonicalize.h
108796         * top/maint.mk (sc_prohibit_canonicalize_without_use): New rule.
108798 2009-09-19  Eric Blake  <ebb9@byu.net>
108800         canonicalize-lgpl: adjust clients to use correct header
108801         * m4/canonicalize.m4 (gl_FUNC_CANONICALIZE_FILENAME_MODE)
108802         (gl_CANONICALIZE_LGPL): Use correct shell quoting.
108803         * modules/relocatable-prog-wrapper (Files): Drop canonicalize.h.
108804         * lib/fchdir.c (includes): Use <stdlib.h>, not "canonicalize.h".
108805         * lib/progreloc.c (includes): Likewise.
108807 2009-09-19  Jim Meyering  <meyering@redhat.com>
108809         test-posixtm.c: correct a comment
108810         * tests/test-posixtm.c: Correct first-line comment.
108811         Spotted by Eric Blake.
108813 2009-09-16  Jim Meyering  <meyering@redhat.com>
108815         posixtm-tests: make T const-correct; add a test case
108816         * tests/test-posixtm.c (T): Declare const.
108817         Add a test for -(2^31+1).
108818         Remove useless can-succeed-only-in-2002 test.
108820         posixtm-tests: adjust the sole failing test
108821         * tests/test-posixtm.c: Correct 0000-01-01 00:00:00 test so that
108822         expected output matches what mktime now produces.  Cross-checked via
108823         erlang's calendar:datetime_to_gregorian_seconds({{1970,1,1},{0,0,0}})
108825         posixtm: move #ifdef'd tests into a new module
108826         * lib/posixtm.c (posixtime): Remove #ifdef'd tests.  Move to...
108827         * tests/test-posixtm.c: ... this new file.
108828         * modules/posixtm-tests: New module.
108830 2009-09-19  Eric Blake  <ebb9@byu.net>
108832         openat: simplify use of at-func.c
108833         * lib/at-func.c (includes): Include prerequisites here, to
108834         simplify requirements on client files.
108835         * lib/openat-priv.h: Add double-inclusion guard.
108836         * lib/faccessat.c (includes): Simplify.
108837         * lib/fchmodat.c (includes): Likewise.
108838         * lib/fchownat.c (includes): Likewise.
108839         * lib/mkdirat.c (includes): Likewise.
108840         * lib/mkfifoat.c (includes): Likewise.
108841         * lib/symlinkat.c (includes): Likewise.
108843         openat: allow return of fd 0
108844         * modules/chdir-long (Depends-on): Relax openat-safer to openat.
108845         * modules/save-cwd (Depends-on): Replace fcntl-safer with
108846         unistd-safer.
108847         * lib/chdir-long.c (includes): Replace "fcntl--.h" with
108848         <fcntl.h>; this module does not leak fds.
108849         * lib/openat.c (includes): Do not use "fcntl_safer"; plain openat
108850         must be allowed to return 0, leaving openat_safer to add the
108851         safety.
108852         (openat_permissive): Avoid writing to just-opened fd 2 if
108853         restoring the current directory fails.
108854         * lib/openat-die.c (openat_restore_fail): Add comment.
108855         * lib/save-cwd.c (includes): Make "fcntl--.h" conditional.
108856         (save_cwd): Guarantee safe fd, but without use of open_safer.
108857         * tests/test-openat.c: New test.
108858         * modules/openat-tests (Files, Makefile.am): Distribute and build
108859         new file.
108861         relocatable-prog-wrapper: fix build
108862         * modules/relocatable-prog-wrapper (Files): Update name of
108863         canonicalize m4 file, broken on 2009-09-17.
108864         Reported by emad hajjar <aleppos@hotmail.com>.
108866 2009-09-19  Bruno Haible  <bruno@clisp.org>
108868         * lib/safe-alloc.h: Use the standard header with GPL copyright.
108869         * lib/safe-alloc.c: Likewise.
108870         Reported by Ian Beckwith <ianb@erislabs.net>.
108872 2009-09-18  Bruno Haible  <bruno@clisp.org>
108874         * gnulib-tool: Add advice to "cannot find configure.ac" error message.
108875         Reported by <erobles@sensacd.com.mx>.
108877 2009-09-17  Eric Blake  <ebb9@byu.net>
108879         canonicalize: in CAN_ALL_BUT_LAST, allow trailing slash
108880         * lib/canonicalize.c (canonicalize_filename_mode): Skip trailing
108881         slashes when checking if last component is missing.
108882         * tests/test-canonicalize.c (main): Test this.
108884         canonicalize, canonicalize-lgpl: honor // if distinct from /
108885         * modules/canonicalize (Files): Add double-slash-root.m4.
108886         * modules/canonicalize-lgpl (Files): Likewise.
108887         * m4/canonicalize.m4 (gl_FUNC_CANONICALIZE_FILENAME_MODE)
108888         (gl_CANONICALIZE_LGPL_SEPARATE): Add dependency.
108889         * lib/canonicalize.c (DOUBLE_SLASH_IS_DISTINCT_ROOT): Provide
108890         fallback definition.
108891         (canonicalize_filename_mode): Use it to protect //.
108892         * lib/canonicalize-lgpl.c (DOUBLE_SLASH_IS_DISTINCT_ROOT)
108893         (__realpath): Likewise.
108894         * tests/test-canonicalize.c (main): Test this.
108895         * tests/test-canonicalize-lgpl.c (main): Likewise.
108896         * modules/canonicalize-tests (Depends-on): Add same-inode.
108897         * modules/canonicalize-lgpl-tests (Depends-on): Likewise.
108899         canonicalize-lgpl: fix glibc bug with trailing slash
108900         * m4/canonicalize-lgpl.m4: Move contents...
108901         * m4/canonicalize.m4: ...here.
108902         (gl_CANONICALIZE_LGPL): Factor realpath check...
108903         (gl_FUNC_REALPATH_WORKS): ...into new macro.  Enhance to catch
108904         glibc 2.3.5 bug, fixed 2005-04-27.
108905         (gl_FUNC_CANONICALIZE_FILENAME_MODE): Use it.
108906         (gl_PREREQ_CANONICALIZE_LGPL): Inline...
108907         (gl_CANONICALIZE_LGPL_SEPARATE): ...into this macro.
108908         * modules/canonicalize-lgpl (Files): Manage file rename.
108909         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Provide default.
108910         * modules/stdlib (Makefile.am): Substitute witness.
108911         * lib/stdlib.in.h (canonicalize_file_name): Declare if replacement
108912         is needed.
108913         * lib/canonicalize-lgpl.c: Also compile if canonicalize_file_name
108914         replacement is required.
108915         * lib/canonicalize.c (canonicalize_file_name): Likewise.
108916         * doc/glibc-functions/canonicalize_file_name.texi
108917         (canonicalize_file_name): Document this.
108918         * doc/posix-functions/realpath.texi (realpath): Likewise.
108920         canonicalize-lgpl: reject non-directory with trailing slash
108921         * lib/canonicalize-lgpl.c (__realpath): Synchronize with glibc.
108922         * tests/test-canonicalize-lgpl.c (main): Enhance test.  This
108923         catches failures in glibc 2.3.5.
108924         * tests/test-canonicalize.c (main): Likewise.
108926         canonicalize-lgpl: use native realpath if it works
108927         * lib/canonicalize-lgpl.c (realpath): Guard with
108928         FUNC_REALPATH_WORKS.
108929         * lib/stdlib.in.h (realpath): Make declaration optional based on
108930         HAVE_REALPATH.
108931         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL): Check whether
108932         native realpath works.
108933         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Provide default.
108934         * modules/stdlib (Makefile.am): Substitute witness.
108936         canonicalize, canonicalize-lgpl: use <stdlib.h>
108937         * modules/canonicalize-lgpl (Files): Drop canonicalize.h.
108938         (Include): Mention <stdlib.h>.
108939         (configure.ac): Mention functions we provide.
108940         * modules/canonicalize (configure.ac): Likewise.
108941         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL): Always replace
108942         realpath if canonicalize_file_name is missing.
108943         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Provide defaults.
108944         * modules/stdlib (Makefile.am): Substitute witnesses.
108945         * lib/stdlib.in.h (canonicalize_file_name, realpath): Declare.
108946         * lib/canonicalize-lgpl.c (includes): Adjust accordingly.
108947         * lib/canonicalize.h (canonicalize_file_name): Drop declaration.
108948         * NEWS: Document this.
108949         * doc/glibc-functions/canonicalize_file_name.texi
108950         (canonicalize_file_name): Likewise.
108951         * doc/posix-functions/realpath.texi (realpath): Likewise.
108952         * tests/test-canonicalize-lgpl.c (includes): Use <stdlib.h>.
108954         test-canonicalize: consolidate into single C program
108955         * tests/test-canonicalize.sh: Delete; move setup into...
108956         * tests/test-canonicalize.c (main): ...the program, making it
108957         easier to run in debugger.  Add some tests.
108958         * modules/canonicalize-tests (Files): Remove unused file.
108959         (Depends-on): Add progname.
108960         (configure.ac, Makefile.am): Simplify.
108962         test-canonicalize-lgpl: consolidate into single C program
108963         * tests/test-canonicalize-lgpl.sh: Delete; move setup into...
108964         * tests/test-canonicalize-lgpl.c (main): ...the program, making it
108965         easier to run in debugger.  Add some tests.
108966         * modules/canonicalize-lgpl-tests (Files): Remove unused file.
108967         (configure.ac, Makefile.am): Simplify.
108969         canonicalize: avoid resolvepath
108970         * m4/canonicalize.m4 (gl_FUNC_CANONICALIZE_FILENAME_MODE): Delete
108971         unnecessary checks.
108972         * lib/canonicalize.c (includes): Simplify.
108973         (canonicalize_file_name): Drop resolvepath implementation.
108974         * modules/canonicalize (Depends-on): Drop filenamecat.
108976         canonicalize: don't lose errno
108977         * lib/canonicalize.c (canonicalize_filename_mode): Protect errno
108978         over calls to free.
108980         canonicalize: simplify errno handling
108981         * lib/canonicalize.c (__set_errno): Delete macro, and use direct
108982         assignment.
108984         canonicalize, canonicalize-lgpl: update module dependencies
108985         * modules/canonicalize (Depends-on): Add extensions, lstat,
108986         pathmax, stdlib.
108987         (Files): Drop pathmax.h.
108988         (configure.ac): Adjust macro name.
108989         * modules/canonicalize-lgpl (Depends-on): Add errno, extensions,
108990         lstat, stdlib, sys_stat.
108991         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Rename...
108992         (gl_FUNC_CANONICALIZE_FILENAME_MODE): ...to this, and require
108993         extensions.
108994         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL)
108995         (gl_CANONICALIZE_LGPL_SEPARATE): Require extensions.
108996         (gl_PREREQ_CANONICALIZE_LGPL): Assume unistd.h.
108997         * lib/canonicalize.h (canonicalize_file_name): Use <stdlib.h>
108998         declaration, if available.
108999         * lib/canonicalize-lgpl.c [HAVE_READLINK]: Delete this condition;
109000         we can rely on the readlink module.
109001         (MAXSYMLINKS): Also consult SYMLOOP_MAX.
109002         (includes): Use <unistd.h> unconditionally.
109004 2009-09-17  Eric Blake  <ebb9@byu.net>
109006         maint: make Include sections of modules consistent
109007         * modules/alloca: Use only header name; no need to list #include.
109008         * modules/alloca-opt: Likewise.
109009         * modules/arpa_inet: Likewise.
109010         * modules/canon-host: Likewise.
109011         * modules/configmake: Likewise.
109012         * modules/dirent: Likewise.
109013         * modules/eealloc: Likewise.
109014         * modules/environ: Likewise.
109015         * modules/fchdir: Likewise.
109016         * modules/fcntl: Likewise.
109017         * modules/fcntl-h: Likewise.
109018         * modules/gethrxtime: Likewise.
109019         * modules/gettime: Likewise.
109020         * modules/ignore-value: Likewise.
109021         * modules/inet_ntop: Likewise.
109022         * modules/inet_pton: Likewise.
109023         * modules/inttypes: Likewise.
109024         * modules/isnand-nolibm: Likewise.
109025         * modules/isnanf-nolibm: Likewise.
109026         * modules/mbchar: Likewise.
109027         * modules/mbfile: Likewise.
109028         * modules/mbiter: Likewise.
109029         * modules/mbuiter: Likewise.
109030         * modules/netdb: Likewise.
109031         * modules/netinet_in: Likewise.
109032         * modules/nproc: Likewise.
109033         * modules/pagealign_alloc: Likewise.
109034         * modules/poll: Likewise.
109035         * modules/printf-frexp: Likewise.
109036         * modules/pthread: Likewise.
109037         * modules/putenv: Likewise.
109038         * modules/random_r: Likewise.
109039         * modules/relocatable-prog: Likewise.
109040         * modules/search: Likewise.
109041         * modules/select: Likewise.
109042         * modules/selinux-h: Likewise.
109043         * modules/settime: Likewise.
109044         * modules/signal: Likewise.
109045         * modules/size_max: Likewise.
109046         * modules/socklen: Likewise.
109047         * modules/ssize_t: Likewise.
109048         * modules/stdarg: Likewise.
109049         * modules/stdbool: Likewise.
109050         * modules/stddef: Likewise.
109051         * modules/stdint: Likewise.
109052         * modules/stdio: Likewise.
109053         * modules/stdlib: Likewise.
109054         * modules/string: Likewise.
109055         * modules/strings: Likewise.
109056         * modules/sys_file: Likewise.
109057         * modules/sys_ioctl: Likewise.
109058         * modules/sys_select: Likewise.
109059         * modules/sys_socket: Likewise.
109060         * modules/sys_stat: Likewise.
109061         * modules/sys_time: Likewise.
109062         * modules/sys_times: Likewise.
109063         * modules/sys_utsname: Likewise.
109064         * modules/sys_wait: Likewise.
109065         * modules/sysexits: Likewise.
109066         * modules/time: Likewise.
109067         * modules/times: Likewise.
109068         * modules/tmpfile: Likewise.
109069         * modules/trim: Likewise.
109070         * modules/unistd: Likewise.
109071         * modules/wchar: Likewise.
109072         * modules/wctype: Likewise.
109074 2009-09-17  Bruno Haible  <bruno@clisp.org>
109076         Make getdate.y compile on QNX and NetBSD 5 / i386.
109077         * m4/getdate.m4 (gl_GETDATE): Conditionally define
109078         TIME_T_FITS_IN_LONG_INT.
109079         * lib/getdate.y (long_time_t): New type.
109080         (relative_time): Change type of 'seconds' field to long_time_t.
109081         (get_date): Update types of local variables. Check against overflow
109082         during conversion from long_time_t to time_t.
109083         Reported by Matt Kraai <kraai@ftbfs.org>
109084         and Hasso Tepper <hasso@netbsd.org>.
109086 2009-09-17  Bruno Haible  <bruno@clisp.org>
109088         * modules/COPYING: Update copyright years.
109089         * modules/README: Likeiwse.
109090         * doc/gnulib-intro.texi (Copyright): Use a wildcard year.
109091         Reported by Ian Beckwith <ianb@erislabs.net>.
109093 2009-09-17  Ian Beckwith  <ianb@erislabs.net>  (tiny change)
109095         * users.txt: Update references for gnuit package.
109097 2009-09-17  Ian Beckwith  <ianb@erislabs.net>  (tiny change)
109099         * m4/getdelim.m4: Fix typo in copyright line.
109101 2009-09-17  Bruno Haible  <bruno@clisp.org>
109103         * lib/atoll.c: Use the standard header with GPL copyright.
109104         * lib/argz.in.h: Likewise.
109105         * lib/glob.c: Likewise.
109106         * lib/glob-libc.h: Likewise.
109107         * lib/random_r.c: Likewise.
109108         * lib/siglist.h: Likewise.
109109         * lib/strsignal.c: Likewise.
109110         Reported by Ian Beckwith <ianb@erislabs.net>.
109112 2009-09-17  Eric Blake  <ebb9@byu.net>
109114         rmdir: ensure correct dependency order
109115         * m4/rmdir.m4 (gl_FUNC_RMDIR): Require unistd defaults.
109117 2009-09-17  Bruno Haible  <bruno@clisp.org>
109119         Disable assertion that fails on NetBSD 5 / i386.
109120         * lib/mktime.c (ydhms_diff): Disable assertion about time_t size.
109121         Reported by Sam Steingold <sds@gnu.org>
109122         and Hasso Tepper <hasso@netbsd.org>.
109124 2009-09-16  Eric Blake  <ebb9@byu.net>
109126         unlinkdir: port to mingw
109127         * m4/unlinkdir.m4 (gl_UNLINKDIR): Add mingw to list of platforms
109128         on which no one can unlink a directory.
109130         stdlib: sort witness names
109131         * modules/stdlib (Makefile.am): Sort replacements.
109132         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Likewise.
109133         * lib/stdlib.in.h: Likewise.
109135         parse-duration-tests: avoid link failure
109136         * modules/parse-duration-tests (test_parse_duration_LDADD): Add
109137         LIBINTL.
109138         Reported by Tom G. Christensen.
109140         openat-tests: ensure unlinkat behaves like rmdir
109141         * tests/test-rmdir.c (main): Factor guts...
109142         * tests/test-rmdir.h (test_rmdir_func): ...into new file.
109143         * modules/rmdir-tests (Files): Ship new file.
109144         * modules/openat-tests: New test.
109145         * tests/test-unlinkat.c: Likewise.
109147         rmdir-errno: mark obsolete, it is unsafe for cross-compilation
109148         * modules/rmdir-errno (Status, Notice): Now obsolete.
109150         rmdir: work around cygwin 1.5.x and mingw bugs
109151         * m4/rmdir.m4 (gl_FUNC_RMDIR): Detect the bugs.
109152         * lib/rmdir.c (rmdir): Work around it.
109153         * modules/rmdir (Status, Notice): No longer obsolete.
109154         (Files): Add dos.m4.
109155         (Depends-on): Add unistd.
109156         (configure.ac): Set witnesses.
109157         (License): Relax to LGPLv2+.
109158         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set defaults.
109159         * modules/unistd (Makefile.am): Substitute witnesses.
109160         * lib/unistd.in.h (rmdir): Declare replacement.
109161         * doc/posix-functions/rmdir.texi (rmdir): Document this.
109162         * modules/rmdir-tests: New tests.
109163         * tests/test-rmdir.c: Likewise.
109165 2009-09-15  Eric Blake  <ebb9@byu.net>
109167         fchdir: improve use of replacement functions
109168         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Set appropriate witnesses.
109169         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Add REPLACE_FSTAT.
109170         * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): Add REPLACE_OPENDIR,
109171         REPLACE_CLOSEDIR.
109172         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add REPLACE_DUP.
109173         * modules/sys_stat (Makefile.am): Substitute correct witness.
109174         * modules/dirent (Makefile.am): Likewise.
109175         * modules/unistd (Makefile.am): Likewise.
109176         * lib/dirent.in.h (opendir, closedir): Use better witnesses.
109177         * lib/unistd.in.h (dup): Likewise.
109178         * lib/sys_stat.in.h (fstat): Likewise.
109180         maint: ignore gnulib-tool temp files
109181         * .gitignore: Ignore files created during gnulib-tool --test.
109183 2009-09-13  Jim Meyering  <meyering@redhat.com>
109185         posixtm: don't reject a time that specify "60" as the number of seconds
109186         * lib/posixtm.c (posixtime): The code to reject invalid dates
109187         would also reject a time specified with the .60 suffix.
109188         But POSIX allows that, in order to accommodate leap seconds.
109189         So don't reject it.
109190         (main): Adjust tests accordingly.
109191         * modules/posixtm (Depends-on): Add stpcpy.
109193 2009-09-11  Jim Meyering  <meyering@redhat.com>
109195         announce-gen: include [$release_type] in emitted Subject:
109196         * build-aux/announce-gen (get_tool_versions): Include [$release_type],
109197         e.g., [stable] in the emitted Subject: line.
109199 2009-09-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
109201         Remove obsolete macros from several modules.
109202         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Replace
109203         obsolete Autoconf macros with their modern counterparts.
109204         * m4/check-math-lib.m4 (gl_CHECK_MATH_LIB): Likewise.
109205         * m4/gc-camellia.m4 (gl_GC_CAMELLIA): Likewise.
109206         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Likewise.
109207         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
109208         * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): Likewise.
109209         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
109210         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Likewise.
109211         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Likewise.
109212         * m4/poll.m4 (gl_FUNC_POLL): Likewise.
109213         * m4/readline.m4 (gl_FUNC_READLINE): Likewise.
109214         * m4/round.m4 (gl_FUNC_ROUND): Likewise.
109215         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
109216         * m4/select.m4 (gl_FUNC_SELECT): Likewise.
109217         * m4/sockets.m4 (gl_SOCKETS): Likewise.
109218         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Likewise.
109219         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Likewise.
109220         * m4/sysexits.m4 (gl_SYSEXITS): Likewise.
109221         * m4/time_r.m4 (gl_TIME_R): Likewise.
109222         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Likewise.
109223         * m4/vararrays.m4 (AC_C_VARARRAYS): Likewise.
109224         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
109226         Fix copyright header in build-aux scripts.
109227         * build-aux/git-version-gen: Fix copyright header to match GPLv3
109228         recommendation.
109229         * build-aux/ncftpput-ftp: Likewise.
109230         * build-aux/update-copyright: Likewise.
109232 2009-09-09  Eric Blake  <ebb9@byu.net>
109234         test-link: allow Linux choice of errno
109235         * tests/test-link.c (main): Relax test for alternate error.
109237         strndup: fix improper m4 caching
109238         * m4/strndup.m4 (gl_FUNC_STRNDUP): Rework to avoid side effects
109239         inside AC_CACHE_CHECK.  Use REPLACE_STRNDUP, not HAVE_STRNDUP.
109240         (gl_PREREQ_STRNDUP): Delete.
109241         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Update default.
109242         * modules/string (Makefile.am): Substitute it.
109243         * lib/string.in.h (strndup): Modernize prototype.
109245         getcwd: port to mingw
109246         * m4/getcwd.m4 (gl_FUNC_GETCWD): Mingw directories are very
109247         different from the POSIX assumptions made throughout the getcwd
109248         module; fortunately, the mingw getcwd does not need replacement.
109249         (gl_FUNC_GETCWD_NULL): Skip test on mingw.
109250         * modules/getcwd-tests: New test.
109251         * tests/test-getcwd.c: Likewise.
109253         link: fix platform bugs
109254         * m4/link.m4 (gl_FUNC_LINK): Detect Solaris and Cygwin bugs.
109255         * lib/link.c (link): Work around them.  Fix related mingw bug.
109256         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add REPLACE_LINK.
109257         * modules/unistd (Makefile.am): Substitute it.
109258         * lib/unistd.in.h (link): Declare replacement.
109259         * doc/posix-functions/link.texi (link): Document this.
109260         * modules/link (Depends-on): Add strdup-posix, sys_stat.
109262         test-link: consolidate into single C program, test more cases
109263         * tests/test-link.sh: Delete.
109264         * tests/test-link.c: Test more error conditions.  Exposes bugs on
109265         at least Cygwin and Solaris.
109266         * modules/link-tests (Files): Remove unused file.
109267         (Depends-on): Add errno, sys_stat.
109268         (Makefile.am): Simplify.
109270 2009-09-08  Bruno Haible  <bruno@clisp.org>
109272         Work around towlower, towupper bug on mingw.
109273         * lib/wctype.in.h (towlower, towupper) [__MINGW32__]: New replacements.
109274         * m4/wctype.m4 (gl_WCTYPE_H): Replace <wctype.h> also on mingw.
109275         * doc/posix-functions/towlower.texi: Mention the mingw bug.
109276         * doc/posix-functions/towupper.texi: Likewise.
109277         Reported by Eric Blake.
109279 2009-09-08  Jim Meyering  <meyering@redhat.com>
109281         build: don't try to run autoheader if we don't use it
109282         * build-aux/bootstrap: Define AUTOHEADER=true when AC_CONFIG_HEADERS
109283         is not used in configure.ac.
109285 2009-09-08  Eric Blake  <ebb9@byu.net>
109287         euidaccess: fix compilation error
109288         * lib/euidaccess.c (includes): Add <fcntl.h>, for AT_EACCESS.
109290         rawmemchr: relax license
109291         * modules/rawmemchr (License): Derived from glibc, so LGPLv2+ is
109292         okay.
109293         Reported by Jim Meyering.
109295         mkfifoat: new module
109296         * modules/mkfifoat: New file.
109297         * lib/mkfifoat.c: Likewise.
109298         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Likewise.
109299         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Add witnesses.
109300         * modules/sys_stat (Makefile.am): Use them.
109301         * lib/sys_stat.in.h (mkfifoat, mknodat): Declare them.
109302         * MODULES.html.sh (File system functions): Mention module.
109303         * doc/posix-functions/mkfifoat.texi (mkfifoat): Likewise.
109304         * doc/posix-functions/mknodat.texi (mknodat): Likewise.
109305         * modules/mkfifoat-tests: New test.
109306         * tests/test-mkfifoat.c: Likewise.
109308         strchrnul: relax license
109309         * modules/strchrnul (License): Derived from glibc, so LGPLv2+ is
109310         okay.
109311         Reported by Jim Meyering.
109313 2009-09-08  Eric Blake  <ebb9@byu.net>
109315         fstatat: fix compilation on Solaris
109316         * lib/fstatat.c (includes): Add fcntl.h.
109317         Reported by Pádraig Brady.
109319 2009-09-07  Eric Blake  <ebb9@byu.net>
109321         rename: modernize replacement
109322         * modules/rename (Depends-on): Add stdio.
109323         (configure.ac): Declare witness.
109324         * m4/rename.m4 (gl_FUNC_RENAME): Ensure dependency order, and let
109325         stdio take care of replacement.
109326         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add new defaults.
109327         * modules/stdio (Makefile.am): Substitute them.
109328         * lib/stdio.in.h (rename): Declare replacement.
109329         * lib/rename.c (includes): Allow cross-compilation to non-windows
109330         machines.
109331         * doc/posix-functions/rename.texi (rename): Improve
109332         documentation.
109334         stdio: sort witness names
109335         * modules/stdio (Makefile.am): Sort replacements.
109336         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
109337         * lib/stdio.in.h: Likewise.
109339         getcwd: minor cleanups
109340         * lib/getcwd.c (AT_FDCWD): Delete; rely on <fcntl.h> instead.
109341         (is_ENAMETOOLONG): Delete; ENAMETOOLONG is portable.
109343         openat: provide more convenience names
109344         * modules/faccessat (configure.ac): Add C witness.
109345         * lib/unistd.in.h (readlinkat): Fix typo.
109346         * lib/openat.h (statat, lstatat, accessat, euidaccessat): New
109347         convenience wrappers.
109348         * top/maint.mk (sc_prohibit_openat_without_use): Allow these
109349         wrappers in syntax checks.
109351 2009-09-06  Eric Blake  <ebb9@byu.net>
109353         doc: fix comments in recent patches
109354         * lib/faccessat.c: Mention correct function.
109355         * lib/fchmodat.c: Likewise.
109356         * lib/fchownat.c: Likewise.
109357         * lib/symlinkat.c: Likewise.
109358         * doc/posix-headers/fcntl.texi (fcntl.h): Cygwin 1.7 has AT_*
109359         constants.
109361         faccessat, symlinkat: continue cleanup of previous patch
109362         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Ensure dependency order.
109363         * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Likewise.
109364         * modules/unistd (Makefile.am): Substitute GNULIB_READLINKAT.
109365         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Offer GNULIB_READLINKAT.
109366         * modules/symlinkat (configure.ac): Set GNULIB_READLINKAT.
109367         * lib/unistd.in.h (readlinkat): Declare if GNULIB_READLINKAT is
109368         set.
109370 2009-09-06  Bruno Haible  <bruno@clisp.org>
109372         * lib/sys_stat.in.h (fchmodat): Declare if GNULIB_FCHMODAT is set.
109373         (fstatat): Declare if GNULIB_FSTATAT is set.
109374         (mkdirat): Declare if GNULIB_MKDIRAT is set.
109375         * lib/unistd.in.h (fchownat): Declare if GNULIB_FCHOWNAT is set.
109376         (unlinkat): Declare if GNULIB_UNLINKAT is set.
109377         * modules/fcntl-h (Files): Remove m4/openat.m4.
109378         * modules/sys_stat (Files): Remove m4/openat.m4.
109379         (Makefile.am): Substitute GNULIB_FCHMODAT, GNULIB_FSTATAT,
109380         GNULIB_MKDIRAT instead of GNULIB_OPENAT.
109381         * modules/unistd (Files): Remove m4/openat.m4.
109382         (Makefile.am): Substitute GNULIB_FCHOWNAT, GNULIB_UNLINKAT instead of
109383         GNULIB_OPENAT.
109384         * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Initialize GNULIB_OPENAT,
109385         HAVE_OPENAT here. Don't require gl_OPENAT_DEFAULTS.
109386         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize
109387         GNULIB_FCHMODAT, GNULIB_FSTATAT, GNULIB_MKDIRAT, HAVE_FCHMODAT,
109388         HAVE_FSTATAT, HAVE_MKDIRAT, REPLACE_FSTATAT here. Don't require
109389         gl_OPENAT_DEFAULTS.
109390         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_FCHOWNAT,
109391         GNULIB_UNLINKAT, HAVE_FCHOWNAT, HAVE_UNLINKAT, REPLACE_FCHOWNAT here.
109392         Don't require gl_OPENAT_DEFAULTS.
109393         * m4/openat.m4 (gl_FUNC_OPENAT): Require gl_FCNTL_H_DEFAULTS,
109394         gl_SYS_STAT_H_DEFAULTS, gl_UNISTD_H_DEFAULTS. Set GNULIB_FCHMODAT,
109395         GNULIB_FSTATAT, GNULIB_MKDIRAT, GNULIB_FCHOWNAT, GNULIB_UNLINKAT.
109396         (gl_OPENAT_DEFAULTS): Remove macro.
109398 2009-09-06  Bruno Haible  <bruno@clisp.org>
109400         * modules/openat (configure.ac): Remove unneeded witness.
109402 2009-09-06  Bruno Haible  <bruno@clisp.org>
109404         Set errno to ENOSYS when a function is entirely unsupported.
109405         * lib/chown.c (rpl_chown) [!HAVE_CHOWN]: Set errno to ENOSYS instead of
109406         EOPNOTSUPP.
109407         * lib/lchown.c (lchown) [!HAVE_CHOWN]: Likewise.
109408         * modules/chown (Depends-on): Remove errno.
109410 2009-09-06  Bruno Haible  <bruno@clisp.org>
109412         * doc/posix-headers/fcntl.texi (AT_*): Mention affected platforms.
109414 2009-09-06  Bruno Haible  <bruno@clisp.org>
109416         * lib/sys_stat.in.h: Fix preprocessor command indentation.
109418 2009-09-06  Ben Pfaff  <blp@gnu.org>
109419             Bruno Haible  <bruno@clisp.org>
109421         Work around a glibc bug in strtok_r.
109422         * lib/string.in.h (strtok_r): Replace if REPLACE_STRTOK_R is set.
109423         Undefine if UNDEFINE_STRTOK_R is set.
109424         * lib/strtok_r.c (strtok_r, __strtok_r) [!_LIBC]: Don't undefine.
109425         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
109426         REPLACE_STRTOK_R and UNDEFINE_STRTOK_R.
109427         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Check against the glibc bug.
109428         * modules/string (Makefile.am): Substitute REPLACE_STRTOK_R,
109429         UNDEFINE_STRTOK_R.
109430         * doc/posix-functions/strtok_r.texi: Mention the glibc 2.7 bug.
109432 2009-09-06  Sergey Poznyakoff  <gray@gnu.org.ua>
109434         exclude: minor fix
109435         * lib/exclude.c: Include wctype.h
109437 2009-09-06  Akim Demaille  <demaille@gostai.com>
109439         bootstrap: improve error message
109440         * build-aux/bootstrap (find_tool): Upon failure, report the list
109441         of candidates.
109442         Honor the initial value of the envvar.
109444 2009-09-05  Eric Blake  <ebb9@byu.net>
109446         symlinkat: new module
109447         * modules/symlinkat: New file.
109448         * lib/symlinkat.c: Likewise.
109449         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Likewise.
109450         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witnesses.
109451         * modules/unistd (Makefile.am): Use them.
109452         * lib/unistd.in.h (symlinkat, readlinkat): Declare them.
109453         (faccessat) [GNULIB_POSIXCHECK]: Fix typo.
109454         * lib/at-func.c (FUNC_RESULT): New macro, defaulting to int.
109455         * MODULES.html.sh (File system functions): Mention module.
109456         * doc/posix-functions/symlinkat.texi (symlinkat): Likewise.
109457         * doc/posix-functions/readlinkat.texi (readlinkat): Likewise.
109458         * modules/symlinkat-tests: New test.
109459         * tests/test-symlinkat.c: Likewise.
109461         test-openat-safer: add more checks
109462         * tests/test-openat-safer.c (main): Check more code paths.
109464 2009-09-05  Jim Meyering  <meyering@redhat.com>
109466         syntax-check: detect unnecessary inclusion of openat.h
109467         * top/maint.mk (sc_prohibit_openat_without_use): New rule.
109469 2009-09-05  Bruno Haible  <bruno@clisp.org>
109471         Support towlower, towupper.
109472         * doc/posix-functions/towlower.texi: Mention module wctype.
109473         * doc/posix-functions/towupper.texi: Likewise.
109474         * lib/wctype.in.h (towlower, towupper): New functions.
109475         * tests/test-wctype.c: Include stdio.h, stdlib.h.
109476         (ASSERT): New macro.
109477         (e): New variable.
109478         (main): Test also towlower, towupper. Test WEOF argument.
109479         Reported by Alan Hourihane <alanh@fairlite.co.uk>.
109481 2009-09-05  Bruno Haible  <bruno@clisp.org>
109483         Fix conversion behaviour when the input is invalid.
109484         * lib/striconveh.c (mem_cd_iconveh_internal): Fix storing of question
109485         mark occurring in first pass of indirect conversion.
109486         * tests/test-striconveh.c (main): Test conversion of invalid ASCII
109487         input.
109488         Found by clang's static analyzer.
109490 2009-09-05  Bruno Haible  <bruno@clisp.org>
109492         * tests/test-striconveh.c (main): Test indirect conversion on platforms
109493         where direct conversion is possible.
109495 2009-09-04  Eric Blake  <ebb9@byu.net>
109497         openat: fail with ENOENT on empty name
109498         * lib/openat-proc.c (openat_proc_name): Special-case the empty
109499         buffer.
109501         link-follow: fix logic bug in prior patch
109502         * m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): Fix bug that
109503         reversed sense of yes and no in prior patch.  Avoid confusing
109504         compilation failure with desired semantics.
109506         link-follow: accommodate mingw and cross-compilation
109507         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Rename...
109508         (gl_FUNC_LINK_FOLLOWS_SYMLINK): ...to this.  Change
109509         cross-compilation results to -1, to make linkat easier to
109510         implement when cross-compiling.  Trivially support mingw.
109511         * modules/link-follow (configure.ac): Call new name.
109512         * NEWS: Mention this.
109514 2009-09-03  Eric Blake  <ebb9@byu.net>
109516         faccessat: compile replacement
109517         * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Build replacement when
109518         needed.
109520         fts: fix compilation error
109521         * lib/fts.c (includes): Re-add "openat.h", for
109522         openat_needs_fchdir.
109524         faccessat: new module
109525         * modules/faccessat: New file.
109526         * lib/faccessat.c: Likewise.
109527         * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Likewise.
109528         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness.
109529         * modules/unistd (Makefile.am): Use it.
109530         * lib/unistd.in.h (faccessat): Declare it.
109531         (F_OK, X_OK, W_OK, R_OK): Provide definitions.
109532         * lib/fcntl.in.h (AT_SYMLINK_FOLLOW, AT_EACCESS): Likewise.
109533         * MODULES.html.sh (File system functions): Mention it.
109534         * doc/posix-functions/faccessat.texi (faccessat): Likewise.
109535         * doc/posix-headers/fcntl.texi (fcntl.h): Likewise.
109537         euidaccess: prefer POSIX over non-standard implementation
109538         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Check for faccessat.
109539         * lib/euidaccess.c (euidaccess): Use it if available.
109541         openat: make template easier to use
109542         * lib/at-func.c (CALL_FUNC): Allow AT_FUNC_USE_F1_COND and
109543         AT_FUNC_F2 to be undefined.
109544         (VALIDATE_FLAG): New macro; use it to reject bad flags.
109545         (AT_FUNC_USE_F1_COND): Change sense to just flag bit.
109546         * lib/fchmodat.c (AT_FUNC_USE_F1_COND): Adjust.
109547         * lib/fchownat.c (AT_FUNC_USE_F1_COND): Likewise.
109548         * lib/openat.c (AT_FUNC_USE_F1_COND) [fstatat, unlinkat]:
109549         Likewise.
109550         * lib/mkdirat.c (AT_FUNC_F2, AT_FUNC_USE_F1_COND): Delete.
109551         * lib/selinux-at.c (AT_FUNC_F2, AT_FUNC_USE_F1_COND)
109552         [getfileconat, lgetfileconat, setfileconat, lsetfileconat]:
109553         Likewise.
109555         openat: declare in POSIX headers
109556         * NEWS: Mention this.
109557         * modules/openat (configure.ac): Declare witnesses.
109558         (Depends-on): Add fcntl-h, sys_stat, unistd.
109559         (Include): Mention correct headers.
109560         * modules/fcntl-h (Depends-on): Add link-warning.
109561         (Files): Add openat.m4.
109562         (Makefile.am): Substitute witnesses.
109563         * modules/sys_stat (Files, Makefile.am): Likewise.
109564         * modules/unistd (Files, Makefile.am): Likewise.
109565         * m4/openat.m4 (gl_FUNC_OPENAT, gl_FUNC_FCHOWNAT): Set witnesses.
109566         (gl_OPENAT_DEFAULTS): New macro.
109567         * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Use it.
109568         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Likewise.
109569         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Likewise.
109570         (SYS_STAT_H): Remove unused variable.
109571         * doc/posix-headers/fcntl.texi (fcntl.h): Update content.
109572         * lib/fcntl--.h (includes): Remove unneeded header.
109573         * lib/openat-safer.c (includes): Likewise.
109574         * lib/openat.h (AT_FDCWD, AT_SYMLINK_NOFOLLOW, AT_REMOVEDIR)
109575         (openat, fstatat, unlinkat, mkdirat, fchmodat, fchownat): Move to
109576         appropriate headers.
109577         (__OPENAT_PREFIX): Delete.
109578         * lib/fcntl.in.h (openat): Provide declaration.
109579         (AT_FDCWD): Fix Solaris bug.
109580         (AT_SYMLINK_NOFOLLOW, AT_REMOVEDIR): Provide macros.
109581         * lib/sys_stat.in.h (fstatat, mkdirat): Provide declaration.
109582         * lib/fchmodat.c (includes):  Adjust to find declaration.
109583         * lib/fchownat.c (includes): Likewise.
109584         * lib/mkdirat.c (includes): Likewise.
109585         * lib/fstatat.c (includes): Likewise.  Ensure original fstatat is
109586         still visible.
109588 2009-09-02  Eric Blake  <ebb9@byu.net>
109590         errno: use consistently
109591         * lib/c-stack.c (ENOTSUP): <errno.h> guarantees a definition.
109592         * lib/canonicalize-lgpl.c (ENAMETOOLONG): Likewise.
109593         * lib/canonicalize.c (ELOOP): Likewise.
109594         * lib/inet_ntop.c (EAFNOSUPPORT): Likewise.
109595         * lib/inet_pton.c (EAFNOSUPPORT): Likewise.
109596         * lib/lchown.c (EOPNOTSUPP): Likewise.
109597         * lib/openat-priv.h (ENOSYS, EOPNOTSUPP): Likewise.
109598         * lib/savewd.c (ESTALE): Likewise.
109599         * lib/settime.c (ENOSYS): Likewise.
109600         * lib/utimens.c (ENOSYS): Likewise.
109601         * lib/xgethostname.c (ENAMETOOLONG): Likewise.
109602         * lib/chdir-safer.c (ELOOP): Likewise.
109603         (chdir_no_follow): Use HAVE_READLINK, not ELOOP, as witness.
109604         * modules/c-stack (Depends-on): Add errno.
109605         * modules/canonicalize (Depends-on): Likewise.
109606         * modules/chdir-safer (Depends-on): Likewise.
109607         * modules/fdopendir (Depends-on): Likewise.
109608         * modules/inet_ntop (Depends-on): Likewise.
109609         * modules/inet_pton (Depends-on): Likewise.
109610         * modules/lchown (Depends-on): Likewise.
109611         * modules/openat (Depends-on): Likewise.
109612         * modules/savewd (Depends-on): Likewise.
109613         * modules/settime (Depends-on): Likewise.
109614         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Check for readlink.
109616         fts: avoid leaking fds
109617         * modules/fts (Depends-on): Add cloexec.
109618         * lib/fts.c (opendirat, diropen, fts_build): Set close-on-exec
109619         flag.
109621         fts: make directory fds more robust
109622         * lib/fts.c (O_DIRECTORY): Let <fcntl.h> take care of this.
109623         (opendirat): Specify O_DIRECTORY, and add fallbacks for safety.
109625         backupfile, chdir-long, fts, savedir: make safer
109626         * lib/backupfile.c (includes): Use "dirent--.h", since
109627         numbered_backup can write to stderr during readdir.
109628         * lib/savedir.c (includes): Likewise.
109629         * lib/chdir-long.c (includes): Use "fcntl--.h", since openat
109630         emulation can write to stderr on failure.
109631         * lib/fts.c (includes) [!_LIBC]: Likewise for opendir and openat.
109632         * lib/getcwd.c: Document why opendir_safer is unused.
109633         * lib/glob.c: Likewise.
109634         * lib/scandir.c: Likewise.
109635         * lib/openat-proc.c: Likewise, for open_safer.
109636         * modules/backupfile (Depends-on): Add dirent-safer.
109637         * modules/savedir (Depends-on): Likewise.
109638         * modules/fts (Depends-on): Add dirent-safer and openat-safer.
109639         * modules/chdir-long (Depends-on): Add openat-safer.
109641         openat-safer: new module
109642         * modules/openat-safer: New file.
109643         * lib/openat-safer.c: Likewise.
109644         * m4/fcntl-safer.m4 (gl_OPENAT_SAFER): New macro.
109645         * lib/fcntl-safer.h (openat_safer): Declare.
109646         * lib/fcntl--.h (openat): Override.
109647         * MODULES.html.sh (File descriptor based I/O): Mention it.
109648         * lib/openat.h: Add double-inclusion guards.
109649         * lib/openat.c (includes): Only include "fcntl-safer.h", not
109650         "fcntl--.h", so we can implement openat.
109651         * modules/openat-safer-tests: New test.
109652         * tests/test-openat-safer.c: New file.
109654         dirent-safer: new module
109655         * modules/dirent-safer: New file.
109656         * lib/dirent--.h: Likewise.
109657         * lib/dirent-safer.h: Likewise.
109658         * lib/opendir-safer.c: Likewise.
109659         * m4/dirent-safer.m4: Likewise.
109660         * MODULES.html.sh (Enhancements for POSIX:2008): Mention it.
109661         * modules/dirent-safer-tests: New test.
109662         * tests/test-dirent-safer.c: New file.
109663         * lib/fdopendir.c (includes): Ensure fdopendir is also safe.
109665         fdopendir: optimize on mingw
109666         * lib/unistd.in.h (_gl_directory_name): New prototype.
109667         * lib/fchdir.c (_gl_directory_name): Implement it.
109668         (fchdir): Use it to simplify implementation.
109669         * lib/fdopendir.c (fdopendir) [REPLACE_FCHDIR]: Use metadata from
109670         fchdir, when available, to avoid calling [f]chdir().
109672         fdopendir: split into its own module
109673         * lib/openat.c (fdopendir): Move...
109674         * lib/fdopendir.c: ...into new file.
109675         * modules/fdopendir: New module.
109676         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): New file.
109677         * modules/openat (Depends-on): Add fdopendir.
109678         * m4/openat.m4 (gl_FUNC_OPENAT): No longer need to check for
109679         fdopendir here.
109680         * modules/savedir (Depends-on): Only need fdopendir, not full
109681         openat.
109682         * lib/savedir.c (include): Use <dirent.h>, not "openat.h".
109683         * lib/openat.h (fdopendir): Drop prototype.
109684         * lib/dirent.in.h (fdopendir): Provide prototype.
109685         * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): Add replacements.
109686         * modules/dirent (Makefile.am): Substitute them.
109687         * MODULES.html.sh (File system functions): Mention it.
109688         * doc/posix-functions/fdopendir.texi (fdopendir): Likewise.
109689         * modules/fdopendir-tests: New file.
109690         * tests/test-fdopendir.c: Likewise.
109692         fchdir: use more consistent macro convention
109693         * lib/fcntl.in.h (_gl_register_fd): Move declaration to unistd.
109694         * lib/sys_stat.in.h (rpl_fstat): Declare via make-time
109695         REPLACE_FCHDIR, rather than relying on config.h macros.
109696         * lib/unistd.in.h (fchdir): Move all fchdir internal declarations
109697         inside a single make-time REPLACE_FCHDIR block, rather than using
109698         the config.h FCHDIR_REPLACEMENT.
109699         * m4/fchdir.m4 (gl_FUNC_FCHDIR): REPLACE_FCHDIR was already
109700         AC_SUBST'd, also AC_DEFINE it.  Don't define FCHDIR_REPLACEMENT.
109701         Manage fstat replacement.
109702         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Pick up
109703         REPLACE_FCHDIR.
109704         * modules/sys_stat (Files): Add m4/unistd_h.m4.
109705         (Makefile.am): Substitute REPLACE_FCHDIR.
109706         * lib/close.c (rpl_close): Use REPLACE_FCHDIR, not
109707         FCHDIR_REPLACEMENT.
109708         * lib/dup-safer.c (dup_safer): Likewise.
109709         * lib/dup2.c (rpl_dup2): Likewise.
109710         * lib/dup3.c (rpl_dup3): Likewise.
109711         * lib/open.c (rpl_open): Likewise.
109713         fchdir: simplify error handling, and support dup3
109714         * modules/fchdir (Depends-on): Use strdup-posix, not strdup.  Add
109715         stdbool, malloc-posix, realloc-posix.
109716         * lib/fchdir.c (struct dir_info_t): Delete saved_errno.
109717         (ensure_dirs_slot): Return false on allocation failure.
109718         (rpl_dup2): Delete.
109719         (_gl_register_dup): New function.
109720         (_gl_unregister_fd, rpl_opendir, rpl_dup): Update callers.
109721         (_gl_register_fd): Close fd on allocation failure.
109722         * lib/fcntl.in.h (_gl_register_fd): Update signature.
109723         * lib/unistd.in.h (_gl_register_dup) [FCHDIR_REPLACEMENT]: New
109724         prototype.
109725         (rpl_dup2_fchdir): Delete prototype.
109726         * lib/open.c (open): Update caller.
109727         * lib/dup2.c (dup2): Track fchdir metadata.
109728         * lib/dup3.c (dup3): Likewise.
109729         * m4/dup2.m4 (gl_REPLACE_DUP2): New macro.
109730         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Use it.
109732 2009-09-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
109734         * gnulib-tool (func_create_testdir, func_create_megatestdir): Use
109735         AC_CONFIG_HEADERS instead of AM_CONFIG_HEADER. Use AC_CONFIG_FILES and
109736         don't pass arguments to AC_OUTPUT.
109738 2009-09-02  Bruno Haible  <bruno@clisp.org>
109740         * modules/mkdtemp (License): Relicense under LGPLv2+.
109741         Reported by Paolo Bonzini.
109743 2009-09-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
109745         Replace uses of obsolete autoconf macros in Jim's modules.
109746         The Autoconf macros AC_TRY_CPP, AC_TRY_COMPILE, AC_TRY_LINK and
109747         AC_TRY_RUN have been obsolete since Autoconf 2.55, and each use
109748         can evoke a warning from autoconf when run with -Wobsolete
109749         enabled.  They were declared obsolete for good reasons (see
109750         the `AC_FOO_IFELSE vs AC_TRY_FOO' node in the Autoconf manual,
109751         recently renamed to `AC_ACT_IFELSE vs AC_TRY_ACT'), and we
109752         should not continue using the deprecated macros.
109753         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Replace
109754         obsolete Autoconf macros with modern counterparts.
109755         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
109756         * m4/dos.m4 (gl_AC_DOS): Likewise.
109757         * m4/fpending.m4 (gl_FUNC_FPENDING): Likewise.
109758         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Likewise.
109759         * m4/getloadavg.m4 (gl_PREREQ_GETLOADAVG): Likewise.
109760         * m4/jm-winsz1.m4 (gl_WINSIZE_IN_PTEM): Likewise.
109761         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Likewise.
109762         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Likewise.
109763         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Likewise.
109764         * m4/mode_t.m4 (gl_PROMOTED_TYPE_MODE_T): Likewise.
109765         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
109766         Likewise.
109767         * m4/rename.m4 (gl_FUNC_RENAME): Likewise.
109768         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
109769         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Likewise.
109770         * m4/st_dm_mode.m4 (AC_STRUCT_ST_DM_MODE): Likewise.
109771         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
109772         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
109774 2009-09-01  Eric Blake  <ebb9@byu.net>
109776         fchdir: fix off-by-one bug in previous patch
109777         * lib/fchdir.c (rpl_fstat): Use correct bounds.
109778         (_gl_unregister_fd): Delete useless if.
109780 2009-09-01  Daniel P. Berrange  <berrange@redhat.com>
109782         maint.mk: sort the list of syntax-check rules
109783         * top/maint.mk (syntax-check-rules): Sort syntax-check rules, so it's
109784         easier to get a sense of progress when the rules are run sequentially
109785         and take a long time.
109787 2009-09-01  Simon Josefsson  <simon@josefsson.org>
109789         * modules/arpa_inet: Use $(MKDIR_P) instead of @MKDIR_P@.
109790         * modules/netinet_in: Likewise.
109791         * modules/sys_file: Likewise.
109792         * modules/sys_ioctl: Likewise.
109793         * modules/sys_select: Likewise.
109794         * modules/sys_socket: Likewise.
109795         * modules/sys_stat: Likewise.
109796         * modules/sys_time: Likewise.
109797         * modules/sys_times: Likewise.
109798         * modules/sys_utsname: Likewise.
109799         * modules/sys_wait: Likewise.
109801 2009-09-01  Jim Meyering  <meyering@redhat.com>
109803         fts: help ensure that return values are not ignored
109804         * lib/fts_.h (__GNUC_PREREQ): Define.
109805         (__attribute_warn_unused_result__): Define.
109806         (fts_children, fts_close, fts_open, fts_read): Declare with
109807         __attribute_warn_unused_result__.
109809         fts: fts_close now fails also when closing a dir file descriptor fails
109810         * lib/fts.c (fts_close): Detect close failure, not just fchdir failure,
109811         and propagate to caller, along with errno.
109813         announce-gen: correct formatting in --help output
109814         * build-aux/announce-gen (usage): Move the one-line description in
109815         --help output "up", to where it belongs, just after Usage:.
109817 2009-08-31  Eric Blake  <ebb9@byu.net>
109819         fchdir: port to mingw
109820         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Check for mingw bug.
109821         * lib/open.c (open) [FCHDIR_REPLACEMENT]: If directories can't be
109822         opened, then use a substitute.
109823         * lib/sys_stat.in.h (fstat) [REPLACE_OPEN_DIRECTORY]: Declare
109824         replacement.
109825         * lib/fchdir.c (fstat) [REPLACE_OPEN_DIRECTORY]: Implement it.
109826         (_gl_register_fd): No need to check stat if open already filters
109827         all directories.
109828         (fchdir): Fix error condition to match POSIX.
109829         * modules/fchdir (Depends-on): Add sys_stat.
109830         * doc/posix-functions/open.texi (open): Document the limitation.
109831         * modules/fchdir-tests: New file.
109832         * tests/test-fchdir.c: Likewise.
109834         canonicalize: allow cross-testing from cygwin to mingw
109835         * modules/canonicalize-tests (configure.ac): Define HAVE_SYMLINK.
109836         (Makefile.am): Pass it through TESTS_ENVIRONMENT.
109837         * modules/canonicalize-lgpl-tests (configure.ac, Makefile.am):
109838         Likewise.
109839         * tests/test-canonicalize.sh: Also skip test if 'ln -s' works, but
109840         target does not support symlinks.
109841         * tests/test-canonicalize-lgpl.sh: Likewise.
109843         chown: avoid compilation warning on mingw
109844         * m4/chown.m4 (gl_FUNC_CHOWN): Recognize missing chown.
109845         * lib/chown.c (rpl_chown) [!HAVE_CHOWN]: Always return failure on
109846         mingw.
109847         * lib/lchown.c (lchown) [!HAVE_CHOWN]: Likewise.
109848         * modules/chown (Depends-on): Add errno.
109850 2009-08-31  Stefano Lattarini  <stefano.lattarini@gmail.com>  (tiny change)
109852         * gnulib-tool: Fix test whether $CONFIG_SHELL has a working 'echo'
109853         command.
109855 2009-08-31  Jim Meyering  <meyering@redhat.com>
109857         canonicalize: remove useless initialization
109858         * lib/canonicalize.c (canonicalize_filename_mode): Remove useless
109859         initialization of local, "end".
109861 2009-08-30  Bruno Haible  <bruno@clisp.org>
109863         Fix an unnecessary error on Solaris 10 on NFSv3 file systems.
109864         * lib/set-mode-acl.c (qset_acl) [Solaris 10 new]: Treat EOPNOTSUPP like
109865         ENOSYS.
109867 2009-08-30  Bruno Haible  <bruno@clisp.org>
109869         * tests/test-pipe-filter-ii1.sh: Prefer /usr/xpg6/bin/tr over
109870         /usr/xpg4/bin/tr when it exists.
109871         * tests/test-pipe-filter-gi1.sh: Likewise.
109873 2009-08-30  Bruno Haible  <bruno@clisp.org>
109875         Work around deficient /usr/bin/id program on Solaris.
109876         * tests/test-file-has-acl.sh (ID): New variable.
109877         * tests/test-set-mode-acl.sh (ID): Likewise.
109878         * tests/test-copy-acl.sh (ID): Likewise.
109879         * tests/test-copy-file.sh (ID): Likewise.
109881 2009-08-30  Bruno Haible  <bruno@clisp.org>
109883         New module 'xstriconveh'.
109884         * lib/xstriconveh.h: New file.
109885         * lib/xstriconveh.c: New file.
109886         * modules/xstriconveh: New file.
109888 2009-08-30  Bruno Haible  <bruno@clisp.org>
109890         Make it easier to use mem_cd_iconveh.
109891         * lib/striconveh.h (iconveh_t): New type.
109892         (iconveh_open, iconveh_close): New declarations.
109893         (mem_cd_iconveh, str_cd_iconveh): Replace the three iconv_t arguments
109894         with a single 'const iconveh_t *' argument.
109895         * lib/striconveh.c (iconveh_open, iconveh_close): New functions.
109896         (mem_cd_iconveh, str_cd_iconveh): Replace the three iconv_t arguments
109897         with a single 'const iconveh_t *' argument.
109898         (mem_iconveh, str_iconveh): Use iconveh_open, iconveh_close.
109899         * tests/test-striconveh.c (main): Update.
109900         * NEWS: Mention the change.
109902 2009-08-30  Bruno Haible  <bruno@clisp.org>
109904         * doc/posix-functions/iconv_open.texi: Mention indirect conversion
109905         problem.
109907 2009-08-30  Bruno Haible  <bruno@clisp.org>
109909         Work around iconv_open problem on Solaris.
109910         * lib/iconv_open-solaris.gperf: New file.
109911         * lib/iconv_open.c (ICONV_FLAVOR_SOLARIS): New macro.
109912         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): Also handle Solaris.
109913         * modules/iconv_open (Files): Add lib/iconv_open-solaris.gperf.
109914         (Makefile.am): Add rule for iconv_open-solaris.h. Augment
109915         BUILT_SOURCES, MOSTLYCLEANFILES, MAINTAINERCLEANFILES, EXTRA_DIST.
109916         * doc/posix-functions/iconv_open.texi: Mention the Solaris problem.
109918 2009-08-29  Jim Meyering  <meyering@redhat.com>
109920         maint.mk: remove more coreutils-specific targets; XZ_OPT=-9ev
109921         * top/maint.mk (cvs-check): Remove target; it was just an alias
109922         to the better-named vc-diff-check.
109923         (maintainer-distcheck): Remove rule.  It was used only from
109924         the (alpha/beta/major) target, and all of its commands but one
109925         were coreutils-specific.
109926         (vc-dist): Remove rule.
109927         (alpha beta major): Run "$(MAKE) distcheck" explicitly.
109928         Run vc-diff-check, not vc-dist.
109929         Run $(MAKE) dist with XZ_OPT=-9ev.  Note spelling, with "-".
109931 2009-08-27  Bruno Haible  <bruno@clisp.org>
109933         * tests/test-bitrotate.c (main): Remove test that uses a shift count
109934         of 0.
109936 2009-08-27  Bruno Haible  <bruno@clisp.org>
109938         * tests/test-func.c (main): Don't verify sizeof __func__ on SunPRO C
109939         compilers.
109940         * doc/func.texi: Document the SunPRO C bug.
109942 2009-08-27  Bruno Haible  <bruno@clisp.org>
109944         Fix link error on Solaris.
109945         * tests/test-parse-duration.c (xstrdup): Remove function.
109947 2009-08-26  Pádraig Brady  <P@draigbrady.com>
109949         ignore-value: handle pointer types, too
109950         * lib/ignore-value.h (__attribute__): Remove definition.
109951         (ignore_value): Remove use of "__attribute__ ((unused))" in favor
109952         of a more concise and more-often effective "(void) i" statement.
109953         (ignore_ptr): New function to suppress warnings from functions that
109954         return pointers, and to make it explicit that one function doesn't
109955         handle all cases.
109957 2009-08-25  Bruno Haible  <bruno@clisp.org>
109959         dup2: work around a Linux bug.
109960         * m4/dup2.m4 (gl_FUNC_DUP2): Test for the Linux bug.
109961         * lib/dup2.c (rpl_dup2): Correct the return value if it is -EBADF.
109962         * doc/posix-functions/dup2.texi: Mention the Linux bug.
109963         Reported by Simon Josefsson.
109965 2009-08-25  Jim Meyering  <meyering@redhat.com>
109967         libguestfs uses gnulib
109968         * users.txt: Add libguestfs.
109970 2009-08-24  Eric Blake  <ebb9@byu.net>
109972         dup2, pipe2: fix some recent test failures on cygwin 1.5.x
109973         * lib/pipe2.c (includes): Add binary-io.h.
109974         * lib/dup2.c (rpl_dup2): Correct buggy errno value.
109976 2009-08-24  Bruno Haible  <bruno@clisp.org>
109978         Tolerate declared but missing accept4 syscall.
109979         * lib/accept4.c (accept4): Invoke original accept4 function first, if
109980         available.
109981         * lib/sys_socket.in.h (accept4): If the function is already present,
109982         override it.
109983         * m4/accept4.m4 (gl_FUNC_ACCEPT4): Remove AC_LIBOBJ invocation.
109984         * modules/accept4 (Makefile.am): Compile accept4.c always.
109985         Reported by Paolo Bonzini and Eric Blake.
109987 2009-08-23  Bruno Haible  <bruno@clisp.org>
109989         New module 'accept4'.
109990         * lib/sys_socket.in.h (accept4): New declaration.
109991         * lib/accept4.c: New file.
109992         * m4/accept4.m4: New file.
109993         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_H_DEFAULTS): Initialize
109994         GNULIB_ACCEPT4, HAVE_ACCEPT4.
109995         * modules/sys_socket (Makefile.am): Substitute GNULIB_ACCEPT4,
109996         HAVE_ACCEPT4.
109997         * modules/accept4: New file.
109998         * doc/glibc-functions/accept4.texi: Mention the new module.
110000 2009-08-24  Jim Meyering  <meyering@redhat.com>
110002         progname: also set global program_invocation_name, when possible
110003         Before this change, a libtool-enabled program that calls glibc's
110004         error function would report the program name as
110005         "/abs/dir/.libs/lt-program_name" rather than the desired program_name.
110006         * modules/progname (configure.ac): Check for a declaration of
110007         program_invocation_name.
110008         * lib/progname.c:  Include <errno.h>.
110009         (set_program_name) [HAVE_DECL_PROGRAM_INVOCATION_NAME]:
110010         Set program_invocation_name.
110012 2009-08-23  Bruno Haible  <bruno@clisp.org>
110014         * lib/dup3.c: Include <string.h>.
110016 2009-08-23  Bruno Haible  <bruno@clisp.org>
110018         * lib/dup3.c (dup3): Test only once whether the system actually exists.
110019         * lib/pipe2.c (pipe2): Likewise.
110020         Suggested by Eric Blake.
110022 2009-08-23  Bruno Haible  <bruno@clisp.org>
110024         Tolerate declared but missing dup3 syscall.
110025         * lib/dup3.c (dup3): Invoke original dup3 function first, if available.
110026         * lib/unistd.in.h (dup3): If the function is already present,
110027         override it.
110028         * m4/dup3.m4 (gl_FUNC_DUP3): Remove AC_LIBOBJ invocation.
110029         * modules/dup3 (Makefile.am): Compile dup3.c always.
110030         Reported by Paolo Bonzini.
110032 2009-08-23  Bruno Haible  <bruno@clisp.org>
110034         Tolerate declared but missing pipe2 syscall.
110035         * lib/pipe2.c (pipe2): Invoke original pipe2 function first, if
110036         available.
110037         * lib/unistd.in.h (pipe2): If the function is already present,
110038         override it.
110039         * m4/pipe2.m4 (gl_FUNC_PIPE2): Remove AC_LIBOBJ invocation.
110040         * modules/pipe2 (Makefile.am): Compile pipe2.c always.
110041         Reported by Paolo Bonzini.
110043 2009-08-23  Bruno Haible  <bruno@clisp.org>
110045         * lib/pipe2.c (pipe2): Move #ifs inside function.
110047 2009-08-22  Joel E. Denny  <jdenny@clemson.edu>
110049         quotearg: document limitations of quote_these_too
110050         * lib/quotearg.c (quotearg_buffer_restyled): Add comments where
110051         those limitations are created.
110052         * lib/quotearg.h (set_char_quoting): Document that digits and
110053         letters that are special after backslash are not permitted.
110054         (quotearg_char): Cross-reference set_char_quoting documentation.
110056 2009-08-23  Joel E. Denny  <jdenny@clemson.edu>
110058         quotearg: implement custom_quoting_style
110059         * lib/quotearg.c: (struct quoting_options): Add left_quote and
110060         right_quote fields.
110061         (set_custom_quoting): New public function.
110062         (quotearg_buffer_restyled): Add left_quote and right_quote
110063         arguments, handle them very much like locale quoting, and update
110064         all uses.
110065         (quotearg_n_custom): New public function.
110066         (quotearg_n_custom_mem): New public function.
110067         (quotearg_custom): New public function.
110068         (quotearg_custom_mem): New public function.
110069         * lib/quotearg.h: Prototype and document new public functions.
110070         (enum quoting_style): For escape_quoting_style and
110071         clocale_quoting_style, comment that QA_SPLIT_TRIGRAPHS is
110072         ignored even though they're otherwise like c_quoting_style.
110073         Add custom_quoting_style member and document with comparison to
110074         clocale_quoting_style.
110075         * tests/test-quotearg.c (custom_quotes): New array.
110076         (custom_results): New array.
110077         (main): Extend to test custom quoting.
110079 2009-08-22  Joel E. Denny  <jdenny@clemson.edu>
110081         quotearg: fix right quote escaping when it's in quote_these_too
110082         * lib/quotearg.c (quotearg_buffer_restyled): Upon seeing a right
110083         quote, be sure to prepend only one backslash.
110084         * tests/test-quotearg.c (use_quote_double_quotes): New function.
110085         (main): Test it.
110087 2009-08-22  Joel E. Denny  <jdenny@clemson.edu>
110089         quotearg-tests: test escaping of embedded locale quotes
110090         * tests/test-quotearg.c (struct result_strings): Add member for
110091         new input.
110092         (LQ_ENC, RQ_ENC, RQ_ESC): New macros.
110093         (inputs): Add new input.
110094         (results_g): Add expected results.
110095         (flag_results): Likewise.
110096         (locale_results): Likewise.
110097         (compare_strings): Check those.
110099 2009-08-23  Bruno Haible  <bruno@clisp.org>
110101         Tests for module 'dup3'.
110102         * modules/dup3-tests: New file.
110103         * tests/test-dup3.c: New file.
110105         New module 'dup3'.
110106         * lib/unistd.in.h (dup3): New declaration.
110107         * lib/dup3.c: New file.
110108         * m4/dup3.m4: New file.
110109         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_DUP3 and
110110         HAVE_DUP3.
110111         * modules/unistd (Makefile.am): Substitute GNULIB_DUP3 and HAVE_DUP3.
110112         * modules/dup3: New file.
110113         * doc/glibc-functions/dup3.texi: Mention the new module.
110115 2009-08-23  Bruno Haible  <bruno@clisp.org>
110117         Tweak the dup2 test.
110118         * tests/test-dup2.c (main): Create the test file empty. Verify that an
110119         out-of-range fd yields EBADF. Verify that after writing to /dev/null,
110120         the test file is still empty. Fix argument order of lseek.
110122 2009-08-23  Bruno Haible  <bruno@clisp.org>
110124         Avoid test link errors when the modules getopt-gnu, gettext are used.
110125         * modules/getopt-posix-tests (Makefile.am): Define test_getopt_LDADD.
110126         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
110128 2009-08-23  Bruno Haible  <bruno@clisp.org>
110130         Fix getdtablesize() on mingw.
110131         * lib/getdtablesize.c (getdtablesize): Implement differently.
110132         * lib/unistd.in.h (getdtablesize): Improve comment.
110134 2009-08-23  Bruno Haible  <bruno@clisp.org>
110136         New module 'mkostemp'.
110137         Based on Ulrich Drepper's 2007-08-10 change in glibc.
110138         * lib/stdlib.in.h (mksotemp): New declaration.
110139         * lib/mkostemp.c: New file, from glibc with modifications.
110140         * lib/tempname.h (GT_FILE): Remove outdated comment.
110141         (gen_tempname): Add flags argument.
110142         * lib/tempname.c (__GT_BIGFILE): Remove macro.
110143         (__GT_FILE): Map to 1.
110144         (small_open, large_open): Remove macros.
110145         (__gen_tempname): Add flags argument. Remove code for __GT_BIGFILE.
110146         * lib/mkstemp.c (mkstemp): Update.
110147         * lib/mkdtemp.c (mkdtemp): Likewise.
110148         * m4/mkostemp.m4: New file.
110149         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_MKOSTEMP,
110150         HAVE_MKOSTEMP.
110151         * modules/stdlib (Makefile.am): Substitute GNULIB_MKOSTEMP,
110152         HAVE_MKOSTEMP.
110153         * modules/mkostemp: New file, based on modules/mkstemp.
110154         * doc/glibc-functions/mkostemp.texi: Mention the new module.
110155         * NEWS: Mention the change.
110157 2009-08-23  Bruno Haible  <bruno@clisp.org>
110159         * lib/pipe2.c (pipe2): Support O_TEXT, O_BINARY on all platforms.
110160         Reported by Eric Blake.
110162 2009-08-23  Bruno Haible  <bruno@clisp.org>
110164         * lib/pipe2.c (pipe2): Fix test of fcntl's return value.
110165         Reported by Eric Blake.
110167 2009-08-23  Bruno Haible  <bruno@clisp.org>
110169         * modules/fchdir (Depends-on): Use fcntl-h instead of fcntl.
110170         * modules/pipe2 (Depends-on): Likewise.
110172 2009-08-23  Eric Blake  <ebb9@byu.net>
110174         fcntl-h: add O_TTY_INIT support
110175         * lib/fcntl.in.h (O_TTY_INIT): Support another POSIX macro.
110176         * tests/test-fcntl-h.c (o): Test it.
110177         * doc/posix-headers/fcntl.texi (fcntl.h): Update documentation.
110179         fcntl-h: rename from fcntl, in preparation for fcntl(2)
110180         * modules/fcntl: Move <fcntl.h> header replacement...
110181         * modules/fcntl-h: ...to new name, so as not to collide with
110182         like-named function.
110183         * tests/test-fcntl.c: Rename...
110184         * tests/test-fcntl-h.c: ...to this.  Test FD_CLOEXEC.
110185         * modules/fcntl-tests: Rename...
110186         * modules/fcntl-h-tests: ...to this.  Update test file name.
110187         * modules/chdir-long (Depends-on): Update clients.
110188         * modules/chdir-safer (Depends-on): Likewise.
110189         * modules/fcntl-safer (Depends-on): Likewise.
110190         * modules/fts (Depends-on): Likewise.
110191         * modules/mkancesdirs (Depends-on): Likewise.
110192         * modules/mkdir-p (Depends-on): Likewise.
110193         * modules/open (Depends-on): Likewise.
110194         * modules/savewd (Depends-on): Likewise.
110195         * MODULES.html.sh (systems lacking POSIX:2008): Update name.
110196         * doc/posix-headers/fcntl.texi (fcntl.h): Update documentation.
110198 2009-08-22  Bruno Haible  <bruno@clisp.org>
110200         * modules/binary-io (License): Relicense under LGPL.
110201         * modules/pipe2 (License): Likewise.
110203 2009-08-22  Bruno Haible  <bruno@clisp.org>
110205         * lib/pipe-filter-ii.c (pipe_filter_ii_execute): Fix test of fcntl's
110206         return value.
110207         * lib/pipe-filter-gi.c (filter_init): Likewise.
110208         Reported by Eric Blake.
110210 2009-08-22  Bruno Haible  <bruno@clisp.org>
110212         * lib/pipe.c (create_pipe): Use pipe2 instead of _pipe.
110213         * modules/pipe (Depends-on): Add pipe2.
110215 2009-08-22  Bruno Haible  <bruno@clisp.org>
110217         Tests for module 'pipe2'.
110218         * modules/pipe2-tests: New file.
110219         * tests/test-pipe2.c: New file.
110221         New module 'pipe2'.
110222         * lib/unistd.in.h (pipe2): New declaration.
110223         * lib/pipe2.c: New file.
110224         * m4/pipe2.m4: New file.
110225         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_PIPE2 and
110226         HAVE_PIPE2.
110227         * modules/unistd (Makefile.am): Substitute GNULIB_PIPE2 and HAVE_PIPE2.
110228         * modules/pipe2: New file.
110229         * doc/glibc-functions/pipe2.texi: Mention the new module.
110231 2009-08-22  Bruno Haible  <bruno@clisp.org>
110233         Reference some new glibc functions.
110234         * doc/glibc-functions/accept4.texi: New file.
110235         * doc/glibc-functions/dup3.texi: New file.
110236         * doc/glibc-functions/mkostemp.texi: New file.
110237         * doc/glibc-functions/pipe2.texi: New file.
110238         * doc/gnulib.texi (Glibc stdlib.h): Refer to mkostemp.
110239         (Glibc sys/socket.h): Refer to accept4.
110240         (Glibc unistd.h): Refer to dup3, pipe2.
110241         Reported by Eric Blake.
110243 2009-08-22  Jim Meyering  <meyering@redhat.com>
110244             Bruno Haible  <bruno@clisp.org>
110246         annotate automake snippets with $(AM_V_GEN) and $(AM_V_at)
110247         This makes it so packages using automake-1.11's silent-rules option
110248         can print e.g., a single "GEN    configmake.h" line, rather than
110249         the 30+ statements that perform the job.  If you want to see the
110250         actual commands, you can still run "make V=1".
110251         * modules/alloca-opt: Add $(AM_V_GEN) and $(AM_V_at) prefixes
110252         so that make output is abbreviated when those variables are defined
110253         appropriately.
110254         * modules/argz: Likewise.
110255         * modules/arpa_inet: Likewise.
110256         * modules/byteswap: Likewise.
110257         * modules/configmake: Likewise.
110258         * modules/dirent: Likewise.
110259         * modules/errno: Likewise.
110260         * modules/fcntl: Likewise.
110261         * modules/float: Likewise.
110262         * modules/fnmatch: Likewise.
110263         * modules/getopt-posix: Likewise.
110264         * modules/glob: Likewise.
110265         * modules/iconv_open: Likewise.
110266         * modules/inttypes: Likewise.
110267         * modules/localcharset: Likewise.
110268         * modules/locale: Likewise.
110269         * modules/math: Likewise.
110270         * modules/netdb: Likewise.
110271         * modules/netinet_in: Likewise.
110272         * modules/poll: Likewise.
110273         * modules/posix_spawnp-tests: Likewise.
110274         * modules/sched: Likewise.
110275         * modules/search: Likewise.
110276         * modules/selinux-h: Likewise.
110277         * modules/signal: Likewise.
110278         * modules/spawn: Likewise.
110279         * modules/stdarg: Likewise.
110280         * modules/stdbool: Likewise.
110281         * modules/stddef: Likewise.
110282         * modules/stdint: Likewise.
110283         * modules/stdio: Likewise.
110284         * modules/stdlib: Likewise.
110285         * modules/string: Likewise.
110286         * modules/strings: Likewise.
110287         * modules/sys_file: Likewise.
110288         * modules/sys_ioctl: Likewise.
110289         * modules/sys_select: Likewise.
110290         * modules/sys_socket: Likewise.
110291         * modules/sys_stat: Likewise.
110292         * modules/sys_time: Likewise.
110293         * modules/sys_times: Likewise.
110294         * modules/sys_utsname: Likewise.
110295         * modules/sys_wait: Likewise.
110296         * modules/sysexits: Likewise.
110297         * modules/time: Likewise.
110298         * modules/unistd: Likewise.
110299         * modules/wchar: Likewise.
110300         * modules/wctype: Likewise.
110302 2009-08-22  Jim Meyering  <meyering@redhat.com>
110304         announce-gen: detect write failure
110305         * build-aux/announce-gen: Add Coda at end.
110306         Remove equivalent-but-more-verbose block at top.
110308 2009-08-19  Akim Demaille  <demaille@gostai.com>
110310         bootstrap: --help to stdout.
110311         * bootstrap (usage): Don't send --help to stderr.
110312         Use a here doc instead of a long string.
110314 2009-08-21  Eric Blake  <ebb9@byu.net>
110316         test-popen-safer: split from test-popen
110317         * tests/test-popen.c (main): Move...
110318         * tests/test-popen.h: ...into new file.
110319         * tests/test-popen-safer2.c: New file.
110320         * modules/popen-tests (Files): Add test-popen.h.
110321         * modules/popen-safer-tests (Files): Add test-popen-safer2.c.
110322         Suggested by Bruno Haible.
110324         test-fcntl-safer: split from test-open
110325         * tests/test-open.c (main): Move...
110326         * tests/test-open.h: ...into new file.
110327         * tests/test-fcntl-safer.c: New file.
110328         * modules/open-tests (Files): Add test-open.h.
110329         * modules/fcntl-safer-tests: New file.
110330         Suggested by Bruno Haible.
110332         test-fopen-safer: split from test-fopen
110333         * tests/test-fopen.c (main): Move...
110334         * tests/test-fopen.h: ...into new file.
110335         * tests/test-fopen-safer.c: New file.
110336         * modules/fopen-tests (Files): Add test-fopen.h.
110337         * modules/fopen-safer-tests: New file.
110338         Suggested by Bruno Haible.
110340 2009-08-21  Paolo Bonzini  <bonzini@gnu.org>
110342         popen-safer: test O_CLOEXEC at run-time.
110343         * lib/popen-safer.c: Test O_CLOEXEC at run-time.
110345 2009-08-21  Paolo Bonzini  <bonzini@gnu.org>
110347         fcntl: move more flags to the header
110348         * lib/cloexec.c: Do not define FD_CLOEXEC here.
110349         * lib/popen-safer.c: Do not alias O_NOINHERIT to O_CLOEXEC here.
110350         * lib/fcntl.in.h: Do both things here.
110352 2009-08-21  Jim Meyering  <meyering@redhat.com>
110354         consistently remove $@-t before redirecting to it
110355         * modules/argz: Remove $@-t and $@ before redirecting to the former.
110356         * modules/alloca-opt: Likewise.
110357         * modules/byteswap: Likewise.
110358         * modules/fnmatch: Likewise.
110359         * modules/getopt-posix: Likewise.
110360         * modules/glob: Likewise.
110361         * modules/poll: Likewise.
110362         * modules/posix_spawnp-tests: Likewise.
110363         * modules/sys_socket: Likewise.
110364         * modules/sysexits: Likewise.
110366 2009-08-21  Eric Blake  <ebb9@byu.net>
110368         popen: simplify access to original popen
110369         * lib/popen.c (rpl_popen): No need to worry about popen being a
110370         macro.
110371         Reported by Bruno Haible.
110373 2009-08-20  Eric Blake  <ebb9@byu.net>
110375         build: avoid some compiler warnings
110376         * lib/selinux-at.h: Use dir_fd, not dirfd, to avoid shadowing.
110377         * lib/exclude.c (fnmatch_pattern_has_wildcards): Use correct
110378         type.
110379         (new_exclude_segment, excluded_file_pattern_p)
110380         (excluded_file_name_p): Reduce scope.
110381         * lib/vasnprintf.c (decimal_point_char): Avoid warning on
110382         old-style declaration.
110384 2009-08-20  Simon Josefsson  <simon@josefsson.org>
110386         * tests/test-exclude1.sh: Handle Windows EOL.
110387         * tests/test-exclude2.sh: Likewise.
110388         * tests/test-exclude3.sh: Likewise.
110389         * tests/test-exclude4.sh: Likewise.
110390         * tests/test-exclude5.sh: Likewise.
110391         * tests/test-exclude6.sh: Likewise.
110392         * tests/test-exclude7.sh: Likewise.
110394 2009-08-19  Akim Demaille  <demaille@gostai.com>
110396         bootstrap: find sha1sum when named gsha1sum.
110397         * bootstrap (find_tool): New.
110398         ($SHA1SUM): New.
110399         Use it.
110401 2009-08-20  Jim Meyering  <meyering@redhat.com>
110403         maint.mk: _header_without_use: fix a quoting bug and remove a bash'ism
110404         * top/maint.mk (_header_without_use): Use "\\\\", not "\\" in the sed
110405         expression that converts "." in a file name to "\." in the resulting
110406         regexp.  Start with a dummy statement, so that prior shell variable
110407         definitions are expanded portably.  Reported by Simon Josefsson.
110409 2009-08-20  Paolo Bonzini  <bonzini@gnu.org>
110411         Fix polling for writeability of a screen buffer.
110412         * lib/poll.c: Distinguish input and screen buffers for the
110413         Win32 implementation.
110414         * lib/select.c: Likewise.
110416 2009-08-19  Eric Blake  <ebb9@byu.net>
110418         popen-safer: prevent popen from clobbering std descriptors
110419         * modules/popen-safer: New file.
110420         * lib/popen-safer.c: Likewise.
110421         * m4/stdio-safer.m4 (gl_POPEN_SAFER): New macro.
110422         * lib/stdio--.h (popen): Provide override.
110423         * lib/stdio-safer.h (popen_safer): Provide declaration.
110424         * tests/test-popen.c (includes): Partially test this.
110425         * modules/popen-safer-tests: New file, for more tests.
110426         * tests/test-popen-safer.c: Likewise.
110427         * MODULES.html.sh (file stream based Input/Output): Mention it.
110429         tests: test some of the *-safer modules
110430         * modules/fopen-safer (Depends-on): Add fopen.
110431         * modules/fcntl-safer (Depends-on): Add fcntl.
110432         * modules/stdlib-safer (Depends-on): Add stdlib.
110433         (configure.ac): Set indicator.
110434         * modules/unistd-safer (configure.ac): Likewise.
110435         * modules/tmpfile-safer (configure.ac): Likewise.
110436         (Depends-on): Add tmpfile.
110437         * lib/stdio--.h (fopen, tmpfile): Don't override unless module is
110438         active.
110439         * tests/test-fopen.c (includes): Test safer versions when they are
110440         in use.
110441         * tests/test-open.c (includes): Likewise.
110443         popen: fix cygwin 1.5 bug when stdin closed
110444         * doc/posix-functions/popen.texi (popen): Document cygwin bugs.
110445         * modules/popen: New file.
110446         * modules/popen-tests: Likewise.
110447         * tests/test-popen.c: Likewise.
110448         * m4/popen.m4: Likewise.
110449         * lib/popen.c: Likewise.
110450         * lib/stdio.in.h (popen): New declaration.
110451         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add popen.
110452         * modules/stdio (Makefile.am): Likewise.
110453         * MODULES.html.sh (systems lacking POSIX:2008): Mention it.
110455 2009-08-17  Joel E. Denny  <jdenny@clemson.edu>
110457         maint.mk: give full control over update-copyright exclusions
110458         * top/maint.mk (VC_LIST_EXCEPT): Instead of ChangeLog, use
110459         ${VC_LIST_EXCEPT_DEFAULT-ChangeLog} as the default exclusion.
110460         (update-copyright): Don't force inclusion of top-level
110461         ChangeLog.  Don't force exclusion of all COPYING files, but make
110462         them the default exclusion instead.
110464 2009-08-16  Bruno Haible  <bruno@clisp.org>
110466         Fix test failures on Solaris 10.
110467         * tests/uniconv/test-u8-conv-from-enc.c (main): Disable autodetect_jp
110468         tests when Solaris iconv() is used.
110469         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
110470         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
110471         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
110472         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
110473         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
110475 2009-08-16  Bruno Haible  <bruno@clisp.org>
110477         Fix test failures on Solaris 10.
110478         * tests/test-pipe-filter-ii1.sh: Determine the filename of a working
110479         'tr' program and pass it as first argument.
110480         * tests/test-pipe-filter-gi1.sh: Likewise.
110481         * tests/test-pipe-filter-ii1.c (main): Except the filename of a 'tr'
110482         program as first argument.
110483         * tests/test-pipe-filter-gi1.c (main): Likewise.
110485 2009-08-16  Eric Blake  <ebb9@byu.net>
110487         fpurge: fix previous commits
110488         * modules/fpurge (Makefile.am): Make replacement conditional,
110489         partially reverting 2007-04-29 change; missed in previous
110490         attempt.
110491         * m4/fpurge.m4 (gl_FUNC_FPURGE): Also compile fpurge.c when fpurge
110492         is missing.
110494 2009-08-16  Bruno Haible  <bruno@clisp.org>
110496         Clarify fpurge's effect on the file position.
110497         * lib/stdio.in.h (fpurge): Specify the file position after fpurge.
110498         * tests/test-fpurge.c (main): Make a second pass for checking the file
110499         position.
110501 2009-08-16  Bruno Haible  <bruno@clisp.org>
110503         * m4/fpurge.m4 (gl_FUNC_FPURGE): Don't compile fpurge.c if only the
110504         declaration of fpurge is missing.
110505         * tests/test-fpurge.c (main): Check that the file has not more contents
110506         than expected. Close the file before removing it.
110508 2009-08-15  Eric Blake  <ebb9@byu.net>
110510         fpurge: don't wrap working cygwin implementation
110511         * lib/fpurge.c (fpurge): Fix comment typo.
110512         * m4/fpurge.m4 (gl_FUNC_FPURGE): Detect BSD bug, allowing cygwin
110513         1.7 to avoid replacement.
110514         * tests/test-fpurge.c (main): Enhance test.
110516 2009-08-15  Eric Blake  <ebb9@byu.net>
110517         and Jim Meyering  <meyering@redhat.com>
110519         test-update-copyright: skip if perl is insufficient
110520         * tests/test-update-copyright.sh: Failure to run maintainer tool
110521         should not cause testsuite failure on cygwin 1.5.
110523 2009-08-14  Eric Blake  <ebb9@byu.net>
110525         doc: mention more functions added in cygwin 1.7.0
110526         * doc/posix-headers/limits.texi (limits.h): Update for recent
110527         cygwin additions.
110528         * doc/posix-headers/wordexp.texi (wordexp.h): Likewise.
110529         * doc/posix-functions/wordexp.texi (wordexp): Likewise.
110530         * doc/posix-functions/wordfree.texi (wordfree): Likewise.
110531         * doc/posix-functions/setlocale.texi (setlocale): Likewise.
110532         * doc/posix-functions/nl_langinfo.texi (nl_langinfo): Likewise.
110534 2009-08-14  Eric Blake  <ebb9@byu.net>
110536         maint.mk: simplify update-copyright rule
110537         * top/maint.mk (update-copyright-local): Delete, and document how
110538         to do it in cfg.mk instead.
110539         (update-copyright-exclude-regexp): Delete, and document how to do
110540         it in .x-update-copyright instead.
110541         (update-copyright): Simplify, thanks to VC_LIST_EXCEPT.  Don't
110542         exclude ChangeLog.
110544 2009-08-14  Bruno Haible  <bruno@clisp.org>
110546         * m4/wchar.m4 (gl_WCHAR_H): Undo invalid optimization in last commit.
110548 2009-08-14  Joel E. Denny  <jdenny@clemson.edu>
110550         maint.mk: support update-copyright-env
110551         * top/maint.mk (update-copyright-env): Define place-holder.
110552         (update-copyright): Expand $(update-copyright-env) before
110553         invoking update-copyright.
110555 2009-08-14  Joel E. Denny  <jdenny@clemson.edu>
110557         update-copyright: implement forced reformatting
110558         * build-aux/update-copyright: Implement and document
110559         UPDATE_COPYRIGHT_FORCE.
110560         * tests/test-update-copyright.sh: Test it.
110562 2009-08-14  Eric Blake  <ebb9@byu.net>
110563         and Bruno Haible  <bruno@clisp.org>
110565         stddef: fix NetBSD 5.0 NULL bug, rather than working around it
110566         * tests/test-locale.c: Revert previous patch related to NULL.
110567         * tests/test-stdio.c: Likewise.
110568         * tests/test-stdlib.c: Likewise.
110569         * tests/test-string.c: Likewise.
110570         * tests/test-unistd.c: Likewise.
110571         * modules/time-tests (Depends-on): Add verify.
110572         * modules/wchar-tests (Depends-on): Likewise.
110573         * tests/test-time.c: Test for NULL compliance.
110574         * tests/test-wchar.c: Likewise.
110575         * modules/locale (Depends-on): Add stddef.
110576         * modules/stdio (Depends-on): Likewise.
110577         * modules/stdlib (Depends-on): Likewise.
110578         * modules/string (Depends-on): Likewise.
110579         * modules/time (Depends-on): Likewise.
110580         * modules/unistd (Depends-on): Likewise.
110581         * modules/wchar (Depends-on): Likewise.
110582         * lib/locale.in.h (includes): Use <stddef.h> to fix NULL.
110583         * lib/stdlib.in.h (includes): Likewise.
110584         * lib/string.in.h (includes): Likewise.
110585         * lib/time.in.h (includes): Likewise.
110586         * lib/unistd.in.h (includes): Likewise.
110587         * m4/locale_h.m4 (gl_LOCALE_H): Replace locale.h if stddef.h was
110588         replaced.
110589         * m4/wchar.m4 (gl_WCHAR_H): Likewise.
110590         * m4/stddef_h.m4: New file.
110591         * modules/stddef: Likewise.
110592         * lib/stddef.in.h: Likewise.
110593         * modules/stddef-tests: Likewise.
110594         * tests/test-stddef.c: Likewise.
110595         * MODULES.html.sh (Basic types <stddef.h>): Mention new module.
110596         * doc/posix-headers/stddef.texi (stddef.h): Document the bug.
110597         * doc/posix-headers/locale.texi (locale.h): Likewise.
110598         * doc/posix-headers/stdio.texi (stdio.h): Likewise.
110599         * doc/posix-headers/stdlib.texi (stdlib.h): Likewise.
110600         * doc/posix-headers/string.texi (string.h): Likewise.
110601         * doc/posix-headers/time.texi (time.h): Likewise.
110602         * doc/posix-headers/unistd.texi (unistd.h): Likewise.
110603         * doc/posix-headers/wchar.texi (wchar.h): Likewise.
110605 2009-08-14  Eric Blake  <ebb9@byu.net>
110607         doc: improve git diff of texinfo files
110608         * .gitattributes: Add rule for *.texi files, with hint on how to
110609         use it.
110610         Copied from m4, and based on a report by Bruno Haible.
110612 2009-08-14  Bruno Haible  <bruno@clisp.org>
110614         Disable multithread support by default on Cygwin 1.5.x for real.
110615         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Fix last commit.
110617 2009-08-14  Joel E. Denny  <jdenny@clemson.edu>
110619         update-copyright: much ado about intervals
110620         * build-aux/update-copyright: Implement and document
110621         UPDATE_COPYRIGHT_USE_INTERVALS to control expansion and collapse
110622         of copyright year intervals.
110623         Also, document UPDATE_COPYRIGHT_YEAR.
110624         * tests/test-update-copyright.sh: Test it.
110626         update-copyright: convert 2-digit to 4-digit years
110627         * build-aux/update-copyright: Implement and document.
110628         * tests/test-update-copyright.sh: Update.
110630 2009-08-14  Jim Meyering  <meyering@redhat.com>
110632         test-exclude: avoid coreutils "make check" failure
110633         * tests/test-exclude.c (ARGMATCH_DIE_DECL) [ARGMATCH_DIE_DECL]: Define,
110634         just as in test-argmatch.c.
110636 2009-08-13  Eric Blake  <ebb9@byu.net>
110638         test-dup2: fix bad assumption
110639         * tests/test-dup2.c (main): Tolerate leaked fds from environment.
110640         Reported by Peter Breitenlohner <peb@mppmu.mpg.de>.
110642         test-version-etc: fix CRLF portability issue
110643         * tests/test-version-etc.sh: Use tr, not sed, as not all sed
110644         recognize \r.
110645         * tests/test-argp-version-etc-1.sh: Likewise.
110647         getopt: update client modules
110648         * modules/argp (Depends-on): Use getopt-gnu.
110649         * modules/git-merge-changelog (Depends-on): Likewise.
110650         * modules/long-options (Depends-on): Likewise.
110651         * modules/xstrtol (Depends-on): Likewise.
110653 2009-08-13  Simon Josefsson  <simon@josefsson.org>
110655         * tests/test-version-etc.sh: Don't fail on different
110656         project/version.  Don't fail on CRLF differences.  Rewrite to use
110657         multiple -e instead of multiple sed forks, suggested by Eric Blake
110658         <ebb9@byu.net>.
110659         * tests/test-argp-version-etc-1.sh: Likewise.
110661 2009-08-13  Simon Josefsson  <simon@josefsson.org>
110663         * tests/test-version-etc.sh: Don't fail on different
110664         project/version.
110666 2009-08-12  Bruno Haible  <bruno@clisp.org>
110668         Tests for modules 'getopt-posix', 'getopt-gnu'.
110669         * modules/getopt-posix-tests: New file.
110670         * tests/test-getopt.c: New file.
110671         * tests/test-getopt.h: New file.
110672         * tests/test-getopt_long.h: New file.
110674         New modules 'getopt-posix', 'getopt-gnu'.
110675         * modules/getopt-gnu: New file, renamed from modules/getopt.
110676         * modules/getopt-posix: New file.
110677         * modules/getopt: Turn into an obsolete alias for getopt-gnu.
110678         * m4/getopt.m4 (gl_FUNC_GETOPT_POSIX, gl_FUNC_GETOPT_GNU): New macros.
110679         (gl_GETOPT): Remove macro.
110680         (gl_GETOPT_CHECK_HEADERS): Do some checks only for gl_FUNC_GETOPT_GNU.
110681         Disable the test against BSD systems that declare optreset. Test
110682         against mingw bug. Test against lack of support of optional arguments
110683         on many platforms.
110684         * doc/glibc-headers/getopt.texi: Update module name and list of
110685         relevant platforms.
110686         * doc/posix-functions/getopt.texi: Mention modules 'getopt-posix' and
110687         'getopt-gnu' and more portability problems.
110688         * NEWS: Mention the changes.
110690 2009-08-12  Bruno Haible  <bruno@clisp.org>
110692         Ensure that optarg etc. get declared by <unistd.h>.
110693         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Require
110694         AC_USE_SYSTEM_EXTENSIONS.
110695         * modules/getopt (Depends-on): Add 'extensions'.
110697 2009-08-12  Bruno Haible  <bruno@clisp.org>
110699         Avoid test link errors.
110700         * modules/pipe-filter-ii-tests (Makefile.am): Define
110701         test_pipe_filter_ii1_LDADD and test_pipe_filter_ii2_main_LDADD.
110702         * modules/pipe-filter-gi-tests (Makefile.am): Define
110703         test_pipe_filter_gi1_LDADD and test_pipe_filter_gi2_main_LDADD.
110704         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
110706 2009-08-12  Bruno Haible  <bruno@clisp.org>
110708         * m4/getopt.m4 (gl_REPLACE_GETOPT): New macro, was called
110709         gl_GETOPT_SUBSTITUTE before.
110710         (gl_GETOPT): Use it.
110711         * m4/argp.m4 (gl_ARGP): Update.
110712         Reported by Sergey Poznyakoff.
110714         * m4/getopt.m4: Reorder macros.
110715         (gl_GETOPT): Inline gl_GETOPT_SUBSTITUTE.
110716         (gl_GETOPT_SUBSTITUTE): Remove macro.
110718 2009-08-12  Sergey Poznyakoff  <gray@gnu.org.ua>
110720         Minor improvement in gitlog-to-changelog
110722         * build-aux/gitlog-to-changelog: New option `--format' makes
110723         output format string configurable.
110725 2009-08-12  Sergey Poznyakoff  <gray@gnu.org.ua>
110727         Optimize exclude: use hash tables for non-wildcard patterns.
110729         * lib/exclude.c: Include hash.h and mbuiter.h
110730         (struct exclude_pattern, exclude_segment): New data types.
110731         (struct exclude): Rewrite.
110732         (fnmatch_pattern_has_wildcards): New function.
110733         (new_exclude_segment, free_exclude_segment): New functions.
110734         (excluded_file_pattern_p, excluded_file_name_p): New functions.
110735         (excluded_file_name, add_exclude): Rewrite using new struct exclude.
110736         * lib/exclude.h (is_fnmatch_pattern): New prototype.
110737         * modules/exclude: Depend on hash and mbuiter.
110739         * modules/exclude-tests: New file.
110740         * tests/test-exclude.c: New file.
110741         * tests/test-exclude1.sh: New file.
110742         * tests/test-exclude2.sh: New file.
110743         * tests/test-exclude3.sh: New file.
110744         * tests/test-exclude4.sh: New file.
110745         * tests/test-exclude5.sh: New file.
110746         * tests/test-exclude6.sh: New file.
110747         * tests/test-exclude7.sh: New file.
110749 2009-08-12  Bruno Haible  <bruno@clisp.org>
110751         Ensure that getopt() gets declared by <unistd.h>.
110752         * lib/unistd.in.h: Conditionally include getopt.h.
110753         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Require gl_UNISTD_H_DEFAULTS.
110754         Set GNULIB_UNISTD_H_GETOPT.
110755         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
110756         GNULIB_UNISTD_H_GETOPT.
110757         * modules/unistd (Makefile.am): Substitute GNULIB_UNISTD_H_GETOPT.
110759 2009-08-12  Bruno Haible  <bruno@clisp.org>
110761         Clarify logic.
110762         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS, gl_GETOPT_IFELSE): Use
110763         gl_replace_getopt instead of GETOPT_H.
110765 2009-08-12  Bruno Haible  <bruno@clisp.org>
110767         * m4/getopt.m4: Add comments.
110769 2009-08-12  Bruno Haible  <bruno@clisp.org>
110771         Disable multithread support by default on Cygwin 1.5.x.
110772         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): On Cygwin 1.5.x and older,
110773         set gl_use_threads=no if not specified otherwise.
110775 2009-08-11  Bruno Haible  <bruno@clisp.org>
110777         Avoid compilation error on NetBSD 5.0.
110778         * tests/test-locale.c: Write sizeof (NULL) instead of sizeof NULL.
110779         * tests/test-stdio.c: Likewise.
110780         * tests/test-stdlib.c: Likewise.
110781         * tests/test-string.c: Likewise.
110782         * tests/test-unistd.c: Likewise.
110783         Reported by Greg Troxel <gdt@ir.bbn.com>
110784         at <https://savannah.gnu.org/support/?106973>.
110786 2009-08-11  Bruno Haible  <bruno@clisp.org>
110788         * modules/dup2-tests (Depends-on): Remove close.
110790         Undo 2009-07-19 commit.
110791         * modules/acl-tests (Depends-on): Remove close.
110792         * modules/binary-io-tests (Depends-on): Likewise.
110793         * modules/closein-tests (Depends-on): Likewise.
110794         * modules/flock-tests (Depends-on): Likewise.
110795         * modules/fsync-tests (Depends-on): Likewise.
110796         * modules/lseek-tests (Depends-on): Likewise.
110797         * modules/pipe-tests (Depends-on): Likewise.
110798         * modules/posix_spawn-tests (Depends-on): Likewise.
110799         * modules/posix_spawnp-tests (Depends-on): Likewise.
110800         * modules/stat-time-tests (Depends-on): Likewise.
110801         * modules/yesno-tests (Depends-on): Likewise.
110803 2009-08-10  Bruno Haible  <bruno@clisp.org>
110805         * lib/vasnprintf.c (DCHAR_SET): Undefine at the end.
110807 2009-08-10  Bruno Haible  <bruno@clisp.org>
110809         Fix a gcc warning.
110810         * lib/write.c (rpl_write): Cast result of _get_osfhandle.
110812 2009-08-10  Bruno Haible  <bruno@clisp.org>
110814         Don't optimize AC_LIBOBJs, as they may appear in different contexts.
110815         * m4/close.m4 (gl_REPLACE_CLOSE): Execute AC_LIBOBJ unconditionally,
110816         not only the first time.
110817         * m4/fclose.m4 (gl_REPLACE_FCLOSE): Likewise.
110818         * m4/open.m4 (gl_REPLACE_OPEN): Likewise.
110819         * m4/strstr.m4 (gl_FUNC_STRSTR): Execute AC_LIBOBJ when REPLACE_STRSTR
110820         is 1, not only the first time.
110822 2009-08-10  Bruno Haible  <bruno@clisp.org>
110824         Make it possible to use module 'gethostname' without module 'close'.
110825         * lib/unistd.in.h (close): Evoke a link error only if
110826         UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS is set.
110827         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
110828         UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS.
110829         * modules/unistd (Makefile.am): Substitute
110830         UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS.
110831         * lib/sys_ioctl.in.h (ioctl): Evoke a link error only if
110832         SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS is set.
110833         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H_DEFAULTS): Initialize
110834         SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS.
110835         * modules/sys_ioctl (Makefile.am): Substitute
110836         SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS.
110837         * modules/socket (configure.ac): On native Windows, set
110838         UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS and
110839         SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS.
110840         Reported by Sam Steingold <sds@gnu.org>.
110842 2009-08-10  Bruno Haible  <bruno@clisp.org>
110844         * m4/close.m4 (gl_FUNC_CLOSE): Add comment.
110845         * modules/ioctl (configure.ac): Likewise.
110847 2009-08-10  Bruno Haible  <bruno@clisp.org>
110849         Avoid collision between gnulib wrapper and libintl wrapper.
110850         * lib/stdio-write.c (printf): Don't define if a printf wrapper is
110851         already defined in intl/printf.c.
110852         (vprintf): Test REPLACE_VPRINTF_POSIX, not REPLACE_VFPRINTF_POSIX.
110853         (vfprintf): Test REPLACE_VFPRINTF_POSIX, not REPLACE_VPRINTF_POSIX.
110855 2009-08-09  Bruno Haible  <bruno@clisp.org>
110857         Make <sys/select.h> really self-contained, also on Solaris 10.
110858         * lib/sys_select.in.h: Include <string.h>.
110859         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Test also against
110860         Solaris 10 problem.
110861         * tests/test-sys_select.c (main): Add check that FD_ZERO can be used.
110862         * doc/posix-headers/sys_select.texi: Mention the Solaris 10 problem.
110863         Reported by Jim Meyering.
110865 2009-08-09  Bruno Haible  <bruno@clisp.org>
110867         Avoid warnings from 'aclocal' that are due to a use of macro name
110868         AM_XGETTEXT_OPTION that is not defined in automake.
110869         * modules/argp (configure.ac): Hide use of AM_XGETTEXT_OPTION from
110870         automake.
110871         * modules/error (configure.ac): Likewise.
110872         * modules/propername (configure.ac): Likewise.
110873         * modules/vasprintf (configure.ac): Likewise.
110874         * modules/verror (configure.ac): Likewise.
110875         * modules/xprintf (configure.ac): Likewise.
110876         * modules/xvasprintf (configure.ac): Likewise.
110878 2009-08-08  Bruno Haible  <bruno@clisp.org>
110880         Avoid compilation error in C++ mode.
110881         * lib/gettimeofday.c (rpl_gettimeofday): Cast timezone argument.
110882         Reported by Sam Steingold <sds@gnu.org>.
110884 2009-08-08  Bruno Haible  <bruno@clisp.org>
110886         * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): Define HOST_NAME_MAX also
110887         for the various Unix platforms.
110888         * doc/posix-headers/limits.texi: Update platforms list regarding
110889         HOST_NAME_MAX.
110890         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
110892 2009-08-07  Jim Meyering  <meyering@redhat.com>
110894         selinux-at: fix typo in a comment
110895         * lib/selinux-at.h: s/getfileconat/getfilecon/ in a comment.
110896         Spotted by Paolo Bonzini.
110898         selinux-at: remove redundant m4 code, add documentation
110899         * modules/selinux-at (configure.ac): Remove redundant code.
110900         LIB_SELINUX is already set via the dependent module, selinux-h.
110901         (Include): Add quotes around selinux-at.h.
110902         * lib/selinux-at.h: Add documentation.
110903         Reported by Bruno Haible in
110904         http://marc.info/?l=gnulib-bug&m=124958988300749
110906 2009-08-07  Bruno Haible  <bruno@clisp.org>
110908         Avoid link error on MacOS X 10.3 and 10.4.
110909         * lib/argp-ba.c (argp_program_bug_address): Explicitly zero-initialize
110910         on non-ELF systems.
110911         * lib/argp-pv.c (argp_program_version): Likewise.
110912         Reported by Simon Josefsson.
110914 2009-08-07  Simon Josefsson  <simon@josefsson.org>
110916         * tests/test-version-etc.sh: Use $EXEEXT.
110918 2009-08-06  Joel E. Denny  <jdenny@clemson.edu>
110920         update-copyright: update documentation to point to maint.mk
110921         * build-aux/update-copyright: Here.
110923 2009-08-06  Jim Meyering  <meyering@redhat.com>
110925         maint.mk: support update-copyright-local
110926         * top/maint.mk (update-copyright-local): Define place-holder.
110927         (update-copyright): Depend on $(update-copyright-local).
110929 2009-08-06  Jim Meyering  <meyering@redhat.com>
110931         selinux-at: new module
110932         Initially written for coreutils, this module will soon be
110933         used by findutils, too.
110934         * MODULES.html.sh [Misc]: Add selinux-at.
110935         * lib/selinux-at.h: New file, from coreutils.
110936         * lib/selinux-at.c: Likewise.
110937         * modules/selinux-at: Likewise.
110938         (License): Change from LGPL to GPL, since it depends
110939         on the GPL'd openat module.
110941         doc: update README
110942         * README: Remove references to cogito.
110943         Remove cvs-repo-updating instructions from 2007.
110944         Don't imply that CVS is better if you have limited disk space.
110946 2009-08-05  Joel E. Denny  <jdenny@clemson.edu>
110948         update-copyright: support C-style comments
110949         * build-aux/update-copyright: Implement and document.
110950         * tests/test-update-copyright.sh: Test.
110952 2009-08-05  Joel E. Denny  <jdenny@clemson.edu>
110954         update-copyright: support omitted "(C)"
110955         * build-aux/update-copyright: Implement and document.  Also,
110956         allow variable whitespace before "(C)".
110957         * tests/test-update-copyright.sh: Test.
110959 2009-08-05  Joel E. Denny  <jdenny@clemson.edu>
110961         update-copyright: don't trip on non-FSF copyright statements
110962         * build-aux/update-copyright: Fix so that the first correctly
110963         formatted FSF copyright statement is recognized no matter what
110964         appears before it.  Update documentation.
110965         * tests/test-update-copyright.sh: Test that.
110967 2009-08-05  Joel E. Denny  <jdenny@clemson.edu>
110969         update-copyright: clean up code a little
110970         * build-aux/update-copyright: Append "_re" to the name of any
110971         variable holding a regular expression.
110972         Replace "old" and "new" with "stmt" in variable names.
110973         Do not accept 2-digit UPDATE_COPYRIGHT_YEAR, which was not
110974         handled correctly.
110975         Format code more consistently.
110977 2009-08-05  Joel E. Denny  <jdenny@clemson.edu>
110979         update-copyright-tests: improve portability
110980         * tests/test-update-copyright.sh: Use cmp if diff cannot handle
110981         -u or /dev/null.  Suggested by Jim Meyering and Eric Blake.
110983 2009-08-03  Joel E. Denny  <jdenny@clemson.edu>
110985         update-copyright: support @copyright{} and &copy;
110986         * build-aux/update-copyright: Implement and document.
110987         * tests/test-update-copyright.sh: Test.
110989 2009-08-04  Jim Meyering  <meyering@redhat.com>
110991         update-copyright-tests: correctly test EOL=\r\n handling
110992         * tests/test-update-copyright.sh: Put \r at the end of some lines
110993         for the dos-eol tests.  Based on a patch by Joel E. Denny.
110995         maint.mk: make update-copyright exclusion list more configurable
110996         * top/maint.mk (update-copyright): Default to excluding COPYING,
110997         but allow an override, in case someone does want to update that file.
110999         maint.mk: don't update copyright date in COPYING
111000         * top/maint.mk (update-copyright): Exclude COPYING.
111002         maint.mk: add a copyright-updating rule
111003         * top/maint.mk (update-copyright): New rule.
111004         Derived from coreutils/Makefile.am.
111006         update-copyright: rename some variables
111007         * build-aux/update-copyright: Rename a few variables for clarity.
111008         Tweak syntax.  List Joel E. Denny as coauthor.
111010 2009-08-03  Joel E. Denny  <jdenny@clemson.edu>
111012         update-copyright: fix bug for 2-digit last year and add tests
111013         * build-aux/update-copyright: Fix bug.
111014         Use UPDATE_COPYRIGHT_YEAR from environment as current year if
111015         specified.
111016         * modules/update-copyright-tests: New
111017         * tests/test-update-copyright.sh: New.
111019 2009-07-31  Joel E. Denny  <jdenny@clemson.edu>
111021         update-copyright: handle leading tabs in line prefix
111022         * build-aux/update-copyright: Count leading tabs as 8 spaces
111023         when computing margin.  This helps with the formatting of
111024         ChangeLogs, for example.
111025         Fix documentation a little.
111027 2009-07-31  Joel E. Denny  <jdenny@clemson.edu>
111029         update-copyright: support EOL=\r\n
111030         * build-aux/update-copyright: Implement that.
111032 2009-07-31  Joel E. Denny  <jdenny@clemson.edu>
111034         update-copyright: automatically format copyright statements
111035         * build-aux/update-copyright: Implement that.
111036         Also, be a little more predictable and safer by always failing
111037         when the full copyright format is not perfectly recognized as an
111038         unbroken whole.  Discussed at
111039         <http://lists.gnu.org/r/bug-gnulib/2009-07/msg00131.html>.
111040         Rewrite documentation.
111042 2009-08-03  Bruno Haible  <bruno@clisp.org>
111044         * m4/iconv.m4 (AM_ICONV): Fix displayed message with autoconf-2.64.
111046 2009-08-02  Bruno Haible  <bruno@clisp.org>
111048         Tests for module 'uname'.
111049         * modules/uname-tests: New file.
111050         * tests/test-uname.c: New file.
111052         New module 'uname'.
111053         * lib/uname.c: New file.
111054         * m4/uname.m4: New file.
111055         * modules/uname: New file.
111056         * doc/posix-functions/uname.texi: Mention the new module.
111058 2009-08-02  Bruno Haible  <bruno@clisp.org>
111060         Tests for module 'sys_utsname'.
111061         * modules/sys_utsname-tests: New file.
111062         * tests/test-sys_utsname.c: New file.
111064         New module 'sys_utsname'.
111065         * lib/sys_utsname.in.h: New file, based on glibc's <sys/utsname.h>.
111066         * m4/sys_utsname_h.m4: New file.
111067         * modules/sys_utsname: New file.
111068         * doc/posix-headers/sys_utsname.texi: Mention the new module.
111070 2009-08-02  Bruno Haible  <bruno@clisp.org>
111072         Implicitly initialize the sockets library.
111073         * lib/gethostname.c: Include sockets.h.
111074         (rpl_gethostname): Invoke gl_sockets_startup.
111075         * lib/socket.c: Include sockets.h.
111076         (rpl_socket): Invoke gl_sockets_startup.
111077         * modules/gethostname (Depends-on): Add sockets.
111078         * modules/socket (Depends-on): Likewise.
111079         * tests/test-poll.c: Don't include sockets.h.
111080         (main): Don't invoke gl_sockets_startup.
111081         * tests/test-select.c: Don't include sockets.h.
111082         (main): Don't invoke gl_sockets_startup.
111084 2009-08-02  Bruno Haible  <bruno@clisp.org>
111086         Allow multiple calls to gl_sockets_startup.
111087         * lib/sockets.c (initialized_sockets_version): New variable.
111088         (gl_sockets_startup): Do nothing if already called for this or a higher
111089         version.
111090         (gl_sockets_cleanup): Reset initialized_sockets_version.
111092 2009-08-03  Simon Josefsson  <simon@josefsson.org>
111094         * tests/test-argp-version-etc-1.sh: Use EXEEXT.  Don't fail on
111095         different project/version.
111097 2009-08-02  Paolo Bonzini  <bonzini@gnu.org>
111098             Bruno Haible  <bruno@clisp.org>
111100         Tests for module 'pipe-filter-gi'.
111101         * modules/pipe-filter-gi-tests: New file.
111102         * tests/test-pipe-filter-gi1.sh: New file.
111103         * tests/test-pipe-filter-gi1.c: New file.
111104         * tests/test-pipe-filter-gi2.sh: New file.
111105         * tests/test-pipe-filter-gi2-main.c: New file.
111106         * tests/test-pipe-filter-gi2-child.c: New file.
111108         New module 'pipe-filter-gi'.
111109         * lib/pipe-filter-gi.c: New file.
111110         * modules/pipe-filter-gi: New file.
111112 2009-08-02  Bruno Haible  <bruno@clisp.org>
111113             Paolo Bonzini  <bonzini@gnu.org>
111115         Tests for module 'pipe-filter-ii'.
111116         * modules/pipe-filter-ii-tests: New file.
111117         * tests/test-pipe-filter-ii1.sh: New file.
111118         * tests/test-pipe-filter-ii1.c: New file.
111119         * tests/test-pipe-filter-ii2.sh: New file.
111120         * tests/test-pipe-filter-ii2-main.c: New file.
111121         * tests/test-pipe-filter-ii2-child.c: New file.
111123         New module 'pipe-filter-ii'.
111124         * lib/pipe-filter.h: New file.
111125         * lib/pipe-filter-ii.c: New file.
111126         * lib/pipe-filter-aux.h: New file.
111127         * modules/pipe-filter-ii: New file.
111129 2009-08-02  Simon Josefsson  <simon@josefsson.org>
111131         * lib/gc-libgcrypt.c: Change copyright to FSF.
111132         * lib/gc-gnulib.c: Likewise.
111134 2009-08-02  Martin Lambers  <marlam@marlam.de>  (tiny change)
111136         * lib/gethostname.c: Include limits.h.
111138 2009-08-02  Simon Josefsson  <simon@josefsson.org>
111139             Bruno Haible  <bruno@clisp.org>
111141         Ensure HOST_NAME_MAX as part of the gethostname module.
111142         * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): On native Windows platforms,
111143         define also HOST_NAME_MAX.
111144         * tests/test-gethostname.c: Include <limits.h>.
111145         (main): Check also HOST_NAME_MAX.
111146         * doc/posix-headers/limits.texi: Document the mingw problem.
111148 2009-08-02  Bruno Haible  <bruno@clisp.org>
111150         * lib/gethostname.c (gethostname): Fix handling of large len argument.
111151         Add comments.
111153 2009-03-31  Simon Josefsson  <simon@josefsson.org>
111155         * lib/gethostname.c: Add Windows wrapper.
111156         * m4/gethostname.m4: Look for gethostname in -lws2_32.
111157         * modules/gethostname: Depend on sys_socket & errno, for also
111158         added lib/w32sock.h.  Add GETHOSTNAME_LIB link directive.
111159         * modules/gethostname-tests: Link to @GETHOSTNAME_LIB@.
111161 2009-07-31  Jim Meyering  <meyering@redhat.com>
111163         getloadavg: fix symbol name in comment
111164         * lib/getloadavg.c: Correct a typo I introduced when adding
111165         comments to Matt's change: s/NLIST_POINTER/N_NAME_POINTER/.
111166         Matt Kraai spotted the problem.
111168 2009-07-29  Matt Kraai  <mkraai@beckman.com>
111170         getloadavg: check whether n_name is a pointer, for QNX 6.4.1
111171         * lib/getloadavg.c (getloadavg): Use the strcpy-into-nlist.n_name
111172         code also if ! defined N_NAME_POINTER.
111173         * m4/getloadavg.m4 (gl_GETLOADAVG): Add a link-test for N_NAME_POINTER.
111174         This is required on QNX 6.4.1, where /usr/include/nlist.h exists,
111175         but the n_name member is a 12-byte array.
111177 2009-07-29  Joel E. Denny  <jdenny@clemson.edu>
111179         update-copyright: generalize comment handling
111180         * build-aux/update-copyright: Handle copyright statements
111181         within more comment styles.
111182         Document usage.
111183         Report any file with an external copyright holder or parse failure.
111185 2009-07-29  Jim Meyering  <meyering@redhat.com>
111187         mktime: correct setting of REPLACE_MKTIME
111188         * m4/mktime.m4 (gl_FUNC_MKTIME): Set REPLACE_MKTIME=0, when required.
111190         update-copyright: new module
111191         * modules/update-copyright: New file.
111192         * build-aux/update-copyright: New file.
111193         * MODULES.html.sh (maint+release support): Add update-copyright.
111195 2009-07-27  Bruno Haible  <bruno@clisp.org>
111197         Fix compilation error when <ctime> is used and mktime is replaced.
111198         * lib/time.in.h (mktime): New declaration.
111199         * m4/mktime.m4 (gl_FUNC_MKTIME): Require gl_HEADER_TIME_H_DEFAULTS. Set
111200         REPLACE_MKTIME instead of defining mktime in config.h.
111201         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize REPLACE_MKTIME.
111202         * modules/time (Makefile.am): Substitute REPLACE_MKTIME.
111203         Reported by Ross McFarland <rwmcfa1@neces.com>.
111205 2009-07-27  Bruno Haible  <bruno@clisp.org>
111207         * lib/math.in.h (cosl, logl, sinl): Undefine before declaring it.
111208         Reported by Matt Kraai <mkraai@beckman.com>.
111210 2009-07-25  Jim Meyering  <meyering@redhat.com>
111212         maint.mk: avoid warnings about missing files
111213         * top/maint.mk (PREV_VERSION): Suppress stderr, to hide a
111214         diagnostic when .prev-version does not exist.
111215         (_cfg_mk): Define, so it can be empty when cfg.mk does not exist.
111216         (syntax-check-rules): Use $(_cfg_mk) to avoid a diagnostic about
111217         nonexistent cfg.mk.
111218         Suggestions from Simon Josefsson.
111220 2009-07-25  Bruno Haible  <bruno@clisp.org>
111222         * lib/math.in.h (cosl, logl, sinl): Don't declare if they are already
111223         defined as macros. Needed on QNX 6.4.1.
111224         Reported by Matt Kraai <mkraai@beckman.com>.
111226 2009-07-23  Jim Meyering  <meyering@redhat.com>
111228         maint.mk: invoke "make dist" with a working value of XZ_OPT
111229         * top/maint.mk (vc-dist): Use no "-" in the value of XZ_OPT.
111231 2009-07-22  Matt Kraai  <mkraai@beckman.com>  (tiny change)
111233         Make fseeko.c compile on QNX.
111234         * lib/fseeko.c (rpl_fseeko): Use the numerical value of _MWRITE.
111236 2009-07-22  Peter Simons  <simons@cryp.to>
111238         C++: wrap md2,md5,sha1,etc. function declarations in extern "C" scope
111239         * lib/md2.h [__cplusplus]: Wrap declarations in extern "C" scope.
111240         * lib/md4.h: Likewise.
111241         * lib/md5.h: Likewise.
111242         * lib/sha1.h: Likewise.
111243         * lib/sha256.h: Likewise.
111244         * lib/sha512.h: Likewise.
111246         tests-sha1: don't assign literal string to 'char *' variable
111247         * tests/test-sha1.c (main): Declare locals with "const" to match
111248         attributes of the right hand side.
111250 2009-07-21  Eric Blake  <ebb9@byu.net>
111252         dup2: fix more mingw problems
111253         * lib/dup2.c (rpl_dup2) [_WIN32]: Avoid hanging when duplicating
111254         fd to itself.
111255         * doc/posix-functions/dup2.texi (dup2): Document the bug.
111256         * lib/unistd.in.h (dup2) [REPLACE_FCHDIR]: Avoid name collision.
111257         * lib/fchdir.c (dup2): Manage preprocessor macros correctly.
111258         (rpl_dup2_fchdir): Rename from rpl_dup2, and let dup2 module take
111259         care of mingw bugs.
111261 2009-07-21  Jim Meyering  <meyering@redhat.com>
111263         vc-list-files: avoid failure when /bin/sh is dash
111264         * build-aux/vc-list-files: Avoid a shell portability problem with dash.
111265         On some Debian based systems, /bin/sh is a symlink to dash, and running
111266         this command would omit the "/" following each 'tests' prefix:
111267           dash -x build-aux/vc-list-files -C . tests
111268         That is because bash and dash work differently:
111269           $ for i in bash dash; do $i -c 'a=odd; a=ok b=$a; echo '$i' $b'; done
111270           bash ok
111271           dash odd
111273 2009-07-21  Eric Blake  <ebb9@byu.net>
111275         dup2-tests: test previous patch
111276         * modules/dup2-tests: New file.
111277         * tests/test-dup2.c: Likewise.
111278         * tests/test-open.c (main): Avoid unspecified behavior.
111279         * tests/test-pipe.c (child_main): Use dup2 semantics to simplify
111280         test.
111282         dup2: work around mingw and cygwin 1.5 bug
111283         * m4/dup2.m4 (gl_FUNC_DUP2): Detect mingw bug.
111284         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness.
111285         * modules/unistd (Makefile.am): Substitute it.
111286         * lib/unistd.in.h (dup2): Declare the replacement.
111287         * lib/dup2.c (dup2) [REPLACE_DUP2]: Implement it.
111288         * doc/posix-functions/dup2.texi (dup2): Document the bugs.
111289         * lib/fchdir.c (rpl_dup2): Don't collide with mingw replacement.
111290         * modules/execute (Depends-on): Add dup2.
111291         * modules/fseterr (Depends-on): Likewise.
111292         * modules/pipe (Depends-on): Likewise.
111293         * modules/posix_spawn-internal (Depends-on): Likewise.
111295 2009-07-21  Bruno Haible  <bruno@clisp.org>
111297         * modules/.gitattributes: New file.
111299 2009-07-20  Bruno Haible  <bruno@clisp.org>
111301         * tests/test-pipe.c (BACKUP_STDERR_FILENO): New macro.
111302         (main): Use it.
111304 2009-07-20  Eric Blake  <ebb9@byu.net>
111306         test-pipe: make a bit more robust.
111307         * tests/test-pipe.c (myerr): Allow error messages regardless of
111308         what we do to stderr.
111309         (test_pipe): Rearrange to avoid deadlock.
111310         (child_main): Try a larger read, to ensure we avoided deadlock.
111311         * lib/pipe.c (create_pipe) [_WIN32]: Fix comment.
111312         * lib/pipe.h (create_pipe_bidi): Document potential for deadlock
111313         if misused.
111315 2009-07-19  Jim Meyering  <meyering@redhat.com>
111317         fts: avoid false-positive cycle-detection
111318         * lib/fts.c (fts_read): Reinitialize cycle-detection data structures
111319         for each new command line argument.
111321 2009-07-19  Bruno Haible  <bruno@clisp.org>
111323         Fix build error on mingw with the modules sys_select and unistd.
111324         * modules/acl-tests (Depends-on): Add close.
111325         * modules/binary-io-tests (Depends-on): Likewise.
111326         * modules/closein-tests (Depends-on): Likewise.
111327         * modules/flock-tests (Depends-on): Likewise.
111328         * modules/fsync-tests (Depends-on): Likewise.
111329         * modules/lseek-tests (Depends-on): Likewise.
111330         * modules/pipe-tests (Depends-on): Likewise.
111331         * modules/posix_spawn-tests (Depends-on): Likewise.
111332         * modules/posix_spawnp-tests (Depends-on): Likewise.
111333         * modules/stat-time-tests (Depends-on): Likewise.
111334         * modules/yesno-tests (Depends-on): Likewise.
111336 2009-07-19  Bruno Haible  <bruno@clisp.org>
111338         Unify conditionals.
111339         * lib/pipe.h: Detect native Win32 by looking at _WIN32 and __WIN32__
111340         macros, not at the compiler macros.
111341         * lib/pipe.c: Likewise.
111342         * lib/execute.c: Likewise.
111343         * lib/spawni.c: Likewise.
111345 2009-07-19  Bruno Haible  <bruno@clisp.org>
111347         Fix handling of closed stdin/stdout/stderr on mingw.
111348         * lib/w32spawn.h: Include unistd.h.
111349         (dup_noinherit): Return -1 if the old handle is invalid. Allocate new
111350         file descriptor with O_NOINHERIT flag.
111351         (fd_safer_noinherit): New function, based on fd-safer.c.
111352         (dup_safer_noinherit): New function, based on dup-safer.c.
111353         (undup_safer_noinherit): New function.
111354         * lib/execute.c (execute) [WIN32]: Use dup_safer_noinherit instead of
111355         dup_noinherit. Use undup_safer_noinherit instead of dup2 and close.
111356         * lib/pipe.c (create_pipe) [WIN32]: Likewise. Use fd_safer_noinherit
111357         instead of fd_safer.
111358         * tests/test-pipe.c: Include <windows.h>.
111359         (child_main) [WIN32]: Test the handle of STDERR_FILENO, not its close()
111360         result.
111362         * tests/test-pipe.c (child_main, parent_main): New functions, extracted
111363         from main.
111364         (test_pipe): Pass an extra argument for disambiguation.
111365         (main): Invoke parent_main or child_main.
111367         * tests/test-pipe.c (test_pipe): Pass slave_process = true argument
111368         consistently.
111370 2009-07-18  Eric Blake  <ebb9@byu.net>
111372         test-pipe: fix mingw build
111373         * tests/test-pipe.c (main): Avoid fcntl on mingw.
111375 2009-07-18  Bruno Haible  <bruno@clisp.org>
111377         * modules/pipe-tests (Makefile.am): Fix typo.
111379 2009-07-18  Eric Blake  <ebb9@byu.net>
111381         error: fix mingw build
111382         * lib/error.c (error, error_at_line): Avoid fcntl on mingw.
111383         Reported by Bruno Haible.
111385         error: avoid undefined use of stdout
111386         * lib/error.c (error, error_at_line): Check that fd 1 is open
111387         before flushing stdout.  Avoids a crash on cygwin when libsigsegv
111388         is handling faults and the close_stdout module wants to report the
111389         detection of closed stdout as an error.
111391 2009-07-17  Eric Blake  <ebb9@byu.net>
111393         pipe: be robust in face of closed fds
111394         * lib/pipe.c (create_pipe): Closed standard descriptors in parent
111395         should cause child to misbehave.
111396         * modules/pipe-tests: New module.
111397         * tests/test-pipe.c: New file.
111398         * tests/test-pipe.sh: New file.
111399         Reported by Akim Demaille.
111401 2009-07-14  Bruno Haible  <bruno@clisp.org>
111403         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Guess it works on glibc systems.
111404         Reported by anonymous kc.
111406 2009-07-07  Jim Meyering  <meyering@redhat.com>
111408         maint.mk: don't look for translatable strings in *.m4 or *.mk
111409         * top/maint.mk (sc_po_check): Skip *.m4 and *.mk files,
111410         when searching for translatable strings.
111412 2009-07-05  Jim Meyering  <meyering@redhat.com>
111414         remove superfluous parentheses in STREQ definition
111415         * tests/test-argv-iter.c (STREQ): Remove redundant parentheses.
111416         * lib/getugroups.c (STREQ): Likewise.
111417         * lib/fnmatch.c (STREQ): Likewise.
111418         Spotted by Bruno Haible.
111420 2009-07-04  Jim Meyering  <meyering@redhat.com>
111422         argv-iter: new module
111423         * MODULES.html.sh: Add argv-iter.
111424         * lib/argv-iter.c, lib/argv-iter.h: New files.
111425         * modules/argv-iter: New file.
111426         * modules/argv-iter-tests: New file.
111427         * tests/test-argv-iter.c: Test it.
111429 2009-07-04  Bruno Haible  <bruno@clisp.org>
111431         Fix assertion.
111432         * lib/git-merge-changelog.c (compute_mapping): In the case where file1
111433         contains more exact copies of a given entry than file2, leave the extra
111434         copies unpaired rather than aborting.
111435         Reported by Eric Blake.
111437 2009-07-02  Bruno Haible  <bruno@clisp.org>
111439         Speedup git-merge-changelog for git cherry-pick.
111440         * lib/git-merge-changelog.c (struct entries_mapping): New type.
111441         (entries_mapping_get): New function, extracted from compute_mapping.
111442         (entries_mapping_reverse_get): New function.
111443         (compute_mapping): Add a 'full' argument. Return the result in a
111444         'struct entries_mapping'.
111445         (main): Update. Access the mappings through entries_mapping_get.
111446         Reported by Eric Blake.
111448 2009-07-02  Bruno Haible  <bruno@clisp.org>
111450         * lib/git-merge-changelog.c (compute_mapping): Fix determination of
111451         best_i.
111453 2009-07-02  Bruno Haible  <bruno@clisp.org>
111455         Speed up approximate search for matching ChangeLog entries.
111456         * lib/git-merge-changelog.c (entry_fstrcmp): Add a lower_bound
111457         argument. Call fstrcmp_bounded instead of fstrcmp.
111458         (compute_mapping, try_split_merged_entry, main): Update callers.
111460 2009-07-02  Bruno Haible  <bruno@clisp.org>
111462         * lib/git-merge-changelog.c (main): Add comment about git cherry-pick.
111464 2009-06-30  Bruno Haible  <bruno@clisp.org>
111466         Reduce the number of uc_is_cased calls.
111467         * lib/unicase.h (casing_suffix_context_t): Add
111468         'first_char_except_ignorable' field.
111469         * lib/unicase/context.h (SCC_FINAL_SIGMA_MASK): Remove macro.
111470         (SCC_MORE_ABOVE_MASK, SCC_BEFORE_DOT_MASK): Update.
111471         * lib/unicase/empty-suffix-context.c (unicase_empty_suffix_context):
111472         Update initializer.
111473         * lib/unicase/u-casemap.h (FUNC): Don't invoke uc_is_cased on
111474         case-ignorable characters.
111475         * lib/unicase/u-ct-totitle.h (FUNC): Likewise.
111476         * lib/unicase/u-suffix-context.h (FUNC2): Don't call uc_is_cased here.
111477         * modules/unicase/u8-suffix-context (Depends-on): Remove unicase/cased.
111478         * modules/unicase/u16-suffix-context (Depends-on): Likewise.
111479         * modules/unicase/u32-suffix-context (Depends-on): Likewise.
111481 2009-06-30  Bruno Haible  <bruno@clisp.org>
111483         Tests for module 'unicase/ignorable'.
111484         * modules/unicase/ignorable-tests: New file.
111485         * tests/unicase/test-ignorable.c: New file, generated by
111486         gen-uni-tables.
111488         Tests for module 'unicase/cased'.
111489         * modules/unicase/cased-tests: New file.
111490         * tests/unicase/test-cased.c: New file, generated by gen-uni-tables.
111491         * tests/unicase/test-predicate-part1.h: New file, derived from
111492         tests/unictype/test-predicate-part1.h.
111493         * tests/unicase/test-predicate-part2.h: New file, same as
111494         tests/unictype/test-predicate-part2.h.
111496         Fix evaluation of "Before C" condition of FINAL_SIGMA.
111497         * lib/gen-uni-tables.c (is_cased, is_case_ignorable): New functions.
111498         (output_casing_properties): New function.
111499         (main): Call it.
111500         * lib/unicase/cased.h: New file, generated by gen-uni-tables.
111501         * lib/unicase/cased.c: Include unictype/bitmap.h.
111502         (uc_is_cased): Define through a bitmap lookup.
111503         * lib/unicase/ignorable.h: New file, generated by gen-uni-tables.
111504         * lib/unicase/ignorable.c: Include unictype/bitmap.h.
111505         (uc_is_case_ignorable): Define through a bitmap lookup.
111506         * modules/unicase/cased (Files): Add lib/unicase/cased.h,
111507         lib/unictype/bitmap.h.
111508         (Depends-on): Add inline. Clean up.
111509         * modules/unicase/ignorable (Files): Add lib/unicase/ignorable.h,
111510         lib/unictype/bitmap.h.
111511         (Depends-on): Add inline. Clean up.
111512         * tests/unicase/test-u8-tolower.c (main): Add more tests of FINAL_SIGMA
111513         recognition.
111514         * tests/unicase/test-u16-tolower.c (main): Likewise.
111515         * tests/unicase/test-u32-tolower.c (main): Likewise.
111517 2009-06-30  Bruno Haible  <bruno@clisp.org>
111519         * lib/unicase/u8-casemap.c: Don't include uniwbrk.h.
111520         * lib/unicase/u16-casemap.c: Likewise.
111521         * lib/unicase/u32-casemap.c: Likewise.
111523 2009-06-29  Bruno Haible  <bruno@clisp.org>
111525         Define u32_casefold as a wrapper around u32_ct_casefold.
111526         * lib/unicase/u32-casefold.c: Update.
111527         * modules/unicase/u32-casefold (Depends-on): Add
111528         unicase/u32-ct-casefold, unicase/empty-prefix-context,
111529         unicase/empty-suffix-context. Clean up.
111531         Define u16_casefold as a wrapper around u16_ct_casefold.
111532         * lib/unicase/u16-casefold.c: Update.
111533         * modules/unicase/u16-casefold (Depends-on): Add
111534         unicase/u16-ct-casefold, unicase/empty-prefix-context,
111535         unicase/empty-suffix-context. Clean up.
111537         Define u8_casefold as a wrapper around u8_ct_casefold.
111538         * lib/unicase/u-casefold.h (FUNC): Delegate to U_CT_CASEFOLD.
111539         * lib/unicase/u8-casefold.c: Update.
111540         * modules/unicase/u8-casefold (Depends-on): Add unicase/u8-ct-casefold,
111541         unicase/empty-prefix-context, unicase/empty-suffix-context. Clean up.
111543         Define u32_totitle as a wrapper around u32_ct_totitle.
111544         * lib/unicase/u32-totitle.c: Update.
111545         * modules/unicase/u32-totitle (Depends-on): Add unicase/u32-ct-totitle,
111546         unicase/empty-prefix-context, unicase/empty-suffix-context. Clean up.
111548         Define u16_totitle as a wrapper around u16_ct_totitle.
111549         * lib/unicase/u16-totitle.c: Update.
111550         * modules/unicase/u16-totitle (Depends-on): Add unicase/u16-ct-totitle,
111551         unicase/empty-prefix-context, unicase/empty-suffix-context. Clean up.
111553         Define u8_totitle as a wrapper around u8_ct_totitle.
111554         * lib/unicase/u-totitle.h (is_cased, is_case_ignorable): Remove
111555         functions.
111556         (FUNC): Delegate to U_CT_TOTITLE.
111557         * lib/unicase/u8-totitle.c: Update.
111558         * modules/unicase/u8-totitle (Depends-on): Add unicase/u8-ct-totitle,
111559         unicase/empty-prefix-context, unicase/empty-suffix-context. Clean up.
111561         * lib/unicase/u32-tolower.c (u32_tolower): Update u32_casemap
111562         invocation.
111563         * modules/unicase/u32-tolower (Depends-on): Add
111564         unicase/empty-prefix-context, unicase/empty-suffix-context.
111566         * lib/unicase/u16-tolower.c (u16_tolower): Update u16_casemap
111567         invocation.
111568         * modules/unicase/u16-tolower (Depends-on): Add
111569         unicase/empty-prefix-context, unicase/empty-suffix-context.
111571         * lib/unicase/u8-tolower.c (u8_tolower): Update u8_casemap invocation.
111572         * modules/unicase/u8-tolower (Depends-on): Add
111573         unicase/empty-prefix-context, unicase/empty-suffix-context.
111575         * lib/unicase/u32-toupper.c (u32_toupper): Update u32_casemap
111576         invocation.
111577         * modules/unicase/u32-toupper (Depends-on): Add
111578         unicase/empty-prefix-context, unicase/empty-suffix-context.
111580         * lib/unicase/u16-toupper.c (u16_toupper): Update u16_casemap
111581         invocation.
111582         * modules/unicase/u16-toupper (Depends-on): Add
111583         unicase/empty-prefix-context, unicase/empty-suffix-context.
111585         * lib/unicase/u8-toupper.c (u8_toupper): Update u8_casemap invocation.
111586         * modules/unicase/u8-toupper (Depends-on): Add
111587         unicase/empty-prefix-context, unicase/empty-suffix-context.
111589         New module 'unicase/u32-ct-casefold'.
111590         * lib/unicase/u32-ct-casefold.c: New file.
111591         * modules/unicase/u32-ct-casefold: New file.
111593         New module 'unicase/u16-ct-casefold'.
111594         * lib/unicase/u16-ct-casefold.c: New file.
111595         * modules/unicase/u16-ct-casefold: New file.
111597         New module 'unicase/u8-ct-casefold'.
111598         * lib/unicase/u8-ct-casefold.c: New file.
111599         * lib/unicase/u-ct-casefold.h: New file, derived from
111600         lib/unicase/u-casefold.h.
111601         * modules/unicase/u8-ct-casefold: New file.
111603         New module 'unicase/u32-ct-totitle'.
111604         * lib/unicase/u32-ct-totitle.c: New file.
111605         * modules/unicase/u32-ct-totitle: New file.
111607         New module 'unicase/u16-ct-totitle'.
111608         * lib/unicase/u16-ct-totitle.c: New file.
111609         * modules/unicase/u16-ct-totitle: New file.
111611         New module 'unicase/u8-ct-totitle'.
111612         * lib/unicase/u8-ct-totitle.c: New file.
111613         * lib/unicase/u-ct-totitle.h: New file, derived from
111614         lib/unicase/u-totitle.h.
111615         * modules/unicase/u8-ct-totitle: New file.
111617         New module 'unicase/u32-ct-tolower'.
111618         * lib/unicase/u32-ct-tolower.c: New file.
111619         * modules/unicase/u32-ct-tolower: New file.
111621         New module 'unicase/u16-ct-tolower'.
111622         * lib/unicase/u16-ct-tolower.c: New file.
111623         * modules/unicase/u16-ct-tolower: New file.
111625         New module 'unicase/u8-ct-tolower'.
111626         * lib/unicase/u8-ct-tolower.c: New file.
111627         * modules/unicase/u8-ct-tolower: New file.
111629         New module 'unicase/u32-ct-toupper'.
111630         * lib/unicase/u32-ct-toupper.c: New file.
111631         * modules/unicase/u32-ct-toupper: New file.
111633         New module 'unicase/u16-ct-toupper'.
111634         * lib/unicase/u16-ct-toupper.c: New file.
111635         * modules/unicase/u16-ct-toupper: New file.
111637         New module 'unicase/u8-ct-toupper'.
111638         * lib/unicase/u8-ct-toupper.c: New file.
111639         * modules/unicase/u8-ct-toupper: New file.
111641         Add context arguments to u*_casemap functions.
111642         * lib/unicase/unicasemap.h: Include unicase.h.
111643         (u8_casemap, u16_casemap, u32_casemap): Add prefix_context and
111644         suffix_context arguments.
111645         * lib/unicase/u-casemap.h (is_cased, is_case_ignorable): Remove
111646         functions.
111647         (FUNC): Add prefix_context and suffix_context arguments. Use
111648         uc_is_cased and uc_is_case_ignorable.
111649         * lib/unicase/u8-casemap.c: Include caseprop.h and context.h.
111650         * lib/unicase/u16-casemap.c: Likewise.
111651         * lib/unicase/u32-casemap.c: Likewise.
111652         * modules/unicase/u8-casemap (Files): Add lib/unicase/context.h.
111653         (Depends-on): Add unicase/cased, unicase/ignorable. Clean up.
111654         * modules/unicase/u16-casemap (Files): Add lib/unicase/context.h.
111655         (Depends-on): Add unicase/cased, unicase/ignorable. Clean up.
111656         * modules/unicase/u32-casemap (Files): Add lib/unicase/context.h.
111657         (Depends-on): Add unicase/cased, unicase/ignorable. Clean up.
111659         New module 'unicase/u32-suffix-context'.
111660         * lib/unicase/u32-suffix-context.c: New file.
111661         * modules/unicase/u32-suffix-context: New file.
111663         New module 'unicase/u16-suffix-context'.
111664         * lib/unicase/u16-suffix-context.c: New file.
111665         * modules/unicase/u16-suffix-context: New file.
111667         New module 'unicase/u8-suffix-context'.
111668         * lib/unicase/u8-suffix-context.c: New file.
111669         * lib/unicase/u-suffix-context.h: New file.
111670         * modules/unicase/u8-suffix-context: New file.
111672         New module 'unicase/empty-suffix-context'.
111673         * lib/unicase/empty-suffix-context.c: New file.
111674         * modules/unicase/empty-suffix-context: New file.
111676         New module 'unicase/u32-prefix-context'.
111677         * lib/unicase/u32-prefix-context.c: New file.
111678         * modules/unicase/u32-prefix-context: New file.
111680         New module 'unicase/u16-prefix-context'.
111681         * lib/unicase/u16-prefix-context.c: New file.
111682         * modules/unicase/u16-prefix-context: New file.
111684         New module 'unicase/u8-prefix-context'.
111685         * lib/unicase/u8-prefix-context.c: New file.
111686         * lib/unicase/u-prefix-context.h: New file.
111687         * lib/unicase/context.h: New file.
111688         * modules/unicase/u8-prefix-context: New file.
111690         New module 'unicase/empty-prefix-context'.
111691         * lib/unicase/empty-prefix-context.c: New file.
111692         * modules/unicase/empty-prefix-context: New file.
111694         New module 'unicase/ignorable'.
111695         * lib/unicase/ignorable.c: New file.
111696         * modules/unicase/ignorable: New file.
111698         New module 'unicase/cased'.
111699         * lib/unicase/caseprop.h: New file.
111700         * lib/unicase/cased.c: New file.
111701         * modules/unicase/cased: New file.
111703         New functions for case mapping of substrings.
111704         * lib/unicase.h (casing_prefix_context_t): New type.
111705         (unicase_empty_prefix_context): New variable.
111706         (u8_casing_prefix_context, u16_casing_prefix_context,
111707         u32_casing_prefix_context, u8_casing_prefixes_context,
111708         u16_casing_prefixes_context, u32_casing_prefixes_context): New
111709         declarations.
111710         (casing_suffix_context_t): New type.
111711         (unicase_empty_suffix_context): New variable.
111712         (u8_casing_suffix_context, u16_casing_suffix_context,
111713         u32_casing_suffix_context, u8_casing_suffixes_context,
111714         u16_casing_suffixes_context, u32_casing_suffixes_context,
111715         u8_ct_toupper, u16_ct_toupper, u32_ct_toupper, u8_ct_tolower,
111716         u16_ct_tolower, u32_ct_tolower, u8_ct_totitle, u16_ct_totitle,
111717         u32_ct_totitle, u8_ct_casefold, u16_ct_casefold, u32_ct_casefold): New
111718         declarations.
111720 2009-06-28  Jim Meyering  <meyering@redhat.com>
111722         boostrap: indent only with spaces
111723         * build-aux/bootstrap: Indent only with spaces, never TABs.
111725         bootstrap: split long lines
111726         * build-aux/bootstrap: Keep line length < 80.
111728         bootstrap: sync from coreutils
111729         * build-aux/bootstrap: Honor variables like $ACLOCAL, etc.,
111730         just as autoreconf does.  Verify a list of prerequisite
111731         package-name,version-number pairs if defined in bootstrap.conf.
111732         Refer to README-prereq, if prerequisites are not satisfied.
111734 2009-06-27  Eric Blake  <ebb9@byu.net>
111736         tests: add test for bogus NULL definition
111737         * tests/test-stdio.c: Ensure POSIX 2008 requirement on NULL.
111738         * tests/test-stdlib.c: Likewise.
111739         * tests/test-string.c: Likewise.
111740         * tests/test-locale.c: Likewise.
111741         * tests/test-unistd.c: Likewise.
111742         * modules/stdio-tests (Depends-on): Add verify.
111743         * modules/stdlib-tests (Depends-on): Likewise.
111744         * modules/string-tests (Depends-on): Likewise.
111745         * modules/locale-tests (Depends-on): Likewise.
111746         * modules/unistd-tests (Depends-on): Likewise.
111748 2009-06-27  Paolo Bonzini  <bonzini@gnu.org>
111750         * m4/selinux-context-h (gl_HEADERS_SELINUX_CONTEXT_H): Remove
111751         self-explaining comment.
111752         * m4/selinux-selinux-h: Update serial.
111753         (gl_LIBSELINUX): New macro, adding a warning for missing development
111754         packages to code extracted from...
111755         (gl_HEADERS_SELINUX_SELINUX_H): ... this one.  Require gl_LIBSELINUX.
111756         Add warning for missing development packages here, too.
111758 2009-06-26  Paolo Bonzini  <bonzini@gnu.org>
111760         * build-aux/bootstrap: Do not use GIT_CONFIG_LOCAL.
111762 2009-06-25  Eric Blake  <ebb9@byu.net>
111764         version-etc: fix regression
111765         * lib/version-etc.h (ATTRIBUTE_SENTINEL): Define for new enough
111766         gcc.
111767         (version_etc): Use it, to catch bugs with trailing NULL.
111768         * lib/version-etc.c (version_etc_arn): Delete unused argument.
111769         (version_etc_va): Fix logic bug.
111770         * modules/version-etc-tests: Add test.
111771         * tests/test-version-etc.c: New file.
111772         * tests/test-version-etc.sh: Likewise.
111774 2009-06-25  Sam Steingold  <sds@gnu.org>
111776         * mbrtowc.m4 (gl_MBRTOWC_SANITYCHECK): Include <stdlib.h>, for the
111777         mbtowc declaration.
111779 2009-06-25  Eric Blake  <ebb9@byu.net>
111781         fpurge: migrate into <stdio.h>
111782         * lib/fpurge.h: Delete...
111783         * lib/stdio.in.h (fpurge): ...and declare here, instead.
111784         * lib/fpurge.c (fpurge): Change declaring header.
111785         * modules/fpurge (Files): Drop deleted file.
111786         (Depends-on): Add stdio.
111787         (configure.ac): Set witness.
111788         * modules/stdio (Makefile.am): Support fpurge macros.
111789         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
111790         * m4/fpurge.m4 (gl_FUNC_FPURGE): Set appropriate variables.
111791         * lib/fflush.c: Update client.
111792         * tests/test-fpurge.c: Likewise.
111793         * NEWS: Mention the change.
111795 2009-06-25  Sergey Poznyakoff  <gray@gnu.org.ua>
111797         * lib/argp-version-etc.c (program_authors): Add const
111798         qualifier.
111799         * lib/version-etc.c: Fix typos in the comments.
111800         * modules/argp-version-etc: Depends on version-etc.
111802 2009-06-25  Sergey Poznyakoff  <gray@gnu.org.ua>
111804         argp-version-etc: new module.
111806         * lib/argp-version-etc.c: New file.
111807         * lib/argp-version-etc.h: New file.
111808         * modules/argp-version-etc: New file.
111809         * modules/argp-version-etc-tests: New file.
111810         * tests/test-argp-version-etc.c: New test.
111811         * tests/test-argp-version-etc-1.sh: New test.
111813 2009-06-25  Sergey Poznyakoff  <gray@gnu.org.ua>
111815         Provide additional interfaces and documentation for version-etc
111816         module.
111818         * lib/version-etc.c (version_etc_arn, version_etc_ar): New
111819         interfaces.
111820         * lib/version-etc.h (version_etc_arn, version_etc_ar): New
111821         prototypes.
111823 2009-06-24  Bruno Haible  <bruno@clisp.org>
111825         * m4/lib-link.m4 (AC_LIB_HAVE_LINKFLAGS): Fix description of
111826         HAVE_LIB${NAME} macro.
111827         Reported by Sam Steingold <sds@gnu.org>.
111829 2009-06-23  Simon Josefsson  <simon@josefsson.org>
111831         * modules/hash-tests (test_hash_LDADD): Link to libintl when
111832         needed.
111834 2009-06-21  Bruno Haible  <bruno@clisp.org>
111836         Make two consecutive identical invocations of AC_LIB_HAVE_LINKFLAGS
111837         work.
111838         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Reset HAVE_LIB${NAME}
111839         together with LIB${NAME}, LTLIB${NAME}.
111840         Reported by Sam Steingold <sds@gnu.org>.
111842 2009-06-20  Jim Meyering  <meyering@redhat.com>
111844         tests: make sc_require_test_exit_idiom more generic
111845         * top/maint.mk (Exit_witness_file): New overridable variable.
111846         (sc_require_test_exit_idiom): Don't hard-code tests/test-lib.sh.
111847         Relax test for /^Exit \$fail$$/ to just /^Exit ./.
111849 2009-06-19  Jim Meyering  <meyering@redhat.com>
111851         hash: reverse order of src/dst parameters in an internal interface
111852         * lib/hash.c (transfer_entries): Reverse order of parameters to
111853         put DST before SRC.  Adjust callers.
111855         tests: test-hash: avoid wholesale duplication
111856         * tests/test-hash.c (main): Don't copy/paste a 60-line loop.
111857         Instead, use a loop and add a single conditional.
111859         tests: test-hash: allow seed selection via a command line argument
111860         * tests/test-hash.c (get_seed): New function.
111861         (main): Use it.
111863 2009-06-19  Eric Blake  <ebb9@byu.net>
111865         hash: avoid memory leak on allocation failure
111866         * lib/hash.c: (hash_rehash): Avoid memory leak on allocation
111867         failure.  Factor repeated algorithm...
111868         (transfer_entries): ...into new helper routine.
111869         (hash_delete): React to hash_rehash return value.
111871         hash: reduce memory pressure in hash_rehash no-op case
111872         * lib/hash.c (next_prime): Avoid overflow.
111873         (hash_initialize): Factor bucket size computation...
111874         (compute_bucket_size): ...into new helper function.
111875         (hash_rehash): Use new function and open coding to reduce memory
111876         pressure, and avoid a memory leak in USE_OBSTACK code.
111877         Reported by Jim Meyering.
111879 2009-06-18  Eric Blake  <ebb9@byu.net>
111881         hash: make rotation more obvious
111882         * modules/hash (Depends-on): Add bitrotate and stdint.
111883         * lib/bitrotate.h (rotl_sz, rotr_sz): New functions.
111884         * lib/hash.c (headers): Drop limits.h.  Add stdint.h.
111885         (SIZE_MAX): Rely on headers for definition.
111886         (hash_string) [USE_DIFF_HASH]: Use rotl_sz.
111887         (raw_hasher): Use rotr_sz.
111888         Suggested by Jim Meyering.
111890         hash: fix memory leak in last patch
111891         * lib/hash.c (hash_rehash): Avoid memory leak.
111893         hash: avoid no-op rehashing
111894         * lib/hash.c (hash_rehash): Recognize useless rehash attempts.
111896         hash: provide default callback functions
111897         * lib/hash.c (raw_hasher, raw_comparator): New functions.
111898         (hash_initialize): Use them as defaults.
111899         * tests/test-hash.c (main): Test this.
111901         hash: minor optimization
111902         * lib/hash.c (hash_lookup, hash_find_entry): Avoid function call
111903         when possible.
111904         (hash_initialize): Document this promise.
111905         (hash_do_for_each, hash_clear, hash_free): Use C89 syntax.
111906         * tests/test-hash.c (hash_compare_strings): Test this.
111908 2009-06-18  Bruno Haible  <bruno@clisp.org>
111910         * m4/strstr.m4 (gl_FUNC_STRSTR): Skip linear time test if strstr is
111911         going to be replaced anyway.
111913 2009-06-18  Bruno Haible  <bruno@clisp.org>
111915         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Invoke AC_LIBOBJ only
111916         in one place.
111917         (gl_FUNC_STRCASESTR): Skip linear time test if strcasestr is going to
111918         be replaced anyway.
111920 2009-06-18  Eric Blake  <ebb9@byu.net>
111922         hash: check for resize before insertion
111923         * lib/hash.c (hash_insert): Check whether bucket usage exceeds
111924         threshold before insertion, so that a pathological hash_rehash
111925         that fills every bucket can still trigger another rehash.
111927 2009-06-18  Jim Meyering  <meyering@redhat.com>
111929         hash-tests: add a loop around the small tests
111930         * tests/test-hash.c (main): Repeat small tests with selected
111931         small initial table sizes.
111933 2009-06-17  Eric Blake  <ebb9@byu.net>
111935         hash: minor cleanups
111936         * lib/hash.h (hash_entry): Make opaque, by moving...
111937         * lib/hash.c (hash_entry): ...here.
111938         (hash_insert): Clarify restrictions on what can be inserted.
111939         (hash_get_next): Clarify when it is safe to remove an element
111940         during traversal.
111941         (check_tuning): Skip verification when tuning is known safe.
111942         (hash_initialize): Clarify restrictions on tuning.
111944 2009-06-17  Jim Meyering  <jim@meyering.net>
111945         and Eric Blake  <ebb9@byu.net>
111947         hash-tests: new module
111948         * modules/hash-tests: New file.
111949         * tests/test-hash.c: New file.
111951 2009-06-17  Eric Blake  <ebb9@byu.net>
111953         strstr-simple: document new module
111954         * MODULES.html.sh: Document new module.
111956         strstr, strcasestr: replace on platforms with broken memchr
111957         * modules/strstr: Split into...
111958         * modules/strstr-simple: ...new module that does not care about
111959         performance, but does care about glibc bug.
111960         * m4/strstr.m4 (gl_FUNC_STRSTR): Split...
111961         (gl_FUNC_STRSTR_SIMPLE): ...into new macro, which replaces strstr
111962         if platform memchr is broken, per Debian bug 521737.
111963         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): React to broken
111964         memchr.
111965         * m4/memchr.m4 (gl_FUNC_MEMCHR): Only expand once.
111966         * doc/posix-functions/strstr.texi (strstr): Document the fix.
111967         * doc/glibc-functions/strcasestr.texi (strcasestr): Likewise.
111968         * modules/mountlist (Depends-on): Add strstr-simple.
111969         * modules/gen-uni-tables (Depends-on): Likewise.
111970         * modules/argz (Depends-on): Add strstr.
111972 2009-06-17  Bruno Haible  <bruno@clisp.org>
111974         * modules/posix_spawn-internal (Depends-on): Add errno.
111976 2009-06-17  Bruno Haible  <bruno@clisp.org>
111978         Define missing ESTALE on Interix 3.5.
111979         * lib/errno.in.h (ESTALE): Assign a value if missing.
111980         * lib/strerror.c (rpl_strerror): Handle missing ESTALE and ECANCELED.
111981         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Also test whether ESTALE is
111982         missing.
111983         * doc/posix-headers/errno.texi: Mention the Interix bug.
111984         Reported by Jay Krell <jay.krell@cornell.edu> via Eric Blake.
111986 2009-06-15  Eric Blake  <ebb9@byu.net>
111988         memchr, memchr2: add valgrind exception
111989         * lib/memchr.valgrind: New file.
111990         * lib/memchr2.valgrind: New file.
111991         * modules/memchr (Files): Distribute valgrind file.
111992         * modules/memchr2 (Files): Likewise.
111994         docs: memchr is no longer obsolete
111995         * MODULES.html.sh: Move memchr from obsolete to string.h section.
111996         * lib/string.in.h (memchr): Simplify logic.
111998 2009-06-14  Jim Meyering  <meyering@redhat.com>
112000         link-follow: fix the "checking..." message to not mention trailing slash
112001         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): This test has
112002         never considered trailing slashes.
112004 2009-06-14  Bruno Haible  <bruno@clisp.org>
112006         * m4/memchr.m4: Mention also the bug on IA-64.
112007         * doc/posix-functions/memchr.texi: Likewise.
112009 2009-06-12  Eric Blake  <ebb9@byu.net>
112011         memchr: detect broken x86_64 and alpha implementations
112012         * modules/memchr-tests (Depends-on): Move mmap detection...
112013         * modules/memchr (Depends-on): ...here.
112014         (configure.ac): Set indicator.
112015         * lib/string.in.h (memchr): Declare replacement.
112016         * modules/string (Makefile.am): Trigger replacement.
112017         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Likewise.
112018         * m4/memchr.m4 (gl_FUNC_MEMCHR): Use mmap to detect platform
112019         bugs.
112020         * doc/posix-functions/memchr.texi (memchr): Document the bug.
112021         * modules/getpagesize (License): Relax license.
112023 2009-06-11  Bruno Haible  <bruno@clisp.org>
112025         * lib/idpriv.h: Add more references.
112027 2009-06-08  Bruno Haible  <bruno@clisp.org>
112029         Tests for module 'idpriv-droptemp'.
112030         * modules/idpriv-droptemp-tests: New file.
112031         * tests/test-idpriv-droptemp.sh: New file.
112032         * tests/test-idpriv-droptemp.su.sh: New file.
112033         * tests/test-idpriv-droptemp.c: New file.
112035         New module 'idpriv-droptemp'.
112036         * lib/idpriv-droptemp.c: New file.
112037         * modules/idpriv-droptemp: New file.
112039 2009-06-08  Bruno Haible  <bruno@clisp.org>
112041         Tests for module 'idpriv-drop'.
112042         * modules/idpriv-drop-tests: New file.
112043         * tests/test-idpriv-drop.sh: New file.
112044         * tests/test-idpriv-drop.su.sh: New file.
112045         * tests/test-idpriv-drop.c: New file.
112047         New module 'idpriv-drop'.
112048         * lib/idpriv.h: New file.
112049         * lib-idpriv-drop.c: New file.
112050         * m4/idpriv.m4: New file.
112051         * modules/idpriv-drop: New file.
112053 2009-06-08  Bruno Haible  <bruno@clisp.org>
112055         * modules/unistdio/u8-vasnprintf (Depends-on): Add memchr.
112056         * modules/unistdio/u8-u8-vasnprintf (Depends-on): Likewise.
112057         * modules/unistdio/u16-vasnprintf (Depends-on): Likewise.
112058         * modules/unistdio/u16-u16-vasnprintf (Depends-on): Likewise.
112059         * modules/unistdio/u32-vasnprintf (Depends-on): Likewise.
112060         * modules/unistdio/u32-u32-vasnprintf (Depends-on): Likewise.
112061         * modules/unistdio/ulc-vasnprintf (Depends-on): Likewise.
112063 2009-06-08  Eric Blake  <ebb9@byu.net>
112065         test-strstr: use memory fence, when possible
112066         * tests/test-strstr.c (main): Use memory fence, in order to be
112067         more likely to trigger Debian bug 521737.
112068         * modules/strstr-tests (Files): Pull in additional files.
112070         memchr: no longer obsolete, for wider field testing
112071         * modules/memchr (Status, Notice): Delete, this module is no
112072         longer obsolete.
112073         * modules/vasnprintf (Depends-on): Add memchr.
112075 2009-06-07  Jim Meyering  <meyering@redhat.com>
112077         hash: declare some functions with the warn_unused_result attribute
112078         * lib/hash.h (__attribute__, ATTRIBUTE_WUR): Define.
112080 2009-06-07  Bruno Haible  <bruno@clisp.org>
112082         * tests/test-alignof.c: Don't test int64_t if it does not exist.
112083         Reported by Eric Blake.
112085 2009-06-06  Eric Blake  <ebb9@byu.net>
112087         test-alignof: fix typo with long double
112088         * tests/test-alignof.c (CHECK): Use longdouble typedef to avoid
112089         compiler error.
112091 2009-06-06  Neil Jerram  <neil@ossau.uklinux.net>  (tiny change)
112093         Escape non-texinfo { and }s.
112094         * doc/ld-output-def.texi (Visual Studio Compatibility): Fix
112095         markup error.
112097 2009-06-04  Jim Meyering  <meyering@redhat.com>
112099         gitlog-to-changelog: don't infloop on an empty commit log
112100         * build-aux/gitlog-to-changelog: Warn about an empty log message.
112101         Reported by Boris Petersen <transacid@centerim.org>.
112103 2009-06-03  Mike Frysinger  <vapier@gentoo.org>
112105         version-etc: extend for packagers
112106         Add three new configure options, intended for packagers:
112107           --with-packager="packager name"
112108           --with-packager-version="packager-specific version"
112109           --with-packager-bug-reports="packager bug reporting"
112110         An example with coreutils:
112111           $ ./configure \
112112             --with-packager=Gentoo \
112113             --with-packager-bug-report=http://bugs.gentoo.org/ \
112114             --with-packager-version="patchset 1.6"
112115           $ ./src/ls --version | head -n2
112116           ls (GNU coreutils) 7.1-dirty
112117           Packaged by Gentoo (patchset 1.6)
112118         Note that the bug reporting info via --help doesn't show up because
112119         coreutils uses its own custom emit_bug_reporting_address() implementation
112120         in src/system.h.  If it didn't, it'd look like:
112121           $ ./src/ls --help | tail -n4
112122           Report bugs to <bug-coreutils@gnu.org>.
112123           Report Gentoo bugs to <http://bugs.gentoo.org/>.
112124           GNU coreutils home page: <http://www.gnu.org/software/coreutils/>.
112125           General help using GNU software: <http://www.gnu.org/gethelp/>.
112126         * lib/version-etc.c: Print new information, if provided.
112127         * m4/version-etc.m4: New file.
112128         * modules/version-etc (Files): Add m4/version-etc.m4.
112129         (configure.ac): Add gl_VERSION_ETC.
112131 2009-05-31  Bruno Haible  <bruno@clisp.org>
112133         * tests/test-alignof.c: Include <stdint.h>. Check also 'long double'
112134         and 'int64_t'.
112135         * modules/alignof-tests (Dependencies): Add stdint.
112136         Reported by Eric Blake.
112138 2009-05-31  Bruno Haible  <bruno@clisp.org>
112140         * lib/alignof.h (alignof_slot, alignof_type, alignof): Document
112141         restriction due to compiler bugs.
112142         Reported by Eric Blake.
112144 2009-05-31  Simon Josefsson  <simon@josefsson.org>
112145             Bruno Haible  <bruno@clisp.org>
112147         Fix test-alignof failure.
112148         * lib/alignof.h (alignof_slot): New macro.
112149         (alignof_type): New macro, with the same semantics as the previous
112150         'alignof'.
112151         (alignof): Alias to alignof_slot.
112152         * tests/test-alignof.c (CHECK): Check alignof_slot, not alignof. Also
112153         check that the results are usable as constant expressions.
112155 2009-05-31  Bruno Haible  <bruno@clisp.org>
112157         * tests/zerosize-ptr.h (zerosize_ptr): Specify more details.
112158         * tests/test-memchr.c (main): Check that memchr does not read past the
112159         first occurrence of the byte.
112160         * tests/test-strstr.c (main): Update comment.
112161         Suggested by Eric Blake.
112163 2009-05-30  Bruno Haible  <bruno@clisp.org>
112165         * doc/ld-output-def.texi (Visual Studio Compatibility): Explain in more
112166         detail how to use dumpbin.
112167         Reported by David Byron <dbyron@dbyron.com>.
112169 2009-06-02  Simon Josefsson  <simon@josefsson.org>
112171         * tests/test-parse-duration.sh: Don't use non-portable 'read -u3'.
112173 2009-06-02  Simon Josefsson  <simon@josefsson.org>
112175         * m4/manywarnings.m4: Add GCC 4.4 warnings.
112177 2009-05-28  Bruno Haible  <bruno@clisp.org>
112179         * gnulib-tool (func_import): Don't do HAVE_CONFIG_H replacements on
112180         build-aux/ files.
112182 2009-05-28  Simon Josefsson  <simon@josefsson.org>
112184         * gnulib-tool (func_import): Transform license on build-aux/ files too.
112186 2009-05-27  Simon Josefsson  <simon@josefsson.org>
112188         * gnulib-tool (sed_transform_main_lib_file)
112189         (sed_transform_testsrelated_lib_file): : Don't use non-POSIX
112190         regexps.
112192 2009-05-26  Simon Josefsson  <simon@josefsson.org>
112194         * tests/test-strstr.c: Add another self-test.
112195         * tests/test-strstr.c: Rewrite to use malloc/strcpy instead of
112196         strdup.  Suggested by Eric Blake  <ebb9@byu.net>.
112198 2009-05-23  Bruno Haible  <bruno@clisp.org>
112200         * doc/havelib.texi (AC_LIB_HAVE_LINKFLAGS): Update for 2009-04-26
112201         change.
112203 2009-05-21  Bruno Haible  <bruno@clisp.org>
112205         Simplify use of mode_t varargs.
112206         * lib/open.c (open): Use PROMOTED_MODE_T instead of a conditional that
112207         uses 'mode_t' or 'int'.
112208         * lib/openat.c (openat): Likewise.
112209         * lib/open-safer.c (open_safer): Likewise.
112210         * m4/mode_t.m4: New file.
112211         * m4/open.m4 (gl_PREREQ_OPEN): Require gl_PROMOTED_TYPE_MODE_T.
112212         * m4/openat.m4 (gl_PREREQ_OPENAT): Likewise.
112213         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Likewise.
112214         * modules/open (Files): Add m4/mode_t.m4.
112215         * modules/openat (Files): Likewise.
112216         * modules/fcntl-safer (Files): Likewise.
112217         Suggested by Eric Blake.
112219 2009-05-21  Pádraig Brady  <P@draigbrady.com>
112221         * doc/glibc-functions/fallocate.texi: New file.
112222         * doc/gnulib.texi: Include it.
112224 2009-05-21  Eric Blake  <ebb9@byu.net>
112225             Bruno Haible  <bruno@clisp.org>
112227         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Remove redundant m4_quote
112228         invocations.
112229         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Likewise.
112231 2009-05-21  Eric Blake  <ebb9@byu.net>
112232             Bruno Haible  <bruno@clisp.org>
112234         Second attempt to work around an AIX 5.3, 6.1 compiler bug with
112235         include_next. Fix of 2008-11-20 commit.
112236         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Also set
112237         NEXT_AS_FIRST_DIRECTIVE_FOO_H.
112238         * lib/math.in.h: Use NEXT_AS_FIRST_DIRECTIVE_MATH_H instead of
112239         NEXT_MATH_H.
112240         * modules/math (Makefile.am): Substitute NEXT_AS_FIRST_DIRECTIVE_MATH_H
112241         instead of NEXT_MATH_H.
112243 2009-05-21  Bruno Haible  <bruno@clisp.org>
112245         Avoid redefinition warnings for SIZE_MAX.
112246         * m4/size_max.m4 (gl_SIZE_MAX): Avoid redefining SIZE_MAX in config.h.
112247         Reported by Simon Josefsson.
112249 2009-05-21  Bruno Haible  <bruno@clisp.org>
112251         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_CACHE_CHECK instead of
112252         AC_CACHE_VAL.
112254 2009-05-20  Bruno Haible  <bruno@clisp.org>
112256         Make zeroptr.h work on mingw.
112257         * tests/zerosize-ptr.h: Test for the presence of <sys/mman.h> and
112258         mprotect.
112259         * modules/memchr-tests (configure.ac): Also test for sys/mman.h.
112260         * modules/memchr2-tests (configure.ac): Likewise.
112261         * modules/memcmp-tests (configure.ac): Likewise.
112262         * modules/memmem-tests (configure.ac): Likewise.
112263         * modules/memrchr-tests (configure.ac): Likewise.
112264         Reported by Simon Josefsson.
112266 2009-05-20  Simon Josefsson  <simon@josefsson.org>
112268         * tests/test-glob.c: Include string.h for strcmp prototype.
112270 2009-05-20  Simon Josefsson  <simon@josefsson.org>
112272         * modules/getdelim (Depends-on): Add explicit stdint, although it
112273         was implicitly already pulled in via realloc-posix.
112274         * lib/getdelim.c: Get SIZE_MAX from stdint.h.
112276 2009-05-20  Simon Josefsson  <simon@josefsson.org>
112278         MinGW and IRIX does not have sa_family_t type.  Reported by "Tom
112279         G. Christensen" <tgc@jupiterrise.com>.
112280         * m4/sys_socket_h.m4: Check for sa_family_t.
112281         * lib/sys_socket.in.h: Typedef sa_family_t when needed.
112282         * modules/sys_socket: Substitute HAVE_SA_FAMILY_T.
112283         * tests/test-sys_socket.c: Check that sa_family_t works.
112285 2009-05-18  Eric Blake  <ebb9@byu.net>
112287         maint.mk: allow gnulib_dir in VPATH build
112288         * top/maint.mk (gnulib_dir): Make relative to $(srcdir).
112290 2009-05-15  Jim Meyering  <meyering@redhat.com>
112292         maint.mk: Give gnulib_dir a default definition.
112293         * top/maint.mk (gnulib_dir): Define to 'gnulib', by default.
112294         Thus, most packages no longer need to specify this variable in cfg.mk
112296 2009-05-14  Tom Prince  <tom.prince@ualberta.net>  (tiny change)
112298         rename.m4: fix typos that would make non-mingw cross-configure fail
112299         * m4/rename.m4 (gl_FUNC_RENAME): Fix typos.
112301 2009-05-13  Eric Blake  <ebb9@byu.net>
112303         mmap-anon: avoid out-of-order autoconf expansion
112304         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Use correct
112305         SYSTEM_EXTENSIONS macro to silence warnings from autoconf 2.63b.
112306         * modules/memchr-tests (Depends-on): Add extensions.
112307         * modules/memchr2-tests (Depends-on): Add extensions.
112308         * modules/memcmp-tests (Depends-on): Add extensions.
112309         * modules/memmem-tests (Depends-on): Add extensions.
112310         * modules/memrchr-tests (Depends-on): Add extensions.
112312 2009-05-13  Bruno Haible  <bruno@clisp.org>
112314         Make some tests ISO C 99 compliant.
112315         * tests/zerosize-ptr.h: New file.
112316         * tests/test-memchr.c: Include zerosize-ptr.h.
112317         (main): Use a zero-size object pointer instead of NULL.
112318         * tests/test-memchr2.c: Include zerosize-ptr.h.
112319         (main): Use a zero-size object pointer instead of NULL.
112320         * tests/test-memcmp.c: Include zerosize-ptr.h.
112321         (main): Use a zero-size object pointer instead of NULL.
112322         * tests/test-memmem.c: Include zerosize-ptr.h.
112323         (main): Use a zero-size object pointer instead of NULL.
112324         * tests/test-memrchr.c: Include zerosize-ptr.h.
112325         (main): Use a zero-size object pointer instead of NULL.
112326         * modules/memchr-tests (Files): Add tests/zerosize-ptr.h,
112327         m4/mmap-anon.m4.
112328         (Depends-on): Add getpagesize.
112329         (configure.ac): Invoke gl_FUNC_MMAP_ANON. Check for mprotect.
112330         * modules/memchr2-tests (Files): Add tests/zerosize-ptr.h,
112331         m4/mmap-anon.m4.
112332         (Depends-on): Add getpagesize.
112333         (configure.ac): Invoke gl_FUNC_MMAP_ANON. Check for mprotect.
112334         * modules/memcmp-tests (Files): Add tests/zerosize-ptr.h,
112335         m4/mmap-anon.m4.
112336         (Depends-on): Add getpagesize.
112337         (configure.ac): Invoke gl_FUNC_MMAP_ANON. Check for mprotect.
112338         * modules/memmem-tests (Files): Add tests/zerosize-ptr.h,
112339         m4/mmap-anon.m4.
112340         (Depends-on): Add getpagesize.
112341         (configure.ac): Invoke gl_FUNC_MMAP_ANON. Check for mprotect.
112342         * modules/memrchr-tests (Files): Add tests/zerosize-ptr.h,
112343         m4/mmap-anon.m4.
112344         (Depends-on): Add getpagesize.
112345         (configure.ac): Invoke gl_FUNC_MMAP_ANON. Check for mprotect.
112347 2009-05-12  Bruno Haible  <bruno@clisp.org>
112349         Tests for module 'alignof'.
112350         * modules/alignof-tests: New file.
112351         * tests/test-alignof.c: New file.
112353 2009-05-12  Bruno Haible  <bruno@clisp.org>
112355         Fix alignof macro.
112356         * lib/alignof.h (alignof): Remove special cases for AIX and HP-UX
112357         vendor compilers that are always correct.
112359 2009-05-12  Bruno Haible  <bruno@clisp.org>
112361         Make the MAP_ANONYMOUS detection work on HP-UX 11.
112362         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check whether mmap exists, but
112363         not whether its fully works.
112365 2009-05-12  Bruno Haible  <bruno@clisp.org>
112367         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Add comments.
112369 2009-05-12  Jim Meyering  <meyering@redhat.com>
112371         * top/maint.mk: Adjust backslash alignment.
112373 2009-05-11  Simon Josefsson  <simon@josefsson.org>
112375         * top/maint.mk: Make $(srcdir)/build-aux configurable.
112377 2009-05-11  Eric Blake  <ebb9@byu.net>
112379         argp: avoid undefined behavior
112380         * lib/argp-fmtstream.c (weak_alias): Pass correct types to ctype
112381         macros.
112383 2009-05-08  Simon Josefsson  <simon@josefsson.org>
112385         * tests/test-vc-list-files-git.sh: Do git config of user.email and
112386         user.name to prevent git commit from complaining.
112388 2009-05-10  Bruno Haible  <bruno@clisp.org>
112390         * gnulib-tool (func_import, func_create_testdir, copy-file): Change
112391         sed_rewrite_old_files, sed_rewrite_new_files, sed_rewrite_files so that
112392         it rewrites every file name only once.
112393         Reported by Simon Josefsson. Helped by Ralf Wildenhues.
112395 2009-05-08  Bruno Haible  <bruno@clisp.org>
112397         * lib/sys_socket.in.h (_SS_PADSIZE): Use a conditional expression
112398         instead of 'max'.
112400 2009-05-08  Simon Josefsson  <simon@josefsson.org>
112402         * m4/sys_socket_h.m4: Test for ws2tcpip.h earlier, needed for
112403         sockaddr_storage test.
112405 2009-05-07  Simon Josefsson  <simon@josefsson.org>
112407         * modules/sys_socket (Makefile.am): Substitute
112408         HAVE_STRUCT_SOCKADDR_STORAGE.  Depend on alignof.
112409         * m4/sys_socket_h.m4: Check for sockaddr_storage.
112410         * lib/sys_socket.in.h (sockaddr_storage): Define when needed.
112411         * tests/test-sys_socket.c: Check sockaddr_storage.
112413 2009-05-08  Bruno Haible  <bruno@clisp.org>
112415         New module 'alignof'.
112416         * lib/alignof.h: New file.
112417         * modules/alignof: New file.
112419 2009-05-04  David Bartley  <dtbartle@csclub.uwaterloo.ca>
112420             Bruno Haible  <bruno@clisp.org>
112422         Fix test-file-has-acl on FreeBSD.
112423         * tests/test-file-has-acl.sh: Also test a directory. On FreeBSD, the
112424         mask is implicitly added.
112425         * tests/test-file-has-acl.c: Include <signal.h>.
112426         (main): Terminate the test after 5 seconds.
112427         * modules/acl-tests (configure.ac): Check for alarm function.
112429 2009-05-04  Bruno Haible  <bruno@clisp.org>
112431         Exploit new semantics of AC_DEFUN_ONCE available since 2009-01-26.
112432         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Remove outdated comment.
112433         * modules/errno (configure.ac): Drop AC_REQUIRE.
112434         * m4/multiarch.m4 (gl_MULTIARCH): Remove outdated comment.
112435         * modules/multiarch (configure.ac): Drop AC_REQUIRE.
112437 2009-05-04  Simon Josefsson  <simon@josefsson.org>
112439         * modules/glob-tests: New module.
112440         * tests/test-glob.c: Add.
112442 2009-05-04  Simon Josefsson  <simon@josefsson.org>
112444         * modules/fnmatch-tests: New module.
112445         * tests/test-fnmatch.c: Add.
112447 2009-05-04  Eric Blake  <ebb9@byu.net>
112449         maint: make the new no-submodule-changes rule VPATH-safe
112450         * top/maint.mk (no-submodule-changes): Don't assume a srcdir build.
112452 2009-05-04  David Bartley  <dtbartle@csclub.uwaterloo.ca>
112453             Bruno Haible  <bruno@clisp.org>
112455         acl: Fix infinite loop on FreeBSD.
112456         * lib/acl_entries.c (acl_entries) [Linux, FreeBSD]: Fix interpretation
112457         of return value from acl_get_entry.
112458         * lib/file-has-acl.c (acl_access_nontrivial) [Linux, FreeBSD]:
112459         Likewise.
112461 2009-05-03  Bruno Haible  <bruno@clisp.org>
112463         * lib/acl-internal.h (acl_entries): Clarify return value.
112464         * lib/acl_entries.c (acl_entries): Likewise.
112466 2009-05-04  David Bartley  <dtbartle@csclub.uwaterloo.ca>
112468         Bug fix in acl module.
112469         * lib/set-mode-acl.c: Use correct struct with ACL_SETACL.
112471 2009-05-03  Bruno Haible  <bruno@clisp.org>
112473         Create gperf-generated file in the source dir, not in the build dir.
112474         * modules/iconv_open (iconv_open-aix.h, iconv_open-hpux.h,
112475         iconv_open-irix.h, iconv_open-osf.h): Create file in the source tree.
112476         * modules/unicase/locale-language (unicase/locale-languages.h):
112477         Likewise.
112478         * modules/unicase/special-casing (unicase/special-casing-table.h):
112479         Likewise.
112480         * modules/unictype/property-byname (unictype/pr_byname.h): Likewise.
112481         * modules/unictype/scripts (unictype/scripts_byname.h): Likewise.
112482         * modules/uninorm/composition (uninorm/composition-table.h): Likewise.
112483         Reported by Ralf Wildenhues.
112485 2009-05-03  Bruno Haible  <bruno@clisp.org>
112487         * modules/fnmatch (Description, configure.ac): Taken from
112488         fnmatch-posix.
112489         * modules/fnmatch-posix: Turn into a symbolic reference to the
112490         'fnmatch' module, and deprecate.
112491         * doc/posix-functions/fnmatch.texi: Mention the fnmatch module.
112493 2009-05-03  Bruno Haible  <bruno@clisp.org>
112495         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF,
112496         gl_PREREQ_VASNPRINTF_LONG_DOUBLE): Define through AC_DEFUN_ONCE.
112497         Reported by Ralf Wildenhues.
112499 2009-05-04  Simon Josefsson  <simon@josefsson.org>
112501         * m4/fnmatch.m4: Fix fnmatch re-define.
112503 2009-04-27  David Bartley  <dtbartle@csclub.uwaterloo.ca>
112505         priv-set: new module and tests; adapt write-any-file
112506         * lib/priv-set.c: New file.
112507         * lib/priv-set.h: New file.
112508         * lib/unlinkdir.c: Make cannot_unlink_dir thread-safe.
112509         * lib/write-any-file.c: Simplify by using priv-set module.
112510         * m4/priv-set.m4: New file.
112511         * modules/priv-set: New file.
112512         * modules/unlinkdir: Add dependency on priv-set module.
112513         * modules/write-any-file: Likewise.
112515         Tests for module 'priv-set'.
112516         * modules/priv-set-tests: New file.
112517         * tests/test-priv-set.c: New file.
112519 2009-05-03  Jim Meyering  <meyering@redhat.com>
112520             Bruno Haible  <bruno@clisp.org>
112522         * lib/propername.c (proper_name_utf8): Ignore no-op translations;
112523         use the converted UTF-8 variant of the name instead.
112525 2009-05-03  Jim Meyering  <meyering@redhat.com>
112527         tests: tighten some getdate tests
112528         * tests/test-getdate.c (main): Tighten tests: require equality,
112529         not just greater than.  Set TZ envvar to UTC0.
112531 2009-05-03  Giuseppe Scrivano  <gscrivano@gnu.org>
112533         getdate: correctly interpret "next monday" when run on a Monday
112534         * lib/getdate.y (get_date): Correct the calculation of tm_mday so
112535         that e.g., "next tues" (when run on a tuesday) results in a date
112536         that is one week in the future, and not today's date.
112537         I.e., add a week when the wday is the same as the current one.
112538         Reported by Tom Broadhurst in http://savannah.gnu.org/bugs/?25406,
112539         and earlier by Martin Bernreuther and Jan Minář.
112540         * tests/test-getdate.c (main): Check that "next DAY" is always in
112541         the future and that "last DAY" is always in the past.
112543 2009-05-02  Jim Meyering  <meyering@redhat.com>
112545         build: ensure that a release build fails when a submodule is unclean
112546         * top/maint.mk (no-submodule-changes): New rule.
112547         (alpha beta major): Depend on it.
112549 2009-05-02  Bruno Haible  <bruno@clisp.org>
112551         Remove incompatibility between modules fnmatch-posix and fnmatch-gnu.
112552         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX, gl_FUNC_FNMATCH_GNU): Use a
112553         shell variable gl_fnmatch_required to detect which variant is
112554         requested.
112555         (_AC_FUNC_FNMATCH_IF, _AC_LIBOBJ_FNMATCH): Remove macros. Inlined into
112556         gl_FUNC_FNMATCH_POSIX.
112557         * gnulib-tool (func_create_testdir, func_create_megatestdir): Don't
112558         exclude fnmatch-posix.
112560 2009-05-02  Bruno Haible  <bruno@clisp.org>
112562         Relicense mbsrtowcs and strnlen1 under LGPLv2+.
112563         * modules/mbsrtowcs (License): Change to LGPLv2+.
112564         * modules/strnlen1 (License): Likewise.
112565         Reported by Simon Josefsson.
112567 2009-05-02  Bruno Haible  <bruno@clisp.org>
112569         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Say "guessing no" instead of
112570         "cross".
112571         (gl_FUNC_FNMATCH_POSIX, gl_FUNC_FNMATCH_GNU): Update. Don't assume that
112572         gnulib-tool was called with option --source-base=lib.
112574 2009-05-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
112576         Use automake *-local hooks without commands, for extensibility.
112577         * modules/localcharset (Makefile.am): Rename install-exec-local
112578         rule to install-exec-localcharset, and make it a prerequisite of
112579         install-exec-local.  Likewise, rename the uninstall-local rule to
112580         uninstall-localcharset, and make it a prerequisite of the former.
112582 2009-05-01  Bruno Haible  <bruno@clisp.org>
112584         * lib/wchar.in.h (wcsnrtombs): Define if REPLACE_WCSNRTOMBS is 1.
112585         * m4/wcsnrtombs.m4 (gl_FUNC_WCSRTOMBS): Invoke gl_MBSTATE_T_BROKEN, and
112586         set REPLACE_WCSNRTOMBS if mbstate_t must be replaced.
112587         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WCSNRTOMBS.
112588         * modules/wchar (Makefile.am): Substitute REPLACE_WCSNRTOMBS.
112589         * modules/wcsnrtombs (Files): Add m4/mbrtowc.m4, m4/locale-ja.m4,
112590         m4/locale-zh.m4, m4/codeset.m4.
112592         * m4/wcsrtombs.m4 (gl_FUNC_WCSNRTOMBS): Invoke gl_MBSTATE_T_BROKEN, and
112593         set REPLACE_WCSRTOMBS if mbstate_t must be replaced.
112594         * modules/wcsrtombs (Files): Add m4/mbrtowc.m4, m4/locale-ja.m4,
112595         m4/locale-zh.m4.
112597         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Invoke gl_MBSTATE_T_BROKEN, and set
112598         REPLACE_WCRTOMB if mbstate_t must be replaced.
112599         * modules/wcrtomb (Files): Add m4/mbrtowc.m4.
112600         Reported by Jens Rehsack <rehsack@googlemail.com> via Eric Blake.
112602 2009-05-01  Bruno Haible  <bruno@clisp.org>
112604         Avoid compiler warnings when redefining macros defined by <libintl.h>.
112605         * lib/gettext.h [!ENABLE_NLS] (gettext, dgettext, dcgettext, ngettext,
112606         dngettext, dcngettext, textdomain, bindtextdomain,
112607         bind_textdomain_codeset): Undefine before redefining.
112609 2009-04-30  Bruno Haible  <bruno@clisp.org>
112611         Fix bug introduced on 2009-04-25.
112612         * lib/math.in.h (gl_signbitf_OPTIMIZED_MACRO,
112613         gl_signbitd_OPTIMIZED_MACRO, gl_signbitl_OPTIMIZED_MACRO): New macros.
112614         * lib/signbitf.c (gl_signbitd): Undefine if gl_signbitf_OPTIMIZED_MACRO
112615         is defined.
112616         * lib/signbitd.c (gl_signbitd): Undefine if gl_signbitd_OPTIMIZED_MACRO
112617         is defined.
112618         * lib/signbitl.c (gl_signbitd): Undefine if gl_signbitl_OPTIMIZED_MACRO
112619         is defined.
112620         Reported by Elbert_Pol <elbert.pol@gmail.com>.
112622 2009-04-28  Bruno Haible  <bruno@clisp.org>
112624         Comment tweaks.
112625         * lib/unistr.h (u*_cmp2): Clarify what memcmp2 is.
112626         * lib/uninorm.h (u*_normxfrm): Fix description of return value.
112627         * lib/unicase.h (u*_casexfrm): Likewise.
112628         Reported by Paolo Bonzini.
112630 2009-04-28  Bruno Haible  <bruno@clisp.org>
112632         Fix a compilation error.
112633         * lib/mbsrtowcs-state.c (_gl_mbsrtowcs_state): Fix initializer.
112634         * lib/wcsrtombs-state.c (_gl_wcsrtombs_state): Likewise.
112635         Reported by Jim Meyering.
112637 2009-04-27  Bruno Haible  <bruno@clisp.org>
112639         New module 'libunistring'.
112640         * modules/libunistring: New file.
112641         * m4/libunistring.m4: New file.
112642         * MODULES.html.sh (Unicode string functions): Add it.
112644 2009-04-27  Eric Blake  <ebb9@byu.net>
112646         maint.mk: allow package-specific header to provide <config.h>
112647         * top/maint.mk (sc_require_config_h): New variable.
112648         (sc_require_config_h, sc_require_config_h_first): Use it.
112650 2009-04-27  Simon Josefsson  <simon@josefsson.org>
112652         * top/maint.mk (sc_avoid_if_before_free): Except
112653         useless-if-before-free script.
112655 2009-04-27  Eric Blake  <ebb9@byu.net>
112657         maintainer-makefile: depend on all required helper scripts
112658         * modules/maintainer-makefile (Depends-on): Add vc-list-files and
112659         useless-if-before-free.
112660         * top/maint.mk (VC_LIST, sc_avoid_if_before_free): Use local
112661         version, rather than assuming gnulib checkout is available.
112662         Reported by Simen Josefsson.
112664 2009-04-26  Bruno Haible  <bruno@clisp.org>
112666         Make the lib vs. lib64 recognition work on openSUSE 11 with "gcc -m32".
112667         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Ignore paths that end in
112668         "../" or "..".
112670 2009-04-26  Bruno Haible  <bruno@clisp.org>
112672         * m4/lib-link.m4 (AC_LIB_HAVE_LINKFLAGS): Accept a fifth argument.
112673         * m4/libsigsegv.m4 (gl_LIBSIGSEGV): Simplify by using
112674         AC_LIB_HAVE_LINKFLAGS.
112676 2009-04-26  Bruno Haible  <bruno@clisp.org>
112678         Simplify calling convention of u*_conv_from_encoding.
112679         * lib/uniconv.h (u8_conv_from_encoding, u16_conv_from_encoding,
112680         u32_conv_from_encoding): Expect a resultbuf argument and return the
112681         result directly as a pointer.
112682         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Likewise.
112683         * lib/uniconv/u-conv-from-enc.h (FUNC): Likewise.
112684         * lib/uniconv/u-strconv-from-enc.h (FUNC): Update.
112685         * lib/unicase/ulc-casecmp.c (ulc_u8_casefold): Update.
112686         * lib/unicase/ulc-casexfrm.c (ulc_casexfrm): Update.
112687         * lib/unilbrk/ulc-possible-linebreaks.c (ulc_possible_linebreaks):
112688         Update.
112689         * lib/unilbrk/ulc-width-linebreaks.c (ulc_width_linebreaks): Update.
112690         * lib/uniwbrk/ulc-wordbreaks.c (ulc_wordbreaks): Update.
112691         * lib/vasnprintf.c (VASNPRINTF): Update.
112692         * tests/uniconv/test-u8-conv-from-enc.c (main): Update.
112693         * tests/uniconv/test-u16-conv-from-enc.c (main): Update.
112694         * tests/uniconv/test-u32-conv-from-enc.c (main): Update.
112695         * NEWS: Mention the change.
112697 2009-04-26  Bruno Haible  <bruno@clisp.org>
112699         Simplify calling convention of u*_conv_to_encoding.
112700         * lib/uniconv.h (u8_conv_to_encoding, u16_conv_to_encoding,
112701         u32_conv_to_encoding): Expect a resultbuf argument and return the
112702         result directly as a pointer.
112703         * lib/uniconv/u8-conv-to-enc.c (u8_conv_to_encoding): Likewise.
112704         * lib/uniconv/u-conv-to-enc.h (FUNC): Likewise. Preserve errno while
112705         freeing scaled_offsets if mem_iconveha failed.
112706         * lib/unicase/u-casexfrm.h (FUNC): Update.
112707         * lib/uninorm/u-normxfrm.h (FUNC): Update.
112708         * lib/vasnprintf.c (VASNPRINTF): Update.
112709         * tests/uniconv/test-u8-conv-to-enc.c (main): Update.
112710         * tests/uniconv/test-u16-conv-to-enc.c (main): Update.
112711         * tests/uniconv/test-u32-conv-to-enc.c (main): Update.
112712         * NEWS: Mention the change.
112714 2009-04-26  Bruno Haible  <bruno@clisp.org>
112716         Avoid test failures on AIX and OSF/1.
112717         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Avoid calling
112718         malloc(0).
112719         * lib/uniconv/u8-conv-to-enc.c (u8_conv_to_encoding): Likewise.
112720         * lib/unilbrk/ulc-possible-linebreaks.c (ulc_possible_linebreaks):
112721         Likewise.
112722         * lib/unilbrk/ulc-width-linebreaks.c (ulc_width_linebreaks): Likewise.
112723         * lib/uniwbrk/ulc-wordbreaks.c (ulc_wordbreaks): Likewise.
112724         * lib/uniconv/u-conv-to-enc.h (FUNC): Likewise. Fix memory leak.
112725         * lib/unistr/u-cpy-alloc.h (FUNC): Call malloc(1) instead of malloc(0).
112726         * doc/posix-functions/malloc.texi: Document the portability problem
112727         related to malloc(0).
112729 2009-04-26  Bruno Haible  <bruno@clisp.org>
112731         * modules/unistr/u8-cpy-alloc (Depends-on): Add malloc-posix.
112732         * modules/unistr/u16-cpy-alloc (Depends-on): Likewise.
112733         * modules/unistr/u32-cpy-alloc (Depends-on): Likewise.
112735 2009-04-25  Bruno Haible  <bruno@clisp.org>
112737         Avoid link error when creating a namespace clean library.
112738         * lib/math.in.h (gl_signbitf, gl_signbitd, gl_signbitl): Don't define
112739         as macro with arguments if already defined as an alias.
112740         * lib/signbitf.c (gl_signbitf): Don't undefine.
112741         * lib/signbitd.c (gl_signbitd): Don't undefine.
112742         * lib/signbitl.c (gl_signbitl): Don't undefine.
112744 2009-04-25  Jim Meyering  <meyering@redhat.com>
112746         vc-list-files: fix another quoting bug
112747         * build-aux/vc-list-files: Avoid sed backslash expansion
112748         of pathological directory names.
112750 2009-04-25  Eric Blake  <ebb9@byu.net>
112752         vc-list-files: fix shell quoting error
112753         * build-aux/vc-list-files: Protect against $ in $dir.  Normalize
112754         timestamp.
112756 2009-04-25  Jim Meyering  <meyering@redhat.com>
112758         vc-list-files: restore lost functionality with subdir argument
112759         * build-aux/vc-list-files: When given a non-"." sub-directory
112760         argument, substitute the $dir/ prefix back onto each resulting name.
112761         Otherwise, coreutils' root_tests check would fail.
112763 2009-04-24  Eric Blake  <ebb9@byu.net>
112765         vc-list-files: ignore git symlinks
112766         * build-aux/vc-list-files (.git): Use ls-tree and a filter, rather
112767         than ls-files, to ignore git symlinks.
112769         maint.mk: import improvements from m4
112770         * top/maint.mk (VC-tag): Use signing key from cfg.mk.
112771         (move_if_change): Delete unused macro.
112772         (news-date-check, vc-diff-check): Support VPATH builds.
112773         (announcement): Likewise.  Split --bootstrap-tools list...
112774         (boostrap-tools): ...into separate list, which can be overridden
112775         in cfg.mk.
112776         (sc_avoid_if_before_free): Point to $(gnulib_dir), rather than
112777         requiring dependency on useless-if-before-free module.
112778         (VC_LIST, VC_LIST_EXCEPT): Likewise for vc-list-files module.
112779         Support VPATH builds.
112781 2009-04-24  Jim Meyering  <meyering@redhat.com>
112783         maint.mk: remove coreutils-specific rules and variables
112784         * top/maint.mk (bin, taint-distcheck, coreutils-path-check, t): Remove.
112785         (fake_home, install-transform-check, my-instcheck, pfx, TMPDIR): Remove.
112786         (t_prefix, t_taint, tp, warn_cflags, write_loser, my-distcheck): Remove.
112788         maint.mk: remove obsolete rule
112789         * top/maint.mk (rel-check): Remove rule.
112790         (WGET, WGETFLAGS): Remove now-unused variables.
112792 2009-04-24  Simon Josefsson  <simon@josefsson.org>
112794         * top/maint.mk (makefile-check): Renamed to sc_makefile_check for
112795         consistency.
112797         * modules/vc-list-files-tests (TESTS_ENVIRONMENT): Use
112798         '$(PATH_SEPARATOR)' instead of ':'.
112800 2009-04-24  Simon Josefsson  <simon@josefsson.org>
112802         * lib/getopt1.c (main): Use 'const' for static array.
112804 2009-04-24  Simon Josefsson  <simon@josefsson.org>
112806         * top/maint.mk: Sync with coreutils.
112807         * NEWS: Explain incompatibilities.
112809 2009-04-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
112810             Bruno Haible  <bruno@clisp.org>
112812         Fix cross-compilation results.
112813         * m4/btowc.m4 (gl_FUNC_BTOWC): Use no-op statement, rather than empty
112814         statement, as third argument of AC_TRY_RUN.
112815         * m4/mbrtowc.m4 (gl_MBRTOWC_INCOMPLETE_STATE, gl_MBRTOWC_SANITYCHECK,
112816         gl_MBRTOWC_NULL_ARG, gl_MBRTOWC_RETVAL, gl_MBRTOWC_NUL_RETVAL):
112817         Likewise.
112818         * m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): Likewise.
112819         * m4/wcsrtombs.m4 (gl_WCSRTOMBS_TERMINATION, gl_WCSRTOMBS_NULL):
112820         Likewise.
112821         * m4/wctob.m4 (gl_FUNC_WCTOB): Likewise.
112822         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise. Update for AIX 4.3.
112823         * doc/posix-functions/wcrtomb.texi: Mention the bug on AIX 4.3.
112825 2009-04-20  Bruno Haible  <bruno@clisp.org>
112827         Avoid test failure on mingw.
112828         * tests/uniwidth/test-uc_width2.sh: Convert newlines in output.
112830 2009-04-20  Bruno Haible  <bruno@clisp.org>
112832         Avoid compilation error on mingw.
112833         * modules/localename-tests (Depends-on): Add locale.
112835 2009-04-19  Bruno Haible  <bruno@clisp.org>
112837         Support for building a shared library on Windows platforms.
112838         * tests/uninorm/test-nfc.c (n): Don't define if WOE32DLL.
112839         (main): Test the presence of UNINORM_NFC here.
112840         * tests/uninorm/test-nfd.c (n): Don't define if WOE32DLL.
112841         (main): Test the presence of UNINORM_NFD here.
112842         * tests/uninorm/test-nfkc.c (n): Don't define if WOE32DLL.
112843         (main): Test the presence of UNINORM_NFKC here.
112844         * tests/uninorm/test-nfkd.c (n): Don't define if WOE32DLL.
112845         (main): Test the presence of UNINORM_NFKD here.
112847 2009-04-19  Bruno Haible  <bruno@clisp.org>
112849         Avoid a compiler warning.
112850         * tests/uninorm/test-u32-normalize-big.c (read_normalization_test_file):
112851         Change type of variable 'sequence'.
112853 2009-04-19  Bruno Haible  <bruno@clisp.org>
112855         * modules/configmake (Makefile.am): When the contents of configmake.h
112856         does not change, arrange to preserve its modification time.
112858 2009-04-17  Simon Josefsson  <simon@josefsson.org>
112860         * top/maint.mk (PO_DOMAIN): New variable, allows overriding of
112861         gettext domain.
112863 2009-04-16  Jim Meyering  <meyering@redhat.com>
112865         useless-if-before-free: improve conversion code
112866         * build-aux/useless-if-before-free: Adjust code-in-comment to match
112867         "...!= 0" as well as "...!= NULL".  emacs has one of the former.
112869 2009-04-14  Bruno Haible  <bruno@clisp.org>
112871         * modules/fcntl (Depends-on): Add extensions.
112872         * m4/fcntl_h.m4 (gl_FCNTL_H): Add a comment.
112874 2009-04-12  Ben Pfaff  <blp@gnu.org>
112876         Make fcntl module detect O_NOATIME, O_NOFOLLOW on GNU/Linux.
112877         * m4/fcntl_h.m4 (gl_FCNTL_H): Require AC_USE_SYSTEM_EXTENSIONS.
112879 2009-03-20  Ben Pfaff  <blp@gnu.org>
112881         Make rename replace existing destinations on Windows.
112882         * m4/rename.m4: Add test for Mingw.
112883         * lib/rename.c: Add rename replacement that uses MoveFileEx with
112884         MOVEFILE_REPLACE_EXISTING to replace existing destination files.
112885         * doc/posix-functions/rename.texi: Document.
112887 2009-04-10  Bruno Haible  <bruno@clisp.org>
112889         New include file "iconveh.h".
112890         * lib/iconveh.h: New file, extracted from lib/striconveh.h.
112891         * lib/striconveh.h: Include it.
112892         (enum iconv_ilseq_handler): Remove definition.
112893         * lib/striconveha.h: Include <stddef.h> and iconveh.h instead of
112894         striconveh.h.
112895         * lib/striconveha.c: Include striconveh.h.
112896         * lib/uniconv.h: Include iconveh.h instead of striconveh.h.
112897         * modules/striconveh (Files): Add lib/iconveh.h.
112898         * modules/uniconv/base (Files): Add lib/iconveh.h. Remove
112899         lib/striconveh.h.
112901 2009-04-10  Bruno Haible  <bruno@clisp.org>
112903         * lib/uniconv.h: Update comment.
112905 2009-04-10  Bruno Haible  <bruno@clisp.org>
112907         * lib/unistr/u8-mbtouc-aux.c: Inside libunistring, define the function
112908         always.
112909         * lib/unistr/u8-mbtouc-unsafe-aux.c: Likewise.
112910         * lib/unistr/u16-mbtouc-aux.c: Likewise.
112911         * lib/unistr/u16-mbtouc-unsafe-aux.c: Likewise.
112912         * lib/unistr/u8-mbtouc.c: Inside libunistring, include
112913         "unistring-notinline.h", so that the function gets defined always.
112914         * lib/unistr/u8-mbtouc-unsafe.c: Likewise.
112915         * lib/unistr/u8-uctomb.c: Likewise.
112916         * lib/unistr/u16-mbtouc.c: Likewise.
112917         * lib/unistr/u16-mbtouc-unsafe.c: Likewise.
112918         * lib/unistr/u16-uctomb.c: Likewise.
112919         * lib/unistr/u32-mbtouc.c: Likewise.
112920         * lib/unistr/u32-mbtouc-unsafe.c: Likewise.
112921         * lib/unistr/u32-uctomb.c: Likewise.
112923 2009-04-10  Bruno Haible  <bruno@clisp.org>
112925         Mark 'utime' obsolete.
112926         * modules/utime (Status, Notice): New sections.
112927         Suggested by Jim Meyering.
112929         Fix cross-compile guess for utime test.
112930         * m4/utime.m4 (AC_FUNC_UTIME_NULL): Add definition from newest unstable
112931         autoconf.
112932         * doc/posix-functions/utime.texi: Give more precisions.
112933         Reported by Jan <ipif@ymail.com>.
112935 2009-04-09  Kamil Dudka  <kdudka@redhat.com>
112937         filevercmp: correct today's change
112938         * lib/filevercmp.c: Also handle coreutils' test inputs.
112939         * tests/test-filevercmp.c: Add inputs from one of coreutils' test scripts.
112941         Fix regression in 'filevercmp' module. Thanks Sven Joachim
112942         for reporting it.
112943         * lib/filevercmp.c: Special handle for "", "." and "..".
112944         * tests/test-filevercmp.c: Enlarge the set suite.
112946 2009-04-07  Jim Meyering  <meyering@redhat.com>
112948         useless-if-before-free: show how to remove braced useless free, too
112949         * build-aux/useless-if-before-free: still only in a comment, though.
112951 2009-04-07  Reuben Thomas  <rrt@sc3d.org>
112953         maint.mk: import changes to syntax-check macros from coreutils
112954         * top/maint.mk (_prohibit_regexp, _header_without_use): Define.
112955         Use them in the relevant macros.
112957 2009-04-06  Bruno Haible  <bruno@clisp.org>
112959         Fix unportable use of bit-fields.
112960         * lib/unicase/special-casing.h (struct special_casing_rule): Change the
112961         bit-field type from 'int' to 'signed int'. Otherwise Solaris cc,
112962         AIX xlc, and OSF/1 cc interpret it as 'unsigned int'.
112964 2009-04-06  Bruno Haible  <bruno@clisp.org>
112966         Avoid test failures on AIX and OSF/1.
112967         * tests/unicase/test-u8-casefold.c (check): Account for the possibility
112968         that malloc(0) = NULL.
112969         * tests/unicase/test-u8-tolower.c (check): Likewise.
112970         * tests/unicase/test-u8-totitle.c (check): Likewise.
112971         * tests/unicase/test-u8-toupper.c (check): Likewise.
112972         * tests/unicase/test-u16-casefold.c (check): Likewise.
112973         * tests/unicase/test-u16-tolower.c (check): Likewise.
112974         * tests/unicase/test-u16-totitle.c (check): Likewise.
112975         * tests/unicase/test-u16-toupper.c (check): Likewise.
112976         * tests/unicase/test-u32-casefold.c (check): Likewise.
112977         * tests/unicase/test-u32-tolower.c (check): Likewise.
112978         * tests/unicase/test-u32-totitle.c (check): Likewise.
112979         * tests/unicase/test-u32-toupper.c (check): Likewise.
112980         * tests/uninorm/test-u8-nfc.c (check): Likewise.
112981         * tests/uninorm/test-u8-nfd.c (check): Likewise.
112982         * tests/uninorm/test-u8-nfkc.c (check): Likewise.
112983         * tests/uninorm/test-u8-nfkd.c (check): Likewise.
112984         * tests/uninorm/test-u16-nfc.c (check): Likewise.
112985         * tests/uninorm/test-u16-nfd.c (check): Likewise.
112986         * tests/uninorm/test-u16-nfkc.c (check): Likewise.
112987         * tests/uninorm/test-u16-nfkd.c (check): Likewise.
112988         * tests/uninorm/test-u32-nfc.c (check): Likewise.
112989         * tests/uninorm/test-u32-nfd.c (check): Likewise.
112990         * tests/uninorm/test-u32-nfkc.c (check): Likewise.
112991         * tests/uninorm/test-u32-nfkd.c (check): Likewise.
112993 2009-04-05  Bruno Haible  <bruno@clisp.org>
112995         Work around an autoconf limitation.
112996         * gnulib-tool (func_emit_lib_Makefile_am): Omit the "Reproduce by"
112997         comment line if it would be longer than 3 KB.
112999 2009-04-05  Bruno Haible  <bruno@clisp.org>
113001         Avoid test failure with libiconv-1.13.
113002         * tests/test-striconveh.c (main): Allow result of libiconv 1.13 as one
113003         of the expected test results.
113005 2009-04-05  Bruno Haible  <bruno@clisp.org>
113007         * gnulib-tool (func_emit_lib_Makefile_am): Don't add the library to
113008         noinst_LTLIBRARIES if the Makefile.am in the same directory specifies
113009         that it should be installed.
113011 2009-04-05  Bruno Haible  <bruno@clisp.org>
113013         * gnulib-tool: New option --copy-file.
113014         (func_usage): Document it.
113015         (func_dest_tmpfilename): Moved out of func_import.
113016         (func_add_file, func_update_file): New functions, extracted from
113017         func_import.
113018         (func_import): Update.
113020 2009-04-05  Karl Berry  <karl@gnu.org>
113022         * README: prominently mention gnulib-tool.
113023         Rearrange sections so getting the code is near the top.
113025 2009-04-05  Bruno Haible  <bruno@clisp.org>
113027         * lib/unicase.h: Mention u*_cmp2.
113028         * lib/unicase/u-casecmp.h (FUNC): Invoke U_CMP2 instead of U_CMP.
113029         * lib/unicase/u8-casecmp.c: Use u8_cmp2 instead of u8_cmp.
113030         * lib/unicase/ulc-casecmp.c: Likewise.
113031         * lib/unicase/u16-casecmp.c: Use u16_cmp2 instead of u16_cmp.
113032         * lib/unicase/u32-casecmp.c: Use u32_cmp2 instead of u32_cmp.
113033         * modules/unicase/u8-casecmp (Depends-on): Add unistr/u8-cmp2, remove
113034         unistr/u8-cmp.
113035         * modules/unicase/ulc-casecmp (Depends-on): Likewise.
113036         * modules/unicase/u16-casecmp (Depends-on): Add unistr/u16-cmp2, remove
113037         unistr/u16-cmp.
113038         * modules/unicase/u32-casecmp (Depends-on): Add unistr/u32-cmp2, remove
113039         unistr/u32-cmp.
113041         * lib/uninorm.h: Mention u*_cmp2.
113042         * lib/uninorm/u-normcmp.h (FUNC): Invoke U_CMP2 instead of U_CMP.
113043         * lib/uninorm/u8-normcmp.c: Use u8_cmp2 instead of u8_cmp.
113044         * lib/uninorm/u16-normcmp.c: Use u16_cmp2 instead of u16_cmp.
113045         * lib/uninorm/u32-normcmp.c: Use u32_cmp2 instead of u32_cmp.
113046         * modules/uninorm/u8-normcmp (Depends-on): Add unistr/u8-cmp2, remove
113047         unistr/u8-cmp.
113048         * modules/uninorm/u16-normcmp (Depends-on): Add unistr/u16-cmp2, remove
113049         unistr/u16-cmp.
113050         * modules/uninorm/u32-normcmp (Depends-on): Add unistr/u32-cmp2, remove
113051         unistr/u32-cmp.
113053         New module 'unistr/u32-cmp2'.
113054         * lib/unistr/u32-cmp2.c: New file.
113055         * modules/unistr/u32-cmp2: New file.
113057         New module 'unistr/u16-cmp2'.
113058         * lib/unistr/u16-cmp2.c: New file.
113059         * modules/unistr/u16-cmp2: New file.
113061         New module 'unistr/u8-cmp2'.
113062         * lib/unistr.h (u8_cmp2, u16_cmp2, u32_cmp2): New declarations.
113063         * lib/unistr/u8-cmp2.c: New file.
113064         * lib/unistr/u-cmp2.h: New file.
113065         * modules/unistr/u8-cmp2: New file.
113067 2009-04-05  Bruno Haible  <bruno@clisp.org>
113069         * lib/unictype.h (uc_property_is_valid): New macro.
113070         * tests/unictype/test-pr_byname.c (main): Use it.
113072         * lib/unistr.h: Doc fixes.
113073         * lib/uniconv.h: Doc fixes.
113074         * lib/unictype.h: Doc fixes.
113076 2009-04-03  Paul Eggert  <eggert@cs.ucla.edu>
113078         Port coreutils 7.2 to Solaris 8.
113080         * modules/arpa_inet (arpa/inet.h): Depend on arpa_inet.in.h.
113081         * m4/inet_ntop.m4 (gl_INET_NTOP): Search for inet_ntop in -lnsl,
113082         for Solaris 8.  This is a bit of a hack, as it means it's the
113083         caller's responsibility to add -lnsl if needed, but most likely it
113084         won't be needed since only getaddrinfo uses this and getaddrinfo
113085         isn't needed on Solaris 8.
113087         * modules/fnmatch (Depends-on): Add mbsrtowcs, to fix a porting
113088         problem to Solaris 8 encountered with coreutils 7.2, which
113089         resulted in a message "fnmatch.c:292: warning: passing argument 4
113090         of 'mbsrtowcs' from incompatible pointer type".  Also, add mbsinit
113091         at the suggestion of Bruno Haible, since fnmatch uses mbsinit.
113093 2009-04-03  Simon Josefsson  <simon@josefsson.org>
113095         * m4/ld-version-script.m4: Add FIXME comment.
113097 2009-04-02  Simon Josefsson  <simon@josefsson.org>
113099         * doc/ld-output-def.texi: Use DLL_VERSION instead of confusing
113100         SOVERSION variable.
113102 2009-04-02  Bruno Haible  <bruno@clisp.org>
113104         * Makefile (info, html, dvi, pdf): Combine the rules.
113105         Suggested by Jim Meyering.
113107 2009-04-01  Bruno Haible  <bruno@clisp.org>
113109         * Makefile (info, html, dvi, pdf): New targets.
113110         Reported by Reuben Thomas <rrt@sc3d.org>.
113112 2009-04-01  Bruno Haible  <bruno@clisp.org>
113114         * doc/gnulib-tool.texi (Invoking gnulib-tool): Document how gnulib-tool
113115         can be put into PATH.
113116         Reported by Reuben Thomas <rrt@sc3d.org>. Suggested by Karl Berry.
113118 2009-04-01  Bruno Haible  <bruno@clisp.org>
113120         * doc/lib-symbol-visibility.texi: Follow texinfo style conventions.
113122 2009-04-01  Bruno Haible  <bruno@clisp.org>
113124         Rename module 'visibility'.
113125         * modules/lib-symbol-visibility: Renamed from modules/visibility.
113126         * doc/lib-symbol-visibility.texi: Renamed from visibility.texi.
113127         * doc/gnulib.texi: Update.
113128         * MODULES.html.sh (Misc): Update.
113129         * NEWS: Mention the change.
113131 2009-04-01  Simon Josefsson  <simon@josefsson.org>
113133         * modules/lib-msvc-compat: New module.  Thanks to Bruno Haible
113134         <bruno@clisp.org>, Ralf Wildenhues <Ralf.Wildenhues@gmx.de>, and
113135         Eric Blake <ebb9@byu.net> for review.
113136         * MODULES.html.sh: Add lib-msvc-compat.
113137         * doc/gnulib.texi: Link to new section.
113138         * m4/ld-output-def.m4: New file.
113139         * doc/ld-output-def.texi: New file.
113141 2009-04-01  Simon Josefsson  <simon@josefsson.org>
113143         Rename ld-version-script to lib-symbol-versions.  Suggested by
113144         Bruno Haible <bruno@clisp.org>.
113145         * modules/ld-version-script: Renamed to lib-symbol-versions.
113146         * doc/ld-version-script.texi: Fix module name.
113147         * MODULES.html.sh: Add lib-symbol-versions.
113149 2009-03-31  Simon Josefsson  <simon@josefsson.org>
113151         * modules/u64-tests: New file.
113152         * tests/test-u64.c: New file.
113154 2009-03-04  Simon Josefsson  <simon@josefsson.org>
113156         * MODULES.html.sh: Mention u64.
113157         * modules/u64: New module.
113158         * modules/crypto/sha512: Depend on u64 module instead of providing
113159         u64.h.
113161 2009-03-27  Eric Blake  <ebb9@byu.net>
113163         test-strerror: make debugging EAI_SYSTEM easier
113164         * modules/getaddrinfo-tests (Depends-on): Add strerror.
113165         * test-getaddrinfo.c (simple) [ENABLE_DEBUGGING]: Report errno if
113166         failure was EAI_SYSTEM.
113168 2009-03-25  Bruno Haible  <bruno@clisp.org>
113170         Fix a problem with --enable-relocatable on Solaris 7.
113171         * modules/relocatable-prog-wrapper (Depends-on): Add environ. Needed
113172         since 2008-02-24.
113174 2009-03-25  Eric Blake  <ebb9@byu.net>
113176         test-sockets: avoid gcc warning
113177         * tests/test-sockets.c (main): Silence compiler warning.
113179 2009-03-25  Paul Eggert  <eggert@cs.ucla.edu>
113181         New modules nproc, pthread, contributed by Glen Lenker.
113183         * MODULES.html.sh: Add pthread, nproc.
113184         * lib/nproc.c: New file.
113185         * lib/nproc.h: New file.
113186         * lib/pthread.in.h: New file.
113187         * m4/pthread.m4: New file.
113188         * modules/nproc: New file.
113189         * modules/pthread: New file.
113191 2009-03-24  Simon Josefsson  <simon@josefsson.org>
113193         * modules/unicase/locale-language-tests (test_locale_language_LDADD):
113194         New variable.
113196 2009-03-24  Kamil Dudka  <kdudka@redhat.com>
113198         filevercmp: handle simple~ and numbered.~3~ backup suffixes
113199         * lib/filevercmp.c: Handle simple~ and numbered.~3~ backup suffixes.
113200         * tests/test-filevercmp.c: Add tests for backup suffixes.
113202 2009-03-24  Simon Josefsson  <simon@josefsson.org>
113204         * modules/stdlib (Depends-on): Add stdint, needed when defining
113205         struct random_data on, for example, HP-UX 10.20.  Reported by
113206         Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
113208 2009-03-24  Simon Josefsson  <simon@josefsson.org>
113210         * lib/readline.c (readline): Call fflush on stdout after printing
113211         prompt.
113213 2009-03-20  Bruno Haible  <bruno@clisp.org>
113215         Remove dependency from 'close' module to -lws2_32 on native Windows.
113216         * lib/close-hook.h: New file.
113217         * lib/close-hook.c: New file.
113218         * lib/close.c: Include close-hook.h. Don't include <sys/socket.h>,
113219         w32sock.h.
113220         (_gl_close_fd_maybe_socket): Remove function.
113221         (rpl_close): Invoke execute_all_close_hooks instead of
113222         _gl_close_fd_maybe_socket.
113223         * lib/sockets.c: Include close-hook.h, w32sock.h.
113224         (close_fd_maybe_socket): New function, essentially from lib/close.c.
113225         (close_sockets_hook): New variable.
113226         (gl_sockets_startup): Register close_fd_maybe_socket as a hook.
113227         (gl_sockets_cleanup): Unregister it.
113228         * lib/unistd.in.h (HAVE__GL_CLOSE_FD_MAYBE_SOCKET): Remove macro.
113229         * m4/close.m4 (gl_REPLACE_CLOSE): Undo 2009-02-05 change.
113230         * modules/close-hook: New file.
113231         * modules/close (Files): Remove lib/w32sock.h.
113232         (Depends-on): Add close-hook.
113233         (Link): Remove section.
113234         * modules/sockets (Files): Add lib/w32sock.h.
113235         (Depends-on): Add close-hook.
113236         * modules/sys_socket (configure.ac): Remove gl_MODULE_INDICATOR
113237         invocation.
113238         * NEWS: Mention that LIB_CLOSE is gone.
113240 2009-03-23  Eric Blake  <ebb9@byu.net>
113242         signal-tests: test previous patch
113243         * tests/test-signal.c: New file.
113244         * modules/signal-tests: Likewise.
113246         signal.h: always support 'volatile sig_atomic_t'
113247         * m4/signal_h.m4 (gl_SIGNAL_H): Check for AIX limitation.
113248         (gl_SIGNAL_H_DEFAULTS): Add a default.
113249         * modules/signal (Makefile.am): Substitute if needed.
113250         * lib/signal.in.h (sig_atomic_t): Redefine if needed, so that
113251         users can blindly add volatile.
113252         * doc/posix-headers/signal.texi (signal.h): Document it.
113253         Reported by Matthew Woehlke.
113255 2009-03-23  Jim Meyering  <meyering@redhat.com>
113257         pathmax: PATH_MAX: use pathconf only when available
113258         * lib/pathmax.h (PATH_MAX): Select the pathconf-using definition
113259         only if HAVE_PATHCONF is defined.  Patch by Sylvain Beucler.
113260         * m4/pathmax.m4 (gl_PATHMAX): Check for pathconf.
113261         This avoids a link failure in a PSP cross-compilation environment
113262         described in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/17048
113264         * lib/vasnprintf.c (divide): Fix typo in comment.
113266 2009-03-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
113268         * gnulib-tool (func_filter_filelist): Fix comment.
113270 2009-03-20  Bruno Haible  <bruno@clisp.org>
113272         Make sockets.h self-contained.
113273         * lib/sockets.c: Include sockets.h first.
113274         * lib/sockets.h: Include <sys/socket.h> before using the SOCKET type.
113276 2009-03-19  Eric Blake  <ebb9@byu.net>
113278         doc: mention more functions added in cygwin 1.7.0
113279         * doc/posix-functions/log2.texi: Mention recent cygwin 1.7.0
113280         addition.
113281         * doc/posix-functions/log2f.texi: Likewise.
113283 2009-03-19  Jim Meyering  <meyering@redhat.com>
113285         fsusage: avoid syntax error due to statement-before-declaration
113286         * lib/fsusage.c (get_fs_usage): Put warning-avoidance statement
113287         after all declarations.  Reported by Matthew Woehlke in
113288         http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/16231
113290 2009-03-18  Eric Blake  <ebb9@byu.net>
113292         build-aux/compile: sync from automake
113293         * build-aux/compile: New file, from automake.
113294         * config/srclist.txt: Mention build-aux/compile.
113296 2009-03-17  Bruno Haible  <bruno@clisp.org>
113298         * lib/git-merge-changelog.c: Fix typo in comment.
113299         Reported by Reuben Thomas <rrt@sc3d.org>.
113301 2009-03-17  Reuben Thomas  <rrt@sc3d.org>
113303         * m4/regex.m4: update and improve help for
113304         --without-included-regex.
113306 2009-03-17  Simon Josefsson  <simon@josefsson.org>
113308         * modules/isnanl-nolibm-tests (Files): Add tests/nan.h to avoid
113309         failure on missing include files.
113311 2009-03-17  Eric Blake  <ebb9@byu.net>
113313         doc: mention more functions added in cygwin 1.7.0
113314         * doc/posix-functions/fwprintf.texi: Mention recent cygwin 1.7.0
113315         addition.
113316         * doc/posix-functions/fwscanf.texi: Likewise.
113317         * doc/posix-functions/swprintf.texi: Likewise.
113318         * doc/posix-functions/swscanf.texi: Likewise.
113319         * doc/posix-functions/vfwprintf.texi: Likewise.
113320         * doc/posix-functions/vfwscanf.texi: Likewise.
113321         * doc/posix-functions/vswprintf.texi: Likewise.
113322         * doc/posix-functions/vswscanf.texi: Likewise.
113323         * doc/posix-functions/vwprintf.texi: Likewise.
113324         * doc/posix-functions/vwscanf.texi: Likewise.
113325         * doc/posix-functions/wcscasecmp.texi: Likewise.
113326         * doc/posix-functions/wcsdup.texi: Likewise.
113327         * doc/posix-functions/wcsftime.texi: Likewise.
113328         * doc/posix-functions/wcsncasecmp.texi: Likewise.
113329         * doc/posix-functions/wprintf.texi: Likewise.
113330         * doc/posix-functions/wscanf.texi: Likewise.
113331         * doc/glibc-functions/gethostbyname2.texi: Likewise.
113333 2009-03-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
113335         maint.mk: really add $(AM_MAKEFLAGS)
113336         * top/maint.mk (init-coverage, build-coverage): `$(AM_MAKEFLAGS)'
113337         was inadvertently omitted in the last commit.
113338         Spotted by Bruno Haible.
113340         maint.mk: use $(MAKE) $(AM_MAKEFLAGS) not make
113341         * top/maint.mk (init-coverage, build-coverage): Use `$(MAKE)
113342         $(AM_MAKEFLAGS)' rather than plain `make'.
113344         gnulib-tool: execute $MAKE not make
113345         * gnulib-tool: Default $MAKE to 'make'.
113346         (func_create_testdir, func_create_megatestdir): Use $MAKE rather
113347         than make.  Initialize $MAKE in the do-autobuild script.
113349         gnulib-tool: use $MAKE not make in generated files
113350         * gnulib-tool (func_create_megatestdir): Use $MAKE rather than
113351         make, in generated files.  Initialize $MAKE in the do-autobuild
113352         script.
113354         * top/GNUmakefile (_have-git-version-gen): Fix typo.
113356         GNUmakefile: disable parallelism only for multiple, recursive targets
113357         * top/GNUmakefile (ALL_RECURSIVE_TARGETS): New macro; allow user
113358         additions in the Makefile.
113359         (AM_RECURSIVE_TARGETS): New macro, override only if not provided
113360         by Automake.
113361         (.NOTPARALLEL): Only disable parallel builds if multiple targets
113362         are listed on the command line and at least one of them is
113363         listed in $(ALL_RECURSIVE_TARGETS).
113365 2009-03-14  Bruno Haible  <bruno@clisp.org>
113367         * modules/unilbrk/u8-possible-linebreaks (Depends-on): Replace
113368         utf8-ucs4-unsafe with unistr/u8-mbtouc-unsafe.
113369         * modules/unilbrk/u8-width-linebreaks (Depends-on): Likewise.
113370         * modules/unilbrk/u16-possible-linebreaks (Depends-on): Replace
113371         utf16-ucs4-unsafe with unistr/u16-mbtouc-unsafe.
113372         * modules/unilbrk/u16-width-linebreaks (Depends-on): Likewise.
113373         * modules/unistr/u8-chr (Depends-on): Replace ucs4-utf8 with
113374         unistr/u8-uctomb.
113375         * modules/unistr/u8-strchr (Depends-on): Likewise.
113376         * modules/unistr/u8-strrchr (Depends-on): Likewise.
113377         * modules/unistr/u16-chr (Depends-on): Replace ucs4-utf16 with
113378         unistr/u16-uctomb.
113379         * modules/unistr/u16-strchr (Depends-on): Likewise.
113380         * modules/unistr/u16-strrchr (Depends-on): Likewise.
113382 2009-03-12  Bruno Haible  <bruno@clisp.org>
113384         Work around select() bug on Interix 3.5.
113385         * lib/sys_select.in.h (select): Also replace if REPLACE_SELECT is 1.
113386         * lib/select.c (rpl_select): Add an implementation for Unix platforms.
113387         * m4/select.m4: New file.
113388         * m4/sys_select_h.m4 (gl_SYS_SELECT_H_DEFAULTS): Initialize REPLACE_SELECT.
113389         * modules/sys_select (Makefile.am): Substitute REPLACE_SELECT.
113390         * modules/select (Files): Add m4/select.m4.
113391         (configure.ac): Move conditional to m4/select.m4. Invoke gl_FUNC_SELECT.
113392         * modules/nanosleep (Depends-on): Add select.
113393         * modules/poll (Depends-on): Likewise.
113394         * doc/posix-functions/select.texi: Mention the Interix bug.
113395         Reported by Markus Duft <mduft@gentoo.org>.
113397         * lib/select.c: Renamed from lib/winsock-select.c.
113398         * modules/select (Files): Add lib/select.c, remove
113399         lib/winsock-select.c.
113400         (configure.ac): Update.
113402 2009-03-12  Jim Meyering  <meyering@redhat.com>
113404         avoid gcc warnings about unused macro definitions
113405         * lib/readtokens.c (STREQ): Remove unused definition.
113406         * lib/xmalloc.c (SIZE_MAX): Likewise.
113407         * lib/openat-die.c (N_): Likewise.
113408         * lib/mountlist.c (SIZE_MAX): Remove definition.
113409         Instead, include <stdint.h>.
113410         * lib/readutmp.c: Likewise.
113411         * modules/readutmp (Depends-on): Add stdint.
113412         * modules/mountlist (Depends-on): Add stdint.
113413         * lib/userspec.c (ISDIGIT): Move definition into #if block where used.
113415 2009-03-10  Bruno Haible  <bruno@clisp.org>
113417         Tests for module 'mbmemcasecoll'.
113418         * modules/mbmemcasecoll-tests: New file.
113419         * tests/test-mbmemcasecoll1.sh: New file.
113420         * tests/test-mbmemcasecoll2.sh: New file.
113421         * tests/test-mbmemcasecoll3.sh: New file.
113422         * tests/test-mbmemcasecoll.c: New file.
113424         New module 'mbmemcasecoll'.
113425         * lib/mbmemcasecoll.h: New file.
113426         * lib/mbmemcasecoll.c: New file.
113427         * modules/mbmemcasecoll: New file.
113429         * tests/test-mbmemcasecmp.h: New file, extracted from
113430         tests/test-mbmemcasecmp.c.
113431         * tests/test-mbmemcasecmp.c: Include test-mbmemcasecmp.h.
113432         (test_ascii, test_iso_8859_1, test_utf_8): Remove functions.
113433         (main): Update.
113434         * modules/mbmemcasecmp-tests (Files): Add tests/test-mbmemcasecmp.h.
113436 2009-03-09  Bruno Haible  <bruno@clisp.org>
113438         Tests for module 'mbmemcasecmp'.
113439         * modules/mbmemcasecmp-tests: New file.
113440         * tests/test-mbmemcasecmp1.sh: New file.
113441         * tests/test-mbmemcasecmp2.sh: New file.
113442         * tests/test-mbmemcasecmp3.sh: New file.
113443         * tests/test-mbmemcasecmp.c: New file.
113445         New module 'mbmemcasecmp'.
113446         * lib/mbmemcasecmp.h: New file.
113447         * lib/mbmemcasecmp.c: New file.
113448         * modules/mbmemcasecmp: New file.
113450 2009-03-09  Bruno Haible  <bruno@clisp.org>
113452         Tests for module 'unicase/ulc-casecoll'.
113453         * modules/unicase/ulc-casecoll-tests: New file.
113454         * tests/unicase/test-ulc-casecoll1.sh: New file.
113455         * tests/unicase/test-ulc-casecoll2.sh: New file.
113456         * tests/unicase/test-ulc-casecoll.c: New file.
113458         New module 'unicase/ulc-casecoll'.
113459         * lib/unicase.h (ulc_casecoll): New declaration.
113460         * lib/unicase/ulc-casecoll.c: New file.
113461         * modules/unicase/ulc-casecoll: New file.
113463         New module 'unicase/ulc-casexfrm'.
113464         * lib/unicase.h (ulc_casexfrm): New declaration.
113465         * lib/unicase/ulc-casexfrm.c: New file.
113466         * modules/unicase/ulc-casexfrm: New file.
113468 2009-03-09  Bruno Haible  <bruno@clisp.org>
113470         Followup to 2008-12-22 commit: Remove unnecessary AC_FUNC_MBRTOWC
113471         invocations.
113473         * m4/mbscasecmp.m4: Remove file.
113474         * modules/mbscasecmp (Files): Remove it and m4/mbrtowc.m4
113475         (configure.ac): Remove gl_FUNC_MBSCASECMP invocation.
113477         * m4/mbscasestr.m4: Remove file.
113478         * modules/mbscasestr (Files): Remove it and m4/mbrtowc.m4
113479         (configure.ac): Remove gl_FUNC_MBSCASESTR invocation.
113481         * m4/mbschr.m4: Remove file.
113482         * modules/mbschr (Files): Remove it and m4/mbrtowc.m4
113483         (configure.ac): Remove gl_FUNC_MBSCHR invocation.
113485         * m4/mbscspn.m4: Remove file.
113486         * modules/mbscspn (Files): Remove it and m4/mbrtowc.m4
113487         (configure.ac): Remove gl_FUNC_MBSCSPN invocation.
113489         * m4/mbslen.m4: Remove file.
113490         * modules/mbslen (Files): Remove it and m4/mbrtowc.m4
113491         (configure.ac): Remove gl_FUNC_MBSLEN invocation.
113493         * m4/mbsncasecmp.m4: Remove file.
113494         * modules/mbsncasecmp (Files): Remove it and m4/mbrtowc.m4
113495         (configure.ac): Remove gl_FUNC_MBSNCASECMP invocation.
113497         * m4/mbsnlen.m4: Remove file.
113498         * modules/mbsnlen (Files): Remove it and m4/mbrtowc.m4
113499         (configure.ac): Remove gl_FUNC_MBSNLEN invocation.
113501         * m4/mbspbrk.m4: Remove file.
113502         * modules/mbspbrk (Files): Remove it and m4/mbrtowc.m4
113503         (configure.ac): Remove gl_FUNC_MBSPBRK invocation.
113505         * m4/mbspcasecmp.m4: Remove file.
113506         * modules/mbspcasecmp (Files): Remove it and m4/mbrtowc.m4
113507         (configure.ac): Remove gl_FUNC_MBSPCASECMP invocation.
113509         * m4/mbsrchr.m4: Remove file.
113510         * modules/mbsrchr (Files): Remove it and m4/mbrtowc.m4
113511         (configure.ac): Remove gl_FUNC_MBSRCHR invocation.
113513         * m4/mbssep.m4: Remove file.
113514         * modules/mbssep (Files): Remove it and m4/mbrtowc.m4
113515         (configure.ac): Remove gl_FUNC_MBSSEP invocation.
113517         * m4/mbsspn.m4: Remove file.
113518         * modules/mbsspn (Files): Remove it and m4/mbrtowc.m4
113519         (configure.ac): Remove gl_FUNC_MBSSPN invocation.
113521         * m4/mbsstr.m4: Remove file.
113522         * modules/mbsstr (Files): Remove it and m4/mbrtowc.m4
113523         (configure.ac): Remove gl_FUNC_MBSSTR invocation.
113525         * m4/mbstok_r.m4: Remove file.
113526         * modules/mbstok_r (Files): Remove it and m4/mbrtowc.m4
113527         (configure.ac): Remove gl_FUNC_MBSTOK_R invocation.
113529         * m4/mbswidth.m4 (gl_MBSWIDTH): Remove AC_FUNC_MBRTOWC invocation.
113531         * m4/quotearg.m4 (gl_QUOTEARG): Remove mbsinit test and
113532         AC_TYPE_MBSTATE_T, AC_FUNC_MBRTOWC invocations.
113534         * modules/trim (configure.ac): Remove AC_FUNC_MBRTOWC invocation.
113536 2009-03-08  Bruno Haible  <bruno@clisp.org>
113538         Tests for module 'unicase/ulc-casecmp'.
113539         * modules/unicase/ulc-casecmp-tests: New file.
113540         * tests/unicase/test-ulc-casecmp1.sh: New file.
113541         * tests/unicase/test-ulc-casecmp2.sh: New file.
113542         * tests/unicase/test-ulc-casecmp.c: New file.
113544         New module 'unicase/ulc-casecmp'.
113545         * lib/unicase.h (ulc_casecmp): New declaration.
113546         * lib/unicase/ulc-casecmp.c: New file.
113547         * lib/unicase/u-casecmp.h (FUNC): Change argument types to
113548         'const SRC_UNIT *'.
113549         * lib/unicase/u8-casecmp.c (SRC_UNIT): Define like UNIT.
113550         * lib/unicase/u16-casecmp.c (SRC_UNIT): Likewise.
113551         * lib/unicase/u32-casecmp.c (SRC_UNIT): Likewise.
113552         * modules/unicase/ulc-casecmp: New file.
113554         Tests for module 'unicase/u32-is-cased'.
113555         * modules/unicase/u32-is-cased-tests: New file.
113556         * tests/unicase/test-u32-is-cased.c: New file.
113558         Tests for module 'unicase/u16-is-cased'.
113559         * modules/unicase/u16-is-cased-tests: New file.
113560         * tests/unicase/test-u16-is-cased.c: New file.
113562         Tests for module 'unicase/u8-is-cased'.
113563         * modules/unicase/u8-is-cased-tests: New file.
113564         * tests/unicase/test-u8-is-cased.c: New file.
113565         * tests/unicase/test-is-cased.h: New file.
113567         New module 'unicase/u32-is-cased'.
113568         * lib/unicase/u32-is-cased.c: New file.
113569         * modules/unicase/u32-is-cased: New file.
113571         New module 'unicase/u16-is-cased'.
113572         * lib/unicase/u16-is-cased.c: New file.
113573         * modules/unicase/u16-is-cased: New file.
113575         New module 'unicase/u8-is-cased'.
113576         * lib/unicase/u8-is-cased.c: New file.
113577         * lib/unicase/u-is-cased.h: New file.
113578         * modules/unicase/u8-is-cased: New file.
113580         Tests for module 'unicase/u32-is-casefolded'.
113581         * modules/unicase/u32-is-casefolded-tests: New file.
113582         * tests/unicase/test-u32-is-casefolded.c: New file.
113584         Tests for module 'unicase/u16-is-casefolded'.
113585         * modules/unicase/u16-is-casefolded-tests: New file.
113586         * tests/unicase/test-u16-is-casefolded.c: New file.
113588         Tests for module 'unicase/u8-is-casefolded'.
113589         * modules/unicase/u8-is-casefolded-tests: New file.
113590         * tests/unicase/test-u8-is-casefolded.c: New file.
113591         * tests/unicase/test-is-casefolded.h: New file.
113593         New module 'unicase/u32-is-casefolded'.
113594         * lib/unicase/u32-is-casefolded.c: New file.
113595         * modules/unicase/u32-is-casefolded: New file.
113597         New module 'unicase/u16-is-casefolded'.
113598         * lib/unicase/u16-is-casefolded.c: New file.
113599         * modules/unicase/u16-is-casefolded: New file.
113601         New module 'unicase/u8-is-casefolded'.
113602         * lib/unicase/u8-is-casefolded.c: New file.
113603         * modules/unicase/u8-is-casefolded: New file.
113605         Tests for module 'unicase/u32-is-titlecase'.
113606         * modules/unicase/u32-is-titlecase-tests: New file.
113607         * tests/unicase/test-u32-is-titlecase.c: New file.
113609         Tests for module 'unicase/u16-is-titlecase'.
113610         * modules/unicase/u16-is-titlecase-tests: New file.
113611         * tests/unicase/test-u16-is-titlecase.c: New file.
113613         Tests for module 'unicase/u8-is-titlecase'.
113614         * modules/unicase/u8-is-titlecase-tests: New file.
113615         * tests/unicase/test-u8-is-titlecase.c: New file.
113616         * tests/unicase/test-is-titlecase.h: New file.
113618         New module 'unicase/u32-is-titlecase'.
113619         * lib/unicase/u32-is-titlecase.c: New file.
113620         * modules/unicase/u32-is-titlecase: New file.
113622         New module 'unicase/u16-is-titlecase'.
113623         * lib/unicase/u16-is-titlecase.c: New file.
113624         * modules/unicase/u16-is-titlecase: New file.
113626         New module 'unicase/u8-is-titlecase'.
113627         * lib/unicase/u8-is-titlecase.c: New file.
113628         * modules/unicase/u8-is-titlecase: New file.
113630         Tests for module 'unicase/u32-is-lowercase'.
113631         * modules/unicase/u32-is-lowercase-tests: New file.
113632         * tests/unicase/test-u32-is-lowercase.c: New file.
113634         Tests for module 'unicase/u16-is-lowercase'.
113635         * modules/unicase/u16-is-lowercase-tests: New file.
113636         * tests/unicase/test-u16-is-lowercase.c: New file.
113638         Tests for module 'unicase/u8-is-lowercase'.
113639         * modules/unicase/u8-is-lowercase-tests: New file.
113640         * tests/unicase/test-u8-is-lowercase.c: New file.
113641         * tests/unicase/test-is-lowercase.h: New file.
113643         New module 'unicase/u32-is-lowercase'.
113644         * lib/unicase/u32-is-lowercase.c: New file.
113645         * modules/unicase/u32-is-lowercase: New file.
113647         New module 'unicase/u16-is-lowercase'.
113648         * lib/unicase/u16-is-lowercase.c: New file.
113649         * modules/unicase/u16-is-lowercase: New file.
113651         New module 'unicase/u8-is-lowercase'.
113652         * lib/unicase/u8-is-lowercase.c: New file.
113653         * modules/unicase/u8-is-lowercase: New file.
113655         Tests for module 'unicase/u32-is-uppercase'.
113656         * modules/unicase/u32-is-uppercase-tests: New file.
113657         * tests/unicase/test-u32-is-uppercase.c: New file.
113659         Tests for module 'unicase/u16-is-uppercase'.
113660         * modules/unicase/u16-is-uppercase-tests: New file.
113661         * tests/unicase/test-u16-is-uppercase.c: New file.
113663         Tests for module 'unicase/u8-is-uppercase'.
113664         * modules/unicase/u8-is-uppercase-tests: New file.
113665         * tests/unicase/test-u8-is-uppercase.c: New file.
113666         * tests/unicase/test-is-uppercase.h: New file.
113668         New module 'unicase/u32-is-uppercase'.
113669         * lib/unicase/u32-is-uppercase.c: New file.
113670         * modules/unicase/u32-is-uppercase: New file.
113672         New module 'unicase/u16-is-uppercase'.
113673         * lib/unicase/u16-is-uppercase.c: New file.
113674         * modules/unicase/u16-is-uppercase: New file.
113676         New module 'unicase/u8-is-uppercase'.
113677         * lib/unicase/u8-is-uppercase.c: New file.
113678         * modules/unicase/u8-is-uppercase: New file.
113680         New module 'unicase/u32-is-invariant'.
113681         * lib/unicase/u32-is-invariant.c: New file.
113682         * modules/unicase/u32-is-invariant: New file.
113684         New module 'unicase/u16-is-invariant'.
113685         * lib/unicase/u16-is-invariant.c: New file.
113686         * modules/unicase/u16-is-invariant: New file.
113688         New module 'unicase/u8-is-invariant'.
113689         * lib/unicase/u8-is-invariant.c: New file.
113690         * lib/unicase/invariant.h: New file.
113691         * lib/unicase/u-is-invariant.h: New file.
113692         * modules/unicase/u8-is-invariant: New file.
113694         Tests for module 'unicase/u32-casecoll'.
113695         * modules/unicase/u32-casecoll-tests: New file.
113696         * tests/unicase/test-u32-casecoll.c: New file.
113698         Tests for module 'unicase/u16-casecoll'.
113699         * modules/unicase/u16-casecoll-tests: New file.
113700         * tests/unicase/test-u16-casecoll.c: New file.
113702         Tests for module 'unicase/u8-casecoll'.
113703         * modules/unicase/u8-casecoll-tests: New file.
113704         * tests/unicase/test-u8-casecoll.c: New file.
113706         New module 'unicase/u32-casecoll'.
113707         * lib/unicase/u32-casecoll.c: New file.
113708         * modules/unicase/u32-casecoll: New file.
113710         New module 'unicase/u16-casecoll'.
113711         * lib/unicase/u16-casecoll.c: New file.
113712         * modules/unicase/u16-casecoll: New file.
113714         New module 'unicase/u8-casecoll'.
113715         * lib/unicase/u8-casecoll.c: New file.
113716         * lib/unicase/u-casecoll.h: New file.
113717         * modules/unicase/u8-casecoll: New file.
113719         New module 'unicase/u32-casexfrm'.
113720         * lib/unicase/u32-casexfrm.c: New file.
113721         * modules/unicase/u32-casexfrm: New file.
113723         New module 'unicase/u16-casexfrm'.
113724         * lib/unicase/u16-casexfrm.c: New file.
113725         * modules/unicase/u16-casexfrm: New file.
113727         New module 'unicase/u8-casexfrm'.
113728         * lib/unicase/u8-casexfrm.c: New file.
113729         * lib/unicase/u-casexfrm.h: New file.
113730         * modules/unicase/u8-casexfrm: New file.
113732         Tests for module 'unicase/u32-casecmp'.
113733         * modules/unicase/u32-casecmp-tests: New file.
113734         * tests/unicase/test-u32-casecmp.c: New file.
113736         Tests for module 'unicase/u16-casecmp'.
113737         * modules/unicase/u16-casecmp-tests: New file.
113738         * tests/unicase/test-u16-casecmp.c: New file.
113740         Tests for module 'unicase/u8-casecmp'.
113741         * modules/unicase/u8-casecmp-tests: New file.
113742         * tests/unicase/test-u8-casecmp.c: New file.
113743         * tests/unicase/test-casecmp.h: New file.
113745         New module 'unicase/u32-casecmp'.
113746         * lib/unicase/u32-casecmp.c: New file.
113747         * modules/unicase/u32-casecmp: New file.
113749         New module 'unicase/u16-casecmp'.
113750         * lib/unicase/u16-casecmp.c: New file.
113751         * modules/unicase/u16-casecmp: New file.
113753         New module 'unicase/u8-casecmp'.
113754         * lib/unicase/u8-casecmp.c: New file.
113755         * lib/unicase/u-casecmp.h: New file.
113756         * modules/unicase/u8-casecmp: New file.
113758         Tests for module 'unicase/u32-casefold'.
113759         * modules/unicase/u32-casefold-tests: New file.
113760         * tests/unicase/test-u32-casefold.c: New file.
113762         Tests for module 'unicase/u16-casefold'.
113763         * modules/unicase/u16-casefold-tests: New file.
113764         * tests/unicase/test-u16-casefold.c: New file.
113766         Tests for module 'unicase/u8-casefold'.
113767         * modules/unicase/u8-casefold-tests: New file.
113768         * tests/unicase/test-u8-casefold.c: New file.
113770         New module 'unicase/u32-casefold'.
113771         * lib/unicase/u32-casefold.c: New file.
113772         * modules/unicase/u32-casefold: New file.
113774         New module 'unicase/u16-casefold'.
113775         * lib/unicase/u16-casefold.c: New file.
113776         * modules/unicase/u16-casefold: New file.
113778         New module 'unicase/u8-casefold'.
113779         * lib/unicase/u8-casefold.c: New file.
113780         * lib/unicase/u-casefold.h: New file.
113781         * modules/unicase/u8-casefold: New file.
113783         New module 'unicase/tocasefold'.
113784         * lib/unicase/casefold.h: New file.
113785         * lib/unicase/tocasefold.c: New file.
113786         * lib/unicase/tocasefold.h: New file, generated by gen-uni-tables.c.
113787         * modules/unicase/tocasefold: New file.
113789         Tests for module 'unicase/u32-totitle'.
113790         * modules/unicase/u32-totitle-tests: New file.
113791         * tests/unicase/test-u32-totitle.c: New file.
113793         Tests for module 'unicase/u16-totitle'.
113794         * modules/unicase/u16-totitle-tests: New file.
113795         * tests/unicase/test-u16-totitle.c: New file.
113797         Tests for module 'unicase/u8-totitle'.
113798         * modules/unicase/u8-totitle-tests: New file.
113799         * tests/unicase/test-u8-totitle.c: New file.
113801         New module 'unicase/u32-totitle'.
113802         * lib/unicase/u32-totitle.c: New file.
113803         * modules/unicase/u32-totitle: New file.
113805         New module 'unicase/u16-totitle'.
113806         * lib/unicase/u16-totitle.c: New file.
113807         * modules/unicase/u16-totitle: New file.
113809         New module 'unicase/u8-totitle'.
113810         * lib/unicase/u8-totitle.c: New file.
113811         * lib/unicase/u-totitle.h: New file.
113812         * modules/unicase/u8-totitle: New file.
113814         Tests for module 'unicase/u32-tolower'.
113815         * modules/unicase/u32-tolower-tests: New file.
113816         * tests/unicase/test-u32-tolower.c: New file.
113818         Tests for module 'unicase/u16-tolower'.
113819         * modules/unicase/u16-tolower-tests: New file.
113820         * tests/unicase/test-u16-tolower.c: New file.
113822         Tests for module 'unicase/u8-tolower'.
113823         * modules/unicase/u8-tolower-tests: New file.
113824         * tests/unicase/test-u8-tolower.c: New file.
113826         New module 'unicase/u32-tolower'.
113827         * lib/unicase/u32-tolower.c: New file.
113828         * modules/unicase/u32-tolower: New file.
113830         New module 'unicase/u16-tolower'.
113831         * lib/unicase/u16-tolower.c: New file.
113832         * modules/unicase/u16-tolower: New file.
113834         New module 'unicase/u8-tolower'.
113835         * lib/unicase/u8-tolower.c: New file.
113836         * modules/unicase/u8-tolower: New file.
113838         Tests for module 'unicase/u32-toupper'.
113839         * modules/unicase/u32-toupper-tests: New file.
113840         * tests/unicase/test-u32-toupper.c: New file.
113842         Tests for module 'unicase/u16-toupper'.
113843         * modules/unicase/u16-toupper-tests: New file.
113844         * tests/unicase/test-u16-toupper.c: New file.
113846         Tests for module 'unicase/u8-toupper'.
113847         * modules/unicase/u8-toupper-tests: New file.
113848         * tests/unicase/test-u8-toupper.c: New file.
113850         New module 'unicase/u32-toupper'.
113851         * lib/unicase/u32-toupper.c: New file.
113852         * modules/unicase/u32-toupper: New file.
113854         New module 'unicase/u16-toupper'.
113855         * lib/unicase/u16-toupper.c: New file.
113856         * modules/unicase/u16-toupper: New file.
113858         New module 'unicase/u8-toupper'.
113859         * lib/unicase/u8-toupper.c: New file.
113860         * modules/unicase/u8-toupper: New file.
113862         New module 'unicase/u32-casemap'.
113863         * lib/unicase/u32-casemap.c: New file.
113864         * modules/unicase/u32-casemap: New file.
113866         New module 'unicase/u16-casemap'.
113867         * lib/unicase/u16-casemap.c: New file.
113868         * modules/unicase/u16-casemap: New file.
113870         New module 'unicase/u8-casemap'.
113871         * lib/unicase/unicasemap.h: New file.
113872         * lib/unicase/u8-casemap.c: New file.
113873         * lib/unicase/u-casemap.h: New file.
113874         * modules/unicase/u8-casemap: New file.
113876         New module 'unicase/special-casing'.
113877         * lib/unicase/special-casing.h: New file.
113878         * lib/unicase/special-casing.c: New file.
113879         * lib/unicase/special-casing-table.gperf: New file, generated by
113880         gen-uni-tables.c.
113881         * modules/unicase/special-casing: New file.
113883         Tests for module 'unicase/locale-language'.
113884         * modules/unicase/locale-language-tests: New file.
113885         * tests/unicase/test-locale-language.sh: New file.
113886         * tests/unicase/test-locale-language.c: New file.
113888         New module 'unicase/locale-language'.
113889         * lib/unicase/locale-language.c: New file.
113890         * lib/unicase/locale-languages.gperf: New file.
113891         * modules/unicase/locale-language: New file.
113893         Generate more tables for case conversion and case folding.
113894         * lib/gen-uni-tables.c (SCC_*): New enum items.
113895         (struct special_casing_rule): New type.
113896         (casing_rules, num_casing_rules, allocated_casing_rules): New
113897         variables.
113898         (add_casing_rule, fill_casing_rules): New functions.
113899         (struct casefold_rule): New type.
113900         (casefolding_rules, num_casefolding_rules,
113901         allocated_casefolding_rules): New variables.
113902         (fill_casefolding_rules): New function.
113903         (unicode_casefold): New variable.
113904         (to_casefold, redistribute_casefolding_rules, compare_casing_rules,
113905         sort_casing_rules, output_casing_rules): New functions.
113906         (main): Accept to more arguments: SpecialCasing.txt and
113907         CaseFolding.txt. Invoke fill_casing_rules, fill_casefolding_rules,
113908         redistribute_casefolding_rules, sort_casing_rules, output_casing_rules.
113909         Output mapping for casefolding.
113911         * lib/unicase.h: Include stdbool.h, uninorm.h.
113912         (u8_toupper, u16_toupper, u32_toupper, u8_tolower, u16_tolower,
113913         u32_tolower, u8_totitle, u16_totitle, u32_totitle): Add nf argument.
113914         (u8_casefold, u16_casefold, u32_casefold): Add iso639_language and nf
113915         arguments.
113916         (u8_casecmp, u16_casecmp, u32_casecmp): Add iso639_language, nf,
113917         resultp arguments.
113918         (u8_casexfrm, u16_casexfrm, u32_casexfrm): New declarations.
113919         (u8_casecoll, u16_casecoll, u32_casecoll): Add iso639_language, nf,
113920         resultp arguments.
113921         (u8_is_uppercase, u16_is_uppercase, u32_is_uppercase, u8_is_lowercase,
113922         u16_is_lowercase, u32_is_lowercase, u8_is_titlecase, u16_is_titlecase,
113923         u32_is_titlecase, u8_is_casefolded, u16_is_casefolded,
113924         u32_is_casefolded, u8_is_cased, u16_is_cased, u32_is_cased): New
113925         declarations.
113926         * modules/unicase/base (Depends-on): Add uninorm/base, stdbool.
113928 2009-03-08  Bruno Haible  <bruno@clisp.org>
113930         * lib/uninorm.h (u8_normcmp, u16_normcmp, u32_normcmp, u8_normcoll,
113931         u16_normcoll, u32_normcoll): Rename argument 'result' to 'resultp'.
113932         * lib/uninorm/u-normcmp.h (FUNC): Likewise.
113933         * lib/uninorm/u-normcoll.h (FUNC): Likewise.
113935 2009-03-07  Bruno Haible  <bruno@clisp.org>
113937         Adjust u*_normcmp, u*_normcoll API.
113938         * lib/uninorm.h (u8_normcmp, u16_normcmp, u32_normcmp, u8_normcoll,
113939         u16_normcoll, u32_normcoll): Change failure conventions.
113940         * lib/uninorm/u-normcmp.h (FUNC): Upon failure, store the error code in
113941         errno and return -1.
113942         * lib/uninorm/u-normcoll.h (FUNC): Likewise.
113944 2009-03-07  Bruno Haible  <bruno@clisp.org>
113946         Tests for module 'uninorm/u32-normcoll'.
113947         * modules/uninorm/u32-normcoll-tests: New file.
113948         * tests/uninorm/test-u32-normcoll.c: New file.
113950         Tests for module 'uninorm/u16-normcoll'.
113951         * modules/uninorm/u16-normcoll-tests: New file.
113952         * tests/uninorm/test-u16-normcoll.c: New file.
113954         Tests for module 'uninorm/u8-normcoll'.
113955         * modules/uninorm/u8-normcoll-tests: New file.
113956         * tests/uninorm/test-u8-normcoll.c: New file.
113958 2009-03-07  Bruno Haible  <bruno@clisp.org>
113960         * tests/uninorm/test-u32-normcmp.h: New file, extracted from
113961         tests/uninorm/test-u32-normcmp.c.
113962         * tests/uninorm/test-u32-normcmp.c: Include it.
113963         (test_nonascii): New function, extracted from main. Add some more
113964         tests.
113965         (main): Invoke test_ascii and test_nonascii.
113966         * modules/uninorm/u32-normcmp-tests (Files): Add
113967         tests/uninorm/test-u32-normcmp.h.
113968         (Depends-on): Remove uninorm/u32-normcmp.
113970         * tests/uninorm/test-u16-normcmp.h: New file, extracted from
113971         tests/uninorm/test-u16-normcmp.c.
113972         * tests/uninorm/test-u16-normcmp.c: Include it.
113973         (test_nonascii): New function, extracted from main. Add some more
113974         tests.
113975         (main): Invoke test_ascii and test_nonascii.
113976         * modules/uninorm/u16-normcmp-tests (Files): Add
113977         tests/uninorm/test-u16-normcmp.h.
113978         (Depends-on): Remove uninorm/u16-normcmp.
113980         * tests/uninorm/test-u8-normcmp.h: New file, extracted from
113981         tests/uninorm/test-u8-normcmp.c.
113982         * tests/uninorm/test-u8-normcmp.c: Include it.
113983         (test_nonascii): New function, extracted from main. Add some more
113984         tests.
113985         (main): Invoke test_ascii and test_nonascii.
113986         * modules/uninorm/u8-normcmp-tests (Files): Add
113987         tests/uninorm/test-u8-normcmp.h.
113988         (Depends-on): Remove uninorm/u8-normcmp.
113990 2009-03-07  Bruno Haible  <bruno@clisp.org>
113992         New module 'uninorm/u32-normcoll'.
113993         * lib/uninorm/u32-normcoll.c: New file.
113994         * modules/uninorm/u32-normcoll: New file.
113996         New module 'uninorm/u16-normcoll'.
113997         * lib/uninorm/u16-normcoll.c: New file.
113998         * modules/uninorm/u16-normcoll: New file.
114000         New module 'uninorm/u8-normcoll'.
114001         * lib/uninorm.h (u8_normcoll, u16_normcoll, u32_normcoll): New
114002         declarations.
114003         * lib/uninorm/u8-normcoll.c: New file.
114004         * lib/uninorm/u-normcoll.h: New file.
114005         * modules/uninorm/u8-normcoll: New file.
114007         New module 'uninorm/u32-normxfrm'.
114008         * lib/uninorm/u32-normxfrm.c: New file.
114009         * modules/uninorm/u32-normxfrm: New file.
114011         New module 'uninorm/u16-normxfrm'.
114012         * lib/uninorm/u16-normxfrm.c: New file.
114013         * modules/uninorm/u16-normxfrm: New file.
114015         New module 'uninorm/u8-normxfrm'.
114016         * lib/uninorm.h (u8_normxfrm, u16_normxfrm, u32_normxfrm): New
114017         declarations.
114018         * lib/uninorm/u8-normxfrm.c: New file.
114019         * lib/uninorm/u-normxfrm.h: New file.
114020         * modules/uninorm/u8-normxfrm: New file.
114022 2009-03-07  Bruno Haible  <bruno@clisp.org>
114024         * modules/uninorm/u8-normcmp (Depends-on): Add uninorm/base.
114025         * modules/uninorm/u16-normcmp (Depends-on): Likewise.
114026         * modules/uninorm/u32-normcmp (Depends-on): Likewise.
114028 2009-03-07  Bruno Haible  <bruno@clisp.org>
114030         New module 'memxfrm'.
114031         * lib/memxfrm.h: New file.
114032         * lib/memxfrm.c: New file.
114033         * modules/memxfrm: New file.
114035 2009-03-07  Bruno Haible  <bruno@clisp.org>
114037         New module 'memcmp2'.
114038         * lib/memcmp2.h: New file.
114039         * lib/memcmp2.c: New file.
114040         * modules/memcmp2: New file.
114042 2009-03-07  Bruno Haible  <bruno@clisp.org>
114044         Tests for module 'uninorm/decomposing-form'.
114045         * modules/uninorm/decomposing-form-tests: New file.
114046         * tests/uninorm/test-decomposing-form.c: New file.
114048         New module 'uninorm/decomposing-form'.
114049         * lib/uninorm.h (uninorm_decomposing_form): New declaration.
114050         * lib/uninorm/normalize-internal.h (struct unicode_normalization_form):
114051         Add 'decomposing_variant' field.
114052         * lib/uninorm/decomposing-form.c: New file.
114053         * lib/uninorm/nfc.c (uninorm_nfc): Update.
114054         * lib/uninorm/nfd.c (uninorm_nfd): Update.
114055         * lib/uninorm/nfkc.c (uninorm_nfkc): Update.
114056         * lib/uninorm/nfkd.c (uninorm_nfkd): Update.
114057         * modules/uninorm/decomposing-form: New file.
114058         * modules/uninorm/nfc (Depends-on): Add uninorm/nfd.
114059         * modules/uninorm/nfkc (Depends-on): Add uninorm/nfkd.
114061 2009-03-07  Bruno Haible  <bruno@clisp.org>
114063         * lib/uninorm/u-normcmp.h (FUNC): Use stack=allocated buffers for small
114064         strings.
114066 2009-03-06  Bruno Haible  <bruno@clisp.org>
114068         Tests for module 'uninorm/u32-normcmp'.
114069         * tests/uninorm/test-u32-normcmp.c: New file.
114070         * modules/uninorm/u32-normcmp-tests: New file.
114072         Tests for module 'uninorm/u16-normcmp'.
114073         * tests/uninorm/test-u16-normcmp.c: New file.
114074         * modules/uninorm/u16-normcmp-tests: New file.
114076         Tests for module 'uninorm/u8-normcmp'.
114077         * tests/uninorm/test-u8-normcmp.c: New file.
114078         * modules/uninorm/u8-normcmp-tests: New file.
114080         New module 'uninorm/u32-normcmp'.
114081         * lib/uninorm/u32-normcmp.c: New file.
114082         * modules/uninorm/u32-normcmp: New file.
114084         New module 'uninorm/u16-normcmp'.
114085         * lib/uninorm/u16-normcmp.c: New file.
114086         * modules/uninorm/u16-normcmp: New file.
114088         New module 'uninorm/u8-normcmp'.
114089         * lib/uninorm.h (u8_normcmp, u16_normcmp, u32_normcmp): New
114090         declarations.
114091         * lib/uninorm/u8-normcmp.c: New file.
114092         * lib/uninorm/u-normcmp.h: New file.
114093         * modules/uninorm/u8-normcmp: New file.
114095 2009-03-06  Bruno Haible  <bruno@clisp.org>
114097         * lib/w32spawn.h (dup_noinherit): Add cast, to avoid gcc warning.
114098         Reported by Eric Blake.
114100 2009-03-06  Eric Blake  <ebb9@byu.net>
114101             Bruno Haible  <bruno@clisp.org>
114103         * lib/spawni.c (__spawni) [WIN32_NATIVE]: Define as a stub.
114104         * modules/posix_spawn-tests (configure.ac): Define POSIX_SPAWN_PORTED
114105         condition.
114106         (Makefile.am): Do nothing if POSIX_SPAWN_PORTED is false.
114107         * modules/posix_spawnp-tests (configure.ac): Define POSIX_SPAWN_PORTED
114108         condition.
114109         (Makefile.am): Do nothing if POSIX_SPAWN_PORTED is false.
114111 2009-03-06  Eric Blake  <ebb9@byu.net>
114113         * lib/execute.c (execute) [WIN32_NATIVE]: Cast arguments of spawnvpe,
114114         to avoid compiler warnings.
114115         * lib/pipe.c (create_pipe) [WIN32_NATIVE]: Likewise.
114117 2009-03-05  Bruno Haible  <bruno@clisp.org>
114119         * tests/test-ftell.c (main): Disable test beyond end of file on
114120         FreeMiNT.
114121         Patch by Alan Hourihane <alanh@fairlite.co.uk>.
114123 2009-03-05  Kamil Dudka  <kdudka@redhat.com>
114125         * lib/filevercmp.c: Move hidden files up in ordering.
114126         * tests/test-filevercmp.c: Add tests for hidden files.
114128 2009-03-04  Bruno Haible  <bruno@clisp.org>
114130         * modules/visibility (Makefile.am): Augment AM_CFLAGS.
114131         * gnulib-tool (func_emit_lib_Makefile_am): Emit initialization of
114132         AM_CFLAGS.
114133         Reported by Simon Josefsson.
114135 2009-03-03  Bruno Haible  <bruno@clisp.org>
114137         * doc/visibility.texi: Recommend to use HAVE_VISIBILITY as a C macro.
114138         Reported by Simon Josefsson.
114140         * doc/ld-version-script.texi: Update node reference.
114142 2009-03-03  Bruno Haible  <bruno@clisp.org>
114144         * modules/visibility (License): Change to 'unlimited'.
114145         Suggested by Simon Josefsson.
114147 2009-03-03  Jim Meyering  <meyering@redhat.com>
114149         unlinkdir: cannot_unlink_dir may modify process state
114150         * lib/unlinkdir.c (cannot_unlink_dir): Add a comment warning that
114151         it's neither thread-safe nor appropriate for use in a library.
114153 2009-03-03  Eric Blake  <ebb9@byu.net>
114155         test-closein: silence test under Darwin
114156         * tests/test-closein.sh: Ignore stderr from cat, since we don't
114157         care if it dies from EPIPE or EBADF.
114159 2009-03-03  Bruno Haible  <bruno@clisp.org>
114161         * doc/gnulib.texi: Include visibility.texi and ld-version-script.texi
114162         earlier.
114163         * doc/visibility.texi: Fix @node and @section.
114165 2009-03-03  Simon Josefsson  <simon@josefsson.org>
114167         * doc/gnulib.texi: Link to sections for ld version script and
114168         visibility.
114169         * doc/visibility.texi: Add @node and @section.
114170         * modules/ld-version-script: New module.
114171         * m4/ld-version-script.m4: New file.
114172         * doc/ld-version-script.texi: New file.
114174 2009-03-02  David Lutterkort  <lutter@redhat.com>
114176         * lib/safe-alloc.h (__GNUC_PREREQ): New macro.
114177         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
114179 2009-03-02  Bruno Haible  <bruno@clisp.org>
114181         * doc/visibility.texi: Mention libtool's -export-symbols option.
114183 2009-03-02  Jim Meyering  <meyering@redhat.com>
114185         announce-gen: new option: --no-print-checksums
114186         * build-aux/announce-gen (usage): Describe it.
114187         (print_checksums): Print a newline here, not in the [*] footnote.
114188         (main): Honor it.
114190 2009-03-01  Bruno Haible  <bruno@clisp.org>
114192         Use socklen_t in the native Windows replacements prototypes.
114193         * lib/sys_socket.in.h (rpl_getsockopt, rpl_setsockopt): Use socklen_t
114194         instead of 'int'.
114195         * lib/getsockopt.c (rpl_getsockopt): Likewise.
114196         * lib/setsockopt.c (rpl_setsockopt): Likewise.
114197         * modules/getsockopt (Depends-on): Add socklen.
114198         * modules/setsockopt (Depends-on): Add socklen.
114200 2009-03-01  Bruno Haible  <bruno@clisp.org>
114202         * gnulib-tool (sed): Do alias as "sed --posix" if sed's version is at
114203         least 4.2.
114205 2009-03-01  Eric Blake  <ebb9@byu.net>
114206             Bruno Haible  <bruno@clisp.org>
114208         * lib/wait-process.h (wait_subprocess): Describe effect of termsigp on
114209         error messages.
114210         * lib/wait-process.c (wait_subprocess): Omit error message about
114211         deadly signal sent to the child of termsigp != NULL.
114213 2009-03-01  Eric Blake  <ebb9@byu.net>
114215         * lib/wait-process.c (wait_subprocess): Remove unnecessary cast.
114217 2009-03-01  Bruno Haible  <bruno@clisp.org>
114219         Avoid a gcc warning.
114220         * tests/test-sched.c (b): Make global.
114221         Reported by Eric Blake.
114223 2009-01-19  Martin Lambers  <marlam@marlam.de>
114225         Provide POSIX semantics for socket timeout options on W32.
114226         * lib/setsockopt.c: Convert struct timeval to milliseconds on W32.
114227         * lib/getsockopt.c: Convert milliseconds to struct timeval on W32.
114228         * modules/setsockopt: Depend on sys_time module for struct timeval.
114229         * modules/getsockopt: Depend on sys_time module for struct timeval.
114231 2009-03-01  Simon Josefsson  <simon@josefsson.org>
114233         * lib/gai_strerror.c (values): Use EAI_INPROGRESS instead of
114234         __USE_GNU, for consistency with netdb.in.h.
114235         Reported by Alan Hourihane <alanh@fairlite.co.uk>.
114237 2009-03-01  Bruno Haible  <bruno@clisp.org>
114239         More support for FreeMiNT.
114240         * lib/fseeko.c (rpl_fseeko): Complete last commit.
114241         Reported by Alan Hourihane <alanh@fairlite.co.uk>.
114243 2009-03-01  Bruno Haible  <bruno@clisp.org>
114245         More support for FreeMiNT.
114246         * lib/fpurge.c (fpurge): Correct last commit.
114247         Reported by Alan Hourihane <alanh@fairlite.co.uk>.
114249 2009-03-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
114251         Fix unportable awk script in vc-list-files.
114252         * build-aux/vc-list-files: In the replacement awk script, use
114253         substr with a second argument of 1, not zero.
114254         Report by Simon Josefsson.
114256 2009-02-28  Bruno Haible  <bruno@clisp.org>
114258         More support for FreeMiNT.
114259         * lib/freading.c (freading) [__MINT__]: Use new macros that were added
114260         to FreeMiNT today.
114261         * lib/fwriting.c (fwriting): Likewise.
114262         Based on patch by Alan Hourihane <alanh@fairlite.co.uk>.
114264 2009-02-28  Bruno Haible  <bruno@clisp.org>
114266         * tests/test-freadseek.c (main): Disable test beyond end of file on
114267         FreeMiNT.
114268         * tests/test-ftello.c (main): Likewise.
114269         Patch by Alan Hourihane <alanh@fairlite.co.uk>.
114271 2009-02-28  Bruno Haible  <bruno@clisp.org>
114273         Add tentative support for FreeMiNT.
114274         * lib/fbufmode.c (fbufmode) [__MINT__]: Add conditional code.
114275         * lib/fpurge.c (fpurge): Likewise.
114276         * lib/freadable.c (freadable): Likewise.
114277         * lib/freading.c (freading): Likewise.
114278         * lib/freadptr.c (freadptr): Likewise.
114279         * lib/freadseek.c (freadptrinc): Likewise.
114280         * lib/fseeko.c (rpl_fseeko): Likewise.
114281         * lib/fseterr.c (fseterr): Likewise.
114282         * lib/fwritable.c (fwritable): Likewise.
114283         * lib/fwriting.c (fwriting): Likewise.
114284         * lib/freadahead.c (freadahead): Likewise, based on code by Alan
114285         Hourihane.
114286         Reported by Alan Hourihane <alanh@fairlite.co.uk>.
114288 2009-02-28  Bruno Haible  <bruno@clisp.org>
114290         * lib/wait-process.h (wait_subprocess): Clarify restriction regarding
114291         SIGCHLD.
114292         Reported by Jim Meyering.
114294 2009-02-28  Bruno Haible  <bruno@clisp.org>
114296         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LS): Separate the two first tests.
114297         Mention the results of these tests on various platforms.
114298         * doc/posix-functions/fprintf.texi: Mention platforms in canonical
114299         order.
114300         * doc/posix-functions/printf.texi: Likewise.
114301         * doc/posix-functions/snprintf.texi: Likewise.
114302         * doc/posix-functions/sprintf.texi: Likewise.
114303         * doc/posix-functions/vfprintf.texi: Likewise.
114304         * doc/posix-functions/vprintf.texi: Likewise.
114305         * doc/posix-functions/vsnprintf.texi: Likewise.
114306         * doc/posix-functions/vsprintf.texi: Likewise.
114307         * doc/glibc-functions/obstack_printf.texi: Likewise.
114308         * doc/glibc-functions/obstack_vprintf.texi: Likewise.
114310 2009-02-28  Bruno Haible  <bruno@clisp.org>
114312         * build-aux/po/Makefile.in.in: Update from GNU gettext 0.17.
114313         Reported by Loïc Minier <lool@dooz.org>.
114315 2009-02-27  Bruno Haible  <bruno@clisp.org>
114317         * gnulib-tool (func_import): Make the sed expression used to create the
114318         sed script for updating the .gitignore file POSIX compliant.
114319         Reported by Eric Blake.
114321 2009-02-27  Bruno Haible  <bruno@clisp.org>
114323         * gnulib-tool (sed): Don't alias as "sed --posix".
114324         Reported by Eric Blake.
114326 2009-02-27  Bruno Haible  <bruno@clisp.org>
114328         Avoid test link errors.
114329         * modules/uninorm/nfc-tests (test_u32_nfc_big_LDADD): New variable.
114330         * modules/uninorm/nfd-tests (test_u32_nfd_big_LDADD): New variable.
114331         * modules/uninorm/nfkc-tests (test_u32_nfkc_big_LDADD): New variable.
114332         * modules/uninorm/nfkd-tests (test_u32_nfkd_big_LDADD): New variable.
114333         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
114335 2009-02-27  Bruno Haible  <bruno@clisp.org>
114337         Avoid spurious "(cached)" in configure output.
114338         * m4/gnulib-common.m4 (gl_CACHE_VAL_SILENT): New macro.
114339         * m4/ceil.m4 (gl_FUNC_CEIL_LIBS): Use it instead of AC_CACHE_VAL.
114340         * m4/ceilf.m4 (gl_FUNC_CEILF_LIBS): Likewise.
114341         * m4/ceill.m4 (gl_FUNC_CEILL_LIBS): Likewise.
114342         * m4/floor.m4 (gl_FUNC_FLOOR_LIBS): Likewise.
114343         * m4/floorf.m4 (gl_FUNC_FLOORF_LIBS): Likewise.
114344         * m4/floorl.m4 (gl_FUNC_FLOORL_LIBS): Likewise.
114345         * m4/stdarg.m4 (gl_STDARG_H): Likewise.
114346         Reported by Eric Blake.
114348 2009-02-27  Eric Blake  <ebb9@byu.net>
114350         printf: fix regression in previous patch
114351         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LS): Fix compilation error.
114353 2009-02-27  Bruno Haible  <bruno@clisp.org>
114355         * lib/inttypes.in.h: Test merely whether _LP64 is defined, not its
114356         value.
114357         * lib/stdint.in.h: Likewise.
114358         Suggested by Eric Blake. Reported by Peter Bray <pdb_ml@yahoo.com.au>.
114360 2009-02-27  Eric Blake  <ebb9@byu.net>
114362         doc: mention more functions added in cygwin 1.7.0
114363         * doc/posix-functions/mbsnrtowcs.texi: Mention recent cygwin 1.7.0
114364         addition.
114365         * doc/posix-functions/open_wmemstream.texi: Likewise.
114366         * doc/posix-functions/wcsnlen.texi: Likewise.
114367         * doc/posix-functions/wcsnrtombs.texi: Likewise.
114368         * doc/posix-functions/wcstod.texi: Likewise.
114369         * doc/posix-functions/wcstof.texi: Likewise.
114370         * doc/posix-functions/wcstoimax.texi: Likewise.
114371         * doc/posix-functions/wcstok.texi: Likewise.
114372         * doc/posix-functions/wcstoumax.texi: Likewise.
114374         Detect bug in cygwin 1.5.x *printf on 1-character %ls.
114375         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LS): Enhance filter.
114376         * doc/posix-functions/fprintf.texi: Update.
114377         * doc/posix-functions/printf.texi: Update.
114378         * doc/posix-functions/snprintf.texi: Update.
114379         * doc/posix-functions/sprintf.texi: Update.
114380         * doc/posix-functions/vfprintf.texi: Update.
114381         * doc/posix-functions/vprintf.texi: Update.
114382         * doc/posix-functions/vsnprintf.texi: Update.
114383         * doc/posix-functions/vsprintf.texi: Update.
114384         * doc/glibc-functions/obstack_printf.texi: Update.
114385         * doc/glibc-functions/obstack_vprintf.texi: Update.
114387 2009-02-26  Eric Blake  <ebb9@byu.net>
114389         avoid gcc 3.4.3 bug on long double NaN on Irix 6.5
114390         * tests/nan.h (NaNl): Rewrite as function on Irix, to avoid
114391         compilation bug by using runtime conversion.
114392         * m4/isfinite.m4 (gl_ISFINITE): Likewise.
114393         * m4/isnanl.m4 (gl_FUNC_ISNANL): Likewise.
114394         * modules/ceill-tests (Files): Use nan.h.
114395         * modules/floorl-tests (Files): Likewise.
114396         * modules/frexpl-tests (Files): Likewise.
114397         * modules/isnanl-tests (Files): Likewise.
114398         * modules/ldexpl-tests (Files): Likewise.
114399         * modules/roundl-tests (Files): Likewise.
114400         * modules/truncl-tests (Files): Likewise.
114401         * tests/test-ceill.c (main): Use a working NaN.
114402         * tests/test-floorl.c (main): Likewise.
114403         * tests/test-frexpl.c (main): Likewise.
114404         * tests/test-isnan.c (test_long_double): Likewise.
114405         * tests/test-isnanl.h (main): Likewise.
114406         * tests/test-ldexpl.h (main): Likewise.
114407         * tests/test-roundl.h (main): Likewise.
114408         * tests/test-truncl.h (main): Likewise.
114409         See http://lists.gnu.org/r/bug-gnulib/2009-02/msg00190.html.
114411 2009-02-26  Eric Blake  <ebb9@byu.net>
114412             Bruno Haible  <bruno@clisp.org>
114414         Work around a *printf bug with %ls on Solaris.
114415         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LS): Also test whether, when a
114416         precision is specified, sprintf stops converting the wide string
114417         argument when the number of bytes that have been produced by this
114418         conversion equals or exceeds the precision.
114419         * doc/posix-functions/fprintf.texi: Update.
114420         * doc/posix-functions/printf.texi: Update.
114421         * doc/posix-functions/snprintf.texi: Update.
114422         * doc/posix-functions/sprintf.texi: Update.
114423         * doc/posix-functions/vfprintf.texi: Update.
114424         * doc/posix-functions/vprintf.texi: Update.
114425         * doc/posix-functions/vsnprintf.texi: Update.
114426         * doc/posix-functions/vsprintf.texi: Update.
114427         * doc/glibc-functions/obstack_printf.texi: Update.
114428         * doc/glibc-functions/obstack_vprintf.texi: Update.
114430 2009-02-26  Eric Blake  <ebb9@byu.net>
114432         stdlib: favor compiler check of random.h
114433         * m4/stdlib_h.m4 (gl_STDLIB_H): Skip preprocessor check.  Needed
114434         to avoid an ObjC random.h installed by Swarm.
114436 2009-02-26  Bruno Haible  <bruno@clisp.org>
114438         Work around *printf bug with %g directive and 0.0 on HP-UX 10.20.
114439         * m4/printf.m4 (gl_PRINTF_INFINITE): Also test for %g output of -0.0.
114440         Reported by Gary V. Vaughan <gary@gnu.org>.
114442 2009-02-26  Bruno Haible  <bruno@clisp.org>
114444         Fix *printf behaviour regarding the %ls directive.
114445         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LS): New macro.
114446         * lib/vasnprintf.c (local_wcslen, VASNPRINTF): Handle
114447         NEED_PRINTF_DIRECTIVE_LS.
114448         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_LS): New macro.
114449         (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): Invoke it.
114450         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
114451         gl_PREREQ_VASNPRINTF_DIRECTIVE_LS and test its result. Invoke
114452         gl_PREREQ_VASNPRINTF_DIRECTIVE_LS.
114453         * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_POSIX): Likewise.
114454         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_POSIX): Likewise.
114455         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
114456         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
114457         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
114458         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
114459         * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_POSIX): Likewise.
114460         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
114461         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
114462         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
114463         * doc/posix-functions/fprintf.texi: Update.
114464         * doc/posix-functions/printf.texi: Update.
114465         * doc/posix-functions/snprintf.texi: Update.
114466         * doc/posix-functions/sprintf.texi: Update.
114467         * doc/posix-functions/vfprintf.texi: Update.
114468         * doc/posix-functions/vprintf.texi: Update.
114469         * doc/posix-functions/vsnprintf.texi: Update.
114470         * doc/posix-functions/vsprintf.texi: Update.
114471         * doc/glibc-functions/obstack_printf.texi: Update.
114472         * doc/glibc-functions/obstack_vprintf.texi: Update.
114473         Reported by Eric Blake.
114475 2009-02-25  Bruno Haible  <bruno@clisp.org>
114477         * m4/mbrtowc.m4 (gl_MBRTOWC_NUL_RETVAL): Update guess for Solaris 8
114478         with known value.
114479         Reported by Gary V. Vaughan <gary@gnu.org>.
114481 2009-02-25  Bruno Haible  <bruno@clisp.org>
114483         Work around mbrtowc bug in zh_CN.GB18030 locale on Solaris 8.
114484         * m4/mbrtowc.m4 (gl_MBRTOWC_SANITYCHECK): New macro.
114485         (gl_MBSTATE_T_BROKEN): Invoke it. Replace mbstate_t when it says "no".
114486         * doc/posix-functions/mbrtowc.texi: Document the Solaris 8 bug.
114487         Reported by Gary V. Vaughan <gary@gnu.org>.
114489 2009-02-25  Bruno Haible  <bruno@clisp.org>
114491         Work around broken INT8_MAX, UINT8_MAX etc. values on HP-UX 11.23.
114492         * m4/stdint.m4 (gl_STDINT_H): Also check whether the expansions of
114493         INT8_MAX, UINT8_MAX etc. contain casts to elementary types.
114494         * doc/posix-headers/stdint.texi: Mention the HP-UX bug.
114495         Reported by Gary V. Vaughan <gary@gnu.org>.
114497 2009-02-25  Eric Blake  <ebb9@byu.net>
114499         tests: skip fseek/ftell tests if ungetc is broken
114500         * m4/ungetc.m4: New file.
114501         * modules/fseek-tests: Split test, so ungetc dependency is
114502         separate from rest of test.
114503         * modules/fseeko-tests: Likewise.
114504         * modules/ftell-tests: Likewise.
114505         * modules/ftello-tests: Likewise.
114506         * tests/test-fseek.c (main): Isolate ungetc dependency.
114507         * tests/test-fseeko.c (main): Likewise.
114508         * tests/test-ftell.c (main): Likewise.
114509         * tests/test-ftello.c (main): Likewise.
114510         * tests/test-fseek2.sh: New file.
114511         * tests/test-fseeko2.sh: Likewise.
114512         * tests/test-ftell2.sh: Likewise.
114513         * tests/test-ftello2.sh: Likewise.
114515 2009-02-25  Ondřej Vašík  <ovasik@redhat.com>
114517         test-getaddrinfo: fix usage of skip return code 77
114518         * tests/test-gettaddrinfo.c: Return skip code 77 only
114519         for first occurrence of skip (4x77 is not 77)
114521 2009-02-25  Gary V. Vaughan  <gary@gnu.org>
114523         strtod: avoid C99 decl-after-statement
114524         * m4/strtod.m4 (gl_FUNC_STRTOD): Rearrange declaration.
114526 2009-02-24  Eric Blake  <ebb9@byu.net>
114528         strtod: detect HP-UX 11.31 bug
114529         * m4/strtod.m4 (gl_FUNC_STRTOD): Detect errno handling bug.
114530         Reported by Gary V. Vaughan.
114532 2009-02-23  Bruno Haible  <bruno@clisp.org>
114534         Fix invalid read past end of memory block.
114535         * lib/vasnprintf.c (DCHAR_SET): Define.
114536         (local_wcslen): Define only when needed.
114537         (local_strnlen, local_wcsnlen): New functions.
114538         (VASNPRINTF) [!USE_SNPRINTF && HAVE_WCHAR_T]: Implement the %s and %ls
114539         directives that involve a conversion ourselves.
114540         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for strnlen,
114541         wcsnlen, mbrtowc, wcrtomb.
114542         * tests/test-vasnprintf-posix.c (test_function): Add tests for %.*s.
114543         * tests/test-vasprintf-posix.c (test_function): Likewise.
114544         * tests/test-snprintf-posix.h (test_function): Likewise.
114545         * tests/test-sprintf-posix.h (test_function): Likewise.
114546         Reported by Ben Pfaff <blp@cs.stanford.edu>.
114548 2009-02-22  Bruno Haible  <bruno@clisp.org>
114550         Implement new clarified decomposition of Hangul syllables.
114551         * lib/uninorm/decomposition.c (uc_decomposition): For Hangul syllables
114552         of type LTV, return only a pairwise decomposition.
114553         * lib/uninorm/canonical-decomposition.c (uc_canonical_decomposition):
114554         Likewise.
114555         * tests/uninorm/test-decomposition.c (main): Updated expected result.
114556         * tests/uninorm/test-canonical-decomposition.c (main): Likewise.
114557         * tests/uninorm/test-compat-decomposition.c (main): Likewise.
114559 2009-02-22  Bruno Haible  <bruno@clisp.org>
114561         * lib/uninorm/u-normalize-internal.h (FUNC): At the end, handle
114562         zero-length results and shrink excess allocated memory.
114563         * tests/uninorm/test-u8-nfc.c (test_u8_nfc): Check empty string result.
114564         * tests/uninorm/test-u8-nfd.c (test_u8_nfd): Likewise.
114565         * tests/uninorm/test-u8-nfkc.c (test_u8_nfkc): Likewise.
114566         * tests/uninorm/test-u8-nfkd.c (test_u8_nfkd): Likewise.
114567         * tests/uninorm/test-u16-nfc.c (test_u16_nfc): Likewise.
114568         * tests/uninorm/test-u16-nfd.c (test_u16_nfd): Likewise.
114569         * tests/uninorm/test-u16-nfkc.c (test_u16_nfkc): Likewise.
114570         * tests/uninorm/test-u16-nfkd.c (test_u16_nfkd): Likewise.
114571         * tests/uninorm/test-u32-nfc.c (test_u32_nfc): Likewise.
114572         * tests/uninorm/test-u32-nfd.c (test_u32_nfd): Likewise.
114573         * tests/uninorm/test-u32-nfkc.c (test_u32_nfkc): Likewise.
114574         * tests/uninorm/test-u32-nfkd.c (test_u32_nfkd): Likewise.
114576 2009-02-21  Bruno Haible  <bruno@clisp.org>
114578         * doc/gnulib.texi: Include safe-alloc.texi earlier.
114579         * doc/safe-alloc.texi: Terminate sentences with a period. Use two
114580         spaces after a period. Put a space between a macro name and its
114581         argument list. Trivial rewordings.
114582         * lib/safe-alloc.c: Include safe-alloc.h right after config.h.
114583         * tests/test-safe-alloc.c: Likewise. Include stdlib.h.
114584         (main): Return 0 explicitly.
114586 2009-02-21  Bruno Haible  <bruno@clisp.org>
114588         Tests for module 'uninorm/filter'.
114589         * tests/uninorm/test-uninorm-filter-nfc.c: New file.
114590         * modules/uninorm/filter-tests: New file.
114592         New module 'uninorm/filter'.
114593         * lib/uninorm.h (uninorm_filter_create, uninorm_filter_write,
114594         uninorm_filter_flush, uninorm_filter_free): New declarations.
114595         * lib/uninorm/uninorm-filter.c: New file.
114596         * modules/uninorm/filter: New file.
114598 2009-02-21  Bruno Haible  <bruno@clisp.org>
114600         Tests for module 'uninorm/nfkc'.
114601         * tests/uninorm/test-nfkc.c: New file.
114602         * tests/uninorm/test-u8-nfkc.c: New file.
114603         * tests/uninorm/test-u16-nfkc.c: New file.
114604         * tests/uninorm/test-u32-nfkc.c: New file.
114605         * tests/uninorm/test-u32-nfkc-big.sh: New file.
114606         * tests/uninorm/test-u32-nfkc-big.c: New file.
114607         * modules/uninorm/nfkc-tests: New file.
114609         New module 'uninorm/nfkc'.
114610         * lib/uninorm/nfkc.c: New file.
114611         * modules/uninorm/nfkc: New file.
114613         Tests for module 'uninorm/nfkd'.
114614         * tests/uninorm/test-nfkd.c: New file.
114615         * tests/uninorm/test-u8-nfkd.c: New file.
114616         * tests/uninorm/test-u16-nfkd.c: New file.
114617         * tests/uninorm/test-u32-nfkd.c: New file.
114618         * tests/uninorm/test-u32-nfkd-big.sh: New file.
114619         * tests/uninorm/test-u32-nfkd-big.c: New file.
114620         * modules/uninorm/nfkd-tests: New file.
114622         New module 'uninorm/nfkd'.
114623         * lib/uninorm/nfkd.c: New file.
114624         * modules/uninorm/nfkd: New file.
114626         Tests for module 'uninorm/nfc'.
114627         * tests/uninorm/test-nfc.c: New file.
114628         * tests/uninorm/test-u8-nfc.c: New file.
114629         * tests/uninorm/test-u16-nfc.c: New file.
114630         * tests/uninorm/test-u32-nfc.c: New file.
114631         * tests/uninorm/test-u32-nfc-big.sh: New file.
114632         * tests/uninorm/test-u32-nfc-big.c: New file.
114633         * modules/uninorm/nfc-tests: New file.
114635         New module 'uninorm/nfc'.
114636         * lib/uninorm/nfc.c: New file.
114637         * modules/uninorm/nfc: New file.
114639         Tests for module 'uninorm/nfd'.
114640         * tests/uninorm/test-nfd.c: New file.
114641         * tests/uninorm/test-u8-nfd.c: New file.
114642         * tests/uninorm/test-u16-nfd.c: New file.
114643         * tests/uninorm/test-u32-nfd.c: New file.
114644         * tests/uninorm/test-u32-nfd-big.sh: New file.
114645         * tests/uninorm/test-u32-nfd-big.c: New file.
114646         * tests/uninorm/test-u32-normalize-big.h: New file.
114647         * tests/uninorm/test-u32-normalize-big.c: New file.
114648         * tests/uninorm/NormalizationTest.txt: New file, created from
114649         Unicode 5.1.0 NormalizationTest.txt.
114650         * modules/uninorm/nfd-tests: New file.
114652         New module 'uninorm/nfd'.
114653         * lib/uninorm/nfd.c: New file.
114654         * modules/uninorm/nfd: New file.
114656         New module 'uninorm/u32-normalize'.
114657         * lib/uninorm/u32-normalize.c: New file.
114658         * modules/uninorm/u32-normalize: New file.
114660         New module 'uninorm/u16-normalize'.
114661         * lib/uninorm/u16-normalize.c: New file.
114662         * modules/uninorm/u16-normalize: New file.
114664         New module 'uninorm/u8-normalize'.
114665         * lib/uninorm/u8-normalize.c: New file.
114666         * lib/uninorm/normalize-internal.h: New file.
114667         * lib/uninorm/u-normalize-internal.h: New file.
114668         * modules/uninorm/u8-normalize: New file.
114670         New module 'uninorm/decompose-internal'.
114671         * lib/uninorm/decompose-internal.c: New file.
114672         * modules/uninorm/decompose-internal: New file.
114674         Tests for module 'uninorm/composition'.
114675         * tests/uninorm/test-composition.c: New file.
114676         * modules/uninorm/composition-tests: New file.
114678         New module 'uninorm/composition'.
114679         * lib/uninorm/composition.c: New file.
114680         * lib/uninorm/composition-table.gperf: New file, generated by
114681         gen-uni-tables.
114682         * modules/uninorm/composition: New file.
114684         Tests for module 'uninorm/compat-decomposition'.
114685         * tests/uninorm/test-compat-decomposition.c: New file.
114686         * modules/uninorm/compat-decomposition-tests: New file.
114688         New module 'uninorm/compat-decomposition'.
114689         * lib/uninorm/decompose-internal.h: New file.
114690         * lib/uninorm/compat-decomposition.c: New file.
114691         * modules/uninorm/compat-decomposition: New file.
114693         Tests for module 'uninorm/canonical-decomposition'.
114694         * tests/uninorm/test-canonical-decomposition.c: New file.
114695         * modules/uninorm/canonical-decomposition-tests: New file.
114697         New module 'uninorm/canonical-decomposition'.
114698         * lib/uninorm/canonical-decomposition.c: New file.
114699         * modules/uninorm/canonical-decomposition: New file.
114701         Tests for module 'uninorm/decomposition'.
114702         * tests/uninorm/test-decomposition.c: New file.
114703         * modules/uninorm/decomposition-tests: New file.
114705         New module 'uninorm/decomposition'.
114706         * lib/uninorm/decomposition.c: New file.
114707         * modules/uninorm/decomposition: New file.
114709         New module 'uninorm/decomposition-table'.
114710         * lib/uninorm/decomposition-table.h: New file.
114711         * lib/uninorm/decomposition-table.c: New file.
114712         * lib/uninorm/decomposition-table1.h: New file, generated by
114713         gen-uni-tables.
114714         * lib/uninorm/decomposition-table2.h: New file, generated by
114715         gen-uni-tables.
114716         * modules/uninorm/decomposition-table: New file.
114718         * lib/gen-uni-tables.c (MAX_DECOMP_LENGTH): New macro.
114719         (UC_DECOMP_*): New enumeration items.
114720         (get_decomposition): New function.
114721         (struct decomp_table): New type.
114722         (output_decomposition, output_decomposition_tables): New functions.
114723         (unicode_composition_exclusions): New variable.
114724         (fill_composition_exclusions, debug_output_composition_tables): New
114725         functions.
114726         (main): Accept one more argument. Invoke fill_composition_exclusions.
114727         Output decomposition and composition tables.
114729         New module 'uninorm/base'.
114730         * lib/uninorm.h: New file.
114731         * lib/unictype.h: Update comment.
114732         * modules/uninorm/base: New file.
114734 2009-02-21  David Lutterkort  <lutter@redhat.com>
114736         Tests for module 'safe-alloc'.
114737         * tests/test-safe-alloc.c: New file.
114738         * modules/safe-alloc-tests: New file.
114740         New module 'safe-alloc'.
114741         * lib/safe-alloc.h: New file.
114742         * lib/safe-alloc.c: New file.
114743         * m4/safe-alloc.m4: New file.
114744         * modules/safe-alloc: New file.
114745         * doc/safe-alloc.texi: New file.
114746         * doc/gnulib.texi: Include it.
114747         * MODULES.html.sh (Memory management functions <stdlib.h>): Add
114748         safe-alloc.
114750 2009-02-18  Bruno Haible  <bruno@clisp.org>
114752         Fix link error on non-glibc systems.
114753         * modules/uniwbrk/ulc-wordbreaks-tests (test_ulc_wordbreaks_LDADD): New
114754         variable.
114755         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
114757 2009-02-18  Jim Meyering  <meyering@redhat.com>
114759         fts: avoid used-uninitialized error due to recent change
114760         * lib/fts.c (fts_read): Guard uses of the new member,
114761         parent->fts_n_dirs_remaining, since it's not relevant for
114762         the parent of a directory specified on the command-line.
114764 2009-02-17  James Youngman  <jay@gnu.org>
114765             Bruno Haible  <bruno@clisp.org>
114767         * m4/include_next.m4: Reformulate comment.
114769 2009-02-16  Jim Meyering  <meyering@redhat.com>
114771         fts: add #if guards so that the fts_lgpl module still builds
114772         * lib/fts.c: Guard just-added hash-table-using parts with
114773         #if GNULIB_FTS, so as not to break builds of the fts_lgpl module.
114774         Reported by Simon Josefsson.
114776 2009-02-15  Bruno Haible  <bruno@clisp.org>
114778         * modules/array-mergesort-tests: New file.
114779         * tests/test-array-mergesort.c: New file.
114781         New module 'array-mergesort'.
114782         * modules/array-mergesort: New file.
114783         * lib/array-mergesort.h: New file.
114785 2009-02-15  Bruno Haible  <bruno@clisp.org>
114787         Fix 2009-02-07 commit.
114788         * lib/gen-uni-tables.c (output_predicate, output_category,
114789         output_combclass, output_bidi_category, output_decimal_digit,
114790         output_digit, output_numeric, output_mirror, output_scripts,
114791         output_ident_category, output_simple_mapping): Fix format directives.
114792         (output_lbp, output_wbp): Don't convert -1 to a size_t implicitly.
114794 2009-02-15  Albert Chin-A-Young  <china@thewrittenword.com>
114796         * m4/include_next.m4: Update comment about IBM C 9.0/10.1 bug, now that
114797         fixes are available from IBM.
114799 2009-02-13  Jim Meyering  <meyering@redhat.com>
114801         fts: arrange not to stat non-directories in more cases
114802         This makes GNU find (when it doesn't need to stat each file)
114803         *much* more efficient at traversing reiserfs file systems.
114804         * lib/fts_.h (struct ftsent) [fts_n_dirs_remaining]: New member.
114805         (struct FTS) [fts_leaf_optimization_works_ht]: Add member.
114806         * lib/fts.c (fts_close): Free ->fts_leaf_optimization_works_ht.
114807         (S_MAGIC_REISERFS, S_MAGIC_PROC): Define.
114808         (leaf_optimization_applies): New function.
114809         (LCO_hash, LCO_compare): New helper functions.
114810         (link_count_optimize_ok): New function.
114811         (fts_stat): Initialize new member (if dir).
114812         (fts_read): Decrement parent's fts_n_dirs_remaining count if
114813         we've just stat'ed a directory.  Skip the stat call when possible.
114814         ---
114815         Note this AFS-related exchange:
114816         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=143111
114817         and note find's pioctl call in find/fstype.c.
114818         But that is necessary only if you want to enable the
114819         optimization for AFS, and for now, I don't.
114821         fts: move a function definition "up" (no semantic change)
114822         * lib/fts.c (dirent_inode_sort_may_be_useful): Move definition
114823         "up" to precede upcoming use of a related function.
114825 2009-02-11  Jim Meyering  <meyering@redhat.com>
114827         fts: correct internal computation of nlinks (optimization-related)
114828         * lib/fts.c (fts_build): ISSET(FTS_NOSTAT) has no bearing on
114829         whether the current entry is a directory, so don't test it.
114831 2009-02-10  Bruno Haible  <bruno@clisp.org>
114833         Tests for module 'uniwbrk/ulc-wordbreaks'.
114834         * modules/uniwbrk/ulc-wordbreaks-tests: New file.
114835         * tests/uniwbrk/test-ulc-wordbreaks.sh: New file.
114836         * tests/uniwbrk/test-ulc-wordbreaks.c: New file.
114838         Tests for module 'uniwbrk/u32-wordbreaks'.
114839         * modules/uniwbrk/u32-wordbreaks-tests: New file.
114840         * tests/uniwbrk/test-u32-wordbreaks.c: New file.
114842         Tests for module 'uniwbrk/u16-wordbreaks'.
114843         * modules/uniwbrk/u16-wordbreaks-tests: New file.
114844         * tests/uniwbrk/test-u16-wordbreaks.c: New file.
114846         Tests for module 'uniwbrk/u8-wordbreaks'.
114847         * modules/uniwbrk/u8-wordbreaks-tests: New file.
114848         * tests/uniwbrk/test-u8-wordbreaks.c: New file.
114850 2009-02-10  Bruno Haible  <bruno@clisp.org>
114852         * modules/uniwbrk/u8-wordbreaks (Depends-on): Add uniwbrk/wordbreak
114853         property.
114854         * modules/uniwbrk/u16-wordbreaks (Depends-on): Likewise.
114855         * modules/uniwbrk/u32-wordbreaks (Depends-on): Likewise.
114856         * modules/uniwbrk/ulc-wordbreaks (Depends-on): Add localcharset.
114858 2009-02-10  Simon Josefsson  <simon@josefsson.org>
114860         * m4/sockets.m4: Call AC_C_INLINE since sockets.h now can use
114861         inline keywords.  Reported by Bruno Haible <bruno@clisp.org>.
114863 2009-02-10  Bruno Haible  <bruno@clisp.org>
114865         * lib/unilbrk/lbrktables.h: Renamed from lib/unilbrk/tables.h.
114866         * lib/unilbrk/lbrktables.c: Renamed from lib/unilbrk/tables.c.
114867         * modules/unilbrk/tables (Files, Makefile.am, Include): Update.
114868         * lib/unilbrk/u8-possible-linebreaks.c: Update.
114869         * lib/unilbrk/u16-possible-linebreaks.c: Likewise.
114870         * lib/unilbrk/u32-possible-linebreaks.c: Likewise.
114872 2009-02-09  Simon Josefsson  <simon@josefsson.org>
114874         * lib/sockets.h (gl_fd_to_handle): New function.
114876         * tests/test-sockets.c: Call gl_fd_to_handle.
114878 2009-02-09  Bruno Haible  <bruno@clisp.org>
114880         * doc/havelib.texi: Document the conventions on bi-arch systems.
114882 2009-02-08  Bruno Haible  <bruno@clisp.org>
114884         Document the AC_LIB_LINKFLAGS macro.
114885         * doc/havelib.texi: New file, mostly written on 2005-05-24.
114886         * doc/gnulib.texi: Include it.
114888 2009-02-08  Bruno Haible  <bruno@clisp.org>
114890         Fix wrong order of sections, compared to TOC.
114891         * doc/gnulib.texi: Include relocatable-maint.texi after the
114892         "Regular expressions" node, not before.
114894 2009-02-08  Bruno Haible  <bruno@clisp.org>
114896         Tests for module 'unicase/totitle'.
114897         * modules/unicase/totitle-tests: New file.
114899         Tests for module 'unicase/tolower'.
114900         * modules/unicase/tolower-tests: New file.
114902         Tests for module 'unicase/toupper'.
114903         * modules/unicase/toupper-tests: New file.
114904         * tests/unicase/test-mapping-part1.h: New file.
114905         * tests/unicase/test-mapping-part2.h: New file.
114907         New module 'unicase/totitle'.
114908         * modules/unicase/totitle: New file.
114909         * lib/unicase/totitle.c: New file.
114911         New module 'unicase/tolower'.
114912         * modules/unicase/tolower: New file.
114913         * lib/unicase/tolower.c: New file.
114915         New module 'unicase/toupper'.
114916         * modules/unicase/toupper: New file.
114917         * lib/unicase/toupper.c: New file.
114918         * lib/unicase/simple-mapping.h: New file.
114920         * lib/gen-uni-tables.c (output_simple_mapping_test): New function.
114921         (mapping_table): New structure.
114922         (output_simple_mapping): New function.
114923         (main): Invoke output_simple_mapping_test and output_simple_mapping.
114924         * modules/gen-uni-tables (Description): Update.
114925         * lib/unicase/toupper.h: New file, automatically generated by
114926         gen-uni-tables.
114927         * lib/unicase/tolower.h: New file, automatically generated by
114928         gen-uni-tables.
114929         * lib/unicase/totitle.h: New file, automatically generated by
114930         gen-uni-tables.
114931         * tests/unicase/test-uc_toupper.c: New file, automatically generated by
114932         gen-uni-tables.
114933         * tests/unicase/test-uc_tolower.c: New file, automatically generated by
114934         gen-uni-tables.
114935         * tests/unicase/test-uc_totitle.c: New file, automatically generated by
114936         gen-uni-tables.
114938         New module 'unicase/base'.
114939         * modules/unicase/base: New file.
114940         * lib/unicase.h: New file.
114942 2009-02-08  Bruno Haible  <bruno@clisp.org>
114944         New module 'uniwbrk/ulc-wordbreaks'.
114945         * modules/uniwbrk/ulc-wordbreaks: New file.
114946         * lib/uniwbrk/ulc-wordbreaks.c: New file.
114948         New module 'uniwbrk/u32-wordbreaks'.
114949         * modules/uniwbrk/u32-wordbreaks: New file.
114950         * lib/uniwbrk/u32-wordbreaks.c: New file.
114952         New module 'uniwbrk/u16-wordbreaks'.
114953         * modules/uniwbrk/u16-wordbreaks: New file.
114954         * lib/uniwbrk/u16-wordbreaks.c: New file.
114956         New module 'uniwbrk/u8-wordbreaks'.
114957         * modules/uniwbrk/u8-wordbreaks: New file.
114958         * lib/uniwbrk/u8-wordbreaks.c: New file.
114959         * lib/uniwbrk/u-wordbreaks.h: New file.
114961         New module 'uniwbrk/table'.
114962         * modules/uniwbrk/table: New file.
114963         * lib/uniwbrk/wbrktable.h: New file.
114964         * lib/uniwbrk/wbrktable.c: New file.
114966         New module 'uniwbrk/wordbreak-property'.
114967         * modules/uniwbrk/wordbreak-property: New file.
114968         * lib/uniwbrk/wordbreak-property.c: New file.
114970         * lib/gen-uni-tables.c (WBP_*): New enum items.
114971         (get_wbp, debug_output_wbp, debug_output_wbrk_tables): New functions.
114972         (unicode_org_wbp): New variable.
114973         (fill_org_wbp, debug_output_org_wbp, debug_output_org_wbrk_tables):
114974         New functions.
114975         (wbp_table): New structure.
114976         (output_wbp, output_wbrk_tables): New functions.
114977         (main): Accept additional argument. Invoke fill_org_wbp,
114978         debug_output_wbrk_tables, debug_output_org_wbrk_tables,
114979         output_wbrk_tables.
114980         * modules/gen-uni-tables (Description): Update.
114981         * lib/uniwbrk/wbrkprop.h: New file, automatically generated by
114982         gen-uni-tables.
114984         New module 'uniwbrk/base'.
114985         * modules/uniwbrk/base: New file.
114986         * lib/uniwbrk.h: New file.
114988 2009-02-08  Bruno Haible  <bruno@clisp.org>
114990         Update to Unicode 5.1.0.
114991         * lib/gen-uni-tables.c (is_property_alphabetic): Include
114992         U+2185..U+2188.
114993         (is_property_default_ignorable_code_point): Don't include characters
114994         of category Cc or Cs and not-a-characters.
114995         (get_lbp): Assume REVISION_22. Special handling of U+0609, U+060A,
114996         U+0D79, U+109E, U+109F, U+A60C.
114997         * lib/unictype/bidi_of.h: Regenerated.
114998         * lib/unictype/blocks.h: Regenerated.
114999         * lib/unictype/categ_C.h: Regenerated.
115000         * lib/unictype/categ_Cf.h: Regenerated.
115001         * lib/unictype/categ_Cn.h: Regenerated.
115002         * lib/unictype/categ_L.h: Regenerated.
115003         * lib/unictype/categ_Ll.h: Regenerated.
115004         * lib/unictype/categ_Lm.h: Regenerated.
115005         * lib/unictype/categ_Lo.h: Regenerated.
115006         * lib/unictype/categ_Lu.h: Regenerated.
115007         * lib/unictype/categ_M.h: Regenerated.
115008         * lib/unictype/categ_Mc.h: Regenerated.
115009         * lib/unictype/categ_Me.h: Regenerated.
115010         * lib/unictype/categ_Mn.h: Regenerated.
115011         * lib/unictype/categ_N.h: Regenerated.
115012         * lib/unictype/categ_Nd.h: Regenerated.
115013         * lib/unictype/categ_Nl.h: Regenerated.
115014         * lib/unictype/categ_No.h: Regenerated.
115015         * lib/unictype/categ_P.h: Regenerated.
115016         * lib/unictype/categ_Pd.h: Regenerated.
115017         * lib/unictype/categ_Pe.h: Regenerated.
115018         * lib/unictype/categ_Pf.h: Regenerated.
115019         * lib/unictype/categ_Pi.h: Regenerated.
115020         * lib/unictype/categ_Po.h: Regenerated.
115021         * lib/unictype/categ_Ps.h: Regenerated.
115022         * lib/unictype/categ_S.h: Regenerated.
115023         * lib/unictype/categ_Sk.h: Regenerated.
115024         * lib/unictype/categ_Sm.h: Regenerated.
115025         * lib/unictype/categ_So.h: Regenerated.
115026         * lib/unictype/categ_of.h: Regenerated.
115027         * lib/unictype/combining.h: Regenerated.
115028         * lib/unictype/ctype_alnum.h: Regenerated.
115029         * lib/unictype/ctype_alpha.h: Regenerated.
115030         * lib/unictype/ctype_graph.h: Regenerated.
115031         * lib/unictype/ctype_lower.h: Regenerated.
115032         * lib/unictype/ctype_print.h: Regenerated.
115033         * lib/unictype/ctype_punct.h: Regenerated.
115034         * lib/unictype/ctype_upper.h: Regenerated.
115035         * lib/unictype/decdigit.h: Regenerated.
115036         * lib/unictype/digit.h: Regenerated.
115037         * lib/unictype/mirror.h: Regenerated.
115038         * lib/unictype/numeric.h: Regenerated.
115039         * lib/unictype/pr_alphabetic.h: Regenerated.
115040         * lib/unictype/pr_bidi_arabic_digit.h: Regenerated.
115041         * lib/unictype/pr_bidi_arabic_right_to_left.h: Regenerated.
115042         * lib/unictype/pr_bidi_boundary_neutral.h: Regenerated.
115043         * lib/unictype/pr_bidi_eur_num_terminator.h: Regenerated.
115044         * lib/unictype/pr_bidi_left_to_right.h: Regenerated.
115045         * lib/unictype/pr_bidi_non_spacing_mark.h: Regenerated.
115046         * lib/unictype/pr_bidi_other_neutral.h: Regenerated.
115047         * lib/unictype/pr_combining.h: Regenerated.
115048         * lib/unictype/pr_dash.h: Regenerated.
115049         * lib/unictype/pr_decimal_digit.h: Regenerated.
115050         * lib/unictype/pr_default_ignorable_code_point.h: Regenerated.
115051         * lib/unictype/pr_deprecated.h: Regenerated.
115052         * lib/unictype/pr_diacritic.h: Regenerated.
115053         * lib/unictype/pr_extender.h: Regenerated.
115054         * lib/unictype/pr_format_control.h: Regenerated.
115055         * lib/unictype/pr_grapheme_base.h: Regenerated.
115056         * lib/unictype/pr_grapheme_extend.h: Regenerated.
115057         * lib/unictype/pr_grapheme_link.h: Regenerated.
115058         * lib/unictype/pr_id_continue.h: Regenerated.
115059         * lib/unictype/pr_id_start.h: Regenerated.
115060         * lib/unictype/pr_ideographic.h: Regenerated.
115061         * lib/unictype/pr_ignorable_control.h: Regenerated.
115062         * lib/unictype/pr_lowercase.h: Regenerated.
115063         * lib/unictype/pr_math.h: Regenerated.
115064         * lib/unictype/pr_numeric.h: Regenerated.
115065         * lib/unictype/pr_other_alphabetic.h: Regenerated.
115066         * lib/unictype/pr_other_default_ignorable_code_point.h: Regenerated.
115067         * lib/unictype/pr_other_grapheme_extend.h: Regenerated.
115068         * lib/unictype/pr_other_id_continue.h: Regenerated.
115069         * lib/unictype/pr_other_lowercase.h: Regenerated.
115070         * lib/unictype/pr_other_math.h: Regenerated.
115071         * lib/unictype/pr_punctuation.h: Regenerated.
115072         * lib/unictype/pr_sentence_terminal.h: Regenerated.
115073         * lib/unictype/pr_soft_dotted.h: Regenerated.
115074         * lib/unictype/pr_terminal_punctuation.h: Regenerated.
115075         * lib/unictype/pr_unassigned_code_value.h: Regenerated.
115076         * lib/unictype/pr_unified_ideograph.h: Regenerated.
115077         * lib/unictype/pr_uppercase.h: Regenerated.
115078         * lib/unictype/pr_xid_continue.h: Regenerated.
115079         * lib/unictype/pr_xid_start.h: Regenerated.
115080         * lib/unictype/pr_zero_width.h: Regenerated.
115081         * lib/unictype/scripts.h: Regenerated.
115082         * lib/unictype/scripts_byname.gperf: Regenerated.
115083         * lib/unictype/sy_java_ident.h: Regenerated.
115084         * lib/unilbrk/lbrkprop1.h: Regenerated.
115085         * lib/unilbrk/lbrkprop2.h: Regenerated.
115086         * tests/unictype/test-categ_C.c: Regenerated.
115087         * tests/unictype/test-categ_Cf.c: Regenerated.
115088         * tests/unictype/test-categ_Cn.c: Regenerated.
115089         * tests/unictype/test-categ_L.c: Regenerated.
115090         * tests/unictype/test-categ_Ll.c: Regenerated.
115091         * tests/unictype/test-categ_Lm.c: Regenerated.
115092         * tests/unictype/test-categ_Lo.c: Regenerated.
115093         * tests/unictype/test-categ_Lu.c: Regenerated.
115094         * tests/unictype/test-categ_M.c: Regenerated.
115095         * tests/unictype/test-categ_Mc.c: Regenerated.
115096         * tests/unictype/test-categ_Me.c: Regenerated.
115097         * tests/unictype/test-categ_Mn.c: Regenerated.
115098         * tests/unictype/test-categ_N.c: Regenerated.
115099         * tests/unictype/test-categ_Nd.c: Regenerated.
115100         * tests/unictype/test-categ_Nl.c: Regenerated.
115101         * tests/unictype/test-categ_No.c: Regenerated.
115102         * tests/unictype/test-categ_P.c: Regenerated.
115103         * tests/unictype/test-categ_Pd.c: Regenerated.
115104         * tests/unictype/test-categ_Pe.c: Regenerated.
115105         * tests/unictype/test-categ_Pf.c: Regenerated.
115106         * tests/unictype/test-categ_Pi.c: Regenerated.
115107         * tests/unictype/test-categ_Po.c: Regenerated.
115108         * tests/unictype/test-categ_Ps.c: Regenerated.
115109         * tests/unictype/test-categ_S.c: Regenerated.
115110         * tests/unictype/test-categ_Sk.c: Regenerated.
115111         * tests/unictype/test-categ_Sm.c: Regenerated.
115112         * tests/unictype/test-categ_So.c: Regenerated.
115113         * tests/unictype/test-ctype_alnum.c: Regenerated.
115114         * tests/unictype/test-ctype_alpha.c: Regenerated.
115115         * tests/unictype/test-ctype_graph.c: Regenerated.
115116         * tests/unictype/test-ctype_lower.c: Regenerated.
115117         * tests/unictype/test-ctype_print.c: Regenerated.
115118         * tests/unictype/test-ctype_punct.c: Regenerated.
115119         * tests/unictype/test-ctype_upper.c: Regenerated.
115120         * tests/unictype/test-decdigit.h: Regenerated.
115121         * tests/unictype/test-digit.h: Regenerated.
115122         * tests/unictype/test-numeric.h: Regenerated.
115123         * tests/unictype/test-pr_alphabetic.c: Regenerated.
115124         * tests/unictype/test-pr_bidi_arabic_digit.c: Regenerated.
115125         * tests/unictype/test-pr_bidi_arabic_right_to_left.c: Regenerated.
115126         * tests/unictype/test-pr_bidi_boundary_neutral.c: Regenerated.
115127         * tests/unictype/test-pr_bidi_eur_num_terminator.c: Regenerated.
115128         * tests/unictype/test-pr_bidi_left_to_right.c: Regenerated.
115129         * tests/unictype/test-pr_bidi_non_spacing_mark.c: Regenerated.
115130         * tests/unictype/test-pr_bidi_other_neutral.c: Regenerated.
115131         * tests/unictype/test-pr_combining.c: Regenerated.
115132         * tests/unictype/test-pr_dash.c: Regenerated.
115133         * tests/unictype/test-pr_decimal_digit.c: Regenerated.
115134         * tests/unictype/test-pr_default_ignorable_code_point.c: Regenerated.
115135         * tests/unictype/test-pr_deprecated.c: Regenerated.
115136         * tests/unictype/test-pr_diacritic.c: Regenerated.
115137         * tests/unictype/test-pr_extender.c: Regenerated.
115138         * tests/unictype/test-pr_format_control.c: Regenerated.
115139         * tests/unictype/test-pr_grapheme_base.c: Regenerated.
115140         * tests/unictype/test-pr_grapheme_extend.c: Regenerated.
115141         * tests/unictype/test-pr_grapheme_link.c: Regenerated.
115142         * tests/unictype/test-pr_id_continue.c: Regenerated.
115143         * tests/unictype/test-pr_id_start.c: Regenerated.
115144         * tests/unictype/test-pr_ideographic.c: Regenerated.
115145         * tests/unictype/test-pr_ignorable_control.c: Regenerated.
115146         * tests/unictype/test-pr_lowercase.c: Regenerated.
115147         * tests/unictype/test-pr_math.c: Regenerated.
115148         * tests/unictype/test-pr_numeric.c: Regenerated.
115149         * tests/unictype/test-pr_other_alphabetic.c: Regenerated.
115150         * tests/unictype/test-pr_other_default_ignorable_code_point.c:
115151         Regenerated.
115152         * tests/unictype/test-pr_other_grapheme_extend.c: Regenerated.
115153         * tests/unictype/test-pr_other_id_continue.c: Regenerated.
115154         * tests/unictype/test-pr_other_lowercase.c: Regenerated.
115155         * tests/unictype/test-pr_other_math.c: Regenerated.
115156         * tests/unictype/test-pr_punctuation.c: Regenerated.
115157         * tests/unictype/test-pr_sentence_terminal.c: Regenerated.
115158         * tests/unictype/test-pr_soft_dotted.c: Regenerated.
115159         * tests/unictype/test-pr_terminal_punctuation.c: Regenerated.
115160         * tests/unictype/test-pr_unassigned_code_value.c: Regenerated.
115161         * tests/unictype/test-pr_unified_ideograph.c: Regenerated.
115162         * tests/unictype/test-pr_uppercase.c: Regenerated.
115163         * tests/unictype/test-pr_xid_continue.c: Regenerated.
115164         * tests/unictype/test-pr_xid_start.c: Regenerated.
115165         * tests/unictype/test-pr_zero_width.c: Regenerated.
115167         Update to Unicode 5.1.0.
115168         * lib/uniwidth/width.c (nonspacing_table_data): Add U+0487,
115169         U+0616..U+061A, U+0A51, U+0A75, U+0B44, U+0B62..U+0B63, U+0C62..U+0C63,
115170         U+0D44, U+0D62..U+0D63, U+1033..U+1035, U+103A, U+103D..U+103E,
115171         U+105E..U+1060, U+1071..U+1074, U+1082, U+1085..U+1086, U+108D,
115172         U+1B80..U+1B81, U+1BA2..U+1BA5, U+1BA8..U+1BA9, U+1C2C..U+1C33,
115173         U+1C36..U+1C37, U+1DCB..U+1DE6, U+2064, U+20F0, U+2DE0..U+2DFF,
115174         U+A66F..U+A672, U+A67C..U+A67D, U+A8C4, U+A926..U+A92D, U+A947..U+A951,
115175         U+AA29..U+AA2E, U+AA31..U+AA32, U+AA35..U+AA36, U+AA43, U+AA4C,
115176         U+FE24..U+FE26, U+101FD. Remove U+1929..U+192B.
115177         (nonspacing_table_ind): Update.
115178         * tests/uniwidth/test-uc_width2.sh: Update expected result.
115180         Update to Unicode 5.1.0.
115181         * lib/uniname/gen-uninames.lisp (main): Add the range 0x1Fxxx to the
115182         code transform.
115183         * lib/uniname/uniname.c (unicode_character_name,
115184         unicode_name_character): Add the range 0x1Fxxx to the code transform.
115185         * lib/uniname/uninames.h: Regenerated.
115186         * tests/uniname/UnicodeDataNames.txt: Update to Unicode 5.1.0.
115188 2009-02-07  Bruno Haible  <bruno@clisp.org>
115190         Merge gen-ctype and gen-lbrk into a single program.
115191         * lib/gen-uni-tables.c: New file, incorporating
115192         lib/unictype/gen-ctype.c and lib/unilbrk/gen-lbrk.c.
115193         Add directory prefixes to the names of the generated files.
115194         * lib/unictype/gen-ctype.c: Remove file.
115195         * lib/unilbrk/gen-lbrk.c: Remove file.
115196         * modules/gen-uni-tables: New file.
115197         * modules/unictype/gen-ctype: Remove file.
115198         * modules/unilbrk/gen-lbrk: Remove file.
115200 2009-02-07  Bruno Haible  <bruno@clisp.org>
115202         * lib/unistr.h (u8_strcoll, u16_strcoll, u32_strcoll): New declations.
115204         New module 'unistr/u32-strcoll'.
115205         * modules/unistr/u32-strcoll: New file.
115206         * lib/unistr/u32-strcoll.c: New file.
115208         New module 'unistr/u16-strcoll'.
115209         * modules/unistr/u16-strcoll: New file.
115210         * lib/unistr/u16-strcoll.c: New file.
115212         New module 'unistr/u8-strcoll'.
115213         * modules/unistr/u8-strcoll: New file.
115214         * lib/unistr/u8-strcoll.c: New file.
115215         * lib/unistr/u-strcoll.h: New file.
115217 2009-02-07  Bruno Haible  <bruno@clisp.org>
115219         * test-mbrtowc4.sh (LOCALE_ZH_CN): Fix default value.
115220         * test-mbsnrtowcs4.sh (LOCALE_ZH_CN): Likewise.
115221         * test-mbsrtowcs4.sh (LOCALE_ZH_CN): Likewise.
115222         * test-wcrtomb.sh (LOCALE_ZH_CN): Likewise.
115223         * test-wcsnrtombs4.sh (LOCALE_ZH_CN): Likewise.
115224         * test-wcsrtombs4.sh (LOCALE_ZH_CN): Likewise.
115226 2009-02-07  Bruno Haible  <bruno@clisp.org>
115228         Make 64-bit clean.
115229         * lib/unictype/gen-ctype.c (output_predicate, output_category,
115230         output_combclass, output_bidi_category, output_decimal_digit,
115231         output_digit, output_numeric, output_mirror, output_scripts,
115232         output_ident_category): Use proper width specifier in format strings.
115234 2009-02-07  Bruno Haible  <bruno@clisp.org>
115236         * doc/posix-functions/dirfd.texi: Clarify situation on mingw. Document
115237         failure behaviour.
115239 2009-02-07  Jim Meyering  <meyering@redhat.com>
115241         regex: avoid compilation failure with upcoming gcc-4.4
115242         * lib/regex_internal.h: Revert e48d8b47fb3eee81d341b71c3e006efe9e3433a7
115243         [workaround for PGC prior to 6.1-2].  Otherwise, we'd get this:
115244         "... error: integer overflow in preprocessor expression".
115246 2009-02-05  Ben Pfaff  <blp@gnu.org>
115248         Fix link errors on Windows when close module is used.
115249         * modules/close: Add $(LIB_CLOSE) to Link section.
115250         * m4/close.m4 (gl_REPLACE_CLOSE): Substitute -lws2_32 into
115251         $(LIB_CLOSE) on Windows.
115253 2009-02-05  Jim Meyering  <meyering@redhat.com>
115255         still avoid unused-parameter warnings, but do it cleanly
115256         * lib/fsusage.c (UNUSED_PARAM): Remove definition.
115257         (get_fs_usage): Cast to void instead.
115258         * lib/mountlist.c (UNUSED_PARAM): Remove definition.
115259         (dev_from_mount_options, read_file_system_list): Cast to void.
115260         Prompted by Bruno Haible.
115262 2009-02-04  Jim Meyering  <meyering@redhat.com>
115264         fsusage.c: correct copyright year
115265         * lib/fsusage.c: Reflect year in which the change is pushed into
115267         avoid misc. warnings
115268         * lib/fsusage.c (UNUSED_PARAM): Define.
115269         (get_fs_usage): Mark parameter "disk" as unused.
115270         * lib/getugroups.c (getgrent): Use "void" in prototype.
115271         * lib/mountlist.c: Mark unused parameters.
115272         (read_file_system_list): Declare a local with "const".
115273         * lib/nanosleep.c (getnow): Declare static.
115274         * lib/strftime.c: Include strftime.h, for declaration of nstrftime.
115276         dirfd: set errno upon failure
115277         * lib/dirfd.c: Include <errno.h>.
115278         Set errno to ENOTSUP when returning -1.
115279         * modules/dirfd (Depends-on): Add errno.
115280         Suggested by John Kodis <kodis@comcast.net>.
115282 2009-02-01  Bruno Haible  <bruno@clisp.org>
115284         Don't assume sizeof (long) >= sizeof (void *).
115285         * lib/memcmp.c: Include stdint.h.
115286         (memcmp_bytes): Change argument types to op_t. Change type of srcp1,
115287         srcp2 to 'const byte *'.
115288         (memcmp_common_alignment, memcmp_not_common_alignment): Change argument
115289         types to uintptr_t.
115290         (rpl_memcmp): Change type of srcp1, srcp2 to 'uintptr_t'.
115291         * modules/memcmp (Depends-on): Add stdint.
115292         Reported by Ozkan Sezer <sezeroz@gmail.com>.
115294 2009-01-30  Eric Blake  <ebb9@byu.net>
115296         fix more require-before-expand issues
115297         * m4/pmccabe2html.m4 (gl_PMCCABE2HTML): Require, rather than
115298         expand, AC_PROG_AWK.
115299         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): Use AC_DEFUN_ONCE.
115301 2009-01-28  Eric Blake  <ebb9@byu.net>
115303         version-etc: use consistent URL formatting
115304         * lib/version-etc.c (emit_bug_reporting_address, version_etc_va):
115305         Improve formatting.  Use fputs for string without %.
115307 2009-01-28  Jim Meyering  <meyering@redhat.com>
115309         00gnulib.m4: add m4 quotes in shell comment to avoid autoconf warning
115310         * m4/00gnulib.m4 (AC_DEFUN_ONCE): Add quotes to avoid an
115311         "underquoted definition of NAME" from autoconf-2.59.
115313 2009-01-28  Bruno Haible  <bruno@clisp.org>
115315         * doc/gnulib.texi: Add "Obsolete modules" to index.
115317 2009-01-28  Jim Meyering  <meyering@redhat.com>
115319         useless-if-before-free: recognize more variants
115320         * build-aux/useless-if-before-free: Also recognize e.g.,
115321         if (NULL != p) free (p);
115323 2009-01-27  Mark McLoughlin  <markmc@redhat.com>
115325         test-getaddrinfo: skip (don't fail) this test when there's no network
115326         * tests/test-getaddrinfo.c: Skip test upon failure with EAI_AGAIN,
115327         on the presumption that it means you lack network access.
115329 2009-01-26  Jim Meyering  <meyering@redhat.com>
115331         fflush: avoid warnings on modern systems
115332         * lib/fflush.c (rpl_fflush): Move declarations of locals,
115333         pos and result, into scopes where they're used.
115335 2009-01-26  Eric Blake  <ebb9@byu.net>
115337         Silence warning reintroduced by recent extensions patch.
115338         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS)
115339         (gl_USE_SYSTEM_EXTENSIONS): Use AC_DEFUN_ONCE to silence newer
115340         autoconf.
115342         Backport improved autoconf semantics of AC_DEFUN_ONCE.
115343         * m4/00gnulib.m4: New file.
115344         * gnulib-tool (func_get_filelist): Always use it.
115345         * m4/gnulib-common.m4 (gl_COMMON): Force the file to be used.
115346         Reported by Bruno Haible, with suggestions from Paolo Bonzini.
115348 2009-01-25  Bruno Haible  <bruno@clisp.org>
115350         Make test-quotearg work on MacOS X and AIX.
115351         * tests/test-quotearg.sh: New file.
115352         * tests/locale/fr/LC_MESSAGES/test-quotearg.po: New file.
115353         * tests/locale/fr/LC_MESSAGES/test-quotearg.mo: New file.
115354         * tests/test-quotearg.c: Include <locale.h> and gettext.h. Don't
115355         include <libintl.h>.
115356         (fake_locale): Remove variable.
115357         (gettext, dgettext, dcgettext): Remove functions.
115358         (main): Instead of setting a fake locale, set a real locale. Call
115359         textdomain and bindtextdomain.
115360         * modules/quotearg-tests (Files): Add the new files.
115361         (Depends-on): Add gettext, setenv, unsetenv.
115362         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
115363         (Makefile.am): Add test-quotearg.sh to TESTS, remove test-quotearg.
115364         Augment TESTS_ENVIRONMENT.
115366 2009-01-25  Bruno Haible  <bruno@clisp.org>
115368         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove special code that hid the
115369         fr_FR.ISO8859-1 locale on MacOS X.
115370         * m4/locale-ja.m4 (gt_LOCALE_JA): Remove special code that hid the
115371         ja_JP.eucJP locale on MacOS X.
115372         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Remove special code that hid the
115373         zh_CN.GB18030 locale on MacOS X.
115375 2009-01-25  Bruno Haible  <bruno@clisp.org>
115377         Avoid link errors on MacOS X 10.3.
115378         * lib/mbsrtowcs-state.c (_gl_mbsrtowcs_state): Add initializer.
115379         * lib/wcsrtombs-state.c (_gl_wcsrtombs_state): Likewise.
115381 2009-01-25  Bruno Haible  <bruno@clisp.org>
115383         * lib/pipe.c: On Unix, assume HAVE_POSIX_SPAWN and use posix_spawnp.
115384         * m4/pipe.m4 (gl_PIPE): Remove tests for vfork() based code.
115385         * modules/pipe (Files): Remove m4/posix_spawn.m4.
115386         (Depends-on): Add spawn, posix_spawnp, posix_spawn_file_actions_init,
115387         posix_spawn_file_actions_addclose, posix_spawn_file_actions_adddup2,
115388         posix_spawn_file_actions_addopen, posix_spawn_file_actions_destroy,
115389         posix_spawnattr_init, posix_spawnattr_setsigmask,
115390         posix_spawnattr_setflags, posix_spawnattr_destroy.
115392         * lib/execute.c: On Unix, assume HAVE_POSIX_SPAWN and use posix_spawnp.
115393         * m4/execute.m4 (gl_EXECUTE): Remove tests for vfork() based code.
115394         * modules/execute (Files): Remove m4/posix_spawn.m4.
115395         (Depends-on): Add spawn, posix_spawnp, posix_spawn_file_actions_init,
115396         posix_spawn_file_actions_addopen, posix_spawn_file_actions_destroy,
115397         posix_spawnattr_init, posix_spawnattr_setsigmask,
115398         posix_spawnattr_setflags, posix_spawnattr_destroy.
115400 2009-01-25  Bruno Haible  <bruno@clisp.org>
115402         * lib/glthread/threadlib.c: Include <stdlib.h>.
115404 2009-01-25  Bruno Haible  <bruno@clisp.org>
115406         * lib/glthread/threadlib.c (dummy): New declaration.
115408 2009-01-25  Bruno Haible  <bruno@clisp.org>
115410         * lib/mbrtowc.c (mbrtowc): Distinguish invalid and incomplete
115411         multibyte characters also for the GB18030 encoding. Don't crash when
115412         the encoding is unknown and nstate = 0. Needed on OSF/1 5.1.
115414 2009-01-25  Bruno Haible  <bruno@clisp.org>
115416         Avoid redefining 'struct random_data' on OSF/1 5.1.
115417         * lib/stdlib.in.h: Include <random.h> if it exists.
115418         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether <random.h> exists. Set
115419         HAVE_RANDOM_H. Include <random.h> when testing whether
115420         'struct random_data' exists.
115421         * modules/stdlib (Makefile.am): Substitute HAVE_RANDOM_H.
115423 2009-01-25  Bruno Haible  <bruno@clisp.org>
115425         Don't install charset.alias on MacOS X >= 10.3.
115426         * lib/localcharset.c (DARWIN7): New macro.
115427         (get_charset_aliases): Hardcode the result for Darwin7.
115428         * modules/localcharset (install-exec-local): Don't install
115429         charset.alias on MacOS X >= 10.3, if the file does not yet exist.
115431 2009-01-25  Bruno Haible  <bruno@clisp.org>
115433         Don't install charset.alias on mingw and Cygwin.
115434         * modules/localcharset (install-exec-local): Don't install
115435         charset.alias on mingw and Cygwin, if the file does not yet exist.
115436         The result for these platforms is hardcoded in localcharset.c.
115438 2009-01-25  Bruno Haible  <bruno@clisp.org>
115440         Make it possible again to use AC_GNU_SOURCE together with gnulib.
115441         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_GNU_SOURCE
115442         before requiring AC_USE_SYSTEM_EXTENSIONS.
115444 2009-01-25  Jim Meyering  <meyering@redhat.com>
115446         c-strtod: avoid warnings
115447         * lib/c-strtod.c (C_STRTOD): Cast nptr to (char *) to avoid
115448         "assignment discards qualifiers from pointer target type" warnings.
115450 2009-01-24  Bruno Haible  <bruno@clisp.org>
115452         Add support for non-UTF-8 locales on MacOS X.
115453         * lib/config.charset: Add CP1131, ARMSCII-8, PT154 to the list of
115454         canonical encodings. For Darwin 7 and newer, don't map traditional
115455         encodings to UTF-8.
115456         Reported by Vincent Lefevre <vincent@vinc17.org>
115457         at <http://savannah.gnu.org/bugs/?25235>.
115459 2009-01-24  Bruno Haible  <bruno@clisp.org>
115461         * doc/gnulib.texi (Obsolete modules): New section.
115462         Reported by Mike Frysinger <vapier@gentoo.org>.
115464 2009-01-24  Bruno Haible  <bruno@clisp.org>
115466         * doc/Makefile (%.pdf): Clarify where to find texmf.cnf.
115467         (%.dvi): New rule.
115469 2009-01-24  Bruno Haible  <bruno@clisp.org>
115471         * lib/c-strtod.h (c_strtod, c_strtold): Adjust specification.
115472         Reported by Eric Blake.
115474 2009-01-24  Bruno Haible  <bruno@clisp.org>
115476         * lib/c-stack.c (segv_handler): If !HAVE_XSI_STACK_OVERFLOW_HEURISTIC,
115477         set signo = 0 also if info->si_code <= 0. Needed on HP-UX 11.11.
115478         Reported by Gary V. Vaughan <gary@gnu.org>.
115480 2009-01-24  Bruno Haible  <bruno@clisp.org>
115482         * lib/c-strtod.h (c_strtod, c_strtold): Add specification.
115484 2009-01-23  Bruno Haible  <bruno@clisp.org>
115486         Make c-strtod, c-strtold usable in libraries.
115487         * lib/c-strtod.c: Include string.h instead of xalloc.h.
115488         (C_STRTOD): Call strdup instead of xstrdup.
115489         * modules/c-strtod (Depends-on): Add strdup-posix, remove xalloc.
115490         * modules/c-strtold (Depends-on): Likewise.
115491         * doc/c-strtod.texi: Remove the sentence mentioning xalloc_die.
115492         * NEWS: Mention the change.
115493         Reported by Michael Gold <mgold@ncf.ca>.
115495 2009-01-23  Jim Meyering  <meyering@redhat.com>
115497         c-strtod: when ENDPTR is non-NULL, set *ENDPTR in new failure path
115498         * lib/c-strtod.c (C_STRTOD) [LC_ALL_MASKC]: Ensure that when
115499         ENDPTR is non-NULL, *ENDPTR is set to NPTR upon failure.
115501 2009-01-23  Simon Josefsson  <simon@josefsson.org>
115503         * lib/version-etc.c: Add emit_bug_reporting_address, inspired by
115504         GNU CoreUtils.
115505         * lib/version-etc.h: Add prototype for emit_bug_reporting_address.
115506         * modules/version-etc (Description): Update.
115508 2009-01-22  Bruno Haible  <bruno@clisp.org>
115510         Cache the C locale object.
115511         * lib/c-strtod.c (c_locale_cache): New variable.
115512         (c_locale): New function.
115513         (C_STRTOD): Use it, and don't call freelocale.
115514         * m4/c-strtod.m4 (gl_C_STRTOD, gl_C_STRTOLD): Require AC_C_INLINE.
115515         Suggested by Paolo Bonzini.
115517 2009-01-21  Bruno Haible  <bruno@clisp.org>
115519         * lib/getloadavg.c (getloadavg): Check c_strtod result against error
115520         conditions other than overflow.
115522 2009-01-21  Bruno Haible  <bruno@clisp.org>
115524         * lib/c-strtod.c: Include errno.h.
115525         (C_STRTOD): Check against NULL return from newlocale. Preserve errno
115526         value from STRTOD_L and STRTOD.
115528 2009-01-21  Bruno Haible  <bruno@clisp.org>
115529         and Jim Meyering  <meyering@redhat.com>
115531         nanosleep: skip configure test (fail it) for apple universal builds
115532         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_MULTIARCH. In Apple
115533         universal builds, assume that nanosleep does not work.
115534         * modules/nanosleep (Depends-on): Add multiarch.
115536         mktime: skip configure test (fail it) for apple universal builds
115537         * m4/mktime.m4 (AC_FUNC_MKTIME): Require gl_MULTIARCH. In Apple
115538         universal builds, assume that mktime does not work.
115539         * modules/mktime (Depends-on): Add multiarch.
115541 2009-01-21  Eric Blake  <ebb9@byu.net>
115543         multiarch: avoid expand-before-require warning
115544         * modules/multiarch (configure.ac): Require, rather than expand,
115545         gl_MULTIARCH.
115546         * m4/multiarch.m4 (gl_MULTIARCH_BODY): Merge...
115547         (gl_MULTIARCH): ...into this macro, and use AC_DEFUN_ONCE to
115548         enforce that all clients require it.  Partial reversion of
115549         2008-12-29 patch.
115551         error: avoid expand-before-require warning
115552         * modules/errno (configure.ac): Require, rather than expand,
115553         gl_HEADER_ERRNO_H.
115554         * m4/errno_h.m4 (gl_HEADER_ERRNO_H_BODY): Merge...
115555         (gl_HEADER_ERRNO_H): ...into this macro, and use AC_DEFUN_ONCE to
115556         enforce that all clients require it.
115558         gnulib-tool: avoid warnings from using obsolete AC_GNU_SOURCE
115559         * gnulib-tool (func_dest_tmpfilename, func_create_testdir): Using
115560         obsolete AC_GNU_SOURCE causes out-of-order expansion; avoid it,
115561         and rely solely on gl_USE_SYSTEM_EXTENSIONS.
115563 2009-01-21  Paolo Bonzini  <bonzini@gnu.org>
115565         Revert:
115566         2009-01-20  Paolo Bonzini  <bonzini@gnu.org>
115568         regex: do not depend on obsolete modules.
115569         * modules/regex: Remove memcmp and memmove.
115571 2009-01-20  Bruno Haible  <bruno@clisp.org>
115573         Make the 'link' module link on Windows NT 4.
115574         * lib/link.c (_WIN32_WINNT): Don't define.
115575         (CreateHardLinkFuncType): New type.
115576         (CreateHardLinkFunc, initialized): New variables.
115577         (initialize): New function.
115578         (link): Invoke CreateHardLink indirectly through the function pointer.
115580 2009-01-20  Bruno Haible  <bruno@clisp.org>
115582         Fix compilation failure on mingw.
115583         * tests/test-link.c (main): Don't assume that EOPNOTSUPP exists.
115585 2009-01-20  Michael Gold  <mgold@ncf.ca>  (tiny change)
115587         * doc/c-strtod.texi: Mention a couple of restrictions.
115589 2009-01-20  Jim Meyering  <meyering@redhat.com>
115591         gettimeofday: move more declarations out of functions
115592         * lib/gettimeofday.c: Move extern declarations of tzset and
115593         gmtime out of containing functions.  Prompted by Bruno Haible.
115595 2009-01-20  Paolo Bonzini  <bonzini@gnu.org>
115597         regex: do not depend on obsolete modules.
115598         * modules/regex: Remove memcmp and memmove.
115600 2009-01-19  Bruno Haible  <bruno@clisp.org>
115602         Don't use AC_REQUIRE([AC_C_BIGENDIAN]).
115603         * modules/uniconv/u16-conv-from-enc (configure.ac): Require
115604         gl_BIGENDIAN, not AC_C_BIGENDIAN.
115605         * modules/uniconv/u16-conv-to-enc (configure.ac): Likewise.
115606         * modules/uniconv/u16-strconv-to-enc (configure.ac): Likewise.
115608 2009-01-19  Bruno Haible  <bruno@clisp.org>
115610         * tests/test-link.c: Include <errno.h>.
115611         (main): Exit with code 77 when a hard link cannot be created due to
115612         the file system.
115613         * tests/test-link.sh: Skip test when a hard link cannot be created due
115614         to the file system.
115615         Suggested by Eric Blake.
115617 2009-01-19  Martin Lambers  <marlam@marlam.de>
115619         * modules/link-tests: New file.
115620         * tests/test-link.sh: New file.
115621         * tests/test-link.c: New file.
115623 2009-01-19  Eric Blake  <ebb9@byu.net>
115625         doc: mention another function added in cygwin 1.7.0
115626         * doc/glibc-functions/glob_pattern_p.texi (glob_pattern_p):
115627         Another new function in cygwin 1.7.
115629 2009-01-19  Bruno Haible  <bruno@clisp.org>
115631         Don't use AC_REQUIRE([AC_C_BIGENDIAN]).
115632         * m4/gnulib-common.m4 (gl_BIGENDIAN): New macro.
115633         * m4/exponentl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Require
115634         gl_BIGENDIAN, not AC_C_BIGENDIAN.
115635         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Likewise.
115636         * m4/isinf.m4 (gl_ISINFL_WORKS): Likewise.
115637         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Likewise.
115638         * m4/md4.m4 (gl_MD4): Likewise.
115639         * m4/md5.m4 (gl_MD5): Likewise.
115640         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Likewise.
115641         * m4/sha1.m4 (gl_SHA1): Likewise.
115642         * m4/sha256.m4 (gl_SHA256): Likewise.
115643         * m4/sha512.m4 (gl_SHA512): Likewise.
115645 2009-01-19  Bruno Haible  <bruno@clisp.org>
115647         * modules/uniname/uniname-tests (Depends-on): Add progname.
115648         * tests/uniname/test-uninames.c: Include progname.h.
115649         (main): Call set_program_name.
115651         * modules/unistdio/u8-vsprintf-tests (Depends-on): Add progname.
115652         * tests/unistdio/test-u8-vsprintf1.c: Include progname.h.
115653         (main): Call set_program_name.
115655         * modules/unistdio/u8-vsnprintf-tests (Depends-on): Add progname.
115656         * tests/unistdio/test-u8-vsnprintf1.c: Include progname.h.
115657         (main): Call set_program_name.
115659         * modules/unistdio/u16-vsprintf-tests (Depends-on): Add progname.
115660         * tests/unistdio/test-u16-vsprintf1.c: Include progname.h.
115661         (main): Call set_program_name.
115663         * modules/unistdio/u16-vsnprintf-tests (Depends-on): Add progname.
115664         * tests/unistdio/test-u16-vsnprintf1.c: Include progname.h.
115665         (main): Call set_program_name.
115667         * modules/unistdio/u32-vsprintf-tests (Depends-on): Add progname.
115668         * tests/unistdio/test-u32-vsprintf1.c: Include progname.h.
115669         (main): Call set_program_name.
115671         * modules/unistdio/u32-vsnprintf-tests (Depends-on): Add progname.
115672         * tests/unistdio/test-u32-vsnprintf1.c: Include progname.h.
115673         (main): Call set_program_name.
115675         * modules/unistdio/ulc-vsprintf-tests (Depends-on): Add progname.
115676         * tests/unistdio/test-ulc-vsprintf1.c: Include progname.h.
115677         (main): Call set_program_name.
115679         * modules/unistdio/ulc-vsnprintf-tests (Depends-on): Add progname.
115680         * tests/unistdio/test-ulc-vsnprintf1.c: Include progname.h.
115681         (main): Call set_program_name.
115683 2009-01-19  Eric Blake  <ebb9@byu.net>
115685         test-unistd: test previous patch
115686         * tests/test-unistd.c: Test *_FILENO macros.
115688         unistd: guarantee STDIN_FILENO here, for OS/2 EMX
115689         * lib/unistd.in.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO):
115690         Guarantee a definition.
115691         * doc/posix-headers/unistd.texi (unistd.h): Document the bug.
115692         * modules/unistd-safer (Depends-on): Add dependency on unistd.
115693         * lib/c-stack.c (STDERR_FILENO): Rely on <unistd.h>.
115694         * lib/dup-safer.c (STDERR_FILENO): Likewise.
115695         * lib/execute.c (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO):
115696         Likewise.
115697         * lib/fd-safer.c (STDIN_FILENO, STDERR_FILENO): Likewise.
115698         * lib/fopen-safer.c (STDERR_FILENO): Likewise.
115699         * lib/pipe.c (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO):
115700         Likewise.
115701         * lib/tmpfile-safer.c (STDERR_FILENO): Likewise.
115702         * tests/test-posix_spawn1.c (STDIN_FILENO, STDOUT_FILENO)
115703         (STDERR_FILENO): Likewise.
115704         * tests/test-posix_spawn2.c (STDIN_FILENO, STDOUT_FILENO)
115705         (STDERR_FILENO): Likewise.
115706         * tests/test-posix_spawn3.c (STDIN_FILENO, STDOUT_FILENO)
115707         (STDERR_FILENO): Likewise.
115708         Reported by Elbert Pol.
115710 2009-01-19  Eric Blake  <ebb9@byu.net>
115712         doc: mention more functions added in cygwin 1.7.0
115713         * doc/posix-functions/abort.texi (abort): Update wording related
115714         to cygwin.
115715         * doc/posix-functions/daylight.texi (daylight): Likewise.
115716         * doc/posix-functions/optarg.texi (optarg): Likewise.
115717         * doc/posix-functions/optarg.texi (opterr): Likewise.
115718         * doc/posix-functions/optarg.texi (optind): Likewise.
115719         * doc/posix-functions/optarg.texi (optopt): Likewise.
115720         * doc/posix-functions/wprintf.texi (wprintf): Cygwin wprintf never
115721         worked in 1.5.x, and was withdrawn in 1.7.
115722         * doc/posix-functions/vwprintf.texi (vwprintf): Likewise.
115723         * doc/posix-functions/fprintf.texi (fprintf): Tighten mention of
115724         cygwin versions.
115725         * doc/posix-functions/perror.texi (perror): Likewise.
115726         * doc/posix-functions/printf.texi (printf): Likewise.
115727         * doc/posix-functions/snprintf.texi (snprintf): Likewise.
115728         * doc/posix-functions/sprintf.texi (sprintf): Likewise.
115729         * doc/posix-functions/vfprintf.texi (vfprintf): Likewise.
115730         * doc/posix-functions/vprintf.texi (vprintf): Likewise.
115731         * doc/posix-functions/vsnprintf.texi (vsnprintf): Likewise.
115732         * doc/posix-functions/vsprintf.texi (vsprintf): Likewise.
115733         * doc/glibc-functions/obstack_printf.texi (obstack_printf):
115734         Likewise.
115735         * doc/glibc-functions/obstack_vprintf.texi (obstack_vprintf):
115736         Likewise.
115737         * doc/glibc-functions/cfmakeraw.texi (cfmakeraw): Cygwin 1.7 adds
115738         this function.
115739         * doc/glibc-functions/in6addr_any.texi (in6addr_any): Likewise.
115740         * doc/glibc-functions/in6addr_loopback.texi (in6addr_loopback):
115741         Likewise.
115742         * doc/glibc-functions/updwtmpx.texi (updwtmpx): Likewise.
115743         * doc/posix-functions/_Exit_C99.texi (_Exit): Likewise.
115744         * doc/posix-functions/confstr.texi (confstr): Likewise.
115745         * doc/posix-functions/dprintf.texi (dprintf): Likewise.
115746         * doc/posix-functions/fgetwc.texi (fgetwc): Likewise.
115747         * doc/posix-functions/fgetws.texi (fgetws): Likewise.
115748         * doc/posix-functions/fputwc.texi (fputwc): Likewise.
115749         * doc/posix-functions/fputws.texi (fputws): Likewise.
115750         * doc/posix-functions/fwide.texi (fwide): Likewise.
115751         * doc/posix-functions/getwc.texi (getwc): Likewise.
115752         * doc/posix-functions/getwchar.texi (getwchar): Likewise.
115753         * doc/posix-functions/putwc.texi (putwc): Likewise.
115754         * doc/posix-functions/putwchar.texi (putwchar): Likewise.
115755         * doc/posix-functions/sigignore.texi (sigignore): Likewise.
115756         * doc/posix-functions/ungetwc.texi (ungetwc): Likewise.
115757         * doc/posix-functions/vdprintf.texi (vdprintf): Likewise.
115758         * doc/posix-functions/wcpcpy.texi (wcpcpy): Likewise.
115759         * doc/posix-functions/wcpncpy.texi (wcpncpy): Likewise.
115760         * doc/posix-functions/wcstol.texi (wcstol): Likewise.
115761         * doc/posix-functions/wcstoll.texi (wcstoll): Likewise.
115762         * doc/posix-functions/wcstoul.texi (wcstoul): Likewise.
115763         * doc/posix-functions/wcstoull.texi (wcstoull): Likewise.
115764         * doc/posix-functions/wcsxfrm.texi (wcsxfrm): Likewise.
115766 2009-01-19  Daniel P. Berrange  <berrange@redhat.com>
115768         ioctl: avoid warning: no previous prototype for 'rpl_ioctl'
115769         * lib/ioctl.c: Include <sys/ioctl.h>.
115771 2009-01-19  Simon Josefsson  <simon@josefsson.org>
115773         * modules/getdate-tests (Depends-on): Add progname.
115774         * tests/test-getdate.c: Use progname module, to avoid link errors
115775         on non-glibc systems.
115777 2009-01-18  Simon Josefsson  <simon@josefsson.org>
115779         * modules/filenamecat-tests (Depends-on): Add progname.
115780         * modules/fstrcmp-tests (Depends-on): Likewise.
115782         * tests/test-filenamecat.c: Use progname module, to avoid link
115783         errors on non-glibc systems.
115784         * tests/test-fstrcmp.c: Likewise.
115786 2009-01-19  Daniel P. Berrange  <berrange@redhat.com>
115788         gettimeofday: avoid warning: nested extern declaration of 'localtime'
115789         * lib/gettimeofday.c: Move extern declaration out of function.
115791 2009-01-18  Bruno Haible  <bruno@clisp.org>
115793         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't test for mblen and mbrlen.
115794         * lib/strftime.c (HAVE_MBLEN, HAVE_MBRLEN): Remove macros.
115795         (MULTIBYTE_IS_FORMAT_SAFE): Define to 1 on all platforms except OSF/1.
115797 2009-01-18  Bruno Haible  <bruno@clisp.org>
115799         * lib/strftime.c (MEMPCPY): Remove unused macro.
115800         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't test for mempcpy.
115802 2009-01-18  Martin Lambers  <marlam@marlam.de>
115804         New module 'link'.
115805         * lib/unistd.in.h (link): New declaration.
115806         * lib/link.c: New file.
115807         * m4/link.m4: New file.
115808         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_LINK,
115809         HAVE_LINK.
115810         * modules/unistd (Makefile.am): Substitute GNULIB_LINK, HAVE_LINK.
115811         * modules/link: New file.
115812         * doc/posix-functions/link.texi: Mention the new module.
115814 2009-01-18  Bruno Haible  <bruno@clisp.org>
115816         * tests/test-avltree_list.c (main): Call set_program_name.
115817         * tests/test-avltree_oset.c (main): Likewise.
115818         * tests/test-obstack-printf.c: Include progname.h.
115819         (main): Call set_program_name.
115820         * tests/test-quotearg.c: Include progname.h.
115821         (main): Call set_program_name.
115822         * tests/test-xmemdup0.c: Include progname.h.
115823         (main): Call set_program_name.
115825 2009-01-18  Bruno Haible  <bruno@clisp.org>
115827         New module 'alphasort'.
115828         * lib/dirent.in.h (alphasort): New declaration.
115829         * lib/alphasort.c: New file, from glibc with modifications.
115830         * m4/alphasort.m4: New file.
115831         * modules/alphasort: New file.
115832         * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): Initialize GNULIB_ALPHASORT,
115833         HAVE_ALPHASORT.
115834         * modules/dirent (Makefile.am): Substitute GNULIB_ALPHASORT,
115835         HAVE_ALPHASORT.
115836         * doc/posix-functions/alphasort.texi: Mention the new module and the
115837         portability problems.
115839 2009-01-18  Bruno Haible  <bruno@clisp.org>
115841         New module 'scandir'.
115842         * lib/dirent.in.h (scandir): New declaration.
115843         * lib/scandir.c: New file, from glibc with modifications.
115844         * m4/scandir.m4: New file.
115845         * modules/scandir: New file.
115846         * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): Initialize GNULIB_SCANDIR,
115847         HAVE_SCANDIR.
115848         * modules/dirent (Makefile.am): Substitute GNULIB_SCANDIR,
115849         HAVE_SCANDIR.
115850         * doc/posix-functions/scandir.texi: Mention the new module and the
115851         portability problems.
115853 2009-01-17  Bruno Haible  <bruno@clisp.org>
115855         * gnulib-tool (func_remove_prefix): Escape all dots in the prefix.
115856         Update documentation.
115857         (func_remove_suffix): Escape all dots in the suffix. Update
115858         documentation.
115859         (func_filter_filelist): Update documentation.
115860         Reported by Ralf Wildenhues.
115862 2009-01-17  Bruno Haible  <bruno@clisp.org>
115864         * modules/dprintf-posix-tests: New file.
115865         * tests/test-dprintf-posix.sh: New file.
115866         * tests/test-dprintf-posix.c: New file.
115868         New modules 'dprintf', 'dprintf-posix'.
115869         * lib/stdio.in.h (dprintf): New declaration.
115870         * lib/dprintf.c: New file.
115871         * m4/dprintf.m4: New file.
115872         * m4/dprintf-posix.m4: New file.
115873         * modules/dprintf: New file.
115874         * modules/dprintf-posix: New file.
115875         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize GNULIB_DPRINTF,
115876         HAVE_DPRINTF, REPLACE_DPRINTF.
115877         * modules/stdio (Makefile.am): Substitute also GNULIB_DPRINTF,
115878         HAVE_DPRINTF, REPLACE_DPRINTF.
115879         * doc/posix-functions/dprintf.texi: Mention the new modules.
115881 2009-01-17  Bruno Haible  <bruno@clisp.org>
115883         * modules/vdprintf-posix-tests: New file.
115884         * tests/test-vdprintf-posix.sh: New file.
115885         * tests/test-vdprintf-posix.c: New file.
115887         New modules 'vdprintf', 'vdprintf-posix'.
115888         * lib/stdio.in.h (vdprintf): New declaration.
115889         * lib/vdprintf.c: New file.
115890         * m4/vdprintf.m4: New file.
115891         * m4/vdprintf-posix.m4: New file.
115892         * modules/vdprintf: New file.
115893         * modules/vdprintf-posix: New file.
115894         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize GNULIB_VDPRINTF,
115895         HAVE_VDPRINTF, REPLACE_VDPRINTF.
115896         * modules/stdio (Makefile.am): Substitute also GNULIB_VDPRINTF,
115897         HAVE_VDPRINTF, REPLACE_VDPRINTF.
115898         * doc/posix-functions/vdprintf.texi: Mention the new modules.
115900 2009-01-17  Bruno Haible  <bruno@clisp.org>
115902         Fix replacement of fopen on mingw.
115903         * m4/fopen.m4 (gl_FUNC_FOPEN): Define FOPEN_TRAILING_SLASH_BUG also on
115904         mingw.
115906 2009-01-17  Bruno Haible  <bruno@clisp.org>
115908         Fix compilation error on HP-UX 11.00, present since 2008-09-24.
115909         * lib/fopen.c: Include <sys/types.h> and <sys/types.h>.
115911 2009-01-17  Bruno Haible  <bruno@clisp.org>
115913         Avoid test-fflush2.sh failure on mingw.
115914         * tests/test-fflush2.c: Include binary-io.h.
115915         (main): Put standard input into binary mode.
115916         * modules/fflush-tests (Depends-on): Add binary-io.
115918 2009-01-17  Bruno Haible  <bruno@clisp.org>
115920         * lib/wchar.in.h: In another particular situation, include only the
115921         system's <wchar.h> file.
115922         (_GL_ALREADY_INCLUDING_WCHAR_H): New macro.
115923         Reported by Albert Chin-A-Young <china@thewrittenword.com>
115924         and Thomas Guyot-Sionnest <dermoth@aei.ca>.
115926 2009-01-17  Bruno Haible  <bruno@clisp.org>
115928         Support for stripping executables in --enable-relocatable.
115929         * build-aux/install-reloc: Expect one more argument, or an environment
115930         variable RELOC_STRIP_PROG. If set, strip the destination program and
115931         its wrapper.
115932         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): In INSTALL_PROGRAM_ENV, set
115933         RELOC_STRIP_PROG.
115934         * doc/relocatable-maint.texi (Supporting Relocation): Mention the need
115935         to set RELOCATABLE_STRIP.
115936         * NEWS: Mention the new Makefile requirement.
115938 2009-01-17  Bruno Haible  <bruno@clisp.org>
115940         * build-aux/install-reloc: Remove debugging information left over by
115941         C compiler on MacOS X.
115943 2009-01-17  Bruno Haible  <bruno@clisp.org>
115945         Update use of _NSGetExecutablePath after API change in MacOS X 10.4.
115946         * lib/progreloc.c (find_executable): Fix type of pointer passed to
115947         _NSGetExecutablePath.
115949 2009-01-16  Jim Meyering  <meyering@redhat.com>
115951         strerror: avoid warnings about discarding "const"
115952         * lib/strerror.c (rpl_strerror): Instead of returning a const
115953         string from each and every "case", use a variable, and add a single
115954         cast after the switch.
115956 2009-01-16  Albert Chin-A-Young  <china@thewrittenword.com>
115958         * lib/arpa_inet.in.h: Add extern "C" block for C++.
115960 2009-01-16  Bruno Haible  <bruno@clisp.org>
115962         * m4/printf.m4 (gl_SNPRINTF_SIZE1, gl_VSNPRINTF_ZEROSIZE_C99): Use an
115963         array initializer syntax that also works in C++ mode.
115964         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
115966 2009-01-16  Jim Meyering  <meyering@redhat.com>
115968         poll: suppress a warning
115969         * lib/poll.c: Use #pragma GCC diagnostic ignored "-Wtype-limits"
115970         to ignore "...unsigned expression < 0 is always false" warnings.
115972 2009-01-16  Daniel P. Berrange  <berrange@redhat.com>
115974         poll: remove declarations of unused variables
115975         * lib/poll.c (poll) [WIN32_NATIVE]: Remove declarations of unused
115976         sockbuf and optlen.
115978 2009-01-15  Bruno Haible  <bruno@clisp.org>
115980         Make fflush-after-ungetc POSIX compliant on BSD systems.
115981         * lib/fflush.c (clear_ungetc_buffer_preserving_position): New function.
115982         (clear_ungetc_buffer): Implement also for other systems.
115983         (rpl_fflush): On glibc systems, invoke
115984         clear_ungetc_buffer_preserving_position. Otherwise, invoke
115985         clear_ungetc_buffer after fetching the stream's position, not before.
115987 2009-01-15  Bruno Haible  <bruno@clisp.org>
115989         Make fflush-after-ungetc POSIX compliant on glibc systems.
115990         * m4/fflush.m4 (gl_FUNC_FFLUSH): Test also the behaviour of fflush
115991         after ungetc.
115992         * lib/fflush.c (clear_ungetc_buffer): Implement for glibc systems.
115993         (rpl_fflush): On glibc systems, simply call the system's fflush
115994         function after clearing the ungetc buffer.
115995         * lib/fseeko.c (rpl_fseeko): Don't try to lseek past the end of file.
115996         Instead, lseek only to the end of file, then use the system's fseeko
115997         for the rest. On glibc systems, reset the EOF indicator bit.
115999 2009-01-15  Jim Meyering  <meyering@redhat.com>
116001         openmp.m4: revert quote-adding change, for portability to older autoconf
116002         * m4/openmp.m4: Remove the quotes added on 2009-01-14.
116003         This reverts part of 42d1eda5dcce2d68deab7a642e7f29bcd7144a0d.
116004         Simon Josefsson noticed the problem when using autoconf-2.61.
116006 2009-01-15  Bruno Haible  <bruno@clisp.org>
116008         * tests/test-fflush2.sh: Invoke test-fflush2 twice.
116009         * tests/test-fflush2.c (ASSERT): Always fail.
116010         (main): Add two tests for fflush() after ungetc(), taking into account
116011         the Austin Group's clarification.
116012         Suggested by Eric Blake.
116014 2009-01-15  Albert Chin-A-Young  <china@thewrittenword.com>
116016         mktime.m4: remove K&R-style function prototypes
116017         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove K&R-style function prototypes
116018         for the Sun C++ compiler.
116020 2009-01-14  Bruno Haible  <bruno@clisp.org>
116022         * lib/stdint.in.h (_GL_JUST_INCLUDE_SYSTEM_WCHAR_H): New macro, defined
116023         while including <wchar.h>.
116024         * lib/wchar.in.h: In two particular situations on HP-UX, include only
116025         the system's <wchar.h> file.
116026         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
116028 2009-01-14  Bruno Haible  <bruno@clisp.org>
116030         * m4/csharp.m4: Don't mention gettext on the serial number line.
116031         * m4/csharpexec.m4: Likewise.
116032         * m4/eaccess.m4: Likewise.
116033         * m4/javaexec.m4: Likewise.
116034         * m4/sig_atomic_t.m4: Likewise.
116035         * m4/tmpdir.m4: Likewise.
116036         * m4/intldir.m4: Bump gettext version.
116037         * m4/lib-ld.m4: Likewise.
116039 2009-01-14  Bruno Haible  <bruno@clisp.org>
116041         * lib/progname.c (set_program_name): Add more comments.
116042         Reported by Sergey Poznyakoff <gray@gnu.org.ua>.
116044 2009-01-14  Simon Josefsson  <simon@josefsson.org>
116046         * lib/sys_stat.in.h: Include sys/types.h for nlink_t on systems
116047         were sys/stat.h does not define it.
116049 2009-01-14  Jim Meyering  <meyering@redhat.com>
116051         many *.m4 files: improve m4 quoting
116052         99% of this change was performed by running the following commands:
116053         git ls-files | grep '\.m4$' | xargs perl -pi \
116054           -e 's/(AC_\w+\()([^[()]+?)([,)])/$1\[$2]$3/g;' \
116055           -e 's/(AC_\w+\((?:\[[^,]+?\], ){1})([^,[()]+?)([,)])/$1\[$2]$3/g;' \
116056           -e 's/(AC_\w+\((?:\[[^,]+?\], ){2})([^,[()]+?)([,)])/$1\[$2]$3/g;' \
116057           -e 's/(AC_\w+\((?:\[[^,]+?\], ){3})([^,[()]+?)([,)])/$1\[$2]$3/g'
116058         perl -pi -e 's/\[\.\.\.\]/.../' m4/onceonly.m4
116059         The remainder were to add Copyright dates, increment serial numbers,
116060         undo some changes in comments, exclude m4/intl.m4, and add quotes
116061         around the "1" in ",1" where the unusual spacing prohibited the
116062         above regexps from doing the job.  For more details, see
116063         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/16175>.
116064         * m4/acl.m4: Modified.
116065         * m4/afs.m4: Likewise.
116066         * m4/alloca.m4: Likewise.
116067         * m4/argp.m4: Likewise.
116068         * m4/argz.m4: Likewise.
116069         * m4/atexit.m4: Likewise.
116070         * m4/bison-i18n.m4: Likewise.
116071         * m4/bison.m4: Likewise.
116072         * m4/byteswap.m4: Likewise.
116073         * m4/c-stack.m4: Likewise.
116074         * m4/c-strtod.m4: Likewise.
116075         * m4/calloc.m4: Likewise.
116076         * m4/canonicalize-lgpl.m4: Likewise.
116077         * m4/chown.m4: Likewise.
116078         * m4/clock_time.m4: Likewise.
116079         * m4/codeset.m4: Likewise.
116080         * m4/copy-file.m4: Likewise.
116081         * m4/csharp.m4: Likewise.
116082         * m4/csharpcomp.m4: Likewise.
116083         * m4/csharpexec.m4: Likewise.
116084         * m4/d-ino.m4: Likewise.
116085         * m4/d-type.m4: Likewise.
116086         * m4/dirfd.m4: Likewise.
116087         * m4/double-slash-root.m4: Likewise.
116088         * m4/eaccess.m4: Likewise.
116089         * m4/eealloc.m4: Likewise.
116090         * m4/environ.m4: Likewise.
116091         * m4/errno_h.m4: Likewise.
116092         * m4/euidaccess.m4: Likewise.
116093         * m4/execute.m4: Likewise.
116094         * m4/fatal-signal.m4: Likewise.
116095         * m4/fchdir.m4: Likewise.
116096         * m4/fcntl_h.m4: Likewise.
116097         * m4/fileblocks.m4: Likewise.
116098         * m4/filenamecat.m4: Likewise.
116099         * m4/findprog.m4: Likewise.
116100         * m4/flexmember.m4: Likewise.
116101         * m4/fnmatch.m4: Likewise.
116102         * m4/fopen.m4: Likewise.
116103         * m4/fpending.m4: Likewise.
116104         * m4/fprintf-posix.m4: Likewise.
116105         * m4/free.m4: Likewise.
116106         * m4/frexp.m4: Likewise.
116107         * m4/frexpl.m4: Likewise.
116108         * m4/fsusage.m4: Likewise.
116109         * m4/ftruncate.m4: Likewise.
116110         * m4/gc-camellia.m4: Likewise.
116111         * m4/gc-random.m4: Likewise.
116112         * m4/gc.m4: Likewise.
116113         * m4/getaddrinfo.m4: Likewise.
116114         * m4/getcwd-abort-bug.m4: Likewise.
116115         * m4/getcwd-path-max.m4: Likewise.
116116         * m4/getdate.m4: Likewise.
116117         * m4/getdomainname.m4: Likewise.
116118         * m4/getgroups.m4: Likewise.
116119         * m4/gethostname.m4: Likewise.
116120         * m4/gethrxtime.m4: Likewise.
116121         * m4/getline.m4: Likewise.
116122         * m4/getloadavg.m4: Likewise.
116123         * m4/getndelim2.m4: Likewise.
116124         * m4/getpass.m4: Likewise.
116125         * m4/gettext.m4: Likewise.
116126         * m4/gettime.m4: Likewise.
116127         * m4/gettimeofday.m4: Likewise.
116128         * m4/gnulib-common.m4: Likewise.
116129         * m4/group-member.m4: Likewise.
116130         * m4/host-os.m4: Likewise.
116131         * m4/iconv.m4: Likewise.
116132         * m4/iconv_open.m4: Likewise.
116133         * m4/inet_ntop.m4: Likewise.
116134         * m4/inet_pton.m4: Likewise.
116135         * m4/inline.m4: Likewise.
116136         * m4/intldir.m4: Likewise.
116137         * m4/intlmacosx.m4: Likewise.
116138         * m4/intmax.m4: Likewise.
116139         * m4/intmax_t.m4: Likewise.
116140         * m4/inttypes.m4: Likewise.
116141         * m4/inttypes_h.m4: Likewise.
116142         * m4/inttypes-pri.m4: Likewise.
116143         * m4/isapipe.m4: Likewise.
116144         * m4/isnand.m4: Likewise.
116145         * m4/isnanf.m4: Likewise.
116146         * m4/isnanl.m4: Likewise.
116147         * m4/javacomp.m4: Likewise.
116148         * m4/javaexec.m4: Likewise.
116149         * m4/jm-winsz1.m4: Likewise.
116150         * m4/jm-winsz2.m4: Likewise.
116151         * m4/lchown.m4: Likewise.
116152         * m4/lcmessage.m4: Likewise.
116153         * m4/ldexpl.m4: Likewise.
116154         * m4/lib-ld.m4: Likewise.
116155         * m4/lib-link.m4: Likewise.
116156         * m4/libsigsegv.m4: Likewise.
116157         * m4/link-follow.m4: Likewise.
116158         * m4/localcharset.m4: Likewise.
116159         * m4/locale-fr.m4: Likewise.
116160         * m4/locale-ja.m4: Likewise.
116161         * m4/locale-tr.m4: Likewise.
116162         * m4/locale-zh.m4: Likewise.
116163         * m4/lock.m4: Likewise.
116164         * m4/longlong.m4: Likewise.
116165         * m4/ls-mntd-fs.m4: Likewise.
116166         * m4/lstat.m4: Likewise.
116167         * m4/malloc.m4: Likewise.
116168         * m4/mathl.m4: Likewise.
116169         * m4/mbrtowc.m4: Likewise.
116170         * m4/mbstate_t.m4: Likewise.
116171         * m4/mbswidth.m4: Likewise.
116172         * m4/memchr.m4: Likewise.
116173         * m4/memcmp.m4: Likewise.
116174         * m4/memcpy.m4: Likewise.
116175         * m4/memmem.m4: Likewise.
116176         * m4/memmove.m4: Likewise.
116177         * m4/mempcpy.m4: Likewise.
116178         * m4/memrchr.m4: Likewise.
116179         * m4/memset.m4: Likewise.
116180         * m4/minmax.m4: Likewise.
116181         * m4/mkdir-slash.m4: Likewise.
116182         * m4/mkdtemp.m4: Likewise.
116183         * m4/mktime.m4: Likewise.
116184         * m4/mmap-anon.m4: Likewise.
116185         * m4/mountlist.m4: Likewise.
116186         * m4/nanosleep.m4: Likewise.
116187         * m4/nls.m4: Likewise.
116188         * m4/nocrash.m4: Likewise.
116189         * m4/open.m4: Likewise.
116190         * m4/openat.m4: Likewise.
116191         * m4/openmp.m4: Likewise.
116192         * m4/pathmax.m4: Likewise.
116193         * m4/perl.m4: Likewise.
116194         * m4/physmem.m4: Likewise.
116195         * m4/pipe.m4: Likewise.
116196         * m4/po.m4: Likewise.
116197         * m4/poll.m4: Likewise.
116198         * m4/posixtm.m4: Likewise.
116199         * m4/posixver.m4: Likewise.
116200         * m4/printf-frexp.m4: Likewise.
116201         * m4/printf-frexpl.m4: Likewise.
116202         * m4/printf-posix.m4: Likewise.
116203         * m4/printf-posix-rpl.m4: Likewise.
116204         * m4/printf.m4: Likewise.
116205         * m4/progtest.m4: Likewise.
116206         * m4/putenv.m4: Likewise.
116207         * m4/readline.m4: Likewise.
116208         * m4/readlink.m4: Likewise.
116209         * m4/readutmp.m4: Likewise.
116210         * m4/realloc.m4: Likewise.
116211         * m4/regex.m4: Likewise.
116212         * m4/relocatable.m4: Likewise.
116213         * m4/relocatable-lib.m4: Likewise.
116214         * m4/rename-dest-slash.m4: Likewise.
116215         * m4/rename.m4: Likewise.
116216         * m4/rmdir-errno.m4: Likewise.
116217         * m4/rmdir.m4: Likewise.
116218         * m4/roundf.m4: Likewise.
116219         * m4/roundl.m4: Likewise.
116220         * m4/rpmatch.m4: Likewise.
116221         * m4/save-cwd.m4: Likewise.
116222         * m4/selinux-selinux-h.m4: Likewise.
116223         * m4/setenv.m4: Likewise.
116224         * m4/settime.m4: Likewise.
116225         * m4/sig2str.m4: Likewise.
116226         * m4/sig_atomic_t.m4: Likewise.
116227         * m4/signalblocking.m4: Likewise.
116228         * m4/signbit.m4: Likewise.
116229         * m4/sigpipe.m4: Likewise.
116230         * m4/sockets.m4: Likewise.
116231         * m4/sockpfaf.m4: Likewise.
116232         * m4/st_dm_mode.m4: Likewise.
116233         * m4/stat-time.m4: Likewise.
116234         * m4/stdbool.m4: Likewise.
116235         * m4/stdint.m4: Likewise.
116236         * m4/stdint_h.m4: Likewise.
116237         * m4/stpcpy.m4: Likewise.
116238         * m4/stpncpy.m4: Likewise.
116239         * m4/strcase.m4: Likewise.
116240         * m4/strchrnul.m4: Likewise.
116241         * m4/strcspn.m4: Likewise.
116242         * m4/strdup.m4: Likewise.
116243         * m4/strftime.m4: Likewise.
116244         * m4/strndup.m4: Likewise.
116245         * m4/strnlen.m4: Likewise.
116246         * m4/strpbrk.m4: Likewise.
116247         * m4/strptime.m4: Likewise.
116248         * m4/strsep.m4: Likewise.
116249         * m4/strtod.m4: Likewise.
116250         * m4/strtoimax.m4: Likewise.
116251         * m4/strtok_r.m4: Likewise.
116252         * m4/strtol.m4: Likewise.
116253         * m4/strtoll.m4: Likewise.
116254         * m4/strtoul.m4: Likewise.
116255         * m4/strtoull.m4: Likewise.
116256         * m4/strtoumax.m4: Likewise.
116257         * m4/strverscmp.m4: Likewise.
116258         * m4/threadlib.m4: Likewise.
116259         * m4/timegm.m4: Likewise.
116260         * m4/tm_gmtoff.m4: Likewise.
116261         * m4/tmpdir.m4: Likewise.
116262         * m4/tmpfile.m4: Likewise.
116263         * m4/tzset.m4: Likewise.
116264         * m4/uintmax_t.m4: Likewise.
116265         * m4/unlinkdir.m4: Likewise.
116266         * m4/unlocked-io.m4: Likewise.
116267         * m4/uptime.m4: Likewise.
116268         * m4/userspec.m4: Likewise.
116269         * m4/utimbuf.m4: Likewise.
116270         * m4/utime.m4: Likewise.
116271         * m4/utimes-null.m4: Likewise.
116272         * m4/utimes.m4: Likewise.
116273         * m4/vararrays.m4: Likewise.
116274         * m4/vasnprintf.m4: Likewise.
116275         * m4/vfprintf-posix.m4: Likewise.
116276         * m4/vprintf-posix.m4: Likewise.
116277         * m4/wait-process.m4: Likewise.
116278         * m4/wchar_t.m4: Likewise.
116279         * m4/wint_t.m4: Likewise.
116280         * m4/write-any-file.m4: Likewise.
116281         * m4/yield.m4: Likewise.
116283 2009-01-13  Bruno Haible  <bruno@clisp.org>
116285         Avoid test-copy-file.sh failures when ACL support insufficient.
116286         * modules/copy-file-tests (Makefile.am): Pass USE_ACL in
116287         TESTS_ENVIRONMENT.
116288         * tests/test-copy-file.sh: Skip the ACL comparisons if USE_ACL is 0.
116289         Reported by Jim Meyering.
116291 2009-01-13  Bruno Haible  <bruno@clisp.org>
116293         * modules/unistdio/u-printf-args (Files): Add m4/stdint_h.m4 and
116294         m4/inttypes_h.m4, needed by m4/intmax_t.m4.
116295         * modules/unistdio/u8-printf-parse (Files): Likewise.
116296         * modules/unistdio/u32-printf-parse (Files): Likewise.
116297         * modules/unistdio/ulc-printf-parse (Files): Likewise.
116299 2009-01-13  Simon Josefsson  <simon@josefsson.org>
116301         * modules/unistdio/u16-printf-parse (Files): Add m4/stdint_h.m4
116302         and m4/inttypes_h.m4 too.
116304 2009-01-12  Eric Blake  <ebb9@byu.net>
116306         tests: IRIX 6.2 cc can't compile -0.0 into .data
116307         * tests/test-ceill.c (minus_zero): Compute -0.0L at runtime,
116308         rather than at compile-time.
116309         * tests/test-floorl.c (minus_zero): Likewise.
116310         * tests/test-frexpl.c (minus_zero): Likewise.
116311         * tests/test-isnan.c (minus_zerol): Likewise.
116312         * tests/test-isnanl.h (minus_zero): Likewise.
116313         * tests/test-ldexpl.c (minus_zero): Likewise.
116314         * tests/test-roundl.c (minus_zero): Likewise.
116315         * tests/test-signbit.c (minus_zerol): Likewise.
116316         * tests/test-snprintf-posix.h (minus_zerol): Likewise.
116317         * tests/test-sprintf-posix.h (minus_zerol): Likewise.
116318         * tests/test-truncl.c (minus_zero): Likewise.
116319         * tests/test-vasnprintf-posix.c (minus_zerol): Likewise.
116320         * tests/test-vasprintf-posix.c (minus_zerol): Likewise.
116321         Reported by Tom G. Christensen and Nelson H. F. Beebe.
116323 2009-01-09  Paolo Bonzini  <bonzini@gnu.org>
116325         regex: fix glibc bug 9697
116326         * lib/regcomp.c (re_compile_fastmap_iter): Rewrite COMPLEX_BRACKET
116327         handling.
116329 2009-01-09  Paolo Bonzini  <bonzini@gnu.org>
116331         regex: fix glibc bug 697
116332         * lib/regexec.c (prune_impossible_nodes): Handle sifted_states[0]
116333         being NULL also if there are no backreferences.
116335 2009-01-09  Paolo Bonzini  <bonzini@gnu.org>
116337         regex: merge glibc changes
116338         * lib/regcomp.c (re_compile_fastmap_iter): Use __mbrtowc.
116339         * lib/regex_internal.c (build_wcs_buffer, build_wcs_upper_buffer,
116340         re_string_skip_chars, re_string_reconstruct): Likewise.
116341         * lib/regex_internal.h [!_LIBC] (__mbrtowc): New #define.
116343 2009-01-07  Jim Meyering  <meyering@redhat.com>
116345         poll: filter through cppi
116346         * lib/poll.c: Indent cpp directives to reflect nesting.
116348 2009-01-07  Daniel P. Berrange  <berrange@redhat.com>
116350         poll: don't return uninitialized
116351         * lib/poll.c (poll) [WIN32_NATIVE]: Initialize "rc".
116353 2009-01-06  Jeremy Olexa  <darkside@gentoo.org>  (tiny change)
116355         avoid compile failure on AIX 6.1
116356         * lib/getloadavg.c [HAVE_LIBPERFSTAT]: Include <sys/protosw.h>.
116357         Details in http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/15465
116359 2009-01-04  Jim Meyering  <meyering@redhat.com>
116361         remove duplicate inclusion of <stdio.h>
116362         * tests/test-fprintf-posix.c: Likewise.
116363         * tests/test-printf-posix.c: Likewise.
116364         * tests/test-snprintf-posix.c: Likewise.
116365         * tests/test-sprintf-posix.c: Likewise.
116366         * tests/test-vasprintf-posix.c: Likewise.
116367         * tests/test-vfprintf-posix.c: Likewise.
116368         * tests/test-vprintf-posix.c: Likewise.
116369         * tests/test-vsnprintf-posix.c: Likewise.
116370         * tests/test-vsprintf-posix.c: Likewise.
116372 2009-01-03  Jim Meyering  <meyering@redhat.com>
116374         gnulib-tool: fix sed-based filtering
116375         * gnulib-tool (func_filter_filelist): Remove extra backslash
116376         in sed_fff_filter definition.
116378 2009-01-02  Jim Meyering  <meyering@redhat.com>
116380         strftime: avoid compilation failure on Solaris 2.6
116381         * modules/strftime (Depends-on): Add mbrlen and mbsinit.
116382         * lib/strftime.c [DO_MULTIBYTE]: Include <wchar.h> unconditionally.
116383         Don't #define mbrlen or mbsinit, since now they're guaranteed to
116384         be available.  Reported by Tom G. Christensen.  Details in
116385         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/16180>.
116387 2009-01-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
116388             Bruno Haible  <bruno@clisp.org>
116390         Speed up gnulib-tool by doing more string processing through shell
116391         built-ins.
116392         * gnulib-tool (fast_func_append): New variable.
116393         (func_remove_prefix, func_remove_suffix): New functions.
116394         (fast_func_remove_prefix, fast_func_remove_suffix): New variables.
116395         (func_filter_filelist): New function.
116396         (func_get_dependencies): Use func_remove_suffix instead of sed.
116397         (func_get_automake_snippet): Use func_filter_filelist instead of a
116398         subshell and sed invocation.
116400 2009-01-01  Bruno Haible  <bruno@clisp.org>
116402         Fix a security bug.
116403         * gnulib-tool (func_import, import, update): Don't allow the characters
116404         '"', '$', '`', '\' in macro arguments that become part of commands that
116405         are evaluated.
116407 2009-01-01  Bruno Haible  <bruno@clisp.org>
116409         * gnulib-tool (func_reset_sigpipe): Add more comments.
116411 2009-01-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
116413         * gnulib-tool (func_modules_add_dummy, func_emit_lib_Makefile_am,
116414         func_emit_tests_Makefile_am, func_import): Abort loops early if we
116415         already know the answer.
116417 2009-01-01  Jim Meyering  <meyering@redhat.com>
116419         * lib/version-etc.c (version_etc_va): Update copyright year.
116421 2008-12-30  Bruno Haible  <bruno@clisp.org>
116423         * m4/lib-prefix.m4 (AC_LIB_LINKFLAGS_BODY): Don't overwrite
116424         LIB${NAME}_PREFIX when considering the dependencies of lib${name}.
116425         Reported by Charles Wilson <cygwin@cwilson.fastmail.fm>.
116427 2008-12-29  Eric Blake  <ebb9@byu.net>
116429         multiarch: avoid autoconf AC_REQUIRE bug
116430         * m4/multiarch.m4 (gl_MULTIARCH): Split body...
116431         (gl_MULTIARCH_BODY): ...into new macro, to work around bug in Autoconf
116432         2.63 and older.
116433         Reported by Bruno Haible, and analyzed in
116434         http://lists.gnu.org/r/bug-autoconf/2008-12/msg00039.html
116436 2008-12-29  Bruno Haible  <bruno@clisp.org>
116438         * gnulib-tool (func_import): When generating sed-ignore-removed, handle
116439         files in subdirectories correctly.
116440         Reported by Ralf Wildenhues.
116442 2008-12-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
116444         * gnulib-tool (func_update_ignorelist): Use 'join - FILE'
116445         rather than 'join FILE -', for Solaris join.
116447 2008-12-29  Bruno Haible  <bruno@clisp.org>
116449         * m4/codeset.m4 (AM_LANGINFO_CODESET): More systematic m4 argument
116450         quoting.
116451         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
116452         * m4/glibc2.m4 (gt_GLIBC2): Likewise.
116453         * m4/glibc21.m4 (gl_GLIBC21): Likewise.
116454         * m4/iconv.m4 (AM_ICONV_LINK, AM_ICONV): Likewise.
116455         * m4/intdiv0.m4 (gt_INTDIV0): Likewise.
116456         * m4/intlmacosx.m4 (gt_INTL_MACOSX): Likewise.
116457         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Likewise.
116458         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Likewise.
116459         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
116460         * m4/lcmessage.m4 (gt_LC_MESSAGES): Likewise.
116461         * m4/nls.m4 (AM_NLS): Likewise.
116462         * m4/po.m4 (AM_PO_SUBDIRS): Likewise.
116463         * m4/printf-posix.m4 (gt_PRINTF_POSIX): Likewise.
116464         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
116465         * m4/size_max.m4 (gl_SIZE_MAX): Likewise.
116466         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Likewise.
116467         * m4/threadlib.m4 (gl_THREADLIB_BODY): Likewise.
116468         * m4/uintmax_t.m4 (gl_AC_TYPE_UINTMAX_T): Likewise.
116469         * m4/visibility.m4 (gl_VISIBILITY): Likewise.
116470         * m4/wchar_t.m4 (gt_TYPE_WCHAR_T): Likewise.
116471         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
116472         * m4/xsize.m4 (gl_XSIZE): Likewise.
116473         Suggested by Jim Meyering.
116475 2008-11-17  Bruce Korb  <bkorb@gnu.org>
116477         * lib/parse-duration.h: non-iso form accepts years, months weeks, too
116478         * lib/parse-duration.c: use a switch instead of cascading if's.
116480 2008-12-29  Eric Blake  <ebb9@byu.net>
116482         wchar.h: supply WEOF on Irix 5.3
116483         * lib/wchar.in.h (wint_t): Also supply WEOF.
116484         * lib/wctype.in.h (wint_t): Likewise.
116485         * doc/posix-headers/wchar.texi (wchar.h): Document the bug.
116486         * doc/posix-headers/wctype.texi (wctype.h): Likewise.
116487         Reported by Tom G. Christensen.
116489 2008-12-26  Bruno Haible  <bruno@clisp.org>
116491         * m4/multiarch.m4 (gl_MULTIARCH): Recognize also the architecture names
116492         i486, i586, i686.
116494 2008-12-26  Bruno Haible  <bruno@clisp.org>
116496         * lib/stdlib.in.h (struct random_data): Fix indentation of comments.
116498 2008-12-26  Bruno Haible  <bruno@clisp.org>
116500         * lib/stdint.in.h: Move the include of <wchar.h> down until after all
116501         the types are defined. Also conditionalize it on __STDC_LIMIT_MACROS,
116502         not __STDC_CONSTANT_MACROS.
116503         Reported by Nelson H. F. Beebe <beebe@math.utah.edu> via Eric Blake.
116505 2008-12-25  Bruno Haible  <bruno@clisp.org>
116507         Add support for universal builds to vasnprintf.
116508         * m4/printf.m4 (gl_PRINTF_ENOMEM): Require gl_MULTIARCH. In Apple
116509         universal builds, guess no.
116510         * modules/vasnprintf-posix (Depends-on): Add multiarch.
116511         * modules/vasprintf-posix (Depends-on): Likewise.
116512         * modules/fprintf-posix (Depends-on): Likewise.
116513         * modules/vfprintf-posix (Depends-on): Likewise.
116514         * modules/snprintf-posix (Depends-on): Likewise.
116515         * modules/vsnprintf-posix (Depends-on): Likewise.
116516         * modules/sprintf-posix (Depends-on): Likewise.
116517         * modules/vsprintf-posix (Depends-on): Likewise.
116518         * modules/unistdio/u8-vasnprintf (Depends-on): Likewise.
116519         * modules/unistdio/u8-u8-vasnprintf (Depends-on): Likewise.
116520         * modules/unistdio/u16-vasnprintf (Depends-on): Likewise.
116521         * modules/unistdio/u16-u16-vasnprintf (Depends-on): Likewise.
116522         * modules/unistdio/u32-vasnprintf (Depends-on): Likewise.
116523         * modules/unistdio/u32-u32-vasnprintf (Depends-on): Likewise.
116524         * modules/unistdio/ulc-vasnprintf (Depends-on): Likewise.
116526         Add support for universal builds to <inttypes.h>.
116527         * lib/inttypes.in.h (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX,
116528         _SCNu64_PREFIX): In Apple
116529         universal builds, define directly, using _LP64.
116530         * m4/inttypes.m4 (gl_INTTYPES_H): In Apple universal builds, set
116531         INT64_MAX_EQ_LONG_MAX and UINT64_MAX_EQ_ULONG_MAX to -1.
116532         * modules/inttypes (Depends-on): Add multiarch.
116533         (Makefile.am): Substitute APPLE_UNIVERSAL_BUILD.
116535         Add support for universal builds to <stdint.h>.
116536         * lib/stdint.in.h (PDFDIFF_MIN, PTRDIFF_MAX, SIZE_MAX): In Apple
116537         universal builds, define directly, using _LP64.
116538         * m4/stdint.m4 (gl_STDINT_TYPE_PROPERTIES): Require gl_MULTIARCH. In
116539         Apple universal builds, don't test for the size and suffix of ptrdiff_t
116540         and size_t.
116541         * modules/stdint (Depends-on): Add multiarch.
116542         (Makefile.am): Substitute APPLE_UNIVERSAL_BUILD.
116544         New module 'multiarch'.
116545         * modules/multiarch: New file.
116546         * m4/multiarch.m4: New file.
116548 2008-12-25  Bruno Haible  <bruno@clisp.org>
116550         * gnulib-tool (func_create_testdir): Avoid failure of mv command.
116552 2008-12-25  Bruno Haible  <bruno@clisp.org>
116554         * modules/btowc (License): Relicense under LGPLv2+.
116555         * modules/mbsinit (License): Likewise.
116556         * modules/mbrtowc (License): Likewise.
116557         * modules/wcrtomb (License): Likewise.
116558         * modules/streq (License): Likewise.
116559         Reported by David Lutterkort <lutter@redhat.com>.
116561 2008-12-23  Bruno Haible  <bruno@clisp.org>
116563         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Fix conditional and comment.
116565 2008-12-23  Bruno Haible  <bruno@clisp.org>
116567         Module getaddrinfo requires linking with $(GETADDRINFO_LIB).
116568         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Put link options into
116569         GETADDRINFO_LIB, not in LIBS.
116570         * modules/getaddrinfo (Link): Set to $(GETADDRINFO_LIB).
116571         * modules/canon-host (Link): Likewise.
116572         * NEWS: Mention the change.
116573         * modules/getaddrinfo-tests (test_getaddrinfo_LDADD): Add the
116574         GETADDRINFO_LIB.
116576 2008-12-22  Bruno Haible  <bruno@clisp.org>
116578         * doc/posix-functions/iswalnum_l.texi: Mention limitation of wchar_t.
116579         * doc/posix-functions/iswalpha_l.texi: Likewise.
116580         * doc/posix-functions/iswblank_l.texi: Likewise.
116581         * doc/posix-functions/iswcntrl_l.texi: Likewise.
116582         * doc/posix-functions/iswctype_l.texi: Likewise.
116583         * doc/posix-functions/iswdigit_l.texi: Likewise.
116584         * doc/posix-functions/iswgraph_l.texi: Likewise.
116585         * doc/posix-functions/iswlower_l.texi: Likewise.
116586         * doc/posix-functions/iswprint_l.texi: Likewise.
116587         * doc/posix-functions/iswpunct_l.texi: Likewise.
116588         * doc/posix-functions/iswspace_l.texi: Likewise.
116589         * doc/posix-functions/iswupper_l.texi: Likewise.
116590         * doc/posix-functions/iswxdigit_l.texi: Likewise.
116591         * doc/posix-functions/mbsnrtowcs.texi: Likewise.
116592         * doc/posix-functions/open_wmemstream.texi: Likewise.
116593         * doc/posix-functions/swscanf.texi: Likewise.
116594         * doc/posix-functions/towctrans_l.texi: Likewise.
116595         * doc/posix-functions/towlower.texi: Likewise.
116596         * doc/posix-functions/towlower_l.texi: Likewise.
116597         * doc/posix-functions/towupper.texi: Likewise.
116598         * doc/posix-functions/towupper_l.texi: Likewise.
116599         * doc/posix-functions/vfwprintf.texi: Likewise.
116600         * doc/posix-functions/vfwscanf.texi: Likewise.
116601         * doc/posix-functions/vswscanf.texi: Likewise.
116602         * doc/posix-functions/vwprintf.texi: Likewise.
116603         * doc/posix-functions/vwscanf.texi: Likewise.
116604         * doc/posix-functions/wcpcpy.texi: Likewise.
116605         * doc/posix-functions/wcpncpy.texi: Likewise.
116606         * doc/posix-functions/wcscasecmp.texi: Likewise.
116607         * doc/posix-functions/wcscasecmp_l.texi: Likewise.
116608         * doc/posix-functions/wcscoll_l.texi: Likewise.
116609         * doc/posix-functions/wcsdup.texi: Likewise.
116610         * doc/posix-functions/wcsncasecmp.texi: Likewise.
116611         * doc/posix-functions/wcsncasecmp_l.texi: Likewise.
116612         * doc/posix-functions/wcsnlen.texi: Likewise.
116613         * doc/posix-functions/wcsnrtombs.texi: Likewise.
116614         * doc/posix-functions/wcsxfrm_l.texi: Likewise.
116615         * doc/posix-functions/wctrans_l.texi: Likewise.
116616         * doc/posix-functions/wctype_l.texi: Likewise.
116617         * doc/glibc-functions/fgetwc_unlocked.texi: Likewise.
116618         * doc/glibc-functions/fgetws_unlocked.texi: Likewise.
116619         * doc/glibc-functions/fputwc_unlocked.texi: Likewise.
116620         * doc/glibc-functions/fputws_unlocked.texi: Likewise.
116621         * doc/glibc-functions/getwc_unlocked.texi: Likewise.
116622         * doc/glibc-functions/getwchar_unlocked.texi: Likewise.
116623         * doc/glibc-functions/putwc_unlocked.texi: Likewise.
116624         * doc/glibc-functions/putwchar_unlocked.texi: Likewise.
116625         * doc/glibc-functions/wcschrnul.texi: Likewise.
116626         * doc/glibc-functions/wcsftime_l.texi: Likewise.
116627         * doc/glibc-functions/wcstod_l.texi: Likewise.
116628         * doc/glibc-functions/wcstof_l.texi: Likewise.
116629         * doc/glibc-functions/wcstol_l.texi: Likewise.
116630         * doc/glibc-functions/wcstold_l.texi: Likewise.
116631         * doc/glibc-functions/wcstoll_l.texi: Likewise.
116632         * doc/glibc-functions/wcstoq.texi: Likewise.
116633         * doc/glibc-functions/wcstoul_l.texi: Likewise.
116634         * doc/glibc-functions/wcstoull_l.texi: Likewise.
116635         * doc/glibc-functions/wcstouq.texi: Likewise.
116636         * doc/glibc-functions/wmempcpy.texi: Likewise.
116638 2008-12-22  Ingo Weinhold  <ingo_weinhold@gmx.de>  (tiny change)
116639             Eric Blake  <ebb9@byu.net>
116640             Paolo Bonzini  <bonzini@gnu.org>
116641             Bruno Haible  <bruno@clisp.org>
116643         Make c-stack work on Haiku.
116644         * lib/c-stack.c (SA_ONSTACK): Define fallback.
116645         (c_stack_action): Use SA_ONSTACK flag.
116647 2008-12-22  Bruno Haible  <bruno@clisp.org>
116649         * m4/locale-fr.m4 (gt_LOCALE_FR_UTF8): Treat Haiku like BeOS.
116651 2008-12-22  Bruno Haible  <bruno@clisp.org>
116653         Work around mbrlen() bugs on AIX, HP-UX, OSF/1, Solaris.
116654         * m4/mbrlen.m4 (gl_FUNC_MBRLEN): Set REPLACE_MBRLEN if mbrtowc is
116655         being overridden.
116656         (gl_MBRLEN_INCOMPLETE_STATE, gl_MBRLEN_RETVAL, gl_MBRLEN_NUL_RETVAL):
116657         New macros.
116658         * lib/wchar.in.h (mbrlen): Override if REPLACE_MBRLEN is set.
116659         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_MBRLEN.
116660         * modules/wchar (Makefile.am): Substitute REPLACE_MBRLEN.
116661         * doc/posix-functions/mbrlen.texi: Mention the various platform bugs.
116663 2008-12-22  Bruno Haible  <bruno@clisp.org>
116665         * m4/mbrtowc.m4 (gl_MBRTOWC_INCOMPLETE_STATE): Remove unused variable
116666         from test code.
116668 2008-12-22  Eric Blake  <ebb9@byu.net>
116670         Avoid gcc warnings on cygwin.
116671         * lib/regex_internal.c (re_string_reconstruct) [!RE_ENABLE_I18N]:
116672         Avoid unused variable.
116673         * lib/regexec.c (check_arrival_add_next_nodes) [!RE_ENABLE_I18N]:
116674         Likewise.
116676 2008-12-22  Bruno Haible  <bruno@clisp.org>
116678         Remove HAVE_MBRTOWC conditionals.
116679         * lib/mbscasecmp.c: Include mbuiter.h unconditionally.
116680         (mbscasecmp): Assume mbrtowc function.
116681         * lib/mbscasestr.c: Include mbuiter.h unconditionally.
116682         (knuth_morris_pratt_multibyte, mbscasestr): Assume mbrtowc function.
116683         * lib/mbschr.c: Include mbuiter.h unconditionally.
116684         (mbschr): Assume mbrtowc function.
116685         * lib/mbscspn.c: Include mbuiter.h unconditionally.
116686         (mbscspn): Assume mbrtowc function.
116687         * lib/mbslen.c: Include mbuiter.h unconditionally.
116688         (mbslen): Assume mbrtowc function.
116689         * lib/mbsncasecmp.c: Include mbuiter.h unconditionally.
116690         (mbsncasecmp): Assume mbrtowc function.
116691         * lib/mbsnlen.c: Include mbiter.h unconditionally.
116692         (mbsnlen): Assume mbrtowc function.
116693         * lib/mbspbrk.c: Include mbuiter.h unconditionally.
116694         (mbspbrk): Assume mbrtowc function.
116695         * lib/mbspcasecmp.c: Include mbuiter.h unconditionally.
116696         (mbspcasecmp): Assume mbrtowc function.
116697         * lib/mbsrchr.c: Include mbuiter.h unconditionally.
116698         (mbsrchr): Assume mbrtowc function.
116699         * lib/mbssep.c: Include mbuiter.h unconditionally.
116700         (mbssep): Assume mbrtowc function.
116701         * lib/mbsspn.c: Include mbuiter.h unconditionally.
116702         (mbsspn): Assume mbrtowc function.
116703         * lib/mbsstr.c: Include mbuiter.h unconditionally.
116704         (knuth_morris_pratt_multibyte, mbsstr): Assume mbrtowc function.
116705         * lib/mbstok_r.c: Include mbuiter.h unconditionally.
116706         (mbstok_r): Assume mbrtowc function.
116707         * lib/propername.c: Include mbuiter.h unconditionally.
116708         (mbsstr_trimmed_wordbounded): Assume mbrtowc function.
116709         * lib/trim.c: Include mbchar.h, mbiter.h unconditionally.
116710         (trim2): Assume mbrtowc function.
116711         * lib/mbswidth.c (mbsinit): Remove fallback definition.
116712         (mbsnwidth): Assume mbrtowc function.
116713         * modules/mbswidth (Depends-on): Add mbrtowc, mbsinit.
116714         * lib/quotearg.c (MB_CUR_MAX, mbstate_t, mbrtowc, iswprint): Remove
116715         fallback definitions.
116716         * modules/quotearg (Depends-on): Add mbrtowc, mbsinit.
116718 2008-12-22  Bruno Haible  <bruno@clisp.org>
116720         * doc/posix-functions/mbtowc.texi: Mention a glibc bug.
116722 2008-12-22  Paolo Bonzini  <bonzini@gnu.org>
116724         * modules/regex: Request emulations for the mb*/wc* functions we need.
116725         * m4/regex.m4: Don't look for those functions here.
116726         * lib/regex_internal.h: Do not check HAVE_WCRTOMB and HAVE_MBRTOWC.
116728 2008-12-22  Bruno Haible  <bruno@clisp.org>
116730         * modules/fnmatch (Depends-on): Remove duplicated dependency.
116732 2008-12-21  Bruno Haible  <bruno@clisp.org>
116734         Make mbiter.h, mbuiter.h, mbfile.h usable unconditionally.
116735         * modules/mbiter (Depends-on): Add mbrtowc, mbsinit.
116736         (Include): Remove conditionalization.
116737         * modules/mbuiter (Depends-on): Add mbrtowc, mbsinit.
116738         (Include): Remove conditionalization.
116739         * modules/mbfile (Depends-on): Add mbrtowc, mbsinit.
116740         (Include): Remove conditionalization.
116741         * m4/mbiter.m4 (gl_MBITER): Deprecate the use of AC_FUNC_MBRTOWC.
116742         * m4/mbfile.m4 (gl_MBFILE): Likewise.
116743         * NEWS: Mention the change.
116744         Reported by Alan Hourihane <alanh@fairlite.co.uk>
116745         via Sergey Poznyakoff <gray@gnu.org.ua>.
116747 2008-12-21  Bruno Haible  <bruno@clisp.org>
116749         * MODULES.html.sh (Extended multibyte and wide character utilities
116750         <wchar.h>): Add btowc, wctob, mbsinit, mbrlen, mbrtowc, mbsrtowcs,
116751         wcrtomb, wcsrtombs.
116752         (Support for systems lacking POSIX:2008): Add accept, bind, close,
116753         connect, fclose, getpeername, getsockname, getsockopt, hostent, listen,
116754         mbsnrtowcs, posix_spawn*, recv, recvfrom, sched, select, send, sendto,
116755         setsockopt, shutdown, socket, spawn, sys_wait, wcsnrtombs, write.
116757 2008-12-21  Bruno Haible  <bruno@clisp.org>
116759         * MODULES.html.sh: Change section titles to refer to POSIX:2008.
116761 2008-12-21  Bruno Haible  <bruno@clisp.org>
116763         * modules/wcsnrtombs-tests: New file.
116764         * tests/test-wcsnrtombs1.sh: New file.
116765         * tests/test-wcsnrtombs2.sh: New file.
116766         * tests/test-wcsnrtombs3.sh: New file.
116767         * tests/test-wcsnrtombs4.sh: New file.
116768         * tests/test-wcsnrtombs.c: New file.
116770         New module 'wcsnrtombs'.
116771         * lib/wchar.in.h (wcsnrtombs): New declaration.
116772         * lib/wcsnrtombs.c: New file.
116773         * lib/wcsrtombs-state.c: New file.
116774         * lib/wcsrtombs.c: Refer to _gl_wcsrtombs_state.
116775         (internal_state): Remove variable.
116776         * m4/wcsnrtombs.m4: New file.
116777         * m4/wcsrtombs.m4 (gl_FUNC_WCSRTOMBS): Add wcsrtombs-state.c to the
116778         compilation units.
116779         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSNRTOMBS,
116780         HAVE_WCSNRTOMBS.
116781         * modules/wchar (Makefile.am): Substitute GNULIB_WCSNRTOMBS,
116782         HAVE_WCSNRTOMBS.
116783         * modules/wcsnrtombs: New file.
116784         * modules/wcsrtombs (Files): Add lib/wcsrtombs-state.c.
116785         * doc/posix-functions/wcsnrtombs.texi: Mention the new module.
116787 2008-12-21  Bruno Haible  <bruno@clisp.org>
116789         * modules/wcsrtombs-tests: New file.
116790         * tests/test-wcsrtombs1.sh: New file.
116791         * tests/test-wcsrtombs2.sh: New file.
116792         * tests/test-wcsrtombs3.sh: New file.
116793         * tests/test-wcsrtombs4.sh: New file.
116794         * tests/test-wcsrtombs.c: New file.
116796         New module 'wcsrtombs'.
116797         * lib/wchar.in.h (wcsrtombs): New declaration.
116798         * lib/wcsrtombs.c: New file.
116799         * m4/wcsrtombs.m4: New file.
116800         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSRTOMBS,
116801         HAVE_WCSRTOMBS, REPLACE_WCSRTOMBS.
116802         * modules/wchar (Makefile.am): Substitute GNULIB_WCSRTOMBS,
116803         HAVE_WCSRTOMBS, REPLACE_WCSRTOMBS.
116804         * modules/wcsrtombs: New file.
116805         * doc/posix-functions/wcsrtombs.texi: Mention the new module and the
116806         bugs.
116808 2008-12-21  Bruno Haible  <bruno@clisp.org>
116810         Work around a wcrtomb() bug on Solaris 10 and OSF/1 5.1.
116811         * lib/wchar.in.h (wcrtomb): Override if REPLACE_WCRTOMB is set.
116812         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Test the return value of wcrtomb
116813         with NULL destination argument in various locales. Set REPLACE_WCRTOMB
116814         if not correct.
116815         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WCRTOMB.
116816         * modules/wchar (Makefile.am): Substitute REPLACE_WCRTOMB.
116817         * modules/wcrtomb (Files): Add m4/locale-fr.m4, m4/locale-ja.m4,
116818         m4/locale-zh.m4, m4/codeset.m4.
116819         * doc/posix-functions/wcrtomb.texi: Document the bug.
116821 2008-12-21  Bruno Haible  <bruno@clisp.org>
116823         Work around a btowc() bug on IRIX 6.5.
116824         * lib/wchar.in.h (btowc): Override if REPLACE_BTOWC is set.
116825         * m4/btowc.m4 (gl_FUNC_BTOWC): Test whether btowc(EOF) is correct. Set
116826         REPLACE_WTOBC if not.
116827         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_BTOWC.
116828         * modules/wchar (Makefile.am): Substitute REPLACE_BTOWC.
116829         * doc/posix-functions/btowc.texi: Mention the IRIX bug.
116831 2008-12-21  Bruno Haible  <bruno@clisp.org>
116833         * modules/wcrtomb-tests: New file.
116834         * tests/test-wcrtomb.sh: New file.
116835         * tests/test-wcrtomb.c: New file.
116837         New module 'wcrtomb'.
116838         * lib/wchar.in.h (wcrtomb): New declaration.
116839         * lib/wcrtomb.c: New file.
116840         * m4/wcrtomb.m4: New file.
116841         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCRTOMB,
116842         HAVE_WCRTOMB.
116843         * modules/wchar (Makefile.am): Substitute GNULIB_WCRTOMB,
116844         HAVE_WCRTOMB.
116845         * modules/wcrtomb: New file.
116846         * doc/posix-functions/wcrtomb.texi: Mention the new module.
116848 2008-12-21  Bruno Haible  <bruno@clisp.org>
116850         * modules/mbrtowc (Files): Add m4/codeset.m4, needed by m4/locale-fr.m4.
116851         * modules/mbsrtowcs (Files): Likewise.
116852         * modules/wctob (Files): Likewise.
116853         * modules/c-strcase-tests (Files): Likewise.
116854         * modules/unistdio/u8-vasnprintf-tests (Files): Likewise.
116855         * modules/unistdio/u16-vasnprintf-tests (Files): Likewise.
116856         * modules/unistdio/u32-vasnprintf-tests (Files): Likewise.
116857         * modules/unistdio/ulc-vasnprintf-tests (Files): Likewise.
116858         * modules/vasnprintf-posix-tests (Files): Likewise.
116860 2008-12-21  William Pursell  <bill.pursell@gmail.com>
116862         gitlog-to-changelog: pass all command-line arguments to git-log
116863         * build-aux/gitlog-to-changelog: When producing a ChangeLog,
116864         it is sometimes convenient to filter the commits in various ways.
116865         gitlog-to-changelog only allows --since to specify a start date,
116866         but git-log itself supports many other filtering mechanisms.
116867         At the moment, I want to filter by branch name.  Rather than
116868         adding a --branch option to gitlog-to-changelog, it seems more
116869         flexible to simply pass all options directly to git-log and let
116870         git do the work.  Notice that this effectively makes --since a
116871         redundant option for gitlog-to-changelog, but removing it would
116872         require current usage to change since calls would then require
116873         an additional '--'.
116875 2008-12-21  Bruno Haible  <bruno@clisp.org>
116877         * modules/mbsnrtowcs-tests: New file.
116878         * tests/test-mbsnrtowcs1.sh: New file.
116879         * tests/test-mbsnrtowcs2.sh: New file.
116880         * tests/test-mbsnrtowcs3.sh: New file.
116881         * tests/test-mbsnrtowcs4.sh: New file.
116882         * tests/test-mbsnrtowcs.c: New file.
116884         New module 'mbsnrtowcs'.
116885         * lib/wchar.in.h (mbsnrtowcs): New declaration.
116886         * lib/mbsnrtowcs.c: New file.
116887         * lib/mbsrtowcs-state.c: New file.
116888         * lib/mbsrtowcs.c: Refer to _gl_mbsrtowcs_state.
116889         (internal_state): Remove variable.
116890         * m4/mbsnrtowcs.m4: New file.
116891         * m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS): Add mbsrtowcs-state.c to the
116892         compilation units.
116893         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_MBSNRTOWCS,
116894         HAVE_MBSNRTOWCS, REPLACE_MBSNRTOWCS.
116895         * modules/wchar (Makefile.am): Substitute GNULIB_MBSNRTOWCS,
116896         HAVE_MBSNRTOWCS, REPLACE_MBSNRTOWCS.
116897         * modules/mbsnrtowcs: New file.
116898         * modules/mbsrtowcs (Files): Add lib/mbsrtowcs-state.c.
116899         * doc/posix-functions/mbsnrtowcs.texi: Mention the new module and a
116900         portability problem.
116902 2008-12-21  Bruno Haible  <bruno@clisp.org>
116904         Work around mbsrtowcs bug.
116905         * m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): New macro.
116906         (gl_FUNC_MBSRTOWCS): Invoke it.
116907         * modules/mbsrtowcs (Files): Add m4/locale-fr.m4, m4/locale-ja.m4,
116908         m4/locale-zh.m4.
116909         * doc/posix-functions/mbsrtowcs.texi: Document the bug.
116911 2008-12-21  Bruno Haible  <bruno@clisp.org>
116913         * tests/test-mbsrtowcs.c (main): Execute the loop also for unlimited=1.
116915 2008-12-21  Bruno Haible  <bruno@clisp.org>
116917         Update doc for AIX.
116918         * doc/pastposix-functions/wcswcs.texi: Mention that AIX has only a
116919         16-bit wchar_t type.
116920         * doc/posix-functions/btowc.texi: Likewise.
116921         * doc/posix-functions/fgetwc.texi: Likewise.
116922         * doc/posix-functions/fgetws.texi: Likewise.
116923         * doc/posix-functions/fputwc.texi: Likewise.
116924         * doc/posix-functions/fputws.texi: Likewise.
116925         * doc/posix-functions/fwide.texi: Likewise.
116926         * doc/posix-functions/fwprintf.texi: Likewise.
116927         * doc/posix-functions/fwscanf.texi: Likewise.
116928         * doc/posix-functions/getwchar.texi: Likewise.
116929         * doc/posix-functions/getwc.texi: Likewise.
116930         * doc/posix-functions/iswalnum.texi: Likewise.
116931         * doc/posix-functions/iswalpha.texi: Likewise.
116932         * doc/posix-functions/iswblank.texi: Likewise.
116933         * doc/posix-functions/iswcntrl.texi: Likewise.
116934         * doc/posix-functions/iswctype.texi: Likewise.
116935         * doc/posix-functions/iswdigit.texi: Likewise.
116936         * doc/posix-functions/iswgraph.texi: Likewise.
116937         * doc/posix-functions/iswlower.texi: Likewise.
116938         * doc/posix-functions/iswprint.texi: Likewise.
116939         * doc/posix-functions/iswpunct.texi: Likewise.
116940         * doc/posix-functions/iswspace.texi: Likewise.
116941         * doc/posix-functions/iswupper.texi: Likewise.
116942         * doc/posix-functions/iswxdigit.texi: Likewise.
116943         * doc/posix-functions/mbrtowc.texi: Likewise.
116944         * doc/posix-functions/mbsrtowcs.texi: Likewise.
116945         * doc/posix-functions/mbstowcs.texi: Likewise.
116946         * doc/posix-functions/mbtowc.texi: Likewise.
116947         * doc/posix-functions/putwchar.texi: Likewise.
116948         * doc/posix-functions/putwc.texi: Likewise.
116949         * doc/posix-functions/swprintf.texi: Likewise.
116950         * doc/posix-functions/tolower.texi: Likewise.
116951         * doc/posix-functions/toupper.texi: Likewise.
116952         * doc/posix-functions/towctrans.texi: Likewise.
116953         * doc/posix-functions/ungetwc.texi: Likewise.
116954         * doc/posix-functions/vswprintf.texi: Likewise.
116955         * doc/posix-functions/wcrtomb.texi: Likewise.
116956         * doc/posix-functions/wcscat.texi: Likewise.
116957         * doc/posix-functions/wcschr.texi: Likewise.
116958         * doc/posix-functions/wcscmp.texi: Likewise.
116959         * doc/posix-functions/wcscoll.texi: Likewise.
116960         * doc/posix-functions/wcscpy.texi: Likewise.
116961         * doc/posix-functions/wcscspn.texi: Likewise.
116962         * doc/posix-functions/wcsftime.texi: Likewise.
116963         * doc/posix-functions/wcslen.texi: Likewise.
116964         * doc/posix-functions/wcsncat.texi: Likewise.
116965         * doc/posix-functions/wcsncmp.texi: Likewise.
116966         * doc/posix-functions/wcsncpy.texi: Likewise.
116967         * doc/posix-functions/wcspbrk.texi: Likewise.
116968         * doc/posix-functions/wcsrchr.texi: Likewise.
116969         * doc/posix-functions/wcsrtombs.texi: Likewise.
116970         * doc/posix-functions/wcsspn.texi: Likewise.
116971         * doc/posix-functions/wcsstr.texi: Likewise.
116972         * doc/posix-functions/wcstod.texi: Likewise.
116973         * doc/posix-functions/wcstof.texi: Likewise.
116974         * doc/posix-functions/wcstoimax.texi: Likewise.
116975         * doc/posix-functions/wcstok.texi: Likewise.
116976         * doc/posix-functions/wcstold.texi: Likewise.
116977         * doc/posix-functions/wcstoll.texi: Likewise.
116978         * doc/posix-functions/wcstol.texi: Likewise.
116979         * doc/posix-functions/wcstombs.texi: Likewise.
116980         * doc/posix-functions/wcstoull.texi: Likewise.
116981         * doc/posix-functions/wcstoul.texi: Likewise.
116982         * doc/posix-functions/wcstoumax.texi: Likewise.
116983         * doc/posix-functions/wcswidth.texi: Likewise.
116984         * doc/posix-functions/wcsxfrm.texi: Likewise.
116985         * doc/posix-functions/wctob.texi: Likewise.
116986         * doc/posix-functions/wctomb.texi: Likewise.
116987         * doc/posix-functions/wctrans.texi: Likewise.
116988         * doc/posix-functions/wctype.texi: Likewise.
116989         * doc/posix-functions/wcwidth.texi: Likewise.
116990         * doc/posix-functions/wmemchr.texi: Likewise.
116991         * doc/posix-functions/wmemcmp.texi: Likewise.
116992         * doc/posix-functions/wmemcpy.texi: Likewise.
116993         * doc/posix-functions/wmemmove.texi: Likewise.
116994         * doc/posix-functions/wmemset.texi: Likewise.
116995         * doc/posix-functions/wprintf.texi: Likewise.
116996         * doc/posix-functions/wscanf.texi: Likewise.
116998 2008-12-21  Bruno Haible  <bruno@clisp.org>
117000         Update doc for HP-UX 11.11.
117001         * doc/posix-functions/btowc.texi: Clarify that the function is missing
117002         in HP-UX version 11.00, not in all versions of HP-UX 11.
117003         * doc/posix-functions/fwide.texi: Likewise.
117004         * doc/posix-functions/fwprintf.texi: Likewise.
117005         * doc/posix-functions/fwscanf.texi: Likewise.
117006         * doc/posix-functions/inet_ntop.texi: Likewise.
117007         * doc/posix-functions/inet_pton.texi: Likewise.
117008         * doc/posix-functions/mbrlen.texi: Likewise.
117009         * doc/posix-functions/mbrtowc.texi: Likewise.
117010         * doc/posix-functions/mbsinit.texi: Likewise.
117011         * doc/posix-functions/mbsrtowcs.texi: Likewise.
117012         * doc/posix-functions/swprintf.texi: Likewise.
117013         * doc/posix-functions/swscanf.texi: Likewise.
117014         * doc/posix-functions/towctrans.texi: Likewise.
117015         * doc/posix-functions/vfwprintf.texi: Likewise.
117016         * doc/posix-functions/vswprintf.texi: Likewise.
117017         * doc/posix-functions/vwprintf.texi: Likewise.
117018         * doc/posix-functions/wcrtomb.texi: Likewise.
117019         * doc/posix-functions/wcsrtombs.texi: Likewise.
117020         * doc/posix-functions/wcsstr.texi: Likewise.
117021         * doc/posix-functions/wctob.texi: Likewise.
117022         * doc/posix-functions/wctrans.texi: Likewise.
117023         * doc/posix-functions/wmemchr.texi: Likewise.
117024         * doc/posix-functions/wmemcmp.texi: Likewise.
117025         * doc/posix-functions/wmemcpy.texi: Likewise.
117026         * doc/posix-functions/wmemmove.texi: Likewise.
117027         * doc/posix-functions/wmemset.texi: Likewise.
117028         * doc/posix-functions/wprintf.texi: Likewise.
117029         * doc/posix-functions/wscanf.texi: Likewise.
117031 2008-12-21  Bruno Haible  <bruno@clisp.org>
117033         Work around a portability problem.
117034         * tests/test-mbsrtowcs.c (main): Use a temporary conversion state.
117035         * doc/posix-functions/mbsrtowcs.texi: Document the portability problem.
117037 2008-12-20  Bruno Haible  <bruno@clisp.org>
117039         * lib/wchar.in.h (mbsrtowcs): Redefine if REPLACE_MBSRTOWCS is set.
117040         * m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS): Invoke gl_MBSTATE_T_BROKEN. Set
117041         REPLACE_MBSRTOWCS if mbsrtowcs needs to be overridden.
117042         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_MBSRTOWCS.
117043         * modules/wchar (Makefile.am): Substitute REPLACE_MBSRTOWCS.
117045         Work around mbrtowc bugs on AIX, HP-UX, OSF/1, Solaris.
117046         * lib/wchar.in.h (mbstate_t): Redefine also if REPLACE_MBSTATE_T is
117047         set.
117048         (GNULIB_defined_mbstate_t): New macro.
117049         (mbsinit): Redefine if REPLACE_MBSINIT is set.
117050         (mbrtowc): Redefine if REPLACE_MBRTOWC is set.
117051         * lib/mbrtowc.c (rpl_mbrtowc): Add an alternative implementation that
117052         reuses the system's mbrtowc function but works around the bugs.
117053         * m4/mbrtowc.m4 (gl_MBSTATE_T_BROKEN, gl_MBRTOWC_INCOMPLETE_STATE,
117054         gl_MBRTOWC_NULL_ARG, gl_MBRTOWC_RETVAL, gl_MBRTOWC_NUL_RETVAL): New
117055         macros.
117056         (gl_FUNC_MBRTOWC): Invoke them. Set REPLACE_MBRTOWC if mbrtowc needs to
117057         be overridden. Optionally define MBRTOWC_NULL_ARG_BUG,
117058         MBRTOWC_RETVAL_BUG, MBRTOWC_NUL_RETVAL_BUG.
117059         * m4/mbsinit.m4 (gl_FUNC_MBSINIT): Invoke gl_MBSTATE_T_BROKEN. Set
117060         REPLACE_MBSINIT if mbsinit needs to be overridden.
117061         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_MBSTATE_T,
117062         REPLACE_MBSINIT, REPLACE_MBRTOWC.
117063         * modules/wchar (Makefile.am): Substitute REPLACE_MBSTATE_T,
117064         REPLACE_MBSINIT, REPLACE_MBRTOWC.
117065         * modules/mbrtowc (Files): Add m4/locale-fr.m4, m4/locale-ja.m4,
117066         m4/locale-zh.m4.
117067         (Depends): Add mbsinit.
117068         * modules/mbsinit (Depends): Add mbrtowc.
117069         * doc/posix-functions/mbrtowc.texi: Mention the various bugs.
117071 2008-12-20  Bruno Haible  <bruno@clisp.org>
117073         * tests/test-mbrtowc.c (main): Change sample string in EUC-JP encoding
117074         so that there are no conversion errors on AIX.
117075         * tests/test-mbsrtowcs.c (main): LIkewise.
117077 2008-12-20  Bruno Haible  <bruno@clisp.org>
117079         Work around wctob bug on Solaris <= 9.
117080         * lib/wchar.in.h (wctob): Redefine if REPLACE_WCTOB is set.
117081         * m4/wctob.m4 (gl_FUNC_WCTOB): Test whether wctob works.
117082         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WCTOB.
117083         * modules/wchar (Makefile.am): Substitute REPLACE_WCTOB.
117084         * modules/wctob (Files): Add m4/locale-fr.m4.
117085         * doc/posix-functions/wctob.texi: Mention the Solaris bug.
117087 2008-12-20  Bruno Haible  <bruno@clisp.org>
117089         * doc/posix-functions/select.texi: Mention Solaris 2.6 bug with
117090         /dev/null.
117091         * tests/test-select-in.sh: Likewise.
117092         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
117094 2008-12-20  Bruno Haible  <bruno@clisp.org>
117096         Don't pretend that Cygwin has a ja_JP.EUC-JP locale.
117097         * m4/locale-ja.m4 (gt_LOCALE_JA): Add test for MB_CUR_MAX. Needed on
117098         Cygwin 1.5.x.
117100 2008-12-20  Bruno Haible  <bruno@clisp.org>
117102         Ensure mbstate_t is defined on HP-UX 11.11.
117103         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Require
117104         AC_CANONICAL_HOST. On HP-UX, define _XOPEN_SOURCE to 500.
117105         * m4/mbstate_t.m4 (AC_TYPE_MBSTATE_T): Require
117106         AC_USE_SYSTEM_EXTENSIONS.
117107         * modules/fnmatch (Depends-on): Add extensions.
117108         * modules/mbrlen (Depends-on): Likewise.
117109         * modules/mbrtowc (Depends-on): Likewise.
117110         * modules/mbsinit (Depends-on): Likewise.
117111         * modules/mbsrtowcs (Depends-on): Likewise.
117112         * modules/mbswidth (Depends-on): Likewise.
117113         * modules/quotearg (Depends-on): Likewise.
117114         * modules/strftime (Depends-on): Likewise.
117116 2008-12-20  Bruno Haible  <bruno@clisp.org>
117118         Ensure wctob is declared on IRIX 6.5.
117119         * lib/wchar.in.h (wctob): Declare also when HAVE_DECL_WCTOB is 0.
117120         * m4/wctob.m4 (gl_FUNC_WCTOB): Set HAVE_DECL_WCTOB instead of
117121         HAVE_WCTOB. Also test whether <wchar.h> declares wctob.
117122         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize HAVE_DECL_WCTOB instead
117123         of HAVE_WCTOB.
117124         * modules/wchar (Makefile.am): Substitute HAVE_DECL_WCTOB instead of
117125         HAVE_WCTOB.
117126         * doc/posix-functions/wctob.texi: Mention missing declaration on IRIX.
117128 2008-12-19  Bruno Haible  <bruno@clisp.org>
117130         * modules/mbsrtowcs-tests: New file.
117131         * tests/test-mbsrtowcs1.sh: New file.
117132         * tests/test-mbsrtowcs2.sh: New file.
117133         * tests/test-mbsrtowcs3.sh: New file.
117134         * tests/test-mbsrtowcs4.sh: New file.
117135         * tests/test-mbsrtowcs.c: New file.
117137         New module 'mbsrtowcs'.
117138         * lib/wchar.in.h (mbsrtowcs): New declaration.
117139         * lib/mbsrtowcs.c: New file.
117140         * m4/mbsrtowcs.m4: New file.
117141         * modules/mbsrtowcs: New file.
117142         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_MBSRTOWCS and
117143         HAVE_MBSRTOWCS.
117144         * modules/wchar (Makefile.am): Substitute GNULIB_MBSRTOWCS and
117145         HAVE_MBSRTOWCS.
117146         * doc/posix-functions/mbsrtowcs.texi: Document the new module.
117148 2008-12-19  Bruno Haible  <bruno@clisp.org>
117150         New module 'mbrlen'.
117151         * lib/wchar.in.h (mbrlen): New declaration.
117152         * lib/mbrlen.c: New file.
117153         * m4/mbrlen.m4: New file.
117154         * modules/mbrlen: New file.
117155         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_MBRLEN and
117156         HAVE_MBRLEN.
117157         * modules/wchar (Makefile.am): Substitute GNULIB_MBRLEN and
117158         HAVE_MBRLEN.
117159         * doc/posix-functions/mbrlen.texi: Document the new module.
117161 2008-12-19  Bruno Haible  <bruno@clisp.org>
117163         * lib/mbrtowc.c: Include verify.h. Verify an assumption.
117164         * modules/mbrtowc (Depends-on): Add verify.
117165         Suggested by Paul Eggert.
117167 2008-12-18  Bruno Haible  <bruno@clisp.org>
117169         * modules/mbsinit-tests: New file.
117170         * tests/test-mbsinit.sh: New file.
117171         * tests/test-mbsinit.c: New file.
117173 2008-12-18  Bruno Haible  <bruno@clisp.org>
117175         * modules/mbrtowc-tests: New file.
117176         * tests/test-mbrtowc1.sh: New file.
117177         * tests/test-mbrtowc2.sh: New file.
117178         * tests/test-mbrtowc3.sh: New file.
117179         * tests/test-mbrtowc4.sh: New file.
117180         * tests/test-mbrtowc.c: New file.
117182         New module 'mbrtowc'.
117183         * lib/wchar.in.h (mbstate_t): Override when the system does not have
117184         mbsinit and mbrtowc.
117185         (mbrtowc): New declaration.
117186         * lib/mbrtowc.c: New file.
117187         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC, gl_PREREQ_MBRTOWC): New macros.
117188         * modules/mbrtowc: New file.
117189         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_MBRTOWC and
117190         HAVE_MBRTOWC.
117191         * modules/wchar (Makefile.am): Substitute GNULIB_MBRTOWC and
117192         HAVE_MBRTOWC.
117193         * doc/posix-functions/mbrtowc.texi: Document the new module.
117195 2008-12-18  Bruno Haible  <bruno@clisp.org>
117197         New module 'wctob'.
117198         * lib/wchar.in.h (wctob): New declaration.
117199         * lib/wctob.c: New file.
117200         * m4/wctob.m4: New file.
117201         * modules/wctob: New file.
117202         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCTOB and
117203         HAVE_WCTOB.
117204         * modules/wchar (Makefile.am): Substitute GNULIB_WCTOB and HAVE_WCTOB.
117205         * doc/posix-functions/wctob.texi: Document the new module.
117207 2008-12-18  Bruno Haible  <bruno@clisp.org>
117209         * m4/mbsinit.m4 (gl_FUNC_MBSINIT): Invoke gl_REPLACE_WCHAR_H.
117210         * m4/btowc.m4 (gl_FUNC_BTOWC): Likewise.
117212 2008-12-18  Simon Josefsson  <simon@josefsson.org>
117214         * lib/flock.c: Use proper #if symbol in check.  Reported by "Tom
117215         G. Christensen" <tgc@jupiterrise.com>.
117217         * lib/flock.c: Need to include errno.h.  Reported by "Tom
117218         G. Christensen" <tgc@jupiterrise.com>.
117220         * lib/flock.c: Need to include string.h.  Reported by "Tom
117221         G. Christensen" <tgc@jupiterrise.com> and Eric Blake
117222         <ebb9@byu.net>.
117224 2008-12-18  Bruno Haible  <bruno@clisp.org>
117226         * m4/locale-ja.m4: New file, from GNU gettext.
117228 2008-12-17  Bruno Haible  <bruno@clisp.org>
117230         * m4/mbrtowc.m4 (AC_FUNC_MBRTOWC): Don't override in autoconf >= 2.60.
117231         Suggested by Eric Blake.
117233 2008-12-17  Bruno Haible  <bruno@clisp.org>
117235         * m4/errno_h.m4 (AC_COMPUTE_INT): Provide fallback definition.
117237 2008-12-17  Bruno Haible  <bruno@clisp.org>
117239         * lib/mbsinit.c: Include verify.h. Verify an assumption.
117240         * modules/mbsinit (Depends-on): Add verify.
117241         Suggested by Paul Eggert.
117243 2008-12-17  Bruno Haible  <bruno@clisp.org>
117245         * m4/mbrtowc.m4 (AC_FUNC_MBRTOWC): Renamed from gl_FUNC_MBRTOWC.
117246         * m4/mbfile.m4 (gl_MBFILE): Use AC_FUNC_MBRTOWC instead of
117247         gl_FUNC_MBRTOWC.
117248         * m4/mbiter.m4 (gl_MBITER): LIkewise.
117249         * m4/mbscasecmp.m4 (gl_PREREQ_MBSCASECMP): Likewise.
117250         * m4/mbscasestr.m4 (gl_PREREQ_MBSCASESTR): Likewise.
117251         * m4/mbschr.m4 (gl_PREREQ_MBSCHR): Likewise.
117252         * m4/mbscspn.m4 (gl_PREREQ_MBSCSPN): Likewise.
117253         * m4/mbslen.m4 (gl_PREREQ_MBSLEN): Likewise.
117254         * m4/mbsncasecmp.m4 (gl_PREREQ_MBSNCASECMP): Likewise.
117255         * m4/mbsnlen.m4 (gl_PREREQ_MBSNLEN): Likewise.
117256         * m4/mbspbrk.m4 (gl_PREREQ_MBSPBRK): Likewise.
117257         * m4/mbspcasecmp.m4 (gl_PREREQ_MBSPCASECMP): Likewise.
117258         * m4/mbsrchr.m4 (gl_PREREQ_MBSRCHR): Likewise.
117259         * m4/mbssep.m4 (gl_PREREQ_MBSSEP): Likewise.
117260         * m4/mbsspn.m4 (gl_PREREQ_MBSSPN): Likewise.
117261         * m4/mbsstr.m4 (gl_PREREQ_MBSSTR): Likewise.
117262         * m4/mbstok_r.m4 (gl_PREREQ_MBSTOK_R): Likewise.
117263         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
117264         * m4/quotearg.m4 (gl_QUOTEARG): Likewise.
117265         * modules/trim (configure.ac): Likewise.
117267 2008-12-17  Bruno Haible  <bruno@clisp.org>
117269         * modules/btowc-tests: New file.
117270         * tests/test-btowc1.sh: New file.
117271         * tests/test-btowc2.sh: New file.
117272         * tests/test-btowc.c: New file.
117274         New module 'btowc'.
117275         * lib/wchar.in.h (btowc): New declaration.
117276         * lib/btowc.c: New file.
117277         * m4/btowc.m4: New file.
117278         * modules/btowc: New file.
117279         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_BTOWC and
117280         HAVE_BTOWC.
117281         * modules/wchar (Makefile.am): Substitute GNULIB_BTOWC and HAVE_BTOWC.
117282         * doc/posix-functions/btowc.texi: Document the new module.
117284 2008-12-17  Bruno Haible  <bruno@clisp.org>
117286         New module 'mbsinit'.
117287         * lib/wchar.in.h (mbsinit): New declaration.
117288         * lib/mbsinit.c: New file.
117289         * m4/mbsinit.m4: New file.
117290         * modules/mbsinit: New file.
117291         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_MBSINIT and
117292         HAVE_MBSINIT.
117293         * modules/wchar (Makefile.am): Substitute GNULIB_MBSINIT and
117294         HAVE_MBSINIT.
117295         * doc/posix-functions/mbsinit.texi: Document the new module.
117297 2008-12-16  Bruno Haible  <bruno@clisp.org>
117299         * lib/unistd.in.h: Add comment.
117300         * tests/test-environ.c: Don't include <stdlib.h>.
117302 2008-12-16  Bruno Haible  <bruno@clisp.org>
117304         * lib/parse-duration.h (parse_duration): Document return value
117305         convention.
117306         * lib/parse-duration.c: Include specification header first. Add
117307         comments.
117308         (_): Remove macro.
117309         (parse_year_month_day, parse_hour_minute_second): Move side effects
117310         outside of strchr call.
117311         (parse_non_iso8601): Move side effects outside of isspace call.
117312         (parse_duration): Don't test errno is res != BAD_TIME. Remove fprintf
117313         call.
117315 2008-12-16  Bruno Haible  <bruno@clisp.org>
117317         * tests/test-parse-duration.sh: Produce no output when the test
117318         succeeds.
117320 2008-12-16  Bruno Haible  <bruno@clisp.org>
117322         * tests/test-parse-duration.sh: Fix quoting of $tmp and $tmpf
117323         expressions.
117325 2008-12-15  Bruno Haible  <bruno@clisp.org>
117327         * doc/glibc-functions/fgetxattr.texi: Tweak wording.
117328         * doc/glibc-functions/flistxattr.texi: Likewise.
117329         * doc/glibc-functions/fopencookie.texi: Likewise.
117330         * doc/glibc-functions/fremovexattr.texi: Likewise.
117331         * doc/glibc-functions/fsetxattr.texi: Likewise.
117332         * doc/glibc-functions/getxattr.texi: Likewise.
117333         * doc/glibc-functions/lgetxattr.texi: Likewise.
117334         * doc/glibc-functions/listxattr.texi: Likewise.
117335         * doc/glibc-functions/llistxattr.texi: Likewise.
117336         * doc/glibc-functions/lremovexattr.texi: Likewise.
117337         * doc/glibc-functions/lsetxattr.texi: Likewise.
117338         * doc/glibc-functions/removexattr.texi: Likewise.
117339         * doc/glibc-functions/setxattr.texi: Likewise.
117340         * doc/posix-functions/open_memstream.texi: Likewise.
117342 2008-12-15  Eric Blake  <ebb9@byu.net>
117344         Update doc for cygwin 1.7.
117345         * doc/posix-functions/faccessat.texi: Cygwin 1.7 added several new
117346         functions.
117347         * doc/posix-functions/fchmodat.texi: Likewise.
117348         * doc/posix-functions/fchownat.texi: Likewise.
117349         * doc/posix-functions/fdopendir.texi: Likewise.
117350         * doc/posix-functions/fmemopen.texi: Likewise.
117351         * doc/posix-functions/freeaddrinfo.texi: Likewise.
117352         * doc/posix-functions/fstatat.texi: Likewise.
117353         * doc/posix-functions/futimens.texi: Likewise.
117354         * doc/posix-functions/gai_strerror.texi: Likewise.
117355         * doc/posix-functions/getaddrinfo.texi: Likewise.
117356         * doc/posix-functions/getnameinfo.texi: Likewise.
117357         * doc/posix-functions/if_freenameindex.texi: Likewise.
117358         * doc/posix-functions/if_indextoname.texi: Likewise.
117359         * doc/posix-functions/if_nameindex.texi: Likewise.
117360         * doc/posix-functions/if_nametoindex.texi: Likewise.
117361         * doc/posix-functions/insque.texi: Likewise.
117362         * doc/posix-functions/linkat.texi: Likewise.
117363         * doc/posix-functions/llrint.texi: Likewise.
117364         * doc/posix-functions/llrintf.texi: Likewise.
117365         * doc/posix-functions/llrintl.texi: Likewise.
117366         * doc/posix-functions/lockf.texi: Likewise.
117367         * doc/posix-functions/lrintl.texi: Likewise.
117368         * doc/posix-functions/mkdirat.texi: Likewise.
117369         * doc/posix-functions/mkfifoat.texi: Likewise.
117370         * doc/posix-functions/mknodat.texi: Likewise.
117371         * doc/posix-functions/mq_close.texi: Likewise.
117372         * doc/posix-functions/mq_getattr.texi: Likewise.
117373         * doc/posix-functions/mq_notify.texi: Likewise.
117374         * doc/posix-functions/mq_open.texi: Likewise.
117375         * doc/posix-functions/mq_receive.texi: Likewise.
117376         * doc/posix-functions/mq_send.texi: Likewise.
117377         * doc/posix-functions/mq_setattr.texi: Likewise.
117378         * doc/posix-functions/mq_timedreceive.texi: Likewise.
117379         * doc/posix-functions/mq_timedsend.texi: Likewise.
117380         * doc/posix-functions/mq_unlink.texi: Likewise.
117381         * doc/posix-functions/open_memstream.texi: Likewise.
117382         * doc/posix-functions/openat.texi: Likewise.
117383         * doc/posix-functions/posix_fadvise.texi: Likewise.
117384         * doc/posix-functions/posix_fallocate.texi: Likewise.
117385         * doc/posix-functions/posix_madvise.texi: Likewise.
117386         * doc/posix-functions/posix_memalign.texi: Likewise.
117387         * doc/posix-functions/posix_openpt.texi: Likewise.
117388         * doc/posix-functions/readlinkat.texi: Likewise.
117389         * doc/posix-functions/remque.texi: Likewise.
117390         * doc/posix-functions/renameat.texi: Likewise.
117391         * doc/posix-functions/rintl.texi: Likewise.
117392         * doc/posix-functions/sem_unlink.texi: Likewise.
117393         * doc/posix-functions/shm_open.texi: Likewise.
117394         * doc/posix-functions/shm_unlink.texi: Likewise.
117395         * doc/posix-functions/signgam.texi: Likewise.
117396         * doc/posix-functions/sigset.texi: Likewise.
117397         * doc/posix-functions/stpcpy.texi: Likewise.
117398         * doc/posix-functions/stpncpy.texi: Likewise.
117399         * doc/posix-functions/strerror.texi: Likewise.
117400         * doc/posix-functions/strtod.texi: Likewise.
117401         * doc/posix-functions/symlinkat.texi: Likewise.
117402         * doc/posix-functions/unlinkat.texi: Likewise.
117403         * doc/posix-functions/utimensat.texi: Likewise.
117404         * doc/glibc-functions/bindresvport.texi: Likewise.
117405         * doc/glibc-functions/dn_expand.texi: Likewise.
117406         * doc/glibc-functions/exp10.texi: Likewise.
117407         * doc/glibc-functions/exp10f.texi: Likewise.
117408         * doc/glibc-functions/fgetxattr.texi: Likewise.
117409         * doc/glibc-functions/flistxattr.texi: Likewise.
117410         * doc/glibc-functions/fopencookie.texi: Likewise.
117411         * doc/glibc-functions/freeifaddrs.texi: Likewise.
117412         * doc/glibc-functions/fremovexattr.texi: Likewise.
117413         * doc/glibc-functions/fsetxattr.texi: Likewise.
117414         * doc/glibc-functions/getifaddrs.texi: Likewise.
117415         * doc/glibc-functions/getxattr.texi: Likewise.
117416         * doc/glibc-functions/lgetxattr.texi: Likewise.
117417         * doc/glibc-functions/listxattr.texi: Likewise.
117418         * doc/glibc-functions/llistxattr.texi: Likewise.
117419         * doc/glibc-functions/lremovexattr.texi: Likewise.
117420         * doc/glibc-functions/lsetxattr.texi: Likewise.
117421         * doc/glibc-functions/pow10.texi: Likewise.
117422         * doc/glibc-functions/pow10f.texi: Likewise.
117423         * doc/glibc-functions/rcmd_af.texi: Likewise.
117424         * doc/glibc-functions/removexattr.texi: Likewise.
117425         * doc/glibc-functions/res_init.texi: Likewise.
117426         * doc/glibc-functions/res_mkquery.texi: Likewise.
117427         * doc/glibc-functions/res_query.texi: Likewise.
117428         * doc/glibc-functions/res_querydomain.texi: Likewise.
117429         * doc/glibc-functions/res_send.texi: Likewise.
117430         * doc/glibc-functions/rresvport_af.texi: Likewise.
117431         * doc/glibc-functions/setxattr.texi: Likewise.
117432         * doc/glibc-functions/strcasestr.texi: Likewise.
117434 2008-12-15  Bruno Haible  <bruno@clisp.org>
117436         Fix compilation error on OSF/1 4.0.
117437         * lib/sys_select.in.h: When invoked from OSF/1 <sys/types.h> or
117438         <sys/time.h>, simply delegate to the system header.
117439         Reported by Daniel Richard G. <oss@teragram.com>.
117441 2008-12-15  Bruno Haible  <bruno@clisp.org>
117443         * doc/posix-functions/openat.texi: Mention the 'openat' module.
117444         * doc/posix-functions/fchmodat.texi: Likewise.
117445         * doc/posix-functions/fchownat.texi: Likewise.
117446         * doc/posix-functions/fdopendir.texi: Likewise.
117447         * doc/posix-functions/fstatat.texi: Likewise.
117448         * doc/posix-functions/mkdirat.texi: Likewise.
117449         * doc/posix-functions/unlinkat.texi: Likewise.
117451 2008-12-14  Bruno Haible  <bruno@clisp.org>
117453         Update doc for POSIX:2008.
117454         * doc/posix-functions/faccessat.texi: New file.
117455         * doc/posix-functions/fchmodat.texi: New file.
117456         * doc/posix-functions/fchownat.texi: New file.
117457         * doc/posix-functions/fdopendir.texi: New file.
117458         * doc/posix-functions/fstatat.texi: New file.
117459         * doc/posix-functions/futimens.texi: New file.
117460         * doc/posix-functions/linkat.texi: New file.
117461         * doc/posix-functions/mkdirat.texi: New file.
117462         * doc/posix-functions/mkfifoat.texi: New file.
117463         * doc/posix-functions/mknodat.texi: New file.
117464         * doc/posix-functions/open_wmemstream.texi: New file.
117465         * doc/posix-functions/openat.texi: New file.
117466         * doc/posix-functions/psiginfo.texi: New file.
117467         * doc/posix-functions/pthread_mutex_consistent.texi: New file.
117468         * doc/posix-functions/pthread_mutexattr_getrobust.texi: New file.
117469         * doc/posix-functions/pthread_mutexattr_setrobust.texi: New file.
117470         * doc/posix-functions/readlinkat.texi: New file.
117471         * doc/posix-functions/renameat.texi: New file.
117472         * doc/posix-functions/strerror_l.texi: New file.
117473         * doc/posix-functions/symlinkat.texi: New file.
117474         * doc/posix-functions/unlinkat.texi: New file.
117475         * doc/posix-functions/utimensat.texi: New file.
117476         * doc/gnulib.texi (Function Substitutes): Add these subsections.
117478 2008-12-14  Bruno Haible  <bruno@clisp.org>
117480         Update doc for POSIX:2008.
117481         * doc/posix-functions/alphasort.texi: Renamed from
117482         doc/glibc-functions/alphasort.texi.
117483         * doc/posix-functions/dirfd.texi: Renamed from
117484         doc/glibc-functions/dirfd.texi.
117485         * doc/posix-functions/dprintf.texi: Renamed from
117486         doc/glibc-functions/dprintf.texi.
117487         * doc/posix-functions/duplocale.texi: Renamed from
117488         doc/glibc-functions/duplocale.texi.
117489         * doc/posix-functions/fexecve.texi: Renamed from
117490         doc/glibc-functions/fexecve.texi.
117491         * doc/posix-functions/fmemopen.texi: Renamed from
117492         doc/glibc-functions/fmemopen.texi.
117493         * doc/posix-functions/freelocale.texi: Renamed from
117494         doc/glibc-functions/freelocale.texi.
117495         * doc/posix-functions/getdate_err.texi: Renamed from
117496         doc/glibc-functions/getdate_err.texi.
117497         * doc/posix-functions/isalnum_l.texi: Renamed from
117498         doc/glibc-functions/isalnum_l.texi.
117499         * doc/posix-functions/isalpha_l.texi: Renamed from
117500         doc/glibc-functions/isalpha_l.texi.
117501         * doc/posix-functions/isblank_l.texi: Renamed from
117502         doc/glibc-functions/isblank_l.texi.
117503         * doc/posix-functions/iscntrl_l.texi: Renamed from
117504         doc/glibc-functions/iscntrl_l.texi.
117505         * doc/posix-functions/isdigit_l.texi: Renamed from
117506         doc/glibc-functions/isdigit_l.texi.
117507         * doc/posix-functions/isgraph_l.texi: Renamed from
117508         doc/glibc-functions/isgraph_l.texi.
117509         * doc/posix-functions/islower_l.texi: Renamed from
117510         doc/glibc-functions/islower_l.texi.
117511         * doc/posix-functions/isprint_l.texi: Renamed from
117512         doc/glibc-functions/isprint_l.texi.
117513         * doc/posix-functions/ispunct_l.texi: Renamed from
117514         doc/glibc-functions/ispunct_l.texi.
117515         * doc/posix-functions/isspace_l.texi: Renamed from
117516         doc/glibc-functions/isspace_l.texi.
117517         * doc/posix-functions/isupper_l.texi: Renamed from
117518         doc/glibc-functions/isupper_l.texi.
117519         * doc/posix-functions/iswalnum_l.texi: Renamed from
117520         doc/glibc-functions/iswalnum_l.texi.
117521         * doc/posix-functions/iswalpha_l.texi: Renamed from
117522         doc/glibc-functions/iswalpha_l.texi.
117523         * doc/posix-functions/iswblank_l.texi: Renamed from
117524         doc/glibc-functions/iswblank_l.texi.
117525         * doc/posix-functions/iswcntrl_l.texi: Renamed from
117526         doc/glibc-functions/iswcntrl_l.texi.
117527         * doc/posix-functions/iswctype_l.texi: Renamed from
117528         doc/glibc-functions/iswctype_l.texi.
117529         * doc/posix-functions/iswdigit_l.texi: Renamed from
117530         doc/glibc-functions/iswdigit_l.texi.
117531         * doc/posix-functions/iswgraph_l.texi: Renamed from
117532         doc/glibc-functions/iswgraph_l.texi.
117533         * doc/posix-functions/iswlower_l.texi: Renamed from
117534         doc/glibc-functions/iswlower_l.texi.
117535         * doc/posix-functions/iswprint_l.texi: Renamed from
117536         doc/glibc-functions/iswprint_l.texi.
117537         * doc/posix-functions/iswpunct_l.texi: Renamed from
117538         doc/glibc-functions/iswpunct_l.texi.
117539         * doc/posix-functions/iswspace_l.texi: Renamed from
117540         doc/glibc-functions/iswspace_l.texi.
117541         * doc/posix-functions/iswupper_l.texi: Renamed from
117542         doc/glibc-functions/iswupper_l.texi.
117543         * doc/posix-functions/iswxdigit_l.texi: Renamed from
117544         doc/glibc-functions/iswxdigit_l.texi.
117545         * doc/posix-functions/isxdigit_l.texi: Renamed from
117546         doc/glibc-functions/isxdigit_l.texi.
117547         * doc/posix-functions/mbsnrtowcs.texi: Renamed from
117548         doc/glibc-functions/mbsnrtowcs.texi.
117549         * doc/posix-functions/mkdtemp.texi: Renamed from
117550         doc/glibc-functions/mkdtemp.texi.
117551         * doc/posix-functions/newlocale.texi: Renamed from
117552         doc/glibc-functions/newlocale.texi.
117553         * doc/posix-functions/nl_langinfo_l.texi: Renamed from
117554         doc/glibc-functions/nl_langinfo_l.texi.
117555         * doc/posix-functions/open_memstream.texi: Renamed from
117556         doc/glibc-functions/open_memstream.texi.
117557         * doc/posix-functions/opterr.texi: Renamed from
117558         doc/glibc-functions/opterr.texi.
117559         * doc/posix-functions/optind.texi: Renamed from
117560         doc/glibc-functions/optind.texi.
117561         * doc/posix-functions/optopt.texi: Renamed from
117562         doc/glibc-functions/optopt.texi.
117563         * doc/posix-functions/psignal.texi: Renamed from
117564         doc/glibc-functions/psignal.texi.
117565         * doc/posix-functions/scandir.texi: Renamed from
117566         doc/glibc-functions/scandir.texi.
117567         * doc/posix-functions/sched_get_priority_min.texi: Renamed from
117568         doc/glibc-functions/sched_get_priority_min.texi.
117569         * doc/posix-functions/signgam.texi: Renamed from
117570         doc/glibc-functions/signgam.texi.
117571         * doc/posix-functions/stpcpy.texi: Renamed from
117572         doc/glibc-functions/stpcpy.texi.
117573         * doc/posix-functions/stpncpy.texi: Renamed from
117574         doc/glibc-functions/stpncpy.texi.
117575         * doc/posix-functions/strcasecmp_l.texi: Renamed from
117576         doc/glibc-functions/strcasecmp_l.texi.
117577         * doc/posix-functions/strcoll_l.texi: Renamed from
117578         doc/glibc-functions/strcoll_l.texi.
117579         * doc/posix-functions/strfmon_l.texi: Renamed from
117580         doc/glibc-functions/strfmon_l.texi.
117581         * doc/posix-functions/strftime_l.texi: Renamed from
117582         doc/glibc-functions/strftime_l.texi.
117583         * doc/posix-functions/strncasecmp_l.texi: Renamed from
117584         doc/glibc-functions/strncasecmp_l.texi.
117585         * doc/posix-functions/strndup.texi: Renamed from
117586         doc/glibc-functions/strndup.texi.
117587         * doc/posix-functions/strnlen.texi: Renamed from
117588         doc/glibc-functions/strnlen.texi.
117589         * doc/posix-functions/strsignal.texi: Renamed from
117590         doc/glibc-functions/strsignal.texi.
117591         * doc/posix-functions/strxfrm_l.texi: Renamed from
117592         doc/glibc-functions/strxfrm_l.texi.
117593         * doc/posix-functions/timer_gettime.texi: Renamed from
117594         doc/glibc-functions/timer_gettime.texi.
117595         * doc/posix-functions/tolower_l.texi: Renamed from
117596         doc/glibc-functions/tolower_l.texi.
117597         * doc/posix-functions/toupper_l.texi: Renamed from
117598         doc/glibc-functions/toupper_l.texi.
117599         * doc/posix-functions/towctrans_l.texi: Renamed from
117600         doc/glibc-functions/towctrans_l.texi.
117601         * doc/posix-functions/towlower_l.texi: Renamed from
117602         doc/glibc-functions/towlower_l.texi.
117603         * doc/posix-functions/towupper_l.texi: Renamed from
117604         doc/glibc-functions/towupper_l.texi.
117605         * doc/posix-functions/uselocale.texi: Renamed from
117606         doc/glibc-functions/uselocale.texi.
117607         * doc/posix-functions/vdprintf.texi: Renamed from
117608         doc/glibc-functions/vdprintf.texi.
117609         * doc/posix-functions/wcpcpy.texi:
117610         Renamed from doc/glibc-functions/wcpcpy.texi.
117611         * doc/posix-functions/wcpncpy.texi: Renamed from
117612         doc/glibc-functions/wcpncpy.texi.
117613         * doc/posix-functions/wcscasecmp.texi: Renamed from
117614         doc/glibc-functions/wcscasecmp.texi.
117615         * doc/posix-functions/wcscasecmp_l.texi: Renamed from
117616         doc/glibc-functions/wcscasecmp_l.texi.
117617         * doc/posix-functions/wcscoll_l.texi: Renamed from
117618         doc/glibc-functions/wcscoll_l.texi.
117619         * doc/posix-functions/wcsdup.texi: Renamed from
117620         doc/glibc-functions/wcsdup.texi.
117621         * doc/posix-functions/wcsncasecmp.texi: Renamed from
117622         doc/glibc-functions/wcsncasecmp.texi.
117623         * doc/posix-functions/wcsncasecmp_l.texi: Renamed from
117624         doc/glibc-functions/wcsncasecmp_l.texi.
117625         * doc/posix-functions/wcsnlen.texi: Renamed from
117626         doc/glibc-functions/wcsnlen.texi.
117627         * doc/posix-functions/wcsnrtombs.texi: Renamed from
117628         doc/glibc-functions/wcsnrtombs.texi.
117629         * doc/posix-functions/wcsxfrm_l.texi: Renamed from
117630         doc/glibc-functions/wcsxfrm_l.texi.
117631         * doc/posix-functions/wctrans_l.texi: Renamed from
117632         doc/glibc-functions/wctrans_l.texi.
117633         * doc/posix-functions/wctype_l.texi: Renamed from
117634         doc/glibc-functions/wctype_l.texi.
117635         * doc/gnulib.texi (Function Substitutes): Add these subsections.
117636         (Glibc ctype.h, Glibc dirent.h, Glibc getopt.h, Glibc math.h,
117637         Glibc sched.h, Glibc signal.h, Glibc stdio.h, Glibc stdlib.h,
117638         Glibc string.h, Glibc time.h, Glibc unistd.h, Glibc wchar.h): Remove
117639         these subsections.
117640         (Glibc langinfo.h, Glibc locale.h, Glibc monetary.h, Glibc wctype.h):
117641         Remove sections.
117643 2008-12-14  Bruno Haible  <bruno@clisp.org>
117645         Update doc for POSIX:2008.
117646         * doc/posix-functions/*.texi: Update URL of POSIX specification.
117648 2008-12-14  Bruno Haible  <bruno@clisp.org>
117650         Update doc for POSIX:2008.
117651         * doc/pastposix-functions/bcmp.texi: Renamed from
117652         doc/posix-functions/bcmp.texi.
117653         * doc/pastposix-functions/bcopy.texi: Renamed from
117654         doc/posix-functions/bcopy.texi.
117655         * doc/pastposix-functions/bsd_signal.texi: Renamed from
117656         doc/posix-functions/bsd_signal.texi.
117657         * doc/pastposix-functions/bzero.texi: Renamed from
117658         doc/posix-functions/bzero.texi.
117659         * doc/pastposix-functions/ecvt.texi: Renamed from
117660         doc/posix-functions/ecvt.texi.
117661         * doc/pastposix-functions/fcvt.texi: Renamed from
117662         doc/posix-functions/fcvt.texi.
117663         * doc/pastposix-functions/ftime.texi: Renamed from
117664         doc/posix-functions/ftime.texi.
117665         * doc/pastposix-functions/gcvt.texi: Renamed from
117666         doc/posix-functions/gcvt.texi.
117667         * doc/pastposix-functions/getcontext.texi: Renamed from
117668         doc/posix-functions/getcontext.texi.
117669         * doc/pastposix-functions/gethostbyaddr.texi: Renamed from
117670         doc/posix-functions/gethostbyaddr.texi.
117671         * doc/pastposix-functions/gethostbyname.texi: Renamed from
117672         doc/posix-functions/gethostbyname.texi.
117673         * doc/pastposix-functions/getwd.texi: Renamed from
117674         doc/posix-functions/getwd.texi.
117675         * doc/pastposix-functions/h_errno.texi: Renamed from
117676         doc/posix-functions/h_errno.texi.
117677         * doc/pastposix-functions/index.texi: Renamed from
117678         doc/posix-functions/index.texi.
117679         * doc/pastposix-functions/makecontext.texi: Renamed from
117680         doc/posix-functions/makecontext.texi.
117681         * doc/pastposix-functions/mktemp.texi: Renamed from
117682         doc/posix-functions/mktemp.texi.
117683         * doc/pastposix-functions/pthread_attr_getstackaddr.texi: Renamed from
117684         doc/posix-functions/pthread_attr_getstackaddr.texi.
117685         * doc/pastposix-functions/pthread_attr_setstackaddr.texi: Renamed from
117686         doc/posix-functions/pthread_attr_setstackaddr.texi.
117687         * doc/pastposix-functions/rindex.texi: Renamed from
117688         doc/posix-functions/rindex.texi.
117689         * doc/pastposix-functions/scalb.texi: Renamed from
117690         doc/posix-functions/scalb.texi.
117691         * doc/pastposix-functions/setcontext.texi: Renamed from
117692         doc/posix-functions/setcontext.texi.
117693         * doc/pastposix-functions/swapcontext.texi: Renamed from
117694         doc/posix-functions/swapcontext.texi.
117695         * doc/pastposix-functions/ualarm.texi: Renamed from
117696         doc/posix-functions/ualarm.texi.
117697         * doc/pastposix-functions/usleep.texi: Renamed from
117698         doc/posix-functions/usleep.texi.
117699         * doc/pastposix-functions/vfork.texi: Renamed from
117700         doc/posix-functions/vfork.texi.
117701         * doc/pastposix-functions/wcswcs.texi: Renamed from
117702         doc/posix-functions/wcswcs.texi.
117703         * doc/gnulib.texi (Legacy Function Substitutes): New chapter.
117704         (Function Substitutes): Update.
117706 2008-12-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
117708         * modules/relocatable-prog-wrapper (Depends-on): Add errno, needed by
117709         m4/strerror.m4.
117711 2008-12-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
117712             Bruno Haible  <bruno@clisp.org>
117714         * modules/unilbrk/tables (Depends-on): Add unilbrk/base.
117716 2008-12-13  Bruno Haible  <bruno@clisp.org>
117718         * modules/strtoull (Depends-on): Remove unistd.
117720 2008-12-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
117722         * modules/strtoull (Depends-on): Add stdlib.
117724 2008-12-11  Simon Josefsson  <simon@josefsson.org>
117726         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add more warnings.
117728 2008-12-10  Jim Meyering  <meyering@redhat.com>
117730         gl_ASSERT: don't say assertions are disabled when they're not
117731         * m4/assert.m4 (gl_ASSERT): Do not make configure report
117732         "checking whether to enable assertions... no", when they are in
117733         fact enabled.  This is solely a bug in the output of configure.
117734         In spite of saying "no", NDEBUG was not defined in that case.
117735         Also, as noted by Eric Blake, leave assertions enabled upon
117736         --enable-assert=INVALID.
117738 2008-12-10  Bruno Haible  <bruno@clisp.org>
117740         Change MODULES.html to refer to POSIX:2008 where possible.
117741         * MODULES.html.sh (POSIX2008_URL): New variable.
117742         (posix_headers): Remove sys/timeb, ucontext.
117743         (posix2001_headers): New variable.
117744         (posix_functions): Remove bcmp, bcopy, bsd_signal, bzero, ecvt, fcvt,
117745         ftime, gcvt, getcontext, gethostbyaddr, gethostbyname, getwd, h_errno,
117746         index, makecontext, mktemp, pthread_attr_getstackaddr,
117747         pthread_attr_setstackaddr, rindex, scalb, setcontext, swapcontext,
117748         ualarm, usleep, vfork, wcswcs. Add the new POSIX:2008 functions.
117749         (posix2001_functions): New variable.
117750         (func_module): Use URLs to POSIX:2008 where possible and to POSIX:2001
117751         otherwise.
117753 2008-12-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
117755         add missing include to parse-duration.c
117756         * lib/parse-duration.c: #include "xalloc.h", for xstrdup.
117757         * modules/parse-duration (Depends-on): Add xalloc.
117759         fix sed script reading maint.mk
117760         * top/maint.mk (MYSELF): New macro, define as $(srcdir)/$(ME).
117761         (syntax-check-rules): Use it.
117763 2008-12-09  Bruno Haible  <bruno@clisp.org>
117765         * m4/ldexpl.m4 (gl_FUNC_LDEXPL_WORKS): Add another check, that fails on
117766         MacOS X 10.4/PowerPC.
117767         Reported by Simon Josefsson.
117769 2008-12-08  Jim Meyering  <meyering@redhat.com>
117771         work around mingw's lack of some S_IF definitions
117772         * lib/fts.c (S_IFLNK, S_IFSOCK): Define if not already defined.
117773         Reported by Simon Josefsson.
117775 2008-12-08  Bruno Haible  <bruno@clisp.org>
117777         * m4/signbitl.m4 (gl_SIGNBIT_TEST_PROGRAM): Add a link check of signbit
117778         applied to variables. Needed on MacOS X 10.4/PowerPC.
117779         Reported by Simon Josefsson.
117781 2008-12-08  William Pursell  <bill.pursell@gmail.com>  (tiny change)
117782         and Eric Blake  <ebb9@byu.net>
117784         assert: honor --enable-assert
117785         * m4/assert.m4 (gl_ASSERT): Synchronize with autoconf 2.64, in
117786         order to honor --enable-assert, rather than treating it as a
117787         synonym for --disable-assert.
117789 2008-12-08  Jim Meyering  <meyering@redhat.com>
117791         * lib/posixtm.c: Remove now-useless declaration of mktime.
117793         * build-aux/announce-gen (get_tool_versions): Accept .xz tarballs.
117795 2008-12-07  Bruno Haible  <bruno@clisp.org>
117797         * tests/test-lock.c (test_lock, test_rwlock, test_recursive_lock,
117798         test_once): Mark functions as static.
117799         * tests/test-tls.c (test_tls): Likewise.
117801 2008-12-07  Bruno Haible  <bruno@clisp.org>
117803         * lib/striconveha.h (uniconv_register_autodetect): Renamed from
117804         iconv_register_autodetect.
117806 2008-12-07  Jim Meyering  <meyering@redhat.com>
117808         posixtm.c: avoid a warning
117809         * lib/posixtm.c (posixtime): Don't initialize tm0.
117810         It's no longer needed to placate gcc4's -Wuninitialized,
117811         and the attempt to placate would elicit a new warning.
117813         unicodeio.c: mark unused parameters
117814         * lib/unicodeio.c (exit_failure_callback): Mark unused parameter.
117815         (fallback_failure_callback): Likewise.
117817 2008-12-07  Bruno Haible  <bruno@clisp.org>
117819         * gnulib-tool (func_create_testdir): When building the tests
117820         subdirectory, ignore the modules gnumakefile and maintainer-makefile.
117821         Reported by Simon Josefsson.
117823 2008-12-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
117825         * doc/manywarnings.texi, doc/gnulib-intro.texi: Fix typos.
117827 2008-12-06  Bruno Haible  <bruno@clisp.org>
117829         * lib/c-stack.h (c_stack_action): Clarify possible side effects.
117830         Suggested by Eric Blake.
117832 2008-12-06  Bruno Haible  <bruno@clisp.org>
117834         Fix a c-stack test failure on MacOS X.
117835         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Require
117836         AC_CANONICAL_HOST. Define FAULT_YIELDS_SIGBUS. If set, install a signal
117837         handler for SIGBUS as well.
117838         * lib/c-stack.c (c_stack_action): If FAULT_YIELDS_SIGBUS is set,
117839         install a signal handler for SIGBUS as well.
117840         Reported by Bruce Dugan <bld0401@gmail.com> via Eric Blake.
117842 2008-12-06  Bruno Haible  <bruno@clisp.org>
117844         Advocacy documentation.
117845         * doc/gnulib-intro.texi (Benefits): New section.
117846         * doc/gnulib.texi: Update.
117848 2008-12-06  Bruno Haible  <bruno@clisp.org>
117850         Document the 'manywarnings' module.
117851         * doc/manywarnings.texi: New file.
117852         * doc/gnulib.texi: Include it.
117854 2008-12-05  Eric Blake  <ebb9@byu.net>
117856         tests: silence some gcc warnings
117857         * tests/test-getdate.c (LOG) [!DEBUG]: Mark no-op void.
117858         * tests/uniwidth/test-uc_width2.c (finish_interval): Avoid printf
117859         type mismatches.
117861 2008-12-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
117862             Bruno Haible  <bruno@clisp.org>
117864         * m4/openmp.m4 (AC_OPENMP): Do not define with Autoconf 2.62 or newer.
117866 2008-11-29  Jim Meyering  <meyering@redhat.com>
117868         unicodeio.c: mark unused parameters
117869         * lib/unicodeio.c (exit_failure_callback): Mark unused parameter.
117870         (fallback_failure_callback): Likewise.
117872         fts: fix a thinko
117873         * lib/fts.c (s_ifmt_shift_bits): Remove function.  Not needed after all.
117874         (set_stat_type): Return S_IF*-valued "type" directly.
117875         Prompted by James Youngman's spotting a related bug.
117876         Confirmed by further testing through find.
117878         fts: provide dirent.d_type via FTSENT.fts_statp, when possible
117879         * lib/fts.c (D_TYPE): Define.
117880         (DT_UNKNOWN, DT_BLK, DT_CHR) [HAVE_STRUCT_DIRENT_D_TYPE]: Define.
117881         (DT_DIR, DT_FIFO, DT_LNK, DT_REG, DT_SOCK): Likewise.
117882         (s_ifmt_shift_bits): New function.
117883         (set_stat_type): New function.
117884         (fts_build): When not calling fts_stat, call set_stat_type
117885         to propagate dirent.d_type info to fts_read caller.
117886         * lib/fts_.h (FTSENT) [FTS_DEFER_STAT]: Mention that
117887         fts_statp->st_mode type information may be valid.
117889 2008-11-28  Simon Josefsson  <simon@josefsson.org>
117891         * lib/sys_time.in.h: Add extern "C" block for C++.  Suggested by
117892         Brian Dessent <brian@dessent.net>.  Reported by Sam Steingold
117893         <sds@gnu.org>.
117895 2008-11-20  Bruno Haible  <bruno@clisp.org>
117897         Attempt to work around an AIX 5.3, 6.1 compiler bug with include_next.
117898         * lib/math.in.h: Use INCLUDE_NEXT_AS_FIRST_DIRECTIVE instead of
117899         INCLUDE_NEXT.
117900         * m4/include_next.m4 (gl_INCLUDE_NEXT): Set also
117901         INCLUDE_NEXT_AS_FIRST_DIRECTIVE.
117902         * modules/math (Makefile.am): Substitute
117903         INCLUDE_NEXT_AS_FIRST_DIRECTIVE instead of INCLUDE_NEXT.
117904         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
117906 2008-11-18  Alexandre Duret-Lutz  <adl@lrde.epita.fr>
117907             Bruno Haible  <bruno@clisp.org>
117909         * lib/stdint.in.h: Define all type macros so that their expansion is
117910         a single typedef'ed token. Fixes a compilation failure in Boost which
117911         does "using ::int8_t;".
117913 2008-11-18  Simon Josefsson  <simon@josefsson.org>
117915         * m4/manywarnings.m4: New file with gl_MANYWARN_COMPLEMENT and
117916         gl_MANYWARN_ALL_GCC.
117917         * m4/warnings.m4: Removed gl_WARN_SUPPORTED and
117918         gl_WARN_COMPLEMENT.  Suggested by Bruno Haible <bruno@clisp.org>.
117919         * modules/manywarnings: New file.
117920         * MODULES.html.sh: Mention manywarnings module.
117922 2008-11-18  Bruno Haible  <bruno@clisp.org>
117924         * doc/gnulib-tool.texi (Unit tests): New section.
117926 2008-11-18  Simon Josefsson  <simon@josefsson.org>
117928         * top/maint.mk (refresh-po): Fix sed regexp to avoid problems with
117929         paths like 'lib/po/foo.po'.
117931 2008-11-17  Simon Josefsson  <simon@josefsson.org>
117933         * m4/warnings.m4: Improve code.  Reported by Ralf Wildenhues
117934         <Ralf.Wildenhues@gmx.de> and Paolo Bonzini <bonzini@gnu.org>.
117936 2008-11-17  Simon Josefsson  <simon@josefsson.org>
117938         * m4/warnings.m4: Use CPPFLAGS to really check whether the
117939         parameter works.
117941 2008-11-17  Simon Josefsson  <simon@josefsson.org>
117943         * m4/warnings.m4: Add gl_WARN_COMPLEMENT and gl_WARN_SUPPORTED.
117945 2008-11-17  Bruce Korb  <bkorb@gnu.org>
117947         * modules/parse-duration-tests: New file.
117948         * tests/test-parse-duration.sh: New file.
117949         * tests/test-parse-duration.c: New file.
117951         New module 'parse-duration'.
117952         * lib/parse-duration.h: New file.
117953         * lib/parse-duration.c: New file.
117954         * modules/parse-duration: New file.
117956 2008-11-17  Bruno Haible  <bruno@clisp.org>
117958         * tests/test-select-out.sh: Comment out the first pipe test.
117959         Reported by Simon Josefsson.
117961 2008-11-17  Bruno Haible  <bruno@clisp.org>
117963         * modules/getaddrinfo (Depends-on): Add servent, hostent.
117964         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_SERVENT and
117965         gl_HOSTENT.
117967 2008-11-17  Bruno Haible  <bruno@clisp.org>
117969         * m4/sockets.m4 (gl_SOCKETS): After trying -lsocket, try also
117970         -lnetwork and -lnet. Needed for Haiku and BeOS.
117972 2008-11-16  Bruno Haible  <bruno@clisp.org>
117974         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix indentation.
117976 2008-11-16  Bruno Haible  <bruno@clisp.org>
117978         Avoid test failure on Haiku.
117979         * tests/test-fsync.c: Include <errno.h>.
117980         (main): Don't require that fsync (0) fails.
117982 2008-11-15  Bruno Haible  <bruno@clisp.org>
117984         New module 'hostent'.
117985         * modules/hostent: New file.
117986         * m4/hostent.m4: New file, based on code in m4/getaddrinfo.m4.
117988 2008-11-15  Bruno Haible  <bruno@clisp.org>
117990         New module 'servent'.
117991         * modules/servent: New file.
117992         * m4/servent.m4: New file, based on code in m4/getaddrinfo.m4.
117994 2008-11-15  Bruno Haible  <bruno@clisp.org>
117996         Avoid generating same test program with two different rules.
117997         * modules/frexp-nolibm-tests (Makefile.am): Rename test program from
117998         test-frexp to test-frexp-nolibm.
117999         * modules/frexpl-nolibm-tests (Makefile.am): Rename test program from
118000         test-frexpl to test-frexpl-nolibm.
118002 2008-11-15  Bruno Haible  <bruno@clisp.org>
118004         * modules/frexpl-tests (Makefile.am): Link test-frexpl with
118005         $(FREXPL_LIBM).
118007 2008-11-15  Bruno Haible  <bruno@clisp.org>
118009         * lib/netdb.in.h: Activate the definitions also when the system's
118010         <netdb.h> has 'struct addrinfo'.
118011         * m4/netdb_h.m4 (gl_HEADER_NETDB): Replace netdb.h also when it lacks
118012         EAI_OVERFLOW or AI_NUMERICSERV.
118013         * doc/posix-headers/netdb.texi: Document the problem.
118015 2008-11-15  Bruno Haible  <bruno@clisp.org>
118017         * tests/test-sched.c: Test also the existence of the SCHED_* macros.
118019         Make the 'sched' module work on platforms where <sched.h> exists but
118020         is incomplete (such as Haiku).
118021         * lib/sched.in.h; Include the system's <sched.h> if it exists.
118022         (SCHED_FIFO, SCHED_RR, SCHED_OTHER): New macros.
118023         * m4/sched_h.m4 (gl_SCHED_H): Test whether <sched.h> exists and also
118024         defines SCHED_FIFO, SCHED_RR, SCHED_OTHER. Set HAVE_SCHED_H,
118025         HAVE_STRUCT_SCHED_PARAM.
118026         * modules/sched (Depends-on): Add include_next.
118027         (Makefile.am): Substitute HAVE_SCHED_H, INCLUDE_NEXT,
118028         PRAGMA_SYSTEM_HEADER, NEXT_SCHED_H, HAVE_STRUCT_SCHED_PARAM.
118029         * doc/posix-headers/sched.texi: Document the issue.
118031 2008-11-13  Jim Meyering  <meyering@redhat.com>
118033         test-argp-2: avoid test failure when PACKAGE_BUGREPORT is defined
118034         * tests/test-argp-2.sh: When PACKAGE_BUGREPORT was defined, this
118035         test would fail due to the difference in the Report bugs to ...
118036         line.  The expected address is empty, "<>", while the actual
118037         would contain e.g., "<bug-tar@gnu.org>".  Filter out any address.
118039 2008-11-12  Bruno Haible  <bruno@clisp.org>
118041         lstat: don't compile lstat.c on systems lacking lstat
118042         * m4/lstat.m4 (gl_FUNC_LSTAT): Don't compile lstat.c on systems
118043         which don't have lstat; this is handled by lib/sys_stat.in.h already.
118044         Reported by Daniel P. Berrange via Jim Meyering.
118046 2008-11-12  Jim Meyering  <meyering@redhat.com>
118048         * lib/unicodeio.c (unicode_to_mb): Correct spelling of u8_uctomb.
118050 2008-11-12  Simon Josefsson  <simon@josefsson.org>
118052         * modules/warnings (configure.ac): Do AC_SUBST([WARN_CFLAGS]) here
118053         instead.
118055 2008-11-12  Bruno Haible  <bruno@clisp.org>
118057         * lib/unicodeio.c: Include unistr.h.
118058         (utf8_wctomb): Remove function.
118059         (unicode_to_mb): Use utf8_uctomb instead of utf8_wctomb.
118061 2008-11-12  Simon Josefsson  <simon@josefsson.org>
118063         * m4/warnings.m4 (gl_WARN_INIT): Remove, suggested by Ralf
118064         Wildenhues <Ralf.Wildenhues@gmx.de> and Bruno Haible
118065         <bruno@clisp.org>.
118066         * modules/warnings (configure.ac): Don't call gl_WARN_INIT.
118068 2008-11-12  Simon Josefsson  <simon@josefsson.org>
118070         * doc/warnings.texi: New file, from Bruno Haible <bruno@clisp.org>.
118071         * doc/gnulib.texi: Add section for warnings.
118073 2008-11-11  Bruno Haible  <bruno@clisp.org>
118075         * lib/sockets.h: Add a comment.
118077 2008-11-11  Karl Berry  <karl@gnu.org>
118079         * config/srclist.txt (fdl.texi): add, syncing from gnustandards.
118081 2008-11-11  Eric Blake  <ebb9@byu.net>
118083         fdl.texi: avoid git symlinks
118084         * doc/fdl.texi: Copy, rather than link, fdl-1.3.texi.
118086 2008-11-11  Paolo Bonzini  <bonzini@gnu.org>
118088         * m4/warnings.m4 (gl_WARN_ADD): Don't AC_SUBST the empty string.
118090 2008-11-11  Paolo Bonzini  <bonzini@gnu.org>
118092         * m4/warnings.m4 (gl_WARN_INIT): Substitute WARN_CFLAGS.
118093         (gl_WARN_ADD): Substitute $2 if literal.
118095 2008-11-11  Paolo Bonzini  <bonzini@gnu.org>
118097         * m4/warning.m4: Remove.
118099 2008-11-11  Paolo Bonzini  <bonzini@gnu.org>
118101         * m4/warnings.m4: Almost complete rewrite. :-)
118103 2008-11-10  Simon Josefsson  <simon@josefsson.org>
118105         * modules/warnings: New module.
118106         * m4/warnings.m4: New file.
118107         * MODULES.html.sh: Mention warnings module.
118108         With review improvements from Paolo Bonzini <bonzini@gnu.org> and
118109         Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
118111 2008-11-10  Eric Blake  <ebb9@byu.net>
118113         fdl.texi: make a symlink to the latest version
118114         * doc/standards.texi: Revert today's earlier change.
118115         * doc/fdl-1.2.texi: Rename from old fdl.texi...
118116         * doc/fdl.texi: ...and replace this with a symlink to the newer
118117         fdl-1.3.texi.
118119 2008-11-10  Bruno Haible  <bruno@clisp.org>
118121         * tests/test-select-fd.c (main): Accept the result file name as fourth
118122         argument.
118123         * tests/test-select-in.sh: Pass t-select-in.tmp as fourth argument.
118124         * tests/test-select-out.sh: Pass t-select-out.tmp as fourth argument.
118126 2008-11-10  Bruno Haible  <bruno@clisp.org>
118128         * lib/netdb.in.h: Use HAVE_STRUCT_ADDRINFO, HAVE_DECL_GETADDRINFO,
118129         HAVE_DECL_FREEADDRINFO, HAVE_DECL_GAI_STRERROR, HAVE_DECL_GETNAMEINFO
118130         as autoconf-substituted macros.
118131         * m4/netdb_h.m4 (gl_NETDB_H_DEFAULTS): Initialize these variables to 1.
118132         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require
118133         gl_NETDB_H_DEFAULTS. Set these variables.
118134         * modules/netdb (Makefile.am): Substitute these variables.
118136 2008-11-10  Eric Blake  <ebb9@byu.net>
118138         standards.texi: include correct file for FDL 1.3
118139         * doc/standards.texi (GNU Free Documentation License): Change
118140         include file to pull in FDL 1.3, not 1.2.
118142         fdl.texi: revert accidental change to license
118143         * doc/fdl.texi: This is FDL 1.2, not 1.3.
118145 2008-11-10  Bruno Haible  <bruno@clisp.org>
118147         * m4/printf.m4 (gl_PRINTF_ENOMEM): Guess yes on Haiku. Use the
118148         cross-compiling guesses also when the native compile gives no result.
118150 2008-11-10  Bruno Haible  <bruno@clisp.org>
118152         * lib/spawni.c (__spawni): Force variable into the stack.
118154 2008-11-10  Bruno Haible  <bruno@clisp.org>
118156         Add support for Haiku.
118157         * lib/fbufmode.c (fbufmode): Test a symbol that is not only defined on
118158         glibc and BeOS, but also on Haiku.
118159         * lib/fpurge.c (fpurge): Likewise.
118160         * lib/freadable.c (freadable): Likewise.
118161         * lib/freadahead.c (freadahead): Likewise.
118162         * lib/freading.c (freading): Likewise.
118163         * lib/freadptr.c (freadptr): Likewise.
118164         * lib/freadseek.c (freadptrinc): Likewise.
118165         * lib/fseeko.c (rpl_fseeko): Likewise.
118166         * lib/fseterr.c (fseterr): Likewise.
118167         * lib/fwritable.c (fwritable): Likewise.
118168         * lib/fwriting.c (fwriting): Likewise.
118169         Reported by Ingo Weinhold <ingo_weinhold@gmx.de>.
118171 2008-11-10  Ingo Weinhold  <ingo_weinhold@gmx.de>
118173         * lib/config.charset: Treat Haiku like BeOS.
118175 2008-11-10  Ingo Weinhold  <ingo_weinhold@gmx.de>
118177         * lib/binary-io.h (O_BINARY, O_TEXT): Treat Haiku like BeOS.
118178         * lib/fcntl.in.h (O_BINARY, O_TEXT): Likewise.
118180 2008-11-08  Bruno Haible  <bruno@clisp.org>
118182         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H): Avoid using AC_CHECK_DECL inside
118183         AC_CACHE_CHECK.
118185 2008-11-08  Bruno Haible  <bruno@clisp.org>
118187         * modules/select-tests (configure.ac): Check for unistd.h, sys/wait.h.
118189 2008-11-08  Bruno Haible  <bruno@clisp.org>
118191         * tests/test-select-fd.c: New file.
118192         * tests/test-select-in.sh: New file.
118193         * tests/test-select-out.sh: New file.
118194         * tests/test-select-stdin.c: New file.
118195         * modules/select-tests (Files): Add the new files.
118196         (Depends-on): Add gettimeofday.
118197         (Makefile.am): Add test-select-in.sh, test-select-out.sh to TESTS.
118198         Set TESTS_ENVIRONMENT. Add test-select-fd, test-select-stdin to
118199         check_PROGRAMS. Define test_select_fd_LDADD, test_select_stdin_LDADD.
118201 2008-11-06  Alexander V. Lukyanov  <lav@netis.ru>
118202             Bruno Haible  <bruno@clisp.org>
118204         * lib/sys_stat.in.h: Enclose function definitions in extern "C".
118206 2008-10-12  Giuseppe Scrivano  <gscrivano@gnu.org>
118208         * build-aux/pmccabe2html: Added support for C++ source files.
118210 2008-11-05  Ben Pfaff  <blp@gnu.org>
118212         Fix lib/close.c build on Windows.
118213         * modules/close (Files): Add lib/w32sock.h.
118215 2008-11-05  Joel E. Denny  <jdenny@ces.clemson.edu>
118217         Accept Bison's NEWS format.
118218         * build-aux/announce-gen (print_news_deltas): Tweak
118219         $re_prefix.
118221 2008-11-04  Bruno Haible  <bruno@clisp.org>
118223         * modules/random_r (Maintainer): Add glibc.
118225 2008-11-04  Simon Josefsson  <simon@josefsson.org>
118227         * doc/alloca-opt.texi: Change license to GFDLv1.3+, as suggested
118228         by karl@freefriends.org (Karl Berry).
118229         * doc/alloca.texi: Likewise.
118230         * doc/c-ctype.texi: Likewise.
118231         * doc/c-strcase.texi: Likewise.
118232         * doc/c-strcaseeq.texi: Likewise.
118233         * doc/c-strcasestr.texi: Likewise.
118234         * doc/c-strstr.texi: Likewise.
118235         * doc/c-strtod.texi: Likewise.
118236         * doc/c-strtold.texi: Likewise.
118237         * doc/ctime.texi: Likewise.
118238         * doc/error.texi: Likewise.
118239         * doc/fdl.texi: Likewise.
118240         * doc/gcd.texi: Likewise.
118241         * doc/getdate.texi: Likewise.
118242         * doc/gnulib-intro.texi: Likewise.
118243         * doc/gnulib-tool.texi: Likewise.
118244         * doc/gnulib.texi: Likewise.
118245         * doc/inet_ntoa.texi: Likewise.
118246         * doc/maintain.texi: Likewise.
118247         * doc/make-stds.texi: Likewise.
118248         * doc/quote.texi: Likewise.
118249         * doc/regexprops-generic.texi: Likewise.
118250         * doc/standards.texi: Likewise.
118251         * doc/verify.texi: Likewise.
118252         * doc/visibility.texi: Likewise.
118253         * doc/gnulib.texi (GNU Free Documentation License): Include
118254         fdl-1.3.texi instead of fdl.texi.
118256 2008-11-04  Simon Josefsson  <simon@josefsson.org>
118258         * doc/fdl-1.3.texi: New file, from
118259         <http://www.gnu.org/licenses/fdl-1.3.texi>.
118260         * modules/fdl-1.3: Add.
118261         * MODULES.html.sh: Add fdl-1.3.
118263 2008-11-03  Bruno Haible  <bruno@clisp.org>
118265         Make determination of absolute name of header file work with AIX xlc.
118266         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Require
118267         AC_CANONICAL_HOST. On AIX, use "$CPP -C" rather than "$CPP" for
118268         preprocessing.
118269         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Likewise.
118270         Reported by Gary V. Vaughan <gary@thewrittenword.com>.
118272 2008-11-03  Simon Josefsson  <simon@josefsson.org>
118274         * top/maint.mk (COVERAGE_CCOPTS): Use --coverage instead of
118275         -fprofile-arcs -ftest-coverage.  Suggested by Ludovic Courtès
118276         <ludo@gnu.org>.
118278 2008-11-02  Bruno Haible  <bruno@clisp.org>
118280         Mark 'strpbrk' obsolete.
118281         * modules/strpbrk (Status, Notice): New sections.
118282         * modules/strtok_r (Depends-on): Add strpbrk.
118284 2008-11-02  Bruno Haible  <bruno@clisp.org>
118286         Mark 'strdup' obsolete.
118287         * modules/strdup (Status, Notice): New sections.
118288         * modules/findprog (Depends-on): Add strdup.
118289         * modules/getaddrinfo (Depends-on): Likewise.
118290         * modules/localename (Depends-on): Likewise.
118291         * modules/relocatable-lib (Depends-on): Likewise.
118292         * modules/relocatable-lib-lgpl (Depends-on): Likewise.
118293         * modules/relocatable-prog (Depends-on): Likewise.
118294         * modules/trim (Depends-on): Likewise.
118295         * modules/unictype/gen-ctype (Depends-on): Likewise.
118296         * modules/unilbrk/gen-lbrk (Depends-on): Likewise.
118298 2008-11-02  Bruno Haible  <bruno@clisp.org>
118300         Mark 'strcspn' obsolete.
118301         * modules/strcspn (Status, Notice): New sections.
118303 2008-11-02  Bruno Haible  <bruno@clisp.org>
118305         Mark 'rmdir' obsolete.
118306         * modules/rmdir (Status, Notice): New sections.
118307         * modules/clean-temp (Depends-on): Add rmdir.
118308         * modules/openat (Depends-on): Likewise.
118310 2008-11-02  Bruno Haible  <bruno@clisp.org>
118312         Mark 'raise' obsolete.
118313         * modules/raise (Status, Notice): New sections.
118314         (Include): Specify <signal.h>.
118315         * modules/stdio (Depends-on): Add raise.
118316         * modules/write (Depends-on): Likewise.
118318 2008-11-02  Bruno Haible  <bruno@clisp.org>
118320         Mark 'memset' obsolete.
118321         * modules/memset (Status, Notice): New sections.
118323 2008-11-02  Bruno Haible  <bruno@clisp.org>
118325         Mark 'memmove' obsolete.
118326         * modules/memmove (Status, Notice): New sections.
118327         * modules/argp (Depends-on): Add memmove.
118328         * modules/argz (Depends-on): Likewise.
118329         * modules/canonicalize (Depends-on): Likewise.
118330         * modules/canonicalize-lgpl (Depends-on): Likewise.
118331         * modules/fts (Depends-on): Likewise.
118332         * modules/getcwd (Depends-on): Likewise.
118333         * modules/human (Depends-on): Likewise.
118334         * modules/regex (Depends-on): Likewise.
118335         * modules/striconveh (Depends-on): Likewise.
118336         * modules/trim (Depends-on): Likewise.
118337         * modules/unistr/u8-move (Depends-on): Likewise.
118338         * modules/unistr/u16-move (Depends-on): Likewise.
118339         * modules/unistr/u32-move (Depends-on): Likewise.
118341 2008-11-02  Bruno Haible  <bruno@clisp.org>
118343         Mark 'memcpy' obsolete.
118344         * modules/memcpy (Status, Notice): New sections.
118346 2008-11-02  Bruno Haible  <bruno@clisp.org>
118348         Mark 'memcmp' obsolete.
118349         * modules/memcmp (Status, Notice): New sections.
118350         * modules/argmatch (Depends-on): Add memchr.
118351         * modules/backupfile (Depends-on): Likewise.
118352         * modules/c-strcasestr (Depends-on): Likewise.
118353         * modules/crypto/des (Depends-on): Likewise.
118354         * modules/csharpcomp (Depends-on): Likewise.
118355         * modules/fnmatch (Depends-on): Likewise.
118356         * modules/git-merge-changelog (Depends-on): Likewise.
118357         * modules/isnand (Depends-on): Likewise.
118358         * modules/isnand-nolibm (Depends-on): Likewise.
118359         * modules/isnanf (Depends-on): Likewise.
118360         * modules/isnanf-nolibm (Depends-on): Likewise.
118361         * modules/isnanl (Depends-on): Likewise.
118362         * modules/isnanl-nolibm (Depends-on): Likewise.
118363         * modules/mbchar (Depends-on): Likewise.
118364         * modules/memcoll (Depends-on): Likewise.
118365         * modules/quotearg (Depends-on): Likewise.
118366         * modules/regex (Depends-on): Likewise.
118367         * modules/relocatable-prog (Depends-on): Likewise.
118368         * modules/same (Depends-on): Likewise.
118369         * modules/signbit (Depends-on): Likewise.
118370         * modules/strcasestr-simple (Depends-on): Likewise.
118371         * modules/unictype/gen-ctype (Depends-on): Likewise.
118372         * modules/unilbrk/gen-lbrk (Depends-on): Likewise.
118373         * modules/uniname/uniname (Depends-on): Likewise.
118374         * modules/unistr/u8-cmp (Depends-on): Likewise.
118376 2008-11-02  Bruno Haible  <bruno@clisp.org>
118378         Mark 'memchr' obsolete.
118379         * modules/memchr (Status, Notice): New sections.
118380         * modules/argp (Depends-on): Add memchr.
118381         * modules/base64 (Depends-on): Likewise.
118382         * modules/c-strcasestr (Depends-on): Likewise.
118383         * modules/chdir-long (Depends-on): Likewise.
118384         * modules/fnmatch (Depends-on): Likewise.
118385         * modules/getsubopt (Depends-on): Likewise.
118386         * modules/git-merge-changelog (Depends-on): Likewise.
118387         * modules/glob (Depends-on): Likewise.
118388         * modules/strcasestr-simple (Depends-on): Likewise.
118389         * modules/strnlen (Depends-on): Likewise.
118391 2008-11-02  Bruno Haible  <bruno@clisp.org>
118393         Mark 'atexit' obsolete.
118394         * modules/atexit (Status, Notice): New sections.
118395         * modules/chdir-long (Depends-on): Add atexit.
118396         * modules/wait-process (Depends-on): Likewise.
118398 2008-11-02  Bruno Haible  <bruno@clisp.org>
118400         * gnulib-tool: New option --with-obsolete.
118401         (func_usage): Document it.
118402         (func_modules_transitive_closure): Drop obsolete dependencies if
118403         incobsolete is not true.
118404         (func_import): Read and save the incobsolete variable to the cache.
118406 2008-11-02  Bruno Haible  <bruno@clisp.org>
118408         * modules/TEMPLATE-EXTENDED: New field 'Status'.
118409         * gnulib-tool: New option --extract-status.
118410         (func_usage): Document it.
118411         (sed_extract_prog): Recognize it.
118412         (func_get_status): New function.
118414 2008-10-30  Simon Josefsson  <simon@josefsson.org>
118416         * modules/sockets (License): Change from LGPL to LGPLv2+.
118418 2008-10-28  Simon Josefsson  <simon@josefsson.org>
118420         * top/maint.mk: Add coverage rules, inspired by scripts in gnupdf.
118422 2008-10-28  Simon Josefsson  <simon@josefsson.org>
118424         * MODULES.html.sh (Support for systems lacking POSIX:2001):
118425         Mention times and sys_times.
118426         * modules/sys_times, modules/sys_times-tests: New modules.
118427         * modules/times, modules/times-tests: Likewise
118428         * m4/sys_times_h.m4: New file.
118429         * lib/sys_times.in.h: Likewise
118430         * lib/times.c: Likewise.
118431         * tests/test-sys_times.c: Likewise.
118432         * tests/test-times.c: Likewise.
118433         * doc/posix-headers/sys_times.texi: Update.
118434         * doc/posix-functions/times.texi: Update.
118436 2008-10-28  Jim Meyering  <meyering@redhat.com>
118438         * modules/tempname (Depends-on): Add lstat.
118440         * modules/lstat (License): Relicense: LGPL -> LGPLv2+.
118442 2008-10-28  Simon Josefsson  <simon@josefsson.org>
118444         * gnulib-tool (func_emit_tests_Makefile_am): Revert last commit.
118445         * modules/argp-tests (test_argp_LDADD): Set EXEEXT here instead,
118446         using idiom used elsewhere in gnulib.
118448 2008-10-27  Jim Meyering  <meyering@redhat.com>
118450         * modules/gethostname (License): Relicense: LGPL -> LGPLv2+.
118452 2008-10-27  Simon Josefsson  <simon@josefsson.org>
118454         * gnulib-tool (func_emit_tests_Makefile_am): Set EXEEXT in
118455         TESTS_ENVIRONMENT, for shell scripts that needs to call built
118456         programs.
118457         * tests/test-argp-2.sh: Use $EXEEXT when needed.
118459 2008-10-27  Simon Josefsson  <simon@josefsson.org>
118461         * lib/sys_stat.in.h (lstat): Fix declaration for mingw.
118463 2008-10-27  Bruno Haible  <bruno@clisp.org>
118465         * tests/test-lstat.c: Include <stdio.h>.
118467 2008-10-27  Simon Josefsson  <simon@josefsson.org>
118469         * modules/lstat-tests: New module.
118470         * tests/test-lstat.c: New file.
118472 2008-10-26  Jim Meyering  <meyering@redhat.com>
118474         * lib/mkdir.c (rpl_mkdir) [_WIN32...]: Mark mode as an unused parameter.
118476 2008-10-26  Simon Josefsson  <simon@josefsson.org>
118477             Bruno Haible  <bruno@clisp.org>
118479         Fix a clash between the type DATADIR on Windows and the macro DATADIR.
118480         * modules/configmake (Include): Add a note that the include must come
118481         after all system headers.
118482         * lib/javaversion.c: Include configmake.h after all other includes.
118484 2008-10-26  Bruno Haible  <bruno@clisp.org>
118486         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Set default of
118487         HAVE_STRUCT_RANDOM_DATA to 1.
118488         (gl_STDLIB_H): Simplify.
118490 2008-10-26  Simon Josefsson  <simon@josefsson.org>
118492         * m4/stdlib_h.m4: Check for struct random_data.  Initialize and
118493         substitute HAVE_STRUCT_RANDOM_DATA.
118494         * lib/stdlib.in.h [!HAVE_STRUCT_RANDOM_DATA]: Provide struct
118495         random_data.
118496         * modules/stdlib (Makefile.am): Substitute
118497         HAVE_STRUCT_RANDOM_DATA.
118499 2008-10-26  Simon Josefsson  <simon@josefsson.org>
118501         * doc/gnulib.texi (@copying): Use GFDLv1.2+.
118502         * doc/gnulib-intro.texi (Copyright): Likewise.
118504 2008-10-26  Simon Josefsson  <simon@josefsson.org>
118506         * doc/gnulib.texi (Header files): C++ fixes, based on Bruno's
118507         findings.
118509 2008-10-25  Ben Pfaff  <blp@cs.stanford.edu>
118510             Bruno Haible  <bruno@clisp.org>
118512         * lib/unistd.in.h: Include <winsock2.h>.
118513         (socket, connect,accept, bind, getpeername, getsockname, getsockopt,
118514         listen, recv, send, recvfrom, sendto, setsockopt, shutdown, select):
118515         Provide dummy declarations.
118516         (gethostname): Override.
118517         * lib/sys_socket.in.h (gethostname): Provide dummy declaration.
118518         * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): Invoke
118519         gl_PREREQ_SYS_H_WINSOCK2.
118520         * modules/gethostname (Files): Add m4/sys_socket_h.m4.
118521         * doc/posix-functions/gethostname.texi: More details.
118523 2008-10-25  Bruno Haible  <bruno@clisp.org>
118525         * m4/sys_socket_h.m4 (gl_PREREQ_SYS_H_WINSOCK2): Require
118526         gl_UNISTD_H_DEFAULTS, gl_SYS_IOCTL_H_DEFAULTS only if they exist.
118527         * modules/sys_socket (Files): Remove m4/unistd_h.m4, m4/sys_ioctl_h.m4.
118529         * lib/sys_socket.in.h (HAVE__GL_CLOSE_FD_MAYBE_SOCKET); Move macro from
118530         here ...
118531         * lib/unistd.in.h (HAVE__GL_CLOSE_FD_MAYBE_SOCKET); ... to here.
118532         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_H_DEFAULTS): Remove invocation of
118533         gl_UNISTD_H_DEFAULTS.
118535 2008-10-25  Eric Blake  <ebb9@byu.net>
118537         signbit: avoid spurious compiler failure
118538         * m4/signbit.m4 (gl_SIGNBIT_TEST_PROGRAM): Move non-constant
118539         declarations inside function.
118541 2008-10-24  Simon Josefsson  <simon@josefsson.org>
118542             Bruno Haible  <bruno@clisp.org>
118544         * lib/stdlib.in.h (@GNULIB_RANDOM_R@): Include stdint.h.
118545         * modules/random_r (Depends-on): Add stdint.
118547 2008-10-24  Bruno Haible  <bruno@clisp.org>
118549         * modules/intprops (License): Change to LGPLv2+, with approval by Paul
118550         Eggert.
118551         * modules/strerror (License): Likewise.
118553 2008-10-24  Jim Meyering  <meyering@redhat.com>
118555         sys_socket: fix typo that inhibited expansion of @GNULIB_SEND@
118556         * modules/sys_socket (Depends-on) [Depends-on]: Fix typo.
118558 2008-10-24  Eric Blake  <ebb9@byu.net>
118560         getgroups: fix compilation when getgroups is available
118561         * lib/getgroups.c (includes): Include <unistd.h> for getgroups,
118562         but with <config.h> override of getgroups disabled.
118564 2008-10-24  Simon Josefsson  <simon@josefsson.org>
118566         * doc/gnulib.texi (Header files): Add note about C++ problems.
118567         Explained by Bruno Haible <bruno@clisp.org>.
118569 2008-10-23  Bruno Haible  <bruno@clisp.org>
118571         Define a dummy SA_NODEFER macro on Interix.
118572         * lib/signal.in.h (SA_NODEFER): Define fallback.
118573         Reported by Aleksey Cheusov <cheusov@tut.by> via
118574         Thomas Klausner <wiz@netbsd.org> and Eric Blake.
118576 2008-10-23  Bruno Haible  <bruno@clisp.org>
118578         * modules/freadahead (License): Change to LGPLv2+.
118579         Suggested by Simon Josefsson.
118581 2008-10-23  Jim Meyering  <meyering@redhat.com>
118583         random_r: new module
118584         * modules/random_r: New file.
118585         * m4/random_r.m4: New file.
118586         * lib/random_r.c: New file, from glibc.
118587         * modules/random_r-tests: New file.
118588         * tests/test-random_r.c: New file.
118589         * lib/stdlib.in.h (srandom_r, initstate_r, setstate_r, random_r):
118590          Declare.
118591         (RAND_MAX): Define.
118592         * m4/stdlib_h.m4: Define and AC_SUBST GNULIB_RANDOM_R and HAVE_RANDOM_R.
118593         * modules/stdlib: Substitute them, too.
118594         * MODULES.html.sh (Extra functions based on POSIX:2001) [Misc]: Add it.
118595         * doc/glibc-functions/initstate_r.texi: Mention the new module.
118596         * doc/glibc-functions/random_r.texi: Likewise.
118597         * doc/glibc-functions/setstate_r.texi: Likewise.
118598         * doc/glibc-functions/srandom_r.texi: Likewise.
118599         * config/srclist.txt: Mention it.
118601 2008-10-23  David Lutterkort  <lutter@redhat.com>
118603         * modules/selinux-h: Search for LIB_SELINUX and mark it as a
118604         link requirement
118606 2008-10-23  Jim Meyering  <meyering@redhat.com>
118608         selinux-h: mark parameters of stub functions as intentionally unused
118609         * lib/se-selinux.in.h: Mark parameters as _UNUSED_PARAMETER_.
118610         * lib/se-context.in.h: Likewise.
118612 2008-10-22  Simon Josefsson  <simon@josefsson.org>
118614         * lib/sys_socket.in.h (FD_ISSET): Fix warnings under mingw.
118616 2008-10-22  Simon Josefsson  <simon@josefsson.org>
118618         * m4/getgroups.m4: Avoid invoking test with wrong parameters.
118620 2008-10-22  Eric Blake  <ebb9@byu.net>
118622         glthread/thread: avoid compiler warning
118623         * lib/glthread/thread.c (gl_thread_exit_func) [USE_WIN32_THREADS]:
118624         Add unreachable abort to silence compiler.
118626 2008-10-22  Eric Blake  <ebb9@byu.net>
118628         netdb: also supply struct addrinfo for cygwin 1.5.x
118629         * m4/netdb_h.m4 (gl_HEADER_NETDB): Check for incomplete header on
118630         older cygwin.
118631         * lib/netdb.in.h [!HAVE_STRUCT_ADDRINFO]: Also supply contents for
118632         cygwin.
118633         * doc/posix-headers/netdb.texi (netdb.h): Document this.
118635 2008-10-22  Bruno Haible  <bruno@clisp.org>
118637         * users.txt: Update entry about pspp.
118639 2008-10-21  Bruno Haible  <bruno@clisp.org>
118641         Simplification.
118642         * lib/sys_socket.in.h (_gl_close_fd_maybe_socket): Remove declaration.
118643         * lib/close.c (_gl_close_fd_maybe_socket): Make static.
118645         Simplification.
118646         * lib/ioctl.c (ioctl): Don't undefine.
118647         * lib/socket.c (socket): Don't undefine.
118649         Remove unused module indicator macros.
118650         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_MODULE_INDICATOR): Don't define
118651         GNULIB_$1 as a C macro.
118653         * doc/posix-functions/close.texi: Undo last change.
118654         * doc/posix-functions/ioctl.texi: Merge the two paragraphs about
118655         Windows platforms.
118657 2008-10-21  Bruno Haible  <bruno@clisp.org>
118659         Add gethostname() declaration to <unistd.h>.
118660         * lib/unistd.in.h (gethostname): New declaration.
118661         * lib/gethostname.c: Include <unistd.h>.
118662         * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): Require
118663         gl_UNISTD_H_DEFAULTS. Set HAVE_GETHOSTNAME.
118664         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_GETHOSTNAME
118665         and HAVE_GETHOSTNAME.
118666         * modules/gethostname (Depends-on): Add unistd.
118667         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
118668         (Include): Specify <unistd.h>.
118669         * modules/unistd (Makefile.am): Substitute GNULIB_GETHOSTNAME and
118670         HAVE_GETHOSTNAME.
118671         * tests/test-gethostname.c: Include <unistd.h> first.
118673 2008-10-21  Bruno Haible  <bruno@clisp.org>
118675         * modules/poll-tests (Depends-on): Add sys_ioctl, ioctl.
118676         * modules/select-tests (Depends-on): Likewise.
118677         Reported by Simon Josefsson.
118679 2008-10-21  Simon Josefsson  <simon@josefsson.org>
118681         * lib/close.c: Add _gl_close_fd_maybe_socket from winsock.c.
118682         * lib/accept.c: New file, based on winsock.c.
118683         * lib/bind.c: New file, based on winsock.c.
118684         * lib/connect.c: New file, based on winsock.c.
118685         * lib/getpeername.c: New file, based on winsock.c.
118686         * lib/getsockname.c: New file, based on winsock.c.
118687         * lib/getsockopt.c: New file, based on winsock.c.
118688         * lib/ioctl.c: New file, based on winsock.c.
118689         * lib/listen.c: New file, based on winsock.c.
118690         * lib/recv.c: New file, based on winsock.c.
118691         * lib/recvfrom.c: New file, based on winsock.c.
118692         * lib/send.c: New file, based on winsock.c.
118693         * lib/sendto.c: New file, based on winsock.c.
118694         * lib/setsockopt.c: New file, based on winsock.c.
118695         * lib/shutdown.c: New file, based on winsock.c.
118696         * lib/socket.c: New file, based on winsock.c.
118697         * lib/w32sock.h: New file, based on winsock.c.
118698         * lib/winsock.c: Remove file.
118699         * modules/accept: Likewise.
118700         * modules/bind: Likewise.
118701         * modules/connect: Likewise.
118702         * modules/getpeername: Likewise.
118703         * modules/getsockname: Likewise.
118704         * modules/getsockopt: Likewise.
118705         * modules/ioctl: Likewise.
118706         * modules/listen: Likewise.
118707         * modules/recv: Likewise.
118708         * modules/recvfrom: Likewise.
118709         * modules/send: Likewise.
118710         * modules/sendto: Likewise.
118711         * modules/setsockopt: Likewise.
118712         * modules/shutdown: Likewise.
118713         * modules/socket: Use socket.c instead of winsock.c.
118714         * modules/sys_socket: Remove (unneeded?) dependency on winsock.c.
118715         * doc/posix-functions/accept.texi: Doc fix.
118716         * doc/posix-functions/bind.texi: Doc fix.
118717         * doc/posix-functions/close.texi: Doc fix.
118718         * doc/posix-functions/connect.texi: Doc fix.
118719         * doc/posix-functions/getpeername.texi: Doc fix.
118720         * doc/posix-functions/getsockname.texi: Doc fix.
118721         * doc/posix-functions/getsockopt.texi: Doc fix.
118722         * doc/posix-functions/ioctl.texi: Doc fix.
118723         * doc/posix-functions/listen.texi: Doc fix.
118724         * doc/posix-functions/recv.texi: Doc fix.
118725         * doc/posix-functions/recvfrom.texi: Doc fix.
118726         * doc/posix-functions/send.texi: Doc fix.
118727         * doc/posix-functions/sendto.texi: Doc fix.
118728         * doc/posix-functions/setsockopt.texi: Doc fix.
118729         * doc/posix-functions/shutdown.texi: Doc fix.
118730         * doc/posix-functions/socket.texi: Doc fix.
118732 2008-10-20  Bruno Haible  <bruno@clisp.org>
118734         Take into account the role of SIGABRT_COMPAT on Windows 2008.
118735         * lib/sigprocmask.c (SIGABRT_COMPAT, SIGABRT_COMPAT_MASK): New macros.
118736         (sigismember, sigaddset, sigdelset, sigfillset, rpl_signal): Handle it
118737         as an alias for SIGABRT.
118738         * lib/sigaction.c (SIGABRT_COMPAT): New macro.
118739         (sigaction): Map it to SIGABRT.
118740         Reported by Ramiro Polla <ramiro.polla@gmail.com> via Eric Blake.
118742 2008-10-20  Bruno Haible  <bruno@clisp.org>
118744         * lib/fts.c: Don't include lstat.h.
118745         * lib/openat.c: Include <sys/stat.h> instead of lstat.h.
118747         Move the lstat() declaration to <sys/stat.h>.
118748         * lib/lstat.h: Remove file.
118749         * lib/sys_stat.in.h: Add special invocation convention.
118750         (lstat): New declaration.
118751         * lib/lstat.c (orig_lstat): New function.
118752         (rpl_lstat): Use orig_lstat instead of lstat.
118753         * m4/lstat.m4 (gl_FUNC_LSTAT): Require gl_SYS_STAT_H_DEFAULTS and
118754         AC_C_INLINE. Set REPLACE_LSTAT.
118755         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize GNULIB_LSTAT
118756         and REPLACE_LSTAT.
118757         * modules/lstat (Files): Remove lib/lstat.h.
118758         (configure.ac): Invoke gl_SYS_STAT_MODULE_INDICATOR.
118759         (Include): Specify <sys/stat.h> instead of lstat.h.
118760         * modules/sys_stat (Makefile.am): Substitute GNULIB_LSTAT and
118761         REPLACE_LSTAT.
118762         * NEWS: Mention the change.
118764 2008-10-20  Bruno Haible  <bruno@clisp.org>
118766         * modules/posix_spawn-tests: New file.
118767         * tests/test-posix_spawn3.c: New file.
118769 2008-10-20  Bruno Haible  <bruno@clisp.org>
118771         * modules/posix_spawnp-tests (Depends-on): Add sys_wait.
118772         * tests/test-posix_spawn1.c (WTERMSIG, WCOREDUMP, WEXITSTATUS,
118773         WIFSIGNALED, WIFEXITED, WIFSTOPPED): Remove fallback definitions.
118774         * tests/test-posix_spawn2.c (WTERMSIG, WCOREDUMP, WEXITSTATUS,
118775         WIFSIGNALED, WIFEXITED, WIFSTOPPED): Likewise.
118777 2008-10-20  Bruno Haible  <bruno@clisp.org>
118779         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): Test against another bug
118780         of posix_spawn on AIX 5.3.
118782 2008-10-20  Bruno Haible  <bruno@clisp.org>
118784         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): Make the check on MacOS X.
118786 2008-10-20  Bruno Haible  <bruno@clisp.org>
118788         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): Use AC_LANG_SOURCE instead
118789         of AC_LANG_PROGRAM.
118791 2008-10-20  Simon Josefsson  <simon@josefsson.org>
118793         * lib/netdb.in.h: Don't define GNU specific constants until they
118794         are supported or needed.  Reported by Bruno Haible
118795         <bruno@clisp.org>.
118797 2008-10-20  Simon Josefsson  <simon@josefsson.org>
118799         * lib/canon-host.c: Include netdb.h instead of getaddrinfo.h.
118801 2008-10-20  Simon Josefsson  <simon@josefsson.org>
118803         * lib/getaddrinfo.h: Remove file.
118804         * modules/getaddrinfo: Reflect move from getaddrinfo.h to netdb.h.
118805         * m4/getaddrinfo.m4: Call gl_HEADER_NETDB.  Don't check for netdb.h.
118806         * lib/netdb.in.h: Add declarations from getaddrinfo.h.
118807         * m4/netdb_h.m4: Initialize GNULIB_GETADDRINFO to 0.
118808         * modules/netdb: Substitute GNULIB_GETADDRINFO.
118809         * lib/getaddrinfo.c: Include netdb.h instead of getaddrinfo.h.
118810         * tests/test-getaddrinfo.c: Likewise.
118811         * lib/gai_strerror.c: Likewise.  Also drop HAVE_NETDB_H check.
118812         * NEWS: Mention change.
118814 2008-10-19  Bruno Haible  <bruno@clisp.org>
118816         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): Remove unneeded code.
118818 2008-10-19  Bruno Haible  <bruno@clisp.org>
118820         * lib/wait-process.c: Include simply <sys/wait.h>.
118821         (waitpid, WTERMSIG, WCOREDUMP, WEXITSTATUS, WIFSIGNALED, WIFEXITED,
118822         WIFSTOPPED): Remove fallback definitions.
118823         * modules/wait-process (Depends-on): Add sys_wait.
118825         New module 'sys_wait'.
118826         * modules/sys_wait: New file.
118827         * lib/sys_wait.in.h: New file, partially copied from
118828         lib/wait-process.c.
118829         * m4/sys_wait_h.m4: New file.
118830         * doc/posix-headers/sys_wait.texi: Mention the new module.
118832 2008-10-19  Bruno Haible  <bruno@clisp.org>
118834         * m4/wait-process.m4 (gl_WAIT_PROCESS): Remove test for unistd.h.
118836 2008-10-19  Bruno Haible  <bruno@clisp.org>
118838         Assume that waitpid() fills an 'int' status, not a 'union wait'.
118839         * lib/wait-process.c (WAIT_T): Remove type.
118840         (WTERMSIG, WCOREDUMP, WEXITSTATUS): Define fallbacks using bit masks.
118841         (wait_subprocess): Update.
118843 2008-10-19  Bruno Haible  <bruno@clisp.org>
118845         New module 'atoll'.
118846         * modules/atoll: New file.
118847         * lib/stdlib.in.h (atoll): New declaration.
118848         * lib/atoll.c: New file, from glibc with modifications.
118849         * m4/atoll.m4: New file.
118850         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_ATOLL,
118851         HAVE_ATOLL.
118852         * modules/stdlib (Makefile.am): Substitute GNULIB_ATOLL, HAVE_ATOLL.
118853         * doc/posix-functions/atoll.texi: Mention the new module.
118855 2008-10-19  Bruno Haible  <bruno@clisp.org>
118857         Add strtoull() declaration to <stdlib.h>.
118858         * lib/stdlib.in.h (strtoull): New declaration.
118859         * m4/strtoull.m4 (gl_FUNC_STRTOLL): Require gl_STDLIB_H_DEFAULTS.
118860         Set HAVE_STRTOULL.
118861         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_STRTOULL,
118862         HAVE_STRTOULL.
118863         * modules/strtoull (Depends-on): Add stdlib.
118864         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
118865         * modules/stdlib (Makefile.am): Substitute GNULIB_STRTOULL,
118866         HAVE_STRTOULL.
118868 2008-10-19  Bruno Haible  <bruno@clisp.org>
118870         Add strtoll() declaration to <stdlib.h>.
118871         * lib/stdlib.in.h (strtoll): New declaration.
118872         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Require gl_STDLIB_H_DEFAULTS.
118873         Set HAVE_STRTOLL.
118874         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_STRTOLL,
118875         HAVE_STRTOLL.
118876         * modules/strtoll (Depends-on): Add stdlib.
118877         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
118878         * modules/stdlib (Makefile.am): Substitute GNULIB_STRTOLL, HAVE_STRTOLL.
118880 2008-10-19  Bruno Haible  <bruno@clisp.org>
118882         * modules/bcopy (Depends-on): Add strings.
118883         (Include): Specify <strings.h>.
118885 2008-10-19  Bruno Haible  <bruno@clisp.org>
118887         * doc/posix-functions/atexit.texi: Update doc regarding mingw.
118889 2008-10-19  Bruno Haible  <bruno@clisp.org>
118891         * lib/openat-die.c (openat_save_fail, openat_restore_fail): Rename
118892         the parameter from 'errno' to 'errnum'. Fixes a compilation error on
118893         mingw.
118895 2008-10-19  Bruno Haible  <bruno@clisp.org>
118897         * lib/atanl.c: Don't include isnanl.h.
118898         * lib/cosl.c: Likewise.
118899         * lib/ldexpl.c: Likewise.
118900         * lib/logl.c: Likewise.
118901         * lib/sinl.c: Likewise.
118902         * lib/sqrtl.c: Likewise.
118903         * lib/tanl.c: Likewise.
118905         Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
118906         * lib/isnanf.h: Remove file.
118907         * lib/isnand.h: Remove file.
118908         * lib/isnanl.h: Remove file.
118909         * lib/math.in.h: Include the contents of lib/isnanf.h, lib/isnand.h,
118910         lib/isnanl.h. Use HAVE_ISNANF, HAVE_ISNAND, HAVE_ISNANL as substituted
118911         macros.
118912         * m4/isnanf.m4 (gl_FUNC_ISNANF): Require gl_MATH_H_DEFAULTS. Set
118913         HAVE_ISNANF, don't define it as a C macro.
118914         * m4/isnand.m4 (gl_FUNC_ISNAND): Require gl_MATH_H_DEFAULTS. Set
118915         HAVE_ISNAND, don't define it as a C macro.
118916         * m4/isnanl.m4 (gl_FUNC_ISNANL): Require gl_MATH_H_DEFAULTS. Set
118917         HAVE_ISNANL, don't define it as a C macro.
118918         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_ISNAN[FDL] and
118919         HAVE_ISNAN[FDL].
118920         * modules/isnanf (Files): Remove lib/isnanf.h.
118921         (Depends-on): Add math.
118922         (configure.ac): Invoke gl_MATH_MODULE_INDICATOR.
118923         (Include): Specify <math.h> instead of isnanf.h.
118924         * modules/isnand (Files): Remove lib/isnand.h.
118925         (Depends-on): Add math.
118926         (configure.ac): Invoke gl_MATH_MODULE_INDICATOR.
118927         (Include): Specify <math.h> instead of isnand.h.
118928         * modules/isnanl (Files): Remove lib/isnanl.h.
118929         (Depends-on): Add math.
118930         (configure.ac): Invoke gl_MATH_MODULE_INDICATOR.
118931         (Include): Specify <math.h> instead of isnanl.h.
118932         * modules/math (Makefile.am): Substitute GNULIB_ISNAN[FDL] and
118933         HAVE_ISNAN[FDL].
118934         * tests/test-isnanf.c: Include <math.h> instead of isnanf.h.
118935         * tests/test-isnand.c: Include <math.h> instead of isnand.h.
118936         * tests/test-isnanl.c: Include <math.h> instead of isnanl.h.
118937         * NEWS: Mention the change.
118939 2008-10-18  Bruno Haible  <bruno@clisp.org>
118941         Add getusershell(), setusershell(), endusershell() declarations to
118942         <unistd.h>.
118943         * lib/unistd.in.h (getusershell, setusershell, endusershell): New
118944         declarations.
118945         * lib/getusershell.c: Include unistd.h.
118946         * m4/getusershell.m4 (gl_FUNC_GETUSERSHELL): Require
118947         gl_UNISTD_H_DEFAULTS and AC_USE_SYSTEM_EXTENSIONS. Set
118948         HAVE_GETUSERSHELL.
118949         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_GETUSERSHELL
118950         and HAVE_GETUSERSHELL.
118951         * modules/getusershell (Depends-on): Add unistd, extensions.
118952         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
118953         (Include): Specify <unistd.h>.
118954         * modules/unistd (Makefile.am): Substitute GNULIB_GETUSERSHELL and
118955         HAVE_GETUSERSHELL.
118957 2008-10-18  Bruno Haible  <bruno@clisp.org>
118959         Add a getloadavg() declaration to <stdlib.h>.
118960         * lib/stdlib.in.h; Include <sys/loadavg.h> when needed for the
118961         getloadavg declaration.
118962         (getloadavg): New declaration.
118963         * lib/getloadavg.c: Include <stdlib.h> first.
118964         * m4/getloadavg.m4 (gl_GETLOADAVG): Require gl_STDLIB_H_DEFAULTS and
118965         AC_USE_SYSTEM_EXTENSIONS. Test whether sys/loadavg.h exists. Set
118966         HAVE_SYS_LOADAVG_H and HAVE_DECL_GETLOADAVG.
118967         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_GETLOADAVG,
118968         HAVE_SYS_LOADAVG_H, HAVE_DECL_GETLOADAVG.
118969         * modules/getloadavg (Depends-on): Add stdlib, extensions.
118970         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
118971         (Include): Specify <stdlib.h>.
118972         * modules/stdlib (Makefile.am): Substitute GNULIB_GETLOADAVG,
118973         HAVE_SYS_LOADAVG_H, HAVE_DECL_GETLOADAVG.
118975 2008-10-18  Bruno Haible  <bruno@clisp.org>
118977         * lib/dirchownmod.c: Don't include lchmod.h.
118979         Move the lchmod() declaration to <sys/stat.h>.
118980         * lib/lchmod.h: Remove file.
118981         * lib/sys_stat.in.h: Add placeholder for GL_LINK_WARNING.
118982         (lchmod): New declaration, moved here from lib/lchown.h.
118983         * m4/lchmod.m4 (gl_FUNC_LCHMOD): Require gl_SYS_STAT_H_DEFAULTS and
118984         AC_USE_SYSTEM_EXTENSIONS. Set HAVE_LCHMOD.
118985         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize GNULIB_LCHMOD
118986         and HAVE_LCHMOD.
118987         * modules/lchmod (Files): Remove lib/lchmod.h.
118988         (Depends-on): Add sys_stat, extensions.
118989         (configure.ac): Invoke gl_SYS_STAT_MODULE_INDICATOR.
118990         (Include): Specify <sys/stat.h> instead of lchmod.h.
118991         * modules/sys_stat (Depends-on): Add link-warning.
118992         (Makefile.am): Substitute GNULIB_LCHMOD, HAVE_LCHMOD, and the
118993         definition of GL_LINK_WARNING.
118994         * NEWS: Mention the change.
118996 2008-10-18  Bruno Haible  <bruno@clisp.org>
118998         * lib/fchdir.c: Don't include dirfd.h.
118999         * lib/fts.c: Likewise.
119000         * lib/getcwd.c: Likewise.
119001         * lib/glob.c: Likewise.
119003         Move the dirfd() declaration to <dirent.h>.
119004         * lib/dirfd.h: Remove file.
119005         * lib/dirent.in.h: Add placeholder for GL_LINK_WARNING.
119006         (dirfd): New declaration.
119007         * lib/dirfd.c: Include <dirent.h> instead of dirfd.h.
119008         * m4/dirfd.m4 (gl_FUNC_DIRFD): Require gl_DIRENT_H_DEFAULTS and
119009         AC_USE_SYSTEM_EXTENSIONS. Invoke gl_REPLACE_DIRENT_H. Set
119010         HAVE_DECL_DIRFD.
119011         * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): Initialize GNULIB_DIRFD and
119012         HAVE_DECL_DIRFD.
119013         * modules/dirfd (Files): Remove lib/dirfd.h.
119014         (Depends-on): Add dirent, extensions.
119015         (configure.ac): Invoke gl_DIRENT_MODULE_INDICATOR.
119016         (Include): Specify <dirent.h> instead of dirfd.h.
119017         * modules/dirent (Depends-on): Add link-warning.
119018         (Makefile.am): Substitute GNULIB_DIRFD, HAVE_DECL_DIRFD, and
119019         definition of GL_LINK_WARNING.
119020         * NEWS: Mention the change.
119022 2008-10-18  Bruno Haible  <bruno@clisp.org>
119024         Move the euidaccess() declaration to <unistd.h>.
119025         * lib/euidaccess.h: Remove file.
119026         * lib/unistd.in.h (euidaccess): New declaration.
119027         * lib/euidaccess.c: Don't include euidaccess.h.
119028         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Require gl_UNISTD_H_DEFAULTS.
119029         Don't check whether euidaccess is declared. Set HAVE_EUIDACCESS.
119030         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_EUIDACCESS
119031         and HAVE_EUIDACCESS.
119032         * modules/euidaccess (Files): Remove lib/euidaccess.h.
119033         (Depends-on): Add unistd.
119034         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
119035         (Include): Specify <unistd.h> instead of euidaccess.h.
119036         * modules/unistd (Makefile.am): Substitute GNULIB_EUIDACCESS and
119037         HAVE_EUIDACCESS.
119038         * NEWS: Mention the change.
119040 2008-10-18  Bruno Haible  <bruno@clisp.org>
119042         * lib/xgetdomainname.c: Include <unistd.h> instead of getdomainname.h.
119044         Move the getdomainname() declaration to <unistd.h>.
119045         * lib/getdomainname.h: Remove file.
119046         * lib/unistd.in.h (getdomainname): New declaration.
119047         * lib/getdomainname.c: Include <unistd.h> instead of getdomainname.h.
119048         * m4/getdomainname.m4 (gl_FUNC_GETDOMAINNAME): Require
119049         gl_UNISTD_H_DEFAULTS and AC_USE_SYSTEM_EXTENSIONS. Set
119050         HAVE_GETDOMAINNAME.
119051         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
119052         GNULIB_GETDOMAINNAME and HAVE_GETDOMAINNAME.
119053         * modules/getdomainname (Files): Remove lib/getdomainname.h.
119054         (Depends-on): Add unistd, extensions.
119055         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
119056         (Includes): Specify <unistd.h> instead of getdomainname.h.
119057         * modules/unistd (Makefile.am): Substitute GNULIB_GETDOMAINNAME and
119058         HAVE_GETDOMAINNAME.
119059         * NEWS: Mention the change.
119061 2008-10-18  Bruno Haible  <bruno@clisp.org>
119063         * modules/dirent: New file.
119064         * m4/dirent_h.m4: New file.
119065         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_DIRENT_H_DEFAULTS.
119066         Invoke gl_REPLACE_DIRENT_H. Don't assign DIRENT_H directly.
119067         * modules/fchdir (Files): Remove lib/dirent.in.h.
119068         (Depends-on): Add dirent.
119069         (Makefile.am): Move rules to modules/dirent.
119070         * doc/posix-headers/dirent.texi: Mention the new module.
119072 2008-10-18  Bruno Haible  <bruno@clisp.org>
119074         Avoid -Wunused-parameter warnings in public gnulib header files.
119075         * m4/gnulib-common.m4 (gl_COMMON_BODY): Define _UNUSED_PARAMETER_ as a
119076         macro.
119077         * lib/unistr.h (u32_mbtouc_unsafe, u32_mbtouc): Use it.
119079 2008-10-18  Bruno Haible  <bruno@clisp.org>
119081         * doc/glibc-functions/dirfd.texi: Mention the module 'dirfd'.
119082         * doc/glibc-functions/error.texi: Mention the module 'error'.
119083         * doc/glibc-functions/euidaccess.texi: Mention the module 'euidaccess'.
119084         * doc/glibc-functions/getdomainname.texi: Mention the module
119085         'getdomainname'.
119086         * doc/glibc-functions/getloadavg.texi: Mention the module 'getloadavg'.
119087         * doc/glibc-functions/getpagesize.texi: Mention the module
119088         'getpagesize'.
119089         * doc/glibc-functions/getusershell.texi: Mention the module
119090         'getusershell'.
119091         * doc/glibc-functions/isnanl.texi: Mention the module 'isnanl'.
119092         * doc/glibc-functions/lchmod.texi: Mention the module 'lchmod'.
119093         * doc/glibc-functions/mempcpy.texi: Mention the module 'mempcpy'.
119094         * doc/glibc-functions/memrchr.texi: Mention the module 'memrchr'.
119095         * doc/glibc-functions/mkdtemp.texi: Mention the module 'mkdtemp'.
119096         * doc/glibc-functions/rpmatch.texi: Mention the module 'rpmatch'.
119097         * doc/glibc-functions/stpcpy.texi: Mention the module 'stpcpy'.
119098         * doc/glibc-functions/stpncpy.texi: Mention the module 'stpncpy'.
119099         * doc/glibc-functions/strchrnul.texi: Mention the module 'strchrnul'.
119100         * doc/glibc-functions/strndup.texi: Mention the module 'strndup'.
119101         * doc/glibc-functions/strnlen.texi: Mention the module 'strnlen'.
119102         * doc/glibc-functions/strsep.texi: Mention the module 'strsep'.
119103         * doc/glibc-functions/timegm.texi: Mention the module 'timegm'.
119104         * doc/glibc-functions/vasprintf.texi: Mention the module 'vasprintf'.
119106 2008-10-17  Bruno Haible  <bruno@clisp.org>
119108         * m4/signbit.m4 (gl_SIGNBIT_TEST_PROGRAM): On platforms other than
119109         HP-UX and IRIX, use -0.0L.
119110         * tests/test-ceill.c (minus_zero): Likewise.
119111         * tests/test-floorl.c (minus_zero): Likewise.
119112         * tests/test-frexpl.c (minus_zero): Likewise.
119113         * tests/test-isnan.c (minus_zerol): Likewise.
119114         * tests/test-isnanl.h (minus_zero): Likewise.
119115         * tests/test-ldexpl.c (minus_zero): Likewise.
119116         * tests/test-roundl.c (minus_zero): Likewise.
119117         * tests/test-signbit.c (minus_zerol): Likewise.
119118         * tests/test-snprintf-posix.h (minus_zerol): Likewise.
119119         * tests/test-sprintf-posix.h (minus_zerol): Likewise.
119120         * tests/test-truncl.c (minus_zero): Likewise.
119121         * tests/test-vasnprintf-posix.c (minus_zerol): Likewise.
119122         * tests/test-vasprintf-posix.c (minus_zerol): Likewise.
119123         Reported by Markus Armbruster <armbru@redhat.com> via Jim Meyering
119124         and by Nelson H. F. Beebe <beebe@math.utah.edu> via Eric Blake.
119126 2008-10-17  Bruno Haible  <bruno@clisp.org>
119128         Avoid gcc warnings because of #pragma GCC system_header on older gcc.
119129         * lib/arpa_inet.in.h: Encloses reference to PRAGMA_SYSTEM_HEADER so
119130         that it gets activated only for gcc >= 3.0.
119131         * lib/dirent.in.h: Likewise.
119132         * lib/errno.in.h: Likewise.
119133         * lib/fcntl.in.h: Likewise.
119134         * lib/float.in.h: Likewise.
119135         * lib/iconv.in.h: Likewise.
119136         * lib/inttypes.in.h: Likewise.
119137         * lib/locale.in.h: Likewise.
119138         * lib/math.in.h: Likewise.
119139         * lib/netdb.in.h: Likewise.
119140         * lib/netinet_in.in.h: Likewise.
119141         * lib/search.in.h: Likewise.
119142         * lib/signal.in.h: Likewise.
119143         * lib/spawn.in.h: Likewise.
119144         * lib/stdarg.in.h: Likewise.
119145         * lib/stdint.in.h: Likewise.
119146         * lib/stdio.in.h: Likewise.
119147         * lib/stdlib.in.h: Likewise.
119148         * lib/string.in.h: Likewise.
119149         * lib/strings.in.h: Likewise.
119150         * lib/sys_file.in.h: Likewise.
119151         * lib/sys_ioctl.in.h: Likewise.
119152         * lib/sys_select.in.h: Likewise.
119153         * lib/sys_socket.in.h: Likewise.
119154         * lib/sys_stat.in.h: Likewise.
119155         * lib/sys_time.in.h: Likewise.
119156         * lib/sysexits.in.h: Likewise.
119157         * lib/time.in.h: Likewise.
119158         * lib/unistd.in.h: Likewise.
119159         * lib/wchar.in.h: Likewise.
119160         * lib/wctype.in.h: Likewise.
119161         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
119163 2008-10-17  Jim Meyering  <meyering@redhat.com>
119165         ignore-value: don't depend on inline module
119166         * modules/ignore-value (Depends-on): Remove 'inline'.
119167         (configure.ac): Instead, add AC_REQUIRE([AC_C_INLINE]) here.
119168         Suggestion from Bruno Haible.
119170 2008-10-17  Bruno Haible  <bruno@clisp.org>
119172         New implementation of condition variables for Win32.
119173         * lib/glthread/cond.h (struct gl_waitqueue_link): New type.
119174         (gl_linked_waitqueue_t): New type.
119175         (gl_cond_t): Use it.
119176         * lib/glthread/cond.c (struct gl_waitqueue_element): New type.
119177         (gl_waitqueue_init, gl_waitqueue_add, gl_waitqueue_remove,
119178         gl_waitqueue_notify_first, gl_waitqueue_notify_all): New functions.
119179         (glthread_cond_init_func, glthread_cond_wait_func,
119180         glthread_cond_timedwait_func, glthread_cond_signal_func,
119181         glthread_cond_broadcast_func, glthread_cond_destroy_func):
119182         Reimplemented on the basis of gl_linked_waitqueue_t.
119183         * lib/glthread/lock.h (gl_carray_waitqueue_t): Renamed from
119184         gl_waitqueue_t.
119185         (gl_rwlock_t): Update.
119186         * lib/glthread/lock.c (gl_waitqueue_t): Alias to gl_carray_waitqueue_t.
119188 2008-10-17  Simon Josefsson  <simon@josefsson.org>
119190         * modules/recvfrom (Depends-on): Add dependency on getpeername.
119191         Reported by Yoann Vandoorselaere <yoann@prelude-ids.org>.
119193 2008-10-17  Jim Meyering  <meyering@redhat.com>
119195         ignore-value: new module
119196         * modules/ignore-value: New file.
119197         * lib/ignore-value.h: New file.
119198         * MODULES.html.sh (Compiler warning management): New section,
119199         just for this module.  More to come.
119201 2008-10-16  Paul Eggert  <eggert@cs.ucla.edu>
119203         open-safer.c: avoid 'signed and unsigned in conditional...' warning
119204         * lib/open-safer.c (open_safer): Use an "if/else" statement in place
119205         of the ternary operator.  Reported by Reuben Thomas <rrt@sc3d.org>.
119207 2008-10-16  Jim Meyering  <meyering@redhat.com>
119209         openat-die.c: avoid 'no previous prototype' warning
119210         * lib/openat-die.c: Include "openat.h".
119211         Reported by Reuben Thomas <rrt@sc3d.org>.
119213 2008-10-16  Simon Josefsson  <simon@josefsson.org>
119215         * m4/netdb_h.m4: Assume that if netdb.h exists, it works.
119216         * lib/netdb.in.h: Fix typo.
119217         Reported by Bruno Haible  <bruno@clisp.org>
119219         * lib/netdb.in.h: Include sys/socket.h for platforms without
119220         netdb.h, to get structures like hostent on MinGW.
119221         * modules/netdb (Depends-on): Add sys_socket.
119223 2008-10-15  Simon Josefsson  <simon@josefsson.org>
119225         * modules/netdb, modules/netdb-tests: New file.
119226         * m4/netdb_h.m4: New file.
119227         * lib/netdb.in.h: Add, currently just an empty file pending
119228         definitions.
119229         * tests/test-netdb.c: New file.
119230         * doc/posix-headers/netdb.texi: Mention that we replace it if
119231         needed.
119232         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
119233         netdb.
119235 2008-10-15  Simon Josefsson  <simon@josefsson.org>
119237         * doc/gnulib.texi (Getaddrinfo and WINVER): Sync documentation
119238         with code.
119240 2008-10-13  Bruno Haible  <bruno@clisp.org>
119242         * lib/glthread/cond.c (glthread_cond_wait_func,
119243         glthread_cond_timedwait_func): Add a comment.
119245 2008-10-13  Yoann Vandoorselaere  <yoann@prelude-ids.org>
119247         * tests/test-poll.c: Include <sys/ioctl.h>, for ioctl().
119248         * tests/test-select.c: Likewise,
119250 2008-10-13  Bruno Haible  <bruno@clisp.org>
119252         * lib/glthread/cond.c (glthread_cond_wait_func,
119253         glthread_cond_timedwait_func): Fix variable name.
119254         Reported by Yoann Vandoorselaere <yoann@prelude-ids.org>.
119256 2008-10-13  Paolo Bonzini  <bonzini@gnu.org>
119258         fix getaddrinfo emulation for systems with struct sockaddr.sa_len
119259         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Detect
119260         struct sockaddr.sa_len.
119261         * lib/getaddrinfo.c (getaddrinfo): Set it if appropriate.
119263 2008-10-13  Simon Josefsson  <simon@josefsson.org>
119265         * build-aux/pmccabe2html: Add css and css_url parameters.
119267 2008-10-12  Bruno Haible  <bruno@clisp.org>
119269         * tests/test-sameacls.c (main) [AIX]: Clear type argument before
119270         calling aclx_get.
119271         Reported by Rainer Tammer <tammer@tammer.net>.
119273 2008-10-12  Bruno Haible  <bruno@clisp.org>
119275         Use msvcrt aware primitives for creation/termination of Win32 threads.
119276         * lib/glthread/thread.c: Include <process.h>.
119277         (glthread_create_func): Use _beginthreadex instead of CreateThread.
119278         (wrapper_func): Update signature.
119279         (gl_thread_exit_func): Use _endthreadex instead of EndThread.
119281 2008-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
119282             Bruno Haible  <bruno@clisp.org>
119284         Provide a Win32 implementation of the 'cond' module.
119285         * lib/glthread/cond.h [USE_WIN32]: New implementation.
119286         * lib/glthread/cond.c (glthread_cond_init_func,
119287         glthread_cond_wait_func, glthread_cond_timedwait_func,
119288         glthread_cond_signal_func, glthread_cond_broadcast_func,
119289         glthread_cond_destroy_func) [USE_WIN32]: New functions.
119290         * modules/cond (Dependencies): Add gettimeofday.
119292 2008-10-11  Bruno Haible  <bruno@clisp.org>
119294         Make sleep work on older versions of mingw.
119295         * m4/sleep.m4 (gl_FUNC_SLEEP): Test whether 'sleep' is declared, not
119296         only whether it exists.
119297         * doc/posix-functions/sleep.texi: Mention the problem with older
119298         versions of mingw.
119300 2008-10-11  Bruno Haible  <bruno@clisp.org>
119302         New module 'shutdown'.
119303         * modules/shutdown: New file.
119304         * lib/sys_socket.in.h (shutdown): New declaration.
119305         * lib/winsock.c (shutdown): New function.
119306         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_H_DEFAULTS): Initialize
119307         GNULIB_SHUTDOWN.
119308         * modules/sys_socket (Makefile.am): Substitute GNULIB_SHUTDOWN.
119309         * doc/posix-functions/shutdown.texi: Document the new module.
119311 2008-10-11  Jim Meyering  <meyering@redhat.com>
119313         * lib/fclose.c: Fix typo in comment: s/close/fclose/.
119315 2008-10-11  Bruno Haible  <bruno@clisp.org>
119317         New module 'fclose'.
119318         * modules/fclose: New file.
119319         * lib/stdio.in.h (fclose): New declaration.
119320         * lib/fclose.c: New file.
119321         * m4/fclose.m4: New file.
119322         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize GNULIB_FCLOSE,
119323         REPLACE_FCLOSE.
119324         * m4/close.m4 (gl_REPLACE_CLOSE): Invoke gl_REPLACE_FCLOSE.
119325         * modules/stdio (Makefile.am): Substitute GNULIB_FCLOSE,
119326         REPLACE_FCLOSE.
119327         * modules/close (Depends-on): fclose.
119328         * doc/posix-functions/fclose.texi: Mention the problem on Windows.
119330 2008-10-11  Bruno Haible  <bruno@clisp.org>
119332         * lib/winsock.c (_gl_close_fd_maybe_socket): If closesocket fails,
119333         set errno and don't call _close.
119335 2008-10-10  Bruno Haible  <bruno@clisp.org>
119337         * lib/copy-acl.c (qcopy_acl) [CYGWIN]: Call chmod before setting the
119338         ACL, not afterwards. Fixes test failure on Cygwin.
119340 2008-10-09  Ben Pfaff  <blp@gnu.org>
119342         * build-aux/announce-gen: Fix gnulib version related part of usage
119343         message.  Die with a useful error message if no tarballs are
119344         found.
119346 2008-10-10  Jim Meyering  <meyering@redhat.com>
119348         bootstrap: use git's --depth=N option only if it's supported
119349         * build-aux/bootstrap: Work with git-1.4.4.4, which does not
119350         recognize the --depth option.  Reported by Pádraig Brady.
119352 2008-10-09  Bruno Haible  <bruno@clisp.org>
119354         New module 'ioctl'.
119355         * modules/ioctl: New file.
119356         * lib/sys_socket.in.h (ioctl): Remove declaration.
119357         * lib/winsock.c: Include <sys/ioctl.h>.
119358         (rpl_ioctl): Define only of the gnulib module 'ioctl' is present.
119359         * m4/sys_socket_h.m4 (gl_PREREQ_SYS_H_WINSOCK2): Require
119360         gl_SYS_IOCTL_H_DEFAULTS. Set also SYS_IOCTL_H_HAVE_WINSOCK2_H.
119361         * modules/sys_socket (Files): Add m4/sys_ioctl_h.m4.
119362         * doc/posix-functions/ioctl.texi: Mention the new module.
119364 2008-10-09  Bruno Haible  <bruno@clisp.org>
119366         New module 'sys_ioctl'.
119367         * lib/sys_ioctl.in.h: New file.
119368         * m4/sys_ioctl_h.m4: New file.
119369         * modules/sys_ioctl: New file.
119370         * doc/glibc-headers/sys_ioctl.texi: Mention the new module.
119372 2008-10-09  Bruno Haible  <bruno@clisp.org>
119374         * lib/sys_socket.in.h (ioctl): Make signature POSIX compliant.
119375         * lib/winsock.c: Include <stdarg.h>.
119376         (rpl_ioctl): Change to second argument 'int' and then varargs.
119378 2008-10-09  Bruno Haible  <bruno@clisp.org>
119380         * m4/close.m4 (gl_FUNC_CLOSE): Arrange to replace the close() function
119381         when the sys_socket module is present and the system has <winsock2.h>.
119383 2008-10-09  Bruno Haible  <bruno@clisp.org>
119385         * doc/posix-functions/close.texi: Mention module 'close' instead of
119386         module 'sys_socket'.
119388 2008-10-09  Bruno Haible  <bruno@clisp.org>
119390         * doc/glibc-headers/sys_ioctl.texi: New file.
119391         * doc/gnulib.texi: Include it.
119393 2008-10-09  Paolo Bonzini  <bonzini@gnu.org>
119394             Bruno Haible  <bruno@clisp.org>
119396         Combine the two replacements of 'close'.
119397         * lib/sys_socket.in.h (close): Define to a reminder to include
119398         <unistd.h>.
119399         (_gl_close_fd_maybe_socket): New declaration.
119400         (HAVE__GL_CLOSE_FD_MAYBE_SOCKET): New macro.
119401         * lib/winsock.c (close): Remove undefinition.
119402         (_gl_close_fd_maybe_socket): Renamed from rpl_close. Define only when
119403         needed for the gnulib module 'close'.
119404         * lib/unistd.in.h (close): If the gnulib module 'close' is not used,
119405         define to an error symbol or to a warning, if suitable.
119406         * lib/close.c: Include <sys/socket.h>.
119407         (rpl_close): Invoke _gl_close_fd_maybe_socket when gnulib defines it.
119408         * m4/sys_socket_h.m4 (gl_PREREQ_SYS_H_WINSOCK2): Set also
119409         UNISTD_H_HAVE_WINSOCK2_H.
119410         (gl_SYS_SOCKET_H_DEFAULTS): Require gl_UNISTD_H_DEFAULTS.
119411         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
119412         UNISTD_H_HAVE_WINSOCK2_H.
119413         * modules/sys_socket (Files): Add m4/unistd_h.m4.
119414         (configure.ac): Set a module indicator.
119415         (Makefile.am): Substitute GNULIB_CLOSE.
119416         * modules/unistd (Makefile.am): Substitute UNISTD_H_HAVE_WINSOCK2_H.
119417         * modules/poll-tests (Depends-on): Add close.
119418         * modules/select-tests (Depends-on): Likewise.
119420 2008-10-09  Paolo Bonzini  <bonzini@gnu.org>
119421             Bruno Haible  <bruno@clisp.org>
119423         New module 'close'.
119424         * modules/close: New file.
119425         * lib/unistd.in.h (close): Move declaration out of the
119426         FCHDIR_REPLACEMENT scope.
119427         (_gl_unregister_fd): New declaration.
119428         * lib/close.c: New file.
119429         * lib/fchdir.c (rpl_close): Remove function.
119430         * m4/close.m4: New file.
119431         * m4/fchdir.m4 (gl_FUNC_FCHDIR): When replacing fchdir, also replace
119432         close.
119433         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_CLOSE and
119434         REPLACE_CLOSE.
119435         * modules/unistd (Makefile.am): Substitute GNULIB_CLOSE and
119436         REPLACE_CLOSE.
119437         * modules/fchdir (Depends-on): Add close.
119439 2008-10-09  Paolo Bonzini  <bonzini@gnu.org>
119440             Bruno Haible  <bruno@clisp.org>
119442         * lib/fcntl.in.h (open): Simplify conditionals.
119443         (_gl_register_fd): New declaration.
119444         * lib/fchdir.c (rpl_open): Remove function.
119445         * lib/open.c: When FCHDIR_REPLACEMENT is defined, compile the file
119446         also.
119447         (open): When FCHDIR_REPLACEMENT is defined, invoke _gl_register_fd.
119448         * m4/fchdir.m4 (gl_FUNC_FCHDIR): When replacing fchdir, also replace
119449         open.
119451 2008-10-09  Jim Meyering  <meyering@redhat.com>
119453         GNUmakefile: use the more name-space-friendly "_version"
119454         * top/GNUmakefile (_dummy): Update.
119455         (_version): Rename from "version".
119457 2008-10-09  Paolo Bonzini  <bonzini@gnu.org>
119458             Bruno Haible  <bruno@clisp.org>
119460         * lib/fchdir.c (_gl_unregister_fd): New functions, extracted from
119461         rpl_close.
119462         (_gl_register_fd): New function, extracted from rpl_open.
119463         (rpl_close, rpl_closedir): Use _gl_unregister_fd.
119464         (rpl_open, rpl_opendir): Use _gl_register_fd.
119466 2008-10-09  Paolo Bonzini  <bonzini@gnu.org>
119468         Fix organization of 'open' replacement.
119469         * m4/open.m4 (gl_REPLACE_OPEN): New macro.
119470         (gl_FUNC_OPEN): Use it.
119471         (gl_PREREQ_OPEN): Add a : to make the body non-empty.
119473 2008-10-08  Bruno Haible  <bruno@clisp.org>
119475         * modules/getdate-tests (test_getdata_LDADD): Add LIBINTL.
119477 2008-10-08  Simon Josefsson  <simon@josefsson.org>
119479         * m4/sys_socket_h.m4: Don't AC_LIBOBJ(winsock).  The file is
119480         AC_LIBOBJ'ed by each gnulib module that needs it (e.g., socket,
119481         listen).
119483 2008-10-08  Eric Blake  <ebb9@byu.net>
119485         GNUmakefile: add 'make version' target
119486         * top/GNUmakefile (_curr-ver): Split version update rules...
119487         (version): ...into a target.
119489 2008-10-07  Bruno Haible  <bruno@clisp.org>
119491         Use a more portable replacement expression for -0.0L.
119492         * m4/signbit.m4 (gl_SIGNBIT_TEST_PROGRAM): Use -LDBL_MIN * LDBL_MIN
119493         instead of -0.0L. Fix m4 quotation.
119495         * tests/test-signbit.c: Include <float.h>.
119496         (minus_zero): New variable.
119497         (test_signbitl): Use minus_zero instead of -zero.
119498         * modules/signbit-tests (Depends-on): Add float.
119500         * tests/test-ceill.c: Include <float.h>.
119501         (zero): Remove variable.
119502         (minus_zero): New variable.
119503         (main): Use minus_zero instead of -zero.
119504         * modules/ceill-tests (Depends-on): Add float.
119506         * tests/test-floorl.c: Include <float.h>.
119507         (zero): Remove variable.
119508         (minus_zero): New variable.
119509         (main): Use minus_zero instead of -zero.
119510         * modules/floorl-tests (Depends-on): Add float.
119512         * tests/test-roundl.c: Include <float.h>.
119513         (zero): Remove variable.
119514         (minus_zero): New variable.
119515         (main): Use minus_zero instead of -zero.
119516         * modules/roundl-tests (Depends-on): Add float.
119518         * tests/test-truncl.c: Include <float.h>.
119519         (zero): Remove variable.
119520         (minus_zero): New variable.
119521         (main): Use minus_zero instead of -zero.
119522         * modules/truncl-tests (Depends-on): Add float.
119524         * tests/test-frexpl.c (zero): Remove variable.
119525         (minus_zero): New variable.
119526         (main): Use minus_zero instead of -zero.
119527         * modules/frexpl-tests (Depends-on): Add float.
119529         * tests/test-isnan.c (zerol): Remove variable.
119530         (minus_zerol): New variable.
119531         (test_long_double): Use minus_zerol instead of -zerol.
119532         * modules/isnan-tests (Depends-on): Add float.
119534         * tests/test-isnanl.h (zero): Remove variable.
119535         (minus_zero): New variable.
119536         (main): Use minus_zero instead of -zero.
119537         * modules/isnanl-nolibm-tests (Depends-on): Add float.
119538         * modules/isnanl-tests (Depends-on): Add float.
119540         * tests/test-ldexpl.c (zero): Remove variable.
119541         (minus_zero): New variable.
119542         (main): Use minus_zero instead of -zero.
119543         * modules/ldexpl-tests (Depends-on): Add float.
119545         * tests/test-snprintf-posix.h (zerol): Remove variable.
119546         (minus_zerol): New variable.
119547         (test_function): Use minus_zerol instead of -zerol.
119548         * modules/snprintf-posix-tests (Depends-on): Add float.
119549         * modules/vsnprintf-posix-tests (Depends-on): Add float.
119551         * tests/test-sprintf-posix.h (zerol): Remove variable.
119552         (minus_zerol): New variable.
119553         (test_function): Use minus_zerol instead of -zerol.
119554         * modules/sprintf-posix-tests (Depends-on): Add float.
119555         * modules/vsprintf-posix-tests (Depends-on): Add float.
119557         * tests/test-vasnprintf-posix.c (zerol): Remove variable.
119558         (minus_zerol): New variable.
119559         (test_function): Use minus_zerol instead of -zerol.
119560         * modules/vasnprintf-posix-tests (Depends-on): Add float.
119562         * tests/test-vasprintf-posix.c (zerol): Remove variable.
119563         (minus_zerol): New variable.
119564         (test_function): Use minus_zerol instead of -zerol.
119565         * modules/vasprintf-posix-tests (Depends-on): Add float.
119567 2008-10-07  Simon Josefsson  <simon@josefsson.org>
119569         * MODULES.html.sh (Support for building documentation): Mention
119570         pmccabe2html.  Sort entries.
119572         Add pmccabe2html module, from gnupdf.
119573         * build-aux/pmccabe.css: New file.
119574         * build-aux/pmccabe2html: New file.
119575         * m4/pmccabe2html.m4: New file.
119576         * modules/pmccabe2html: New file.
119578 2008-10-07  Richard W.M. Jones  <rjones@redhat.com>
119580         flock: new module
119581         * MODULES.html.sh: Add to list of modules.
119582         * lib/flock.c: flock implementation for Windows and Unix systems
119583         which have fcntl.
119584         * doc/glibc-functions/flock.texi: Update documentation.
119585         * lib/sys_file.in.h: <sys/file.h> header file.
119586         * m4/flock.m4: M4 macros.
119587         * m4/sys_file_h.m4: M4 macros for replacement sys/file.h.
119588         * modules/flock: flock module.
119589         * modules/flock-tests: flock tests module.
119590         * modules/sys_file: sys/file.h module.
119591         * tests/test-flock.c: test suite for flock.
119593 2008-10-06  Jim Meyering  <meyering@redhat.com>
119595         bootstrap: check for LT_INIT more portably still ;-)
119596         * build-aux/bootstrap: Don't rely on \>, since it's not portable.
119597         Spotted by Bruno Haible.
119599 2008-10-06  Eric Blake  <ebb9@byu.net>
119601         test-signbit: avoid tripping Irix cc bug on -0.0L
119602         * tests/test-signbit.c (minus_zerol): Delete, and replace with
119603         '-zerol'.  This may break on HP-UX/hppa, but at least makes the
119604         entire testsuite consistent and avoids an Irix 6.2 bug.
119606 2008-10-05  Bruno Haible  <bruno@clisp.org>
119607             Jim Meyering  <jim@meyering.net>
119609         Add an option for ignoring EPIPE during close_stdout.
119610         * lib/closeout.h: Include <stdbool.h>.
119611         (close_stdout_set_ignore_EPIPE): New declaration.
119612         * lib/closeout.c: Include <stdbool.h>.
119613         (ignore_EPIPE): New variable.
119614         (close_stdout_set_ignore_EPIPE): New function.
119615         (close_stdout): Ignore EPIPE error if ignore_EPIPE is set.
119616         * lib/close-stream.c (close_stream): Mention the possible EPIPE
119617         failure.
119618         * modules/closeout (Depends-on): Add stdbool.
119620 2008-10-05  Bruno Haible  <bruno@clisp.org>
119622         * modules/accept: New file.
119623         * modules/bind: New file.
119624         * modules/connect: New file.
119625         * modules/getpeername: New file.
119626         * modules/getsockname: New file.
119627         * modules/getsockopt: New file.
119628         * modules/listen: New file.
119629         * modules/recv: New file.
119630         * modules/recvfrom: New file.
119631         * modules/send: New file.
119632         * modules/sendto: New file.
119633         * modules/setsockopt: New file.
119634         * modules/socket: New file.
119635         * lib/sys_socket.in.h: Include the GL_LINK_WARNING definition.
119636         (socket, connect, accept, bind, getpeername, getsockname, getsockopt,
119637         listen, recv, send, recvfrom, sendto, setsockopt): Declare only when
119638         the particular module is requested. Add a link warning when the
119639         particular module is not requested.
119640         * lib/winsock.c (rpl_socket, rpl_connect, rpl_accept, rpl_bind,
119641         rpl_getpeername, rpl_getsockname, rpl_getsockopt, rpl_listen, rpl_recv,
119642         rpl_send, rpl_recvfrom, rpl_sendto, rpl_setsockopt): Define only when
119643         the particular module is requested.
119644         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_MODULE_INDICATOR,
119645         gl_SYS_SOCKET_H_DEFAULTS): New macros.
119646         (gl_HEADER_SYS_SOCKET): Require gl_SYS_SOCKET_H_DEFAULTS.
119647         * modules/sys_socket (Depends-on): Add link-warning.
119648         (Makeifle.am): Substitute GNULIB_SOCKET, GNULIB_CONNECT, GNULIB_ACCEPT,
119649         GNULIB_BIND, GNULIB_GETPEERNAME, GNULIB_GETSOCKNAME, GNULIB_GETSOCKOPT,
119650         GNULIB_LISTEN, GNULIB_RECV, GNULIB_SEND, GNULIB_RECVFROM,
119651         GNULIB_SENDTO, GNULIB_SETSOCKOPT, and the definition of
119652         GL_LINK_WARNING.
119653         * doc/posix-functions/accept.texi: Mention the new module 'accept'.
119654         * doc/posix-functions/bind.texi: Mention the new module 'bind'.
119655         * doc/posix-functions/connect.texi: Mention the new module 'connect'.
119656         * doc/posix-functions/getpeername.texi: Mention the new module
119657         'getpeername'.
119658         * doc/posix-functions/getsockname.texi: Mention the new module
119659         'getsockname'.
119660         * doc/posix-functions/getsockopt.texi: Mention the new module
119661         'getsockopt'.
119662         * doc/posix-functions/listen.texi: Mention the new module 'listen'.
119663         * doc/posix-functions/recv.texi: Mention the new module 'recv'.
119664         * doc/posix-functions/recvfrom.texi: Mention the new module 'recvfrom'.
119665         * doc/posix-functions/send.texi: Mention the new module 'send'.
119666         * doc/posix-functions/sendto.texi: Mention the new module 'sendto'.
119667         * doc/posix-functions/setsockopt.texi: Mention the new module
119668         'setsockopt'.
119669         * doc/posix-functions/socket.texi: Mention the new module 'socket'.
119670         * modules/poll-tests (Depends-on): Add socket, bind, getsockopt,
119671         listen, connect, accept.
119672         * modules/select-tests (Depends-on): Likewise.
119674 2008-10-05  Bruno Haible  <bruno@clisp.org>
119676         * lib/winsock.c (strerror): Remove unused #undef.
119677         (rpl_close): Remove unused local variable.
119679         * modules/sys_socket (Depends-on); Add errno.
119681 2008-10-05  Bruno Haible  <bruno@clisp.org>
119683         * lib/sys_select.in.h: Include the GL_LINK_WARNING definition.
119684         (select): Add a link warning when the 'select' module is not used.
119685         * modules/sys_select (Depends-on): Add link-warning.
119686         (Makefile.am): Substitute the definition of GL_LINK_WARNING.
119687         Suggested by Paolo Bonzini.
119689 2008-10-05  Jim Meyering  <meyering@redhat.com>
119691         bootstrap: check for LT_INIT more portably
119692         * build-aux/bootstrap: Avoid using grep -E, since it's not
119693         portable enough.  Suggestion from Bruno Haible.
119695 2008-10-05  Bruno Haible  <bruno@clisp.org>
119697         * doc/posix-headers/sys_select.texi: Mention 'struct timeval' problem
119698         as being fixed by gnulib.
119700 2008-10-05  Bruno Haible  <bruno@clisp.org>
119702         * modules/select-tests: New file, mostly copied from
119703         modules/sys_select-tests.
119704         * tests/test-select.c: New file, mostly copied from
119705         tests/test-sys_select.c.
119706         * tests/test-sys_select.c: Move most of the code to tests/test-select.c.
119707         * modules/sys_select-tests (Depends-on): Remove all dependencies.
119708         (Makefile.am): Remove test_sys_select_LDADD.
119710         * lib/sys_select.in.h (select): If GNULIB_SELECT is not set, define it
119711         to an undefined symbol, for an error message.
119712         * m4/sys_select_h.m4 (gl_SYS_SELECT_MODULE_INDICATOR): New macro.
119713         (gl_SYS_SELECT_H_DEFAULTS): New macro.
119714         (gl_HEADER_SYS_SELECT): Require it. Don't require compilation of
119715         winsock-select.c here.
119716         * modules/sys_select (Files): Remove lib/winsock-select.c.
119717         (Depends-on): Remove alloca.
119718         (Makefile.am): Substitute GNULIB_SELECT.
119719         * modules/select: New file.
119720         * doc/posix-functions/select.texi: Update.
119722 2008-10-05  Bruno Haible  <bruno@clisp.org>
119724         * lib/spawn_faction_addclose.c (__sysconf): Use getdtablesize always.
119725         * lib/spawn_faction_adddup2.c (__sysconf): Likewise.
119726         * lib/spawn_faction_addopen.c (__sysconf): Likewise.
119727         * modules/posix_spawn_file_actions_addclose (Depends-on): Add
119728         getdtablesize.
119729         * modules/posix_spawn_file_actions_adddup2 (Depends-on): Likewise.
119730         * modules/posix_spawn_file_actions_addopen (Depends-on): Likewise.
119732 2008-10-05  Bruno Haible  <bruno@clisp.org>
119734         * modules/getdtablesize-tests: New file.
119735         * tests/test-getdtablesize.c: New file.
119737         New module 'getdtablesize'.
119738         * lib/unistd.in.h (getdtablesize): New declaration.
119739         * lib/getdtablesize.c: New file.
119740         * m4/getdtablesize.m4: New file.
119741         * modules/getdtablesize: New file.
119742         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
119743         GNULIB_GETDTABLESIZE, HAVE_GETDTABLESIZE.
119744         * modules/unistd (Makefile.am): Substitute GNULIB_GETDTABLESIZE,
119745         HAVE_GETDTABLESIZE.
119746         * doc/glibc-functions/getdtablesize.texi: Mention the new module.
119748 2008-10-05  Bruno Haible  <bruno@clisp.org>
119750         * modules/sched (Makefile.am): Fix typo.
119751         Reported by Simon Josefsson.
119753 2008-10-05  Jim Meyering  <meyering@redhat.com>
119755         bootstrap: check for LT_INIT, too
119756         * build-aux/bootstrap: Both AC_PROG_LIBTOOL and AM_PROG_LIBTOOL
119757         are deprecated.  Suggestion from Ralf Wildenhues.
119759 2008-10-05  Bruno Haible  <bruno@clisp.org>
119761         * lib/spawn.in.h (POSIX_SPAWN_*): Use the system's values, rather than
119762         overriding them by ours.
119763         (POSIX_SPAWN_USEVFORK): Use the next free bit position.
119765 2008-10-05  Jim Meyering  <meyering@redhat.com>
119767         bootstrap: check for AC_PROG_LIBTOOL as well as AM_PROG_LIBTOOL
119768         * build-aux/bootstrap: Check for AC_PROG_LIBTOOL, as well as the
119769         obsolete AM_PROG_LIBTOOL.  Spotted by Debarshi Ray <rishi@gnu.org>.
119771 2008-10-04  Bruno Haible  <bruno@clisp.org>
119773         * modules/dup2 (License): Change to LGPLv2+.
119774         * modules/sleep (License): Likewise.
119775         * modules/perror (License): Likewise.
119776         * modules/fopen (License): Change to LGPLv2+, with approval by Eric
119777         Blake.
119778         * modules/signal (License): Likewise.
119779         * modules/sigprocmask (License): Likewise.
119780         * modules/raise (License): Change to LGPLv2+, with approval by Jim
119781         Meyering.
119783 2008-10-04  Bruno Haible  <bruno@clisp.org>
119785         * lib/spawn.in.h (POSIX_SPAWN_*): Undefine before redefining.
119786         Reported by Rainer Tammer <tammer@tammer.net>.
119788 2008-10-03  Paolo Bonzini  <bonzini@gnu.org>
119789             Bruno Haible  <bruno@clisp.org>
119791         * lib/errno.in.h (EWOULDBLOCK) [win32]: Define to EAGAIN.
119792         * lib/winsock.c (set_winsock_errno): Map WSAEWOULDBLOCK to EWOULDBLOCK.
119793         * lib/strerror.c (rpl_strerror): Remove error string for EWOULDBLOCK.
119795 2008-10-03  Kamil Dudka  <kdudka@redhat.com>
119797         filevercmp: new module
119798         * lib/filevercmp.h: New function filevercmp comparing version strings.
119799         * lib/filevercmp.c: Implementation of filevercmp function.
119800         * modules/filevercmp: Module metadata.
119801         * tests/test-filevercmp.c: Unit test for new module.
119802         * modules/filevercmp-tests: Unit test metadata.
119803         * MODULES.html.sh: Add filevercmp module.
119805 2008-10-03  Bruno Haible  <bruno@clisp.org>
119807         * lib/c-ctype.h: Add comment.
119808         Reported by Jim Meyering.
119810 2008-10-02  Bruno Haible  <bruno@clisp.org>
119812         * modules/posix_spawn-internal (Depends-on): Add 'open'.
119814 2008-10-02  Paolo Bonzini  <bonzini@gnu.org>
119816         * build-aux/bootstrap: Allow renaming bootstrap, and change the
119817         name of bootstrap.conf accordingly.
119819 2008-10-02  Paolo Bonzini  <bonzini@gnu.org>
119821         * build-aux/bootstrap: Install git-merge-changelog configuration
119822         items into .gitconfig if needed.
119824 2008-10-02  Paolo Bonzini  <bonzini@gnu.org>
119826         * build-aux/bootstrap: Recognize `gnulib' being a submodule in a
119827         git repository, and initialize/update it accordingly.
119829 2008-10-02  Richard W.M. Jones  <rjones@redhat.com>
119831         * modules/fsync-tests: New file.
119832         * tests/test-fsync.c: New file.
119834         New module 'fsync'.
119835         * lib/fsync.c: New file.
119836         * m4/fsync.m4: New file.
119837         * modules/fsync: New file.
119838         * lib/unistd.in.h (fsync): New declaration.
119839         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Define and AC_SUBST both
119840         GNULIB_FSYNC and HAVE_FSYNC.
119841         * modules/unistd: Substitute GNULIB_FSYNC and HAVE_FSYNC.
119842         * MODULES.html.sh (posix_functions): Add fsync.
119843         * doc/posix-functions/fsync.texi: Mention the new module.
119845 2008-10-02  Jim Meyering  <meyering@redhat.com>
119847         fts.c: sync with similar code from coreutils' remove.c
119848         * lib/fts.c (dirent_inode_sort_may_be_useful): Merge from coreutils.
119849         Guard also with "#if defined __linux__", since for now at least,
119850         this code is Linux-kernel-specific.
119852 2008-10-02  Jim Meyering  <meyering@redhat.com>
119854         fts: bug fixes
119855         * lib/fts.c: Remove unnecessary "defined" in cpp directive.
119856         Include <sys/vfs.h>, not <sys/statfs.h>.
119858         * m4/fts.m4 (gl_FUNC_FTS_CORE): Fix typo s/vfs/vfs.h/.
119859         Include <sys/vfs.h>, not <sys/statfs.h>.
119861 2008-10-01  Bruno Haible  <bruno@clisp.org>
119863         Avoid the broken posix_spawn function on AIX 5.3 and 6.1.
119864         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): New macro.
119865         (gl_POSIX_SPAWN_BODY): Invoke it. Set REPLACE_POSIX_SPAWN if needed.
119866         * doc/posix-functions/posix_spawn.texi: Mention the AIX bugs.
119867         * doc/posix-functions/posix_spawnp.texi: Likewise.
119868         * m4/execute.m4 (gl_EXECUTE): Invoke gl_POSIX_SPAWN_WORKS, to check
119869         whether posix_spawn actually works.
119870         * m4/pipe.m4 (gl_PIPE): Likewise.
119871         * modules/execute (Files): Add m4/posix_spawn.m4.
119872         * modules/pipe (Files): Add m4/posix_spawn.m4.
119873         Reported and analyzed by Rainer Tammer <tammer@tammer.net>.
119875 2008-10-01  Jim Meyering  <meyering@redhat.com>
119877         remove trailing spaces
119878         * NEWS: Likewise.
119879         * lib/poll.c (poll): Likewise.
119880         * lib/sys_socket.in.h (SHUT_RDWR): Likewise.
119881         * lib/winsock.c (rpl_close): Likewise.
119882         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Likewise.
119883         * modules/yield: Likewise.
119884         * tests/test-poll.c (connect_to_socket, poll1): Likewise.
119885         * tests/test-sys_select.c (connect_to_socket): Likewise.
119887         fts.c: adjust a new interface to be more generally useful
119888         * lib/fts.c (dirent_inode_sort_may_be_useful): Take an FD parameter.
119889         (fts_build): Adjust caller.
119891 2008-09-30  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
119893         * modules/cond-tests: New file.
119894         * tests/test-cond.c: New file.
119896 2008-09-30  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
119897             Bruno Haible  <bruno@clisp.org>
119899         * modules/cond (Dependencies): Add errno, time.
119900         * lib/glthread/cond.h: Include <time.h>.
119901         (gl_cond_define, gl_cond_define_initialized): Use the same definition
119902         across platforms.
119904 2008-09-30  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
119905             Bruno Haible  <bruno@clisp.org>
119907         * m4/thread.m4 (gl_THREAD): Fix detection of pthread_atfork function.
119909 2008-09-30  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
119910             Bruno Haible  <bruno@clisp.org>
119912         * modules/tls-tests (Depends-on): Add thread, yield.
119913         (configure.ac): Remove all checks.
119914         (test_tls_LDADD): Use YIELD_LIB instead of LIBSCHED.
119915         * tests/test-tls.c (gl_thread_t, gl_thread_join, gl_thread_yield,
119916         gl_thread_self): Remove definitions. Include glthread/thread.h and
119917         glthread/yield.h instead.
119918         (test_tls): Pass an additional NULL argument to gl_thread_join.
119920 2008-09-30  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
119921             Bruno Haible  <bruno@clisp.org>
119923         * modules/lock-tests (Depends-on): Add thread, yield.
119924         (configure.ac): Remove all checks.
119925         (test_lock_LDADD): Use YIELD_LIB instead of LIBSCHED.
119926         * tests/test-lock.c (gl_thread_t, gl_thread_join, gl_thread_yield,
119927         gl_thread_self): Remove definitions. Include glthread/thread.h and
119928         glthread/yield.h instead.
119929         (test_lock, test_rwlock, test_recursive_lock, test_once): Pass an
119930         additional NULL argument to gl_thread_join.
119932 2008-09-30  Bruno Haible  <bruno@clisp.org>
119934         Fix the Win32 implementation of the 'thread' module.
119935         * lib/glthread/thread.h [USE_WIN32_THREADS] (gl_thread_t): Change to a
119936         pointer type.
119937         (gl_thread_self): Invoke gl_thread_self_func.
119938         (gl_thread_self_func): New declaration.
119939         * lib/glthread/thread.c [USE_WIN32_THREADS] (self_key): New variable.
119940         (do_init_self_key, init_self_key): New functions.
119941         (struct gl_thread_struct): Renamed from 'struct thread_extra'.
119942         Remove some fields.
119943         (running_threads, running_lock): Remove variables.
119944         (get_current_thread_handle): New function.
119945         (gl_thread_self_func, wrapper_func, glthread_create_func,
119946         glthread_join_func, gl_thread_exit_func): Largely rewritten and
119947         simplified.
119949 2008-09-30  Bruno Haible  <bruno@clisp.org>
119951         * lib/winsock-select.c (win32_poll_handle): Add shortcut for regular
119952         files.
119954 2008-09-30  Jim Meyering  <meyering@redhat.com>
119956         fts.m4: correct the test for statfs.f_type
119957         * m4/fts.m4 (gl_FUNC_FTS_CORE): Include <sys/statfs.h>
119958         when checking for statfs.f_type.
119960 2008-09-15  Simon Josefsson  <simon@josefsson.org>
119962         tests: avoid some compiler warnings
119963         * tests/test-memchr.c (main): Pass NULL indirectly.
119964         * tests/test-getdate.c (main): Remove unused variable 'ret'.
119966 2008-09-29  Ondřej Vašík  <ovasik@redhat.com>
119968         getdate.y: disallow countable dayshifts like "4 yesterday ago"
119969         * lib/getdate.y (relative_time_table) [tDAY_SHIFT]: New type for
119970         exactly specified dayshifts.
119971         (dayshift): New rule.
119972         (rel): Add dayshift.
119973         (relative_time_table) [tomorrow, yesterday, today, now]:
119974         Use tDAY_SHIFT in place of tDAY_UNIT.
119975         * tests/test-getdate.c: Add tests for now-disallowed countable
119976         dayshifts, e.g., "4 yesterday ago".
119978 2008-09-29  Bruno Haible  <bruno@clisp.org>
119980         * tests/test-posix_spawn1.c: Renamed from tests/test-posix_spawn.c.
119981         * tests/test-posix_spawn1.in.sh: Renamed from
119982         tests/test-posix_spawn.in.sh.
119983         * tests/test-posix_spawn2.c: New file.
119984         * tests/test-posix_spawn2.in.sh: New file.
119985         * modules/posix_spawnp-tests (Files): Update.
119986         (Makefile.am): Update. Add test-posix_spawn2 to the tests.
119988 2008-09-29  Bruno Haible  <bruno@clisp.org>
119990         Propagate effects of putenv/setenv/unsetenv to child processes.
119991         * lib/execute.c (execute): Use spawnvpe instead of spawnvp.
119992         * lib/pipe.c (create_pipe): Likewise.
119994 2008-09-29  Bruno Haible  <bruno@clisp.org>
119996         Enable use of shell scripts as executables in mingw.
119997         * lib/execute.c (execute): When spawnv fails with error ENOEXEC,
119998         run the program as a shell script.
119999         * lib/pipe.c (create_pipe): Likewise.
120000         * lib/w32spawn.h (prepare_spawn): Add a hidden element in front of the
120001         resulting array.
120003 2008-09-29  Eric Blake  <ebb9@byu.net>
120005         * m4/arpa_inet_h.m4 (gl_REPLACE_ARPA_INET_H): Fix typo.
120007 2008-08-24  Paolo Bonzini  <bonzini@gnu.org>
120009         * doc/posix-functions/accept.texi: Update mingw problems.
120010         * doc/posix-functions/bind.texi: Update mingw problems.
120011         * doc/posix-functions/close.texi: Update mingw problems.
120012         * doc/posix-functions/connect.texi: Update mingw problems.
120013         * doc/posix-functions/getpeername.texi: Update mingw problems.
120014         * doc/posix-functions/getsockname.texi: Update mingw problems.
120015         * doc/posix-functions/getsockopt.texi: Update mingw problems.
120016         * doc/posix-functions/ioctl.texi: Update mingw problems.
120017         * doc/posix-functions/listen.texi: Update mingw problems.
120018         * doc/posix-functions/recv.texi: Update mingw problems.
120019         * doc/posix-functions/recvfrom.texi: Update mingw problems.
120020         * doc/posix-functions/select.texi: Update mingw problems.
120021         * doc/posix-functions/send.texi: Update mingw problems.
120022         * doc/posix-functions/sendto.texi: Update mingw problems.
120023         * doc/posix-functions/setsockopt.texi: Update mingw problems.
120024         * doc/posix-functions/socket.texi: Update mingw problems.
120026 2008-09-29  Paolo Bonzini  <bonzini@gnu.org>
120027             Bruno Haible  <bruno@clisp.org>
120029         * lib/sys_select.in.h: Include sys/time.h.
120030         * m4/sys_select.h.m4: Test that struct timeval is fully defined.
120031         * modules/sys_select: Depend on sys_time.
120032         * tests/test-sys_select.c: Test that sys/select.h defines struct
120033         timeval fully.
120035 2008-09-29  Bruno Haible  <bruno@clisp.org>
120037         * lib/sys_socket.in.h: Wrap the definitions in 'extern "C"'.
120038         * lib/sys_select.in.h: Likewise.
120040 2008-09-29  Bruno Haible  <bruno@clisp.org>
120042         * lib/winsock.c (rpl_close, rpl_socket): Remove unused variables.
120044 2008-09-29  Bruno Haible  <bruno@clisp.org>
120046         * m4/sockets.m4 (gl_SOCKETS): Check also for the need to use -lsocket.
120047         Set LIBSOCKET instead of augmenting LIBS.
120048         * modules/sockets (Link): New section.
120049         * modules/sockets-tests (test_sockets_LDADD): New variable.
120050         * modules/sys_select-tests (test_sys_select_LDADD): New variable.
120051         * modules/poll-tests (test_poll_LDADD): New variable.
120052         * NEWS: Document the change.
120054 2008-09-29  Bruno Haible  <bruno@clisp.org>
120056         * m4/arpa_inet_h.m4 (gl_REPLACE_ARPA_INET_H): New macro.
120057         * m4/inet_ntop.m4 (gl_INET_NTOP): Invoke it instead of assigning
120058         ARPA_INET_H directly.
120059         * m4/inet_pton.m4 (gl_INET_PTON): Likewise.
120061 2008-09-28  Bruno Haible  <bruno@clisp.org>
120063         * m4/sys_socket_h.m4 (gl_PREREQ_SYS_H_WINSOCK2): New macro, extracted
120064         from gl_HEADER_SYS_SOCKET.
120065         (gl_HEADER_SYS_SOCKET): Invoke it.
120066         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
120068 2008-09-28  Bruno Haible  <bruno@clisp.org>
120070         * doc/posix-headers/sys_select.texi: Mention 'struct timeval' problem.
120071         * tests/test-sys_select.c: Include <sys/time.h>, for struct timeval.
120072         Needed on OSF/1 4.0.
120074 2008-09-28  Bruno Haible  <bruno@clisp.org>
120076         Override open more carefully.
120077         * lib/open.c (orig_open): New function.
120078         (rpl_open): Use orig_open instead of open.
120079         * lib/fcntl.in.h: Add special invocation convention.
120080         * m4/open.m4 (gl_PREREQ_OPEN): New macro.
120081         (gl_FUNC_OPEN): Invoke it.
120083         Override freopen more carefully.
120084         * lib/freopen.c (orig_freopen): New function.
120085         (rpl_freopen): Use orig_freopen instead of freopen.
120086         * m4/freopen.m4 (gl_PREREQ_FREOPEN): New macro.
120087         (gl_FUNC_FREOPEN): Invoke it.
120089         Override fopen more carefully.
120090         * lib/fopen.c (orig_fopen): New function.
120091         (rpl_fopen): Use orig_fopen instead of fopen.
120092         * m4/fopen.m4 (gl_PREREQ_FOPEN): New macro.
120093         (gl_FUNC_FOPEN): Invoke it.
120094         Needed on AIX. Reported by Rainer Tammer <tammer@tammer.net>.
120096 2008-09-28  Bruno Haible  <bruno@clisp.org>
120098         * lib/pipe.h (create_pipe_out, create_pipe_bidi): Add comment about
120099         SIGPIPE.
120101 2008-09-28  Bruno Haible  <bruno@clisp.org>
120103         * tests/test-sigaction.c (handler, main): Disable the check whether
120104         SA_RESETHAND has reverted the installed handler to SIG_DFL. Needed on
120105         glibc systems with LinuxThreads.
120107 2008-09-28  Bruno Haible  <bruno@clisp.org>
120109         * doc/posix-functions/freopen.texi: Mention the trailing slash problem.
120111         * lib/stdio.in.h (fopen, freopen): Undefine before redefining. Needed
120112         with AIX xlc.
120113         * lib/fcntl.in.h (open): Likewise.
120114         Reported by Rainer Tammer <tammer@tammer.net>.
120116 2008-09-28  Bruno Haible  <bruno@clisp.org>
120118         * modules/posix_spawnp-tests: New file.
120119         * tests/test-posix_spawn.c: New file.
120120         * tests/test-posix_spawn.in.sh: New file.
120122         New module 'posix_spawnp'.
120123         * modules/posix_spawnp: New file.
120124         * lib/spawnp.c: New file, from GNU libc with modifications.
120125         * doc/posix-functions/posix_spawnp.texi: Mention the new module.
120127         New module 'posix_spawn'.
120128         * modules/posix_spawn: New file.
120129         * lib/spawn.c: New file, from GNU libc with modifications.
120130         * doc/posix-functions/posix_spawn.texi: Mention the new module.
120132         New module 'posix_spawnattr_destroy'.
120133         * modules/posix_spawnattr_destroy: New file.
120134         * lib/spawnattr_destroy.c: New file, from GNU libc with modifications.
120135         * doc/posix-functions/posix_spawnattr_destroy.texi: Mention the new
120136         module.
120138         New module 'posix_spawnattr_setsigmask'.
120139         * modules/posix_spawnattr_setsigmask: New file.
120140         * lib/spawnattr_setsigmask.c: New file, from GNU libc with
120141         modifications.
120142         * doc/posix-functions/posix_spawnattr_setsigmask.texi: Mention the
120143         new module.
120145         New module 'posix_spawnattr_getsigmask'.
120146         * modules/posix_spawnattr_getsigmask: New file.
120147         * lib/spawnattr_getsigmask.c: New file, from GNU libc with
120148         modifications.
120149         * doc/posix-functions/posix_spawnattr_getsigmask.texi: Mention the
120150         new module.
120152         New module 'posix_spawnattr_setsigdefault'.
120153         * modules/posix_spawnattr_setsigdefault: New file.
120154         * lib/spawnattr_setdefault.c: New file, from GNU libc with
120155         modifications.
120156         * doc/posix-functions/posix_spawnattr_setsigdefault.texi: Mention the
120157         new module.
120159         New module 'posix_spawnattr_getsigdefault'.
120160         * modules/posix_spawnattr_getsigdefault: New file.
120161         * lib/spawnattr_getdefault.c: New file, from GNU libc with
120162         modifications.
120163         * doc/posix-functions/posix_spawnattr_getsigdefault.texi: Mention the
120164         new module.
120166         New module 'posix_spawnattr_setschedpolicy'.
120167         * modules/posix_spawnattr_setschedpolicy: New file.
120168         * lib/spawnattr_setschedpolicy.c: New file, from GNU libc with
120169         modifications.
120170         * doc/posix-functions/posix_spawnattr_setschedpolicy.texi: Mention the
120171         new module.
120173         New module 'posix_spawnattr_getschedpolicy'.
120174         * modules/posix_spawnattr_getschedpolicy: New file.
120175         * lib/spawnattr_getschedpolicy.c: New file, from GNU libc with
120176         modifications.
120177         * doc/posix-functions/posix_spawnattr_getschedpolicy.texi: Mention the
120178         new module.
120180         New module 'posix_spawnattr_setschedparam'.
120181         * modules/posix_spawnattr_setschedparam: New file.
120182         * lib/spawnattr_setschedparam.c: New file, from GNU libc with
120183         modifications.
120184         * doc/posix-functions/posix_spawnattr_setschedparam.texi: Mention the
120185         new module.
120187         New module 'posix_spawnattr_getschedparam'.
120188         * modules/posix_spawnattr_getschedparam: New file.
120189         * lib/spawnattr_getschedparam.c: New file, from GNU libc with
120190         modifications.
120191         * doc/posix-functions/posix_spawnattr_getschedparam.texi: Mention the
120192         new module.
120194         New module 'posix_spawnattr_setpgroup'.
120195         * modules/posix_spawnattr_setpgroup: New file.
120196         * lib/spawnattr_setpgroup.c: New file, from GNU libc with
120197         modifications.
120198         * doc/posix-functions/posix_spawnattr_setpgroup.texi: Mention the new
120199         module.
120201         New module 'posix_spawnattr_getpgroup'.
120202         * modules/posix_spawnattr_getpgroup: New file.
120203         * lib/spawnattr_getpgroup.c: New file, from GNU libc with
120204         modifications.
120205         * doc/posix-functions/posix_spawnattr_getpgroup.texi: Mention the new
120206         module.
120208         New module 'posix_spawnattr_setflags'.
120209         * modules/posix_spawnattr_setflags: New file.
120210         * lib/spawnattr_setflags.c: New file, from GNU libc with modifications.
120211         * doc/posix-functions/posix_spawnattr_setflags.texi: Mention the new
120212         module.
120214         New module 'posix_spawnattr_getflags'.
120215         * modules/posix_spawnattr_getflags: New file.
120216         * lib/spawnattr_getflags.c: New file, from GNU libc with modifications.
120217         * doc/posix-functions/posix_spawnattr_getflags.texi: Mention the new
120218         module.
120220         New module 'posix_spawnattr_init'.
120221         * modules/posix_spawnattr_init: New file.
120222         * lib/spawnattr_init.c: New file, from GNU libc with modifications.
120223         * doc/posix-functions/posix_spawnattr_init.texi: Mention the new
120224         module.
120226         New module 'posix_spawn_file_actions_destroy'.
120227         * modules/posix_spawn_file_actions_destroy: New file.
120228         * lib/spawn_faction_destroy.c: New file, from GNU libc with
120229         modifications.
120230         * doc/posix-functions/posix_spawn_file_actions_destroy.texi: Mention
120231         the new module.
120233         New module 'posix_spawn_file_actions_addopen'.
120234         * modules/posix_spawn_file_actions_addopen: New file.
120235         * lib/spawn_faction_addopen.c: New file, from GNU libc with
120236         modifications.
120237         * doc/posix-functions/posix_spawn_file_actions_addopen.texi: Mention
120238         the new module.
120240         New module 'posix_spawn_file_actions_adddup2'.
120241         * modules/posix_spawn_file_actions_adddup2: New file.
120242         * lib/spawn_faction_adddup2.c: New file, from GNU libc with
120243         modifications.
120244         * doc/posix-functions/posix_spawn_file_actions_adddup2.texi: Mention
120245         the new module.
120247         New module 'posix_spawn_file_actions_addclose'.
120248         * modules/posix_spawn_file_actions_addclose: New file.
120249         * lib/spawn_faction_addclose.c: New file, from GNU libc with
120250         modifications.
120251         * doc/posix-functions/posix_spawn_file_actions_addclose.texi: Mention
120252         the new module.
120254         New module 'posix_spawn_file_actions_init'.
120255         * modules/posix_spawn_file_actions_init: New file.
120256         * lib/spawn_faction_init.c: New file, from GNU libc with modifications.
120257         * doc/posix-functions/posix_spawn_file_actions_init.texi: Mention the
120258         new module.
120260         New module 'posix_spawn-internal'.
120261         * modules/posix_spawn-internal: New file.
120262         * lib/spawn_int.h: New file, from GNU libc with modifications.
120263         * lib/spawni.c: New file, from GNU libc with modifications.
120264         * m4/posix_spawn.m4: New file.
120266         New module 'spawn'.
120267         * modules/spawn: New file.
120268         * lib/spawn.in.h: New file, from GNU libc with modifications.
120269         * m4/spawn_h.m4: New file.
120270         * doc/posix-headers/spawn.texi: Mention the new module.
120272 2008-09-28  Bruno Haible  <bruno@clisp.org>
120274         * modules/sched-tests: New file.
120275         * tests/test-sched.c: New file.
120277         New module 'sched'.
120278         * modules/sched: New file.
120279         * lib/sched.in.h: New file.
120280         * m4/sched_h.m4: New file.
120281         * doc/posix-headers/sched.texi: Mention the new module.
120283 2008-09-27  Eric Blake  <ebb9@byu.net>
120285         Fix previous patch, and tweak references to $0.
120286         * posix-modules: Call func_gnulib_dir before using $gnulib_dir.
120287         (func_version, func_gnulib_dir): Don't call this program
120288         gnulib-tool.
120289         (func_gnulib_dir, func_tmpdir, func_fatal_error): Avoid shell bugs
120290         with using $0 in function.
120291         * gnulib-tool (func_gnulib_dir, func_tmpdir): Likewise.
120292         (func_fatal_error): Reuse the name the user invoked us with.
120294 2008-09-27  Bruno Haible  <bruno@clisp.org>
120296         * m4/iconv_h.m4 (gl_REPLACE_ICONV_H): New macro.
120297         (gl_ICONV_H_DEFAULTS): Initialize ICONV_H here...
120298         (gl_ICONV_H): Not here.
120299         * m4/iconv_open.m4 (gl_REPLACE_ICONV_OPEN): Invoke gl_REPLACE_ICONV_H
120300         instead of assigning ICONV_H directly.
120302         * m4/wchar.m4 (gl_REPLACE_WCHAR_H): New macro.
120303         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Invoke it instead of assigning
120304         WCHAR_H directly.
120306 2008-09-27  Bruno Haible  <bruno@clisp.org>
120308         * lib/arpa_inet.in.h: Include the GL_LINK_WARNING anchor.
120309         * modules/arpa_inet (Depends-on): Add link-warning.
120310         (Makefile.am): Insert the definition of GL_LINK-WARNING.
120311         * modules/unistd (Makefile.am): Likewise.
120313 2008-09-26  Bruno Haible  <bruno@clisp.org>
120315         * posix-modules (cvsdatestamp, last_checkin_date, version): Remove
120316         variables.
120317         (func_version): Essentially copied from gnulib-tool.
120318         (func_exit, func_gnulib_dir, func_tmpdir, func_fatal_error,
120319         func_readlink): Copied from gnulib-tool.
120321 2008-09-26  Bruno Haible  <bruno@clisp.org>
120323         * gnulib-tool (func_version): Change directory to $gnulib_dir before
120324         invoking git-version-gen.
120326 2008-09-26  Bruno Haible  <bruno@clisp.org>
120328         * posix-modules: Update to directory names changed on 2008-01-19.
120329         Remove commas in output before splitting into words. No more need to
120330         avoid 'ftruncate' since 2007-02-19.
120332 2008-09-26  Bruno Haible  <bruno@clisp.org>
120334         * doc/posix-headers/errno.texi: Remove mention of module 'EOVERFLOW'.
120336 2008-09-26  Bruno Haible  <bruno@clisp.org>
120338         * lib/fwriteerror.c (do_fwriteerror): Ignore error EPIPE.
120339         * modules/fwriteerror (Depends-on): Add errno.
120341 2008-09-26  Bruno Haible  <bruno@clisp.org>
120343         * tests/test-vc-list-files-git.sh: Explain reason for skipping test.
120344         * tests/test-vc-list-files-cvs.sh: Likewise.
120346 2008-09-26  Bruno Haible  <bruno@clisp.org>
120348         * doc/posix-headers/sys_resource.texi: Reorder items.
120350 2008-09-26  Jim Meyering  <meyering@redhat.com>
120352         fts: tweak inode comparison function
120353         * lib/fts.c (fts_compare_ino): Sort on increasing, not decreasing
120354         inode numbers, as documented.
120356         fts: sort dirent entries on inode number before traversing
120357         This avoids a quadratic, seek-related performance penalty when
120358         operating on a directory containing many entries (measurable at 10k;
120359         3.5 hours at 2 million entries with a cold cache) on certain types
120360         of file systems, including ext3 and ext4, but not tmpfs.
120361         * lib/fts.c (DT_MUST_BE, NOT_AN_INODE_NUMBER, D_INO): Define.
120362         (FTS_INODE_SORT_DIR_ENTRIES_THRESHOLD): Define if not defined.
120363         (S_MAGIC_TMPFS, S_MAGIC_NFS): Define.
120364         (fs_handles_readdir_ordered_dirents_efficiently): New function.
120365         (dirent_inode_sort_may_be_useful, fts_compare_ino): Likewise.
120366         (fts_build): Set the stat.st_ino member from D_INO.
120367         If it is likely to be useful, sort dirent entries on inode number.
120369         * m4/fts.m4 (gl_FUNC_FTS_CORE): Check for fstatfs, sys/vfs.h,
120370         and the struct statfs.f_type member.
120371         * modules/fts (Depends-on): Add d-ino.
120373 2008-09-26  Bruno Haible  <bruno@clisp.org>
120375         * modules/sigpipe-die (Depends-on): Add sigpipe.
120377         * lib/stdio.in.h (fprintf, vfprintf, printf, vprintf, fputc, putc,
120378         putchar, fputs, puts, fwrite): Replace when REPLACE_STDIO_WRITE_FUNCS
120379         and GNULIB_STDIO_H_SIGPIPE are set.
120380         * lib/stdio-write.c: New file.
120381         * m4/stdio_h.m4 (gl_STDIO_H): Set GNULIB_FPRINTF, GNULIB_PRINTF,
120382         GNULIB_VFPRINTF, GNULIB_VPRINTF, GNULIB_FPUTC, GNULIB_PUTC,
120383         GNULIB_PUTCHAR, GNULIB_FPUTS, GNULIB_PUTS, GNULIB_FWRITE,
120384         REPLACE_STDIO_WRITE_FUNCS.
120385         (gl_STDIO_H_DEFAULTS): Initialize GNULIB_FPRINTF, GNULIB_PRINTF,
120386         GNULIB_VFPRINTF, GNULIB_VPRINTF, GNULIB_FPUTC, GNULIB_PUTC,
120387         GNULIB_PUTCHAR, GNULIB_FPUTS, GNULIB_PUTS, GNULIB_FWRITE,
120388         GNULIB_STDIO_H_SIGPIPE, REPLACE_STDIO_WRITE_FUNCS.
120389         * modules/stdio (Files): Add lib/stdio-write.c.
120390         (Makefile.am): Substitute GNULIB_FPRINTF, GNULIB_PRINTF,
120391         GNULIB_VFPRINTF, GNULIB_VPRINTF, GNULIB_FPUTC, GNULIB_PUTC,
120392         GNULIB_PUTCHAR, GNULIB_FPUTS, GNULIB_PUTS, GNULIB_FWRITE,
120393         GNULIB_STDIO_H_SIGPIPE, REPLACE_STDIO_WRITE_FUNCS.
120394         * m4/fprintf-posix.m4 (gl_REPLACE_FPRINTF): Define
120395         REPLACE_FPRINTF_POSIX.
120396         * m4/printf-posix-rpl.m4 (gl_REPLACE_PRINTF): Define
120397         REPLACE_PRINTF_POSIX.
120398         * m4/vfprintf-posix.m4 (gl_REPLACE_VFPRINTF): Define
120399         REPLACE_VFPRINTF_POSIX.
120400         * m4/vprintf-posix.m4 (gl_REPLACE_VPRINTF): Define
120401         REPLACE_VPRINTF_POSIX.
120402         * doc/posix-functions/fprintf.texi: Mention the sigpipe module and the
120403         SIGPIPE issue.
120404         * doc/posix-functions/fputc.texi: Likewise.
120405         * doc/posix-functions/fputs.texi: Likewise.
120406         * doc/posix-functions/fwrite.texi: Likewise.
120407         * doc/posix-functions/printf.texi: Likewise.
120408         * doc/posix-functions/putc.texi: Likewise.
120409         * doc/posix-functions/putchar.texi: Likewise.
120410         * doc/posix-functions/puts.texi: Likewise.
120411         * doc/posix-functions/vfprintf.texi: Likewise.
120412         * doc/posix-functions/vprintf.texi: Likewise.
120414         * modules/safe-write (Depends-on): Add write.
120416         * modules/sigpipe-tests: New file.
120417         * tests/test-sigpipe.c: New file.
120418         * tests/test-sigpipe.sh: New file.
120420         * modules/write: New file.
120421         * lib/unistd.in.h: Include <sys/types.h>.
120422         (write): New declaration.
120423         * lib/write.c: New file.
120424         * m4/write.m4: New file.
120425         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
120426         GNULIB_UNISTD_H_SIGPIPE, GNULIB_WRITE, REPLACE_WRITE.
120427         * modules/unistd (Makefile.am): Substitute GNULIB_UNISTD_H_SIGPIPE,
120428         GNULIB_WRITE, REPLACE_WRITE.
120429         * doc/posix-functions/write.texi: Mention the write, sigpipe modules
120430         and the SIGPIPE issue.
120432         * lib/signal.in.h (SIGPIPE): Define to a replacement value.
120433         (raise): New declaration.
120434         * lib/sigprocmask.c (SIGPIPE_handler): New variable.
120435         (ext_signal): New function.
120436         (rpl_raise): New function.
120437         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Initialize
120438         GNULIB_SIGNAL_H_SIGPIPE.
120439         * modules/signal (Makefile.am): Substitute GNULIB_SIGNAL_H_SIGPIPE.
120440         * doc/posix-headers/signal.texi: Mention the SIGPIPE issue.
120442         * modules/sigpipe: New file.
120443         * m4/sigpipe.m4: New file.
120445 2008-09-25  Derek Price  <derek@ximbiot.com>
120446             Bruno Haible  <bruno@clisp.org>
120448         * gnulib-tool (func_import): Report all license incompatibilities, not
120449         just the first one.
120451 2008-09-25  Bruno Haible  <bruno@clisp.org>
120453         * gnulib-tool (func_import): When computing the edits, consider not
120454         only the Makefile.ams that exist but also those that will be generated.
120456 2008-09-25  Simon Josefsson  <simon@josefsson.org>
120458         * modules/sys_select-tests (Depends-on): Remove sys_select itself,
120459         fixes gnulib-tool --test warning about duplicate dependency.
120461 2008-09-25  Bruno Haible  <bruno@clisp.org>
120463         * gnulib-tool: Don't ask the user to perform edits in the generated
120464         Makefile.ams.
120465         (func_emit_lib_Makefile_am): Emit empty SUBDIRS. Execute edits that
120466         apply to the Makefile.am being generated.
120467         (func_emit_tests_Makefile_am): Execute edits that apply to the
120468         Makefile.am being generated.
120469         (func_import): Setup list of Makefile.am edits before emitting the
120470         Makefile.ams, not at the end.
120471         (func_create_testdir): Update.
120472         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
120474 2008-09-25  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
120476         * gnulib-tool (func_import): Store the --tests-base option in the
120477         comment in gnulib-cache.m4.
120479 2008-09-24  Paolo Bonzini  <bonzini@gnu.org>
120481         * NEWS: Document increased portability that sys_select now provides.
120483         * lib/sys_select.in.h: Install select wrapper.
120484         * lib/sys_socket.in.h: Use more descriptive name when there is no
120485         select wrapper.
120486         * lib/winsock-select.c: New.
120487         * m4/sys_select_h.m4: Compile lib/winsock-select.c if WinSock is used.
120488         Require gl_HEADER_SYS_SOCKET.
120489         * modules/sys_select: Depend on alloca, add lib/winsock-select.c.
120490         * modules/sys_select-tests: Copy dependencies from modules/poll-tests.
120491         * tests/test-sys_select.c: Add functional tests.
120493 2008-09-24  Eric Blake  <ebb9@byu.net>
120495         open, fopen: close fd leak in last patch
120496         * lib/open.c (rpl_open): Close fd before returning error.
120497         * lib/fopen.c (rpl_fopen): Close fd before returning error.
120498         * doc/posix-functions/open.texi (open): Document that Irix also
120499         has the bug.
120500         * doc/posix-functions/fopen.texi (fopen): Likewise.
120501         Reported by Paolo Bonzini.
120503 2008-09-24  Bruno Haible  <bruno@clisp.org>
120505         Ensure that a filename ending in a slash cannot be used to access a
120506         non-directory.
120507         * lib/open.c (rpl_open): When the filename ends in a slash, use fstat()
120508         to check whether it's really a directory.
120509         * lib/fopen.c: Include fcntl.h, unistd.h.
120510         (rpl_fopen): When the filename ends in a slash, use open(), fstat(),
120511         and fdopen().
120512         * modules/fopen (Depends-on): Add unistd.
120513         * tests/test-open.c (main): Try to open "/dev/null/" as a directory.
120514         * tests/test-fopen.c (main): Likewise.
120515         * doc/posix-functions/open.texi: Mention the HP-UX, Solaris bug.
120516         * doc/posix-functions/fopen.texi: Likewise.
120517         Reported by Eric Blake.
120519 2008-09-23  Eric Blake  <ebb9@byu.net>
120521         c-stack: avoid compiler optimizations when provoking overflow
120522         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Make
120523         recursion harder to optimize, to ensure a stack overflow occurs.
120524         * tests/test-c-stack.c (recurse): Likewise.
120525         Borrowed from libsigsegv.
120527         c-stack: work around Irix sigaltstack bug
120528         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Check
120529         whether sigaltstack uses wrong end of stack_t (copied in part from
120530         libsigsegv).
120531         * lib/c-stack.c (c_stack_action) [!HAVE_LIBSIGSEGV]: Work around
120532         Irix bug, without requiring an over-allocation.
120533         * doc/posix-functions/sigaltstack.texi (sigaltstack): Document the
120534         bug.
120536         fopen: document mingw bug on directories
120537         * doc/posix-functions/fopen.texi (fopen): Mention mingw bug for
120538         not allowing a stream visiting a directory, even though reading
120539         from such a stream is not portable.
120541 2008-09-23  Paolo Bonzini  <bonzini@gnu.org>
120543         * lib/poll.c: Rewrite.
120544         * modules/poll: Depend on alloca.
120546 2008-09-23  Paolo Bonzini  <bonzini@gnu.org>
120548         * lib/sys_socket.in.h: Do not implement rpl_setsockopt here,
120549         instead define prototypes for a full set of wrappers.  Ensure
120550         that Cygwin does not use the compatibility code, which is only
120551         for MinGW.
120552         * lib/winsock.c: New.
120553         * m4/sys_socket_h.m4: Compile lib/winsock.c if WinSock is being used.
120554         * modules/sys_socket: Add lib/winsock.c.
120556         * modules/poll-tests: Add errno and perror.
120557         * tests/test-poll.c: Use ioctl, not ioctlsocket.
120559 2008-09-23  Paolo Bonzini  <bonzini@gnu.org>
120561         * tests/test-poll.c: Downgrade minimum needed Winsock version.
120563 2008-09-23  Bruno Haible  <bruno@clisp.org>
120565         * doc/posix-functions/*: Add info about functions missing on IRIX 5.3.
120566         * doc/glibc-functions/*: Likewise.
120568 2008-09-23  Simon Josefsson  <simon@josefsson.org>
120570         * tests/test-perror.sh (tmpfiles): Cleanup temporary files on
120571         success.
120573 2008-09-22  Eric Blake  <ebb9@byu.net>
120574             Bruno Haible  <bruno@clisp.org>
120576         vasnprintf: fix x86/glibc regression on printf("%La", 0.0L)
120577         * lib/vasnprintf.c (VASNPRINTF): Support 0.0 on platforms that
120578         supply %A but mishandle pseudo-NaN.
120579         Reported by Simon Josefsson.
120581 2008-09-21  Bruno Haible  <bruno@clisp.org>
120583         * tests/test-lock.c (main): Tweak skip message.
120584         * tests/test-tls.c (main): Likewise.
120586 2008-09-21  Bruno Haible  <bruno@clisp.org>
120588         * m4/sigaction.m4 (gl_SIGACTION): Remove unnecessary AC_SUBST. Check
120589         whether 'struct sigaction' has sa_sigaction here...
120590         (gl_PREREQ_SIG_HANDLER_H): ... not here.
120591         (gl_PREREQ_SIGACTION): Remove unnecessary AC_SUBST.
120593 2008-09-21  Bruno Haible  <bruno@clisp.org>
120595         * MODULES.html.sh (Support for obsolete systems lacking ANSI C 89): New
120596         section.
120597         (Support for systems lacking ANSI C 89): Move stdlib, exit, strtol,
120598         strtoul, memchr, memcmp, memcpy, memmove, memset, strcspn, strpbrk to
120599         the new section.
120600         (Support for obsolete systems lacking POSIX:2001): New section.
120601         (String handling <string.h>): Move strdup to the new section.
120602         Suggested by Simon Josefsson and Paolo Bonzini.
120604 2008-09-21  Bruno Haible  <bruno@clisp.org>
120606         * tests/test-vasnprintf-posix.c (test_function): Allow 3-digit
120607         exponents in %e and %g results on 'long double'. Needed for mingw's
120608         improved *printf functions.
120609         * tests/test-vasprintf-posix.c (test_function): Likewise.
120610         * tests/test-snprintf-posix.h (test_function): Likewise.
120611         * tests/test-sprintf-posix.h (test_function): Likewise.
120612         Reported by Eric Blake.
120614 2008-09-21  Bruno Haible  <bruno@clisp.org>
120616         * tests/test-snprintf-posix.h (test_function): Remove useless ASSERTs.
120617         * tests/test-sprintf-posix.h (test_function): Likewise.
120619 2008-09-21  Bruno Haible  <bruno@clisp.org>
120621         * modules/getpass (Depends-on): Add strdup-posix.
120623         New module 'strdup-posix'.
120624         * modules/strdup-posix: New file.
120625         * m4/strdup.m4 (gl_FUNC_STRDUP_POSIX): New macro.
120626         * lib/string.in.h (strdup): Replace if REPLACE_STRDUP is 1.
120627         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
120628         REPLACE_STRDUP.
120629         * modules/string (Makefile.am): Substitute REPLACE_STRDUP.
120630         * doc/posix-functions/strdup.texi: Mention module strdup-posix.
120631         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
120632         strdup-posix.
120634         * modules/strdup (Depends-on): Remove malloc-posix.
120636 2008-09-20  Bruno Haible  <bruno@clisp.org>
120638         * lib/fstrcmp.c: Add data about branch probabilities, from Ralf
120639         Wildenhues.
120641 2008-09-20  Bruno Haible  <bruno@clisp.org>
120643         Ensure that wint_t gets defined on IRIX 5.3.
120644         * lib/wchar.in.h (wint_t): Define if not defined by the system.
120645         * lib/wctype.in.h (wint_t): Likewise.
120646         (__wctype_wint_t): Remove type.
120647         (isw*): Use wint_t instead of __wctype_wint_t.
120648         * m4/wchar.m4 (gl_WCHAR_H): Invoke gt_TYPE_WINT_T and set HAVE_WINT_T.
120649         * modules/wchar (Files): Add m4/wint_t.m4.
120650         (Makefile.am): Substitute HAVE_WINT_T.
120651         * tests/test-wchar.c: Check that wchar_t and wint_t are defined.
120652         * tests/test-wctype.c: Check that wint_t is defined.
120653         * doc/posix-headers/wchar.texi: Mention the IRIX 5 problem.
120654         * doc/posix-headers/wctype.texi: Likewise.
120655         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
120657 2008-09-18  Bruno Haible  <bruno@clisp.org>
120659         * gnulib-tool (func_exit): Update comment.
120661 2008-09-18  Simon Josefsson  <simon@josefsson.org>
120663         * modules/getaddrinfo (Depends-on): Remove strdup, this module
120664         assumes strdup exists and does not depend on strdup to return
120665         ENOMEM on out of memory conditions.
120667 2008-09-18  Bruno Haible  <bruno@clisp.org>
120669         * lib/vasnprintf.c (VASNPRINTF): When printing ±0.0L in
120670         NEED_PRINTF_INFINITE_LONG_DOUBLE case with 'e' format, always use two
120671         digits for the exponent.
120673 2008-09-18  Jim Meyering  <meyering@redhat.com>
120674             Bruno Haible  <bruno@clisp.org>
120676         * lib/vasnprintf.c (decimal_point_char): Define also if
120677         NEED_PRINTF_INFINITE_LONG_DOUBLE.
120679 2008-09-16  Bruno Haible  <bruno@clisp.org>
120680         and Eric Blake  <ebb9@byu.net>
120682         vasnprintf: support Irix 5.3
120683         * lib/vasnprintf.c (VASNPRINTF): Also handle -0.0L on platforms
120684         that mishandle long double infinity.
120685         Reported by Tom G. Christensen.
120687 2008-09-16  Bruno Haible  <bruno@clisp.org>
120689         * doc/glibc-functions/scandir.texi: Mention the function is missing on
120690         Solaris 9.
120691         * doc/glibc-functions/alphasort.texi: Likewise.
120692         Reported by Michael Haubenwallner <michael.haubenwallner@salomon.at>.
120694 2008-09-16  Jim Meyering  <meyering@redhat.com>
120696         posix-shell.m4: reject opensolaris's "sh (AT&T Research) 1993-12-28 s+"
120697         * m4/posix-shell.m4 (gl_POSIX_SHELL): Reject a shell that lets
120698         a umask modification leak out of a subshell.  Otherwise, the
120699         opensolaris /bin/sh would be accepted and thus cause unwarranted
120700         failures in the coreutils test suite.
120702 2008-09-16  Paolo Bonzini  <bonzini@gnu.org>
120704         * tests/test-poll.c (connect_to_socket): Allow non-blocking connect
120705         to succeed.
120707 2008-09-16  Jim Meyering  <meyering@redhat.com>
120709         avoid spurious test failure when library is built without ACL support
120710         * m4/acl.m4 (USE_ACL): Define as a shell variable, too, for...
120711         * modules/acl-tests (Makefile.am) [TESTS_ENVIRONMENT]: Add USE_ACL.
120712         * tests/test-file-has-acl.sh: Skip if USE_ACL == 0.
120713         * tests/test-copy-acl.sh: Likewise.
120715 2008-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
120717         * lib/fstrcmp.c (fstrcmp_bounded): Use a second, less quick upper bound
120718         based on character occurrence counts.
120720 2008-09-15  Eric Blake  <ebb9@byu.net>
120722         tests: avoid some compiler warnings
120723         * tests/test-memchr.c (main): Pass NULL indirectly.
120724         * tests/test-closein.c (main): Avoid unused variable.
120726 2008-09-15  Bruno Haible  <bruno@clisp.org>
120728         * m4/errno_h.m4 (gl_HEADER_ERRNO_H_BODY): Test for all the macros that
120729         are missing on OpenBSD 4.0 individually.
120730         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
120732 2008-09-15  Bruno Haible  <bruno@clisp.org>
120734         * doc/posix-headers/errno.texi: Mention the Cygwin problem.
120735         * doc/posix-functions/strerror.texi: Mention also Cygwin.
120736         * doc/posix-functions/perror.texi: Likewise.
120737         * m4/errno_h.m4 (gl_HEADER_ERRNO_H_BODY): Test also whether ECANCELED
120738         is missing.
120739         Reported by Eric Blake.
120741         * lib/errno.in.h: Use replacement values >= 2000.
120742         Reported by Eric Blake.
120744 2008-09-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
120746         * lib/fstrcmp.c (EXTRA_CONTEXT_FIELDS): Add field 'edit_count_limit'.
120747         (EARLY_ABORT): Return true when the edit_count has grown too beyond the
120748         limit.
120749         (fstrcmp_bounded): Initialize the edit_count_limit. Return 0 when
120750         compareseq was aborted.
120752 2008-09-14  Bruno Haible  <bruno@clisp.org>
120754         * lib/fstrcmp.c (EXTRA_CONTEXT_FIELDS): Combine xvec_edit_count and
120755         yvec_edit_count.
120756         (NOTE_DELETE, NOTE_INSERT): Increment the combined edit count.
120757         (fstrcmp_bounded): Simplify result computation accordingly.
120759 2008-09-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
120761         * lib/fstrcmp.h (fstrcmp_bounded): New declaration.
120762         (fstrcmp): Define in terms of fstrcmp_bounded.
120763         * lib/fstrcmp.c (fstrcmp_bounded): Renamed from fstrcmp. Add
120764         lower_bound argument.
120765         Return quickly if the result is certainly < lower_bound.
120766         * tests/test-fstrcmp.c (check_fstrcmp): Test also fstrcmp_bounded.
120768 2008-09-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
120770         * lib/diffseq.h (EARLY_ABORT): New macro.
120771         (compareseq): Change return type to bool. Return true when EARLY_ABORT
120772         evaluates to true.
120774 2008-09-14  Bruno Haible  <bruno@clisp.org>
120776         * modules/perror-tests: New file.
120777         * tests/test-perror.sh: New file.
120778         * tests/test-perror.c: New file.
120780         New module 'perror'.
120781         * lib/stdio.in.h (perror): New declaration.
120782         * lib/perror.c: New file.
120783         * m4/perror.m4: New file.
120784         * modules/perror: New file.
120785         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add perror.
120786         * doc/posix-functions/perror.texi: Mention the perror module.
120787         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize GNULIB_PERROR,
120788         REPLACE_PERROR.
120789         * modules/stdio (Makefile.am): Substitute GNULIB_PERROR,
120790         REPLACE_PERROR.
120792 2008-09-14  Bruno Haible  <bruno@clisp.org>
120794         * modules/stdio (Makefile.am): Reorder to match the order in
120795         lib/stdio.in.h.
120796         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
120798 2008-09-13  Bruno Haible  <bruno@clisp.org>
120800         * lib/sys_socket.in.h (EINPROGRESS, ...): Remove definitions.
120802 2008-09-13  Bruno Haible  <bruno@clisp.org>
120804         Extend strerror to cover the added errno values.
120805         * lib/strerror.c: Include errno.h and winsock2.h if it exists.
120806         (rpl_strerror): Provide error messages for the added errno values and
120807         for the WSA* values.
120808         * m4/strerror.m4 (gl_FUNC_STRERROR): Test REPLACE_STRERROR.
120809         (gl_FUNC_STRERROR_SEPARATE): If errno.h is replaced, always replace
120810         strerror.
120811         (gl_PREREQ_STRERROR): Test whether winsock2.h exists.
120812         * modules/strerror (Depends-on): Add errno.
120813         * doc/posix-functions/strerror.texi: Document the change.
120814         * tests/test-strerror.c (main): Check also the string for ETIMEDOUT
120815         and EOVERFLOW.
120817 2008-09-13  Bruno Haible  <bruno@clisp.org>
120819         * modules/EOVERFLOW: Remove file.
120820         * m4/eoverflow.m4: Remove file.
120821         * modules/EOVERFLOW-tests: Remove file.
120822         * tests/test-EOVERFLOW.c: Remove file.
120823         * modules/fprintf-posix (Depends-on): Replace EOVERFLOW with errno.
120824         * modules/ftell (Depends-on): Likewise.
120825         * modules/getdelim (Depends-on): Likewise.
120826         * modules/getugroups (Depends-on): Likewise.
120827         * modules/poll (Depends-on): Likewise.
120828         * modules/snprintf (Depends-on): Likewise.
120829         * modules/sprintf-posix (Depends-on): Likewise.
120830         * modules/vasnprintf (Depends-on): Likewise.
120831         * modules/vasprintf (Depends-on): Likewise.
120832         * modules/vfprintf-posix (Depends-on): Likewise.
120833         * modules/vsnprintf (Depends-on): Likewise.
120834         * modules/vsprintf-posix (Depends-on): Likewise.
120835         * modules/xvasprintf (Depends-on): Likewise.
120836         * modules/unistdio/u8-vasnprintf (Depends-on): Likewise.
120837         * modules/unistdio/u8-vasprintf (Depends-on): Likewise.
120838         * modules/unistdio/u8-vsnprintf (Depends-on): Likewise.
120839         * modules/unistdio/u8-vsprintf (Depends-on): Likewise.
120840         * modules/unistdio/u8-u8-vasnprintf (Depends-on): Likewise.
120841         * modules/unistdio/u8-u8-vasprintf (Depends-on): Likewise.
120842         * modules/unistdio/u8-u8-vsnprintf (Depends-on): Likewise.
120843         * modules/unistdio/u8-u8-vsprintf (Depends-on): Likewise.
120844         * modules/unistdio/u16-u16-vasnprintf (Depends-on): Likewise.
120845         * modules/unistdio/u16-u16-vasprintf (Depends-on): Likewise.
120846         * modules/unistdio/u16-u16-vsnprintf (Depends-on): Likewise.
120847         * modules/unistdio/u16-u16-vsprintf (Depends-on): Likewise.
120848         * modules/unistdio/u16-vasnprintf (Depends-on): Likewise.
120849         * modules/unistdio/u16-vasprintf (Depends-on): Likewise.
120850         * modules/unistdio/u16-vsnprintf (Depends-on): Likewise.
120851         * modules/unistdio/u16-vsprintf (Depends-on): Likewise.
120852         * modules/unistdio/u32-vasnprintf (Depends-on): Likewise.
120853         * modules/unistdio/u32-vasprintf (Depends-on): Likewise.
120854         * modules/unistdio/u32-vsnprintf (Depends-on): Likewise.
120855         * modules/unistdio/u32-vsprintf (Depends-on): Likewise.
120856         * modules/unistdio/u32-u32-vasnprintf (Depends-on): Likewise.
120857         * modules/unistdio/u32-u32-vasprintf (Depends-on): Likewise.
120858         * modules/unistdio/u32-u32-vsnprintf (Depends-on): Likewise.
120859         * modules/unistdio/u32-u32-vsprintf (Depends-on): Likewise.
120860         * modules/unistdio/ulc-fprintf (Depends-on): Likewise.
120861         * modules/unistdio/ulc-vasnprintf (Depends-on): Likewise.
120862         * modules/unistdio/ulc-vasprintf (Depends-on): Likewise.
120863         * modules/unistdio/ulc-vfprintf (Depends-on): Likewise.
120864         * modules/unistdio/ulc-vsnprintf (Depends-on): Likewise.
120865         * modules/unistdio/ulc-vsprintf (Depends-on): Likewise.
120866         * MODULES.html.sh: Remove EOVERFLOW.
120867         * NEWS: Mention the change.
120869 2008-09-13  Bruno Haible  <bruno@clisp.org>
120871         * modules/errno-tests: New file.
120872         * tests/test-errno.c: New file, incorporating tests/test-EOVERFLOW.c.
120874         * lib/errno.in.h: New file.
120875         * m4/errno_h.m4: New file, borrowing from m4/eoverflow.m4.
120876         * modules/errno: New file.
120877         * doc/posix-headers/errno.texi: Update documentation.
120878         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add errno.
120880 2008-09-13  Bruno Haible  <bruno@clisp.org>
120882         * tests/test-poll.c: Use #if for native Windows, rather than testing
120883         __MSVCRT__.
120885 2008-09-13  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
120886             Bruno Haible  <bruno@clisp.org>
120888         * lib/glob.c: Don't include <pwd.h> on native Windows.
120889         (WINDOWS32): New macro.
120890         (glob) [WINDOW32]: Provide a reasonable replacement for getenv("HOME").
120892 2008-09-13  Bruno Haible  <bruno@clisp.org>
120894         * lib/glthread/cond.h [USE_SOLARIS_THREADS]
120895         (ETIMEDOUT): Remove macro.
120896         (glthread_cond_timedwait_multithreaded): New declaration.
120897         (glthread_cond_timedwait): Use it.
120898         * lib/glthread/cond.c [USE_SOLARIS_THREADS]
120899         (glthread_cond_timedwait_multithreaded): New function.
120901 2008-09-12  Paolo Bonzini  <bonzini@gnu.org>
120903         * modules/poll-tests: Do not check for io.h.
120904         * tests/test-poll.c: Check for __MSVCRT__ instead.
120906 2008-09-12  Paolo Bonzini  <bonzini@gnu.org>
120908         * lib/sys_socket.in.h (EINPROGRESS): Define for Winsock case.
120909         * modules/poll-tests: Add inet_pton, stdbool, sockets.
120910         * tests/test-poll.c: Use them.  Use _pipe on Windows.
120912 2008-09-12  Paolo Bonzini  <bonzini@gnu.org>
120914         * modules/poll-tests: New.
120915         * tests/test-poll.c: New.
120917 2008-09-12  Eric Blake  <ebb9@byu.net>
120919         frexp: test for NetBSD failure on -0.0
120920         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Enhance test, since some, but
120921         not all, bugs from NetBSD 3.0 have been fixed.
120922         * doc/posix-functions/frexp.texi (frexp): Document bug.
120923         Reported by Thomas Klausner.
120925         signbit: work around bug of HP-UX 10.20 cc with -0.0 literal
120926         * m4/signbit.m4 (gl_SIGNBIT_TEST_PROGRAM): Rewrite test to avoid
120927         literal -0.0.
120928         Reported by Jonathan C. Patschke <jp@centtech.com>.
120930 2008-09-11  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
120932         * lib/glthread/cond.h: Use dummy implementation also if
120933         USE_WIN32_THREADS.
120935 2008-09-11  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
120937         * modules/fnmatch-posix (License): Change to LGPLv2+.
120938         * modules/fnmatch-gnu (License): Likewise.
120940 2008-09-11  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
120942         * lib/poll.c (poll): Fix polling unconnected server sockets on WIN32.
120944 2008-09-11  Jim Meyering  <meyering@redhat.com>
120946         * users.txt: Add gtk-vnc.
120948 2008-09-08  Simon Josefsson  <simon@josefsson.org>
120950         * tests/test-bitrotate.c: Test 8/16-bit rotates with 0 and maximum
120951         rotate amounts.
120953         * lib/bitrotate.h: Doc fix, mention that N can be wider than minimally
120954         required for 16-bit and 8-bit rotates.
120955         * lib/bitrotate.h (rotl64, rotr64, rotl32, rotl32, rotl16, rotr16,
120956         rotl8, rotr8): Use UINT64_MAX, UINT32_MAX, UINT16_MAX, and
120957         UINT8_MAX instead of hard-coded constants.
120958         Suggested by Paul Eggert.
120960 2008-09-07  Bruno Haible  <bruno@clisp.org>
120962         * tests/test-striconveh.c (main): Check behaviour when converting from
120963         UTF-7.
120965         Make striconveh work better with stateful encodings.
120966         * lib/striconveh.c (iconv_carefully, iconv_carefully_1): Don't assume
120967         that iconv does not increment the inptr when returning -1/EINVAL.
120969 2008-09-07  Bruno Haible  <bruno@clisp.org>
120971         * build-aux/config.rpath: Update according to libtool-2.2.6.
120972         * build-aux/config.libpath: Likewise.
120974 2008-09-06  Bruno Haible  <bruno@clisp.org>
120976         * lib/freadahead.c (freadahead): Add conditional for SLOW_BUT_NO_HACKS.
120977         * lib/freadptr.c (freadptr): Likewise.
120978         * lib/freadseek.c (freadptrinc): Likewise.
120979         Reported by Simon Josefsson.
120981 2008-09-06  Bruno Haible  <bruno@clisp.org>
120983         * modules/freadptr (License): Change to LGPLv2+.
120984         * modules/freadseek (License): Likewise.
120985         Suggested by Eric Blake.
120987         * modules/memchr2 (License): Change to LGPLv2+.
120988         Approved by Eric Blake.
120990 2008-09-04  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
120991             Bruno Haible  <bruno@clisp.org>
120993         Make gnulib-tool work with native 'sed' on AIX.
120994         * gnulib-tool (sed_noop): New variable.
120995         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am, func_import,
120996         func_add_or_update, func_create_testdir): Use it to initialize sed
120997         script variables.
120998         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
121000 2008-09-04  Albert Chin  <bug-gnulib@mlists.thewrittenword.com>
121001             Bruno Haible  <bruno@clisp.org>
121003         * m4/include_next.m4 (gl_INCLUDE_NEXT): Add check whether #include_next
121004         also works after #include directives.
121006 2008-09-04  Ondřej Vašík  <ovasik@redhat.com>
121008         getdate.y: reject an out-of-range timezone value
121009         * lib/getdate.y (time_zone_hhmm): Reject any TZ offset that is outside
121010         the range [-24...+24].  When specified with only one or two digits,
121011         * tests/test-getdate.c: Tests for the fix.
121012         * doc/getdate.texi: Document this change.
121014 2008-09-03  Bruno Haible  <bruno@clisp.org>
121016         * doc/glibc-functions/strverscmp.texi: Mention the strverscmp module.
121018 2008-09-02  Simon Josefsson  <simon@josefsson.org>
121020         * lib/bitrotate.h (rotl64, rotr64): Add.  Suggested by Bruce Korb
121021         <bruce.korb@gmail.com> with ideas from Ben Pfaff
121022         <blp@cs.stanford.edu>, Bruno Haible <bruno@clisp.org> and Eric
121023         Blake <ebb9@byu.net>.
121025         * tests/test-bitrotate.c: Add more test vectors.
121027 2008-09-02  Eric Blake  <ebb9@byu.net>
121029         vasnprintf-posix: handle large precision via %.*d
121030         * lib/vasnprintf.c (VASNPRINTF): Don't pass precision to snprintf
121031         when handling it ourselves.
121032         * tests/test-vasnprintf-posix.c (test_function): Add test.
121033         * tests/test-snprintf-posix.h (test_function): Likewise.
121034         * tests/test-sprintf-posix.h (test_function): Likewise.
121035         * tests/test-vasprintf-posix.c (test_function): Likewise.
121036         Reported by Alain Guibert.
121038 2008-09-01  Eric Blake  <ebb9@byu.net>
121040         c-stack: make configure-time check more robust
121041         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Check for
121042         successful sigaction call.
121043         Reported by Tom G. Christensen.
121045 2008-09-01  Bruno Haible  <bruno@clisp.org>
121047         New module 'findprog-lgpl'.
121048         * modules/findprog-lgpl: New file.
121049         * lib/findprog-lgpl.c: New file.
121050         * lib/findprog.c: Compile nothing in findprog.c if findprog-lgpl.c is
121051         also compiled. Consider the possibly defined symbol IN_FINDPROG_LGPL
121052         to decide whether to use strdup or xstrdup, concatenated_filename or
121053         xconcatenated_filename.
121055 2008-09-01  Bruno Haible  <bruno@clisp.org>
121057         Split module 'concat-filename' into 'concat-filename' (LGPL) and
121058         'xconcat-filename' (GPL).
121059         * modules/concat-filename (Depends-on): Add malloc-posix, remove xalloc.
121060         (License): Change to LGPLv2+.
121061         * modules/xconcat-filename: New file.
121062         * lib/concat-filename.h (concatenated_filename): Change specification.
121063         (xconcatenated_filename): New declaration.
121064         * lib/concat-filename.c: Include errno.h, stdlib.h, not xalloc.h.
121065         (concatenated_filename): Use malloc instead of xalloc. Handle out-of-
121066         memory situations.
121067         * lib/xconcat-filename.c: New file.
121068         * NEWS: Mention the change.
121069         * lib/findprog.c: Include concat-filename.h, not filename.h.
121070         (find_in_path): Use xconcatenated_filename instead of
121071         concatenated_filename.
121072         * lib/javacomp.c: Include concat-filename.h, not filename.h.
121073         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
121074         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
121075         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
121076         is_oldgcj_14_13_usable, is_javac_usable): Use xconcatenated_filename
121077         instead of concatenated_filename.
121078         * lib/javaexec.c: Include concat-filename.h, not filename.h.
121079         (execute_java_class): Use xconcatenated_filename instead of
121080         concatenated_filename.
121081         * modules/findprog (Depends-on): Add xconcat-filename, remove filename.
121082         * modules/javacomp (Depends-on): Likewise.
121083         * modules/javaexec (Depends-on): Likewise.
121085 2008-09-01  Bruno Haible  <bruno@clisp.org>
121087         Split module 'filename' into 'filename' and 'concat-filename'.
121088         * modules/filename: Keep only lib/filename.h.
121089         (License): Change to LGPLv2+.
121090         * modules/concat-filename: New file, extracted from modules/filename.
121091         * lib/filename.h (concatenated_filename): Remove declaration.
121092         * lib/concat-filename.h: New file, extracted from lib/filename.h.
121093         * lib/concat-filename.c: Include concat-filename.h.
121094         * NEWS: Mention the change.
121096 2008-09-01  Simon Josefsson  <simon@josefsson.org>
121098         * lib/bitrotate.h (rotl8, rotr8): Add.
121100         * modules/bitrotate (configure.ac): Need
121101         AC_REQUIRE([AC_C_INLINE]).
121102         (Description): Mention stdint.h.  Reported by Bruno Haible
121103         <bruno@clisp.org>.
121105         * lib/bitrotate.h (rotr16, rotl16): Fix mask value.  Reported by
121106         Paolo Bonzini <bonzini@gnu.org>.
121108 2008-08-31  Bruno Haible  <bruno@clisp.org>
121110         Assume Solaris specific bi-arch conventions on Solaris systems.
121111         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): On Solaris in 64-bit
121112         mode, set acl_libdirstem to lib/64. Also set acl_libdirstem2.
121113         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): If acl_libdirstem does not
121114         work, try acl_libdirstem2 as fallback. Otherwise treat acl_libdirstem2
121115         like acl_libdirstem.
121116         (AC_LIB_LINKFLAGS_FROM_LIBS): Treat acl_libdirstem2 like
121117         acl_libdirstem.
121118         * NEWS: Mention the change.
121119         Reported by Ben Taylor <bentaylor.solx86@gmail.com>.
121121 2008-08-31  Jim Meyering  <meyering@redhat.com>
121123         * lib/strftime.h: Add comments describing the two added arguments.
121125         remove duplicate #include directives
121126         * lib/chdir-long.c [TEST_CHDIR]: Remove duplicate #include <stdio.h>.
121127         * lib/putenv.c: Remove duplicate #include <stdlib.h>.
121129 2008-08-31  Bruno Haible  <bruno@clisp.org>
121131         New module 'sigpipe-die'.
121132         * modules/sigpipe-die: New file.
121133         * lib/sigpipe-die.h: New file.
121134         * lib/sigpipe-die.c: New file.
121135         * MODULES.html.sh (Signal handling): Add sigpipe-die.
121137 2008-08-31  Bruno Haible  <bruno@clisp.org>
121139         Don't override previously installed signal handlers.
121140         * lib/fatal-signal.c (saved_sigactions): New variable.
121141         (uninstall_handlers): Reset the signal to the saved handler, not
121142         to SIG_DFL (except when ignored).
121143         (install_handlers): Save the previous handlers.
121145 2008-08-30  Bruno Haible  <bruno@clisp.org>
121147         * gnulib-tool (func_reset_sigpipe): New function.
121148         (func_get_automake_snippet, func_modules_transitive_closure,
121149         func_import): Invoke it before a join command that reads from stdin,
121150         to avoid "echo: write error: Broken pipe" error messages on stderr.
121151         Reported by Sam Steingold <sds@gnu.org>.
121153 2008-08-30  Bruno Haible  <bruno@clisp.org>
121155         * m4/fopen.m4 (gl_FUNC_FOPEN): Test against bug with trailing slash.
121156         Code copied from m4/open.m4.
121157         * lib/fopen.c (rpl_fopen): Return NULL if the mode specifies write
121158         access and the filename ends in a slash. Code copied from lib/open.c.
121159         * doc/posix-functions/fopen.texi: Document bug with trailing slash.
121160         * tests/test-fopen.c (main): Check against bug with trailing slash.
121162 2008-08-29  Bruno Haible  <bruno@clisp.org>
121164         Avoid some "gcc -pedantic" warnings.
121165         * m4/include_next.m4 (gl_INCLUDE_NEXT): Set also PRAGMA_SYSTEM_HEADER.
121166         * lib/arpa_inet.in.h: Use PRAGMA_SYSTEM_HEADER.
121167         * lib/dirent.in.h: Likewise.
121168         * lib/fcntl.in.h: Likewise.
121169         * lib/float.in.h: Likewise.
121170         * lib/iconv.in.h: Likewise.
121171         * lib/inttypes.in.h: Likewise.
121172         * lib/locale.in.h: Likewise.
121173         * lib/math.in.h: Likewise.
121174         * lib/netinet_in.in.h: Likewise.
121175         * lib/search.in.h: Likewise.
121176         * lib/signal.in.h: Likewise.
121177         * lib/stdarg.in.h: Likewise.
121178         * lib/stdint.in.h: Likewise.
121179         * lib/stdio.in.h: Likewise.
121180         * lib/stdlib.in.h: Likewise.
121181         * lib/string.in.h: Likewise.
121182         * lib/strings.in.h: Likewise.
121183         * lib/sys_select.in.h: Likewise.
121184         * lib/sys_socket.in.h: Likewise.
121185         * lib/sys_stat.in.h: Likewise.
121186         * lib/sys_time.in.h: Likewise.
121187         * lib/sysexits.in.h: Likewise.
121188         * lib/time.in.h: Likewise.
121189         * lib/unistd.in.h: Likewise.
121190         * lib/wchar.in.h: Likewise.
121191         * lib/wctype.in.h: Likewise.
121192         * modules/arpa_inet (Makefile.am): Also substitute PRAGMA_SYSTEM_HEADER.
121193         * modules/fchdir (Makefile.am): Likewise.
121194         * modules/fcntl (Makefile.am): Likewise.
121195         * modules/float (Makefile.am): Likewise.
121196         * modules/iconv_open (Makefile.am): Likewise.
121197         * modules/inttypes (Makefile.am): Likewise.
121198         * modules/locale (Makefile.am): Likewise.
121199         * modules/math (Makefile.am): Likewise.
121200         * modules/netinet_in (Makefile.am): Likewise.
121201         * modules/search (Makefile.am): Likewise.
121202         * modules/signal (Makefile.am): Likewise.
121203         * modules/stdarg (Makefile.am): Likewise.
121204         * modules/stdint (Makefile.am): Likewise.
121205         * modules/stdio (Makefile.am): Likewise.
121206         * modules/stdlib (Makefile.am): Likewise.
121207         * modules/string (Makefile.am): Likewise.
121208         * modules/strings (Makefile.am): Likewise.
121209         * modules/sys_select (Makefile.am): Likewise.
121210         * modules/sys_socket (Makefile.am): Likewise.
121211         * modules/sys_stat (Makefile.am): Likewise.
121212         * modules/sys_time (Makefile.am): Likewise.
121213         * modules/sysexits (Makefile.am): Likewise.
121214         * modules/time (Makefile.am): Likewise.
121215         * modules/unistd (Makefile.am): Likewise.
121216         * modules/wchar (Makefile.am): Likewise.
121217         * modules/wctype (Makefile.am): Likewise.
121218         Reported by Reuben Thomas <rrt@sc3d.org>.
121220 2008-08-29  Bruno Haible  <bruno@clisp.org>
121222         * m4/include_next.m4 (gl_INCLUDE_NEXT): Don't define HAVE_INCLUDE_NEXT
121223         any more.
121225 2008-08-29  Simon Josefsson  <simon@josefsson.org>
121227         * MODULES.html.sh (Misc): Add bitrotate.
121229         * modules/bitrotate: New file.
121231         * lib/bitrotate.h: New file.
121233         * modules/bitrotate-tests: New file.
121235         * tests/test-bitrotate.c: New file.
121237         * modules/crypto/gc-arctwo, modules/crypto/arctwo: Add dependency
121238         on the bitrotate module.
121240         * lib/arctwo.c: Use new bitrotate module.
121242 2008-08-29  Jim Meyering  <meyering@redhat.com>
121244         bootstrap: merge changes from coreutils
121245         * build-aux/bootstrap (cp_mark_as_generated): Preserve perms
121246         of copied files.  Remove a kludge, now that this is fixed.
121247         * build-aux/bootstrap: Fix unportable expr usage. (by Ralf Wildenhues)
121248         * build-aux/bootstrap: Remove $bt and $bt2 also when not using gettext.
121249         * build-aux/bootstrap: Remove coreutils-specific SUBDIRS-related code.
121251 2008-08-29  Bruno Haible  <bruno@clisp.org>
121253         * MODULES.html.sh: Remove --cvs-urls option.
121255 2008-08-28  Jose E. Marchesi  <jemarch@gnu.org>  (tiny change)
121257         maint.mk: adjust to file name change
121258         * top/maint.mk: s/Makefile.cfg/cfg.mk/.
121260 2008-08-28  Jim Meyering  <meyering@redhat.com>
121262         * modules/getndelim2 (License): Relicense to LGPLv2+.
121263         Approved by Richard Stallman for the version of 1995, and by
121264         Paul Eggert, Bruno Haible, Eric Blake for their contributions.
121266 2008-08-27  Paolo Bonzini  <bonzini@gnu.org>
121268         * lib/getdelim.c (flockfile, funlockfile): Make all of them
121269         dummy if one is not available.  Do not touch them if
121270         USE_UNLOCKED_IO, instead letting unlocked-io.h do that.
121271         (getc_maybe_unlocked): New.
121272         * m4/getdelim.m4 (gl_PREREQ_GETDELIM): Check for getc_unlocked.
121274 2008-08-26  Eric Blake  <ebb9@byu.net>
121276         doc/INSTALL: resync from autoconf
121277         * doc/Makefile (INSTALL, INSTALL.ISO, INSTALL.UTF-8): Simplify.
121278         (INSTALL_PRELUDE): Delete; this is done more efficiently by
121279         moving...
121280         * install.texi [!autoconf]: ...here.  Resync from autoconf.
121281         * INSTALL: Regenerate.
121282         * INSTALL.ISO: New file.
121283         * INSTALL.UTF-8: Likewise.
121285 2008-08-26  Jim Meyering  <meyering@redhat.com>
121287         GNUmakefile: cfg.mk definitions override default autoreconf-rerun policy
121288         * top/GNUmakefile (_is-dist-target, _is-install-target): Make
121289         these definitions conditional, so that they may be overridden, too.
121291 2008-08-26  Bruno Haible  <bruno@clisp.org>
121293         Generate INSTALL file variants with prettier quotes.
121294         * doc/Makefile (INSTALL_PRELUDE): New macro.
121295         (INSTALL): Use it.
121296         (INSTALL.ISO, INSTALL.UTF-8): New rules.
121298 2008-08-26  Bruno Haible  <bruno@clisp.org>
121300         Run makeinfo in an English locale.
121301         * doc/Makefile (MAKEINFO): New variable.
121303 2008-08-26  Bruno Haible  <bruno@clisp.org>
121305         * doc/Makefile (INSTALL): Use --no-validate instead of --no-warn.
121306         Suggested by Eric Blake.
121308 2008-08-25  Bruno Haible  <bruno@clisp.org>
121310         * doc/Makefile (INSTALL): Generate with @firstparagraphindent set.
121312 2008-08-25  Eric Blake  <ebb9@byu.net>
121314         c-stack: test that stack overflow can be caught
121315         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Also check
121316         that platform allows handling stack overflow; at least OS/2 EMX
121317         has sigaltstack, but crashes before transferring control to
121318         handler on stack overflow.
121319         * lib/c-stack.c [HAVE_SIGALTSTACK]: Adjust conditions to also
121320         check for HAVE_STACK_OVERFLOW_HANDLING.
121321         Reported by Elbert Pol.
121323 2008-08-25  Bruno Haible  <bruno@clisp.org>
121325         * doc/posix-functions/strftime.texi: Fix description of strftime
121326         module.
121328 2008-08-24  Bruno Haible  <bruno@clisp.org>
121330         * tests/uniwidth/test-uc_width2.c: New file.
121331         * tests/uniwidth/test-uc_width2.sh: New file.
121332         * modules/uniwidth/width-tests (Files): Add the new files.
121333         (TESTS): Add uniwidth/test-uc_width2.sh.
121334         (TESTS_ENVIRONMENT): New variable.
121335         (check_PROGRAMS): Add test-uc_width2.
121336         (test_uc_width2_SOURCES): New variable.
121338         Fix uc_width(0x00AB) bug, introduced on 2007-07-08.
121339         * lib/uniwidth/width.c (nonspacing_table_data): Set bit for 0x00AD,
121340         not 0x00AB.
121341         Reported by Alexander V. Lukyanov <lav@netis.ru>.
121343 2008-08-22  Eric Blake  <ebb9@byu.net>
121345         test-lock, test-tls: mention why a test is skipped
121346         * tests/test-lock.c (main) [!USE_*_THREADS]: Print why test is
121347         skipped.
121348         * tests/test-tls.c (main) [!USE_*_THREADS]: Likewise.
121350         count-one-bits: relax license
121351         * modules/count-one-bits (License): Relicense to LGPLv2+.
121352         Suggested by Ludovic Courtès, approved by Ben Pfaff.
121354 2008-08-22  Andreas Schwab  <schwab@suse.de>
121356         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_POSIX):
121357         Remove spurious space in assignment.
121359 2008-08-21  Simon Josefsson  <simon@josefsson.org>
121361         * m4/autobuild.m4: Use TZ=UTC0 instead of TZ=UTC.  Reported by
121362         Paul Eggert <eggert@CS.UCLA.EDU>.
121364 2008-08-20  Paolo Bonzini  <bonzini@gnu.org>
121366         * modules/gettext: Add m4/threadlib.m4.
121368 2008-08-19  Eric Blake  <ebb9@byu.net>
121370         test-c-stack: fix compilation failure on FreeBSD 5.0
121371         * tests/test-c-stack.c [HAVE_SETRLIMIT]: Include prerequisite
121372         headers before <sys/resource.h>.
121373         * doc/posix-headers/sys_resource.texi (sys/resource.h): Document
121374         the bug.
121375         Reported by Nelson H. F. Beebe.
121377         strverscmp: migrate from "strverscmp.h" to <string.h>
121378         * modules/string (Makefile.am): Add new hooks.
121379         * modules/strverscmp (Files): Remove strverscmp.h.
121380         (Depends-on): Add string.
121381         (configure.ac): Add indicator.
121382         (Include): Mention new header.
121383         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Provide new
121384         defaults.
121385         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP): Inform string module of
121386         results.
121387         * lib/strverscmp.h: Delete.
121388         * lib/string.in.h (strverscmp): Provide declaration, when needed.
121389         * tests/test-strverscmp.c (includes): Adjust client.
121390         * lib/check-version.c (includes): Likewise.
121391         * NEWS: Document the change.
121393         strverscmp: add unit test
121394         * modules/strverscmp-tests: New file.
121395         * tests/test-strverscmp.c: Likewise.
121397 2008-08-19  Simon Josefsson  <simon@josefsson.org>
121399         * lib/gc-gnulib.c: Indentation cleanup.  Add some comments
121400         regarding Windows crypto stuff, from Mono.
121402 2008-08-19  Adam Strzelecki  <ono@java.pl>  (tiny change)
121404         * lib/gc-gnulib.c: Use CRYPT_VERIFY_CONTEXT.  Try to use Intel CSP
121405         if present, for intel RND.  Return error on failures.
121407 2008-08-18  Ben Pfaff  <blp@gnu.org>
121409         gitlog-to-changelog: give better diagnostic for failed pipe-open
121410         * build-aux/gitlog-to-changelog: Improve error message: suggest
121411         that the version of Git may be too old.
121413 2008-08-18  Simon Josefsson  <simon@josefsson.org>
121415         * m4/autobuild.m4: Use TZ=UTC to avoid time zone complexity.  Use
121416         ISO 8601 format.  Suggested by Greg Troxel <gdt@ir.bbn.com>.
121418 2008-08-18  Bruno Haible  <bruno@clisp.org>
121420         * lib/glthread/thread.h [USE_SOLARIS_THREADS]: Use thread_in_use(), not
121421         pthread_in_use().
121423 2008-08-18  Bruno Haible  <bruno@clisp.org>
121425         * lib/glthread/threadlib.c: Include <pthread.h>.
121427 2008-08-18  Bruno Haible  <bruno@clisp.org>
121429         * lib/glthread/lock.h [USE_SOLARIS_THREADS]: Fix
121430         glthread_recursive_lock_* macros.
121431         * lib/glthread/lock.c (glthread_recursive_lock_destroy_multithreaded):
121432         Fix syntax error.
121434 2008-08-18  Bruno Haible  <bruno@clisp.org>
121436         * lib/glthread/thread.c: Avoid forcing a context switch right after
121437         thread creation.
121439 2008-08-17  Bruno Haible  <bruno@clisp.org>
121441         * lib/glthread/thread.c: New file, based on code from tests/test-lock.c.
121442         * lib/glthread/thread.h: Provide Win32 specific implementation.
121443         * modules/thread (Files): Add lib/glthread/thread.c.
121444         (Depends-on): Add lock.
121445         (Makefile.am): Add glthread/thread.c to lib_SOURCES.
121447 2008-08-17  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
121449         New module 'yield'.
121450         * modules/yield: New file.
121451         * lib/glthread/yield.h: New file.
121452         * m4/yield.m4: New file.
121453         * MODULES.html.sh (Multithreading): Add yield.
121455 2008-08-17  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
121457         New module 'thread'.
121458         * modules/thread: New file.
121459         * lib/glthread/thread.h: New file.
121460         * m4/thread.m4: New file.
121461         * MODULES.html.sh (Multithreading): Add thread.
121463 2008-08-17  Bruno Haible  <bruno@clisp.org>
121465         * lib/glthread/lock.h: Include <stdlib.h> always.
121466         * lib/glthread/tls.h: Likewise.
121467         * lib/glthread/cond.h: Likewise.
121469 2008-08-17  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
121471         New module 'cond'.
121472         * modules/cond: New file.
121473         * lib/glthread/cond.h: New file.
121474         * lib/glthread/cond.c: New file.
121475         * m4/cond.m4: New file.
121476         * MODULES.html.sh (Multithreading): Add cond.
121478 2008-08-16  Eric Blake  <ebb9@byu.net>
121480         c-stack: fix regression on Irix 5.3 from 2008-06-21
121481         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Move check for
121482         sa_sigaction...
121483         * m4/sigaction.m4 (gl_PREREQ_SIG_HANDLER_H): ...here.
121484         (gl_PREREQ_SIGACTION): Depend on sig-handler.h prereq's.
121485         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Set the default.
121486         * modules/signal (Makefile.am): Use the value.
121487         * lib/signal.in.h (sa_sigaction) [HAVE_SIGACTION
121488         && !HAVE_STRUCT_SIGACTION_SA_SIGACTION]: Define.
121489         * doc/posix-headers/signal.texi (signal.h): Document this
121490         portability issue.
121491         * doc/posix-functions/sigaction.texi (sigaction): Likewise.
121492         Reported by Tom G. Christensen.
121494 2008-08-17  Bruno Haible  <bruno@clisp.org>
121496         New module 'threadlib'.
121497         * modules/threadlib: New file.
121498         * lib/glthread/threadlib.c: New file, extracted from
121499         lib/glthread/lock.c.
121500         * lib/glthread/lock.c (dummy_thread_func, glthread_in_use): Remove
121501         functions.
121502         * m4/threadlib.m4: New file, from m4/lock.m4, renaming gl_LOCK to
121503         gl_THREADLIB and gl_LOCK_EARLY to gl_THREADLIB_EARLY.
121504         * m4/lock.m4 (gl_LOCK_EARLY, gl_LOCK_EARLY_BODY, gl_LOCK_BODY): Remove
121505         macros.
121506         (gl_LOCK): Just require gl_THREADLIB and perform checks for lock.h.
121507         (gl_DISABLE_THREADS): Remove macro.
121508         * modules/lock (Files): Remove build-aux/config.rpath.
121509         (Depends-on): Remove havelib. Add threadlib.
121510         (configure.ac-early): Remove section.
121511         * m4/tls.m4 (gl_TLS): Require gl_THREADLIB instead of gl_LOCK.
121512         * modules/tls (Depends-on): Remove lock. Add threadlib.
121513         (Link): New section, copied from threadlib.
121514         * MODULES.html.sh (Multithreading): Add threadlib.
121516 2008-08-14  Bruno Haible  <bruno@clisp.org>
121518         * lib/glthread/lock.h (glthread_lock_lock, glthread_lock_unlock,
121519         glthread_lock_destroy, glthread_rwlock_rdlock, glthread_rwlock_wrlock,
121520         glthread_rwlock_unlock, glthread_rwlock_destroy,
121521         glthread_recursive_lock_lock, glthread_recursive_lock_unlock,
121522         glthread_recursive_lock_destroy): Define as macros always.
121523         * lib/glthread/lock.c (glthread_lock_lock_func): Renamed from
121524         glthread_lock_lock.
121525         (glthread_lock_unlock_func): Renamed from glthread_lock_unlock.
121526         (glthread_lock_destroy_func): Renamed from glthread_lock_destroy.
121527         (glthread_rwlock_rdlock_func): Renamed from glthread_rwlock_rdlock.
121528         (glthread_rwlock_wrlock_func): Renamed from glthread_rwlock_wrlock.
121529         (glthread_rwlock_unlock_func): Renamed from glthread_rwlock_unlock.
121530         (glthread_rwlock_destroy_func): Renamed from glthread_rwlock_destroy.
121531         (glthread_recursive_lock_lock_func): Renamed from
121532         glthread_recursive_lock_lock.
121533         (glthread_recursive_lock_unlock_func): Renamed from
121534         glthread_recursive_lock_unlock.
121535         (glthread_recursive_lock_destroy_func): Renamed from
121536         glthread_recursive_lock_destroy.
121538 2008-08-14  Bruno Haible  <bruno@clisp.org>
121540         * lib/glthread/lock.h: Renamed from lib/lock.h.
121541         * lib/glthread/lock.c: Renamed from lib/lock.c. Update includes.
121542         * lib/glthread/tls.h: Renamed from lib/tls.h.
121543         * lib/glthread/tls.c: Renamed from lib/tls.c. Update includes.
121544         * lib/fstrcmp.c: Update includes.
121545         * lib/strsignal.c: Update includes.
121546         * modules/lock (Files, Makefile.am): Update.
121547         (Include): Change to "glthread/lock.h".
121548         * modules/tls (Files, Makefile.am): Update.
121549         (Include): Change to "glthread/tls.h".
121550         * tests/test-lock.c: Update includes.
121551         * tests/test-tls.c: Update includes.
121552         * NEWS: Mention the renamed header files.
121554 2008-08-11  Jim Meyering  <meyering@redhat.com>
121556         * lib/fts_.h: Fix grammar (insert a missing "is") in a comment.
121558 2008-08-11  Eric Blake  <ebb9@byu.net>
121560         test-c-stack: avoid C99-ism
121561         * tests/test-c-stack.c (main): Fix whitespace, move declaration
121562         before statement.
121563         Reported by Alain Guibert.
121565 2008-08-10  Jim Meyering  <meyering@redhat.com>
121567         ensure that return value of uinttostr et al are not ignored
121568         * lib/inttostr.h (__GNUC_PREREQ): Define.
121569         (__attribute_warn_unused_result__): Define.
121570         (offtostr, imaxtostr, umaxtostr, uinttostr): Apply the attribute.
121572 2008-08-07  Paolo Bonzini  <bonzini@gnu.org>
121574         * lib/lock.c (glthread_recursive_lock_init_multithreaded)
121575         [!PTHREAD_RECURSIVE_MUTEX_INITIALIZER]: Fix typo.
121577 2008-08-07  Jim Meyering  <meyering@redhat.com>
121579         * m4/inet_pton.m4: Fix typo in comment: s/inet_ntop/inet_pton/.
121581         * modules/mkstemp (License): Relicense under LGPLv2+.
121582         * modules/tempname (License): Likewise.
121584 2008-08-06  Bruno Haible  <bruno@clisp.org>
121586         * lib/poll.c (poll): Further micro-optimization.
121588 2008-08-06  Jim Meyering  <meyering@redhat.com>
121590         inet_pton.c: use locale-independent tolower
121591         * lib/inet_pton.c: Include <c-ctype.h> rather than <ctype.h>.
121592         (inet_pton6): Use c_tolower rather than tolower.
121593         * modules/inet_pton (Depends-on): Add c-ctype.
121595 2008-08-06  Paolo Bonzini  <bonzini@gnu.org>
121597         * lib/poll.c (poll): Avoid division when timeout is 0, cache
121598         _SC_OPEN_MAX, avoid repeated access to errno.  Check for nfd < 0.
121600 2008-08-06  Jim Meyering  <meyering@redhat.com>
121602         * modules/inet_pton (License): Relicense under LGPLv2+.
121604 2008-08-03  Bruno Haible  <bruno@clisp.org>
121606         Additional non-aborting API for lock and tls.
121607         * lib/lock.h: Include <errno.h>.
121608         (glthread_lock_init): New macro/function.
121609         (gl_lock_init): Define as wrapper around glthread_lock_init.
121610         (glthread_lock_lock): New macro/function.
121611         (gl_lock_lock): Define as wrapper around glthread_lock_lock.
121612         (glthread_lock_unlock): New macro/function.
121613         (gl_lock_unlock): Define as wrapper around glthread_lock_unlock.
121614         (glthread_lock_destroy): New macro/function.
121615         (gl_lock_destroy): Define as wrapper around glthread_lock_destroy.
121616         (glthread_rwlock_init): New macro/function.
121617         (gl_rwlock_init): Define as wrapper around glthread_rwlock_init.
121618         (glthread_rwlock_rdlock): New macro/function.
121619         (gl_rwlock_rdlock): Define as wrapper around glthread_rwlock_rdlock.
121620         (glthread_rwlock_wrlock): New macro/function.
121621         (gl_rwlock_wrlock): Define as wrapper around glthread_rwlock_wrlock.
121622         (glthread_rwlock_unlock): New macro/function.
121623         (gl_rwlock_unlock): Define as wrapper around glthread_rwlock_unlock.
121624         (glthread_rwlock_destroy): New macro/function.
121625         (gl_rwlock_destroy): Define as wrapper around glthread_rwlock_destroy.
121626         (glthread_recursive_lock_init): New macro/function.
121627         (gl_recursive_lock_init): Define as wrapper around
121628         glthread_recursive_lock_init.
121629         (glthread_recursive_lock_lock): New macro/function.
121630         (gl_recursive_lock_lock): Define as wrapper around
121631         glthread_recursive_lock_lock.
121632         (glthread_recursive_lock_unlock): New macro/function.
121633         (gl_recursive_lock_unlock): Define as wrapper around
121634         glthread_recursive_lock_unlock.
121635         (glthread_recursive_lock_destroy): New macro/function.
121636         (gl_recursive_lock_destroy): Define as wrapper around
121637         glthread_recursive_lock_destroy.
121638         (glthread_once): New macro/function.
121639         (gl_once): Define as wrapper around glthread_once.
121640         Update function declarations.
121641         * lib/lock.c (glthread_rwlock_init_multithreaded): Renamed from
121642         glthread_rwlock_init. Return error code.
121643         (glthread_rwlock_rdlock_multithreaded): Renamed from
121644         glthread_rwlock_rdlock. Return error code.
121645         (glthread_rwlock_wrlock_multithreaded): Renamed from
121646         glthread_rwlock_wrlock. Return error code.
121647         (glthread_rwlock_unlock_multithreaded): Renamed from
121648         glthread_rwlock_unlock. Return error code.
121649         (glthread_rwlock_destroy_multithreaded): Renamed from
121650         glthread_rwlock_destroy. Return error code.
121651         (glthread_recursive_lock_init_multithreaded): Renamed from
121652         glthread_recursive_lock_init. Return error code.
121653         (glthread_recursive_lock_lock_multithreaded): Renamed from
121654         glthread_recursive_lock_lock. Return error code.
121655         (glthread_recursive_lock_unlock_multithreaded): Renamed from
121656         glthread_recursive_lock_unlock. Return error code.
121657         (glthread_recursive_lock_destroy_multithreaded): Renamed from
121658         glthread_recursive_lock_destroy. Return error code.
121659         (glthread_once_call): Make static.
121660         (glthread_once_multithreaded): Renamed from glthread_once.
121661         * lib/tls.h: Include <errno.h>.
121662         (glthread_tls_key_init): New macro/function.
121663         (gl_tls_key_init): Define as wrapper around glthread_tls_key_init.
121664         (glthread_tls_set): New macro/function.
121665         (gl_tls_set): Define as wrapper around glthread_tls_set.
121666         (glthread_tls_key_destroy): New macro/function.
121667         (gl_tls_key_destroy): Define as wrapper around glthread_tls_key_destroy.
121668         Update function declarations.
121669         * lib/tls.c (glthread_tls_get_multithreaded): Renamed from
121670         glthread_tls_get.
121671         Suggested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
121673 2008-08-04  Eric Blake  <ebb9@byu.net>
121675         gnumakefile: use space, not TAB, outside of targets
121676         * top/GNUmakefile (_dummy): Fix whitespace error in prior edit.
121678 2008-08-02  Jim Meyering  <meyering@redhat.com>
121680         getdate.y: avoid locale-dependent date parsing failure
121681         In Turkish locales, getdate would fail to recognize keywords
121682         containing a lowercase "i".  The solution is not to rely on
121683         locale-sensitive case-conversion.
121684         * lib/getdate.y: Include <c-ctype.h> rather than <ctype.h>.
121685         (lookup_word): Use c_toupper in place of toupper.
121686         (yylex, get_date): Use c_ prefixed variants of isspace and isalpha, too.
121687         Reported by Vefa Bicakci <bicave@superonline.com> in
121688         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/14184>.
121689         * modules/getdate (Depends-on): Add c-ctype.
121691 2008-08-02  Bruno Haible  <bruno@clisp.org>
121693         * gnulib-tool (func_import): When updating or creating a .gitignore
121694         file, prepend each added line with a slash, and ignore leading slashes
121695         from the existing lines.
121696         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
121698 2008-08-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
121700         Portability fix for GNU make 3.79.1.
121701         * top/GNUmakefile: Avoid 'else COND', which older GNU make
121702         versions do not understand.
121704 2008-08-01  Bruno Haible  <bruno@clisp.org>
121706         Work around bug of HP-UX 10.20 cc with -0.0 literal.
121707         * tests/test-isnanf.h (zero): New variable.
121708         (main): Avoid literal -0.0f.
121709         * tests/test-isnand.h (zero): New variable.
121710         (main): Avoid literal -0.0.
121711         * tests/test-isnanl.h (zero): New variable.
121712         (main): Avoid literal -0.0L.
121713         * tests/test-isnan.c (zerof, zerod, zerol): New variables.
121714         (test_float, test_double, test_long_double): Avoid literals -0.0f,
121715         -0.0, -0.0L.
121716         * tests/test-signbit.c (test_signbitf): Avoid literal -0.0f.
121717         (test_signbitd): Avoid literal -0.0.
121718         (test_signbitl): Avoid literal -0.0L.
121719         * tests/test-ceilf1.c (zero): New variable.
121720         (main): Avoid literal -0.0f.
121721         * tests/test-ceill.c (zero): New variable.
121722         (main): Avoid literal -0.0L.
121723         * tests/test-floorf1.c (zero): New variable.
121724         (main): Avoid literal -0.0f.
121725         * tests/test-floorl.c (zero): New variable.
121726         (main): Avoid literal -0.0L.
121727         * tests/test-roundf1.c (zero): New variable.
121728         (main): Avoid literal -0.0f.
121729         * tests/test-round1.c (zero): New variable.
121730         (main): Avoid literal -0.0.
121731         * tests/test-roundl.c (zero): New variable.
121732         (main): Avoid literal -0.0L.
121733         * tests/test-truncf1.c (zero): New variable.
121734         (main): Avoid literal -0.0f.
121735         * tests/test-trunc1.c (zero): New variable.
121736         (main): Avoid literal -0.0.
121737         * tests/test-truncl.c (zero): New variable.
121738         (main): Avoid literal -0.0L.
121739         * tests/test-frexp.c (zero): New variable.
121740         (main): Avoid literal -0.0.
121741         * tests/test-frexpl.c (zero): New variable.
121742         (main): Avoid literal -0.0L.
121743         * tests/test-ldexpl.c (zero): New variable.
121744         (main): Avoid literal -0.0L.
121745         * tests/test-snprintf-posix.h (have_minus_zero): Avoid literal -0.0.
121746         (zerod, zerol): New variables.
121747         (test_function): Avoid literals -0.0, -0.0L.
121748         * tests/test-sprintf-posix.h (have_minus_zero): Avoid literal -0.0.
121749         (zerod, zerol): New variables.
121750         (test_function): Avoid literals -0.0, -0.0L.
121751         * tests/test-vasnprintf-posix.c (have_minus_zero): Avoid literal -0.0.
121752         (zerod, zerol): New variables.
121753         (test_function): Avoid literals -0.0, -0.0L.
121754         * tests/test-vasprintf-posix.c (have_minus_zero): Avoid literal -0.0.
121755         (zerod, zerol): New variables.
121756         (test_function): Avoid literals -0.0, -0.0L.
121757         * tests/test-strtod.c (zero): New variable.
121758         (main): Avoid literal -0.0.
121759         Reported by Jonathan C. Patschke <jp@centtech.com>.
121761 2008-07-31  Jim Meyering  <meyering@redhat.com>
121763         sha256.h: correct definition of SHA224_DIGEST_SIZE
121764         * lib/sha256.h (SHA224_DIGEST_SIZE): Define to 28, not 24.
121765         Reported by Paulie Pena IV <paulie4@gmail.com>.
121766         Define as 224 / 8, rather than as a literal.
121767         (SHA256_DIGEST_SIZE): Define as 256/8 rather than equivalent literal.
121768         * lib/sha512.h (SHA384_DIGEST_SIZE): Likewise, define as equiv: 384/8.
121769         (SHA512_DIGEST_SIZE): Likewise, define as equivalent quotient: 512/8.
121771 2008-07-31  Bruno Haible  <bruno@clisp.org>
121773         * lib/regex_internal.h (BITSET_WORD_BITS): Make first conditional work
121774         on HP-UX 10.20 with "cc -Ae". Fix second conditional.
121775         Reported by Jonathan Patschke <jp@centtech.com>.
121777 2008-07-31  Bruno Haible  <bruno@clisp.org>
121779         * gnulib-tool (func_import): Make change from 2008-06-23 more robust.
121780         Reported by Paolo Bonzini <bonzini@gnu.org>.
121782 2008-07-30  Eric Blake  <ebb9@byu.net>
121784         test-strtod: allow compilation without -lm
121785         * tests/test-strtod.c (main): Avoid link dependence on fabs.
121786         Reported by Dennis Clarke <blastwave@gmail.com>.
121788 2008-07-28  Jim Meyering  <meyering@redhat.com>
121790         bootstrap: work also when there are no .po files in po/
121791         * build-aux/bootstrap (update_po_files): Complete the change
121792         that I began in bc960df8c789c878f1c1c54a28a3c2648dead8d9.
121794 2008-07-27  Jim Meyering  <meyering@redhat.com>
121796         * users.txt: Add zile.
121798 2008-07-26  Ben Pfaff  <blp@gnu.org>
121800         Add missing dependencies on new m4/exponent[fdl].m4 files.
121801         * modules/isnanf-nolibm: Add m4/exponentf.m4.
121802         * modules/isnand-nolibm: Add m4/exponentd.m4.
121803         * modules/isnanl-nolibm: Add m4/exponentl.m4.
121804         * modules/signbit-tests: Use m4/exponent[fdl].m4 instead of
121805         m4/isnan[fdl].m4, because the macros actually used moved.
121806         Reported by Jim Meyering.
121808 2008-07-14  Ben Pfaff  <blp@gnu.org>
121810         Add isinf module.
121811         * lib/isinf.c: New file.
121812         * lib/math.in.h: Define isinf macro if we have decided to replace
121813         it.
121814         * m4/isinf.m4: New file.
121815         * m4/math_h.m4: Initialize and substitute variables for isinf
121816         module.
121817         * modules/isinf: New file.
121818         * modules/isinf-tests: New file.
121819         * modules/math: Add substitutions for new module.
121820         * tests/test-isinf.c: New file.
121821         * doc/posix-functions/isinf.texi: Mention new module.
121822         * MODULES.html.sh: Mention new module.
121824 2008-07-14  Ben Pfaff  <blp@gnu.org>
121826         Factor out some macros for use by additional modules.
121827         * m4/isnanf.m4 (gl_FLOAT_EXPONENT_LOCATION): Move into new file
121828         exponentf.m4.
121829         * m4/isnand.m4 (gl_DOUBLE_EXPONENT_LOCATION): Move into new file
121830         exponentd.m4.
121831         * m4/isnanl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Move into new
121832         file exponentl.m4.
121833         * m4/exponentf.m4: New file.
121834         * m4/exponentd.m4: New file.
121835         * m4/exponentl.m4: New file.
121836         * modules/isnanf: Use new file m4/exponentf.m4.
121837         * modules/isnand: Use new file m4/exponentd.m4.
121838         * modules/isnanl: Use new file m4/exponentl.m4.
121840 2008-07-23  Ulrich Drepper  <drepper@redhat.com>
121842         mktime.c: normalize tp->tm_isdst value to -1/0/1.
121843         * lib/mktime.c (__mktime_internal): Normalize tp->tm_isdst value.
121844         Reported by Michael Ringe <Michael.Ringe@gmx.de> in
121845         <http://sourceware.org/bugzilla/show_bug.cgi?id=6723>.
121847         * lib/canonicalize-lgpl.c (__realpath): Avoid buffer overflow after
121848         readlink on platforms without PATH_MAX.
121850 2008-07-21  Eric Blake  <ebb9@byu.net>
121852         Warn, not fail, on stale version.
121853         * top/GNUmakefile (_curr-ver): Tone down previous patch.
121855         Don't allow installation with stale devel version number.
121856         * top/GNUmakefile (_is-install-target): New macro.
121857         (_curr-ver): Forbid installation with stale version number.
121859 2008-07-20  Bruno Haible  <bruno@clisp.org>
121861         * modules/c-stack-tests (Makefile.am): Add LIBSIGSEGV to
121862         TESTS_ENVIRONMENT.
121863         * tests/test-c-stack2.sh: React differently if LIBSIGSEGV is in use.
121865 2008-07-20  Bruno Haible  <bruno@clisp.org>
121867         * lib/c-stack.h (c_stack_action): Add documentation.
121868         * lib/c-stack.c (c_stack_action): Remove incomplete documentation.
121870 2008-07-20  Bruno Haible  <bruno@clisp.org>
121872         * modules/canonicalize-lgpl (License): Relicense under LGPLv2+.
121873         * modules/readlink (License): Likewise.
121875 2008-07-17  Eric Blake  <ebb9@byu.net>
121877         * modules/c-stack (Link): Fix typo.
121879         Make c-stack use libsigsegv, when available.
121880         * modules/c-stack (Depends-on): Add libsigsegv.
121881         * modules/c-stack-tests (Makefile.am): Link with libsigsegv, if
121882         needed.
121883         * lib/c-stack.c (SIGSTKSZ): Define fallback.
121884         (segv_handler, overflow_handler, c_stack_action)
121885         [HAVE_LIBSIGSEGV && !HAVE_XSI_STACK_OVERFLOW_HEURISTIC]: Add new
121886         implementation when libsigsegv is available, but only when using
121887         the library is necessary.
121888         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Add
121889         comment, explaining why XSI check fails on Linux.
121890         (gl_PREREQ_C_STACK): Supply LIBCSTACK, LTLIBCSTACK.
121891         * tests/test-c-stack2.sh: Tweak skip message.
121892         * NEWS: Document new link-time requirements.
121894 2008-07-16  Eric Blake  <ebb9@byu.net>
121896         c-stack: Expose false positives when not using libsigsegv.
121897         * modules/c-stack-tests (Files): Expand test.
121898         * tests/test-c-stack.c (main): Add means to conditionally trigger
121899         non-overflow SIGSEGV.
121900         * tests/test-c-stack2.sh: New file.
121902 2008-07-14  Bruno Haible  <bruno@clisp.org>
121904         * m4/libsigsegv.m4: Remove unneeded AC_PREREQ.
121905         Reported by Eric Blake.
121907 2008-07-14  Sam Steingold  <sds@gnu.org>
121908             Bruno Haible  <bruno@clisp.org>
121910         New module libsigsegv.
121911         * modules/libsigsegv: New file.
121912         * m4/libsigsegv.m4: New file, from GNU clisp sigsegv.m4 with
121913         modifications.
121914         * MODULES.html.sh (Signal handling): New section.
121916 2008-07-14  Bruno Haible  <bruno@clisp.org>
121918         * modules/unictype/ctype-* (Description): Add the word "function".
121919         Improves the resulting doc in MODULES.html.
121921 2008-07-12  Ben Pfaff  <blp@gnu.org>
121923         Add longlong module.
121924         * modules/longlong: New file.
121926 2008-07-12  Bruno Haible  <bruno@clisp.org>
121928         * m4/isnan.m4 (gl_ISNAN): When the replacement is used, set ISNAN_LIBM
121929         to empty.
121931 2008-07-10  Ben Pfaff  <blp@gnu.org>
121933         Add isnan module.
121934         * doc/posix-functions/isnan.texi: Mention new module.
121935         * lib/math.in.h: Define isnan macro if we have decided to replace
121936         it.
121937         * m4/isnan.m4: New file.
121938         * m4/isnanl.m4 (gl_FUNC_ISNANL): Factor out some code into new
121939         macro gl_BUILD_ISNANL so that isnan.m4 can use that functionality
121940         also.
121941         (gl_FUNC_ISNANL_NO_LIBM): Factor out same code, to reduce
121942         redundancy.
121943         * m4/math_h.m4: Initialize and substitute variables for isnan
121944         module.
121945         * modules/isnan: New file.
121946         * modules/isnan-tests: New file.
121947         * modules/math: Add substitutions for new module.
121948         * tests/test-isnan.c: New file.
121949         * MODULES.html.sh: Mention new module.
121951 2008-07-10  Ben Pfaff  <blp@gnu.org>
121953         Add isnanf module.
121954         * lib/isnanf.m4: New file.
121955         * m4/isnanf.m4 (gl_FUNC_ISNANF): New macro.
121956         (gl_HAVE_ISNANF_IN_LIBM): New macro.
121957         (gl_BUILD_ISNANF): New macro used by gl_FUNC_ISNANF,
121958         gl_FUNC_ISNANF_NO_LIBM, and gl_FUNC_ISNAN.
121959         * modules/isnanf: New file.
121960         * modules/isnanf-tests: New file.
121961         * modules/isnanf-nolibm-tests: Add tests/test-isnanf.h to list of
121962         files.
121963         * tests/test-isnanf-nolibm.c: factored most of its contents into
121964         new file tests/test-isnanf.h.
121965         * tests/test-isnanf.h: New file.
121966         * tests/test-isnanf.c: New file.
121967         * MODULES.html.sh: Mention new module.
121968         * doc/glibc-functions/isnanf.texi: Mention new module.
121970 2008-07-10  Ben Pfaff  <blp@gnu.org>
121972         Add isnand module.
121973         * lib/isnand.h: New file.
121974         * m4/isnand.m4 (gl_FUNC_ISNAND): New macro.
121975         (gl_FUNC_ISNAND_NO_LIBM): Split partially into new macro
121976         gl_HAVE_ISNAND_NO_LIBM so that gl_FUNC_ISNAND can use that
121977         functionality also.
121978         (gl_BUILD_ISNAND): New macro used by gl_FUNC_ISNAND,
121979         gl_FUNC_ISNAND_NO_LIBM, and gl_FUNC_ISNAN.
121980         (gl_HAVE_ISNAND_IN_LIBM): New macro.
121981         * modules/isnand: New file.
121982         * modules/isnand-tests: New file.
121983         * modules/isnand-nolibm-tests: Add tests/test-isnand.h to list of
121984         files.
121985         * tests/test-isnand-nolibm.c: factored most of its contents into
121986         new file tests/test-isnand.h.
121987         * tests/test-isnand.h: New file.
121988         * tests/test-isnand.c: New file.
121989         * MODULES.html.sh: Mention new module.
121991 2008-07-10  Ben Pfaff  <blp@gnu.org>
121993         * lib/isnanf.h: Rename lib/isnanf-nolibm.h.
121994         * lib/isnand.h: Rename lib/isnand-nolibm.h.
121995         * tests/test-isnanf.c: Rename tests/test-isnanf-nolibm.c.
121996         * tests/test-isnand.c: Rename tests/test-isnand-nolibm.c.
121997         * modules/isnanf-nolibm: Update references to renamed files.
121998         * modules/isnand-nolibm: Likewise.
121999         * modules/isnanf-nolibm-tests: Likewise.
122000         * modules/isnand-nolibm-tests: Likewise.
122001         * lib/frexp.c: Likewise.
122002         * lib/isfinite.c: Likewise.
122003         * lib/signbitd.c: Likewise.
122004         * lib/signbitf.c: Likewise.
122005         * lib/vasnprintf.c: Likewise.
122006         * tests/test-ceilf1.c: Likewise.
122007         * tests/test-ceilf2.c: Likewise.
122008         * tests/test-floorf1.c: Likewise.
122009         * tests/test-floorf2.c: Likewise.
122010         * tests/test-frexp.c: Likewise.
122011         * tests/test-round1.c: Likewise.
122012         * tests/test-round2.c: Likewise.
122013         * tests/test-roundf1.c: Likewise.
122014         * tests/test-strtod.c: Likewise.
122015         * tests/test-trunc1.c: Likewise.
122016         * tests/test-trunc2.c: Likewise.
122017         * tests/test-truncf1.c: Likewise.
122018         * tests/test-truncf2.c: Likewise.
122019         * NEWS: Mention the renamed header files.
122021 2008-07-11  Jim Meyering  <meyering@redhat.com>
122023         vc-list-files: make the last-resort awk code more portable
122024         * build-aux/vc-list-files: Don't rely on awk's "sub" command.
122025         /bin/awk from OpenSolaris 11's SUNWesu version 2008.03.22.10.56
122026         does not support it.
122028 2008-07-10  Eric Blake  <ebb9@byu.net>
122030         Work with tar's bootstrap.
122031         * gnulib-tool (func_emit_initmacro_end): Use m4_defn in the case
122032         where LIBSOURCES_DIR contains .#bootmp but must not be treated as
122033         an m4 comment.
122035 2008-07-09  Jim Meyering  <meyering@redhat.com>
122037         posix-shell.m4: fix typo that made this test malfunction
122038         * m4/posix-shell.m4: Remove capitalization in variable name.
122040 2008-07-08  Bruno Haible  <bruno@clisp.org>
122042         * m4/onceonly.m4: Update comments.
122043         Reported by Ben Pfaff <blp@cs.stanford.edu>.
122045 2008-07-04  Jim Meyering  <meyering@redhat.com>
122047         * users.txt: Add vc-dwim.
122048         (bison, coreutils): Use the gitweb URL.
122050 2008-07-03  Jim Meyering  <meyering@redhat.com>
122052         * users.txt: Add libffcall.  From Sam Steingold.
122054 2008-07-03  Ondřej Vašík  <ovasik@redhat.com>
122056         getdate.y: do not ignore TZ with relative day, month or year offset
122057         * lib/getdate.y (get_date): Move the tz-handling block to follow the
122058         relative-date-handling, since otherwise, the latter would clobber the
122059         sole output (an updated Start value) of the tz-handling block.
122060         * tests/test-getdate.c: Tests for the fix
122062 2008-07-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
122064         Recognize 'foo_LIBRARIES += libgnu.a'.
122065         * gnulib-tool (func_emit_lib_Makefile_am): Recognize if a
122066         makefile snippet has already specified an installation location,
122067         also using '+='.
122069 2008-07-02  Ondřej Vašík  <ovasik@redhat.com>
122071         getdate.y: factor out common actions
122072         * lib/getdate.y (apply_relative_time, set_hhmmss): New functions.
122073         Use them in place of open-coded actions.
122075 2008-07-01  Simon Josefsson  <simon@josefsson.org>
122077         Add self-test for getdate module.
122078         * modules/getdate-tests: New file.
122079         * tests/test-getdate.c: New file.
122081 2008-06-29  Bruno Haible  <bruno@clisp.org>
122083         * gnulib-tool (func_import): Put gnulib-comp.m4 into .cvsignore or
122084         .gitignore.
122085         Reported by Sylvain Beucler <beuc@beuc.net>.
122087 2008-06-29  Bruno Haible  <bruno@clisp.org>
122089         * doc/gnulib-tool.texi (VCS Issues): Mention --no-vc-files option.
122090         * m4/gnulib-tool.m4: Update to match current gnulib-tool.
122092 2008-06-29  Bruno Haible  <bruno@clisp.org>
122094         * gnulib-tool (func_import): Recommend to put gnulib-cache.m4 into
122095         EXTRA_DIST.
122096         Reported by Sylvain Beucler <beuc@beuc.net>.
122098 2008-06-26  Jim Meyering  <meyering@redhat.com>
122100         make several modules depend on the "open" module
122101         This provides slightly increased consistency when opening-for-write
122102         the name of a non-directory spelled with a trailing slash.
122103         * modules/chdir-safer: Likewise.
122104         * modules/chown: Likewise.
122105         * modules/clean-temp: Likewise.
122106         * modules/copy-file: Likewise.
122107         * modules/fchdir: Likewise.
122108         * modules/fcntl-safer: Likewise.
122109         * modules/pipe: Likewise.
122110         * modules/utime: Likewise.
122111         Prompted by Eric Blake and Bruno Haible.
122113 2008-06-24  Andreas Schwab  <schwab@suse.de>
122115         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Don't test whether compound
122116         literals can be used as initializers for global variables.
122118 2008-06-23  Eric Blake  <ebb9@byu.net>
122120         Make gnulib-cache.m4 easier to diff.
122121         * gnulib-tool (func_import): Allow newlines when reading cached
122122         gl_MODULES, and generate newlines when creating gnulib-cache.m4.
122124 2008-06-23  Bruno Haible  <bruno@clisp.org>
122126         * m4/signalblocking.m4 (gl_PREREQ_SIG_HANDLER_H): Remove macro.
122127         (gl_PREREQ_SIGPROCMASK): Don't invoke it.
122128         * m4/sigaction.m4 (gl_PREREQ_SIG_HANDLER_H): New macro, moved here from
122129         m4/signalblocking.m4.
122130         (gl_PREREQ_SIGACTION): Don't invoke it.
122131         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Invoke
122132         gl_PREREQ_SIG_HANDLER_H.
122133         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Likewise.
122134         Don't check for sigaction here.
122136 2008-06-23  Bruno Haible  <bruno@clisp.org>
122138         * lib/fatal-signal.c (fatal_signal_handler): Update comment.
122139         (install_handlers): Don't set the SA_RESETHAND flag.
122141 2008-06-23  Bruno Haible  <bruno@clisp.org>
122143         * m4/sigaction.m4: Comment fixes.
122144         * lib/signal.in.h: Likewise.
122146 2008-06-23  Eric Blake  <ebb9@byu.net>
122148         Fix typo.
122149         * tests/test-sigaction.c (MASK_SA_FLAGS): Add missing operator.
122151         Avoid SA_ namespace.
122152         * tests/test-sigaction.c (MASK_SA_FLAGS): Rename from SA_MASK.
122153         Reported by Ralf Wildenhues.
122155         Avoid test failure due to SA_RESTORER.
122156         * tests/test-sigaction.c (SA_MASK): New macro.
122157         (main): Avoid failing due to extension flags being set.
122158         Reported by Jim Meyering.
122160         Revert use of sig-handler.h in sigprocmask.c.
122161         * modules/sigprocmask (Files): Don't rely on sig-handler.h, since
122162         it requires the existence of struct sigaction.
122163         * lib/sigprocmask.c (handler_t): Restore typedef.
122164         (rpl_signal, old_handlers): Use local type.
122166 2008-06-22  Bruno Haible  <bruno@clisp.org>
122168         * tests/test-stdint.c: Disable the INTMAX_MAX preprocessor test
122169         conditionally.
122170         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
122172 2008-06-22  Bruno Haible  <bruno@clisp.org>
122174         * doc/posix-functions/siginterrupt.texi: Move note.
122176         * lib/signal.in.h (SA_RESTART): New macro.
122177         * lib/sigaction.c: Update comment.
122179         * m4/sigaction.m4 (gl_SIGACTION): Require gl_SIGNAL_H_DEFAULTS.
122181         * m4/signalblocking.m4 (gl_PREREQ_SIG_HANDLER_H): New macro.
122182         (gl_PREREQ_SIGPROCMASK): Invoke it.
122183         * m4/sigaction.m4 (gl_PREREQ_SIGACTION): Likewise.
122185         * lib/nanosleep.c (rpl_nanosleep): Setup newact only when it is needed.
122187         * lib/sigprocmask.c: Update a comment.
122189 2008-06-21  Eric Blake  <ebb9@byu.net>
122191         Use sigaction module rather than signal().
122192         * modules/c-stack (Depends-on): Add sigaction.
122193         * modules/fatal-signal (Depends-on): Likewise.
122194         * modules/nanosleep (Depends-on): Likewise.
122195         * modules/sigprocmask (Files): Add sig-handler.h.
122196         * modules/sigaction (Files): Likewise.
122197         * lib/sig-handler.h (get_handler): New file, suggested by Paul
122198         Eggert.
122199         * lib/c-stack.c (SIGACTION_WORKS): Simplify conditions.
122200         (c_stack_action) [!SIGACTION_WORKS]: Use sigaction, not signal.
122201         * lib/fatal-signal.c (uninstall_handlers, install_handlers)
122202         (init_fatal_signals): Likewise.
122203         * lib/nanosleep.c (rpl_nanosleep): Likewise.
122204         (siginterrupt): Delete fallback.
122205         * lib/sigprocmask.c (handler_t, old_handlers): Use sa_handler_t
122206         instead.
122207         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Drop check for
122208         siginterrupt.
122210         New module sigaction, for mingw.
122211         * modules/sigaction: New module...
122212         * modules/sigaction-tests: ...and its test.
122213         * m4/sigaction.m4: New file.
122214         * lib/sigaction.c: Likewise.
122215         * tests/test-sigaction.c: Likewise.
122216         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Add sigaction variables.
122217         * modules/signal (Makefile.am): Likewise.
122218         * lib/signal.in.h (!@HAVE_SIGACTION@): Define replacements when
122219         needed.
122220         * doc/posix-headers/signal.texi (signal.h): Mention provided
122221         types.
122222         * doc/posix-functions/siginterrupt.texi (siginterrupt): Mention
122223         that sigaction is preferable.
122224         * doc/posix-functions/sigaction.texi (sigaction): Mention new
122225         module.
122226         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
122227         sigaction.
122229         Improve robustness of sigprocmask by overriding signal.
122230         * lib/signal.in.h (rpl_signal): Override signal when sigprocmask
122231         is in use.
122232         * lib/sigprocmask.c (blocked_handler): Reinstall block handler.
122233         (SIGKILL, SIGSTOP): Provide fallbacks.
122234         (rpl_signal): Implement.
122235         (old_handlers, blocked_set): Mark volatile, since sigprocmask and
122236         signal can be called inside handlers.
122238         Fix nanosleep module on mingw.
122239         * modules/nanosleep (Depends-on): Add sys_select.
122240         * lib/nanosleep.c (HAVE_SYS_SELECT_H): Rely on gnulib module.
122242         Fix licensing of sigprocmask.
122243         * modules/raise (License): Relicense as LGPL.
122245 2008-06-21  Bruno Haible  <bruno@clisp.org>
122247         * lib/propername.c (proper_name_utf8): Don't use the transliterated
122248         result if it contains question marks.
122249         Reported by Michael Geng <linux@michaelgeng.de>.
122251 2008-06-19  Bruno Haible  <bruno@clisp.org>
122253         Fix CVS-ism.
122254         * doc/gnulib.texi: Include updated-stamp.texi.
122255         * doc/Makefile (GNULIB_TEXI_FILES): New variable.
122256         (updated-stamp.texi): New rule.
122257         (gnulib.info): Depend on it.
122258         * doc/.gitignore: Add updated-stamp.texi.
122259         Based on a patch by Thien-Thi Nguyen <ttn@gnuvola.org>.
122261 2008-06-19  Bruno Haible  <bruno@clisp.org>
122263         * doc/Makefile (gnulib.info): Update and simplify dependencies.
122264         Reported by Thien-Thi Nguyen <ttn@gnuvola.org>.
122266 2008-06-19  Eric Blake  <ebb9@byu.net>
122268         Fix VPATH 'make dist' with GNU make and non-VCS tarball.
122269         * top/GNUmakefile (_curr-ver): Don't use $(srcdir) unnecessarily.
122270         Reported by Stepan Kasal.
122272 2008-06-18  Bruno Haible  <bruno@clisp.org>
122274         * lib/fatal-signal.c (init_fatal_signals): Add comment.
122275         Reported by Eric Blake.
122277 2008-06-18  Eric Blake  <ebb9@byu.net>
122279         Work around cygwin 1.5.25 strsignal bug.
122280         * tests/test-strsignal.c: Allow for const char *.
122281         * doc/glibc-functions/strsignal.texi (strsignal): Document the bug.
122283 2008-06-18  Simon Josefsson  <simon@josefsson.org>
122285         * users.txt: Update URL to article and add author/date
122286         information.
122288 2008-06-17  Bruno Haible  <bruno@clisp.org>
122290         New macro gl_DISABLE_THREADS.
122291         * m4/lock.m4 (gl_LOCK_EARLY_BODY): Use value gl_use_threads_default
122292         if the user did not pass --enable-threads or --disable-threads option.
122293         (gl_DISABLE_THREADS): New macro.
122294         Reported by Eric Blake <ebb9@byu.net>.
122296 2008-06-17  Bruno Haible  <bruno@clisp.org>
122298         * lib/tls.h (gl_tls_key_init): Evaluate the destructor argument also
122299         when the macro ignores it.
122300         Based on a patch by Eric Blake <ebb9@byu.net>.
122302 2008-06-17  Bruno Haible  <bruno@clisp.org>
122304         * modules/tls (License): Change to LGPLv2+.
122305         Reported by Eric Blake.
122307 2008-06-17  Eric Blake  <ebb9@byu.net>
122309         Simplify c-stack prerequisites.
122310         * lib/c-stack.c (includes): Remove unused <sys/resource.h>.
122311         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Posix 200x
122312         no longer requires <ucontext.h> to exist.  Optimize setrlimit
122313         check.
122314         (gl_PREREQ_C_STACK): Remove check for unused getcontext and
122315         <sys/resource.h>.
122317         Move c-stack test into testsuite.
122318         * modules/c-stack-tests: New file.
122319         * lib/c-stack.c [DEBUG]: Move test program...
122320         * tests/test-c-stack.c: ...into this new file.  Skip rather than
122321         fail test if sigaltstack is lacking.
122322         * tests/test-c-stack.sh: New driver file.
122324 2008-06-16  Eric Blake  <ebb9@byu.net>
122326         Use raise module consistently.
122327         * modules/fatal-signal (Depends-on): Add raise.
122328         * modules/sigprocmask (Depends-on): Likewise.
122329         * lib/fatal-signal.c (fatal_signal_handler): Rely on raise.
122330         * lib/sigprocmask.c (sigprocmask): Likewise.
122331         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Likewise.
122332         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Likewise.
122334         Fix compliance bug in sigpending.
122335         * lib/sigprocmask.c (sigpending): Return pending array via
122336         parameter, not return value.
122338 2008-06-14  Eric Blake  <ebb9@byu.net>
122340         Improve obstack-printf test code.
122341         * tests/test-obstack-printf.c (test_function): Fix comment, and
122342         simplify usage of obstack_* in macros.  Add a test for coverage.
122343         Reported by Bruno Haible.
122345 2008-06-14  Bruno Haible  <bruno@clisp.org>
122347         * lib/obstack_printf.c (obstack_vprintf): Define the stack-allocated
122348         array size as a constant, not as a const variable.
122349         * m4/obstack-printf.m4 (gl_FUNC_OBSTACK_PRINTF): Require
122350         AC_USE_SYSTEM_EXTENSIONS.
122351         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_POSIX): Likewise.
122352         Test whether the obstack_printf function actually exists.
122353         * modules/obstack-printf (Depends-on): Add extensions.
122354         (Include): Remove obstack.h.
122355         * modules/obstack-printf-posix (Depends-on): Add extensions.
122356         (Include): Remove obstack.h.
122358 2008-06-13  Eric Blake  <ebb9@byu.net>
122360         Add obstack-printf and obstack-printf-posix modules.
122361         * modules/obstack-printf: New file.
122362         * modules/obstack-printf-posix: Likewise.
122363         * MODULES.html.sh (Misc): Mention them.
122364         * doc/glibc-functions/obstack_printf.texi (obstack_printf):
122365         Likewise.
122366         * doc/glibc-functions/obstack_vprintf.texi (obstack_vprintf):
122367         Likewise.
122368         * modules/stdio (Makefile.am): Accomodate new modules.
122369         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
122370         * lib/stdio.in.h (rpl_obstack_printf, rpl_obstack_vprintf):
122371         Declare.
122372         * lib/obstack_printf.c (obstack_printf, obstack_vprintf): New
122373         functions.
122374         * m4/obstack-printf.m4 (gl_OBSTACK_PRINTF)
122375         (gl_REPLACE_OBSTACK_PRINTF): New macros
122376         * m4/obstack-printf-posix.m4 (gl_OBSTACK_PRINTF_POSIX): Likewise.
122377         * tests/test-obstack-printf.c: New file.
122378         * modules/obstack-printf-tests: Likewise.
122379         * modules/obstack-printf-posix-tests: Likewise.
122381 2008-06-11  Bruno Haible  <bruno@clisp.org>
122383         * m4/open.m4 (gl_FUNC_OPEN): Add test against trailing slash bug.
122384         * lib/open.c: Include errno.h.
122385         (open): Fail when attempting to write to a file that has a trailing
122386         slash.
122387         * tests/test-open.c (main): Test against trailing slash bug.
122388         * doc/posix-functions/open.texi: Mention the trailing slash bug.
122390 2008-06-10  Bruno Haible  <bruno@clisp.org>
122392         * tests/test-vc-list-files-git.sh: Make double use of 'exit'. Needed
122393         for $? to work inside the trap command, with various /bin/sh-s.
122394         * tests/test-vc-list-files-cvs.sh: Likewise.
122396 2008-06-10  Bruno Haible  <bruno@clisp.org>
122398         * lib/acl-internal.h: Don't include gettext.h here.
122399         * lib/set-mode-acl.c: Include gettext.h here.
122400         * lib/copy-acl.c: Likewise.
122402 2008-06-10  Bruno Haible  <bruno@clisp.org>
122404         * lib/wait-process.h (wait_subprocess): Add termsigp argument.
122405         * lib/wait-process.c (wait_subprocess): Likewise.
122406         * lib/execute.h (execute): Add termsigp argument.
122407         * lib/execute.c (execute): Likewise.
122408         * lib/csharpcomp.c (compile_csharp_using_pnet,
122409         compile_csharp_using_mono, compile_csharp_using_sscli): Update.
122410         * lib/csharpexec.c (execute_csharp_using_pnet,
122411         execute_csharp_using_mono, execute_csharp_using_sscli): Update.
122412         * lib/javacomp.c (compile_using_envjavac, compile_using_gcj,
122413         compile_using_javac, compile_using_jikes, is_envjavac_gcj,
122414         is_envjavac_gcj43, is_gcj_present, is_gcj_43, is_javac_present,
122415         is_jikes_present): Update.
122416         * lib/javaexec.c (execute_java_class): Update.
122417         * lib/javaversion.c (execute_and_read_line): Update.
122418         * NEWS: Document the changes.
122419         Reported by Eric Blake.
122421 2008-06-10  Eric Blake  <ebb9@byu.net>
122423         Add missing include.
122424         * tests/test-strstr.c (includes): Add <signal.h>.
122425         * tests/test-strcasestr.c (includes): Likewise.
122426         * tests/test-memmem.c (includes): Likewise.
122428 2008-06-10  Bruno Haible  <bruno@clisp.org>
122430         * lib/wait-process.c (wait_subprocess): Add an assertion.
122432 2008-06-10  Bruno Haible  <bruno@clisp.org>
122434         * lib/wait-process.c (wait_subprocess): Try to fix waitid() based code.
122436 2008-06-10  Bruno Haible  <bruno@clisp.org>
122438         * tests/test-memmem.c (main): Reset SIGALRM to default handling before
122439         using alarm().
122440         * tests/test-strcasestr.c (main): Likewise.
122441         * tests/test-strstr.c (main): Likewise.
122443 2008-06-09  Bruno Haible  <bruno@clisp.org>
122445         Work around the Solaris 10 ACE ACLs ABI change.
122446         * lib/acl-internal.h (acl_nontrivial, acl_ace_nontrivial): Don't
122447         declare if ACL_NO_TRIVIAL is present.
122448         (ACE_ACCESS_ALLOWED_ACE_TYPE, ACE_ACCESS_DENIED_ACE_TYPE,
122449         NEW_ACE_OWNER, NEW_ACE_GROUP, NEW_ACE_IDENTIFIER_GROUP, ACE_EVERYONE,
122450         NEW_ACE_READ_DATA, NEW_ACE_WRITE_DATA, NEW_ACE_EXECUTE): New macros.
122451         * lib/file-has-acl.c (acl_nontrivial, acl_ace_nontrivial): Don't
122452         define if ACL_NO_TRIVIAL is present.
122453         (acl_ace_nontrivial): Detect whether the old or new ABI is in use,
122454         and use the current ABI.
122455         (file_has_acl): Use same #if condition as elsewhere.
122456         * lib/set-mode-acl.c (qset_acl): Detect whether the old or new ABI is
122457         in use, and use the current ABI.
122458         * doc/acl-resources.txt: More doc about newer Solaris 10 versions.
122459         Reported by Jim Meyering.
122461 2008-06-09  Eric Blake  <ebb9@byu.net>
122463         Work around environments that (stupidly) ignore SIGALRM.
122464         * m4/strstr.m4 (gl_FUNC_STRSTR): Reset SIGALRM to default handling
122465         before using alarm().
122466         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
122467         * m4/memmem.m4 (gl_FUNC_MEMMEM): Likewise.
122468         Reported by Ian Beckwith <ianb@erislabs.net>.
122470         Produce autobuild blurb earlier in log.
122471         * modules/autobuild (configure.ac-early): Move AB_INIT here.
122473 2008-06-09  Jim Meyering  <meyering@redhat.com>
122474         and Ondřej Vašík  <ovasik@redhat.com>
122476         utimens.c: correct kernel bug work-around
122477         Ondřej Vašík found that the invalid return value of 280 indicates
122478         failure, not success, and the kernel bug we're trying to work
122479         around affects not just the utimensat call, but also the fallback
122480         futimens call.
122481         * lib/utimens.c (gl_futimens) [HAVE_UTIMENSAT]: Simulate failure,
122482         not success.
122483         [HAVE_FUTIMENS]: Use the same work-around, here.
122485 2008-06-09  Jim Meyering  <meyering@redhat.com>
122487         add more guards around definition of ACE_-related code
122488         * lib/file-has-acl.c (acl_ace_nontrivial): Define only if
122489         ALLOW and ACE_OWNER are also defined.
122491 2008-06-08  Bruno Haible  <bruno@clisp.org>
122493         * lib/acl-internal.h: Add me as co-author.
122494         * lib/file-has-acl.c: Likewise.
122495         * lib/set-mode-acl.c: Likewise.
122496         * lib/copy-acl.c: Likewise.
122498 2008-06-08  Bruno Haible  <bruno@clisp.org>
122500         Add support for AIX ACLs.
122501         * lib/acl-internal.h (acl_nontrivial): New declaration.
122502         * lib/file-has-acl.c (acl_nontrivial): New function.
122503         (file_has_acl): Add implementation using AIX 4 ACL API.
122504         * lib/set-mode-acl.c (qset_acl): Likewise.
122505         * lib/copy-acl.c (qcopy_acl): Likewise.
122507 2008-06-08  Bruno Haible  <bruno@clisp.org>
122509         Add support for HP-UX ACLs.
122510         * lib/acl-internal.h (acl_nontrivial): New declaration.
122511         * lib/file-has-acl.c (acl_nontrivial): New function.
122512         (file_has_acl): Add implementation using HP-UX 11 ACL API.
122513         * lib/set-mode-acl.c (qset_acl): Likewise.
122514         * lib/copy-acl.c (qcopy_acl): Likewise.
122516 2008-06-08  Bruno Haible  <bruno@clisp.org>
122518         Add support for Cygwin ACLs.
122519         * lib/acl-internal.h (MODE_INSIDE_ACL): New macro for Solaris-like API.
122520         * lib/set-mode-acl.c (qset_acl) [!MODE_INSIDE_ACL]: Don't optimize away
122521         the chmod_or_fchmod call.
122522         * lib/copy-acl.c (qcopy_acl) [!MODE_INSIDE_ACL]: Likewise.
122524 2008-06-08  Bruno Haible  <bruno@clisp.org>
122526         Fix bug with setuid modes in Solaris 10+ code.
122527         * lib/set-mode-acl.c (qset_acl): Call chmod_or_fchmod when acl_set
122528         succeeded, when the mode contains some special bits.
122530 2008-06-08  Bruno Haible  <bruno@clisp.org>
122532         Add support for Solaris 7..10 ACLs.
122533         * lib/acl-internal.h (acl_nontrivial, acl_ace_nontrivial): New
122534         declarations.
122535         * lib/file-has-acl.c (acl_nontrivial, acl_ace_nontrivial): New
122536         functions.
122537         (file_has_acl): Add implementation using Solaris 7..10 ACL API.
122538         * lib/set-mode-acl.c (qset_acl): Likewise.
122539         * lib/copy-acl.c (qcopy_acl): Likewise.
122541 2008-06-08  Bruno Haible  <bruno@clisp.org>
122543         * lib/acl-internal.h (acl_extended_nontrivial) [MacOS X]: New
122544         declaration.
122545         * lib/file-has-acl.c (acl_extended_nontrivial) [MacOS X]: New function.
122546         (acl_access_nontrivial): Remove MacOS X case.
122547         (file_has_acl): Use acl_extended_nontrivial.
122548         * lib/copy-acl.c (qcopy_acl): Likewise.
122550 2008-06-08  Bruno Haible  <bruno@clisp.org>
122552         * lib/set-mode-acl.c (qset_acl): Trivial code simplifications.
122554 2008-06-08  Jim Meyering  <meyering@redhat.com>
122556         * modules/acl (Maintainer): Add Bruno Haible.
122558 2008-06-07  Bruno Haible  <bruno@clisp.org>
122560         Improve support for Tru64 ACLs.
122561         * lib/file-has-acl.c (file_has_acl): Don't test the ACL_TYPE_DEFAULT
122562         ACL on OSF/1.
122564 2008-06-07  Bruno Haible  <bruno@clisp.org>
122566         Add support for MacOS X ACLs.
122567         * lib/file-has-acl.c (file_has_acl): Use ACL_TYPE_EXTENDED instead of
122568         ACL_TYPE_ACCESS and ACL_TYPE_DEFAULT.
122569         * lib/set-mode-acl.c (qset_acl): Likewise.
122570         * lib/copy-acl.c (qcopy_acl): Likewise.
122572 2008-06-07  Bruno Haible  <bruno@clisp.org>
122574         Fix memory leak introduced on 2008-05-22.
122575         * lib/set-mode-acl.c (qset_acl) [!MODE_INSIDE_ACL]: Free ACLs after
122576         use.
122578 2008-06-07  Bruno Haible  <bruno@clisp.org>
122580         * lib/set-mode-acl.c (qset_acl): Use acl_init(), not acl_from_text(),
122581         to construct an empty ACL.
122583 2008-06-07  Bruno Haible  <bruno@clisp.org>
122585         * lib/set-mode-acl.c (chmod_or_fchmod): Document return value
122586         precisely.
122587         * lib/copy-acl.c (qcopy_acl): Trivial code simplifications.
122589 2008-06-07  Bruno Haible  <bruno@clisp.org>
122591         * lib/copy-acl.c (qcopy_acl): Make the #if branches independent.
122592         * lib/set-mode-acl.c (qset_acl): Choose better local variable names.
122594 2008-06-07  Bruno Haible  <bruno@clisp.org>
122596         * doc/posix-functions/_setjmp.texi: Explain the use of this function
122597         regardless of POSIX.
122598         * doc/posix-functions/_longjmp.texi: Likewise.
122599         * doc/posix-functions/setjmp.texi: Mention HP-UX as not counting as a
122600         SystemV platform in this case.
122602 2008-06-06  Eric Blake  <ebb9@byu.net>
122604         Document abort() bugs.
122605         * doc/posix-functions/abort.texi (abort): Mention anomalies.
122607         * doc/posix-functions/setjmp.texi (setjmp): Mingw has setjmp.
122608         * doc/posix-functions/sigsetjmp.texi (sigsetjmp): Cygwin has
122609         sigsetjmp.
122610         * doc/posix-functions/siglongjmp.texi (siglongjmp): Cygwin has
122611         siglongjmp, but only as a macro.
122612         * doc/posix-functions/_longjmp.texi (_longjmp): Mention that this
122613         is obsolete.
122614         * doc/posix-functions/_setjmp.texi (_setjmp): Likewise.
122616         Tweak documentation to cover cygwin argz bugs.
122617         * m4/argz.m4 (gl_FUNC_ARGZ): Mention date of last known cygwin
122618         argz bug fix; no code change needed since no cygwin releases
122619         occurred between the last fix and the bug being tested.
122620         * doc/glibc-functions/argz_add.texi (argz_add): Document the argz
122621         module and recently fixed cygwin bugs.
122622         * doc/glibc-functions/argz_add_sep.texi (argz_add_sep): Likewise.
122623         * doc/glibc-functions/argz_append.texi (argz_append): Likewise.
122624         * doc/glibc-functions/argz_count.texi (argz_count): Likewise.
122625         * doc/glibc-functions/argz_create.texi (argz_create): Likewise.
122626         * doc/glibc-functions/argz_create_sep.texi (argz_create_sep):
122627         Likewise.
122628         * doc/glibc-functions/argz_delete.texi (argz_delete): Likewise.
122629         * doc/glibc-functions/argz_extract.texi (argz_extract): Likewise.
122630         * doc/glibc-functions/argz_insert.texi (argz_insert): Likewise.
122631         * doc/glibc-functions/argz_next.texi (argz_next): Likewise.
122632         * doc/glibc-functions/argz_replace.texi (argz_replace): Likewise.
122633         * doc/glibc-functions/argz_stringify.texi (argz_stringify):
122634         Likewise.
122636         Avoid gcc warning on cygwin.
122637         * lib/copy-acl.c (qcopy_acl) [!HAVE_ACL_GET_FILE &&
122638         !ACL_NO_TRIVIAL]: Avoid unused variable.
122640 2008-06-05  Eric Blake  <ebb9@byu.net>
122642         Be tolerant of UNKNOWN version in gnulib-tool test dir.
122643         * top/GNUmakefile (_dummy): Warn rather than reconfigure if
122644         git-version-gen fails to come up with a version.
122645         Reported by Simon Josefsson.
122647 2008-06-05  Jim Meyering  <meyering@redhat.com>
122648             Paul Eggert  <eggert@cs.ucla.edu>
122650         utimens.c: work around a probable Linux kernel bug
122651         * lib/utimens.c (gl_futimens) [HAVE_UTIMENSAT]: Work around what
122652         appears to be a kernel bug that causes utimensat to return 280
122653         instead of 0, indicating success.
122655 2008-06-04  Bruno Haible  <bruno@clisp.org>
122657         * lib/copy-acl.c (qcopy_acl): Call qset_acl, not set_acl. Fixes
122658         2008-06-01 commit.
122660 2008-06-04  Bruno Haible  <bruno@clisp.org>
122662         * lib/acl-internal.h (acl_access_nontrivial): New declaration.
122663         * lib/file-has-acl.c (acl_access_nontrivial): New function.
122664         (file_has_acl): Use it. Save errno afterwards.
122665         * lib/copy-acl.c (qcopy_acl): Use acl_access_nontrivial.
122667 2008-06-03  Bruno Haible  <bruno@clisp.org>
122669         * lib/file-has-acl.c (file_has_acl): Put Solaris 10 code after POSIX-
122670         draft code. Simplify #ifs.
122671         * lib/set-mode-acl.c (qset_acl): Don't test for symlink if !USE_ACL.
122672         Put Solaris code after POSIX-draft code. Fix comments regarding
122673         Solaris 10, HP-UX. Mention Cygwin.
122674         * lib/copy-acl.c (qcopy_acl): Simplify #ifs.
122676 2008-06-03  Eric Blake  <ebb9@byu.net>
122678         Provide fallback for older kernels.
122679         * lib/utimens.c (gl_futimens) [HAVE_UTIMENSAT, HAVE_FUTIMENS]:
122680         Provide runtime fallback if kernel lacks support.
122681         Reported by Mike Frysinger.
122683 2008-06-02  Bruno Haible  <bruno@clisp.org>
122685         * lib/acl-internal.h (ACL_NOT_WELL_SUPPORTED): Include EOPNOTSUPP if
122686         it exists.
122688 2008-06-02  Bruno Haible  <bruno@clisp.org>
122690         * lib/acl_entries.c (acl_entries): Rewrite to use acl_get_entry.
122691         * lib/copy-acl.c (qcopy_acl): Update comment.
122693 2008-06-02  Bruno Haible  <bruno@clisp.org>
122695         * lib/acl-entries.h: Enclose most definitions in #ifs for POSIX-draft
122696         like ACL APIs.
122698 2008-06-02  Bruno Haible  <bruno@clisp.org>
122700         * tests/test-file-has-acl.sh: Use different code for Cygwin.
122701         * tests/test-set-mode-acl.sh: Likewise.
122702         * tests/test-copy-acl.sh: Likewise.
122703         * tests/test-copy-file.sh: Likewise.
122705 2008-06-02  Bruno Haible  <bruno@clisp.org>
122707         * tests/test-file-has-acl.sh: Remove unused code.
122709 2008-06-01  Bruno Haible  <bruno@clisp.org>
122711         * lib/copy-acl.c (qcopy_acl): New function, extracted from copy_acl.
122712         (copy_acl): Just a wrapper around qcopy_acl that emits the error
122713         messages.
122714         * lib/set-mode-acl.c (qset_acl): Document return value precisely.
122716 2008-06-01  Bruno Haible  <bruno@clisp.org>
122718         * m4/acl.m4 (gl_FUNC_ACL): Separate the POSIX-like and the Solaris
122719         tests. Test for libpacl, needed for OSF/1. Test for extended ACLs,
122720         needed for MacOS X. Test for HP-UX API. Test for newer and older AIX
122721         APIs.
122722         * modules/acl-tests (configure.ac): Remove tests now contained in
122723         m4/acl.m4.
122725 2008-06-02  Jim Meyering  <meyering@redhat.com>
122727         announce-gen: use a better key-server host name
122728         * build-aux/announce-gen (main): Recommend keys.gnupg.net, since
122729         it may be more consistently reliable.  Suggested by Werner Koch
122730         in <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/13717>.
122732 2008-06-01  Bruno Haible  <bruno@clisp.org>
122734         * lib/stdio-impl.h (fp_ub): Use fp_. Needed for DragonFly BSD.
122735         Reported by Voroskoi Andras <voroskoi@gmail.com>.
122737 2008-06-01  Voroskoi Andras  <voroskoi@gmail.com>  (tiny change)
122739         * lib/stdio-impl.h [__DragonFly__]: Fix typo.
122741 2008-06-01  Bruno Haible  <bruno@clisp.org>
122743         New ACL tests.
122744         * tests/test-file-has-acl.sh: New file.
122745         * tests/test-file-has-acl.c: New file.
122746         * tests/test-set-mode-acl.sh: New file.
122747         * tests/test-set-mode-acl.c: New file.
122748         * tests/test-copy-acl.sh: New file, based on tests/test-copy-file.sh.
122749         * tests/test-copy-acl.c: New file.
122750         * modules/acl-tests: New file, based on modules/copy-file-tests.
122751         * modules/copy-file-tests (Files): Remove tests/test-sameacls.c.
122752         (Depends-on): Add acl-tests.
122753         (configure.ac): Remove checks.
122754         (Makefile.am): Don't create test-sameacls program here any more.
122756 2008-06-01  Bruno Haible  <bruno@clisp.org>
122758         * tests/test-copy-file.sh: Portability fixes for Solaris, HP-UX, IRIX.
122759         * tests/test-sameacls.c: Include progname.h.
122760         (main): Invoke set_program_name. Portability fixes for MacOS X,
122761         Solaris, HP-UX.
122763 2008-06-01  Bruno Haible  <bruno@clisp.org>
122765         * lib/freadahead.c (freadahead) [__DragonFly__]: Use the __sreadahead
122766         function.
122767         Reported by VOROSKOI Andras <voroskoi@gmail.com>.
122769 2008-06-01  Bruno Haible  <bruno@clisp.org>
122771         * modules/rpmatch (Depends-on): Add strdup.
122773 2008-06-01  Bruno Haible  <bruno@clisp.org>
122775         * lib/pipe.c: Include unistd-safer.h.
122776         (create_pipe): Ensure the returned file descriptors are not in {0,1,2}.
122777         * modules/pipe (Depends-on): Add unistd-safer.
122779 2008-05-30  Simon Josefsson  <simon@josefsson.org>
122781         * modules/autobuild (configure.ac): Call AB_INIT.
122783 2008-05-30  Simon Josefsson  <simon@josefsson.org>
122785         * tests/test-getaddrinfo.c: Don't print debug messages by default.
122786         Suggested by Bruno Haible <bruno@clisp.org>.
122788 2008-05-30  Simon Josefsson  <simon@josefsson.org>
122790         * tests/test-base64.c: Cast size_t to unsigned long when invoking
122791         printf.  Use %lu instead of %d.  Reported by Bruno Haible
122792         <bruno@clisp.org>.
122794 2008-05-29  Eric Blake  <ebb9@byu.net>
122796         Prefer new POSIX 200x interfaces over futimesat.
122797         * m4/utimens.m4 (gl_UTIMENS): Check for futimens, utimensat.
122798         * lib/utimens.c (gl_futimens): Use them for nanosecond resolution
122799         when available.
122800         [HAVE_BUGGY_NFS_TIME_STAMPS]: Allow C89 compilation.
122802 2008-05-28  Bruno Haible  <bruno@clisp.org>
122804         * modules/stpcpy (License): Change to LGPLv2+.
122805         Requested by David Lutterkort <dlutter@redhat.com>.
122807 2008-05-27  Bruno Haible  <bruno@clisp.org>
122809         * lib/localename.c (SUBLANG_TIBETAN_BHUTAN): Force value 2. Needed for
122810         current mingw.
122811         Reported by Jose E. Marchesi <jemarch@gnu.org>.
122813 2008-05-27  Bruno Haible  <bruno@clisp.org>
122815         * modules/iconv_open (Link): New section, from module 'iconv'.
122816         * modules/striconv (Link): Likewise.
122817         * modules/striconveh (Link): Likewise.
122818         * modules/xstriconv (Link): Likewise.
122819         * modules/unicodeio (Link): Likewise.
122820         * modules/propername (Link): Likewise.
122821         Reported by Jim Meyering.
122823 2008-05-26  Jim Meyering  <meyering@redhat.com>
122825         sha256: do not artificially restrict buffer length to be < 2^32
122826         * lib/sha256.h (struct sha256_ctx) [buflen]: Change type from
122827         uint32_t to size_t.
122828         * lib/sha256.c (sha256_conclude_ctx): Change type of a local
122829         to match.
122831         avoid unaligned access errors, e.g., on sparc
122832         * lib/sha512.c (sha512_conclude_ctx): Use set_uint64 rather than
122833         direct access through a possibly-unaligned uint64* pointer.
122834         * lib/sha256.c (sha256_conclude_ctx): Use set_uint32 rather than
122835         direct access through a possibly-unaligned uint32* pointer.
122836         Prompted by this patch from Tom "spot" Callaway:
122837         http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13638
122839         sha512.c: fix typo in comment
122840         * lib/sha512.c (sha512_conclude_ctx): Length is 128-bit, not 64-bit.
122842 2008-05-25  Bruno Haible  <bruno@clisp.org>
122844         * lib/set-mode-acl.c: Renamed from lib/acl.c.
122845         * modules/acl (Files): Add lib/set-mode-acl.c, remove lib/acl.c.
122846         (Makefile.am): Update lib_SOURCES.
122848 2008-05-25  Bruno Haible  <bruno@clisp.org>
122850         * m4/acl.m4 (gl_FUNC_ACL): Don't set LIB_ACL_TRIVIAL.
122852 2008-05-25  Jim Meyering  <meyering@redhat.com>
122854         useless-if-before-free: freed expr may have white-space differences
122855         * build-aux/useless-if-before-free: Recognize cases in which the
122856         freed expression differs from the tested one in embedded white
122857         space, e.g., if (p[i + 1]) free(p[i+1]).  Correct thinko in prev:
122858         $1 was used, so we can't make any regexp shy.  Improved tests now
122859         detect this.
122861         useless-if-before-free: accept white space in the expression.
122862         * build-aux/useless-if-before-free: For now, any white space
122863         in the expression must be identical in the free argument.
122865         useless-if-before-free: efficiency tweak
122866         * build-aux/useless-if-before-free: Make the expression-matching
122867         regexp "shy".
122868         Make the *outer* regexp shy, not the expr-matching one.
122870         update code-in-comment to accept cast of free arg
122871         * build-aux/useless-if-before-free: Update regexp.
122873 2008-05-25  Bruno Haible  <bruno@clisp.org>
122875         * tests/test-sameacls.c: Renamed from tests/test-copy-file-sameacls.c.
122876         * modules/copy-file-tests (Files, Makefile.am): Update.
122877         * tests/test-copy-file.c (func_test_copy): Update.
122879 2008-05-24  Andreas Färber  <andreas.faerber@web.de>  (tiny change)
122881         * lib/stdbool.in.h [__HAIKU__]: Disable __BEOS__ workarounds.
122883 2008-05-23  Bruno Haible  <bruno@clisp.org>
122885         Improve support for ACLs on OSF/1.
122886         * lib/acl.c (qset_acl): For OSF/1, use a string that ends in a comma.
122887         Remove fallback for unknown flavors of ACLs.
122889 2008-05-22  Bruno Haible  <bruno@clisp.org>
122891         Add support for ACLs on OSF/1.
122892         * lib/acl-internal.h (acl_get_fd, acl_set_fd): New inline function
122893         replacements.
122894         (acl_free_text): New macro fallback.
122895         * lib/acl_entries.c (acl_entries): Use acl_free_text instead of
122896         acl_free.
122897         * m4/acl.m4 (gl_FUNC_ACL): Look also in libpacl library. Test for
122898         acl_free_text function. Require AC_C_INLINE.
122900 2008-05-22  Bruno Haible  <bruno@clisp.org>
122902         Make copy_acl work on MacOS X 10.5.
122903         * lib/acl-internal.h (MODE_INSIDE_ACL): New macro.
122904         (ACL_NOT_WELL_SUPPORTED): On MacOS X, also handle ENOENT.
122905         * lib/acl.c (qset_acl): Add different code branch for !MODE_INSIDE_ACL.
122906         If MODE_INSIDE_ACL, don't assume that every system has the same text
122907         representation for ACLs as FreeBSD.
122908         * lib/copy-acl.c (copy_acl): Add support for platforms with
122909         !MODE_INSIDE_ACL.
122910         * lib/file-has-acl.c (file_has_acl): Likewise.
122911         * m4/acl.m4 (gl_FUNC_ACL): Test for some functions that are witness of
122912         FreeBSD, MacOS X, or IRIX, respectively.
122914 2008-05-22  Bruno Haible  <bruno@clisp.org>
122916         * lib/acl.h: Don't include <sys/acl.h>.
122917         (GETACLCNT): Move fallback to lib/acl-internal.h.
122918         * lib/acl-internal.h: Include <sys/acl.h> here.
122919         (GETACLCNT): New macro fallback, moved here from lib/acl.h.
122921 2008-05-22  Bruno Haible  <bruno@clisp.org>
122923         Split off copy_acl function to separate file.
122924         * lib/copy-acl.c: New file, extracted from lib/acl.c.
122925         * lib/acl.c (copy_acl): Moved function to separate file.
122926         * m4/acl.m4 (gl_FUNC_ACL): Remove unconditional AC_LIBOBJs.
122927         * modules/acl (Files): Add lib/copy-acl.c.
122928         (Makefiles.am): Augment lib_SOURCES.
122930 2008-05-22  Bruno Haible  <bruno@clisp.org>
122932         * modules/copy-file-tests: New file.
122933         * tests/test-copy-file.sh: New file.
122934         * tests/test-copy-file.c: New file.
122935         * tests/test-copy-file-sameacls.c: New file.
122937 2008-05-22  Eric Blake  <ebb9@byu.net>
122939         Avoid gcc warning.
122940         * tests/test-memcmp.c (main): Pass NULL indirectly.
122942 2008-05-21  Bruno Haible  <bruno@clisp.org>
122944         Add reference doc about ACLs.
122945         * doc/acl-resources.txt: New file.
122946         * doc/acl-cygwin.txt: New file.
122948 2008-05-21  Bruno Haible  <bruno@clisp.org>
122950         Avoid one more warning from gcc.
122951         * lib/vasnprintf.c (IF_LINT): Update comments.
122952         (VASNPRINTF): Use it also for the 'prefix' array initializer.
122954 2008-05-21  Jim Meyering  <meyering@redhat.com>
122956         avoid a warning from gcc
122957         * lib/vasnprintf.c (IF_LINT): Define.
122958         (scale10_round_decimal_long_double):
122959         Use it to avoid a "may be used uninitialized" warning.
122960         (scale10_round_decimal_double): Likewise.
122962 2008-05-21  Simon Josefsson  <simon@josefsson.org>
122964         * m4/memcmp.m4: When cross-compiling, assume memcmp works if it is
122965         declared.
122967 2008-05-20  Bruno Haible  <bruno@clisp.org>
122969         * tests/test-memcmp.c (main): Test also the sign of the result. Test
122970         against two known bugs; code taken from autoconf's AC_FUNC_MEMCMP.
122972 2008-05-20  Simon Josefsson  <simon@josefsson.org>
122974         * modules/memcmp-tests: New file.
122975         * tests/test-memcmp.c: New file.
122977 2008-05-19  Bruno Haible  <bruno@clisp.org>
122979         * modules/propername (Notice, configure.ac): Put quoted "..." into
122980         --keyword option.
122981         * lib/propername.h: Update comments accordingly.
122982         Reported by Eric Blake.
122984 2008-05-19  Martin Lambers  <marlam@marlam.de>  (tiny change)
122986         * modules/getpass-gnu (Depends-on): Add fseeko.
122988 2008-05-19  Simon Josefsson  <simon@josefsson.org>
122990         * modules/base64-tests: New file.
122992 2008-05-19  Bo Borgerson  <gigabo@gmail.com>
122994         * lib/base64.c (base64_decode_ctx): If a decode context structure
122995         was passed in use it to ignore newlines.  If a context structure
122996         was _not_ passed in, continue to treat newlines as garbage (this
122997         is the historical behavior).  Formerly base64_decode.
122998         (base64_decode_alloc_ctx): Formerly base64_decode_alloc.  Now
122999         takes a decode context structure.
123000         * lib/base64.h (base64_decode): Macro for four-argument calls.
123001         (base64_decode_alloc): Likewise.
123002         * lib/base64.c (base64_decode_ctx): If a decode context structure
123003         was passed in use it to ignore newlines.  If a context structure
123004         was _not_ passed in, continue to treat newlines as garbage (this
123005         is the historical behavior).  Formerly base64_decode.
123006         (base64_decode_alloc_ctx): Formerly base64_decode_alloc.  Now
123007         takes a decode context structure.
123008         * lib/base64.h (base64_decode): Macro for four-argument calls.
123009         (base64_decode_alloc): Likewise.
123011 2008-05-19  Jim Meyering  <meyering@redhat.com>
123013         avoid a warning from gcc
123014         * lib/trim.c (IF_LINT): Define.
123015         (trim2): Use it to avoid a "may be used uninitialized" warning.
123017         Fix doc typo.
123018         * doc/glibc-functions/getpass.texi (getpass): s/PATH_MAX/PASS_MAX/.
123020 2008-05-19  Bruno Haible  <bruno@clisp.org>
123022         * doc/glibc-functions/getpass.texi: Document limits of other
123023         implementations.
123025 2008-05-19  Simon Josefsson  <simon@josefsson.org>
123026             Bruno Haible <bruno@clisp.org>
123028         * doc/glibc-functions/getpass.texi: Document gnulib implementation.
123030 2008-05-18  Bruno Haible  <bruno@clisp.org>
123032         * modules/propername: New file, from GNU gettext.
123033         * lib/propername.h: New file, from GNU gettext.
123034         * lib/propername.c: New file, from GNU gettext.
123035         * MODULES.html.sh (Internationalization functions): Add propername.
123037 2008-05-16  Jim Meyering  <meyering@redhat.com>
123038             Bruno Haible  <bruno@clisp.org>
123040         Avoid some warnings from "gcc -Wshadow".
123041         * lib/vasnprintf.c (exp, remainder): Define to different identifiers.
123043 2008-05-15  Eric Blake  <ebb9@byu.net>
123045         Extend previous patch to cygwin 1.7.0.
123046         * m4/memmem.m4 (gl_FUNC_MEMMEM): When cross-compiling, assume a
123047         fast implementation in cygwin >= 1.7.0.
123048         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
123049         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
123051 2008-05-15  Bruno Haible  <bruno@clisp.org>
123053         * m4/memmem.m4 (gl_FUNC_MEMMEM): When cross-compiling, assume a fast
123054         implementation in glibc >= 2.9.
123055         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
123056         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
123058 2008-05-15  Bruno Haible  <bruno@clisp.org>
123060         * MODULES.html.sh (Internationalization functions): Remove linebreak.
123061         (Unicode string functions): Add unilbrk/*.
123062         Reported by Karl Berry.
123064 2008-05-15  Eric Blake  <ebb9@byu.net>
123066         Fix violation of <stdbool.h> replacement in regex.
123067         * lib/regcomp.c (re_compile_internal): Avoid implicit cast to bool.
123068         * lib/regexec.c (re_search_internal): Likewise.
123069         Reported by Heinrich Mislik <Heinrich.Mislik@univie.ac.at>.
123071 2008-05-15  Jim Meyering  <meyering@redhat.com>
123073         avoid distracting test output when git or cvs is not found
123074         * tests/test-vc-list-files-cvs.sh: Suppress 'init' error output.
123075         * tests/test-vc-list-files-git.sh: Likewise.
123077 2008-05-15  Eric Blake  <ebb9@byu.net>
123079         Glibc finally accepted the memmem speedup code, bugzilla #5514.
123080         * doc/glibc-functions/memmem.texi (memmem): Mention last broken
123081         glibc version.
123082         * doc/glibc-functions/strcasestr.texi (strcasestr): Likewise.
123083         * doc/posix-functions/strstr.texi (strstr): Likewise.
123084         * lib/str-two-way.h (MAX): Sychronize with glibc.
123086 2008-05-15  Paolo Bonzini  <bonzini@gnu.org>
123088         * lib/regcomp.c (optimize_utf8): Add a note on why we test
123089         opr.ctx_type.
123090         (calc_first): Initialize constraint field.
123091         (duplicate_node_closure): Use it instead of special casing ANCHORS.
123092         Fix grammar.
123093         (duplicate_node): Merge constraint field for all node types.
123094         (calc_eclosure_iter): Look at constraint field for all node types.
123095         * lib/regex_internal.c (create_cd_newstate): Don't look at
123096         opr.ctx_type.
123098 2008-05-14  Bruno Haible  <bruno@clisp.org>
123100         Help GCC to do better code generation.
123101         * lib/eealloc.h (eemalloc) [GCC >= 3]: Declare with attribute 'malloc'.
123102         * lib/pagealign_alloc.h (pagealign_alloc, pagealign_xalloc): Likewise.
123103         * lib/xalloc.h (ATTRIBUTE_MALLOC): New macro.
123104         (xmalloc, xzalloc, xcalloc, xmemdup, xstrdup, xnmalloc, xcharalloc):
123105         Declare with attribute 'malloc' if supported.
123107 2008-05-14  Lasse Collin  <lasse.collin@tukaani.org>
123109         use "echo STR|wc -c" rather than unportable "expr length STR"
123110         * build-aux/mktempd (mktempd): Vendor-supplied expr from at least
123111         OpenBSD 4.3 and Solaris 10 do not honor expr's "length" function.
123113 2008-05-14  Jim Meyering  <meyering@redhat.com>
123115         use dd ibs=$n count=1 ... rather than less-portable head -c$n
123116         * build-aux/mktempd (rand_bytes): head's -cN option is not accepted
123117         by Solaris 10's /bin/head or by the one from HP-UX 11.x.
123118         Reported in http://sourceforge.net/forum/message.php?msg_id=4960334
123119         via Collin Lasse.
123121 2008-05-14  Eric Blake  <ebb9@byu.net>
123123         Avoid quadratic growth in gl_LIBSOURCES.
123124         * gnulib-tool (func_emit_initmacro_done): s/\(m4_append\)_uniq/\1/.
123125         Suggested by Bruno Haible.
123127         Test xmemdup0.
123128         * modules/xmemdup0-tests: New file.
123129         * tests/test-xmemdup0.c: Likewise.
123131 2008-05-13  Eric Blake  <ebb9@byu.net>
123133         Split xmemdup0 into its own module.
123134         * modules/xmemdup0: New file.
123135         * lib/xmemdup0.h: Likewise.
123136         * lib/xmemdup0.c: Likewise.
123137         * MODULES.html.sh (Memory management functions): Add xmemdup0.
123138         * lib/xalloc.h (xmemdup0): Remove.
123139         * lib/xmalloc.c (xmemdup0): Likewise.
123141 2008-05-13  Eric Blake  <ebb9@byu.net>
123142             Bruno Haible  <bruno@clisp.org>
123144         Reduce number of forks required during autoconf.
123145         * gnulib-tool (func_emit_initmacro_start): Prepare gl_LIBSOURCES_LIST
123146         and gl_LIBSOURCES_DIR.
123147         (func_emit_initmacro_end): Use them here in a single m4_syscmd...
123148         (func_emit_initmacro_done) <gl_LIBSOURCES>: ...rather than in one
123149         m4_syscmd per file.
123150         <m4_foreach_w>: Move...
123151         * m4/gnulib-common.m4 (m4_foreach_w): ...here.
123153 2008-05-13  Eric Blake  <ebb9@byu.net>
123155         * gnulib-tool: Fix various comment typos.
123157 2008-05-12  Bruno Haible  <bruno@clisp.org>
123159         Tailor the linebreaking algorithm.
123160         * lib/unilbrk/tables.c (unilbrk_table): Change (IS,AL) entry.
123162 2008-05-12  Bruno Haible  <bruno@clisp.org>
123164         Update to Unicode 5.0.0.
123165         * lib/unilbrk/tables.h (LBP_*): Add LBP_WJ, LBP_H2, LBP_H3, LBP_JL,
123166         LBP_JV, LBP_JT. Redistribute values.
123167         (unilbrk_table): Change size.
123168         * lib/unilbrk/tables.c (unilbrk_table): Change size. Update to match
123169         Unicode TR#14 rev. 22.
123170         * lib/unilbrk/gen-lbrk.c (LBP_*): Add LBP_WJ, LBP_H2, LBP_H3, LBP_JL,
123171         LBP_JV, LBP_JT. Redistribute values.
123172         (get_lbp): Update to match Unicode TR#14 rev. 21/22 and Unicode 5.0.0.
123173         (debug_output_lbp, fill_org_lbp, debug_output_org_lbp, output_lbp):
123174         Update.
123175         * lib/unilbrk/lbrkprop1.h: Regenerated.
123176         * lib/unilbrk/lbrkprop2.h: Regenerated.
123177         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks):
123178         Change handling of LBP_CM after LBP_ZW. Update for new value of LBP_BK.
123179         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks):
123180         Likewise.
123181         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks):
123182         Likewise.
123183         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Update expected
123184         result.
123185         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
123186         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
123187         * tests/unilbrk/test-ulc-possible-linebreaks.c (main): Likewise.
123188         * tests/unilbrk/test-u8-width-linebreaks.c (main): Likewise.
123189         * tests/unilbrk/test-u16-width-linebreaks.c (main): Likewise.
123190         * tests/unilbrk/test-u32-width-linebreaks.c (main): Likewise.
123192 2008-05-11  Bruno Haible  <bruno@clisp.org>
123194         * lib/unilbrk/gen-lbrk.c (output_lbp): Fix whitespace.
123196 2008-05-11  Bruno Haible  <bruno@clisp.org>
123198         * lib/unilbrk/gen-lbrk.c: New file, from GNU gettext (gen-lbrkprop.c).
123199         * modules/unilbrk/gen-lbrk: New file.
123201 2008-05-11  Bruno Haible  <bruno@clisp.org>
123203         * m4/sha256.m4 (gl_SHA256): Require AC_C_INLINE.
123204         * m4/sha512.m4 (gl_SHA512): Likewise.
123206 2008-05-11  Jim Meyering  <meyering@redhat.com>
123208         New modules: crypto/sha256, crypto/sha512 (from coreutils)
123209         * modules/crypto/sha256: New file.
123210         * modules/crypto/sha512: Likewise.
123211         * lib/sha256.c: Likewise.
123212         * lib/sha256.h: Likewise.
123213         * lib/sha512.c: Likewise.
123214         * lib/sha512.h: Likewise.
123215         * lib/u64.h: Likewise.
123216         * m4/sha256.m4: Likewise.
123217         * m4/sha512.m4: Likewise.
123218         * MODULES.html.sh (Cryptographic computations (low-level)): List them.
123220 2008-05-10  Bruno Haible  <bruno@clisp.org>
123222         * MODULES.html.sh (Environment variables <stdlib.h>): Add unsetenv.
123223         (Input/Output <stdio.h>): Add xprintf.
123224         (Signal handling <signal.h>): Add strsignal.
123225         (Cryptographic computations (high-level)): Add crypto/gc-camellia.
123226         (Core language properties): Add func.
123227         (Mathematics <math.h>): Add ceil, floor, frexp-nolibm.
123228         (Support for systems lacking POSIX:2001): Add environ, EOVERFLOW,
123229         strings.
123230         (Enhancements for POSIX:2001 functions): Add iconv_open-utf.
123231         (Input/output): New section.
123232         (File system functions): Add openat-die, stat-macros.
123233         (Networking functions): Add sockets.
123234         (Unicode string functions): Add unictype/*.
123235         (Support for building libraries and executables): Add gperf.
123236         (Support for building documentation): Add agpl-3.0.
123237         (Misc): Add nocrash.
123239 2008-05-10  Bruno Haible  <bruno@clisp.org>
123241         * modules/unictype/gen-ctype: New file.
123243 2008-05-10  Jim Meyering  <meyering@redhat.com>
123245         Make chdir-safer.c more efficient on a system with no symlinks.
123246         * lib/chdir-safer.c (chdir_no_follow): Skip lstat and fstat calls
123247         also if ELOOP is zero.  Suggested by Bruno Haible.
123249         Make chdir-safer.c slightly safer.
123250         * lib/chdir-safer.c (chdir_no_follow): Test HAVE_WORKING_O_NOFOLLOW,
123251         not O_NOFOLLOW, in case the latter is nonzero and open ignores it.
123253         Avoid compile failure on systems without ELOOP (like mingw).
123254         * lib/chdir-safer.c (ELOOP): Define if not already defined.
123255         Reported by Bruno Haible.
123257 2008-05-10  Bruno Haible  <bruno@clisp.org>
123259         * lib/unilbrk/ulc-common.c: Include c-strcaseeq.h instead of streq.h.
123260         (is_utf8_encoding): Use a case-insensitive comparison.
123261         * modules/unilbrk/ulc-common (Depends-on): Add c-strcaseeq. Remove
123262         streq.
123264 2008-05-10  Bruno Haible  <bruno@clisp.org>
123266         * lib/unilbrk/ulc-common.c: Don't include <stdlib.h>.
123267         (iconv_string_length, iconv_string_keeping_offsets): Remove functions.
123268         * lib/unilbrk/ulc-common.h (iconv_string_length,
123269         iconv_string_keeping_offsets): Remove declarations.
123270         * lib/unilbrk/ulc-possible-linebreaks.c: Include <string.h>, uniconv.h.
123271         Don't include <iconv.h>, streq.h, xsize.h.
123272         (ulc_possible_linebreaks): Use u8_conv_from_encoding for doing the
123273         conversion.
123274         * lib/unilbrk/ulc-width-linebreaks.c: Include uniconv.h. Don't include
123275         <iconv.h>, streq.h, xsize.h.
123276         (ulc_width_linebreaks): Use u8_conv_from_encoding for doing the
123277         conversion.
123278         * modules/unilbrk/ulc-common (Depends-on): Remove iconv.
123279         * modules/unilbrk/ulc-possible-linebreaks (Depends-on): Add
123280         uniconv/u8-conv-from-enc. Remove iconv_open, streq, xsize.
123281         * modules/unilbrk/ulc-width-linebreaks (Depends-on): Likewise.
123283 2008-05-10  Bruno Haible  <bruno@clisp.org>
123285         * modules/unilbrk/ulc-width-linebreaks-tests: New file.
123286         * tests/unilbrk/test-ulc-width-linebreaks.c: New file.
123288         * modules/unilbrk/u32-width-linebreaks-tests: New file.
123289         * tests/unilbrk/test-u32-width-linebreaks.c: New file.
123291         * modules/unilbrk/u16-width-linebreaks-tests: New file.
123292         * tests/unilbrk/test-u16-width-linebreaks.c: New file.
123294         * modules/unilbrk/u8-width-linebreaks-tests: New file.
123295         * tests/unilbrk/test-u8-width-linebreaks.c: New file.
123297         * modules/unilbrk/ulc-possible-linebreaks-tests: New file.
123298         * tests/unilbrk/test-ulc-possible-linebreaks.c: New file.
123300         * modules/unilbrk/u32-possible-linebreaks-tests: New file.
123301         * tests/unilbrk/test-u32-possible-linebreaks.c: New file.
123303         * modules/unilbrk/u16-possible-linebreaks-tests: New file.
123304         * tests/unilbrk/test-u16-possible-linebreaks.c: New file.
123306         * modules/unilbrk/u8-possible-linebreaks-tests: New file.
123307         * tests/unilbrk/test-u8-possible-linebreaks.c: New file.
123309 2008-05-10  Bruno Haible  <bruno@clisp.org>
123311         Split up 'linebreak' module.
123312         * lib/unilbrk.h: New file, based on lib/linebreak.h.
123313         * lib/unilbrk/lbrkprop1.h: New file, extracted from lib/lbrkprop.h.
123314         * lib/unilbrk/lbrkprop2.h: New file, renamed from lib/lbrkprop.h with
123315         modifications.
123316         * lib/unilbrk/tables.h: New file, extracted from lib/linebreak.c.
123317         * lib/unilbrk/tables.c: New file, extracted from lib/linebreak.c.
123318         * lib/unilbrk/u8-possible-linebreaks.c: New file, extracted from
123319         lib/linebreak.c.
123320         * lib/unilbrk/u16-possible-linebreaks.c: New file, extracted from
123321         lib/linebreak.c.
123322         * lib/unilbrk/u32-possible-linebreaks.c: New file, extracted from
123323         lib/linebreak.c.
123324         * lib/unilbrk/ulc-common.h: New file, extracted from lib/linebreak.c.
123325         * lib/unilbrk/ulc-common.c: New file, extracted from lib/linebreak.c.
123326         * lib/unilbrk/ulc-possible-linebreaks.c: New file, extracted from
123327         lib/linebreak.c.
123328         * lib/unilbrk/u8-width-linebreaks.c: New file, extracted from
123329         lib/linebreak.c.
123330         * lib/unilbrk/u16-width-linebreaks.c: New file, extracted from
123331         lib/linebreak.c.
123332         * lib/unilbrk/u32-width-linebreaks.c: New file, extracted from
123333         lib/linebreak.c.
123334         * lib/unilbrk/ulc-width-linebreaks.c: New file, extracted from
123335         lib/linebreak.c.
123336         * modules/unilbrk/base: New file.
123337         * modules/unilbrk/tables: New file.
123338         * modules/unilbrk/u8-possible-linebreaks: New file.
123339         * modules/unilbrk/u16-possible-linebreaks: New file.
123340         * modules/unilbrk/u32-possible-linebreaks: New file.
123341         * modules/unilbrk/ulc-common: New file.
123342         * modules/unilbrk/ulc-possible-linebreaks: New file.
123343         * modules/unilbrk/u8-width-linebreaks: New file.
123344         * modules/unilbrk/u16-width-linebreaks: New file.
123345         * modules/unilbrk/u32-width-linebreaks: New file.
123346         * modules/unilbrk/ulc-width-linebreaks: New file.
123347         * lib/linebreak.h: Remove file.
123348         * lib/linebreak.c: Remove file.
123349         * m4/linebreak.m4: Remove file.
123350         * modules/linebreak: Remove file.
123351         * NEWS: Mention the changes.
123353 2008-05-09  Eric Blake  <ebb9@byu.net>
123355         Add xmemdup0.
123356         * lib/xalloc.h (xmemdup0): New prototype and C++ typesafe
123357         implementation.
123358         * lib/xmalloc.c (xmemdup0): New C implementation.
123360 2008-05-08  Bruno Haible  <bruno@clisp.org>
123362         * m4/wctype.m4 (gl_WCTYPE_H): Correct indentation.
123364 2008-05-07  Eric Blake  <ebb9@byu.net>
123366         Support cross-compilation of <wctype.h>.
123367         * m4/wctype.m4 (gl_WCTYPE_H): Fix improper nesting in
123368         AC_CACHE_CHECK.
123370 2008-05-06  Soren Hansen  <soren@ubuntu.com>  (tiny change)
123372         * build-aux/vc-list-files: Add support for bzr.
123374 2008-05-03  Jim Meyering  <meyering@redhat.com>
123376         avoid failed assertion with tight malloc
123377         * tests/test-getndelim2.c: Correct an off-by-one assertion.
123379 2008-05-03  Simon Josefsson  <simon@josefsson.org>
123381         * m4/inet_pton.m4: Set HAVE_DECL_INET_PTON to 0 when declarations
123382         are needed from arpa/inet.h.
123383         * m4/inet_ntop.m4: Likewise, for HAVE_DECL_INET_NTOP.
123384         Reported by Bruno Haible.
123386 2008-05-02  Jim Meyering  <meyering@redhat.com>
123388         avoid compilation error on FreeBSD 6
123389         * tests/test-getaddrinfo.c [!defined EAI_NODATA] (EAI_NODATA): Define.
123391 2008-05-01  Jim Meyering  <meyering@redhat.com>
123393         useless-if-before-free: correct --help's exit status description
123394         * build-aux/useless-if-before-free (usage): Like grep, exit 0
123395         for one or more matches, etc.  Reported by Bruno Haible.
123397         vc-list-files: make the stand-alone gnulib test work
123398         * modules/vc-list-files-tests (configure.ac):
123399         Define and AC_SUBST abs_aux_dir.
123400         (Makefile.am) [TESTS_ENVIRONMENT]: Rather than passing
123401         $(abs_top_srcdir) to each script and having each of them
123402         duplicate the work of setting PATH, set PATH here, using
123403         the new variable, abs_aux_dir instead.
123404         * tests/test-vc-list-files-cvs.sh: Don't set PATH here.
123405         * tests/test-vc-list-files-git.sh: Likewise.
123406         Reported by Bruno Haible.
123408 2008-05-01  Bruno Haible  <bruno@clisp.org>
123410         * lib/getndelim2.c (getndelim2): Fix newsize computation during
123411         reallocation. Rename 'done' to 'found_delimiter'.
123413 2008-05-01  Jim Meyering  <meyering@redhat.com>
123415         vc-list-files: accommodate /bin/sh like the one from Solaris 10
123416         * build-aux/vc-list-files: Use `...`, not $(...).
123418 2008-04-30  Jim Meyering  <meyering@redhat.com>
123420         add tests for vc-list-files
123421         * modules/vc-list-files-tests: New module.
123422         * tests/test-vc-list-files-cvs.sh: New file.
123423         * tests/test-vc-list-files-git.sh: New file.
123425         avoid a warning from gcc
123426         * lib/getndelim2.c (IF_LINT): Define.
123427         (getndelim2): Use it to avoid a "may be used uninitialized" warning.
123429         vc-list-files: work properly with build-aux/cvsu, too
123430         * build-aux/vc-list-files: Hoist the "./"-removing code to apply
123431         to all cvs-based clauses.
123433         vc-list-files: work properly in the CVS+awk case, too
123434         * build-aux/vc-list-files: In the CVS+awk case, remove "./" prefix.
123436         vc-list-files: avoid use of ${*-*} that fails when /bin/sh is dash
123437         * build-aux/vc-list-files: Simplify ${*-*} to $dir, since we no longer
123438         take more than one file argument, so .  Add quotes, just in case $dir
123439         ever contains a shell meta-character.  Prompted by Soren Hansen in
123440         <http://thread.gmane.org/gmane.comp.emulators.libvirt/6221/focus=6240>.
123442 2008-04-29  Eric Blake  <ebb9@byu.net>
123444         Optimize getndelim2 to use block operations when possible.
123445         * modules/getndelim2 (Depends-on): Add stdbool, freadptr,
123446         freadseek, and memchr2.
123447         * lib/getndelim2.c (getndelim2): Use them for block reads.
123449 2008-04-29  Bruno Haible  <bruno@clisp.org>
123451         * m4/inet_ntop.m4 (gl_INET_NTOP): Require gl_USE_SYSTEM_EXTENSIONS.
123452         * m4/inet_pton.m4 (gl_INET_PTON): Likewise.
123453         * modules/inet_ntop (Depends-on): Add extensions.
123454         * modules/inet_pton (Depends-on): Likewise.
123455         Reported by Simon Josefsson.
123457 2008-04-29  Jim Meyering  <meyering@redhat.com>
123459         When the is more than one match in a block, match all of them.
123460         * build-aux/useless-if-before-free: Iterate through each block
123461         until there are no more matches.
123463         Fix broken useless-if-before-free script.
123464         * build-aux/useless-if-before-free: Fix typo: missing "?" after
123465         the expression to match cast of argument to free-like function.
123467 2008-04-29  Eric Blake  <ebb9@byu.net>
123469         Use new header.
123470         * lib/getaddrinfo.c (includes): s/"inet_ntop.h"/<arpa/inet.h>/.
123472 2008-04-29  Jim Meyering  <meyering@redhat.com>
123474         Avoid test segfault on x86_64 due to lack of inet_ntop declaration.
123475         * tests/test-getaddrinfo.c: Include <arpa/inet.h>, now guaranteed
123476         by gnulib to exist and to declare e.g., inet_ntop.
123477         Don't include "inet_ntop.h", now removed.
123479         * m4/arpa_inet_h.m4: Remove trailing blanks.
123481 2008-04-29  Eric Blake  <ebb9@byu.net>
123483         Silence valgrind on safe reads beyond potential array bounds.
123484         * lib/rawmemchr.valgrind: New file.
123485         * lib/strchrnul.valgrind: Likewise.
123486         * modules/rawmemchr (Files): Distribute new file.
123487         * modules/strchrnul (Files): Likewise.
123488         Suggested by Bruno Haible.
123490 2008-04-29  Bruno Haible  <bruno@clisp.org>
123492         * lib/arpa_inet.in.h: Include system's <arpa/inet.h> if it exists.
123493         (inet_ntop, inet_pton): Change portability warning's wording.
123494         * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET): Set HAVE_ARPA_INET_H.
123495         Invoke gl_CHECK_NEXT_HEADERS.
123496         (gl_ARPA_INET_H_DEFAULTS): Initialize ARPA_INET_H.
123497         * m4/inet_ntop.m4 (gl_INET_NTOP): Require gl_ARPA_INET_H_DEFAULTS and
123498         set ARPA_INET_H.
123499         * m4/inet_pton.m4 (gl_INET_PTON): Likewise.
123500         * modules/arpa_inet (Description): No longer only for systems that
123501         lack it.
123502         (Depends-on): Add include_next.
123503         (Makeile.am): Substitute INCLUDE_NEXT, NEXT_ARPA_INET_H,
123504         HAVE_ARPA_INET_H.
123506 2008-04-29  Jim Meyering  <meyering@redhat.com>
123508         * modules/mkdir (License): Re-license as LGPLv2+.
123510 2008-04-29  Bruno Haible  <bruno@clisp.org>
123512         * modules/rawmemchr (Maintainer): Set to Eric.
123513         * modules/strchrnul (Maintainer): Likewise.
123515 2008-04-29  Simon Josefsson  <simon@josefsson.org>
123517         * m4/arpa_inet_h.m4 (gl_ARPA_INET_H_DEFAULTS): Set
123518         HAVE_DECL_INET_NTOP and HAVE_DECL_INET_PTON.
123520         * modules/arpa_inet (arpa/inet.h): Use them.
123522 2008-04-28  Eric Blake  <ebb9@byu.net>
123524         Test getndelim2.
123525         * modules/getndelim2-tests: New file.
123526         * tests/test-getndelim2.c: Likewise.
123527         * lib/getndelim2.c (getndelim2): Never return 0.  Lock the
123528         stream.
123529         * m4/getndelim2.m4 (gl_GETNDELIM2): Check for lock functions.
123531         * MODULES.html.sh: Document new module.
123533 2008-04-20  Bruno Haible  <bruno@clisp.org>
123535         * lib/c-stack.c (die): Use raise.
123536         * modules/c-stack (Depends-on): Add raise.
123538 2008-04-28  Bruno Haible  <bruno@clisp.org>
123540         Expect rpmatch to be declared.
123541         * lib/yesno.c (rpmatch): Remove declaration.
123543         Declare rpmatch.
123544         * lib/stdlib.in.h (rpmatch): New declaration.
123545         * lib/rpmatch.c: Include <stdlib.h> first.
123546         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Require AC_USE_SYSTEM_EXTENSIONS and
123547         gl_STDLIB_H_DEFAULTS. Set HAVE_RPMATCH.
123548         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_RPMATCH,
123549         HAVE_RPMATCH.
123550         * modules/rpmatch (Depends-on): Add stdlib, extensions.
123551         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
123552         (Include): Set to <stdlib.h>.
123553         * modules/stdlib (Makefile.am): Substitute GNULIB_RPMATCH and
123554         HAVE_RPMATCH.
123555         * NEWS: Document the change.
123557 2008-04-28  Bruno Haible  <bruno@clisp.org>
123559         Change rpmatch to use nl_langinfo when appropriate.
123560         * lib/rpmatch.c: Include stdbool.h, string.h, langinfo.h.
123561         (N_): New macro.
123562         (localized_pattern): New function/macro.
123563         (try): Remove match, nomatch arguments. Copy the pattern into safe
123564         memory before caching it.
123565         (rpmatch): Use localized_pattern. Add translator comments.
123566         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Test for nl_langinfo and YESEXPR.
123567         Suggested by Eric Blake.
123568         * modules/rpmatch (Depends-on): Add stdbool.
123570 2008-04-28  Eric Blake  <ebb9@byu.net>
123572         Add rawmemchr module, matching glibc.
123573         * modules/string (Makefile.am): New indicator.
123574         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Set it.
123575         * lib/string.in.h (rawmemchr): Declare when appropriate.
123576         * modules/rawmemchr: New file.
123577         * m4/rawmemchr.m4: Likewise.
123578         * lib/rawmemchr.c: Likewise.
123579         * modules/rawmemchr-tests: Likewise.
123580         * tests/test-rawmemchr.c: Likewise.
123581         * doc/glibc-functions/rawmemchr.texi (rawmemchr): Document
123582         module.
123583         * modules/strchrnul (Depends-on): Add rawmemchr.
123584         * lib/strchrnul.c (strchrnul): Optimize a corner case.
123586         Whitespace cleanup.
123587         * tests/test-strchrnul.c: Reindent.
123588         * lib/strchrnul.c: Likewise.
123590         Optimize and test strchrnul.
123591         * lib/strchrnul.c (strchrnul): Rewrite to do parallel search.
123592         * modules/strchrnul-tests: New file.
123593         * tests/test-strchrnul.c: Likewise.
123595         Remove intprops dependency.
123596         * modules/memchr (Depends-on): Remove intprops.
123597         * modules/memrchr (Depends-on): Likewise.
123598         * modules/memchr2 (Depends-on): Likewise.
123599         * lib/memchr.c (__memchr): Hand-inline the TYPE_MAXIMUM check.
123600         * lib/memrchr.c (__memrchr): Likewise.
123601         * lib/memrchr2.c (memchr2): Likewise.
123602         Reported by Simon Josefsson.
123604 2008-04-28  Simon Josefsson  <simon@josefsson.org>
123606         * m4/sys_socket_h.m4: Move AC_REQUIRE([AC_C_INLINE]) to top.
123607         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
123609 2008-04-28  Simon Josefsson  <simon@josefsson.org>
123611         * lib/inet_ntop.h, lib/inet_pton.h: Remove files.
123613         * lib/inet_ntop.c: Include arpa/inet.h instead of inet_ntop.h.
123615         * lib/inet_pton.c: Include arpa/inet.h instead of inet_pton.h.
123617         * lib/arpa_inet.in.h [@GNULIB_INET_NTOP@]: Inline inet_ntop.h
123618         declarations.
123619         [@GNULIB_INET_PTON@]: Inline inet_pton.h declarations.
123621         * m4/inet_pton.m4: Don't check for header files.
123623         * m4/inet_ntop.m4: Don't check for header files.
123625 2008-04-28  Simon Josefsson  <simon@josefsson.org>
123627         * m4/sys_socket_h.m4: Require AC_C_INLINE when necessary.
123628         * lib/sys_socket.in.h (setsockopt): Use proper win32 tests (don't
123629         trigger for cygwin).
123630         Reported by Bruno Haible  <bruno@clisp.org>.
123632 2008-04-28  Bruno Haible  <bruno@clisp.org>
123634         * doc/posix-functions/strdup.texi: Mention mingw problem.
123636 2008-04-27  Bruno Haible  <bruno@clisp.org>
123638         * modules/stat-time-tests (Depends-on): Add sleep.
123639         * tests/test-stat-time.c (force_unlink): New function.
123640         (cleanup): Use it.
123641         (test_mtime): Remove the ctime related tests.
123642         (test_ctime): New function, containing the ctime related tests.
123643         (main): Call test_ctime, except on native Windows platforms.
123645 2008-04-27  Bruno Haible  <bruno@clisp.org>
123647         * lib/rpmatch.c (rpmatch): Add some comments.
123648         Reported by James Youngman <jay@gnu.org>.
123650 2008-04-27  Bruno Haible  <bruno@clisp.org>
123652         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Also test the behaviour on
123653         quiet NaNs.
123655 2008-04-27  Bruno Haible  <bruno@clisp.org>
123657         Make test-yesno.sh work on mingw.
123658         * tests/test-yesno.sh: Postprocess the output to convert CR/LF to LF.
123659         * tests/test-yesno.c: Include yesno.h first. Include binary-io.h.
123660         (main): Set stdin to binary mode.
123661         * modules/yesno-tests (Depends-on): Add binary-io.
123663 2008-04-27  Bruno Haible  <bruno@clisp.org>
123665         Fix 'isfinite' on x86, x86_64, ia64 platforms.
123666         * tests/test-isfinite.c (test_isfinitel): Also test the behavior on
123667         argument that lie outside the IEEE 854 domain.
123668         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): New macro.
123669         (gl_ISFINITE): Use it.
123670         * doc/posix-functions/isfinite.texi: Document the fixed bugs.
123672 2008-04-27  Bruno Haible  <bruno@clisp.org>
123674         Allow local renaming in config.h.
123675         * lib/memrchr.c (memrchr): Don't undefine outside libc.
123677 2008-04-27  Bruno Haible  <bruno@clisp.org>
123679         * lib/memchr.c (__memchr): Change type of 'i'.
123680         * lib/memchr2.c (memchr2): Likewise.
123682 2008-04-26  Eric Blake  <ebb9@byu.net>
123683         and Bruno Haible  <bruno@clisp.org>
123685         Optimize and test memrchr.
123686         * modules/memrchr (Depends-on): Add intprops.
123687         * lib/memrchr.c (__memrchr): Avoid false positives in loop.
123688         * modules/memrchr-tests: New file.
123689         * tests/test-memrchr.c: New file.
123691 2008-04-26  Bruno Haible  <bruno@clisp.org>
123693         Add tentative support for DragonFly BSD.
123694         * lib/stdio-impl.h: Add macros for DragonFly BSD.
123695         * lib/fbufmode.c (fbufmode): Update conditionals. Use fp_ instead of
123696         fp.
123697         * lib/fflush.c (clear_ungetc_buffer, disable_seek_optimization,
123698         restore_seek_optimization, update_fpos_cache, rpl_fflush: Likewise.
123699         * lib/fpurge.c (fpurge): Likewise.
123700         * lib/freadable.c (freaadable): Likewise.
123701         * lib/freadahead.c (freadahead): Likewise.
123702         * lib/freading.c (freading): Likewise.
123703         * lib/freadptr.c (freadptr): Likewise.
123704         * lib/freadseek.c (freadptrinc): Likewise.
123705         * lib/fseeko.c (fseeko): Likewise.
123706         * lib/fseterr.c (fseterr): Likewise.
123707         * lib/fwritable.c (fwritable): Likewise.
123708         * lib/fwriting.c (fwriting): Likewise.
123710 2008-04-26  Bruno Haible  <bruno@clisp.org>
123712         * lib/stdio-impl.h: New file.
123713         * lib/fbufmode.c: Include stdio-impl.h.
123714         (fbufmode): Use fp_, remove redundant #defines.
123715         * lib/fflush.c: Include stdio-impl.h.
123716         (clear_ungetc_buffer): Remove redundant #defines.
123717         * lib/fpurge.c: Include stdio-impl.h.
123718         (fpurge): Remove redundant #defines.
123719         * lib/freadable.c: Include stdio-impl.h.
123720         (freadable): Remove redundant #defines.
123721         * lib/freadahead.c: Include stdio-impl.h.
123722         (freadahead): Remove redundant #defines.
123723         * lib/freading.c: Include stdio-impl.h.
123724         (freading): Remove redundant #defines.
123725         * lib/freadptr.c: Include stdio-impl.h.
123726         (freadptr): Remove redundant #defines.
123727         * lib/freadseek.c: Include stdio-impl.h.
123728         (freadptrinc): Remove redundant #defines.
123729         * lib/fseeko.c: Include stdio-impl.h.
123730         (rpl_fseeko): Remove redundant #defines.
123731         * lib/fseterr.c: Include stdio-impl.h.
123732         (fseterr): Remove redundant #defines.
123733         * lib/fwritable.c: Include stdio-impl.h.
123734         (fwritable: Remove redundant #defines.
123735         * lib/fwriting.c: Include stdio-impl.h.
123736         (fwriting): Remove redundant #defines.
123737         * modules/fbufmode (Files): Add lib/stdio-impl.h.
123738         * modules/fflush (Files): Likewise.
123739         * modules/fpurge (Files): Likewise.
123740         * modules/freadable (Files): Likewise.
123741         * modules/freadahead (Files): Likewise.
123742         * modules/freading (Files): Likewise.
123743         * modules/freadptr (Files): Likewise.
123744         * modules/freadseek (Files): Likewise.
123745         * modules/fseeko (Files): Likewise.
123746         * modules/fseterr (Files): Likewise.
123747         * modules/fwritable (Files): Likewise.
123748         * modules/fwriting (Files): Likewise.
123750 2008-04-26  Bruno Haible  <bruno@clisp.org>
123752         * lib/fflush.c (clear_ungetc_buffer, disable_seek_optimization,
123753         restore_seek_optimization, update_fpos_cache): New functions, extracted
123754         from rpl_fflush.
123755         (rpl_fflush): Use them.
123756         * m4/fflush.m4 (gl_PREREQ_FFLUSH): New macro.
123757         (gl_REPLACE_FFLUSH): Use it.
123759 2008-04-26  Bruno Haible  <bruno@clisp.org>
123761         * tests/test-xstrtol.sh: Work around limitation of an old 'tr' program
123762         on Solaris.
123763         * tests/test-xstrtoimax.sh: Likewise.
123764         * tests/test-xstrtoumax.sh: Likewise.
123765         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
123767 2008-04-26  Bruno Haible  <bruno@clisp.org>
123769         * modules/memchr-tests: New file.
123770         * tests/test-memchr.c; New file, based on tests/test-memchr2.c.
123772 2008-04-26  Eric Blake  <ebb9@byu.net>
123773             Bruno Haible  <bruno@clisp.org>
123775         * lib/memchr.c: Include intprops.h.
123776         (__memchr): Optimize parallel detection of matching bytes. Rename local
123777         variables. Add explanatory comments.
123779 2008-04-26  Bruno Haible  <bruno@clisp.org>
123781         Fix module 'memchr', broken since 2000-10-28.
123782         * lib/memchr.c: Outside glibc, define memchr, not __memchr.
123784 2008-04-26  Bruno Haible  <bruno@clisp.org>
123786         * lib/memchr2.c (memchr2): Rename local variables. Add explanatory
123787         comments.
123789 2008-04-25  Eric Blake  <ebb9@byu.net>
123791         Use native fstatat on cygwin 1.7.0.
123792         * m4/openat.m4 (gl_FUNC_OPENAT): Make sure lstat check is made
123793         first.
123795 2008-04-23  Eric Blake  <ebb9@byu.net>
123797         Improve memchr2 performance.
123798         * lib/memchr2.c (memchr2): Further optimize parallel detection of
123799         NUL bytes.
123800         * modules/memchr2 (Depends-on): Use intprops.h.
123802 2008-04-23  Simon Josefsson  <simon@josefsson.org>
123804         * lib/sys_socket.in.h (setsockopt): Be more type safe by declaring
123805         an inline function instead of a CPP macro.  Patch by Ben Pfaff
123806         <blp@cs.stanford.edu>.
123808 2008-04-23  Simon Josefsson  <simon@josefsson.org>
123810         * lib/arpa_inet.in.h: New file.
123812         * modules/arpa_inet (Files): Add lib/arpa_inet.in.h.
123813         (Makefile.am): Sed in substitute header file.
123815         * m4/arpa_inet_h.m4: Add gl_ARPA_INET_H_DEFAULTS and
123816         gl_ARPA_INET_MODULE_INDICATOR.  Use them.
123818         * modules/inet_ntop (configure.ac): Use
123819         gl_ARPA_INET_MODULE_INDICATOR.
123821         * modules/inet_pton (configure.ac): Use
123822         gl_ARPA_INET_MODULE_INDICATOR.
123824 2008-04-22  Jim Meyering  <meyering@redhat.com>
123826         * modules/verify (License): Re-license as LGPLv2+.
123828 2008-04-22  Simon Josefsson  <simon@josefsson.org>
123830         * lib/sys_socket.in.h: Define setsockopt macro to cast fourth
123831         parameter to void* as per POSIX standard (MinGW uses char*).
123833 2008-04-21  Bruno Haible  <bruno@clisp.org>
123835         * lib/wctype.in.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
123836         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
123837         Define to replacements if REPLACE_ISWCNTRL is 1.
123838         * m4/wctype.m4 (gl_WCTYPE_H): Test whether the isw* functions work.
123839         If not, set WCTYPE_H to nonempty and REPLACE_ISWCNTRL to 1.
123840         * modules/wctype (Makefile.am): Substitute REPLACE_ISWCNTRL.
123841         * doc/posix-functions/iswalnum.texi: Mention the 'wctype' module and
123842         what it fixes.
123843         * doc/posix-functions/iswalpha.texi: Likewise.
123844         * doc/posix-functions/iswblank.texi: Likewise.
123845         * doc/posix-functions/iswcntrl.texi: Likewise.
123846         * doc/posix-functions/iswdigit.texi: Likewise.
123847         * doc/posix-functions/iswgraph.texi: Likewise.
123848         * doc/posix-functions/iswlower.texi: Likewise.
123849         * doc/posix-functions/iswprint.texi: Likewise.
123850         * doc/posix-functions/iswpunct.texi: Likewise.
123851         * doc/posix-functions/iswspace.texi: Likewise.
123852         * doc/posix-functions/iswupper.texi: Likewise.
123853         * doc/posix-functions/iswxdigit.texi: Likewise.
123854         Reported by Alain Guibert.
123856 2008-04-21  Bruno Haible  <bruno@clisp.org>
123858         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Fix typo in last commit.
123859         Patch by Alain Guibert.
123861 2008-04-21  Bruno Haible  <bruno@clisp.org>
123863         Fix test failures on mingw.
123864         * tests/test-xstrtol.c (print_no_progname): New function.
123865         (main): Install it in error_print_progname hook.
123866         * tests/test-xstrtol.sh: Convert CR/LF to NL in output.
123867         * tests/test-xstrtoimax.sh: Likewise.
123868         * tests/test-xstrtoumax.sh: Likewise.
123870 2008-04-21  Bruno Haible  <bruno@clisp.org>
123872         Fix test failure on mingw.
123873         * tests/test-argp-2.sh (func_compare): Remove CRs from sed's output.
123875 2008-04-21  Bruno Haible  <bruno@clisp.org>
123877         * lib/localename.c (SUBLANG_TIBETAN_PRC, SUBLANG_TIBETAN_BHUTAN):
123878         Actually assign a value.
123880 2008-04-20  Bruno Haible  <bruno@clisp.org>
123882         Fix conflict between modules 'canonicalize' and 'canonicalize-lgpl',
123883         take 2.
123884         * lib/canonicalize.c (canonicalize_file_name): Elide if the
123885         'canonicalize-lgpl' module is also used.
123886         * lib/canonicalize-lgpl.c: Undo last change.
123887         * modules/canonicalize-lgpl (configure.ac): Invoke gl_MODULE_INDICATOR.
123889 2008-04-20  Bruno Haible  <bruno@clisp.org>
123891         * lib/mkdir.c (mkdir): Undefine after the includes, not right after
123892         config.h. Provide _mkdir based fallback for mingw.
123893         * lib/sys_stat.in.h (mkdir): Define through an 'extern' declaration
123894         if REPLACE_MKDIR is 1. Otherwise, test for mingw directly.
123895         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Require
123896         gl_SYS_STAT_H_DEFAULTS. When doing the replacement, set REPLACE_MKDIR
123897         rather than defining mkdir in config.h.
123898         * m4/sys_stat_h.m4 (gl_SYS_STAT_MODULE_INDICATOR): New macro.
123899         (gl_SYS_STAT_H_DEFAULTS): New macro.
123900         (gl_HEADER_SYS_STAT_H): Require it. Don't set HAVE_DECL_MKDIR and
123901         HAVE_IO_H any more.
123902         * modules/sys_stat (Makefile.am): Substitute REPLACE_MKDIR instead of
123903         HAVE_DECL_MKDIR and HAVE_IO_H.
123905 2008-04-20  Bruno Haible  <bruno@clisp.org>
123907         * lib/isapipe.c: Port to native Windows platforms.
123909 2008-04-20  Bruno Haible  <bruno@clisp.org>
123911         * lib/gc-gnulib.c: Include <windows.h> before <wincrypt.h>.
123913 2008-04-21  Eric Blake  <ebb9@byu.net>
123915         Work around preprocessors that don't handle UINTMAX_MAX.
123916         * lib/memchr2.c (memchr2): Avoid embedded #if.
123917         Reported by Alain Guibert, fix suggested by Bruno Haible.
123919 2008-04-21  Simon Josefsson  <simon@josefsson.org>
123921         * doc/posix-functions/strftime.texi (strftime): Explain better
123922         Windows incompatibility.  Suggested by Micah Cowan
123923         <micah@cowan.name>.
123925 2008-04-20  Bruno Haible  <bruno@clisp.org>
123927         * modules/uniconv/u32-conv-to-enc (Depends-on): Add unistr/u32-mblen,
123928         unistr/u8-mblen.
123930 2008-04-20  Bruno Haible  <bruno@clisp.org>
123932         Fix test failure on platforms with non-GNU iconv.
123933         * lib/uniconv/u16-conv-to-enc.c (u16_to_u8_lenient): New function.
123934         (U_TO_U8): Use it, rather than u16_to_u8.
123935         * lib/uniconv/u-conv-to-enc.h (FUNC): Allow an incomplete sequence of
123936         units at the end of the input string.
123937         * modules/uniconv/u16-conv-to-enc (Depends-on): Update.
123939 2008-04-20  Bruno Haible  <bruno@clisp.org>
123941         * tests/uniconv/test-u8-conv-to-enc.c (main): Accept result == NULL
123942         when the resulting length is 0.
123943         * tests/uniconv/test-u16-conv-to-enc.c (main): Likewise.
123945 2008-04-20  Bruno Haible  <bruno@clisp.org>
123947         * m4/roundf.m4 (gl_FUNC_ROUNDF): Add test whether roundf actually
123948         works.
123949         * doc/posix-functions/roundf.texi: Mention roundf bug on mingw.
123951 2008-04-20  Bruno Haible  <bruno@clisp.org>
123953         * tests/test-tsearch.c (main): Don't use initstate if it is missing.
123954         * modules/tsearch-tests (configure.ac): Test for initstate function.
123956 2008-04-20  Bruno Haible  <bruno@clisp.org>
123958         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Also provided a substitute
123959         for nlink_t if missing.
123960         * tests/test-sys_stat.c: Check the existence of the nlink_t type.
123962 2008-04-19  Bruno Haible  <bruno@clisp.org>
123964         Work around snprintf bug on Linux libc5.
123965         * m4/printf.m4 (gl_SNPRINTF_SIZE1): New macro.
123966         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
123967         gl_SNPRINTF_SIZE1.
123968         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
123969         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Likewise. Replace snprintf if
123970         that test failed.
123971         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Likewise.
123972         * lib/vasnprintf.c (USE_SNPRINTF): Set to 0 on Linux libc5 systems.
123973         * modules/snprintf (Files): Add m4/printf.m4.
123974         * modules/vsnprintf (Files): Likewise.
123975         * doc/posix-functions/snprintf.texi: Document Linux libc5 problem.
123976         * doc/posix-functions/vsnprintf.texi: Likewise.
123978 2008-04-19  Bruno Haible  <bruno@clisp.org>
123980         * lib/vasnprintf.c (floorlog10l, floorlog10): Reduce maximum error
123981         from 0.0058 to less than 10^-7.
123983 2008-04-19  Bruno Haible  <bruno@clisp.org>
123985         Fix rounding when a precision is given.
123986         * lib/vasnprintf.c (is_borderline): New function.
123987         (VASNPRINTF): For %e and %g, consider replacing the digits 10....0 with
123988         9...9x.
123989         * tests/test-vasnprintf-posix.c (test_function): Test rounding with %f,
123990         %e, %g.
123991         * tests/test-vasprintf-posix.c (test_function): Likewise.
123992         * tests/test-snprintf-posix.h (test_function): Likewise.
123993         * tests/test-sprintf-posix.h (test_function): Likewise.
123994         * tests/test-fprintf-posix.h (test_function): Test rounding with %f.
123995         * tests/test-printf-posix.h (test_function): Likewise.
123996         * tests/test-printf-posix.output: Update.
123997         Reported by John Darrington <john@darrington.wattle.id.au> via
123998         Ben Pfaff <blp@cs.stanford.edu>.
124000 2008-04-18  Simon Josefsson  <simon@josefsson.org>
124002         * doc/posix-functions/strftime.texi (strftime): Clarify platform.
124003         Suggested by Bruno Haible <bruno@clisp.org>.
124005 2008-04-17  Bruno Haible  <bruno@clisp.org>
124007         * lib/lock.h (gl_lock_destroy, gl_rwlock_destroy,
124008         gl_recursive_lock_destroy): Provide no-op definitions for the dummy
124009         implementation.
124010         Patch by Bruce Merry <bmerry@gmail.com>.
124012 2008-04-17  Simon Josefsson  <simon@josefsson.org>
124014         * doc/posix-functions/strftime.texi (strftime): Mention that %e
124015         doesn't work under Windows.
124017 2008-04-16  Bruno Haible  <bruno@clisp.org>
124019         * lib/localename.c (LANG_MAORI, LANG_QUECHUA, LANG_SOTHO, LANG_UIGHUR):
124020         New macros.
124021         (SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN,
124022         SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC,
124023         SUBLANG_CROATIAN_CROATIA, SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN,
124024         SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA, SUBLANG_MONGOLIAN_PRC,
124025         SUBLANG_QUECHUA_BOLIVIA, SUBLANG_QUECHUA_ECUADOR, SUBLANG_QUECHUA_PERU,
124026         SUBLANG_RUSSIAN_RUSSIA, SUBLANG_RUSSIAN_MOLDAVIA, SUBLANG_SPANISH_US,
124027         SUBLANG_TIBETAN_PRC, SUBLANG_TIBETAN_BHUTAN, SUBLANG_UIGHUR_PRC): New
124028         macros.
124029         (gl_locale_name_from_win32_LANGID): Refine code for Croatian/Bosnian,
124030         Mongolian, Russian, Spanish, Tibetan. Add code for Maori, Quechua,
124031         Northern Sotho, Uighur.
124033 2008-04-16  Bruno Haible  <bruno@clisp.org>
124035         * lib/localename.c (SUBLANG_SINDHI_INDIA): New macro.
124036         (SUBLANG_SINDHI_PAKISTAN): Change value from 1 to 2.
124037         (gl_locale_name_from_win32_LANGID): Fix code for Sindhi.
124038         Reported by Daniel Bergström <daniel@octocode.com>.
124040 2007-12-25  KJK::Hyperion  <hackbunny@reactos.com>
124041             Bruno Haible  <bruno@clisp.org>
124043         * lib/localename.c (gl_locale_name_canonicalize) [WIN32_NATIVE]: New
124044         function.
124045         (gl_locale_name_from_win32_LANGID, gl_locale_name_from_win32_LCID):
124046         New functions, mostly extracted from gl_locale_name_default.
124047         (gl_locale_name_default): Use gl_locale_name_from_win32_LCID.
124049 2008-04-16  Eric Blake  <ebb9@byu.net>
124051         Adjust strtod detection to catch glibc 2.7 bug.
124052         * m4/strtod.m4 (gl_FUNC_STRTOD): Test "nan()" behavior.
124053         Reported by John Gatewood Ham.
124055 2008-04-16  Bruno Haible  <bruno@clisp.org>
124057         Add tentative support for Linux libc5.
124058         * lib/fbufmode.c (fbufmode) [__GNU_LIBRARY__==1]: Reuse glibc2 code.
124059         * lib/fpurge.c (fpurge): Likewise.
124060         * lib/freadable.c (freadable): Likewise.
124061         * lib/freadahead.c (freadahead): Likewise.
124062         * lib/freading.c (freading): Likewise.
124063         * lib/freadptr.c (freadptr): Likewise.
124064         * lib/freadseek.c (freadptrinc): Likewise.
124065         * lib/fseeko.c (rpl_fseeko): Likewise.
124066         * lib/fseterr.c (fseterr): Likewise.
124067         * lib/fwritable.c (fwritable): Likewise.
124068         * lib/fwriting.c (fwriting): Likewise.
124069         Reported by Alain Guibert <alguibert+bts@free.fr>.
124071 2008-04-15  Bruno Haible  <bruno@clisp.org>
124073         * modules/mathl (configure.ac): Define module indicator.
124075 2008-04-15  Bruno Haible  <bruno@clisp.org>
124077         * lib/logl.c (logl): Remove unused variables.
124079 2008-04-15  Bruno Haible  <bruno@clisp.org>
124081         * lib/uniconv/u-conv-to-enc.h (FUNC): Fix return value when U_TO_U8
124082         fails.
124084 2008-04-15  Bruno Haible  <bruno@clisp.org>
124086         * lib/trim.c (trim2): Fix argument of isspace() macro.
124088 2008-04-15  Paolo Bonzini  <bonzini@gnu.org>
124090         * lib/tanl.c (kernel_tanl): Rename flag to invert, initialize it
124091         to 0.
124092         * lib/trigl.c (ieee754_rem_pio2l): Fix range checks.
124094 2008-04-14  Bruno Haible  <bruno@clisp.org>
124096         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Fix underquoting of
124097         AC_LANG_PROGRAM argument.
124098         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Likewise.
124099         * m4/gethrxtime.m4 (gl_ARITHMETIC_HRTIME_T): Likewise.
124100         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Likewise.
124101         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise.
124102         * m4/math_h.m4 (gl_MATH_H): Likewise.
124103         * m4/mbstate_t.m4 (AC_TYPE_MBSTATE_T): Likewise.
124104         * m4/memmem.m4 (gl_FUNC_MEMMEM): Likewise.
124105         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Likewise.
124106         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Likewise.
124107         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
124108         * m4/regex.m4 (gl_REGEX): Likewise.
124109         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Likewise.
124110         * m4/stdio_h.m4 (gl_STDIN_LARGE_OFFSET): Likewise.
124111         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
124112         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): Likewise.
124113         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
124114         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
124115         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
124116         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
124118 2008-04-14  Jim Meyering  <meyering@redhat.com>
124120         test-strtod: fix typos: s/abs/fabs/
124121         * tests/test-strtod.c (main): Use fabs, not narrowing-to-int "abs".
124123 2008-04-13  Bruno Haible  <bruno@clisp.org>
124125         Fix conflict between modules 'canonicalize' and 'canonicalize-lgpl'.
124126         * lib/canonicalize-lgpl.c: Elide the contents if the 'canonicalize'
124127         module is also used and while not building the reloc-wrapper.
124129 2008-04-13  Bruno Haible  <bruno@clisp.org>
124131         * tests/test-getaddrinfo.c (simple): Ignore EAI_NODATA error.
124133 2008-04-13  Bruno Haible  <bruno@clisp.org>
124135         Fix AIX compilation failure introduced on 2008-04-02.
124136         * tests/test-frexp.c (exp): Undefine before redefining.
124137         * tests/test-frexpl.c (exp): Likewise.
124139 2008-04-13  Bruno Haible  <bruno@clisp.org>
124141         Work around a HP-UX stdio bug.
124142         * tests/test-ftell.c (main): Disable the fseek/ftell test on HP-UX.
124143         * tests/test-ftello.c (main): Likewise.
124144         * doc/posix-functions/ftell.texi: Mention HP-UX bug.
124145         * doc/posix-functions/ftello.texi: Likewise.
124147 2008-04-13  Bruno Haible  <bruno@clisp.org>
124149         Make test-signbit pass on HP-UX/hppa.
124150         * tests/test-signbit.c (minus_zerol): New variable.
124151         (test_signbitl): Use it.
124153 2008-04-13  Bruno Haible  <bruno@clisp.org>
124155         Make truncl work on OSF/1 4.0.
124156         * m4/truncl.m4 (gl_FUNC_TRUNCL): Test whether truncl actually works.
124157         Set REPLACE_TRUNCL, not HAVE_DECL_TRUNCL.
124158         * lib/math.in.h (truncl): Test REPLACE_TRUNCL, not HAVE_DECL_TRUNCL.
124159         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_TRUNCL, not
124160         HAVE_DECL_TRUNCL.
124161         * modules/math (Makefile.am): Substitute REPLACE_TRUNCL, not
124162         HAVE_DECL_TRUNCL.
124163         * doc/posix-functions/truncl.texi: Document the OSF/1 4.0 problem.
124165 2008-04-13  Bruno Haible  <bruno@clisp.org>
124167         * lib/unictype.h: Remove trailing comma from enumeration definitions.
124169 2008-04-13  Bruno Haible  <bruno@clisp.org>
124171         * lib/count-one-bits.h (COUNT_ONE_BITS): Rewrite verification
124172         expression, so as to avoid HP-UX 11 cc compiler bug.
124174 2008-04-13  Bruno Haible  <bruno@clisp.org>
124176         * m4/regex.m4 (gl_PREREQ_REGEX): Also check for <libintl.h>.
124178 2008-04-13  Bruno Haible  <bruno@clisp.org>
124180         * lib/git-merge-changelog.c: Remove empty declaration outside of
124181         functions.
124183 2008-04-13  Bruno Haible  <bruno@clisp.org>
124185         * modules/quotearg-tests (Makefile.am): Define test_quotearg_LDADD.
124187 2008-04-13  Bruno Haible  <bruno@clisp.org>
124189         * doc/posix-headers/sys_socket.texi: Document the problem on EMX.
124190         * lib/sys_socket.in.h (SHUT_RD, SHUT_WR, SHUT_RDWR): Define if missing.
124191         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Replace <sys/socket.h>
124192         also if it exists but lacks definitions of the SHUT_* macros.
124193         * modules/sys_socket (Description): Update.
124194         Reported by Elbert Pol <e.pol@chello.nl>.
124196 2008-04-13  Bruno Haible  <bruno@clisp.org>
124198         * lib/localcharset.c (OS2): Don't redefine if already defined.
124199         Reported by Elbert Pol <e.pol@chello.nl>.
124201 2008-04-13  Bruno Haible  <bruno@clisp.org>
124203         * lib/binary-io.h [__EMX__]: Include <io.h>.
124204         Reported by Elbert Pol <e.pol@chello.nl>.
124206 2008-04-12  Bruno Haible  <bruno@clisp.org>
124208         * lib/fpucw.h: Enable the definitions also for x86_64.
124209         Needed for NetBSD/x86_64.
124210         Reported by Thomas Klausner <tk@giga.or.at>.
124212 2008-04-12  Bruno Haible  <bruno@clisp.org>
124214         * tests/test-strtod.c: Include isnand.h.
124215         (main): Use isnand instead of isnan.
124216         Reported by Jim Meyering.
124218 2008-04-12  Bruno Haible  <bruno@clisp.org>
124220         * m4/isnanf.m4 (gl_ISNANF_WORKS): Add a test for a special NaN.
124221         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
124223 2008-04-12  Jim Meyering  <meyering@redhat.com>
124225         * m4/math_h.m4 (gl_MATH_H): Fix typos.
124227 2008-04-12  Bruno Haible  <bruno@clisp.org>
124229         * lib/freadptr.c (freadptr) [__EMX__]: Fix wrong assertion.
124230         Reported by Elbert Pol <e.pol@chello.nl>.
124232 2008-04-12  Eric Blake  <ebb9@byu.net>
124234         Work around Solaris 10 math.h bug.
124235         * m4/math_h.m4 (gl_MATH_H): Check for bug.
124236         (gl_MATH_H_DEFAULTS): Set up default.
124237         * modules/math (Makefile.am): Replace new indicators.
124238         * lib/math.in.h (NAN, HUGE_VAL): Provide replacements.
124239         * tests/test-math.c (main): Test this.
124240         * m4/strtod.m4 (gl_FUNC_STRTOD): Don't rely on HUGE_VAL.
124241         * doc/posix-headers/math.texi (math.h): Mention bug.
124242         Reported by Nelson H. F. Beebe and Jim Meyering.
124244 2008-04-11  Bruno Haible  <bruno@clisp.org>
124246         Adapt to future versions of Apple GCC.
124247         * lib/argp-fmtstream.h (ARGP_FS_EI): Don't test __GNUC_GNU_INLINE__.
124248         Reported by Peter O'Gorman <peter@pogma.com>.
124250 2008-04-11  Bruno Haible  <bruno@clisp.org>
124252         * tests/test-getaddrinfo.c (simple): Ignore EAI_NONAME error.
124254 2008-04-11  Bruno Haible  <bruno@clisp.org>
124256         * modules/strsignal-tests (Makefile.am): Define test_strsignal_LDADD.
124258         * modules/getaddrinfo-tests (Makefile.am): Define
124259         test_getaddrinfo_LDADD.
124261 2008-04-11  Bruno Haible  <bruno@clisp.org>
124263         * lib/strsignal.c (_sys_siglist): Don't declare if already declared.
124264         (init): Fix syntax error.
124265         * m4/strsignal.m4 (gl_PREREQ_STRSIGNAL): Check whether _sys_siglist
124266         is declared.
124268 2008-04-11  Bruno Haible  <bruno@clisp.org>
124270         * lib/glob.c: Include <stdbool.h>. Needed at least with IRIX cc.
124271         * modules/glob (Depends-on): Add stdbool.
124273 2008-04-11  Bruno Haible  <bruno@clisp.org>
124275         * lib/trim.c: Include <string.h>.
124277 2008-04-11  Eric Blake  <ebb9@byu.net>
124279         Avoid compile failure on OS/2.
124280         * lib/regex_internal.h (internal_function): Disable optimization
124281         on OS/2 (__EMX__), where it caused compiler error.
124282         Reported by Elbert Pol.
124284 2008-04-11  Bruno Haible  <bruno@clisp.org>
124286         Flush the standard error stream before aborting. Needed on mingw.
124287         * tests/test-argmatch.c (ASSERT): Call fflush(stderr) before abort().
124288         * tests/test-array_list.c (ASSERT): Likewise.
124289         * tests/test-array_oset.c (ASSERT): Likewise.
124290         * tests/test-avltree_list.c (ASSERT): Likewise.
124291         * tests/test-avltree_oset.c (ASSERT): Likewise.
124292         * tests/test-avltreehash_list.c (ASSERT): Likewise.
124293         * tests/test-binary-io.c (ASSERT): Likewise.
124294         * tests/test-byteswap.c (ASSERT): Likewise.
124295         * tests/test-c-ctype.c (ASSERT): Likewise.
124296         * tests/test-c-strcasecmp.c (ASSERT): Likewise.
124297         * tests/test-c-strcasestr.c (ASSERT): Likewise.
124298         * tests/test-c-strncasecmp.c (ASSERT): Likewise.
124299         * tests/test-c-strstr.c (ASSERT): Likewise.
124300         * tests/test-canonicalize-lgpl.c (ASSERT): Likewise.
124301         * tests/test-canonicalize.c (ASSERT): Likewise.
124302         * tests/test-carray_list.c (ASSERT): Likewise.
124303         * tests/test-ceilf1.c (ASSERT): Likewise.
124304         * tests/test-ceilf2.c (ASSERT): Likewise.
124305         * tests/test-ceill.c (ASSERT): Likewise.
124306         * tests/test-count-one-bits.c (ASSERT): Likewise.
124307         * tests/test-fbufmode.c (ASSERT): Likewise.
124308         * tests/test-fflush2.c (ASSERT): Likewise.
124309         * tests/test-floorf1.c (ASSERT): Likewise.
124310         * tests/test-floorf2.c (ASSERT): Likewise.
124311         * tests/test-floorl.c (ASSERT): Likewise.
124312         * tests/test-fopen.c (ASSERT): Likewise.
124313         * tests/test-fpending.c (ASSERT): Likewise.
124314         * tests/test-fprintf-posix.c (ASSERT): Likewise.
124315         * tests/test-fpurge.c (ASSERT): Likewise.
124316         * tests/test-freadable.c (ASSERT): Likewise.
124317         * tests/test-freadahead.c (ASSERT): Likewise.
124318         * tests/test-freading.c (ASSERT): Likewise.
124319         * tests/test-freadptr.c (ASSERT): Likewise.
124320         * tests/test-freadptr2.c (ASSERT): Likewise.
124321         * tests/test-freadseek.c (ASSERT): Likewise.
124322         * tests/test-freopen.c (ASSERT): Likewise.
124323         * tests/test-frexp.c (ASSERT): Likewise.
124324         * tests/test-frexpl.c (ASSERT): Likewise.
124325         * tests/test-fseek.c (ASSERT): Likewise.
124326         * tests/test-fseeko.c (ASSERT): Likewise.
124327         * tests/test-fstrcmp.c (ASSERT): Likewise.
124328         * tests/test-ftell.c (ASSERT): Likewise.
124329         * tests/test-ftello.c (ASSERT): Likewise.
124330         * tests/test-func.c (ASSERT): Likewise.
124331         * tests/test-fwritable.c (ASSERT): Likewise.
124332         * tests/test-fwriting.c (ASSERT): Likewise.
124333         * tests/test-getdelim.c (ASSERT): Likewise.
124334         * tests/test-getline.c (ASSERT): Likewise.
124335         * tests/test-i-ring.c (ASSERT): Likewise.
124336         * tests/test-iconv-utf.c (ASSERT): Likewise.
124337         * tests/test-iconv.c (ASSERT): Likewise.
124338         * tests/test-isfinite.c (ASSERT): Likewise.
124339         * tests/test-isnand.c (ASSERT): Likewise.
124340         * tests/test-isnanf.c (ASSERT): Likewise.
124341         * tests/test-isnanl.h (ASSERT): Likewise.
124342         * tests/test-ldexpl.c (ASSERT): Likewise.
124343         * tests/test-linked_list.c (ASSERT): Likewise.
124344         * tests/test-linkedhash_list.c (ASSERT): Likewise.
124345         * tests/test-localename.c (ASSERT): Likewise.
124346         * tests/test-lseek.c (ASSERT): Likewise.
124347         * tests/test-mbscasecmp.c (ASSERT): Likewise.
124348         * tests/test-mbscasestr1.c (ASSERT): Likewise.
124349         * tests/test-mbscasestr2.c (ASSERT): Likewise.
124350         * tests/test-mbscasestr3.c (ASSERT): Likewise.
124351         * tests/test-mbscasestr4.c (ASSERT): Likewise.
124352         * tests/test-mbschr.c (ASSERT): Likewise.
124353         * tests/test-mbscspn.c (ASSERT): Likewise.
124354         * tests/test-mbsncasecmp.c (ASSERT): Likewise.
124355         * tests/test-mbspbrk.c (ASSERT): Likewise.
124356         * tests/test-mbspcasecmp.c (ASSERT): Likewise.
124357         * tests/test-mbsrchr.c (ASSERT): Likewise.
124358         * tests/test-mbsspn.c (ASSERT): Likewise.
124359         * tests/test-mbsstr1.c (ASSERT): Likewise.
124360         * tests/test-mbsstr2.c (ASSERT): Likewise.
124361         * tests/test-mbsstr3.c (ASSERT): Likewise.
124362         * tests/test-memchr2.c (ASSERT): Likewise.
124363         * tests/test-memmem.c (ASSERT): Likewise.
124364         * tests/test-open.c (ASSERT): Likewise.
124365         * tests/test-printf-frexp.c (ASSERT): Likewise.
124366         * tests/test-printf-frexpl.c (ASSERT): Likewise.
124367         * tests/test-printf-posix.c (ASSERT): Likewise.
124368         * tests/test-quotearg.c (ASSERT): Likewise.
124369         * tests/test-rbtree_list.c (ASSERT): Likewise.
124370         * tests/test-rbtree_oset.c (ASSERT): Likewise.
124371         * tests/test-rbtreehash_list.c (ASSERT): Likewise.
124372         * tests/test-round1.c (ASSERT): Likewise.
124373         * tests/test-roundf1.c (ASSERT): Likewise.
124374         * tests/test-roundl.c (ASSERT): Likewise.
124375         * tests/test-signbit.c (ASSERT): Likewise.
124376         * tests/test-sleep.c (ASSERT): Likewise.
124377         * tests/test-snprintf-posix.c (ASSERT): Likewise.
124378         * tests/test-snprintf.c (ASSERT): Likewise.
124379         * tests/test-sprintf-posix.c (ASSERT): Likewise.
124380         * tests/test-stat-time.c (ASSERT): Likewise.
124381         * tests/test-strcasestr.c (ASSERT): Likewise.
124382         * tests/test-strerror.c (ASSERT): Likewise.
124383         * tests/test-striconv.c (ASSERT): Likewise.
124384         * tests/test-striconveh.c (ASSERT): Likewise.
124385         * tests/test-striconveha.c (ASSERT): Likewise.
124386         * tests/test-strsignal.c (ASSERT): Likewise.
124387         * tests/test-strstr.c (ASSERT): Likewise.
124388         * tests/test-strtod.c (ASSERT): Likewise.
124389         * tests/test-trunc1.c (ASSERT): Likewise.
124390         * tests/test-trunc2.c (ASSERT): Likewise.
124391         * tests/test-truncf1.c (ASSERT): Likewise.
124392         * tests/test-truncf2.c (ASSERT): Likewise.
124393         * tests/test-truncl.c (ASSERT): Likewise.
124394         * tests/test-vasnprintf-posix.c (ASSERT): Likewise.
124395         * tests/test-vasnprintf-posix2.c (ASSERT): Likewise.
124396         * tests/test-vasnprintf.c (ASSERT): Likewise.
124397         * tests/test-vasprintf-posix.c (ASSERT): Likewise.
124398         * tests/test-vasprintf.c (ASSERT): Likewise.
124399         * tests/test-vfprintf-posix.c (ASSERT): Likewise.
124400         * tests/test-vprintf-posix.c (ASSERT): Likewise.
124401         * tests/test-vsnprintf-posix.c (ASSERT): Likewise.
124402         * tests/test-vsnprintf.c (ASSERT): Likewise.
124403         * tests/test-vsprintf-posix.c (ASSERT): Likewise.
124404         * tests/test-wcwidth.c (ASSERT): Likewise.
124405         * tests/test-xfprintf-posix.c (ASSERT): Likewise.
124406         * tests/test-xprintf-posix.c (ASSERT): Likewise.
124407         * tests/test-xvasprintf.c (ASSERT): Likewise.
124408         * tests/uniconv/test-u16-conv-from-enc.c (ASSERT): Likewise.
124409         * tests/uniconv/test-u16-conv-to-enc.c (ASSERT): Likewise.
124410         * tests/uniconv/test-u16-strconv-from-enc.c (ASSERT): Likewise.
124411         * tests/uniconv/test-u16-strconv-to-enc.c (ASSERT): Likewise.
124412         * tests/uniconv/test-u32-conv-from-enc.c (ASSERT): Likewise.
124413         * tests/uniconv/test-u32-conv-to-enc.c (ASSERT): Likewise.
124414         * tests/uniconv/test-u32-strconv-from-enc.c (ASSERT): Likewise.
124415         * tests/uniconv/test-u32-strconv-to-enc.c (ASSERT): Likewise.
124416         * tests/uniconv/test-u8-conv-from-enc.c (ASSERT): Likewise.
124417         * tests/uniconv/test-u8-conv-to-enc.c (ASSERT): Likewise.
124418         * tests/uniconv/test-u8-strconv-from-enc.c (ASSERT): Likewise.
124419         * tests/uniconv/test-u8-strconv-to-enc.c (ASSERT): Likewise.
124420         * tests/unictype/test-bidi_byname.c (ASSERT): Likewise.
124421         * tests/unictype/test-bidi_name.c (ASSERT): Likewise.
124422         * tests/unictype/test-bidi_of.c (ASSERT): Likewise.
124423         * tests/unictype/test-bidi_test.c (ASSERT): Likewise.
124424         * tests/unictype/test-block_list.c (ASSERT): Likewise.
124425         * tests/unictype/test-block_of.c (ASSERT): Likewise.
124426         * tests/unictype/test-block_test.c (ASSERT): Likewise.
124427         * tests/unictype/test-categ_and.c (ASSERT): Likewise.
124428         * tests/unictype/test-categ_and_not.c (ASSERT): Likewise.
124429         * tests/unictype/test-categ_byname.c (ASSERT): Likewise.
124430         * tests/unictype/test-categ_name.c (ASSERT): Likewise.
124431         * tests/unictype/test-categ_none.c (ASSERT): Likewise.
124432         * tests/unictype/test-categ_of.c (ASSERT): Likewise.
124433         * tests/unictype/test-categ_or.c (ASSERT): Likewise.
124434         * tests/unictype/test-categ_test_withtable.c (ASSERT): Likewise.
124435         * tests/unictype/test-combining.c (ASSERT): Likewise.
124436         * tests/unictype/test-decdigit.c (ASSERT): Likewise.
124437         * tests/unictype/test-digit.c (ASSERT): Likewise.
124438         * tests/unictype/test-mirror.c (ASSERT): Likewise.
124439         * tests/unictype/test-numeric.c (ASSERT): Likewise.
124440         * tests/unictype/test-pr_byname.c (ASSERT): Likewise.
124441         * tests/unictype/test-pr_test.c (ASSERT): Likewise.
124442         * tests/unictype/test-predicate-part1.h (ASSERT): Likewise.
124443         * tests/unictype/test-scripts.c (ASSERT): Likewise.
124444         * tests/unictype/test-sy_c_ident.c (ASSERT): Likewise.
124445         * tests/unictype/test-sy_java_ident.c (ASSERT): Likewise.
124446         * tests/unistdio/test-u16-asnprintf1.c (ASSERT): Likewise.
124447         * tests/unistdio/test-u16-vasnprintf1.c (ASSERT): Likewise.
124448         * tests/unistdio/test-u16-vasnprintf2.c (ASSERT): Likewise.
124449         * tests/unistdio/test-u16-vasnprintf3.c (ASSERT): Likewise.
124450         * tests/unistdio/test-u16-vasprintf1.c (ASSERT): Likewise.
124451         * tests/unistdio/test-u16-vsnprintf1.c (ASSERT): Likewise.
124452         * tests/unistdio/test-u16-vsprintf1.c (ASSERT): Likewise.
124453         * tests/unistdio/test-u32-asnprintf1.c (ASSERT): Likewise.
124454         * tests/unistdio/test-u32-vasnprintf1.c (ASSERT): Likewise.
124455         * tests/unistdio/test-u32-vasnprintf2.c (ASSERT): Likewise.
124456         * tests/unistdio/test-u32-vasnprintf3.c (ASSERT): Likewise.
124457         * tests/unistdio/test-u32-vasprintf1.c (ASSERT): Likewise.
124458         * tests/unistdio/test-u32-vsnprintf1.c (ASSERT): Likewise.
124459         * tests/unistdio/test-u32-vsprintf1.c (ASSERT): Likewise.
124460         * tests/unistdio/test-u8-asnprintf1.c (ASSERT): Likewise.
124461         * tests/unistdio/test-u8-vasnprintf1.c (ASSERT): Likewise.
124462         * tests/unistdio/test-u8-vasnprintf2.c (ASSERT): Likewise.
124463         * tests/unistdio/test-u8-vasnprintf3.c (ASSERT): Likewise.
124464         * tests/unistdio/test-u8-vasprintf1.c (ASSERT): Likewise.
124465         * tests/unistdio/test-u8-vsnprintf1.c (ASSERT): Likewise.
124466         * tests/unistdio/test-u8-vsprintf1.c (ASSERT): Likewise.
124467         * tests/unistdio/test-ulc-asnprintf1.c (ASSERT): Likewise.
124468         * tests/unistdio/test-ulc-vasnprintf1.c (ASSERT): Likewise.
124469         * tests/unistdio/test-ulc-vasnprintf2.c (ASSERT): Likewise.
124470         * tests/unistdio/test-ulc-vasnprintf3.c (ASSERT): Likewise.
124471         * tests/unistdio/test-ulc-vasprintf1.c (ASSERT): Likewise.
124472         * tests/unistdio/test-ulc-vsnprintf1.c (ASSERT): Likewise.
124473         * tests/unistdio/test-ulc-vsprintf1.c (ASSERT): Likewise.
124474         * tests/uniwidth/test-u16-strwidth.c (ASSERT): Likewise.
124475         * tests/uniwidth/test-u16-width.c (ASSERT): Likewise.
124476         * tests/uniwidth/test-u32-strwidth.c (ASSERT): Likewise.
124477         * tests/uniwidth/test-u32-width.c (ASSERT): Likewise.
124478         * tests/uniwidth/test-u8-strwidth.c (ASSERT): Likewise.
124479         * tests/uniwidth/test-u8-width.c (ASSERT): Likewise.
124480         * tests/uniwidth/test-uc_width.c (ASSERT): Likewise.
124481         Reported by Eric Blake.
124483 2008-04-11  Bruno Haible  <bruno@clisp.org>
124485         * lib/wchar.in.h: Tweak comment.
124487 2008-04-11  Bruno Haible  <bruno@clisp.org>
124489         Fix __GNUC_STDC_INLINE__ predefine with Apple GCC on MacOS X 10.5.
124490         * gnulib-tool (func_emit_initmacro_start): Emit an invocation of
124491         gl_COMMON.
124492         * m4/gnulib-common.m4 (gl_COMMON, gl_COMMON_BODY): New macros.
124494 2008-04-11  Bruno Haible  <bruno@clisp.org>
124496         * modules/git-merge-changelog (git_merge_changelog_LDADD): Add LIBINTL.
124498 2008-04-11  Simon Josefsson  <simon@josefsson.org>
124500         * lib/gc-gnulib.c: On Windows, use CryptGenRandom from CSP instead
124501         of attempting to use nonexistent /dev/*random.  Based on patch
124502         from Adam Strzelecki <ono@java.pl> in
124503         <http://lists.gnu.org/r/help-gsasl/2008-02/msg00000.html>.
124505 2008-04-08  Bruno Haible  <bruno@clisp.org>
124507         Add tentative support for emx+gcc.
124508         * lib/fbufmode.c (fbufmode) [__EMX__]: Add conditional code.
124509         * lib/fpurge.c (fpurge): Likewise.
124510         * lib/freadable.c (freadable): Likewise.
124511         * lib/freadahead.c (freadahead): Likewise.
124512         * lib/freading.c (freading): Likewise.
124513         * lib/freadptr.c (freadptr): Likewise.
124514         * lib/freadseek.c (freadptrinc): Likewise.
124515         * lib/fseeko.c (rpl_fseeko): Likewise.
124516         * lib/fseterr.c (fseterr): Likewise.
124517         * lib/fwritable.c (fwritable): Likewise.
124518         * lib/fwriting.c (fwriting): Likewise.
124519         * m4/fpending.m4 (gl_FUNC_FPENDING): Add a variant for emx+gcc.
124521 2008-04-09  Eric Blake  <ebb9@byu.net>
124523         Avoid some autoconf warnings.
124524         * m4/regex.m4 (gl_REGEX): s/AC_HELP_STRING/AS_HELP_STRING/.
124525         * m4/acl.m4 (gl_FUNC_ACL): Likewise.
124526         * m4/afs.m4 (gl_AFS): Likewise.
124527         * m4/gc-random.m4 (gl_GC_RANDOM): Likewise.
124528         * m4/include_next.m4 (gl_INCLUDE_NEXT): s/AC_FOREACH/m4_foreach_w/.
124529         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Likewise.
124530         * m4/stdint.m4 (gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED)
124531         (gl_INTEGER_TYPE_SUFFIX): Likewise.
124532         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE)
124533         (AC_CHECK_DECLS_ONCE): Likewise.
124534         Rename file...
124535         * m4/onceonly.m4: ...to this, and delete 2.54 variant, now that
124536         gnulib-tool requires autoconf 2.59 or better.
124537         * gnulib-tool (func_get_filelist): s/\(onceonly\)_2_57.m4/\1.m4/.
124539 2008-04-08  Eric Blake  <ebb9@byu.net>
124541         Use 'git describe --match' if present (added in git 1.5.5).
124542         * build-aux/git-version-gen: Limit result to tags that match 'v*'
124543         if possible.
124545 2008-04-08  Bruno Haible  <bruno@clisp.org>
124547         Add tentative support for OpenServer.
124548         * lib/fbufmode.c (fbufmode): Add conditional define for _flag, _base,
124549         _ptr, _cnt.
124550         * lib/fpurge.c (fpurge): Likewise.
124551         * lib/freadable.c (freadable): Likewise.
124552         * lib/freadahead.c (freadahead): Likewise.
124553         * lib/freading.c (freading): Likewise.
124554         * lib/freadptr.c (freadptr): Likewise.
124555         * lib/freadseek.c (freadptrinc): Likewise.
124556         * lib/fseeko.c (rpl_fseeko): Likewise.
124557         * lib/fseterr.c (fseterr): Likewise.
124558         * lib/fwritable.c (fwritable): Likewise.
124559         * lib/fwriting.c (fwriting): Likewise.
124560         Reported by Roger Cornelius <rac@tenzing.org> and
124561         Brian K. White <brian@aljex.com>.
124563 2008-04-06  Jim Meyering  <meyering@redhat.com>
124565         * gnulib-tool (func_add_or_update): s/backuped/backed up/ in diagnostic
124567 2008-04-06  Bruno Haible  <bruno@clisp.org>
124569         Avoid possible error with non-ASCII bytes in UTF-8 locales.
124570         * tests/test-fprintf-posix.sh: Use "LC_ALL=C tr" instead of "tr".
124571         * tests/test-printf-posix.sh: Likewise.
124572         * tests/test-vfprintf-posix.sh: Likewise.
124573         * tests/test-vprintf-posix.sh: Likewise.
124574         * tests/test-xprintf-posix.sh: Likewise.
124576 2008-04-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
124578         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT): Fix quoting,
124579         hide error from 'ls', needed on OS/2.
124580         Report by Elbert Pol <elbert.pol@gmail.com>.
124582 2008-04-04  Eric Blake  <ebb9@byu.net>
124584         Make test-fseeko.c failures meaningful.
124585         * tests/test-fseeko.c: Print line number on failure.
124586         * tests/test-fseek.c: Likewise.
124587         Reported by Nelson H. F. Beebe.
124589         Improve strtod bug detection check.
124590         * m4/strtod.m4 (gl_FUNC_STRTOD): Also check for hex-float parsing,
124591         required for Solaris 10.
124592         Reported by Bob Friesenhahn and Nelson H. F. Beebe.
124594 2008-04-04  Bruno Haible  <bruno@clisp.org>
124596         * modules/relocatable-prog-wrapper (Files): Add m4/environ.m4. Needed
124597         by m4/setenv.m4.
124599 2008-04-03  Eric Blake  <ebb9@byu.net>
124601         Ensure sane .version contents.
124602         * top/GNUmakefile (_dummy): Also delete .version when rebuilding
124603         version string.
124604         * build-aux/git-version-gen: Improve documentation.
124606         Make GNU make output nicer.
124607         * top/GNUmakefile [!_have-Makefile]: Add dependency on
124608         MAKECMDGOALS to enforce message for all command line targets.  Set
124609         srcdir for use in maint.mk.
124611         Another maintainer tweak.
124612         * top/GNUmakefile (_is-dist-target): Allow maintainer-distcheck as
124613         a target that regenerates version.
124615 2008-04-03  Jim Meyering  <meyering@redhat.com>
124617         vc-list-files: don't cause coreutils "make po-check" failure
124618         * build-aux/vc-list-files: Skip postprocessing when $2 is '.'
124620 2008-04-03  Eric Blake  <ebb9@byu.net>
124622         Allow VPATH usage of vc-list-files.
124623         * build-aux/vc-list-files (scriptversion): Add timestamp.
124624         (options): Add --help, --version, -C.
124625         (CVS): Support installed cvsu.
124627 2008-04-02  Bruno Haible  <bruno@clisp.org>
124629         Avoid some "statement with no effect" warnings from gcc.
124630         * tests/test-wctype.c (main): Explicitly ignore unused values.
124631         Reported by Jim Meyering.
124633 2008-04-02  Jim Meyering  <meyering@redhat.com>
124635         Avoid some warnings from "gcc -Wshadow".
124636         * tests/test-frexp.c (exp): Define to a different identifier.
124637         * tests/test-frexpl.c (exp): Likewise.
124639 2008-04-03  Jim Meyering  <meyering@redhat.com>
124641         bootstrap: remove dangling *.[ch] symlinks from lib
124642         * build-aux/bootstrap [dangling symlink removal]: Move find's
124643         -depth option to precede all others, to avoid a warning.
124644         Remove *.[ch] files too, and from "$source_base" (usually lib/).
124646 2008-04-02  Bruno Haible  <bruno@clisp.org>
124648         Avoid some warnings from "gcc -Wshadow".
124649         * tests/tests-vfprintf-posix.c (my_fprintf): Move after test_function.
124650         * tests/tests-vprintf-posix.c (my_printf): Move after test_function.
124651         * tests/tests-vsnprintf-posix.c (my_snprintf): Move after test_function.
124652         * tests/tests-vsprintf-posix.c (my_sprintf): Move after test_function.
124653         Reported by Jim Meyering.
124655 2008-04-01  Bruno Haible  <bruno@clisp.org>
124657         Fix test to work on IRIX 6.5 with cc.
124658         * tests/test-math.c (numeric_equal): New function.
124659         (main): Use it.
124661 2008-04-01  Bruno Haible  <bruno@clisp.org>
124663         * doc/posix-headers/math.texi: Refine documentation of NAN problem.
124665 2008-04-01  Bruno Haible  <bruno@clisp.org>
124667         * tests/test-vasnprintf-posix.c: Include nan.h instead of <math.h>.
124668         (test_function): Use NaNd, NaNl instead of NAN or 0.0L/0.0L.
124669         * modules/vasnprintf-posix-tests (Files): Add tests/nan.h.
124670         (Depends-on): Remove math.
124672         * tests/test-vasprintf-posix.c: Include nan.h instead of <math.h>.
124673         (test_function): Use NaNd, NaNl instead of NAN or 0.0L/0.0L.
124674         * modules/vasprintf-posix-tests (Files): Add tests/nan.h.
124675         (Depends-on): Remove math.
124677         * tests/test-snprintf-posix.h: Include nan.h instead of <math.h>.
124678         (test_function): Use NaNd, NaNl instead of NAN or 0.0L/0.0L.
124679         * modules/snprintf-posix-tests (Files): Add tests/nan.h.
124680         (Depends-on): Remove math.
124681         * modules/vsnprintf-posix-tests (Files): Add tests/nan.h.
124682         (Depends-on): Remove math.
124684         * tests/test-sprintf-posix.h: Include nan.h instead of <math.h>.
124685         (test_function): Use NaNd, NaNl instead of NAN or 0.0L/0.0L.
124686         * modules/sprintf-posix-tests (Files): Add tests/nan.h.
124687         (Depends-on): Remove math.
124688         * modules/vsprintf-posix-tests (Files): Add tests/nan.h.
124689         (Depends-on): Remove math.
124691         * tests/test-round1.c: Include nan.h.
124692         (main): Use NaNd instead of NAN.
124693         * modules/round-tests (Files): Add tests/nan.h.
124695         * tests/test-trunc1.c: Include nan.h.
124696         (main): Use NaNd instead of NAN.
124697         * modules/trunc-tests (Files): Add tests/nan.h.
124699         * tests/test-roundf1.c: Include nan.h.
124700         (main): Use NaNf instead of NAN.
124701         * modules/roundf-tests (Files): Add tests/nan.h.
124703         * tests/test-truncf1.c: Include nan.h.
124704         (main): Use NaNf instead of NAN.
124705         * modules/truncf-tests (Files): Add tests/nan.h.
124707         * tests/test-ceilf1.c: Include nan.h.
124708         (main): Use NaNf instead of NAN.
124709         * modules/ceilf-tests (Files): Add tests/nan.h.
124711         * tests/test-floorf1.c: Include nan.h.
124712         (main): Use NaNf instead of NAN.
124713         * modules/floorf-tests (Files): Add tests/nan.h.
124715         * tests/test-isnanf.c: Include nan.h instead of <math.h>.
124716         (main): Use NaNf instead of NAN.
124717         * modules/isnanf-nolibm-tests (Files): Add tests/nan.h.
124719         * tests/test-isnand.c: Include nan.h instead of <math.h>.
124720         (main): Use NaNd instead of NAN.
124721         * modules/isnand-nolibm-tests (Files): Add tests/nan.h.
124723         * tests/test-frexp.c: Include nan.h.
124724         (main): Use NaNd instead of NAN.
124725         * modules/frexp-tests (Files): Add tests/nan.h.
124727         * lib/isnan.c: Don't include <math.h>.
124728         (FUNC): Don't use NAN macro.
124729         * modules/isnand-nolibm (Depends-on): Remove math.
124730         * modules/isnanf-nolibm (Depends-on): Remove math.
124731         * modules/isnanl (Depends-on): Remove math.
124732         * modules/isnanl-nolibm (Depends-on): Remove math.
124734         * tests/nan.h: New file.
124736 2008-04-01  Eric Blake  <ebb9@byu.net>
124738         Fix typos.
124739         * tests/test-strtod.c (main): s/FLT_/DBL_/ for minimum and epsilon
124740         values to be the right type.
124742         For now, cater to gnulib strtod inaccuracies.
124743         * tests/test-strtod.c (main): Allow 1-ulp error on expected
124744         fractional results.  While not as nice from a QoI perspective, it
124745         is a quicker patch than correctly implementing decimal to binary
124746         rounding.
124748 2008-03-31  Eric Blake  <ebb9@byu.net>
124750         Guarantee a definition of NAN.
124751         * lib/math.in.h (NAN): Define if missing.
124752         * tests/test-math.c (main): Test it.
124753         * doc/posix-headers/math.texi (math.h): Document this.
124754         * lib/isnan.c (rpl_isnand): Use it.
124755         * tests/test-ceilf1.c (NaN): Delete, and use NAN instead.
124756         * tests/test-floorf1.c (NaN): Likewise.
124757         * tests/test-frexp.c (NaN): Likewise.
124758         * tests/test-isnand.c (NaN): Likewise.
124759         * tests/test-isnanf.c (NaN): Likewise.
124760         * tests/test-round1.c (NaN): Likewise.
124761         * tests/test-roundf1.c (NaN): Likewise.
124762         * tests/test-snprintf-posix.h (NaN): Likewise.
124763         * tests/test-sprintf-posix.h (NaN): Likewise.
124764         * tests/test-trunc1.c (NaN): Likewise.
124765         * tests/test-truncf1.c (NaN): Likewise.
124766         * tests/test-vasnprintf-posix.c (NaN): Likewise.
124767         * tests/test-vasprintf-posix.c (NaN): Likewise.
124768         * modules/isnand-nolibm (Depends-on): Add math.
124769         * modules/isnanf-nolibm (Depends-on): Likewise.
124770         * modules/isnanl (Depends-on): Likewise.
124771         * modules/isnanl-nolibm (Depends-on): Likewise.
124772         * modules/snprintf-posix-tests (Depends-on): Likewise.
124773         * modules/sprintf-posix-tests (Depends-on): Likewise.
124774         * modules/vsnprintf-posix-tests (Depends-on): Likewise.
124775         * modules/vsprintf-posix-tests (Depends-on): Likewise.
124776         * modules/vasnprintf-posix-tests (Depends-on): Likewise.
124777         * modules/vasprintf-posix-tests (Depends-on): Likewise.
124779 2008-03-31  Bruno Haible  <bruno@clisp.org>
124781         * tests/test-strtod.c (main): Update results for OSF/1 platforms.
124782         * doc/posix-functions/strtod.texi: Likewise.
124784 2008-03-31  Bruno Haible  <bruno@clisp.org>
124786         * tests/test-strtod.c (main): Don't use C99 syntax.
124788 2008-03-31  Bruno Haible  <bruno@clisp.org>
124790         * tests/test-strtod.c (main): Don't test NAN macro. Needed for Solaris.
124791         Reported by Eric Blake.
124793 2008-03-31  Jim Meyering  <meyering@redhat.com>
124795         Don't compare actual signbit return values.
124796         * tests/test-strtod.c (main): Rather, compare only their
124797         zero/non-zero nature.
124799 2008-03-31  Eric Blake  <ebb9@byu.net>
124801         More strtod documentation.
124802         * doc/posix-functions/strtod.texi (strtod): Interpret more test
124803         failures as distinct bugs.
124805 2008-03-30  Paul Eggert  <eggert@cs.ucla.edu>
124807         * lib/wchar.in.h [defined __need_mbstate_t]: Just include <wchar.h>.
124808         Problem reported by Erik Benada in
124809         <http://lists.gnu.org/r/bug-gnulib/2008-03/msg00249.html>.
124811 2008-03-30  Bruno Haible  <bruno@clisp.org>
124813         * tests/test-strtod.c: Add comments about which assertion fails on which
124814         platform.
124815         * doc/posix-functions/strtod.texi: Add info about many more platforms.
124817 2008-03-30  Eric Blake  <ebb9@byu.net>
124819         Test signbit behavior on zeros.
124820         * tests/test-signbit.c (test_signbitf): Add tests for zero.
124821         (test_signbitd, test_signbitl): Likewise.
124823         More strtod touchups.
124824         * tests/test-strtod.c (main): Ignore tests for signbit on NaN, and
124825         sign of negative underflow, for now.  Use .5, not .1.
124826         * doc/posix-functions/strtod.texi (strtod): Mention these
124827         limitations.
124828         Reported by Jim Meyering.
124830 2008-03-30  Bruno Haible  <bruno@clisp.org>
124832         * lib/striconveh.h (mem_iconveh, str_iconveh): Optimize the conversion
124833         from UTF-8 to UTF-8//TRANSLIT in the same way as from UTF-8 to UTF-8.
124835 2008-03-30  Bruno Haible  <bruno@clisp.org>
124837         Avoid failure when attempting to return empty iconv results on some
124838         platforms.
124839         * lib/striconveh.c (mem_cd_iconveh_internal): In the final memory
124840         allocation, don't report ENOMEM when the resulting string is empty.
124842 2008-03-30  Bruno Haible  <bruno@clisp.org>
124844         Fix buffer overrun.
124845         * lib/vasnprintf.c (VASNPRINTF): If !USE_SNPRINTF && pad_ourselves:
124846         Don't consider the width for tmp_length. Check count against tmp_length
124847         before doing the padding. Ensure enough allocation during padding.
124849 2008-03-30  Eric Blake  <ebb9@byu.net>
124851         strtod touchups.
124852         * lib/strtod.c (strtod): Avoid compiler warnings.
124853         Reported by Jim Meyering.
124855 2008-03-30  Bruno Haible  <bruno@clisp.org>
124857         * lib/unistdio/u-vsprintf.h (EOVERFLOW): Remove fallback.
124858         * modules/unistdio/ulc-vsprintf (Depends-on): Add EOVERFLOW.
124859         * modules/unistdio/u8-vsprintf (Depends-on): Add EOVERFLOW.
124860         * modules/unistdio/u8-u8-vsprintf (Depends-on): Add EOVERFLOW.
124861         * modules/unistdio/u16-vsprintf (Depends-on): Add EOVERFLOW.
124862         * modules/unistdio/u16-u16-vsprintf (Depends-on): Add EOVERFLOW.
124863         * modules/unistdio/u32-vsprintf (Depends-on): Add EOVERFLOW.
124864         * modules/unistdio/u32-u32-vsprintf (Depends-on): Add EOVERFLOW.
124866         * lib/unistdio/u-vsnprintf.h (EOVERFLOW): Remove fallback.
124867         * modules/unistdio/ulc-vsnprintf (Depends-on): Add EOVERFLOW.
124868         * modules/unistdio/u8-vsnprintf (Depends-on): Add EOVERFLOW.
124869         * modules/unistdio/u8-u8-vsnprintf (Depends-on): Add EOVERFLOW.
124870         * modules/unistdio/u16-vsnprintf (Depends-on): Add EOVERFLOW.
124871         * modules/unistdio/u16-u16-vsnprintf (Depends-on): Add EOVERFLOW.
124872         * modules/unistdio/u32-vsnprintf (Depends-on): Add EOVERFLOW.
124873         * modules/unistdio/u32-u32-vsnprintf (Depends-on): Add EOVERFLOW.
124875         * lib/unistdio/u-vasprintf.h (EOVERFLOW): Remove fallback.
124876         * modules/unistdio/ulc-vasprintf (Depends-on): Add EOVERFLOW.
124877         * modules/unistdio/u8-vasprintf (Depends-on): Add EOVERFLOW.
124878         * modules/unistdio/u8-u8-vasprintf (Depends-on): Add EOVERFLOW.
124879         * modules/unistdio/u16-vasprintf (Depends-on): Add EOVERFLOW.
124880         * modules/unistdio/u16-u16-vasprintf (Depends-on): Add EOVERFLOW.
124881         * modules/unistdio/u32-vasprintf (Depends-on): Add EOVERFLOW.
124882         * modules/unistdio/u32-u32-vasprintf (Depends-on): Add EOVERFLOW.
124884         * lib/unistdio/ulc-vfprintf.c (EOVERFLOW): Remove fallback.
124885         * modules/unistdio/ulc-vfprintf (Depends-on): Add EOVERFLOW.
124887         * lib/unistdio/ulc-fprintf.c (EOVERFLOW): Remove fallback.
124888         * modules/unistdio/ulc-fprintf (Depends-on): Add EOVERFLOW.
124890         * lib/xvasprintf.c (EOVERFLOW): Remove fallback.
124891         * modules/xvasprintf (Depends-on): Add EOVERFLOW.
124893         * lib/vsprintf.c (EOVERFLOW): Remove fallback.
124894         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Drop gl_EOVERFLOW.
124895         * modules/vsprintf-posix (Depends-on): Add EOVERFLOW.
124897         * lib/vsnprintf.c (EOVERFLOW): Remove fallback.
124898         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Drop gl_EOVERFLOW.
124899         * modules/vsnprintf (Depends-on): Add EOVERFLOW.
124901         * lib/vfprintf.c (EOVERFLOW): Remove fallback.
124902         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Drop gl_EOVERFLOW.
124903         * modules/vfprintf-posix (Depends-on): Add EOVERFLOW.
124905         * lib/vasprintf.c (EOVERFLOW): Remove fallback.
124906         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Drop gl_EOVERFLOW.
124907         * modules/vasprintf (Depends-on): Add EOVERFLOW.
124909         * lib/vasnprintf.c (EOVERFLOW): Remove fallback.
124910         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Drop gl_EOVERFLOW.
124911         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Drop gl_EOVERFLOW.
124912         * modules/vasnprintf (Files): Remove m4/eoverflow.m4.
124913         (Depends-on): Add EOVERFLOW.
124914         * modules/unistdio/ulc-vasnprintf (Files): Remove m4/eoverflow.m4.
124915         (Depends-on): Add EOVERFLOW.
124916         * modules/unistdio/u8-vasnprintf (Files): Remove m4/eoverflow.m4.
124917         (Depends-on): Add EOVERFLOW.
124918         * modules/unistdio/u8-u8-vasnprintf (Files): Remove m4/eoverflow.m4.
124919         (Depends-on): Add EOVERFLOW.
124920         * modules/unistdio/u16-vasnprintf (Files): Remove m4/eoverflow.m4.
124921         (Depends-on): Add EOVERFLOW.
124922         * modules/unistdio/u16-u16-vasnprintf (Files): Remove m4/eoverflow.m4.
124923         (Depends-on): Add EOVERFLOW.
124924         * modules/unistdio/u32-vasnprintf (Files): Remove m4/eoverflow.m4.
124925         (Depends-on): Add EOVERFLOW.
124926         * modules/unistdio/u32-u32-vasnprintf (Files): Remove m4/eoverflow.m4.
124927         (Depends-on): Add EOVERFLOW.
124929         * lib/sprintf.c (EOVERFLOW): Remove fallback.
124930         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Drop gl_EOVERFLOW.
124931         * modules/sprintf-posix (Depends-on): Add EOVERFLOW.
124933         * lib/snprintf.c (EOVERFLOW): Remove fallback.
124934         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Drop gl_EOVERFLOW.
124935         * modules/snprintf (Depends-on): Add EOVERFLOW.
124937         * lib/poll.c (EOVERFLOW): Remove fallback.
124938         * modules/poll (Depends-on): Add EOVERFLOW.
124940         * lib/getugroups.c (EOVERFLOW): Remove fallback.
124941         * modules/getugroups (Depends-on): Add EOVERFLOW.
124943         * lib/getdelim.c (EOVERFLOW): Remove fallback.
124944         * modules/getdelim (Depends-on): Add EOVERFLOW.
124946         * lib/ftell.c (EOVERFLOW): Remove fallback.
124947         * modules/ftell (Depends-on): Add EOVERFLOW.
124949         * lib/fprintf.c (EOVERFLOW): Remove fallback.
124950         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Drop gl_EOVERFLOW.
124951         * modules/fprintf-posix (Depends-on): Add EOVERFLOW.
124953         * lib/c-stack.c (EOVERFLOW): Remove unused fallback.
124955         * modules/EOVERFLOW-tests: New file.
124956         * tests/test-EOVERFLOW.c: New file.
124958         * modules/EOVERFLOW: New file.
124959         * doc/posix-headers/errno.texi: Mention EOVERFLOW portability problem.
124961 2008-03-30  Bruno Haible  <bruno@clisp.org>
124963         Fix bug introduced on 2007-06-10.
124964         * lib/vasnprintf.c (VASNPRINTF): When performing zero-padding, use
124965         spaces instead of 0 digits for 's' also when ENABLE_UNISTDIO.
124967 2008-03-30  Bruno Haible  <bruno@clisp.org>
124969         Improve freadseek's efficiency after ungetc.
124970         * lib/freadseek.c: Include freadahead.h.
124971         (freadptrinc): New function, extracted from freadseek.
124972         (freadseek): Use it in a loop. Use freadahead to determine the number
124973         of loop iterations.
124974         * modules/freadseek (Depends-on): Add freadahead.
124975         (configure.ac): Require AC_C_INLINE.
124977 2008-03-30  Bruno Haible  <bruno@clisp.org>
124979         * lib/freadseek.c (freadseek): Don't ignore the return value of
124980         freadptr.
124982 2008-03-29  Eric Blake  <ebb9@byu.net>
124984         Add hex float support.
124985         * modules/strtod (Depends-on): Add c-ctype.
124986         (Link): Mention POW_LIB.
124987         * lib/strtod.c (strtod): Recognize hex floats.  Don't allow
124988         whitespace between 'e' and exponent.
124989         * tests/test-strtod.c (main): Enable hex float tests.
124990         * doc/posix-functions/strtod.texi (strtod): Document what gnulib
124991         now provides.
124993         Document various strtod bugs, with some fixes.
124994         * doc/posix-functions/strtod.texi (strtod): Document bugs with
124995         "-0x", "inf", "nan", and hex constants.
124996         * doc/posix-functions/atof.texi (atof): Likewise.
124997         * modules/stdlib (Makefile.am): Support strtod.
124998         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Likewise.
124999         * m4/strtod.m4 (gl_FUNC_STRTOD): Fit in stdlib framework, and
125000         detect additional strtod bugs.
125001         * lib/stdlib.in.h (rpl_strtod): Add declarations.
125002         * lib/strtod.c (strtod): Return -0.0 on negative underflow.  Use
125003         bool where appropriate.  Parse 'inf' and 'nan'.
125004         * tests/test-strtod.c: New file.
125005         * modules/strtod (Depends-on): Add stdbool, stdlib.
125006         (configure.ac): Turn on module indicator.
125007         * modules/strtod-tests: New module.
125009 2008-03-29  Eric Blake  <ebb9@byu.net>
125011         Fix ftell on mingw.
125012         * lib/ftell.c (EOVERFLOW): Define if the system lacks it.
125013         * modules/ftell-tests (Depends-on): Add binary-io.
125014         * modules/ftello-tests (Depends-on): Likewise.
125015         * tests/test-ftell.c (main): Enhance test to cover behavior after
125016         ungetc.  Enforce binary mode.
125017         * tests/test-ftello.c (main): Likewise.
125019         Pass test-freadseek on cygwin.
125020         * modules/freadseek (Depends-on): Use freadptr, not freadahead.
125021         * lib/freadseek.c (freadseek): Don't increment beyond bounds of
125022         ungetc buffer.
125024         * tests/test-fflush2.c (main): Fix typo.
125026 2008-03-29  Bruno Haible  <bruno@clisp.org>
125028         * tests/test-fflush2.c (main): Temporarily disable the contents of
125029         this test.
125030         * m4/fflush.m4 (gl_FUNC_FFLUSH): Add a TODO.
125031         Reported by Eric Blake.
125033 2008-03-28  Simon Josefsson  <simon@josefsson.org>
125035         * lib/gc.h (enum Gc_hash): Add GC_SHA224.
125036         (GC_SHA224_DIGEST_SIZE): Add.
125038         * lib/gc-libgcrypt.c (gc_hash_open): Handle SHA-224.
125039         (gc_hash_digest_length): Likewise.
125040         (gc_hash_buffer): Likewise.
125042 2008-03-25  Bruno Haible  <bruno@clisp.org>
125044         * doc/gnulib-tool.texi (gettextize and autopoint): Explain in more
125045         detail which gettext release to use.
125046         Reported by Simon Josefsson.
125048 2008-03-26  Jim Meyering  <meyering@redhat.com>
125050         gnumakefile: remove file from $(top_builddir), not from $(top_srcdir)
125051         * modules/gnumakefile (clean-GNUmakefile): Also, use
125052         test ... && ... || : syntax rather than if-then ... fi.
125054         gnumakefile: Don't double-quote-expand $(VPATH) value.
125055         * modules/gnumakefile (clean-GNUmakefile): Use single quotes.
125057 2008-03-24  Eric Blake  <ebb9@byu.net>
125059         Alter GNUmakefile to install into top directory.
125060         * modules/maintainer-makefile: Split, and add dependency...
125061         * modules/gnumakefile: to this new module.
125062         * build-aux/GNUmakefile: Move...
125063         * top/GNUmakefile: ...here.
125064         * build-aux/maint.mk: Move...
125065         * top/maint.mk: ...here.
125066         * MODULES.html.sh (Support for maintaining...): Document new
125067         module.
125069 2008-03-23  Bruno Haible  <bruno@clisp.org>
125071         * gnulib-tool: New options --vc-files, --no-vc-files.
125072         (func_usage): Document them.
125073         (vc_files): New variable.
125074         (func_import): Consider vc_files.
125075         (func_create_testdir): Set vc_files to empty.
125076         Suggested by Jim Meyering and Karl Berry.
125078 2008-03-23  Bruno Haible  <bruno@clisp.org>
125080         Fix regex compilation error on HP-UX 11.
125081         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_TYPE_MBSTATE_T.
125082         * modules/regex (Files): Add m4/mbstate_t.m4.
125083         Reported by Ton Voon <ton.voon@altinity.com>.
125085 2008-03-23  Bruno Haible  <bruno@clisp.org>
125087         * doc/gnulib-tool.texi (gettextize and autopoint): New section.
125089 2008-03-23  Eric Blake  <ebb9@byu.net>
125090             Bruno Haible  <bruno@clisp.org>
125092         Install files from top/ in the destination directory.
125093         * gnulib-tool (func_get_automake_snippet): Synthesize an EXTRA_DIST
125094         augmentation also for the files from top/.
125095         (func_import, func_create_testdir): Rewrite file names:
125096         top/filename -> filename.
125098 2008-03-23  Bruno Haible  <bruno@clisp.org>
125100         Tweak "gnulib --version" output.
125101         * gnulib-tool (func_version): Replace "-dirty" suffix with "-modified".
125103 2008-03-23  Bruno Haible  <bruno@clisp.org>
125105         Tweak "gnulib --version" output.
125106         * gnulib-tool (func_version): Use date of last commit to ChangeLog,
125107         rather than contents of ChangeLog, when possible.
125109 2008-03-21  Eric Blake  <ebb9@byu.net>
125111         More --version tweaks.
125112         * gnulib-tool (func_version): Obey GNU Coding Standards.  Output
125113         date of last ChangeLog entry.
125115 2008-03-21  Jim Meyering  <meyering@redhat.com>
125117         * build-aux/GNUmakefile (_have-git-version-gen): Split long line.
125119 2008-03-20  Eric Blake  <ebb9@byu.net>
125121         VPATH fix.
125122         * build-aux/GNUmakefile (_have_git-version-gen): Look in correct dir.
125124 2008-03-20  Simon Josefsson  <simon@josefsson.org>
125126         * build-aux/GNUmakefile: Make git-version-gen optional.  Add
125127         _build-aux variable.  Suggested by Eric Blake <ebb9@byu.net>.
125129 2008-03-20  Eric Blake  <ebb9@byu.net>
125131         Sync GNUmakefile with coreutils.
125132         * build-aux/GNUmakefile (have-Makefile): Rename...
125133         (_have-Makefile): ...to this, for namespace consideration.
125134         (GNUmakefile.cfg): Include, if present.
125135         (_autoreconf): Define a default.
125136         (_is-dist-target): New rule for rebuilds to pick up intra-release
125137         version.
125138         (maint-cfg.mk): Rename...
125139         (cfg.mk): ...to this.
125141 2008-03-18  Jim Meyering  <meyering@redhat.com>
125143         New script and module: mktempd
125144         * MODULES.html.sh (maint+release support): Add mktempd.
125145         * build-aux/mktempd: New file.
125146         * modules/mktempd: New file.
125148 2008-03-15  Jim Meyering  <meyering@redhat.com>
125150         Undo last change.
125151         * lib/sha1.c, lib/md5.c: 63 != ~63.
125152         Reported by Andreas Schwab.
125154         sha1.c, md5.c: Hoist a redundant expression.
125155         * lib/sha1.c (sha1_process_bytes): AND-off the low bits in
125156         "ctx->buflen" only once, before calling *_process_block.
125157         * lib/md5.c (md5_process_bytes): Likewise.
125159 2008-03-14  Eric Blake  <ebb9@byu.net>
125161         Bump copyright year in files generated by gnulib-tool.
125162         * gnulib-tool (func_emit_copyright_notice): Extract copyright from
125163         gnulib-tool, rather than hard-coding it.
125165         Fix 'gnulib-tool --version' output to work with git.
125166         * gnulib-tool (func_gnulib_dir): New function, extracted from...
125167         (startup): ...here.
125168         (func_version): Use it to invoke git-version-gen, rather than
125169         relying on CVS keyword expansion.  Modernize wording.
125170         (cvsdatestamp, last_checkin_date, version): Kill unused
125171         variables.
125173 2008-03-12  Jim Meyering  <meyering@redhat.com>
125175         Recognize optional cast of the argument to free.
125176         * build-aux/useless-if-before-free: Update regexps.
125178         * build-aux/bootstrap (gnulib_tool): Remove trailing blanks.
125180 2008-03-11  Bruno Haible  <bruno@clisp.org>
125182         Extend AC_LIB_LINKFLAGS to the situation of several libraries provided
125183         by a single package.
125184         * m4/lib-link.m4 (AC_LIB_FROMPACKAGE): New macro.
125185         (AC_LIB_LINKFLAGS_BODY): Use the information stored by
125186         AC_LIB_FROMPACKAGE. Use AC_ARG_WITH instead of AC_LIB_ARG_WITH.
125187         Reported by Sam Steingold <sds@gnu.org>.
125189 2008-03-12  Sergey Poznyakoff  <gray@gnu.org.ua>
125191         * build-aux/bootstrap (version_controlled_file): Adapt for SVN
125192         repositories.
125194 2008-03-11  Bruno Haible  <bruno@clisp.org>
125196         Avoid conflicts between local macro definitions.
125197         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
125198         AC_LIB_LINKFLAGS_BODY): Use pushdef/popdef instead of define/undefine.
125200 2008-03-10  Peter O'Gorman  <bug-gnulib@mlists.thewrittenword.com>
125201             Bruno Haible  <bruno@clisp.org>
125203         Make va_copy work with some version of xlc on AIX 5.1.
125204         * lib/stdarg.in.h: New file.
125205         * m4/stdarg.m4 (gl_STDARG_H): Initialize STDARG_H and NEXT_STDARG_H.
125206         On AIX, use a <stdarg.h> file substitute.
125207         * modules/stdarg (Files): Add lib/stdarg.in.h.
125208         (Depends-on): Add include_next.
125209         (Makefile.am): Build a stdarg.h substitute if requested.
125210         * doc/posix-functions/va_copy.texi: Document the platforms lacking it.
125212 2008-03-10  Bruno Haible  <bruno@clisp.org>
125214         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Document a restriction.
125215         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Likewise.
125216         Reported by Peter O'Gorman <bug-gnulib@mlists.thewrittenword.com>.
125218 2008-03-10  Bruno Haible  <bruno@clisp.org>
125220         * modules/stdlib (Depends-on): Add include_next, remove
125221         absolute-header.
125223 2008-03-09  Bruno Haible  <bruno@clisp.org>
125225         * lib/freadahead.h (freadahead): Document more precisely.
125226         * lib/freadahead.c (freadahead): When an ungetc is in effect, return
125227         the sum of both buffer sizes.
125228         * tests/test-freadahead.c (main): Also test behaviour after ungetc.
125229         * NEWS: Document the change.
125231 2008-03-09  Bruno Haible  <bruno@clisp.org>
125233         Extend freadptr to return also the buffer size.
125234         * lib/freadptr.h (freadptr): Add sizep argument.
125235         * lib/freadptr.c: Include freadptr.h, not freadahead.h.
125236         (freadptr): Add sizep argument. Determine buffer size like freadahead
125237         does.
125238         * tests/test-freadptr.c: Don't include freadahead.h.
125239         (main): Adapt for new calling convention of freadptr.
125240         * tests/test-freadptr2.c: New file, based on tests/test-freadahead.c.
125241         * tests/test-freadptr2.sh: New file, based on tests/test-freadahead.sh.
125242         * modules/freadptr-tests (Files): Add tests/test-freadptr2.c,
125243         tests/test-freadptr2.sh.
125244         (Depends): Remove freadahead.
125245         (TESTS): Add test-freadptr2.sh.
125246         (check_PROGRAMS): Add test-freadptr2.
125248 2008-03-09  Bruno Haible  <bruno@clisp.org>
125250         * doc/Makefile (%.pdf): Explain how to remedy the save_size error.
125251         Report and solution by Simon Josefsson.
125253 2008-03-06  Bruno Haible  <bruno@clisp.org>
125255         Make fflush after ungetc work on BSD platforms.
125256         * lib/fflush.c (rpl_fflush): Discard ungetc buffer if possible.
125257         * tests/test-fflush2.c: New file.
125258         * tests/test-fflush2.sh: New file.
125259         * modules/fflush-tests (Files): Add tests/test-fflush2.sh,
125260         tests/test-fflush2.c.
125261         (Makefile.am): Build test-fflush2 and run test-fflush2.sh.
125262         * doc/posix-functions/fflush.texi: Document fflush after ungetc bug.
125264 2008-03-06  Eric Blake  <ebb9@byu.net>
125266         Likewise for ftello.
125267         * modules/ftello (Dependencies): Add extensions.
125268         * m4/ftello.m4 (gl_FUNC_FTELLO): Require AC_USE_SYSTEM_EXTENSIONS.
125270 2008-03-06  Bruno Haible  <bruno@clisp.org>
125272         * modules/fseeko (Dependencies): Add extensions.
125273         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Require AC_USE_SYSTEM_EXTENSIONS.
125274         Needed on glibc systems.
125276 2008-03-06  Bruno Haible  <bruno@clisp.org>
125278         * doc/gnulib-tool.texi (@nosuchmodulenote): Avoid line break inside
125279         email address.
125280         Reported by Thien-Thi Nguyen <ttn@gnuvola.org>.
125282 2008-03-06  Bruno Haible  <bruno@clisp.org>
125284         * users.txt: Add libgnupdf.
125286 2008-03-06  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
125288         * doc/gnulib-tool.texi (@nosuchmodulenote): New macro.
125289         (Header File Substitutes, Function Substitutes,
125290         Glibc Header File Substitutes, Glibc Function Substitutes): Use it.
125291         (Build robot for gnulib): Fix typo.
125293 2008-03-06  Bruno Haible  <bruno@clisp.org>
125295         * doc/gnulib-tool.texi (VCS Issues): Small updates.
125296         Reported by Thien-Thi Nguyen <ttn@gnuvola.org>.
125298 2008-03-06  Bruno Haible  <bruno@clisp.org>
125300         * doc/func.texi: New file, extracted from doc/gnulib.texi.
125301         * doc/gnulib.texi: Include it.
125303 2008-03-06  Simon Josefsson  <simon@josefsson.org>
125305         * modules/func (License): Change license to unlimited; there was
125306         no LGPL parts in the module anyway.
125308 2008-03-06  Simon Josefsson  <simon@josefsson.org>
125310         * modules/__func__: Renamed to modules/func.
125311         * modules/__func__-tests: Renamed to modules/func-tests.
125312         * tests/test-__func__.c: Renamed to tests/test-func.c.
125313         * m4/__func__.m4: Renamed to m4/func.m4.
125314         * doc/gnulib.texi (__func__): Section renamed to func.
125315         Suggested by Eric Blake <ebb9@byu.net>.
125317 2008-03-06  Simon Josefsson  <simon@josefsson.org>
125319         * doc/gnulib.texi (__func__): Use C99 terminology when talking
125320         about __func__.  Make example self-contained.  Suggested by Eric
125321         Blake <ebb9@byu.net>.
125323         * tests/test-__func__.c (main): Avoid extraneous () around __func.
125324         Suggested by Eric Blake <ebb9@byu.net>.
125326 2008-03-06  Simon Josefsson  <simon@josefsson.org>
125328         * modules/__func__: New file.
125329         * modules/__func__-tests: New file.
125330         * tests/test-__func__.c: New file.
125331         * m4/__func__.m4: New file.
125332         * doc/gnulib.texi (__func__): Document __func__ module.
125334 2008-03-05  Simon Josefsson  <simon@josefsson.org>
125336         * modules/byteswap (License): Re-license as LGPLv2+.
125338 2008-03-05  Simon Josefsson  <simon@josefsson.org>
125340         * doc/Makefile: Add pdf target.
125342 2008-03-05  Simon Josefsson  <simon@josefsson.org>
125344         * modules/inline (License): Use 'unlimited', since there are only
125345         *.m4 files in this module.
125347 2008-03-03  John E. Malmberg  <wb8tyw@qsl.net>  (tiny change)
125348             Bruno Haible  <bruno@clisp.org>
125350         Add support for HP C 7.1 on OpenVMS 8.3.
125351         * lib/alloca.in.h (alloca): Define as alias for DEC C on VMS.
125353 2008-03-03  John E. Malmberg  <wb8tyw@qsl.net>  (tiny change)
125355         Update VMS specifics.
125356         * lib/getopt.c [VMS]: Remove include of unixlib.h.
125358 2008-03-02  Jim Meyering  <meyering@redhat.com>
125360         Remove the last dependency on the "free" module.
125361         * m4/readutmp.m4 (gl_READUTMP): Don't require gl_FUNC_FREE.
125362         Reported by Bob Proulx.
125364         * lib/getdelim.c (getdelim): Don't leak memory upon failed realloc.
125366         Remove useless "if" tests before free.  Deprecate "free" module.
125367         * doc/posix-functions/free.texi: Mention that this
125368         module is no longer useful.
125369         * modules/free (Notice): Say this module is obsolete.
125370         * modules/readutmp (Depends-on): Remove free.
125371         * lib/save-cwd.c (free_cwd): Remove useless "if" before free.
125372         * lib/putenv.c (putenv): Likewise.
125373         * lib/gc-gnulib.c (gc_cipher_close): Likewise.
125374         * lib/getaddrinfo.c (freeaddrinfo): Likewise.
125375         * tests/test-c-strcasestr.c (main): Likewise.
125376         * tests/test-c-strstr.c (main): Likewise.
125377         * tests/test-mbscasestr1.c (main): Likewise.
125378         * tests/test-mbscasestr2.c (main): Likewise.
125379         * tests/test-mbsstr1.c (main): Likewise.
125380         * tests/test-mbsstr2.c (main): Likewise.
125381         * tests/test-memmem.c (main): Likewise.
125382         * tests/test-strcasestr.c (main): Likewise.
125383         * tests/test-striconv.c (main): Likewise.
125384         * tests/test-striconveh.c (main): Likewise.
125385         * tests/test-striconveha.c (main): Likewise.
125386         * tests/test-strstr.c (main): Likewise.
125388         * build-aux/git-version-gen: Adjust a comment and the Usage string.
125390         bootstrap: sync from coreutils again
125391         * build-aux/bootstrap: Remove dangling m4/*.m4 symlinks.
125393 2008-03-01  Jim Meyering  <meyering@redhat.com>
125395         bootstrap: sync from coreutils
125396         * build-aux/bootstrap (update_po_files): Copy a .po file into place
125397         also when the target doesn't exist.
125399 2008-03-01  Eric Blake  <ebb9@byu.net>
125401         Fix bugs in last patch.
125402         * lib/memchr2.c (memchr2): Fix typo.
125403         * tests/test-memchr2.c: Test previous bug, and don't use GNU
125404         extension.
125405         Reported by Bruce Korb.
125407         New module 'memchr2'.
125408         * modules/memchr2: New file.
125409         * modules/memchr2-tests: Likewise.
125410         * lib/memchr2.h: Likewise.
125411         * lib/memchr2.c: Likewise, based on memchr.c.
125412         * tests/test-memchr2.c: New test.
125413         * MODULES.html.sh (String handling): Add memchr2.
125415 2008-02-29  Bruno Haible  <bruno@clisp.org>
125417         * modules/freadseek-tests: New file.
125418         * tests/test-freadseek.sh: New file.
125419         * tests/test-freadseek.c: New file.
125421         New module 'freadseek'.
125422         * modules/freadseek: New file.
125423         * lib/freadseek.h: New file.
125424         * lib/freadseek.c: New file.
125425         * MODULES.html.sh (File stream based Input/Output): Add freadseek.
125427 2008-02-29  Sergey Poznyakoff  <gray@gnu.org.ua>
125429         * users.txt: Add anubis, cpio, mailfromd, mailutils, radius,
125430         wydawca.
125432         * m4/argp.m4 (gl_ARGP): Use AC_TRY_LINK to test if
125433         program_invocation_name and program_invocation_short_name are
125434         present.
125436 2008-02-28  Bruno Haible  <bruno@clisp.org>
125438         * tests/test-freadptr.c: Add a test for behaviour after ungetc.
125439         * tests/test-freadptr.sh: Also test non-seekable stdin.
125441 2008-02-28  Sergey Poznyakoff  <gray@gnu.org.ua>
125443         * build-aux/bootstrap (source_base, m4_base)
125444         (doc_base, tests_base): New variables.
125445         (gnulib_tool_options): Do not hardcode base directories, use
125446         the above variables instead.
125448 2008-02-28  Atsushi SAKAI  <sakaia@jp.fujitsu.com>
125450         * lib/xsize.h: Fix typo in comment: s/tupe/type/.
125452 2008-02-28  Bruno Haible  <bruno@clisp.org>
125454         * modules/freadptr-tests: New file.
125455         * tests/test-freadptr.sh: New file.
125456         * tests/test-freadptr.c: New file.
125458         New module 'freadptr'.
125459         * modules/freadptr: New file.
125460         * lib/freadptr.h: New file.
125461         * lib/freadptr.c: New file.
125462         * MODULES.html.sh (File stream based Input/Output): Add freadptr.
125464 2008-02-26  Karl Berry  <karl@freefriends.org>
125466         Sync from Libtool:
125467         * libltdl/argz.c (argz_add, argz_count): New functions.
125468         * libltdl/argz.in.h: Declare them.
125469         Report by Juan Manuel Guerrero <juan.guerrero@gmx.de>.
125471 2008-02-22  Bruno Haible  <bruno@clisp.org>
125473         * m4/time_r.m4 (gl_TIME_R): Also check that localtime_r's return type
125474         is a pointer type.  Needed for HP-UX 10.
125475         * doc/posix-functions/localtime_r.texi: Mention HP-UX 10.
125476         * doc/posix-functions/gmtime_r.texi: Likewise.
125477         Reported by Peter O'Gorman <bug-gnulib@mlists.thewrittenword.com>.
125479 2008-02-24  Bruno Haible  <bruno@clisp.org>
125481         * modules/environ-tests: New file.
125482         * tests/test-environ.c: New file.
125484         New module 'environ'.
125485         * modules/environ: New file.
125486         * lib/unistd.in.h (environ): New declaration.
125487         * m4/environ.m4: New file.
125488         (gt_CHECK_VAR_DECL): Moved here from m4/setenv.m4. Undefine gt_cv_var
125489         after use.
125490         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_ENVIRON and
125491         HAVE_DECL_ENVIRON.
125492         * modules/unistd (Makefile.am): Substitute also GNULIB_ENVIRON and
125493         HAVE_DECL_ENVIRON.
125494         * doc/posix-functions/environ.texi: Mention module 'environ'. Remove
125495         wrong claim that 'environ' is missing on some systems.
125496         * modules/execute (Depends-on): Add environ.
125497         * lib/execute.c (environ): Remove fallback declaration.
125498         * modules/pipe (Depends-on): Add environ.
125499         * lib/pipe.c (environ): Remove fallback declaration.
125500         * modules/setenv (Depends-on): Add environ.
125501         * lib/setenv.c (environ): Remove fallback declaration.
125502         * modules/unsetenv (Depends-on): Add environ.
125503         * lib/unsetenv.c (environ): Remove fallback declaration.
125504         * m4/setenv.m4 (gt_CHECK_VAR_DECL): Remove macro. Moved to
125505         m4/environ.m4.
125506         (gl_PREREQ_SETENV): Require gl_ENVIRON instead of testing for environ.
125507         (gl_PREREQ_UNSETENV): Likewise.
125509 2008-02-24  Bruno Haible  <bruno@clisp.org>
125511         * doc/posix-functions/environ.texi: Document the MacOS X problem.
125513 2008-02-20  Bob Proulx  <bob@proulx.com>
125515         Enable use of older two part flavor 'git describe'.
125516         * build-aux/git-version-gen: If using the older two part flavor of
125517         git version then recreate the third part now present in the
125518         newer three part flavor of git describe.
125520 2008-02-20  Martin Buchholz  <martin@xemacs.org>  (tiny change)
125522         * lib/fts.c (fts_build): Typo correction to comment.
125524 2008-02-17  Bruno Haible  <bruno@clisp.org>
125526         * lib/git-merge-changelog.c (main) [split_merged_entry]: Avoid
125527         generating no-op conflicts.
125529 2008-02-17  Bruno Haible  <bruno@clisp.org>
125531         Speed up by 10%.
125532         * lib/git-merge-changelog.c (main): Use the iterator to iterate through
125533         result_entries, rather than an index-based loop.
125535 2008-02-17  Bruno Haible  <bruno@clisp.org>
125537         Speed up by 25%.
125538         * lib/git-merge-changelog.c (struct entry): New fields 'hashcode',
125539         'hashcode_cached'.
125540         (entry_create): New function.
125541         (entry_hashcode): Use the cached hashcode if possible.
125542         (read_changelog_file, try_split_merged_entry): Use entry_create.
125544 2008-02-17  Bruno Haible  <bruno@clisp.org>
125546         Speed up from O(n^2) to O(n) for long ChangeLog files.
125547         * lib/git-merge-changelog.c: Include gl_rbtreehash_list.h.
125548         (read_changelog_file): Change implementation of entries_reversed list
125549         to rbtreehash.
125550         * modules/git-merge-changelog (Depends-on): Add rbtreehash-list.
125552 2008-02-17  Bruno Haible  <bruno@clisp.org>
125554         New option --split-merged-entry.
125555         * lib/git-merge-changelog.c (FSTRCMP_STRICTER_THRESHOLD): New macro.
125556         (find_paragraph_end, try_split_merged_entry): New functions.
125557         (long_options): Add option --split-merged-entry.
125558         (usage): Document option --split-merged-entry.
125559         (main): Implement option --split-merged-entry.
125560         Reported by Eric Blake.
125562 2008-02-17  Bruno Haible  <bruno@clisp.org>
125564         * lib/git-merge-changelog.c: Include c-strstr.h.
125565         (main): Support the "git pull --rebase" situation.
125566         * modules/git-merge-changelog (Depends-on): Add c-strstr.
125567         Reported by Eric Blake.
125569 2008-02-16  Eric Blake  <ebb9@byu.net>
125571         Avoid doubling \ in common case of "c-maybe" quoting style.
125572         * lib/quotearg.c (quotearg_buffer_restyled): Don't escape \ when
125573         eliding outer quotes.
125574         * lib/quotearg.h: Document this.
125575         * tests/test-quotearg.c (result_strings, inputs, results_g)
125576         (flag_results, locale_results): Test it by adding a new string to
125577         each test group.
125578         (compare_strings): Test new string.
125580 2008-02-13  Eric Blake  <ebb9@byu.net>
125582         Avoid trigraph quoting in default output.
125583         * lib/quotearg.h (enum quoting_flags): Add QA_SPLIT_TRIGRAPHS.
125584         * lib/quotearg.c (quotearg_buffer_restyled): Don't quote trigraphs
125585         unless explicitly requested.
125586         * tests/test-quotearg.c (flag_results, main): Add additional tests.
125588 2008-02-13  Lasse Collin  <lasse.collin@tukaani.org>
125590         Don't rely on signed integer overflowing to negative value.
125591         * lib/getugroups.c (getugroups): Include <limits.h>.
125592         Instead, compare against INT_MAX, and increment only if the test passes.
125594 2008-02-13  Jim Meyering  <meyering@redhat.com>
125595         and Eric Blake  <ebb9@byu.net>
125597         Avoid shadowing warning and compile errors on Linux.
125598         * tests/test-quotearg.c [ENABLE_NLS]: Disable <libintl.h>
125599         forwarding macros on Linux.
125600         (dcgettext): Define a stub, for Linux.
125601         (results_g, main): Avoid warnings.
125603 2008-02-12  Eric Blake  <ebb9@byu.net>
125605         Silence warning in last patch.
125606         * lib/quotearg.c (quotearg_buffer_restyled): Add missing const.
125608         Quotearg part 4: add tests, fix c-maybe colon quoting.
125609         * lib/quotearg.h: Improve documentation.
125610         * lib/quotearg.c (quotearg_buffer_restyled): Don't add extra
125611         escapes when adding outer quotes.  When quoting trigraphs, use
125612         valid C notation.  When quoting NUL, omit extra characters if next
125613         character is not digit.  Alter prototype.
125614         (quotearg_buffer, quotearg_alloc_mem, quotearg_n_options): Adjust
125615         callers.
125616         * modules/quotearg-tests: New module.
125617         * tests/test-quotearg.c: New test.
125619 2008-02-07  Eric Blake  <ebb9@byu.net>
125621         Quotearg part 3: add flag to control outer quote elision.
125622         * lib/quotearg.h (c_maybe_quoting_style): New style.
125623         (enum quoting_flags): Better documentation of flags.
125624         * lib/quotearg.c (quoting_style_args, quoting_style_vals): Add
125625         c-maybe style.
125626         (quotearg_buffer_restyled): Handle new flag to elide outer
125627         quotes.
125629         Quotearg part 2: add flag that can control NUL elision.
125630         * lib/quotearg.h (set_quoting_flags): New prototype.
125631         * lib/quotearg.c (struct quoting_options): Add flag field.
125632         (set_quoting_flags): New function.
125633         (quotearg_buffer_restyled): Add flags parameter.
125634         (quotearg_alloc_mem): Set the flag if length cannot be returned.
125635         (quotearg_n_options): Set the flag, since length cannot be
125636         returned.
125637         (quoting_options_from_style): Default flags correctly.
125639         Quotearg part 1: more wrappers, restore quotearg_char state.
125640         * lib/quotearg.h (quotearg_alloc_mem, quotearg_n_mem)
125641         (quotearg_mem, quotearg_style_mem, quotearg_char_mem)
125642         (quotearg_colon_mem): New wrappers.
125643         * lib/quotearg.c (quotearg_alloc, quotearg_char): Rewrite...
125644         (quotearg_alloc_mem, quotearg_char_mem): ...in terms of these new
125645         functions.
125646         (quotearg_n_mem, quotearg_mem, quotearg_style_mem)
125647         (quotearg_colon_mem): New functions.
125649 2008-02-11  Bruno Haible  <bruno@clisp.org>
125651         * modules/git-merge-changelog (Makefile.am): Don't use -L and -l for a
125652         library in the current directory: it does not work with parallel make.
125653         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
125655 2008-02-11  Bruno Haible  <bruno@clisp.org>
125657         * .gitattributes: New file.
125659 2008-02-11  Jim Meyering  <meyering@redhat.com>
125661         useless-if-before-free: Fix reversed exit values.
125662         * build-aux/useless-if-before-free: Use correct values
125663         for EXIT_MATCH and EXIT_NO_MATCH.
125665         * build-aux/useless-if-before-free: Close stdout carefully.
125667 2008-02-10  Bruno Haible  <bruno@clisp.org>
125669         New module 'git-merge-changelog'.
125670         * modules/git-merge-changelog: New file.
125671         * lib/git-merge-changelog.c: New file.
125673 2008-02-10  Jim Meyering  <meyering@redhat.com>
125675         useless-if-before-free: New option: --list (-l).
125677         useless-if-before-free: Don't exit immediately upon open failure.
125678         * build-aux/useless-if-before-free: Exit 2 for errors.
125679         Upon failure to open a file, don't exit immediately.
125680         Rather, just warn and continue with any remaining files.
125682 2008-02-10  Bruno Haible  <bruno@clisp.org>
125684         New abstract list operation 'node_set_value'.
125685         * lib/gl_list.h (gl_list_node_set_value): New function.
125686         (struct gl_list_implementation): New field node_set_value.
125687         * lib/gl_list.c (gl_list_node_set_value): New function.
125688         * lib/gl_array_list.c (gl_array_node_set_value): New function.
125689         (gl_array_list_implementation): Update.
125690         * lib/gl_carray_list.c (gl_carray_node_set_value): New function.
125691         (gl_carray_list_implementation): Update.
125692         * lib/gl_anylinked_list2.h (gl_linked_node_set_value): New function.
125693         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
125694         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
125695         * lib/gl_anytree_list2.h (gl_tree_node_set_value): New function.
125696         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
125697         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
125698         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
125699         Update.
125700         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
125701         * lib/gl_sublist.c (gl_sublist_node_set_value): New function.
125702         (gl_sublist_list_implementation): Update.
125704 2008-02-10  Bruno Haible  <bruno@clisp.org>
125706         * lib/diffseq.h: Write "ELEMENT const" instead of "const ELEMENT".
125707         Needed when ELEMENT is #defined to 'some_type *'.
125709 2008-02-10  Jim Meyering  <meyering@redhat.com>
125711         New script and module: useless-if-before-free
125712         * MODULES.html.sh (maint+release support): Add useless-if-before-free.
125713         * build-aux/useless-if-before-free: New file.
125714         * modules/useless-if-before-free: New file.
125716         * build-aux/gitlog-to-changelog: Use committer date, not author date.
125718         xstrtol_error: Fix typo.
125719         * lib/xstrtol-error.c (xstrtol_error): The parameter was unused:
125720         s/exit_failure/exit_status/.
125722 2008-02-09  Jim Meyering  <meyering@redhat.com>
125724         New script and module: gitlog-to-changelog
125725         * MODULES.html.sh (maint+release support): Add gitlog-to-changelog.
125726         * modules/gitlog-to-changelog: New file.
125727         * build-aux/gitlog-to-changelog: New file.
125729 2008-02-08  Jim Meyering  <meyering@redhat.com>
125731         Avoid two "parameter unused" warnings.
125732         * lib/stat-time.h (get_stat_birthtime_ns, get_stat_birthtime):
125733         Mark "st" as used.
125735         Use "git COMMAND", not "git-COMMAND".
125736         * build-aux/bootstrap (version_controlled_file): s/git-rm/git-rm/.
125737         * build-aux/announce-gen (get_tool_versions): Correct a diagnostic.
125738         * build-aux/git-version-gen: Use "git status", not "git-status".
125740 2008-02-07  Bruno Haible  <bruno@clisp.org>
125742         * lib/vasnprintf.c (VASNPRINTF): Don't use %n on native Woe32 systems.
125743         Avoids a crash on Windows Vista.
125744         Reported by Adam Strzelecki <ono@java.pl> via
125745         Simon Josefsson <simon@josefsson.org>.
125747 2008-02-06  Bruno Haible  <bruno@clisp.org>
125749         Fix *printf behaviour regarding the left-adjust flag on HP-UX 10.20.
125750         * m4/printf.m4 (gl_PRINTF_FLAG_LEFTADJUST): New macro.
125751         * lib/vasnprintf.c (VASNPRINTF): Handle NEED_PRINTF_FLAG_LEFTADJUST.
125752         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST): New macro.
125753         (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): Invoke it.
125754         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
125755         gl_PRINTF_FLAG_LEFTADJUST and test its result. Invoke
125756         gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST.
125757         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
125758         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
125759         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
125760         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
125761         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
125762         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
125763         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
125764         * tests/test-vasnprintf-posix.c (test_function): Add testcases for the
125765         left-adjust flag.
125766         * tests/test-snprintf-posix.h (test_function): Likewise.
125767         * tests/test-sprintf-posix.h (test_function): Likewise.
125768         * tests/test-vasprintf-posix.c (test_function): Likewise.
125769         * doc/posix-functions/fprintf.texi: Update.
125770         * doc/posix-functions/printf.texi: Update.
125771         * doc/posix-functions/snprintf.texi: Update.
125772         * doc/posix-functions/sprintf.texi: Update.
125773         * doc/posix-functions/vfprintf.texi: Update.
125774         * doc/posix-functions/vprintf.texi: Update.
125775         * doc/posix-functions/vsnprintf.texi: Update.
125776         * doc/posix-functions/vsprintf.texi: Update.
125777         Reported by Peter Fales <psfales@alcatel-lucent.com>.
125779 2008-02-06  Bruno Haible  <bruno@clisp.org>
125781         Fix bug introduced on 2008-01-26.
125782         * lib/isnan.c (FUNC): Set to rpl_isnand, not rpl_isnan.
125784 2008-02-06  Bruno Haible  <bruno@clisp.org>
125786         Fix bug introduced on 2007-06-10.
125787         * lib/vasnprintf.c (VASNPRINTF): Perform zero-padding also if
125788         !NEED_PRINTF_FLAG_ZERO.
125790 2008-02-05  Peter O'Gorman  <pogma@thewrittenword.com>
125792         getloadavg: use libperfstat on AIX5
125793         * lib/getloadavg.c, m4/getloadavg.m4 [aix]: Use libperfstat
125795 2008-02-03  Bruno Haible  <bruno@clisp.org>
125797         * lib/diffseq.h: Add comments about required #includes.
125798         Reported by Michael Biggs <gnulib@doubleplum.net>.
125800 2008-02-01  Bruno Haible  <bruno@clisp.org>
125802         * users.txt: Add gnuit.
125804 2008-01-31  Bruno Haible  <bruno@clisp.org>
125806         * lib/md4.c (set_uint32): Mark as inline.
125807         * lib/md5.c (set_uint32): Likewise.
125808         * lib/sha1.c (set_uint32): Likewise.
125809         * m4/md4.m4 (gl_MD4): Require AC_C_INLINE.
125810         * m4/md5.m4 (gl_MD5): Likewise.
125811         * m4/sha1.m4 (gl_SHA1): Likewise.
125813 2008-01-31  Jim Meyering  <meyering@redhat.com>
125815         Use "sizeof VAR", rather than a literal "4".
125816         * lib/md5.c (md5_read_ctx): Use sizeof ctx->A, not 4.
125817         * lib/md4.c (md4_read_ctx): Likewise.
125818         * lib/sha1.c (sha1_read_ctx): Likewise.
125820 2008-01-31  Simon Josefsson  <simon@josefsson.org>
125822         * tests/test-sha1.c: New file, based on test-md5.c.
125824         * modules/crypto/sha1-tests: New file.
125826 2008-01-31  Simon Josefsson  <simon@josefsson.org>
125828         * lib/sha1.h (SHA1_DIGEST_SIZE): Define.
125830 2008-01-31  Jim Meyering  <meyering@redhat.com>
125832         Prefer "sizeof v" over the equivalent "4".
125833         * lib/md4.c (set_uint32): Use "sizeof v" as memcpy length, not 4.
125834         * lib/md5.c (set_uint32): Likewise.
125835         * lib/sha1.c (set_uint32): Likewise.
125837 2008-01-31  Simon Josefsson  <simon@josefsson.org>
125839         * lib/sha1.c (set_uint32): Mark function as static.
125841 2008-01-31  Simon Josefsson  <simon@josefsson.org>
125843         md2: clarify comments to say that alignment is not required.
125844         * lib/md2.h: Remove warning about alignment in comment.
125845         * lib/md2.c (md2_read_ctx, md2_finish_ctx): Doc fix, alignment has
125846         never been required.
125848 2008-01-31  Simon Josefsson  <simon@josefsson.org>
125850         md4: adapt alignment constraint fix from sha1.
125851         * lib/md4.c (set_uint32): New function, from sha1.c
125852         (md4_read_ctx): Use it.
125853         (md4_finish_ctx): Doc fix.
125854         * lib/md4.h: Doc fix.
125856 2008-01-31  Simon Josefsson  <simon@josefsson.org>
125858         md5: adapt alignment constraint fix from sha1.
125859         * lib/md5.c (set_uint32): New function, from sha1.c
125860         (md5_read_ctx): Use it.
125861         (md5_finish_ctx): Doc fix.
125862         * lib/md5.h: Doc fix.
125864 2008-01-30  Peter Palfrader  <weasel@debian.org>
125866         sha1: remove the result buffer alignment constraint
125867         * lib/sha1.c (set_uint32): New function.
125868         (sha1_read_ctx): Rewrite to remove the result buffer alignment
125869         constraint.
125870         (sha1_finish_ctx): Remove comment warning about alignment constraint.
125871         * lib/sha1.h: Likewise.
125873 2008-01-30  Andreas Schwab  <schwab@suse.de>
125874             Bruno Haible  <bruno@clisp.org>
125876         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Include <float.h> and ensure a
125877         correct definition of LDBL_MIN_EXP.
125879 2008-01-30  Karl Berry  <karl@gnu.org>
125881         * config/srclist-update: try to preserve x bit on updates.
125882         * config/srclistvars.sh: update for karl.
125884 2008-01-29  Jim Meyering  <meyering@redhat.com>
125886         vasnprintf.c: Avoid warning about unused label
125887         * lib/vasnprintf.c (VASNPRINTF) [!USE_SNPRINTF]: Guard the
125888         "overflow" label definition and associated code with the
125889         same cpp condition that guards the sole use of that label.
125891 2008-01-26  Bruno Haible  <bruno@clisp.org>
125893         * m4/isnanl.m4 (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM,
125894         gl_FUNC_ISNANL_WORKS): Test the GCC >= 4.0 built-in.
125895         * lib/isnanl.h (isnanl): Use the GCC >= 4.0 built-in.
125896         * lib/isnanl-nolibm.h (isnanl): Likewise.
125897         Reported by Paul Eggert <eggert@cs.ucla.edu>.
125899 2008-01-26  Bruno Haible  <bruno@clisp.org>
125901         * m4/isnand.m4 (gl_FUNC_ISNAND_NO_LIBM): Test the GCC >= 4.0 built-in.
125902         * lib/isnand.h (isnand): Use the GCC >= 4.0 built-in.
125904 2008-01-26  Bruno Haible  <bruno@clisp.org>
125906         * m4/isnanf.m4 (gl_HAVE_ISNANF_NO_LIBM, gl_ISNANF_WORKS): Test the
125907         GCC >= 4.0 built-in.
125908         * lib/isnanf.h (isnanf): Use the GCC >= 4.0 built-in.
125910 2008-01-26  Bruno Haible  <bruno@clisp.org>
125912         Rename isnan, applicable to 'double' only, to isnand.
125913         * modules/isnand-nolibm: Renamed from modules/isnan-nolibm.
125914         (Files): Add lib/isnand.h, lib/isnand.c. Remove lib/isnan.h.
125915         (configure.ac): Update.
125916         (Include): Replace "isnan.h" with "isnand.h".
125917         * m4/isnand.m4: Renamed from m4/isnan.m4.
125918         (gl_FUNC_ISNAND_NO_LIBM): Renamed from gl_FUNC_ISNAN_NO_LIBM. Set
125919         HAVE_ISNAND_IN_LIBC instead of HAVE_ISNAN_IN_LIBC. Build isnand.c
125920         instead of isnan.c.
125921         * lib/isnand.h: Renamed from lib/isnan.h. Test HAVE_ISNAND_IN_LIBC
125922         instead of HAVE_ISNAN_IN_LIBC.
125923         (isnand): Renamed from isnan.
125924         * lib/isnand.c: New file.
125925         * modules/isnand-nolibm-tests: Renamed from modules/isnan-nolibm-tests.
125926         (Files): Add tests/test-isnand.c. Remove tests/test-isnan.c.
125927         (Makefile.am): Update.
125928         * tests/test-isnand.c: Renamed from tests/test-isnan.c.
125929         Include isnand.h instead of isnan.h.
125930         (main): Test isnand instead of isnan.
125931         * modules/fprintf-posix (Depends-on): Add isnand-nolibm, remove
125932         isnan-nolibm.
125933         * modules/frexp (Depends-on): Likewise.
125934         * modules/frexp-tests (Depends-on): Likewise.
125935         * modules/frexp-nolibm (Depends-on): Likewise.
125936         * modules/frexp-nolibm-tests (Depends-on): Likewise.
125937         * modules/isfinite (Depends-on): Likewise.
125938         * modules/round-tests (Depends-on): Likewise.
125939         * modules/signbit (Depends-on): Likewise.
125940         * modules/signbit-tests (Depends-on): Likewise.
125941         * modules/snprintf-posix (Depends-on): Likewise.
125942         * modules/sprintf-posix (Depends-on): Likewise.
125943         * modules/trunc-tests (Depends-on): Likewise.
125944         * modules/unistdio/u8-vasnprintf (Depends-on): Likewise.
125945         * modules/unistdio/u8-u8-vasnprintf (Depends-on): Likewise.
125946         * modules/unistdio/u16-vasnprintf (Depends-on): Likewise.
125947         * modules/unistdio/u16-u16-vasnprintf (Depends-on): Likewise.
125948         * modules/unistdio/u32-vasnprintf (Depends-on): Likewise.
125949         * modules/unistdio/u32-u32-vasnprintf (Depends-on): Likewise.
125950         * modules/unistdio/ulc-vasnprintf (Depends-on): Likewise.
125951         * modules/vasnprintf-posix (Depends-on): Likewise.
125952         * modules/vasprintf-posix (Depends-on): Likewise.
125953         * modules/vfprintf-posix (Depends-on): Likewise.
125954         * modules/vsnprintf-posix (Depends-on): Likewise.
125955         * modules/vsprintf-posix (Depends-on): Likewise.
125956         * lib/frexp.c: Include isnand.h instead of isnan.h.
125957         (ISNAN): Set to isnand instead of isnan.
125958         * lib/isfinite.c: Include isnand.h instead of isnan.h.
125959         (gl_isfinited): Use isnand instead of isnan.
125960         * lib/signbitd.c: Include isnand.h instead of isnan.h.
125961         (gl_signbitd): Use isnand instead of isnan.
125962         * lib/vasnprintf.c: Include isnand.h instead of isnan.h.
125963         (is_infinite_or_zero, VASNPRINTF): Use isnand instead of isnan.
125964         * tests/test-frexp.c: Include isnand.h instead of isnan.h.
125965         (main): Use isnand instead of isnan.
125966         * tests/test-round1.c: Include isnand.h.
125967         (main): Use isnand instead of isnan.
125968         * tests/test-round2.c: Include isnand.h instead of isnan.h.
125969         (ISNAN): Set to isnand instead of isnan.
125970         * tests/test-trunc1.c: Include isnand.h.
125971         (main): Use isnand instead of isnan.
125972         * tests/test-trunc2.c: Include isnand.h instead of isnan.h.
125973         (equal): Use isnand instead of isnan.
125974         * MODULES.html.sh (Mathematics <math.h>): Replace isnan-nolibm with
125975         isnand-nolibm.
125976         * NEWS: Mention the change.
125978 2008-01-25  Paul Eggert  <eggert@cs.ucla.edu>
125979             Bruno Haible  <bruno@clisp.org>
125981         * m4/signbit.m4 (gl_SIGNBIT): Require a macro definition. Test whether
125982         the GCC builtins for signbits are present and set
125983         REPLACE_SIGNBIT_USING_GCC if so.
125984         * lib/math.in.h (signbit): Define using GCC builtins if
125985         REPLACE_SIGNBIT_USING_GCC is set.
125986         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize
125987         REPLACE_SIGNBIT_USING_GCC.
125988         * modules/math (Makefile.am): Substitute REPLACE_SIGNBIT_USING_GCC.
125990 2008-01-25  Jim Meyering  <meyering@redhat.com>
125992         Prefer <config.h> over "config.h".  See autoconf doc for explanation.
125993         * lib/poll.c: Include <config.h>, not "config.h".
125994         * tests/test-getaddrinfo.c: Likewise.
125996 2008-01-25  Simon Josefsson  <simon@josefsson.org>
125998         * modules/sockets-tests: New file.
126000 2008-01-24  Simon Josefsson  <simon@josefsson.org>
126002         * modules/sockets: New module, can be used to call WSA_Startup and
126003         WSA_Cleanup when needed.
126005         * lib/sockets.h, lib/sockets.c: New files.
126007         * m4/sockets.m4: New file.
126009         * tests/test-sockets.c: New file.
126011 2008-01-19  Bruno Haible  <bruno@clisp.org>
126013         * doc/posix-headers: Renamed from doc/headers.
126014         * doc/posix-functions: Renamed from doc/functions.
126015         * doc/gnulib.texi: Update.
126017 2008-01-19  Bruno Haible  <bruno@clisp.org>
126019         * doc/glibc-functions/strcasestr.texi: Include contents of
126020         doc/functions/strcasestr.texi, fixing the list of platforms.
126021         * doc/functions/strcasestr.texi: Remove file.
126023 2008-01-19  Bruno Haible  <bruno@clisp.org>
126025         * doc/glibc-functions/memmem.texi: Include contents of
126026         doc/functions/memmem.texi.
126027         * doc/functions/memmem.texi: Remove file.
126029 2008-01-18  Bruno Haible  <bruno@clisp.org>
126031         * doc/glibc-functions/*.texi: New files.
126032         * doc/gnulib.texi (Glibc Function Substitutes): Completely rewritten
126033         to use the new files.
126035 2008-01-17  Bruno Haible  <bruno@clisp.org>
126037         * tests/test-gethostname.c (main): Fix printf statement.
126039 2008-01-17  Simon Josefsson  <simon@josefsson.org>
126041         * modules/gethostname-tests: New file.
126043         * tests/test-gethostname.c: New file.
126045 2008-01-17  Simon Josefsson  <simon@josefsson.org>
126047         * lib/gethostname.c: Include string.h unconditionally, strncpy is
126048         used by the UNAME case.  Reported by Bruno Haible
126049         <bruno@clisp.org>.
126051 2008-01-17  Eric Blake  <ebb9@byu.net>
126053         Convert c-strcasestr to be more efficient.
126054         * modules/c-strcasestr (Files): Use Two-Way, not KMP.
126055         (Depends-on): Add c-strcase, remove malloca, strnlen.
126056         * tests/test-c-strcasestr.c (main): Enhance test.
126057         * lib/c-strcasestr.c (c_strcasestr): Rewrite to new algorithm.
126059 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
126061         * build-aux/bootstrap (MSGID_BUGS_ADDRESS): New overridable variable.
126062         Use it in creating po/Makevars.
126064 2008-01-15  Simon Josefsson  <simon@josefsson.org>
126066         * lib/gc-libgcrypt.c (gc_init): Disable secure memory by default.
126067         Applications that requires it should initialize libgcrypt
126068         manually.
126070 2008-01-16  Simon Josefsson  <simon@josefsson.org>
126072         * lib/gethostname.c [!HAVE_UNAME]: Need string.h for strcpy.
126074 2008-01-15  Paul Eggert  <eggert@cs.ucla.edu>
126076         Fix problem with getdate on mingw32 reported by Simon Josefsson
126077         in <http://lists.gnu.org/r/bug-gnulib/2008-01/msg00192.html>.
126078         * lib/getdate.y (get_date): Check "HAVE_DECL_TZNAME", not "defined
126079         tzname", when deciding whether to declare tzname.
126080         * lib/strftime.c (tzname): Likewise.
126082 2008-01-15  Bruno Haible  <bruno@clisp.org>
126084         Work around a MacOS X 10.5 bug in frexpl().
126085         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Also check denormalized numbers.
126086         * doc/functions/frexpl.texi: Document the bug.
126087         Reported by Elias Pipping <pipping@gentoo.org>.
126089 2008-01-14  Eric Blake  <ebb9@byu.net>
126091         Touch up previous patch.
126092         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Fix typo.
126093         * doc/functions/strcasestr.texi (strcasestr): Document OpenBSD bug.
126095         Convert strcasestr module to use Two-Way algorithm.
126096         * modules/strcasestr-simple: New module, based on the old
126097         strcasestr, but with Two-Way rather than KMP.
126098         * modules/strcasestr (Depends-on): Change to strcasestr-simple.
126099         * lib/string.in.h (rpl_strcasestr): Declare.
126100         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Check for linear
126101         performance.
126102         * lib/strcasestr.c (strcasestr): Simplify, and avoid malloc.
126103         * modules/string (Makefile.am): Support strcasestr.
126104         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Likewise.
126105         * modules/strcasestr-tests (Depends-on): Check for alarm.
126106         * tests/test-strcasestr.c: Augment test.
126107         * lib/str-two-way.h: Clean up stray macro.
126108         * NEWS: Document new module.
126109         * MODULES.html.sh (string handling): Likewise.
126110         * doc/functions/strcasestr.texi: New file.
126111         * doc/gnulib.texi (Function Substitutes): New node.  Move memmem
126112         here, since it is not a POSIX function.
126114 2008-01-14  Colin Watson  <cjwatson@debian.org>
126115             Bruno Haible  <bruno@clisp.org>
126117         * m4/strsignal.m4 (gl_FUNC_STRSIGNAL): Also check whether strsignal
126118         works fine; if not, set REPLACE_STRSIGNAL.
126119         (gl_PREREQ_STRSIGNAL): Require AC_DECL_SYS_SIGLIST.
126120         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
126121         REPLACE_STRSIGNAL.
126122         * lib/string.in.h (strsignal): Consider REPLACE_STRSIGNAL.
126123         * modules/string (Makefile.am): Substitute REPLACE_STRSIGNAL.
126124         * tests/test-strsignal.c (main): Check out-of-range signal numbers.
126126 2008-01-14  Bruno Haible  <bruno@clisp.org>
126128         * modules/strsignal (Include): Change to <string.h>.
126130 2008-01-14  Colin Watson  <cjwatson@debian.org>
126132         * modules/argp (Notice): Add a notice recommending to change
126133         XGETTEXT_OPTIONS.
126134         (configure.ac): Invoke AM_XGETTEXT_OPTION if it exists.
126136 2008-01-13  Colin Watson  <cjwatson@debian.org>
126138         * modules/strsignal-tests: New file.
126139         * tests/test-strsignal.c: New file.
126141         * lib/strsignal.c: New file, from glibc with modifications.
126142         * lib/siglist.h: New file, from glibc with modifications.
126143         * lib/string.in.h (strsignal): New declaration.
126144         * m4/strsignal.m4: New file.
126145         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
126146         GNULIB_STRSIGNAL and HAVE_DECL_STRSIGNAL.
126147         * modules/strsignal: New file.
126148         * modules/string (Makefile.am): Substitute GNULIB_STRSIGNAL and
126149         HAVE_DECL_STRSIGNAL.
126151 2008-01-13  Bruno Haible  <bruno@clisp.org>
126153         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check that the
126154         locale encoding is not ASCII. Needed for OpenBSD 4.0.
126155         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise.
126156         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
126158 2008-01-13  Bruno Haible  <bruno@clisp.org>
126160         * lib/argp-fmtstream.h (__attribute__): Don't redefine if
126161         __STRICT_ANSI__ is set: it's not needed by any version of gcc.
126162         * lib/argp.h (__attribute__): Likewise.
126163         * lib/c-stack.c (__attribute__): Likewise.
126164         * lib/error.h (__attribute__): Likewise.
126165         * lib/fts.c (__attribute__): Likewise.
126166         * lib/openat.h (__attribute__): Likewise.
126167         * lib/stdio.in.h (__attribute__): Likewise.
126168         * lib/string.in.h (__attribute__): Likewise.
126169         * lib/utimens.c (__attribute__): Likewise.
126170         * lib/vasnprintf.h (__attribute__): Likewise.
126171         * lib/xalloc.h (__attribute__): Likewise.
126172         * lib/xprintf.h (__attribute__): Likewise.
126173         * lib/xstrtol.h (__attribute__): Likewise.
126174         * lib/xvasprintf.h (__attribute__): Likewise.
126176 2008-01-12  Bruno Haible  <bruno@clisp.org>
126178         * doc/gnulib.texi (Glibc Header File Substitutes): New chapter.
126179         * doc/glibc-headers/a.out.texi: New file.
126180         * doc/glibc-headers/aliases.texi: New file.
126181         * doc/glibc-headers/alloca.texi: New file.
126182         * doc/glibc-headers/ar.texi: New file.
126183         * doc/glibc-headers/argp.texi: New file.
126184         * doc/glibc-headers/argz.texi: New file.
126185         * doc/glibc-headers/byteswap.texi: New file.
126186         * doc/glibc-headers/crypt.texi: New file.
126187         * doc/glibc-headers/endian.texi: New file.
126188         * doc/glibc-headers/envz.texi: New file.
126189         * doc/glibc-headers/err.texi: New file.
126190         * doc/glibc-headers/error.texi: New file.
126191         * doc/glibc-headers/execinfo.texi: New file.
126192         * doc/glibc-headers/fpu_control.texi: New file.
126193         * doc/glibc-headers/fstab.texi: New file.
126194         * doc/glibc-headers/fts.texi: New file.
126195         * doc/glibc-headers/getopt.texi: New file.
126196         * doc/glibc-headers/ieee754.texi: New file.
126197         * doc/glibc-headers/ifaddrs.texi: New file.
126198         * doc/glibc-headers/libintl.texi: New file.
126199         * doc/glibc-headers/mcheck.texi: New file.
126200         * doc/glibc-headers/mntent.texi: New file.
126201         * doc/glibc-headers/obstack.texi: New file.
126202         * doc/glibc-headers/paths.texi: New file.
126203         * doc/glibc-headers/printf.texi: New file.
126204         * doc/glibc-headers/pty.texi: New file.
126205         * doc/glibc-headers/resolv.texi: New file.
126206         * doc/glibc-headers/shadow.texi: New file.
126207         * doc/glibc-headers/sysexits.texi: New file.
126208         * doc/glibc-headers/ttyent.texi: New file.
126210 2008-01-12  Jim Meyering  <meyering@redhat.com>
126212         announce-gen: emit Gnulib's git-based version string.
126213         * build-aux/announce-gen: Remove option: --gnulib-snapshot-time-stamp=S.
126214         New option --gnulib-version=V, where V is expected to be
126215         the output of running git describe in the gnulib directory.
126216         (get_tool_versions): Request feedback on xdelta.  I suspect it's
126217         not useful, and plan to stop publishing an xdelta file with each
126218         coreutils release.
126220         * build-aux/announce-gen: Also check for lzma-compressed files.
126222 2008-01-11  Bruno Haible  <bruno@clisp.org>
126224         * tests/test-memmem.c (main): Increase maximum allowed time.
126225         * tests/test-strstr.c (main): Likewise.
126227 2008-01-11  Bruno Haible  <bruno@clisp.org>
126229         * doc/functions/memmem.texi: Add more precisions about platforms.
126230         * doc/functions/strstr.texi: Likewise.
126232 2008-01-10  Eric Blake  <ebb9@byu.net>
126234         * m4/strstr.m4: Delete cruft from copy-n-paste.
126235         Reported by Bruno Haible.
126237 2008-01-10  Bruno Haible  <bruno@clisp.org>
126239         Make c-strstr rely on strstr.
126240         * lib/c-strstr.c: Don't include str-kmp.h.
126241         (c_strstr): Define in terms of strstr.
126242         * modules/c-strstr (Files): Remove lib/str-kmp.h.
126243         (Depends-on): Remove stdbool, malloca, strnlen. Add strstr.
126245 2008-01-10  Bruno Haible  <bruno@clisp.org>
126247         * doc/gnulib.texi (String Functions in C Locale): New section.
126248         * doc/c-ctype.texi: New file.
126249         * doc/c-strcase.texi: New file.
126250         * doc/c-strcaseeq.texi: New file.
126251         * doc/c-strcasestr.texi: New file.
126252         * doc/c-strstr.texi: New file.
126253         * doc/c-strtod.texi: New file.
126254         * doc/c-strtold.texi: New file.
126256 2008-01-10  Eric Blake  <ebb9@byu.net>
126258         * lib/relocatable.h: Fix a comment.
126260 2008-01-10  Eric Blake  <ebb9@byu.net>
126262         Share two-way algorithm.
126263         * lib/str-two-way.h: New file, merged from...
126264         * lib/memmem.c: ...here...
126265         * lib/strstr.c: ...and here.
126266         * modules/memmem (Files): Use it.
126267         * modules/strstr (Files): Likewise.
126269         Avoid quadratic strstr implementations.
126270         * lib/strstr.c: New file.
126271         * m4/strstr.m4: Likewise.
126272         * modules/strstr: Likewise.
126273         * modules/strstr-tests: Likewise.
126274         * tests/test-strstr.c: Likewise.
126275         * lib/string.in.h (rpl_strstr): Declare.
126276         (memmem) [GNULIB_POSIXCHECK]: Document speed issue.
126277         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Support strstr.
126278         * modules/string (Makefile.am): Likewise.
126279         * MODULES.html.sh (string handling): Mention new module.
126280         * doc/functions/strstr.texi (strstr): Document the bug.
126282 2008-01-10  Bruno Haible  <bruno@clisp.org>
126284         * lib/relocatable.h (relocate): State whether result is freshly
126285         allocated or not.
126286         * lib/relocatable.c (relocate): Return a freshly allocated string
126287         instead of a pointer to a privately held string.
126288         Reported by Sylvain Beucler <beuc@gnu.org>.
126290 2008-01-10  Colin Watson  <cjwatson@debian.org>
126292         * lib/canonicalize-lgpl.c [!_LIBC]: Fix typo in #if directive:
126293         s/S_ISNLK/S_ISLNK/.
126295 2008-01-09  Bruno Haible  <bruno@clisp.org>
126297         * doc/functions/memmem.texi: Use the same structure as snprintf.texi
126298         and other files.
126299         * m4/memmem.m4 (gl_FUNC_MEMMEM): Say "guessing no" instead of "no"
126300         if it's only a guess.
126301         * modules/memmem: Simplify by depending on memmem-simple.
126303 2008-01-09  Bruno Haible  <bruno@clisp.org>
126305         Work around OpenBSD 4.0 tdelete() bug.
126306         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Also check tdelete's return value.
126307         * lib/search.in.h: If REPLACE_TSEARCH is 1, define tsearch etc. as
126308         macros and don't redefine the enum values.
126309         * m4/search_h.m4 (gl_SEARCH_H_DEFAULTS): Initialize REPLACE_TSEARCH.
126310         * modules/search (Makefile.am): Also substitute REPLACE_TSEARCH.
126311         * doc/functions/tdelete.texi: Document the OpenBSD 4.0 bug.
126313 2008-01-09  Bruno Haible  <bruno@clisp.org>
126315         * tests/test-wcwidth.c: Include <string.h> and localcharset.h.
126316         (main): Don't perform the tests if setlocale did not install a UTF-8
126317         locale. Needed on OpenBSD 4.0.
126318         * modules/wcwidth-tests (Depends-on): Add localcharset.
126320 2008-01-09  Paul Eggert  <eggert@cs.ucla.edu>
126322         gl_FUNC_ALLOCA no longer defines HAVE_ALLOCA_H unconditionally.
126323         See <http://lists.gnu.org/r/bug-gnulib/2007-12/msg00149.html>.
126324         * NEWS: announce this.
126325         * m4/alloca.m4 (gl_FUNC_ALLOCA): Don't define HAVE_ALLOCA_H.
126327 2008-01-09  Simon Josefsson  <simon@josefsson.org>
126328         and Eric Blake  <ebb9@byu.net>
126330         Add memmem-simple module.
126331         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): New macro.
126332         (gl_FUNC_MEMMEM): Separate performance from presence checks.
126333         * modules/memmem-simple: New file.
126334         * modules/memmem (Description): Tweak.
126335         * MODULES.html.sh (string handling): Mention new module.
126336         * doc/functions/memmem.texi (memmem): Distinguish which flaws are
126337         addressed by memmem-simple.
126338         * NEWS: Document the difference.
126340 2008-01-09  Eric Blake  <ebb9@byu.net>
126342         Give gcc some memmem optimization hints.
126343         * lib/string.in.h (memmem, memrchr, strchrnul, strnlen, strpbrk)
126344         (strcasestr): Declare as pure.
126345         * modules/memmem (Maintainer): Claim my implementation.
126347 2008-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
126349         Support AIX 6.1 and higher.
126350         * build-aux/config.libpath: Likewise.
126351         * build-aux/config.rpath: Likewise.
126353 2008-01-08  Jim Meyering  <meyering@redhat.com>
126354             Bruno Haible  <bruno@clisp.org>
126356         * lib/printf-parse.c (PRINTF_PARSE): Handle a size specifier "q"
126357         on MacOS X and a size specifier "I64" on mingw. Needed for PRIdMAX.
126358         Reported by Peter Fales in
126359         <http://lists.gnu.org/r/bug-coreutils/2007-12/msg00148.html>.
126361 2008-01-08  Bruno Haible  <bruno@clisp.org>
126363         * modules/unictype/category-of (Depends-on): Add
126364         unictype/category-none.
126365         * modules/unictype/category-and-tests (Depends-on): Add
126366         unictype/category-{L,N,Lu,Nd}.
126367         * modules/unictype/category-and-not-tests (Depends-on): Likewise.
126368         * modules/unictype/category-or-tests (Depends-on): Add
126369         unictype/category-{L,N}.
126370         * modules/unictype/category-name-tests (Depends-on): Add
126371         unictype/category-{Z,Nl}.
126372         Reported by Simon Josefsson.
126374 2008-01-08  Bruno Haible  <bruno@clisp.org>
126376         * lib/str-kmp.h (knuth_morris_pratt_unibyte): Document the calling
126377         convention better.
126378         * lib/mbsstr.c (knuth_morris_pratt_multibyte): Likewise.
126379         * lib/mbscasestr.c (knuth_morris_pratt_multibyte): Likewise.
126380         Reported by Peter Miller <millerp@canb.auug.org.au>.
126382 2008-01-08  Eric Blake  <ebb9@byu.net>
126384         Rewrite memmem to guarantee linear complexity without malloc.
126385         * lib/memmem.c (memmem): Use Two-Way rather than
126386         Knuth-Morris-Pratt, to allow O(1) space usage.
126387         (critical_factorization, two_way_short_needle)
126388         (two_way_long_needle): New functions.
126389         (knuth_morris_pratt): Delete.
126390         * modules/memmem (Depends-on): No longer need malloca or stdbool.
126391         Add stdint.
126392         * tests/test-memmem.c (main): Add tests for periodic needle and
126393         sublinear performance.
126394         * doc/functions/memmem.texi (memmem): Document other deficiencies
126395         in cygwin and older glibc.
126397 2008-01-08  Bruno Haible  <bruno@clisp.org>
126399         * modules/memmem-tests (Makefile.am): Remove TESTS_ENVIRONMENT
126400         augmentation.
126402 2008-01-08  Mike Frysinger  <vapier@gentoo.org>
126404         Add a configure time option: --disable-acl.
126405         * m4/acl.m4 (gl_FUNC_ACL): Wrap all ACL logic in a call to
126406         AC_ARG_ENABLE(acl).
126408 2008-01-06  Simon Josefsson  <simon@josefsson.org>
126410         * tests/test-localename.c: Don't include obsolete "setenv.h".
126412         * modules/localename-tests (Depends-on): Need unsetenv.
126414 2008-01-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
126416         * DEPENDENCIES: Require Texinfo version 4.6 or newer.
126418 2008-01-06  Colin Watson  <cjwatson@debian.org>
126420         * users.txt: Add man-db.
126422 2008-01-07  Bruno Haible  <bruno@clisp.org>
126424         * doc/gnulib-intro.texi (Library vs Reusable Code): Restore the
126425         previous section name.
126427 2008-01-07  Bruno Haible  <bruno@clisp.org>
126429         * lib/progname.c (set_program_name): Don't strip off a leading
126430         "lt-" prefix outside a .libs directory.
126431         Suggested by Paul Eggert.
126433 2008-01-01  Sylvain Beucler  <beuc@gnu.org>
126434             Bruno Haible  <bruno@clisp.org>
126436         Improve memory cleanup in 'relocatable' module.
126437         * lib/relocatable.h (compute_curr_prefix): Change return type to
126438         'char *'.
126439         * lib/relocatable.c (compute_curr_prefix): Change return type to
126440         'char *'. Free curr_installdir after use.
126441         (relocate): Free curr_prefix_better after use.
126442         * lib/progreloc.c (prepare_relocate): Free curr_prefix after use.
126444 2008-01-01  Bruno Haible  <bruno@clisp.org>
126446         * tests/test-wcwidth.c (main): Relax test of U+2060. Avoids a test
126447         failure on older glibc systems.
126448         Reported by Peter Fales <psfales@alcatel-lucent.com>.
126450 2008-01-05  Eric Blake  <ebb9@byu.net>
126452         Avoid quadratic system memmem.
126453         * m4/memmem.m4 (gl_FUNC_MEMMEM): Check for quadratic memmem.
126454         Reported by Ralf Wildenhues.
126456         Fix memmem test for mingw.
126457         * modules/memmem-tests (configure.ac): Check for alarm.
126458         * tests/test-memmem.c (main): Avoid alarm on platforms that lack
126459         it.
126460         * doc/functions/memmem.texi: New file.
126461         * doc/gnulib.texi (Function Substitutes): Add memmem.
126462         Reported by Bruno Haible.
126464 2008-01-04  Bruno Haible  <bruno@clisp.org>
126466         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP):
126467         Require gl_HEADER_STRINGS_H_DEFAULTS, not
126468         gl_HEADER_STRING_H_DEFAULTS.
126470 2008-01-04  Eric Blake  <ebb9@byu.net>
126472         Shorten duration of memmem test.
126473         * tests/test-memmem.c (main): Use alarm to declare failure if test
126474         is taking too long.
126475         Reported by Ralf Wildenhues.
126477 2007-12-21  Simon Josefsson  <simon@josefsson.org>
126479         * modules/relocatable-prog-wrapper (Depends-on): Add intprops and
126480         string, needed by strerror.
126482 2008-01-03  Colin Watson  <cjwatson@debian.org>
126483             Bruno Haible  <bruno@clisp.org>
126485         * doc/gnulib-tool.texi (Localization): New section.
126487 2008-01-02  Bruno Haible  <bruno@clisp.org>
126489         * lib/memmem.c (knuth_morris_pratt, memmem): Change all 'char *'
126490         variables to 'unsigned char *' type.
126491         Reported by Paul Eggert.
126493 2008-01-02  Jim Meyering  <jim@meyering.net>
126495         * lib/version-etc.c (COPYRIGHT_YEAR): Increase for new year.
126497 2007-12-31  Jim Meyering  <jim@meyering.net>
126499         Avoid use of private FTS type name.
126500         * lib/fts.c (fts_sort): Use FTSENT rather than "struct _ftsent".
126502 2007-12-30  Karl Berry  <karl@gnu.org>
126504         * doc/gnulib.texi (Library vs. Reusable Code): remove period, to
126505         work around defect in Texinfo and/or the standalone Info browser.
126507 2007-12-30  Bruno Haible  <bruno@clisp.org>
126509         Unify 5 copies of the KMP code.
126510         * lib/str-kmp.h: New file.
126511         * lib/c-strcasestr.c: Include str-kmp.h.
126512         (knuth_morris_pratt): Remove function.
126513         (c_strcasestr): Update.
126514         * lib/c-strstr.c: Include str-kmp.h.
126515         (knuth_morris_pratt): Remove function.
126516         (c_strcasestr): Update.
126517         * lib/mbscasestr.c: Include str-kmp.h.
126518         (knuth_morris_pratt_unibyte): Remove function.
126519         * lib/mbsstr.c: Include str-kmp.h.
126520         (knuth_morris_pratt_unibyte): Remove function.
126521         * lib/strcasestr.c: Include str-kmp.h.
126522         (knuth_morris_pratt): Remove function.
126523         (strcasestr): Update.
126524         * modules/c-strcasestr (Files): Add lib/str-kmp.h.
126525         * modules/c-strstr (Files): Likewise.
126526         * modules/mbscasestr (Files): Likewise.
126527         * modules/mbsstr (Files): Likewise.
126528         * modules/strcasestr (Files): Likewise.
126529         Suggested by Paul Eggert.
126531 2007-12-30  Bruno Haible  <bruno@clisp.org>
126533         * lib/xmalloca.c (xmmalloca): Don't define if HAVE_ALLOCA is not
126534         defined.
126536 2007-12-30  Bruno Haible  <bruno@clisp.org>
126538         * lib/xmalloca.h: Include xalloc.h.
126539         (xnmalloca): New macro.
126541 2007-12-30  Bruno Haible  <bruno@clisp.org>
126543         * lib/malloca.h (nmalloca): New macro.
126544         * lib/c-strcasestr.c (knuth_morris_pratt): Use it.
126545         * lib/c-strstr.c (knuth_morris_pratt): Likewise.
126546         * lib/mbscasestr.c (knuth_morris_pratt_unibyte,
126547         knuth_morris_pratt_multibyte): Likewise.
126548         * lib/mbsstr.c (knuth_morris_pratt_unibyte,
126549         knuth_morris_pratt_multibyte): Likewise.
126550         * lib/memmem.c (knuth_morris_pratt): Likewise.
126551         * lib/strcasestr.c (knuth_morris_pratt): Likewise.
126553 2007-12-25  Bruno Haible  <bruno@clisp.org>
126555         Fixup after 2007-10-17 commit. Ensure that 'glob' stays under LGPLv2+.
126556         * lib/glob.c: Don't include openat.h.
126557         (link_exists2_p): Add back the code that deals with the
126558         !GLOB_ALTDIRFUNC case.
126559         (link_exists_p) [!_LIBC && !HAVE_FSTATAT]: Just call link_exists2_p and
126560         let it do the filename concatenation.
126561         * m4/glob.m4 (gl_PREREQ_GLOB): Add check for fstatat.
126562         * modules/glob (Depends-on): Remove openat.
126564 2007-12-31  Bruno Haible  <bruno@clisp.org>
126566         * modules/dirfd (License): Change to LGPLv2+.
126567         Approved by Jim Meyering.
126569 2007-12-29  Paul Eggert  <eggert@cs.ucla.edu>
126571         * lib/memmem.c (knuth_morris_pratt): Check for size_t overflow
126572         when multiplying M by sizeof (size_t).
126574 2007-12-10  Martin Lambers  <marlam@marlam.de>
126576         Override getpagesize on mingw.
126577         * lib/getpagesize.c: New file.
126578         * m4/getpagesize.m4 (gl_FUNC_GETPAGESIZE): Enable replacement on mingw.
126579         * modules/getpagesize (Files): Add lib/getpagesize.c.
126580         * lib/unistd.in.h (getpagesize): Declare if we are using a replacement.
126581         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
126582         REPLACE_GETPAGESIZE.
126583         * modules/unistd (Makefile.am): Substitute REPLACE_GETPAGESIZE.
126585 2007-12-25  Bruno Haible  <bruno@clisp.org>
126587         * modules/localcharset (Notice): New field.
126588         (configure.ac): Define LOCALCHARSET_TESTS_ENVIRONMENT.
126589         Suggested by Ben Pfaff <blp@cs.stanford.edu>.
126591 2007-12-25  Paul Eggert  <eggert@cs.ucla.edu>
126592             Bruno Haible  <bruno@clisp.org>
126594         Avoid using the syntax symbol() in formatted documentation.
126595         * MODULES.html.sh (func_module): When replacing symbol() with a
126596         hyperlink, remove the parentheses. Show an error if some remain.
126597         Recognize and render the '...' syntax.
126598         * doc/alloca-opt.texi: Remove parentheses from symbol reference.
126599         Rework. Add paragraph about GCC's inlining.
126600         * doc/alloca.texi: Likewise.
126601         * doc/error.texi: Remove parentheses from symbol reference.
126602         * doc/gnulib-intro.texi: Likewise.
126603         * doc/gnulib.texi (alloca, alloca-opt): New nodes.
126604         * modules/fnmatch (Description): Reword to say "the ... function".
126605         * modules/full-read (Description): Likewise.
126606         * modules/full-write (Description): Likewise.
126607         * modules/safe-read (Description): Likewise.
126608         * modules/safe-write (Description): Likewise.
126609         * modules/strchrnul (Description): Likewise.
126610         * modules/trim (Description): Likewise.
126611         * modules/error (Description): Remove parentheses from symbol
126612         references.
126613         * modules/verror (Description): Likewise.
126614         Reported by Karl Berry.
126616 2007-12-25  Bruno Haible  <bruno@clisp.org>
126618         Fixup after 2007-10-16 commit.
126619         * lib/glob.c (glob_in_dir): Don't use ISO C99 syntax.
126621 2007-12-24  Bruno Haible  <bruno@clisp.org>
126623         Make --enable-relocatable work with DESTDIR.
126624         * build-aux/install-reloc: Accept another argument 'destdir'. Use it
126625         to compute installdir from destprog.
126626         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): In INSTALL_PROGRAM_ENV,
126627         also set the RELOC_DESTDIR variable.
126628         Reported by Левашев Иван <octagram@bluebottle.com>.
126630 2007-12-24  Bruno Haible  <bruno@clisp.org>
126632         Fix link error due to xalloc_die().
126633         * lib/progreloc.c: When NO_XMALLOC is defined, use areadlink instead
126634         of xreadlink.
126635         * lib/relocwrapper.c: Update comments.
126636         * build-aux/install-reloc: Remove xreadlink.c from file list.
126637         * modules/relocatable-prog-wrapper (Files): Remove xreadlink.h and
126638         xreadlink.c.
126639         Reported by Левашев Иван <octagram@bluebottle.com>.
126641 2007-12-24  Bruno Haible  <bruno@clisp.org>
126643         Split setenv module into setenv and unsetenv. Get rid of setenv.h.
126644         * lib/setenv.h: Remove file.
126645         * lib/stdlib.in.h (setenv, unsetenv): New declarations, moved here from
126646         lib/setenv.h.
126647         * modules/setenv (Files): Remove lib/setenv.h, lib/unsetenv.c.
126648         (Depends-on): Add stdlib.
126649         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR. Don't invoke
126650         gl_FUNC_UNSETENV.
126651         (Include): Replace setenv.h with <stdlib.h>.
126652         * modules/unsetenv: New file.
126653         * lib/setenv.c: Include <stdlib.h> first, after alloca.h.
126654         * lib/unsetenv.c: Include <stdlib.h> first.
126655         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_SETENV_SEPARATE): Require
126656         gl_STDLIB_H_DEFAULTS. Conditionally set HAVE_SETENV to 0.
126657         (gl_FUNC_UNSETENV): Require gl_STDLIB_H_DEFAULTS. Conditionally set
126658         HAVE_UNSETENV to 0. Set VOID_UNSETENV as an AC_SUBSTed variable.
126659         * modules/stdlib (Makefile.am): Substitute also GNULIB_SETENV,
126660         HAVE_SETENV, GNULIB_UNSETENV, HAVE_UNSETENV, VOID_UNSETENV.
126661         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_SETENV,
126662         HAVE_SETENV, GNULIB_UNSETENV, HAVE_UNSETENV, VOID_UNSETENV.
126663         * doc/functions/unsetenv.texi: Update.
126664         * modules/xsetenv (Depends-on): Add unsetenv.
126665         * modules/getdate (Depends-on): Likewise.
126666         * lib/xsetenv.h: Include <stdlib.h> instead of setenv.h.
126667         * lib/xsetenv.c: Don't include setenv.h.
126668         * lib/getdate.y: Likewise.
126669         * lib/relocwrapper.c: Likewise.
126670         * modules/relocatable-prog-wrapper (Files): Remove lib/setenv.h.
126671         (Depends-on): Add stdlib.
126672         * NEWS: Mention the changes.
126673         Reported by Левашев Иван <octagram@bluebottle.com>.
126675 2007-12-23  Bruno Haible  <bruno@clisp.org>
126677         * lib/memmem.c (memmem): Use lowercase variable names. Tab
126678         indentation.
126680 2007-12-23  Bruno Haible  <bruno@clisp.org>
126682         * lib/c-strcasestr.c: Add more comments.
126683         * lib/c-strstr.c: Likewise.
126684         * lib/mbscasestr.c: Likewise.
126685         * lib/mbsstr.c: Likewise.
126686         * lib/strcasestr.c: Likewise.
126687         * lib/memmem.c: Likewise.
126689 2007-12-23  Bruno Haible  <bruno@clisp.org>
126691         * tests/test-memmem.c: Include <string.h> first.
126693 2007-12-22  Bruno Haible  <bruno@clisp.org>
126695         * gnulib-tool (func_create_testdir): Change $auxdir while generating
126696         the contents of $testsbase.
126697         Reported by Ralf Wildenhues.
126699 2007-12-22  Bruno Haible  <bruno@clisp.org>
126701         * gnulib-tool (func_emit_tests_Makefile_am): Replace local_ldadd with
126702         two variables local_ldadd_before, local_ldadd_last.
126704 2007-12-20  Eric Blake  <ebb9@byu.net>
126706         Work around circular library issue when cross-compiling.
126707         * lib/progname.c (set_program_name): Use strncmp, not memcmp, so
126708         that progname.o does not need to pull in rpl_memcmp.
126710 2007-12-19  Eric Blake  <ebb9@byu.net>
126712         Fix memmem to avoid O(n^2) worst-case complexity.
126713         * lib/memmem.c (knuth_morris_pratt): New function.
126714         (memmem): Use it if first few naive iterations fail.
126715         * m4/memmem.m4 (gl_FUNC_MEMMEM): Detect cygwin bug.
126716         * modules/memcmp (License): Set to LGPLv2+, not LGPL.
126717         * modules/memchr (License): Likewise.
126718         * modules/memmem (Depends-on): Add memcmp, memchr, stdbool, and
126719         malloca.
126720         * tests/test-memmem.c: Rewrite, borrowing ideas from
126721         test-mbsstr1.c; the old version wouldn't even compile!
126722         * modules/memmem-tests: New file.
126723         * lib/string.in.h (rpl_memmem): Add declaration.
126724         * modules/string (Makefile.am): Substitute REPLACE_MEMMEM.
126725         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Default for
126726         REPLACE_MEMMEM.
126728 2007-12-18  Paul Eggert  <eggert@cs.ucla.edu>
126730         Fix problem with _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H on VMS.
126731         * lib/stdint.in.h (_GL_JUST_INCLUDE_SYSTEM_INTTYPES_H): Define
126732         before any system include files, and undef after them all.  This
126733         should fix a problem on VMS reported by John E. Malmberg in
126734         <http://lists.gnu.org/r/bug-gnulib/2007-12/msg00118.html>.
126736 2007-12-17  Eric Blake  <ebb9@byu.net>
126738         Revert addition of verify, for BSD/OS.
126739         * lib/fseeko.c [!HAVE_FSEEKO]: Allow off_t > long, even though it
126740         can't handle large files, for the sake of obsolete platforms.
126741         * modules/fseeko (Depends-on): Remove verify.
126742         * doc/functions/fseeko.texi (fseeko): Document BSD/OS limitation.
126743         * doc/functions/ftello.texi (ftello): Likewise.
126744         * doc/functions/fgetpos.texi (fgetpos): Likewise.
126745         Reported by Larry Jones.
126747 2007-12-17  Petr Salinger  <Petr.Salinger@seznam.cz>
126749         getcwd.c: Use a more readable witness: HAVE_OPENAT_SUPPORT
126750         * lib/getcwd.c: Define and use HAVE_OPENAT_SUPPORT, in place of AT_FDCWD.
126752 2007-12-17  Jim Meyering  <meyering@redhat.com>
126754         Port to GNU/kFreeBSD - FreeBSD kernel + GNU libc,
126755         which has no openat syscall, yet <fcntl.h> does define AT_FDCWD.
126756         * lib/getcwd.c: Undef AT_FDCWD if there is no openat function.
126757         * modules/getcwd (Depends-on): Add openat.
126758         Reported by Petr Salinger.
126760 2007-12-17  Bruno Haible  <bruno@clisp.org>
126762         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Use GL_NOCRASH to
126763         avoid a segmentation fault of the configure test on x86_64 systems.
126765 2007-12-15  Jim Meyering  <meyering@redhat.com>
126767         * build-aux/gnupload (GPG): Don't hard-code absolute name of gpg binary.
126769 2007-12-13  Eric Blake  <ebb9@byu.net>
126771         Another fseek test.
126772         * tests/test-fseek.c (main): Also test ungetc handling.
126773         * tests/test-fseeko.c (main): Likewise.
126774         * modules/fseeko (Depends-on): Add verify.
126775         * lib/fseeko.c [!HAVE_FSEEKO]: Verify that off_t is not too
126776         large.
126777         Reported by Larry Jones.
126779         Fix fseeko on mingw.
126780         * lib/fseeko.c (rpl_fseeko) [_IOERR]: Reset EOF flag on successful
126781         seek.
126783         Beef up fseek tests.
126784         * tests/test-fseek.c (main): Also test eof handling.
126785         * tests/test-fseeko.c (main): Likewise.
126786         Reported by Larry Jones.
126788 2007-12-13  Larry Jones  <lawrence.jones@siemens.com>  (tiny change)
126790         Fix fseeko on BSD-based platforms.
126791         * lib/fseeko.c (rpl_fseeko) [__sferror]: Reset EOF flag on
126792         successful seek.
126794 2007-12-12  Eric Blake  <ebb9@byu.net>
126796         Allow circular dependency of separate libtests.a
126797         * gnulib-tool (func_emit_tests_Makefile_am): Add AM_LIBTOOLFLAGS
126798         when use_libtests.
126800 2007-12-11  Eric Blake  <ebb9@byu.net>
126802         Fix bug with -0.0L in previous patch.
126803         * lib/isnan.c (rpl_isnanl): Make robust to -0.0L and pad bits.
126804         * tests/test-isnan.c (main): Also test on zeroes.
126805         * tests/test-isnanf.c (main): Likewise.
126806         * tests/test-isnanl.h (main): Likewise.
126808         Detect pseudo-denormals on x86 even when cross-compiling.
126809         * lib/isnan.c (rpl_isnanl) [!KNOWN_EXPBIT0_LOCATION
126810         && USE_LONG_DOUBLE && x86]: Add one more check to filter out
126811         invalid bit patterns that happen to satisfy ==.
126813         Avoid link failures with separate libtests.a.
126814         * gnulib-tool (func_emit_tests_Makefile_am): Also list local_ldadd
126815         last, to satisfy circular dependencies.
126817 2007-12-11  Eric Blake  <ebb9@byu.net>
126818         and Bruno Haible  <bruno@clisp.org>
126820         Fix OpenBSD 4.0 <float.h> handling of long double.
126821         * m4/float_h.m4 (gl_FLOAT_H): Also claim OpenBSD is broken.
126822         * lib/float.in.h [__OpenBSD__]: Add fixes for OpenBSD.
126823         * doc/headers/float.texi (float.h): Document OpenBSD bug.
126825 2007-12-11  Jim Meyering  <meyering@redhat.com>
126827         * users.txt: Add libvirt.
126829         Support versions of autoconf prior to 2.59c.
126830         * gnulib-tool (func_emit_initmacro_done): Define m4_foreach_w
126831         if it is not already defined.
126833 2007-12-09  Bruno Haible  <bruno@clisp.org>
126835         Let 'gnulib-tool --import' collect sources needed for the tests in
126836         tests/ rather than in lib/.
126837         * gnulib-tool (func_emit_tests_Makefile_am): Accept use_libtests
126838         argument. If true, add rules to generate libtests.a, and put libtests.a
126839         into $(LDADD). Consider source files in subdirectories and set
126840         uses_subdirs.
126841         (func_emit_initmacro_start, func_emit_initmacro_end,
126842         func_emit_initmacro_done): Pass all arguments explicitly.
126843         (func_import): Determine two module lists main_modules,
126844         testsrelated_modules. Determine use_libtests. Determine two variables
126845         sed_transform_main_lib_file, sed_transform_testsrelated_lib_file
126846         instead of just sed_transform_lib_file. Determine two variables
126847         main_files and testsrelated_files. Compute 'files' as the union of
126848         both. Adjust sed_rewrite_old_files, sed_rewrite_new_files,
126849         func_add_or_update. In the generated gnulib-comp.m4, collect the
126850         object files for tests/ in different variables than those for lib/.
126851         Substitute LIBTESTS_LIBDEPS.
126852         (func_create_testdir): Combine the uses_subdirs results from
126853         func_emit_lib_Makefile_am and from func_emit_tests_Makefile_am.
126855 2007-12-09  Bruno Haible  <bruno@clisp.org>
126857         * gnulib-tool (func_emit_tests_Makefile_am): Expand references to
126858         the build-aux directory.
126860 2007-12-09  Bruno Haible  <bruno@clisp.org>
126862         * gnulib-tool (func_emit_tests_Makefile_am): Remove redundant code
126863         introduced on 2006-09-09.
126865 2007-12-07  Jim Meyering  <meyering@redhat.com>
126867         Let these macros work also with autoconf-2.59.
126868         * m4/getline.m4 (gl_FUNC_GETLINE): Require only autoconf-2.59.  2.60
126869         is not needed, since gnulib now permits use of AC_CHECK_DECLS_ONCE.
126870         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise.
126872 2007-12-06  Jim Meyering  <meyering@redhat.com>
126874         Avoid a configure-time syntax error in gl_FUNC_ACL.
126875         * m4/acl.m4 (gl_FUNC_ACL): Be careful to check for the acl_trivial
126876         function in each branch, before testing the cache variable.
126878 2007-12-04  Eric Blake  <ebb9@byu.net>
126880         Make scripts executable.
126881         * build-aux/config.guess: Add execute permissions.
126882         * build-aux/config.sub: Likewise.
126883         * build-aux/gendocs.sh: Likewise.
126885         Fix frexp on mingw.
126886         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Detect mingw bug when
126887         cross-compiling.
126888         * doc/functions/frexp.texi (frexp): Document the bug.
126890         Make cygwin fseeko check more reliable.
126891         * m4/stdio_h.m4 (gl_STDIN_LARGE_OFFSET) [__CYGWIN__]: Use cygwin
126892         version numbers, rather than unrelated feature check.
126893         * doc/functions/fseeko.texi (fseeko): Tweak failure report.
126894         * doc/functions/ftello.texi (ftello): Likewise.
126895         Reported by Bruno Haible.
126897         * m4/strerror.m4: Bump version number.
126899 2007-12-03  Bruno Haible  <bruno@clisp.org>
126901         * doc/functions/mprotect.texi: Mention the mingw problem.
126903 2007-12-03  Eric Blake  <ebb9@byu.net>
126905         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): Ensure
126906         REPLACE_STRERROR is initialized before this macro.
126908 2007-12-03  Paul Eggert  <eggert@cs.ucla.edu>
126910         Add support for Solaris 10 ACLs.  Also, ACLs are Gnulib, not Autoconf.
126911         * modules/acl (configure.ac): Rename AC_FUNC_ACL to gl_FUNC_ACL.
126912         * m4/acl.m4 (gl_FUNC_ACL): Renamed from AC_FUNC_ACL.  On Solaris,
126913         put -lsec in even for programs other than 'ls'.  This fixes a problem
126914         for gettext reported by Bruno Haible in
126915         <http://lists.gnu.org/r/bug-gnulib/2007-12/msg00007.html>.
126916         * lib/acl.c (copy_acl, qset_acl) [USE_ACL && defined ACL_NO_TRIVIAL]:
126917         Add support for Solaris 10.  This isn't efficient, but should get the
126918         job done for now.
126920 2007-12-03  James Youngman  <jay@gnu.org>
126922         * doc/regexprops-generic.texi: change "an close-group" to "a
126923         close-group" and "illegal" to "not allowed".
126925 2007-11-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
126927         * lib/unictype/pr_byname.c: Include unictype/pr_byname.h instead of
126928         pr_byname.h. Needed for the rare case when the maintainer has done
126929         "make maintainer-clean" in the source directory and then attempts a
126930         build outside the source directory.
126931         * lib/unictype/scripts.c: Include unictype/scripts_byname.h instead of
126932         scripts_byname.h.
126934 2007-12-02  Martin Lambers  <marlam@marlam.de>
126935             Bruno Haible  <bruno@clisp.org>
126937         * lib/getpagesize.h: Remove file.
126938         * lib/unistd.in.h: Include declaration of getpagesize here.
126939         * m4/getpagesize.m4 (gl_FUNC_GETPAGESIZE): Renamed from gl_GETPAGESIZE.
126940         Invoke gl_UNISTD_H_DEFAULTS. Set HAVE_GETPAGESIZE, HAVE_OS_H,
126941         HAVE_SYS_PARAM_H.
126942         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_GETPAGESIZE,
126943         HAVE_GETPAGESIZE, HAVE_OS_H, HAVE_SYS_PARAM_H.
126944         * modules/getpagesize (Files): Remove lib/getpagesize.h.
126945         (Depends-on): Add unistd.
126946         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
126947         (Include): Use <unistd.h> instead of getpagesize.h.
126948         * modules/unistd (Makefile.am): Substitute also GNULIB_GETPAGESIZE,
126949         HAVE_GETPAGESIZE, HAVE_OS_H, HAVE_SYS_PARAM_H.
126950         * m4/pagealign_alloc.m4 (gl_PREREQ_PAGEALIGN_ALLOC): Remove
126951         gl_GETPAGESIZE invocation, already handled by module dependency.
126952         * lib/pagealign_alloc.c: Don't include getpagesize.h.
126954 2007-12-02  Bruno Haible  <bruno@clisp.org>
126956         * modules/strings-tests: New file.
126957         * tests/test-strings.c: New file.
126959         Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
126960         * lib/strings.in.h: New file.
126961         * lib/string.in.h (strcasecmp, strncasecmp): Remove declarations.
126962         * m4/strings_h.m4: New file.
126963         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Remove initialization
126964         of HAVE_STRCASECMP, HAVE_DECL_STRNCASECMP.
126965         * modules/strings: New file.
126966         * modules/string (Makefile.am): Update.
126967         * modules/strcase (Include): Mention <strings.h>, not <string.h>.
126968         Reported by Karl Berry.
126970 2007-12-01  Eric Blake  <ebb9@byu.net>
126972         * m4/stdio_h.m4 (gl_STDIN_LARGE_OFFSET) [__CYGWIN__]: Rewrite to
126973         accommodate fix in cygwin 1.5.25.
126975 2007-12-01  Jim Meyering  <meyering@redhat.com>
126977         Fix a bug that inhibited much of the utf8-optimization in regcomp.c.
126978         * lib/regcomp.c (optimize_utf8): Fix a typo, s/idx/ctx_type/,
126979         that would inhibit utf8-optimization of a regexp containing line-
126980         or buffer-anchors, e.g., `^', `$'.
126982 2007-11-30  Bruno Haible  <bruno@clisp.org>
126984         * lib/lock.h (gl_recursive_lock_init) [PTHREAD &&
126985         PTHREAD_RECURSIVE_MUTEX_INITIALIZER]: Call
126986         glthread_recursive_lock_init.
126987         * lib/lock.c (glthread_recursive_lock_init)
126988         [PTHREAD_RECURSIVE_MUTEX_INITIALIZER]: New function.
126989         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
126991 2007-11-28  Paul Eggert  <eggert@cs.ucla.edu>
126993         New function qset_acl, like set_acl but with syscall semantics.
126994         * lib/acl.h (qset_acl): New decl.
126995         * lib/acl.c (qset_acl): New function.
126996         (set_acl): Use new function.  Use more-consistent diagnostics.
126998 2007-11-28  Jim Meyering  <meyering@redhat.com>
127000         * modules/physmem (License): Change from GPL to LGPLv2+.
127002 2007-11-26  Bruno Haible  <bruno@clisp.org>
127004         * lib/vasnprintf.c (decode_long_double): Don't abort if the
127005         'long double' type has excess precision.
127006         Reported by Jim Meyering in
127007         <http://lists.gnu.org/r/bug-gnulib/2007-11/msg00120.html>.
127009 2007-11-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
127011         * doc/fdl.texi, doc/gpl-3.0.texi, doc/lgpl-3.0.texi:
127012         Sync from <http://gnu.org/licenses>.
127013         * modules/agpl-3.0, doc/agpl-3.0.texi: New module,
127014         with license text from same location.
127015         * doc/maintain.texi, doc/standards.texi:  Sync from
127016         <http://savannah.gnu.org/projects/gnustandards>.
127018 2007-11-22  Ondřej Vašík  <ovasik@redhat.com>
127019         and Jim Meyering  <meyering@redhat.com>
127021         Adjust getdate' grammar to accept a slightly more regular language.
127022         E.g., accept "YYYYMMDD +N days" as well as "YYYYMMDD N days".
127023         Before, the former was rejected.
127024         * lib/getdate.y (digits_to_date_time): New function, factored
127025         out of ...
127026         (number): ...here.  Just call digits_to_date_time.
127027         (hybrid): New non-terminal to handle an <unsigned number,
127028         signed relative offset> sequence consistently.
127030 2007-11-18  Jim Meyering  <meyering@redhat.com>
127032         Pull my changes from coreutils:
127033         bootstrap: fix typo to enable use of $gnulib_tool_option_extras.
127034         * build-aux/bootstrap (gnulib_tool_options): Add a space before the
127035         use of $gnulib_tool_option_extras, so that it's separated from the
127036         preceding argument.
127038         Fix bootstrap failure to handle files like lib/uniwidth/cjk.h.
127039         * build-aux/bootstrap (cp_mark_as_generated): Create any required
127040         parent destination directories before copying a file into place.
127042 2007-11-18  Sergey Poznyakoff  <gray@gnu.org.ua>
127044         bootstrap: work also with 4-argument variant of AC_INIT
127045         * build-aux/bootstrap (gnulib_extra_files): Adjust sed command.
127047 2007-11-16  Paul Eggert  <eggert@cs.ucla.edu>
127049         Port test-getaddrinfo to Solaris.
127050         Problem reported by Bruno Haible in
127051         <http://lists.gnu.org/r/bug-gnulib/2007-03/msg00171.html>.
127052         * tests/test-getaddrinfo.c (simple): Add a comment asking for an
127053         explanation of setting 'hints'.
127054         Don't reject an implementation merely because it returns EAI_SERVICE.
127055         (EAI_SERVICE): Define to 0 if not defined.
127057 2007-11-15  Paul Eggert  <eggert@cs.ucla.edu>
127059         The license of gnu-make and posix-shell is now "GPLed build tool".
127060         * modules/gnu-make (License): Likewise.
127061         * modules/posix-shell (License): Likewise.
127063         New module posix-shell, for determining a POSIX shell
127064         or perhaps something that is close enough to a POSIX shell.
127065         * m4/posix-shell.m4: New file.
127066         * modules/posix-shell: New file.
127068         * MODULES.html.sh: Mention new module.
127070         New module gnu-make, for determining whether we're using GNU Make.
127071         * m4/gnu-make.m4: New file.
127072         * modules/gnu-make: New file.
127073         * MODULES.html.sh: Mention new module.
127075 2007-11-14  Jim Meyering  <meyering@redhat.com>
127077         Define a sometimes-link-required function using ARGMATCH_DIE_DECL.
127078         * tests/test-argmatch.c (ARGMATCH_DIE_DECL): When defined,
127079         use this macro to create a function _definition_.
127080         Remove useless "#undef ARGMATCH_DIE".
127082 2007-11-14  Bruno Haible  <bruno@clisp.org>
127084         * lib/config.charset: Update for OpenBSD 4.1.
127085         Reported and helped by Ben Pfaff <blp@cs.stanford.edu>.
127087 2007-11-12  Paul Eggert  <eggert@cs.ucla.edu>
127089         Document 64-bit #if problems in stdint.texi.
127090         * doc/headers/stdint.texi (stdint.h): Mention problems with
127091         64-bit-#if, and how to work around them.
127093         Don't insist on 'long long int' support in the preprocessor.  It
127094         breaks too many things.  For example, PRIdMAX still uses a 'long
127095         long int' format with the latest Sun compiler, even though
127096         HAVE_LONG_LONG_INT isn't defined due to that compiler's
127097         preprocessor problem.  This causes the latest coreutils to dump
127098         core on Solaris 10 sparc with the Sun C compiler.
127099         Instead, fix the 2007-10-16 problem in a different way, by evaluating
127100         the troublesome expressions at configure-time, not at #if-time.
127101         * m4/longlong.m4 (_AC_TYPE_LONG_LONG_SNIPPET): Don't test the
127102         preprocessor.
127103         * m4/inttypes.m4 (gl_INTTYPES_H): Move the #if checks into
127104         compile-time C checks, done at 'configure'-time.
127105         (gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION): New macro.
127106         * modules/inttypes (Makefile): Substitute the new symbols that
127107         gl_INTTYPES_H now generates.
127108         * lib/inttypes.in.h: Don't use constants wider than 'long' in #if.
127110 2007-11-12  Bruno Haible  <bruno@clisp.org>
127112         Tests for Unicode character classification functions.
127114         * modules/unictype/bidicategory-byname-tests: New file.
127115         * modules/unictype/bidicategory-name-tests: New file.
127116         * modules/unictype/bidicategory-of-tests: New file.
127117         * modules/unictype/bidicategory-test-tests: New file.
127118         * modules/unictype/block-list-tests: New file.
127119         * modules/unictype/block-of-tests: New file.
127120         * modules/unictype/block-test-tests: New file.
127121         * modules/unictype/category-C-tests: New file.
127122         * modules/unictype/category-Cc-tests: New file.
127123         * modules/unictype/category-Cf-tests: New file.
127124         * modules/unictype/category-Cn-tests: New file.
127125         * modules/unictype/category-Co-tests: New file.
127126         * modules/unictype/category-Cs-tests: New file.
127127         * modules/unictype/category-L-tests: New file.
127128         * modules/unictype/category-Ll-tests: New file.
127129         * modules/unictype/category-Lm-tests: New file.
127130         * modules/unictype/category-Lo-tests: New file.
127131         * modules/unictype/category-Lt-tests: New file.
127132         * modules/unictype/category-Lu-tests: New file.
127133         * modules/unictype/category-M-tests: New file.
127134         * modules/unictype/category-Mc-tests: New file.
127135         * modules/unictype/category-Me-tests: New file.
127136         * modules/unictype/category-Mn-tests: New file.
127137         * modules/unictype/category-N-tests: New file.
127138         * modules/unictype/category-Nd-tests: New file.
127139         * modules/unictype/category-Nl-tests: New file.
127140         * modules/unictype/category-No-tests: New file.
127141         * modules/unictype/category-P-tests: New file.
127142         * modules/unictype/category-Pc-tests: New file.
127143         * modules/unictype/category-Pd-tests: New file.
127144         * modules/unictype/category-Pe-tests: New file.
127145         * modules/unictype/category-Pf-tests: New file.
127146         * modules/unictype/category-Pi-tests: New file.
127147         * modules/unictype/category-Po-tests: New file.
127148         * modules/unictype/category-Ps-tests: New file.
127149         * modules/unictype/category-S-tests: New file.
127150         * modules/unictype/category-Sc-tests: New file.
127151         * modules/unictype/category-Sk-tests: New file.
127152         * modules/unictype/category-Sm-tests: New file.
127153         * modules/unictype/category-So-tests: New file.
127154         * modules/unictype/category-Z-tests: New file.
127155         * modules/unictype/category-Zl-tests: New file.
127156         * modules/unictype/category-Zp-tests: New file.
127157         * modules/unictype/category-Zs-tests: New file.
127158         * modules/unictype/category-and-not-tests: New file.
127159         * modules/unictype/category-and-tests: New file.
127160         * modules/unictype/category-byname-tests: New file.
127161         * modules/unictype/category-name-tests: New file.
127162         * modules/unictype/category-none-tests: New file.
127163         * modules/unictype/category-of-tests: New file.
127164         * modules/unictype/category-or-tests: New file.
127165         * modules/unictype/category-test-withtable-tests: New file.
127166         * modules/unictype/combining-class-tests: New file.
127167         * modules/unictype/ctype-alnum-tests: New file.
127168         * modules/unictype/ctype-alpha-tests: New file.
127169         * modules/unictype/ctype-blank-tests: New file.
127170         * modules/unictype/ctype-cntrl-tests: New file.
127171         * modules/unictype/ctype-digit-tests: New file.
127172         * modules/unictype/ctype-graph-tests: New file.
127173         * modules/unictype/ctype-lower-tests: New file.
127174         * modules/unictype/ctype-print-tests: New file.
127175         * modules/unictype/ctype-punct-tests: New file.
127176         * modules/unictype/ctype-space-tests: New file.
127177         * modules/unictype/ctype-upper-tests: New file.
127178         * modules/unictype/ctype-xdigit-tests: New file.
127179         * modules/unictype/decimal-digit-tests: New file.
127180         * modules/unictype/digit-tests: New file.
127181         * modules/unictype/mirror-tests: New file.
127182         * modules/unictype/numeric-tests: New file.
127183         * modules/unictype/property-alphabetic-tests: New file.
127184         * modules/unictype/property-ascii-hex-digit-tests: New file.
127185         * modules/unictype/property-bidi-arabic-digit-tests: New file.
127186         * modules/unictype/property-bidi-arabic-right-to-left-tests: New file.
127187         * modules/unictype/property-bidi-block-separator-tests: New file.
127188         * modules/unictype/property-bidi-boundary-neutral-tests: New file.
127189         * modules/unictype/property-bidi-common-separator-tests: New file.
127190         * modules/unictype/property-bidi-control-tests: New file.
127191         * modules/unictype/property-bidi-embedding-or-override-tests: New file.
127192         * modules/unictype/property-bidi-eur-num-separator-tests: New file.
127193         * modules/unictype/property-bidi-eur-num-terminator-tests: New file.
127194         * modules/unictype/property-bidi-european-digit-tests: New file.
127195         * modules/unictype/property-bidi-hebrew-right-to-left-tests: New file.
127196         * modules/unictype/property-bidi-left-to-right-tests: New file.
127197         * modules/unictype/property-bidi-non-spacing-mark-tests: New file.
127198         * modules/unictype/property-bidi-other-neutral-tests: New file.
127199         * modules/unictype/property-bidi-pdf-tests: New file.
127200         * modules/unictype/property-bidi-segment-separator-tests: New file.
127201         * modules/unictype/property-bidi-whitespace-tests: New file.
127202         * modules/unictype/property-byname-tests: New file.
127203         * modules/unictype/property-combining-tests: New file.
127204         * modules/unictype/property-composite-tests: New file.
127205         * modules/unictype/property-currency-symbol-tests: New file.
127206         * modules/unictype/property-dash-tests: New file.
127207         * modules/unictype/property-decimal-digit-tests: New file.
127208         * modules/unictype/property-default-ignorable-code-point-tests: New file.
127209         * modules/unictype/property-deprecated-tests: New file.
127210         * modules/unictype/property-diacritic-tests: New file.
127211         * modules/unictype/property-extender-tests: New file.
127212         * modules/unictype/property-format-control-tests: New file.
127213         * modules/unictype/property-grapheme-base-tests: New file.
127214         * modules/unictype/property-grapheme-extend-tests: New file.
127215         * modules/unictype/property-grapheme-link-tests: New file.
127216         * modules/unictype/property-hex-digit-tests: New file.
127217         * modules/unictype/property-hyphen-tests: New file.
127218         * modules/unictype/property-id-continue-tests: New file.
127219         * modules/unictype/property-id-start-tests: New file.
127220         * modules/unictype/property-ideographic-tests: New file.
127221         * modules/unictype/property-ids-binary-operator-tests: New file.
127222         * modules/unictype/property-ids-trinary-operator-tests: New file.
127223         * modules/unictype/property-ignorable-control-tests: New file.
127224         * modules/unictype/property-iso-control-tests: New file.
127225         * modules/unictype/property-join-control-tests: New file.
127226         * modules/unictype/property-left-of-pair-tests: New file.
127227         * modules/unictype/property-line-separator-tests: New file.
127228         * modules/unictype/property-logical-order-exception-tests: New file.
127229         * modules/unictype/property-lowercase-tests: New file.
127230         * modules/unictype/property-math-tests: New file.
127231         * modules/unictype/property-non-break-tests: New file.
127232         * modules/unictype/property-not-a-character-tests: New file.
127233         * modules/unictype/property-numeric-tests: New file.
127234         * modules/unictype/property-other-alphabetic-tests: New file.
127235         * modules/unictype/property-other-default-ignorable-code-point-tests: New file.
127236         * modules/unictype/property-other-grapheme-extend-tests: New file.
127237         * modules/unictype/property-other-id-continue-tests: New file.
127238         * modules/unictype/property-other-id-start-tests: New file.
127239         * modules/unictype/property-other-lowercase-tests: New file.
127240         * modules/unictype/property-other-math-tests: New file.
127241         * modules/unictype/property-other-uppercase-tests: New file.
127242         * modules/unictype/property-paired-punctuation-tests: New file.
127243         * modules/unictype/property-paragraph-separator-tests: New file.
127244         * modules/unictype/property-pattern-syntax-tests: New file.
127245         * modules/unictype/property-pattern-white-space-tests: New file.
127246         * modules/unictype/property-private-use-tests: New file.
127247         * modules/unictype/property-punctuation-tests: New file.
127248         * modules/unictype/property-quotation-mark-tests: New file.
127249         * modules/unictype/property-radical-tests: New file.
127250         * modules/unictype/property-sentence-terminal-tests: New file.
127251         * modules/unictype/property-soft-dotted-tests: New file.
127252         * modules/unictype/property-space-tests: New file.
127253         * modules/unictype/property-terminal-punctuation-tests: New file.
127254         * modules/unictype/property-test-tests: New file.
127255         * modules/unictype/property-titlecase-tests: New file.
127256         * modules/unictype/property-unassigned-code-value-tests: New file.
127257         * modules/unictype/property-unified-ideograph-tests: New file.
127258         * modules/unictype/property-uppercase-tests: New file.
127259         * modules/unictype/property-variation-selector-tests: New file.
127260         * modules/unictype/property-white-space-tests: New file.
127261         * modules/unictype/property-xid-continue-tests: New file.
127262         * modules/unictype/property-xid-start-tests: New file.
127263         * modules/unictype/property-zero-width-tests: New file.
127264         * modules/unictype/scripts-tests: New file.
127265         * modules/unictype/syntax-c-ident-tests: New file.
127266         * modules/unictype/syntax-c-whitespace-tests: New file.
127267         * modules/unictype/syntax-java-ident-tests: New file.
127268         * modules/unictype/syntax-java-whitespace-tests: New file.
127269         * tests/unictype/test-bidi_byname.c: New file.
127270         * tests/unictype/test-bidi_name.c: New file.
127271         * tests/unictype/test-bidi_of.c: New file.
127272         * tests/unictype/test-bidi_test.c: New file.
127273         * tests/unictype/test-block_list.c: New file.
127274         * tests/unictype/test-block_of.c: New file.
127275         * tests/unictype/test-block_test.c: New file.
127276         * tests/unictype/test-categ_and.c: New file.
127277         * tests/unictype/test-categ_and_not.c: New file.
127278         * tests/unictype/test-categ_byname.c: New file.
127279         * tests/unictype/test-categ_name.c: New file.
127280         * tests/unictype/test-categ_none.c: New file.
127281         * tests/unictype/test-categ_of.c: New file.
127282         * tests/unictype/test-categ_or.c: New file.
127283         * tests/unictype/test-categ_test_withtable.c: New file.
127284         * tests/unictype/test-combining.c: New file.
127285         * tests/unictype/test-decdigit.c: New file.
127286         * tests/unictype/test-digit.c: New file.
127287         * tests/unictype/test-mirror.c: New file.
127288         * tests/unictype/test-numeric.c: New file.
127289         * tests/unictype/test-pr_byname.c: New file.
127290         * tests/unictype/test-pr_test.c: New file.
127291         * tests/unictype/test-predicate-part1.h: New file.
127292         * tests/unictype/test-predicate-part2.h: New file.
127293         * tests/unictype/test-scripts.c: New file.
127294         * tests/unictype/test-sy_c_ident.c: New file.
127295         * tests/unictype/test-sy_java_ident.c: New file.
127297         * tests/unictype/test-categ_C.c: New file, generated by gen-ctype.c
127298         for Unicode 5.0.0.
127299         * tests/unictype/test-categ_Cc.c: Likewise.
127300         * tests/unictype/test-categ_Cf.c: Likewise.
127301         * tests/unictype/test-categ_Cn.c: Likewise.
127302         * tests/unictype/test-categ_Co.c: Likewise.
127303         * tests/unictype/test-categ_Cs.c: Likewise.
127304         * tests/unictype/test-categ_L.c: Likewise.
127305         * tests/unictype/test-categ_Ll.c: Likewise.
127306         * tests/unictype/test-categ_Lm.c: Likewise.
127307         * tests/unictype/test-categ_Lo.c: Likewise.
127308         * tests/unictype/test-categ_Lt.c: Likewise.
127309         * tests/unictype/test-categ_Lu.c: Likewise.
127310         * tests/unictype/test-categ_M.c: Likewise.
127311         * tests/unictype/test-categ_Mc.c: Likewise.
127312         * tests/unictype/test-categ_Me.c: Likewise.
127313         * tests/unictype/test-categ_Mn.c: Likewise.
127314         * tests/unictype/test-categ_N.c: Likewise.
127315         * tests/unictype/test-categ_Nd.c: Likewise.
127316         * tests/unictype/test-categ_Nl.c: Likewise.
127317         * tests/unictype/test-categ_No.c: Likewise.
127318         * tests/unictype/test-categ_P.c: Likewise.
127319         * tests/unictype/test-categ_Pc.c: Likewise.
127320         * tests/unictype/test-categ_Pd.c: Likewise.
127321         * tests/unictype/test-categ_Pe.c: Likewise.
127322         * tests/unictype/test-categ_Pf.c: Likewise.
127323         * tests/unictype/test-categ_Pi.c: Likewise.
127324         * tests/unictype/test-categ_Po.c: Likewise.
127325         * tests/unictype/test-categ_Ps.c: Likewise.
127326         * tests/unictype/test-categ_S.c: Likewise.
127327         * tests/unictype/test-categ_Sc.c: Likewise.
127328         * tests/unictype/test-categ_Sk.c: Likewise.
127329         * tests/unictype/test-categ_Sm.c: Likewise.
127330         * tests/unictype/test-categ_So.c: Likewise.
127331         * tests/unictype/test-categ_Z.c: Likewise.
127332         * tests/unictype/test-categ_Zl.c: Likewise.
127333         * tests/unictype/test-categ_Zp.c: Likewise.
127334         * tests/unictype/test-categ_Zs.c: Likewise.
127335         * tests/unictype/test-ctype_alnum.c: Likewise.
127336         * tests/unictype/test-ctype_alpha.c: Likewise.
127337         * tests/unictype/test-ctype_blank.c: Likewise.
127338         * tests/unictype/test-ctype_cntrl.c: Likewise.
127339         * tests/unictype/test-ctype_digit.c: Likewise.
127340         * tests/unictype/test-ctype_graph.c: Likewise.
127341         * tests/unictype/test-ctype_lower.c: Likewise.
127342         * tests/unictype/test-ctype_print.c: Likewise.
127343         * tests/unictype/test-ctype_punct.c: Likewise.
127344         * tests/unictype/test-ctype_space.c: Likewise.
127345         * tests/unictype/test-ctype_upper.c: Likewise.
127346         * tests/unictype/test-ctype_xdigit.c: Likewise.
127347         * tests/unictype/test-decdigit.h: Likewise.
127348         * tests/unictype/test-digit.h: Likewise.
127349         * tests/unictype/test-numeric.h: Likewise.
127350         * tests/unictype/test-pr_alphabetic.c: Likewise.
127351         * tests/unictype/test-pr_ascii_hex_digit.c: Likewise.
127352         * tests/unictype/test-pr_bidi_arabic_digit.c: Likewise.
127353         * tests/unictype/test-pr_bidi_arabic_right_to_left.c: Likewise.
127354         * tests/unictype/test-pr_bidi_block_separator.c: Likewise.
127355         * tests/unictype/test-pr_bidi_boundary_neutral.c: Likewise.
127356         * tests/unictype/test-pr_bidi_common_separator.c: Likewise.
127357         * tests/unictype/test-pr_bidi_control.c: Likewise.
127358         * tests/unictype/test-pr_bidi_embedding_or_override.c: Likewise.
127359         * tests/unictype/test-pr_bidi_eur_num_separator.c: Likewise.
127360         * tests/unictype/test-pr_bidi_eur_num_terminator.c: Likewise.
127361         * tests/unictype/test-pr_bidi_european_digit.c: Likewise.
127362         * tests/unictype/test-pr_bidi_hebrew_right_to_left.c: Likewise.
127363         * tests/unictype/test-pr_bidi_left_to_right.c: Likewise.
127364         * tests/unictype/test-pr_bidi_non_spacing_mark.c: Likewise.
127365         * tests/unictype/test-pr_bidi_other_neutral.c: Likewise.
127366         * tests/unictype/test-pr_bidi_pdf.c: Likewise.
127367         * tests/unictype/test-pr_bidi_segment_separator.c: Likewise.
127368         * tests/unictype/test-pr_bidi_whitespace.c: Likewise.
127369         * tests/unictype/test-pr_combining.c: Likewise.
127370         * tests/unictype/test-pr_composite.c: Likewise.
127371         * tests/unictype/test-pr_currency_symbol.c: Likewise.
127372         * tests/unictype/test-pr_dash.c: Likewise.
127373         * tests/unictype/test-pr_decimal_digit.c: Likewise.
127374         * tests/unictype/test-pr_default_ignorable_code_point.c: Likewise.
127375         * tests/unictype/test-pr_deprecated.c: Likewise.
127376         * tests/unictype/test-pr_diacritic.c: Likewise.
127377         * tests/unictype/test-pr_extender.c: Likewise.
127378         * tests/unictype/test-pr_format_control.c: Likewise.
127379         * tests/unictype/test-pr_grapheme_base.c: Likewise.
127380         * tests/unictype/test-pr_grapheme_extend.c: Likewise.
127381         * tests/unictype/test-pr_grapheme_link.c: Likewise.
127382         * tests/unictype/test-pr_hex_digit.c: Likewise.
127383         * tests/unictype/test-pr_hyphen.c: Likewise.
127384         * tests/unictype/test-pr_id_continue.c: Likewise.
127385         * tests/unictype/test-pr_id_start.c: Likewise.
127386         * tests/unictype/test-pr_ideographic.c: Likewise.
127387         * tests/unictype/test-pr_ids_binary_operator.c: Likewise.
127388         * tests/unictype/test-pr_ids_trinary_operator.c: Likewise.
127389         * tests/unictype/test-pr_ignorable_control.c: Likewise.
127390         * tests/unictype/test-pr_iso_control.c: Likewise.
127391         * tests/unictype/test-pr_join_control.c: Likewise.
127392         * tests/unictype/test-pr_left_of_pair.c: Likewise.
127393         * tests/unictype/test-pr_line_separator.c: Likewise.
127394         * tests/unictype/test-pr_logical_order_exception.c: Likewise.
127395         * tests/unictype/test-pr_lowercase.c: Likewise.
127396         * tests/unictype/test-pr_math.c: Likewise.
127397         * tests/unictype/test-pr_non_break.c: Likewise.
127398         * tests/unictype/test-pr_not_a_character.c: Likewise.
127399         * tests/unictype/test-pr_numeric.c: Likewise.
127400         * tests/unictype/test-pr_other_alphabetic.c: Likewise.
127401         * tests/unictype/test-pr_other_default_ignorable_code_point.c: Likewise.
127402         * tests/unictype/test-pr_other_grapheme_extend.c: Likewise.
127403         * tests/unictype/test-pr_other_id_continue.c: Likewise.
127404         * tests/unictype/test-pr_other_id_start.c: Likewise.
127405         * tests/unictype/test-pr_other_lowercase.c: Likewise.
127406         * tests/unictype/test-pr_other_math.c: Likewise.
127407         * tests/unictype/test-pr_other_uppercase.c: Likewise.
127408         * tests/unictype/test-pr_paired_punctuation.c: Likewise.
127409         * tests/unictype/test-pr_paragraph_separator.c: Likewise.
127410         * tests/unictype/test-pr_pattern_syntax.c: Likewise.
127411         * tests/unictype/test-pr_pattern_white_space.c: Likewise.
127412         * tests/unictype/test-pr_private_use.c: Likewise.
127413         * tests/unictype/test-pr_punctuation.c: Likewise.
127414         * tests/unictype/test-pr_quotation_mark.c: Likewise.
127415         * tests/unictype/test-pr_radical.c: Likewise.
127416         * tests/unictype/test-pr_sentence_terminal.c: Likewise.
127417         * tests/unictype/test-pr_soft_dotted.c: Likewise.
127418         * tests/unictype/test-pr_space.c: Likewise.
127419         * tests/unictype/test-pr_terminal_punctuation.c: Likewise.
127420         * tests/unictype/test-pr_titlecase.c: Likewise.
127421         * tests/unictype/test-pr_unassigned_code_value.c: Likewise.
127422         * tests/unictype/test-pr_unified_ideograph.c: Likewise.
127423         * tests/unictype/test-pr_uppercase.c: Likewise.
127424         * tests/unictype/test-pr_variation_selector.c: Likewise.
127425         * tests/unictype/test-pr_white_space.c: Likewise.
127426         * tests/unictype/test-pr_xid_continue.c: Likewise.
127427         * tests/unictype/test-pr_xid_start.c: Likewise.
127428         * tests/unictype/test-pr_zero_width.c: Likewise.
127429         * tests/unictype/test-sy_c_whitespace.c: Likewise.
127430         * tests/unictype/test-sy_java_whitespace.c: Likewise.
127432 2007-11-12  Bruno Haible  <bruno@clisp.org>
127434         Unicode character classification functions.
127435         * lib/unictype.h: New file.
127436         * modules/unictype/base: New file.
127437         * modules/unictype/category-L: New file.
127438         * modules/unictype/category-Lu: New file.
127439         * modules/unictype/category-Ll: New file.
127440         * modules/unictype/category-Lt: New file.
127441         * modules/unictype/category-Lm: New file.
127442         * modules/unictype/category-Lo: New file.
127443         * modules/unictype/category-M: New file.
127444         * modules/unictype/category-Mn: New file.
127445         * modules/unictype/category-Mc: New file.
127446         * modules/unictype/category-Me: New file.
127447         * modules/unictype/category-N: New file.
127448         * modules/unictype/category-Nd: New file.
127449         * modules/unictype/category-Nl: New file.
127450         * modules/unictype/category-No: New file.
127451         * modules/unictype/category-P: New file.
127452         * modules/unictype/category-Pc: New file.
127453         * modules/unictype/category-Pd: New file.
127454         * modules/unictype/category-Ps: New file.
127455         * modules/unictype/category-Pe: New file.
127456         * modules/unictype/category-Pi: New file.
127457         * modules/unictype/category-Pf: New file.
127458         * modules/unictype/category-Po: New file.
127459         * modules/unictype/category-S: New file.
127460         * modules/unictype/category-Sm: New file.
127461         * modules/unictype/category-Sc: New file.
127462         * modules/unictype/category-Sk: New file.
127463         * modules/unictype/category-So: New file.
127464         * modules/unictype/category-Z: New file.
127465         * modules/unictype/category-Zs: New file.
127466         * modules/unictype/category-Zl: New file.
127467         * modules/unictype/category-Zp: New file.
127468         * modules/unictype/category-C: New file.
127469         * modules/unictype/category-Cc: New file.
127470         * modules/unictype/category-Cf: New file.
127471         * modules/unictype/category-Cs: New file.
127472         * modules/unictype/category-Co: New file.
127473         * modules/unictype/category-Cn: New file.
127474         * modules/unictype/category-or: New file.
127475         * modules/unictype/category-of: New file.
127476         * modules/unictype/category-test: New file.
127477         * modules/unictype/category-test-withtable: New file.
127478         * modules/unictype/category-byname: New file.
127479         * modules/unictype/category-none: New file.
127480         * modules/unictype/category-and: New file.
127481         * modules/unictype/category-and-not: New file.
127482         * modules/unictype/category-name: New file.
127483         * modules/unictype/combining-class: New file.
127484         * modules/unictype/category-all: New file.
127485         * modules/unictype/bidicategory-all: New file.
127486         * modules/unictype/bidicategory-byname: New file.
127487         * modules/unictype/bidicategory-name: New file.
127488         * modules/unictype/bidicategory-of: New file.
127489         * modules/unictype/bidicategory-test: New file.
127490         * modules/unictype/decimal-digit: New file.
127491         * modules/unictype/digit: New file.
127492         * modules/unictype/numeric: New file.
127493         * modules/unictype/mirror: New file.
127494         * modules/unictype/property-white-space: New file.
127495         * modules/unictype/property-alphabetic: New file.
127496         * modules/unictype/property-other-alphabetic: New file.
127497         * modules/unictype/property-not-a-character: New file.
127498         * modules/unictype/property-default-ignorable-code-point: New file.
127499         * modules/unictype/property-other-default-ignorable-code-point: New
127500         file.
127501         * modules/unictype/property-deprecated: New file.
127502         * modules/unictype/property-logical-order-exception: New file.
127503         * modules/unictype/property-variation-selector: New file.
127504         * modules/unictype/property-private-use: New file.
127505         * modules/unictype/property-unassigned-code-value: New file.
127506         * modules/unictype/property-uppercase: New file.
127507         * modules/unictype/property-other-uppercase: New file.
127508         * modules/unictype/property-lowercase: New file.
127509         * modules/unictype/property-other-lowercase: New file.
127510         * modules/unictype/property-titlecase: New file.
127511         * modules/unictype/property-soft-dotted: New file.
127512         * modules/unictype/property-id-start: New file.
127513         * modules/unictype/property-other-id-start: New file.
127514         * modules/unictype/property-id-continue: New file.
127515         * modules/unictype/property-other-id-continue: New file.
127516         * modules/unictype/property-xid-start: New file.
127517         * modules/unictype/property-xid-continue: New file.
127518         * modules/unictype/property-pattern-white-space: New file.
127519         * modules/unictype/property-pattern-syntax: New file.
127520         * modules/unictype/property-join-control: New file.
127521         * modules/unictype/property-grapheme-base: New file.
127522         * modules/unictype/property-grapheme-extend: New file.
127523         * modules/unictype/property-other-grapheme-extend: New file.
127524         * modules/unictype/property-grapheme-link: New file.
127525         * modules/unictype/property-bidi-control: New file.
127526         * modules/unictype/property-bidi-left-to-right: New file.
127527         * modules/unictype/property-bidi-hebrew-right-to-left: New file.
127528         * modules/unictype/property-bidi-arabic-right-to-left: New file.
127529         * modules/unictype/property-bidi-european-digit: New file.
127530         * modules/unictype/property-bidi-eur-num-separator: New file.
127531         * modules/unictype/property-bidi-eur-num-terminator: New file.
127532         * modules/unictype/property-bidi-arabic-digit: New file.
127533         * modules/unictype/property-bidi-common-separator: New file.
127534         * modules/unictype/property-bidi-block-separator: New file.
127535         * modules/unictype/property-bidi-segment-separator: New file.
127536         * modules/unictype/property-bidi-whitespace: New file.
127537         * modules/unictype/property-bidi-non-spacing-mark: New file.
127538         * modules/unictype/property-bidi-boundary-neutral: New file.
127539         * modules/unictype/property-bidi-pdf: New file.
127540         * modules/unictype/property-bidi-embedding-or-override: New file.
127541         * modules/unictype/property-bidi-other-neutral: New file.
127542         * modules/unictype/property-hex-digit: New file.
127543         * modules/unictype/property-ascii-hex-digit: New file.
127544         * modules/unictype/property-ideographic: New file.
127545         * modules/unictype/property-unified-ideograph: New file.
127546         * modules/unictype/property-radical: New file.
127547         * modules/unictype/property-ids-binary-operator: New file.
127548         * modules/unictype/property-ids-trinary-operator: New file.
127549         * modules/unictype/property-zero-width: New file.
127550         * modules/unictype/property-space: New file.
127551         * modules/unictype/property-non-break: New file.
127552         * modules/unictype/property-iso-control: New file.
127553         * modules/unictype/property-format-control: New file.
127554         * modules/unictype/property-dash: New file.
127555         * modules/unictype/property-hyphen: New file.
127556         * modules/unictype/property-punctuation: New file.
127557         * modules/unictype/property-line-separator: New file.
127558         * modules/unictype/property-paragraph-separator: New file.
127559         * modules/unictype/property-quotation-mark: New file.
127560         * modules/unictype/property-sentence-terminal: New file.
127561         * modules/unictype/property-terminal-punctuation: New file.
127562         * modules/unictype/property-currency-symbol: New file.
127563         * modules/unictype/property-math: New file.
127564         * modules/unictype/property-other-math: New file.
127565         * modules/unictype/property-paired-punctuation: New file.
127566         * modules/unictype/property-left-of-pair: New file.
127567         * modules/unictype/property-combining: New file.
127568         * modules/unictype/property-composite: New file.
127569         * modules/unictype/property-decimal-digit: New file.
127570         * modules/unictype/property-numeric: New file.
127571         * modules/unictype/property-diacritic: New file.
127572         * modules/unictype/property-extender: New file.
127573         * modules/unictype/property-ignorable-control: New file.
127574         * modules/unictype/property-test: New file.
127575         * modules/unictype/property-byname: New file.
127576         * modules/unictype/property-all: New file.
127577         * modules/unictype/scripts: New file.
127578         * modules/unictype/scripts-all: New file.
127579         * modules/unictype/block-of: New file.
127580         * modules/unictype/block-test: New file.
127581         * modules/unictype/block-list: New file.
127582         * modules/unictype/block-all: New file.
127583         * modules/unictype/syntax-c-whitespace: New file.
127584         * modules/unictype/syntax-java-whitespace: New file.
127585         * modules/unictype/syntax-c-ident: New file.
127586         * modules/unictype/syntax-java-ident: New file.
127587         * modules/unictype/ctype-alnum: New file.
127588         * modules/unictype/ctype-alpha: New file.
127589         * modules/unictype/ctype-cntrl: New file.
127590         * modules/unictype/ctype-digit: New file.
127591         * modules/unictype/ctype-graph: New file.
127592         * modules/unictype/ctype-lower: New file.
127593         * modules/unictype/ctype-print: New file.
127594         * modules/unictype/ctype-punct: New file.
127595         * modules/unictype/ctype-space: New file.
127596         * modules/unictype/ctype-upper: New file.
127597         * modules/unictype/ctype-xdigit: New file.
127598         * modules/unictype/ctype-blank: New file.
127599         * lib/unictype/bidi_byname.c: New file.
127600         * lib/unictype/bidi_name.c: New file.
127601         * lib/unictype/bidi_of.c: New file.
127602         * lib/unictype/bidi_test.c: New file.
127603         * lib/unictype/bitmap.h: New file.
127604         * lib/unictype/block_test.c: New file.
127605         * lib/unictype/blocks.c: New file.
127606         * lib/unictype/categ_C.c: New file.
127607         * lib/unictype/categ_Cc.c: New file.
127608         * lib/unictype/categ_Cf.c: New file.
127609         * lib/unictype/categ_Cn.c: New file.
127610         * lib/unictype/categ_Co.c: New file.
127611         * lib/unictype/categ_Cs.c: New file.
127612         * lib/unictype/categ_L.c: New file.
127613         * lib/unictype/categ_Ll.c: New file.
127614         * lib/unictype/categ_Lm.c: New file.
127615         * lib/unictype/categ_Lo.c: New file.
127616         * lib/unictype/categ_Lt.c: New file.
127617         * lib/unictype/categ_Lu.c: New file.
127618         * lib/unictype/categ_M.c: New file.
127619         * lib/unictype/categ_Mc.c: New file.
127620         * lib/unictype/categ_Me.c: New file.
127621         * lib/unictype/categ_Mn.c: New file.
127622         * lib/unictype/categ_N.c: New file.
127623         * lib/unictype/categ_Nd.c: New file.
127624         * lib/unictype/categ_Nl.c: New file.
127625         * lib/unictype/categ_No.c: New file.
127626         * lib/unictype/categ_P.c: New file.
127627         * lib/unictype/categ_Pc.c: New file.
127628         * lib/unictype/categ_Pd.c: New file.
127629         * lib/unictype/categ_Pe.c: New file.
127630         * lib/unictype/categ_Pf.c: New file.
127631         * lib/unictype/categ_Pi.c: New file.
127632         * lib/unictype/categ_Po.c: New file.
127633         * lib/unictype/categ_Ps.c: New file.
127634         * lib/unictype/categ_S.c: New file.
127635         * lib/unictype/categ_Sc.c: New file.
127636         * lib/unictype/categ_Sk.c: New file.
127637         * lib/unictype/categ_Sm.c: New file.
127638         * lib/unictype/categ_So.c: New file.
127639         * lib/unictype/categ_Z.c: New file.
127640         * lib/unictype/categ_Zl.c: New file.
127641         * lib/unictype/categ_Zp.c: New file.
127642         * lib/unictype/categ_Zs.c: New file.
127643         * lib/unictype/categ_and.c: New file.
127644         * lib/unictype/categ_and_not.c: New file.
127645         * lib/unictype/categ_byname.c: New file.
127646         * lib/unictype/categ_name.c: New file.
127647         * lib/unictype/categ_none.c: New file.
127648         * lib/unictype/categ_of.c: New file.
127649         * lib/unictype/categ_or.c: New file.
127650         * lib/unictype/categ_test.c: New file.
127651         * lib/unictype/combining.c: New file.
127652         * lib/unictype/ctype_alnum.c: New file.
127653         * lib/unictype/ctype_alpha.c: New file.
127654         * lib/unictype/ctype_blank.c: New file.
127655         * lib/unictype/ctype_cntrl.c: New file.
127656         * lib/unictype/ctype_digit.c: New file.
127657         * lib/unictype/ctype_graph.c: New file.
127658         * lib/unictype/ctype_lower.c: New file.
127659         * lib/unictype/ctype_print.c: New file.
127660         * lib/unictype/ctype_punct.c: New file.
127661         * lib/unictype/ctype_space.c: New file.
127662         * lib/unictype/ctype_upper.c: New file.
127663         * lib/unictype/ctype_xdigit.c: New file.
127664         * lib/unictype/decdigit.c: New file.
127665         * lib/unictype/digit.c: New file.
127666         * lib/unictype/identsyntaxmap.h: New file.
127667         * lib/unictype/mirror.c: New file.
127668         * lib/unictype/numeric.c: New file.
127669         * lib/unictype/pr_alphabetic.c: New file.
127670         * lib/unictype/pr_ascii_hex_digit.c: New file.
127671         * lib/unictype/pr_bidi_arabic_digit.c: New file.
127672         * lib/unictype/pr_bidi_arabic_right_to_left.c: New file.
127673         * lib/unictype/pr_bidi_block_separator.c: New file.
127674         * lib/unictype/pr_bidi_boundary_neutral.c: New file.
127675         * lib/unictype/pr_bidi_common_separator.c: New file.
127676         * lib/unictype/pr_bidi_control.c: New file.
127677         * lib/unictype/pr_bidi_embedding_or_override.c: New file.
127678         * lib/unictype/pr_bidi_eur_num_separator.c: New file.
127679         * lib/unictype/pr_bidi_eur_num_terminator.c: New file.
127680         * lib/unictype/pr_bidi_european_digit.c: New file.
127681         * lib/unictype/pr_bidi_hebrew_right_to_left.c: New file.
127682         * lib/unictype/pr_bidi_left_to_right.c: New file.
127683         * lib/unictype/pr_bidi_non_spacing_mark.c: New file.
127684         * lib/unictype/pr_bidi_other_neutral.c: New file.
127685         * lib/unictype/pr_bidi_pdf.c: New file.
127686         * lib/unictype/pr_bidi_segment_separator.c: New file.
127687         * lib/unictype/pr_bidi_whitespace.c: New file.
127688         * lib/unictype/pr_byname.c: New file.
127689         * lib/unictype/pr_byname.gperf: New file.
127690         * lib/unictype/pr_combining.c: New file.
127691         * lib/unictype/pr_composite.c: New file.
127692         * lib/unictype/pr_currency_symbol.c: New file.
127693         * lib/unictype/pr_dash.c: New file.
127694         * lib/unictype/pr_decimal_digit.c: New file.
127695         * lib/unictype/pr_default_ignorable_code_point.c: New file.
127696         * lib/unictype/pr_deprecated.c: New file.
127697         * lib/unictype/pr_diacritic.c: New file.
127698         * lib/unictype/pr_extender.c: New file.
127699         * lib/unictype/pr_format_control.c: New file.
127700         * lib/unictype/pr_grapheme_base.c: New file.
127701         * lib/unictype/pr_grapheme_extend.c: New file.
127702         * lib/unictype/pr_grapheme_link.c: New file.
127703         * lib/unictype/pr_hex_digit.c: New file.
127704         * lib/unictype/pr_hyphen.c: New file.
127705         * lib/unictype/pr_id_continue.c: New file.
127706         * lib/unictype/pr_id_start.c: New file.
127707         * lib/unictype/pr_ideographic.c: New file.
127708         * lib/unictype/pr_ids_binary_operator.c: New file.
127709         * lib/unictype/pr_ids_trinary_operator.c: New file.
127710         * lib/unictype/pr_ignorable_control.c: New file.
127711         * lib/unictype/pr_iso_control.c: New file.
127712         * lib/unictype/pr_join_control.c: New file.
127713         * lib/unictype/pr_left_of_pair.c: New file.
127714         * lib/unictype/pr_line_separator.c: New file.
127715         * lib/unictype/pr_logical_order_exception.c: New file.
127716         * lib/unictype/pr_lowercase.c: New file.
127717         * lib/unictype/pr_math.c: New file.
127718         * lib/unictype/pr_non_break.c: New file.
127719         * lib/unictype/pr_not_a_character.c: New file.
127720         * lib/unictype/pr_numeric.c: New file.
127721         * lib/unictype/pr_other_alphabetic.c: New file.
127722         * lib/unictype/pr_other_default_ignorable_code_point.c: New file.
127723         * lib/unictype/pr_other_grapheme_extend.c: New file.
127724         * lib/unictype/pr_other_id_continue.c: New file.
127725         * lib/unictype/pr_other_id_start.c: New file.
127726         * lib/unictype/pr_other_lowercase.c: New file.
127727         * lib/unictype/pr_other_math.c: New file.
127728         * lib/unictype/pr_other_uppercase.c: New file.
127729         * lib/unictype/pr_paired_punctuation.c: New file.
127730         * lib/unictype/pr_paragraph_separator.c: New file.
127731         * lib/unictype/pr_pattern_syntax.c: New file.
127732         * lib/unictype/pr_pattern_white_space.c: New file.
127733         * lib/unictype/pr_private_use.c: New file.
127734         * lib/unictype/pr_punctuation.c: New file.
127735         * lib/unictype/pr_quotation_mark.c: New file.
127736         * lib/unictype/pr_radical.c: New file.
127737         * lib/unictype/pr_sentence_terminal.c: New file.
127738         * lib/unictype/pr_soft_dotted.c: New file.
127739         * lib/unictype/pr_space.c: New file.
127740         * lib/unictype/pr_terminal_punctuation.c: New file.
127741         * lib/unictype/pr_test.c: New file.
127742         * lib/unictype/pr_titlecase.c: New file.
127743         * lib/unictype/pr_unassigned_code_value.c: New file.
127744         * lib/unictype/pr_unified_ideograph.c: New file.
127745         * lib/unictype/pr_uppercase.c: New file.
127746         * lib/unictype/pr_variation_selector.c: New file.
127747         * lib/unictype/pr_white_space.c: New file.
127748         * lib/unictype/pr_xid_continue.c: New file.
127749         * lib/unictype/pr_xid_start.c: New file.
127750         * lib/unictype/pr_zero_width.c: New file.
127751         * lib/unictype/scripts.c: New file.
127752         * lib/unictype/sy_c_ident.c: New file.
127753         * lib/unictype/sy_c_whitespace.c: New file.
127754         * lib/unictype/sy_java_ident.c: New file.
127755         * lib/unictype/sy_java_whitespace.c: New file.
127757         * lib/unictype/bidi_of.h: New file, generated by gen-ctype.c for
127758         Unicode 5.0.0.
127759         * lib/unictype/blocks.h: Likewise.
127760         * lib/unictype/categ_C.h: Likewise.
127761         * lib/unictype/categ_Cc.h: Likewise.
127762         * lib/unictype/categ_Cf.h: Likewise.
127763         * lib/unictype/categ_Cn.h: Likewise.
127764         * lib/unictype/categ_Co.h: Likewise.
127765         * lib/unictype/categ_Cs.h: Likewise.
127766         * lib/unictype/categ_L.h: Likewise.
127767         * lib/unictype/categ_Ll.h: Likewise.
127768         * lib/unictype/categ_Lm.h: Likewise.
127769         * lib/unictype/categ_Lo.h: Likewise.
127770         * lib/unictype/categ_Lt.h: Likewise.
127771         * lib/unictype/categ_Lu.h: Likewise.
127772         * lib/unictype/categ_M.h: Likewise.
127773         * lib/unictype/categ_Mc.h: Likewise.
127774         * lib/unictype/categ_Me.h: Likewise.
127775         * lib/unictype/categ_Mn.h: Likewise.
127776         * lib/unictype/categ_N.h: Likewise.
127777         * lib/unictype/categ_Nd.h: Likewise.
127778         * lib/unictype/categ_Nl.h: Likewise.
127779         * lib/unictype/categ_No.h: Likewise.
127780         * lib/unictype/categ_P.h: Likewise.
127781         * lib/unictype/categ_Pc.h: Likewise.
127782         * lib/unictype/categ_Pd.h: Likewise.
127783         * lib/unictype/categ_Pe.h: Likewise.
127784         * lib/unictype/categ_Pf.h: Likewise.
127785         * lib/unictype/categ_Pi.h: Likewise.
127786         * lib/unictype/categ_Po.h: Likewise.
127787         * lib/unictype/categ_Ps.h: Likewise.
127788         * lib/unictype/categ_S.h: Likewise.
127789         * lib/unictype/categ_Sc.h: Likewise.
127790         * lib/unictype/categ_Sk.h: Likewise.
127791         * lib/unictype/categ_Sm.h: Likewise.
127792         * lib/unictype/categ_So.h: Likewise.
127793         * lib/unictype/categ_Z.h: Likewise.
127794         * lib/unictype/categ_Zl.h: Likewise.
127795         * lib/unictype/categ_Zp.h: Likewise.
127796         * lib/unictype/categ_Zs.h: Likewise.
127797         * lib/unictype/categ_of.h: Likewise.
127798         * lib/unictype/combining.h: Likewise.
127799         * lib/unictype/ctype_alnum.h: Likewise.
127800         * lib/unictype/ctype_alpha.h: Likewise.
127801         * lib/unictype/ctype_blank.h: Likewise.
127802         * lib/unictype/ctype_cntrl.h: Likewise.
127803         * lib/unictype/ctype_digit.h: Likewise.
127804         * lib/unictype/ctype_graph.h: Likewise.
127805         * lib/unictype/ctype_lower.h: Likewise.
127806         * lib/unictype/ctype_print.h: Likewise.
127807         * lib/unictype/ctype_punct.h: Likewise.
127808         * lib/unictype/ctype_space.h: Likewise.
127809         * lib/unictype/ctype_upper.h: Likewise.
127810         * lib/unictype/ctype_xdigit.h: Likewise.
127811         * lib/unictype/decdigit.h: Likewise.
127812         * lib/unictype/digit.h: Likewise.
127813         * lib/unictype/mirror.h: Likewise.
127814         * lib/unictype/numeric.h: Likewise.
127815         * lib/unictype/pr_alphabetic.h: Likewise.
127816         * lib/unictype/pr_ascii_hex_digit.h: Likewise.
127817         * lib/unictype/pr_bidi_arabic_digit.h: Likewise.
127818         * lib/unictype/pr_bidi_arabic_right_to_left.h: Likewise.
127819         * lib/unictype/pr_bidi_block_separator.h: Likewise.
127820         * lib/unictype/pr_bidi_boundary_neutral.h: Likewise.
127821         * lib/unictype/pr_bidi_common_separator.h: Likewise.
127822         * lib/unictype/pr_bidi_control.h: Likewise.
127823         * lib/unictype/pr_bidi_embedding_or_override.h: Likewise.
127824         * lib/unictype/pr_bidi_eur_num_separator.h: Likewise.
127825         * lib/unictype/pr_bidi_eur_num_terminator.h: Likewise.
127826         * lib/unictype/pr_bidi_european_digit.h: Likewise.
127827         * lib/unictype/pr_bidi_hebrew_right_to_left.h: Likewise.
127828         * lib/unictype/pr_bidi_left_to_right.h: Likewise.
127829         * lib/unictype/pr_bidi_non_spacing_mark.h: Likewise.
127830         * lib/unictype/pr_bidi_other_neutral.h: Likewise.
127831         * lib/unictype/pr_bidi_pdf.h: Likewise.
127832         * lib/unictype/pr_bidi_segment_separator.h: Likewise.
127833         * lib/unictype/pr_bidi_whitespace.h: Likewise.
127834         * lib/unictype/pr_combining.h: Likewise.
127835         * lib/unictype/pr_composite.h: Likewise.
127836         * lib/unictype/pr_currency_symbol.h: Likewise.
127837         * lib/unictype/pr_dash.h: Likewise.
127838         * lib/unictype/pr_decimal_digit.h: Likewise.
127839         * lib/unictype/pr_default_ignorable_code_point.h: Likewise.
127840         * lib/unictype/pr_deprecated.h: Likewise.
127841         * lib/unictype/pr_diacritic.h: Likewise.
127842         * lib/unictype/pr_extender.h: Likewise.
127843         * lib/unictype/pr_format_control.h: Likewise.
127844         * lib/unictype/pr_grapheme_base.h: Likewise.
127845         * lib/unictype/pr_grapheme_extend.h: Likewise.
127846         * lib/unictype/pr_grapheme_link.h: Likewise.
127847         * lib/unictype/pr_hex_digit.h: Likewise.
127848         * lib/unictype/pr_hyphen.h: Likewise.
127849         * lib/unictype/pr_id_continue.h: Likewise.
127850         * lib/unictype/pr_id_start.h: Likewise.
127851         * lib/unictype/pr_ideographic.h: Likewise.
127852         * lib/unictype/pr_ids_binary_operator.h: Likewise.
127853         * lib/unictype/pr_ids_trinary_operator.h: Likewise.
127854         * lib/unictype/pr_ignorable_control.h: Likewise.
127855         * lib/unictype/pr_iso_control.h: Likewise.
127856         * lib/unictype/pr_join_control.h: Likewise.
127857         * lib/unictype/pr_left_of_pair.h: Likewise.
127858         * lib/unictype/pr_line_separator.h: Likewise.
127859         * lib/unictype/pr_logical_order_exception.h: Likewise.
127860         * lib/unictype/pr_lowercase.h: Likewise.
127861         * lib/unictype/pr_math.h: Likewise.
127862         * lib/unictype/pr_non_break.h: Likewise.
127863         * lib/unictype/pr_not_a_character.h: Likewise.
127864         * lib/unictype/pr_numeric.h: Likewise.
127865         * lib/unictype/pr_other_alphabetic.h: Likewise.
127866         * lib/unictype/pr_other_default_ignorable_code_point.h: Likewise.
127867         * lib/unictype/pr_other_grapheme_extend.h: Likewise.
127868         * lib/unictype/pr_other_id_continue.h: Likewise.
127869         * lib/unictype/pr_other_id_start.h: Likewise.
127870         * lib/unictype/pr_other_lowercase.h: Likewise.
127871         * lib/unictype/pr_other_math.h: Likewise.
127872         * lib/unictype/pr_other_uppercase.h: Likewise.
127873         * lib/unictype/pr_paired_punctuation.h: Likewise.
127874         * lib/unictype/pr_paragraph_separator.h: Likewise.
127875         * lib/unictype/pr_pattern_syntax.h: Likewise.
127876         * lib/unictype/pr_pattern_white_space.h: Likewise.
127877         * lib/unictype/pr_private_use.h: Likewise.
127878         * lib/unictype/pr_punctuation.h: Likewise.
127879         * lib/unictype/pr_quotation_mark.h: Likewise.
127880         * lib/unictype/pr_radical.h: Likewise.
127881         * lib/unictype/pr_sentence_terminal.h: Likewise.
127882         * lib/unictype/pr_soft_dotted.h: Likewise.
127883         * lib/unictype/pr_space.h: Likewise.
127884         * lib/unictype/pr_terminal_punctuation.h: Likewise.
127885         * lib/unictype/pr_titlecase.h: Likewise.
127886         * lib/unictype/pr_unassigned_code_value.h: Likewise.
127887         * lib/unictype/pr_unified_ideograph.h: Likewise.
127888         * lib/unictype/pr_uppercase.h: Likewise.
127889         * lib/unictype/pr_variation_selector.h: Likewise.
127890         * lib/unictype/pr_white_space.h: Likewise.
127891         * lib/unictype/pr_xid_continue.h: Likewise.
127892         * lib/unictype/pr_xid_start.h: Likewise.
127893         * lib/unictype/pr_zero_width.h: Likewise.
127894         * lib/unictype/scripts.h: Likewise.
127895         * lib/unictype/scripts_byname.gperf: Likewise.
127896         * lib/unictype/sy_c_ident.h: Likewise.
127897         * lib/unictype/sy_c_whitespace.h: Likewise.
127898         * lib/unictype/sy_java_ident.h: Likewise.
127899         * lib/unictype/sy_java_whitespace.h: Likewise.
127901         * lib/unictype/Makefile: New file.
127902         * lib/unictype/gen-ctype.c: New file, based on gen-unicode-ctype.c in
127903         glibc.
127904         * lib/unictype/3level.h: New file, copied from glibc.
127905         * lib/unictype/3levelbit.h: New file.
127907 2007-11-11  Bruno Haible  <bruno@clisp.org>
127909         * modules/gperf: New file.
127910         * modules/iconv_open (Depends-on): Add it.
127911         (Makefile.am): Remove the GPERF definition.
127913 2007-11-11  Bruno Haible  <bruno@clisp.org>
127915         * m4/round.m4 (gl_FUNC_ROUND): Test against NetBSD 3.0 bug.
127916         * doc/functions/round.texi: Mention the NetBSD 3.0 bug.
127918 2007-11-11  Bruno Haible  <bruno@clisp.org>
127920         * tests/test-argmatch.c (ARGMATCH_DIE): Undefine.
127921         (usage): Remove function.
127923 2007-11-11  Bruno Haible  <bruno@clisp.org>
127925         * m4/roundf.m4 (gl_FUNC_ROUNDF): Use gl_FUNC_FLOORF_LIBS and
127926         gl_FUNC_CEILF_LIBS.
127927         * m4/round.m4 (gl_FUNC_ROUND): Use gl_FUNC_FLOOR_LIBS and
127928         gl_FUNC_CEIL_LIBS.
127929         * m4/roundl.m4 (gl_FUNC_ROUNDL): Use gl_FUNC_FLOORL_LIBS and
127930         gl_FUNC_CEILL_LIBS.
127931         * modules/roundf (Files): Add m4/floorf.m4, m4/ceilf.m4.
127932         * modules/round (Files): Add m4/floor.m4, m4/ceil.m4.
127933         * modules/roundl (Files): Add m4/floorl.m4, m4/ceill.m4.
127935 2007-11-11  Bruno Haible  <bruno@clisp.org>
127937         * m4/roundf.m4 (gl_FUNC_ROUNDF): Handle the case that floorf and
127938         roundf were declared but do not exist on functions.
127939         * m4/roundl.m4 (gl_FUNC_ROUNDL): Handle the case that floorl and
127940         roundl were declared but do not exist on functions.
127941         * lib/round.c (HAVE_FLOOR_AND_CEIL): Use HAVE_FLOORF_AND_CEILF and
127942         HAVE_FLOORL_AND_CEILL, respectively.
127943         Needed for Sun C on Solaris 10.
127945 2007-11-11  Bruno Haible  <bruno@clisp.org>
127947         * m4/roundf.m4 (gl_FUNC_ROUNDF): Set REPLACE_ROUNDF instead of
127948         HAVE_DECL_ROUNDF. Remove redundant AC_SUBST.
127949         * m4/round.m4 (gl_FUNC_ROUND): Set REPLACE_ROUND instead of
127950         HAVE_DECL_ROUND. Remove redundant AC_SUBST.
127951         * m4/roundl.m4 (gl_FUNC_ROUNDL): Set REPLACE_ROUNDL instead of
127952         HAVE_DECL_ROUNDL. Remove redundant AC_SUBST.
127953         * lib/math.in.h (roundf): Use REPLACE_ROUNDF instead of
127954         HAVE_DECL_ROUNDF.
127955         (round): Use REPLACE_ROUND instead of HAVE_DECL_ROUND.
127956         (roundl): Use REPLACE_ROUNDL instead of HAVE_DECL_ROUNDL.
127957         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_ROUND* instead
127958         of HAVE_DECL_ROUND*.
127959         * modules/math (Makefile.am): Update.
127961 2007-11-10  Bruno Haible  <bruno@clisp.org>
127963         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Use same check for
127964         ptrdiff_t as m4/intl.m4.
127966 2007-11-10  Jim Meyering  <meyering@redhat.com>
127968         Avoid link failure for the argmatch test.
127969         * tests/test-argmatch.c (usage): Define function to avoid a link
127970         failure: argmatch_die requires a usage function.
127972 2007-11-09  Bruno Haible  <bruno@clisp.org>
127974         * doc/functions/snprintf.texi: Mention BeOS deficiency.
127975         * doc/functions/vsnprintf.texi: Likewise.
127976         * lib/vasnprintf.c (VASNPRINTF): Ensure that we never call snprintf
127977         with a size argument < 2.
127979 2007-11-09  Bruno Haible  <bruno@clisp.org>
127981         * lib/vasnprintf.c (VASNPRINTF): Increase reallocation of snprintf
127982         buffer. Fixes an inefficiency introduced on 2007-11-03.
127984 2007-11-09  Bruno Haible  <bruno@clisp.org>
127986         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8) [BeOS]: Make this test return
127987         none instead of tr_TR. Fixes a failure of test-c-strcasecmp.c.
127989 2007-11-08  Jim Meyering  <meyering@redhat.com>
127991         Change cache variable name prefix "jm_" to "gl_" everywhere.
127992         * m4/d-type.m4, m4/jm-winsz1.m4, m4/jm-winsz2.m4, m4/link-follow.m4:
127993         * m4/putenv.m4, m4/strtoimax.m4, m4/strtoumax.m4, m4/unlink-busy.m4:
127994         * m4/uptime.m4: s/gl_/jm_/
127996 2007-11-07  Bruno Haible  <bruno@clisp.org>
127998         Update to GNU gettext 0.17.
127999         * m4/intl.m4: Update to GNU gettext 0.17.
128000         * m4/po.m4: Likewise.
128001         * modules/gettext (Files): Remove m4/ulonglong.m4.
128002         (configure.ac): Require gettext infrastructure from version 0.17.
128004 2007-11-06  Bruno Haible  <bruno@clisp.org>
128006         * lib/fbufmode.c (fbufmode) [QNX]: Use numerical values for flags; the
128007         symbolic values are not defined in a public header.
128008         * lib/freadable.c (freadable) [QNX]: Likewise.
128009         * lib/freadahead.c (freadahead) [QNX]: Likewise.
128010         * lib/freading.c (freading) [QNX]: Likewise.
128011         * lib/fseterr.c (fseterr) [QNX]: Likewise.
128012         * lib/fwritable.c (fwritable) [QNX]: Likewise.
128013         * lib/fwriting.c (fwriting) [QNX]: Likewise.
128014         * lib/fpurge.c (fpurge) [QNX]: Likewise. Add a return statement.
128015         Reported by Alain Magloire.
128017         * m4/fpending.m4 (gl_FUNC_FPENDING): Add a variant for QNX.
128019 2007-11-05  Bruno Haible  <bruno@clisp.org>
128021         * lib/vasnprintf.c (VASNPRINTF): Expand the NEED_PRINTF_DIRECTIVE_A
128022         code when NEED_PRINTF_LONG_DOUBLE or NEED_PRINTF_DOUBLE is set.
128023         Needed on Cygwin, where !NEED_PRINTF_DIRECTIVE_A && NEED_PRINTF_DOUBLE.
128024         Reported by Eric Blake.
128026 2007-10-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
128027             Bruno Haible  <bruno@clisp.org>
128029         * modules/malloc (configure.ac): Define GNULIB_MALLOC_GNU always.
128030         * modules/realloc (configure.ac): Define GNULIB_REALLOC_GNU always.
128031         * lib/realloc.c (SYSTEM_MALLOC_GLIBC_COMPATIBLE): New macro.
128032         (malloc): Undefine also before including <stdlib.h>.
128033         (rpl_realloc): Turn malloc(0) into malloc(1) if necessary.
128034         Needed on OSF/1 4.0.
128036 2007-11-05  Jim Meyering  <meyering@redhat.com>
128038         git-version-gen: sync from coreutils.
128039         * build-aux/git-version-gen: Add comments.
128040         Change the first '-' to '.' in the snapshot version string,
128041         e.g., 6.9-377-08144 -> 6.9.377-08144
128042         Remove first parameter.
128043         Don't declare a version "-dirty" merely because a time
128044         stamp has changed.
128046 2007-11-04  Bruno Haible  <bruno@clisp.org>
128048         * lib/lock.h: Protect all macro definitions containing an 'if'
128049         statement through a "do { ... } while (0)".
128050         * lib/tls.h: Likewise.
128052 2007-11-04  Bruno Haible  <bruno@clisp.org>
128054         * lib/vasnprintf.c (DCHAR_IS_TCHAR, DCHAR_CPY): Undefine at the end.
128056 2007-11-04  Bruno Haible  <bruno@clisp.org>
128058         * m4/printf.m4 (gl_PRINTF_ENOMEM): Use GL_NOCRASH.
128059         * modules/fprintf-posix (Depends-on): Add nocrash.
128060         * modules/snprintf-posix (Depends-on): Likewise.
128061         * modules/sprintf-posix (Depends-on): Likewise.
128062         * modules/vasnprintf-posix (Depends-on): Likewise.
128063         * modules/vasprintf-posix (Depends-on): Likewise.
128064         * modules/vfprintf-posix (Depends-on): Likewise.
128065         * modules/vsnprintf-posix (Depends-on): Likewise.
128066         * modules/vsprintf-posix (Depends-on): Likewise.
128067         * modules/unistdio/u8-vasnprintf (Depends-on): Likewise.
128068         * modules/unistdio/u8-u8-vasnprintf (Depends-on): Likewise.
128069         * modules/unistdio/u16-vasnprintf (Depends-on): Likewise.
128070         * modules/unistdio/u16-u16-vasnprintf (Depends-on): Likewise.
128071         * modules/unistdio/u32-vasnprintf (Depends-on): Likewise.
128072         * modules/unistdio/u32-u32-vasnprintf (Depends-on): Likewise.
128073         * modules/unistdio/ulc-vasnprintf (Depends-on): Likewise.
128075 2007-11-04  Bruno Haible  <bruno@clisp.org>
128077         * modules/nocrash: New file.
128078         * m4/nocrash.m4: New file, taken from GNU clisp. Code taken from
128079         GNU libsigsegv, with permission of GNU libsigsegv's copyright holders.
128081 2007-11-04  Bruno Haible  <bruno@clisp.org>
128083         * tests/test-vasnprintf-posix.c (test_function): Add some tests of
128084         precision handling.
128085         * tests/test-vasprintf-posix.c (test_function): Likewise.
128086         * tests/test-snprintf-posix.h (test_function): Likewise.
128087         * tests/test-sprintf-posix.h (test_function): Likewise.
128089         Fix *printf behaviour for large precisions on mingw and BeOS.
128090         * m4/printf.m4 (gl_PRINTF_PRECISION): New macro.
128091         * lib/vasnprintf.c (VASNPRINTF): Handle NEED_PRINTF_UNBOUNDED_PRECISION.
128092         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_PRECISION): New macro.
128093         (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): Invoke it.
128094         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
128095         gl_PRINTF_PRECISION and test its result. Invoke
128096         gl_PREREQ_VASNPRINTF_PRECISION.
128097         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
128098         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
128099         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
128100         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
128101         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
128102         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
128103         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
128104         * doc/functions/fprintf.texi: Update.
128105         * doc/functions/printf.texi: Update.
128106         * doc/functions/snprintf.texi: Update.
128107         * doc/functions/sprintf.texi: Update.
128108         * doc/functions/vfprintf.texi: Update.
128109         * doc/functions/vprintf.texi: Update.
128110         * doc/functions/vsnprintf.texi: Update.
128111         * doc/functions/vsprintf.texi: Update.
128113 2007-11-04  Bruno Haible  <bruno@clisp.org>
128115         * lib/vasnprintf.c (scale10_round_decimal_decoded): Fix shift loop.
128117 2007-11-04  Bruno Haible  <bruno@clisp.org>
128119         * modules/relocatable-prog (Files): Add m4/lib-ld.m4.
128120         Reported by Sylvain Beucler <beuc@gnu.org>.
128122 2007-11-03  Bruno Haible  <bruno@clisp.org>
128124         * tests/test-fprintf-posix2.sh: New file.
128125         * tests/test-fprintf-posix2.c: New file.
128126         * modules/fprintf-posix-tests (Files): Add them.
128127         (TESTS): Add test-fprintf-posix2.sh.
128128         (configure.ac): Check for getrlimit and setrlimit.
128129         (check_PROGRAMS): Add test-fprintf-posix2.
128131         * tests/test-printf-posix2.sh: New file.
128132         * tests/test-printf-posix2.c: New file.
128133         * modules/printf-posix-tests (Files): Add them.
128134         (TESTS): Add test-printf-posix2.sh.
128135         (configure.ac): Check for getrlimit and setrlimit.
128136         (check_PROGRAMS): Add test-printf-posix2.
128138         Fix *printf behaviour in out-of-memory situations on MacOS X and *BSD.
128139         * m4/printf.m4 (gl_PRINTF_ENOMEM): New macro.
128140         * lib/vasnprintf.c: Implement NEED_PRINTF_DOUBLE.
128141         (decode_double): New function, copied from decode_long_double.
128142         (scale10_round_decimal_decoded): New function, extracted from
128143         scale10_round_decimal_long_double.
128144         (scale10_round_decimal_long_double): Use it.
128145         (scale10_round_decimal_double): New function.
128146         (floorlog10): New function.
128147         (VASNPRINTF): Handle NEED_PRINTF_DOUBLE case.
128148         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_ENOMEM): New macro.
128149         (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): Invoke it.
128150         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
128151         gl_PRINTF_ENOMEM and test its result. Invoke
128152         gl_PREREQ_VASNPRINTF_ENOMEM.
128153         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
128154         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
128155         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
128156         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
128157         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
128158         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
128159         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
128160         * modules/fprintf-posix (Depends-on): Add frexp-nolibm.
128161         * modules/snprintf-posix (Depends-on): Likewise.
128162         * modules/sprintf-posix (Depends-on): Likewise.
128163         * modules/vasnprintf-posix (Depends-on): Likewise.
128164         * modules/vasprintf-posix (Depends-on): Likewise.
128165         * modules/vfprintf-posix (Depends-on): Likewise.
128166         * modules/vsnprintf-posix (Depends-on): Likewise.
128167         * modules/vsprintf-posix (Depends-on): Likewise.
128168         * doc/functions/fprintf.texi: Update.
128169         * doc/functions/printf.texi: Update.
128170         * doc/functions/snprintf.texi: Update.
128171         * doc/functions/sprintf.texi: Update.
128172         * doc/functions/vfprintf.texi: Update.
128173         * doc/functions/vprintf.texi: Update.
128174         * doc/functions/vsnprintf.texi: Update.
128175         * doc/functions/vsprintf.texi: Update.
128177 2007-11-03  Bruno Haible  <bruno@clisp.org>
128179         * modules/frexp-nolibm-tests: New file.
128181         * modules/frexp-nolibm: New file.
128182         * m4/frexp.m4 (gl_FUNC_FREXP_NO_LIBM): New macro.
128184 2007-11-03  Bruno Haible  <bruno@clisp.org>
128186         * lib/vasnprintf.c (VASNPRINTF): Don't assume that snprintf's return
128187         value is C99 compliant.
128188         Needed for OSF/1 5.1.
128190 2007-11-03  Bruno Haible  <bruno@clisp.org>
128192         Fix out-of-memory handling of vasnprintf.
128193         * lib/printf-parse.c: Include <errno.h>.
128194         (PRINTF_PARSE): When failing, set errno to EINVAL or ENOMEM.
128195         * lib/vasnprintf.c (VASNPRINTF): When PRINTF_PARSE fails, assume errno
128196         is already set.
128198 2007-11-02  Eric Blake  <ebb9@byu.net>
128200         Fix tests on cygwin.
128201         * modules/xprintf-posix-tests (Makefile.am): Link against -lintl.
128203 2007-11-01  Bruno Haible  <bruno@clisp.org>
128205         * lib/stdlib.in.h (putenv): Remove the "not POSIX compliant everywhere"
128206         warning.
128207         * doc/functions/putenv.texi: Clarify that the 'putenv' module is not
128208         needed for POSIX compatibility.
128210 2007-11-01  Paul Eggert  <eggert@cs.ucla.edu>
128212         * m4/putenv.m4 (gl_FUNC_PUTENV): Also mention that we're checking
128213         for compatibility with GNU.
128215 2007-11-01  Bruno Haible  <bruno@clisp.org>
128217         * lib/putenv.c: Include <stdlib.h>. Remove rpl_putenv declaration.
128218         (putenv): Renamed from rpl_putenv. Change argument type from
128219         'const char *' to 'char *'.
128220         * m4/putenv.m4 (gl_FUNC_PUTENV): Require gl_STDLIB_H_DEFAULTS. Instead
128221         of defining putenv in config.h, just set REPLACE_PUTENV.
128222         * modules/putenv (Depends-on): Add stdlib.
128223         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
128224         (Include): Use <stdlib.h>.
128225         * lib/stdlib.in.h (putenv): New declaration.
128226         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_PUTENV and
128227         REPLACE_PUTENV.
128228         * modules/stdlib (Makefile.am): Substitute GNULIB_PUTENV and
128229         REPLACE_PUTENV.
128230         Needed for MacOS X 10.5.0.
128231         Reported by Peter O'Gorman <peter@pogma.com>.
128233 2007-11-01  Jim Meyering  <meyering@redhat.com>
128235         Treat an empty date string exactly like "0".
128236         * lib/getdate.y (get_date): Once any isspace or TZ= prefix is consumed,
128237         if the remaining date string (to be parsed) is empty, use "0".
128238         Reported by Mischa Molhoek and discussed in this thread:
128239         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/11726>.
128241 2007-10-31  Bruno Haible  <bruno@clisp.org>
128243         * m4/intmax_t.m4 (gl_AC_TYPE_INTMAX_T, gt_AC_TYPE_INTMAX_T): Use
128244         AC_TYPE_LONG_LONG_INT instead of gl_AC_TYPE_LONG_LONG.
128245         * m4/uintmax_t.m4 (gl_AC_TYPE_UINTMAX_T): Use
128246         AC_TYPE_UNSIGNED_LONG_LONG_INT instead of gl_AC_TYPE_UNSIGNED_LONG_LONG.
128247         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Remove macro.
128248         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG): Remove macro.
128250 2007-10-31  Bruno Haible  <bruno@clisp.org>
128252         * m4/longlong.m4 (_AC_TYPE_LONG_LONG_SNIPPET): New macro, extracted
128253         from AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT.
128254         (AC_TYPE_LONG_LONG_INT): Use it.
128255         (AC_TYPE_UNSIGNED_LONG_LONG_INT): Moved here from m4/ulonglong.m4. Use
128256         it as well.
128257         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Remove macro; moved
128258         to m4/longlong.m4.
128259         * modules/stdint (Files): Remove m4/ulonglong.m4.
128260         * modules/strtoull (Files): Use m4/longlong.m4 instead of
128261         m4/ulonglong.m4.
128262         * modules/strtoumax (Files): Likewise.
128264 2007-10-30  Bruno Haible  <bruno@clisp.org>
128266         * modules/xvasprintf-posix: New file.
128267         Suggested by Eric Blake.
128269 2007-10-30  Bruno Haible  <bruno@clisp.org>
128271         * modules/xprintf-posix-tests: New file.
128272         * tests/test-xprintf-posix.sh: New file.
128273         * tests/test-xprintf-posix.c: New file.
128274         * tests/test-xfprintf-posix.c: New file.
128276         * modules/xprintf-posix: New file.
128278 2007-10-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
128280         * modules/fbufmode-tests (MOSTLYCLEANFILES): Remove temp files.
128281         * modules/freadable-tests (MOSTLYCLEANFILES): Likewise.
128282         * modules/fwritable-tests (MOSTLYCLEANFILES): Likewise.
128284 2007-10-29  Bruno Haible  <bruno@clisp.org>
128286         * m4/floorf.m4 (gl_FUNC_FLOORF_LIBS): Rename the cache variable to
128287         contain the special marker '_cv_'.
128288         * m4/floor.m4 (gl_FUNC_FLOOR_LIBS): Likewise.
128289         * m4/floorl.m4 (gl_FUNC_FLOORL_LIBS): Likewise.
128290         * m4/ceilf.m4 (gl_FUNC_CEILF_LIBS): Likewise.
128291         * m4/ceil.m4 (gl_FUNC_CEIL_LIBS): Likewise.
128292         * m4/ceill.m4 (gl_FUNC_CEILL_LIBS): Likewise.
128293         Reported by Ralf Wildenhues.
128295 2007-10-29  Bruno Haible  <bruno@clisp.org>
128297         * gnulib-tool (func_import): When --lgpl is not specified, set
128298         sed_transform_lib_file to convert LGPL and GPLv2+ copyright headers to
128299         GPLv3.
128300         Reported by Simon Josefsson.
128302 2007-10-28  Bruno Haible  <bruno@clisp.org>
128304         * lib/math.in.h: Test REPLACE_ISFINITE instead of HAVE_DECL_ISFINITE.
128305         * m4/isfinite.m4 (gl_ISFINITE): Initialize REPLACE_ISFINITE instead of
128306         HAVE_DECL_ISFINITE.
128307         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Update.
128308         * modules/math (Makefile.am): Substitute REPLACE_ISFINITE instead of
128309         HAVE_DECL_ISFINITE.
128311 2007-10-28  Bruno Haible  <bruno@clisp.org>
128313         * lib/stdint.in.h (_STDINT_MAX): Subtract 1 from an unused signed
128314         integer shift in the signed case. Fixes warnings with OSF/1 5.1 cc.
128316 2007-10-28  Bruno Haible  <bruno@clisp.org>
128318         Fix link errors with Sun C 5.0 on Solaris 10.
128319         * m4/floorf.m4 (gl_FUNC_FLOORF): Consider also the case that the
128320         function is declared but not present in the compiler's libm.
128321         * m4/floorl.m4 (gl_FUNC_FLOORL): Likewise.
128322         * m4/ceilf.m4 (gl_FUNC_CEILF): Likewise.
128323         * m4/ceill.m4 (gl_FUNC_CEILL: Likewise.
128324         * lib/math.in.h: Test REPLACE_CEILF instead of HAVE_DECL_CEILF.
128325         Test REPLACE_CEILL instead of HAVE_DECL_CEILL.
128326         Test REPLACE_FLOORF instead of HAVE_DECL_FLOORF.
128327         Test REPLACE_FLOORL instead of HAVE_DECL_FLOORL.
128328         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Update.
128329         * modules/math (Makefile.am): Substitute REPLACE_CEILF instead of
128330         HAVE_DECL_CEILF, REPLACE_CEILL instead of HAVE_DECL_CEILL,
128331         REPLACE_FLOORF instead of HAVE_DECL_FLOORF, REPLACE_FLOORL instead of
128332         HAVE_DECL_FLOORL.
128334 2007-10-28  Bruno Haible  <bruno@clisp.org>
128336         * m4/floorl.m4 (gl_FUNC_FLOORL_LIBS): New macro, extracted from
128337         gl_FUNC_FLOORL. Cache the result.
128338         (gl_FUNC_FLOORL): Use it.
128339         * m4/ceill.m4 (gl_FUNC_CEILL_LIBS): New macro, extracted from
128340         gl_FUNC_CEILL. Cache the result.
128341         (gl_FUNC_CEILL): Use it.
128343         * m4/floor.m4 (gl_FUNC_FLOOR_LIBS): New macro, extracted from
128344         gl_FUNC_FLOOR. Cache the result.
128345         (gl_FUNC_FLOOR): Use it.
128346         * m4/ceil.m4 (gl_FUNC_CEIL_LIBS): New macro, extracted from
128347         gl_FUNC_CEIL. Cache the result.
128348         (gl_FUNC_CEIL): Use it.
128350         * m4/floorf.m4 (gl_FUNC_FLOORF_LIBS): New macro, extracted from
128351         gl_FUNC_FLOORF. Cache the result.
128352         (gl_FUNC_FLOORF): Use it.
128353         * m4/ceilf.m4 (gl_FUNC_CEILF_LIBS): New macro, extracted from
128354         gl_FUNC_CEILF. Cache the result.
128355         (gl_FUNC_CEILF): Use it.
128357 2007-10-28  Bruno Haible  <bruno@clisp.org>
128359         * gnulib-tool: Allow specifying the LGPL version number through
128360         --lgpl=2 or --lgpl=3.
128361         (func_usage): Document --lgpl with argument.
128362         Handle --lgpl=... arguments.
128363         (func_import): Recognize also gl_LGPL calls with an argument. When
128364         --lgpl=2 is used and the module's license is just LGPL, report an
128365         error. Set sed_transform_lib_file according to the lgpl variable. In
128366         the generated files, use --lgpl or gl_LGPL invocations with argument,
128367         if necessary.
128368         * doc/gnulib-intro.texi (Copyright): Explain how to get modules under
128369         an LGPv2+ license.
128370         * doc/gnulib-tool.texi (Modified imports): Update explanation of
128371         gl_LGPL macro.
128373 2007-10-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
128374             Bruno Haible  <bruno@clisp.org>
128376         * lib/unistr.h (u8_uctomb_aux): Declare also if !HAVE_INLINE.
128377         (u16_uctomb_aux): Likewise.
128378         * lib/unistr/u8-uctomb-aux.c (u8_uctomb_aux): Define also if
128379         !HAVE_INLINE.
128380         * lib/unistr/u16-uctomb-aux.c (u16_uctomb_aux): Likewise
128382 2007-10-28  Bruno Haible  <bruno@clisp.org>
128384         * modules/error: Add a notice recommending to change XGETTEXT_OPTIONS.
128385         Invoke AM_GETTEXT_OPTION if it exists.
128386         * modules/vasprintf: Likewise.
128387         * modules/verror: Likewise.
128388         * modules/xprintf: Likewise.
128389         * modules/xvasprintf: Likewise.
128391 2007-10-27  Ben Pfaff  <blp@gnu.org>
128393         * lib/math.in.h: Define isfinite macro and prototypes for
128394         gl_isfinitef, gl_isfinited, gl_isfinitel if we are providing
128395         implementations.
128396         * m4/math_h.m4: New substitutions for isfinite module.
128397         * lib/isfinite.c: New file.
128398         * m4/isfinite.m4: New file.
128399         * modules/math: Replace isfinite-related @VARS@ in math.in.h.
128400         * modules/isfinite: New file.
128401         * modules/isfinite-tests: New file.
128402         * tests/tests-isfinite.c: New file.
128403         * doc/functions/isfinite.texi: Mention isfinite module.
128404         * MODULES.html.sh: Mention new module.
128406 2007-10-27  Ben Pfaff  <blp@gnu.org>
128408         Ralf Wildenhues reported that Tru64 4.0D declares the round
128409         functions but does not have definitions.
128410         * m4/check-math-lib.m4 (gl_CHECK_MATH_LIB): If the target function
128411         cannot be found in any library, set the output variable to
128412         "missing" instead of "".
128413         * m4/round.m4: Also use our substitute if we cannot find round in
128414         any library, even if it is declared.
128415         * m4/roundf.m4: Likewise for roundf.
128416         * m4/roundl.m4: Likewise for roundl.
128417         * lib/math.in.h: Undefine roundf, round, roundl before defining
128418         their replacements, to allow for hypothetical systems where these
128419         may be defined as macros but not available in libraries.
128421 2007-10-27  Bruno Haible  <bruno@clisp.org>
128423         * doc/gnulib.texi: Invoke @firstparagraphindent.
128424         * doc/gnulib-tool.texi (Simple update): Mention possible incompatible
128425         changes in gnulib.
128426         (Source changes): New section.
128428 2007-10-26  Bruno Haible  <bruno@clisp.org>
128430         * m4/gnulib-common.m4 (AC_C_RESTRICT): New overriding definition,
128431         borrowed from autoconf.
128433 2007-10-26  Bruno Haible  <bruno@clisp.org>
128435         * lib/strerror.c (rpl_strerror): Return "Unknown error ..." also if
128436         strerror returned the empty string. Needed on HP-UX 11.00.
128438 2007-10-24  Micah Cowan  <micah@cowan.name>
128440         Remove vestiges of cvs-gnulib-checkout process.  Now we use git.
128441         * build-aux/bootstrap: Remove support for now-unnecessary option,
128442         --cvs-user, and envvars CVS_USER, CVS_RSH.
128444 2007-10-24  Jim Meyering  <meyering@redhat.com>
128446         Avoid diagnostics from sha1sum when there is no cached checksum.
128447         * build-aux/bootstrap (update_po_files): Skip the sha1sum check
128448         if the po.s1 file hasn't been created yet.
128450         * build-aux/bootstrap: Sync from coreutils:
128451         2007-10-24  Jim Meyering  <meyering@redhat.com>
128452         Get gnulib from the git repository, not from an obsolete cvs one.
128453         * build-aux/bootstrap: Suggestion from Micah Cowan.
128454         2007-10-04  Jim Meyering  <jim@meyering.net>
128455         * build-aux/bootstrap (slurp): Adapt to _.h -> .in.h name change.
128456         (update_po_files): Work also when there are no .po files in po/.
128458 2007-10-24  Paul Eggert  <eggert@cs.ucla.edu>
128460         * README: Append ".git" to git and cg examples.
128461         Problem reported by Benoit Sigoure.
128463 2007-10-23  Micah Cowan  <micah@cowan.name>
128465         * users.txt: Add wget.
128467 2007-10-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
128469         Fix linking of some unistdio tests on FreeBSD.
128470         * modules/unistdio/u16-vsnprintf-tests
128471         (test_u16_vsprintf1_LDADD): Add @LIBINTL@.
128472         * modules/unistdio/u16-vsprintf-tests
128473         (test_u16_vsnprintf1_LDADD): Likewise.
128474         * modules/unistdio/u32-vsnprintf-tests
128475         (test_u32_vsnprintf1_LDADD): Likewise.
128476         * modules/unistdio/u32-vsprintf-tests
128477         (test_u32_vsprintf1_LDADD): Likewise.
128478         * modules/unistdio/u8-vsnprintf-tests
128479         (test_u8_vsnprintf1_LDADD): Likewise.
128480         * modules/unistdio/u8-vsprintf-tests
128481         (test_u8_vsprintf1_LDADD): Likewise.
128482         * modules/unistdio/ulc-vsnprintf-tests
128483         (test_ulc_vsnprintf1_LDADD): Likewise.
128484         * modules/unistdio/ulc-vsprintf-tests
128485         (test_ulc_vsprintf1_LDADD): Likewise.
128487         Fix linking of some uniconv tests on FreeBSD.
128488         * modules/uniconv/u16-conv-from-enc-tests
128489         (test_u16_conv_from_enc_LDADD): Link $(LDADD) before @LIBICONV@.
128490         * modules/uniconv/u16-conv-to-enc-tests
128491         (test_u16_conv_to_enc_LDADD): Likewise.
128492         * modules/uniconv/u16-strconv-from-enc-tests
128493         (test_u16_strconv_from_enc_LDADD): Likewise.
128494         * modules/uniconv/u16-strconv-to-enc-tests
128495         (test_u16_strconv_to_enc_LDADD): Likewise.
128496         * modules/uniconv/u32-conv-from-enc-tests
128497         (test_u32_conv_from_enc_LDADD): Likewise.
128498         * modules/uniconv/u32-conv-to-enc-tests
128499         (test_u32_conv_to_enc_LDADD): Likewise.
128500         * modules/uniconv/u32-strconv-from-enc-tests
128501         (test_u32_strconv_from_enc_LDADD): Likewise.
128502         * modules/uniconv/u32-strconv-to-enc-tests
128503         (test_u32_strconv_to_enc_LDADD): Likewise.
128504         * modules/uniconv/u8-conv-from-enc-tests
128505         (test_u8_conv_from_enc_LDADD): Likewise.
128506         * modules/uniconv/u8-conv-to-enc-tests
128507         (test_u8_conv_to_enc_LDADD): Likewise.
128508         * modules/uniconv/u8-strconv-from-enc-tests
128509         (test_u8_strconv_from_enc_LDADD): Likewise.
128510         * modules/uniconv/u8-strconv-to-enc-tests
128511         (test_u8_strconv_to_enc_LDADD): Likewise.
128513 2007-10-22  Bruno Haible  <bruno@clisp.org>
128515         * lib/stdint.in.h: Add check that intmax_t and uintmax_t have the same
128516         size.
128518 2007-10-22  Eric Blake  <ebb9@byu.net>
128520         Tweak x*printf documentation.
128521         * lib/xprintf.c (xprintf, xvprintf, xfprintf, xvfprintf): Adjust
128522         variable name and comments.
128523         Suggested by Bruno Haible.
128525 2007-10-22  Bruno Haible  <bruno@clisp.org>
128527         * lib/acl.c (copy_acl): Fix file name in comment.
128529 2007-10-22  Paul Eggert  <eggert@cs.ucla.edu>
128531         Fix Tru64 problem with stdbool.h.
128532         * lib/stdbool.in.h (false, true):
128533         [! (defined __cplusplus || defined __BEOS__) && !defined __GNUC__]:
128534         Don't declare as an enum in this situation; it runs afoul of Tru64.
128535         Problem reported by Steven M. Schweda in
128536         <http://lists.gnu.org/r/bug-autoconf/2007-10/msg00019.html>.
128538 2007-10-22  Eric Blake  <ebb9@byu.net>
128540         Also wrap vf?printf.
128541         * lib/xprintf.h (xvprintf, xvfprintf): New declarations.
128542         * lib/xprintf.c (xprintf, xfprintf): Work for C89.
128543         (xvprintf, xvfprintf): New functions.
128545 2007-10-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
128547         * modules/fstrcmp-tests (test_fstrcmp_LDADD): New, add
128548         @LIBINTL@ for FreeBSD 6.2, $(LIBTHREAD) for AIX 4.3.3.
128550         * lib/uniconv/u16-conv-to-enc.c (U_MBLEN): Define.
128551         * lib/uniconv/u32-conv-to-enc.c (U_MBLEN): Likewise.
128553 2007-10-22  Paul Eggert  <eggert@cs.ucla.edu>
128555         * lib/acl.c (copy_acl): Adjust to IRIX 6.5.  Problem reported
128556         by Bruno Haible.
128558 2007-10-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
128560         * lib/getloadavg.c
128561         [defined (__osf__) && (defined (__alpha) || defined (__alpha__)]:
128562         Undef `sys' after including sys/table.h, for Tru64 4.0D.
128564         * tests/test-i-ring.c: Work for C89.
128566 2007-10-22  Bruno Haible  <bruno@clisp.org>
128568         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Use -1ull, not
128569         -1u, in preprocessor expression, so that we don't test for the bug
128570         in HP-UX 11.00 cpp.  Testing for this bug caused problems; see
128571         <http://lists.gnu.org/r/bug-gnulib/2007-10/msg00329.html>.
128573 2007-10-22  Eric Blake  <ebb9@byu.net>
128575         * tests/test-yesno.sh: Silence stderr during test.
128577 2007-10-22  Simon Josefsson  <simon@josefsson.org>
128579         * modules/crypto/gc-camellia: New file.
128581         * m4/gc-camellia.m4: New file.
128583         * lib/gc-libgcrypt.c (gc_cipher_open): Support Camellia.
128585         * lib/gc.h (enum Gc_cipher): Add GC_CAMELLIA128, GC_CAMELLIA256.
128587 2007-10-22  Simon Josefsson  <simon@josefsson.org>
128589         * build-aux/maint.mk (gzip_rsyncable): Don't fail if gzip sends
128590         --help to stdout.  Reported by sms@antinode.org (Steven
128591         M. Schweda).
128593 2007-10-22  Simon Josefsson  <simon@josefsson.org>
128595         * users.txt: Fix link to libksba.
128597 2007-10-21  Ben Pfaff  <blp@gnu.org>
128599         * modules/roundf-tests: Add dependency on floorf, ceilf to allow
128600         round.c roundf implementation that depends on floorf and ceilf to
128601         be tested unconditionally.
128603 2007-10-21  Ben Pfaff  <blp@gnu.org>
128605         * m4/check-libm-func.m4: Removed.
128606         * m4/check-math-lib.m4: New file.
128607         * m4/round.m4: Rewrite to use gl_CHECK_MATH_LIB.
128608         * m4/roundf.m4: Ditto, and fix lack of HAVE_DECL_ROUNDF
128609         definition and lack of AC_LIBOBJ([roundf]).
128610         * m4/roundl.m4: Ditto, and similarly for roundl.
128611         * modules/round: Reference new m4 file.
128612         * modules/roundf: Ditto.
128613         * modules/roundl: Ditto.
128614         * tests/test-round2.c (main): Use ROUND instead of round.
128615         Bug report from Bruno Haible.
128617 2007-10-21  Bruno Haible  <bruno@clisp.org>
128619         * lib/printf-parse.c: Don't assume <stdint.h> exists in IN_LIBASPRINTF
128620         context.
128622 2007-10-21  Bruno Haible  <bruno@clisp.org>
128624         * tests/test-wcwidth.c (main): Allow negative result for some control
128625         characters.
128627         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Check also the width of U+200B.
128628         Needed on OSF/1 5.1.
128630 2007-10-21  Bruno Haible  <bruno@clisp.org>
128632         * tests/test-floorf1.c: Include isnanf.h.
128633         (main): Use isnanf() instead of isnan().
128634         * tests/test-ceilf1.c: Include isnanf.h.
128635         (main): Use isnanf() instead of isnan().
128636         * tests/test-truncf1.c: Include isnanf.h.
128637         (main): Use isnanf() instead of isnan().
128638         * tests/test-roundf1.c: Include isnanf.h.
128639         (main): Use isnanf() instead of isnan().
128641 2007-10-21  Eric Blake  <ebb9@byu.net>
128643         * users.txt: Update URL for m4.
128645 2007-10-21  Bruno Haible  <bruno@clisp.org>
128647         * users.txt: Add clisp. Update URLs to Simon Josefsson's projects.
128649 2007-10-21  Bruno Haible  <bruno@clisp.org>
128651         * gnulib-tool (func_create_megatestdir): Determine the cvsdate from
128652         Git's management files if the CVS files are not present.
128654 2007-10-20  Bruno Haible  <bruno@clisp.org>
128656         * lib/count-one-bits.h (COUNT_ONE_BITS): Use the builtin also for
128657         gcc-3.4.x.
128659 2007-10-20  Ben Pfaff  <blp@gnu.org>
128661         * lib/math.in.h: Declare round, roundf, roundl if we are providing
128662         implementations.
128663         * m4/math_h.m4: New substitutions for round, roundf, roundl modules.
128664         * lib/round.c: New file.
128665         * lib/roundf.c: New file.
128666         * lib/roundl.c: New file.
128667         * m4/round.m4: New file.
128668         * m4/roundf.m4: New file.
128669         * m4/roundl.m4: New file.
128670         * m4/check-libm-func-m4: New file.
128671         * modules/math: Replace round, roundf, roundl related @VARS@ in
128672         math.in.h.
128673         * modules/round: New file.
128674         * modules/round-tests: New file.
128675         * modules/roundf: New file.
128676         * modules/roundf-tests: New file.
128677         * modules/roundl: New file.
128678         * modules/roundl-tests: New file.
128679         * tests/test-round1.c: New file.
128680         * tests/test-round2.c: New file.
128681         * tests/test-roundf1.c: New file.
128682         * tests/test-roundf2.c: New file.
128683         * tests/test-roundl.c: New file.
128684         * doc/functions/round.texi: Mention round module.
128685         * doc/functions/roundf.texi: Mention roundf module.
128686         * doc/functions/roundl.texi: Mention roundl module.
128687         * MODULES.html.sh: Mention new modules.
128688         Thanks to Bruno Haible for suggestions.
128690 2007-10-20  Jim Meyering  <meyering@redhat.com>
128692         * lib/xprintf.c: Include <config.h> unconditionally.
128694         Change xprintf's license to GPL.
128695         * modules/xprintf (License): s/LGPL/GPL/, since this module
128696         depends on modules (exit and exitfail) which are GPL.
128697         Suggestion from Bruno Haible.
128699         xprintf fixes.
128700         * lib/xprintf.c (xprintf, xfprintf): Use va_end.
128701         Use a clearer diagnostic.
128702         Patch from Bruno Haible.
128704 2007-10-20  Bruno Haible  <bruno@clisp.org>
128706         * lib/vasnprintf.c (VASNPRINTF): Don't report overflow if the available
128707         length is INT_MAX and sizeof (DCHAR_T) > sizeof (TCHAR_T).
128708         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
128710 2007-10-20  Bruno Haible  <bruno@clisp.org>
128712         * tests/test-floorf2.c (correct_result_p): Don't rely on excess
128713         precision in the comparison result > x - 1 or similar.
128714         * tests/test-ceilf2.c (correct_result_p): Likewise.
128715         * tests/test-truncf2.c (correct_result_p): Likewise.
128716         * tests/test-trunc2.c (correct_result_p): Likewise.
128717         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
128719 2007-10-20  Bruno Haible  <bruno@clisp.org>
128721         * modules/ceil: New file.
128722         * m4/ceil.m4: New file.
128723         * doc/functions/ceil.texi: Mention the 'ceil' module.
128725 2007-10-20  Bruno Haible  <bruno@clisp.org>
128727         * modules/floor: New file.
128728         * m4/floor.m4: New file.
128729         * doc/functions/floor.texi: Mention the 'floor' module.
128731 2007-10-20  Bruno Haible  <bruno@clisp.org>
128733         * modules/ceilf-tests (Depends-on): Add fprintf-posix. Needed for use
128734         of %a.
128735         * modules/floorf-tests (Depends-on): Likewise.
128736         * modules/truncf-tests (Depends-on): Likewise.
128737         * modules/trunc-tests (Depends-on): Likewise.
128738         Reported by Ben Pfaff.
128740 2007-10-19  Jim Meyering  <meyering@redhat.com>
128742         * lib/xprintf.c (xprintf, xfprintf): Test err < 0, not just "err".
128743         Don't bother testing specific errno values.  Just test ferror.
128745         New module: xprintf
128746         * modules/xprintf, lib/xprintf.c, lib/xprintf.h: New files.
128748 2007-10-19  Bruno Haible  <bruno@clisp.org>
128750         * modules/csharpexec (Makefile.am): Use @FOO@ syntax instead of $(FOO)
128751         syntax.
128752         * modules/javaexec (Makefile.am): Likewise.
128753         * modules/relocatable-prog (Makefile.am): Likewise.
128754         Suggested by Jim Meyering.
128756 2007-10-18  Bruno Haible  <bruno@clisp.org>
128758         * lib/vasnprintf.c (VASNPRINTF): Don't use %n on glibc >= 2.3 systems.
128759         Reported by Jim Meyering.
128761 2007-10-18  Eric Blake  <ebb9@byu.net>
128763         * modules/filenamecat-tests (Makefile.am): Link against -lintl.
128765 2007-10-18  Bruno Haible  <bruno@clisp.org>
128767         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_N, gl_SNPRINTF_DIRECTIVE_N): Put
128768         the format string into writable memory. Needed in Fortify conditions.
128770 2007-10-18  Colin Watson  <cjwatson@debian.org>  (tiny change)
128771             Bruno Haible  <bruno@clisp.org>
128773         * lib/trim.c: Include config.h unconditionally. Include trim.h always.
128774         Include ctype.h always. Include stdlib.h, not mbuiter.h, for MB_CUR_MAX.
128775         * modules/trim (Depends-on): Add mbchar.
128776         (configure.ac): Add gl_FUNC_MBRTOWC.
128777         (Makefile.am): Augment lib_SOURCES.
128779 2007-10-17  Paul Eggert  <eggert@cs.ucla.edu>
128781         Modify glob.c to use fstatat and dirfd, to simplify it.
128782         Suggested by Eric Blake.
128783         * lib/glob.c (__fxstatat64) [!_LIBC]: New macro.
128784         Don't include <stdbool.h>; not used.
128785         (link_exists2_p, glob_in_dir) [!_LIBC]: No longer a special case.
128786         (link_exists_p): Simplify implementation, since we can now assume
128787         dirfd and fstatat.
128788         * modules/glob (Depends-on): Add dirfd, openat.  Remove stdbool.
128790 2007-10-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
128792         * gnulib-tool (func_get_dependencies): Fix sed script to
128793         match only tests.
128795 2007-10-17  Bruno Haible  <bruno@clisp.org>
128797         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): On Cygwin, don't
128798         allow locale names without encoding suffix.
128799         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise.
128800         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
128802 2007-10-16  Bruno Haible  <bruno@clisp.org>
128804         * lib/getcwd.c (__getcwd): Define with explicit rpl_ prefix.
128805         * lib/getgroups.c (getgroups): Likewise.
128806         * lib/gettimeofday.c (localtime, gmtime, tzset): Likewise.
128808 2007-10-16  Bruno Haible  <bruno@clisp.org>
128810         * modules/absolute-header (License): Change from LGPL to LGPLv2+.
128811         * modules/malloc-posix (License): Likewise.
128812         * modules/realloc-posix (License): Likewise.
128813         * modules/calloc-posix (License): Likewise.
128814         * modules/intprops (License): Change from GPL to LGPL, with
128815         Paul Eggert's approval.
128817 2007-10-16  Paul Eggert  <eggert@cs.ucla.edu>
128819         Merge glibc changes into lib/glob.c.
128821         * lib/glob.c (glob_in_dir): Sync with glibc/posix/glob.c, dated
128822         2007-10-15 04:59:03 UTC.  Here are the changes:
128824         2007-10-14  Ulrich Drepper  <drepper@redhat.com>
128826         * lib/glob.c: Reimplement link_exists_p to use fstatat64.
128828         * lib/glob.c: Add some branch prediction throughout.
128830         2007-10-07  Ulrich Drepper  <drepper@redhat.com>
128832         [BZ #5103]
128833         * lib/glob.c (glob): Recognize patterns starting \/.
128835         2007-02-14  Jakub Jelinek  <jakub@redhat.com>
128837         [BZ #3996]
128838         * lib/glob.c (attribute_hidden): Define if not defined.
128839         (glob): Unescape dirname, filename or username when needed and not
128840         GLOB_NOESCAPE.  Handle \/ correctly.  Handle GLOB_MARK if filename
128841         is NULL.  Handle unescaped [ in pattern without closing ].
128842         Don't pass GLOB_CHECK down to recursive glob for directories.
128843         (__glob_pattern_type): New function.
128844         (__glob_pattern_p): Implement using __glob_pattern_type.
128845         (glob_in_dir): Handle GLOB_NOCHECK patterns containing no meta
128846         characters and backslashes if not GLOB_NOESCAPE or unterminated [.
128847         Remove unreachable code.
128849         2006-09-30  Ulrich Drepper  <drepper@redhat.com>
128851         * lib/glob.c (glob_in_dir): Add some comments and asserts to
128852         explain why there are no leaks.
128854         2006-09-25  Jakub Jelinek  <jakub@redhat.com>
128856         [BZ #3253]
128857         * lib/glob.c (glob_in_dir): Don't alloca one struct globlink at a
128858         time, rather allocate increasingly bigger arrays of pointers, if
128859         possible with alloca, if too large with malloc.
128861 2007-10-16  Paul Eggert  <eggert@cs.ucla.edu>
128863         Check for 64-bit int errors in HP-UX 10.20 preprocessor.
128864         Problem reported by H.Merijn Brand in
128865         <http://lists.gnu.org/r/bug-tar/2007-10/msg00018.html>.
128866         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Check preprocessor too.
128867         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
128869 2007-10-15  Bruno Haible  <bruno@clisp.org>
128871         * lib/fchdir.c (close, open, closedir, opendir, dup, dup2): Define
128872         with explicit rpl_ prefix.
128873         * lib/fopen.c (fopen): Likewise.
128874         * lib/freopen.c (freopen): Likewise.
128875         * lib/iconv.c (iconv): Likewise.
128876         * lib/iconv_close.c (iconv_close): Likewise.
128878 2007-10-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
128880         * m4/iconv_open (gl_FUNC_ICONV_OPEN_UTF): Fix cache variable name.
128882 2007-10-15  Bruno Haible  <bruno@clisp.org>
128884         * m4/getaddrinfo.m4 (gl_GETADDRINFO, gl_PREREQ_GETADDRINFO): Use
128885         <stddef.h> instead of <stdlib.h> since we only need NULL.
128886         Reported by Ben Pfaff <blp@cs.stanford.edu>.
128888 2007-10-15  Bruno Haible  <bruno@clisp.org>
128890         * doc/gnulib-tool.texi (Initial import): Swap order of -I directives.
128891         Replace paragraph talking about LIBOBJS.
128892         Reported by Colin Watson <cjwatson@debian.org>.
128894 2007-10-15  Bruno Haible  <bruno@clisp.org>
128896         * m4/getaddrinfo.m4 (gl_GETADDRINFO, gl_PREREQ_GETADDRINFO): Include
128897         <stdlib.h> before using NULL.
128899 2007-10-15  Simon Josefsson  <simon@josefsson.org>
128901         * m4/getaddrinfo.m4: Use NULL rather than 0 for pointers.
128902         Reported by Albert Chin <china@thewrittenword.com>.
128904 2007-10-14  Bruno Haible  <bruno@clisp.org>
128906         * modules/iconv_open-utf-tests: New file.
128907         * tests/test-iconv-utf.c: New file.
128909         Enhance iconv_open to support UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE.
128910         * modules/iconv_open-utf: New file.
128911         * lib/iconv.in.h (_ICONV_UTF8_UTF*, _ICONV_UTF*_UTF8): New macros.
128912         (iconv, iconv_close): New declarations.
128913         * lib/iconv_open.c: Include c-strcase.h. Don't require ICONV_FLAVOR to
128914         be defined.
128915         (iconv_open): Add special handling of conversion between UTF-8 and
128916         UTF-{16,32}{BE,LE}.
128917         * lib/iconv.c: New file, incorporating code from GNU libiconv 1.11.
128918         * lib/iconv_close.c: New file.
128919         * m4/iconv_open.m4 (gl_REPLACE_ICONV_OPEN): New macro, extracted from
128920         gl_FUNC_ICONV_OPEN.
128921         (gl_FUNC_ICONV_OPEN): Use it.
128922         (gl_FUNC_ICONV_OPEN_UTF): New macro.
128923         * m4/iconv_h.m4 (gl_ICONV_H_DEFAULTS): Initialize also REPLACE_ICONV
128924         and REPLACE_ICONV_UTF.
128925         * modules/iconv_open (Depends-on): Add c-strcase.
128926         (Makefile.am): Substitute also REPLACE_ICONV, REPLACE_ICONV_UTF,
128927         ICONV_CONST.
128928         * doc/functions/iconv_open.texi: Mention the iconv_open-utf module.
128930 2007-10-13  Albert Chin  <china@thewrittenword.com>
128931             Bruno Haible  <bruno@clisp.org>
128933         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Perform the test for getaddrinfo
128934         through a link check that includes <netdb.h>. Needed for OSF/1 5.1.
128936 2007-10-13  Bruno Haible  <bruno@clisp.org>
128938         * lib/argp-fmtstream.h (ARGP_FS_EI): If __GNUC_STDC_INLINE__ is
128939         defined, use the ISO C99 inline semantics.
128940         * lib/argp.h (ARGP_EI): Likewise.
128942 2007-10-13  Bruno Haible  <bruno@clisp.org>
128944         Handle 'inline' change in gcc 4.3.0.
128945         * lib/argp-fmtstream.h (argp_fmtstream_putc, argp_fmtstream_puts,
128946         argp_fmtstream_write, argp_fmtstream_set_lmargin,
128947         argp_fmtstream_set_rmargin, argp_fmtstream_set_wmargin,
128948         argp_fmtstream_point): Disable 'extern' declaration if the function
128949         definition is going to be provided inline.
128950         (ARGP_FS_EI): If __GNUC_STDC_INLINE__ is defined, use the GNU C inline
128951         semantics, not the ISO C99 inline semantics.
128952         * lib/argp.h (argp_usage, _option_is_short, _option_is_end): Disable
128953         'extern' declaration if the function definition is going to be provided
128954         inline.
128955         (ARGP_EI): Don't assume GNU C. If __GNUC_STDC_INLINE__ is defined, use
128956         the GNU C inline semantics, not the ISO C99 inline semantics. With
128957         GCC 4.2, avoid a warning.
128959 2007-10-13  Bruno Haible  <bruno@clisp.org>
128961         * lib/freading.h (freading): Enable the use of __freading for
128962         glibc >= 2.7.
128963         * lib/freading.c (freading): Likewise.
128965 2007-10-12  Paul Eggert  <eggert@cs.ucla.edu>
128967         * lib/argp-fmtstream.h (ARGP_FS_EI): Work around GCC 4.2.1 diagnostic
128968         "warning: C99 inline functions are not supported; using GNU89".
128970 2007-10-12  Bruno Haible  <bruno@clisp.org>
128972         * lib/ceil.c (FUNC): Avoid rounding errors for values near a power
128973         of 2.
128974         * tests/test-ceilf2.c: New file.
128975         * modules/ceilf-tests: (Files, Depends-on, Makefile.am): Add new test.
128977         * tests/test-ceilf1.c: Renamed from tests/test-ceilf.c.
128978         * modules/ceilf-tests: Update.
128980 2007-10-12  Bruno Haible  <bruno@clisp.org>
128982         * lib/floor.c (FUNC): Avoid rounding errors for values near a power
128983         of 2.
128984         * tests/test-floorf2.c: New file.
128985         * modules/floorf-tests: (Files, Depends-on, Makefile.am): Add new test.
128987         * tests/test-floorf1.c: Renamed from tests/test-floorf.c.
128988         * modules/floorf-tests: Update.
128990 2007-10-12  Bruno Haible  <bruno@clisp.org>
128992         * tests/test-trunc2.c: New file.
128993         * modules/trunc-tests: (Files, Depends-on, Makefile.am): Add new test.
128995         * tests/test-trunc1.c: Renamed from tests/test-trunc.c.
128996         * modules/trunc-tests: Update.
128998 2007-10-12  Bruno Haible  <bruno@clisp.org>
129000         * lib/trunc.c (FUNC): Avoid rounding errors for values near a power
129001         of 2.
129002         * tests/test-truncf2.c: New file.
129003         * modules/truncf-tests: (Files, Depends-on, Makefile.am): Add new test.
129005         * tests/test-truncf1.c: Renamed from tests/test-truncf.c.
129006         * modules/truncf-tests: Update.
129008 2007-10-11  Eric Blake  <ebb9@byu.net>
129010         Don't claim strerror is broken on Interix.
129011         * doc/functions/strerror.texi (strerror): Known broken systems are
129012         now Solaris 8, and not Interix.
129013         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): No longer filter out
129014         Interix on cross-compile.
129015         Reported by Martin Koeppe in
129016         http://lists.gnu.org/r/bug-gnulib/2007-10/msg00005.html.
129018 2007-10-11  Bruno Haible  <bruno@clisp.org>
129020         * modules/i-ring-tests: New file.
129021         * tests/test-i-ring.c: Renamed from lib/i-ring-test.c. Use ASSERT
129022         instead of assert.
129024 2007-10-11  Bruno Haible  <bruno@clisp.org>
129026         * modules/filenamecat-tests: New file.
129027         * tests/test-filenamecat.c: New file, extracted from lib/filenamecat.c.
129028         * lib/filenamecat.c: Remove test code.
129030 2007-10-11  Paul Eggert  <eggert@cs.ucla.edu>
129032         Simplify and modernize strerror substitute, partly to fix Solaris 8 bug.
129034         * lib/strerror.c: Include <string.h> always, to test interface,
129035         and to remove the need for the dummy.
129036         Include intprops.h to compute width instead of doing it ourselves
129037         and missing a CHAR_BIT declaration, which broke tar 1.19 on Solaris 8.
129038         (strerror): Define it to return NULL if there's no system strerror.
129039         (rpl_strerror): Use INT_STRLEN_BOUND to compute bound.
129040         Omit !HAVE_STRERROR code.  We don't need to worry about supporting
129041         ancient pre-strerror Unix systems well any more.  Saying "unknown
129042         system error" is enough.
129043         * lib/string.in.h (strerror): Simplify the ifdef to reflect the
129044         simpler strerror.c implementation.
129045         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE, gl_PREREQ_STDERROR):
129046         Simplify the tests to reflect the simpler strerror implementation.
129047         * modules/strerror (Depends-on): Add intprops.
129049 2007-10-09  Eric Blake  <ebb9@byu.net>
129051         Silence test-fpending.
129052         * modules/fpending-tests (Files): Add wrapper script.
129053         * tests/test-fpending.sh: New file.
129055 2007-10-09  Bruno Haible  <bruno@clisp.org>
129057         * MODULES.html.sh (func_module): Don't create a hyperlink for
129058         function names like 'printf_frexp'.
129059         (Misc): Add crc, memxor.
129060         (Characteristics of floating types): New section.
129061         (Mathematics): Add ceilf, ceill, floorf, floorl, frexpl-nolibm,
129062         isnanf-nolibm, signbit, trunc, truncf, truncl.
129063         (Enhancements for ISO C 99 functions): New subsection Input/output.
129064         (Support for systems lacking POSIX:2001): Add arpa_inet, calloc-posix,
129065         fcntl, fopen, freopen, fseek, fseeko, ftell, ftello, iconv_open,
129066         locale, malloc-posix, netinet_in, open, realloc-posix, signal, sleep.
129067         (Compatibility checks for POSIX:2001 functions): Add clock-time.
129068         (Enhancements for POSIX:2001 functions): Add chdir-long.
129069         (File system functions): Add areadlink, chdir-safer, read-file.
129070         Remove cycle-check.
129071         (File system as inode set): New section.
129072         (Date and time): Add gethrxtime.
129073         (Multithreading): Add openmp.
129074         (Internationalization functions): Add localename.
129075         (Unicode string functions): Add unistr/u*-mbsnlen.
129076         (Support for maintaining and releasing projects): Add git-version-gen.
129077         (Lone files): Remove directories.
129079 2007-10-08  Ben Pfaff  <blp@gnu.org>
129081         * lib/xmalloca.h: Fix typo in comment.
129083 2007-10-08  Paul Eggert  <eggert@cs.ucla.edu>
129085         * lib/xnanosleep.c (xnanosleep): Don't assume GCC 4.3.0 behavior
129086         when avoiding problems with integer overflow.  Use a portable test
129087         instead.
129089 2007-10-08  Simon Josefsson  <simon@josefsson.org>
129091         * modules/dummy (License): Change to LGPLv2+.
129092         * modules/float (License): Likewise
129093         * modules/realloc (License): Likewise
129094         * modules/stdlib (License): Likewise
129096 2007-10-07  Bruno Haible  <bruno@clisp.org>
129098         * trunc.c (TWO_MANT_DIG): Change type to DOUBLE.
129099         * floor.c (TWO_MANT_DIG): Likewise.
129100         * ceil.c (TWO_MANT_DIG): Likewise.
129101         Reported by Ben Pfaff.
129103 2007-10-07  Bruno Haible  <bruno@clisp.org>
129105         Avoid gcc warnings "declaration of 'exp' shadows a global declaration".
129106         * lib/math.in.h (frexp, frexpl): Change parameter name to 'expptr'.
129107         * lib/frexp.c (FUNC): Likewise.
129108         * lib/printf-frexp.h (printf_frexp): Likewise.
129109         * lib/printf-frexpl.h (printf_frexpl): Likewise.
129110         * lib/printf-frexp.c (FUNC): Likewise.
129111         Suggested by Jim Meyering.
129113 2007-10-07  Jim Meyering  <meyering@redhat.com>
129115         Make xnanosleep's integer overflow test more robust.
129116         * lib/xnanosleep.c (xnanosleep): Declare a temporary to be "volatile",
129117         so that gcc-4.3.0 doesn't optimize away this test for overflow.
129119 2007-10-07  Bruno Haible  <bruno@clisp.org>
129121         * NEWS: Mention the license change.
129123         * doc/gnulib-intro.texi (Copyright): Update the meaning of the license
129124         abbreviations in the modules files.
129126         Change copyright notice from GPLv2+ to GPLv3+.
129127         * README: Change copyright notice.
129128         * MODULES.html.sh: Likewise.
129129         * build-aux/bootstrap.conf: Likewise.
129130         * build-aux/config.libpath: Likewise.
129131         * build-aux/csharpcomp.sh.in: Likewise.
129132         * build-aux/csharpexec.sh.in: Likewise.
129133         * build-aux/install-reloc: Likewise.
129134         * build-aux/javacomp.sh.in: Likewise.
129135         * build-aux/javaexec.sh.in: Likewise.
129136         * build-aux/ldd.sh.in: Likewise.
129137         * build-aux/reloc-ldflags: Likewise.
129138         * build-aux/relocatable.sh.in: Likewise.
129139         * build-aux/x-to-1.in: Likewise.
129140         * check-module: Likewise.
129141         * config/srclistvars.sh: Likewise.
129142         * gnulib-tool: Likewise.
129143         * lib/acl-internal.h: Likewise.
129144         * lib/acl.c: Likewise.
129145         * lib/acl.h: Likewise.
129146         * lib/acl_entries.c: Likewise.
129147         * lib/areadlink-with-size.c: Likewise.
129148         * lib/areadlink.c: Likewise.
129149         * lib/areadlink.h: Likewise.
129150         * lib/argmatch.c: Likewise.
129151         * lib/argmatch.h: Likewise.
129152         * lib/argp-ba.c: Likewise.
129153         * lib/argp-eexst.c: Likewise.
129154         * lib/argp-fmtstream.c: Likewise.
129155         * lib/argp-fmtstream.h: Likewise.
129156         * lib/argp-fs-xinl.c: Likewise.
129157         * lib/argp-help.c: Likewise.
129158         * lib/argp-namefrob.h: Likewise.
129159         * lib/argp-parse.c: Likewise.
129160         * lib/argp-pin.c: Likewise.
129161         * lib/argp-pv.c: Likewise.
129162         * lib/argp-pvh.c: Likewise.
129163         * lib/argp-xinl.c: Likewise.
129164         * lib/argp.h: Likewise.
129165         * lib/at-func.c: Likewise.
129166         * lib/atanl.c: Likewise.
129167         * lib/backupfile.c: Likewise.
129168         * lib/backupfile.h: Likewise.
129169         * lib/basename.c: Likewise.
129170         * lib/binary-io.h: Likewise.
129171         * lib/byteswap.in.h: Likewise.
129172         * lib/c-stack.c: Likewise.
129173         * lib/c-stack.h: Likewise.
129174         * lib/c-strcasestr.c: Likewise.
129175         * lib/c-strcasestr.h: Likewise.
129176         * lib/c-strstr.c: Likewise.
129177         * lib/c-strstr.h: Likewise.
129178         * lib/c-strtod.c: Likewise.
129179         * lib/calloc.c: Likewise.
129180         * lib/canon-host.c: Likewise.
129181         * lib/canon-host.h: Likewise.
129182         * lib/canonicalize-lgpl.c: Likewise.
129183         * lib/canonicalize.c: Likewise.
129184         * lib/canonicalize.h: Likewise.
129185         * lib/ceil.c: Likewise.
129186         * lib/ceilf.c: Likewise.
129187         * lib/ceill.c: Likewise.
129188         * lib/chdir-long.c: Likewise.
129189         * lib/chdir-long.h: Likewise.
129190         * lib/chdir-safer.c: Likewise.
129191         * lib/chdir-safer.h: Likewise.
129192         * lib/chown.c: Likewise.
129193         * lib/classpath.c: Likewise.
129194         * lib/classpath.h: Likewise.
129195         * lib/clean-temp.c: Likewise.
129196         * lib/clean-temp.h: Likewise.
129197         * lib/cloexec.c: Likewise.
129198         * lib/close-stream.c: Likewise.
129199         * lib/closein.c: Likewise.
129200         * lib/closein.h: Likewise.
129201         * lib/closeout.c: Likewise.
129202         * lib/closeout.h: Likewise.
129203         * lib/concat-filename.c: Likewise.
129204         * lib/copy-file.c: Likewise.
129205         * lib/copy-file.h: Likewise.
129206         * lib/count-one-bits.h: Likewise.
129207         * lib/crc.c: Likewise.
129208         * lib/crc.h: Likewise.
129209         * lib/creat-safer.c: Likewise.
129210         * lib/csharpcomp.c: Likewise.
129211         * lib/csharpcomp.h: Likewise.
129212         * lib/csharpexec.c: Likewise.
129213         * lib/csharpexec.h: Likewise.
129214         * lib/cycle-check.c: Likewise.
129215         * lib/cycle-check.h: Likewise.
129216         * lib/diacrit.c: Likewise.
129217         * lib/diacrit.h: Likewise.
129218         * lib/diffseq.h: Likewise.
129219         * lib/dirchownmod.c: Likewise.
129220         * lib/dirent.in.h: Likewise.
129221         * lib/dirfd.c: Likewise.
129222         * lib/dirfd.h: Likewise.
129223         * lib/dirname.c: Likewise.
129224         * lib/dirname.h: Likewise.
129225         * lib/dummy.c: Likewise.
129226         * lib/dup-safer.c: Likewise.
129227         * lib/dup2.c: Likewise.
129228         * lib/eealloc.h: Likewise.
129229         * lib/error.c: Likewise.
129230         * lib/error.h: Likewise.
129231         * lib/euidaccess.c: Likewise.
129232         * lib/exclude.c: Likewise.
129233         * lib/exclude.h: Likewise.
129234         * lib/execute.c: Likewise.
129235         * lib/execute.h: Likewise.
129236         * lib/exitfail.c: Likewise.
129237         * lib/exitfail.h: Likewise.
129238         * lib/expl.c: Likewise.
129239         * lib/fatal-signal.c: Likewise.
129240         * lib/fatal-signal.h: Likewise.
129241         * lib/fbufmode.c: Likewise.
129242         * lib/fbufmode.h: Likewise.
129243         * lib/fchdir.c: Likewise.
129244         * lib/fchmodat.c: Likewise.
129245         * lib/fchownat.c: Likewise.
129246         * lib/fcntl--.h: Likewise.
129247         * lib/fcntl-safer.h: Likewise.
129248         * lib/fcntl.in.h: Likewise.
129249         * lib/fd-safer.c: Likewise.
129250         * lib/fflush.c: Likewise.
129251         * lib/file-has-acl.c: Likewise.
129252         * lib/file-set.c: Likewise.
129253         * lib/file-type.c: Likewise.
129254         * lib/file-type.h: Likewise.
129255         * lib/fileblocks.c: Likewise.
129256         * lib/filemode.c: Likewise.
129257         * lib/filemode.h: Likewise.
129258         * lib/filename.h: Likewise.
129259         * lib/filenamecat.c: Likewise.
129260         * lib/filenamecat.h: Likewise.
129261         * lib/findprog.c: Likewise.
129262         * lib/findprog.h: Likewise.
129263         * lib/float.in.h: Likewise.
129264         * lib/floor.c: Likewise.
129265         * lib/floorf.c: Likewise.
129266         * lib/floorl.c: Likewise.
129267         * lib/fopen-safer.c: Likewise.
129268         * lib/fopen.c: Likewise.
129269         * lib/fpending.c: Likewise.
129270         * lib/fpending.h: Likewise.
129271         * lib/fprintf.c: Likewise.
129272         * lib/fprintftime.h: Likewise.
129273         * lib/fpucw.h: Likewise.
129274         * lib/fpurge.c: Likewise.
129275         * lib/fpurge.h: Likewise.
129276         * lib/freadable.c: Likewise.
129277         * lib/freadable.h: Likewise.
129278         * lib/freadahead.c: Likewise.
129279         * lib/freadahead.h: Likewise.
129280         * lib/freading.c: Likewise.
129281         * lib/freading.h: Likewise.
129282         * lib/free.c: Likewise.
129283         * lib/freopen.c: Likewise.
129284         * lib/frexp.c: Likewise.
129285         * lib/frexpl.c: Likewise.
129286         * lib/fseek.c: Likewise.
129287         * lib/fseterr.c: Likewise.
129288         * lib/fseterr.h: Likewise.
129289         * lib/fstatat.c: Likewise.
129290         * lib/fstrcmp.c: Likewise.
129291         * lib/fstrcmp.h: Likewise.
129292         * lib/fsusage.c: Likewise.
129293         * lib/fsusage.h: Likewise.
129294         * lib/ftell.c: Likewise.
129295         * lib/ftello.c: Likewise.
129296         * lib/fts-cycle.c: Likewise.
129297         * lib/fts.c: Likewise.
129298         * lib/fts_.h: Likewise.
129299         * lib/full-read.c: Likewise.
129300         * lib/full-read.h: Likewise.
129301         * lib/full-write.c: Likewise.
129302         * lib/full-write.h: Likewise.
129303         * lib/fwritable.c: Likewise.
129304         * lib/fwritable.h: Likewise.
129305         * lib/fwriteerror.c: Likewise.
129306         * lib/fwriteerror.h: Likewise.
129307         * lib/fwriting.c: Likewise.
129308         * lib/fwriting.h: Likewise.
129309         * lib/gcd.c: Likewise.
129310         * lib/gcd.h: Likewise.
129311         * lib/getcwd.c: Likewise.
129312         * lib/getdate.h: Likewise.
129313         * lib/getdate.y: Likewise.
129314         * lib/getdomainname.c: Likewise.
129315         * lib/getdomainname.h: Likewise.
129316         * lib/getgroups.c: Likewise.
129317         * lib/gethostname.c: Likewise.
129318         * lib/gethrxtime.c: Likewise.
129319         * lib/gethrxtime.h: Likewise.
129320         * lib/getloadavg.c: Likewise.
129321         * lib/getndelim2.c: Likewise.
129322         * lib/getndelim2.h: Likewise.
129323         * lib/getnline.c: Likewise.
129324         * lib/getnline.h: Likewise.
129325         * lib/getopt.c: Likewise.
129326         * lib/getopt.in.h: Likewise.
129327         * lib/getopt1.c: Likewise.
129328         * lib/getopt_int.h: Likewise.
129329         * lib/getpagesize.h: Likewise.
129330         * lib/getsubopt.c: Likewise.
129331         * lib/gettime.c: Likewise.
129332         * lib/getugroups.c: Likewise.
129333         * lib/getugroups.h: Likewise.
129334         * lib/getusershell.c: Likewise.
129335         * lib/gl_anyavltree_list1.h: Likewise.
129336         * lib/gl_anyavltree_list2.h: Likewise.
129337         * lib/gl_anyhash_list1.h: Likewise.
129338         * lib/gl_anyhash_list2.h: Likewise.
129339         * lib/gl_anylinked_list1.h: Likewise.
129340         * lib/gl_anylinked_list2.h: Likewise.
129341         * lib/gl_anyrbtree_list1.h: Likewise.
129342         * lib/gl_anyrbtree_list2.h: Likewise.
129343         * lib/gl_anytree_list1.h: Likewise.
129344         * lib/gl_anytree_list2.h: Likewise.
129345         * lib/gl_anytree_oset.h: Likewise.
129346         * lib/gl_anytreehash_list1.h: Likewise.
129347         * lib/gl_anytreehash_list2.h: Likewise.
129348         * lib/gl_array_list.c: Likewise.
129349         * lib/gl_array_list.h: Likewise.
129350         * lib/gl_array_oset.c: Likewise.
129351         * lib/gl_array_oset.h: Likewise.
129352         * lib/gl_avltree_list.c: Likewise.
129353         * lib/gl_avltree_list.h: Likewise.
129354         * lib/gl_avltree_oset.c: Likewise.
129355         * lib/gl_avltree_oset.h: Likewise.
129356         * lib/gl_avltreehash_list.c: Likewise.
129357         * lib/gl_avltreehash_list.h: Likewise.
129358         * lib/gl_carray_list.c: Likewise.
129359         * lib/gl_carray_list.h: Likewise.
129360         * lib/gl_linked_list.c: Likewise.
129361         * lib/gl_linked_list.h: Likewise.
129362         * lib/gl_linkedhash_list.c: Likewise.
129363         * lib/gl_linkedhash_list.h: Likewise.
129364         * lib/gl_list.c: Likewise.
129365         * lib/gl_list.h: Likewise.
129366         * lib/gl_oset.c: Likewise.
129367         * lib/gl_oset.h: Likewise.
129368         * lib/gl_rbtree_list.c: Likewise.
129369         * lib/gl_rbtree_list.h: Likewise.
129370         * lib/gl_rbtree_oset.c: Likewise.
129371         * lib/gl_rbtree_oset.h: Likewise.
129372         * lib/gl_rbtreehash_list.c: Likewise.
129373         * lib/gl_rbtreehash_list.h: Likewise.
129374         * lib/gl_sublist.c: Likewise.
129375         * lib/gl_sublist.h: Likewise.
129376         * lib/group-member.c: Likewise.
129377         * lib/group-member.h: Likewise.
129378         * lib/hard-locale.c: Likewise.
129379         * lib/hard-locale.h: Likewise.
129380         * lib/hash-pjw.c: Likewise.
129381         * lib/hash-pjw.h: Likewise.
129382         * lib/hash-triple.c: Likewise.
129383         * lib/hash.c: Likewise.
129384         * lib/hash.h: Likewise.
129385         * lib/human.c: Likewise.
129386         * lib/human.h: Likewise.
129387         * lib/i-ring.c: Likewise.
129388         * lib/i-ring.h: Likewise.
129389         * lib/idcache.c: Likewise.
129390         * lib/imaxabs.c: Likewise.
129391         * lib/imaxdiv.c: Likewise.
129392         * lib/inet_pton.c: Likewise.
129393         * lib/inet_pton.h: Likewise.
129394         * lib/intprops.h: Likewise.
129395         * lib/inttostr.c: Likewise.
129396         * lib/inttostr.h: Likewise.
129397         * lib/inttypes.in.h: Likewise.
129398         * lib/isapipe.c: Likewise.
129399         * lib/isdir.c: Likewise.
129400         * lib/isnan.c: Likewise.
129401         * lib/isnan.h: Likewise.
129402         * lib/isnanf.c: Likewise.
129403         * lib/isnanf.h: Likewise.
129404         * lib/isnanl-nolibm.h: Likewise.
129405         * lib/isnanl.c: Likewise.
129406         * lib/isnanl.h: Likewise.
129407         * lib/javacomp.c: Likewise.
129408         * lib/javacomp.h: Likewise.
129409         * lib/javaexec.c: Likewise.
129410         * lib/javaexec.h: Likewise.
129411         * lib/javaversion.c: Likewise.
129412         * lib/javaversion.h: Likewise.
129413         * lib/javaversion.java: Likewise.
129414         * lib/lbrkprop.h: Likewise.
129415         * lib/lchmod.h: Likewise.
129416         * lib/lchown.c: Likewise.
129417         * lib/ldexpl.c: Likewise.
129418         * lib/linebreak.c: Likewise.
129419         * lib/linebreak.h: Likewise.
129420         * lib/linebuffer.c: Likewise.
129421         * lib/linebuffer.h: Likewise.
129422         * lib/locale.in.h: Likewise.
129423         * lib/logl.c: Likewise.
129424         * lib/long-options.c: Likewise.
129425         * lib/long-options.h: Likewise.
129426         * lib/lstat.c: Likewise.
129427         * lib/lstat.h: Likewise.
129428         * lib/math.in.h: Likewise.
129429         * lib/mbchar.c: Likewise.
129430         * lib/mbchar.h: Likewise.
129431         * lib/mbfile.h: Likewise.
129432         * lib/mbiter.h: Likewise.
129433         * lib/mbscasecmp.c: Likewise.
129434         * lib/mbscasestr.c: Likewise.
129435         * lib/mbschr.c: Likewise.
129436         * lib/mbscspn.c: Likewise.
129437         * lib/mbslen.c: Likewise.
129438         * lib/mbsncasecmp.c: Likewise.
129439         * lib/mbsnlen.c: Likewise.
129440         * lib/mbspbrk.c: Likewise.
129441         * lib/mbspcasecmp.c: Likewise.
129442         * lib/mbsrchr.c: Likewise.
129443         * lib/mbssep.c: Likewise.
129444         * lib/mbsspn.c: Likewise.
129445         * lib/mbsstr.c: Likewise.
129446         * lib/mbstok_r.c: Likewise.
129447         * lib/mbswidth.c: Likewise.
129448         * lib/mbswidth.h: Likewise.
129449         * lib/mbuiter.h: Likewise.
129450         * lib/memcasecmp.c: Likewise.
129451         * lib/memcasecmp.h: Likewise.
129452         * lib/memchr.c: Likewise.
129453         * lib/memcmp.c: Likewise.
129454         * lib/memcoll.c: Likewise.
129455         * lib/memcoll.h: Likewise.
129456         * lib/memcpy.c: Likewise.
129457         * lib/memrchr.c: Likewise.
129458         * lib/mkancesdirs.c: Likewise.
129459         * lib/mkdir-p.c: Likewise.
129460         * lib/mkdir-p.h: Likewise.
129461         * lib/mkdir.c: Likewise.
129462         * lib/mkdirat.c: Likewise.
129463         * lib/mkdtemp.c: Likewise.
129464         * lib/mkstemp-safer.c: Likewise.
129465         * lib/mkstemp.c: Likewise.
129466         * lib/modechange.c: Likewise.
129467         * lib/modechange.h: Likewise.
129468         * lib/mountlist.c: Likewise.
129469         * lib/mountlist.h: Likewise.
129470         * lib/mpsort.c: Likewise.
129471         * lib/nanosleep.c: Likewise.
129472         * lib/obstack.c: Likewise.
129473         * lib/obstack.h: Likewise.
129474         * lib/open-safer.c: Likewise.
129475         * lib/open.c: Likewise.
129476         * lib/openat-die.c: Likewise.
129477         * lib/openat-priv.h: Likewise.
129478         * lib/openat-proc.c: Likewise.
129479         * lib/openat.c: Likewise.
129480         * lib/openat.h: Likewise.
129481         * lib/pagealign_alloc.c: Likewise.
129482         * lib/pagealign_alloc.h: Likewise.
129483         * lib/physmem.c: Likewise.
129484         * lib/physmem.h: Likewise.
129485         * lib/pipe-safer.c: Likewise.
129486         * lib/pipe.c: Likewise.
129487         * lib/pipe.h: Likewise.
129488         * lib/posixtm.c: Likewise.
129489         * lib/posixtm.h: Likewise.
129490         * lib/posixver.c: Likewise.
129491         * lib/printf-frexp.c: Likewise.
129492         * lib/printf-frexp.h: Likewise.
129493         * lib/printf-frexpl.c: Likewise.
129494         * lib/printf-frexpl.h: Likewise.
129495         * lib/printf.c: Likewise.
129496         * lib/progname.c: Likewise.
129497         * lib/progname.h: Likewise.
129498         * lib/progreloc.c: Likewise.
129499         * lib/putenv.c: Likewise.
129500         * lib/quote.c: Likewise.
129501         * lib/quote.h: Likewise.
129502         * lib/quotearg.c: Likewise.
129503         * lib/quotearg.h: Likewise.
129504         * lib/raise.c: Likewise.
129505         * lib/readline.c: Likewise.
129506         * lib/readline.h: Likewise.
129507         * lib/readlink.c: Likewise.
129508         * lib/readtokens.c: Likewise.
129509         * lib/readtokens.h: Likewise.
129510         * lib/readtokens0.c: Likewise.
129511         * lib/readtokens0.h: Likewise.
129512         * lib/readutmp.c: Likewise.
129513         * lib/readutmp.h: Likewise.
129514         * lib/realloc.c: Likewise.
129515         * lib/relocwrapper.c: Likewise.
129516         * lib/rename-dest-slash.c: Likewise.
129517         * lib/rename.c: Likewise.
129518         * lib/rmdir.c: Likewise.
129519         * lib/rpmatch.c: Likewise.
129520         * lib/safe-read.c: Likewise.
129521         * lib/safe-read.h: Likewise.
129522         * lib/safe-write.c: Likewise.
129523         * lib/safe-write.h: Likewise.
129524         * lib/same-inode.h: Likewise.
129525         * lib/same.c: Likewise.
129526         * lib/same.h: Likewise.
129527         * lib/save-cwd.c: Likewise.
129528         * lib/save-cwd.h: Likewise.
129529         * lib/savedir.c: Likewise.
129530         * lib/savedir.h: Likewise.
129531         * lib/savewd.c: Likewise.
129532         * lib/savewd.h: Likewise.
129533         * lib/search.in.h: Likewise.
129534         * lib/setenv.c: Likewise.
129535         * lib/setenv.h: Likewise.
129536         * lib/settime.c: Likewise.
129537         * lib/sh-quote.c: Likewise.
129538         * lib/sh-quote.h: Likewise.
129539         * lib/sig2str.c: Likewise.
129540         * lib/sig2str.h: Likewise.
129541         * lib/signal.in.h: Likewise.
129542         * lib/signbitd.c: Likewise.
129543         * lib/signbitf.c: Likewise.
129544         * lib/signbitl.c: Likewise.
129545         * lib/sigprocmask.c: Likewise.
129546         * lib/sincosl.c: Likewise.
129547         * lib/sleep.c: Likewise.
129548         * lib/sprintf.c: Likewise.
129549         * lib/sqrtl.c: Likewise.
129550         * lib/stat-time.h: Likewise.
129551         * lib/stdio--.h: Likewise.
129552         * lib/stdio-safer.h: Likewise.
129553         * lib/stdlib--.h: Likewise.
129554         * lib/stdlib-safer.h: Likewise.
129555         * lib/stdlib.in.h: Likewise.
129556         * lib/stpcpy.c: Likewise.
129557         * lib/stpncpy.c: Likewise.
129558         * lib/strchrnul.c: Likewise.
129559         * lib/strcspn.c: Likewise.
129560         * lib/strerror.c: Likewise.
129561         * lib/strftime.c: Likewise.
129562         * lib/strftime.h: Likewise.
129563         * lib/striconveh.c: Likewise.
129564         * lib/striconveh.h: Likewise.
129565         * lib/striconveha.c: Likewise.
129566         * lib/striconveha.h: Likewise.
129567         * lib/stripslash.c: Likewise.
129568         * lib/strnlen1.c: Likewise.
129569         * lib/strnlen1.h: Likewise.
129570         * lib/strtod.c: Likewise.
129571         * lib/strtoimax.c: Likewise.
129572         * lib/strtok_r.c: Likewise.
129573         * lib/strtol.c: Likewise.
129574         * lib/strtoll.c: Likewise.
129575         * lib/strtoul.c: Likewise.
129576         * lib/strtoull.c: Likewise.
129577         * lib/sysexits.in.h: Likewise.
129578         * lib/tempname.c: Likewise.
129579         * lib/tempname.h: Likewise.
129580         * lib/timespec.h: Likewise.
129581         * lib/tls.c: Likewise.
129582         * lib/tls.h: Likewise.
129583         * lib/tmpdir.c: Likewise.
129584         * lib/tmpdir.h: Likewise.
129585         * lib/tmpfile-safer.c: Likewise.
129586         * lib/tmpfile.c: Likewise.
129587         * lib/trigl.c: Likewise.
129588         * lib/trigl.h: Likewise.
129589         * lib/trim.c: Likewise.
129590         * lib/trim.h: Likewise.
129591         * lib/trunc.c: Likewise.
129592         * lib/truncf.c: Likewise.
129593         * lib/truncl.c: Likewise.
129594         * lib/tsearch.c: Likewise.
129595         * lib/unicodeio.c: Likewise.
129596         * lib/unicodeio.h: Likewise.
129597         * lib/unistd--.h: Likewise.
129598         * lib/unistd-safer.h: Likewise.
129599         * lib/unistdio/ulc-fprintf.c: Likewise.
129600         * lib/unistdio/ulc-vfprintf.c: Likewise.
129601         * lib/unlinkdir.c: Likewise.
129602         * lib/unlinkdir.h: Likewise.
129603         * lib/unlocked-io.h: Likewise.
129604         * lib/unsetenv.c: Likewise.
129605         * lib/userspec.c: Likewise.
129606         * lib/utime.c: Likewise.
129607         * lib/utimecmp.c: Likewise.
129608         * lib/utimecmp.h: Likewise.
129609         * lib/utimens.c: Likewise.
129610         * lib/verify.h: Likewise.
129611         * lib/verror.c: Likewise.
129612         * lib/verror.h: Likewise.
129613         * lib/version-etc-fsf.c: Likewise.
129614         * lib/version-etc.c: Likewise.
129615         * lib/version-etc.h: Likewise.
129616         * lib/vfprintf.c: Likewise.
129617         * lib/vprintf.c: Likewise.
129618         * lib/vsprintf.c: Likewise.
129619         * lib/w32spawn.h: Likewise.
129620         * lib/wait-process.c: Likewise.
129621         * lib/wait-process.h: Likewise.
129622         * lib/wcwidth.c: Likewise.
129623         * lib/write-any-file.c: Likewise.
129624         * lib/xalloc-die.c: Likewise.
129625         * lib/xalloc.h: Likewise.
129626         * lib/xasprintf.c: Likewise.
129627         * lib/xgetcwd.c: Likewise.
129628         * lib/xgetcwd.h: Likewise.
129629         * lib/xgetdomainname.c: Likewise.
129630         * lib/xgetdomainname.h: Likewise.
129631         * lib/xgethostname.c: Likewise.
129632         * lib/xmalloc.c: Likewise.
129633         * lib/xmalloca.c: Likewise.
129634         * lib/xmalloca.h: Likewise.
129635         * lib/xmemcoll.c: Likewise.
129636         * lib/xnanosleep.c: Likewise.
129637         * lib/xreadlink.c: Likewise.
129638         * lib/xreadlink.h: Likewise.
129639         * lib/xsetenv.c: Likewise.
129640         * lib/xsetenv.h: Likewise.
129641         * lib/xstriconv.c: Likewise.
129642         * lib/xstriconv.h: Likewise.
129643         * lib/xstrndup.c: Likewise.
129644         * lib/xstrndup.h: Likewise.
129645         * lib/xstrtod.c: Likewise.
129646         * lib/xstrtod.h: Likewise.
129647         * lib/xstrtol-error.c: Likewise.
129648         * lib/xstrtol.c: Likewise.
129649         * lib/xstrtol.h: Likewise.
129650         * lib/xtime.h: Likewise.
129651         * lib/xvasprintf.c: Likewise.
129652         * lib/xvasprintf.h: Likewise.
129653         * lib/yesno.c: Likewise.
129654         * lib/yesno.h: Likewise.
129655         * posix-modules: Likewise.
129656         * tests/test-alloca-opt.c: Likewise.
129657         * tests/test-arcfour.c: Likewise.
129658         * tests/test-arctwo.c: Likewise.
129659         * tests/test-argmatch.c: Likewise.
129660         * tests/test-argp-2.sh: Likewise.
129661         * tests/test-argp.c: Likewise.
129662         * tests/test-arpa_inet.c: Likewise.
129663         * tests/test-array_list.c: Likewise.
129664         * tests/test-array_oset.c: Likewise.
129665         * tests/test-atexit.c: Likewise.
129666         * tests/test-avltree_list.c: Likewise.
129667         * tests/test-avltree_oset.c: Likewise.
129668         * tests/test-avltreehash_list.c: Likewise.
129669         * tests/test-base64.c: Likewise.
129670         * tests/test-binary-io.c: Likewise.
129671         * tests/test-byteswap.c: Likewise.
129672         * tests/test-c-ctype.c: Likewise.
129673         * tests/test-c-strcasecmp.c: Likewise.
129674         * tests/test-c-strcasestr.c: Likewise.
129675         * tests/test-c-strncasecmp.c: Likewise.
129676         * tests/test-c-strstr.c: Likewise.
129677         * tests/test-canonicalize-lgpl.c: Likewise.
129678         * tests/test-canonicalize.c: Likewise.
129679         * tests/test-carray_list.c: Likewise.
129680         * tests/test-ceilf.c: Likewise.
129681         * tests/test-ceill.c: Likewise.
129682         * tests/test-count-one-bits.c: Likewise.
129683         * tests/test-crc.c: Likewise.
129684         * tests/test-dirname.c: Likewise.
129685         * tests/test-fbufmode.c: Likewise.
129686         * tests/test-fcntl.c: Likewise.
129687         * tests/test-fflush.c: Likewise.
129688         * tests/test-floorf.c: Likewise.
129689         * tests/test-floorl.c: Likewise.
129690         * tests/test-fopen.c: Likewise.
129691         * tests/test-fprintf-posix.c: Likewise.
129692         * tests/test-fprintf-posix.h: Likewise.
129693         * tests/test-fpurge.c: Likewise.
129694         * tests/test-freadable.c: Likewise.
129695         * tests/test-freadahead.c: Likewise.
129696         * tests/test-freading.c: Likewise.
129697         * tests/test-freopen.c: Likewise.
129698         * tests/test-frexp.c: Likewise.
129699         * tests/test-frexpl.c: Likewise.
129700         * tests/test-fseek.c: Likewise.
129701         * tests/test-fseeko.c: Likewise.
129702         * tests/test-fseterr.c: Likewise.
129703         * tests/test-fstrcmp.c: Likewise.
129704         * tests/test-ftell.c: Likewise.
129705         * tests/test-ftello.c: Likewise.
129706         * tests/test-fwritable.c: Likewise.
129707         * tests/test-fwriting.c: Likewise.
129708         * tests/test-getaddrinfo.c: Likewise.
129709         * tests/test-getpass.c: Likewise.
129710         * tests/test-gettimeofday.c: Likewise.
129711         * tests/test-hmac-md5.c: Likewise.
129712         * tests/test-hmac-sha1.c: Likewise.
129713         * tests/test-iconv.c: Likewise.
129714         * tests/test-iconvme.c: Likewise.
129715         * tests/test-inttypes.c: Likewise.
129716         * tests/test-isnan.c: Likewise.
129717         * tests/test-isnanf.c: Likewise.
129718         * tests/test-isnanl-nolibm.c: Likewise.
129719         * tests/test-isnanl.c: Likewise.
129720         * tests/test-isnanl.h: Likewise.
129721         * tests/test-ldexpl.c: Likewise.
129722         * tests/test-linked_list.c: Likewise.
129723         * tests/test-linkedhash_list.c: Likewise.
129724         * tests/test-locale.c: Likewise.
129725         * tests/test-localename.c: Likewise.
129726         * tests/test-lock.c: Likewise.
129727         * tests/test-lseek.c: Likewise.
129728         * tests/test-malloca.c: Likewise.
129729         * tests/test-math.c: Likewise.
129730         * tests/test-mbscasecmp.c: Likewise.
129731         * tests/test-mbscasestr1.c: Likewise.
129732         * tests/test-mbscasestr2.c: Likewise.
129733         * tests/test-mbscasestr3.c: Likewise.
129734         * tests/test-mbscasestr4.c: Likewise.
129735         * tests/test-mbschr.c: Likewise.
129736         * tests/test-mbscspn.c: Likewise.
129737         * tests/test-mbsncasecmp.c: Likewise.
129738         * tests/test-mbspbrk.c: Likewise.
129739         * tests/test-mbspcasecmp.c: Likewise.
129740         * tests/test-mbsrchr.c: Likewise.
129741         * tests/test-mbsspn.c: Likewise.
129742         * tests/test-mbsstr1.c: Likewise.
129743         * tests/test-mbsstr2.c: Likewise.
129744         * tests/test-mbsstr3.c: Likewise.
129745         * tests/test-md5.c: Likewise.
129746         * tests/test-memmem.c: Likewise.
129747         * tests/test-netinet_in.c: Likewise.
129748         * tests/test-open.c: Likewise.
129749         * tests/test-printf-frexp.c: Likewise.
129750         * tests/test-printf-frexpl.c: Likewise.
129751         * tests/test-printf-posix.c: Likewise.
129752         * tests/test-printf-posix.h: Likewise.
129753         * tests/test-rbtree_list.c: Likewise.
129754         * tests/test-rbtree_oset.c: Likewise.
129755         * tests/test-rbtreehash_list.c: Likewise.
129756         * tests/test-read-file.c: Likewise.
129757         * tests/test-rijndael.c: Likewise.
129758         * tests/test-search.c: Likewise.
129759         * tests/test-signbit.c: Likewise.
129760         * tests/test-sleep.c: Likewise.
129761         * tests/test-snprintf-posix.c: Likewise.
129762         * tests/test-snprintf-posix.h: Likewise.
129763         * tests/test-snprintf.c: Likewise.
129764         * tests/test-sprintf-posix.c: Likewise.
129765         * tests/test-sprintf-posix.h: Likewise.
129766         * tests/test-stat-time.c: Likewise.
129767         * tests/test-stdbool.c: Likewise.
129768         * tests/test-stdint.c: Likewise.
129769         * tests/test-stdio.c: Likewise.
129770         * tests/test-stdlib.c: Likewise.
129771         * tests/test-stpncpy.c: Likewise.
129772         * tests/test-strcasestr.c: Likewise.
129773         * tests/test-striconv.c: Likewise.
129774         * tests/test-striconveh.c: Likewise.
129775         * tests/test-striconveha.c: Likewise.
129776         * tests/test-string.c: Likewise.
129777         * tests/test-sys_select.c: Likewise.
129778         * tests/test-sys_socket.c: Likewise.
129779         * tests/test-sys_stat.c: Likewise.
129780         * tests/test-sys_time.c: Likewise.
129781         * tests/test-sysexits.c: Likewise.
129782         * tests/test-time.c: Likewise.
129783         * tests/test-tls.c: Likewise.
129784         * tests/test-trunc.c: Likewise.
129785         * tests/test-truncf.c: Likewise.
129786         * tests/test-truncl.c: Likewise.
129787         * tests/test-unistd.c: Likewise.
129788         * tests/test-vasnprintf-posix.c: Likewise.
129789         * tests/test-vasnprintf-posix2.c: Likewise.
129790         * tests/test-vasnprintf.c: Likewise.
129791         * tests/test-vasprintf-posix.c: Likewise.
129792         * tests/test-vasprintf.c: Likewise.
129793         * tests/test-verify.c: Likewise.
129794         * tests/test-vfprintf-posix.c: Likewise.
129795         * tests/test-vprintf-posix.c: Likewise.
129796         * tests/test-vsnprintf-posix.c: Likewise.
129797         * tests/test-vsnprintf.c: Likewise.
129798         * tests/test-vsprintf-posix.c: Likewise.
129799         * tests/test-wchar.c: Likewise.
129800         * tests/test-wctype.c: Likewise.
129801         * tests/test-wcwidth.c: Likewise.
129802         * tests/test-xstrtol.c: Likewise.
129803         * tests/test-xvasprintf.c: Likewise.
129804         * tests/uniconv/test-u16-conv-from-enc.c: Likewise.
129805         * tests/uniconv/test-u16-conv-to-enc.c: Likewise.
129806         * tests/uniconv/test-u16-strconv-from-enc.c: Likewise.
129807         * tests/uniconv/test-u16-strconv-to-enc.c: Likewise.
129808         * tests/uniconv/test-u32-conv-from-enc.c: Likewise.
129809         * tests/uniconv/test-u32-conv-to-enc.c: Likewise.
129810         * tests/uniconv/test-u32-strconv-from-enc.c: Likewise.
129811         * tests/uniconv/test-u32-strconv-to-enc.c: Likewise.
129812         * tests/uniconv/test-u8-conv-from-enc.c: Likewise.
129813         * tests/uniconv/test-u8-conv-to-enc.c: Likewise.
129814         * tests/uniconv/test-u8-strconv-from-enc.c: Likewise.
129815         * tests/uniconv/test-u8-strconv-to-enc.c: Likewise.
129816         * tests/uniname/test-uninames.c: Likewise.
129817         * tests/unistdio/test-u16-asnprintf1.c: Likewise.
129818         * tests/unistdio/test-u16-asnprintf1.h: Likewise.
129819         * tests/unistdio/test-u16-printf1.h: Likewise.
129820         * tests/unistdio/test-u16-vasnprintf1.c: Likewise.
129821         * tests/unistdio/test-u16-vasnprintf2.c: Likewise.
129822         * tests/unistdio/test-u16-vasnprintf3.c: Likewise.
129823         * tests/unistdio/test-u16-vasprintf1.c: Likewise.
129824         * tests/unistdio/test-u16-vsnprintf1.c: Likewise.
129825         * tests/unistdio/test-u16-vsprintf1.c: Likewise.
129826         * tests/unistdio/test-u32-asnprintf1.c: Likewise.
129827         * tests/unistdio/test-u32-asnprintf1.h: Likewise.
129828         * tests/unistdio/test-u32-printf1.h: Likewise.
129829         * tests/unistdio/test-u32-vasnprintf1.c: Likewise.
129830         * tests/unistdio/test-u32-vasnprintf2.c: Likewise.
129831         * tests/unistdio/test-u32-vasnprintf3.c: Likewise.
129832         * tests/unistdio/test-u32-vasprintf1.c: Likewise.
129833         * tests/unistdio/test-u32-vsnprintf1.c: Likewise.
129834         * tests/unistdio/test-u32-vsprintf1.c: Likewise.
129835         * tests/unistdio/test-u8-asnprintf1.c: Likewise.
129836         * tests/unistdio/test-u8-asnprintf1.h: Likewise.
129837         * tests/unistdio/test-u8-printf1.h: Likewise.
129838         * tests/unistdio/test-u8-vasnprintf1.c: Likewise.
129839         * tests/unistdio/test-u8-vasnprintf2.c: Likewise.
129840         * tests/unistdio/test-u8-vasnprintf3.c: Likewise.
129841         * tests/unistdio/test-u8-vasprintf1.c: Likewise.
129842         * tests/unistdio/test-u8-vsnprintf1.c: Likewise.
129843         * tests/unistdio/test-u8-vsprintf1.c: Likewise.
129844         * tests/unistdio/test-ulc-asnprintf1.c: Likewise.
129845         * tests/unistdio/test-ulc-asnprintf1.h: Likewise.
129846         * tests/unistdio/test-ulc-printf1.h: Likewise.
129847         * tests/unistdio/test-ulc-vasnprintf1.c: Likewise.
129848         * tests/unistdio/test-ulc-vasnprintf2.c: Likewise.
129849         * tests/unistdio/test-ulc-vasnprintf3.c: Likewise.
129850         * tests/unistdio/test-ulc-vasprintf1.c: Likewise.
129851         * tests/unistdio/test-ulc-vsnprintf1.c: Likewise.
129852         * tests/unistdio/test-ulc-vsprintf1.c: Likewise.
129853         * tests/uniwidth/test-u16-strwidth.c: Likewise.
129854         * tests/uniwidth/test-u16-width.c: Likewise.
129855         * tests/uniwidth/test-u32-strwidth.c: Likewise.
129856         * tests/uniwidth/test-u32-width.c: Likewise.
129857         * tests/uniwidth/test-u8-strwidth.c: Likewise.
129858         * tests/uniwidth/test-u8-width.c: Likewise.
129859         * tests/uniwidth/test-uc_width.c: Likewise.
129860         * config/srclist-update: Likewise.
129861         (fixlicense): Update to GPLv3+.
129863         Change copyright notice from LGPLv2.1+ to LGPLv3+.
129864         * tests/test-tsearch.c: Change copyright notice.
129866         Change copyright notice from LGPLv2.0+ to LGPLv3+.
129867         * lib/c-strcaseeq.h: Change copyright notice.
129868         * lib/streq.h: Likewise.
129869         * lib/uniconv.h: Likewise.
129870         * lib/uniconv/u-conv-from-enc.h: Likewise.
129871         * lib/uniconv/u-conv-to-enc.h: Likewise.
129872         * lib/uniconv/u-strconv-from-enc.h: Likewise.
129873         * lib/uniconv/u-strconv-to-enc.h: Likewise.
129874         * lib/uniconv/u16-conv-from-enc.c: Likewise.
129875         * lib/uniconv/u16-conv-to-enc.c: Likewise.
129876         * lib/uniconv/u16-strconv-from-enc.c: Likewise.
129877         * lib/uniconv/u16-strconv-from-locale.c: Likewise.
129878         * lib/uniconv/u16-strconv-to-enc.c: Likewise.
129879         * lib/uniconv/u16-strconv-to-locale.c: Likewise.
129880         * lib/uniconv/u32-conv-from-enc.c: Likewise.
129881         * lib/uniconv/u32-conv-to-enc.c: Likewise.
129882         * lib/uniconv/u32-strconv-from-enc.c: Likewise.
129883         * lib/uniconv/u32-strconv-from-locale.c: Likewise.
129884         * lib/uniconv/u32-strconv-to-enc.c: Likewise.
129885         * lib/uniconv/u32-strconv-to-locale.c: Likewise.
129886         * lib/uniconv/u8-conv-from-enc.c: Likewise.
129887         * lib/uniconv/u8-conv-to-enc.c: Likewise.
129888         * lib/uniconv/u8-strconv-from-enc.c: Likewise.
129889         * lib/uniconv/u8-strconv-from-locale.c: Likewise.
129890         * lib/uniconv/u8-strconv-to-enc.c: Likewise.
129891         * lib/uniconv/u8-strconv-to-locale.c: Likewise.
129892         * lib/uniname.h: Likewise.
129893         * lib/uniname/uniname.c: Likewise.
129894         * lib/unistdio.h: Likewise.
129895         * lib/unistdio/u-asnprintf.h: Likewise.
129896         * lib/unistdio/u-asprintf.h: Likewise.
129897         * lib/unistdio/u-printf-args.c: Likewise.
129898         * lib/unistdio/u-printf-args.h: Likewise.
129899         * lib/unistdio/u-printf-parse.h: Likewise.
129900         * lib/unistdio/u-snprintf.h: Likewise.
129901         * lib/unistdio/u-sprintf.h: Likewise.
129902         * lib/unistdio/u-vasprintf.h: Likewise.
129903         * lib/unistdio/u-vsnprintf.h: Likewise.
129904         * lib/unistdio/u-vsprintf.h: Likewise.
129905         * lib/unistdio/u16-asnprintf.c: Likewise.
129906         * lib/unistdio/u16-asprintf.c: Likewise.
129907         * lib/unistdio/u16-printf-parse.c: Likewise.
129908         * lib/unistdio/u16-snprintf.c: Likewise.
129909         * lib/unistdio/u16-sprintf.c: Likewise.
129910         * lib/unistdio/u16-u16-asnprintf.c: Likewise.
129911         * lib/unistdio/u16-u16-asprintf.c: Likewise.
129912         * lib/unistdio/u16-u16-snprintf.c: Likewise.
129913         * lib/unistdio/u16-u16-sprintf.c: Likewise.
129914         * lib/unistdio/u16-u16-vasnprintf.c: Likewise.
129915         * lib/unistdio/u16-u16-vasprintf.c: Likewise.
129916         * lib/unistdio/u16-u16-vsnprintf.c: Likewise.
129917         * lib/unistdio/u16-u16-vsprintf.c: Likewise.
129918         * lib/unistdio/u16-vasnprintf.c: Likewise.
129919         * lib/unistdio/u16-vasprintf.c: Likewise.
129920         * lib/unistdio/u16-vsnprintf.c: Likewise.
129921         * lib/unistdio/u16-vsprintf.c: Likewise.
129922         * lib/unistdio/u32-asnprintf.c: Likewise.
129923         * lib/unistdio/u32-asprintf.c: Likewise.
129924         * lib/unistdio/u32-printf-parse.c: Likewise.
129925         * lib/unistdio/u32-snprintf.c: Likewise.
129926         * lib/unistdio/u32-sprintf.c: Likewise.
129927         * lib/unistdio/u32-u32-asnprintf.c: Likewise.
129928         * lib/unistdio/u32-u32-asprintf.c: Likewise.
129929         * lib/unistdio/u32-u32-snprintf.c: Likewise.
129930         * lib/unistdio/u32-u32-sprintf.c: Likewise.
129931         * lib/unistdio/u32-u32-vasnprintf.c: Likewise.
129932         * lib/unistdio/u32-u32-vasprintf.c: Likewise.
129933         * lib/unistdio/u32-u32-vsnprintf.c: Likewise.
129934         * lib/unistdio/u32-u32-vsprintf.c: Likewise.
129935         * lib/unistdio/u32-vasnprintf.c: Likewise.
129936         * lib/unistdio/u32-vasprintf.c: Likewise.
129937         * lib/unistdio/u32-vsnprintf.c: Likewise.
129938         * lib/unistdio/u32-vsprintf.c: Likewise.
129939         * lib/unistdio/u8-asnprintf.c: Likewise.
129940         * lib/unistdio/u8-asprintf.c: Likewise.
129941         * lib/unistdio/u8-printf-parse.c: Likewise.
129942         * lib/unistdio/u8-snprintf.c: Likewise.
129943         * lib/unistdio/u8-sprintf.c: Likewise.
129944         * lib/unistdio/u8-u8-asnprintf.c: Likewise.
129945         * lib/unistdio/u8-u8-asprintf.c: Likewise.
129946         * lib/unistdio/u8-u8-snprintf.c: Likewise.
129947         * lib/unistdio/u8-u8-sprintf.c: Likewise.
129948         * lib/unistdio/u8-u8-vasnprintf.c: Likewise.
129949         * lib/unistdio/u8-u8-vasprintf.c: Likewise.
129950         * lib/unistdio/u8-u8-vsnprintf.c: Likewise.
129951         * lib/unistdio/u8-u8-vsprintf.c: Likewise.
129952         * lib/unistdio/u8-vasnprintf.c: Likewise.
129953         * lib/unistdio/u8-vasprintf.c: Likewise.
129954         * lib/unistdio/u8-vsnprintf.c: Likewise.
129955         * lib/unistdio/u8-vsprintf.c: Likewise.
129956         * lib/unistdio/ulc-asnprintf.c: Likewise.
129957         * lib/unistdio/ulc-asprintf.c: Likewise.
129958         * lib/unistdio/ulc-printf-parse.c: Likewise.
129959         * lib/unistdio/ulc-snprintf.c: Likewise.
129960         * lib/unistdio/ulc-sprintf.c: Likewise.
129961         * lib/unistdio/ulc-vasnprintf.c: Likewise.
129962         * lib/unistdio/ulc-vasprintf.c: Likewise.
129963         * lib/unistdio/ulc-vsnprintf.c: Likewise.
129964         * lib/unistdio/ulc-vsprintf.c: Likewise.
129965         * lib/unistr.h: Likewise.
129966         * lib/unistr/u-cpy-alloc.h: Likewise.
129967         * lib/unistr/u-cpy.h: Likewise.
129968         * lib/unistr/u-endswith.h: Likewise.
129969         * lib/unistr/u-move.h: Likewise.
129970         * lib/unistr/u-set.h: Likewise.
129971         * lib/unistr/u-startswith.h: Likewise.
129972         * lib/unistr/u-stpcpy.h: Likewise.
129973         * lib/unistr/u-stpncpy.h: Likewise.
129974         * lib/unistr/u-strcat.h: Likewise.
129975         * lib/unistr/u-strcpy.h: Likewise.
129976         * lib/unistr/u-strcspn.h: Likewise.
129977         * lib/unistr/u-strdup.h: Likewise.
129978         * lib/unistr/u-strlen.h: Likewise.
129979         * lib/unistr/u-strncat.h: Likewise.
129980         * lib/unistr/u-strncpy.h: Likewise.
129981         * lib/unistr/u-strnlen.h: Likewise.
129982         * lib/unistr/u-strpbrk.h: Likewise.
129983         * lib/unistr/u-strspn.h: Likewise.
129984         * lib/unistr/u-strstr.h: Likewise.
129985         * lib/unistr/u-strtok.h: Likewise.
129986         * lib/unistr/u16-check.c: Likewise.
129987         * lib/unistr/u16-chr.c: Likewise.
129988         * lib/unistr/u16-cmp.c: Likewise.
129989         * lib/unistr/u16-cpy-alloc.c: Likewise.
129990         * lib/unistr/u16-cpy.c: Likewise.
129991         * lib/unistr/u16-endswith.c: Likewise.
129992         * lib/unistr/u16-mblen.c: Likewise.
129993         * lib/unistr/u16-mbsnlen.c: Likewise.
129994         * lib/unistr/u16-mbtouc-aux.c: Likewise.
129995         * lib/unistr/u16-mbtouc-unsafe-aux.c: Likewise.
129996         * lib/unistr/u16-mbtouc-unsafe.c: Likewise.
129997         * lib/unistr/u16-mbtouc.c: Likewise.
129998         * lib/unistr/u16-mbtoucr.c: Likewise.
129999         * lib/unistr/u16-move.c: Likewise.
130000         * lib/unistr/u16-next.c: Likewise.
130001         * lib/unistr/u16-prev.c: Likewise.
130002         * lib/unistr/u16-set.c: Likewise.
130003         * lib/unistr/u16-startswith.c: Likewise.
130004         * lib/unistr/u16-stpcpy.c: Likewise.
130005         * lib/unistr/u16-stpncpy.c: Likewise.
130006         * lib/unistr/u16-strcat.c: Likewise.
130007         * lib/unistr/u16-strchr.c: Likewise.
130008         * lib/unistr/u16-strcmp.c: Likewise.
130009         * lib/unistr/u16-strcpy.c: Likewise.
130010         * lib/unistr/u16-strcspn.c: Likewise.
130011         * lib/unistr/u16-strdup.c: Likewise.
130012         * lib/unistr/u16-strlen.c: Likewise.
130013         * lib/unistr/u16-strmblen.c: Likewise.
130014         * lib/unistr/u16-strmbtouc.c: Likewise.
130015         * lib/unistr/u16-strncat.c: Likewise.
130016         * lib/unistr/u16-strncmp.c: Likewise.
130017         * lib/unistr/u16-strncpy.c: Likewise.
130018         * lib/unistr/u16-strnlen.c: Likewise.
130019         * lib/unistr/u16-strpbrk.c: Likewise.
130020         * lib/unistr/u16-strrchr.c: Likewise.
130021         * lib/unistr/u16-strspn.c: Likewise.
130022         * lib/unistr/u16-strstr.c: Likewise.
130023         * lib/unistr/u16-strtok.c: Likewise.
130024         * lib/unistr/u16-to-u32.c: Likewise.
130025         * lib/unistr/u16-to-u8.c: Likewise.
130026         * lib/unistr/u16-uctomb-aux.c: Likewise.
130027         * lib/unistr/u16-uctomb.c: Likewise.
130028         * lib/unistr/u32-check.c: Likewise.
130029         * lib/unistr/u32-chr.c: Likewise.
130030         * lib/unistr/u32-cmp.c: Likewise.
130031         * lib/unistr/u32-cpy-alloc.c: Likewise.
130032         * lib/unistr/u32-cpy.c: Likewise.
130033         * lib/unistr/u32-endswith.c: Likewise.
130034         * lib/unistr/u32-mblen.c: Likewise.
130035         * lib/unistr/u32-mbsnlen.c: Likewise.
130036         * lib/unistr/u32-mbtouc-unsafe.c: Likewise.
130037         * lib/unistr/u32-mbtouc.c: Likewise.
130038         * lib/unistr/u32-mbtoucr.c: Likewise.
130039         * lib/unistr/u32-move.c: Likewise.
130040         * lib/unistr/u32-next.c: Likewise.
130041         * lib/unistr/u32-prev.c: Likewise.
130042         * lib/unistr/u32-set.c: Likewise.
130043         * lib/unistr/u32-startswith.c: Likewise.
130044         * lib/unistr/u32-stpcpy.c: Likewise.
130045         * lib/unistr/u32-stpncpy.c: Likewise.
130046         * lib/unistr/u32-strcat.c: Likewise.
130047         * lib/unistr/u32-strchr.c: Likewise.
130048         * lib/unistr/u32-strcmp.c: Likewise.
130049         * lib/unistr/u32-strcpy.c: Likewise.
130050         * lib/unistr/u32-strcspn.c: Likewise.
130051         * lib/unistr/u32-strdup.c: Likewise.
130052         * lib/unistr/u32-strlen.c: Likewise.
130053         * lib/unistr/u32-strmblen.c: Likewise.
130054         * lib/unistr/u32-strmbtouc.c: Likewise.
130055         * lib/unistr/u32-strncat.c: Likewise.
130056         * lib/unistr/u32-strncmp.c: Likewise.
130057         * lib/unistr/u32-strncpy.c: Likewise.
130058         * lib/unistr/u32-strnlen.c: Likewise.
130059         * lib/unistr/u32-strpbrk.c: Likewise.
130060         * lib/unistr/u32-strrchr.c: Likewise.
130061         * lib/unistr/u32-strspn.c: Likewise.
130062         * lib/unistr/u32-strstr.c: Likewise.
130063         * lib/unistr/u32-strtok.c: Likewise.
130064         * lib/unistr/u32-to-u16.c: Likewise.
130065         * lib/unistr/u32-to-u8.c: Likewise.
130066         * lib/unistr/u32-uctomb.c: Likewise.
130067         * lib/unistr/u8-check.c: Likewise.
130068         * lib/unistr/u8-chr.c: Likewise.
130069         * lib/unistr/u8-cmp.c: Likewise.
130070         * lib/unistr/u8-cpy-alloc.c: Likewise.
130071         * lib/unistr/u8-cpy.c: Likewise.
130072         * lib/unistr/u8-endswith.c: Likewise.
130073         * lib/unistr/u8-mblen.c: Likewise.
130074         * lib/unistr/u8-mbsnlen.c: Likewise.
130075         * lib/unistr/u8-mbtouc-aux.c: Likewise.
130076         * lib/unistr/u8-mbtouc-unsafe-aux.c: Likewise.
130077         * lib/unistr/u8-mbtouc-unsafe.c: Likewise.
130078         * lib/unistr/u8-mbtouc.c: Likewise.
130079         * lib/unistr/u8-mbtoucr.c: Likewise.
130080         * lib/unistr/u8-move.c: Likewise.
130081         * lib/unistr/u8-next.c: Likewise.
130082         * lib/unistr/u8-prev.c: Likewise.
130083         * lib/unistr/u8-set.c: Likewise.
130084         * lib/unistr/u8-startswith.c: Likewise.
130085         * lib/unistr/u8-stpcpy.c: Likewise.
130086         * lib/unistr/u8-stpncpy.c: Likewise.
130087         * lib/unistr/u8-strcat.c: Likewise.
130088         * lib/unistr/u8-strchr.c: Likewise.
130089         * lib/unistr/u8-strcmp.c: Likewise.
130090         * lib/unistr/u8-strcpy.c: Likewise.
130091         * lib/unistr/u8-strcspn.c: Likewise.
130092         * lib/unistr/u8-strdup.c: Likewise.
130093         * lib/unistr/u8-strlen.c: Likewise.
130094         * lib/unistr/u8-strmblen.c: Likewise.
130095         * lib/unistr/u8-strmbtouc.c: Likewise.
130096         * lib/unistr/u8-strncat.c: Likewise.
130097         * lib/unistr/u8-strncmp.c: Likewise.
130098         * lib/unistr/u8-strncpy.c: Likewise.
130099         * lib/unistr/u8-strnlen.c: Likewise.
130100         * lib/unistr/u8-strpbrk.c: Likewise.
130101         * lib/unistr/u8-strrchr.c: Likewise.
130102         * lib/unistr/u8-strspn.c: Likewise.
130103         * lib/unistr/u8-strstr.c: Likewise.
130104         * lib/unistr/u8-strtok.c: Likewise.
130105         * lib/unistr/u8-to-u16.c: Likewise.
130106         * lib/unistr/u8-to-u32.c: Likewise.
130107         * lib/unistr/u8-uctomb-aux.c: Likewise.
130108         * lib/unistr/u8-uctomb.c: Likewise.
130109         * lib/unitypes.h: Likewise.
130110         * lib/uniwidth.h: Likewise.
130111         * lib/uniwidth/cjk.h: Likewise.
130112         * lib/uniwidth/u16-strwidth.c: Likewise.
130113         * lib/uniwidth/u16-width.c: Likewise.
130114         * lib/uniwidth/u32-strwidth.c: Likewise.
130115         * lib/uniwidth/u32-width.c: Likewise.
130116         * lib/uniwidth/u8-strwidth.c: Likewise.
130117         * lib/uniwidth/u8-width.c: Likewise.
130118         * lib/uniwidth/width.c: Likewise.
130120 2007-10-07  Bruno Haible  <bruno@clisp.org>
130122         * lib/inttypes.in.h: Change copyright notice from LGPL to GPL.
130123         The file is still under LGPL (see modules/inttypes).
130125 2007-10-06  Bruno Haible  <bruno@clisp.org>
130127         * modules/trunc (Dependencies): Add 'extensions'.
130128         * m4/trunc.m4 (gl_FUNC_TRUNC): Require gl_USE_SYSTEM_EXTENSIONS.
130129         Reported by Ben Pfaff <blp@gnu.org>.
130131 2007-10-06  Bruno Haible  <bruno@clisp.org>
130133         * modules/freopen-tests: New file.
130134         * tests/test-freopen.c: New file.
130136         * modules/fopen-tests: New file.
130137         * tests/test-fopen.c: New file.
130139         * modules/fopen: New file.
130140         * lib/fopen.c: New file.
130141         * m4/fopen.m4: New file.
130142         * modules/freopen: New file.
130143         * lib/freopen.c: New file.
130144         * m4/freopen.m4: New file.
130145         * lib/stdio.in.h (fopen, freopen): New declarations.
130146         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize also GNULIB_FOPEN,
130147         GNULIB_FREOPEN, REPLACE_FOPEN, REPLACE_FREOPEN.
130148         * modules/stdio (Makefile.am): Substitute also GNULIB_FOPEN,
130149         GNULIB_FREOPEN, REPLACE_FOPEN, REPLACE_FREOPEN.
130150         * doc/functions/fopen.texi: Mention the 'fopen' module.
130151         * doc/functions/freopen.texi: Mention the 'freopen' module.
130153 2007-10-06  Bruno Haible  <bruno@clisp.org>
130155         * modules/open-tests: New file.
130156         * tests/test-open.c: New file.
130158         * modules/open: New file.
130159         * lib/open.c: New file.
130160         * m4/open.m4: New file.
130161         * lib/fchdir.c (open): If the gnulib module 'open' is used, do what
130162         lib/open.c does.
130163         * lib/fcntl.in.h (open): Declare also if replaced by the 'open' module.
130164         * m4/fcntl_h.m4 (gl_FCNTL_MODULE_INDICATOR, gl_FCNTL_H_DEFAULTS): New
130165         macros.
130166         (gl_FCNTL_H): Require gl_FCNTL_H_DEFAULTS.
130167         * modules/fcntl (Makefile.am): Also substitute GNULIB_OPEN and
130168         REPLACE_OPEN.
130169         * doc/functions/open.texi: Mention the 'open' module.
130171 2007-10-04  Bruno Haible  <bruno@clisp.org>
130173         * modules/ceill-tests: New file.
130174         * tests/test-ceill.c: New file.
130176         * modules/ceill: New file.
130177         * lib/ceill.c: Replace entire file.
130178         * m4/ceill.m4: New file.
130179         * lib/math.in.h (ceill): Replace declaration.
130180         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_CEILL.
130181         * modules/math (Makefile.am): Substitute also GNULIB_CEILL.
130182         * doc/functions/ceill.texi: Mention the 'ceill' module.
130183         * modules/mathl (Files): Remove lib/ceill.c.
130184         (Depends-on): Add ceill.
130186 2007-10-04  Bruno Haible  <bruno@clisp.org>
130188         * modules/ceilf-tests: New file.
130189         * tests/test-ceilf.c: New file.
130191         * modules/ceilf: New file.
130192         * lib/ceil.c: New file.
130193         * lib/ceilf.c: New file.
130194         * m4/ceilf.m4: New file.
130195         * lib/math.in.h (ceilf): New declaration.
130196         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_CEILF and
130197         HAVE_DECL_CEILF.
130198         * modules/math (Makefile.am): Substitute also GNULIB_CEILF and
130199         HAVE_DECL_CEILF.
130200         * doc/functions/ceilf.texi: Mention the 'ceilf' module.
130202 2007-10-04  Bruno Haible  <bruno@clisp.org>
130204         * modules/floorl-tests: New file.
130205         * tests/test-floorl.c: New file.
130207         * modules/floorl: New file.
130208         * lib/floorl.c: Replace entire file.
130209         * m4/floorl.m4: New file.
130210         * lib/math.in.h (floorl): Replace declaration.
130211         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FLOORL.
130212         * modules/math (Makefile.am): Substitute also GNULIB_FLOORL.
130213         * doc/functions/floorl.texi: Mention the 'floorl' module.
130214         * modules/mathl (Files): Remove lib/floorl.c.
130215         (Depends-on): Add floorl.
130217 2007-10-04  Bruno Haible  <bruno@clisp.org>
130219         * modules/floorf-tests: New file.
130220         * tests/test-floorf.c: New file.
130222         * modules/floorf: New file.
130223         * lib/floor.c: New file.
130224         * lib/floorf.c: New file.
130225         * m4/floorf.m4: New file.
130226         * lib/math.in.h (floorf): New declaration.
130227         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FLOORF and
130228         HAVE_DECL_FLOORF.
130229         * modules/math (Makefile.am): Substitute also GNULIB_FLOORF and
130230         HAVE_DECL_FLOORF.
130231         * doc/functions/floorf.texi: Mention the 'floorf' module.
130233 2007-10-04  Benoit Sigoure  <tsuna@lrde.epita.fr>
130234             Bruno Haible  <bruno@clisp.org>
130236         Advertise for the Git server instead of the CVS server.
130237         * doc/gnulib-intro.texi (Steady Development): Mention the Git
130238         repository instead of the CVS one.
130239         * doc/gnulib-tool.texi (VCS Issues): Renamed from "CVS Issues". Talk
130240         about all VCS systems generically.
130241         * doc/gnulib.texi (Introduction): Capitalize `Git'.
130243 2007-10-04  Bruno Haible  <bruno@clisp.org>
130245         * doc/gnulib.texi (Function Substitutes): Explain what an absent module
130246         means.
130247         Reported by Benoît Sigoure <tsuna@lrde.epita.fr>.
130249 2007-10-04  Bruno Haible  <bruno@clisp.org>
130251         * modules/truncl-tests: New file.
130252         * tests/test-truncl.c: New file.
130254         * modules/truncl: New file.
130255         * lib/truncl.c: New file.
130256         * m4/truncl.m4: New file.
130257         * lib/math.in.h (truncl): New declaration.
130258         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_TRUNCL and
130259         HAVE_DECL_TRUNCL.
130260         * modules/math (Makefile.am): Substitute also GNULIB_TRUNCL and
130261         HAVE_DECL_TRUNCL.
130262         * doc/functions/truncl.texi: Mention the 'truncl' module.
130264 2007-10-04  Bruno Haible  <bruno@clisp.org>
130266         * modules/truncf-tests: New file.
130267         * tests/test-truncf.c: New file.
130269         * modules/truncf: New file.
130270         * lib/trunc.c: Make paramerizable through USE_* macros.
130271         * lib/truncf.c: New file.
130272         * m4/truncf.m4: New file.
130273         * lib/math.in.h (truncf): New declaration.
130274         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_TRUNCF and
130275         HAVE_DECL_TRUNCF.
130276         * modules/math (Makefile.am): Substitute also GNULIB_TRUNCF and
130277         HAVE_DECL_TRUNCF.
130278         * doc/functions/truncf.texi: Mention the 'truncf' module.
130280 2007-10-03  Bruno Haible  <bruno@clisp.org>
130282         * gnulib-tool (func_get_automake_snippet): Synthesize an EXTRA_DIST
130283         augmentation also for tests modules.
130284         * modules/argp-tests (Makefile.am): Remove EXTRA_DIST augmentation.
130285         * modules/atexit-tests (Makefile.am): Likewise.
130286         * modules/binary-io-tests (Makefile.am): Likewise.
130287         * modules/c-strcase-tests (Makefile.am): Likewise.
130288         * modules/canonicalize-lgpl-tests (Makefile.am): Likewise.
130289         * modules/canonicalize-tests (Makefile.am): Likewise.
130290         * modules/closein-tests (Makefile.am): Likewise.
130291         * modules/fprintf-posix-tests (Makefile.am): Likewise.
130292         * modules/freadahead-tests (Makefile.am): Likewise.
130293         * modules/fseek-tests (Makefile.am): Likewise.
130294         * modules/fseeko-tests (Makefile.am): Likewise.
130295         * modules/ftell-tests (Makefile.am): Likewise.
130296         * modules/ftello-tests (Makefile.am): Likewise.
130297         * modules/isnanl-nolibm-tests (Makefile.am): Likewise.
130298         * modules/isnanl-tests (Makefile.am): Likewise.
130299         * modules/lseek-tests (Makefile.am): Likewise.
130300         * modules/mbscasecmp-tests (Makefile.am): Likewise.
130301         * modules/mbscasestr-tests (Makefile.am): Likewise.
130302         * modules/mbschr-tests (Makefile.am): Likewise.
130303         * modules/mbscspn-tests (Makefile.am): Likewise.
130304         * modules/mbsncasecmp-tests (Makefile.am): Likewise.
130305         * modules/mbspbrk-tests (Makefile.am): Likewise.
130306         * modules/mbspcasecmp-tests (Makefile.am): Likewise.
130307         * modules/mbsrchr-tests (Makefile.am): Likewise.
130308         * modules/mbsspn-tests (Makefile.am): Likewise.
130309         * modules/mbsstr-tests (Makefile.am): Likewise.
130310         * modules/printf-posix-tests (Makefile.am): Likewise.
130311         * modules/snprintf-posix-tests (Makefile.am): Likewise.
130312         * modules/sprintf-posix-tests (Makefile.am): Likewise.
130313         * modules/tsearch-tests (Makefile.am): Likewise.
130314         * modules/uniname/uniname-tests (Makefile.am): Likewise.
130315         * modules/unistdio/u16-vasnprintf-tests (Makefile.am): Likewise.
130316         * modules/unistdio/u32-vasnprintf-tests (Makefile.am): Likewise.
130317         * modules/unistdio/u8-vasnprintf-tests (Makefile.am): Likewise.
130318         * modules/unistdio/ulc-vasnprintf-tests (Makefile.am): Likewise.
130319         * modules/vasnprintf-posix-tests (Makefile.am): Likewise.
130320         * modules/vfprintf-posix-tests (Makefile.am): Likewise.
130321         * modules/vprintf-posix-tests (Makefile.am): Likewise.
130322         * modules/vsnprintf-posix-tests (Makefile.am): Likewise.
130323         * modules/vsprintf-posix-tests (Makefile.am): Likewise.
130324         * modules/xstrtoimax-tests (Makefile.am): Likewise.
130325         * modules/xstrtol-tests (Makefile.am): Likewise.
130326         * modules/xstrtoumax-tests (Makefile.am): Likewise.
130327         * modules/yesno-tests (Makefile.am): Likewise.
130329 2007-10-03  Bruno Haible  <bruno@clisp.org>
130331         * modules/trunc-tests: New file.
130332         * tests/test-trunc.c: New file.
130334         * modules/trunc: New file.
130335         * lib/trunc.c: New file.
130336         * m4/trunc.m4: New file.
130337         * lib/math.in.h (trunc): New declaration.
130338         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_TRUNC and
130339         HAVE_DECL_TRUNC.
130340         * modules/math (Makefile.am): Substitute also GNULIB_TRUNC and
130341         HAVE_DECL_TRUNC.
130342         * doc/functions/trunc.texi: Mention the 'trunc' module.
130344 2007-10-03  Bruno Haible  <bruno@clisp.org>
130346         * tests/test-fpending.c: New file, mostly copied
130347         from coreutils/lib/t-fpending.c.
130348         * modules/fpending-tests: New file.
130350 2007-10-03  Bruno Haible  <bruno@clisp.org>
130352         Port the stdio extensions to QNX (untested).
130353         * lib/fseterr.c (fseterr): Add support for QNX.
130354         * lib/fbufmode.c (fbufmode): Likewise.
130355         * lib/freadable.c (freadable): Likewise.
130356         * lib/fwritable.c (fwritable): Likewise.
130357         * lib/freading.c (freading): Likewise.
130358         * lib/fwriting.c (fwriting): Likewise.
130359         * lib/freadahead.c (freadahed): Likewise.
130360         * lib/fpurge.c (fpurge): Likewise.
130361         * lib/fseeko.c (rpl_fseeko): Likewise.
130363 2007-10-03  Bruno Haible  <bruno@clisp.org>
130364             Jim Meyering  <jim@meyering.net>
130365             Eric Blake  <ebb9@byu.net>
130367         * doc/relocatable.texi: Use @command instead of @program.
130369 2007-10-02  Jim Meyering  <jim@meyering.net>
130371         Perform one more "_.h" -> ".in.h" substitution.
130372         * modules/unistd (Makefile.am) [unistd.h]: Use unistd.h.in
130373         instead of unistd_.h here, too.
130375 2007-10-01  Bruno Haible  <bruno@clisp.org>
130377         * gnulib-tool (func_emit_initmacro_done): Special case for alloca.c.
130378         Needed for the alloca-opt module.
130380 2007-09-30  Bruno Haible  <bruno@clisp.org>
130382         * lib/alloca.in.h: Renamed from lib/alloca_.h.
130383         * modules/alloca-opt (Files, Makefile.am): Use alloca.in.h instead of
130384         alloca_.h.
130385         * lib/argz.in.h: Renamed from lib/argz_.h.
130386         * modules/argz (Files, Makefile.am): Use argz.in.h instead of argz_.h.
130387         * lib/byteswap.in.h: Renamed from lib/byteswap_.h.
130388         * modules/byteswap (Files, Makefile.am): Use byteswap.in.h instead of
130389         byteswap_.h.
130390         * lib/dirent.in.h: Renamed from lib/dirent_.h.
130391         * modules/fchdir (Files, Makefile.am): Use dirent.in.h instead of
130392         dirent_.h.
130393         * lib/fcntl.in.h: Renamed from lib/fcntl_.h.
130394         * modules/fcntl (Files, Makefile.am): Use fcntl.in.h instead of
130395         fcntl_.h.
130396         * lib/float.in.h: Renamed from lib/float_.h.
130397         * modules/float (Files, Makefile.am): Use float.in.h instead of
130398         float_.h.
130399         * lib/fnmatch.in.h: Renamed from lib/fnmatch_.h.
130400         * modules/fnmatch (Files, Makefile.am): Use fnmatch.in.h instead of
130401         fnmatch_.h.
130402         * lib/getopt.in.h: Renamed from lib/getopt_.h.
130403         * modules/getopt (Files, Makefile.am): Use getopt.in.h instead of
130404         getopt_.h.
130405         * lib/glob.in.h: Renamed from lib/glob_.h.
130406         * modules/glob (Files, Makefile.am): Use glob.in.h instead of glob_.h.
130407         * lib/iconv.in.h: Renamed from lib/iconv_.h.
130408         * modules/iconv_open (Files, Makefile.am): Use iconv.in.h instead of
130409         iconv_.h.
130410         * lib/inttypes.in.h: Renamed from lib/inttypes_.h.
130411         * modules/inttypes (Files, Makefile.am): Use inttypes.in.h instead of
130412         inttypes_.h.
130413         * lib/locale.in.h: Renamed from lib/locale_.h.
130414         * modules/locale (Files, Makefile.am): Use locale.in.h instead of
130415         locale_.h.
130416         * lib/math.in.h: Renamed from lib/math_.h.
130417         * modules/math (Files, Makefile.am): Use math.in.h instead of math_.h.
130418         * lib/netinet_in.in.h: Renamed from lib/netinet_in_.h.
130419         * modules/netinet_in (Files, Makefile.am): Use netinet_in.in.h instead
130420         of netinet_in_.h. Add dependency.
130421         * lib/poll.in.h: Renamed from lib/poll_.h.
130422         * modules/poll (Files, Makefile.am): Use poll.in.h instead of poll_.h.
130423         * lib/search.in.h: Renamed from lib/search_.h.
130424         * modules/search (Files, Makefile.am): Use search.in.h instead of
130425         search_.h.
130426         * lib/signal.in.h: Renamed from lib/signal_.h.
130427         * modules/signal (Files, Makefile.am): Use signal.in.h instead of
130428         _signal.h.
130429         * lib/stdbool.in.h: Renamed from lib/stdbool_.h.
130430         * modules/stdbool (Files, Makefile.am): Use stdbool.in.h instead of
130431         stdbool_.h.
130432         * lib/stdint.in.h: Renamed from lib/stdint_.h.
130433         * modules/stdint (Files, Makefile.am): Use stdint.in.h instead of
130434         stdint_.h.
130435         * lib/stdio.in.h: Renamed from lib/stdio_.h.
130436         * modules/stdio (Files, Makefile.am): Use stdio.in.h instead of
130437         stdio_.h.
130438         * lib/stdlib.in.h: Renamed from lib/stdlib_.h.
130439         * modules/stdlib (Files, Makefile.am): Use stdlib.in.h instead of
130440         stdlib_.h.
130441         * lib/string.in.h: Renamed from lib/string_.h.
130442         * modules/string (Files, Makefile.am): Use string.in.h instead of
130443         string_.h.
130444         * doc/gnulib-tool.texi (Initial import): Update.
130445         * lib/sys_select.in.h: Renamed from lib/sys_select_.h.
130446         * modules/sys_select (Files, Makefile.am): Use sys_select.in.h instead
130447         of sys_select_.h. Add dependency.
130448         * lib/sys_socket.in.h: Renamed from lib/sys_socket_.h.
130449         * modules/sys_socket (Files, Makefile.am): Use sys_socket.in.h instead
130450         of sys_socket_.h.
130451         * lib/sys_stat.in.h: Renamed from lib/sys_stat_.h.
130452         * modules/sys_stat (Files, Makefile.am): Use sys_stat.in.h instead of
130453         sys_stat_.h.
130454         * lib/sys_time.in.h: Renamed from lib/sys_time_.h.
130455         * modules/sys_time (Files, Makefile.am): Use sys_time.in.h instead of
130456         sys_time_.h.
130457         * lib/sysexits.in.h: Renamed from lib/sysexits_.h.
130458         * modules/sysexits (Files, Makefile.am): Use sysexits.in.h instead of
130459         sysexits_.h.
130460         * lib/time.in.h: Renamed from lib/time_.h.
130461         * modules/time (Files, Makefile.am): Use time.in.h instead of time_.h.
130462         * lib/unistd.in.h: Renamed from lib/unistd_.h.
130463         * modules/unistd (Files, Makefile.am): Use unistd.in.h instead of
130464         unistd_.h.
130465         * lib/wchar.in.h: Renamed from lib/wchar_.h.
130466         * modules/wchar (Files, Makefile.am): Use wchar.in.h instead of
130467         wchar_.h.
130468         * lib/wctype.in.h: Renamed from lib/wctype_.h.
130469         * modules/wctype (Files, Makefile.am): Use wctype.in.h instead of
130470         wctype_.h.
130471         * build-aux/bootstrap (slurp): Update.
130472         * lib/.cppi-disable: Update.
130474 2007-09-30  Bruno Haible  <bruno@clisp.org>
130476         * tests/test-getaddrinfo.c (AF_UNSPEC): Provide a fallback definition.
130477         Needed on BeOS.
130479 2007-09-30  Bruno Haible  <bruno@clisp.org>
130481         * modules/dirname-tests (check_PROGRAMS): Renamed from noinst_PROGRAMS.
130483 2007-09-29  Bruno Haible  <bruno@clisp.org>
130485         * lib/stdio_.h (getdelim, getline): Add identifiers. Doc tweak.
130487 2007-09-29  Bruno Haible  <bruno@clisp.org>
130489         * lib/xreadlink.c (xreadlink): Simplify to a wrapper around areadlink.
130490         * modules/xreadlink (Depends-on): Add areadlink, remove readlink etc.
130491         * build-aux/install-reloc: Compile also areadlink.c.
130492         * modules/relocatable-prog-wrapper (Files): Add lib/areadlink.[hc].
130494 2007-09-29  Bruno Haible  <bruno@clisp.org>
130496         * gnulib-tool (func_emit_initmacro_done): Indentation.
130498 2007-09-29  Bruno Haible  <bruno@clisp.org>
130500         * README: Add CVS checkout update instructions.
130501         Info from Bob Proulx <bob@proulx.com>.
130503 2007-09-28  Eric Blake  <ebb9@byu.net>
130505         Provide move-if-change.
130506         * build-aux/move-if-change: New file, based on best practice
130507         rather than any canonical upstream location.
130509 2007-09-28  Jim Meyering  <jim@meyering.net>
130511         Fix canonicalize loop-detection corner case.
130512         Do not attempt to stat the symlink values stored via seen_triple.
130513         Without this, coreutils' tests/misc/readlink-fp-loop test would fail
130514         on linux-2.6.18, (but not 2.6.22).
130515         * lib/canonicalize.c (seen_triple): Use triple_compare_ino_str, not
130516         triple_compare.  The former compares dev,ino,filename, while the latter
130517         would actually stat dirname(filename) when dev and ino were equal.
130518         * lib/hash-triple.c: Install <string.h>.
130519         (STREQ): Define.
130520         (triple_compare_ino_str): New function.
130521         * lib/hash-triple.h (triple_compare_ino_str): Declare it.
130523 2007-09-28  Eric Blake  <ebb9@byu.net>
130525         Enforce that AC_REPLACE_FUNCS files exist.
130526         * gnulib-tool (func_emit_initmacro_done): Make AC_LIBSOURCES
130527         override check for typos.
130529         Fix test-closein on Solaris 10.
130530         * tests/test-closein.c (main): Don't assume stdin can be inherited
130531         closed on all systems.
130532         * tests/test-closein.sh: Likewise.
130533         Reported by Piotr Tarnowski.
130535 2007-09-28  Jim Meyering  <jim@meyering.net>
130537         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Fix typo in comment.
130539 2007-09-27  Jim Meyering  <jim@meyering.net>
130541         canonicalize: Avoid a false-positive cycle failure.
130542         * modules/canonicalize (Depends-on): Add file-set and hash-triple.
130543         Sort.  Remove cycle-check.
130544         * lib/canonicalize.c: Include file-set.h and hash-triple.h,
130545         not cycle-check.h.
130546         (seen_triple): New function.
130547         (canonicalize_filename_mode): Use it instead of cycle-check.
130548         * tests/test-canonicalize.c: Add a test for this bug.
130549         * tests/test-canonicalize.sh: Set up and run the test.
130551         New module, file-set, from coreutils.
130552         * modules/file-set: Define it.
130553         * lib/file-set.c, lib/file-set.h: Implement.
130555         New module, hash-triple, from coreutils.
130556         * modules/hash-triple: Define it.
130557         * lib/hash-triple.c, lib/hash-triple.h: Implement.
130559 2007-09-25  Eric Blake  <ebb9@byu.net>
130561         Fix strerror on Interix.
130562         * lib/string_.h (strerror): Declare replacement.
130563         * doc/functions/strerror.texi (strerror): Document the Interix
130564         shortcoming.
130565         * modules/string (Makefile.am): Support new hooks.
130566         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Add new hooks.
130567         * m4/strerror.m4 (gl_FUNC_STRERROR): Defer to
130568         gl_FUNC_STRERROR_SEPARATE.
130569         (gl_FUNC_STRERROR_SEPARATE): Check for Interix bug.
130570         * lib/strerror.c (rpl_strerror): Provide replacement.
130571         * modules/strerror (Depends-on): Add string.
130572         (configure.ac): Detect use of module.
130573         * tests/test-strerror.c: New file.
130574         * modules/strerror-tests: New test module.
130575         * modules/argp (Depends-on): Add strerror.
130576         * modules/error (Depends-on): Likewise.
130577         Reported by Martin Koeppe.
130579 2007-09-24  Bruno Haible  <bruno@clisp.org>
130581         * README: Update git instructions.
130583 2007-09-24  Eric Blake  <ebb9@byu.net>
130585         Revert fpending breakage from 2007-09-08.
130586         * m4/fpending.m4 (gl_FUNC_FPENDING): Don't require existence of
130587         __fpending.c.
130589 2007-09-24  Jim Meyering  <jim@meyering.net>
130591         filenamecat.c: Add a test.
130592         * lib/filenamecat.c (main) [TEST_FILE_NAME_CONCAT]: Add a test
130593         showing how the function works when DIR is the empty string.
130595 2007-09-21  Simon Josefsson  <simon@josefsson.org>
130597         * tests/test-canonicalize.sh: Turn on executable bit.
130599 2007-09-19  Eric Blake  <ebb9@byu.net>
130601         * README: Update CVS instructions.
130603 2007-09-18  Bruno Haible  <bruno@clisp.org>
130605         * modules/areadlink: New file.
130606         * lib/areadlink.h (areadlink): New declaration.
130607         * lib/areadlink.c: New file, based on lib/xreadlink.c.
130609 2007-09-17  Jim Meyering  <jim@meyering.net>
130611         * lib/savewd.c (ESTALE) [!defined]: Define.
130612         Reported to be required on Interix by Martin Koeppe.
130614 2007-09-17  Bruno Haible  <bruno@clisp.org>
130616         * gnulib-tool (func_version): Use $version.
130618 2007-09-16  Bruno Haible  <bruno@clisp.org>
130620         * m4/printf.m4 (gl_PRINTF_LONG_DOUBLE, gl_PRINTF_INFINITE,
130621         gl_PRINTF_INFINITE_LONG_DOUBLE): Increase buf's size from 100 to 10000.
130622         Needed on glibc-2.6.1 with -fstack-protector -D_FORTIFY_SOURCE=2.
130623         Reported by Greg Schafer <gschafer@zip.com.au>.
130625 2007-09-15  Bruno Haible  <bruno@clisp.org>
130627         * gnulib-tool (sed): Try a little harder to make bash understand the
130628         alias.
130629         Reported by Bruce Korb <bruce.korb@gmail.com>.
130631 2007-09-13  Eric Blake  <ebb9@byu.net>
130633         * ChangeLog: Remove conflict markers.
130635 2007-09-13  Simon Josefsson  <simon@josefsson.org>
130637         * lib/gc-gnulib.c (gc_hash_open): Catch NULL calloc return value.
130638         Reported by Bruno Haible <bruno@clisp.org>.
130640 2007-09-12  Bruno Haible  <bruno@clisp.org>
130642         * m4/lock.m4: Don't provide an AC_USE_SYSTEM_EXTENSIONS definition.
130643         (gl_LOCK_EARLY_BODY): Use AC_GNU_SOURCE when AC_USE_SYSTEM_EXTENSIONS
130644         is not defined.
130646 2007-09-12  Eric Blake  <ebb9@byu.net>
130648         Track CVS Autoconf on AC_USE_SYSTEM_EXTENSIONS.
130649         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Update to CVS
130650         Autoconf definition.
130651         * modules/euidaccess (Depends-on): Add extensions, for
130652         AC_USE_SYSTEM_EXTENSIONS with autoconf <= 2.59.
130653         * modules/fnmatch (Depends-on): Likewise.
130654         * modules/getaddrinfo (Depends-on): Likewise.
130655         * modules/getdelim (Depends-on): Likewise.
130656         * modules/getline (Depends-on): Likewise.
130657         * modules/getsubopt (Depends-on): Likewise.
130658         * modules/gettext (Depends-on): Likewise.
130659         * modules/group-member (Depends-on): Likewise.
130660         * modules/mbchar (Depends-on): Likewise.
130661         * modules/memmem (Depends-on): Likewise.
130662         * modules/mempcpy (Depends-on): Likewise.
130663         * modules/memrchr (Depends-on): Likewise.
130664         * modules/pagealign_alloc (Depends-on): Likewise.
130665         * modules/readutmp (Depends-on): Likewise.
130666         * modules/stpcpy (Depends-on): Likewise.
130667         * modules/stpncpy (Depends-on): Likewise.
130668         * modules/strchrnul (Depends-on): Likewise.
130669         * modules/strndup (Depends-on): Likewise.
130670         * modules/strsep (Depends-on): Likewise.
130671         * modules/strverscmp (Depends-on): Likewise.
130672         * modules/vasprintf (Depends-on): Likewise.
130673         * modules/wcwidth (Depends-on): Likewise.
130674         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): AC_GNU_SOURCE will be
130675         obsolete in Autoconf 2.62; use AC_USE_SYSTEM_EXTENSIONS instead.
130676         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_GNU): Likewise.
130677         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDR_INFO): Likewise.
130678         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise.
130679         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
130680         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Likewise.
130681         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
130682         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER): Likewise.
130683         * m4/mbchar.m4 (gl_MBCHAR): Likewise.
130684         * m4/memmem.m4 (gl_FUNC_MEMMEM): Likewise.
130685         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
130686         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
130687         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Likewise.
130688         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC): Likewise.
130689         * m4/readutmp.m4 (gl_READUTMP): Likewise.
130690         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
130691         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
130692         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
130693         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
130694         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
130695         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
130696         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
130697         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP): Likewise.
130698         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): Likewise.
130699         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
130700         * m4/lock.m4 (gl_LOCK_EARLY_BODY): Likewise, but provide fallback,
130701         so that lock.m4 can be used in gettext without extensions module.
130703 2007-09-11  Bruno Haible  <bruno@clisp.org>
130705         * m4/isc-posix.m4: Remove file.
130706         Suggested by Eric Blake.
130708 2007-09-11  Eric Blake  <ebb9@byu.net>
130710         * ChangeLog: Restore lines accidentally truncated 2007-04-06.
130712 2007-09-10  Bruno Haible  <bruno@clisp.org>
130714         * posix-modules: Fix typo in error message.
130715         Reported by Matt <mkraai@beckman.com>.
130717 2007-09-09  Bruno Haible  <bruno@clisp.org>
130719         * doc/functions/getdelim.texi: Update list of platforms lacking the
130720         function.
130721         * doc/functions/getline.texi: Likewise.
130723 2007-09-09  Jim Meyering  <jim@meyering.net>
130725         * lib/hash.c (hash_initialize): Detect calloc failure.
130726         Reported by Bruno Haible.
130728 2007-09-09  Bruno Haible  <bruno@clisp.org>
130730         * lib/canonicalize-lgpl.c (__realpath): Set errno to ENOMEM when
130731         malloc or realloc fails.
130733 2007-09-09  Bruno Haible  <bruno@clisp.org>
130735         * modules/getcwd (Depends-on): Add malloc-posix.
130736         * modules/glob (Depends-on): Likewise.
130737         * modules/putenv (Depends-on): Likewise.
130738         * modules/strdup (Depends-on): Likewise.
130739         * modules/getdelim (Depends-on): Add realloc-posix.
130740         * modules/read-file (Depends-on): Likewise.
130742 2007-09-09  Bruno Haible  <bruno@clisp.org>
130744         * m4/malloc.m4 (gl_CHECK_MALLOC_POSIX): New macro.
130745         (gl_FUNC_MALLOC_POSIX): Require it.
130746         * m4/realloc.m4 (gl_FUNC_REALLOC_POSIX): Likewise.
130747         * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): Likewise.
130748         * modules/realloc (Files): Add m4/malloc.m4.
130749         * modules/calloc (Files): Likewise.
130751 2007-09-09  Bruno Haible  <bruno@clisp.org>
130753         * modules/malloc-posix: New file.
130754         * modules/malloc (Depends-on): Add malloc-posix.
130755         * lib/malloc.c: Include errno.h.
130756         (rpl_malloc): Merge the requirements of a glibc-compatible malloc
130757         and a POSIX-compatible malloc into a single function. Set ENOMEM
130758         when returning NULL.
130759         * m4/malloc.m4: New file.
130760         * doc/functions/malloc.texi: Mention the malloc-posix module.
130761         * lib/stdlib_.h (malloc): New declaration.
130762         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
130763         GNULIB_MALLOC_POSIX and HAVE_MALLOC_POSIX.
130764         * modules/stdlib (stdlib.h): Substitute also GNULIB_MALLOC_POSIX
130765         and HAVE_MALLOC_POSIX.
130767 2007-09-09  Bruno Haible  <bruno@clisp.org>
130769         * modules/realloc-posix: New file.
130770         * modules/realloc (Depends-on): Add realloc-posix.
130771         * lib/realloc.c: Include errno.h.
130772         (rpl_realloc): Merge the requirements of a glibc-compatible realloc
130773         and a POSIX-compatible realloc into a single function. Set ENOMEM
130774         when returning NULL.
130775         * m4/realloc.m4: New file.
130776         * doc/functions/realloc.texi: Mention the realloc-posix module.
130777         * lib/stdlib_.h (realloc): New declaration.
130778         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
130779         GNULIB_REALLOC_POSIX and HAVE_REALLOC_POSIX.
130780         * modules/stdlib (stdlib.h): Substitute also GNULIB_REALLOC_POSIX
130781         and HAVE_REALLOC_POSIX.
130783 2007-09-09  Bruno Haible  <bruno@clisp.org>
130785         * modules/calloc-posix: New file.
130786         * modules/calloc (Depends-on): Add calloc-posix.
130787         * lib/calloc.c: Include errno.h.
130788         (rpl_calloc): Merge the requirements of a glibc-compatible calloc
130789         and a POSIX-compatible calloc into a single function. Set ENOMEM
130790         when returning NULL.
130791         * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): New macro.
130792         * doc/functions/calloc.texi: Mention the calloc-posix module.
130793         * lib/stdlib_.h (calloc): New declaration.
130794         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
130795         GNULIB_CALLOC_POSIX and HAVE_CALLOC_POSIX.
130796         * modules/stdlib (stdlib.h): Substitute also GNULIB_CALLOC_POSIX
130797         and HAVE_CALLOC_POSIX.
130799 2007-09-09  Bruno Haible  <bruno@clisp.org>
130801         Allow for modules to show an arbitrary notice.
130802         * modules/TEMPLATE-EXTENDED: Add 'Notice' field.
130803         * gnulib-tool: New option --extract-notice.
130804         (func_usage): Document it.
130805         (sed_extract_prog): Update.
130806         (func_get_notice): New function.
130807         (func_modules_notice): New function.
130808         (func_import, func_create_testdir): Invoke it.
130809         Suggested by Jim Meyering.
130811 2007-09-09  Bruno Haible  <bruno@clisp.org>
130813         * gnulib-tool: New options --verbose, --quiet.
130814         (func_usage): Document them.
130815         (verbose): New variable.
130816         (func_execute_command): New function.
130817         (func_import): Don't show the module list and the file list if
130818         $verbose < 0.
130819         (func_create_testdir): Likewise. Use func_execute_command.
130820         (func_create_megatestdir): Use func_execute_command.
130822 2007-09-08  Bruno Haible  <bruno@clisp.org>
130824         * gnulib-tool (func_import): Prefer rsync over wget when available,
130825         for fetching the PO files.
130827 2007-09-08  Bruno Haible  <bruno@clisp.org>
130829         * posix-modules: New file. Portions copied from gnulib-tool.
130830         * doc/gnulib.texi (POSIX Substitutes Library): New chapter.
130832 2007-09-08  Jim Meyering  <jim@meyering.net>
130834         Rename __fpending.c -> fpending.c and __fpending.h -> fpending.h
130835         * lib/fpending.h: Rename from __fpending.h.
130836         * lib/fpending.c: Rename from __fpending.c.
130837         Include "fpending.h", not "__fpending.h".
130838         * lib/__fpending.h, lib/__fpending.c: Remove files.
130839         * modules/fpending (Files): Reflect new file names.
130840         * lib/close-stream.c: Include "fpending.h", not "__fpending.h".
130842 2007-09-08  Bruno Haible  <bruno@clisp.org>
130844         * m4/inttypes-h.m4: Remove stub file.
130846 2007-09-07  Simon Josefsson  <simon@josefsson.org>
130848         * doc/headers/stdint.texi: Discuss #include_next issue.
130850 2007-09-06  Paul Eggert  <eggert@cs.ucla.edu>
130852         * build-aux/bootstrap: Remove obsolete comment about wget --help.
130854 2007-09-06  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
130856         * m4/time_h.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Fix misspelling
130857         in variable name.
130859 2007-09-03  Jim Meyering  <jim@meyering.net>
130861         New module: git-version-gen.
130862         * modules/git-version-gen: New file.
130864         Import changes from coreutils for bootstrap script.
130866         * build-aux/bootstrap (WGET_COMMAND): Remove code to set this variable.
130868         bootstrap: uses rsync to download the .po files
130869         * build-aux/bootstrap (po_download_command_format): New global.
130870         (download_po_files): Use rsync.
130871         (update_po_files): Don't remove .po files after download,
130872         so future rsync runs can take advantage of the copies.
130874         * build-aux/bootstrap (gnulib_tool): Make sha1sum check quietly.
130876         Solve the unnecessary-.po-file-regeneration problem once and for all.
130877         * build-aux/bootstrap (download_po_files): New function, renamed from
130878         get_translations.  Now, downloads, but doesn't update LINGUAS.
130879         (update_po_files): New function.
130881         bootstrap: Ignore more.
130882         * build-aux/bootstrap (symlink_to_dir): Add a directory name like
130883         uniwidth to e.g., lib/.gitignore.
130884         (slurp): Handle the sys_stat_.h -> sys mapping, too.
130886         * build-aux/bootstrap: New setting: vc_ignore.
130887         (insert_sorted_if_absent): Create $file if absent.
130888         Adapt to new, possibly empty, list: $vc_ignore.
130890         bootstrap: generate more ignorable names
130891         * build-aux/bootstrap (slurp): When generating ignorable names,
130892         also map .sin to .sed, .gperf to .c, and .y to .c.
130894 2007-09-03  Jim Meyering  <jim@meyering.net>
130896         * build-aux/git-version-gen: New file, from coreutils.  For details, see
130897         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=bfe49f506
130899 2007-09-02  Bruno Haible  <bruno@clisp.org>
130901         Fix mis-recognition of 'mcs' on QNX 6.
130902         * m4/csharpcomp.m4 (gt_CSHARPCOMP): Test whether the "mcs --version"
130903         output contains the string "Mono".
130904         * lib/csharpcomp.c (compile_csharp_using_mono): Likewise.
130905         Reported by <kraai@ftbfs.org> at <https://savannah.gnu.org/bugs/?18337>.
130907 2007-09-01  Bruno Haible  <bruno@clisp.org>
130909         Fix collision between uniwidth/* and linebreak modules.
130910         * lib/linebreak.h (locale_charset, uc_width, u8_width, u16_width,
130911         u32_width): Remove declarations.
130912         * lib/linebreak.c: Include uniwidth.h, uniwidth/cjk.h, streq.h.
130913         (u32_mbtouc_unsafe, streq9, streq8, streq7, streq6, streq5, streq4,
130914         streq3, streq2, streq1, streq0): Remove functions.
130915         (STREQ): Remove macro.
130916         (is_cjk_encoding): Remove function.
130917         (nonspacing_table_data, nonspacing_table_ind): Remove constants.
130918         (uc_width, u8_width, u16_width, u32_width): Remove functions.
130919         * modules/linebreak (Depends-on): Add streq, uniwidth/width.
130920         * NEWS: Document the change.
130922 2007-09-01  Bruno Haible  <bruno@clisp.org>
130924         * lib/streq.h: Add double-inclusion guard.
130926 2007-09-01  Karl Berry  <karl@gnu.org>
130928         * MODULES.html.sh: Rename mreadlink_with_size to areadlink_with_size.
130930 2007-08-28  Jim Meyering  <jim@meyering.net>
130932         Rename mreadlink_with_size to areadlink_with_size.
130933         * NEWS: Document the change.
130934         * lib/mreadlink-with-size.c (mreadlink_with_size): Rename this to...
130935         * lib/areadlink-with-size.c (areadlink_with_size): ...this.
130936         * lib/mreadlink.h: Rename this to...
130937         * lib/areadlink.h: ...this.
130938         * modules/mreadlink-with-size: Rename this to...
130939         * modules/areadlink-with-size: ...this.
130940         * lib/canonicalize.c: Reflect the renaming.
130941         * modules/canonicalize: Likewise.
130943 2007-08-26  Bruno Haible  <bruno@clisp.org>
130945         * gnulib-tool (func_import): When deciding which files to remove,
130946         consider also dangling symbolic links.
130947         Reported by Eric Blake.
130949 2007-08-26  Bruno Haible  <bruno@clisp.org>
130951         * gnulib-tool (func_ln_if_changed): Use "test -h", not "test -L".
130953 2007-08-23  Simon Josefsson  <simon@josefsson.org>
130955         * lib/readline.c: Don't include getline.h, the prototype is now
130956         found in stdio.h.
130958 2007-08-23  Jim Meyering  <jim@meyering.net>
130960         Getdelim touchup.
130961         * lib/getdelim.c (getdelim): Don't bother to save/restore errno
130962         around the funlockfile call, since funlockfile never sets errno.
130963         Don't set errno upon failed realloc.
130965 2007-08-22  Eric Blake  <ebb9@byu.net>
130967         Getline touchups.
130968         * lib/getdelim.c (getdelim): Revert regression that required *n to
130969         be 0 when *lineptr is NULL.  Preserve errno across funlockfile.
130970         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Check for declaration of
130971         getdelim, rather than whether implementation is missing.
130972         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise for getline.
130973         * lib/stdio_.h (getline): Also declare if replacement is
130974         required.
130975         * doc/functions/getdelim.texi: New file.
130976         * doc/functions/getline.texi: Likewise.
130977         * doc/gnulib.texi (Function Substitutes): Add new files.
130978         Reported by Bruno Haible.
130980 2007-08-22  Ludovic Courtès  <ludo@gnu.org>
130982         * users.txt: Add Guile.
130984 2007-08-22  Eric Blake  <ebb9@byu.net>
130986         * tests/test-getdelim.c (main): Use remove, not unlink.
130987         * tests/test-getline.c (main): Likewise.
130989         Move getline and getdelim into stdio.h, per POSIX 200x.
130990         * modules/getline (Files): Remove getline.h.
130991         (Depends-on): Add stdio.
130992         (configure.ac): Add module indicator.
130993         * modules/getdelim (Files): Remove getdelim.h.
130994         (Depends-on): Add stdio.
130995         (configure.ac): Add module indicator.
130996         * modules/stdio (Makefile.am): Work with new indicators.
130997         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add new defaults.
130998         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Work with stdio needs.
130999         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
131000         * lib/getdelim.h: Delete.
131001         * lib/getline.h: Delete.
131002         * lib/stdio_.h (getdelim, getline): Declare.
131003         * modules/getdelim-tests: New module.
131004         * modules/getline-tests: Likewise.
131005         * tests/test-getdelim.c: New file.
131006         * tests/test-getline.c: Likewise.
131007         * NEWS: Document the change.
131008         * lib/getline.c: Update choice of header.
131009         * lib/csharpcomp.c: Likewise.
131010         * lib/getpass.c: Likewise.
131011         * lib/javacomp.c: Likewise.
131012         * lib/javaversion.c: Likewise.
131013         * lib/yesno.c: Likewise.
131014         * lib/getdelim.c: Likewise.
131015         (getdelim): Set errno on failure, and avoid memory leak.
131017 2007-08-19  Bruno Haible  <bruno@clisp.org>
131019         * modules/closein (Depends-on): Add freadahead.
131020         * lib/closein.c: Include freadahead.h.
131021         (close_stdin): Skip the fseeko and fflush calls if freadahead(stdin)
131022         is zero.
131024 2007-08-19  Bruno Haible  <bruno@clisp.org>
131026         * modules/freadahead-tests: New file.
131027         * tests/test-freadahead.sh: New file.
131028         * tests/test-freadahead.c: New file.
131030         * modules/freadahead: New file.
131031         * lib/freadahead.h: New file.
131032         * lib/freadahead.c: New file.
131033         * MODULES.html.sh (File stream based Input/Output): Add freadahead,
131034         fbufmode, fpurge, freadable, fwritable.
131036 2007-08-19  Eric Blake  <ebb9@byu.net>
131038         Test yesno in combination with closein.
131039         * lib/yesno.c (yesno): Document use of stdin.
131040         * modules/yesno-tests (Files): New module.
131041         * tests/test-yesno.c (main): New file.
131042         * tests/test-yesno.sh: Likewise.
131044 2007-08-19  Bruno Haible  <bruno@clisp.org>
131046         * lib/fbufmode.c (fbufmode): Add tentative support for Solaris/AMD64.
131047         * lib/fseeko.c (rpl_fseeko): Likewise.
131048         * lib/fseterr.c (fseterr): Likewise.
131050 2007-08-19  Bruno Haible  <bruno@clisp.org>
131052         * tests/test-lseek.c (main): Disable a test for BeOS.
131053         * doc/functions/lseek.texi: Document the BeOS bug.
131055 2007-08-19  Bruno Haible  <bruno@clisp.org>
131056             Eric Blake  <ebb9@byu.net>
131058         * lib/lseek.c: Include <sys/stat.h>.
131059         (rpl_lseek): Add workaround code also for Unix platforms.
131060         Needed for BeOS.
131061         * m4/lseek.m4 (gl_FUNC_LSEEK): When cross-compiling, fail on BeOS.
131062         * doc/functions/lseek.texi: Document BeOS definiency.
131064 2007-08-18  Bruno Haible  <bruno@clisp.org>
131066         * modules/fstrcmp-tests: New file.
131067         * tests/test-fstrcmp.c: New file.
131069 2007-08-18  Bruno Haible  <bruno@clisp.org>
131071         * modules/fstrcmp: New file, from GNU gettext with modifications.
131072         * lib/fstrcmp.h: New file, from GNU gettext.
131073         * lib/fstrcmp.c: New file, from GNU gettext.
131074         * MODULES.html.sh (String handling): Add fstrcmp.
131076 2007-08-18  Bruno Haible  <bruno@clisp.org>
131078         * lib/diffseq.h (struct context): Change type of 'heuristic' field to
131079         'bool'.
131080         (diag, compareseq): Remove const from the ctxt argument.
131081         (USE_HEURISTIC): Undefine at the end.
131083 2007-08-18  Jim Meyering  <jim@meyering.net>
131085         New file: lib/idcache.h
131086         * NEWS: Mention the addition.
131087         * modules/idcache (Files): Add lib/idcache.h
131088         * lib/idcache.c: Include "idcache.h".
131089         Don't include <sys/types.h>.
131090         Add a FIXME comment.
131091         Move file-scoped "static" declarations to the top.
131092         * lib/idcache.h: New file.  Include <sys/types.h> here, instead.
131094 2007-08-17  Bruno Haible  <bruno@clisp.org>
131095         and Paul Eggert  <eggert@cs.ucla.edu>
131097         * MODULES.html.sh: Add diffseq.
131098         * modules/diffseq: New file.
131099         * lib/diffseq.h: New file, from GNU gettext with a few minor changes,
131100         extracted from GNU gettext's fstrcmp.c and GNU diff's analyze.c.
131102 2007-08-15  Paul Eggert  <eggert@cs.ucla.edu>
131104         Import changes from coreutils for bootstrap script.
131106         2007-07-21  Paul Eggert  <eggert@cs.ucla.edu>
131108         * build-aux/bootstrap (slurp): Work even in environments where
131109         "ls" defaults to "ls -A".  Put in a FIXME, though, since the
131110         current code does not slurp files whose names start with ".", and
131111         this looks like it might be a troublesome area.
131113         2007-07-11  Jim Meyering  <jim@meyering.net>
131115         If there's a GPL vN copyright comment, require that N == 3.
131117         2007-07-08  Jim Meyering  <jim@meyering.net>
131119         Run the coreutils-specific code only if tests/Makefile.am.in exists.
131120         * build-aux/bootstrap (mam_template): Move definition out of loop.
131122         Create symlinks for gl/{lib,m4}/*, just as for gnulib/{lib,m4}/*.
131124         * build-aux/bootstrap (symlink_to_dir): Rename function from
131125         symlink_to_gnulib.  Add a directory parameter.  Update all
131126         callers.
131127         (cp_mark_as_generated): Also check for -- and link to -- files in
131128         gl/.
131130         2007-07-08  Jim Meyering  <jim@meyering.net>
131132         Adapt to deeper hierarchy in gnulib.
131133         * build-aux/bootstrap (symlink_to_dir): If the destination
131134         directory doesn't exist, create it. This is required at least for
131135         "lib/uniwidth/cjk.h".
131137         2007-05-15  Jim Meyering  <jim@meyering.net>
131139         * build-aux/bootstrap: Now that generated Makefile.am files
131140         are no longer under version control, they must be created at
131141         bootstrap time.
131143 2007-08-14  Ben Pfaff  <blp@gnu.org>
131145         * lib/count-one-bits.h: Add comments.  From Bruno Haible.
131147 2007-08-14  Paul Eggert  <eggert@cs.ucla.edu>
131149         * lib/count-one-bits.h: Don't include <limits.h>; no longer needed
131150         given the changes below.
131151         (COUNT_ONE_BITS): Use 'verify' rather than 'verify_true'.  Work
131152         even on hosts that have padding bits beyond the supported 64.
131154 2007-08-10  Paul Eggert  <eggert@cs.ucla.edu>
131156         * NEWS: In xstrtol, remove STRTOL_FATAL_ERROR and add xstrtol_fatal.
131157         * lib/xstrtol.h: Don't include exitfail.h; that's now internal to
131158         xstrtol.c.  Include getopt.h, since xstrtol_fatal's signature
131159         depends on it.
131160         (xstrtol_error): Remove.
131161         (xstrtol_fatal): New decl, replacing the functionality of xstrtol_error
131162         but with a different signature.
131163         (ATTRIBUTE_NORETURN, __attribute__): New macros.
131164         * lib/xstrtol-error.c: Include exitfail.h.
131165         (xstrtol_fatal): New function, with a different signature from the
131166         old xstrtol_error, so that the caller need not worry about passing
131167         in an exit status, or about storage management of the option argument.
131168         (xstrtol_error): Now a static function.  Redo signature to
131169         implement xstrtol_fatal.  Output the correct number of hyphens in
131170         front of the option so that the caller need not worry about
131171         storage management.
131172         (N_): New macro.
131173         (_): Remove; not used now.
131174         * modules/xstrtol: Depend on getopt.
131175         * tests/test-xstrtol.c (main): Use new xstrtol_error function instead
131176         of old STRTOL_FATAL_ERROR macro.
131177         * tests/test-xstrtol.sh (t-xstrtol.xo): Adjust to match new behavior
131178         of test program.
131179         * tests/test-xstrtoimax.sh (t-xstrtoimax.xo): Likewise.
131180         * tests/test-xstrtoumax.sh (t-xstrtoumax.xo): Likewise.
131182 2007-08-08  Eric Blake  <ebb9@byu.net>
131184         * lib/xstrtol-error.c: Add missing include.
131186         Move xstrtol messages into gnulib domain, when --pobase is used.
131187         * lib/xstrtol.h (_STRTOL_ERROR): Move messages out of macro...
131188         * lib/xstrtol-error.c (xstrtol_error): ...into new file.
131189         * modules/xstrtol (Files): Distribute new file.
131190         * m4/xstrtol.m4 (gl_XSTRTOL): Build new file.
131191         * lib/xstrtol.c (TESTING_XSTRTO): Move tests...
131192         * tests/test-xstrtol.c: ...into new file.
131193         * tests/test-xstrtoul.c: Also test xstrtoul.
131194         * tests/test-xstrtoimax.c: Also test xstrtoimax.
131195         * tests/test-xstrtoumax.c: Also test xstrtoumax.
131196         * tests/test-xstrtol.sh: Drive the tests.
131197         * tests/test-xstrtoimax.sh: Likewise.
131198         * tests/test-xstrtoumax.sh: Likewise.
131199         * modules/xstrtol-tests: New module.
131200         * modules/xstrtoimax-tests: Likewise.
131201         * modules/xstrtoumax-tests: Likewise.
131203 2007-08-08  Jim Meyering  <jim@meyering.net>
131205         New function: mfile_name_concat.
131206         * lib/filenamecat.c (mfile_name_concat): New function, just like
131207         file_name_concat, but return NULL upon failure rather than exiting
131208         with a diagnostic.
131209         * lib/filenamecat.h: Declare it.
131211 2007-08-07  Bruno Haible  <bruno@clisp.org>
131213         * m4/inttypes.m4 (gl_INTTYPES_H): Use GL_TRIGGER_STDC_LIMIT_MACROS
131214         instead of __STDC_LIMIT_MACROS_TRIGGER. This avoids a redefinition
131215         warning from gcc.
131216         Reported by Eric Blake.
131218 2007-08-07  Simon Josefsson  <simon@josefsson.org>
131220         * modules/crypto/arctwo (License): Use the synonymous term "LGPLv2+".
131221         * modules/crypto/arcfour (License): Likewise.
131222         * modules/crypto/des-tests (License): Likewise.
131223         * modules/crypto/gc-arctwo-tests (License): Likewise.
131224         * modules/crypto/gc-des-tests (License): Likewise.
131225         * modules/crypto/gc-hmac-md5-tests (License): Likewise.
131226         * modules/crypto/gc-hmac-sha1-tests (License): Likewise.
131227         * modules/crypto/gc-md2-tests (License): Likewise.
131228         * modules/crypto/gc-md4-tests (License): Likewise.
131229         * modules/crypto/gc-md5-tests (License): Likewise.
131230         * modules/crypto/gc-pbkdf2-sha1-tests (License): Likewise.
131231         * modules/crypto/gc-rijndael-tests (License): Likewise.
131232         * modules/crypto/gc-sha1-tests (License): Likewise.
131233         * modules/crypto/gc-tests (License): Likewise.
131234         * modules/crypto/hmac-md5 (License): Likewise.
131235         * modules/crypto/hmac-sha1 (License): Likewise.
131236         * modules/crypto/md2-tests (License): Likewise.
131237         * modules/crypto/md4-tests (License): Likewise.
131238         * modules/crypto/md5 (License): Likewise.
131239         * modules/crypto/rijndael (License): Likewise.
131240         * modules/crypto/sha1 (License): Likewise.
131241         * modules/memxor (License): Likewise.
131243 2007-08-06  Paul Eggert  <eggert@cs.ucla.edu>
131244         and Bruno Haible  <bruno@clisp.org>
131246         * NEWS: Describe interface changes to human, xstrtol.
131247         * lib/human.h: Include <xstrtol.h>.
131248         (human_options): Return enum strtol_error, not int.  Remove
131249         bool arg; take int * instead.
131250         * lib/human.c: Don't include "gettext.h".
131251         (_): Remove; no longer used.
131252         Don't include <xstrtol.h>, since human.h does it.
131253         (human_options): Adjust to abovementioned interface changes.
131254         Do not report error to stderr; that's now the caller's
131255         responsibility.
131256         * lib/xstrtol.c (main) [defined TESTING_XSTRTO]: Adjust to
131257         interface change.
131258         * lib/xstrtol.h (_STRTOL_ERROR): Take Option, Arg rather than
131259         Str, Argument_type_string.  All uses changed.  Put " argument"
131260         in diagnostics to make them clearer.  Change wording of suffix
131261         message for clarity.
131262         (STRTOL_FATAL_ERROR): Take Option, Arg rather than Str,
131263         Argument_type_string.
131264         (STRTOL_FATAL_WARN): Remove; no longer used.
131265         * modules/human (Depends-on): Remove gettext-h.
131267 2007-08-06  Simon Josefsson  <simon@josefsson.org>
131269         * build-aux/maint.mk, build-aux/GNUmakefile: Relicense to GPLv3+.
131271 2007-07-31  Bruno Haible  <bruno@clisp.org>
131273         * m4/stdint.m4 (gl_STDINT_H): Test whether WCHAR_MIN and WCHAR_MAX
131274         are defined by <stdint.h> (as opposed to <wchar.h>, as on Dragonfly).
131275         Reported by Joerg Sonnenberger <joerg@britannica.bec.de>.
131277 2007-07-31  Bruno Haible  <bruno@clisp.org>
131279         * lib/fflush.c (rpl_fflush): On BSD systems, use the __SNPT flag.
131280         Suggested by Joerg Sonnenberger <joerg@britannica.bec.de>.
131282 2007-07-30  Bruno Haible  <bruno@clisp.org>
131284         * modules/base64 (License): Use the synonymous term "LGPLv2+".
131285         * modules/c-ctype (License): Likewise.
131286         * modules/c-strcase (License): Likewise.
131287         * modules/check-version (License): Likewise.
131288         * modules/iconv (License): Likewise.
131289         * modules/iconv_open (License): Likewise.
131290         * modules/read-file (License): Likewise.
131291         * modules/striconv (License): Likewise.
131292         * modules/strverscmp (License): Likewise.
131293         * modules/vasprintf (License): Likewise.
131294         * modules/crypto/des (License): Likewise.
131295         * modules/crypto/gc (License): Likewise.
131296         * modules/crypto/gc-arcfour (License): Likewise.
131297         * modules/crypto/gc-arctwo (License): Likewise.
131298         * modules/crypto/gc-des (License): Likewise.
131299         * modules/crypto/gc-hmac-md5 (License): Likewise.
131300         * modules/crypto/gc-hmac-sha1 (License): Likewise.
131301         * modules/crypto/gc-md2 (License): Likewise.
131302         * modules/crypto/gc-md4 (License): Likewise.
131303         * modules/crypto/gc-md5 (License): Likewise.
131304         * modules/crypto/gc-pbkdf2-sha1 (License): Likewise.
131305         * modules/crypto/gc-random (License): Likewise.
131306         * modules/crypto/gc-rijndael (License): Likewise.
131307         * modules/crypto/gc-sha1 (License): Likewise.
131308         * modules/crypto/md2 (License): Likewise.
131309         * modules/crypto/md4 (License): Likewise.
131311 2007-07-30  Jim Meyering  <jim@meyering.net>
131313         * lib/fts.c (fts_read): Upon failure to chdir into a subdirectory,
131314         set fts_info to FTS_DNR, not to FTS_ERR, so that the caller knows
131315         it has valid stat data.  This bug would cause du not to count the
131316         sizes of inaccessible directories.
131317         Patch by Bryan Mason <bmason@redhat.com>, via Jose Maria Plans
131318         in <http://bugzilla.redhat.com/250077>.
131320 2007-07-25  Peter O'Gorman  <peter@pogma.com>
131321             Bruno Haible  <bruno@clisp.org>
131323         * m4/include_next.m4 (gl_INCLUDE_NEXT): Test whether #include_next
131324         really works. Needed because AIX 4.3 "xlc -E" doesn't understand
131325         #include_next, gives a diagnostic about it, but reports no error in
131326         the exit code.
131327         Reported by Gary V. Vaughan <gary@thewrittenword.com>.
131329 2007-07-24  Ben Pfaff  <blp@gnu.org>
131331         Improve name: "count-one-bits" is better than "popcount".
131332         * MODULES.html.sh: Update name.
131333         * lib/popcount.h: Renamed lib/count-one-bits.h.
131334         (popcount): Renamed count_one_bits.
131335         (popcountl): Renamed count_one_bits_l.
131336         (popcountll): Renamed count_one_bits_ll.
131337         * m4/popcount.m4: Renamed m4/count-one-bits.m4.
131338         * modules/popcount: Renamed module/count-one-bits.
131339         * modules/popcount-tests: Renamed module/count-one-bits-tests.
131340         * tests/test-popcount.c: Renamed tests/test-count-one-bits.c.
131342 2007-07-23  Ben Pfaff  <blp@gnu.org>
131344         * lib/popcount.h (popcount32): Reduce size of constants, to allow
131345         better code generation, and add U to large constants to avoid
131346         warnings, in non-GCC case.
131347         Suggested by Bruno Haible.
131349 2007-07-23  Ben Pfaff  <blp@gnu.org>
131351         * lib/popcount.h: Use verify_true instead of if...abort.
131352         * modules/popcount: Depend on verify module.
131353         Suggested by Jim Meyering.
131355 2007-07-23  Bruno Haible  <bruno@clisp.org>
131357         * gnulib-tool (func_import): Create a .cvsignore file also when the
131358         directory is not yet in CVS but the toplevel directory is. When
131359         creating a .cvsignore file, add ".deps" and ".dirstamp" to it.
131360         Reported by Karl Berry.
131362 2007-07-22  Ben Pfaff  <blp@gnu.org>
131364         * lib/popcount.h: Use faster, branchless algorithm for non-GCC
131365         case.
131366         Suggested by Eric Blake.
131368 2007-07-22  Ben Pfaff  <blp@gnu.org>
131370         New module: popcount.
131371         * MODULES.html.sh: Add popcount.
131372         * modules/popcount: New file.
131373         * modules/popcount-tests: New file.
131374         * tests/test-popcount.c: New file.
131375         * lib/popcount.h: New file.
131376         * m4/popcount.m4: New file.
131378 2007-07-22  Paul Eggert  <eggert@cs.ucla.edu>
131380         * build-aux/announce-gen: Update to GPLv3.
131382         * build-aux/config.guess: Update from config.
131384 2007-07-21  Bruno Haible  <bruno@clisp.org>
131386         * lib/error.c (_) [ENABLE_NLS]: Define to gettext.
131387         * lib/verror.c (_) [ENABLE_NLS]: Likewise.
131389 2007-07-20  Jim Meyering  <jim@meyering.net>
131391         * check-module: Diagnose a self-dependency.
131393 2007-07-19  Bruno Haible  <bruno@clisp.org>
131395         * gnulib-tool (func_import): Don't abort if pobase or po_domain is
131396         empty.
131397         Reported by Eric Blake.
131399 2007-07-18  Bruno Haible  <bruno@clisp.org>
131401         * gnulib-tool: New options --po-base, --po-domain.
131402         (func_usage): Document them.
131403         (pobase, po_domain): New variables.
131404         (func_emit_lib_Makefile_am): Augment AM_CPPFLAGS, defining
131405         DEFAULT_TEXT_DOMAIN.
131406         (func_emit_po_Makevars, func_emit_po_POTFILES_in): New functions.
131407         (func_import): Consider pobase and po_domain. Create a po/ directory.
131408         (func_create_testdir): Set pobase and po_domain to empty.
131409         * build-aux/po/Makefile.in.in: New file, from GNU gettext 0.16.1.
131410         * build-aux/po/remove-potcdate.sin: New file, from GNU gettext 0.16.1.
131412 2007-07-18  Bruno Haible  <bruno@clisp.org>
131414         * gnulib-tool (func_get_automake_snippet): Synthesize also an
131415         EXTRA_DIST augmentation for files in build-aux/.
131417 2007-07-16  Bruno Haible  <bruno@clisp.org>
131419         * modules/lseek (License): Use the synonymous term "LGPLv2+".
131420         * modules/getdelim (License): Likewise.
131422 2007-07-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
131424         * modules/arpa_inet (License): Use the synonymous term LGPLv2+.
131425         * modules/d-type (License): Likewise.
131426         * modules/extensions (License): Likewise.
131427         * modules/fnmatch (License): Likewise.
131428         * modules/fseeko (License): Likewise.
131429         * modules/getaddrinfo (License): Likewise.
131430         * modules/getline (License): Likewise.
131431         * modules/getlogin_r (License): Likewise.
131432         * modules/getpass (License): Likewise.
131433         * modules/gettimeofday (License): Likewise.
131434         * modules/glob (License): Likewise.
131435         * modules/inet_ntop (License): Likewise.
131436         * modules/malloc (License): Likewise.
131437         * modules/malloca (License): Likewise.
131438         * modules/memmem (License): Likewise.
131439         * modules/mempcpy (License): Likewise.
131440         * modules/memset (License): Likewise.
131441         * modules/minmax (License): Likewise.
131442         * modules/mktime (License): Likewise.
131443         * modules/netinet_in (License): Likewise.
131444         * modules/pathmax (License): Likewise.
131445         * modules/poll (License): Likewise.
131446         * modules/regex (License): Likewise.
131447         * modules/snprintf (License): Likewise.
131448         * modules/stdbool (License): Likewise.
131449         * modules/stdint (License): Likewise.
131450         * modules/stdio (License): Likewise.
131451         * modules/strcase (License): Likewise.
131452         * modules/strcasestr (License): Likewise.
131453         * modules/strdup (License): Likewise.
131454         * modules/string (License): Likewise.
131455         * modules/strndup (License): Likewise.
131456         * modules/strnlen (License): Likewise.
131457         * modules/strpbrk (License): Likewise.
131458         * modules/strptime (License): Likewise.
131459         * modules/strsep (License): Likewise.
131460         * modules/sys_select (License): Likewise.
131461         * modules/sys_socket (License): Likewise.
131462         * modules/sys_stat (License): Likewise.
131463         * modules/sys_time (License): Likewise.
131464         * modules/time (License): Likewise.
131465         * modules/time_r (License): Likewise.
131466         * modules/timegm (License): Likewise.
131467         * modules/unistd (License): Likewise.
131468         * modules/vsnprintf (License): Likewise.
131469         * modules/wctype (License): Likewise.
131471 2007-07-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
131473         * modules/argz (License): LGPLv2+.
131475 2007-07-15  Karl Berry  <karl@gnu.org>
131477         * doc/gnulib.texi: revise node structure per new fdl.texi.
131479 2007-07-14  Bruno Haible  <bruno@clisp.org>
131481         * lib/uniname/gen-uninames.lisp (main): Emit a "do not edit" line to
131482         the output file.
131483         * lib/uniname/uninames.h: Regenerated.
131485 2007-07-14  Karl Berry  <karl@gnu.org>
131487         * doc/*gpl*.texi, doc/fdl.texi: new versions, consistently
131488         omitting sectioning and index commands.
131490 2007-07-13  Bruno Haible  <bruno@clisp.org>
131492         New gnulib-tool option --more-symlinks.
131493         * gnulib-tool (func_usage): Document --more-symlinks.
131494         (do_copyrights): New variable.
131495         Recognize option --more-symlinks.
131496         (func_import): Don't add a copyright notice transform to
131497         sed_transform_lib_file if do_copyrights is empty.
131499 2007-07-13  Bruno Haible  <bruno@clisp.org>
131501         * lib/vasnprintf.c (decimal_point_char): Define also if
131502         (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE)
131503         && !NEED_PRINTF_DIRECTIVE_A.
131504         Reported by Clemens Koller <clemens.koller@anagramm.de> via
131505         Gary V. Vaughan <gary@gnu.org>.
131507 2007-07-13  Paul Eggert  <eggert@cs.ucla.edu>
131509         * lib/inttypes_.h: Undo previous change, since it was fixed
131510         in a different way in the 2007-07-02 fix to m4/inttypes.m4.
131512 2007-07-13  Bruno Haible  <bruno@clisp.org>
131514         * lib/stdint_.h: Fix typo: _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H was
131515         misspelled as _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H.
131517 2007-07-13  Jim Meyering  <jim@meyering.net>
131519         df: Don't fail for Tru64's "file-on-file mount".
131520         * m4/fsusage.m4 (gl_FSUSAGE): Reject Tru64's buggy statvfs,
131521         so we fall through and use statfs instead.  Details here:
131522         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10878>
131523         Reported by Albert Chin.
131525 2007-07-13  Bruno Haible  <bruno@clisp.org>
131527         * modules/alloca-opt (License): Use the synonymous term "LGPLv2+".
131528         * modules/configmake (License): Likewise.
131529         * modules/gettext (License): Likewise.
131530         * modules/gettext-h (License): Likewise.
131531         * modules/include_next (License): Likewise.
131532         * modules/link-warning (License): Likewise.
131533         * modules/localcharset (License): Likewise.
131534         * modules/localename (License): Likewise.
131535         * modules/lock (License): Likewise.
131536         * modules/relocatable-lib-lgpl (License): Likewise.
131537         * modules/size_max (License): Likewise.
131538         * modules/vasnprintf (License): Likewise.
131539         * modules/wchar (License): Likewise.
131540         * modules/xsize (License): Likewise.
131542 2007-07-13  Bruno Haible  <bruno@clisp.org>
131544         * gnulib-tool (func_import): Treat LGPLv2 as synonymous to LGPL.
131545         (func_create_testdir): Handle copying terms "GPLv2+" and "LGPLv2+".
131547 2007-07-12  Bruno Haible  <bruno@clisp.org>
131549         * doc/gnulib-intro.texi (Copyright): Clarify the license abbreviations
131550         in the modules files.
131552 2007-07-11  Karl Berry  <karl@gnu.org>
131554         * MODULES.html.sh (func_module): use
131555          sed -e '\|^'"${includefile}"'$|d'
131556          instead of /.../d, to avoid errors on $includefile's containing /.
131558 2007-07-10  Sergey Poznyakoff  <gray@gnu.org.ua>
131560         * gnulib-tool (func_import): Avoid duplication of --avoid
131561         statements
131562         (func_dest_tmpfilename,func_create_testdir): Translate `-' in file
131563         names to `_' in variable names.
131565 2007-07-10  Eric Blake  <ebb9@byu.net>
131567         * lib/version-etc.c (version_etc_va): Default to GPLv3+.
131568         * NEWS: Document this change.
131570 2007-07-08  Bruno Haible  <bruno@clisp.org>
131572         Update to Unicode 5.0.
131573         * lib/uniwidth/width.c (nonspacing_table_data): Add U+00AD,
131574         U+0350..U+035F, U+05A2, U+05BA, U+05C5, U+05C7, U+0600..U+0603,
131575         U+0610..U+0615, U+0656..U+065E, U+07EB..U+07F3, U+0A01, U+0AE2..U+0AE3,
131576         U+0CBC. Remove U+0CBF, U+0CC6. Add U+0CE2..U+0CE3, U+135F,
131577         U+17B4..U+17B5, U+17DD. Remove U+180E. Add U+1920..U+1922,
131578         U+1927..U+192B, U+1932, U+1939..U+193B, U+1A17..U+1A18, U+1B00..U+1B03,
131579         U+1B34, U+1B36..U+1B3A, U+1B3C, U+1B42, U+1B6B..U+1B73, U+1DC0..U+1DCA,
131580         U+1DFE..U+1DFF, U+20EB..U+20EF, U+A802, U+A806, U+A80B, U+A825..U+A826,
131581         U+10A01..U+10A03, U+10A05..U+10A06, U+10A0C..U+10A0F, U+10A38..U+10A3A,
131582         U+10A3F, U+1D242..U+1D244.
131583         (nonspacing_table_ind): Update.
131584         (uc_width): Assign width 0 to U+E0100..U+E01EF. Assign width 1 to
131585         U+4DC0..U+4DFF. Assign width 2 to U+2329..U+232A, U+FE10..U+FE1F.
131587 2007-07-08  Bruno Haible  <bruno@clisp.org>
131589         Update to Unicode 5.0.
131590         * lib/uniname/gen-uninames.lisp (main): Add the range 0x12xxx to the
131591         code transform. Extend the name index field of unicode_name_to_code and
131592         unicode_code_to_name from 16 to 24 bits.
131593         * lib/uniname/uniname.c (unicode_character_name,
131594         unicode_name_character): Add the range 0x12xxx to the code transform.
131595         * lib/uniname/uninames.h: Regenerated.
131596         * tests/uniname/UnicodeDataNames.txt: Update to Unicode 5.0.
131598 2007-07-07  Bruno Haible  <bruno@clisp.org>
131600         * modules/wcwidth-tests: New file.
131601         * tests/test-wcwidth.c: New file.
131603         Work around MacOS X wcwidth() bug.
131604         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Test against MacOS X 10.3 bug.
131605         * lib/wcwidth.c: Include localcharset.h, streq.h, uniwidth.h.
131606         (rpl_wcwidth): Special-case the UTF-8 locales. Fall back to the
131607         original wcwidth in non-UTF-8 locales.
131608         * modules/wcwidth (Depends-on): Add localcharset, streq,
131609         uniwidth/width.
131610         * doc/functions/wcwidth.texi: Update.
131612 2007-07-07  Bruno Haible  <bruno@clisp.org>
131614         * lib/wchar_.h: Include the GL_LINK_WARNING macro.
131615         (wcwidth): New declaration.
131616         * m4/wchar.m4 (gl_WCHAR_MODULE_INDICATOR, gl_WCHAR_H_DEFAULTS): New
131617         macros.
131618         (gl_WCHAR_H): Require gl_WCHAR_H_DEFAULTS. Don't set WCHAR_H to empty
131619         here. Prepare for creating <wchar.h> unconditionally.
131620         * modules/wchar (Depends-on): Add link-warning.
131621         (Makefile.am): Substitute also GNULIB_WCWIDTH, HAVE_DECL_WCWIDTH,
131622         REPLACE_WCWIDTH, and GL_LINK_WARNING.
131623         * lib/wcwidth.h: Remove file.
131624         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gl_WCHAR_H_DEFAULTS. Set
131625         HAVE_DECL_WCWIDTH, REPLACE_WCWIDTH, WCHAR_H.
131626         * modules/wcwidth (Files): Remove lib/wcwidth.h.
131627         (configure.ac): Invoke gl_WCHAR_MODULE_INDICATOR.
131628         (Include): Replace wcwidth.h with <wchar.h>.
131629         * lib/wcwidth.c: Include <wchar.h> instead of wcwidth.h.
131630         * lib/mbchar.h: Don't include wcwidth.h.
131631         * lib/mbswidth.c: Likewise.
131632         * NEWS: Mention the change.
131634 2007-07-07  Bruno Haible  <bruno@clisp.org>
131636         * lib/wcwidth.c: New file, extracted from lib/wcwidth.h.
131637         * lib/wcwidth.h: Don't include wctype.h. Replace inline function
131638         definition with an external declaration.
131639         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Use wcwidth.c when wcwidth is not
131640         defined as a function. Remove AC_C_INLINE requirement.
131641         * modules/wcwidth (Files): Add lib/wcwidth.c.
131642         (Makefile.am): Remove redundant statement.
131644 2007-07-07  Bruno Haible  <bruno@clisp.org>
131646         * MODULES.html.sh (Unicode string functions): Add the new modules.
131648         * tests/uniwidth/test-u32-strwidth.c: New file.
131649         * modules/uniwidth/u32-strwidth-tests: New file.
131651         * lib/uniwidth/u32-strwidth.c: New file.
131652         * modules/uniwidth/u32-strwidth: New file.
131654         * tests/uniwidth/test-u16-strwidth.c: New file.
131655         * modules/uniwidth/u16-strwidth-tests: New file.
131657         * lib/uniwidth/u16-strwidth.c: New file.
131658         * modules/uniwidth/u16-strwidth: New file.
131660         * tests/uniwidth/test-u8-strwidth.c: New file.
131661         * modules/uniwidth/u8-strwidth-tests: New file.
131663         * lib/uniwidth/u8-strwidth.c: New file.
131664         * modules/uniwidth/u8-strwidth: New file.
131666         * tests/uniwidth/test-u32-width.c: New file.
131667         * modules/uniwidth/u32-width-tests: New file.
131669         * lib/uniwidth/u32-width.c: New file.
131670         * modules/uniwidth/u32-width: New file.
131672         * tests/uniwidth/test-u16-width.c: New file.
131673         * modules/uniwidth/u16-width-tests: New file.
131675         * lib/uniwidth/u16-width.c: New file.
131676         * modules/uniwidth/u16-width: New file.
131678         * tests/uniwidth/test-u8-width.c: New file.
131679         * modules/uniwidth/u8-width-tests: New file.
131681         * lib/uniwidth/u8-width.c: New file.
131682         * modules/uniwidth/u8-width: New file.
131684         * tests/uniwidth/test-uc_width.c: New file.
131685         * modules/uniwidth/width-tests: New file.
131687         * lib/uniwidth/width.c: New file, from GNU libiconv.
131688         * lib/uniwidth/cjk.h: New file, from GNU libiconv.
131689         * modules/uniwidth/width: New file.
131691         * lib/uniwidth.h: New file, from GNU libiconv.
131692         * modules/uniwidth/base: New file.
131694 2007-07-07  Bruno Haible  <bruno@clisp.org>
131696         * lib/uniname.h: New file, from GNU gettext.
131697         * lib/uniname/gen-uninames.lisp: New file, from GNU gettext.
131698         * lib/uniname/uninames.h: New file, from GNU gettext.
131699         * lib/uniname/uniname.c: New file, from GNU gettext.
131700         * tests/uniname/test-uninames.sh: New file.
131701         * tests/uniname/test-uninames.c: New file, from GNU gettext.
131702         * tests/uniname/UnicodeDataNames.txt: New file, from GNU gettext.
131703         * modules/uniname/base: New file.
131704         * modules/uniname/uniname: New file.
131705         * modules/uniname/uniname-tests: New file.
131706         * MODULES.html.sh (Unicode string functions): Add the new modules.
131708 2007-07-06  Bruno Haible  <bruno@clisp.org>
131710         * doc/Makefile (TEXI2HTML): Specify a --reference-limit.
131712 2007-07-06  Bruno Haible  <bruno@clisp.org>
131714         * lib/sys_time_.h: Use a recursion-safe inclusion guard rather than
131715         a split double-inclusion guard. Needed for cygwin, where <sys/time.h>
131716         includes <cygwin/sys_time.h> which includes <sys/select.h> which
131717         include <sys/time.h>.
131718         Reported by Eric Blake.
131720 2007-07-06  Eric Blake  <ebb9@byu.net>
131722         Fix testing canonicalize on cygwin.
131723         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
131724         Revert patch from 2007-06-19.
131725         * tests/test-canonicalize-lgpl.c (main): Instead, skip test when
131726         canonicalize module is also in use.
131727         * tests/test-canonicalize.c: New file.
131728         * tests/test-canonicalize.sh: Likewise.
131729         * modules/canonicalize-tests: Likewise.
131731 2007-07-06  Jim Meyering  <jim@meyering.net>
131733         * lib/getugroups.c (getugroups): Detect getgrent failure.
131734         Adjust comment to reflect reality: this function may return -1.
131736 2007-07-05  Sergey Poznyakoff  <gray@gnu.org.ua>
131738         * build-aux/bootstrap (TP_URL,get_translations): Update to use
131739         the new TP address.
131740         (usage): Fix typo
131741         (gnulib_mk): New variable.
131743 2007-07-05  Jim Meyering  <jim@meyering.net>
131745         Don't let endgrent clobber errno, no matter how improbable.
131746         * lib/getugroups.c (getugroups): Save and restore errno around
131747         endgrent call.
131749         Close the group DB even when failing with 2^31 or more members.
131750         * lib/getugroups.c (getugroups): Don't return without calling endgrent.
131752 2007-07-04  Jim Meyering  <jim@meyering.net>
131754         * lib/getugroups.h: New file.
131755         * lib/getugroups.c: Include "getugroups.h".
131756         Remove uses of "register" keyword.
131757         Move local variable, "cp", down into scope where used.
131758         Give "username" parameter the "const" attribute.
131759         * modules/getugroups (Files): Add lib/getugroups.h
131761 2007-07-04  Karl Berry  <karl@gnu.org>
131763         * MODULES.html.sh (func_all_modules): Complete rename of
131764         gpl/lgpl to gpl-2.0 and lgpl-2.1, and add gpl-3.0.
131766 2007-07-02  Bruno Haible  <bruno@clisp.org>
131768         * m4/inttypes.m4 (gl_INTTYPES_H): Define __STDC_LIMIT_MACROS in C++
131769         mode, when inttypes.h comes from gnulib.
131770         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
131772 2007-07-02  Simon Josefsson  <simon@josefsson.org>
131774         * NEWS: Mention lgpl module name change.
131776         * modules/lgpl-2.1: Renamed from lgpl.
131778         * NEWS: Mention gpl module name change.
131780         * modules/gpl-3.0: New file, based on gpl-2.0.
131782         * modules/gpl-2.0: Renamed from gpl.
131784         * modules/gpl: Fix filename, doc/gpl.texi is now found at
131785         doc/gpl-2.0.texi.
131787 2007-07-02  Paul Eggert  <eggert@cs.ucla.edu>
131789         * lib/inttypes_.h [defined __cplusplus&&!defined __STDC_LIMIT_MACROS]:
131790         #define __STDC_LIMIT_MACROS temporarily while including
131791         <stdint.h>, so that __STDC_LIMIT_MACROS is defined.
131792         Problem reported by Joel E. Denny in
131793         <http://lists.gnu.org/r/bug-gnulib/2007-07/msg00008.html>.
131795 2007-07-01  Bruno Haible  <bruno@clisp.org>
131797         * lib/unistdio.h: New file.
131798         * lib/unistdio/u-asnprintf.h: New file.
131799         * lib/unistdio/u-asprintf.h: New file.
131800         * lib/unistdio/u-printf-args.c: New file.
131801         * lib/unistdio/u-printf-args.h: New file.
131802         * lib/unistdio/u-printf-parse.h: New file.
131803         * lib/unistdio/u-snprintf.h: New file.
131804         * lib/unistdio/u-sprintf.h: New file.
131805         * lib/unistdio/u-vasprintf.h: New file.
131806         * lib/unistdio/u-vsnprintf.h: New file.
131807         * lib/unistdio/u-vsprintf.h: New file.
131808         * lib/unistdio/ulc-asnprintf.c: New file.
131809         * lib/unistdio/ulc-asprintf.c: New file.
131810         * lib/unistdio/ulc-fprintf.c: New file, based on lib/fprintf.c.
131811         * lib/unistdio/ulc-printf-parse.c: New file.
131812         * lib/unistdio/ulc-snprintf.c: New file.
131813         * lib/unistdio/ulc-sprintf.c: New file.
131814         * lib/unistdio/ulc-vasnprintf.c: New file.
131815         * lib/unistdio/ulc-vasprintf.c: New file.
131816         * lib/unistdio/ulc-vfprintf.c: New file, based on lib/vfprintf.c.
131817         * lib/unistdio/ulc-vsnprintf.c: New file.
131818         * lib/unistdio/ulc-vsprintf.c: New file.
131819         * lib/unistdio/u8-asnprintf.c: New file.
131820         * lib/unistdio/u8-asprintf.c: New file.
131821         * lib/unistdio/u8-printf-parse.c: New file.
131822         * lib/unistdio/u8-snprintf.c: New file.
131823         * lib/unistdio/u8-sprintf.c: New file.
131824         * lib/unistdio/u8-vasnprintf.c: New file.
131825         * lib/unistdio/u8-vasprintf.c: New file.
131826         * lib/unistdio/u8-vsnprintf.c: New file.
131827         * lib/unistdio/u8-vsprintf.c: New file.
131828         * lib/unistdio/u8-u8-asnprintf.c: New file.
131829         * lib/unistdio/u8-u8-asprintf.c: New file.
131830         * lib/unistdio/u8-u8-snprintf.c: New file.
131831         * lib/unistdio/u8-u8-sprintf.c: New file.
131832         * lib/unistdio/u8-u8-vasnprintf.c: New file.
131833         * lib/unistdio/u8-u8-vasprintf.c: New file.
131834         * lib/unistdio/u8-u8-vsnprintf.c: New file.
131835         * lib/unistdio/u8-u8-vsprintf.c: New file.
131836         * lib/unistdio/u16-asnprintf.c: New file.
131837         * lib/unistdio/u16-asprintf.c: New file.
131838         * lib/unistdio/u16-printf-parse.c: New file.
131839         * lib/unistdio/u16-snprintf.c: New file.
131840         * lib/unistdio/u16-sprintf.c: New file.
131841         * lib/unistdio/u16-vasnprintf.c: New file.
131842         * lib/unistdio/u16-vasprintf.c: New file.
131843         * lib/unistdio/u16-vsnprintf.c: New file.
131844         * lib/unistdio/u16-vsprintf.c: New file.
131845         * lib/unistdio/u16-u16-asnprintf.c: New file.
131846         * lib/unistdio/u16-u16-asprintf.c: New file.
131847         * lib/unistdio/u16-u16-snprintf.c: New file.
131848         * lib/unistdio/u16-u16-sprintf.c: New file.
131849         * lib/unistdio/u16-u16-vasnprintf.c: New file.
131850         * lib/unistdio/u16-u16-vasprintf.c: New file.
131851         * lib/unistdio/u16-u16-vsnprintf.c: New file.
131852         * lib/unistdio/u16-u16-vsprintf.c: New file.
131853         * lib/unistdio/u32-asnprintf.c: New file.
131854         * lib/unistdio/u32-asprintf.c: New file.
131855         * lib/unistdio/u32-printf-parse.c: New file.
131856         * lib/unistdio/u32-snprintf.c: New file.
131857         * lib/unistdio/u32-sprintf.c: New file.
131858         * lib/unistdio/u32-vasnprintf.c: New file.
131859         * lib/unistdio/u32-vasprintf.c: New file.
131860         * lib/unistdio/u32-vsnprintf.c: New file.
131861         * lib/unistdio/u32-vsprintf.c: New file.
131862         * lib/unistdio/u32-u32-asnprintf.c: New file.
131863         * lib/unistdio/u32-u32-asprintf.c: New file.
131864         * lib/unistdio/u32-u32-snprintf.c: New file.
131865         * lib/unistdio/u32-u32-sprintf.c: New file.
131866         * lib/unistdio/u32-u32-vasnprintf.c: New file.
131867         * lib/unistdio/u32-u32-vasprintf.c: New file.
131868         * lib/unistdio/u32-u32-vsnprintf.c: New file.
131869         * lib/unistdio/u32-u32-vsprintf.c: New file.
131870         * tests/unistdio/test-ulc-asnprintf1.c: New file.
131871         * tests/unistdio/test-ulc-asnprintf1.h: New file.
131872         * tests/unistdio/test-ulc-printf1.h: New file.
131873         * tests/unistdio/test-ulc-vasnprintf1.c: New file.
131874         * tests/unistdio/test-ulc-vasnprintf2.c: New file.
131875         * tests/unistdio/test-ulc-vasnprintf2.sh: New file.
131876         * tests/unistdio/test-ulc-vasnprintf3.c: New file.
131877         * tests/unistdio/test-ulc-vasnprintf3.sh: New file.
131878         * tests/unistdio/test-ulc-vasprintf1.c: New file.
131879         * tests/unistdio/test-ulc-vsnprintf1.c: New file.
131880         * tests/unistdio/test-ulc-vsprintf1.c: New file.
131881         * tests/unistdio/test-u8-asnprintf1.c: New file.
131882         * tests/unistdio/test-u8-asnprintf1.h: New file.
131883         * tests/unistdio/test-u8-printf1.h: New file.
131884         * tests/unistdio/test-u8-vasnprintf1.c: New file.
131885         * tests/unistdio/test-u8-vasnprintf2.c: New file.
131886         * tests/unistdio/test-u8-vasnprintf2.sh: New file.
131887         * tests/unistdio/test-u8-vasnprintf3.c: New file.
131888         * tests/unistdio/test-u8-vasnprintf3.sh: New file.
131889         * tests/unistdio/test-u8-vasprintf1.c: New file.
131890         * tests/unistdio/test-u8-vsnprintf1.c: New file.
131891         * tests/unistdio/test-u8-vsprintf1.c: New file.
131892         * tests/unistdio/test-u16-asnprintf1.c: New file.
131893         * tests/unistdio/test-u16-asnprintf1.h: New file.
131894         * tests/unistdio/test-u16-printf1.h: New file.
131895         * tests/unistdio/test-u16-vasnprintf1.c: New file.
131896         * tests/unistdio/test-u16-vasnprintf2.c: New file.
131897         * tests/unistdio/test-u16-vasnprintf2.sh: New file.
131898         * tests/unistdio/test-u16-vasnprintf3.c: New file.
131899         * tests/unistdio/test-u16-vasnprintf3.sh: New file.
131900         * tests/unistdio/test-u16-vasprintf1.c: New file.
131901         * tests/unistdio/test-u16-vsnprintf1.c: New file.
131902         * tests/unistdio/test-u16-vsprintf1.c: New file.
131903         * tests/unistdio/test-u32-asnprintf1.c: New file.
131904         * tests/unistdio/test-u32-asnprintf1.h: New file.
131905         * tests/unistdio/test-u32-printf1.h: New file.
131906         * tests/unistdio/test-u32-vasnprintf1.c: New file.
131907         * tests/unistdio/test-u32-vasnprintf2.c: New file.
131908         * tests/unistdio/test-u32-vasnprintf2.sh: New file.
131909         * tests/unistdio/test-u32-vasnprintf3.c: New file.
131910         * tests/unistdio/test-u32-vasnprintf3.sh: New file.
131911         * tests/unistdio/test-u32-vasprintf1.c: New file.
131912         * tests/unistdio/test-u32-vsnprintf1.c: New file.
131913         * tests/unistdio/test-u32-vsprintf1.c: New file.
131914         * modules/unistdio/base: New file.
131915         * modules/unistdio/u-printf-args: New file.
131916         * modules/unistdio/ulc-asnprintf: New file.
131917         * modules/unistdio/ulc-asprintf: New file.
131918         * modules/unistdio/ulc-fprintf: New file.
131919         * modules/unistdio/ulc-printf-parse: New file.
131920         * modules/unistdio/ulc-snprintf: New file.
131921         * modules/unistdio/ulc-sprintf: New file.
131922         * modules/unistdio/ulc-vasnprintf: New file.
131923         * modules/unistdio/ulc-vasprintf: New file.
131924         * modules/unistdio/ulc-vfprintf: New file.
131925         * modules/unistdio/ulc-vsnprintf: New file.
131926         * modules/unistdio/ulc-vsprintf: New file.
131927         * modules/unistdio/u8-asnprintf: New file.
131928         * modules/unistdio/u8-asprintf: New file.
131929         * modules/unistdio/u8-printf-parse: New file.
131930         * modules/unistdio/u8-snprintf: New file.
131931         * modules/unistdio/u8-sprintf: New file.
131932         * modules/unistdio/u8-vasnprintf: New file.
131933         * modules/unistdio/u8-vasprintf: New file.
131934         * modules/unistdio/u8-vsnprintf: New file.
131935         * modules/unistdio/u8-vsprintf: New file.
131936         * modules/unistdio/u8-u8-asnprintf: New file.
131937         * modules/unistdio/u8-u8-asprintf: New file.
131938         * modules/unistdio/u8-u8-snprintf: New file.
131939         * modules/unistdio/u8-u8-sprintf: New file.
131940         * modules/unistdio/u8-u8-vasnprintf: New file.
131941         * modules/unistdio/u8-u8-vasprintf: New file.
131942         * modules/unistdio/u8-u8-vsnprintf: New file.
131943         * modules/unistdio/u8-u8-vsprintf: New file.
131944         * modules/unistdio/u16-asnprintf: New file.
131945         * modules/unistdio/u16-asprintf: New file.
131946         * modules/unistdio/u16-printf-parse: New file.
131947         * modules/unistdio/u16-snprintf: New file.
131948         * modules/unistdio/u16-sprintf: New file.
131949         * modules/unistdio/u16-vasnprintf: New file.
131950         * modules/unistdio/u16-vasprintf: New file.
131951         * modules/unistdio/u16-vsnprintf: New file.
131952         * modules/unistdio/u16-vsprintf: New file.
131953         * modules/unistdio/u16-u16-asnprintf: New file.
131954         * modules/unistdio/u16-u16-asprintf: New file.
131955         * modules/unistdio/u16-u16-snprintf: New file.
131956         * modules/unistdio/u16-u16-sprintf: New file.
131957         * modules/unistdio/u16-u16-vasnprintf: New file.
131958         * modules/unistdio/u16-u16-vasprintf: New file.
131959         * modules/unistdio/u16-u16-vsnprintf: New file.
131960         * modules/unistdio/u16-u16-vsprintf: New file.
131961         * modules/unistdio/u32-asnprintf: New file.
131962         * modules/unistdio/u32-asprintf: New file.
131963         * modules/unistdio/u32-printf-parse: New file.
131964         * modules/unistdio/u32-snprintf: New file.
131965         * modules/unistdio/u32-sprintf: New file.
131966         * modules/unistdio/u32-vasnprintf: New file.
131967         * modules/unistdio/u32-vasprintf: New file.
131968         * modules/unistdio/u32-vsnprintf: New file.
131969         * modules/unistdio/u32-vsprintf: New file.
131970         * modules/unistdio/u32-u32-asnprintf: New file.
131971         * modules/unistdio/u32-u32-asprintf: New file.
131972         * modules/unistdio/u32-u32-snprintf: New file.
131973         * modules/unistdio/u32-u32-sprintf: New file.
131974         * modules/unistdio/u32-u32-vasnprintf: New file.
131975         * modules/unistdio/u32-u32-vasprintf: New file.
131976         * modules/unistdio/u32-u32-vsnprintf: New file.
131977         * modules/unistdio/u32-u32-vsprintf: New file.
131978         * modules/unistdio/ulc-asnprintf-tests: New file.
131979         * modules/unistdio/ulc-vasnprintf-tests: New file.
131980         * modules/unistdio/ulc-vasprintf-tests: New file.
131981         * modules/unistdio/ulc-vsnprintf-tests: New file.
131982         * modules/unistdio/ulc-vsprintf-tests: New file.
131983         * modules/unistdio/u8-asnprintf-tests: New file.
131984         * modules/unistdio/u8-vasnprintf-tests: New file.
131985         * modules/unistdio/u8-vasprintf-tests: New file.
131986         * modules/unistdio/u8-vsnprintf-tests: New file.
131987         * modules/unistdio/u8-vsprintf-tests: New file.
131988         * modules/unistdio/u16-asnprintf-tests: New file.
131989         * modules/unistdio/u16-vasnprintf-tests: New file.
131990         * modules/unistdio/u16-vasprintf-tests: New file.
131991         * modules/unistdio/u16-vsnprintf-tests: New file.
131992         * modules/unistdio/u16-vsprintf-tests: New file.
131993         * modules/unistdio/u32-asnprintf-tests: New file.
131994         * modules/unistdio/u32-vasnprintf-tests: New file.
131995         * modules/unistdio/u32-vasprintf-tests: New file.
131996         * modules/unistdio/u32-vsnprintf-tests: New file.
131997         * modules/unistdio/u32-vsprintf-tests: New file.
131998         * MODULES.html.sh (Unicode string functions): Add the new modules.
132000 2007-07-01  Bruno Haible  <bruno@clisp.org>
132002         * lib/sprintf.c (sprintf): Limit the available length estimation,
132003         to avoid address wraparound.
132004         * lib/vsprintf.c (vsprintf): Likewise.
132005         * modules/sprintf-posix (Dependencies): Add stdint.
132006         * modules/vsprintf-posix (Dependencies): Likewise.
132008 2007-07-01  Bruno Haible  <bruno@clisp.org>
132010         * gnulib-tool (self_abspathname): Determine PATH_SEPARATOR and handle
132011         Windows PATH as well. Conservative double-quoting. Comments.
132013 2007-07-01  Bruno Haible  <bruno@clisp.org>
132014             Eric Blake  <ebb9@byu.net>
132015             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
132017         * gnulib-tool (self_abspathname): Fix algorithm to cope with
132018         empty components in $PATH, denoting '.'.
132020 2007-07-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
132022         * gnulib-tool: Fix indentation.
132023         (func_create_megatestdir): Likewise.
132024         Report by Bruno Haible.
132026 2007-06-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
132028         Sync from Automake.
132029         * build-aux/gnupload: Fix shell portability issues with for loops.
132030         Report by Karl Berry.
132032 2007-06-29  Simon Josefsson  <simon@josefsson.org>
132034         * build-aux/maint.mk (POURL): Use translationproject.org.
132036 2007-06-27  Simon Josefsson  <simon@josefsson.org>
132037             Bruno Haible  <bruno@clisp.org>
132039         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Require gl_HEADER_SYS_SOCKET
132040         before using HAVE_WS2TCPIP_H. Check for gai_strerror through an
132041         explicit link test, rather than AC_REPLACE_FUNCS - for mingw.
132042         (gl_PREREQ_GETADDRINFO): Require gl_HEADER_SYS_SOCKET before using
132043         HAVE_SYS_SOCKET_H and HAVE_WS2TCPIP_H.
132045 2007-06-27  Bruno Haible  <bruno@clisp.org>
132047         * build-aux/config.rpath: Upgrade to libtool-1.5.24.
132048         * build-aux/config.libpath: Upgrade to libtool-1.5.24.
132050 2007-06-26  Karl Berry  <karl@gnu.org>
132052         * MODULES.html.sh: remove xreadlink-with-size.
132054 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
132056         * lib/time_.h: Port to Solaris 8 with Sun Studio 11, using a
132057         method that I hope also handles the double-include problem noted
132058         by Bruno Haible in
132059         <http://lists.gnu.org/r/bug-gnulib/2007-05/msg00186.html>.
132061 2007-06-23  Bruno Haible  <bruno@clisp.org>
132063         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
132064         Don't let the 'mostlyclean' target fail if the last subdirectory could
132065         not be removed.
132066         Reported by Karl Berry.
132068 2007-06-23  Bruno Haible  <bruno@clisp.org>
132070         * gnulib-tool (echo): Add a speedier workaround for ksh.
132071         * tests/test-echo.sh: Likewise.
132073 2007-06-23  Bruno Haible  <bruno@clisp.org>
132075         * gnulib-tool (echo): Add workarounds also for bash versions < 2.04.
132076         * tests/test-echo.sh: Likewise.
132078 2007-06-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
132080         * gnulib-tool (IFS): Initialize early, so we don't set it to
132081         empty later.
132082         (self_abspathname): Rewrite algorithm to set it, reindent.
132083         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am)
132084         (func_create_megatestdir): Merge some sed scripts.
132086 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
132088         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Check some typos
132089         exposed by Sun Studio 11 cc on Solaris 8.
132091 2007-06-22  Bruno Haible  <bruno@clisp.org>
132093         * gnulib-tool (echo): Ensure the echo primitive does not interpret
132094         backslashes.
132095         * tests/test-echo.sh: New file.
132097 2007-06-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
132099         * gnulib-tool (func_add_or_update, func_create_testdir): Do not
132100         simplify `sed_replace_build_aux' scripts, they are portable but
132101         echoing them with `echo' is not.
132102         Report and analysis by Fernando Ferreira <fernando.prog@netcabo.pt>.
132104 2007-06-21  Karl Berry  <karl@gnu.org>
132106         * config/srclist.txt: guess we can't handle the licenses via
132107         srclist at the moment.
132109 2007-06-21  Paul Eggert  <eggert@cs.ucla.edu>
132111         * MODULES.html.sh: Add include_next.
132112         * modules/include_next: New file.
132114 2007-06-20  Paul Eggert  <eggert@cs.ucla.edu>
132116         * m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
132117         INCLUDE_NEXT.
132118         (gl_CHECK_NEXT_HEADERS): New macro.
132119         * m4/fcntl_h.m4 (gl_FCNTL_H): use gl_CHECK_NEXT_HEADERS instead of
132120         the obsolescent gl_ABSOLUTE_HEADER.
132121         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
132122         * m4/float_h.m4 (gl_FLOAT_H): Likewise.
132123         * m4/iconv_h.m4 (gl_ICONV_H): Likewise.
132124         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise.
132125         * m4/locale_h.m4 (gl_LOCALE_H): Likewise.
132126         * m4/math_h.m4 (gl_MATH_H): Likewise.
132127         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Likewise.
132128         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
132129         * m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
132130         * m4/stdint.m4 (gl_STDINT_H): Likewise.
132131         * m4/stdio_h.m4 (gl_STDIO_H): Likewise.
132132         * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
132133         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Likewise.
132134         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
132135         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
132136         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
132137         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Likewise.
132138         * m4/sysexits.m4 (gl_SYSEXITS): Likewise.
132139         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Likewise.
132140         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
132141         * m4/wchar.m4 (gl_WCHAR_H): Likewise.
132142         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
132143         * m4/inttypes.m4 (gl_INTTYPES_H): Define
132144         _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H to avoid the problem of unclean
132145         builds, since ABSOLUTE_INTTYPES_H is no longer being defined.
132146         * m4/stdint.m4 (gl_STDINT_H): Likewise, for
132147         _GL_JUST_INCLUDE_SYSTEM_STDINT_H.
132148         * lib/fcntl_.h: Use @INCLUDE_NEXT@ @NEXT_foo_H@
132149         rather than @HAVE_INCLUDE_NEXT@ and @ABSOLUTE_foo_H@.
132150         * lib/float_.h: Likewise.
132151         * lib/inttypes_.h: Likewise.
132152         * lib/math_.h: Likewise.
132153         * lib/search_.h: Likewise.
132154         * lib/signal_.h: Likewise.
132155         * lib/stdint_.h: Likewise.
132156         * lib/stdio_.h: Likewise.
132157         * lib/stdlib_.h: Likewise.
132158         * lib/string_.h: Likewise.
132159         * lib/sys_stat_.h: Likewise.
132160         * lib/sys_time_.h: Likewise.
132161         * lib/time_.h: Likewise.
132162         * lib/unistd_.h: Likewise.
132163         * lib/wchar_.h: Likewise.
132164         * lib/wctype_.h: Likewise.
132165         * lib/dirent_.h: Likewise.
132166         * lib/iconv_.h: Likewise.
132167         * lib/locale_.h: Likewise.
132168         * lib/netinet_in_.h: Likewise.
132169         * lib/sys_select_.h: Likewise.
132170         * lib/sys_socket_.h: Likewise.
132171         * lib/sysexits_.h: Likewise.
132172         * modules/fcntl (Depends-on): Depend on include_next, not
132173         absolute_header.
132174         (Makefile): Substitute INCLUDE_NEXT and NEXT_foo_H, not
132175         HAVE_INCLUDE_NEXT and ABSOLUTE_foo_H.
132176         * modules/fchdir: Likewise.
132177         * modules/float: Likewise.
132178         * modules/iconv_open: Likewise.
132179         * modules/inttypes: Likewise.
132180         * modules/locale: Likewise.
132181         * modules/math: Likewise.
132182         * modules/netinet_in: Likewise.
132183         * modules/search: Likewise.
132184         * modules/signal: Likewise.
132185         * modules/stdint: Likewise.
132186         * modules/stdio: Likewise.
132187         * modules/stdlib: Likewise.
132188         * modules/string: Likewise.
132189         * modules/sys_select: Likewise.
132190         * modules/sys_socket: Likewise.
132191         * modules/sys_stat: Likewise.
132192         * modules/sys_time: Likewise.
132193         * modules/sysexits: Likewise.
132194         * modules/time: Likewise.
132195         * modules/unistd: Likewise.
132196         * modules/wchar: Likewise.
132197         * modules/wctype: Likewise.
132198         * modules/sys_stat: Change maintainer to "all".
132199         * modules/unistd: Likewise.
132201 2007-06-20  Karl Berry  <karl@gnu.org>
132203         * config/srclist.txt: track www changes in license files.
132205 2007-06-20  Sergey Poznyakoff  <gray@gnu.org.ua>
132207         * build-aux/bootstrap: Remove stray dot.
132208         Make sure build_aux settings are honored when linking
132209         gnulib_extra_files.
132211 2007-06-19  Eric Blake  <ebb9@byu.net>
132213         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
132214         Allow compilation on cygwin.
132216 2007-06-19  Jim Meyering  <jim@meyering.net>
132218         xreadlink-with-size: Remove module.  No longer used.
132219         Ex-callers now use xreadlink or mreadlink-with-size.
132220         * modules/xreadlink-with-size: Remove module.
132221         * lib/xreadlink-with-size.c: Remove file.
132222         * lib/xreadlink.h (xreadlink_with_size): Remove prototype.
132223         (xreadlink): Remove inaccurate comment.  The one in xreadlink.c,
132224         just before the function definition *is* accurate.
132226         Eliminate one way canonicalize_filename_mode could exit.
132227         * lib/canonicalize.c (canonicalize_filename_mode):
132228         Use mreadlink_with_size, not xreadlink_with_size.
132230 2007-06-18  Paul Eggert  <eggert@cs.ucla.edu>
132232         Detect porting problems to FreeBSD/arm, which has time_t wider than
132233         long int.  Original problem reported for GNU diff by Xin Li in
132234         <http://lists.gnu.org/r/bug-gnu-utils/2007-06/msg00091.html>.
132235         * modules/getdate (Depends-on): Add intprops, verify.
132236         * lib/getdate.y: Include intprops.h, verify.h.  Verify that time_t
132237         is an integer type no wider than long int.
132239 2007-06-18  Jim Meyering  <jim@meyering.net>
132241         New module: mreadlink-with-size.
132242         * MODULES.html.sh: Add mreadlink-with-size.
132243         * modules/mreadlink-with-size: New module
132244         * modules/canonicalize (Depends-on): Depend on mreadlink-with-size,
132245         not xreadlink-with-size.
132246         * lib/mreadlink-with-size.c, lib/mreadlink.h: New files.
132248 2007-06-16  Bruno Haible  <bruno@clisp.org>
132250         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Catch the MacOS X 10.4 bug.
132251         * doc/functions/frexpl.texi: Document the MacOS X 10.4 bug.
132252         Reported by Gary V. Vaughan <gary@gnu.org>.
132254 2007-06-15  Paul Eggert  <eggert@cs.ucla.edu>
132256         Revamp lchown so that it lives in unistd.h where it belongs.
132257         * lib/lchown.h: Remove.
132258         * lib/dirchownmod.c: Don't include lib/lchown.h.
132259         * lib/fchownat.c: Likewise.
132260         * lib/openat.c: Likewise.
132261         * lib/lchown.c (REPLACE_CHOWN): Define to 0 if the system chown
132262         does not follow symlinks.
132263         (EOPNOTSUPP): Define if not defined.
132264         * lib/unistd_.h (chown): Do not replace if REPLADE_CHOWN
132265         is defined to 0.
132266         (lchown): New decl.
132267         * m4/lchown.m4 (gl_FUNC_LCHOWN): Require gl_UNISTD_H_DEFAULTS.
132268         Do not check for lchown decl.
132269         Set REPLACE_LCHOWN.
132270         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set GNULIB_LCHOWN,
132271         REPLACE_LCHOWN.
132272         * modules/chown: Make it clear it follows symlinks.
132273         * modules/lchown: Make it clear it doesn't follow symlinks.
132274         (Files): Remove lib/lchown.h
132275         (Depends-on): Add unistd.
132276         (configure.ac): Add gl_UNISTD_MODULE_INDICATOR([lchown]).
132277         (Include): Include <unistd.h>, not "lchown.h".
132278         * modules/unistd (unistd.h): Substitude GNULIB_LCHOWN and
132279         REPLACE_LCHOWN.
132281 2007-06-15  Jim Meyering  <jim@meyering.net>
132283         Change license (GPL to LGPL) of fsusage and dependents.
132284         * modules/fsusage (License): Change to LGPL.
132285         * modules/full-read (License): Likewise.
132286         * modules/full-write (License): Likewise.
132287         * modules/safe-read (License): Likewise.
132288         * modules/safe-write (License): Likewise.
132290 2007-06-14  Ben Pfaff  <blp@gnu.org>
132292         Missing part of allocsa -> malloca transition.
132293         * modules/relocatable-prog-wrapper: gl_ALLOCSA should be
132294         gl_MALLOCA.
132296 2007-06-12  Bruno Haible  <bruno@clisp.org>
132298         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Guess no when cross-compiling
132299         to ia64, x86_64, i386.
132300         Reported by Eric Blake.
132302 2007-06-12  Bruno Haible  <bruno@clisp.org>
132304         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Guess no also when
132305         cross-compiling to x86_64.
132307 2007-06-12  Paul Eggert  <eggert@cs.ucla.edu>
132309         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Fix POSIX sed portability
132310         glitch reported by Ralf Wildenhues in
132311         <http://lists.gnu.org/r/bug-gnulib/2007-06/msg00114.html>.
132313         * m4/regex.m4 (gl_REGEX): Catch a bug with [[:alnum:]_-] reported by
132314         Vin Shelton.
132316 2007-06-11  Bruno Haible  <bruno@clisp.org>
132318         * lib/printf-args.c (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Fix NULL
132319         replacement string.
132320         Reported by Eric Blake.
132322 2007-06-10  Bruno Haible  <bruno@clisp.org>
132324         Prepare vasnprintf code for use with Unicode strings.
132325         * lib/printf-args.h (PRINTF_FETCHARGS): New macro.
132326         (arg_type) [ENABLE_UNISTDIO]: Define TYPE_U8_STRING, TYPE_U16_STRING,
132327         TYPE_U32_STRING.
132328         (argument) [ENABLE_UNISTDIO]: Add a_u8_string, a_u16_string,
132329         a_u32_string variants.
132330         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
132331         * lib/printf-args.c: Don't include config.h and the specification
132332         header if PRINTF_FETCHARGS is already defined.
132333         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
132334         (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Add code for TYPE_U8_STRING,
132335         TYPE_U16_STRING, TYPE_U32_STRING.
132336         * lib/printf-parse.h [ENABLE_UNISTDIO] (u8_directive, u8_directives,
132337         u16_directive, u16_directives, u32_directive, u32_directives): New
132338         types.
132339         (ulc_printf_parse, u8_printf_parse, u16_printf_parse, u32_printf_parse):
132340         New declarations.
132341         * lib/printf-parse.c: Don't include config.h and the specification
132342         header if PRINTF_PARSE is already defined. Eliminate the set of
132343         parameters for WIDE_CHAR_VERSION; the user of this file must provide
132344         them now. Include c-ctype.h.
132345         (PRINTF_PARSE) [ENABLE_UNISTDIO]: Add code implementing the 'U'
132346         directive and CHAR_T_ONLY_ASCII.
132347         * lib/vasnprintf.c: Don't include config.h and the specification header
132348         if VASNPRINTF is already defined.
132349         (DCHAR_IS_TCHAR, DCHAR_CPY): New macros.
132350         (VASNPRINTF): Use PRINTF_FETCHARGS instead of printf_fetchargs. Use
132351         DCHAR_CPY. Handle the case that DCHAR_T and FCHAR_T are not the same
132352         type. Handle the case that TCHAR_T and FCHAR_T are not of the same
132353         size. Handle the case that DCHAR_T and TCHAR_T are not the same type,
132354         add a conversion from TCHAR_T[] to DCHAR_T[], and rework the padding
132355         code accordingly.
132356         (VASNPRINTF) [ENABLE_UNISTDIO]: Implement the 'U' directive. Enable
132357         pad_ourselves also in this case, with the 'c' and 's' directives, and
132358         with a different notion of "width".
132359         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): New macros.
132361 2007-06-10  Bruno Haible  <bruno@clisp.org>
132363         * modules/unistr/u32-mbsnlen: New file.
132364         * lib/unistr/u32-mbsnlen.c: New file.
132366         * modules/unistr/u16-mbsnlen: New file.
132367         * lib/unistr/u16-mbsnlen.c: New file.
132369         * modules/unistr/u8-mbsnlen: New file.
132370         * lib/unistr/u8-mbsnlen.c: New file.
132372         * lib/unistr.h (u8_mbsnlen, u16_mbsnlen, u32_mbsnlen): New
132373         declarations.
132375 2007-06-10  Bruno Haible  <bruno@clisp.org>
132377         * lib/string_.h (mbsnlen): New declaration.
132378         * lib/mbsnlen.c: New file.
132379         * m4/mbsnlen.m4: New file.
132380         * modules/mbsnlen: New file.
132381         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Set GNULIB_MBSNLEN.
132382         * modules/string (string.h): Substitute GNULIB_MBSNLEN.
132383         * MODULES.html.sh (Internationalization functions): Add mbsnlen.
132385 2007-06-10  Bruno Haible  <bruno@clisp.org>
132387         * lib/mbslen.c: Include <stdlib.h>, needed for MB_CUR_MAX.
132389 2007-06-10  Bruno Haible  <bruno@clisp.org>
132391         * lib/mbiter.h: Include <stddef.h>, needed for ptrdiff_t.
132392         * lib/mbuiter.h: Likewise.
132394 2007-06-10  Bruno Haible  <bruno@clisp.org>
132396         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Check for _snprintf
132397         declaration.
132399 2007-06-10  Karl Berry  <karl@gnu.org>
132401         * config/srclist.txt: remove gettext entries, Bruno prefers
132402         to update individually.
132404 2007-06-10  Bruno Haible  <bruno@clisp.org>
132406         * lib/vasnprintf.c (VASNPRINTF) [!USE_SNPRINTF]: Remove variable
132407         'maxlen'. Ensure only length + width bytes are allocated, not
132408         length + 1 + width.
132410 2007-06-09  Bruno Haible  <bruno@clisp.org>
132412         * lib/vasnprintf.c (FCHAR_T, DCHAR_T, TCHAR_T): New macros.
132413         (CHAR_T): Remove macro.
132414         (VASNPRINTF): Update.
132416 2007-06-09  Bruno Haible  <bruno@clisp.org>
132418         * MODULES.html.sh (Unicode string functions): Add the new modules.
132420         * modules/uniconv/u32-conv-to-enc: New file.
132421         * lib/uniconv/u32-conv-to-enc.c: New file.
132422         * modules/uniconv/u32-conv-to-enc-tests: New file.
132423         * tests/uniconv/test-u32-conv-to-enc.c: New file.
132425         * modules/uniconv/u16-conv-to-enc: New file.
132426         * lib/uniconv/u16-conv-to-enc.c: New file.
132427         * lib/uniconv/u-conv-to-enc.h: New file.
132428         * modules/uniconv/u16-conv-to-enc-tests: New file.
132429         * tests/uniconv/test-u16-conv-to-enc.c: New file.
132431         * modules/uniconv/u8-conv-to-enc: New file.
132432         * lib/uniconv/u8-conv-to-enc.c: New file.
132433         * modules/uniconv/u8-conv-to-enc-tests: New file.
132434         * tests/uniconv/test-u8-conv-to-enc.c: New file.
132436         * lib/uniconv.h (u8_conv_to_encoding, u16_conv_to_encoding,
132437         u32_conv_to_encoding): New declarations.
132439 2007-06-09  Bruno Haible  <bruno@clisp.org>
132441         * tests/uniconv/test-u32-strconv-to-enc.c (main): Remove unused code.
132443 2007-06-09  Bruno Haible  <bruno@clisp.org>
132445         Rename 'allocsa' -> 'malloca', 'freesa' -> 'freea'.
132446         * modules/malloca: Renamed from modules/allocsa, updated.
132447         * lib/malloca.h: Renamed from lib/allocsa.h, updated.
132448         * lib/malloca.c: Renamed from lib/allocsa.c, updated.
132449         * lib/malloca.valgrind: Renamed from lib/allocsa.valgrind, updated.
132450         * m4/malloca.m4: Renamed from m4/allocsa.m4, updated.
132451         * modules/malloca-tests: Renamed from modules/allocsa-tests, updated.
132452         * tests/test-malloca.c: Renamed from tests/test-allocsa.c, updated.
132453         * modules/xmalloca: Renamed from modules/xallocsa, updated.
132454         * lib/xmalloca.h: Renamed from lib/xallocsa.h, updated.
132455         * lib/xmalloca.c: Renamed from lib/xallocsa.c, updated.
132456         * modules/c-strcasestr (Depends-on): Update.
132457         * lib/c-strcasestr.c: Update.
132458         * modules/c-strstr (Depends-on): Update.
132459         * lib/c-strstr.c: Update.
132460         * modules/canonicalize-lgpl (Depends-on): Update.
132461         * lib/canonicalize-lgpl.c: Update.
132462         * modules/clean-temp (Depends-on): Update.
132463         * lib/clean-temp.c: Update.
132464         * modules/csharpcomp (Depends-on): Update.
132465         * lib/csharpcomp.c: Update.
132466         * modules/csharpexec (Depends-on): Update.
132467         * lib/csharpexec.c: Update.
132468         * modules/javacomp (Depends-on): Update.
132469         * lib/javacomp.c: Update.
132470         * modules/javaexec (Depends-on): Update.
132471         * lib/javaexec.c: Update.
132472         * modules/mbscasestr (Depends-on): Update.
132473         * lib/mbscasestr.c: Update.
132474         * modules/mbsstr (Depends-on): Update.
132475         * lib/mbsstr.c: Update.
132476         * modules/setenv (Depends-on): Update.
132477         * lib/setenv.c: Update.
132478         * modules/strcasestr (Depends-on): Update.
132479         * lib/strcasestr.c: Update.
132480         * modules/striconveha (Depends-on): Update.
132481         * lib/striconveha.c: Update.
132482         * modules/relocatable-prog-wrapper (Files): Update.
132483         * lib/relocwrapper.c: Update.
132484         * build-aux/install-reloc: Update.
132485         * MODULES.html.sh (Memory management functions <stdlib.h>): Update.
132487 2007-06-08  Bruno Haible  <bruno@clisp.org>
132489         Port to uClibc.
132490         * lib/fbufmode.c (fbufmode): Add special code for uClibc.
132491         * lib/fpurge.c (fpurge): Likewise.
132492         * lib/freading.c (freading): Likewise.
132493         * lib/fseeko.c (rpl_fseeko): Likewise.
132494         * lib/fseterr.c (fseterr): Likewise.
132495         * lib/fwriting.c (fwriting): Likewise.
132496         * tests/test-fflush.c (main): Avoid a failure on uClibc.
132498 2007-06-08  Bruno Haible  <bruno@clisp.org>
132500         * m4/intlmacosx.m4: New file, extracted from gettext.m4.
132501         * m4/gettext.m4 (gt_INTL_MACOSX): Remove macro, moved to intlmacosx.m4.
132502         * modules/gettext (Files): Add m4/intlmacosx.m4.
132504 2007-06-07  Bruno Haible  <bruno@clisp.org>
132506         * modules/localename-tests: New file.
132507         * tests/test-localename.c: New file.
132509         New module 'localename'.
132510         * lib/localename.h: New file.
132511         * lib/localename.c: New file, from GNU gettext.
132512         * m4/localename.m4: New file.
132513         * modules/localename: New file.
132515 2007-06-07  Bruno Haible  <bruno@clisp.org>
132517         Work around the lack of <wchar.h> on some builds of uClibc.
132518         * doc/headers/wchar.texi: Update.
132519         * lib/wchar_.h: Include <wchar.h> only if it exists.
132520         * m4/wchar.m4 (gl_WCHAR_H): Check for <wchar.h>. Set HAVE_WCHAR_H.
132521         * m4/stdint.m4 (gl_STDINT_H): Check for <wchar.h>.
132522         (gl_STDINT_TYPE_PROPERTIES): Don't try to include <wchar.h> if it
132523         doesn't exist.
132524         * modules/wchar (wchar.h): Substitute HAVE_WCHAR_H.
132525         * modules/mbfile (Depends-on): Add wchar.
132526         * modules/mbiter (Depends-on): Likewise.
132527         * modules/mbuiter (Depends-on): Likewise.
132528         Reported by Simon Josefsson.
132530 2007-06-06  Paul Eggert  <eggert@cs.ucla.edu>
132532         Work around problem reported by Steven M. Schweda in
132533         <http://lists.gnu.org/r/bug-tar/2007-06/msg00002.html>:
132534         Tru64 5.1B with the Compaq compiler environment installed declares
132535         an 'isblank' function but does not define it in the C library.
132536         * lib/fnmatch.c (isblank): Check for HAVE_ISBLANK, too.
132537         * lib/regex_internal.h (isblank): Likewise.
132538         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for isblank existence.
132539         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
132541 2007-06-05  Bruno Haible  <bruno@clisp.org>
132543         Fix *printf so that it recognizes non-IEEE numbers on i386, x86_64,
132544         ia64.
132545         * modules/printf-safe: New file.
132546         * modules/fprintf-posix (Depends-on): Add printf-safe.
132547         * modules/printf-posix (Depends-on): Likewise.
132548         * modules/snprintf-posix (Depends-on): Likewise.
132549         * modules/sprintf-posix (Depends-on): Likewise.
132550         * modules/vasnprintf-posix (Depends-on): Likewise.
132551         * modules/vasprintf-posix (Depends-on): Likewise.
132552         * modules/vfprintf-posix (Depends-on): Likewise.
132553         * modules/vprintf-posix (Depends-on): Likewise.
132554         * modules/vsnprintf-posix (Depends-on): Likewise.
132555         * modules/vsprintf-posix (Depends-on): Likewise.
132556         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Require
132557         AC_C_BIGENDIAN. Define CHECK_PRINTF_SAFE if printf-safe is used. Test
132558         non-IEEE numbers on i386, x86_64, ia64. When cross-compiling, guess
132559         "no" on i386, x86_64, ia64.
132560         * tests/test-snprintf-posix.h (LDBL80_WORDS): New macro.
132561         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
132562         on i386, x86_64, ia64.
132563         * tests/test-sprintf-posix.h (LDBL80_WORDS): New macro.
132564         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
132565         on i386, x86_64, ia64.
132566         * tests/test-vasnprintf-posix.c: Include float.h.
132567         (LDBL80_WORDS): New macro.
132568         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
132569         on i386, x86_64, ia64.
132570         * tests/test-vasprintf-posix.c: Include float.h.
132571         (LDBL80_WORDS): New macro.
132572         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
132573         on i386, x86_64, ia64.
132574         * tests/test-snprintf-posix.c: Include float.h.
132575         * tests/test-sprintf-posix.c: Likewise.
132576         * tests/test-vsnprintf-posix.c: Likewise.
132577         * tests/test-vsprintf-posix.c: Likewise.
132579 2007-06-05  Bruno Haible  <bruno@clisp.org>
132581         Fix isnanl so that it recognizes non-IEEE numbers on i386, x86_64, ia64.
132582         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Require AC_C_BIGENDIAN. Test
132583         non-IEEE numbers on i386, x86_64, ia64.
132584         (gl_LONG_DOUBLE_EXPONENT_LOCATION): Require AC_C_BIGENDIAN.
132585         * lib/isnan.c (FUNC): Add special code for i386, x86_64, ia64.
132586         * tests/test-isnanl.h: Include float.h.
132587         (main): Check also non-IEEE numbers on i386, x86_64, ia64.
132589 2007-06-05  Bruno Haible  <bruno@clisp.org>
132591         * lib/vasnprintf.c (VASNPRINTF): Do the extra handling of NaN and Inf
132592         also the %a / %A. Handle the %a / %A code before this extra handling.
132594 2007-06-05  Bruno Haible  <bruno@clisp.org>
132596         * lib/vasnprintf.c [NEED_PRINTF_LONG_DOUBLE ||
132597         NEED_PRINTF_INFINITE_LONG_DOUBLE]: Include fpucw.h.
132599 2007-06-05  Bruno Haible  <bruno@clisp.org>
132601         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): Fix
132602         typo in variable name.
132604 2007-06-05  Eric Blake  <ebb9@byu.net>
132606         * m4/lseek.m4 (gl_FUNC_LSEEK): Work when cross-compiling.
132607         Reported by Simon Josefsson.
132609 2007-06-04  Bruno Haible  <bruno@clisp.org>
132611         Avoid test failures on some PowerPC platforms.
132612         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP):
132613         Define differently for PowerPC.
132614         * tests/test-frexpl.c (MIN_NORMAL_EXP): Likewise.
132615         Reported by Gary V. Vaughan <gary@gnu.org>.
132617 2007-06-02  Bruno Haible  <bruno@clisp.org>
132619         Fix test-stdint failure on FreeBSD/ia64.
132620         * m4/stdint.m4 (gl_STDINT_H): Check the values of PTRDIFF_MIN,
132621         PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN,
132622         WCHAR_MAX, WINT_MIN, WINT_MAX entirely, not only for plausibility.
132623         * doc/headers/stdint.texi: Update.
132625 2007-06-01  Bruno Haible  <bruno@clisp.org>
132627         * tests/test-binary-io.c (main): Pass a third argument to open().
132628         Reported by Gary V. Vaughan <gary@gnu.org>.
132630 2007-06-01  Bruno Haible  <bruno@clisp.org>
132632         * doc/functions/frexpl.texi: Update for mingw.
132634 2007-06-01  Bruno Haible  <bruno@clisp.org>
132636         * tests/test-lseek.c (main): Disable test of errno for invalid third
132637         argument.
132638         * doc/functions/lseek.texi: Update.
132639         Reported by Gary V. Vaughan <gary@gnu.org>.
132641 2007-05-28  Bruno Haible  <bruno@clisp.org>
132643         * m4/intl.m4 (AM_INTL_SUBDIR): Substitute variables WOE32, WINDRES.
132645 2007-05-31  Eric Blake  <ebb9@byu.net>
132647         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Guess no on mingw when
132648         cross compiling.
132650 2007-05-30  Eric Blake  <ebb9@byu.net>
132651         and Bruno Haible  <bruno@clisp.org>
132653         Work around mingw test failures exposed by m4-1.4.9b.
132654         * m4/stdint.m4 (gl_STDINT_H): Detect mingw bug.
132655         * tests/test-unistd.c: Disable uid_t and git_t tests for the
132656         moment.
132658 2007-05-30  Bruno Haible  <bruno@clisp.org>
132660         * tests/test-lseek.c: Explicitly close file descriptors 0 and 1 before
132661         assuming that they are closed. Needed on HP-UX 11.
132663 2007-05-29  Bruno Haible  <bruno@clisp.org>
132665         Fix a problem with #include_next.
132666         * lib/dirent_.h: Split the double-inclusion guard.
132667         * lib/fcntl_.h: Likewise.
132668         * lib/float_.h: Likewise.
132669         * lib/iconv_.h: Likewise.
132670         * lib/inttypes_.h: Likewise.
132671         * lib/locale_.h: Likewise.
132672         * lib/math_.h: Likewise.
132673         * lib/netinet_in_.h: Likewise.
132674         * lib/search_.h: Likewise.
132675         * lib/signal_.h: Likewise.
132676         * lib/stdint_.h: Likewise.
132677         * lib/stdio_.h: Likewise.
132678         * lib/stdlib_.h: Likewise.
132679         * lib/string_.h: Likewise.
132680         * lib/sys_select_.h: Likewise.
132681         * lib/sys_socket_.h: Likewise.
132682         * lib/sys_stat_.h: Likewise.
132683         * lib/sys_time_.h: Likewise.
132684         * lib/sysexits_.h: Likewise.
132685         * lib/time_.h: Likewise.
132686         * lib/unistd_.h: Likewise.
132687         * lib/wchar_.h: Likewise.
132688         * lib/wctype_.h: Likewise.
132690 2007-05-29  Bruno Haible  <bruno@clisp.org>
132692         * tests/test-unistd.c: Disable the tests for useconds_t and intptr_t
132693         for the moment.
132695 2007-05-29  Bruno Haible  <bruno@clisp.org>
132697         * m4/isnan.m4 (gl_DOUBLE_EXPONENT_LOCATION): Silence the AC_C_BIGENDIAN
132698         invocation.
132699         Reported by Eric Blake.
132701 2007-05-29  Bruno Haible  <bruno@clisp.org>
132703         * m4/isnanf.m4 (gl_FLOAT_EXPONENT_LOCATION): Fix typo in cross-
132704         compiling case.
132706 2007-05-29  Eric Blake  <ebb9@byu.net>
132707             Bruno Haible  <bruno@clisp.org>
132709         * m4/isnanf.m4 (gl_FUNC_ISNANF_NO_LIBM): Avoid syntax error on
132710         cross compiles.
132712 2007-05-28  Eric Blake  <ebb9@byu.net>
132714         * modules/closein-tests (test_closein_LDADD): Support test on
132715         cygwin with libtool.
132717 2007-05-28  Bruno Haible  <bruno@clisp.org>
132719         * tests/uniconv/test-u16-conv-from-enc.c: Remove #ifdef HAVE_CONFIG_H.
132720         * tests/uniconv/test-u16-strconv-from-enc.c: Likewise.
132721         * tests/uniconv/test-u16-strconv-to-enc.c: Likewise.
132722         * tests/uniconv/test-u32-conv-from-enc.c: Likewise.
132723         * tests/uniconv/test-u32-strconv-from-enc.c: Likewise.
132724         * tests/uniconv/test-u32-strconv-to-enc.c: Likewise.
132725         * tests/uniconv/test-u8-conv-from-enc.c: Likewise.
132726         * tests/uniconv/test-u8-strconv-from-enc.c: Likewise.
132727         * tests/uniconv/test-u8-strconv-to-enc.c: Likewise.
132729 2007-05-28  Eric Blake  <ebb9@byu.net>
132731         Unconditionally include <config.h> in unit tests.
132732         * tests/test-alloca-opt.c: Remove #ifdef HAVE_CONFIG_H.
132733         * tests/test-allocsa.c, tests/test-arcfour.c,
132734         tests/test-arctwo.c, tests/test-argmatch.c, tests/test-argp.c,
132735         tests/test-array_list.c, tests/test-array_oset.c,
132736         tests/test-atexit.c, test-avltree_list.c, test-avltree_oset.c,
132737         test-avltreehash_list.c, test-base64.c, test-binary-io.c,
132738         test-c-ctype.c, test-c-strcasecmp.c, test-c-strcasestr.c,
132739         test-c-strncasecmp.c, test-c-strstr.c, test-canonicalize-lgpl.c,
132740         test-carray_list.c, test-crc.c, test-des.c, test-dirname.c,
132741         test-fflush.c, test-fprintf-posix.c, test-gc-arcfour.c,
132742         test-gc-arctwo.c, test-gc-des.c, test-gc-hmac-md5.c,
132743         test-gc-hmac-sha1.c, test-gc-md2.c, test-gc-md4.c, test-gc-md5.c,
132744         test-gc-pbkdf2-sha1.c, test-gc-rijndael.c, test-gc-sha1.c,
132745         test-gc.c, test-getpass.c, test-hmac-md5.c, test-hmac-sha1.c,
132746         test-iconv.c, test-linked_list.c, test-linkedhash_list.c,
132747         test-lock.c, test-mbscasecmp.c, test-mbscasestr1.c,
132748         test-mbscasestr2.c, test-mbscasestr3.c, test-mbscasestr4.c,
132749         test-mbschr.c, test-mbscspn.c, test-mbsncasecmp.c, test-mbspbrk.c,
132750         test-mbspcasecmp.c, test-mbsrchr.c, test-mbsspn.c, test-mbsstr1.c,
132751         test-mbsstr2.c, test-mbsstr3.c, test-md2.c, test-md4.c,
132752         test-md5.c, test-memmem.c, test-printf-posix.c,
132753         test-rbtree_list.c, test-rbtree_oset.c, test-rbtreehash_list.c,
132754         test-read-file.c, test-rijndael.c, test-snprintf-posix.c,
132755         test-snprintf.c, test-sprintf-posix.c, test-stdint.c,
132756         test-strcasestr.c, test-striconv.c, test-striconveh.c,
132757         test-striconveha.c, test-tls.c, test-vasnprintf-posix.c,
132758         test-vasnprintf-posix2.c, test-vasnprintf.c,
132759         test-vasprintf-posix.c, test-vasprintf.c, test-verify.c,
132760         test-vfprintf-posix.c, test-vprintf-posix.c,
132761         test-vsnprintf-posix.c, test-vsnprintf.c, test-vsprintf-posix.c,
132762         test-xvasprintf.c: Likewise.
132764 2007-05-28  Bruno Haible  <bruno@clisp.org>
132766         * gnulib-tool (func_import): Remember the --with-tests command-line
132767         option through the macro gl_WITH_TESTS in the gnulib-cache.m4.
132768         Reported by Eric Blake.
132770 2007-05-28  Bruno Haible  <bruno@clisp.org>
132772         * modules/ftell-tests: New file.
132773         * tests/test-ftell.c: New file, based on tests/test-ftello.c.
132774         * tests/test-ftell.sh: New file, based on tests/test-ftello.sh.
132776         * lib/ftell.c: New file.
132777         * modules/ftell: New file.
132778         * m4/ftell.m4: New file.
132779         * doc/functions/ftell.texi: Update.
132780         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELL,
132781         REPLACE_FTELL.
132782         * lib/stdio_.h (rpl_ftell): New declaration.
132783         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELL,
132784         REPLACE_FTELL.
132786 2007-05-28  Eric Blake  <ebb9@byu.net>
132788         * lib/allocsa.h (safe_alloca): Avoid compiler warning.
132790 2007-05-28  Bruno Haible  <bruno@clisp.org>
132792         * modules/fseek-tests: New file.
132793         * tests/test-fseek.c: New file, based on tests/test-fseeko.c.
132794         * tests/test-fseek.sh: New file, based on tests/test-fseeko.sh.
132796         * lib/fseek.c: New file.
132797         * modules/fseek: New file.
132798         * m4/fseek.m4: New file.
132799         * doc/functions/fseek.texi: Update.
132800         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEK,
132801         REPLACE_FSEEK.
132802         * lib/stdio_.h (rpl_fseek): New declaration.
132803         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEK,
132804         REPLACE_FSEEK.
132806 2007-05-28  Bruno Haible  <bruno@clisp.org>
132808         * lib/stdio_.h (fflush): More comments.
132810 2007-05-28  Bruno Haible  <bruno@clisp.org>
132812         * m4/lseek.m4 (gl_FUNC_LSEEK): When not cross-compiling, perform a real
132813         runtime test.
132815 2007-05-28  Eric Blake  <ebb9@byu.net>
132817         Improve lseek module.
132818         * lib/lseek.c (rpl_lseek): Detect EBADF on mingw.
132819         * lib/unistd_.h (lseek): Scale back link warning message.
132820         * tests/test-lseek.c: Beef up test.
132821         * tests/test-lseek.sh: Exercise more facets of lseek.
132822         Reported by Bruno Haible.
132824 2007-05-28  Bruno Haible  <bruno@clisp.org>
132826         * tests/test-unistd.c: Test all the types that <unistd.h> is expected
132827         to define.
132829 2007-05-27  Bruno Haible  <bruno@clisp.org>
132831         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-31 patch.
132833 2007-05-27  Bruno Haible  <bruno@clisp.org>
132835         * modules/openmp: New file.
132836         * m4/openmp.m4: New file, taken from autoconf's CVS with changes by
132837         Noah Misch.
132839 2007-05-26  Bruno Haible  <bruno@clisp.org>
132841         * modules/chdir-long (Depends-on): Add fchdir.
132842         * modules/chdir-safer (Depends-on): Likewise.
132843         * modules/fts (Depends-on): Likewise.
132844         * modules/fts-lgpl (Depends-on): Likewise.
132845         * modules/openat (Depends-on): Likewise.
132846         * modules/savewd (Depends-on): Likewise.
132848 2007-05-24  Eric Blake  <ebb9@byu.net>
132850         Fix lseek on mingw.
132851         * modules/lseek: New module.
132852         * m4/lseek.m4: New file.
132853         * lib/lseek.c: New file.
132854         * modules/lseek-tests: New file.
132855         * tests/test-lseek.c: New file.
132856         * tests/test-lseek.sh: New file.
132857         * MODULES.html.sh: Document lseek module.
132858         * modules/fflush (Depends-on): Add lseek, fseeko.
132859         * modules/fseeko (Depends-on): Likewise.
132860         * modules/ftello (Depends-on): Likewise.
132861         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Replace fseek[o] if lseek is
132862         broken.
132863         * m4/ftello.m4 (gl_FUNC_FTELLO): Replace ftell[o] if lseek is
132864         broken.
132865         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Trigger fseeko module.
132866         * lib/fseeko.c (rpl_fseeko): Quit early on non-seekable files.
132867         * lib/ftello.c (rpl_ftello): Likewise.
132868         * tests/test-fseeko.c (main): Test this.
132869         * tests/test-fseeko.sh: Likewise.
132870         * tests/test-ftello.c (main): Likewise.
132871         * tests/test-ftello.sh: Likewise.
132872         * lib/stdio_.h (fseek, ftell): Simplify, since missing fseeko now
132873         implies replacing fseek.
132874         * modules/stdio (Makefile.am): No longer need HAVE_FSEEKO,
132875         HAVE_FTELLO.
132876         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add lseek info.
132877         * modules/unistd (Makefile.am): Likewise.
132878         * lib/unistd_.h (lseek): Declare a replacement.
132879         * doc/functions/lseek.texi (lseek): Document this fix.
132880         * doc/functions/fseek.texi (fseek): Likewise.
132881         * doc/functions/ftell.texi (ftell): Likewise.
132883 2007-05-24  Bruno Haible  <bruno@clisp.org>
132885         * tests/test-vasnprintf-posix.c (test_function): Allow up to 50 bytes
132886         in the printed representation of a NaN.
132887         * tests/test-vasprintf-posix.c (test_function): Likewise.
132888         * tests/test-snprintf-posix.h (test_function): Likewise.
132889         * tests/test-sprintf-posix.h (test_function): Likewise.
132890         Reported by Eric Blake.
132892 2007-05-23  Eric Blake  <ebb9@byu.net>
132894         Fix fseeko/ftello on cygwin 1.5.24.
132895         * doc/functions/fseeko.texi (fseeko): Document the fix.
132896         * doc/functions/ftello.texi (ftello): Document the fix.
132897         * doc/functions/stdin.texi (stdin): Document the cygwin bug.
132898         * doc/functions/stdout.text (stdout): New file.
132899         * doc/functions/stderr.text (stderr): New file.
132900         * doc/gnulib.texi (Function Substitutes): Use new files.
132901         * tests/test-fseeko.c (main): Check for broken fseeko on cygwin
132902         prior to 1.7.0.
132903         * tests/test-ftello.c (main): Likewise for ftello.
132904         * tests/test-fseeko.sh: New file.
132905         * tests/test-ftello.sh: New file.
132906         * modules/fseeko-tests (Makefile.am): Ensure test-fseeko is run
132907         with seekable stdin.
132908         * modules/ftello-tests (Makefile.am): Likewise for test-ftello.
132909         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Detect the cygwin bug.
132910         (gl_REPLACE_FSEEKO): New macro.
132911         * m4/ftello.m4 (gl_FUNC_FTELLO, gl_REPLACE_FTELLO): Likewise.
132912         * modules/fseeko (Files): Distribute fseeko.c.
132913         * modules/ftello (Files): Distribute ftello.c.
132914         * lib/fseeko.c (rpl_fseeko) [__CYGWIN__]: Convert stdin to 64-bit
132915         mode.
132916         * lib/ftello.c (rpl_ftello): New file.
132917         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Allow replacement of
132918         fseeko, ftello.
132919         (gl_STDIN_LARGE_OFFSET): New macro.
132920         * modules/stdio (Makefile.am): Perform the replacement.
132921         * lib/stdio_.h (rpl_fseeko, rpl_ftello): Define when needed.
132923 2007-05-23  Bruno Haible  <bruno@clisp.org>
132925         * lib/stdio_.h (fseeko, ftello): Provide a link warning only if
132926         GNULIB_POSIXCHECK is defined.
132928 2007-05-21  Bruno Haible  <bruno@clisp.org>
132930         * m4/printf.m4 (gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE):
132931         Check also the output for NaN arguments. When cross-compiling, guess
132932         no on IRIX.
132933         * lib/vasnprintf.c: Update comments.
132934         * tests/test-vasnprintf-posix.c (strisnan): New function.
132935         (test_function): Use it.
132936         * tests/test-vasprintf-posix.c (strisnan): New function.
132937         (test_function): Use it.
132938         * tests/test-snprintf-posix.h (strisnan): New function.
132939         (test_function): Use it.
132940         * tests/test-sprintf-posix.h (strisnan): New function.
132941         (test_function): Use it.
132942         Reported by Eric Blake.
132944 2007-05-20  Bruno Haible  <bruno@clisp.org>
132946         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Add test for large finite
132947         numbers that fails on BeOS.
132948         * doc/functions/frexpl.texi: Update.
132950 2007-05-20  Jim Meyering  <jim@meyering.net>
132952         * NEWS: Mention the incompatible change (s/futimens/gl_futimens/)
132953         forced upon us by glibc-2.6.
132955 2007-05-20  Bruno Haible  <bruno@clisp.org>
132957         Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
132958         * m4/printf.m4 (gl_PRINTF_INFINITE): Update cross-compiling guesses.
132959         (gl_PRINTF_INFINITE_LONG_DOUBLE): New macro.
132960         * lib/vasnprintf.c: Use NEED_PRINTF_INFINITE_DOUBLE instead of
132961         NEED_PRINTF_INFINITE.
132962         (is_infinitel): New function.
132963         (VASNPRINTF): Handle NEED_PRINTF_INFINITE_LONG_DOUBLE case.
132964         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE): Renamed from
132965         gl_PREREQ_VASNPRINTF_INFINITE.
132966         (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): New macro.
132967         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
132968         gl_PRINTF_INFINITE_LONG_DOUBLE and test its result. Invoke
132969         gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE and
132970         gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE instead of
132971         gl_PREREQ_VASNPRINTF_INFINITE.
132972         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
132973         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
132974         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
132975         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
132976         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
132977         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
132978         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
132979         * doc/functions/fprintf.texi: Update.
132980         * doc/functions/printf.texi: Update.
132981         * doc/functions/snprintf.texi: Update.
132982         * doc/functions/sprintf.texi: Update.
132983         * doc/functions/vfprintf.texi: Update.
132984         * doc/functions/vprintf.texi: Update.
132985         * doc/functions/vsnprintf.texi: Update.
132986         * doc/functions/vsprintf.texi: Update.
132988 2007-05-20  Bruno Haible  <bruno@clisp.org>
132990         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): Set REPLACE_FREXPL if frexpl
132991         was not found in libc.
132992         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Likewise.
132994 2007-05-20  Bruno Haible  <bruno@clisp.org>
132996         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
132997         printed as "-nan" instead of "nan".
132998         * tests/test-vasprintf-posix.c (test_function): Likewise.
132999         * tests/test-snprintf-posix.h (test_function): Likewise.
133000         * tests/test-sprintf-posix.h (test_function): Likewise.
133001         Needed for HP-UX 11.
133003 2007-05-20  Jim Meyering  <jim@meyering.net>
133005         Fix buggy test for the fchownat-deref bug.
133006         * m4/openat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Create the dangling
133007         symlink required for the run-test.  Without it, this test would
133008         always declare that fchownat doesn't work, and client code would
133009         unnecessarily use the replacement function with fixed libc.
133010         (gl_FUNC_FCHOWNAT): Eliminate a variable that wasn't initialized.
133011         Reported by Greg Schafer.
133013 2007-05-19  Bruno Haible  <bruno@clisp.org>
133015         * m4/isnanf.m4 (gl_ISNANF_WORKS): New macro.
133016         (gl_FUNC_ISNANF_NO_LIBM): Invoke it.
133017         * lib/isnan.c (FUNC): Use run-time expressions for SGI compiler.
133018         Needed for IRIX 6.5 and Solaris 2.5.1.
133020 2007-05-19  Bruno Haible  <bruno@clisp.org>
133022         * tests/test-vasnprintf-posix.c (have_minus_zero): New function.
133023         (test_function): Skip tests involving -0.0 on platforms where
133024         -0.0 = 0.0.
133025         * tests/test-vasprintf-posix.c (have_minus_zero): New function.
133026         (test_function): Skip tests involving -0.0 on platforms where
133027         -0.0 = 0.0.
133028         * tests/test-snprintf-posix.h (have_minus_zero): New function.
133029         (test_function): Skip tests involving -0.0 on platforms where
133030         -0.0 = 0.0.
133031         * tests/test-sprintf-posix.h (have_minus_zero): New function.
133032         (test_function): Skip tests involving -0.0 on platforms where
133033         -0.0 = 0.0.
133034         * tests/test-fprintf-posix.h (test_function): Remove all -0.0 related
133035         tests.
133036         * tests/test-printf-posix.h (test_function): Likewise.
133037         * tests/test-printf-posix.output: Remove all -0.0 related results.
133038         Needed for IRIX 6.5.
133040 2007-05-19  Bruno Haible  <bruno@clisp.org>
133042         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
133043         printed as "nan0x7fffffff" instead of "nan".
133044         * tests/test-vasprintf-posix.c (test_function): Likewise.
133045         * tests/test-snprintf-posix.h (test_function): Likewise.
133046         * tests/test-sprintf-posix.h (test_function): Likewise.
133047         * tests/test-fprintf-posix.h (NaN): Remove macro.
133048         (test_function): Remove all NaN related tests.
133049         * tests/test-printf-posix.h (NaN): Remove macro.
133050         (test_function): Remove all NaN related tests.
133051         * tests/test-printf-posix.output: Remove all NaN related results.
133052         Needed for IRIX 6.5.
133054 2007-05-19  Bruno Haible  <bruno@clisp.org>
133056         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Fix C89 syntax error in test code.
133057         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Likewise.
133059 2007-05-19  Bruno Haible  <bruno@clisp.org>
133061         * lib/float_.h: New file.
133062         * m4/float_h.m4: New file.
133063         * modules/float: New file.
133064         * modules/isnanl (Dependencies): Add float.
133065         * modules/isnanl-nolibm (Dependencies): Likewise.
133066         * modules/mathl (Dependencies): Likewise.
133067         * modules/printf-frexpl (Dependencies): Likewise.
133068         * modules/signbit (Dependencies): Likewise.
133069         * modules/vasnprintf (Dependencies): Likewise.
133070         * doc/headers/float.texi: Update.
133072 2007-05-19  Jim Meyering  <jim@meyering.net>
133074         * lib/utimens.c (gl_futimens): Rename from futimens,
133075         now that glibc-2.6 declares futimens.
133076         * lib/utimens.h: Likewise.
133078 2007-05-19  Bruno Haible  <bruno@clisp.org>
133080         Avoid test failures on mingw.
133081         * tests/test-fprintf-posix.sh: Convert CR/LF to LF in output.
133082         * tests/test-printf-posix.sh: Likewise.
133083         * tests/test-vfprintf-posix.sh: Likewise.
133084         * tests/test-vprintf-posix.sh: Likewise.
133086 2007-05-19  Bruno Haible  <bruno@clisp.org>
133088         Fix *printf result for NaN, Inf, -0.0 on mingw.
133089         * m4/printf.m4 (gl_PRINTF_INFINITE): New macro.
133090         * lib/vasnprintf.c: Include math.h and isnan.h.
133091         (is_infinite_or_zero): New function.
133092         (VASNPRINTF): Fix also the handling of infinite or zero 'double'
133093         values in the %f, %F, %e, %E, %g, %G directives.
133094         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE): New macro.
133095         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
133096         gl_PRINTF_INFINITE and test its result. Invoke
133097         gl_PREREQ_VASNPRINTF_INFINITE.
133098         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
133099         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
133100         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
133101         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
133102         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
133103         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
133104         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
133105         * doc/functions/fprintf.texi: Update.
133106         * doc/functions/printf.texi: Update.
133107         * doc/functions/snprintf.texi: Update.
133108         * doc/functions/sprintf.texi: Update.
133109         * doc/functions/vfprintf.texi: Update.
133110         * doc/functions/vprintf.texi: Update.
133111         * doc/functions/vsnprintf.texi: Update.
133112         * doc/functions/vsprintf.texi: Update.
133114 2007-05-19  Bruno Haible  <bruno@clisp.org>
133116         * lib/vasnprintf.c (convert_to_decimal): Add an extra_zeroes argument.
133117         (scale10_round_decimal_long_double): Inline scale10_round_long_double.
133118         Instead of multiplying with 10^k, set extra_zeroes to k.
133119         (scale10_round_long_double): Remove function.
133121 2007-05-18  Bruno Haible  <bruno@clisp.org>
133123         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Fix logic bug
133124         introduced on 2007-05-06.
133126 2007-05-18  Bruno Haible  <bruno@clisp.org>
133128         * tests/test-vasnprintf-posix.c (test_function): Also test the %e and
133129         %g directives.
133130         * tests/test-vasprintf-posix.c (test_function): Likewise.
133131         * tests/test-snprintf-posix.h (test_function): Likewise.
133132         * tests/test-sprintf-posix.h (test_function): Likewise.
133134 2007-05-18  Bruno Haible  <bruno@clisp.org>
133136         * tests/test-vasnprintf-posix.c (SIZEOF): New macro.
133137         (strmatch): New function.
133138         (test_function): Test the %f directive on numbers of various exponents.
133139         * tests/test-vasprintf-posix.c (SIZEOF): New macro.
133140         (strmatch): New function.
133141         (test_function): Test the %f directive on numbers of various exponents.
133142         * tests/test-snprintf-posix.h (strmatch): New function.
133143         (test_function): Test the %f directive on numbers of various exponents.
133144         * tests/test-sprintf-posix.h (strmatch): New function.
133145         (test_function): Test the %f directive on numbers of various exponents.
133146         * tests/test-snprintf-posix.c (SIZEOF): New macro.
133147         * tests/test-sprintf-posix.c (SIZEOF): New macro.
133148         * tests/test-vsnprintf-posix.c (SIZEOF): New macro.
133149         * tests/test-vsprintf-posix.c (SIZEOF): New macro.
133151 2007-05-18  Bruno Haible  <bruno@clisp.org>
133153         Add support for 'long double' number output.
133154         * m4/printf.m4 (gl_PRINTF_LONG_DOUBLE): New macro.
133155         * lib/vasnprintf.c: Include math.h and float+.h.
133156         (mp_limb_t): New type.
133157         (GMP_LIMB_BITS): New macro.
133158         (mp_twolimb_t): New type.
133159         (GMP_TWOLIMB_BITS): New macro.
133160         (mpn_t): New type.
133161         (multiply, divide, convert_to_decimal, decode_long_double,
133162         scale10_round_long_double, scale10_round_decimal_long_double,
133163         floorlog10l): New functions.
133164         (VASNPRINTF) [NEED_PRINTF_LONG_DOUBLE]: Implement 'long double' support
133165         for the %f, %F, %e, %E, %g, %G directives.
133166         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_LONG_DOUBLE): New macro.
133167         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
133168         gl_PRINTF_LONG_DOUBLE and test its result. Invoke
133169         gl_PREREQ_VASNPRINTF_LONG_DOUBLE.
133170         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
133171         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
133172         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
133173         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
133174         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
133175         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
133176         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
133177         * modules/fprintf-posix (Depends-on): Add frexpl-nolibm.
133178         * modules/snprintf-posix (Depends-on): Likewise.
133179         * modules/sprintf-posix (Depends-on): Likewise.
133180         * modules/vasnprintf-posix (Depends-on): Likewise.
133181         * modules/vasprintf-posix (Depends-on): Likewise.
133182         * modules/vfprintf-posix (Depends-on): Likewise.
133183         * modules/vsnprintf-posix (Depends-on): Likewise.
133184         * modules/vsprintf-posix (Depends-on): Likewise.
133185         * modules/vasnprintf (Files): Add lib/float+.h.
133186         * doc/functions/fprintf.texi: Update.
133187         * doc/functions/printf.texi: Update.
133188         * doc/functions/snprintf.texi: Update.
133189         * doc/functions/sprintf.texi: Update.
133190         * doc/functions/vfprintf.texi: Update.
133191         * doc/functions/vprintf.texi: Update.
133192         * doc/functions/vsnprintf.texi: Update.
133193         * doc/functions/vsprintf.texi: Update.
133195 2007-05-18  Bruno Haible  <bruno@clisp.org>
133197         * lib/vasnprintf.c (USE_SNPRINTF): Define to 0 on BeOS.
133199 2007-05-18  Bruno Haible  <bruno@clisp.org>
133201         * lib/vasnprintf.c (VASNPRINTF) [WIN32]: Use %I64d instead of %lld
133202         for printing 64-bit integers. Needed for mingw.
133204 2007-05-18  Bruno Haible  <bruno@clisp.org>
133206         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
133207         gl_FUNC_FREXPL_WORKS.
133208         * modules/printf-frexpl (Files): Add m4/frexpl.m4.
133210 2007-05-18  Bruno Haible  <bruno@clisp.org>
133212         * modules/frexpl-nolibm-tests: New file.
133214         * modules/frexpl-nolibm: New file.
133215         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): New macro.
133217 2007-05-17  Paul Eggert  <eggert@cs.ucla.edu>
133219         * lib/dirent_.h: Prefer #include_next <foo.h> to #include
133220         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
133221         GCC 4.2, which otherwise issues a lot of warnings.
133222         * lib/iconv_.h, lib/locale_.h, lib/netinet_in_.h, lib/sys_select_.h:
133223         * lib/sys_socket_.h, lib/sys_stat_.h, lib/sysexits_.h, lib/unistd_.h:
133224         Likewise.
133225         * modules/fchdir (dirent.h): Substitute @HAVE_INCLUDE_NEXT@.
133226         * modules/iconv_open (iconv.h): Likewise.
133227         * modules/locale (locale.h): Likewise.
133228         * modules/netinet_in (netinet/in.h): Likewise.
133229         * modules/sys_select (sys_select.h): Likewise.
133230         * modules/sys_socket (sys/socket.h): Likewise.
133231         * modules/sys_stat (sys/stat.h): Likewise.
133232         * modules/sysexits (sysexits.h): Likewise.
133233         * modules/unistd (unistd.h): Likewise.
133235 2007-05-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
133237         * modules/closein-tests (Makefile.am): Distribute
133238         `test-closein.sh'.
133240 2007-05-17  Bruno Haible  <bruno@clisp.org>
133242         * tests/test-printf-posix.output: Renamed from
133243         tests/test-fprintf-posix.out.
133244         * modules/fprintf-posix-tests: Update.
133245         * modules/printf-posix-tests: Update.
133246         * modules/vfprintf-posix-tests: Update.
133247         * modules/vprintf-posix-tests: Update.
133248         * tests/test-fprintf-posix.sh: Update.
133249         * tests/test-printf-posix.sh: Update.
133250         * tests/test-vfprintf-posix.sh: Update.
133251         * tests/test-vprintf-posix.sh: Update.
133252         Reported by Ralf Wildenhues.
133254 2007-05-16  Paul Eggert  <eggert@cs.ucla.edu>
133256         * lib/fcntl_.h: Prefer #include_next <foo.h> to #include
133257         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
133258         GCC 4.2, which otherwise issues a lot of warnings.
133259         * lib/inttypes_.h, lib/math_.h, lib/search_.h, lib/signal_.h:
133260         * lib/stdint_.h, lib/stdio_.h, lib/stdlib_.h, lib/string_.h:
133261         * lib/sys_time_.h, lib/time_.h, lib/wchar_.h, lib/wctype_.h: Likewise.
133262         * lib/stdlib_.h: Don't bother with #pragma GCC system_header, as
133263         it should no longer be needed.
133264         * lib/string_.h: Likewise.
133265         * modules/absolute-header (HAVE_INCLUDE_NEXT): New 'make' define.
133266         * modules/fcntl (fcntl.h): Substitute @HAVE_INCLUDE_NEXT@.
133267         * modules/inttypes (inttypes.h): Likewise.
133268         * modules/math (math.h): Likewise.
133269         * modules/search (search.h): Likewise.
133270         * modules/signal (signal.h): Likewise.
133271         * modules/stdint (stdint.h): Likewise.
133272         * modules/stdio (stdio.h): Likewise.
133273         * modules/stdlib (stdlib.h): Likewise.
133274         * modules/string (string.h): Likewise.
133275         * modules/sys_time (sys/time.h): Likewise.
133276         * modules/time (time.h): Likewise.
133277         * modules/wchar (wchar.h): Likewise.
133278         * modules/wctype (wtype.h): Likewise.
133280 2007-05-16  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
133282         * doc/gnulib-tool.texi (CVS Issues): Fix typo.
133284 2007-05-13  Bruno Haible  <bruno@clisp.org>
133286         * stpcpy.m4 (gl_FUNC_STPCPY): Require AC_C_RESTRICT.
133287         * stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
133288         * strsep.m4 (gl_FUNC_STRSEP): Likewise.
133289         * strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
133290         (gl_PREREQ_STRTOK_R): Don't require it here.
133292 2007-05-13  Bruno Haible  <bruno@clisp.org>
133294         * lib/stdlib_.h (mkdtemp, mkstemp): Comment out argument name. Needed
133295         when used in C++ mode.
133297 2007-05-12  Bruno Haible  <bruno@clisp.org>
133299         * lib/linebuffer.h: Tweak doc.
133300         * lib/linebuffer.c: Likewise.
133302 2007-05-12  James Youngman  <jay@gnu.org>
133304         * lib/linebuffer.c (readlinebuffer_delim): New function,
133305         like readlinebuffer, but use a caller-specified delimiter.
133306         (readlinebuffer): Just call readlinebuffer_delim with '\n'
133307         as the delimiter.
133308         * lib/linebuffer.h (readlinebuffer_delim): Declare it.
133310 2007-05-12  Sergey Poznyakoff  <gray@gnu.org.ua>
133312         * m4/openat.m4 (gl_FUNC_OPENAT): Do not require openat-die.
133313         * modules/openat (Files): Remove openat-die.c.
133314         (Depends-on): Add openat-die.
133315         * modules/openat-die: New module.
133317 2007-05-06  Bruno Haible  <bruno@clisp.org>
133319         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING, gl_VSNPRINTF_ZEROSIZE_C99):
133320         Update with info about Cygwin.
133321         * doc/functions/fprintf.texi: Update.
133322         * doc/functions/printf.texi: Update.
133323         * doc/functions/snprintf.texi: Update.
133324         * doc/functions/sprintf.texi: Update.
133325         * doc/functions/vfprintf.texi: Update.
133326         * doc/functions/vprintf.texi: Update.
133327         * doc/functions/vsnprintf.texi: Update.
133328         * doc/functions/vsprintf.texi: Update.
133329         Reported by Eric Blake.
133331 2007-05-06  Bruno Haible  <bruno@clisp.org>
133333         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Perform the
133334         padding ourselves for the floating-point directives.
133335         * m4/printf.m4 (gl_PRINTF_FLAG_ZERO): New macro.
133336         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_ZERO): New macro.
133337         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
133338         gl_PRINTF_FLAG_ZERO and test its result. Invoke
133339         gl_PREREQ_VASNPRINTF_FLAG_ZERO.
133340         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
133341         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
133342         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
133343         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
133344         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
133345         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
133346         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
133347         * tests/test-snprintf-posix.h (test_function): Also check the width
133348         and some flags in the %f directive.
133349         * tests/test-sprintf-posix.h (test_function): Likewise.
133350         * tests/test-vasnprintf-posix.c (test_function): Likewise.
133351         * tests/test-vasprintf-posix.c (test_function): Likewise.
133352         * doc/functions/fprintf.texi: Update.
133353         * doc/functions/printf.texi: Update.
133354         * doc/functions/snprintf.texi: Update.
133355         * doc/functions/sprintf.texi: Update.
133356         * doc/functions/vfprintf.texi: Update.
133357         * doc/functions/vprintf.texi: Update.
133358         * doc/functions/vsnprintf.texi: Update.
133359         * doc/functions/vsprintf.texi: Update.
133361 2007-05-06  Bruno Haible  <bruno@clisp.org>
133363         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_GROUPING]: Don't
133364         pass the ' flag character to sprintf or snprintf.
133365         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING): New macro.
133366         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_GROUPING): New macro.
133367         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
133368         gl_PRINTF_FLAG_GROUPING and test its result. Invoke
133369         gl_PREREQ_VASNPRINTF_FLAG_GROUPING.
133370         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
133371         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
133372         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
133373         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
133374         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
133375         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
133376         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
133377         * tests/test-snprintf-posix.h (test_function): Also check the grouping
133378         flag.
133379         * tests/test-sprintf-posix.h (test_function): Likewise.
133380         * tests/test-vasnprintf-posix.c (test_function): Likewise.
133381         * tests/test-vasprintf-posix.c (test_function): Likewise.
133382         * doc/functions/fprintf.texi: Update.
133383         * doc/functions/printf.texi: Update.
133384         * doc/functions/snprintf.texi: Update.
133385         * doc/functions/sprintf.texi: Update.
133386         * doc/functions/vfprintf.texi: Update.
133387         * doc/functions/vprintf.texi: Update.
133388         * doc/functions/vsnprintf.texi: Update.
133389         * doc/functions/vsprintf.texi: Update.
133391 2007-05-01  Bruno Haible  <bruno@clisp.org>
133393         * tests/test-argp-2.sh (func_compare): Drop .exe suffix.
133395 2007-05-03  Paul Eggert  <eggert@cs.ucla.edu>
133397         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Use better
133398         comment for D_INO_IN_DIRENT.  Problem reported by James Youngman.
133400 2007-05-02  Paul Eggert  <eggert@cs.ucla.edu>
133402         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Test whether
133403         readdir returns garbage in d_ino.  Problem reported by Kaz Sasayama in
133404         <http://lists.gnu.org/r/bug-gnulib/2007-05/msg00021.html>.
133406 2007-05-02  Sergey Poznyakoff  <gray@gnu.org.ua>
133408         * lib/argp-help.c (struct hol_entry): New member `ord'.
133409         (HOL_ENTRY_PTRCMP): Use ord for comparison
133410         (hol_sort): Initialize ord.
133412 2007-05-01  Bruno Haible  <bruno@clisp.org>
133414         * doc/functions/_Exit_C99.texi: Renamed from doc/functions/_Exit.texi.
133415         Reported by Eric Blake.
133416         * doc/gnulib.texi (Function Substitutes): Update.
133418 2007-05-01  Bruno Haible  <bruno@clisp.org>
133420         * doc/functions.texi: Remove file, now redundant through
133421         doc/functions/*.texi.
133423 2007-05-01  Bruno Haible  <bruno@clisp.org>
133425         * modules/argp (Depends-on): Add sleep.
133427 2007-05-01  Bruno Haible  <bruno@clisp.org>
133429         * modules/sleep-tests: New file.
133430         * tests/test-sleep.c: New file.
133432         * modules/sleep: New file.
133433         * lib/sleep.c: New file.
133434         * m4/sleep.m4: New file.
133435         * lib/unistd_.h (sleep): New declaration.
133436         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_SLEEP,
133437         HAVE_SLEEP.
133438         * modules/unistd (Makefile.am): Substitute GNULIB_SLEEP, HAVE_SLEEP.
133439         * doc/functions/sleep.texi: Document the sleep module.
133441 2007-05-01  Bruno Haible  <bruno@clisp.org>
133443         * lib/sigprocmask.h: Remove file.
133444         * lib/signal_.h: Incorporate the previous contents of sigprocmask.h.
133445         * lib/sigprocmask.c: Include <signal.h> instead of sigprocmask.h.
133446         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Substitute GNULIB_SIGPROCMASK,
133447         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T.
133448         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Require
133449         gl_SIGNAL_H_DEFAULTS. Set HAVE_POSIX_SIGNALBLOCKING as a shell variable.
133450         (gl_PREREQ_SIGPROCMASK): Require gl_SIGNAL_H_DEFAULTS. Set
133451         HAVE_SIGSET_T as a shell variable.
133452         * modules/signal (Makefile.am): Substitute GNULIB_SIGPROCMASK,
133453         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T into signal.h.
133454         * modules/sigprocmask (Files): Remove lib/sigprocmask.h.
133455         (Depends-on): Add signal. Remove verify.
133456         (configure.ac): Invoke gl_SIGNAL_MODULE_INDICATOR.
133457         (Include): Mention <signal.h> instead of sigprocmask.h.
133458         * NEWS: Mention the change.
133459         * lib/fatal-signal.c: Don't include sigprocmask.h.
133461 2007-05-01  Bruno Haible  <bruno@clisp.org>
133463         * modules/signal: New file.
133464         * lib/signal_.h: New file.
133465         * m4/signal_h.m4: New file.
133467 2007-05-01  Bruno Haible  <bruno@clisp.org>
133469         * lib/wctype_.h: Test HAVE_ISWCNTRL at configure time.
133470         * m4/wctype.m4 (gl_WCTYPE_H): Substitute HAVE_ISWCNTRL.
133471         * modules/wctype (Makefile.am): Substitute HAVE_ISWCNTRL instead of
133472         HAVE_WCTYPE_CTMP_BUG into wctype.h.
133474 2007-05-01  Bruno Haible  <bruno@clisp.org>
133476         * lib/sys_stat_.h: Test HAVE_LSTAT, HAVE_DECL_MKDIR, HAVE_IO_H at
133477         configure time.
133478         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Substitute HAVE_LSTAT,
133479         HAVE_DECL_MKDIR, HAVE_IO_H via AC_SUBST.
133480         * modules/sys_stat (Makefile.am): Substitute their values into
133481         sys/stat.h.
133483 2007-05-01  Bruno Haible  <bruno@clisp.org>
133485         * lib/glob_.h: Test HAVE_SYS_CDEFS_H at configure time.
133486         * m4/glob.m4 (gl_PREREQ_GLOB): Substitute HAVE_SYS_CDEFS_H via AC_SUBST.
133487         * modules/glob (Makefile.am): Put HAVE_SYS_CDEFS_H value into glob.h.
133489 2007-05-01  Bruno Haible  <bruno@clisp.org>
133491         * doc/header/assert.texi: Undo last change: don't mention the gnulib
133492         'assert' module here.
133494 2007-05-01  Bruno Haible  <bruno@clisp.org>
133496         * doc/functions/*.texi: New files.
133497         * doc/functions/google-ranking.txt: New file.
133498         * doc/gnulib.texi (Function Substitutes): New chapter.
133499         (ctime, inet_ntoa): Remove sections.
133500         * doc/ctime.texi: Remove file.
133501         * doc/inet_ntoa.texi: Remove file.
133502         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Update
133503         dependencies.
133504         (%.info): New rule, specifying a --reference-limit.
133506 2007-05-01  Bruno Haible  <bruno@clisp.org>
133508         * MODULES.html.sh (posix_functions): Remove 'exec', 'toc'.
133510 2007-05-01  Bruno Haible  <bruno@clisp.org>
133512         * modules/mkdir (Depends-on): Add sys_stat, because sys_stat provides
133513         the portability of 'mkdir' to mingw systems.
133515 2007-05-01  Bruno Haible  <bruno@clisp.org>
133517         * doc/headers/google-ranking.txt: New file.
133519 2007-04-30  Eric Blake  <ebb9@byu.net>
133521         Prefer fseeko to fseek.
133522         * modules/getpass (Depends-on): Add fseeko.
133523         * lib/getpass.c (getpass): Use fseeko, not fseek.
133525 2007-04-30  Sergey Poznyakoff  <gray@gnu.org.ua>
133527         * lib/argp-help.c (hol_entry_cmp): Option sorting algorithm
133528         assumes the sorting is stable, while most qsort implementations
133529         are not.  Use argument addresses to ensure they never compare as
133530         equal.
133532         * tests/test-argp-2.sh (usage-indent test): Fix output
133533         (func_compare): Restore diff options
133534         * tests/test-argp.c: Restore #include "progname.h"
133536 2007-04-29  Bruno Haible  <bruno@clisp.org>
133538         * m4/printf.m4 (gl_VSNPRINTF_ZEROSIZE_C99): New macro.
133539         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
133540         gl_VSNPRINTF_ZEROSIZE_C99. Test gl_cv_func_vsnprintf_zerosize_c99.
133541         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
133542         * modules/snprintf-posix-tests (Files): Add tests/test-snprintf.c.
133543         (configure.ac): Define CHECK_SNPRINTF_POSIX.
133544         (TESTS, check_PROGRAMS): Add test-snprintf.
133545         * modules/vsnprintf-posix-tests (Files): Add tests/test-vsnprintf.c.
133546         (configure.ac): Define CHECK_VSNPRINTF_POSIX.
133547         (TESTS, check_PROGRAMS): Add test-vsnprintf.
133548         * tests/test-snprintf.c (main) [!CHECK_SNPRINTF_POSIX]: Disable
133549         assertions that fail on HP-UX, OSF/1, or IRIX.
133550         * tests/test-vsnprintf.c (main) [!CHECK_VSNPRINTF_POSIX]: Likewise.
133552 2007-04-29  Bruno Haible  <bruno@clisp.org>
133554         * MODULES.html.sh (posix_functions): Remove 'contents'.
133556 2007-04-29  Karl Berry  <karl@gnu.org>
133558         * config/srclist.txt (gendocs_template_min): new entry.
133560 2007-04-29  Bruno Haible  <bruno@clisp.org>
133562         Work around fpurge bug on BSD systems.
133563         * modules/fpurge (Makefile.am): Compile fpurge.c unconditionally.
133564         * m4/fpurge.m4 (gl_FUNC_FPURGE): Don't invoke AC_LIBOBJ.
133565         * lib/fpurge.h (fpurge): Don't handle __fpurge wrapper here. Define
133566         fpurge to rpl_fpurge if the system already has this function.
133567         * lib/fpurge.c (fpurge): Handle also the __fpurge wrapper case and
133568         the case where the system already has this function. Correct invariants
133569         on BSD systems.
133570         * lib/fseeko.c (rpl_fseeko): Update recognition of preceding fflush on
133571         BSD systems.
133573 2007-04-29  Sergey Poznyakoff  <gray@gnu.org.ua>
133575         * lib/argp-help.c (hol_cluster_cmp): Reverse comparison.  Change
133576         proposed by Sven Verdoolaege.
133578         * tests/test-argp.c: Fix option ordering.  Test deeply clustered
133579         options.
133580         * tests/test-argp-2.sh (func_compare): Use diff instead of cmp.
133581         (usage and help tests): Update
133583 2007-04-29  Bruno Haible  <bruno@clisp.org>
133585         * tests/test-fflush.c (main): Use a file of size 17, not 10.
133586         Print more information in case of failure. Disable a test on BeOS.
133588 2007-04-29  Bruno Haible  <bruno@clisp.org>
133590         * tests/**/test-*.[hc] (ASSERT): Use fprintf to show the line number.
133591         This helps debugging on systems on which no gdb is available.
133593 2007-04-29  Bruno Haible  <bruno@clisp.org>
133595         * lib/freading.h: Improve comments.
133596         * lib/fwriting.h: Likewise.
133597         * tests/test-freading.c (main): Don't check freading immediately after
133598         repositioning. Needed for glibc.
133600 2007-04-29  Bruno Haible  <bruno@clisp.org>
133602         * lib/freading.c (freading): Trivial simplification.
133604 2007-04-28  Bruno Haible  <bruno@clisp.org>
133606         * tests/test-fwriting.c (main): Also test the interaction between
133607         fflush and fwriting.
133608         * modules/fwriting-tests (Depends-on): Add fflush.
133610         * tests/test-freading.c (main): Also test the interaction between
133611         fflush and freading.
133612         * modules/freading-tests (Depends-on): Add fflush.
133614 2007-04-28  Bruno Haible  <bruno@clisp.org>
133616         * lib/stdio_.h (fseek, ftell): Provide link warnings suggesting to use
133617         fseeko and ftello.
133618         Suggested by Eric Blake.
133620 2007-04-28  Jim Meyering  <jim@meyering.net>
133622         Avoid false-negative in gl_STDINT_H's C99 conformance test.
133623         * m4/stdint.m4 (gl_STDINT_H): When checking whether stdint.h conforms
133624         to C99, include all of gl_STDINT_INCLUDES, not just <stddef.h>.
133626 2007-04-27  Eric Blake  <ebb9@byu.net>
133628         * doc/headers/assert.texi (assert.h): Document assert module use.
133630 2007-04-27  Bruno Haible  <bruno@clisp.org>
133632         * doc/headers/*.texi: New files.
133633         * doc/gnulib.texi (Header File Substitutes): New chapter.
133634         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Specify
133635         dependencies.
133636         (standards.info ,standards.html, standards.dvi): Update dependencies.
133637         (mostlyclean, clean): New targets.
133639 2007-04-27  Bruno Haible  <bruno@clisp.org>
133641         * lib/sysexits_.h: Renamed from lib/sysexit_.h.
133642         * modules/sysexits (Files, Makefile.am): Update.
133644         * lib/sys_socket_.h: Renamed from lib/socket_.h.
133645         * modules/sys_socket (Files, Makefile.am): Update.
133647         * lib/sys_stat_.h: Renamed from lib/stat_.h.
133648         * modules/sys_stat (Files, Makefile.am): Update.
133650 2007-04-27  Eric Blake  <ebb9@byu.net>
133652         * lib/freading.h: Improve comments.
133653         * lib/fwriting.h: Likewise.
133654         * lib/fflush.c: Likewise.
133656         Fix closein for mingw.
133657         * modules/closein-tests: Add tests for closein.
133658         * tests/test-closein.c: New file.
133659         * tests/test-closein.sh: Likewise.
133660         * lib/unistd_.h [!SEEK_CUR]: Mingw also needs stdlib.h for _exit.
133661         * lib/closein.c (close_stdin): Don't fflush non-seekable streams.
133663 2007-04-27  Bruno Haible  <bruno@clisp.org>
133665         * lib/inttypes_.h [_DECC]: Don't use #include_next if the compiler
133666         version is < 6.
133667         * lib/math_.h [__DECC]: Likewise.
133668         * lib/stdio_.h [__DECC]: Likewise.
133669         * lib/stdlib_.h [__DECC]: Likewise.
133670         * lib/string_.h [__DECC]: Likewise.
133671         * lib/time_.h [__DECC]: Likewise.
133672         * lib/wchar_.h [__DECC]: Likewise.
133673         * lib/wctype_.h [__DECC]: Likewise.
133675 2007-04-27  Bruno Haible  <bruno@clisp.org>
133677         * tests/test-fbufmode.c (main): Relax test, to avoid failure on mingw.
133679 2007-04-27  Bruno Haible  <bruno@clisp.org>
133681         * lib/fflush.c: Add comments.
133682         * modules/fpurge-tests (Depends-on): Add fflush.
133683         * modules/freadable-tests (Depends-on): Likewise.
133684         * modules/fwritable-tests (Depends-on): Likewise.
133686 2007-04-27  Charles Wilson  <libtool@cwilson.fastmail.fm>
133688         * m4/argz.m4 (gl_FUNC_ARGZ): Use !HAVE_WORKING_ARGZ instead of
133689         SYSTEM_ARGZ_IS_BROKEN.  Also, minor stylistic improvements.
133690         Report by Bruno Haible <bruno@clisp.org>.
133692 2007-04-26  Eric Blake  <ebb9@byu.net>
133694         Fix fflush on mingw.
133695         * modules/fflush (Depends-on): Add freading.
133696         * lib/fflush.c (rpl_fflush): Use freading to avoid losing buffered
133697         but unread data.
133699 2007-04-26  Eric Blake  <ebb9@byu.net>
133700         and Bruno Haible  <bruno@clisp.org>
133702         Implement freading and fwriting.
133703         * lib/freading.c: New file.
133704         * lib/freading.h: Likewise.
133705         * m4/freading.m4: Likewise.
133706         * modules/freading: Likewise.
133707         * modules/freading-tests: Likewise.
133708         * tests/test-freading.c: Likewise.
133709         * lib/fwriting.c: New file.
133710         * lib/fwriting.h: Likewise.
133711         * m4/fwriting.m4: Likewise.
133712         * modules/fwriting: Likewise.
133713         * modules/fwriting-tests: Likewise.
133714         * tests/test-fwriting.c: Likewise.
133715         * MODULES.html.sh (File stream based Input/Output): Mention them.
133717 2007-04-26  Bruno Haible  <bruno@clisp.org>
133719         * lib/stdio_.h (fseeko, ftello): Check that off_t has the same size as
133720         'long' when we assume it.
133721         Suggested by Eric Blake.
133723 2007-04-26  Bruno Haible  <bruno@clisp.org>
133725         Ensure fseeko, ftello are declared on glibc systems.
133726         * modules/fflush (configure.ac-early): Require AC_FUNC_FSEEKO.
133727         * modules/fseeko (configure.ac-early): Likewise.
133728         * modules/ftello (configure.ac-early): Likewise.
133729         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Don't define HAVE_FSEEKO, rely on
133730         AC_FUNC_FSEEKO for this.
133731         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Inline gl_CHECK_FSEEKO.
133732         (gl_CHECK_FSEEKO): Remove macro.
133734 2007-04-26  Bruno Haible  <bruno@clisp.org>
133736         * tests/test-fflush.c (main): Also check the ftell result after
133737         fflush and fseek/fseeko.
133738         * lib/fflush.c (rpl_fflush): For BSD implementations, update the
133739         file descriptor position cache in the stream.
133740         * lib/fseeko.c (rpl_fseeko): Likewise.
133742 2007-04-26  Bruno Haible  <bruno@clisp.org>
133744         * modules/fflush-tests (Depends-on): Add fseeko.
133746 2007-04-25  Charles Wilson  <libtool@cwilson.fastmail.fm>
133747             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
133749         * lib/argz_.h: ensure error_t definition is obtained in same
133750         mechanism system argz.h would have.
133751         * m4/argz.m4 (gl_FUNC_ARGZ): add new test to check if $host's
133752         argz facilities are known bad.  Err on the side of caution if
133753         cross-compiling.
133755 2007-04-25  Eric Blake  <ebb9@byu.net>
133757         * lib/fpurge.c (includes): Use stdlib.h for free.
133758         * tests/test-fflush.c (main): Also test fflush-fseeko.
133760 2007-04-25  Bruno Haible  <bruno@clisp.org>
133762         Make fflush+fseek POSIX-compliant on FreeBSD and MacOS X.
133763         * lib/fseeko.c: New file.
133764         * lib/stdio_.h: Include <sys/types.h> when off_t is needed.
133765         (fseeko, fseek): Define to replacements if REPLACE_FFLUSH.
133766         * m4/fseeko.m4 (gl_CHECK_FSEEKO): New macro, extracted from
133767         gl_FUNC_FSEEKO.
133768         (gl_FUNC_FSEEKO): Invoke it.
133769         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Arrange to compile fseeko.c. Invoke
133770         gl_CHECK_FSEEKO. Define HAVE_FSEEKO.
133771         * modules/fflush (Files): Add lib/fseeko.c, m4/fseeko.m4.
133773 2007-04-25  Bruno Haible  <bruno@clisp.org>
133775         * modules/fflush (Depends-on): Add ftello.
133777 2007-04-25  Bruno Haible  <bruno@clisp.org>
133779         * modules/ftello-tests: New file.
133780         * tests/test-ftello.c: New file.
133782         * modules/ftello: New file.
133783         * m4/ftello.m4: New file.
133784         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELLO,
133785         HAVE_FTELLO.
133786         * lib/stdio_.h (ftello): New declaration.
133787         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELLO,
133788         HAVE_FTELLO.
133790 2007-04-25  Bruno Haible  <bruno@clisp.org>
133792         * modules/fseeko-tests: New file.
133793         * tests/test-fseeko.c: New file.
133795         * modules/fseeko: New file.
133796         * m4/fseeko.m4: New file.
133797         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEKO,
133798         HAVE_FSEEKO.
133799         * lib/stdio_.h (fseeko): New declaration.
133800         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEKO,
133801         HAVE_FSEEKO.
133803 2007-04-25  Bruno Haible  <bruno@clisp.org>
133805         * lib/stdio_.h (fflush): Add support for GNULIB_POSIXCHECK.
133807 2007-04-25  Bruno Haible  <bruno@clisp.org>
133809         * lib/unistd_.h: Include <stdio.h> if needed to get the SEEK_* macros.
133810         * tests/test-stdio.c: Check that the various SEEK_* macros are defined.
133811         * tests/test-unistd.c: Likewise.
133812         * tests/test-fcntl.c: Likewise.
133814 2007-04-23  Eric Blake  <ebb9@byu.net>
133816         * lib/fflush.c: Fix missing include.
133817         Reported by Bruno Haible.
133819 2007-04-23  Bruno Haible  <bruno@clisp.org>
133821         * lib/fpurge.c (fpurge) [glibc, BSD]: Free a malloc()ed ungetc buffer.
133822         Reported by Eric Blake.
133824 2007-04-23  Bruno Haible  <bruno@clisp.org>
133826         * lib/fbufmode.c (fbufmode): Port to Solaris/SPARC64.
133828 2007-04-23  Bruno Haible  <bruno@clisp.org>
133830         * lib/fseterr.c (fseterr): Don't hardcode the value of _IOERR.
133832 2007-04-23  Bruno Haible  <bruno@clisp.org>
133834         * tests/test-fbufmode.c (main): Be prepared to a failure of setvbuf.
133835         Needed on HP-UX 11.
133837 2007-04-16  Eric Blake  <ebb9@byu.net>
133839         Make fflush rely on fpurge.
133840         * lib/fflush.c (rpl_fflush): Rely on fpurge module, rather than
133841         open coding all variants.
133842         * modules/fflush (Depends-on): Add fpurge and unistd.
133843         * modules/fflush-tests (Depends-on): Unistd is no longer extra.
133844         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Simplify.
133846         Fix --with-tests compilation on cygwin.
133847         * modules/argmatch-tests (Makefile.am): List gnulib library first
133848         in LDADD.
133849         * modules/argp-tests (Makefile.am): Likewise.
133850         * modules/array-list-tests (Makefile.am): Likewise.
133851         * modules/array-oset-tests (Makefile.am): Likewise.
133852         * modules/avltree-list-tests (Makefile.am): Likewise.
133853         * modules/avltree-oset-tests (Makefile.am): Likewise.
133854         * modules/avltreehash-list-tests (Makefile.am): Likewise.
133855         * modules/carray-list-tests (Makefile.am): Likewise.
133856         * modules/dirname-tests (Makefile.am): Likewise.
133857         * modules/frexp-tests (Makefile.am): Likewise.
133858         * modules/isnanl-tests (Makefile.am): Likewise.
133859         * modules/linked-list-tests (Makefile.am): Likewise.
133860         * modules/linkedhash-list-tests (Makefile.am): Likewise.
133861         * modules/lock-tests (Makefile.am): Likewise.
133862         * modules/rbtree-list-tests (Makefile.am): Likewise.
133863         * modules/rbtree-oset-tests (Makefile.am): Likewise.
133864         * modules/rbtreehash-list-tests (Makefile.am): Likewise.
133865         * modules/tls-tests (Makefile.am): Likewise.
133866         * modules/tsearch-tests (Makefile.am): Likewise.
133867         * modules/xvasprintf-tests (Makefile.am): Likewise.
133869         Fix fpurge for cygwin.
133870         * lib/fpurge.c (fpurge): Fix order of operation flub, and return a
133871         value.
133872         * modules/fpurge-tests (Depends-on): Clean up trash.
133874 2007-04-16  Simon Josefsson  <simon@josefsson.org>
133876         * lib/gc-libgcrypt.c (gc_hash_open): Shut up compiler warnings.
133878         * m4/autobuild.m4: Re-indent.
133880 2007-04-13  Bruno Haible  <bruno@clisp.org>
133882         * modules/fpurge-tests: New file.
133883         * tests/test-fpurge.c: New file.
133885         * modules/fpurge: New file.
133886         * lib/fpurge.h: New file.
133887         * lib/fpurge.c: New file.
133888         * m4/fpurge.m4: New file.
133890 2007-04-13  Bruno Haible  <bruno@clisp.org>
133892         * modules/fbufmode-tests: New file.
133893         * tests/test-fbufmode.c: New file.
133895         * modules/fbufmode: New file.
133896         * lib/fbufmode.h: New file.
133897         * lib/fbufmode.c: New file.
133898         * m4/fbufmode.m4: New file.
133900 2007-04-13  Bruno Haible  <bruno@clisp.org>
133902         * modules/fwritable-tests: New file.
133903         * tests/test-fwritable.c: New file.
133905         * modules/fwritable: New file.
133906         * lib/fwritable.h: New file.
133907         * lib/fwritable.c: New file.
133908         * m4/fwritable.m4: New file.
133910 2007-04-13  Bruno Haible  <bruno@clisp.org>
133912         * modules/freadable-tests: New file.
133913         * tests/test-freadable.c: New file.
133915         * modules/freadable: New file.
133916         * lib/freadable.h: New file.
133917         * lib/freadable.c: New file.
133918         * m4/freadable.m4: New file.
133920 2007-04-13  Bruno Haible  <bruno@clisp.org>
133922         * modules/fflush-tests (Makefile.am): Remove EXTRA_DIST. Augment
133923         MOSTLYCLEANFILES.
133925 2007-04-13  Paul Eggert  <eggert@cs.ucla.edu>
133927         * build-aux/bootstrap (gnulib_tool_option_extras): New var, used by
133928         gzip bootstrap.conf to avoid dragging in i18n machinery.
133929         (gnulib_tool_option): Use it.
133931 2007-04-13  Bruno Haible  <bruno@clisp.org>
133933         * tests/test-vasnprintf-posix.c (test_function): Add tests for %f and
133934         %F directives.
133935         * tests/test-vasprintf-posix.c (test_function): Likewise.
133936         * tests/test-snprintf-posix.h (test_function): Likewise.
133937         * tests/test-sprintf-posix.h (test_function): Likewise.
133938         * tests/test-fprintf-posix.h (test_function): Likewise.
133939         * tests/test-printf-posix.h (test_function): Likewise.
133940         * tests/test-fprintf-posix.out: Likewise.
133942 2007-04-13  Bruno Haible  <bruno@clisp.org>
133944         * modules/lock-tests (configure.ac): For LIBSCHED, try also -lposix4.
133945         * modules/tls-tests (configure.ac): Likewise.
133946         Reported by Arto C. Nirkko <anirkko@insel.ch>.
133948 2007-04-13  Bruno Haible  <bruno@clisp.org>
133950         * lib/tls.c (glthread_tls_get): Fix return type.
133951         Patch by Arto C. Nirkko <anirkko@insel.ch>.
133953 2007-04-12  Eric Blake  <ebb9@byu.net>
133955         * modules/gettime (Depends-on): Remove gettime.
133956         Reported by Dmitry V. Levin.
133958 2007-04-12  Bruno Haible  <bruno@clisp.org>
133960         * modules/fflush (Include): Mention <stdio.h>.
133961         * modules/strtoimax (Include): Mention <inttypes.h>.
133962         * modules/strtoumax (Include): Likewise.
133964 2007-04-12  Eric Blake  <ebb9@byu.net>
133966         * .cvsignore: New file.
133967         * .gitignore: Likewise.
133969 2007-04-12  Bruno Haible  <bruno@clisp.org>
133971         * modules/iconv-tests (test_iconv_LDADD): Mention -liconv after LDADD,
133972         not before, since $(LDADD) often contains libgnu.a.
133973         * modules/striconv-tests (test_striconv_LDADD): Likewise.
133974         * modules/striconveh-tests (test_striconveh_LDADD): Likewise.
133975         * modules/striconveha-tests (test_striconveha_LDADD): Likewise.
133976         Needed on Cygwin.
133978 2007-04-12  Eric Blake  <ebb9@byu.net>
133980         Work around glibc's failure to flush stdin on fclose.
133981         * lib/closein.c (close_stdin): Flush stdin before closing.
133983         Work around glibc's failure to reset seekable stdin on exit.
133984         * modules/closein: New module.
133985         * lib/closein.c: New file.
133986         * lib/closein.h: Likewise.
133987         * m4/closein.m4: Likewise.
133988         * MODULES.html.sh (File stream based Input/Output): Document it.
133990 2007-04-12  Simon Josefsson  <simon@josefsson.org>
133992         * gnulib-tool: Rename generated 'autobuild' script to
133993         'do-autobuild' in --create-megatestdir output.
133995         * doc/gnulib.texi (Build robot for gnulib): Fix.
133997 2007-04-12  Simon Josefsson  <simon@josefsson.org>
133999         * modules/sysexits (Depends-on): Add absolute-header.
134001 2007-04-12  Eric Blake  <ebb9@byu.net>
134003         No need to preserve errno on success.
134004         * lib/fflush.c (rpl_fflush): Simplify errno tracking.
134005         Reported by Bruno Haible.
134007 2007-04-12  Simon Josefsson  <simon@josefsson.org>
134009         * MODULES.html.sh (Support for maintaining and releasing
134010         projects): Add autobuild.  Suggested by Eric Blake <ebb9@byu.net>.
134012 2007-04-12  Simon Josefsson  <simon@josefsson.org>
134014         * gnulib-tool (func_modules_add_dummy): Respect --avoid=dummy.
134016 2007-04-12  Simon Josefsson  <simon@josefsson.org>
134018         * modules/autobuild: New module.
134020         * m4/autobuild.m4: New file.
134022 2007-04-11  Bruno Haible  <bruno@clisp.org>
134024         * lib/vasnprintf.c (VASNPRINTF): Implement the %F directive using the
134025         %f directive, if NEED_PRINTF_DIRECTIVE_F is defined.
134026         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_F): New macro.
134027         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_F): New macro.
134028         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
134029         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
134030         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
134031         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
134032         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
134033         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
134034         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Invoke
134035         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
134036         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
134037         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Invoke
134038         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
134039         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
134040         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Invoke
134041         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
134042         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
134043         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Invoke
134044         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
134045         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
134046         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Invoke
134047         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
134048         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
134049         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Invoke
134050         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
134051         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
134052         Reported by Eric Blake.
134054 2007-04-11  Bruno Haible  <bruno@clisp.org>
134056         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Fix test. It always failed.
134058 2007-04-10  Bruno Haible  <bruno@clisp.org>
134060         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct result
134061         for NaN and Infinity. Needed on FreeBSD 6.1.
134062         * tests/test-vasnprintf-posix.c (test_function): Undo last change
134063         regarding results for "%010a" of Infinity and NaN.
134064         * tests/test-vasprintf-posix.c (test_function): Likewise.
134065         * tests/test-snprintf-posix.h (test_function): Likewise.
134066         * tests/test-sprintf-posix.h (test_function): Likewise.
134067         * tests/test-fprintf-posix.h (test_function): Likewise.
134068         * tests/test-printf-posix.h (test_function): Likewise.
134069         * tests/test-fprintf-posix.out: Likewise.
134071 2007-04-10  Bruno Haible  <bruno@clisp.org>
134073         * modules/locale-tests: New file.
134074         * tests/test-locale.c: New file.
134076         * modules/locale: New file.
134077         * lib/locale_.h: New file.
134078         * m4/locale_h.m4: New file.
134080 2007-04-10  Paul Eggert  <eggert@cs.ucla.edu>
134081             Bruno Haible  <bruno@clisp.org>
134083         * m4/signbit.m4 (gl_SIGNBIT): When the sign bit position could not
134084         be determined, test for availability of the copysignf, copysign,
134085         copysignl functions.
134086         * lib/signbitf.c (gl_signbitf): Use copysignf if available in libc.
134087         * lib/signbitd.c (gl_signbitd): Use copysign if available in libc.
134088         * lib/signbitl.c (gl_signbitl): Use copysignl if available in libc.
134090 2007-04-09  Eric Blake  <ebb9@byu.net>
134092         * lib/stdio_.h [REPLACE_FFLUSH]: Declare rpl_fflush.
134093         * modules/stdio (Makefile.am): Support fflush.
134094         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
134095         * modules/fflush: New file.
134096         * lib/fflush.c: Likewise.
134097         * m4/fflush.m4: Likewise.
134098         * modules/fflush-tests: New test.
134099         * tests/test-fflush.c: Likewise.
134100         * MODULES.html.sh (Input/output <stdio.h>): Document new module.
134102 2007-04-06  Bruno Haible  <bruno@clisp.org>
134104         * lib/vasnprintf.c: Include <math.h>. Don't include float+.h.
134105         (VASNPRINTF): Use signbit for faster determination whether to print a
134106         minus sign.
134107         * modules/vasnprintf (Files): Remove lib/float+.h.
134108         * modules/fprintf-posix (Depends-on): Add signbit.
134109         * modules/snprintf-posix (Depends-on): Likewise.
134110         * modules/sprintf-posix (Depends-on): Likewise.
134111         * modules/vasnprintf-posix (Depends-on): Likewise.
134112         * modules/vasprintf-posix (Depends-on): Likewise.
134113         * modules/vfprintf-posix (Depends-on): Likewise.
134114         * modules/vsnprintf-posix (Depends-on): Likewise.
134115         * modules/vsprintf-posix (Depends-on): Likewise.
134117 2007-04-06  Bruno Haible  <bruno@clisp.org>
134119         * tests/test-frexp.c (main): Test also the sign bit of zero results.
134120         * tests/test-frexpl.c (main): Likewise.
134121         * tests/test-ldexpl.c (main): Likewise.
134122         * modules/frexp-tests (Depends-on): Add signbit.
134123         * modules/frexpl-tests (Depdends-on): Likewise.
134124         * modules/ldexpl-tests (Depdends-on): Likewise.
134126 2007-04-06  Bruno Haible  <bruno@clisp.org>
134128         * modules/signbit-tests: New file.
134129         * tests/test-signbit.c: New file.
134131         * modules/signbit: New file.
134132         * lib/signbitf.c: New file.
134133         * lib/signbitd.c: New file.
134134         * lib/signbitl.c: New file.
134135         * m4/signbit.m4: New file.
134136         * lib/math_.h (gl_signbitf, gl_signbitd, gl_signbitl): New declarations.
134137         (signbit): New macro.
134138         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_SIGNBIT and
134139         REPLACE_SIGNBIT.
134140         * modules/math (Makefile.am): Substitute also GNULIB_SIGNBIT and
134141         REPLACE_FREXPL into math.h.
134143 2007-04-06  Bruno Haible  <bruno@clisp.org>
134145         * modules/isnanf-nolibm-tests: New file.
134146         * tests/test-isnanf.c: New file.
134148         * modules/isnanf-nolibm: New file.
134149         * lib/isnanf.h: New file.
134150         * lib/isnanf.c: New file.
134151         * lib/isnan.c: Consider the USE_FLOAT macro.
134152         * m4/isnanf.m4: New file.
134154 2007-04-06  Bruno Haible  <bruno@clisp.org>
134156         * modules/gettext-h (configure.ac): AC_SUBST LIBINTL and LTLIBINTL.
134157         (Link): New section.
134159         * modules/canonicalize-lgpl-tests (Makefile.am): Undo last change.
134161 2007-04-06  Bruno Haible  <bruno@clisp.org>
134163         Assume the 'long double' type.
134164         * m4/longdouble.m4: Remove file.
134165         * config/srclist.txt: Don't mention longdouble.m4.
134166         * lib/allocsa.h: Assume HAVE_LONG_DOUBLE to be true.
134167         * lib/float+.h: Likewise.
134168         * lib/frexp.c: Likewise.
134169         * lib/printf-args.h: Likewise.
134170         * lib/printf-args.c: Likewise.
134171         * lib/printf-frexp.c: Likewise.
134172         * lib/printf-parse.c: Likewise.
134173         * lib/vasnprintf.c: Likewise.
134174         * m4/allocsa.m4: Remove gt_TYPE_LONGDOUBLE invocation.
134175         * m4/intl.m4: Likewise.
134176         * m4/isnanl.m4: Likewise.
134177         * m4/printf.m4: Likewise.
134178         * m4/printf-frexpl.m4: Likewise.
134179         * m4/vasnprintf.m4: Likewise.
134180         * modules/allocsa (Files): Remove m4/longdouble.m4.
134181         * modules/gettext (Files): Likewise.
134182         * modules/relocatable-prog-wrapper (Files): Likewise.
134183         * modules/vasnprintf (Files): Likewise.
134184         * modules/isnanl (Files): Likewise.
134185         (Include): Simplify.
134186         * modules/isnanl-nolibm (Files): Remove m4/longdouble.m4.
134187         (Include): Simplify.
134188         * modules/printf-frexpl (Files): Remove m4/longdouble.m4.
134189         (Include): Simplify.
134190         * modules/snprintf-posix-tests (Files): Remove m4/longdouble.m4.
134191         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
134192         * modules/sprintf-posix-tests (Files): Remove m4/longdouble.m4.
134193         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
134194         * modules/vasnprintf-posix-tests (Files): Remove m4/longdouble.m4.
134195         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
134196         * modules/vasprintf-posix-tests (Files): Remove m4/longdouble.m4.
134197         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
134198         * modules/vsnprintf-posix-tests (Files): Remove m4/longdouble.m4.
134199         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
134200         * modules/vsprintf-posix-tests (Files): Remove m4/longdouble.m4.
134201         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
134202         * tests/test-isnanl-nolibm.c: Assume HAVE_LONG_DOUBLE to be true.
134203         * tests/test-isnanl.c: Likewise.
134204         * tests/test-snprintf-posix.h: Likewise.
134205         * tests/test-sprintf-posix.h: Likewise.
134206         * tests/test-vasnprintf-posix.c: Likewise.
134207         * tests/test-vasnprintf-posix2.c: Likewise.
134208         * tests/test-vasprintf-posix.c: Likewise.
134210 2007-04-06  Bruno Haible  <bruno@clisp.org>
134212         Fix problem with Compaq (ex-DEC) Desktop C compiler on Tru64.
134213         * lib/math_.h [__DECC]: Include the overridden include file through
134214         #include_next, outside the double-inclusion guard.
134215         * lib/stdio_.h [__DECC]: Likewise.
134216         * lib/stdlib_.h [__DECC]: Likewise.
134217         * lib/string_.h [__DECC]: Likewise.
134218         * lib/time_.h [__DECC]: Likewise.
134219         * lib/wchar_.h [__DECC]: Likewise.
134220         * lib/wctype_.h [__DECC]: Likewise.
134221         * lib/inttypes_.h [__DECC]: Likewise.
134222         Reported by Albert Chin <china@thewrittenword.com> in
134223         <http://lists.gnu.org/r/bug-gnulib/2007-04/msg00088.html>.
134225 2007-04-04  Eric Blake  <ebb9@byu.net>
134227         * m4/stdint.m4 (gl_STDINT_H): Detect WINT_MAX bug in cygwin
134228         1.5.x.
134230 2007-04-04  Bruno Haible  <bruno@clisp.org>
134232         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct
134233         rounding. Don't assume that FreeBSD 6 and NetBSD 4 pass this test.
134235 2007-04-04  Bruno Haible  <bruno@clisp.org>
134237         * tests/test-vasnprintf-posix.c (test_function): Allow two possible
134238         results for "%010a" of Infinity and NaN.
134239         * tests/test-vasprintf-posix.c (test_function): Likewise.
134240         * tests/test-snprintf-posix.h (test_function): Likewise.
134241         * tests/test-sprintf-posix.h (test_function): Likewise.
134242         * tests/test-fprintf-posix.h (test_function): Remove these tests.
134243         * tests/test-printf-posix.h (test_function): Likewise.
134244         * tests/test-fprintf-posix.out: Update.
134245         Needed for FreeBSD 6.1.
134247 2007-04-04  Bruno Haible  <bruno@clisp.org>
134249         * DEPENDENCIES: Remove mentions of tar and gzip, since they are not
134250         directly used by the gnulib modules nor by gnulib-tool.
134252 2007-04-04  Paul Eggert  <eggert@cs.ucla.edu>
134254         * DEPENDENCIES: Give overall description of version dependency
134255         desirability.  Use more-typical names for apps.
134256         Add shell, coreutils, diffutils, grep, tar, gzip.
134258 2007-04-04  Simon Josefsson  <simon@josefsson.org>
134260         * MODULES.html.sh: Rename crypto modules.  Remove iconvme.
134262 2007-04-04  Karl Berry  <karl@gnu.org>
134264         * MODULES.html.sh (func_module): missing '.
134266 2007-04-03  Bruno Haible  <bruno@clisp.org>
134268         * modules/argmatch-tests (Makefile.am): New variable
134269         test_argmatch_LDADD.
134270         * modules/argp-tests (Makefile.am): New variable test_argp_LDADD.
134271         * modules/array-list-tests (Makefile.am): New variable
134272         test_array_list_LDADD.
134273         * modules/array-oset-tests (Makefile.am): New variable
134274         test_array_oset_LDADD.
134275         * modules/avltree-list-tests (Makefile.am): New variable
134276         test_avltree_list_LDADD.
134277         * modules/avltree-oset-tests (Makefile.am): New variable
134278         test_avltree_oset_LDADD.
134279         * modules/avltreehash-list-tests (Makefile.am): New variable
134280         test_avltreehash_list_LDADD.
134281         * modules/canonicalize-lgpl-tests (Makefile.am): New variable
134282         test_canonicalize_lgpl_LDADD.
134283         * modules/carray-list-tests (Makefile.am): New variable
134284         test_carray_list_LDADD.
134285         * modules/dirname-tests (Makefile.am): New variable
134286         test_dirname_LDADD.
134287         * modules/linked-list-tests (Makefile.am): New variable
134288         test_linked_list_LDADD.
134289         * modules/linkedhash-list-tests (Makefile.am): New variable
134290         test_linkedhash_list_LDADD.
134291         * modules/rbtree-list-tests (Makefile.am): New variable
134292         test_rbtree_list_LDADD.
134293         * modules/rbtree-oset-tests (Makefile.am): New variable
134294         test_rbtree_oset_LDADD.
134295         * modules/rbtreehash-list-tests (Makefile.am): New variable
134296         test_rbtreehash_list_LDADD.
134297         * modules/xvasprintf-tests (Makefile.am): New variable
134298         test_xvasprintf_LDADD.
134299         Reported by Eric Blake.
134301 2007-04-03  Eric Blake  <ebb9@byu.net>
134303         * DEPENDENCIES: Weaken m4 requirements.
134305 2007-04-03  Bruno Haible  <bruno@clisp.org>
134307         * modules/frexp-tests (configure.ac): Remove AC_SUBST.
134308         * modules/isnanl-tests (configure.ac): Likewise.
134310 2007-04-03  Ben Pfaff  <blp@gnu.org>
134312         * modules/iconv_open: Add $(srcdir)/ to source directory
134313         references in Makefile fragments that call gperf, to fix VPATH
134314         builds.
134316 2007-04-03  Bruno Haible  <bruno@clisp.org>
134318         * modules/ldexpl (Depends-on): Add isnanl, remove isnanl-nolibm.
134319         * lib/ldexpl.c: Undo last change.
134321 2007-04-03  Bruno Haible  <bruno@clisp.org>
134323         * modules/printf-frexpl (Depends-on): Undo last change.
134324         (Files): Add m4/ldexpl.m4.
134326 2007-04-03  Bruno Haible  <bruno@clisp.org>
134328         * m4/isnanl.m4 (gl_FUNC_ISNANL): Substitute ISNANL_LIBM.
134329         * modules/isnanl (Link): New section.
134331         * m4/frexp.m4 (gl_FUNC_FREXP): Substitute FREXP_LIBM.
134332         * modules/frexp (Link): New section.
134334         * m4/frexpl.m4 (gl_FUNC_FREXPL): Substitute FREXPL_LIBM.
134335         * modules/frexpl (Link): New section.
134337         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Substitute LDEXPL_LIBM.
134338         * modules/ldexpl (Link): New section.
134340 2007-04-03  Bruno Haible  <bruno@clisp.org>
134342         * modules/TEMPLATE-EXTENDED: New file.
134343         * gnulib-tool (func_all_modules, func_verify_module): Exclude it.
134345 2007-04-03  Bruno Haible  <bruno@clisp.org>
134347         * DEPENDENCIES: New file.
134348         Suggested by Simon Josefsson.
134350 2007-04-03  Bruno Haible  <bruno@clisp.org>
134352         * doc/gnulib.texi: Escape @.
134354 2007-04-03  James Youngman  <jay@gnu.org>
134355         and Paul Eggert  <eggert@cs.ucla.edu>
134357         * lib/stat-time.h (get_stat_birthtime): Check for zero-valued
134358         birthtime on all systems that have birthtime, not just those which
134359         use st_birthtimensec rather than st_birthtim.  Putting zero in
134360         st_birthtim.tv_sec is how (for example) FreeBSD/x86 6.1 indicates
134361         that the birth time is not available for files on an NFS mount.
134363 2007-04-03  Simon Josefsson  <simon@josefsson.org>
134365         * modules/memxor: Move back from crypto/, suggested by Bruno.
134366         * modules/crypto/hmac-sha1: Fix memxor dependency.
134368         * modules/crypto/gc: Moved from ../.
134370 2007-04-02  Eric Blake  <ebb9@byu.net>
134372         * lib/ldexpl.c (includes): Avoid libm.
134374         * modules/printf-frexpl (Depends-on): Depend on ldexpl.
134376 2007-04-02  Bruno Haible  <bruno@clisp.org>
134378         * lib/sysexit_.h (EX_OK): Disable the EX_OK definition from <unistd.h>
134379         on IRIX.
134381 2007-04-02  Bruno Haible  <bruno@clisp.org>
134383         * m4/intdiv0.m4 (gt_INTDIV0): Avoid performing the test for real on
134384         x86 or x86_64 platforms running MacOS X.
134385         Reported by Ryan Schmidt <@ryandesign.com>.
134387 2007-04-02  Bruno Haible  <bruno@clisp.org>
134389         * m4/intdiv0.m4 (gt_INTDIV0): When cross-compiling, treat x86_64 like
134390         i386.
134392 2007-04-01  Simon Josefsson  <simon@josefsson.org>
134394         * modules/crypto/arcfour: Moved from ../.
134395         * modules/crypto/arcfour-tests: Moved from ../.
134396         * modules/crypto/arctwo: Moved from ../.
134397         * modules/crypto/arctwo-tests: Moved from ../.
134398         * modules/crypto/des: Moved from ../.
134399         * modules/crypto/des-tests: Moved from ../.
134400         * modules/crypto/gc-arcfour: Moved from ../.
134401         * modules/crypto/gc-arcfour-tests: Moved from ../.
134402         * modules/crypto/gc-arctwo: Moved from ../.
134403         * modules/crypto/gc-arctwo-tests: Moved from ../.
134404         * modules/crypto/gc-des: Moved from ../.
134405         * modules/crypto/gc-des-tests: Moved from ../.
134406         * modules/crypto/gc-hmac-md5: Moved from ../.
134407         * modules/crypto/gc-hmac-md5-tests: Moved from ../.
134408         * modules/crypto/gc-hmac-sha1: Moved from ../.
134409         * modules/crypto/gc-hmac-sha1-tests: Moved from ../.
134410         * modules/crypto/gc-md2: Moved from ../.
134411         * modules/crypto/gc-md2-tests: Moved from ../.
134412         * modules/crypto/gc-md4: Moved from ../.
134413         * modules/crypto/gc-md4-tests: Moved from ../.
134414         * modules/crypto/gc-md5: Moved from ../.
134415         * modules/crypto/gc-md5-tests: Moved from ../.
134416         * modules/crypto/gc-pbkdf2-sha1: Moved from ../.
134417         * modules/crypto/gc-pbkdf2-sha1-tests: Moved from ../.
134418         * modules/crypto/gc-random: Moved from ../.
134419         * modules/crypto/gc-rijndael: Moved from ../.
134420         * modules/crypto/gc-rijndael-tests: Moved from ../.
134421         * modules/crypto/gc-sha1: Moved from ../.
134422         * modules/crypto/gc-sha1-tests: Moved from ../.
134423         * modules/crypto/gc-tests: Moved from ../.
134424         * modules/crypto/hmac-md5: Moved from ../.
134425         * modules/crypto/hmac-md5-tests: Moved from ../.
134426         * modules/crypto/hmac-sha1: Moved from ../.
134427         * modules/crypto/hmac-sha1-tests: Moved from ../.
134428         * modules/crypto/md2: Moved from ../.
134429         * modules/crypto/md2-tests: Moved from ../.
134430         * modules/crypto/md4: Moved from ../.
134431         * modules/crypto/md4-tests: Moved from ../.
134432         * modules/crypto/md5: Moved from ../.
134433         * modules/crypto/md5-tests: Moved from ../.
134434         * modules/crypto/memxor: Moved from ../.
134435         * modules/crypto/rijndael: Moved from ../.
134436         * modules/crypto/rijndael-tests: Moved from ../.
134437         * modules/crypto/sha1: Moved from ../.
134439 2007-03-30  James Youngman  <jay@gnu.org>
134441         * tests/test-stat-time.c (prepare_test): use chmod() rather than
134442         rename() to change the ctime of a file (because ctime is unaffected
134443         by rename on jfs2 on AIX 5.1).
134444         (main): Start by doing cleanup, in case a previous run failed leaving
134445         test files behind.
134447 2007-03-31  Bruno Haible  <bruno@clisp.org>
134449         Support old proprietary implementations of iconv.
134450         * modules/iconv_open: New file.
134451         * lib/iconv_.h: New file.
134452         * m4/iconv_h.m4: New file.
134453         * lib/iconv_open.c: New file.
134454         * lib/iconv_open-aix.gperf: New file.
134455         * lib/iconv_open-hpux.gperf: New file.
134456         * lib/iconv_open-irix.gperf: New file.
134457         * lib/iconv_open-osf.gperf: New file.
134458         * m4/iconv_open.m4: New file.
134459         * modules/linebreak (Depends-on): Add iconv_open.
134460         * modules/striconv (Depends-on): Likewise.
134461         * modules/striconveh (Depends-on): Likewise.
134462         * modules/unicodeio (Depends-on): Likewise.
134463         * lib/striconveh.h (mem_cd_iconveh, str_cd_iconveh): Allow cd to be
134464         (iconv_t)(-1).
134465         * lib/striconveh.c (mem_cd_iconveh_internal): Use an indirect
134466         conversion if cd is (iconv_t)(-1).
134467         (mem_iconveh, str_iconveh): Don't fail just because a direct conversion
134468         is not possible.
134470 2007-03-31  Bruno Haible  <bruno@clisp.org>
134472         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
134473         work on Solaris either. Protect also second use of "autodetect_jp".
134475 2007-03-31  Bruno Haible  <bruno@clisp.org>
134477         * m4/frexpl.m4 (gl_FUNC_FREXPL): Set HAVE_DECL_FREXPL to 0 when
134478         the function is not present.
134480 2007-03-31  Bruno Haible  <bruno@clisp.org>
134482         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Set HAVE_DECL_LDEXPL to 0 when
134483         the function is not present.
134485 2007-03-31  Bruno Haible  <bruno@clisp.org>
134487         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-29 patch. Test also against
134488         a bug in HP-UX iconv_open().
134490 2007-03-31  Bruno Haible  <bruno@clisp.org>
134492         * MODULES.html.sh (func_module): Don't show gnulib-common.m4.
134493         (Mathematics <math.h>): New section, add fpieee.
134494         (Input/output <stdio.h>): Add fseterr.
134495         (Mathematics <math.h>): New section, add printf-frexp.
134496         (Container data structures): Add sublist.
134497         (Core language properties): Add fpucw, inline.
134498         (Functions for greatest-width integer types <inttypes.h>): Add
134499         imaxabs, imaxdiv, inttypes.
134500         (Mathematics <math.h>): Add frexp, frexpl, isnan-nolibm, isnanl,
134501         isnanl-nolibm, ldexp.
134502         (Mathematics <math.h>): New section, add printf-frexpl.
134503         (Support for systems lacking POSIX:2001): Add fprintf-posix,
134504         printf-posix, snprintf-posix, sprintf-posix, string, search, socklen,
134505         sys_select, sys_socket, vasnprintf-posix, vasprintf-posix,
134506         vfprintf-posix, vprintf-posix, vsnprintf-posix, vsprintf-posix.
134507         (Unicode string functions): Add unistr/u*-mbtoucr.
134508         (Java): Add javacomp-script, javaexec-script.
134509         (C#): Add csharpcomp-script, csharpexec-script.
134510         (Support for building libraries and executables): Add havelib,
134511         relocatable-*.
134512         (Support for maintaining and releasing projects): Renamed from
134513         'Support for maintaining and release projects'. Add announce-gen.
134515 2007-03-31  Bruno Haible  <bruno@clisp.org>
134517         * README: Talk primarily about git.
134518         (git and CVS): Renamed from CVS.
134519         * doc/gnulib.texi (Introduction, Build robot for gnulib): Mention that
134520         gnulib is available through git.
134521         * doc/gnulib-tool.texi (CVS Issues): Mention git and svn as well.
134523 2007-03-30  Bruno Haible  <bruno@clisp.org>
134525         * lib/alloca_.h: Change prefix of double-inclusion guard macro to _GL_.
134526         * lib/poll_.h: Likewise.
134527         * lib/stat_.h: Likewise.
134528         * lib/sys_time_.h: Likewise.
134529         * lib/sysexit_.h: Likewise.
134530         * lib/glob_.h: Prefix double-inclusion guard macro with _GL_.
134531         * lib/stdbool_.h: Likewise.
134532         * lib/byteswap_.h: Add double-inclusion guard.
134534 2007-03-30  Sergey Poznyakoff  <gray@mirddin.farlep.net>
134536         * lib/sysexit_.h: Prefix double-inclusion guard macro with _GNULIB.
134538 2007-03-30  Karl Berry  <karl@gnu.org>
134540         * config/srclist-update: double space after USA in the license
134541         substitution, since that's how it's usually (?) written.
134543 2007-03-30  Paul Eggert  <eggert@cs.ucla.edu>
134545         * lib/write-any-file.c (can_write_any_file): Fix else-else bug
134546         reported by Bruno Haible.
134548 2007-03-29  Bruno Haible  <bruno@clisp.org>
134550         * m4/iconv.m4 (AM_ICONV_LINK): Require AC_CANONICAL_HOST. Test against
134551         a bug in AIX iconv().
134553 2007-03-29  Bruno Haible  <bruno@clisp.org>
134555         * modules/ldexpl-tests: New file.
134556         * tests/test-ldexpl.c: New file.
134558 2007-03-29  Bruno Haible  <bruno@clisp.org>
134560         * lib/ldexpl.c: Include fpucw.h.
134561         (ldexpl): Use BEGIN/END_LONG_DOUBLE_ROUNDING. Skip the last unneeded
134562         multiplication.
134563         * modules/ldexpl (Depends-on): Add fpucw.
134565 2007-03-29  Bruno Haible  <bruno@clisp.org>
134567         * modules/ldexpl: New file.
134568         * m4/ldexpl.m4: New file.
134569         * lib/math_.h (ldexpl): Define to a replacement if REPLACE_LDEXPL is
134570         set.
134571         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize also GNULIB_LDEXPL,
134572         REPLACE_LDEXPL.
134573         * modules/math (Makefile.am): Substitute also GNULIB_LDEXPL,
134574         REPLACE_LDEXPL.
134575         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
134576         gl_FUNC_LDEXPL_WORKS.
134577         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Remove test for ldexpl.
134578         * modules/mathl (Files): Remove lib/ldexpl.c.
134579         (Depends-on): Add ldexpl.
134581 2007-03-29  Bruno Haible  <bruno@clisp.org>
134583         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Declare frexpl.
134585 2007-03-29  Bruno Haible  <bruno@clisp.org>
134587         * tests/test-striconveh.c (main): Don't assume that a direct conversion
134588         between ISO-8859-1 and ISO-8859-2 is possible. Needed for OSF/1, IRIX
134589         and possibly also HP-UX.
134590         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
134591         work on AIX, IRIX, HP-UX, OSF/1.
134592         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
134593         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
134594         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
134595         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
134596         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
134597         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
134599 2007-03-29  Bruno Haible  <bruno@clisp.org>
134601         * tests/test-stat-time.c: Include <fcntl.h>, not <sys/fcntl.h>.
134603 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
134605         * lib/acl-internal.h (acl_get_fd, acl_set_fd): undef before defining,
134606         to work around a problem on OSF/1 5.1 reported by Bruno Haible.
134608 2007-03-29  Eric Blake  <ebb9@byu.net>
134610         * lib/acl-internal.h: Remove redundant include.
134611         (ACL_NOT_WELL_SUPPORTED): Also filter on EBUSY, returned by
134612         Cygwin when a file is locked.
134614 2007-03-29  Bruno Haible  <bruno@clisp.org>
134616         * lib/vasprintf.c [IN_LIBASPRINTF]: Include different specification
134617         file.
134618         * lib/asprintf.c [IN_LIBASPRINTF]: Likewise.
134620 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
134622         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Don't bother to
134623         try to remove a parent directory if the child couldn't be removed
134624         (except for the first rmdir, which could fail because the child
134625         doesn't exist).  Problem reported by Jeff Blaine in
134626         <http://lists.gnu.org/r/bug-tar/2007-03/msg00014.html>.
134628 2007-03-28  Bruno Haible  <bruno@clisp.org>
134630         * lib/striconveh.c (utf8conv_carefully): New function.
134631         (mem_cd_iconveh_internal): Invoke it.
134633 2007-03-28  Bruno Haible  <bruno@clisp.org>
134635         * lib/striconveh.c (mem_cd_iconveh_internal): Use u8_mbtoucr instead
134636         of u8_mbtouc in order to distinguish invalid and incomplete UTF-8
134637         input.
134638         * modules/striconveh (Depends-on): Add unistr/u8-mbtoucr. Replace
134639         utf8-ucs4 with unistr/u8-mbtouc. Replace ucs4-utf8 with
134640         unistr/u8-uctomb.
134642 2007-03-28  Bruno Haible  <bruno@clisp.org>
134644         * modules/unistr/u8-mbtoucr: New file.
134645         * lib/unistr/u8-mbtoucr.c: New file.
134646         * modules/unistr/u16-mbtoucr: New file.
134647         * lib/unistr/u16-mbtoucr.c: New file.
134648         * modules/unistr/u16-mbtoucr: New file.
134649         * lib/unistr/u16-mbtoucr.c: New file.
134650         * lib/unistr.h (u8_mbtoucr, u16_mbtoucr, u32_mbtoucr): New declarations.
134652 2007-03-27  Simon Josefsson  <simon@josefsson.org>
134653             Bruno Haible  <bruno@clisp.org>
134655         * m4/vasprintf.m4: Convert AC_SUBST into shell variable for
134656         REPLACE_VASPRINTF.  Set HAVE_VASPRINTF.  Add
134657         AC_REQUIRE([gl_STDIO_H_DEFAULTS]).
134659         * m4/stdio_h.m4: Add stubs for vasprintf too.
134661         * modules/stdio: Support vasprintf in sed command.
134663         * modules/vasprintf: Depend on stdio for prototypes.  Remove
134664         vasprintf.h.  Add stdio module indicator.
134666         * lib/stdio_.h: Declare asprintf and vasprintf, based on
134667         vasprintf.h.
134669         * lib/vasprintf.h: File removed.
134671         * lib/asprintf.c: Use stdio.h instead of vasprintf.h.
134672         * lib/vasprintf.c: Ditto.
134673         * lib/xvasprintf.c: Ditto.
134674         * tests/test-vasprintf-posix.c: Ditto.
134675         * tests/test-vasprintf.c: Ditto.
134677 2007-03-27  Bruno Haible  <bruno@clisp.org>
134679         Make vasnprintf multithread-safe.
134680         * lib/vasnprintf.c (decimal_point_char): New function.
134681         (VASNPRINTF): Use it.
134682         Suggested by Simon Josefsson.
134684 2007-03-27  Eric Blake  <ebb9@byu.net>
134686         Support sub-second birthtime on cygwin.
134687         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Also check for st_birthtim.
134688         * lib/stat-time.h (STAT_TIMESPEC): Adjust comments.
134689         (get_stat_birthtime): Also work with st_birthtim.
134691 2007-03-27  Paul Eggert  <eggert@cs.ucla.edu>
134693         * lib/stat-time.h (USE_BIRTHTIME): Remove.
134694         (get_stat_atime_ns, get_stat_ctime_ns, get_stat_mtime_ns):
134695         (get_stat_birthtime_ns): Do not try to use "spare" fields.
134696         (get_stat_birthtime_ns): Simplify compile-time tests.
134697         (get_stat_birthtime): Change the API to look like
134698         get_stat_mtime etc., except return a negative tv_nsec on error.
134699         * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
134700         Don't check for "spare" fields.
134701         (gl_STAT_BIRTHTIME): Don't check for struct stat.st_birthtimespec.tv_sec
134702         or for struct stat.st_birthtime, as these tests aren't used.
134703         * tests/test-stat-time.c (test_birthtime): Adjust to new API.
134705 2007-03-27  Bruno Haible  <bruno@clisp.org>
134707         * lib/stat-time.h: Include <sys/stat.h>.
134709 2007-03-27  James Youngman  <jay@gnu.org>
134711         * lib/stat-time.h (get_stat_birthtime): New function for
134712           retrieving st_birthtime as provided by UFS2 (hence *BSD).
134713         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Probe for st_birthtime
134714           and its variants.
134715         * modules/stat-time (configure.ac): call gl_STAT_BIRTHTIME.
134716         * modules/stat-time-test: New file.
134717         * tests/test-stat-time.c: New test, devised by Bruno Haible.
134719 2007-03-26  Bruno Haible  <bruno@clisp.org>
134721         Better support of signalling NaNs.
134722         * lib/atanl.c: Include isnanl.h.
134723         (atanl): Perform test for NaN at the beginning of the function and
134724         through a call to isnanl.
134725         * lib/cosl.c: Include isnanl.h.
134726         (cosl): Perform test for NaN at the beginning of the function and
134727         through a call to isnanl.
134728         * lib/ldexpl.c: Include isnanl.h.
134729         (ldexpl): Perform test for NaN through a call to isnanl.
134730         * lib/logl.c: Include isnanl.h.
134731         (logl): Perform test for NaN at the beginning of the function and
134732         through a call to isnanl.
134733         * lib/sinl.c: Include isnanl.h.
134734         (sinl): Perform test for NaN at the beginning of the function and
134735         through a call to isnanl.
134736         * lib/sqrtl.c: Include isnanl.h.
134737         (sqrtl): Perform test for NaN at the beginning of the function and
134738         through a call to isnanl.
134739         * lib/tanl.c: Include isnanl.h.
134740         (tanl): Perform test for NaN at the beginning of the function and
134741         through a call to isnanl.
134742         * lib/trigl.c (ieee754_rem_pio2l): Remove test for NaN.
134743         * modules/mathl (Depends-on): Add isnanl.
134745 2007-03-26  Eric Blake  <ebb9@byu.net>
134747         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Fix
134748         regression in logic sense of previous patch.
134750 2007-03-26  Bruno Haible  <bruno@clisp.org>
134752         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Don't use
134753         unportable shell command "if ! ...".
134754         Reported by Ralf Wildenhues.
134756 2007-03-25  Bruno Haible  <bruno@clisp.org>
134758         * lib/sysexit_,h: If HAVE_SYSEXITS_H is defined, include the original
134759         <sysexits.h> file, and only add EX_CONFIG.
134760         * m4/sysexits.m4 (gl_SYSEXITS): If <sysexits.h> exists, check its
134761         absolute file name and whether it is sufficient. Substitute also
134762         HAVE_SYSEXITS_H and ABSOLUTE_SYSEXITS_H.
134763         * modules/sysexits (Makefile.am): Substitute HAVE_SYSEXITS_H and
134764         ABSOLUTE_SYSEXITS_H into sysexits.h.
134766 2007-03-25  Bruno Haible  <bruno@clisp.org>
134768         * lib/getaddrinfo.c (getaddrinfo): Don't access hints->ai_flags when
134769         hints is NULL.
134771 2007-03-25  Bruno Haible  <bruno@clisp.org>
134773         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Add a cast.
134774         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
134776 2007-03-25  Bruno Haible  <bruno@clisp.org>
134778         * lib/vasnprintf.c: Include langinfo.h.
134779         (VASNPRINTF): Prefer nl_langinfo over localeconv, since it's more
134780         multithread-safe.
134781         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): New macro.
134782         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke it.
134783         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
134784         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
134785         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
134786         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
134787         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
134788         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX: Likewise.
134789         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
134790         Reported by Simon Josefsson.
134792 2007-03-25  Bruno Haible  <bruno@clisp.org>
134794         * lib/printf-parse.c [!IN_LIBINTL]: Include <stdint.h>, for intmax_t.
134795         (PRINTF_PARSE): Make the support for size specifier 'j' unconditional.
134796         * modules/vasnprintf (Depends-on): Add stdint.
134798 2007-03-25  Bruno Haible  <bruno@clisp.org>
134800         * modules/fpieee: New file.
134801         * m4/fpieee.m4: New file.
134802         * modules/isnan-nolibm (Depends-on): Add fpieee.
134803         * modules/isnanl-nolibm (Depends-on): Add fpieee.
134804         * modules/isnanl (Depends-on): Add fpieee.
134806 2007-03-25  Bruno Haible  <bruno@clisp.org>
134808         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers.
134810 2007-03-25  Bruno Haible  <bruno@clisp.org>
134812         Avoid test failures on IRIX 6.5.
134813         * tests/test-frexpl.c (MIN_NORMAL_EXP): New macro.
134814         (main): Use it.
134815         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP): New
134816         macros.
134817         (main): Use them.
134819 2007-03-25  Bruno Haible  <bruno@clisp.org>
134821         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): New macro.
134822         (gl_FUNC_FREXPL): Invoke it. Set REPLACE_FREXPL to 1 if it frexpl
134823         exists but doesn't work.
134824         * lib/math_.h (frexpl): Define as a replacement macro if REPLACE_FREXPL
134825         is set. Don't provide a prototype if REPLACE_FREXPL is not set.
134826         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPL.
134827         * modules/math (Makefile.am): Substitute also REPLACE_FREXPL into
134828         math.h.
134830 2007-03-25  Bruno Haible  <bruno@clisp.org>
134832         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Add check whether frexp(inf)
134833         returns inf. Needed on IRIX 6.5.
134835 2007-03-25  Bruno Haible  <bruno@clisp.org>
134837         * tests/test-frexpl.c: Include isnanl-nolibm.h.
134838         (main): Use isnanl instead of x != x idiom.
134839         * modules/frexpl-tests (Depends-on): Add isnanl-nolibm.
134841         * tests/test-frexp.c: Include isnan.h.
134842         (main): Use isnan instead of x != x idiom.
134843         * modules/frexp-tests (Depends-on): Add isnan-nolibm.
134845 2007-03-25  Bruno Haible  <bruno@clisp.org>
134847         * tests/test-frexp.c (NaN): New function/macro.
134848         (main): Use it instead of 0.0 / 0.0.
134849         * tests/test-isnan.c (NaN): New function/macro.
134850         (main): Use it instead of 0.0 / 0.0.
134851         * tests/test-vasnprintf-posix.c (NaN): New function/macro.
134852         (test_function): Use it instead of 0.0 / 0.0.
134853         * tests/test-vasprintf-posix.c (NaN): New function/macro.
134854         (test_function): Use it instead of 0.0 / 0.0.
134855         * tests/test-snprintf-posix.h (NaN): New function/macro.
134856         (test_function): Use it instead of 0.0 / 0.0.
134857         * tests/test-sprintf-posix.h (NaN): New function/macro.
134858         (test_function): Use it instead of 0.0 / 0.0.
134859         * tests/test-fprintf-posix.h (NaN): New function/macro.
134860         (test_function): Use it instead of 0.0 / 0.0.
134861         * tests/test-printf-posix.h (NaN): New function/macro.
134862         (test_function): Use it instead of 0.0 / 0.0.
134864         * lib/isnan.c (FUNC): Work around a DEC C compiler bug.
134866 2007-03-25  Bruno Haible  <bruno@clisp.org>
134868         * lib/glob_.h: Include <sys/stat.h>. Avoids warnings on AIX 5.1.
134870 2007-03-25  Bruno Haible  <bruno@clisp.org>
134872         * lib/regexec.c (merge_state_with_log): Make static.
134874 2007-03-25  Bruno Haible  <bruno@clisp.org>
134876         * lib/trigl.c (kernel_rem_pio2): Make static.
134878 2007-03-25  Bruno Haible  <bruno@clisp.org>
134880         * lib/sincosl.c (sincosl_table): Make static.
134882 2007-03-25  Bruno Haible  <bruno@clisp.org>
134884         * lib/argp.h (__restrict): Define to empty, rather than to 'restrict',
134885         if the compiler does not support C99.
134887 2007-03-25  Bruno Haible  <bruno@clisp.org>
134889         * modules/time (Makefile.am): Ensure all rule action lines start with a
134890         tab.
134892 2007-03-24  Bruno Haible  <bruno@clisp.org>
134894         * modules/tsearch-tests: New file.
134895         * tests/test-tsearch.sh: New file.
134896         * tests/test-tsearch.c: New file, mostly copied from glibc.
134898         * modules/search-tests: New file.
134899         * tests/test-search.c: New file.
134901         * modules/search: New file.
134902         * lib/search_.h: New file, incorporating lib/tsearch.h.
134903         * m4/search_h.m4: New file.
134904         * lib/tsearch.h: Remove file.
134905         * lib/tsearch.c: Include search.h instead of tsearch.h.
134906         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Require gl_SEARCH_H_DEFAULTS. Set
134907         HAVE_TSEARCH.
134908         * modules/tsearch (Files): Remove lib/tsearch.h.
134909         (Depends-on): Add search.
134910         (configure.ac): Invoke gl_SEARCH_MODULE_INDICATOR.
134911         (Include): Change tsearch.h into search.h.
134913 2007-03-24  Bruno Haible  <bruno@clisp.org>
134915         * modules/fpucw: New file.
134916         * lib/fpucw.h: New file.
134917         * lib/frexp.c: Include fpucw.h.
134918         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
134919         (FUNC): Use them.
134920         * lib/printf-frexp.c: Include fpucw.h.
134921         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
134922         (FUNC): Use them.
134923         * lib/vasnprintf.c: Include fpucw.h.
134924         (VASNPRINTF): Invoke BEGIN/END_LONG_DOUBLE_ROUNDING around the
134925         'long double' calculations.
134926         * tests/test-frexpl.c: Include fpucw.h.
134927         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
134928         * tests/test-printf-frexpl.c: Include fpucw.h.
134929         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
134930         * modules/frexpl (Depends-on): Add fpucw.
134931         * modules/printf-frexpl (Depends-on): Likewise.
134932         * modules/fprintf-posix (Depends-on): Likewise.
134933         * modules/snprintf-posix (Depends-on): Likewise.
134934         * modules/sprintf-posix (Depends-on): Likewise.
134935         * modules/vasnprintf-posix (Depends-on): Likewise.
134936         * modules/vasprintf-posix (Depends-on): Likewise.
134937         * modules/vfprintf-posix (Depends-on): Likewise.
134938         * modules/vsnprintf-posix (Depends-on): Likewise.
134939         * modules/vsprintf-posix (Depends-on): Likewise.
134940         * modules/frexpl-tests (Depends-on): Likewise.
134941         * modules/printf-frexpl-tests (Depends-on): Likewise.
134943 2007-03-24  Bruno Haible  <bruno@clisp.org>
134945         * lib/float+.h: New file.
134946         * lib/isnan.c: Include float+.h.
134947         (SIZE): New macro.
134948         (FUNC): Compare only SIZE bytes of the value.
134949         * lib/vasnprintf.c: Include float+.h.
134950         (VASNPRINTF): When comparing against +0.0L or +0.0, compare only
134951         SIZEOF_LDBL or SIZEOF_DBL bytes.
134952         * modules/isnan-nolibm (Files): Add lib/float+.h.
134953         * modules/isnanl-nolibm (Files): Add lib/float+.h.
134954         * modules/isnanl (Files): Add lib/float+.h.
134955         * modules/vasnprintf (Files): Add lib/float+.h.
134957 2007-03-24  Bruno Haible  <bruno@clisp.org>
134959         * lib/vasnprintf.c [!HAVE_LONG_DOUBLE]: Include printf-frexp.h. Don't
134960         include isnanl-nolibm.h.
134962 2007-03-24  Bruno Haible  <bruno@clisp.org>
134964         * tests/test-read-file.c (main): Don't produce spurious output for
134965         expected situations. Make the test fail if it encountered unexpected
134966         results.
134968 2007-03-24  Bruno Haible  <bruno@clisp.org>
134970         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove the special-casing of NetBSD,
134971         since its fr_FR.ISO8859-1 locale wouldn't pass the tests.
134973 2007-03-24  Bruno Haible  <bruno@clisp.org>
134975         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Fix last change.
134977 2007-03-24  Bruno Haible  <bruno@clisp.org>
134979         * modules/unistr/base (Depends-on): Remove utf8-ucs4-unsafe,
134980         utf16-ucs4-unsafe, utf8-ucs4, utf16-ucs4, ucs4-utf8, ucs4-utf16.
134982         * modules/unistr/u8-mbtouc: Add source files from module utf8-ucs4.
134983         * modules/utf8-ucs4: Turn into a symbolic link to module
134984         unistr/u8-mbtouc.
134986         * modules/unistr/u8-mbtouc-unsafe: Add source files from module
134987         utf8-ucs4-unsafe.
134988         * modules/utf8-ucs4-unsafe: Turn into a symbolic link to module
134989         unistr/u8-mbtouc-unsafe.
134991         * modules/unistr/u16-mbtouc: Add source files from module utf16-ucs4.
134992         * modules/utf16-ucs4: Turn into a symbolic link to module
134993         unistr/u16-mbtouc.
134995         * modules/unistr/u16-mbtouc-unsafe: Add source files from module
134996         utf16-ucs4-unsafe.
134997         * modules/utf16-ucs4-unsafe: Turn into a symbolic link to module
134998         unistr/u16-mbtouc-unsafe.
135000         * modules/unistr/u8-uctomb: Add source files from module utf4-utf8.
135001         * modules/ucs4-utf8: Turn into a symbolic link to module
135002         unistr/u8-ubtomb.
135004         * modules/unistr/u16-uctomb: Add source files from module utf4-utf16.
135005         * modules/ucs4-utf16: Turn into a symbolic link to module
135006         unistr/u16-ubtomb.
135008 2007-03-24  Bruno Haible  <bruno@clisp.org>
135010         * lib/unistr/u8-mbtouc-aux.c: Renamed from lib/unistr/utf8-ucs4.c.
135011         Enable the function only if HAVE_INLINE.
135012         * lib/unistr/u8-mbtouc-unsafe-aux.c: Renamed from
135013         lib/unistr/utf8-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
135014         * lib/unistr/u16-mbtouc-aux.c: Renamed from lib/unistr/utf16-ucs4.c.
135015         Enable the function only if HAVE_INLINE.
135016         * lib/unistr/u16-mbtouc-unsafe-aux.c: Renamed from
135017         lib/unistr/utf16-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
135018         * lib/unistr/u8-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf8.c.
135019         Enable the function only if HAVE_INLINE.
135020         * lib/unistr/u16-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf16.c.
135021         Enable the function only if HAVE_INLINE.
135022         * modules/utf8-ucs4: Update.
135023         * modules/utf8-ucs4-unsafe: Update.
135024         * modules/utf16-ucs4: Update.
135025         * modules/utf16-ucs4-unsafe: Update.
135026         * modules/ucs4-utf8: Update.
135027         * modules/ucs4-utf16: Update.
135029 2007-03-24  Bruno Haible  <bruno@clisp.org>
135031         * lib/utf8-ucs4.h: Remove file.
135032         * lib/utf8-ucs4-unsafe.h: Remove file.
135033         * lib/utf16-ucs4.h: Remove file.
135034         * lib/utf16-ucs4-unsafe.h: Remove file.
135035         * lib/ucs4-utf8.h: Remove file.
135036         * lib/ucs4-utf16.h: Remove file.
135037         * lib/unistr.h: Include their previous contents.
135038         * m4/utf-ucs4.m4: Remove file.
135039         * m4/ucs4-utf.m4: Remove file.
135040         * modules/utf8-ucs4 (Files): Remove lib/utf8-ucs4.h.
135041         (Depends-on): Add unistr/base.
135042         (configure.ac): Remove gl_UTF_UCS4.
135043         (Makefile.am): Update.
135044         (Include): Change to unistr.h.
135045         * modules/utf8-ucs4-unsafe (Files): Remove lib/utf8-ucs4-unsafe.h.
135046         (Depends-on): Add unistr/base.
135047         (configure.ac): Remove gl_UTF_UCS4.
135048         (Makefile.am): Update.
135049         (Include): Change to unistr.h.
135050         * modules/utf16-ucs4 (Files): Remove lib/utf16-ucs4.h.
135051         (Depends-on): Add unistr/base.
135052         (configure.ac): Remove gl_UTF_UCS4.
135053         (Makefile.am): Update.
135054         (Include): Change to unistr.h.
135055         * modules/utf16-ucs4-unsafe (Files): Remove lib/utf16-ucs4-unsafe.h.
135056         (Depends-on): Add unistr/base.
135057         (configure.ac): Remove gl_UTF_UCS4.
135058         (Makefile.am): Update.
135059         (Include): Change to unistr.h.
135060         * modules/ucs4-utf8 (Files): Remove lib/ucs4-utf8.h.
135061         (Depends-on): Add unistr/base.
135062         (configure.ac): Remove gl_UCS4_UTF.
135063         (Makefile.am): Update.
135064         (Include): Change to unistr.h.
135065         * modules/ucs4-utf16 (Files): Remove lib/ucs4-utf16.h.
135066         (Depends-on): Add unistr/base.
135067         (configure.ac): Remove gl_UCS4_UTF.
135068         (Makefile.am): Update.
135069         (Include): Change to unistr.h.
135070         * lib/unistr/utf8-ucs4.c: Include unistr.h instead of utf8-ucs4.h.
135071         * lib/unistr/utf8-ucs4-unsafe.c: Include unistr.h instead of
135072         utf8-ucs4-unsafe.h.
135073         * lib/unistr/utf16-ucs4.c: Include unistr.h instead of utf16-ucs4.h.
135074         * lib/unistr/utf16-ucs4-unsafe.c: Include unistr.h instead of
135075         utf16-ucs4-unsafe.h.
135076         * lib/unistr/ucs4-utf8.c: Include unistr.h instead of ucs4-utf8.h.
135077         * lib/unistr/ucs4-utf16.c: Include unistr.h instead of ucs4-utf16.h.
135078         * lib/unistr/u8-chr.c: Don't include ucs4-utf8.h.
135079         * lib/unistr/u8-strchr.c: Likewise.
135080         * lib/unistr/u8-strrchr.c: Likewise.
135081         * lib/unistr/u16-chr.c: Don't include ucs4-utf16.h.
135082         * lib/unistr/u16-strchr.c: Likewise.
135083         * lib/unistr/u16-strrchr.c: Likewise.
135084         * lib/striconveh.c: Update.
135085         * lib/linebreak.c: Update.
135087 2007-03-24  Bruno Haible  <bruno@clisp.org>
135089         * lib/argp-help.c (fill_in_uparams, canon_doc_option): Cast the
135090         arguments of isspace, isalpha, isalnum, isdigit to 'unsigned char'.
135092 2007-03-22  Bruno Haible  <bruno@clisp.org>
135094         * lib/strptime.c (__strptime_internal): Use ANSI C syntax.
135096 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
135098         * MODULES.html.sh (File system functions): New module write-any-file.
135099         * modules/write-any-file, lib/write-any-file.c, lib/write-any-file.h:
135100         * m4/write-any-file.m4: New files.
135102 2007-03-23  Eric Blake  <ebb9@byu.net>
135104         * gnulib-tool: Rearrange space-tab sequences, since some editors
135105         like to eat them.
135107 2007-03-23  Eric Blake  <ebb9@byu.net>
135109         * lib/version-etc.c (version_etc_va): Update license wording to
135110         be more concise.  Recommended by Richard Stallman.
135112 2007-03-22  Bruno Haible  <bruno@clisp.org>
135114         * lib/poll.c (MSG_PEEK): New fallback definition.
135116 2007-03-22  Bruno Haible  <bruno@clisp.org>
135118         * modules/sys_socket-tests (configure.ac): Check for shutdown function.
135119         * tests/test-sys_socket.c (a): Test only if shutdown() exists.
135120         (main): Update.
135121         Fixes a compilation error on BeOS.
135123 2007-03-22  Bruno Haible  <bruno@clisp.org>
135125         * modules/frexpl-tests: New file.
135126         * tests/test-frexpl.c: New file.
135128         * modules/frexpl: New file.
135129         * m4/frexpl.m4: New file.
135130         * modules/math (Makefile.am): Also substitute GNULIB_FREXPL into math.h.
135131         * lib/math_.h (frexpl): Test GNULIB_FREXPL instead of GNULIB_MATHL.
135132         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPL.
135133         * modules/mathl (Files): Remove lib/frexpl.c, lib/frexp.c.
135134         (Depends-on): Add frexpl. Remove isnanl-nolibm.
135135         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Don't test for frexpl.
135137 2007-03-22  Bruno Haible  <bruno@clisp.org>
135139         * lib/frexpl.c: Share code with lib/frexp.c.
135140         * modules/mathl (Files): Add lib/frexp.c.
135141         (Depends-on): Add isnanl-nolibm.
135143 2007-03-22  Bruno Haible  <bruno@clisp.org>
135145         * modules/printf-frexp (Files): Add m4/frexp.m4.
135146         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Define HAVE_FREXP_IN_LIBC
135147         only if the found frexp function actually works.
135149 2007-03-22  Bruno Haible  <bruno@clisp.org>
135151         * lib/frexp.c: Remove older implementation that uses divisions.
135153 2007-03-21  Bruno Haible  <bruno@clisp.org>
135155         * modules/frexp-tests: New file.
135156         * tests/test-frexp.c: New file.
135158         * modules/frexp: New file.
135159         * lib/frexp.c: New file.
135160         * m4/frexp.m4: New file.
135161         * lib/math_.h (frexp): New declaration.
135162         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Also initialize GNULIB_FREXP and
135163         REPLACE_FREXP.
135164         * modules/math (math.h): Also substitute GNULIB_FREXP, REPLACE_FREXP.
135166 2007-03-21  Bruno Haible  <bruno@clisp.org>
135168         * modules/isnanl-tests: New file.
135169         * tests/test-isnanl.c: New file.
135171         * modules/isnanl: New file.
135172         * lib/isnanl.h: New file.
135173         * m4/isnanl.m4 (gl_FUNC_ISNANL): New macro.
135174         (gl_FUNC_ISNANL_NO_LIBM): Invoke gl_HAVE_ISNANL_NO_LIBM,
135175         gl_FUNC_ISNANL_WORKS.
135176         (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, gl_FUNC_ISNANL_WORKS):
135177         New macros.
135179 2007-03-21  Bruno Haible  <bruno@clisp.org>
135181         * modules/isnanl-nolibm (Files): Add lib/isnanl-nolibm.h, remove
135182         lib/isnanl.h.
135183         (Include): Update.
135184         * lib/isnanl-nolibm.h: Renamed from lib/isnanl.h.
135185         * lib/vasnprintf.c: Update.
135186         * modules/isnanl-nolibm-tests (Files): Add tests/test-isnanl-nolibm.c,
135187         tests/test-isnanl.h, remove tests/test-isnanl.c.
135188         (Makefile.am): Update.
135189         * tests/test-isnanl-nolibm.c: New file.
135190         * tests/test-isnanl.h: New file.
135191         * tests/test-isnanl.c: Remove file.
135193 2007-03-21  Jim Meyering  <jim@meyering.net>
135195         When trying to open ".", treat ESTALE like EACCES.
135196         * lib/savewd.c (savewd_save): Resort to forking not just upon
135197         failure with EACCES, but also when errno is ESTALE.
135199 2007-03-20  Bruno Haible  <bruno@clisp.org>
135201         * lib/string_.h (strndup): Enable declaration also if HAVE_STRNDUP.
135202         Needed on AIX 5.1. Reported by Matthew Woehlke.
135204 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
135206         Suggestions by Bruno Haible:
135207         * lib/acl-internal.h: Include "gettext.h" rather than rolling
135208         our own.
135209         (ACL_NOT_WELL_SUPPORTED): Parenthesize arg when used.
135210         * modules/acl (Depends-on): Add gettext.
135212 2007-03-19  Bruno Haible  <bruno@clisp.org>
135214         * modules/iconvme: Remove file.
135215         * lib/iconvme.h: Remove file.
135216         * lib/iconvme.c: Remove file.
135217         * m4/iconvme.m4: Remove file.
135219 2007-03-19  Bruno Haible  <bruno@clisp.org>
135221         * doc/relocatable-maint.texi: Break long shell script line.
135222         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
135224 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
135226         Add limited support for Solaris 10 ZFS-style ACLs: just enough to
135227         handle file_has_acl.
135228         * lib/acl-internal.h, lib/acl_entries.c, lib/file-has-acl.c: New files.
135229         * lib/acl.c: Move header inclusions and related macro defns into
135230         lib/acl-internal.h.
135231         (S_ISLNK): Remove defn, since that's now done for us.
135232         (file_has_acl): Move to lib/file-has-acl.c.
135233         Call acl_trivial if available.  This is the crucial part of the fix.
135234         (acl_entries): Move to lib/acl_entries.c.  Now extern, since it's
135235         shared within the library.  Rewrite a bit, partly to make it compatible
135236         with the GNU coding style.
135237         * m4/acl.m4 (AC_FUNC_ACL): Add AC_LIBOBJ([file-has-acl]).
135238         Remove unnecessary double-quotes.
135239         Don't test for acl_to_text; the build will catch that.
135240         Replace acl_entries if it doesn't exist and it is needed.
135241         Check for -lsec and acl_trivial (as used on Solaris 10).
135242         * modules/acl (Files): Add lib/acl-internal.h, lib/acl_entries.c,
135243         lib/file-has-acl.c.
135244         (Depends-on): Add sys_stat, for S_ISLNK.
135246 2007-03-19  Ben Pfaff  <blp@gnu.org>
135248         * doc/gnulib.texi: Fix typos.
135249         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
135251 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
135253         * lib/getcwd.c (__getcwd): Remove redundant comparison of buf to NULL.
135254         If size is zero here, buf must be zero.
135256 2007-03-19  Simon Josefsson  <simon@josefsson.org>
135258         * des.c: Remove weak_keys_chksum.  Reported by Bruno Haible
135259         <bruno@clisp.org>.
135261 2007-03-18  Bruno Haible  <bruno@clisp.org>
135263         * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch.
135264         Suggested by Eric Blake.
135266 2007-03-18  Ben Pfaff  <blp@gnu.org>
135268         * doc/relocatable.texi: Recommend using as prefix a directory
135269         that does not exist and will never be created.  Based on
135270         discussion with Bruno Haible, Ralf Wildenhues, Matthew Woehlke,
135271         and others.
135273 2007-03-17  Bruno Haible  <bruno@clisp.org>
135275         * lib/fchownat.c: Include lchown.h.
135277 2007-03-17  Bruno Haible  <bruno@clisp.org>
135279         Fix endless loop when the given allocated size was > INT_MAX.
135280         * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
135281         (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
135282         larger than INT_MAX, or when it grow to a value larger than INT_MAX.
135283         * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf.
135284         * lib/sprintf.c (sprintf): Likewise.
135286 2007-03-17  Bruno Haible  <bruno@clisp.org>
135288         * tests/test-argp-2.sh (func_compare): Output a context diff.
135290 2007-03-17  Bruno Haible  <bruno@clisp.org>
135292         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
135293         locale's decimal-point character.
135295 2007-03-17  Bruno Haible  <bruno@clisp.org>
135297         * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
135298         before comparing it. Needed because on some platforms (e.g. x86) a
135299         'long double' occupies less bytes than sizeof (long double).
135301 2007-03-17  Bruno Haible  <bruno@clisp.org>
135303         * tests/test-crc.c (main): Make printf statements 64-bit clean.
135304         * tests/test-gc-pbkdf2-sha1.c (main): Likewise.
135305         * tests/test-getaddrinfo.c (simple): Likewise.
135306         * tests/test-read-file.c (main): Likewise.
135308 2007-03-17  Bruno Haible  <bruno@clisp.org>
135310         * tests/test-dirname.c (main): Make printf statements 64-bit clean.
135312 2007-03-17  Bruno Haible  <bruno@clisp.org>
135314         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Remove
135315         unused variable.
135317 2007-03-17  Bruno Haible  <bruno@clisp.org>
135319         * tests/test-c-strcasecmp.c: Include c-strcase.h.
135320         * tests/test-c-strncasecmp.c: Likewise.
135322 2007-03-17  Bruno Haible  <bruno@clisp.org>
135324         * modules/stdlib (Depends-on): Add unistd.
135325         * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
135326         Needed for MacOS X 10.3.
135328 2007-03-17  Bruno Haible  <bruno@clisp.org>
135330         * lib/unistr/u-strdup.h: Include <stdlib.h>.
135332 2007-03-17  Bruno Haible  <bruno@clisp.org>
135334         * lib/unistr/u-cpy-alloc.h: Include <stdlib.h>.
135336 2007-03-17  Bruno Haible  <bruno@clisp.org>
135338         * gnulib-tool (func_import): Update .cvsignore and .gitignore files
135339         to reflect files copied from gnulib (with or without modifications).
135340         Suggested by Jim Meyering.
135342 2007-03-17  Eric Blake  <ebb9@byu.net>
135344         * NEWS: Document stdlib change from 2007-02-18.
135346 2007-03-17  Jim Meyering  <jim@meyering.net>
135348         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
135349         * build-aux/bootstrap: Put ""s around use of $build_aux, in case
135350         someone uses a name containing shell meta-characters.
135351         Reported by Alfred M. Szmidt.
135353         * build-aux/bootstrap: Don't use \> in grep regexp.  For HP-UX.
135355 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
135357         * build-aux/bootstrap (with_gettext): New variable.  Run autopoint
135358         and copy gettext configuration files only if configure.ac contains
135359         a use of AM_GNU_GETTEXT_VERSION.
135361 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
135363         * build-aux/bootstrap (gnulib_name): New variable.
135364         (gnulib_tool_options): Use it.
135366 2007-03-13  Simon Josefsson  <simon@josefsson.org>
135368         * tests/test-des.c: Use new namespace.
135370 2007-03-15  Bruno Haible  <bruno@clisp.org>
135372         * lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
135373         Reported by James Youngman <jay@gnu.org>.
135375 2007-03-15  Bruno Haible  <bruno@clisp.org>
135377         * lib/glob.c (glob): Add 'restrict' so that prototype matches the
135378         declared prototype. Needed with cc on OSF/1 5.1.
135380 2007-03-15  Bruno Haible  <bruno@clisp.org>
135382         * lib/gl_list.h (gl_listelement_dispose_fn): New type.
135383         (gl_list_create_empty, gl_list_create): Add dispose_fn argument.
135384         (struct gl_list_implementation): Add dispose_fn argument to the
135385         'create_empty', 'create' methods.
135386         (struct gl_list_impl_base): Add field 'dispose_fn'.
135387         * lib/gl_list.c (gl_list_create_empty, gl_list_create): Add dispose_fn
135388         argument.
135389         * lib/gl_array_list.c (gl_array_create_empty, gl_array_create): Add
135390         dispose_fn argument.
135391         (gl_array_remove_node, gl_array_remove_at, gl_array_list_free): Call
135392         dispose_fn on the dropped values.
135393         * lib/gl_carray_list.c (gl_carray_create_empty, gl_carray_create): Add
135394         dispose_fn argument.
135395         (gl_carray_remove_at, gl_carray_list_free): Call dispose_fn on the
135396         dropped values.
135397         * lib/gl_anyavltree_list2.h (gl_tree_create): Add dispose_fn argument.
135398         (gl_tree_remove_node): Call dispose_fn on the dropped value.
135399         * lib/gl_anyrbtree_list2.h (gl_tree_create): Add dispose_fn argument.
135400         (gl_tree_remove_node): Call dispose_fn on the dropped value.
135401         * lib/gl_anytree_list2.h (gl_tree_create_empty): Add dispose_fn
135402         argument.
135403         (gl_tree_list_free): Call dispose_fn on the dropped values.
135404         * lib/gl_anytreehash_list2.h (gl_tree_list_free): Call dispose_fn on
135405         the dropped values.
135406         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
135407         Add dispose_fn argument.
135408         (gl_linked_remove_node, gl_linked_remove_at, gl_linked_list_free):
135409         Call dispose_fn on the dropped values.
135410         * lib/gl_sublist.c (gl_sublist_create_empty, gl_sublist_create_fill):
135411         Add dispose_fn argument.
135412         (gl_sublist_create): Initialize the 'dispose_fn' field.
135413         * lib/clean-temp.c (create_temp_dir, register_fd): Update.
135414         * tests/test-array_list.c (main): Update.
135415         * tests/test-carray_list.c (main): Update.
135416         * tests/test-avltree_list.c (main): Update.
135417         * tests/test-rbtree_list.c (main): Update.
135418         * tests/test-avltreehash_list.c (main): Update.
135419         * tests/test-rbtreehash_list.c (main): Update.
135420         * tests/test-linked_list.c (main): Update.
135421         * tests/test-linkedhash_list.c (main): Update.
135422         * tests/test-array_oset.c (main): Update.
135424 2007-03-15  Bruno Haible  <bruno@clisp.org>
135426         * lib/gl_oset.h (gl_setelement_dispose_fn): New type.
135427         (gl_oset_create_empty): Add dispose_fn argument.
135428         (struct gl_oset_implementation): Add dispose_fn argument to
135429         'create_empty' method.
135430         (struct gl_oset_impl_base): Add dispose_fn field.
135431         * lib/gl_oset.c (gl_oset_create_empty): Add dispose_fn argument.
135432         * lib/gl_array_oset.c (gl_array_create_empty): Add dispose_fn argument.
135433         (gl_array_remove_at, gl_array_free): Call dispose_fn on the dropped
135434         values.
135435         * lib/gl_anytree_oset.h (gl_tree_create_empty): Add dispose_fn argument.
135436         (gl_tree_oset_free): Call dispose_fn on the dropped values.
135437         * lib/gl_avltree_oset.c (gl_tree_remove_node): Call dispose_fn on the
135438         dropped value.
135439         * lib/gl_rbtree_oset.c (gl_tree_remove_node): Call dispose_fn on the
135440         dropped value.
135441         * tests/test-array_oset.c (main): Update.
135442         * tests/test-avltree_oset.c (main): Update.
135443         * tests/test-rbtree_oset.c (main): Update.
135444         * lib/gl_anytreehash_list1.h (add_to_bucket): Update.
135446 2007-03-13  Bruno Haible  <bruno@clisp.org>
135448         * tests/test-stdbool.c (i): Update after last patch.
135450 2007-03-12  Bruno Haible  <bruno@clisp.org>
135452         * lib/quotearg.c: Include <wctype.h> early, before the definition of
135453         the iswprint macro. Needed on Solaris 2.5.1.
135455 2007-03-12  Bruno Haible  <bruno@clisp.org>
135457         * tests/test-printf-frexp.c (main): Declare x as volatile.
135459 2007-03-12  Simon Josefsson  <simon@josefsson.org>
135461         * doc/gnulib.texi (Build robot for gnulib): New section.
135463 2007-03-12  Jim Meyering  <jim@meyering.net>
135465         * build-aux/bootstrap: New file.
135466         * build-aux/bootstrap.conf: New file, from coreutils.
135468 2007-03-11  Bruno Haible  <bruno@clisp.org>
135470         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
135472 2007-03-12  Simon Josefsson  <simon@josefsson.org>
135474         * lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
135475         avoid collisions with 'des_setkey'.  Reported by Bruno Haible
135476         <bruno@clisp.org>.  Also change 'tripledes_' to '3des_'.
135478 2007-03-11  Bruno Haible  <bruno@clisp.org>
135480         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
135481         compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
135483 2007-03-11  Bruno Haible  <bruno@clisp.org>
135485         * lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
135486         formula. Needed for SunPRO C 5.0.
135488 2007-03-11  Bruno Haible  <bruno@clisp.org>
135490         * modules/long-options (Depends-on): Add getopt.
135492 2007-03-11  Bruno Haible  <bruno@clisp.org>
135494         * modules/modechange (Depends-on): Add stdbool.
135496 2007-03-11  Bruno Haible  <bruno@clisp.org>
135498         * modules/i-ring (Depends-on): Add stdbool.
135500 2007-03-11  Bruno Haible  <bruno@clisp.org>
135502         * modules/gc-des (Depends-on): Add stdbool.
135504 2007-03-11  Bruno Haible  <bruno@clisp.org>
135506         * m4/mktime.m4 (gl_PREREQ_MKTIME): Require AC_C_INLINE.
135508 2007-03-11  Bruno Haible  <bruno@clisp.org>
135510         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
135512 2007-03-11  Bruno Haible  <bruno@clisp.org>
135514         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Fix syntax error.
135516 2007-03-11  Bruno Haible  <bruno@clisp.org>
135518         * lib/vasnprintf.c (sprintf): Undefine.
135520 2007-03-11  Bruno Haible  <bruno@clisp.org>
135522         * lib/isnan.c (rpl_isnan, rpl_isnanl): Work around bug regarding
135523         initializers in SunPRO C and Compaq C compilers.
135525 2007-03-11  Bruno Haible  <bruno@clisp.org>
135527         * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer
135528         decrementing code ANSI C compliant.
135530 2007-03-11  Bruno Haible  <bruno@clisp.org>
135532         * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef.
135533         Needed for Solaris 2.5.1 ranlib and SunPRO C 5.0.
135535 2007-03-11  Bruno Haible  <bruno@clisp.org>
135537         * tests/test-stdbool.c (s, d, e, xlcbug): Disable checks that gnulib's
135538         <stdbool.h> substitute doesn't pass.
135540 2007-03-11  Bruno Haible  <bruno@clisp.org>
135542         * lib/vasnprintf.c (snprintf): Undefine. Avoids an endless recursion.
135544 2007-03-11  Bruno Haible  <bruno@clisp.org>
135546         * gnulib-tool (func_create_megatestdir): Create also an autobuild
135547         script, for submission to autobuild.josefsson.org.
135549 2007-03-10  Bruno Haible  <bruno@clisp.org>
135551         * modules/canonicalize-lgpl-tests: New file.
135552         * tests/test-canonicalize-lgpl.sh: New file.
135553         * tests/test-canonicalize-lgpl.c: New file.
135555         * modules/c-strcase-tests: New file.
135556         * tests/test-c-strcase.sh: New file.
135557         * tests/test-c-strcasecmp.c: New file.
135558         * tests/test-c-strncasecmp.c: New file.
135560         * modules/atexit-tests: New file.
135561         * tests/test-atexit.sh: New file.
135562         * tests/test-atexit.c: New file.
135564 2007-03-10  Bruno Haible  <bruno@clisp.org>
135566         * tests/test-binary-io.sh: Use temporary filenames that are not so
135567         likely to clash with those of other tests (in a parallel make).
135568         * tests/test-binary-io.c: Likewise.
135570 2007-03-10  Bruno Haible  <bruno@clisp.org>
135572         * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
135573         fallback; use #error instead.
135574         Suggested by Simon Josefsson.
135576 2007-03-10  Bruno Haible  <bruno@clisp.org>
135578         * gnulib-tool (func_create_testdir): Treat MOSTLYCLEANFILES like
135579         CLEANFILES. Put spaces in each line of $cleaned_files, not only the
135580         first and the last.
135582 2007-03-10  Bruno Haible  <bruno@clisp.org>
135584         * lib/stdint_.h (uint_least64_t): Fix typo in last patch.
135586 2007-03-10  Bruno Haible  <bruno@clisp.org>
135588         * modules/snprintf-posix-tests (EXTRA_DIST): New variable. Needed for
135589         "make distcheck".
135590         * modules/sprintf-posix-tests (EXTRA_DIST): Likewise.
135591         * modules/vsnprintf-posix-tests (EXTRA_DIST): Likewise.
135592         * modules/vsprintf-posix-tests (EXTRA_DIST): Likewise.
135594 2007-03-10  Bruno Haible  <bruno@clisp.org>
135596         * modules/allocsa-tests (test_allocsa_SOURCES): Remove redundant
135597         variable.
135598         * modules/dirname-tests (test_dirname_SOURCES): Remove redundant
135599         variable.
135601 2007-03-09  Eric Blake  <ebb9@byu.net>
135602         and Matthew Woehlke  <mw_triad@users.sourceforge.net>  (tiny change)
135604         * lib/stdint_.h (int64_t, uint64_t): Don't undefine if 64-bit
135605         types are not being provided by gnulib.
135606         (GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit
135607         types are supported.
135609 2007-03-10  Bruno Haible  <bruno@clisp.org>
135611         * lib/stdio_.h (__attribute__): New macro.
135612         (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
135613         vsprintf): Specify __attribute__ __format__ for GCC.
135614         Suggested by Eric Blake.
135616 2007-03-09  Bruno Haible  <bruno@clisp.org>
135618         * modules/printf-posix-tests: New file.
135619         * tests/test-printf-posix.sh: New file.
135620         * tests/test-printf-posix.c: New file.
135622         * modules/printf-posix: New file.
135623         * lib/printf.c: New file.
135624         * m4/printf-posix-rpl.m4: New file.
135625         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_PRINTF_POSIX,
135626         REPLACE_PRINTF.
135627         * lib/stdio_.h (printf): New declaration.
135628         (format, __format__, ____printf____, ____scanf____, ____strftime____,
135629         ____strfmon____): New macros.
135630         * modules/stdio (Makefile.am): Substitute also GNULIB_PRINTF_POSIX,
135631         REPLACE_PRINTF.
135633 2007-03-09  Bruno Haible  <bruno@clisp.org>
135635         * tests/test-vasnprintf-posix2.sh: New file.
135636         * tests/test-vasnprintf-posix2.c: New file.
135637         * modules/vasnprintf-posix-tests (Files): Add them and m4/locale-fr.m4.
135638         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
135639         (Makefile.am): Activate test-vasnprintf-posix2.sh.
135641         * lib/vasnprintf.c (VASNPRINTF): For the 'a' and 'A' directives, use
135642         a locale dependent decimal point, rather than always '.'.
135644 2007-03-09  Eric Blake  <ebb9@byu.net>
135646         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
135647         spite of platforms like Tandem/NSK that define it to -1.
135649 2007-03-08  Bruno Haible  <bruno@clisp.org>
135651         * modules/vprintf-posix-tests: New file.
135652         * tests/test-vprintf-posix.sh: New file.
135653         * tests/test-vprintf-posix.c: New file.
135654         * tests/test-printf-posix.h: New file.
135656         * modules/vprintf-posix: New file.
135657         * lib/vprintf.c: New file.
135658         * m4/vprintf-posix.m4: New file.
135659         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
135660         REPLACE_VPRINTF.
135661         * lib/stdio_.h (vprintf): New declaration.
135662         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
135663         REPLACE_VPRINTF.
135665 2007-03-08  Bruno Haible  <bruno@clisp.org>
135667         * modules/fprintf-posix-tests: New file.
135668         * tests/test-fprintf-posix.sh: New file.
135669         * tests/test-fprintf-posix.c: New file.
135671         * modules/fprintf-posix: New file.
135672         * lib/fprintf.c: New file.
135673         * m4/fprintf-posix.m4: New file.
135674         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
135675         REPLACE_FPRINTF.
135676         * lib/stdio_.h (fprintf): New declaration.
135677         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
135678         REPLACE_FPRINTF.
135680 2007-03-08  Bruno Haible  <bruno@clisp.org>
135682         * modules/vfprintf-posix-tests: New file.
135683         * tests/test-vfprintf-posix.sh: New file.
135684         * tests/test-vfprintf-posix.c: New file.
135685         * tests/test-fprintf-posix.h: New file.
135686         * tests/test-fprintf-posix.out: New file.
135688         * modules/vfprintf-posix: New file.
135689         * lib/vfprintf.c: New file.
135690         * m4/vfprintf-posix.m4: New file.
135691         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
135692         REPLACE_VFPRINTF.
135693         * lib/stdio_.h (vfprintf): New declaration.
135694         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
135695         REPLACE_VFPRINTF.
135697 2007-03-08  Bruno Haible  <bruno@clisp.org>
135699         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
135701 2007-03-08  Bruno Haible  <bruno@clisp.org>
135703         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
135704         instead of 'expr' invocations.
135705         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
135706         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
135707         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
135708         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
135709         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
135710         Suggested by Paul Eggert.
135712 2007-03-08  Bruno Haible  <bruno@clisp.org>
135714         * modules/fseterr-tests: New file.
135715         * tests/test-fseterr.c: New file.
135717         * modules/fseterr: New file.
135718         * lib/fseterr.h: New file.
135719         * lib/fseterr.c: New file.
135721 2007-03-08  Bruno Haible  <bruno@clisp.org>
135723         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
135724         * lib/getopt_.h: Likewise.
135725         * lib/mbswidth.h: Likewise.
135726         * lib/setenv.h: Likewise.
135727         * lib/vasnprintf.h: Likewise.
135728         * lib/vasprintf.h: Likewise.
135729         * lib/verror.h: Likewise.
135730         * lib/xsetenv.h: Likewise.
135731         * lib/xvasprintf.h: Likewise.
135733 2007-03-08  Jim Meyering  <jim@meyering.net>
135735         * users.txt: Add parted.
135737         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
135739 2007-03-07  Bruno Haible  <bruno@clisp.org>
135741         * m4/printf.m4: Make the shell script snippets copy&pastable.
135743 2007-03-02  Bruno Haible  <bruno@clisp.org>
135745         * lib/netinet_in_.h: New file.
135746         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
135747         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
135748         * modules/netinet_in (Files): Add lib/netinet_in_.h.
135749         (Depends-on): Add absolute-header.
135750         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
135751         into netinet/in.h.
135753 2007-03-03  Bruno Haible  <bruno@clisp.org>
135755         * lib/sys_select_.h: New file.
135756         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
135757         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
135758         * modules/sys_select (Files): Add lib/sys_select_.h.
135759         (Depends-on): Add absolute-header.
135760         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
135761         into sys/select.h.
135763 2007-03-02  Bruno Haible  <bruno@clisp.org>
135765         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
135766         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
135767         values.
135768         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
135769         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
135770         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
135771         * modules/sys_socket (Depends-on): Add absolute-header.
135772         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
135773         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
135774         (Include): Remove requirement of inclusion of <sys/types.h>.
135776 2007-03-02  Bruno Haible  <bruno@clisp.org>
135778         * lib/byteswap_.h (bswap_32): Fix formula.
135780 2007-03-06  Bruno Haible  <bruno@clisp.org>
135782         * modules/sprintf-posix-tests: New file.
135783         * tests/test-sprintf-posix.c: New file.
135785         * modules/sprintf-posix: New file.
135786         * lib/sprintf.c: New file.
135787         * m4/sprintf-posix.m4: New file.
135788         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
135789         REPLACE_SPRINTF.
135790         * lib/stdio_.h (sprintf): New declaration.
135791         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
135792         REPLACE_SPRINTF.
135794 2007-03-06  Bruno Haible  <bruno@clisp.org>
135796         * modules/vsprintf-posix-tests: New file.
135797         * tests/test-vsprintf-posix.c: New file.
135798         * tests/test-sprintf-posix.h: New file.
135800         * modules/vsprintf-posix: New file.
135801         * lib/vsprintf.c: New file.
135802         * m4/vsprintf-posix.m4: New file.
135803         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
135804         REPLACE_VSPRINTF.
135805         * lib/stdio_.h (vsprintf): New declaration.
135806         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
135807         REPLACE_VSPRINTF.
135809 2007-03-06  Bruno Haible  <bruno@clisp.org>
135811         * modules/vsnprintf (Depend-on): Remove minmax.
135813 2007-03-06  Bruno Haible  <bruno@clisp.org>
135815         * modules/snprintf-posix-tests: New file.
135816         * tests/test-snprintf-posix.c: New file.
135818         * modules/snprintf-posix: New file.
135819         * m4/snprintf-posix.m4: New file.
135820         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
135821         gl_FUNC_SNPRINTF.
135822         (gl_FUNC_SNPRINTF): Invoke it.
135823         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
135824         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
135825         is set.
135826         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
135828 2007-03-06  Bruno Haible  <bruno@clisp.org>
135830         * modules/vsnprintf-posix-tests: New file.
135831         * tests/test-vsnprintf-posix.c: New file.
135832         * tests/test-snprintf-posix.h: New file.
135834         * modules/vsnprintf-posix: New file.
135835         * m4/vsnprintf-posix.m4: New file.
135836         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
135837         gl_FUNC_VSNPRINTF.
135838         (gl_FUNC_VSNPRINTF): Invoke it.
135839         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
135840         * lib/stdio_.h (vsnprintf): Define as a replacement if
135841         REPLACE_VSNPRINTF is set.
135842         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
135844 2007-03-06  Bruno Haible  <bruno@clisp.org>
135846         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
135847         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
135849 2007-03-06  Bruno Haible  <bruno@clisp.org>
135851         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
135852         (asinl): Declare also if HAVE_DECL_ASINL is set.
135853         (atanl): Declare also if HAVE_DECL_ATANL is set.
135854         (ceill): Declare also if HAVE_DECL_CEILL is set.
135855         (cosl): Declare also if HAVE_DECL_COSL is set.
135856         (expl): Declare also if HAVE_DECL_EXPL is set.
135857         (floorl): Declare also if HAVE_DECL_FLOORL is set.
135858         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
135859         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
135860         (logl): Declare also if HAVE_DECL_LOGL is set.
135861         (sinl): Declare also if HAVE_DECL_SINL is set.
135862         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
135863         (tanl): Declare also if HAVE_DECL_TANL is set.
135864         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
135865         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
135866         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
135867         declaration of frexpl, ldexpl.
135868         * modules/printf-frexpl (Depends-on): Add math.
135869         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
135871 2007-03-05  Bruno Haible  <bruno@clisp.org>
135873         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
135874         frexpl and ldexpl are declared.
135875         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
135877 2007-03-05  Bruno Haible  <bruno@clisp.org>
135879         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
135880         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
135882 2007-03-05  Bruno Haible  <bruno@clisp.org>
135884         * lib/stdio_.h: Include <stddef.h>.
135886 2007-03-05  Bruno Haible  <bruno@clisp.org>
135888         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
135890 2007-03-05  Bruno Haible  <bruno@clisp.org>
135892         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
135893         NetBSD 4, from Ralf Wildenhues.
135895 2007-03-04  Bruno Haible  <bruno@clisp.org>
135897         * lib/vasprintf.h: Update #if logic for the case when the functions
135898         exist but are overridden.
135900 2007-03-04  Bruno Haible  <bruno@clisp.org>
135902         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
135903         implementations: glibc-2.4 and MacOS X 10.3.
135904         * tests/test-vasnprintf-posix.c (test_function): Test also the case
135905         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
135906         * tests/test-vasprintf-posix.c (test_function): Likewise.
135908 2007-03-04  Bruno Haible  <bruno@clisp.org>
135910         * modules/vasprintf-posix-tests: New file.
135911         * tests/test-vasprintf-posix.c: New file.
135913         * modules/vasprintf-posix: New file.
135914         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
135915         defined.
135916         * m4/vasprintf-posix.m4: New file.
135917         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
135918         gl_FUNC_VASPRINTF.
135919         (gl_FUNC_VASPRINTF): Invoke it.
135920         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
135921         here.
135922         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
135924 2007-03-04  Bruno Haible  <bruno@clisp.org>
135926         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
135927         REPLACE_GETTIMEOFDAY.
135928         * modules/sys_time (Makefile.am): Likewise.
135929         * m4/sys_time_h.m4: Likewise.
135930         * m4/gettimeofday.m4: Likewise.
135932 2007-03-04  Bruno Haible  <bruno@clisp.org>
135934         * modules/vasnprintf-posix-tests: New file.
135935         * tests/test-vasnprintf-posix.c: New file.
135937         * modules/vasnprintf-posix: New file.
135938         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
135939         printf-frexpl.h.
135940         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
135941         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
135942         REPLACE_VASNPRINTF is defined.
135943         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
135944         gl_FUNC_VASNPRINTF.
135945         (gl_FUNC_VASNPRINTF): Invoke it.
135946         * m4/vasnprintf-posix.m4: New file.
135947         * m4/printf.m4: New file.
135949 2007-03-04  Bruno Haible  <bruno@clisp.org>
135951         Compile progreloc.c only if --enable-relocatable is specified.
135952         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
135953         if --enable-relocatable was specified.
135954         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
135955         lib_SOURCES.
135957 2007-03-04  Jim Meyering  <jim@meyering.net>
135959         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
135960         Use it consistently, rather than enumerating errno constants.
135962 2007-03-04  Bruno Haible  <bruno@clisp.org>
135964         * modules/xvasprintf-tests: New file.
135965         * tests/test-xvasprintf.c: New file.
135967         * modules/vasprintf-tests: New file.
135968         * tests/test-vasprintf.c: New file.
135970         * modules/vasnprintf-tests: New file.
135971         * tests/test-vasnprintf.c: New file.
135973         * modules/vsnprintf-tests: New file.
135974         * tests/test-vsnprintf.c: New file.
135976         * modules/snprintf-tests: New file.
135977         * tests/test-snprintf.c: New file.
135979 2007-03-04  Bruno Haible  <bruno@clisp.org>
135981         Compile relocatable.c only if --enable-relocatable is specified.
135982         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
135983         gl_RELOCATABLE_LIBRARY.
135984         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
135985         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
135986         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
135987         gl_RELOCATABLE_LIBRARY.
135988         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
135989         (Makefile.am): Remove lib_SOURCES.
135990         * modules/relocatable-lib-lgpl (configure.ac): Invoke
135991         gl_RELOCATABLE_LIBRARY.
135992         (Makefile.am): Remove lib_SOURCES.
135993         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
135994         always.
135995         * modules/relocatable-prog-wrapper (configure.ac): Invoke
135996         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
135998 2007-03-04  Bruno Haible  <bruno@clisp.org>
136000         * modules/argmatch-tests: New file.
136001         * tests/test-argmatch.c: New file.
136003         * tests/test-allocsa.c (main): Halve the number of loop runs.
136005         * modules/alloca-opt-tests: New file.
136006         * tests/test-alloca-opt.c: New file.
136008 2007-03-04  Jim Meyering  <jim@meyering.net>
136010         Work around difference between Linux ACLs and Solaris 10 ZFS.
136011         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
136012         for EINVAL.
136014 2007-03-03  Bruno Haible  <bruno@clisp.org>
136016         * modules/relocatable-prog (Depends-on): Add back progreloc's
136017         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
136019 2007-03-03  Bruno Haible  <bruno@clisp.org>
136021         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
136022         * modules/relocatable-lib: New file.
136024 2007-03-03  Bruno Haible  <bruno@clisp.org>
136026         * modules/relocatable-prog: Renamed from modules/relocatable.
136027         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
136029 2007-03-03  Bruno Haible  <bruno@clisp.org>
136031         * modules/relocatable-script (Files): Add doc/relocatable.texi,
136032         m4/relocatable-lib.m4.
136033         (Depends-on): Remove 'relocatable'.
136034         (configure.ac): Add gl_RELOCATABLE_NOP.
136036 2007-03-03  Bruno Haible  <bruno@clisp.org>
136038         * modules/relocatable-prog-wrapper: New file.
136039         * modules/relocatable (Depends-on): Add it. Remove all other
136040         dependencies except progname.
136041         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
136043         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
136044         (gl_FUNC_STRERROR): Nop.
136045         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
136047         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
136048         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
136050         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
136051         (gl_FUNC_READLINK): Update.
136053         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
136055 2007-03-03  Bruno Haible  <bruno@clisp.org>
136057         * lib/xreadlink.c: Include <unistd.h> unconditionally.
136058         * modules/xreadlink (Depends-on): Add unistd.
136059         * modules/xreadlink-with-size (Depends-on): Likewise.
136061 2007-03-03  Bruno Haible  <bruno@clisp.org>
136063         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
136064         extracted from gt_FUNC_SETENV.
136065         (gt_FUNC_SETENV): Remove macro.
136066         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
136067         remove gt_FUNC_SETENV.
136069 2007-03-03  Bruno Haible  <bruno@clisp.org>
136071         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
136072         ENABLE_RELOCATABLE here.
136073         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
136075 2007-03-03  Bruno Haible  <bruno@clisp.org>
136077         * modules/rbtreehash-list-tests (Depends-on): Add progname.
136078         * tests/test-rbtreehash_list.c: Include progname.h.
136079         (main): Call set_program_name.
136081         * modules/rbtree-oset-tests (Depends-on): Add progname.
136082         * tests/test-rbtree_oset.c: Include progname.h.
136083         (main): Call set_program_name.
136085         * modules/rbtree-list-tests (Depends-on): Add progname.
136086         * tests/test-rbtree_list.c: Include progname.h.
136087         (main): Call set_program_name.
136089         * modules/linked-list-tests (Depends-on): Add progname.
136090         * tests/test-linked_list.c: Include progname.h.
136091         (main): Call set_program_name.
136093 2007-03-03  Bruno Haible  <bruno@clisp.org>
136095         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
136096         All uses of __restrict changed to _Restrict_.
136097         * lib/glob_.h (__restrict): Remove macro.
136099 2007-03-02  Bruno Haible  <bruno@clisp.org>
136101         * modules/gettext (configure.ac): Require gettext infrastructure
136102         from version 0.16.1.
136104 2007-03-02  Bruno Haible  <bruno@clisp.org>
136106         * modules/linkedhash-list-tests (Depends-on): Add progname.
136107         * tests/test-linkedhash_list.c: Include progname.h.
136108         (main): Call set_program_name.
136110         * modules/carray-list-tests (Depends-on): Add progname.
136111         * tests/test-carray_list.c: Include progname.h.
136112         (main): Call set_program_name.
136114         * modules/avltreehash-list-tests (Depends-on): Add progname.
136115         * tests/test-avltreehash_list.c: Include progname.h.
136116         (main): Call set_program_name.
136118         * modules/avltree-oset-tests (Depends-on): Add progname.
136119         * tests/test-avltree_oset.c: Include progname.h.
136120         (main): Call set_program_name.
136122         * modules/avltree-list-tests (Depends-on): Add progname.
136123         * tests/test-avltree_list.c: Include progname.h.
136124         (main): Call set_program_name.
136126         * modules/array-oset-tests (Depends-on): Add progname.
136127         * tests/test-array_oset.c: Include progname.h.
136128         (main): Call set_program_name.
136130         * modules/array-list-tests (Depends-on): Add progname.
136131         * tests/test-array_list.c: Include progname.h.
136132         (main): Call set_program_name.
136134         * modules/argp-tests (Depends-on): Add progname.
136135         * tests/test-argp.c: Include argp.h first. Include progname.h.
136136         (main): Call set_program_name.
136138 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
136140         * doc/gnulib-tool.texi (Initial import): Reword description of
136141         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
136142         limited effect even if defined after the first system include.
136144 2007-03-01  Bruno Haible  <bruno@clisp.org>
136146         * build-aux/config.libpath: Update to libtool-1.5.22.
136147         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
136149 2007-03-01  Bruno Haible  <bruno@clisp.org>
136151         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
136152         foo_CFLAGS.
136153         Reported by Ralf Wildenhues.
136155 2007-03-01  Bruno Haible  <bruno@clisp.org>
136157         * build-aux/install-reloc: Remove object files left over by some
136158         compilers.
136159         Reported by Ralf Wildenhues.
136161 2007-03-01  Bruno Haible  <bruno@clisp.org>
136163         * build-aux/install-reloc: Break long lines.
136165 2007-03-01  Bruno Haible  <bruno@clisp.org>
136167         * doc/relocatable.texi: Document that it may not work on OpenBSD.
136168         Reported by Ralf Wildenhues.
136170 2007-03-01  Bruno Haible  <bruno@clisp.org>
136172         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
136173         include ordering constraints.
136175 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
136177         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
136178         <http://lists.gnu.org/r/bug-gnulib/2007-02/msg00136.html>.
136179         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
136180         as another example.
136181         * lib/time_.h: Fix misspelling.
136182         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
136183         Require gl_HEADER_TIME_H_DEFAULTS.
136184         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
136185         * m4/time_r.m4 (gl_TIME_R): Likewise.
136186         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
136188 2007-03-01  Bruno Haible  <bruno@clisp.org>
136190         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
136191         * m4/utimens.m4 (gl_UTIMENS): Likewise.
136193 2007-03-01  Jim Meyering  <jim@meyering.net>
136195         * modules/xreadlink (Maintainer): Add my name.
136196         * modules/xreadlink-with-size (Depends-on): Alphabetize.
136198 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
136199             Bruno Haible  <bruno@clisp.org>
136201         * build-aux/install-reloc: Compile also c-ctype.c.
136202         * build-aux/relocatable.sh.in: New file.
136203         * doc/relocatable.texi: New file.
136204         * doc/relocatable-maint.texi: New file.
136205         * doc/gnulib.texi: Include relocatable-maint.texi.
136206         * lib/progreloc.c: Include unistd.h unconditionally.
136207         * lib/relocwrapper.c: Include unistd.h unconditionally.
136208         Include c-ctype.h.
136209         (add_dotbin): Use c_tolower.
136210         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
136211         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
136212         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
136213         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
136214         to m4/relocatable-lib.m4.
136215         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
136216         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
136217         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
136218         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
136219         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
136220         * modules/relocatable: New file.
136221         * modules/relocatable-lib: New file.
136222         * modules/relocatable-script: New file.
136224 2007-02-28  Bruno Haible  <bruno@clisp.org>
136226         Import --enable-relocatable infrastructure.
136227         * build-aux/config.libpath: New file, from GNU gettext.
136228         * build-aux/install-reloc: New file, from GNU gettext.
136229         * build-aux/reloc-ldflags: New file, from GNU gettext.
136230         * lib/relocatable.h: New file, from GNU gettext.
136231         * lib/relocatable.c: New file, from GNU gettext.
136232         * lib/relocwrapper.c: New file, from GNU gettext.
136233         * m4/relocatable.m4: New file, from GNU gettext.
136235 2007-02-28  Bruno Haible  <bruno@clisp.org>
136237         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
136239         * modules/xreadlink: New file, from GNU gettext with modifications.
136240         * lib/xreadlink.c: New file, from GNU gettext.
136241         * lib/xreadlink.h: Add comments.
136242         (xreadlink): New declaration.
136244         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
136245         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
136246         lib/xreadlink-with-size.c.
136247         (configure.ac): Remove gl_XREADLINK invocation.
136248         (Makefile.am): Augment lib_SOURCES.
136249         * m4/xreadlink.m4: Remove file.
136250         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
136251         (xreadlink_with_size): Renamed from xreadink.
136252         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
136253         * modules/canonicalize (Depends-on): Replace xreadlink with
136254         xreadlink-with-size.
136255         * lib/canonicalize.c (canonicalize_filename_mode): Update.
136257 2007-02-25  Jim Meyering  <jim@meyering.net>
136259         * build-aux/announce-gen: When complaining about excess arguments,
136260         list them.
136262 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
136264         * README: Document signed integer overflow situation more
136265         accurately.
136267 2007-02-25  Bruno Haible  <bruno@clisp.org>
136269         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
136270         'a' or 'A' conversion.
136272 2007-02-25  Bruno Haible  <bruno@clisp.org>
136274         * modules/filename: Renamed from modules/pathname.
136275         (Files): Replace lib/pathname.h with lib/filename.h. Replace
136276         lib/concatpath.c with lib/concat-filename.c.
136277         (Makefile.am): Update.
136278         (Include): Replace pathname.h with filename.h.
136279         * lib/filename.h: Renamed from lib/pathname.h.
136280         (concatenated_filename): Renamed from concatenated_pathname.
136281         * lib/concat-filename.c: Renamed from lib/concatpath.c.
136282         (concatenated_filename): Renamed from concatenated_pathname.
136283         * lib/findprog.c: Include filename.h instead of pathname.h.
136284         (find_in_path): Update.
136285         * lib/javacomp.c: Include filename.h instead of pathname.h.
136286         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
136287         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
136288         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
136289         is_oldgcj_14_13_usable, is_javac_usable): Update.
136290         * lib/javaexec.c: Include filename.h instead of pathname.h.
136291         (execute_java_class): Update.
136292         * modules/findprog: Update.
136293         * modules/javacomp: Update.
136294         * modules/javaexec: Update.
136295         * MODULES.html.sh (File system functions): Add 'filename', remove
136296         'pathname'.
136298 2007-02-25  Bruno Haible  <bruno@clisp.org>
136300         * modules/printf-frexpl-tests: New file.
136301         * tests/test-printf-frexpl.c: New file.
136303         * modules/printf-frexpl: New file.
136304         * lib/printf-frexpl.h: New file.
136305         * lib/printf-frexpl.c: New file.
136306         * m4/printf-frexpl.m4: New file.
136308 2007-02-25  Bruno Haible  <bruno@clisp.org>
136310         * modules/printf-frexp-tests: New file.
136311         * tests/test-printf-frexp.c: New file.
136313         * modules/printf-frexp: New file.
136314         * lib/printf-frexp.h: New file.
136315         * lib/printf-frexp.c: New file.
136316         * m4/printf-frexp.m4: New file.
136318 2007-02-25  Bruno Haible  <bruno@clisp.org>
136320         Assume automake >= 1.10 for the tests.
136321         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
136322         * modules/arctwo-tests: Likewise.
136323         * modules/argp-tests: Likewise.
136324         * modules/avltree-list-tests: Likewise.
136325         * modules/avltree-oset-tests: Likewise.
136326         * modules/avltreehash-list-tests: Likewise.
136327         * modules/carray-list-tests: Likewise.
136328         * modules/crc-tests: Likewise.
136329         * modules/des-tests: Likewise.
136330         * modules/gc-arcfour-tests: Likewise.
136331         * modules/gc-arctwo-tests: Likewise.
136332         * modules/gc-des-tests: Likewise.
136333         * modules/gc-hmac-md5-tests: Likewise.
136334         * modules/gc-hmac-sha1-tests: Likewise.
136335         * modules/gc-md2-tests: Likewise.
136336         * modules/gc-md4-tests: Likewise.
136337         * modules/gc-md5-tests: Likewise.
136338         * modules/gc-pbkdf2-sha1-tests: Likewise.
136339         * modules/gc-rijndael-tests: Likewise.
136340         * modules/gc-sha1-tests: Likewise.
136341         * modules/gc-tests: Likewise.
136342         * modules/getaddrinfo-tests: Likewise.
136343         * modules/hmac-md5-tests: Likewise.
136344         * modules/hmac-sha1-tests: Likewise.
136345         * modules/linked-list-tests: Likewise.
136346         * modules/linkedhash-list-tests: Likewise.
136347         * modules/lock-tests: Likewise.
136348         * modules/md2-tests: Likewise.
136349         * modules/md4-tests: Likewise.
136350         * modules/md5-tests: Likewise.
136351         * modules/rbtree-list-tests: Likewise.
136352         * modules/rbtree-oset-tests: Likewise.
136353         * modules/rbtreehash-list-tests: Likewise.
136354         * modules/read-file-tests: Likewise.
136355         * modules/rijndael-tests: Likewise.
136356         * modules/stdint-tests: Likewise.
136357         * modules/tls-tests: Likewise.
136359 2007-02-24  Bruno Haible  <bruno@clisp.org>
136361         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
136362         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
136363         function; instead check whether isnan with a double argument links.
136364         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
136365         function; instead check whether isnan with a 'long double' argument
136366         links.
136367         Reported by Eric Blake <ebb9@byu.net>.
136369 2007-02-24  Bruno Haible  <bruno@clisp.org>
136371         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
136372         defined.
136373         * lib/isnanl.c: Remove all code. Just include isnan.c.
136374         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
136376 2007-02-25  Jim Meyering  <jim@meyering.net>
136378         Avoid conflicting types for 'unsetenv' on FreeBSD.
136379         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
136380         conflicting with FreeBSD's (5.0 and 6.1) function declaration
136381         in stdlib.h.
136383 2007-02-24  Bruno Haible  <bruno@clisp.org>
136385         * modules/isnanl-nolibm-tests: New file.
136386         * tests/test-isnanl.c: New file.
136388         * modules/isnanl-nolibm: New file.
136389         * lib/isnanl.h: New file.
136390         * lib/isnanl.c: New file.
136391         * m4/isnanl.m4: New file.
136393 2007-02-24  Bruno Haible  <bruno@clisp.org>
136395         * modules/isnan-nolibm-tests: New file.
136396         * tests/test-isnan.c: New file.
136398         * modules/isnan-nolibm: New file.
136399         * lib/isnan.h: New file.
136400         * lib/isnan.c: New file.
136401         * m4/isnan.m4: New file.
136403 2007-02-24  Bruno Haible  <bruno@clisp.org>
136405         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
136406         assume that an exponent fits in 20 bits.
136408 2007-02-24  Jim Meyering  <jim@meyering.net>
136410         * m4/regex.m4: Update the description of the configure-time option,
136411         --without-included-regex, to state accurately what the defaults are,
136412         and perhaps to give people an idea why using this option is risky.
136414 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
136416         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
136417         loops on small arguments.  This attempts to avoid the problem
136418         Bruno Haible reported for AIX 4.3.2 in
136419         <http://lists.gnu.org/r/bug-gnulib/2007-02/msg00309.html>.
136421 2007-02-23  Bruno Haible  <bruno@clisp.org>
136423         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
136424         Needed for help2man.
136426 2007-02-23  Karl Berry  <karl@gnu.org>
136428         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
136429         exists, foo.h should be cvs-ignored, not committed.
136431 2007-02-23  Eric Blake  <ebb9@byu.net>
136433         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
136434         * lib/stat-time.h (includes): Likewise.
136435         * lib/utimecmp.c (includes): Likewise.
136436         * lib/utimens.h (includes): Likewise.
136437         * lib/getdate.y (includes): Also include "timespec.h" for use
136438         internal to the module.
136439         * modules/utimens (Depends-on): Revert yesterday's patch.
136440         * modules/nanosleep (Depends-on): Add missing dependency.
136442 2007-02-22  Bruno Haible  <bruno@clisp.org>
136444         * lib/glob.c: Don't include getlogin_r.h.
136446 2007-02-22  Jim Meyering  <jim@meyering.net>
136448         * modules/utimens (Depends-on): Add timespec, required for
136449         utimens.h's inclusion of timespec.h.
136451 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
136453         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
136454         long unreadable paths in GNU/Linux.  Problem reported by Andreas
136455         Schwab in
136456         <http://lists.gnu.org/r/bug-gnulib/2007-02/msg00261.html>.
136457         I'll try to think of a better way to fix the Solaris problem.
136459         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
136460         like glibc; on Solaris 10, it fails with errno == EINVAL.
136461         POSIX says the behavior is unspecified if the first argument is NULL,
136462         so play it safe and never pass NULL to the system getcwd.
136464 2007-02-21  Jim Meyering  <jim@meyering.net>
136466         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
136467         of gettimeofday.  It would conflict with the one now always
136468         provided via sys_time_.h.  Reported by Matthew Woehlke, as
136469         an IRIX 6.5 build failure.
136471 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
136473         Minor fixups to port to Solaris 10 with Sun C 5.8.
136474         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
136475         * modules/getcwd (Depends-on): Add dirfd.
136476         * lib/putenv.c (putenv): #undef it.
136477         (rpl_putenv): New decl.
136478         (malloc, free): Include <stdlib.h> rather than prototyping separately.
136480 2007-02-20  Bruno Haible  <bruno@clisp.org>
136482         * modules/stdio-tests: New file.
136483         * tests/test-stdio.c: New file.
136485         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
136486         (Depends-on): Add stdio.
136487         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
136488         (Include): Use <stdio.h> instead of vsnprintf.h.
136489         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
136490         HAVE_DECL_VSNPRINTF.
136491         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
136493         * modules/snprintf (Files): Remove lib/snprintf.h.
136494         (Depends-on): Add stdio.
136495         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
136496         (Include): Use <stdio.h> instead of snprintf.h.
136497         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
136498         HAVE_DECL_SNPRINTF.
136499         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
136500         * lib/getaddrinfo.c: Likewise.
136502         * modules/stdio: New file.
136503         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
136504         * lib/snprintf.h: Remove file.
136505         * lib/vsnprintf.h: Remove file.
136506         * lib/.cppi-disable: Remove snprintf.h.
136507         * m4/stdio_h.m4: New file.
136508         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
136510 2007-02-20  Jim Meyering  <jim@meyering.net>
136512         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
136513         used by e.g., mingw.  From Bruno Haible.
136515 2007-02-19  Bruno Haible  <bruno@clisp.org>
136517         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
136518         warnings.
136519         Reported by Ben Pfaff <blp@cs.stanford.edu>.
136521 2007-02-19  Bruno Haible  <bruno@clisp.org>
136523         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
136524         from mingw users.
136526 2007-02-19  Bruno Haible  <bruno@clisp.org>
136528         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
136529         warnings.
136530         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
136532 2007-02-19  Jim Meyering  <jim@meyering.net>
136534         Don't use FD after a successful "fdopendir (fd)".
136535         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
136536         Reset it by calling dirfd on the just-obtained DIR*.
136538         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
136539         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
136541 2007-02-18  Bruno Haible  <bruno@clisp.org>
136543         * lib/readlink.c: Include <unistd.h>.
136544         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
136545         HAVE_READLINK.
136546         * modules/readlink (Depends-on): Add unistd.
136547         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
136548         (Include): Add <unistd.h>.
136550         * lib/getlogin_r.h: Remove file.
136551         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
136552         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
136553         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
136554         HAVE_DECL_GETLOGIN_R.
136555         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
136556         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
136557         (Include): Use <unistd.h> instead of getlogin_r.h.
136559         * lib/getcwd.h: Remove file.
136560         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
136561         * lib/xgetcwd.c: Likewise.
136562         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
136563         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
136564         * modules/getcwd (Files): Remove lib/getcwd.h.
136565         (Depends-on): Add unistd.
136566         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
136567         (Include): Use <unistd.h> instad of getcwd.h.
136569         * lib/ftruncate.c: Include <unistd.h> first.
136570         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
136571         Set HAVE_FTRUNCATE.
136572         * modules/ftruncate (Depends-on): Add unistd.
136573         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
136575         * lib/fchdir.c: Include <unistd.h> first.
136576         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
136577         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
136578         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
136579         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
136580         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
136582         * lib/dup2.c: Include <unistd.h> first.
136583         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
136584         HAVE_DUP2.
136585         * modules/dup2 (Depends-on): Add unistd.
136586         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
136588         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
136589         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
136590         REPLACE_CHOWN. Don't define chown as a macro here.
136591         * modules/chown (Depends-on): Add unistd.
136592         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
136594         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
136595         Add definition for GL_LINK_WARNING.
136596         (chown, dup2): New declarations.
136597         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
136598         link warning.
136599         (ftruncate): New declaration.
136600         (getcwd): New declaration, taken from old getcwd.h.
136601         (getlogin_r): New declaration, taken from old getlogin_r.h.
136602         (readlink): New declaration.
136603         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
136604         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
136605         (gl_PREREQ_UNISTD): Remove macro.
136606         (gl_UNISTD_MODULE_INDICATOR): New macro.
136607         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
136608         many new variables. Don't set UNISTD_H.
136609         * modules/unistd (Description): Change.
136610         (Depends-on): Add link-warning.
136611         (configure.ac): Update.
136612         (Makefile.am): Create unistd.h always. Substitute many new variables
136613         into it.
136615 2007-02-18  Bruno Haible  <bruno@clisp.org>
136617         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
136618         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
136619         HAVE_GETSUBOPT.
136620         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
136621         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
136622         * lib/getsubopt.h: Remove file.
136623         * modules/getsubopt (Files): Remove lib/getsubopt.h.
136624         (Depends-on): Add stdlib.
136625         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
136626         (Includes): Use <stdlib.h> instead of getsubopt.h.
136627         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
136628         Set HAVE_GETSUBOPT.
136629         * lib/getsubopt.c: Don't include getsubopt.h.
136631 2007-02-18  Bruno Haible  <bruno@clisp.org>
136633         * modules/fchdir (Depends-on): Add dup2.
136635 2007-02-18  Bruno Haible  <bruno@clisp.org>
136637         * lib/stdlib_.h: Handle glibc's special invocation convention
136638         specially.
136640 2007-02-18  Bruno Haible  <bruno@clisp.org>
136642         * modules/stdlib-tests: New file.
136643         * tests/test-stdlib.c: New file.
136645         * modules/mkstemp (Files): Remove lib/mkstemp.h.
136646         (Depends-on): Add stdlib.
136647         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
136648         (Includes): Use <stdlib.h> instead of mkstemp.h.
136649         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
136650         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
136651         * lib/mkstemp.c: Don't include mkstemp.h.
136652         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
136653         * lib/stdlib--.h: Don't include mkstemp.h.
136655         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
136656         (Depends-on): Add stdlib.
136657         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
136658         (Includes): Use <stdlib.h> instead of mkdtemp.h.
136659         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
136660         HAVE_MKDTEMP.
136661         * lib/mkdtemp.c: Don't include mkdtemp.h.
136662         * lib/clean-temp.c: Don't include mkdtemp.h.
136664         * modules/exit (Files): Remove lib/exit.h.
136665         (Depends-on): Add stdlib.
136666         (Makefile.am): Remove lib_SOURCES.
136667         (Include): Use <stdlib.h> instead of exit.h.
136668         * lib/argmatch.c: Don't include exit.h.
136669         * lib/execute.c: Likewise.
136670         * lib/pagealign_alloc.c: Likewise.
136671         * lib/pipe.c: Likewise.
136672         * lib/wait-process.c: Likewise.
136673         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
136674         * lib/exitfail.c: Likewise.
136675         * lib/savewd.c: Likewise.
136676         * lib/xsetenv.c: Likewise.
136678         * modules/stdlib: New file.
136679         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
136680         and extra comments about mkstemp().
136681         * lib/exit.h: Remove file.
136682         * lib/mkdtemp.h: Remove file.
136683         * lib/mkstemp.h: Remove file.
136684         * m4/stdlib_h.m4: New file.
136685         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
136687 2007-02-18  Bruno Haible  <bruno@clisp.org>
136689         * modules/math-tests: New file.
136690         * tests/test-math.c: New file.
136692         * modules/math: New file.
136693         * modules/mathl (Files): Remove lib/mathl.h.
136694         (Depends-on): Add math.
136695         (Makefile.am): Don't mention mathl.h.
136696         (Include): Use <math.h> instead of mathl.h.
136697         * lib/math_.h: New file.
136698         * lib/mathl.h: Remove file.
136699         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
136700         mathl.h.
136701         * lib/asinl.c: Likewise.
136702         * lib/atanl.c: Likewise.
136703         * lib/ceill.c: Likewise.
136704         * lib/cosl.c: Likewise.
136705         * lib/expl.c: Likewise.
136706         * lib/floorl.c: Likewise.
136707         * lib/frexpl.c: Likewise.
136708         * lib/ldexpl.c: Likewise.
136709         * lib/logl.c: Likewise.
136710         * lib/sincosl.c: Likewise.
136711         * lib/sinl.c: Likewise.
136712         * lib/sqrtl.c: Likewise.
136713         * lib/tanl.c: Likewise.
136714         * lib/trigl.c: Likewise.
136715         * m4/math_h.m4: New file.
136716         * MODULES.html.sh (Mathematics): Add math.
136718 2007-02-17  Bruno Haible  <bruno@clisp.org>
136720         * modules/wctype-tests: New file.
136721         * tests/test-wctype.c: New file.
136723         * modules/wchar-tests: New file.
136724         * tests/test-wchar.c: New file.
136726         * modules/unistd-tests: New file.
136727         * tests/test-unistd.c: New file.
136729         * modules/time-tests: New file.
136730         * tests/test-time.c: New file.
136732         * modules/sysexits-tests: New file.
136733         * tests/test-sysexits.c: New file.
136735         * modules/sys_time-tests: New file.
136736         * tests/test-sys_time.c: New file.
136738         * modules/sys_stat-tests: New file.
136739         * tests/test-sys_stat.c: New file.
136741         * modules/sys_socket-tests: New file.
136742         * tests/test-sys_socket.c: New file.
136744         * modules/sys_select-tests: New file.
136745         * tests/test-sys_select.c: New file.
136747         * modules/string-tests: New file.
136748         * tests/test-string.c: New file.
136750         * modules/stdbool-tests: New file.
136751         * tests/test-stdbool.c: New file.
136753         * modules/netinet_in-tests: New file.
136754         * tests/test-netinet_in.c: New file.
136756         * modules/inttypes-tests: New file.
136757         * tests/test-inttypes.c: New file.
136759         * modules/fcntl-tests: New file.
136760         * tests/test-fcntl.c: New file.
136762         * modules/byteswap-tests: New file.
136763         * tests/test-byteswap.c: New file.
136765         * modules/arpa_inet-tests: New file.
136766         * tests/test-arpa_inet.c: New file.
136768 2007-02-17  Bruno Haible  <bruno@clisp.org>
136770         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
136771         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
136772         if the corresponding module is not enabled. Emit link warnings if
136773         the function is used nevertheless.
136774         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
136775         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
136776         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
136777         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
136778         * modules/inttypes (Depends-on): Add link-warning.
136779         (Makefile.am): Copy the contents of build-aux/link-warning.h into
136780         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
136781         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
136782         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
136783         * modules/imaxdiv (configure.ac): Likewise.
136784         * modules/strtoimax (configure.ac): Likewise.
136785         * modules/strtoumax (configure.ac): Likewise.
136787 2007-02-17  Bruno Haible  <bruno@clisp.org>
136789         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
136790         gl_STRING_MODULE_INDICATOR_DEFAULTS.
136791         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
136792         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
136794 2007-02-17  Bruno Haible  <bruno@clisp.org>
136796         * modules/link-warning: New file.
136797         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
136798         * lib/string_.h (GL_LINK_WARNING): Remove definition.
136799         * modules/string (Depends-on): Add link-warning.
136800         (Makefile.am): Copy the contents of build-aux/link-warning.h into
136801         string.h.
136802         * MODULES.html.sh (Support for building libraries and executables): Add
136803         link-warning.
136805 2007-02-17  Bruno Haible  <bruno@clisp.org>
136807         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
136808         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
136809         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
136810         long lines.
136812 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
136813             Bruno Haible  <bruno@clisp.org>
136815         * modules/tmpfile: New file.
136816         * lib/tmpfile.c: New file.
136817         * m4/tmpfile.m4: New file.
136818         * MODULES.html.sh (func_all_modules): New section "Input/output".
136820 2007-02-15  Bruno Haible  <bruno@clisp.org>
136822         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
136823         (supports_delete_on_close): New function.
136824         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
136826 2007-02-14  Bruno Haible  <bruno@clisp.org>
136828         * modules/mbspcasecmp-tests: New file.
136829         * tests/test-mbspcasecmp.sh: New file.
136830         * tests/test-mbspcasecmp.c: New file.
136832         New module mbspcasecmp.
136833         * modules/mbspcasecmp: New file.
136834         * lib/mbspcasecmp.c: New file.
136835         * lib/string_.h (strncasecmp): Change warning message.
136836         (mbspcasecmp): New declaration.
136837         * m4/mbspcasecmp.m4: New file.
136838         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
136839         GNULIB_MBSPCASECMP.
136840         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
136841         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
136843 2007-02-14  Bruno Haible  <bruno@clisp.org>
136845         * modules/mbsncasecmp-tests: New file.
136846         * tests/test-mbsncasecmp.sh: New file.
136847         * tests/test-mbsncasecmp.c: New file.
136849         New module mbsncasecmp.
136850         * modules/mbsncasecmp: New file.
136851         * lib/mbsncasecmp.c: New file.
136852         * lib/string_.h (mbsncasecmp): New declaration.
136853         * m4/mbsncasecmp.m4: New file.
136854         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
136855         GNULIB_MBSNCASECMP.
136856         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
136857         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
136859 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
136861         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
136862         Verify that it doesn't overlap with our flags.
136863         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
136864         do not have the desired effect in multibyte locales; instead, use
136865         mbscasecmp.
136866         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
136867         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
136868         we don't require GNU fnmatch ourselves (if our users require it, they
136869         should do so explicitly).
136871         Fix regex code so it doesn't rely on strcasecmp.
136872         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
136873         Otherwise, include gnulib's langinfo.h.
136874         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
136875         undesirable behavior in non-C locales.  Instead, rely on localecharset.
136876         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
136877         * modules/regex (FILES): Remove m4/codeset.m4.
136878         (Depends-on): Add localcharset.  Remove strcase.
136880 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
136882         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
136883         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
136885 2007-02-13  Bruno Haible  <bruno@clisp.org>
136887         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
136888         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
136890 2007-02-12  Bruno Haible  <bruno@clisp.org>
136892         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
136893         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
136894         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
136895         time warning rather than a link error.
136897 2007-02-12  Bruno Haible  <bruno@clisp.org>
136899         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
136900         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
136901         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
136903 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
136905         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
136906         args, not 2.
136908 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
136910         New module 'time', so that apps can include <time.h> as per
136911         POSIX and GNU instead of separate include files like time_r.h
136912         and timegm.h.  This implementation tries out a simpler approach
136913         for replacing decls in standard include files (as compared to
136914         the string module), somewhat as an experiment.
136916         * config/srclist.txt: Comment out mktime.c for now.
136917         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
136918         since it doesn't apply any more.  Use generic wording instead.
136919         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
136920         'time'.
136921         * lib/time_.h, m4/time_h.m4, modules/time: New files.
136922         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
136923         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
136924         Don't include <sys/types.h>; no longer needed since we assume C89.
136925         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
136926         * lib/strftime.c: Likewise.
136927         * lib/time_r.c: Likewise.
136928         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
136929         * lib/nanosleep.c: Include <time.h> first, to check interface.
136930         * lib/strptime.c: Likewise.
136931         * lib/time_r.c: Likewise.
136932         * lib/timegm.c: Likewise.
136933         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
136934         needed.
136935         * lib/timegm.c: Don't include timegm.h; no longer needed.
136936         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
136937         time.h now handles any problems in that area.
136938         (struct timespec, nanosleep): Remove; time.h now arranges for these.
136939         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
136940         that time.h defines struct timespec.
136941         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
136942         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
136943         handles that.
136944         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
136945         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
136946         needed.  Set REPLACE_LOCALTIME.
136947         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
136948         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
136949         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
136950         nanosleep; time_h.m4 now does that.  Don't require
136951         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
136952         module handles this now.
136953         * modules/getdate (Depends-on): Remove timespec.  Add time.
136954         * modules/nanosleep (Depends-on): Likewise.
136955         * modules/stat-time (Depends-on): Likewise.
136956         * modules/nanosleep (Include): Include time.h, not timespec.h.
136957         * modules/strptime (Files): Remove lib/strptime.h.
136958         (Depends-on): Add extensions, time.
136959         (Include): Include time.h, not strptime.h.
136960         * modules/time_r (Files): Remove lib/time_r.h.
136961         (Depends-on): Add time.
136962         (Include): Include time.h, not time_r.h.
136963         * modules/timegm: Likewise.
136964         * modules/timespec (Description): Now does timespec-related decls
136965         of our own, instead of struct timespec itself.
136966         (Depends-on): Add time; remove extensions.
136967         (Maintainer): Add self.
136968         * modules/utimecmp (Depends-on): Add time; remove timespec.
136969         * modules/utimens (Depends-on): Likewise.
136970         * modules/xnanosleep (Depends-on): Likewise.
136972 2007-02-11  Bruno Haible  <bruno@clisp.org>
136974         * lib/c-strstr.c: Include allocsa.h.
136975         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
136976         * lib/c-strcasestr.c: Include allocsa.h.
136977         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
136978         * lib/strcasestr.c: Include allocsa.h.
136979         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
136980         * lib/mbsstr.c: Include allocsa.h.
136981         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
136982         allocsa/freesa instead of malloc/free.
136983         * lib/mbscasestr.c: Include allocsa.h.
136984         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
136985         allocsa/freesa instead of malloc/free.
136986         * modules/c-strstr (Depends-on): Add allocsa.
136987         * modules/c-strcasestr (Depends-on): Likewise.
136988         * modules/strcasestr (Depends-on): Likewise.
136989         * modules/mbsstr (Depends-on): Likewise.
136990         * modules/mbscasestr (Depends-on): Likewise.
136992 2007-02-11  Bruno Haible  <bruno@clisp.org>
136994         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
136996         * modules/mbsspn-tests: New file.
136997         * tests/test-mbsspn.sh: New file.
136998         * tests/test-mbsspn.c: New file.
137000 2007-02-11  Bruno Haible  <bruno@clisp.org>
137002         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
137004         * modules/mbspbrk-tests: New file.
137005         * tests/test-mbspbrk.sh: New file.
137006         * tests/test-mbspbrk.c: New file.
137008 2007-02-11  Bruno Haible  <bruno@clisp.org>
137010         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
137011         unneeded cast.
137013         * modules/mbscspn-tests: New file.
137014         * tests/test-mbscspn.sh: New file.
137015         * tests/test-mbscspn.c: New file.
137017 2007-02-11  Bruno Haible  <bruno@clisp.org>
137019         * modules/mbscasecmp-tests: New file.
137020         * tests/test-mbscasecmp.sh: New file.
137021         * tests/test-mbscasecmp.c: New file.
137023 2007-02-11  Bruno Haible  <bruno@clisp.org>
137025         Ensure O(n) worst-case complexity of mbscasestr.
137026         * lib/mbscasestr.c: Include stdbool.h.
137027         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
137028         functions.
137029         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
137030         the bookkeeping indicates that it's worth it.
137031         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
137033         * modules/mbscasestr-tests: New file.
137034         * tests/test-mbscasestr1.c: New file.
137035         * tests/test-mbscasestr2.sh: New file.
137036         * tests/test-mbscasestr2.c: New file.
137037         * tests/test-mbscasestr3.sh: New file.
137038         * tests/test-mbscasestr3.c: New file.
137039         * tests/test-mbscasestr4.sh: New file.
137040         * tests/test-mbscasestr4.c: New file.
137041         * m4/locale-tr.m4: New file.
137043 2007-02-11  Bruno Haible  <bruno@clisp.org>
137045         Ensure O(n) worst-case complexity of mbsstr.
137046         * lib/mbsstr.c: Include stdbool.h.
137047         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
137048         functions.
137049         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
137050         bookkeeping indicates that it's worth it.
137051         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
137053         * modules/mbsstr-tests: New file.
137054         * tests/test-mbsstr1.c: New file.
137055         * tests/test-mbsstr2.sh: New file.
137056         * tests/test-mbsstr2.c: New file.
137057         * tests/test-mbsstr3.sh: New file.
137058         * tests/test-mbsstr3.c: New file.
137059         * m4/locale-fr.m4: New file.
137061 2007-02-11  Bruno Haible  <bruno@clisp.org>
137063         * lib/mbsrchr.c (mbsrchr): Fix bug.
137065         * modules/mbsrchr-tests: New file.
137066         * tests/test-mbsrchr.sh: New file.
137067         * tests/test-mbsrchr.c: New file.
137069 2007-02-11  Bruno Haible  <bruno@clisp.org>
137071         * lib/mbschr.c (mbschr): Fix bug.
137073         * modules/mbschr-tests: New file.
137074         * tests/test-mbschr.sh: New file.
137075         * tests/test-mbschr.c: New file.
137076         * m4/locale-zh.m4: New file.
137078 2007-02-11  Bruno Haible  <bruno@clisp.org>
137080         Support for copying multibyte string iterators.
137081         * lib/mbiter.h: Include <string.h>.
137082         (mbiter_multi_copy): New function.
137083         (mbi_copy): New macro.
137084         * lib/mbuiter.h: Include <string.h>.
137085         (mbuiter_multi_copy): New function.
137086         (mbui_copy): New macro.
137088 2007-02-11  Bruno Haible  <bruno@clisp.org>
137090         New module mbslen.
137091         * modules/mbslen: New file.
137092         * lib/mbslen.c: New file.
137093         * lib/string_.h (mbslen): New declaration.
137094         * m4/mbslen.m4: New file.
137095         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
137096         GNULIB_MBSLEN.
137097         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
137098         * MODULES.html.sh (Internationalization functions): Add mbslen.
137100 2007-02-11  Bruno Haible  <bruno@clisp.org>
137102         Ensure O(n) worst-case complexity of strcasestr substitute.
137103         * lib/strcasestr.c: Include stdbool.h.
137104         (knuth_morris_pratt): New function.
137105         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
137106         bookkeeping indicates that it's worth it.
137107         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
137109         * modules/strcasestr-tests: New file.
137110         * tests/test-strcasestr.c: New file.
137112 2007-02-11  Bruno Haible  <bruno@clisp.org>
137114         Ensure O(n) worst-case complexity of c_strcasestr.
137115         * lib/c-strcasestr.c: Include stdbool.h, string.h.
137116         (knuth_morris_pratt): New function.
137117         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
137118         the bookkeeping indicates that it's worth it.
137119         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
137121         * modules/c-strcasestr-tests: New file.
137122         * tests/test-c-strcasestr.c: New file.
137124 2007-02-11  Bruno Haible  <bruno@clisp.org>
137126         Ensure O(n) worst-case complexity of c_strstr.
137127         * lib/c-strstr.c: Include stdbool.h, string.h.
137128         (knuth_morris_pratt): New function.
137129         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
137130         bookkeeping indicates that it's worth it.
137131         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
137133         * lib/c-strstr.c: Complete rewrite for maintainability.
137135         * modules/c-strstr-tests: New file.
137136         * tests/test-c-strstr.c: New file.
137138 2007-02-11  Bruno Haible  <bruno@clisp.org>
137140         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
137141         5.2.1 and earlier, whereby \055 was treated just like the range
137142         delimiter '-'.
137143         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
137145 2007-02-08  Bruno Haible  <bruno@clisp.org>
137147         * modules/regex (Depends-on): Add stdbool.
137148         Reported by Dalibor Topic <robilad@kaffe.org>.
137150 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
137152         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
137153         Prefer returning from main to exiting from it.
137154         Remove unnecessary parens after sizeof.
137156 2007-02-05  Bruno Haible  <bruno@clisp.org>
137158         New module mbssep.
137159         * modules/mbssep: New file.
137160         * lib/mbssep.c: New file.
137161         * lib/string_.h (strsep): Add a conditional link warning.
137162         (mbssep): New declaration.
137163         * m4/mbssep.m4: New file.
137164         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
137165         GNULIB_MBSSEP.
137166         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
137167         * MODULES.html.sh (Internationalization functions): Add mbssep.
137169 2007-02-05  Bruno Haible  <bruno@clisp.org>
137171         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
137172         Optimize search in case of 1 delimiter.
137174 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
137176         * lib/acl.h: Include sys/types.h before sys/acl.h.
137178 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
137180         Merge upstream fix for glibc bugzilla #3957:
137182         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
137184         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
137185         bit for RE_HAT_LISTS_NOT_NEWLINE.
137186         (build_charclass_op): Remove bogus comment.
137188 2007-02-05  Simon Josefsson  <simon@josefsson.org>
137190         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
137192 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
137194         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
137195         * lib/memmem.c [!defined _LIBC]: Include config.h.
137197 2007-02-04  Bruno Haible  <bruno@clisp.org>
137199         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
137200         warning message.
137202 2007-02-04  Bruno Haible  <bruno@clisp.org>
137204         New module mbstok_r.
137205         * modules/mbstok_r: New file.
137206         * lib/mbstok_r.c: New file.
137207         * lib/string_.h (strtok_r): Change argument names to match the
137208         comments. Add a conditional link warning.
137209         (mbstok_r): New declaration.
137210         * m4/mbstok_r.m4: New file.
137211         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
137212         GNULIB_MBSTOK_R.
137213         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
137214         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
137216 2007-02-04  Bruno Haible  <bruno@clisp.org>
137218         New module mbsspn.
137219         * modules/mbsspn: New file.
137220         * lib/mbsspn.c: New file.
137221         * lib/string_.h (strspn): Add a conditional link warning.
137222         (mbsspn): New declaration.
137223         * m4/mbsspn.m4: New file.
137224         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
137225         GNULIB_MBSSPN.
137226         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
137227         * MODULES.html.sh (Internationalization functions): Add mbsspn.
137229 2007-02-04  Bruno Haible  <bruno@clisp.org>
137231         New module mbspbrk.
137232         * modules/mbspbrk: New file.
137233         * lib/mbspbrk.c: New file.
137234         * lib/string_.h (strpbrk): Add a conditional link warning.
137235         (mbspbrk): New declaration.
137236         * m4/mbspbrk.m4: New file.
137237         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
137238         GNULIB_MBSPBRK.
137239         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
137240         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
137242 2007-02-04  Bruno Haible  <bruno@clisp.org>
137244         New module mbscspn.
137245         * modules/mbscspn: New file.
137246         * lib/mbscspn.c: New file.
137247         * lib/string_.h (strcspn): Add a conditional link warning.
137248         (mbscspn): New declaration.
137249         * m4/mbscspn.m4: New file.
137250         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
137251         GNULIB_MBSCSPN.
137252         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
137253         * MODULES.html.sh (Internationalization functions): Add mbscspn.
137255 2007-02-04  Bruno Haible  <bruno@clisp.org>
137257         New module mbscasestr, reduced goal of strcasestr.
137258         * modules/mbscasestr: New file.
137259         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
137260         (mbscasestr): Renamed from strcasestr.
137261         * lib/strcasestr.c: Don't include mbuiter.h.
137262         (strcasestr): Remove support for multibyte locales.
137263         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
137264         Change the conditional link warning.
137265         (mbscasestr): New declaration.
137266         * m4/mbscasestr.m4: New file.
137267         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
137268         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
137269         REPLACE_STRCASESTR.
137270         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
137271         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
137272         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
137273         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
137274         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
137275         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
137276         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
137277         (Depends-on): Remove mbuiter.
137278         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
137280 2007-02-04  Bruno Haible  <bruno@clisp.org>
137282         Simplify handling of strncasecmp.
137283         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
137284         the conditional link warning.
137285         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
137286         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
137287         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
137288         * modules/strcase (configure.ac): Don't invoke
137289         gl_STRING_MODULE_INDICATOR.
137290         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
137292 2007-02-04  Bruno Haible  <bruno@clisp.org>
137294         New module mbscasecmp, reduced goal of strcasecmp.
137295         * modules/mbscasecmp: New file.
137296         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
137297         (mbscasecmp): Renamed from strcasecmp.
137298         * lib/strcasecmp.c: Don't include mbuiter.h.
137299         (strcasecmp): Remove support for multibyte locales.
137300         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
137301         Change the conditional link warning.
137302         (mbscasecmp): New declaration.
137303         * m4/mbscasecmp.m4: New file.
137304         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
137305         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
137306         REPLACE_STRCASECMP.
137307         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
137308         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
137309         GNULIB_MBSCASECMP.
137310         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
137311         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
137312         * modules/strcase (Files): Remove m4/mbrtowc.m4.
137313         (Depends-on): Remove mbuiter.
137314         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
137316 2007-02-04  Bruno Haible  <bruno@clisp.org>
137318         New module mbsstr. Remove module strstr.
137319         * modules/mbsstr: New file.
137320         * modules/strstr: Remove file.
137321         * lib/mbsstr.c: Renamed from lib/strstr.c.
137322         (mbsstr): Renamed from strstr.
137323         * lib/string_.h (strstr): Remove declaration. Change the conditional
137324         link warning.
137325         (mbsstr): New declaration.
137326         * m4/mbsstr.m4: New file.
137327         * m4/strstr.m4: Remove file.
137328         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
137329         REPLACE_STRSTR.
137330         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
137331         Don't initialize GNULIB_STRSTR.
137332         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
137333         substitute GNULIB_STRSTR and REPLACE_STRSTR.
137334         * MODULES.html.sh (Internationalization functions): Add mbsstr.
137335         (Support for systems lacking ANSI C 89): Remove strstr.
137337 2007-02-04  Bruno Haible  <bruno@clisp.org>
137339         New module mbsrchr.
137340         * modules/mbsrchr: New file.
137341         * lib/mbsrchr.c: New file.
137342         * lib/string_.h (strrchr): Add a conditional link warning.
137343         (mbsrchr): New declaration.
137344         * m4/mbsrchr.m4: New file.
137345         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
137346         GNULIB_MBSRCHR.
137347         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
137348         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
137350 2007-02-04  Bruno Haible  <bruno@clisp.org>
137352         New module mbschr.
137353         * modules/mbschr: New file.
137354         * lib/mbschr.c: New file.
137355         * lib/string_.h (strchr): Add a conditional link warning.
137356         (mbschr): New declaration.
137357         * m4/mbschr.m4: New file.
137358         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
137359         GNULIB_MBSCHR.
137360         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
137361         * MODULES.html.sh (Internationalization functions): Add mbschr.
137363 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
137365         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
137367         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
137369 2007-02-04  Bruno Haible  <bruno@clisp.org>
137371         New module description section 'configure.ac-early'.
137372         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
137373         (func_get_autoconf_early_snippet): New function.
137374         (func_import, func_create_testdir): Use it. Remove special cases for
137375         modules 'extensions' and 'lock'.
137376         * modules/extensions (configure.ac-early): Require
137377         gl_USE_SYSTEM_EXTENSIONS.
137378         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
137380 2007-02-04  Bruno Haible  <bruno@clisp.org>
137382         Make use of gcj-4.3's -fsource and -ftarget option.
137383         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
137384         and if so try the options -fsource and -ftarget.
137385         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
137386         source_version, ftarget_option, target_version arguments.
137387         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
137388         (is_envjavac_oldgcj_14_14_usable): Renamed from
137389         is_envjavac_gcj_14_14_usable.
137390         (is_envjavac_oldgcj_14_13_usable): Renamed from
137391         is_envjavac_gcj_14_13_usable.
137392         (is_gcj_present): Update.
137393         (is_gcj_43, is_gcj43_usable): New functions.
137394         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
137395         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
137396         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
137397         try the options -fsource and -ftarget.
137399 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
137401         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
137402         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
137403         larger value.
137405 2007-02-03  Jim Meyering  <jim@meyering.net>
137407         Give tools a better chance to allocate space for very large buffers.
137408         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
137410         Make pwd and readlink work also when run with an unreadable parent dir
137411         on systems with openat support.
137412         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
137413         provided getcwd function, even when we have openat support.
137414         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
137416 2007-02-02  Bruno Haible  <bruno@clisp.org>
137418         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
137419         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
137420         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
137421         portability problems if one of these functions is only used on specific
137422         platforms.
137423         Reported by Paul Eggert.
137425 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
137427         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
137428         is causing more trouble than it's curing.
137429         * lib/regex_internal.h (__mempcpy): Remove.
137430         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
137431         (and make the code a tad smaller to boot).
137432         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
137434 2007-02-02  Jim Meyering  <jim@meyering.net>
137436         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
137437         section, not in the Makefile.am: one.
137439 2007-02-02  Eric Blake  <ebb9@byu.net>
137441         * lib/strchrnul.c: Always include config.h first.
137443         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
137444         gnulib strstr is not necessary here.
137446 2007-02-02  Simon Josefsson  <simon@josefsson.org>
137448         * m4/socklen.m4: Fix typo.
137450 2007-02-02  Eric Blake  <ebb9@byu.net>
137452         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
137453         * modules/netinet_in (Makefile.am): Likewise.
137455 2007-02-01  Bruno Haible  <bruno@clisp.org>
137457         * lib/string_.h (GL_LINK_WARNING): New macro.
137458         (strcasecmp, strstr, strcasestr): If provided by the system,
137459         conditionally define as a macro that leads to a warning instead of to
137460         an error.
137461         (strncasecmp): Conditionally define as a macro that leads to a warning.
137463 2007-02-01  Karl Berry  <karl@gnu.org>
137465         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
137467 2007-02-01  Bruno Haible  <bruno@clisp.org>
137469         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
137470         renamings.
137472 2007-02-01  Eric Blake  <ebb9@byu.net>
137474         * modules/regex (Depends-on): Revert dependence on mempcpy.
137475         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
137476         module's definition of mempcpy.
137477         Reported by Paul Eggert.
137479 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
137481         * lib/string_.h: If the gnulib module XYZ is not present, undefine
137482         the symbol XYZ before redefining it.  This fixes a problem with
137483         programs that don't use XYZ, when compiled on systems that define
137484         XYZ to something else.
137486 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
137488         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
137489         occurs when "mkdir -m foo" creates a setgid directory that is (1)
137490         writeable to group or other and (2) is intended to have a special
137491         mode bit that is set or cleared.  In such a case, the directory
137492         should be neither group- nor other-writeable until the special
137493         mode bits are right.
137495 2007-01-31  Eric Blake  <ebb9@byu.net>
137497         * modules/mountlist (Depends-on): Add strstr.
137499         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
137500         bug.
137501         * modules/string (Makefile.am): Remove redundant replacement.
137502         * modules/regex (Depends-on): Add mempcpy.
137504 2007-01-31  Bruno Haible  <bruno@clisp.org>
137506         New module description field 'Link'.
137507         * gnulib-tool (func_usage): Document --extract-link-directive.
137508         (sed_extract_prog): Recognize 'Link' directive.
137509         (func_get_link_directive): New function.
137510         (func_import): Show summary of link directives.
137511         Handle --extract-link-directive option.
137512         * modules/acl (Link): New section.
137513         * modules/clock-time (Link): New section.
137514         * modules/euidaccess (Link): New section.
137515         * modules/gettext (Link): New section.
137516         * modules/iconv (Link): New section.
137517         * modules/lock (Link): New section.
137518         * modules/nanosleep (Link): New section.
137519         * modules/readline (Link): New section.
137521 2007-01-27  Bruno Haible  <bruno@clisp.org>
137523         Enforce the use of gnulib modules for unportable <string.h> functions.
137524         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
137525         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
137526         (gl_HEADER_STRING_H_BODY): Require it.
137527         * lib/string_.h: If the gnulib module XYZ is not present, redefine
137528         the symbol XYZ to one that gives a link error.
137529         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
137530         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
137531         * modules/mempcpy (configure.ac): Likewise.
137532         * modules/memrchr (configure.ac): Likewise.
137533         * modules/stpcpy (configure.ac): Likewise.
137534         * modules/stpncpy (configure.ac): Likewise.
137535         * modules/strcase (configure.ac): Likewise.
137536         * modules/strcasestr (configure.ac): Likewise.
137537         * modules/strchrnul (configure.ac): Likewise.
137538         * modules/strdup (configure.ac): Likewise.
137539         * modules/strndup (configure.ac): Likewise.
137540         * modules/strnlen (configure.ac): Likewise.
137541         * modules/strpbrk (configure.ac): Likewise.
137542         * modules/strsep (configure.ac): Likewise.
137543         * modules/strstr (configure.ac): Likewise.
137544         * modules/strtok_r (configure.ac): Likewise.
137546 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
137548         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
137550 2007-01-30  Jim Meyering  <jim@meyering.net>
137552         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
137554 2007-01-29  Bruno Haible  <bruno@clisp.org>
137556         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
137557         * lib/execute.c: Likewise.
137558         * lib/pipe.c: Likewise.
137559         * lib/printf-args.h: Likewise.
137560         * lib/printf-args.c: Likewise.
137561         * lib/printf-parse.c: Likewise.
137562         * lib/vasnprintf.c: Likewise.
137564 2007-01-29  Eric Blake  <ebb9@byu.net>
137566         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
137567         declaration.
137569 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
137571         * lib/strptime.h (strptime): Use 'restrict' for args where
137572         POSIX requires this.
137573         * lib/strptime.c (strptime): Likewise.
137574         Change license notice from LGPL to GPL, since gnulib-tool will
137575         change this as needed.
137576         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
137577         defined.
137578         Include "strptime.h" first, to check interface.
137579         Do not #undef _LIBC and _NL_CURRENT.
137580         Do not include <stdlib.h>; no longer needed.
137581         Include "time_r.h" and declare ptime_locale_status
137582         only if _LIBC is not defined.
137583         (__P): Remove unused macro.
137584         (match_string): Bring back glibc version, but use it only if _LIBC
137585         is defined.
137586         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
137587         Remove unnecessary assertion and abort() call.
137588         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
137589         * m4/strptime.m4: Fix serial number comment.
137590         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
137591         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
137592         (Depends-on): Add time_r.
137594 2007-01-29  Bruno Haible  <bruno@clisp.org>
137596         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
137597         strptime.
137598         * modules/strptime (Depends-on): Add stdbool.
137599         * lib/strptime.h: Include <time.h> always. Add comments.
137601 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
137603         * modules/strptime: New file.
137604         * lib/strptime.h: New file.
137605         * lib/strptime.c: New file.
137606         * m4/strptime.m4: New file.
137608 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
137610         * MODULES.html.sh: New module mpsort.
137611         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
137613         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
137614         a circularity problem with HP-UX ia64 reported by Bob Proulx in
137615         <http://lists.gnu.org/r/bug-gnulib/2007-01/msg00394.html>.
137616         All uses changed.
137617         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
137618         All uses changed.
137619         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
137620         to _Restrict_.
137621         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
137622         the parameter matches the prototype.
137624 2007-01-28  Jim Meyering  <jim@meyering.net>
137626         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
137627         sys/time.h here, reverting that part of the previous patch:
137628         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
137630 2007-01-28  Bruno Haible  <bruno@clisp.org>
137632         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
137633         value of $(SYS_TIME_H).
137634         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
137635         remove it conditionally, too. [added by Jim Meyering]
137636         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
137637         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
137638         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
137639         GETTIMEOFDAY_REPLACEMENT to 1.
137641 2007-01-28  Bruno Haible  <bruno@clisp.org>
137643         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
137644         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
137645         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
137646         Set UNISTD_H instead of UNISTD_H2.
137647         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
137649 2007-01-28  Bruno Haible  <bruno@clisp.org>
137651         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
137652         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
137654 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
137656         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
137657         (func_create_testdir): Ensure C locale for `grep' and `tr'
137658         character ranges.
137659         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
137660         ACLOCAL_AMFLAGS parsing state machine.
137662 2007-01-27  Bruno Haible  <bruno@clisp.org>
137664         * modules/unistr/base: Update.
137666 2007-01-27  Bruno Haible  <bruno@clisp.org>
137668         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
137669         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
137670         * modules/unistr/u32-mbtouc-unsafe: Renamed from
137671         modules/unistr/u32-mbtouc.
137672         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
137673         * lib/unistr.h: Update.
137674         * lib/linebreak.c: Update.
137675         * modules/unistr/u32-mbtouc: Renamed from
137676         modules/unistr/u32-mbtouc-safe.
137677         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
137678         * lib/unistr.h: Update.
137679         * lib/unistr/u32-to-u8.c: Update.
137680         * lib/unistr/u32-to-u16.c: Update.
137682 2007-01-27  Bruno Haible  <bruno@clisp.org>
137684         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
137685         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
137686         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
137687         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
137688         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
137689         * modules/unistr/u16-mbtouc-unsafe: Renamed from
137690         modules/unistr/u16-mbtouc.
137691         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
137692         * lib/unistr.h: Update.
137693         * lib/linebreak.c: Update.
137694         * modules/linebreak: Update.
137695         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
137696         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
137697         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
137698         * modules/unistr/u16-mbtouc: Renamed from
137699         modules/unistr/u16-mbtouc-safe.
137700         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
137701         * lib/unistr.h: Update.
137702         * lib/unistr/u16-to-u8.c: Update.
137703         * modules/unistr/u16-to-u8: Update.
137704         * lib/unistr/u16-to-u32.c: Update.
137705         * modules/unistr/u16-to-u32: Update.
137707 2007-01-27  Bruno Haible  <bruno@clisp.org>
137709         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
137710         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
137711         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
137712         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
137713         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
137714         * modules/unistr/u8-mbtouc-unsafe: Renamed from
137715         modules/unistr/u8-mbtouc.
137716         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
137717         * lib/unistr.h: Update.
137718         * lib/striconveh.c: Update.
137719         * modules/striconveh: Update.
137720         * lib/linebreak.c: Update.
137721         * modules/linebreak: Update.
137722         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
137723         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
137724         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
137725         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
137726         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
137727         * lib/unistr.h: Update.
137728         * lib/striconveh.c: Update.
137729         * modules/striconveh: Update.
137730         * lib/unistr/u8-to-u16.c: Update.
137731         * modules/unistr/u8-to-u16: Update.
137732         * lib/unistr/u8-to-u32.c: Update.
137733         * modules/unistr/u8-to-u32: Update.
137735 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
137737         Sync from Libtool.
137738         * lib/argz.c: Do not include strings.h nor memory.h, include
137739         string.h unconditionally.  Patch by Simon Josefsson.
137741 2007-01-27  Bruno Haible  <bruno@clisp.org>
137743         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
137744         from gl_HEADER_STRING_H_BODY.
137745         (gl_HEADER_STRING_H_BODY): Require it.
137746         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
137747         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
137748         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
137749         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
137750         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
137751         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
137752         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
137753         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
137754         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
137755         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
137756         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
137757         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
137758         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
137759         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
137760         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
137762 2007-01-27  Bruno Haible  <bruno@clisp.org>
137764         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
137765         check_PROGRAMS into noinst_PROGRAMS.
137766         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
137767         check_PROGRAMS in this case.
137768         (func_import): Set for_test to false.
137769         (func_create_testdir): Set for_test to true.
137771 2007-01-27  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
137772             Bruno Haible  <bruno@clisp.org>
137774         * modules/strcasestr (Files): Remove lib/strcasestr.h.
137775         (Depends-on): Add string.
137776         (Includes): Use <string.h> instead of strcasestr.h.
137777         * modules/string (Makefile.am): Also substitute the value of
137778         REPLACE_STRCASESTR.
137779         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
137780         assume strcasestr is declared in <string.h> not <strings.h>. Also
137781         set REPLACE_STRCASESTR.
137782         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
137783         REPLACE_STRCASESTR.
137784         * lib/strcasestr.h: Remove file.
137785         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
137786         * lib/string_.h (strcasestr): New declaration.
137788 2007-01-27  Bruno Haible  <bruno@clisp.org>
137790         * lib/string_.h: Use 'extern'.
137792 2007-01-27  Jim Meyering  <jim@meyering.net>
137794         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
137795         of set-but-not-used local, "q".
137797         * lib/mempcpy.c: Include <config.h> before <string.h>.
137798         This fixes a compilation error on HP-UX, due to the system's
137799         "restrict"-using mempcpy prototype.
137801 2007-01-26  Bruno Haible  <bruno@clisp.org>
137803         Small optimization.
137804         * lib/javacomp.c: Include c-strstr.h.
137805          (is_envjavac_gcj): Use c_strstr instead of strstr.
137806         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
137808 2007-01-26  Bruno Haible  <bruno@clisp.org>
137810         * MODULES.html.sh (Unicode string functions): Add the new modules.
137812         * modules/uniconv/u32-strconv-to-locale: New file.
137813         * lib/uniconv/u32-strconv-to-locale.c: New file.
137815         * modules/uniconv/u16-strconv-to-locale: New file.
137816         * lib/uniconv/u16-strconv-to-locale.c: New file.
137818         * modules/uniconv/u8-strconv-to-locale: New file.
137819         * lib/uniconv/u8-strconv-to-locale.c: New file.
137821         * modules/uniconv/u32-strconv-from-locale: New file.
137822         * lib/uniconv/u32-strconv-from-locale.c: New file.
137824         * modules/uniconv/u16-strconv-from-locale: New file.
137825         * lib/uniconv/u16-strconv-from-locale.c: New file.
137827         * modules/uniconv/u8-strconv-from-locale: New file.
137828         * lib/uniconv/u8-strconv-from-locale.c: New file.
137830         * modules/uniconv/u32-strconv-to-enc: New file.
137831         * lib/uniconv/u32-strconv-to-enc.c: New file.
137832         * modules/uniconv/u32-strconv-to-enc-tests: New file.
137833         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
137835         * modules/uniconv/u16-strconv-to-enc: New file.
137836         * lib/uniconv/u16-strconv-to-enc.c: New file.
137837         * lib/uniconv/u-strconv-to-enc.h: New file.
137838         * modules/uniconv/u16-strconv-to-enc-tests: New file.
137839         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
137841         * modules/uniconv/u8-strconv-to-enc: New file.
137842         * lib/uniconv/u8-strconv-to-enc.c: New file.
137843         * modules/uniconv/u8-strconv-to-enc-tests: New file.
137844         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
137846         * modules/uniconv/u32-strconv-from-enc: New file.
137847         * lib/uniconv/u32-strconv-from-enc.c: New file.
137848         * modules/uniconv/u32-strconv-from-enc-tests: New file.
137849         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
137851         * modules/uniconv/u16-strconv-from-enc: New file.
137852         * lib/uniconv/u16-strconv-from-enc.c: New file.
137853         * modules/uniconv/u16-strconv-from-enc-tests: New file.
137854         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
137856         * modules/uniconv/u8-strconv-from-enc: New file.
137857         * lib/uniconv/u8-strconv-from-enc.c: New file.
137858         * lib/uniconv/u-strconv-from-enc.h: New file.
137859         * modules/uniconv/u8-strconv-from-enc-tests: New file.
137860         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
137862         * modules/uniconv/u32-conv-from-enc: New file.
137863         * lib/uniconv/u32-conv-from-enc.c: New file.
137864         * modules/uniconv/u32-conv-from-enc-tests: New file.
137865         * tests/uniconv/test-u32-conv-from-enc.c: New file.
137867         * modules/uniconv/u16-conv-from-enc: New file.
137868         * lib/uniconv/u16-conv-from-enc.c: New file.
137869         * lib/uniconv/u-conv-from-enc.h: New file.
137870         * modules/uniconv/u16-conv-from-enc-tests: New file.
137871         * tests/uniconv/test-u16-conv-from-enc.c: New file.
137873         * modules/uniconv/u8-conv-from-enc: New file.
137874         * lib/uniconv/u8-conv-from-enc.c: New file.
137875         * modules/uniconv/u8-conv-from-enc-tests: New file.
137876         * tests/uniconv/test-u8-conv-from-enc.c: New file.
137878         * modules/uniconv/base: New file.
137879         * lib/uniconv.h: New file.
137881 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
137883         * doc/gnulib-tool.texi (Initial import): Update to match current
137884         behavior with strdup module.
137885         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
137886         * lib/memmem.h: Remove; all uses removed.  This is now done
137887         by <string.h>.
137888         * lib/mempcpy.h: Likewise.
137889         * lib/memrchr.h: Likewise.
137890         * lib/stpcpy.h: Likewise.
137891         * lib/stpncpy.h: Likewise.
137892         * lib/strcase.h: Likewise.
137893         * lib/strchrnul.h: Likewise.
137894         * lib/strdup.h: Likewise.
137895         * lib/strndup.h: Likewise.
137896         * lib/strnlen.h: Likewise.
137897         * lib/strpbrk.h: Likewise.
137898         * lib/strsep.h: Likewise.
137899         * lib/strstr.h: Likewise.
137900         * lib/strtok_r.h: Likewise.
137901         * lib/string_.h: New file.
137902         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
137903         Rely on <string.h> instead.
137904         * lib/canon-host.c: Likewise.
137905         * lib/chdir-long.c: Likewise.
137906         * lib/concatpath.c: Likewise.
137907         * lib/exclude.c: Likewise.
137908         * lib/fchdir.c: Likewise.
137909         * lib/getaddrinfo.c: Likewise.
137910         * lib/getcwd.c: Likewise.
137911         * lib/getsubopt.c: Likewise.
137912         * lib/glob.c: Likewise.
137913         * lib/hard-locale.c: Likewise.
137914         * lib/iconvme.c: Likewise.
137915         * lib/javacomp.c: Likewise.
137916         * lib/mempcpy.c: Likewise.
137917         * lib/memrchr.c: Likewise.
137918         * lib/regex_internal.h: Likewise.
137919         * lib/stpncpy.c: Likewise.
137920         * lib/strcasecmp.c: Likewise.
137921         * lib/strchrnul.c: Likewise.
137922         * lib/strdup.c: Likewise.
137923         * lib/striconv.c: Likewise.
137924         * lib/striconveh.c: Likewise.
137925         * lib/striconveha.c: Likewise.
137926         * lib/strncasecmp.c: Likewise.
137927         * lib/strndup.c: Likewise.
137928         * lib/strnlen.c: Likewise.
137929         * lib/strsep.c: Likewise.
137930         * lib/strstr.c: Likewise.
137931         * lib/strtok_r.c: Likewise.
137932         * lib/userspec.c: Likewise.
137933         * lib/w32spawn.h: Likewise.
137934         * lib/xstrndup.c: Likewise.
137935         * lib/mountlist.c (strstr): Remove decl.
137936         * m4/string_h.m4: New file.
137937         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
137938         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
137939         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
137940         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
137941         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
137942         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
137943         Set REPLACE_STRCASECMP if necessary.
137944         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
137945         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
137946         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
137947         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
137948         HAVE_DECL_STRDUP if necessary.
137949         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
137950         since gl_FUNC_STRNDUP does that now.
137951         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
137952         Check for decl here...
137953         (gl_PREREQ_STRNLEN): ... not here.
137954         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
137955         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
137956         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
137957         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
137958         necessary.
137959         * modules/string: New file.
137960         * modules/memmem (Files): Remove special-purpose include file.
137961         (Depends-on): Add string.
137962         (Include): Include <string.h>, not the removed file.
137963         * modules/mempcpy: Likewise.
137964         * modules/memrchr: Likewise.
137965         * modules/stpcpy: Likewise.
137966         * modules/stpncpy: Likewise.
137967         * modules/strcase: Likewise.
137968         * modules/strchrnul: Likewise.
137969         * modules/strdup: Likewise.
137970         * modules/strndup: Likewise.
137971         * modules/strnlen: Likewise.
137972         * modules/strpbrk: Likewise.
137973         * modules/strsep: Likewise.
137974         * modules/strstr: Likewise.
137975         * modules/strtok_r: Likewise.
137976         * tests/test-dirname.c: Don't include "strdup.h", since
137977         <string.h> now suffices.
137978         * tests/test-memmem.c: Don't include "memmem.h", since
137979         <string.h> now suffices.
137981 2007-01-25  Bruno Haible  <bruno@clisp.org>
137983         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
137984         *resultp is 0.
137986         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
137987         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
137988         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
137989         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
137991         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
137992         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
137993         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
137994         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
137995         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
137996         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
137998 2007-01-24  Bruno Haible  <bruno@clisp.org>
138000         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
138001         <http://lists.gnu.org/r/bug-gnulib/2006-10/msg00279.html>.
138002         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
138003         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
138004         gl_FUNC_FTS_CORE.
138005         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
138006         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
138007         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
138008         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
138009         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
138010         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
138011         gl_FUNC_FCHOWNAT.
138012         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
138013         gl_FUNC_STRFTIME.
138014         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
138015         Reported by Ralf Wildenhues.
138017 2007-01-24  Bruno Haible  <bruno@clisp.org>
138019         Drop AC_REQUIRE calls that are redundant with the module dependencies.
138020         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
138021         gl_GETADDRINFO.
138022         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
138023         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
138024         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
138026 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
138028         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
138029         Don't use 'exit'; just return from 'main'.
138030         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
138032         * lib/fnmatch_.h: Readjust white space and comments to match
138033         glibc, to avoid spurious diffs.
138035 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
138037         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
138038         2004-12-01 change by Jakub Jelinek, since this code won't compile
138039         if !LIBC.  Problem reported by Bob Proulx.
138041 2007-01-23  Bruno Haible  <bruno@clisp.org>
138043         * lib/striconveh.c: Include c-strcaseeq.h.
138044         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
138045         * modules/striconveh (Depends-on): Add c-strcaseeq.
138047 2007-01-23  Bruno Haible  <bruno@clisp.org>
138049         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
138051         * modules/c-strcaseeq: New file.
138052         * lib/c-strcaseeq.h: New file.
138054         * modules/streq: New file.
138055         * lib/streq.h: New file.
138057 2007-01-23  Bruno Haible  <bruno@clisp.org>
138059         * modules/striconveha-tests: New file.
138060         * tests/test-striconveha.c: New file.
138062         * lib/striconveha.h: Include <stdbool.h>.
138063         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
138064         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
138065         (mem_iconveha_notranslit): Renamed from mem_iconveha.
138066         (mem_iconveha): New function.
138067         (str_iconveha_notranslit): Renamed from str_iconveha.
138068         (str_iconveha): New function.
138069         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
138070         c-strcase.
138072 2007-01-23  Bruno Haible  <bruno@clisp.org>
138074         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
138075         encodings without forgiving before trying any encoding with handler.
138076         (str_iconveha): Try all encodings without forgiving before trying any
138077         encoding with handler.
138079 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
138081         Import the following changes from libc.
138083         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
138085         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
138087         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
138089         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
138090         normal_bracket label.
138092         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
138094         [BZ #361]
138095         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
138096         to normal_bracket after fetching the next character.
138098 2007-01-22  Bruno Haible  <bruno@clisp.org>
138100         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
138101         argument.
138102         * lib/striconveh.c (iconv_carefully_1): New function.
138103         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
138104         argument.
138105         (str_cd_iconveh): Update.
138106         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
138107         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
138108         * tests/test-striconveh.c (MAGIC): New macro.
138109         (new_offsets): New function.
138110         (main): Test call with and without offsets.
138112 2007-01-22  Bruno Haible  <bruno@clisp.org>
138114         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
138115         * modules/sys_select (Makefile.am): Likewise.
138116         * modules/sys_socket (Makefile.am): Likewise.
138117         * modules/sys_time (Makefile.am): Likewise.
138119 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
138121         * modules/gettimeofday (License): Change from GPL to LGPL, since
138122         gettimeofday is a library function.
138124 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
138126         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
138128 2007-01-21  Bruno Haible  <bruno@clisp.org>
138130         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
138132 2007-01-21  Bruno Haible  <bruno@clisp.org>
138134         * modules/striconveha: New file.
138135         * lib/striconveha.h: New file.
138136         * lib/striconveha.c: New file.
138137         * MODULES.html.sh (Internationalization functions): Add striconveha.
138138         * lib/striconv.c (str_iconv): Optimize the case of an empty input
138139         string.
138140         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
138142 2007-01-21  Bruno Haible  <bruno@clisp.org>
138144         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
138145         * lib/striconveh.c (str_iconveh): Likewise.
138147 2007-01-21  Bruno Haible  <bruno@clisp.org>
138149         * lib/striconveh.h (mem_iconveh): New declaration.
138150         * lib/striconveh.c (mem_iconveh): New function.
138151         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
138153 2007-01-21  Bruno Haible  <bruno@clisp.org>
138155         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
138157         * lib/striconveh.h (mem_cd_iconveh): Change specification.
138158         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
138159         original result buffer.
138160         (str_cd_iconveh): Update.
138161         * tests/test-striconveh.c (main): Update.
138163         * lib/striconv.h (mem_cd_iconv): Change specification.
138164         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
138165         result buffer.
138166         (str_cd_iconv): Update.
138167         * tests/test-striconv.c (main): Update.
138169 2007-01-21  Bruno Haible  <bruno@clisp.org>
138171         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
138173 2007-01-20  Jim Meyering  <jim@meyering.net>
138175         * lib/userspec.c (parse_with_separator): If a user or group string
138176         starts with "+", skip the corresponding name-to-ID look-up, since
138177         such a look-up must fail: user and group names may not include "+".
138179 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
138181         * lib/poll.c: Include sys/time.h and time.h unconditionally,
138182         since we now assume the sys_time module.
138183         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
138184         check for sys/time.h; no longer needed.
138185         * modules/poll (Depends-on): Depend on sys_time.
138187 2007-01-18  Bruno Haible  <bruno@clisp.org>
138189         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
138190         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
138192         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
138193         gettimeofday.
138195         * tests/test-gettimeofday.c: Include <time.h>.
138196         (dummy): Remove variable.
138198         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
138199         gl_HEADER_SYS_TIME_H.
138200         (gl_HEADER_SYS_TIME_H): New macro.
138202         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
138203         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
138204         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
138205         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
138206         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
138207         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
138208         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
138209         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
138210         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
138211         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
138212         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
138214         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
138215         last change; it caused a compilation error when cross-compiling to
138216         Cygwin.
138218 2007-01-18  Jim Meyering  <jim@meyering.net>
138220         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
138221         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
138222         than the race-prone "test -d sys || mkdir sys".
138223         (configure.ac): Use AC_PROG_MKDIR_P.
138224         * modules/sys_select: Likewise.
138225         * modules/sys_socket: Likewise.
138226         * modules/sys_time: Likewise.
138228 2007-01-18  Eric Blake  <ebb9@byu.net>
138230         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
138231         replace gettimeofday.
138232         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
138233         name, to avoid infinite recursion.
138235 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
138237         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
138238         module sys_time.
138239         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
138240         assume timespec.h defines struct timeval.
138241         * lib/settime.c: Likewise.
138242         * lib/utimens.c: Likewise.
138243         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
138244         since we now assume the gettimeofday module.
138245         * lib/tempname.c (__gen_tempname): Likewise.
138246         * lib/gettimeofday.h: Remove.
138247         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
138248         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
138249         Include <time.h>, for 'time()'.
138250         (localtime_buffer_addr): Also use this workaround if
138251         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
138252         to simplify the uses.  All uses changed.
138253         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
138254         that #undef is inside {}, and 'const' follows type name consistently.
138255         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
138256         (gettimeofday): Do not use the maximum possible value for
138257         tv->tv_usec, since that might break usages other than ls.c.
138258         Instead, we'll leave ls.c alone.  This undoes today's patch
138259         by Bruno.  Add a compile-time warning for 1s-clock resolution;
138260         we've never observed the problem but might as well keep the
138261         canary.
138262         * lib/nanosleep.c: Include timespec.h first, for interface check.
138263         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
138264         now assume the sys_time module.
138265         * lib/tempname.c: Likewise.
138266         * lib/timespec.h: Likewise.
138267         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
138268         needed.
138269         * lib/strftime.c: Likewise.
138270         * lib/timespec.h: Likewise.
138271         * lib/posixtm.c: Include posixtm.h first, for interface check.
138272         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
138273         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
138274         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
138275         * lib/sys_time_.h: New file.
138276         * lib/timespec.h (struct timespec): Use long int, not long.
138277         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
138278         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
138279         Remove obsolescent call to AC_HEADER_TIME.
138280         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
138281         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
138282         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
138283         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
138284         Likewise.
138285         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
138286         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
138287         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
138288         into the sys_time module.  Check for gettimeofday just once.
138289         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
138290         for gettimeofday signature to just check the signature.  Merely
138291         compile it, since linking doesn't test signature.  Improve test for
138292         whether gettimeofday.o is actually needed.
138293         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
138294         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
138295         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
138296         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
138297         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
138298         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
138299         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
138300         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
138301         than worrying about sys/time.h.
138302         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
138303         Don't bother worrying about TIME_WITH_SYS_TIME.
138304         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
138305         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
138306         * m4/sys_time_h.m4: New file.
138307         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
138308         Don't include sys/time.h.  Return from main rather than exiting.
138309         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
138310         all uses changed.
138311         * modules/gethrxtime (Depends-on): Add sys_time.
138312         * modules/gettime (Depends-on): Likewise.
138313         * modules/gettimeofday (Depends-on): Likewise.
138314         * modules/nanosleep (Depends-on): Likewise.
138315         * modules/settime (Depends-on): Likewise.
138316         * modules/tempname (Depends-on): Likewise.
138317         * modules/utimens (Depends-on): Likewise.
138318         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
138319         (Include): Change back to <sys/time.h>.
138320         (Maintainer): Add self.
138321         * modules/sys_time: New file.
138322         * modules/tempname (Depends-on): Add gettimeofday.
138323         * tests/test-gettimeofday.c: Include <sys/time.h>
138324         rather than gettimeofday.h.
138326 2007-01-17  Bruno Haible  <bruno@clisp.org>
138328         * gnulib-tool (func_get_license): Revert last patch. Instead, let
138329         the license default to GPL.
138330         (func_create_testdir): Don't complain if a module is LGPL and its
138331         tests module depends on GPLed modules.
138333 2007-01-17  Bruno Haible  <bruno@clisp.org>
138335         * lib/gettimeofday.c (gettimeofday): Add code for the case
138336         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
138337         maximum possible value for tv->tv_usec, rather than the minimum one.
138339 2005-10-08  Martin Lambers  <marlam@marlam.de>
138340 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
138341 2007-01-16  Bruno Haible  <bruno@clisp.org>
138343         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
138344         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
138345         gl_FUNC_GETTIMEOFDAY.
138346         (Include): Add gettimeofday.h.
138347         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
138348         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
138349         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
138350         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
138351         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
138352         * lib/gettimeofday.h: New file.
138353         * lib/gettimeofday.c: Include <sys/timeb.h>.
138354         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
138355         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
138356         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
138357         fall back on time().
138359         * tests/test-gettimeofday.c: New file.
138360         * modules/gettimeofday-tests: New file.
138362 2007-01-16  Eric Blake  <ebb9@byu.net>
138364         * modules/fnmatch (Depends-on): Depend on wchar.
138365         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
138366         * m4/fnmatch.m4: Likewise.
138367         * modules/mbchar (Makefile.am): Assume <wchar.h>.
138368         * m4/mbchar.m4: Likewise.
138369         * modules/mbswidth (Depends-on): Depend on wchar.
138370         * lib/mbswidth.c: Assume <wchar.h>.
138371         * m4/mbswidth.m4: Likewise.
138372         * modules/quotearg (Depends-on): Depend on wchar.
138373         * lib/quotearg.c: Assume <wchar.h>.
138374         * m4/quotearg.m4: Likewise.
138375         * modules/regex (Depends-on): Depend on wchar.
138376         * lib/regex_internal.h: Assume <wchar.h>.
138377         * m4/regex.m4: Likewise.
138378         * modules/stdint (Depends-on): Depend on wchar.
138379         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
138380         * m4/stdint.m4: Likewise.
138381         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
138382         * modules/strftime (Depends-on): Depend on wchar.
138383         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
138384         * modules/strtol (Depends-on): Depend on wchar.
138385         * lib/strtol.c: Assume <wchar.h>.
138386         * modules/wcwidth (Depends-on): Depend on wchar.
138387         * lib/wcwidth.h: Assume <wchar.h>.
138388         * m4/wcwidth.m4: Likewise.
138390 2007-01-16  Bruno Haible  <bruno@clisp.org>
138392         * modules/csharpexec-script: New, created from...
138393         * modules/csharpexec: ... this.
138395 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
138397         * modules/javaexec-script: New, created from...
138398         * modules/javaexec: ... this.
138400 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
138402         * modules/poll (Dependencies): Add sys_select.
138404 2007-01-15  Jim Meyering  <jim@meyering.net>
138406         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
138407         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
138408         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
138409         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
138411 2007-01-15  Bruno Haible  <bruno@clisp.org>
138413         * modules/striconveh: New file.
138414         * lib/striconveh.h: New file.
138415         * lib/striconveh.c: New file.
138416         * MODULES.html.sh (Internationalization functions): Add striconveh.
138418         * modules/striconveh-tests: New file.
138419         * tests/test-striconveh.c: New file.
138421 2007-01-15  Bruno Haible  <bruno@clisp.org>
138423         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
138424         not from GNU libiconv or GNU libc.
138426 2007-01-15  Bruno Haible  <bruno@clisp.org>
138428         * doc/gnulib-intro.texi (Copyright): Explain the different license
138429         terms for module descriptions, autoconf macros, tests, documentation.
138431 2007-01-14  Bruno Haible  <bruno@clisp.org>
138433         * modules/striconv-tests: New file.
138434         * tests/test-striconv.c: New file.
138436 2007-01-14  Bruno Haible  <bruno@clisp.org>
138438         * modules/iconv-tests: New file.
138439         * tests/test-iconv.c: New file.
138441 2007-01-14  Bruno Haible  <bruno@clisp.org>
138443         * gnulib-tool (func_get_license): For test modules, use the license of
138444         the main module.
138446 2007-01-14  Bruno Haible  <bruno@clisp.org>
138448         * modules/iconv (Include): Clarify that <iconv.h> can only be included
138449         if iconv is found to exist.
138451 2007-01-14  Bruno Haible  <bruno@clisp.org>
138453         * modules/c-ctype-tests: New file.
138454         * tests/test-c-ctype.c: New file.
138456 2007-01-14  Bruno Haible  <bruno@clisp.org>
138458         * modules/binary-io-tests: New file.
138459         * tests/test-binary-io.sh: New file.
138460         * tests/test-binary-io.c: New file.
138462 2007-01-14  Bruno Haible  <bruno@clisp.org>
138464         * modules/array-oset-tests: New file.
138465         * tests/test-array_oset.c: New file.
138467 2007-01-14  Bruno Haible  <bruno@clisp.org>
138469         * modules/array-list-tests: New file.
138470         * tests/test-array_list.c: New file.
138472 2007-01-14  Bruno Haible  <bruno@clisp.org>
138474         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
138475         and make.
138476         Reported by Simon Josefsson in
138477         <http://lists.gnu.org/r/bug-gnulib/2007-01/msg00139.html>
138479 2007-01-14  Bruno Haible  <bruno@clisp.org>
138481         * modules/allocsa-tests: New file.
138482         * tests/test-allocsa.c: New file.
138484 2007-01-14  Bruno Haible  <bruno@clisp.org>
138486         * modules/fchdir (Depends-on): Add absolute-header.
138487         * modules/unistd (Depends-on): Likewise.
138489 2006-12-30  Bruno Haible  <bruno@clisp.org>
138491         * modules/fchdir: New file.
138492         * modules/unistd (Files): Add lib/unistd_.h.
138493         (Makefile.am): Generate unistd.h from unistd_.h.
138494         * lib/fchdir.c: New file.
138495         * lib/dirent_.h: New file.
138496         * lib/unistd_.h: New file.
138497         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
138498         * m4/fchdir.m4: New file.
138499         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
138500         (gl_HEADER_UNISTD): Invoke it.
138501         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
138502         function.
138503         * lib/backupfile.c (opendir, closedir): Undefine.
138504         * lib/chown.c (open, close): Undefine.
138505         * lib/clean-temp.c (open, close): Undefine.
138506         * lib/copy-file.c (open, close): Undefine.
138507         * lib/execute.c (open, close): Undefine.
138508         * lib/fsusage.c (open, close): Undefine.
138509         * lib/gc-gnulib.c (open, close): Undefine.
138510         * lib/getcwd.c (opendir, closedir): Undefine.
138511         * lib/glob.c (opendir, closedir): Undefine.
138512         * lib/javacomp.c (open, close): Undefine.
138513         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
138514         * lib/openat-proc.c (open, close): Undefine.
138515         * lib/pagealign_alloc.c (open, close): Undefine.
138516         * lib/pipe.c (open, close): Undefine.
138517         * lib/progreloc.c (open, close): Undefine.
138518         * lib/savedir.c (opendir, closedir): Undefine.
138519         * lib/utime.c (open, close): Undefine.
138520         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
138522 2007-01-10  Bruno Haible  <bruno@clisp.org>
138524         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
138526 2007-01-12  Eric Blake  <ebb9@byu.net>
138528         Provide a robust <wchar.h>.  Further simplifications are now
138529         possible in other modules, but not included here.
138530         * modules/wchar: New module.
138531         * m4/wchar.m4: New file.
138532         * lib/wchar_.h: Likewise.
138533         * modules/mbchar (Depends-on): Depend on wchar, as the first use
138534         of the new module.
138535         * MODULES.html.sh (Extended multibyte and wide character utilities):
138536         New section.
138538 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
138540         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
138541         to a reasonable default for memory allocation.
138542         (xreadlink): Don't allocate a huge buffer, to work around a buggy
138543         file system that reports garbage st_size values for symlinks.
138544         Problem reported by Liyang Hu.
138546 2007-01-11  Simon Josefsson  <simon@josefsson.org>
138548         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
138549         Emacs .#* auto-save files).
138551 2007-01-11  Bruno Haible  <bruno@clisp.org>
138553         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
138554         directory.
138556 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
138558         Use @...@ consistently in lib/wctype_.h.
138559         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
138560         on it being set to 1 or 0.
138561         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
138562         go back to AC_SUBSTing it.
138563         * modules/wctype (Makefile.am): Undo previous change.
138565 2007-01-10  Eric Blake  <ebb9@byu.net>
138567         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
138568         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
138569         * modules/wctype (Makefile.am): Likewise.
138570         Reported by Chris McGuire.
138572 2007-01-10  Jim Meyering  <jim@meyering.net>
138574         fts.c: a small readability/maintainability improvement
138575         * lib/fts.c (fts_read): Make this code slightly more readable and
138576         maintainable by hoisting the "sp->fts_cur = p" assignments to
138577         immediately follow the statements that set P.  Derived from
138578         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
138580 2007-01-10  Eric Blake  <ebb9@byu.net>
138582         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
138583         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
138584         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
138585         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
138586         Reported by Chris McGuire.
138588 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
138590         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
138591         in sed script.
138593 2007-01-09  Bruno Haible  <bruno@clisp.org>
138595         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
138596         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
138597         variables.
138598         (func_module): Use them.
138600 2007-01-09  Bruno Haible  <bruno@clisp.org>
138602         * modules/unistr/base: New file.
138603         * lib/unistr.h: New file.
138605         * modules/unistr/u8-to-u16: New file.
138606         * lib/unistr/u8-to-u16.c: New file.
138608         * modules/unistr/u8-to-u32: New file.
138609         * lib/unistr/u8-to-u32.c: New file.
138611         * modules/unistr/u16-to-u8: New file.
138612         * lib/unistr/u16-to-u8.c: New file.
138614         * modules/unistr/u16-to-u32: New file.
138615         * lib/unistr/u16-to-u32.c: New file.
138617         * modules/unistr/u32-to-u8: New file.
138618         * lib/unistr/u32-to-u8.c: New file.
138620         * modules/unistr/u32-to-u16: New file.
138621         * lib/unistr/u32-to-u16.c: New file.
138623         * modules/unistr/u8-check: New file.
138624         * modules/unistr/u16-check: New file.
138625         * modules/unistr/u32-check: New file.
138626         * lib/unistr/u8-check.c: New file.
138627         * lib/unistr/u16-check.c: New file.
138628         * lib/unistr/u32-check.c: New file.
138630         * modules/unistr/u8-chr: New file.
138631         * modules/unistr/u16-chr: New file.
138632         * modules/unistr/u32-chr: New file.
138633         * lib/unistr/u8-chr.c: New file.
138634         * lib/unistr/u16-chr.c: New file.
138635         * lib/unistr/u32-chr.c: New file.
138637         * modules/unistr/u8-cmp: New file.
138638         * modules/unistr/u16-cmp: New file.
138639         * modules/unistr/u32-cmp: New file.
138640         * lib/unistr/u8-cmp.c: New file.
138641         * lib/unistr/u16-cmp.c: New file.
138642         * lib/unistr/u32-cmp.c: New file.
138644         * modules/unistr/u8-cpy: New file.
138645         * modules/unistr/u16-cpy: New file.
138646         * modules/unistr/u32-cpy: New file.
138647         * lib/unistr/u8-cpy.c: New file.
138648         * lib/unistr/u16-cpy.c: New file.
138649         * lib/unistr/u32-cpy.c: New file.
138650         * lib/unistr/u-cpy.h: New file.
138652         * modules/unistr/u8-cpy-alloc: New file.
138653         * modules/unistr/u16-cpy-alloc: New file.
138654         * modules/unistr/u32-cpy-alloc: New file.
138655         * lib/unistr/u8-cpy-alloc.c: New file.
138656         * lib/unistr/u16-cpy-alloc.c: New file.
138657         * lib/unistr/u32-cpy-alloc.c: New file.
138658         * lib/unistr/u-cpy-alloc.h: New file.
138660         * modules/unistr/u8-endswith: New file.
138661         * modules/unistr/u16-endswith: New file.
138662         * modules/unistr/u32-endswith: New file.
138663         * lib/unistr/u8-endswith.c: New file.
138664         * lib/unistr/u16-endswith.c: New file.
138665         * lib/unistr/u32-endswith.c: New file.
138666         * lib/unistr/u-endswith.h: New file.
138668         * modules/unistr/u8-mblen: New file.
138669         * modules/unistr/u16-mblen: New file.
138670         * modules/unistr/u32-mblen: New file.
138671         * lib/unistr/u8-mblen.c: New file.
138672         * lib/unistr/u16-mblen.c: New file.
138673         * lib/unistr/u32-mblen.c: New file.
138675         * modules/unistr/u8-mbtouc: New file.
138676         * modules/unistr/u16-mbtouc: New file.
138677         * modules/unistr/u32-mbtouc: New file.
138678         * lib/unistr/u8-mbtouc.c: New file.
138679         * lib/unistr/u16-mbtouc.c: New file.
138680         * lib/unistr/u32-mbtouc.c: New file.
138682         * modules/unistr/u8-mbtouc-safe: New file.
138683         * modules/unistr/u16-mbtouc-safe: New file.
138684         * modules/unistr/u32-mbtouc-safe: New file.
138685         * lib/unistr/u8-mbtouc-safe.c: New file.
138686         * lib/unistr/u16-mbtouc-safe.c: New file.
138687         * lib/unistr/u32-mbtouc-safe.c: New file.
138689         * modules/unistr/u8-move: New file.
138690         * modules/unistr/u16-move: New file.
138691         * modules/unistr/u32-move: New file.
138692         * lib/unistr/u8-move.c: New file.
138693         * lib/unistr/u16-move.c: New file.
138694         * lib/unistr/u32-move.c: New file.
138695         * lib/unistr/u-move.h: New file.
138697         * modules/unistr/u8-next: New file.
138698         * modules/unistr/u16-next: New file.
138699         * modules/unistr/u32-next: New file.
138700         * lib/unistr/u8-next.c: New file.
138701         * lib/unistr/u16-next.c: New file.
138702         * lib/unistr/u32-next.c: New file.
138704         * modules/unistr/u8-prev: New file.
138705         * modules/unistr/u16-prev: New file.
138706         * modules/unistr/u32-prev: New file.
138707         * lib/unistr/u8-prev.c: New file.
138708         * lib/unistr/u16-prev.c: New file.
138709         * lib/unistr/u32-prev.c: New file.
138711         * modules/unistr/u8-set: New file.
138712         * modules/unistr/u16-set: New file.
138713         * modules/unistr/u32-set: New file.
138714         * lib/unistr/u8-set.c: New file.
138715         * lib/unistr/u16-set.c: New file.
138716         * lib/unistr/u32-set.c: New file.
138717         * lib/unistr/u-set.h: New file.
138719         * modules/unistr/u8-startswith: New file.
138720         * modules/unistr/u16-startswith: New file.
138721         * modules/unistr/u32-startswith: New file.
138722         * lib/unistr/u8-startswith.c: New file.
138723         * lib/unistr/u16-startswith.c: New file.
138724         * lib/unistr/u32-startswith.c: New file.
138725         * lib/unistr/u-startswith.h: New file.
138727         * modules/unistr/u8-stpcpy: New file.
138728         * modules/unistr/u16-stpcpy: New file.
138729         * modules/unistr/u32-stpcpy: New file.
138730         * lib/unistr/u8-stpcpy.c: New file.
138731         * lib/unistr/u16-stpcpy.c: New file.
138732         * lib/unistr/u32-stpcpy.c: New file.
138733         * lib/unistr/u-stpcpy.h: New file.
138735         * modules/unistr/u8-stpncpy: New file.
138736         * modules/unistr/u16-stpncpy: New file.
138737         * modules/unistr/u32-stpncpy: New file.
138738         * lib/unistr/u8-stpncpy.c: New file.
138739         * lib/unistr/u16-stpncpy.c: New file.
138740         * lib/unistr/u32-stpncpy.c: New file.
138741         * lib/unistr/u-stpncpy.h: New file.
138743         * modules/unistr/u8-strcat: New file.
138744         * modules/unistr/u16-strcat: New file.
138745         * modules/unistr/u32-strcat: New file.
138746         * lib/unistr/u8-strcat.c: New file.
138747         * lib/unistr/u16-strcat.c: New file.
138748         * lib/unistr/u32-strcat.c: New file.
138749         * lib/unistr/u-strcat.h: New file.
138751         * modules/unistr/u8-strchr: New file.
138752         * modules/unistr/u16-strchr: New file.
138753         * modules/unistr/u32-strchr: New file.
138754         * lib/unistr/u8-strchr.c: New file.
138755         * lib/unistr/u16-strchr.c: New file.
138756         * lib/unistr/u32-strchr.c: New file.
138758         * modules/unistr/u8-strcmp: New file.
138759         * modules/unistr/u16-strcmp: New file.
138760         * modules/unistr/u32-strcmp: New file.
138761         * lib/unistr/u8-strcmp.c: New file.
138762         * lib/unistr/u16-strcmp.c: New file.
138763         * lib/unistr/u32-strcmp.c: New file.
138765         * modules/unistr/u8-strcpy: New file.
138766         * modules/unistr/u16-strcpy: New file.
138767         * modules/unistr/u32-strcpy: New file.
138768         * lib/unistr/u8-strcpy.c: New file.
138769         * lib/unistr/u16-strcpy.c: New file.
138770         * lib/unistr/u32-strcpy.c: New file.
138771         * lib/unistr/u-strcpy.h: New file.
138773         * modules/unistr/u8-strcspn: New file.
138774         * modules/unistr/u16-strcspn: New file.
138775         * modules/unistr/u32-strcspn: New file.
138776         * lib/unistr/u8-strcspn.c: New file.
138777         * lib/unistr/u16-strcspn.c: New file.
138778         * lib/unistr/u32-strcspn.c: New file.
138779         * lib/unistr/u-strcspn.h: New file.
138781         * modules/unistr/u8-strdup: New file.
138782         * modules/unistr/u16-strdup: New file.
138783         * modules/unistr/u32-strdup: New file.
138784         * lib/unistr/u8-strdup.c: New file.
138785         * lib/unistr/u16-strdup.c: New file.
138786         * lib/unistr/u32-strdup.c: New file.
138787         * lib/unistr/u-strdup.h: New file.
138789         * modules/unistr/u8-strlen: New file.
138790         * modules/unistr/u16-strlen: New file.
138791         * modules/unistr/u32-strlen: New file.
138792         * lib/unistr/u8-strlen.c: New file.
138793         * lib/unistr/u16-strlen.c: New file.
138794         * lib/unistr/u32-strlen.c: New file.
138795         * lib/unistr/u-strlen.h: New file.
138797         * modules/unistr/u8-strmblen: New file.
138798         * modules/unistr/u16-strmblen: New file.
138799         * modules/unistr/u32-strmblen: New file.
138800         * lib/unistr/u8-strmblen.c: New file.
138801         * lib/unistr/u16-strmblen.c: New file.
138802         * lib/unistr/u32-strmblen.c: New file.
138804         * modules/unistr/u8-strmbtouc: New file.
138805         * modules/unistr/u16-strmbtouc: New file.
138806         * modules/unistr/u32-strmbtouc: New file.
138807         * lib/unistr/u8-strmbtouc.c: New file.
138808         * lib/unistr/u16-strmbtouc.c: New file.
138809         * lib/unistr/u32-strmbtouc.c: New file.
138811         * modules/unistr/u8-strncat: New file.
138812         * modules/unistr/u16-strncat: New file.
138813         * modules/unistr/u32-strncat: New file.
138814         * lib/unistr/u8-strncat.c: New file.
138815         * lib/unistr/u16-strncat.c: New file.
138816         * lib/unistr/u32-strncat.c: New file.
138817         * lib/unistr/u-strncat.h: New file.
138819         * modules/unistr/u8-strncmp: New file.
138820         * modules/unistr/u16-strncmp: New file.
138821         * modules/unistr/u32-strncmp: New file.
138822         * lib/unistr/u8-strncmp.c: New file.
138823         * lib/unistr/u16-strncmp.c: New file.
138824         * lib/unistr/u32-strncmp.c: New file.
138826         * modules/unistr/u8-strncpy: New file.
138827         * modules/unistr/u16-strncpy: New file.
138828         * modules/unistr/u32-strncpy: New file.
138829         * lib/unistr/u8-strncpy.c: New file.
138830         * lib/unistr/u16-strncpy.c: New file.
138831         * lib/unistr/u32-strncpy.c: New file.
138832         * lib/unistr/u-strncpy.h: New file.
138834         * modules/unistr/u8-strnlen: New file.
138835         * modules/unistr/u16-strnlen: New file.
138836         * modules/unistr/u32-strnlen: New file.
138837         * lib/unistr/u8-strnlen.c: New file.
138838         * lib/unistr/u16-strnlen.c: New file.
138839         * lib/unistr/u32-strnlen.c: New file.
138840         * lib/unistr/u-strnlen.h: New file.
138842         * modules/unistr/u8-strpbrk: New file.
138843         * modules/unistr/u16-strpbrk: New file.
138844         * modules/unistr/u32-strpbrk: New file.
138845         * lib/unistr/u8-strpbrk.c: New file.
138846         * lib/unistr/u16-strpbrk.c: New file.
138847         * lib/unistr/u32-strpbrk.c: New file.
138848         * lib/unistr/u-strpbrk.h: New file.
138850         * modules/unistr/u8-strrchr: New file.
138851         * modules/unistr/u16-strrchr: New file.
138852         * modules/unistr/u32-strrchr: New file.
138853         * lib/unistr/u8-strrchr.c: New file.
138854         * lib/unistr/u16-strrchr.c: New file.
138855         * lib/unistr/u32-strrchr.c: New file.
138857         * modules/unistr/u8-strspn: New file.
138858         * modules/unistr/u16-strspn: New file.
138859         * modules/unistr/u32-strspn: New file.
138860         * lib/unistr/u8-strspn.c: New file.
138861         * lib/unistr/u16-strspn.c: New file.
138862         * lib/unistr/u32-strspn.c: New file.
138863         * lib/unistr/u-strspn.h: New file.
138865         * modules/unistr/u8-strstr: New file.
138866         * modules/unistr/u16-strstr: New file.
138867         * modules/unistr/u32-strstr: New file.
138868         * lib/unistr/u8-strstr.c: New file.
138869         * lib/unistr/u16-strstr.c: New file.
138870         * lib/unistr/u32-strstr.c: New file.
138871         * lib/unistr/u-strstr.h: New file.
138873         * modules/unistr/u8-strtok: New file.
138874         * modules/unistr/u16-strtok: New file.
138875         * modules/unistr/u32-strtok: New file.
138876         * lib/unistr/u8-strtok.c: New file.
138877         * lib/unistr/u16-strtok.c: New file.
138878         * lib/unistr/u32-strtok.c: New file.
138879         * lib/unistr/u-strtok.h: New file.
138881         * modules/unistr/u8-uctomb: New file.
138882         * modules/unistr/u16-uctomb: New file.
138883         * modules/unistr/u32-uctomb: New file.
138884         * lib/unistr/u8-uctomb.c: New file.
138885         * lib/unistr/u16-uctomb.c: New file.
138886         * lib/unistr/u32-uctomb.c: New file.
138888         * MODULES.html.sh (Unicode string functions): Add the new modules.
138890 2007-01-08  Bruno Haible  <bruno@clisp.org>
138892         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
138893         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
138894         subdirectories.
138896 2007-01-08  Karl Berry  <karl@gnu.org>
138898         * doc/error.texi: mention that main() fns must set program_name
138899         when progname is used.
138901 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
138903         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
138904         WCTYPE_H is empty, for the benefit of builds from non-distclean
138905         directories.  Problem reported by Eric Blake in
138906         <http://lists.gnu.org/r/bug-gnulib/2007-01/msg00157.html>.
138908 2007-01-08  Bruno Haible  <bruno@clisp.org>
138910         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
138911         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
138912         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
138913         PROVIDE_CANONICALIZE_FILENAME_MODE.
138914         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
138916 2007-01-08  Bruno Haible  <bruno@clisp.org>
138918         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
138919         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
138920         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
138921         * lib/fts.c: Likewise.
138922         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
138924 2006-12-25  Bruno Haible  <bruno@clisp.org>
138926         * modules/utf8-ucs4-safe: New file.
138927         * lib/utf8-ucs4-safe.h: New file.
138928         * lib/unistr/utf8-ucs4-safe.c: New file.
138930         * modules/utf16-ucs4-safe: New file.
138931         * lib/utf16-ucs4-safe.h: New file.
138932         * lib/unistr/utf16-ucs4-safe.c: New file.
138934         * MODULES.html.sh (Unicode string functions): Add the new modules.
138936 2007-01-08  Bruno Haible  <bruno@clisp.org>
138938         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
138939         (Depends-on): Add unitypes.
138940         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
138941         (u8_mbtouc_aux): Move out to separate file.
138942         (u8_mbtouc): Use ucs4_t, uint8_t types.
138943         * lib/unistr/utf8-ucs4.c: New file.
138945         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
138946         (Depends-on): Add unitypes.
138947         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
138948         (u16_mbtouc_aux): Move out to separate file.
138949         (u16_mbtouc): Use ucs4_t, uint16_t types.
138950         * lib/unistr/utf16-ucs4.c: New file.
138952         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
138953         (Depends-on): Add unitypes.
138954         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
138955         (u8_uctomb_aux): Move out to separate file.
138956         (u8_uctomb): Use ucs4_t, uint8_t types.
138957         * lib/unistr/ucs4-utf8.c: New file.
138959         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
138960         (Depends-on): Add unitypes.
138961         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
138962         (u16_uctomb_aux): Move out to separate file.
138963         (u16_uctomb): Use ucs4_t, uint16_t types.
138964         * lib/unistr/ucs4-utf16.c: New file.
138966 2006-12-25  Bruno Haible  <bruno@clisp.org>
138968         * modules/unitypes: New file.
138969         * lib/unitypes.h: New file.
138970         * MODULES.html.sh (func_all_modules): New section "Unicode string
138971         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
138972         this section. Add unitypes.
138974 2007-01-08  Bruno Haible  <bruno@clisp.org>
138976         Avoid variable names that conflict with those from libtool.
138977         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
138978         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
138979         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
138980         library_names_spec to acl_library_names_spec, hardcode_* to
138981         acl_hardcode_*.
138982         Reported by Ralf Wildenhues.
138984 2007-01-08  Bruno Haible  <bruno@clisp.org>
138986         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
138987         definition.
138988         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
138989         definition.
138990         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
138991         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
138992         definition.
138993         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
138994         definition.
138995         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
138996         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
138997         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
138998         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
138999         definition.
139000         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
139001         definition.
139002         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
139003         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
139004         GC_USE_<algorithm>.
139005         * lib/gc-libgcrypt.c: Likewise.
139006         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
139007         * modules/gc-arctwo (configure.ac): Likewise.
139008         * modules/gc-des (configure.ac): Likewise.
139009         * modules/gc-hmac-md5 (configure.ac): Likewise.
139010         * modules/gc-hmac-sha1 (configure.ac): Likewise.
139011         * modules/gc-md2 (configure.ac): Likewise.
139012         * modules/gc-md4 (configure.ac): Likewise.
139013         * modules/gc-md5 (configure.ac): Likewise.
139014         * modules/gc-random (configure.ac): Likewise.
139015         * modules/gc-rijndael (configure.ac): Likewise.
139016         * modules/gc-sha1 (configure.ac): Likewise.
139018 2007-01-08  Bruno Haible  <bruno@clisp.org>
139020         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
139021         macro definition.
139022         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
139023         definition.
139024         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
139025         definition.
139026         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
139027         * modules/fcntl-safer (configure.ac): Likewise.
139028         * modules/fopen-safer (configure.ac): Likewise.
139029         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
139030         GNULIB_FWRITEERROR macro definition.
139032 2007-01-08  Bruno Haible  <bruno@clisp.org>
139034         * m4/gnulib-common.m4: New file.
139035         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
139036         (func_get_filelist): Add m4/gnulib-common.m4.
139038 2007-01-08  Bruno Haible  <bruno@clisp.org>
139040         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
139041         command.
139043 2007-01-08  Jim Meyering  <jim@meyering.net>
139045         Use a more robust test for a "can't happen" condition.
139046         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
139047         narrowed the st_size value.  Presuming the "can't happen" condition
139048         is true, that narrowing could conceivably convert an invalid st_size
139049         value into a valid one.  Instead, use a change based on Matthew
139050         Woehlke's original patch.
139052         Slight readability improvement: use an assert-like macro
139053         in place of literal "abort ()" uses.
139054         * lib/fts.c (fts_assert): Define.
139055         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
139056         Use this macro instead of a bare 'abort'.
139058 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
139060         Don't worry about using IRIX 5.3's wctype.h broken definitions;
139061         simply work around them.
139062         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
139063         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
139064         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
139065         declaring.
139066         Don't bother to define as macros, since the standard doesn't require it.
139067         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
139068         longer worry about IRIX 5.3.
139069         (HAVE_WCTYPE_CTMP_BUG): Remove.
139071 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
139073         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
139074         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
139075         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
139076         Problems reported by Georg Schwarz for IRIX 5.3.
139078         * gnulib-tool (autoconf_minversion): Take the maximum version number
139079         found, not the minimum.  Problem reported by James Youngman.
139081 2007-01-03  Karl Berry  <karl@gnu.org>
139083         * doc/error.texi: new file, explaining interaction with progname.
139084         * doc/gnulib.texi: include it.  Update copyright.
139086 2007-01-03  Simon Josefsson  <simon@josefsson.org>
139088         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
139089         AC_CANONICAL_HOST, to improve autobuild outputs.
139091 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
139092             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
139094         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
139095         sockets, server sockets, and other file descriptors.  Count errors
139096         to compute the return value.  Reorder the code a bit to be easier
139097         to follow.  Don't set event bits that were not requested (except
139098         POLLERR and POLLHUP).
139100 2007-01-01  Bruno Haible  <bruno@clisp.org>
139102         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
139104 2007-01-03  Jim Meyering  <jim@meyering.net>
139106         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
139108 2007-01-02  Bruno Haible  <bruno@clisp.org>
139110         * modules/settime (Include): Require timespec.h.
139111         * modules/nanosleep (Include): Likewise.
139113 2007-01-01  Bruno Haible  <bruno@clisp.org>
139115         * gnulib-tool (func_emit_copyright_notice): Bump year.
139116         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
139118 2007-01-01  Bruno Haible  <bruno@clisp.org>
139120         Improve support for OpenBSD.
139121         * build-aux/config.rpath (libname_spec): Export.
139122         (library_names_spec): New variable. Export.
139123         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
139124         library_names_spec from the config.rpath output. Locate shared library
139125         through the name pattern in library_names_spec.
139127 2007-01-01  Eric Blake  <ebb9@byu.net>
139129         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
139131 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
139133         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
139134         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
139135         assume the C locale, and avoid an "eval" that could cause trouble.
139136         Problem with SORT reported by Bob Proulx.
139138         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
139139         Define.  Trivial patch from Henning Nielsen Lund, originally
139140         sent to bug-grep@gnu.org today.
139142 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
139144         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
139145         struct stat.  Problem reported by Henning Nielsen Lund.
139146         * lib/acl.c: Include acl.h first, to check interface.  Don't
139147         bother to include sys/types.h and sys/stat.h again.
139149 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
139151         Import the following change from libc; problem reported by
139152         Sven Verdoolaege.
139154         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
139156         [BZ #1373]
139157         * lib/argp.h: Remove __NTH for __argp_usage inline function.
139159 2006-12-28  Jim Meyering  <jim@meyering.net>
139161         * build-aux/announce-gen: Do not assume that the package
139162         builds any of tar.gz, tar.bz2, and .xdelta files.
139163         Suggestion from Simon Josefsson.
139165 2006-12-28  Simon Josefsson  <simon@josefsson.org>
139167         * modules/announce-gen: New file.
139169 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
139171         * lib/mbchar.h: Just include <wctype.h>; the wctype module
139172         handles its gotchas now.
139173         * lib/mbswidth.c: Likewise.
139174         * lib/wcwidth.h: Likewise.
139175         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
139176         and iswcntrl; the wctype module does this stuff now.
139177         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
139178         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
139179         * modules/mbchar (Depends-on): Add wctype.
139180         * modules/mbswidth (Depends-on): Likewise.
139181         * modules/wcwidth (Depends-on): Likewise.
139183 2006-12-27  Eric Blake  <ebb9@byu.net>
139185         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
139186         module uses more than what <wctype.h> is required to provide.
139188 2006-12-26  Eric Blake  <ebb9@byu.net>
139190         * gnulib-tool (sed_extract_prog): Avoid space-tab.
139192 2006-12-26  Eric Blake  <ebb9@byu.net>
139194         * modules/absolute-header: New module.
139195         * modules/fcntl (Depends-on): Depend on it.
139196         * modules/inttypes (Depends-on): Likewise.
139197         * modules/stdint (Depends-on): Likewise.
139198         * modules/sys_stat (Depends-on): Likewise.
139199         * modules/wctype (Depends-on): Likewise.
139200         * MODULES.html.sh (Support for building libraries and
139201         executables): Document it.
139203 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
139205         * gnulib-tool (SED): Remove, undoing previous change.
139206         The problem was that it broke coreutils on Solaris, because
139207         "sed --posix" leaked into a makefile.
139208         (sed): New alias, if 'alias' and GNU sed.
139210 2006-12-24  Jim Meyering  <jim@meyering.net>
139212         Work around an fchownat bug in glibc-2.4:
139213         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
139214         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
139215         in spite of the -P option.
139216         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
139217         New macros.
139218         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
139219         * modules/openat (Files): Add lib/fchownat.c.
139220         * lib/openat.c (fchownat): Don't define here.  Move to...
139221         * lib/fchownat.c: ...this new file.
139223 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
139225         Fix bug reported by Bruno Haible in
139226         <http://lists.gnu.org/r/bug-gnulib/2006-12/msg00228.html>
139227         where quotearg.c didn't compile on Mac OS X 10.2 because it
139228         lacks <wchar.h> and wint_t.
139229         * lib/wctype_.h (__wctype_wint_t): New type.
139230         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
139231         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
139232         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
139233         Arg is now of type __wctype_wint_t, not wint_t.
139234         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
139235         substitute HAVE_WINT_T.
139236         * modules/wctype (Files): Add m4/wint_t.m4.
139237         (wctype.h): Substitute HAVE_WINT_T.
139239 2006-12-23  Bruno Haible  <bruno@clisp.org>
139241         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
139243 2006-12-23  Bruno Haible  <bruno@clisp.org>
139245         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
139246         S_ISLNK.
139247         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
139248         mingw.
139250 2006-12-22  Bruno Haible  <bruno@clisp.org>
139252         * lib/copy-file.c: Include acl.h.
139253         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
139254         Close the file descriptors only after being done with copy_acl.
139255         * modules/copy-file (Depends-on): Add acl.
139257 2006-12-22  Bruno Haible  <bruno@clisp.org>
139259         * gnulib-tool (SED): New variable.
139260         Use $SED instead of sed everywhere.
139262 2006-12-22  Bruno Haible  <bruno@clisp.org>
139264         * modules/no-c++: New file.
139265         * m4/no-c++.m4: New file.
139266         * MODULES.html.sh (Support for building libraries and executables):
139267         Add no-c++.
139269 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
139271         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
139272         Include <limits.h>, and use its INT_MAX to rewrite the
139273         j loop so that it does not overflow 'int'.  Problem reported by
139274         Ralf Wildenhues in
139275         <http://lists.gnu.org/r/bug-gnulib/2006-12/msg00084.html>.
139276         Play it safe by shifting left by 1 rather than multiplying by 2,
139277         as GCC is less likely to optimize this away when the value
139278         is signed (when it assumes overflow leads to undefined behavior).
139279         Also, don't assume time_t uses two's complement.
139281 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
139283         * MODULES.html.sh: New module wctype.
139284         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
139285         * lib/fnmatch.c: Don't bother to include <wchar.h> before
139286         <wctype.h>, since the new wctype module should fix this.
139287         * lib/quotearg.c: Include <wctype.h> unconditionally, since
139288         the wctype module should arrange for it.
139289         * lib/regex_internal.h: Likewise.
139290         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
139291         since the wctype module should handle this now.
139292         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
139293         * modules/fnmatch (Depends-on): Add wctype.
139294         * modules/quotearg (Depends-on): Likewise.
139295         * modules/regex (Depends-on): Likewise.
139297 2006-12-19  Bruno Haible  <bruno@clisp.org>
139299         * lib/strdup.h [C++]: Wrap definitions in extern "C".
139300         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
139302 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
139304         * modules/savewd (Depends-on): Fix dependency on fcntl.
139306 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
139308         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
139309         conforms to C99, rather than relying on the user's environment
139310         setting of STDINT_H.
139312 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
139313         and Eric Blake  <ebb9@byu.net>
139315         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
139316         This is more consistent with the other defines here.
139317         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
139318         Port to z/OS.  Problem reported by Paul Gilmartin.
139319         Change local vars to use gl_ prefix rather than ac_.
139320         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
139321         with other defines.
139322         * modules/double-slash-root: New module.
139323         * modules/dirname (Files): Remove m4/double-slash-root.m4.
139324         (Depends-on): Add double-slash-root.
139325         * MODULES.html.sh (File system functions): Mention new module.
139327 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
139329         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
139330         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
139331         This is for the benefit of gzip, which doesn't do i18n.
139333 2006-12-12  Jim Meyering  <jim@meyering.net>
139335         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
139336         Reported by Andreas Schwab <schwab@suse.de>.
139338 2006-12-12  Bruno Haible  <bruno@clisp.org>
139340         Merge these changes.
139341         2006-09-05  Bruno Haible  <bruno@clisp.org>
139342         * lib/iconvme.c (iconv_string): No need to save and restore errno when
139343         iconv_alloc succeeded.
139344         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
139345         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
139346         test for " && dest " at the end - dest is always != NULL there. Call
139347         iconv with 4xNULL arguments initially, to reset the state. Call iconv
139348         with 2xNULL arguments, also to flush the state storage. Handle the
139349         IRIX iconv behaviour. Realloc the final result, to throw away unused
139350         memory.
139352 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
139354         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
139355         and fchmodat unconditionally, since glibc 2.4 has them.
139356         Problem reported by Arkadiusz Miskiewicz.
139358 2006-12-10  Bruno Haible  <bruno@clisp.org>
139360         * gnulib-tool (func_import): Show the include files only for those
139361         modules that are copied and specified.
139362         Reported by Karl Berry.
139364 2006-12-08  Jim Meyering  <jim@meyering.net>
139366         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
139367         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
139369         * build-aux/announce-gen: Add two new options, both optional:
139370         --bootstrap-tools=TOOL_LIST
139371               a comma-separated list of tools, e.g.,
139372               autoconf,automake,bison,gnulib
139373         --gnulib-snapshot-date=DATE
139374               if gnulib is in the bootstrap tool list,
139375               then report this as the snapshot date.
139376               If not specified, use the current date/time.
139377               If you specify a date here, be sure it's UTC.
139379 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
139381         * tests/test-argp-2.sh: Fix test to match actual output.
139382         (func_compare): Fix sed script to be portable.
139384 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
139386         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
139387         workaround for this case.  It is not autoconfigured now; offhand
139388         it's hard to see how to autoconfigure it.
139390 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
139392         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
139393         a directory that is about to be chowned.  Such a directory's
139394         initial file permissions should permit the owner only and this
139395         should not be changed until after the chown, since the group and
139396         other bits would be incorrect if they granted permission before
139397         the chown.
139399         Fix porting problem for iswctype reported by Georg Schwarz in:
139400         http://lists.gnu.org/r/bug-coreutils/2006-12/msg00017.html
139401         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
139402         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
139403         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
139404         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
139406 2006-12-03  Jim Meyering  <jim@meyering.net>
139408         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
139409         p->fts_statp may not yet be defined.
139410         (fts_read): Instead, set it in the caller, once p->fts_statp is
139411         sure to be defined, and corresponds to a top-level directory.
139412         This bug made du -x fail.  Here's the coreutils test case:
139413         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
139414         Reported by Mike Frysinger.
139416 2006-12-01  Jim Meyering  <jim@meyering.net>
139418         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
139419         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
139420         Reported by Simon Josefsson.
139422 2006-11-30  Jim Meyering  <jim@meyering.net>
139424         * m4/warning.m4: Use the all-permissive copyright notice
139425         recommended by RMS (rather than LGPL).
139426         * m4/vararrays.m4: Likewise.
139427         * m4/flexmember.m4: Likewise.
139429 2006-11-29  Bruno Haible  <bruno@clisp.org>
139431         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
139432         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
139433         using +=.
139434         Reported by Simon Josefsson <simon@josefsson.org>.
139436 2006-11-28  James Youngman  <jay@gnu.org>
139438         * README: Advise users that they might find the bug-gnulib@gnu.org
139439         and autotools-announce@gnu.org mailing lists useful.
139441 2006-11-28  Bruno Haible  <bruno@clisp.org>
139443         * m4/ptrdiff_max.m4: Remove file.
139445 2006-11-21  Bruno Haible  <bruno@clisp.org>
139447         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
139448         _AC_COMPUTE_INT.
139449         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
139450         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
139451         _AC_COMPUTE_INT.
139452         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
139453         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
139454         _AC_COMPUTE_INT.
139455         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
139457 2006-11-28  Jim Meyering  <jim@meyering.net>
139459         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
139460         warning from "gcc -Wshadow" about shadowing the builtin.
139462 2006-11-27  Bruno Haible  <bruno@clisp.org>
139464         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
139465         _AC_COMPUTE_INT.
139466         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
139468 2006-11-27  Bruno Haible  <bruno@clisp.org>
139469             Paul Eggert  <eggert@cs.ucla.edu>
139471         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
139473 2006-11-26  Bruno Haible  <bruno@clisp.org>
139475         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
139476         noinst_LTLIBRARIES.
139478 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
139479             Bruno Haible  <bruno@clisp.org>
139481         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
139482         if compiling with "gcc -ansi".
139484 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
139486         Fix some incompatibilities with gcc -ansi -pedantic.
139487         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
139488         if compiling pedantically with GCC, unless it's C99 or later.
139489         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
139490         it mishandles gcc -ansi -pedantic as well.
139491         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
139492         if gcc -pedantic.
139493         * lib/regexec.c (check_node_accept_bytes): Don't use auto
139494         initializers for struct if -pedantic, unless it's C99 or later.
139496 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
139498         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
139499         Don't close an fd more than once. Identical atimes indicate
139500         success, not failure.
139502 2006-11-22  Robinson Mittmann  <bob@hoplon.com>  (tiny change)
139504         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
139506 2006-11-23  Jim Meyering  <jim@meyering.net>
139508         * build-aux/announce-gen: New file.  From coreutils.
139510 2006-11-22  Jim Meyering  <jim@meyering.net>
139512         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
139513         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
139514         (fts_read): Use a temporary to narrow the overused st_size member
139515         before using it in a switch statement.  Reported by Matthew Woehlke.
139517         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
139518         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
139520 2006-11-20  Bruno Haible  <bruno@clisp.org>
139522         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
139523         changequote instead of pairs of brackets.
139524         Reported by Andreas Schwab <schwab@suse.de>.
139526 2006-11-21  Jim Meyering  <jim@meyering.net>
139528         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
139529         so as to remain compatible with older compilers.
139530         Patch from Michael Deutschmann.
139532 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
139534         * MODULES.html.sh (File system functions): Add openat.
139536         * lib/openat.h (rpl_fstatat): New macro, if
139537         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
139538         (fstatat): Define to rpl_fstatat under the same conditions,
139539         unless COMPILING_FSTATAT.
139540         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
139541         seems to have the bug.
139542         * lib/fstatat.c: New file.
139543         * modules/openat (Files): Add it.
139545 2006-11-20  Bruno Haible  <bruno@clisp.org>
139547         * Makefile: New file.
139549 2006-11-20  Jim Meyering  <jim@meyering.net>
139551         The beginnings of syntax-related checks for gnulib.
139552         * lib/Makefile: New file.
139553         * lib/t-idcache: New script.  Ensure that the two halves of
139554         idcache.c stay in sync.
139556         * lib/idcache.c: Adjust comments in user- and group- portions to
139557         be more accurate, and to be consistent with one another.
139559 2006-11-20  Jim Meyering  <jim@meyering.net>
139561         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
139562         continue using the flexible array member (thus, this module performs
139563         half as many malloc calls), with the addition that...
139564         (getgroup, getuser): Consistently record a non-match via an empty
139565         "name" string, and map an empty string match to a NULL return value.
139566         * modules/idcache (Depends-on): Re-add flexmember.
139568         * lib/idcache.c (getuser): Remove all uses of the register keyword.
139569         (getuidbyname, getgroup, getgidbyname): Likewise.
139571         Use cleaner syntax: NULL rather than 0.
139572         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
139574 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
139576         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
139577         It mishandled the case where the group was missing.
139578         Problem reported by Greg Schafer.
139579         * modules/idcache: Likewise.
139581 2006-11-18  Jim Meyering  <jim@meyering.net>
139583         * check-module (%exempt_header): Add exception for some
139584         conditionally-included headers.
139586         * modules/i-ring (Depends-on): Add verify.
139587         (License): Change to LGPL.
139589 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
139591         * modules/getaddrinfo (Depends-on): Remove inttostr; add snprintf.
139592         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
139593         and inttostr.h.  Use snprintf rather than uinttostr, so that
139594         LGPLed code doesn't depend on GPLed.
139596 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
139598         * modules/inline (License): Change from GPL to LGPL.
139600 2006-11-17  Jim Meyering  <jim@meyering.net>
139602         * modules/d-type (License): Switch to LGPL.
139604 2006-11-15  Bruno Haible  <bruno@clisp.org>
139606         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
139608 2006-11-15  Eric Blake  <ebb9@byu.net>
139610         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
139611         the module dependency.
139613 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
139614             Bruno Haible  <bruno@clisp.org>
139616         * gnulib-tool (func_create_testdir): Add license consistency check.
139618 2006-11-15  Eric Blake  <ebb9@byu.net>
139620         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
139621         random "(cached)" in configure output.
139623 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
139625         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
139626         test for conforming inttypes.h is both announced and cached.
139628         * MODULES.html.sh (seen_modules, seen_files): New variables.
139629         (func_module): Rewrite to use a few less gnulib-tool and sed
139630         invocations.  Avoid a couple of quadratic algorithms for ...
139631         (missed_modules, missed_files): ... these, with ...
139632         (func_append, func_tmpdir): ... these new functions, from
139633         gnulib-tool.  Analogously, install traps for cleanup.
139635         * tests/test-gc.c (main): Remove unused variables.
139636         * tests/test-read-file.c: Include stdlib.h, for 'free'.
139638 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
139640         * modules/inttostr (License): Change to LGPL.
139642 2006-11-14  Eric Blake  <ebb9@byu.net>
139644         * modules/tempname (License): Change to LGPL.
139646 2006-11-14  Eric Blake  <ebb9@byu.net>
139648         * doc/functions.texi (Function Portability): *printf functions on
139649         Cygwin now understand all POSIX size specifiers.
139651 2006-11-14  Bruno Haible  <bruno@clisp.org>
139653         * modules/c-ctype (License): Change to LGPL.
139655 2006-11-12  Bruno Haible  <bruno@clisp.org>
139657         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
139658         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
139659         for GNOME libraries, for which the include files are installed in
139660         subdirectories of $prefix/include.
139662 2006-11-12  Bruno Haible  <bruno@clisp.org>
139664         * m4/lib-link.m4: Require at least autoconf-2.54.
139665         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
139666         name to underscores for the --with option.
139668 2006-11-13  Bruno Haible  <bruno@clisp.org>
139670         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
139671         the tests directory.
139672         Reported by Ralf Wildenhues.
139674 2006-11-13  Bruno Haible  <bruno@clisp.org>
139676         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
139677         (func_emit_initmacro_end): Undo the override here.
139678         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
139679         Works around the famous automake error in coreutils.
139681 2006-11-13  Eric Blake  <ebb9@byu.net>
139683         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
139684         element, not its node.
139686 2006-11-12  Bruno Haible  <bruno@clisp.org>
139688         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
139689         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
139691 2006-11-12  Bruno Haible  <bruno@clisp.org>
139693         * gnulib-tool: New option --local-symlink.
139694         (func_usage): Document it.
139695         (lsymbolic): New variable.
139696         (func_import, func_create_testdir): If --symlink was not specified,
139697         test whether --local-symlink was specified and the file comes from
139698         the local_gnulib_dir.
139700 2006-11-12  Bruno Haible  <bruno@clisp.org>
139702         * gnulib-tool (func_ln): New function.
139703         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
139705 2006-11-12  Bruno Haible  <bruno@clisp.org>
139707         Finish support for source files in subdirectories.
139708         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
139709         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
139710         AUTOMAKE_OPTIONS.
139711         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
139713 2006-11-12  Bruno Haible  <bruno@clisp.org>
139715         * gnulib-tool (func_get_automake_snippet): Synthesize also an
139716         EXTRA_lib_SOURCES augmentation.
139717         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
139719 2006-11-12  Jim Meyering  <jim@meyering.net>
139721         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
139722         file descriptors.  This also averts a failure on systems with
139723         native openat support when a traversed directory lacks "x" access.
139724         * lib/fts_.h: Include "i-ring.h"
139725         (struct FTS) [fts_fd_ring]: New member.
139726         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
139727         (FCHDIR): Add parentheses.
139728         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
139729         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
139730         When descending, rather than simply closing the previous
139731         fts_cwd_fd value, push that file descriptor onto the ring.
139732         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
139733         (fts_open): Initialize the new fd_ring member.
139734         (fts_close): Clear the ring.
139735         (fts_safe_changedir): When possible, use our new fd_ring to skip
139736         the diropen and fstat and dev/ino comparison that would normally
139737         accompany a virtual `chdir ("..")'.
139739         * modules/fts (Depends-on): Add i-ring.
139740         * modules/i-ring: New module.
139741         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
139742         * m4/i-ring.m4: New file.
139744 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
139746         * gnulib-tool (func_create_testdir): Fix replacement of
139747         `build-aux' in configure.ac.  Run autotools in gltests
139748         subdirectory.
139749         (func_create_testdir, func_create_megatestdir, test): There is
139750         no need for '--force' in most autotool invocations in a new
139751         tree.  Actually fail the whole test if any of the tools, or the
139752         configure or make stages fail.
139754         Sync from Automake.
139755         * build-aux/gnupload: Revert last change.  Add pointer to upload
139756         instructions of the GNU Maintenance Instructions.
139757         Suggestion by Karl Berry.
139759 2006-11-10  Jim Meyering  <jim@meyering.net>
139761         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
139763 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
139765         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
139766         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
139767         (bind_textdomain_codeset) [! ENABLE_NLS]:
139768         Evaluate all the arguments.  That way, callers get compatible behavior
139769         if the arguments have side effects.  Also, it avoids some GCC
139770         diagnostics in some cases; Joel E. Denny reported problems when Bison
139771         was configured with --enable-gcc-warnigs.
139773 2006-11-10  Jim Meyering  <jim@meyering.net>
139775         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
139776         relevant options in CFLAGS (like -O, -fno-inline) are taken into
139777         account.
139779 2006-11-10  Jim Meyering  <jim@meyering.net>
139781         * modules/inline: New file/module.
139782         * modules/xalloc (Files): Remove m4/inline.m4.
139783         (Depends-on): Add inline, instead.
139784         * modules/oset: Likewise.
139785         * modules/list: Likewise.
139787 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
139789         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
139790         Problem reported by Matthew Woehlke.
139792 2006-11-09  Bruno Haible  <bruno@clisp.org>
139794         * lib/tempname.c (gen_tempname): Remove variant that invokes
139795         __gen_tempname.
139796         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
139797         __gen_tempname.
139799 2006-11-08  Bruno Haible  <bruno@clisp.org>
139801         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
139802         to 'yes' instead of 'cross-compiling'.
139804 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
139806         * lib/quotearg.h (quotearg_free): New decl.
139807         * lib/quotearg.c (quotearg_free): New function.
139808         (slot0, nslots, slotvec0, slotvec):
139809         Now file-scope so that quotearg_free can get at them.
139811 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
139813         Sync from Automake.
139814         * build-aux/gnupload: Add missing 'gnu' to example URL.
139815         Report by Karl Berry.
139817 2006-11-08  Bruno Haible  <bruno@clisp.org>
139819         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
139820         Suggested by Paul Eggert.
139822 2006-11-08  Jim Meyering  <jim@meyering.net>
139824         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
139825         It's already included if !_LIBC.
139826         (fts_safe_changedir): Add a comment.
139828 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
139830         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
139831         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
139832         Matthew Woehlke.
139834         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
139835         definitions up, to avoid colliding with change below.
139836         (static_inline) [HAVE_INLINE]: New macro.
139837         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
139838         Provide extern decls when !HAVE_INLINE.  Do not define unless
139839         static_inline is defined, either by us or by xmalloc.c.  Use
139840         static_inline rather than static inline.
139841         (XCALLOC): Optimize sizeof(T) = 1 case.
139842         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
139844 2006-11-07  Bruno Haible  <bruno@clisp.org>
139846         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
139847         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
139848         AC_C_INLINE.
139849         * modules/xalloc (Files): Add m4/inline.m4.
139851 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
139853         * README: Fix typo.
139854         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
139855         (Miscellanous Notes): ...from this.
139857 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
139859         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
139860         Mention that offsetof should be used instead of sizeof.
139861         From Bruno Haible.
139863 2006-11-07  Bruno Haible  <bruno@clisp.org>
139865         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
139867 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
139869         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
139870         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
139871         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
139872         (gl_tree_add_before, gl_tree_add_after):
139873         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
139874         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
139875         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
139876         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
139877         (gl_linked_add_after, gl_linked_add_at): Likewise.
139878         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
139879         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
139880         (gl_tree_add_before, gl_tree_add_after): Likewise.
139881         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
139882         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
139883         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
139885 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
139887         * lib/gl_oset.h: Use C comment style, not C++ comment style.
139889 2006-11-06  Bruno Haible  <bruno@clisp.org>
139891         * m4/inline.m4: New file.
139892         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
139893         * modules/list (Files): Add m4/inline.m4.
139894         * modules/oset (Files): Likewise.
139896 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
139898         * lib/idcache.c: Include <stddef.h>, for offsetof.
139899         (struct userid.name): Change from char * to a flexible array member.
139900         All uses changed.
139901         * modules/idcache (Depends-on): Add flexmember.
139903         * MODULES.html.sh (Core language properties): New module flexmember.
139904         * modules/flexmember, m4/flexmember.m4: New files.
139906         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
139907         inline functions that are identical with the old xnmalloc_inline,
139908         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
139909         that we can avoid some unnecessary integer multiplications and
139910         divisions in the common case where the element size is known at
139911         compile time.
139912         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
139913         needed.
139914         (xnboundedmalloc): Remove.
139915         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
139916         arguments, for consistency with rest of this header.
139917         (xcharalloc): Rewrite using XNMALLOC.
139918         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
139919         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
139920         versions have been moved to lib/xalloc.h and renamed to be the
139921         non-*_inline versions.
139922         (xmalloc, xrealloc): Implement without reference to the xnmalloc
139923         and xnrealloc functions, since those functions are now inline and
139924         now call us.
139925         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
139926         renaming described above.
139927         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
139928         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
139929         captures the dependency in AC_C_INLINE.
139931         New module canonicalize-lgpl, proposed by Charles Wilson in
139932         <http://lists.gnu.org/r/bug-gnulib/2006-11/msg00020.html>
139933         with a few small changes afterwards.
139934         * MODULES.html.sh (File system functions): New module
139935         canonicalize-lgpl.
139936         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
139937         and canonicalize_file_name.
139938         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
139939         * modules/canonicalize-lgpl: New files.
139941 2006-11-05  Bruno Haible  <bruno@clisp.org>
139943         * gnulib-tool (func_import, func_create_testdir): Create directories
139944         also for files in subdirectories of lib/.
139946 2006-11-05  Bruno Haible  <bruno@clisp.org>
139948         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
139949         ANSI C compliant.
139951 2006-11-03  Bruno Haible  <bruno@clisp.org>
139953         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
139954         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
139955         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
139956         (xnboundedmalloc): New inline function.
139957         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
139958         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
139959         xmalloc.
139960         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
139961         xmalloc.
139962         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
139963         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
139964         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
139965         xmalloc.
139966         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
139967         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
139968         xmalloc.
139969         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
139970         gl_tree_add_after): Use XMALLOC instead of xmalloc.
139971         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
139972         xmalloc.
139973         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
139974         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
139975         gl_tree_add_after): Use XMALLOC instead of xmalloc.
139976         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
139977         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
139978         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
139979         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
139981 2006-11-03  Bruno Haible  <bruno@clisp.org>
139983         * lib/c-ctype.h [C++]: Define functions without name mangling.
139984         * lib/fwriteerror.h [C++]: Likewise.
139985         * lib/gcd.h [C++]: Likewise.
139986         * lib/linebreak.h [C++]: Likewise.
139988 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
139990         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
139991         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
139992         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
139993         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
139994         Check for functions and headers just once.
139995         Check for declaration of canonicalize_file_name.
139996         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
139998 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
140000         * gnulib-tool (func_import): Fix typo in actioncmd.
140002 2006-11-02  Bruno Haible  <bruno@clisp.org>
140004         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
140005         newline sequence in the Makefile.am snippet as a space, like "make"
140006         does.
140007         Reported by Roger Persson <perrog@gmail.com>.
140009 2006-11-01  Bruno Haible  <bruno@clisp.org>
140011         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
140012         already declared in <string.h>.
140013         * lib/strcase.h (strncasecmp): Don't declare it if yes.
140015 2006-11-01  Bruno Haible  <bruno@clisp.org>
140017         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
140018         * lib/strcase.h: Include <string.h>.
140019         (strcasecmp): Define to rpl_strcasecmp here.
140021 2006-11-01  Bruno Haible  <bruno@clisp.org>
140023         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
140025 2006-11-01  Eric Blake  <ebb9@byu.net>
140027         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
140029         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
140031 2006-10-29  Bruno Haible  <bruno@clisp.org>
140033         Make it compile in C++ mode.
140034         * lib/full-write.c (full_rw): Add a cast.
140036 2006-11-01  Bruno Haible  <bruno@clisp.org>
140038         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
140039         be POSIX compliant.
140040         Reported by Roger Persson <perrog@gmail.com>.
140042 2006-11-01  Eric Blake  <ebb9@byu.net>
140044         * lib/getopt_.h: Fix comments.
140046 2006-10-31  Eric Blake  <ebb9@byu.net>
140048         * modules/tmpdir (Depends-on): Add sys_stat.
140049         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
140050         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
140051         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
140052         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
140053         tempname.
140055 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
140057         Avoid some C++ diagnostics reported by Bruno Haible.
140058         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
140059         xmalloc.
140060         (quotearg_alloc): Use xcharalloc rather than xmalloc.
140061         (struct slotvec): Move to top level.
140062         (quotearg_n_options): Rewrite to avoid xmalloc.
140063         * lib/xalloc.h (xcharalloc): New function.
140064         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
140065         [defined __cplusplus]: Add function template that provides result
140066         type propagation.  This part of the change is from Bruno Haible.
140068 2006-10-29  Bruno Haible  <bruno@clisp.org>
140070         Make it compile in C++ mode.
140071         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
140072         * lib/strnlen1.c (strnlen1): Cast memchr result.
140073         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
140074         * lib/clean-temp.c (string_equals, string_hash): Add casts.
140075         (create_temp_dir): Rename local variable 'template'.
140076         (compile_csharp_using_sscli): Add cast.
140077         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
140078         * lib/findprog.c (find_in_path): Likewise.
140079         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
140080         * lib/wait-process.c (register_slave_subprocess): Likewise.
140082 2006-10-22  Bruno Haible  <bruno@clisp.org>
140084         * modules/tsearch: New file.
140085         * lib/tsearch.h: New file.
140086         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
140087         * m4/tsearch.m4: New file.
140088         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
140090 2006-10-29  Eric Blake  <ebb9@byu.net>
140092         * lib/arcfour.c: Assume config.h.
140093         * lib/arctwo.c: Likewise.
140094         * lib/base64.c: Likewise.
140095         * lib/check-version.c: Likewise.
140096         * lib/crc.c: Likewise.
140097         * lib/des.c: Likewise.
140098         * lib/gc-gnulib.c: Likewise.
140099         * lib/gc-libgcrypt.c: Likewise.
140100         * lib/gc-pbkdf2-sha1.c: Likewise.
140101         * lib/getaddrinfo.c: Likewise.
140102         * lib/getdelim.c: Likewise.
140103         * lib/getline.c: Likewise.
140104         * lib/hmac-md5.c: Likewise.
140105         * lib/hmac-sha1.c: Likewise.
140106         * lib/iconvme.c: Likewise.
140107         * lib/md2.c: Likewise.
140108         * lib/md4.c: Likewise.
140109         * lib/memxor.c: Likewise.
140110         * lib/read-file.c: Likewise.
140111         * lib/readline.c: Likewise.
140112         * lib/rijndael-alg-fst.c: Likewise.
140113         * lib/rijndael-api-fst.c: Likewise.
140114         * lib/xgetdomainname.c: Likewise.
140116 2006-10-28  Eric Blake  <ebb9@byu.net>
140118         * lib/xstrndup.c: Assume config.h.
140120 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
140122         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
140123         stat-macros.h is now for our own macros, whereas stat_h is for
140124         macros in the <sys/stat.h> name space.
140125         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
140126         (STAT_MACROS_H): Remove.
140127         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
140128         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
140129         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
140130         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
140131         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
140132         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
140133         Move these macros to ...
140134         * lib/stat_.h: here.  Don't include stat-macros.h.
140135         * lib/canonicalize.c: Don't include stat-macros.h.
140136         * lib/chown.c: Likewise.
140137         * lib/euidaccess.c: Likewise.
140138         * lib/file-type.c: Likewise.
140139         * lib/filemode.c: Likewise.
140140         * lib/glob.c: Likewise.
140141         * lib/isapipe.c: Likewise.
140142         * lib/lchown.c: Likewise.
140143         * lib/lstat.c: Likewise.
140144         * lib/mkdir-p.c: Likewise.
140145         * lib/rmdir.c: Likewise.
140146         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
140147         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
140148         unless mkdir isn't declared, to speed up 'configure'.
140149         Always create sys/stat.h, since it's unlikely any real sys/stat.h
140150         would define all the S_* symbols.
140151         * modules/canonicalize (Depends-on):
140152         Depend on sys_stat, not stat-macros.
140153         * modules/chown: Likewise.
140154         * modules/euidaccess: Likewise.
140155         * modules/filemode: Likewise.
140156         * modules/file-type: Likewise.
140157         * modules/glob: Likewise.
140158         * modules/isapipe: Likewise.
140159         * modules/lchown: Likewise.
140160         * modules/lstat: Likewise.
140161         * modules/mkancesdirs: Likewise.
140162         * modules/rmdir: Likewise.
140163         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
140164         * modules/modechange: Likewise.
140165         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
140166         (configure.ac): Remove gl_STAT_MACROS.
140167         * modules/sys_stat (Depends-on): Remove stat-macros.
140169 2006-10-27  Bruno Haible  <bruno@clisp.org>
140171         * m4/signed.m4: Remove file.
140172         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
140173         invocation.
140174         * modules/vasnprintf (Files): Remove m4/signed.m4.
140176 2006-10-27  Bruno Haible  <bruno@clisp.org>
140178         Update to GNU gettext 0.16.
140179         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
140180         m4/inttypes-h.m4, m4/signed.m4.
140181         * m4/gettext.m4: Update to GNU gettext 0.16.
140182         * m4/intl.m4: New file, from GNU gettext.
140183         * m4/intldir.m4: New file, from GNU gettext.
140184         * config/srclist.txt: Update
140186 2006-10-27  Eric Blake  <ebb9@byu.net>
140188         * MODULES.html.sh: Document tempname.
140189         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
140190         dependencies.
140191         (Files): Move lib/tempname.c...
140192         * modules/tempname: ...to this new module.
140193         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
140194         (gl_PREREQ_TEMPNAME): Move...
140195         * m4/tempname.m4: ...to this new file.
140196         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
140197         * modules/sys_stat (Depends-on): Add stat-macros.
140198         * lib/stat_.h (includes): Pick up stat macros.
140199         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
140200         if stat macros are broken.
140201         * lib/tempname.c (includes): No need to include "stat-macros.h".
140202         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
140203         (direxists, __path_search) [!_LIBC]: Don't compile these in
140204         gnulib; the tmpdir module covers that.
140205         * lib/tempname.h: New file.
140207 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
140209         * COPYING: Explain how gnulib-tool converts licence headers.
140210         Almost all wording by Eric Blake.
140212 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
140214         * lib/mbchar.h (is_basic_table): Make read-only.
140215         * lib/mbchar.c (is_basic_table): Likewise.
140216         Reported by John Darrington.
140218 2006-10-25  Bruno Haible  <bruno@clisp.org>
140220         * lib/progname.h (set_program_name): Undefine before defining.
140222 2006-10-25  Bruno Haible  <bruno@clisp.org>
140224         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
140225         false for non-gcc C++ compilers.
140226         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
140228 2006-10-24  Bruno Haible  <bruno@clisp.org>
140230         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
140231         iconv implementations like Irix iconv.
140233 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
140235         * modules/vararrays: New file.
140236         * m4/vararrays.m4: New file, taken from diffutils.
140237         * MODULES.html.sh: New module vararrays.
140239 2006-10-24  Karl Berry  <karl@gnu.org>
140241         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
140242         Don't call GNU Unix.
140244 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
140246         * users.txt: Add Libtool.
140248         Sync from Libtool:
140250         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
140252         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
140253         to gnulib's policy of including config.h unconditionally.
140255 2006-10-24  Bruno Haible  <bruno@clisp.org>
140257         * modules/wcwidth (Files): Add m4/wint_t.m4.
140258         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
140259         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
140261 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
140263         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
140264         to pacify GCC with some -W flags enabled.  Problem reported by
140265         Bruno Haible.
140267 2006-10-24  Jim Meyering  <jim@meyering.net>
140269         * MODULES.html.sh: Remove uinttostr.  It's not a module.
140270         Reported by Karl Berry.
140272 2006-10-23  Bruno Haible  <bruno@clisp.org>
140274         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
140276 2006-10-24  Bruno Haible  <bruno@clisp.org>
140278         * lib/gl_list.h: Use C comment style, not C++ comment style.
140280 2006-10-23  Eric Blake  <ebb9@byu.net>
140282         * lib/getaddrinfo.c (includes): Add missing include.
140284 2006-10-23  Bruno Haible  <bruno@clisp.org>
140285             Paul Eggert  <eggert@cs.ucla.edu>
140287         Ability to rename obstack_free.
140288         * lib/obstack.h (__obstack_free): New macro. Declare instead of
140289         obstack_free.
140290         (obstack_free): Invoke the __obstack_free macro.
140291         * lib/obstack.c (obstack_free): Use __obstack_free macro.
140293 2006-10-23  Bruno Haible  <bruno@clisp.org>
140294             Paul Eggert  <eggert@cs.ucla.edu>
140296         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
140297         __argc, __argv from the declaration. (They are defined as macros on
140298         mingw.)
140300 2006-10-22  Bruno Haible  <bruno@clisp.org>
140302         * doc/gnulib-intro.texi: New file.
140303         * doc/gnulib.texi: Include it.
140305 2006-10-21  Bruno Haible  <bruno@clisp.org>
140307         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
140308         "Introduction", "Miscellanous Notes", "Particular Modules".
140310 2006-10-21  Bruno Haible  <bruno@clisp.org>
140312         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
140313         Change mostlyclean-local rule to avoid sh syntax error from bash
140314         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
140316 2006-10-23  Jim Meyering  <jim@meyering.net>
140318         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
140319         in place of snprintf.
140321         * modules/inttostr (Files): Add lib/uinttostr.c.
140322         * lib/uinttostr.c (inttostr): New file/function.
140323         * lib/inttostr.h (uinttostr): Declare.
140324         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
140325         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
140326         Add uinttostr.
140327         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
140329 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
140331         * lib/canonicalize.c (ELOOP): Define if not already defined.
140332         Problem reported by Bruno Haible in
140333         <http://lists.gnu.org/r/bug-gnulib/2006-10/msg00282.html>.
140335 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
140337         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
140338         Problem reported by Perry Smith and Ville Laurikari.
140340         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
140341         uses.
140343 2006-10-19  Bruno Haible  <bruno@clisp.org>
140345         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
140346         for mingw.
140348 2006-10-19  Bruno Haible  <bruno@clisp.org>
140350         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
140351         Needed for mingw.
140353 2006-10-19  Bruno Haible  <bruno@clisp.org>
140355         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
140357 2006-10-19  Bruno Haible  <bruno@clisp.org>
140359         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
140360         it.
140362 2006-10-19  Bruno Haible  <bruno@clisp.org>
140364         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
140365         invocation.
140367 2006-10-19  Bruno Haible  <bruno@clisp.org>
140369         * gnulib-tool (func_create_testdir): Don't include ftruncate and
140370         mountlist by default.
140372 2006-10-16  Bruno Haible  <bruno@clisp.org>
140374         * lib/c-strstr.c: Include c-strstr.h.
140376 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
140378         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
140379         in a slash.
140381 2006-10-18  Bruno Haible  <bruno@clisp.org>
140383         * lib/lock.h [C++]: Wrap definitions in extern "C".
140385 2006-10-18  Bruno Haible  <bruno@clisp.org>
140387         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
140388         gl_LIBOBJS list.
140390 2006-10-18  Bruno Haible  <bruno@clisp.org>
140392         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
140394 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
140396         * lib/xstrtol.h: Include gettext.h.
140397         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
140398         Problem reported by Eric Blake.
140399         * modules/xstrtol (Depends-on): Add gettext-h.
140401 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
140403         * lib/strftime.c (advance): New macro.
140404         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
140405         incomplete type, so you can't add 0 to it.  Problem and patch
140406         reported by Eelco Dolstra for dietlibc.
140408 2006-10-18  Jim Meyering  <jim@meyering.net>
140410         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
140411         type for a local, and rename it: s/up/user_proc/.
140413 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
140415         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
140416         READ_UTMP_USER_PROCESS.
140417         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
140419 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
140421         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
140422         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
140424 2006-10-17  Eric Blake  <ebb9@byu.net>
140426         * lib/sigprocmask.c (sigprocmask): Fix typo.
140428         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
140430         * modules/clean-temp (Makefile.am): Don't add to make output...
140431         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
140432         config.h.
140434 2006-10-17  Bruno Haible  <bruno@clisp.org>
140436         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
140437         differently if DEFAULT_TEXT_DOMAIN is set.
140439 2006-10-16  Bruno Haible  <bruno@clisp.org>
140441         * lib/clean-temp.c: Include fwriteerror.h.
140443 2006-10-16  Bruno Haible  <bruno@clisp.org>
140445         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
140447 2006-10-16  Bruno Haible  <bruno@clisp.org>
140449         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
140450         * lib/sigprocmask.h: Include <sys/types.h>.
140451         (sigset_t): Use the system's definition if present.
140453 2006-10-17  Eric Blake  <ebb9@byu.net>
140455         * lib/xvasprintf.c (includes): Assume config.h.
140456         * lib/xasprintf.c (includes): Likewise.
140458 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
140460         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
140461         at least as wide as intmax_t.
140463 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
140465         (Imported from Automake.)
140466         * build-aux/gnupload: Update to version 1.1 of directive file.
140468 2006-10-16  Eric Blake  <ebb9@byu.net>
140470         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
140471         match Automake 1.10a.
140473 2006-10-14  Bruno Haible  <bruno@clisp.org>
140475         * modules/sigprocmask: New file.
140476         * lib/sigprocmask.h: New file.
140477         * lib/sigprocmask.c: New file.
140478         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
140479         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
140480         request sigprocmask.o.
140481         (gl_PREREQ_SIGPROCMASK): New macro.
140482         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
140483         (Depends-on): Add sigprocmask.
140484         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
140485         gt_SIGNALBLOCKING. Test for 'raise' only once.
140486         * lib/fatal-signal.c: Include sigprocmask.h.
140487         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
140488         unblock_fatal_signals): Define always.
140489         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
140490         sigprocmask.
140492 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
140494         Sync from Automake.
140495         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
140496         which incorrectly sets the mode of an existing destination
140497         directory.  In some cases the unpatched install-sh could do the
140498         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
140499         system.  We hope this is rare in practice, but it's clearly worth
140500         fixing.  Problem reported by Alex Unleashed in
140501         <http://lists.gnu.org/r/bug-autoconf/2006-10/msg00012.html>.
140502         Also, don't bother to check for -m bugs unless we're using -m;
140503         suggested by Stepan Kasal.
140505 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
140507         Sync from Automake.
140508         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
140509         `-c' flag, so they appear at the same position as in %FASTDEP%
140510         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
140511         which ignores unknown options only after the first non-option.
140512         Bug report against M4 by Nelson H. F. Beebe.
140514 2006-10-13  Jim Meyering  <jim@meyering.net>
140516         Fix a bug in yesterday's change.
140517         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
140518         p->fts_statp->st_dev would be used uninitialized.
140519         Ensures that we always call fts_stat on the very first entry.
140520         Miklos Szeredi reported that find -xdev stopped working.
140522 2006-10-12  Bruno Haible  <bruno@clisp.org>
140524         * gnulib-tool (func_get_automake_snippet): Append an automatically
140525         computed EXTRA_DIST augmentation.
140526         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
140527         * modules/alloca-opt (Makefile.am): Likewise.
140528         * modules/allocsa (Makefile.am): Likewise.
140529         * modules/arcfour (Makefile.am): Likewise.
140530         * modules/arctwo (Makefile.am): Likewise.
140531         * modules/argmatch (Makefile.am): Likewise.
140532         * modules/argz (Makefile.am): Likewise.
140533         * modules/atexit (Makefile.am): Likewise.
140534         * modules/backupfile (Makefile.am): Likewise.
140535         * modules/byteswap (Makefile.am): Likewise.
140536         * modules/c-strtod (Makefile.am): Likewise.
140537         * modules/c-strtold (Makefile.am): Likewise.
140538         * modules/calloc (Makefile.am): Likewise.
140539         * modules/canon-host (Makefile.am): Likewise.
140540         * modules/canonicalize (Makefile.am): Likewise.
140541         * modules/chdir-long (Makefile.am): Likewise.
140542         * modules/chdir-safer (Makefile.am): Likewise.
140543         * modules/check-version (Makefile.am): Likewise.
140544         * modules/chown (Makefile.am): Likewise.
140545         * modules/cloexec (Makefile.am): Likewise.
140546         * modules/close-stream (Makefile.am): Likewise.
140547         * modules/closeout (Makefile.am): Likewise.
140548         * modules/crc (Makefile.am): Likewise.
140549         * modules/csharpexec (Makefile.am): Likewise.
140550         * modules/cycle-check (Makefile.am): Likewise.
140551         * modules/des (Makefile.am): Likewise.
140552         * modules/dev-ino (Makefile.am): Likewise.
140553         * modules/dirfd (Makefile.am): Likewise.
140554         * modules/dirname (Makefile.am): Likewise.
140555         * modules/dup2 (Makefile.am): Likewise.
140556         * modules/eealloc (Makefile.am): Likewise.
140557         * modules/error (Makefile.am): Likewise.
140558         * modules/euidaccess (Makefile.am): Likewise.
140559         * modules/exclude (Makefile.am): Likewise.
140560         * modules/exitfail (Makefile.am): Likewise.
140561         * modules/fcntl-safer (Makefile.am): Likewise.
140562         * modules/fcntl (Makefile.am): Likewise.
140563         * modules/file-type (Makefile.am): Likewise.
140564         * modules/fileblocks (Makefile.am): Likewise.
140565         * modules/filemode (Makefile.am): Likewise.
140566         * modules/filenamecat (Makefile.am): Likewise.
140567         * modules/fnmatch (Makefile.am): Likewise.
140568         * modules/fopen-safer (Makefile.am): Likewise.
140569         * modules/fpending (Makefile.am): Likewise.
140570         * modules/fprintftime (Makefile.am): Likewise.
140571         * modules/free (Makefile.am): Likewise.
140572         * modules/fsusage (Makefile.am): Likewise.
140573         * modules/ftruncate (Makefile.am): Likewise.
140574         * modules/fts (Makefile.am): Likewise.
140575         * modules/gc-arcfour (Makefile.am): Likewise.
140576         * modules/gc-des (Makefile.am): Likewise.
140577         * modules/gc-hmac-md5 (Makefile.am): Likewise.
140578         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
140579         * modules/gc-md4 (Makefile.am): Likewise.
140580         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
140581         * modules/gc-sha1 (Makefile.am): Likewise.
140582         * modules/gc (Makefile.am): Likewise.
140583         * modules/getaddrinfo (Makefile.am): Likewise.
140584         * modules/getcwd (Makefile.am): Likewise.
140585         * modules/getdelim (Makefile.am): Likewise.
140586         * modules/getdomainname (Makefile.am): Likewise.
140587         * modules/getgroups (Makefile.am): Likewise.
140588         * modules/gethostname (Makefile.am): Likewise.
140589         * modules/gethrxtime (Makefile.am): Likewise.
140590         * modules/getline (Makefile.am): Likewise.
140591         * modules/getloadavg (Makefile.am): Likewise.
140592         * modules/getlogin_r (Makefile.am): Likewise.
140593         * modules/getndelim2 (Makefile.am): Likewise.
140594         * modules/getopt (Makefile.am): Likewise.
140595         * modules/getpagesize (Makefile.am): Likewise.
140596         * modules/getpass-gnu (Makefile.am): Likewise.
140597         * modules/getpass (Makefile.am): Likewise.
140598         * modules/getsubopt (Makefile.am): Likewise.
140599         * modules/gettime (Makefile.am): Likewise.
140600         * modules/gettimeofday (Makefile.am): Likewise.
140601         * modules/getugroups (Makefile.am): Likewise.
140602         * modules/getusershell (Makefile.am): Likewise.
140603         * modules/glob (Makefile.am): Likewise.
140604         * modules/group-member (Makefile.am): Likewise.
140605         * modules/hard-locale (Makefile.am): Likewise.
140606         * modules/hash (Makefile.am): Likewise.
140607         * modules/hmac-md5 (Makefile.am): Likewise.
140608         * modules/hmac-sha1 (Makefile.am): Likewise.
140609         * modules/human (Makefile.am): Likewise.
140610         * modules/idcache (Makefile.am): Likewise.
140611         * modules/imaxabs (Makefile.am): Likewise.
140612         * modules/imaxdiv (Makefile.am): Likewise.
140613         * modules/inet_ntop (Makefile.am): Likewise.
140614         * modules/inet_pton (Makefile.am): Likewise.
140615         * modules/intprops (Makefile.am): Likewise.
140616         * modules/inttostr (Makefile.am): Likewise.
140617         * modules/inttypes (Makefile.am): Likewise.
140618         * modules/isapipe (Makefile.am): Likewise.
140619         * modules/javaversion (Makefile.am): Likewise.
140620         * modules/lchmod (Makefile.am): Likewise.
140621         * modules/lchown (Makefile.am): Likewise.
140622         * modules/localcharset (Makefile.am): Likewise.
140623         * modules/long-options (Makefile.am): Likewise.
140624         * modules/lstat (Makefile.am): Likewise.
140625         * modules/malloc (Makefile.am): Likewise.
140626         * modules/mathl (Makefile.am): Likewise.
140627         * modules/mbchar (Makefile.am): Likewise.
140628         * modules/md2 (Makefile.am): Likewise.
140629         * modules/md4 (Makefile.am): Likewise.
140630         * modules/md5 (Makefile.am): Likewise.
140631         * modules/memcasecmp (Makefile.am): Likewise.
140632         * modules/memchr (Makefile.am): Likewise.
140633         * modules/memcmp (Makefile.am): Likewise.
140634         * modules/memcoll (Makefile.am): Likewise.
140635         * modules/memcpy (Makefile.am): Likewise.
140636         * modules/memmem (Makefile.am): Likewise.
140637         * modules/memmove (Makefile.am): Likewise.
140638         * modules/mempcpy (Makefile.am): Likewise.
140639         * modules/memrchr (Makefile.am): Likewise.
140640         * modules/memset (Makefile.am): Likewise.
140641         * modules/memxor (Makefile.am): Likewise.
140642         * modules/mkancesdirs (Makefile.am): Likewise.
140643         * modules/mkdir-p (Makefile.am): Likewise.
140644         * modules/mkdir (Makefile.am): Likewise.
140645         * modules/mkdtemp (Makefile.am): Likewise.
140646         * modules/mkstemp (Makefile.am): Likewise.
140647         * modules/mktime (Makefile.am): Likewise.
140648         * modules/modechange (Makefile.am): Likewise.
140649         * modules/mountlist (Makefile.am): Likewise.
140650         * modules/nanosleep (Makefile.am): Likewise.
140651         * modules/obstack (Makefile.am): Likewise.
140652         * modules/openat (Makefile.am): Likewise.
140653         * modules/pagealign_alloc (Makefile.am): Likewise.
140654         * modules/pathmax (Makefile.am): Likewise.
140655         * modules/physmem (Makefile.am): Likewise.
140656         * modules/poll (Makefile.am): Likewise.
140657         * modules/posixtm (Makefile.am): Likewise.
140658         * modules/posixver (Makefile.am): Likewise.
140659         * modules/putenv (Makefile.am): Likewise.
140660         * modules/quote (Makefile.am): Likewise.
140661         * modules/quotearg (Makefile.am): Likewise.
140662         * modules/raise (Makefile.am): Likewise.
140663         * modules/read-file (Makefile.am): Likewise.
140664         * modules/readline (Makefile.am): Likewise.
140665         * modules/readlink (Makefile.am): Likewise.
140666         * modules/readtokens (Makefile.am): Likewise.
140667         * modules/readutmp (Makefile.am): Likewise.
140668         * modules/realloc (Makefile.am): Likewise.
140669         * modules/regex (Makefile.am): Likewise.
140670         * modules/rename-dest-slash (Makefile.am): Likewise.
140671         * modules/rename (Makefile.am): Likewise.
140672         * modules/rijndael (Makefile.am): Likewise.
140673         * modules/rmdir (Makefile.am): Likewise.
140674         * modules/rpmatch (Makefile.am): Likewise.
140675         * modules/safe-read (Makefile.am): Likewise.
140676         * modules/safe-write (Makefile.am): Likewise.
140677         * modules/same-inode (Makefile.am): Likewise.
140678         * modules/same (Makefile.am): Likewise.
140679         * modules/save-cwd (Makefile.am): Likewise.
140680         * modules/savedir (Makefile.am): Likewise.
140681         * modules/setenv (Makefile.am): Likewise.
140682         * modules/settime (Makefile.am): Likewise.
140683         * modules/sha1 (Makefile.am): Likewise.
140684         * modules/sig2str (Makefile.am): Likewise.
140685         * modules/snprintf (Makefile.am): Likewise.
140686         * modules/stat-macros (Makefile.am): Likewise.
140687         * modules/stat-time (Makefile.am): Likewise.
140688         * modules/stdbool (Makefile.am): Likewise.
140689         * modules/stdint (Makefile.am): Likewise.
140690         * modules/stdlib-safer (Makefile.am): Likewise.
140691         * modules/stpcpy (Makefile.am): Likewise.
140692         * modules/stpncpy (Makefile.am): Likewise.
140693         * modules/strcase (Makefile.am): Likewise.
140694         * modules/strcasestr (Makefile.am): Likewise.
140695         * modules/strchrnul (Makefile.am): Likewise.
140696         * modules/strcspn (Makefile.am): Likewise.
140697         * modules/strdup (Makefile.am): Likewise.
140698         * modules/strerror (Makefile.am): Likewise.
140699         * modules/strftime (Makefile.am): Likewise.
140700         * modules/strndup (Makefile.am): Likewise.
140701         * modules/strnlen (Makefile.am): Likewise.
140702         * modules/strpbrk (Makefile.am): Likewise.
140703         * modules/strsep (Makefile.am): Likewise.
140704         * modules/strstr (Makefile.am): Likewise.
140705         * modules/strtod (Makefile.am): Likewise.
140706         * modules/strtoimax (Makefile.am): Likewise.
140707         * modules/strtok_r (Makefile.am): Likewise.
140708         * modules/strtol (Makefile.am): Likewise.
140709         * modules/strtoll (Makefile.am): Likewise.
140710         * modules/strtoul (Makefile.am): Likewise.
140711         * modules/strtoull (Makefile.am): Likewise.
140712         * modules/strtoumax (Makefile.am): Likewise.
140713         * modules/strverscmp (Makefile.am): Likewise.
140714         * modules/sys_socket (Makefile.am): Likewise.
140715         * modules/sys_stat (Makefile.am): Likewise.
140716         * modules/sysexits (Makefile.am): Likewise.
140717         * modules/time_r (Makefile.am): Likewise.
140718         * modules/timegm (Makefile.am): Likewise.
140719         * modules/timespec (Makefile.am): Likewise.
140720         * modules/tmpfile-safer (Makefile.am): Likewise.
140721         * modules/trim (Makefile.am): Likewise.
140722         * modules/unistd-safer (Makefile.am): Likewise.
140723         * modules/unlinkdir (Makefile.am): Likewise.
140724         * modules/unlocked-io (Makefile.am): Likewise.
140725         * modules/userspec (Makefile.am): Likewise.
140726         * modules/utime (Makefile.am): Likewise.
140727         * modules/utimecmp (Makefile.am): Likewise.
140728         * modules/utimens (Makefile.am): Likewise.
140729         * modules/vasnprintf (Makefile.am): Likewise.
140730         * modules/vasprintf (Makefile.am): Likewise.
140731         * modules/vsnprintf (Makefile.am): Likewise.
140732         * modules/xalloc (Makefile.am): Likewise.
140733         * modules/xgetcwd (Makefile.am): Likewise.
140734         * modules/xnanosleep (Makefile.am): Likewise.
140735         * modules/xreadlink (Makefile.am): Likewise.
140736         * modules/xstrtod (Makefile.am): Likewise.
140737         * modules/xstrtol (Makefile.am): Likewise.
140738         * modules/xstrtold (Makefile.am): Likewise.
140739         * modules/yesno (Makefile.am): Likewise.
140740         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
140742 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
140744         * modules/error (Makefile.am): Distribute files through
140745         EXTRA_DIST, not lib_SOURCES.
140747 2006-10-12  Eric Blake  <ebb9@byu.net>
140749         * modules/error (Makefile.am): Distribute files in /lib.
140750         * modules/obstack (Makefile.am): Likewise.
140752 2006-10-12  Bruno Haible  <bruno@clisp.org>
140754         * modules/acl (Makefile.am): Distribute all files in lib/ through
140755         EXTRA_DIST.
140756         * modules/arcfour (Makefile.am): Likewise.
140757         * modules/arctwo (Makefile.am): Likewise.
140758         * modules/argmatch (Makefile.am): Likewise.
140759         * modules/argz (Makefile.am): Likewise.
140760         * modules/atexit (Makefile.am): Likewise.
140761         * modules/backupfile (Makefile.am): Likewise.
140762         * modules/c-strtod (Makefile.am): Likewise.
140763         * modules/c-strtold (Makefile.am): Likewise.
140764         * modules/calloc (Makefile.am): Likewise.
140765         * modules/canon-host (Makefile.am): Likewise.
140766         * modules/canonicalize (Makefile.am): Likewise.
140767         * modules/chdir-long (Makefile.am): Likewise.
140768         * modules/chdir-safer (Makefile.am): Likewise.
140769         * modules/check-version (Makefile.am): Likewise.
140770         * modules/chown (Makefile.am): Likewise.
140771         * modules/cloexec (Makefile.am): Likewise.
140772         * modules/close-stream (Makefile.am): Likewise.
140773         * modules/closeout (Makefile.am): Likewise.
140774         * modules/crc (Makefile.am): Likewise.
140775         * modules/cycle-check (Makefile.am): Likewise.
140776         * modules/des (Makefile.am): Likewise.
140777         * modules/dirfd (Makefile.am): Likewise.
140778         * modules/dirname (Makefile.am): Likewise.
140779         * modules/dup2 (Makefile.am): Likewise.
140780         * modules/euidaccess (Makefile.am): Likewise.
140781         * modules/exclude (Makefile.am): Likewise.
140782         * modules/exitfail (Makefile.am): Likewise.
140783         * modules/fcntl-safer (Makefile.am): Likewise.
140784         * modules/file-type (Makefile.am): Likewise.
140785         * modules/fileblocks (Makefile.am): Likewise.
140786         * modules/filemode (Makefile.am): Likewise.
140787         * modules/filenamecat (Makefile.am): Likewise.
140788         * modules/fnmatch (Makefile.am): Likewise.
140789         * modules/fopen-safer (Makefile.am): Likewise.
140790         * modules/fpending (Makefile.am): Likewise.
140791         * modules/fprintftime (Makefile.am): Likewise.
140792         * modules/free (Makefile.am): Likewise.
140793         * modules/fsusage (Makefile.am): Likewise.
140794         * modules/ftruncate (Makefile.am): Likewise.
140795         * modules/fts (Makefile.am): Likewise.
140796         * modules/gc (Makefile.am): Likewise.
140797         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
140798         * modules/getaddrinfo (Makefile.am): Likewise.
140799         * modules/getcwd (Makefile.am): Likewise.
140800         * modules/getdelim (Makefile.am): Likewise.
140801         * modules/getdomainname (Makefile.am): Likewise.
140802         * modules/getgroups (Makefile.am): Likewise.
140803         * modules/gethostname (Makefile.am): Likewise.
140804         * modules/gethrxtime (Makefile.am): Likewise.
140805         * modules/getline (Makefile.am): Likewise.
140806         * modules/getloadavg (Makefile.am): Likewise.
140807         * modules/getlogin_r (Makefile.am): Likewise.
140808         * modules/getopt (Makefile.am): Likewise.
140809         * modules/getpass (Makefile.am): Likewise.
140810         * modules/getpass-gnu (Makefile.am): Likewise.
140811         * modules/getsubopt (Makefile.am): Likewise.
140812         * modules/gettime (Makefile.am): Likewise.
140813         * modules/gettimeofday (Makefile.am): Likewise.
140814         * modules/getugroups (Makefile.am): Likewise.
140815         * modules/getusershell (Makefile.am): Likewise.
140816         * modules/glob (Makefile.am): Likewise.
140817         * modules/group-member (Makefile.am): Likewise.
140818         * modules/hard-locale (Makefile.am): Likewise.
140819         * modules/hash (Makefile.am): Likewise.
140820         * modules/hmac-md5 (Makefile.am): Likewise.
140821         * modules/hmac-sha1 (Makefile.am): Likewise.
140822         * modules/human (Makefile.am): Likewise.
140823         * modules/idcache (Makefile.am): Likewise.
140824         * modules/imaxabs (Makefile.am): Likewise.
140825         * modules/imaxdiv (Makefile.am): Likewise.
140826         * modules/inet_ntop (Makefile.am): Likewise.
140827         * modules/inet_pton (Makefile.am): Likewise.
140828         * modules/inttostr (Makefile.am): Likewise.
140829         * modules/isapipe (Makefile.am): Likewise.
140830         * modules/lchown (Makefile.am): Likewise.
140831         * modules/long-options (Makefile.am): Likewise.
140832         * modules/lstat (Makefile.am): Likewise.
140833         * modules/malloc (Makefile.am): Likewise.
140834         * modules/mathl (Makefile.am): Likewise.
140835         * modules/mbchar (Makefile.am): Likewise.
140836         * modules/md2 (Makefile.am): Likewise.
140837         * modules/md4 (Makefile.am): Likewise.
140838         * modules/md5 (Makefile.am): Likewise.
140839         * modules/memcasecmp (Makefile.am): Likewise.
140840         * modules/memchr (Makefile.am): Likewise.
140841         * modules/memcmp (Makefile.am): Likewise.
140842         * modules/memcoll (Makefile.am): Likewise.
140843         * modules/memcpy (Makefile.am): Likewise.
140844         * modules/memmem (Makefile.am): Likewise.
140845         * modules/memmove (Makefile.am): Likewise.
140846         * modules/mempcpy (Makefile.am): Likewise.
140847         * modules/memrchr (Makefile.am): Likewise.
140848         * modules/memset (Makefile.am): Likewise.
140849         * modules/memxor (Makefile.am): Likewise.
140850         * modules/mkancesdirs (Makefile.am): Likewise.
140851         * modules/mkdir (Makefile.am): Likewise.
140852         * modules/mkdir-p (Makefile.am): Likewise.
140853         * modules/mkdtemp (Makefile.am): Likewise.
140854         * modules/mkstemp (Makefile.am): Likewise.
140855         * modules/mktime (Makefile.am): Likewise.
140856         * modules/modechange (Makefile.am): Likewise.
140857         * modules/mountlist (Makefile.am): Likewise.
140858         * modules/nanosleep (Makefile.am): Likewise.
140859         * modules/openat (Makefile.am): Likewise.
140860         * modules/pagealign_alloc (Makefile.am): Likewise.
140861         * modules/physmem (Makefile.am): Likewise.
140862         * modules/poll (Makefile.am): Likewise.
140863         * modules/posixtm (Makefile.am): Likewise.
140864         * modules/posixver (Makefile.am): Likewise.
140865         * modules/putenv (Makefile.am): Likewise.
140866         * modules/quote (Makefile.am): Likewise.
140867         * modules/quotearg (Makefile.am): Likewise.
140868         * modules/raise (Makefile.am): Likewise.
140869         * modules/read-file (Makefile.am): Likewise.
140870         * modules/readline (Makefile.am): Likewise.
140871         * modules/readlink (Makefile.am): Likewise.
140872         * modules/readtokens (Makefile.am): Likewise.
140873         * modules/readutmp (Makefile.am): Likewise.
140874         * modules/realloc (Makefile.am): Likewise.
140875         * modules/regex (Makefile.am): Likewise.
140876         * modules/rename (Makefile.am): Likewise.
140877         * modules/rename-dest-slash (Makefile.am): Likewise.
140878         * modules/rijndael (Makefile.am): Likewise.
140879         * modules/rmdir (Makefile.am): Likewise.
140880         * modules/rpmatch (Makefile.am): Likewise.
140881         * modules/safe-read (Makefile.am): Likewise.
140882         * modules/safe-write (Makefile.am): Likewise.
140883         * modules/same (Makefile.am): Likewise.
140884         * modules/save-cwd (Makefile.am): Likewise.
140885         * modules/savedir (Makefile.am): Likewise.
140886         * modules/setenv (Makefile.am): Likewise.
140887         * modules/settime (Makefile.am): Likewise.
140888         * modules/sha1 (Makefile.am): Likewise.
140889         * modules/sig2str (Makefile.am): Likewise.
140890         * modules/snprintf (Makefile.am): Likewise.
140891         * modules/stdlib-safer (Makefile.am): Likewise.
140892         * modules/stpcpy (Makefile.am): Likewise.
140893         * modules/stpncpy (Makefile.am): Likewise.
140894         * modules/strcase (Makefile.am): Likewise.
140895         * modules/strcasestr (Makefile.am): Likewise.
140896         * modules/strchrnul (Makefile.am): Likewise.
140897         * modules/strcspn (Makefile.am): Likewise.
140898         * modules/strdup (Makefile.am): Likewise.
140899         * modules/strerror (Makefile.am): Likewise.
140900         * modules/strftime (Makefile.am): Likewise.
140901         * modules/strndup (Makefile.am): Likewise.
140902         * modules/strnlen (Makefile.am): Likewise.
140903         * modules/strpbrk (Makefile.am): Likewise.
140904         * modules/strsep (Makefile.am): Likewise.
140905         * modules/strstr (Makefile.am): Likewise.
140906         * modules/strtod (Makefile.am): Likewise.
140907         * modules/strtoimax (Makefile.am): Likewise.
140908         * modules/strtok_r (Makefile.am): Likewise.
140909         * modules/strtol (Makefile.am): Likewise.
140910         * modules/strtoll (Makefile.am): Likewise.
140911         * modules/strtoul (Makefile.am): Likewise.
140912         * modules/strtoull (Makefile.am): Likewise.
140913         * modules/strtoumax (Makefile.am): Likewise.
140914         * modules/strverscmp (Makefile.am): Likewise.
140915         * modules/time_r (Makefile.am): Likewise.
140916         * modules/timegm (Makefile.am): Likewise.
140917         * modules/tmpfile-safer (Makefile.am): Likewise.
140918         * modules/unistd-safer (Makefile.am): Likewise.
140919         * modules/unlinkdir (Makefile.am): Likewise.
140920         * modules/userspec (Makefile.am): Likewise.
140921         * modules/utime (Makefile.am): Likewise.
140922         * modules/utimecmp (Makefile.am): Likewise.
140923         * modules/utimens (Makefile.am): Likewise.
140924         * modules/vasnprintf (Makefile.am): Likewise.
140925         * modules/vasprintf (Makefile.am): Likewise.
140926         * modules/vsnprintf (Makefile.am): Likewise.
140927         * modules/xalloc (Makefile.am): Likewise.
140928         * modules/xgetcwd (Makefile.am): Likewise.
140929         * modules/xnanosleep (Makefile.am): Likewise.
140930         * modules/xreadlink (Makefile.am): Likewise.
140931         * modules/xstrtod (Makefile.am): Likewise.
140932         * modules/xstrtol (Makefile.am): Likewise.
140933         * modules/xstrtold (Makefile.am): Likewise.
140934         * modules/yesno (Makefile.am): Likewise.
140936 2006-10-12  Jim Meyering  <jim@meyering.net>
140938         * m4/getloadavg.m4: Revert the change below.
140940         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
140941         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
140942         fail with a symlink, which is what coreutils' ./bootstrap now
140943         creates by default.
140945 2006-10-12  Bruno Haible  <bruno@clisp.org>
140947         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
140948         mingw.
140949         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
140950         MSVC and mingw explicitly.
140952 2006-10-11  Simon Josefsson  <jas@extundo.com>
140953             Bruno Haible  <bruno@clisp.org>
140955         Add support for multiple gnulib-tool invocations in the scope of a
140956         single configure.ac file.
140957         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
140958         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
140959         with the same contents as the _LIBADD variable.
140960         (func_emit_initmacro_start, func_emit_initmacro_end,
140961         func_emit_initmacro_done): New functions.
140962         (func_import, func_create_testdir): Invoke them. Allow the identifiers
140963         gl_LIBOBJS and gl_LTLIBOBJS.
140965 2006-10-11  Bruno Haible  <bruno@clisp.org>
140967         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
140968         (func_create_testdir): Don't create po/Makefile.am, don't invoke
140969         autoreconf. Instead, invoke autopoint explicitly but move back the
140970         *.m4 files from gnulib.
140972 2006-10-11  Bruno Haible  <bruno@clisp.org>
140974         * gnulib-tool (func_usage): Make module names after --create-testdir
140975         optional.
140976         (func_create_testdir): If no module was specified, use nearly all
140977         modules.
140979 2006-10-12  Jim Meyering  <jim@meyering.net>
140981         Big performance improvement for fts-based tools that use FTS_NOSTAT.
140982         Avoid spurious inode-mismatch problems on non-POSIX file systems.
140983         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
140984         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
140985         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
140986         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
140987         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
140988         (fts_set_stat_required): New function.
140989         (fts_open): Defer the calls to fts_stat, if possible or requested.
140990         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
140991         into fts_stat itself.
140992         (fts_read): Perform any required (deferred) fts_stat call.
140993         (fts_build): Likewise, for the directory we're about to open and read.
140994         In the readdir loop, carefully decide whether each entry will require
140995         an eventual call to fts_stat, using dirent.d_type info if available.
140996         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
140997         a command line argument into this function.  Update all callers.
140998         Map a return value of FTS_DOT to FTS_D for a command line argument.
140999         * modules/fts (Depends-on): Add d-type.  Alphabetize.
141000         Thanks to Miklos Szeredi for his tenacity and for the initial
141001         bug report about "find" failing on a FUSE-based file system.
141003         * lib/fts.c (fts_open): Use consistent indentation.
141005 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
141007         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
141008         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
141009         reported by Jim Meyering.  All uses of cache variables renamed
141010         to match Autoconf's.
141011         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
141012         the other one.
141014         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
141015         Fix misspelling in diagnostic.
141017 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
141019         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
141020         defined.  Problem reported by Matthew Woehlke.
141022         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
141023         Add support for Tandem NonStop R series.
141024         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
141025         Use new macro.
141027         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
141028         (has_trailing_slash): Omit size arg; all callers changed.
141029         Omit 'inline', since it doesn't help performance and we'd
141030         need to configure it.
141031         Don't count //, ///, etc. as having a trailing slash.
141032         As a side effect, this removes a C99ism reported by Matthew Woehlke.
141033         (rpl_rename_dest_slash): On failure, use rename's errno rather
141034         than (in some cases) an incorrect or junk errno.
141035         Simplify code by removing need to compute length; this does
141036         cause it to make two passes instead of one over the file name,
141037         but it's worth it.
141039         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
141040         change, since Autoconf's version may no longer be appropriate now
141041         that we are using CVS Autoconf's version.  Add support for Tandem.
141043 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
141044             Bruno Haible  <bruno@clisp.org>
141046         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
141047         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
141048         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
141049         gl_AC_TYPE_LONG_LONG.
141051         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
141052         instead of HAVE_LONG_LONG.
141053         * lib/printf-args.c (printf_fetchargs): Likewise.
141054         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
141055         * lib/vasnprintf.c (VASNPRINTF): Likewise.
141056         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
141057         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
141058         gl_AC_TYPE_LONG_LONG.
141060 2006-10-11  Bruno Haible  <bruno@clisp.org>
141062         * m4/longlong.m4: Add comments.
141063         * m4/ulonglong.m4: Likewise.
141065 2006-10-10  Bruno Haible  <bruno@clisp.org>
141067         Make it possible to #define stpcpy, strdup to aliases.
141068         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
141069         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
141071 2006-10-10  Bruno Haible  <bruno@clisp.org>
141073         Make it possible to #define gcd to an alias.
141074         * lib/gcd.c: Include config.h.
141076 2006-10-10  Bruno Haible  <bruno@clisp.org>
141078         Make it possible to #define c_isascii to an alias.
141079         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
141080         defined. Undefine the macros before defining them, to avoid gcc
141081         warnings.
141082         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
141083         define NO_C_CTYPE_MACROS early.
141085 2006-10-10  Bruno Haible  <bruno@clisp.org>
141087         Make it possible to #define set_program_name to an alias.
141088         * lib/progname.c: Don't undefine set_program_name; instead, undefine
141089         ENABLE_RELOCATABLE early.
141091 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
141093         Port to Tandem NSK OSS, which has 64-bit signed int but at most
141094         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
141095         http://lists.gnu.org/r/bug-coreutils/2006-10/msg00062.html
141096         More generally, don't assume that 64-bit signed int is available
141097         if unsigned int is, and vice versa.
141098         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
141099         unsigned symbols, not on their signed counterparts.
141100         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
141101         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
141102         (UINT64_C, UINTMAX_C):
141103         Likewise.
141104         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
141105         unsigned counterparts.
141106         (Have_long_long, Unsigned): New macros.
141107         (Int): Renamed from INT.
141108         (strtoimax): Use the new macros.
141109         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
141110         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
141111         * modules/inttypes (inttypes.h): Substitute
141112         HAVE_UNSIGNED_LONG_LONG_INT.
141113         * modules/stdint (stdint.h): Likewise.
141114         (Files): Add m4/ulonglong.m4.
141116 2006-10-10  Bruno Haible  <bruno@clisp.org>
141118         Fix a gcc -Wshadow warning.
141119         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
141120         to 'bucket'.
141121         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
141122         gl_linked_indexof_from_to): Likewise.
141123         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
141124         Likewise.
141125         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
141126         Likewise.
141127         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
141128         Reported by Eric Blake.
141130 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
141132         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
141133         for NetBSD.  Problem reported by Bruno Haible.
141135 2006-10-09  Jim Meyering  <jim@meyering.net>
141137         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
141138         Patch from Bruno Haible.
141140 2006-10-09  Jim Meyering  <jim@meyering.net>
141142         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
141143         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
141144         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
141146 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
141148         Don't include <config.h> twice; this doesn't work in some cases,
141149         e.g., when config.h has "#define intmax_t long long int" and
141150         we include <config.h>, <inttypes.h>, <config.h> in that order.
141151         Problem reported by Matthew Woehlke in:
141152         http://lists.gnu.org/r/bug-coreutils/2006-10/msg00073.html
141153         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
141154         * lib/fts-cycle.c: Don't include config.h.
141155         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
141156         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
141157         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
141158         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
141159         inttypes.h.
141160         * lib/xstrtoumax.c: Likewise.
141161         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
141162         __strtol and the like, so that this module is more like its siblings.
141163         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
141164         Remove; no longer needed now that we assume gnulib inttypes.h.
141166 2006-10-08  Bruno Haible  <bruno@clisp.org>
141168         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
141169         option.
141171 2006-10-07  Jim Meyering  <jim@meyering.net>
141173         * modules/inttypes (inttypes.h): Revert what seems to have been
141174         an inadvertent part of today's change: use "|", not "/" in the
141175         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
141177 2006-10-07  Bruno Haible  <bruno@clisp.org>
141179         * modules/sublist: New file.
141181 2006-10-07  Bruno Haible  <bruno@clisp.org>
141183         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
141184         * modules/argz (argz.h): Likewise.
141185         * modules/arpa_inet (arpa/inet.h): Likewise.
141186         * modules/byteswap (byteswap.h): Likewise.
141187         * modules/configmake (configmake.h): Likewise.
141188         * modules/fcntl (fcntl.h): Likewise.
141189         * modules/fnmatch (fnmatch.h): Likewise.
141190         * modules/getopt (getopt.h): Likewise.
141191         * modules/glob (glob.h): Likewise.
141192         * modules/inttypes (inttypes.h): Likewise.
141193         * modules/netinet_in (netinet/in.h): Likewise.
141194         * modules/poll (poll.h): Likewise.
141195         * modules/stdbool (stdbool.h): Likewise.
141196         * modules/stdint (stdint.h): Likewise.
141197         * modules/sys_select (sys/select.h): Likewise.
141198         * modules/sys_socket (sys/socket.h): Likewise.
141199         * modules/sys_stat (sys/stat.h): Likewise.
141200         * modules/sysexits (sysexits.h): Likewise.
141201         * modules/unistd (unistd.h): Likewise.
141202         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
141203         Add a "DO NOT EDIT" comment to the generated file.
141204         (func_import): Likewise for gnulib-comp.m4.
141206 2006-10-07  Bruno Haible  <bruno@clisp.org>
141208         * lib/gl_sublist.h: New file.
141209         * lib/gl_sublist.c: New file.
141211 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
141213         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
141214         name (relative to the original working directory) and the file
141215         name component (relative to the temporary working directory).  All
141216         callers changed.
141217         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
141218         * lib/mkdir-p.c (make_dir_parents): Likewise.
141219         * lib/mkdir-p.h (make_dir_parents): Likewise.
141221 2006-10-06  Eric Blake  <ebb9@byu.net>
141223         Define several macros for use by the clean-temp module.
141224         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
141225         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
141226         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
141228         * lib/clean-temp.h (close_stream_temp): New declaration.
141229         * lib/clean-temp.c (includes): Pull in headers according to what
141230         other modules are in use.
141231         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
141233 2006-10-06  Bruno Haible  <bruno@clisp.org>
141235         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
141236         instead of fopen, fwriteerror.
141238 2006-10-06  Bruno Haible  <bruno@clisp.org>
141240         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
141241         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
141242         int.
141243         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
141244         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
141245         Return an error indicator.
141246         Suggested by Eric Blake.
141248 2006-10-06  Bruno Haible  <bruno@clisp.org>
141250         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
141251         Reported by Eric Blake.
141253 2006-10-06  Bruno Haible  <bruno@clisp.org>
141255         * modules/closeout (Description): Mention stderr too.
141257 2006-10-06  Bruno Haible  <bruno@clisp.org>
141258         and Paul Eggert  <eggert@cs.ucla.edu>
141260         * lib/closeout.c (close_stdout): Also close stderr.
141261         * lib/closeout.h: Update comment.
141263 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
141265         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
141266         <http://lists.gnu.org/r/bug-coreutils/2006-10/msg00063.html>.
141267         * lib/dirchownmod.c: Include lchown.h.
141268         * lib/lchown.c: Don't include files that lchown.h now includes.
141269         Don't declare chown, since lchown.h now does that.
141270         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
141271         (lchown): Define to rpl_chown if lchown is declared but
141272         does not exist.  Declare using a prototype if lchown is not
141273         declared.  Add a copyright notice.
141274         * lib/mkstemp.h: Include <unistd.h>.
141275         * lib/openat.c: Include lchown.h.
141277         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
141278         we now test for that separately.
141279         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
141280         rather than O_NOFOLLOW, when testing whether it's possible to
141281         avoid a race condition reliably.
141282         * lib/savewd.c (savewd_chdir): Likewise.
141284         Remove macros that are no longer needed now that stdint.h is
141285         reliable.
141286         * lib/fsusage.c (UINTMAX_MAX): Remove.
141287         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
141288         * lib/utimecmp.c (SIZE_MAX): Remove.
141290         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
141292         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
141293         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
141294         O_NOATIME works.
141296 2006-10-05  Bruno Haible  <bruno@clisp.org>
141298         * lib/gl_list.h (gl_sortedlist_search_from_to,
141299         gl_sortedlist_indexof_from_to): New declarations.
141300         (gl_list_implementation): New fields sortedlist_search_from_to,
141301         sortedlist_indexof_from_to.
141302         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
141303         inline functions.
141304         * lib/gl_list.c (gl_sortedlist_search_from_to,
141305         gl_sortedlist_indexof_from_to): New functions.
141306         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
141307         function.
141308         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
141309         (gl_array_sortedlist_search_from_to): New function.
141310         (gl_array_list_implementation): Update.
141311         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
141312         function.
141313         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
141314         (gl_carray_sortedlist_search_from_to): New function.
141315         (gl_carray_list_implementation): Update.
141316         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
141317         gl_linked_sortedlist_indexof_from_to): New functions.
141318         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
141319         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
141320         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
141321         gl_tree_sortedlist_indexof_from_to): New functions.
141322         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
141323         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
141324         Update.
141325         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
141326         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
141327         Update.
141329 2006-10-05  Bruno Haible  <bruno@clisp.org>
141331         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
141332         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
141333         (struct gl_list_implementation): Add fields search_from_to,
141334         indexof_from_to. Remove fields search, indexof.
141335         (gl_list_search): Use the search_from_to method.
141336         (gl_list_search_from, gl_list_search_from_to): New functions.
141337         (gl_list_indexof): Use the indexof_from_to method.
141338         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
141339         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
141340         (gl_list_search_from, gl_list_search_from_to): New functions.
141341         (gl_list_indexof): Use the indexof_from_to method.
141342         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
141343         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
141344         gl_array_indexof. Add start_index, end_index arguments.
141345         (gl_array_search_from_to): Renamed from gl_array_search. Add
141346         start_index, end_index arguments.
141347         (gl_array_remove, gl_array_list_implementation): Update.
141348         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
141349         gl_carray_indexof. Add start_index, end_index arguments.
141350         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
141351         start_index, end_index arguments.
141352         (gl_carray_remove, gl_carray_list_implementation): Update.
141353         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
141354         gl_linked_search. Add start_index, end_index arguments.
141355         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
141356         start_index, end_index arguments.
141357         (gl_linked_remove): Update.
141358         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
141359         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
141360         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
141361         field to 'size_t'.
141362         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
141363         gl_tree_search. Add start_index, end_index arguments.
141364         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
141365         start_index, end_index arguments.
141366         (gl_tree_remove): Update.
141367         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
141368         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
141369         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
141370         function.
141371         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
141372         gl_tree_search. Add start_index, end_index arguments.
141373         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
141374         start_index, end_index arguments.
141375         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
141376         Update.
141377         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
141379 2006-10-05  Bruno Haible  <bruno@clisp.org>
141381         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
141383         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
141384         fwriteerror_temp): New declarations.
141385         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
141386         (descriptors): New variable.
141387         (cleanup): First, close the descriptors.
141388         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
141389         fclose_temp, fwriteerror_temp): New functions.
141391 2006-10-04  Jim Meyering  <jim@meyering.net>
141393         * lib/fts.c (fts_open): Tiny comment change.
141395 2006-10-04  Bruno Haible  <bruno@clisp.org>
141397         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
141398         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
141399         gl_LOCK_BODY.
141400         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
141401         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
141402         gl_LOCK_EARLY_BODY.
141403         (gl_LOCK): Require gl_LOCK_BODY.
141405 2006-10-04  Bruno Haible  <bruno@clisp.org>
141407         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
141408         (gl_oset_search_atleast): New declaration.
141409         (struct gl_oset_implementation): Add field 'search_atleast'.
141410         (gl_oset_search_atleast): New inline function.
141411         * lib/gl_oset.c (gl_oset_search_atleast): New function.
141412         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
141413         (gl_array_oset_implementation): Update.
141414         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
141415         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
141416         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
141418 2006-10-04  Bruno Haible  <bruno@clisp.org>
141420         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
141422 2006-10-03  Bruno Haible  <bruno@clisp.org>
141424         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
141425         from gl_avltreehash_list_implementation.
141427 2006-10-03  Bruno Haible  <bruno@clisp.org>
141429         * lib/gl_oset.c (gl_oset_add): Fix return type.
141431 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
141433         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
141435 2006-10-02  Eric Blake  <ebb9@byu.net>
141437         * modules/strnlen (Depends-on): Add extensions.
141439 2006-10-02  Eric Blake  <ebb9@byu.net>
141441         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
141442         definition in 2.60+.
141444 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
141446         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
141447         checks.
141449 2006-10-02  Bruno Haible  <bruno@clisp.org>
141451         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
141452         to the AUTOMAKE_OPTIONS.
141453         Reported by Jim Meyering.
141455 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
141457         Work around bug in Solaris 10 /proc file system:
141458         /proc/self/fd/NNN/.. isn't the parent directory of
141459         the directory whose file descriptor is NNN.  This needs to
141460         be worked around at run time, not compile time, since a
141461         program might be built on Solaris 8, where things work, and
141462         run on Solaris 10.
141463         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
141464         to use the following interface instead:
141465         (OPENAT_BUFFER_SIZE): New macro.
141466         (openat_proc_name): New function.
141467         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
141468         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
141469         Likewise.
141470         * lib/openat-proc.c: New file.
141471         * modules/openat (Files): Add lib/openat-proc.c.
141472         (Depends-on): Add same-inode, stdbool.
141473         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
141475 2006-09-29  Bruno Haible  <bruno@clisp.org>
141477         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
141478         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
141479         argument. Set stdout_closed before testing for ferror, not after.
141480         (fwriteerror, fwriteerror_no_ebadf): New functions.
141482 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
141484         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
141486 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
141488         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
141489         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
141491 2006-09-28  Jim Meyering  <jim@meyering.net>
141493         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
141494         Include <unistd.h>.
141496 2006-09-28  Bruno Haible  <bruno@clisp.org>
141498         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
141499         * modules/linkedhash-list (Depends-on): Likewise.
141500         * modules/rbtreehash-list (Depends-on): Likewise.
141502 2006-09-28  Bruno Haible  <bruno@clisp.org>
141504         * lib/strndup.h: Simplify the redefinition of strndup.
141505         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
141506         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
141508 2006-09-28  Bruno Haible  <bruno@clisp.org>
141510         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
141511         * lib/gl_linkedhash_list.c: Likewise.
141512         * lib/gl_rbtreehash_list.c: Likewise.
141514 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
141516         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
141517         getaddrinfo.
141519         * lib/__fpending.h: Don't include <stdio_ext.h> unless
141520         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
141521         it causes <stdio_ext.h> to cause a compile-time error.
141522         Problem reported by Nelson H. F. Beebe.
141523         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
141524         of HAVE_DECL___PENDING.
141526         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
141527         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
141528         declaration.
141530 2006-09-27  Jim Meyering  <jim@meyering.net>
141532         This file could end up with a definition for a function
141533         named __strndup, rather than rpl_strndup on a system with
141534         incomplete weak_alias support.
141535         * lib/strndup.c (strndup): Rename from __strndup.
141536         Remove #defines that used to map __strndup to strndup.
141537         Don't use K&R prototypes.
141538         Remove LIBC-related code, since this file is not sync'd with glibc.
141539         * lib/strndup.h: Revamp, accordingly.
141540         * m4/strndup.m4: Modernize.
141542 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
141544         * modules/savewd (Depends-on): Add 'raise'.
141545         * lib/savewd.c: Include <signal.h>, for 'raise'.
141547 2006-09-26  Jim Meyering  <jim@meyering.net>
141549         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
141550         when we detect Darwin 8.7.0's acl_get_file bug.
141551         Rearrange to perform the new (below) run-test while $LIBS
141552         contains any acl-related library.  Set USE_ACL at the end.
141553         (gl_ACL_GET_FILE): New function.
141555 2006-09-26  Eric Blake  <ebb9@byu.net>
141557         * lib/verror.c: Include <config.h> unconditionally.
141559 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
141561         * modules/clock-time (Maintainer): Add self.
141562         * modules/getlogin_r (Depends-on): Add extensions.
141564 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
141566         * modules/clock-time: New module.
141567         * modules/nanosleep (Depends-on): Add clock-time.
141568         * modules/gethrxtime (Depends-on): Likewise.
141569         * modules/gettime (Depends-on): Likewise.
141570         * modules/settime (Depends-on): Likewise.
141572         * modules/fts-lgpl: Depend on openat.
141573         * modules/mkancesdirs: Depend on savewd.
141574         * modules/mkdir-p: Likewise.
141576 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
141578         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
141580         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
141581         `gl_have_arbitrary_file_name_length_limit' to
141582         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
141583         actually works between configure runs.
141585 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
141586             Bruno Haible  <bruno@clisp.org>
141588         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
141590 2006-09-25  Jim Meyering  <jim@meyering.net>
141592         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
141593         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
141595 2006-09-25  Eric Blake  <ebb9@byu.net>
141597         * gnulib-tool (func_import, func_create_testdir): Fix typos in
141598         exec's in 2006-09-18 patch when shuffling fds.
141600 2006-09-25  Bruno Haible  <bruno@clisp.org>
141602         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
141603         Reported by Jim Meyering.
141605 2006-09-24  Jim Meyering  <jim@meyering.net>
141607         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
141608         compare a pointer against a literal "0".  That caused failures with
141609         at least HP-UX's hpcc.
141611 2006-09-22  Simon Josefsson  <jas@extundo.com>
141613         * modules/gc-sha1:
141614         * modules/gc-md4:
141615         * modules/gc-hmac-sha1:
141616         * modules/gc-hmac-md5:
141617         * modules/gc-des:
141618         * modules/gc-arcfour: Distribute more files.
141620 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
141622         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
141623         (gl_linked_iterator_from_to): Initialize struct completely.
141624         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
141625         (gl_tree_iterator_from_to): Likewise
141626         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
141627         * lib/gl_array_list.c [lint] (gl_array_iterator)
141628         (gl_array_iterator_from_to): Likewise.
141629         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
141630         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
141631         (gl_carray_iterator_from_to): Likewise.
141633         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
141634         * lib/md4.c (md4_process_block): Remove unused variable.
141635         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
141636         parentheses for clarity.
141638 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
141640         * modules/bison-i18n (Depends-on): Add gettext.
141642 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
141644         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
141645         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
141646         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
141647         also add missing comma that caused broken test.
141648         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
141649         stdlib.h, for `abort'.
141650         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
141651         variables.
141652         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
141653         include unistd.h if present, for `rmdir'.
141654         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
141655         variables.
141656         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
141657         in the process include standard headers for prototypes.
141658         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
141659         gets declared on GNU/Linux.
141660         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
141661         unistd.h, for `rmdir'.
141662         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
141664         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
141665         always true.
141666         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
141668         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
141670 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
141672         * gnulib-tool (func_version): Create output all at once.  This
141673         may help avoid triggering unnecessary SIGPIPEs, and at any
141674         rate it doesn't hurt.
141676 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
141677             Bruno Haible  <bruno@clisp.org>
141679         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
141680         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
141681         * m4/signed.m4 (bh_C_SIGNED): Likewise.
141683         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
141684         (gl_FUNC_VASPRINTF): Invoke it.
141686 2006-09-22  Bruno Haible  <bruno@clisp.org>
141688         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
141689         getloadavg.c as first argument.
141691 2006-09-22  Bruno Haible  <bruno@clisp.org>
141693         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
141694         at the beginning of the gl_INIT macro.
141695         * modules/getloadavg (configure.ac): Pass $gl_source_base to
141696         gl_GETLOADAVG.
141698 2006-09-22  Bruno Haible  <bruno@clisp.org>
141700         * gnulib-tool (func_create_megatestdir): Don't include the config-h
141701         module.
141702         Suggested by Ralf Wildenhues.
141704 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
141706         Import this patch from libc:
141708         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
141710         * lib/regex_internal.c (re_string_reconstruct): Handle
141711         offset < pstr->valid_raw_len && pstr->offsets_needed case.
141712         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
141713         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
141714         re_string_context_at.
141716         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
141717         now requires it.
141718         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
141719         gl_REGEX now does it for us.
141720         (gl_REGEX): Add test taken from
141721         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
141723         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
141724         Check that large offsets work.  Modernize Autoconf usages.
141725         Prefer "yes" to mean a good thing rather than a bad.
141726         Don't put "#define mkstemp" in config.h, as this might interfere
141727         with standard system headers that "#define mkstemp mkstemp64".
141729         * modules/mkstemp (Depends-on): Add extensions, so that
141730         mkstemp is visible on some platforms.
141731         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
141732         (Include): Change to "mkstemp.h" from <stdlib.h>.
141733         (Files): Add mkstemp.h.
141735         * lib/mkstemp.h: New file, since some standard headers
141736         #define mkstemp.
141737         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
141738         Include "mkstemp.h".
141739         Make the _LIBC code resemble glibc original more,
141740         e.g., use K&R style.
141741         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
141742         (mkstemp): Remove, since mkstemp.h does this for us.
141743         * lib/stdlib--.h: Include mkstemp.h.
141745         Import this patch from libc:
141747         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
141749         * lib/tempname.c (__gen_tempname): Change attempts_min
141750         into a macro.  Use preprocessor to decide how to initialize
141751         attempts [Coverity CID 67].
141753 2006-09-20  Bruno Haible  <bruno@clisp.org>
141755         * lib/mkdtemp.c: Import from libc.
141756         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
141757                 * sysdeps/posix/tempname.c (__gen_tempname): Change
141758                 attempts_min into a macro.  Use preprocessor to decide how to
141759                 initialize attempts [Coverity CID 67].
141760         2001-11-27  Paul Eggert  <eggert@twinsun.com>
141761                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
141762                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
141764 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
141766         * gnulib-tool (func_exit): New function, to allow to pass the
141767         exit status portably through the trap.  Use everywhere.
141768         (--help, --version): Signal a write error.
141769         (trap): catch SIGPIPE, for write errors.
141770         Exit at the end of the trap, with the correct exit status.
141772 2006-09-19  Karl Berry  <karl@gnu.org>
141774         * doc/gnulib.texi: note about the license texinfo files.
141776 2006-09-19  Eric Blake  <ebb9@byu.net>
141778         * gnulib-tool: Avoid space-tab.
141780 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
141782         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
141783         that prevented coreutils 6.1 from building.  Problem reported
141784         by Petter Reinholdtsen.
141786 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
141788         * gnulib-tool (avoidlist): Fix typo that broke options like
141789         --avoid=lock that are used by coreutils bootstrap.
141791 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
141793         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
141794         more systematically.
141796 2006-09-18  Jim Meyering  <jim@meyering.net>
141798         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
141800 2006-09-18  Bruno Haible  <bruno@clisp.org>
141802         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
141804 2006-09-18  Bruno Haible  <bruno@clisp.org>
141806         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
141807         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
141808         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
141809         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
141810         * m4/gettext.m4: Require autoconf >= 2.52.
141811         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
141812         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
141813         of gl_cv_header_inttypes_h.
141815 2006-09-18  Bruno Haible  <bruno@clisp.org>
141817         * lib/javaversion.c: Include configmake.h.
141819 2006-09-18  Bruno Haible  <bruno@clisp.org>
141821         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
141822         avoid that the while loops be executed in a subshell.
141824 2006-09-18  Bruno Haible  <bruno@clisp.org>
141826         * MODULES.html.sh (func_module): Break long lines.
141827         Suggested by Bruce Korb <bkorb@gnu.org>.
141829 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
141831         Speed up by a factor of 1.12.
141832         * gnulib-tool (nl): New variable.
141833         (func_import): Rewrite include directive extraction to only read each
141834         directive once.
141836 2006-09-17  Bruno Haible  <bruno@clisp.org>
141838         * modules/javaversion (Makefile.am): Remove DEFS setting.
141839         (Depends-on): Add configmake, for PKGDATADIR definition.
141841 2006-09-17  Bruno Haible  <bruno@clisp.org>
141843         * gnulib-tool (func_create_testdir): Rewrite all files at once.
141845 2006-09-17  Bruno Haible  <bruno@clisp.org>
141847         * gnulib-tool (func_append): New function, stolen from libtool.m4.
141848         (func_modules_transitive_closure, func_modules_add_dummy,
141849         func_modules_to_filelist, func_import, func_create_testdir,
141850         func_create_megatestdir, ...): Use it wherever possible.
141851         Suggested by Ralf Wildenhues.
141853 2006-09-16  Karl Berry  <karl@gnu.org>
141855         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
141856         to avoid sectioning errors.
141857         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
141858         [ifinfo]: blank line after @center-ed titles.
141859         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
141860         Spell FSF address consistently with others.
141861         (These changes approved by rms.)
141863 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
141865         Speed up by a factor of 1.61.
141866         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
141867         already checked module names again.
141869 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
141871         Speed up by a factor of 1.13.
141872         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
141873         for new_files, and the input to func_add_or_update.
141875 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
141877         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
141878         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
141880 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
141882         * modules/mkancesdirs (Depends-on): Add fcntl.
141883         * modules/savewd: New file.
141884         * MODULES.html.sh (File system functions): Add savewd.
141886         * modules/configmake (Makefile.am): Add support for the
141887         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
141889 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
141891         * m4/savewd.m4: New file.
141893 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
141895         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
141896         (dirchownmod): New arg FD.  All callers changed.
141897         Use FD rather than opening the directory ourself, as opening is
141898         now the caller's responsibility.
141899         * lib/dirchownmod.h: Likewise.
141900         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
141901         hosts that require <sys/types.h> before <sys/stat.h>.  Include
141902         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
141903         (test_dir): Remove.
141904         (mkancesdirs): Return length of prefix of FILE that has already
141905         been made, or -2 if there is a child doing the work.  Redo
141906         algorithm so that it is O(N) rather than O(N**2).  Optimize away
141907         ".", and treat ".." specially since it might stray back into
141908         already-created areas.  Use a subprocess if necessary.  New arg
141909         WD; all users changed.  MAKE_DIR function should now return 1
141910         if it creates a directory that is not readable.  Return -2 if
141911         a child process is spun off.
141912         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
141913         Adjust signature to match code.
141914         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
141915         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
141916         all users changed.
141917         * lib/savewd.c, lib/savewd.h: New files.
141919 2006-09-15  Jim Meyering  <jim@meyering.net>
141921         * modules/rename-dest-slash: New module.
141922         * MODULES.html.sh (posix_compat): Add it here.
141924         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
141926 2006-09-15  Jim Meyering  <jim@meyering.net>
141928         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
141929         file.
141931         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
141933 2006-09-15  Jim Meyering  <jim@meyering.net>
141935         * lib/rename-dest-slash.c (has_trailing_slash): Use
141936         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
141937         (rpl_rename_dest_slash): Perform the cheaper trailing slash
141938         test before testing whether SRC is a directory.
141939         Suggestions from Bruno Haible.
141941         Avoid a warning about an unused variable.
141942         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
141943         into the #ifdef block where it's used.
141945         * lib/rename-dest-slash.c: New file.
141947 2006-09-14  Bruno Haible  <bruno@clisp.org>
141949         * lib/allocsa.c: Include <config.h> unconditionally.
141950         * lib/asnprintf.c: Likewise.
141951         * lib/asprintf.c: Likewise.
141952         * lib/c-strcasecmp.c: Likewise.
141953         * lib/c-strcasestr.c: Likewise.
141954         * lib/c-strncasecmp.c: Likewise.
141955         * lib/c-strstr.c: Likewise.
141956         * lib/classpath.c: Likewise.
141957         * lib/clean-temp.c: Likewise.
141958         * lib/concatpath.c: Likewise.
141959         * lib/copy-file.c: Likewise.
141960         * lib/csharpcomp.c: Likewise.
141961         * lib/csharpexec.c: Likewise.
141962         * lib/execute.c: Likewise.
141963         * lib/fatal-signal.c: Likewise.
141964         * lib/findprog.c: Likewise.
141965         * lib/fwriteerror.c: Likewise.
141966         * lib/gl_array_list.c: Likewise.
141967         * lib/gl_array_oset.c: Likewise.
141968         * lib/gl_avltree_list.c: Likewise.
141969         * lib/gl_avltree_oset.c: Likewise.
141970         * lib/gl_avltreehash_list.c: Likewise.
141971         * lib/gl_carray_list.c: Likewise.
141972         * lib/gl_linked_list.c: Likewise.
141973         * lib/gl_linkedhash_list.c: Likewise.
141974         * lib/gl_list.c: Likewise.
141975         * lib/gl_oset.c: Likewise.
141976         * lib/gl_rbtree_list.c: Likewise.
141977         * lib/gl_rbtree_oset.c: Likewise.
141978         * lib/gl_rbtreehash_list.c: Likewise.
141979         * lib/imaxabs.c: Likewise.
141980         * lib/imaxdiv.c: Likewise.
141981         * lib/javacomp.c: Likewise.
141982         * lib/javaexec.c: Likewise.
141983         * lib/javaversion.c: Likewise.
141984         * lib/linebreak.c: Likewise.
141985         * lib/localcharset.c: Likewise.
141986         * lib/lock.c: Likewise.
141987         * lib/mbchar.c: Likewise.
141988         * lib/mbswidth.c: Likewise.
141989         * lib/mkdtemp.c: Likewise.
141990         * lib/pipe.c: Likewise.
141991         * lib/printf-args.c: Likewise.
141992         * lib/printf-parse.c: Likewise.
141993         * lib/progname.c: Likewise.
141994         * lib/progreloc.c: Likewise.
141995         * lib/readlink.c: Likewise.
141996         * lib/sh-quote.c: Likewise.
141997         * lib/stpcpy.c: Likewise.
141998         * lib/stpncpy.c: Likewise.
141999         * lib/strcasecmp.c: Likewise.
142000         * lib/strcasestr.c: Likewise.
142001         * lib/strcspn.c: Likewise.
142002         * lib/striconv.c: Likewise.
142003         * lib/strncasecmp.c: Likewise.
142004         * lib/strnlen1.c: Likewise.
142005         * lib/strstr.c: Likewise.
142006         * lib/strtok_r.c: Likewise.
142007         * lib/tls.c: Likewise.
142008         * lib/tmpdir.c: Likewise.
142009         * lib/unicodeio.c: Likewise.
142010         * lib/unsetenv.c: Likewise.
142011         * lib/vasnprintf.c: Likewise.
142012         * lib/vasprintf.c: Likewise.
142013         * lib/wait-process.c: Likewise.
142014         * lib/xallocsa.c: Likewise.
142015         * lib/xsetenv.c: Likewise.
142016         * lib/xstriconv.c: Likewise.
142018 2006-09-13  Simon Josefsson  <jas@extundo.com>
142020         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
142021         that internally, suggested by Ralf Wildenhues
142022         <Ralf.Wildenhues@gmx.de>.
142024 2006-09-13  Simon Josefsson  <jas@extundo.com>
142026         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
142027         @LIBOBJS@.
142028         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
142030 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
142032         * lib/_fpending.c: Include <config.h> unconditionally, since we no
142033         longer worry about uses that don't define HAVE_CONFIG_H.
142034         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
142035         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
142036         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
142037         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
142038         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
142039         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
142040         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
142041         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
142042         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
142043         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
142044         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
142045         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
142046         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
142047         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
142048         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
142049         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
142050         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
142051         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
142052         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
142053         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
142054         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
142055         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
142056         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
142057         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
142058         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
142059         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
142060         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
142061         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
142062         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
142063         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
142064         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
142065         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
142066         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
142067         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
142068         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
142069         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
142070         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
142071         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
142072         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
142073         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
142074         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
142075         Likewise.
142077 2006-09-13  Eric Blake  <ebb9@byu.net>
142079         * lib/getopt.c: Fix typo in last commit.
142081 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
142083         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
142084         dgettext.
142086 2006-09-12  Jim Meyering  <jim@meyering.net>
142088         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
142089         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
142090         Reported by Nelson H. F. Beebe.
142092 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
142094         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
142095         program_invocation_name and program_invocation_short_name are
142096         initialized.
142097         * lib/argp-namefrob.h: Move declarations of program_invocation_name
142098         and program_invocation_short_name to argp.h, so they are visible
142099         to user programs.
142100         * lib/argp.h: Likewise
142102 2006-09-10  Bruno Haible  <bruno@clisp.org>
142104         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
142105         m4/inttypes_h.m4, m4/uintmax_t.m4.
142107 2006-09-10  Bruno Haible  <bruno@clisp.org>
142109         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
142110         gl_AC_TYPE_UINTMAX_T.
142112 2006-09-10  Bruno Haible  <bruno@clisp.org>
142114         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
142116 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
142118         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
142119         convention.  Text proposed by Bruno Haible.
142120         (struct argp_option): Document the use of N_() wrappers.
142122         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
142123         '\v', and translate the two parts separately, instead of feeding
142124         the whole string to gettext.  This allows to exclude
142125         '\v' from the strings visible to the translator by writing doc
142126         strings as N_("..") "\v" N_("..").
142128 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
142130         * config/srclist.txt: Undo latest change; the bug was fixed.
142132 2006-09-09  Bruno Haible  <bruno@clisp.org>
142134         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
142135         assignments if building a library without libtool.
142136         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
142137         in func_emit_lib_Makefile_am.
142138         (func_import): When building a static library libfoo.a, arrange to
142139         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
142140         (func_create_testdir): Likewise.
142141         * modules/gc (configure.ac, Makefile.am): If building statically,
142142         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
142143         * modules/iconvme (configure.ac, Makefile.am): Likewise.
142144         * modules/striconv (configure.ac, Makefile.am): Likewise.
142145         Based on a suggestion by Ralf Wildenhues.
142147 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
142149         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
142150         Check for unistd.h too, since Autoconf doesn't assume POSIX.
142151         Also:
142153         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
142154         Add year_2050_test to catch glibc bug 2821
142155         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
142157         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
142158         Prefer #ifdef to #if.
142160         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
142161         Return from 'main' instead of calling 'exit'.
142163 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
142165         * lib/mktime.c (guess_time_tm): Fix bug where mktime
142166         returned the maximum time_t value rather than (time_t) -1.
142167         Problem originally reported by William Bardwell
142168         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
142170         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
142171         Moved to here ...
142172         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
142173         ... from here.
142175 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
142177         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
142178         2821 is fixed.
142180 2006-09-08  Jim Meyering  <jim@meyering.net>
142182         Don't make generated files read-only.  That would bother too many
142183         people.  However, do retain the ability to work when targets are
142184         read-only: remove the destination and temporary files before writing
142185         them (when generated via sed or echo), or by using the -f option for
142186         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
142187         * modules/alloca-opt, modules/argz, modules/arpa_inet:
142188         * modules/byteswap, modules/configmake, modules/fcntl:
142189         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
142190         * modules/localcharset, modules/netinet_in, modules/poll:
142191         * modules/stdbool, modules/stdint, modules/sys_select:
142192         * modules/sys_socket, modules/sys_stat, modules/sysexits:
142194 2006-09-08  Jim Meyering  <jim@meyering.net>
142196         Avoid new build failure on FreeBSD 6.0.
142197         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
142198         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
142199         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
142201 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
142203         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
142205 2006-09-07  Jim Meyering  <jim@meyering.net>
142207         Fix global typo in last change: use chmod u-w, not chmod u-x.
142208         Spotted by Paul Eggert and Bruce Korb.
142209         * modules/alloca-opt, modules/argz, modules/arpa_inet:
142210         * modules/byteswap, modules/configmake, modules/fcntl:
142211         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
142212         * modules/localcharset, modules/netinet_in, modules/poll:
142213         * modules/stdbool, modules/stdint, modules/sys_select:
142214         * modules/sys_socket, modules/sys_stat, modules/sysexits:
142216 2006-09-06  Jim Meyering  <jim@meyering.net>
142218         Make generated files be read-only.
142219         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
142220         Ensure that each generated file is now read-only.
142221         * modules/argz: Likewise.
142222         * modules/arpa_inet: Likewise.
142223         * modules/byteswap: Likewise.
142224         * modules/configmake: Likewise.
142225         * modules/fcntl: Likewise.
142226         * modules/fnmatch: Likewise.
142227         * modules/getopt: Likewise.
142228         * modules/glob: Likewise.
142229         * modules/inttypes: Likewise.
142230         * modules/netinet_in: Likewise.
142231         * modules/poll: Likewise.
142232         * modules/stdbool: Likewise.
142233         * modules/stdint: Likewise.
142234         * modules/sys_select: Likewise.
142235         * modules/sys_socket: Likewise.
142236         * modules/sys_stat: Likewise.
142237         * modules/sysexits: Likewise.
142238         * modules/localcharset: Same as above, but continue using temporary
142239         file named "t-$@" (why different?) rather than the "$@-t" used
142240         everywhere else.
142242         * modules/sysexits (Makefile.am): Replace literal occurrences
142243         of "sysexit.h" more readable, and more consistent, "$@".
142245 2006-09-06  Bruno Haible  <bruno@clisp.org>
142247         * modules/striconv: New file.
142248         * modules/xstriconv: New file.
142249         * MODULES.html.sh (Internationalization functions): Add striconv,
142250         xstriconv.
142252 2006-09-06  Bruno Haible  <bruno@clisp.org>
142254         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
142255         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
142256         not using libtool correctly.
142258 2006-09-06  Bruno Haible  <bruno@clisp.org>
142260         * lib/striconv.h: New file.
142261         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
142262         iconvstring.c.
142263         * lib/xstriconv.h: New file.
142264         * lib/xstriconv.c: New file.
142266 2006-09-06  Bruno Haible  <bruno@clisp.org>
142268         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
142269         lib_..._LDFLAGS.
142271 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
142273         * lib/argz_.h: Sync from Libtool.
142275         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
142276                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
142278         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
142280 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
142282         * modules/trim: New file.
142284 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
142286         * lib/trim.h: New file.
142287         * lib/trim.c: New file.
142289 2006-09-05  Bruno Haible  <bruno@clisp.org>
142291         * MODULES.html.sh (String handling): Add trim.
142293 2006-09-04  Karl Berry  <karl@gnu.org>
142295         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
142296         until next release.
142298 2006-09-03  Bruno Haible  <bruno@clisp.org>
142300         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
142301         correctly.
142303 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
142305         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
142306         not gl_GETLOADAVG.  Omit unneeded semicolons.
142307         Problems reported by Ralf Wildenhues in
142308         <http://lists.gnu.org/r/bug-gnulib/2006-09/msg00000.html>.
142309         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
142310         at the end, which is the usual gnulib style.
142312         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
142313         of doing all the work ourselves.
142314         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
142315         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
142317 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
142319         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
142320         Problem reported by Ralf Wildenhues in
142321         <http://lists.gnu.org/r/bug-gnulib/2006-09/msg00000.html>.
142323         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
142324         HAVE_STRUCT_STATFS_F_FSTYPENAME.
142326 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
142328         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
142329         yesterday's patch by changing test -n to test -z.
142331 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
142333         * modules/getloadavg (Files): Add m4/getloadavg.m4.
142334         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
142335         the former is now obsolescent.
142337         * modules/chdir-long (Depends-on): Add fcntl.
142339 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
142341         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
142342         obsolescent, and programs should use gnulib instead.
142343         * m4/getloadavg.m4: New file, with contents taken from Autoconf
142344         but with prefixes changed.
142346 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
142348         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
142349         or stdbool.h, because they might not exist while configuring.
142351         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
142352         Don't include unistd.h or limits.h; not needed, since chdir-long.h
142353         does that for us.
142354         (O_DIRECTORY): Remove.
142356 2006-08-31  Eric Blake  <ebb9@byu.net>
142358         * gnulib-tool: Don't let emacs change spaces to TAB.
142360 2006-08-31  Bruno Haible  <bruno@clisp.org>
142362         * gnulib-tool: When calling func_import more than once, do it in a
142363         subshell.
142364         Reported by Eric Blake <ebb9@byu.net>.
142366 2006-08-31  Bruno Haible  <bruno@clisp.org>
142368         * gnulib-tool (nl): Remove variable.
142369         (sed_transform_lib_file): Use more robust test for config-h module.
142370         (func_import): Fix typo in 2006-08-25 patch.
142372 2006-08-31  Bruno Haible  <bruno@clisp.org>
142374         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
142375         specified, augment Makefile.am variables instead of assigning them.
142377 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
142379         Work around a bug in both the Linux and SunOS 64-bit kernels:
142380         nanosleep mishandles sleeps for longer than 2**31 seconds.
142381         Problem reported by Frank v Waveren in
142382         <http://lists.gnu.org/r/bug-coreutils/2006-08/msg00298.html>.
142383         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
142384         Check for nanosleep bug.
142385         (LIB_NANOSLEEP): Append clock_gettime library if needed.
142387 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
142389         Work around a bug in both the Linux and SunOS 64-bit kernels:
142390         nanosleep mishandles sleeps for longer than 2**31 seconds.
142391         Problem reported by Frank v Waveren in
142392         <http://lists.gnu.org/r/bug-coreutils/2006-08/msg00298.html>.
142393         * lib/nanosleep.c (BILLION): New constant.
142394         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
142395         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
142396         implementation.
142398 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
142400         * modules/nanosleep (Depends-on): Add gettime.
142402 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
142403         and Simon Josefsson  <jas@extundo.com>
142404         and Oskar Liljeblad  <oskar@osk.mine.nu>
142406         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
142407         * gnulib-tool (func_import): New license type 'unmodifiable license
142408         text'.
142409         * modules/fdl: Use it.  Longer description.
142410         * module/gpl, module/lgpl: New files.
142412 2006-08-30  Jim Meyering  <jim@meyering.net>
142414         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
142415         shadowing the parameter.
142417 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
142419         Sync from Libtool:
142421         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
142423         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
142424         sharing with gnulib.  Report by Eric Blake.
142426 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
142428         * modules/isapipe: New file.
142429         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
142431 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
142433         * modules/configmake (Makefile.am): Add a comment, and omit
142434         the CONFIGMAKE_ prefix from generated macro names.  Suggested
142435         by Bruno Haible.
142437 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
142439         * m4/isapipe.m4: New file.
142441 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
142443         * lib/isapipe.c, lib/isapipe.h: New files.
142445 2006-08-29  Jim Meyering  <jim@meyering.net>
142447         * modules/configmake (Makefile.am): Make configmake.h depend on
142448         Makefile.  Otherwise, a stale configmake.h could hang around.
142450 2006-08-29  Eric Blake  <ebb9@byu.net>
142452         * lib/error.c (error_at_line, print_errno_message): Match libc, after
142453         resolution of upstream bug 3044.
142455 2006-08-29  Bruno Haible  <bruno@clisp.org>
142457         * modules/localcharset (Depends-on): Add configmake.
142458         (Makefile.am): Remove setting of LIBDIR through DEFS.
142460 2006-08-29  Bruno Haible  <bruno@clisp.org>
142462         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
142463         defined.
142465 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
142467         * modules/fcntl: New file.
142468         * modules/chdir-safer (Depends-on): Add fcntl.
142469         * modules/fts: Likewise.
142470         * modules/mkdir-p: Likewise.
142472         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
142473         This undoes the most recent change, since we're now addressing the
142474         problem in a different way.
142476         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
142477         into output, since the output might be called Makefile.am even
142478         if $makefile_name is something different.
142479         (func_import): Use $makefile_am rather than
142480         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
142481         empty.
142483         * modules/inttypes (Files): Add m4/inttypes-h.m4.
142485 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
142487         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
142488         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
142489         recent change to stdint.m4, since we're now addressing the problem in a
142490         different way.
142492 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
142494         * m4/fcntl_h.m4: New file.
142496 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
142498         * lib/fcntl_.h: New file.
142499         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
142500         the fcntl module.
142501         * lib/dirchownmod.c: Likewise.
142502         * lib/fts.c: Likewise.
142504         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
142505         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
142506         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
142507         just before including <inttypes.h>, to avoid circular inclusion.
142509 2006-08-28  Jim Meyering  <jim@meyering.net>
142511         * doc/visibility.texi: Actually read and correct the grammar of the
142512         sentence affected by yesterday's change.
142514 2006-08-28  Eric Blake  <ebb9@byu.net>
142516         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
142517         needs wrapper.
142519 2006-08-28  Eric Blake  <ebb9@byu.net>
142521         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
142523 2006-08-28  Eric Blake  <ebb9@byu.net>
142525         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
142527 2006-08-28  Bruno Haible  <bruno@clisp.org>
142529         * modules/c-strstr: New file, from GNU gettext.
142530         * MODULES.html.sh (String handling): Add c-strstr.
142532 2006-08-28  Bruno Haible  <bruno@clisp.org>
142534         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
142535         macros.
142536         Reported by Eric Blake.
142538 2006-08-28  Bruno Haible  <bruno@clisp.org>
142540         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
142541         (VASNPRINTF): Return a string of length > INT_MAX without failing.
142542         * lib/vasprintf.c: Include errno.h, limits.h.
142543         (EOVERFLOW): New fallback definition.
142544         (vasprintf): Test here whether the string length is > INT_MAX.
142545         * lib/vsnprintf.c: Include errno.h, limits.h.
142546         (EOVERFLOW): New fallback definition.
142547         (vsnprintf): Fix bug when generated string was too long for the buffer.
142548         Test here whether the string length is > INT_MAX.
142550 2006-08-28  Bruno Haible  <bruno@clisp.org>
142552         * lib/inttypes_.h (SCNX*): Remove definitions.
142553         Reported by Eric Blake.
142555 2006-08-28  Bruno Haible  <bruno@clisp.org>
142557         * lib/c-strstr.h: New file, from GNU gettext.
142558         * lib/c-strstr.c: New file, from GNU gettext.
142560 2006-08-28  Bruno Haible  <bruno@clisp.org>
142562         * gnulib-tool: Reorder some statements.
142564 2006-08-28  Bruno Haible  <bruno@clisp.org>
142566         * gnulib-tool: New option --makefile-name.
142567         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
142568         $makefile_name.
142569         (func_import): Write $makefile_name to the cache file, and read it from
142570         there unless explicitly specified. Use $makefile_name as file name
142571         instead of Makefile.am. Adjust the recommendations accordingly.
142573 2006-08-28  Bruno Haible  <bruno@clisp.org>
142575         * gnulib-tool (func_verify_module): Check against misapplying patch.
142577 2006-08-28  Bruno Haible  <bruno@clisp.org>
142579         * gnulib-tool (func_relativize, func_relconcat): New functions.
142580         Give an error if --local-dir is given with --update.
142581         Remove trailing slashes from $local_gnulib_dir.
142582         (func_import): Store the relativized $local_gnulib_dir in
142583         gnulib-cache.m4, and read it from there if not specified explicitly.
142585 2006-08-28  Bruno Haible  <bruno@clisp.org>
142587         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
142588         is the current directory. Respect also $local_gnulib_dir.
142590 2006-08-28  Bruno Haible  <bruno@clisp.org>
142591             Simon Josefsson  <jas@extundo.com>
142593         BeOS portability.
142594         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
142596 2006-08-27  Jim Meyering  <jim@meyering.net>
142598         * doc/visibility.texi: Remove duplicate word: "pointer".
142600 2006-08-26  Bruno Haible  <bruno@clisp.org>
142602         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
142603         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
142604         (Makefile.am): Create inttypes.h from inttypes_.h.
142605         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
142607         * modules/imaxabs: New file.
142609         * modules/imaxdiv: New file.
142611 2006-08-26  Bruno Haible  <bruno@clisp.org>
142613         * m4/inttypes.m4: New file.
142614         * m4/_inttypes_h.m4: Remove file.
142615         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
142616         PRI_MACROS_BROKEN.
142617         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
142619         * m4/imaxabs.m4: New file.
142621         * m4/imaxdiv.m4: New file.
142623 2006-08-26  Bruno Haible  <bruno@clisp.org>
142625         * lib/inttypes_.h: New file.
142626         * lib/inttypes.h: Remove file.
142627         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
142629         * lib/imaxabs.c: New file.
142631         * lib/imaxdiv.c: New file.
142633 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
142635         New config-h module, so that "make" output needn't be cluttered
142636         by -DHAVE_CONFIG_H.
142637         * MODULES.html.sh (Support for building libraries and executables):
142638         Add config-h.
142639         * modules/config-h: New file.
142640         * gnulib-tool (nl, sed_transform_lib_file): New vars.
142641         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
142642         the config-h module is used.
142644         New configmake module, so that "make" output needn't be cluttered
142645         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
142646         * MODULES.html.sh (Support for building libraries and executables):
142647         Add configmake.
142648         * modules/configmake: New file.
142650 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
142652         * m4/config-h.m4: New file.
142654 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
142656         * config/srclist.txt: Add elisp-comp.
142658 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
142660         * MODULES.html.sh (Support for building libraries and executables):
142661         Add elisp-comp.
142662         * build-aux/elisp-comp: New file.
142663         * modules/elisp-comp: New file.
142665 2006-08-24  Bruno Haible  <bruno@clisp.org>
142667         * gnulib-tool (func_create_testdir): Use non-default values of
142668         sourcebase and m4base.
142670 2006-08-24  Bruno Haible  <bruno@clisp.org>
142672         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
142673         HTML structure.
142675 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
142677         * modules/openat (Depends-on): Add lchown.
142679 2006-08-23  Bruno Haible  <bruno@clisp.org>
142681         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
142682         of gl_LOCK_EARLY instead of gl_LOCK.
142684 2006-08-23  Bruno Haible  <bruno@clisp.org>
142686         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
142687         on OSF/1 to no.
142688         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
142690 2006-08-23  Bruno Haible  <bruno@clisp.org>
142692         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
142693         as unusable.
142695         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
142696         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
142697         (gl_LOCK): New macro.
142699 2006-08-22  Simon Josefsson  <jas@extundo.com>
142701         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
142702         to md5 module.
142704 2006-08-22  Simon Josefsson  <jas@extundo.com>
142706         * MODULES.html.sh: Add "Support for maintaining and release
142707         projects".
142709         * build-aux/gnupload: New file, from coreutils.
142711 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
142713         Avoid the need for AC_LIBSOURCES in m4 macros.
142714         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
142715         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
142716         * modules/check-version (EXTRA_DIST): Add check-version.h.
142717         * modules/crc (EXTRA_DIST): Add crc.h.
142718         * modules/des (EXTRA_DIST): Add des.h.
142719         * modules/gc (EXTRA_DIST): Add gc.h.
142720         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
142721         * modules/getline (EXTRA_DIST): Add getline.h.
142722         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
142723         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
142724         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
142725         * modules/md2 (EXTRA_DIST): Add md2.h.
142726         * modules/md4 (EXTRA_DIST): Add md4.h.
142727         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
142728         * modules/read-file (EXTRA_DIST): Add read-file.h.
142729         * modules/readline (EXTRA_DIST): Add readline.h.
142730         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
142731         rijndael-api-fst.h.
142733 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
142735         * m4/rijndael.m4 (gl_ARCFOUR):
142736         * m4/arctwo.m4 (gl_ARCTWO):
142737         * m4/check-version.m4 (gl_CHECK_VERSION):
142738         * m4/crc.m4 (gl_CRC):
142739         * m4/des.m4 (gl_DES):
142740         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
142741         * m4/gc.m4 (gl_GC):
142742         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
142743         * m4/getline.m4 (gl_FUNC_GETLINE):
142744         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
142745         * m4/hmac-md5.m4 (gl_HMAC_MD5):
142746         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
142747         * m4/md2.m4 (gl_MD2):
142748         * m4/md4.m4 (gl_MD4):
142749         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
142750         * m4/read-file.m4 (gl_FUNC_READ_FILE):
142751         * m4/readline.m4 (gl_FUNC_READLINE):
142752         * m4/rijndael.m4 (gl_RIJNDAEL):
142753         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
142754         to get the necessary .h files and whatnot.
142756 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
142758         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
142759         gnulib rather than the other way around.
142760         * config/srclistvars.sh (COREUTILS): Remove.
142762 2006-08-22  Jim Meyering  <jim@meyering.net>
142764         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
142766         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
142768 2006-08-22  Eric Blake  <ebb9@byu.net>
142770         * modules/regexprops-generic: New file.
142771         * MODULES.html.sh (Support for building documentation): List it.
142773 2006-08-22  Eric Blake  <ebb9@byu.net>
142775         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
142776         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
142777         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
142778         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
142780 2006-08-22  Bruno Haible  <bruno@clisp.org>
142782         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
142783         and lib_LTLIBRARIES like the other lib_* variables.
142785 2006-08-22  Bruno Haible  <bruno@clisp.org>
142787         * build-aux/x-to-1.in: New file, from GNU gettext.
142789 2006-08-22  Bruno Haible  <bruno@clisp.org>
142791         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
142792         <utmpx.h> exists.
142794 2006-08-22  Bruno Haible  <bruno@clisp.org>
142796         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
142797         <utmpx.h> exists.
142799 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
142801         BeOS portability.
142802         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
142803         exist.
142804         Problem reported by Bruno Haible.
142806 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
142808         Avoid the need for AC_LIBSOURCES in m4 macros.
142809         * modules/acl (EXTRA_DIST): Add acl.h.
142810         * modules/argmatch (Files): Add m4/argmatch.m4.
142811         (configure.ac): Add gl_ARGMATCH.
142812         (EXTRA_DIST): Renamed from lib_SOURCES, for
142813         consistency with the other modules.  Remove argmatch.c.
142814         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
142815         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
142816         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
142817         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
142818         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
142819         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
142820         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
142821         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
142822         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
142823         * modules/closeout (EXTRA_DIST): Add closeout.h.
142824         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
142825         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
142826         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
142827         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
142828         dirname.h; remove basename.c and stripslash.c.
142829         * modules/exclude (EXTRA_DIST): Add exclude.h.
142830         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
142831         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
142832         * modules/file-type (EXTRA_DIST): Add file-type.h.
142833         * modules/filemode (EXTRA_DIST): Add filemode.h.
142834         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
142835         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
142836         * modules/fpending (EXTRA_DIST): Add __fpending.h.
142837         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
142838         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
142839         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
142840         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
142841         * modules/getdate (EXTRA_DIST): Add getdate.c.
142842         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
142843         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
142844         * modules/getpass (EXTRA_DIST): Add getpass.h.
142845         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
142846         * modules/group-member (EXTRA_DIST): Add group-member.h.
142847         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
142848         * modules/hash (EXTRA_DIST): Add hash.h.
142849         * modules/human (EXTRA_DIST): Add human.h.
142850         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
142851         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
142852         * modules/lchown (EXTRA_DIST): Add lchown.h.
142853         * modules/long-options (EXTRA_DIST): Add long-options.h.
142854         * modules/lstat (EXTRA_DIST): Add lstat.h.
142855         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
142856         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
142857         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
142858         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
142859         * modules/memxor (EXTRA_DIST): Add memxor.h.
142860         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
142861         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
142862         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
142863         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
142864         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
142865         * modules/physmem (EXTRA_DIST): Add physmem.h.
142866         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
142867         * modules/posixver (EXTRA_DIST): Add posixver.h.
142868         * modules/quote (EXTRA_DIST): Add quote.h.
142869         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
142870         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
142871         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
142872         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
142873         regex_internal.h regexec.c.
142874         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
142875         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
142876         * modules/same (EXTRA_DIST): Add same.h.
142877         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
142878         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
142879         * modules/savedir (EXTRA_DIST): Add savedir.h.
142880         * modules/sha1 (EXTRA_DIST): Add sha1.h.
142881         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
142882         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
142883         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
142884         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
142885         * modules/strdup (EXTRA_DIST): Add strdup.h.
142886         * modules/strftime (EXTRA_DIST): Add strftime.h.
142887         * modules/strndup (EXTRA_DIST): Add strndup.h.
142888         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
142889         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
142890         * modules/time_r (EXTRA_DIST): Add time_r.h.
142891         * modules/timespec (EXTRA_DIST): Add timespec.h.
142892         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
142893         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
142894         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
142895         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
142896         * modules/userspec (EXTRA_DIST): Add userspec.h.
142897         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
142898         * modules/utimens (EXTRA_DIST): Add utimens.h.
142899         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
142900         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
142901         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
142902         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
142903         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
142904         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
142905         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
142906         * modules/yesno (EXTRA_DIST): Add yesno.h.
142908 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
142910         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
142912         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
142913         * m4/dev-ino.m4, same-inode.m4: Remove.
142915         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
142916         * m4/acl.m4 (AC_FUNC_ACL):
142917         * m4/backupfile.m4 (gl_BACKUPFILE):
142918         * m4/c-strtod.m4 (gl_C99_STRTOLD):
142919         * m4/canon-host.m4 (gl_CANON_HOST):
142920         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
142921         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
142922         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
142923         * m4/cloexec.m4 (gl_CLOEXEC):
142924         * m4/close-stream.m4 (gl_CLOSE_STREAM):
142925         * m4/closeout.m4 (gl_CLOSEOUT):
142926         * m4/dirfd.m4 (gl_FUNC_DIRFD):
142927         * m4/dirname.m4 (gl_DIRNAME):
142928         * m4/exclude.m4 (gl_EXCLUDE):
142929         * m4/exitfail.m4 (gl_EXITFAIL):
142930         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
142931         * m4/file-type.m4 (gl_FILE_TYPE):
142932         * m4/filemode.m4 (gl_FILEMODE):
142933         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
142934         * m4/fpending.m4 (gl_FUNC_FPENDING):
142935         * m4/fprintftime.m4 (gl_FPRINTFTIME):
142936         * m4/fts.m4 (gl_FUNC_FTS):
142937         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
142938         * m4/getdate.m4 (gl_GETDATE):
142939         * m4/gethrxtime.m4 (gl_GETHRXTIME):
142940         * m4/getpagesize.m4 (gl_GETPAGESIZE):
142941         * m4/getpass.m4 (gl_FUNC_GETPASS):
142942         * m4/gettime.m4 (gl_GETTIME):
142943         * m4/getugroups.m4 (gl_GETUGROUPS):
142944         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
142945         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
142946         * m4/hard-locale.m4 (gl_HARD_LOCALE):
142947         * m4/hash.m4 (gl_HASH):
142948         * m4/idcache.m4 (gl_IDCACHE):
142949         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
142950         * m4/lchown.m4 (gl_FUNC_LCHOWN):
142951         * m4/long-options.m4 (gl_LONG_OPTIONS):
142952         * m4/lstat.m4 (gl_FUNC_LSTAT):
142953         * m4/md5.m4 (gl_MD5):
142954         * m4/memcasecmp.m4 (gl_MEMCASECMP):
142955         * m4/memcoll.m4 (gl_MEMCOLL):
142956         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
142957         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
142958         * m4/memxor.m4 (gl_MEMXOR):
142959         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
142960         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
142961         * m4/modechange.m4 (gl_MODECHANGE):
142962         * m4/mountlist.m4 (gl_MOUNTLIST):
142963         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
142964         * m4/openat.m4 (gl_FUNC_OPENAT):
142965         * m4/pathmax.m4 (gl_PATHMAX):
142966         * m4/physmem.m4 (gl_PHYSMEM):
142967         * m4/posixtm.m4 (gl_POSIXTM):
142968         * m4/posixver.m4 (gl_POSIXVER):
142969         * m4/quote.m4 (gl_QUOTE):
142970         * m4/quotearg.m4 (gl_QUOTEARG):
142971         * m4/readtokens.m4 (gl_READTOKENS):
142972         * m4/readutmp.m4 (gl_READUTMP):
142973         * m4/regex.m4 (gl_REGEX):
142974         * m4/safe-read.m4 (gl_SAFE_READ):
142975         * m4/safe-write.m4 (gl_SAFE_WRITE):
142976         * m4/same.m4 (gl_SAME):
142977         * m4/save-cwd.m4 (gl_SAVE_CWD):
142978         * m4/savedir.m4 (gl_SAVEDIR):
142979         * m4/settime.m4 (gl_SETTIME):
142980         * m4/sha1.m4 (gl_SHA1):
142981         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
142982         * m4/stat-macros.m4 (gl_STAT_MACROS):
142983         * m4/stat-time.m4 (gl_STAT_TIME):
142984         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
142985         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
142986         * m4/strdup.m4 (gl_FUNC_STRDUP):
142987         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
142988         * m4/strndup.m4 (gl_FUNC_STRNDUP):
142989         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
142990         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
142991         * m4/time_r.m4 (gl_TIME_R):
142992         * m4/timespec.m4 (gl_TIMESPEC):
142993         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
142994         * m4/unlinkdir.m4 (gl_UNLINKDIR):
142995         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
142996         * m4/userspec.m4 (gl_USERSPEC):
142997         * m4/utimecmp.m4 (gl_UTIMECMP):
142998         * m4/utimens.m4 (gl_UTIMENS):
142999         * m4/xalloc.m4 (gl_XALLOC):
143000         * m4/xgetcwd.m4 (gl_XGETCWD):
143001         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
143002         * m4/xreadlink.m4 (gl_XREADLINK):
143003         * m4/xstrtod.m4 (gl_XSTRTOD):
143004         * m4/yesno.m4 (gl_YESNO):
143005         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
143006         to get the necessary .h files and whatnot.
143008 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
143009             Bruno Haible  <bruno@clisp.org>
143011         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
143012         /bin/sh understanding of '!' conditional negation.
143014 2006-08-21  Jim Meyering  <jim@meyering.net>
143016         * modules/openat (Depends-on): Really alphabetize.
143018         * modules/acl (Depends-on): Add error and quote.
143020         * check-module (find_included_lib_files): Add at-func.c to the
143021         ok-to-include-more-than-once white list.
143023         * modules/openat (Depends-on): Add lstat.  Alphabetize.
143025 2006-08-21  Bruno Haible  <bruno@clisp.org>
143027         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
143028         Emit a pkgdata_DATA variable only if some snippets add contents to it.
143029         Reported by Martin Lambers <marlam@marlam.de>.
143031 2006-08-21  Bruno Haible  <bruno@clisp.org>
143033         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
143034         specify an installation location, don't emit a noinst_LIBRARIES or
143035         noinst_LTLIBRARIES assignment.
143037 2006-08-21  Bruno Haible  <bruno@clisp.org>
143039         BeOS portability.
143040         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
143041         BeOS has mbrtowc() but no <wctype.h>.
143043 2006-08-21  Bruno Haible  <bruno@clisp.org>
143045         BeOS portability.
143046         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
143047         exist.
143049 2006-08-21  Bruno Haible  <bruno@clisp.org>
143051         BeOS portability.
143052         * lib/mbchar.h: Include <wctype.h> only if it exists.
143054 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
143056         Remove files that are no longer needed by their respective modules.
143057         * m4/obstack.m4: Remove.
143058         * m4/strerror_r.m4: Remove.
143059         * m4/uint32_t.m4: Remove.
143060         * m4/uintptr_t.m4: Remove.
143061         * m4/ullong_max.m4: Remove.
143062         * m4/xstrtoimax.m4: Remove.
143063         * m4/xstrtoumax.m4: Remove.
143065         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
143066         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
143067         dependencies now capture this.
143069         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
143070         Do not use AC_LIBSOURCES, since gnulib modules now do this.
143071         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
143072         * m4/human.m4 (gl_HUMAN): Likewise.
143073         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
143074         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
143076         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
143078         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
143079         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
143080         stdint.
143081         * m4/human.m4 (gl_HUMAN): Likewise.
143082         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
143083         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
143084         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
143085         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
143086         * m4/xstrtol (gl_XSTRTOL): Likewise.
143088         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
143089         AC_TYPE_LONG_LONG_INT.
143090         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
143091         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
143092         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
143093         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
143095         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
143096         on stdbool.
143098         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
143099         (gl_PREREQ_XSTRTOUL): Remove.
143101         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
143103         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
143104         mode.
143106 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
143108         Add and change modules to make it easier for coreutils to use
143109         gnulib-tool.
143110         * modules/backupfile (Files): Remove m4/d-ino.m4.
143111         (Depends-on): Add d-ino.
143112         * modules/cycle-check (Depends-on): Add stdint.
143113         (lib_SOURCES): Add cycle-check.h.
143114         * modules/d-ino: New module.
143115         * modules/d-type: New module.
143116         * modules/error (Files): Remove m4/strerror_r.m4.
143117         * modules/filemode (Files): Add m4/st_dm_mode.m4.
143118         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
143119         m4/inttypes_h.m4, m4/uintmax_t.m4.
143120         (Depends-on): Add stdint.
143121         (lib_SOURCES): Add fsusage.h.
143122         * modules/getcwd (Files): Remove d-ino.m4.
143123         (Depends-on): Add d-ino.
143124         * modules/getndelim2 (Depends-on): Add stdint.
143125         * modules/glob (Files): Remove m4/d-type.m4.
143126         (Depends-on): Add d-type.
143127         * modules/host-os: New module.
143128         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
143129         m4/inttypes_h.m4, m4/uintmax_t.m4.
143130         * Depends-on: Add stdint.
143131         (lib_SOURCES): Add human.h.
143132         * modules/inttostr (Files): Remove m4/intmax_t.m4,
143133         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
143134         m4/uintmax_t.m4, m4/ulonglong.m4.
143135         (Depends-on): Add stdint.
143136         (EXTRA_DIST): Add inttostr.h.
143137         * modules/lchmod: New module.
143138         * modules/link-follow: New module.
143139         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
143140         (Depends-on): Add lchmod.
143141         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
143142         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
143143         (Depends-on): Add stdint.
143144         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
143145         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
143146         (Depends-on): Add stdint.
143147         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
143148         * modules/perl: New module.
143149         * modules/regex (Depends-on): Add stdint.
143150         * modules/rmdir-errno: New module.
143151         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
143152         m4/intmax_t.m4.
143153         (Depends-on): Add stdint.
143154         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
143155         m4/uintmax_t.m4.
143156         (Depends-on): Add stdint.
143157         * modules/unlink-busy: New module.
143158         * modules/utimecmp (Depends-on): Add stdint.
143159         * modules/uptime: New module.
143160         * modules/winsz-ioctl: New module.
143161         * modules/winsz-termios: New module.
143162         * modules/xnanosleep (Depends-on): Add nanosleep.
143163         * modules/ullong_max: Remove.
143164         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
143165         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
143166         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
143167         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
143168         (Depends-on): Add inttypes.
143169         (lib_SOURCES): Add xstrtol.h.
143170         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
143171         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
143172         * MODULES.html.sh: Move 'assert' into the assert section.
143173         Move 'dummy' into the linking section.
143174         Remove ullong_max.
143175         Add section for compatibility checks for POSIX:2001 functions,
143176         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
143177         winsz-ioctl, and winsz-termios into it.
143178         Add lchmod.
143179         Add top-level Misc section and put host-os, perl, and uptime
143180         into it.
143182 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
143184         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
143185         now assume the stdint module.  Do not include inttypes.h.
143186         * lib/fsusage.h: Likewise.
143187         * lib/getndelim2.c: Likewise.
143188         * lib/human.h: Likewise.
143189         * lib/inttostr.h: Likewise.
143190         * lib/obstack.c: Likewise.
143191         * lib/regex_internal.h: Likewise.
143192         * lib/tempname.c: Likewise.
143193         * lib/utimecmp.c: Likewise.
143194         * lib/xstrtol.h: Likewise.
143196         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
143198         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
143199         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
143200         * lib/xtime.h: Likewise.
143202 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
143204         * modules/openat (Files): Add lib/fchmodat.c.
143205         Fixes problem reported by Jay Youngman.
143207 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
143209         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
143210         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
143212 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
143213             Bruno Haible  <bruno@clisp.org>
143215         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
143216         and is a script that invokes bison. Tighten the code. Add comments.
143218 2006-08-18  Jim Meyering  <jim@meyering.net>
143220         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
143221         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
143222         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
143223         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
143225 2006-08-18  Bruno Haible  <bruno@clisp.org>
143227         * modules/bison-i18n: New file.
143228         * MODULES.html.sh (Internationalization functions): Add it.
143230 2006-08-18  Bruno Haible  <bruno@clisp.org>
143232         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
143233         sys/statvfs.h. When getmntinfo was found, check its declaration and
143234         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
143236 2006-08-18  Bruno Haible  <bruno@clisp.org>
143238         * m4/bison-i18n.m4: New file, from bison.
143240 2006-08-18  Bruno Haible  <bruno@clisp.org>
143242         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
143243         (ME_DUMMY): Treat "kernfs" as a dummy.
143244         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
143246 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
143248         Update from coreutils.
143250         2006-08-15  Jim Meyering  <jim@meyering.net>
143252         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
143254         2006-01-17  Jim Meyering  <jim@meyering.net>
143256         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
143258         2006-01-11  Jim Meyering  <jim@meyering.net>
143260         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
143261         Check for the lchmod function.
143263 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
143265         Update from coreutils.
143267         * lib/__fpending.h: Add copyright notice.
143268         * lib/fprintftime.h: Likewise.
143269         * lib/savedir.c: Use (C) in copyright notice.
143270         * lib/savedir.h: Likewise.
143272         2006-08-15  Jim Meyering  <jim@meyering.net>
143274         * lib/at-func.c: New file, with the logic of all emulated at-functions.
143275         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
143276         in support of the EXPECTED_ERRNO macro.
143277         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
143278         definitions.  Instead, define the appropriate symbols and include
143279         "at-func.c".
143280         * lib/mkdirat.c (mkdirat): Likewise.
143281         * lib/fchmodat.c (fchmodat): Likewise.
143282         (ENOSYS): Remove definition.
143283         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
143284         it.  Don't include "unistd--.h" -- it wasn't ever used.
143286         2006-01-17  Jim Meyering  <jim@meyering.net>
143288         Rewrite fts.c not to change the current working directory,
143289         by using openat, fstatat, fdopendir, etc..
143291         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
143292         (HAVE_OPENAT_SUPPORT): Define.
143293         [_LIBC] (fchdir): Don't undef or define; no longer used.
143294         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
143295         Now, this `function' always succeeds, and consumes its file descriptor
143296         parameter -- so callers must not close such FDs.  Update callers.
143297         (diropen_fd, opendirat, cwd_advance_fd): New functions.
143298         (diropen): Add parameter, SP.  Adjust all callers.
143299         Implement using diropen_fd, rather than open.
143300         (fts_open): Initialize new member, fts_cwd_fd.
143301         Remove fts_rft-setting code.
143302         (fts_close): Close fts_cwd_fd, if necessary.
143303         (__opendir2): Define in terms of opendir or opendirat,
143304         depending on whether the FST_NOCHDIR flag is set.
143305         (fts_build): Since fts_safe_changedir consumes its FD, and since
143306         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
143307         and close the dup'd file descriptor upon failure.
143308         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
143309         (fts_safe_changedir): Tweak semantics to reflect that this function
143310         now calls cwd_advance_fd and hence consumes its FD argument.
143311         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
143312         [struct FTS] (fts_rft): Remove now-unused member.
143313         [struct FTS] (fts_cycle.state): Improve comment.
143315         * lib/openat.c (openat_needs_fchdir): New function.
143316         * lib/openat.h (openat_needs_fchdir): Declare it.
143318 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
143320         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
143321         Problem and fix reported by Pádraig Brady in
143322         <http://lists.gnu.org/r/bug-coreutils/2006-08/msg00099.html>.
143324 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
143326         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
143328 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
143330         * lib/memcoll.c (memcoll): Optimize for the common case where the
143331         arguments are bytewise equal.
143333 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
143335         * doc/regexprops-generic.texi: Add a copyright notice.
143337 2006-08-15  Bruno Haible  <bruno@clisp.org>
143339         * modules/tmpdir (License): Change to LGPL.
143341 2006-08-15  Bruno Haible  <bruno@clisp.org>
143343         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
143344         module.
143346 2006-08-14  Simon Josefsson  <jas@extundo.com>
143348         * config/srclist.txt: Add gnupload.
143350 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
143352         Change copyright notice from LGPL 2 to GPL 2, since that's the
143353         standard form used in the gnulib repository.
143354         * tests/test-lock.c: Likewise.
143355         * tests/test-stdint.c: Likewise.
143356         * tests/test-tls.c: Likewise.
143358         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
143359         prelude-manager.  User shorter URLs for GNU projects, without '?'.
143360         Add copyright notice.
143362         * check-module: Add copyright notice.  Output a copyright
143363         notice if "--version" is specified.
143364         * modules/COPYING: New file.
143365         * tests/test-getaddrinfo.c: Add copyright notice.
143366         * tests/test-verify.c: Likewise.
143368 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
143370         Change copyright notice from LGPL 2 to GPL 2, since that's the
143371         standard form used in the gnulib repository.
143372         * lib/lock.c: LGPL -> GPL.
143373         * lib/lock.h: Likewise.
143374         * lib/strnlen1.c: Likewise.
143375         * lib/strnlen1.h: Likewise.
143376         * lib/tls.c: Likewise.
143377         * lib/tls.h: Likewise.
143378         * lib/tmpdir.c: Likewise.
143380         * lib/TODO: Remove; this belongs only in coreutils.
143382 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
143384         Add copyright notices to long-enough files that lack them, since
143385         otherwise the files aren't clearly free.  Use the same notice that
143386         getdate.texi already uses.
143387         * doc/alloca-opt.texi: Add copyright notice.
143388         * doc/alloca.texi: Likewise.
143389         * doc/ctime.texi: Likewise.
143390         * doc/functions.texi: Likewise.
143391         * doc/gcd.texi: Likewise.
143392         * doc/gnulib-tool.texi: Likewise.
143393         * doc/inet_ntoa.texi: Likewise.
143394         * doc/visibility.texi: Likewise.
143396         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
143397         * doc/quote.texi: Add copyright notice.
143399         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
143400         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
143401         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
143402         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
143403         is now obsolete, and give a pointer to the Sun list.
143404         Add copyright notice.
143406 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
143408         * config/srclistvars.sh: Add copyright notice.
143410 2006-08-14  Eric Blake  <ebb9@byu.net>
143412         Import the following change from libc:
143414         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
143416         Upstream bug 2997.
143417         * lib/misc/error.c: Add space between program name and message if file
143418         name is missing.
143420 2006-08-12  Karl Berry  <karl@gnu.org>
143422         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
143423         remove, these originate in gnulib now.
143425 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
143427         * doc/Makefile (standards.info standards.html standards.dvi):
143428         Also depend on make-stds.texi.
143430 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
143432         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
143433         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
143435         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
143436         in wchar_t.  Problem reported by Eric Blake.
143438         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
143439         LEN is smaller than SIZE.  Suggested by Bruno Haible.
143440         Also, help the compiler to keep LEN in a register.
143442 2006-08-11  Eric Blake  <ebb9@byu.net>
143444         * users.txt: Sort.  Add tar.
143446 2006-08-11  Bruno Haible  <bruno@clisp.org>
143448         * users.txt: New file.
143450 2006-08-11  Bruno Haible  <bruno@clisp.org>
143452         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
143453         before <wchar.h>. Needed for OSF/1 and BSD/OS.
143455 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
143457         * modules/snprintf (Depends-on): Remove minmax.
143458         (Maintainer): Add self and Bruno.
143460 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
143462         * lib/.cppi-disable: Add snprintf.h, socket_.h.
143463         * lib/snprintf.c: Include <errno.h> and <limits.h>.
143464         (EOVERFLOW): Define if the system does not.
143465         Do not include "minmax.h"; it wasn't used.
143466         (snprintf): Don't assume size_t promotes to an unsigned type.
143467         Fix bug when generated string was too long for the buffer: the
143468         buffer's contents are supposed to be the initial prefix of the
143469         output.  Don't assume vasnprintf returns EOVERFLOW if the size
143470         exceeds INT_MAX; do the check ourselves.
143472         Import the following changes from libc:
143474         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
143476         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
143477         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
143478         set wc to the byte which couldn't be converted.
143479         (re_string_reconstruct): Don't clear valid_raw_len before calling
143480         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
143481         tip_context using re_string_context_at.
143483         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
143485         * lib/posix/regex.h: g++ still cannot handled [restrict].
143487         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
143489         * lib/posix/regex.h: Remove special handling for VMS.
143491 2006-08-10  Jim Meyering  <jim@meyering.net>
143493         * modules/same-inode: New module.
143494         * modules/dev-ino: New module.
143495         * modules/cycle-check: Depend on these modules, rather than simply
143496         including their .h files.
143497         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
143498         required via m4/cycle-check.m4.
143499         * modules/same: Depend on new same-inode module, rather than
143500         including same-inode.h.
143501         * modules/chdir-safer: New file.
143503         * modules/chown (Depends-on): Add stat-macros.
143505 2006-08-10  Jim Meyering  <jim@meyering.net>
143507         * m4/cycle-check.m4: New file.
143508         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
143509         * m4/dev-ino.m4, m4/same-inode.m4: New files.
143511 2006-08-10  Eric Blake  <ebb9@byu.net>
143513         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
143514         in from original proposal.
143516 2006-08-10  Eric Blake  <ebb9@byu.net>
143517         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
143519         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
143520         namespace.
143522 2006-08-10  Bruno Haible  <bruno@clisp.org>
143524         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
143525         as well.
143527 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
143529         Sync from coreutils.
143531         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
143533         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
143534         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
143536 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
143538         * modules/restrict: Remove; no longer needed now that we assume
143539         Autoconf 2.59 or later.
143540         * MODULES.html.sh: Remove 'restrict'.
143541         * modules/argp (Depends-on): Remove 'restrict'.
143542         * modules/base64 (Depends-on): Likewise.
143543         * modules/gc (Depends-on): Likewise.
143544         * modules/getaddrinfo (Depends-on): Likewise.
143545         * modules/glob (Depends-on): Likewise.
143546         * modules/inet_ntop (Depends-on): Likewise.
143547         * modules/inet_pton (Depends-on): Likewise.
143548         * modules/memxor (Depends-on): Likewise.
143549         * modules/regex (Depends-on): Likewise.
143550         * modules/strtok_r (Depends-on): Likewise.
143551         * modules/time_r (Depends-on): Likewise.
143553 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
143555         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
143556         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
143557         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
143558         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
143559         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
143560         * m4/memxor.m4 (gl_MEMXOR): Likewise.
143561         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
143562         gl_C_RESTRICT replaced by AC_C_RESTRICT.
143564         Merge from coreutils.
143565         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
143566         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
143567         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
143568         * m4/time_r.m4 (gl_TIME_R): Likewise.
143570 2006-08-09  Karl Berry  <karl@gnu.org>
143572         * config/srclist.txt: no more gettext-tools, per Bruno.
143574 2006-08-08  Eric Blake  <ebb9@byu.net>
143576         * modules/verror: New module.
143577         * MODULES.html.sh: Document it.
143579 2006-08-08  Eric Blake  <ebb9@byu.net>
143581         * lib/verror.h, lib/verror.c: New files.
143583 2006-08-08  Eric Blake  <ebb9@byu.net>
143585         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
143586         verror_at_line output complies with GNU Coding Standards even when
143587         file is NULL.
143589 2006-08-07  Bruno Haible  <bruno@clisp.org>
143591         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
143592         versions of AIX.
143593         Reported by Ralf Wildenhues.
143595 2006-08-07  Bruno Haible  <bruno@clisp.org>
143597         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
143598         in an AC_DEFUN. Needed so that the autoconf snippets can use
143599         AC_REQUIRE.
143601 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
143603         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
143604         Initialize pkgdata_DATA.
143605         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
143606         overriding it.
143608 2006-08-06  Eric Blake  <ebb9@byu.net>
143610         * lib/error.h: Fold in some upstream changes from glibc.
143611         * lib/error.c: Likewise.
143613 2006-08-04  Bruno Haible  <bruno@clisp.org>
143615         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
143616         Make the mostlyclean-local rule depend on mostlyclean-generic.
143617         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
143619 2006-07-31  Bruno Haible  <bruno@clisp.org>
143621         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
143622         <stdlib.h>, <string.h>.
143624 2006-07-30  Bruno Haible  <bruno@clisp.org>
143626         * modules/readlink (License): Change to LGPL.
143628 2006-07-30  Bruno Haible  <bruno@clisp.org>
143630         * modules/javaversion (Makefile.am): Distribute javaversion.java and
143631         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
143632         set PKGDATADIR to point to it.
143634 2006-07-30  Bruno Haible  <bruno@clisp.org>
143636         * modules/csharpexec (configure.ac): Comment out macro invocation.
143637         * modules/javaexec (configure.ac): Likewise.
143638         * modules/javacomp-script (configure.ac): Likewise.
143640         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
143642 2006-07-30  Bruno Haible  <bruno@clisp.org>
143644         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
143645         linked-list.
143647 2006-07-30  Bruno Haible  <bruno@clisp.org>
143649         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
143651 2006-07-30  Bruno Haible  <bruno@clisp.org>
143653         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
143654         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
143655         get removed.
143657 2006-07-29  Bruno Haible  <bruno@clisp.org>
143659         Make it possible for gnulib-tool to work with locally modified or
143660         augmented gnulib repositories.
143661         * gnulib-tool (func_usage): Document --local-dir option.
143662         (local_gnulib_dir): New variable.
143663         Handle --local-dir option.
143664         (func_lookup_file): New function.
143665         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
143666         (func_get_description, func_get_filelist, func_get_description,
143667         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
143668         func_get_automake_snippet, func_get_include_directive,
143669         func_get_license, func_get_maintainer): Use func_lookup_file.
143670         (func_import, func_create_testdir): Use func_lookup_file.
143672 2006-07-29  Bruno Haible  <bruno@clisp.org>
143674         * modules/setenv (Depends-on): Add unistd.
143676 2006-07-29  Bruno Haible  <bruno@clisp.org>
143678         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
143680 2006-07-29  Bruno Haible  <bruno@clisp.org>
143682         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
143684 2006-07-29  Bruno Haible  <bruno@clisp.org>
143686         * gnulib-tool (import, update): If there is no Makefile.am, look at
143687         aclocal.m4, instead of bailing out.
143689 2006-07-29  Bruno Haible  <bruno@clisp.org>
143691         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
143692         Categorize the options by when they are useful.
143694 2006-07-29  Bruno Haible  <bruno@clisp.org>
143696         * gnulib-tool (func_usage): Document option --no-libtool.
143697         Handle option --no-libtool.
143698         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
143699         for changed semantics of $libtool variable.
143700         (func_import): Likewise. If libtool is not used, show this through
143701         an option --no-libtool.
143702         (func_create_testdir): Update.
143704 2006-07-29  Bruno Haible  <bruno@clisp.org>
143706         * gnulib-tool (func_import): Extend error message about missing
143707         --doc-base.
143709 2006-07-29  Bruno Haible  <bruno@clisp.org>
143711         * gnulib-tool (func_import): Don't create the $docbase directory if
143712         there is no file to store there.
143714 2006-07-29  Bruno Haible  <bruno@clisp.org>
143716         * gnulib-tool (autoconf_minversion): If a --dir option is given and
143717         relevant, look for configure.ac there, not in the current directory.
143718         Also use a simple search for AC_PREREQ, not "autoconf --trace".
143720 2006-07-29  Bruno Haible  <bruno@clisp.org>
143722         * gnulib-tool (SORT): New variable.
143723         (func_usage): Undocument --assume-autoconf option.
143724         Remove --assume-autoconf option handling.
143725         (autoconf_minversion): Determine from the contents of configure.ac.
143726         (func_import): Remove autoconf_minversion handling.
143727         Suggested by Eric Blake.
143729 2006-07-29  Bruno Haible  <bruno@clisp.org>
143731         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
143733 2006-07-29  Bruno Haible  <bruno@clisp.org>
143735         * config/srclist.txt (*setenv.[ch]): Remove rules.
143737 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
143739         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
143741 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
143743         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
143744         arpa/inet.h.
143746 2006-07-28  Simon Josefsson  <jas@extundo.com>
143748         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
143749         * modules/inet_pton (Depends-on): Likewise.
143751 2006-07-28  Simon Josefsson  <jas@extundo.com>
143753         * m4/netinet_in_h.m4: New file.
143755 2006-07-28  Simon Josefsson  <jas@extundo.com>
143757         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
143758         #include's.
143760 2006-07-28  Simon Josefsson  <jas@extundo.com>
143762         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
143763         #include's.
143765 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
143767         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
143768         setgid on directories only if they set these bits.
143769         * lib/modechange.h: Remove obsolete comment about masks.
143771 2006-07-28  Eric Blake  <ebb9@byu.net>
143773         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
143774         macro expansion.
143776 2006-07-28  Bruno Haible  <bruno@clisp.org>
143778         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
143780 2006-07-28  Bruno Haible  <bruno@clisp.org>
143782         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
143784 2006-07-28  Bruno Haible  <bruno@clisp.org>
143786         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
143787         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
143788         Define fallbacks.
143789         Avoids link error on FreeBSD 4.x.
143790         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
143792         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
143793         encoding.
143794         * lib/mbswidth.c (iswcntrl): Likewise.
143796 2006-07-27  Bruno Haible  <bruno@clisp.org>
143798         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
143799         test.
143801 2006-07-27  Bruno Haible  <bruno@clisp.org>
143803         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
143804         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
143805         defined.
143807 2006-07-26  Eric Blake  <ebb9@byu.net>
143809         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
143811 2006-07-26  Eric Blake  <ebb9@byu.net>
143813         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
143814         like mingw that lack mkstemp.
143815         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
143816         avoid compilation warning on mingw.
143818 2006-07-26  Bruno Haible  <bruno@clisp.org>
143820         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
143821         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
143822         INT_FAST*_MIN, INTPTR_MIN.
143824 2006-07-25  Bruno Haible  <bruno@clisp.org>
143826         * modules/version-etc (Depends-on): Add stdarg.
143828 2006-07-25  Bruno Haible  <bruno@clisp.org>
143830         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
143831         complex commands.
143833 2006-07-25  Bruno Haible  <bruno@clisp.org>
143835         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
143836         defined in <stdarg.h> or config.h.
143838 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
143840         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
143841         (gl_STDIO_SAFER): Remove.
143843 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
143845         * MODULES.html.sh (File stream based Input/Output):
143846         Add fopen-safer, tmpfile-safer; remove stdio-safer.
143847         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
143848         * modules/fopen-safer, modules/tmpfile-safer: New files.
143849         * modules/stdio-safer: Remove.
143851 2006-07-24  Bruno Haible  <bruno@clisp.org>
143853         * modules/tmpdir: New file.
143854         * MODULES.html.sh (File system functions): Add it.
143856 2006-07-24  Bruno Haible  <bruno@clisp.org>
143858         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
143859         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
143861 2006-07-24  Bruno Haible  <bruno@clisp.org>
143863         * modules/clean-temp: New file.
143865 2006-07-24  Bruno Haible  <bruno@clisp.org>
143867         * m4/tmpdir.m4: New file, from GNU gettext.
143869 2006-07-24  Bruno Haible  <bruno@clisp.org>
143871         * lib/tmpdir.h: New file, from GNU gettext.
143872         * lib/tmpdir.c: New file, from GNU gettext.
143874 2006-07-24  Bruno Haible  <bruno@clisp.org>
143876         * lib/clean-temp.h: New file, from GNU gettext.
143877         * lib/clean-temp.c: New file, from GNU gettext.
143879 2006-07-23  Eric Blake  <ebb9@byu.net>
143881         * modules/stdio-safer (Files): Add tmpfile-safer.c.
143882         (Depends-on): Add binary-io.
143884 2006-07-23  Eric Blake  <ebb9@byu.net>
143886         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
143888 2006-07-23  Eric Blake  <ebb9@byu.net>
143890         * lib/tmpfile-safer.c: New file.
143891         * lib/stdio-safer.h (fopen_safer): Add prototype.
143892         * lib/stdio--.h (tmpfile): Make safer.
143894 2006-07-23  Bruno Haible  <bruno@clisp.org>
143896         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
143897         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
143898         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
143899         gl_linked_remove_at): Use it.
143901 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
143902         and Simon Josefsson <jas@extundo.com>
143904         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
143906         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
143908 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
143910         * modules/close-stream: New file.
143911         * modules/closeout (Description): Make it clear that it exits
143912         with a diagnostic on error.
143913         (Depends-on): Add close-stream.  Remove fpending, stdbool.
143914         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
143916 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
143918         * m4/close-stream.m4: New file.
143920 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
143922         * lib/close-stream.c, lib/close-stream.h: New files.
143924 2006-07-22  Bruno Haible  <bruno@clisp.org>
143926         Merge from GNU gettext 0.15.
143928         2006-05-01  Bruno Haible  <bruno@clisp.org>
143930                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
143932         2006-07-22  Bruno Haible  <bruno@clisp.org>
143934                 * modules/javaversion: New file.
143935                 * MODULES.html.sh (Java): Add javaversion.
143937         2006-03-12  Bruno Haible  <bruno@clisp.org>
143939                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
143941         2005-12-04  Bruno Haible  <bruno@clisp.org>
143943                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
143944                 (untested).
143946         2006-06-21  Bruno Haible  <bruno@clisp.org>
143948                 Avoid warnings from recent versions of mcs.
143949                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
143950                 -o, -L, -r any more. Use options documented since mcs-1.0
143951                 instead. Similarly for -g.
143953         2005-12-04  Bruno Haible  <bruno@clisp.org>
143955                 * build-aux/csharpcomp.sh.in: Suffix for resources is
143956                 .resources, not .resource.
143958         2005-07-09  Bruno Haible  <bruno@clisp.org>
143960                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
143961                 add a .dll suffix.
143962                 Reported by Mark Junker <mjscod@gmx.de>.
143964         2006-07-22  Bruno Haible  <bruno@clisp.org>
143966                 * modules/gettext: Upgrade to gettext-0.15.
143967                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
143968                 m4/visibility.m4.
143969                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
143971 2006-07-22  Bruno Haible  <bruno@clisp.org>
143973         Merge from GNU gettext 0.15.
143975         2006-03-25  Bruno Haible  <bruno@clisp.org>
143977                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
143979         2006-07-21  Bruno Haible  <bruno@clisp.org>
143981                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
143982                 "1.1".
143984         2006-05-09  Bruno Haible  <bruno@clisp.org>
143986                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
143987                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
143988                 for the conftestver execution.
143990         2006-05-01  Bruno Haible  <bruno@clisp.org>
143992                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
143993                 optional target-version argument. Verify that the compiler
143994                 groks source of the specified source-version, or add -source
143995                 option as necessary. Verify that the compiler produces
143996                 bytecode in the specified target-version, or add -target and
143997                 -source options as necessary. Make the result of the test
143998                 available as variable CONF_JAVAC. Also log error output in
143999                 config.log.
144001         2006-03-11  Bruno Haible  <bruno@clisp.org>
144003                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
144005         2006-05-09  Bruno Haible  <bruno@clisp.org>
144007                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
144008                 CLASSPATH_SEPARATOR to a semicolon.
144010         2006-03-12  Bruno Haible  <bruno@clisp.org>
144012                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
144013                 available as variable CONF_JAVA, for subsequent autoconf
144014                 tests. Also log error output in config.log.
144016         2006-07-19  Bruno Haible  <bruno@clisp.org>
144018                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
144019                 that getline works on glibc2 systems. Needed to avoid trouble
144020                 in relocatable.c.
144021                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
144023         2005-12-04  Bruno Haible  <bruno@clisp.org>
144025                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
144026                 launcher (untested).
144028         2005-12-04  Bruno Haible  <bruno@clisp.org>
144030                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
144032         2006-07-22  Bruno Haible  <bruno@clisp.org>
144034                 * gettext.m4: Update from GNU gettext-0.15.
144035                 * nls.m4: Likewise.
144036                 * po.m4: Likewise.
144037                 * inttypes-pri.m4: Likewise.
144038                 * inttypes-h.m4: Renamed from inttypes.m4.
144039                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
144041 2006-07-22  Bruno Haible  <bruno@clisp.org>
144043         Merge from GNU gettext 0.15.
144045         2005-07-05  Bruno Haible  <bruno@clisp.org>
144047                 * printf-args.c (printf_fetchargs): Work around broken
144048                 definition of wint_t on mingw.
144050         2005-02-12  Bruno Haible  <bruno@clisp.org>
144052                 * xallocsa.h: Add extern "C" for C++.
144054         2006-05-17  Bruno Haible  <bruno@clisp.org>
144056                 Cygwin portability.
144057                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
144059         2006-04-30  Bruno Haible  <bruno@clisp.org>
144061                 * progreloc.c: Include <mach-o/dyld.h> if available.
144062                 (find_executable): Use _NSGetExecutablePath when possible.
144064         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
144066                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
144067                 function.
144069         2005-12-29  Bruno Haible  <bruno@clisp.org>
144071                 * progreloc.c (set_program_name_and_installdir): Fix
144072                 compilation error.
144074         2005-12-04  Bruno Haible  <bruno@clisp.org>
144076                 Cygwin portability.
144077                 * progreloc.c: Include <windows.h> also on Cygwin.
144078                 (find_executable): Add support for Cygwin.
144079                 (set_program_name_and_installdir): Handle also platforms with
144080                 nonempty EXEEXT.
144082         2006-07-11  Bruno Haible  <bruno@clisp.org>
144084                 * javacomp.c: Fix a comment.
144085                 Reported by Jim Meyering.
144087         2006-04-30  Bruno Haible  <bruno@clisp.org>
144089                 * javacomp.h (compile_java_class): Add source_version,
144090                 target_version arguments.
144091                 * javacomp.c: Rewritten to choose only a compiler that
144092                 respects the specified source_version and target_version.
144094         2006-06-27  Bruno Haible  <bruno@clisp.org>
144096                 Assume correct S_ISDIR macro.
144097                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
144099         2006-07-22  Bruno Haible  <bruno@clisp.org>
144101                 * javaversion.h: New file, from GNU gettext.
144102                 * javaversion.c: New file, from GNU gettext.
144103                 * javaversion.java: New file, from GNU gettext.
144104                 * javaversion.class: New file, from GNU gettext.
144106         2006-05-17  Bruno Haible  <bruno@clisp.org>
144108                 Cygwin portability.
144109                 * javaexec.c (execute_java_class): Test for jview program
144110                 also on Cygwin.
144112         2006-04-09  Bruno Haible  <bruno@clisp.org>
144114                 * fatal-signal.c: Don't include string.h.
144115                 (at_fatal_signal): Use a copying loop instead of memcpy.
144117         2005-12-04  Bruno Haible  <bruno@clisp.org>
144119                 * csharpexec.c: Add support for 'clix' launcher (untested).
144120                 (execute_csharp_using_sscli): New function.
144121                 (execute_csharp_program): Call it.
144123         2006-06-21  Bruno Haible  <bruno@clisp.org>
144125                 Avoid warnings from recent versions of mcs.
144126                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
144127                 -o, -L, -r any more. Use options documented since mcs-1.0
144128                 instead. Similarly for -g.
144130         2005-07-09  Bruno Haible  <bruno@clisp.org>
144132                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
144133                 add a .dll suffix.
144134                 Reported by Mark Junker <mjscod@gmx.de>.
144136         2006-06-17  Bruno Haible  <bruno@clisp.org>
144138                 * config.charset: Update for NetBSD 3.0.
144140         2006-05-17  Bruno Haible  <bruno@clisp.org>
144142                 Cygwin portability.
144143                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
144145         2006-05-16  Bruno Haible  <bruno@clisp.org>
144147                 * localcharset.c [CYGWIN]: Include <windows.h>.
144148                 (get_charset_aliases): For Cygwin, return the same CPxxx
144149                 aliases list as under WIN32.
144150                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
144151                 the environment variables. Fall back to GetACP().
144153         2006-04-05  Bruno Haible  <bruno@clisp.org>
144155                 * config.charset: Update Juan Manuel Guerrero's address.
144157         2005-02-12  Bruno Haible  <bruno@clisp.org>
144159                 * allocsa.h: Add extern "C" for C++.
144161         2005-02-10  Bruno Haible  <bruno@clisp.org>
144163                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
144164                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
144166         2006-07-22  Bruno Haible  <bruno@clisp.org>
144168                 * gettext.h: Update to GNU gettext-0.15.
144170 2006-07-22  Bruno Haible  <bruno@clisp.org>
144172         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
144173         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
144174         lib-prefix.m4, longdouble.m4, ssize_t.m4.
144176 2006-07-21  Eric Blake  <ebb9@byu.net>
144178         * modules/stdlib-safer: New file.
144179         * MODULES.html.sh (File stream based Input/Output): Add
144180         stdlib-safer.
144182 2006-07-21  Eric Blake  <ebb9@byu.net>
144184         * lib/stdlib-safer.h: New file from coreutils, required by
144185         stdlib--.h.
144187 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
144189         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
144191 2006-07-20  Bruno Haible  <bruno@clisp.org>
144193         * gnulib-tool: Recognize new option --assume-autoconf.
144194         (autoconf_minversion): New variable.
144195         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
144197 2006-07-20  Bruno Haible  <bruno@clisp.org>
144199         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
144201 2006-07-19  Derek R. Price  <derek@ximbiot.com>
144203         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
144204         Reindent and repaginate.
144206 2006-07-19  Derek Price  <derek@ximbiot.com>
144208         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
144209         Correct grammar.
144211 2006-07-17  Bruno Haible  <bruno@clisp.org>
144213         * modules/list: New file.
144214         * modules/array-list: New file.
144215         * modules/carray-list, modules/carray-list-tests: New files.
144216         * modules/linked-list, modules/linked-list-tests: New files.
144217         * modules/avltree-list, modules/avltree-list-tests: New files.
144218         * modules/rbtree-list, modules/rbtree-list-tests: New files.
144219         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
144220         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
144221         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
144222         * modules/oset: New file.
144223         * modules/array-oset: New file.
144224         * modules/avltree-oset, modules/avltree-oset-tests: New files.
144225         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
144226         * tests/test-carray_list.c: New file.
144227         * tests/test-linked_list.c: New file.
144228         * tests/test-avltree_list.c: New file.
144229         * tests/test-rbtree_list.c: New file.
144230         * tests/test-linkedhash_list.c: New file.
144231         * tests/test-avltreehash_list.c: New file.
144232         * tests/test-rbtreehash_list.c: New file.
144233         * tests/test-avltree_oset.c: New file.
144234         * tests/test-rbtree_oset.c: New file.
144235         * MODULES.html.sh (Container data structures): New section.
144237 2006-07-17  Bruno Haible  <bruno@clisp.org>
144239         * m4/gl_list.m4: New file.
144241 2006-07-17  Bruno Haible  <bruno@clisp.org>
144243         * lib/gl_list.h: New file.
144244         * lib/gl_list.c: New file.
144245         * lib/gl_array_list.h: New file.
144246         * lib/gl_array_list.c: New file.
144247         * lib/gl_carray_list.h: New file.
144248         * lib/gl_carray_list.c: New file.
144249         * lib/gl_linked_list.h: New file.
144250         * lib/gl_linked_list.c: New file.
144251         * lib/gl_anylinked_list1.h: New file.
144252         * lib/gl_anylinked_list2.h: New file.
144253         * lib/gl_avltree_list.h: New file.
144254         * lib/gl_avltree_list.c: New file.
144255         * lib/gl_anyavltree_list1.h: New file.
144256         * lib/gl_anyavltree_list2.h: New file.
144257         * lib/gl_rbtree_list.h: New file.
144258         * lib/gl_rbtree_list.c: New file.
144259         * lib/gl_anyrbtree_list1.h: New file.
144260         * lib/gl_anyrbtree_list2.h: New file.
144261         * lib/gl_anytree_list1.h: New file.
144262         * lib/gl_anytree_list2.h: New file.
144263         * lib/gl_linkedhash_list.h: New file.
144264         * lib/gl_linkedhash_list.c: New file.
144265         * lib/gl_anyhash_list1.h: New file.
144266         * lib/gl_anyhash_list2.h: New file.
144267         * lib/gl_avltreehash_list.h: New file.
144268         * lib/gl_avltreehash_list.c: New file.
144269         * lib/gl_rbtreehash_list.h: New file.
144270         * lib/gl_rbtreehash_list.c: New file.
144271         * lib/gl_anytreehash_list1.h: New file.
144272         * lib/gl_anytreehash_list2.h: New file.
144274         * lib/gl_oset.h: New file.
144275         * lib/gl_oset.c: New file.
144276         * lib/gl_array_oset.h: New file.
144277         * lib/gl_array_oset.c: New file.
144278         * lib/gl_avltree_oset.h: New file.
144279         * lib/gl_avltree_oset.c: New file.
144280         * lib/gl_rbtree_oset.h: New file.
144281         * lib/gl_rbtree_oset.c: New file.
144282         * lib/gl_anytree_oset.h: New file.
144284 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
144286         * m4/mkancesdirs.m4: New file.
144287         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
144288         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
144289         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
144290         it.
144292 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
144294         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
144295         * lib/mkancesdirs.h: New files.
144296         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
144297         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
144298         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
144299         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
144300         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
144301         callers changed.  Revamp internals significantly, by not
144302         attempting to create directories that are temporarily more
144303         permissive than the final results.  Do not attempt to use
144304         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
144305         This removes some race conditions, fixes some bugs, and simplifies
144306         things.  Use new dirchownmod function to do owner and mode changes.
144307         * lib/mkdir-p.h: Likewise.
144308         * lib/modechange.c (octal_to_mode): New function.
144309         (struct mode_change): New member mentioned.
144310         (make_node_op_equals): New arg mentioned.  All callers changed.
144311         (mode_compile): Keep track of which mode bits the user has explicitly
144312         mentioned.
144313         (mode_adjust): New arg DIR, so that we implement the X op correctly.
144314         New arg PMODE_BITS, to keep track of which mode bits the user
144315         mentioned; it treats S_ISUID and S_ISGID speciall.
144316         All callers changed.
144317         * lib/modechange.h: Likewise.
144319 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
144321         * MODULES.html.sh: Add mkancestors.
144322         * modules/mkancesdirs: New module.
144323         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
144324         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
144325         The chdir-safer and afs files are now orphans; I'll remove them
144326         unless someone speaks up.
144327         Add lib/dirchownmod.c, lib/dirchownmod.h.
144328         (Depends-on): Remove alloca, chown, save-cwd, dirname.
144329         Add lchown, mkancesdirs.
144330         (Maintainer): Add self.
144332 2006-07-15  Karl Berry  <karl@gnu.org>
144334         * gnulib-tool: help message wording/arrangement.
144336 2006-07-14  Simon Josefsson  <jas@extundo.com>
144338         * doc/gnulib.texi (Libtool and Windows): New section.
144340 2006-07-12  Simon Josefsson  <jas@extundo.com>
144342         * modules/gendocs (License): Fix license, approved by Karl.
144344 2006-07-12  Eric Blake  <ebb9@byu.net>
144346         * MODULES.html.sh: Add gendocs.
144348 2006-07-11  Eric Blake  <ebb9@byu.net>
144350         * modules/fdl: New module, to install doc/fdl.texi.
144351         * MODULES.html.sh: Add new section for documentation modules.
144352         * gnulib-tool: Avoid space-tab.
144353         (--doc-base): New option, to manage files from doc.
144355 2006-07-11  Eric Blake  <ebb9@byu.net>
144357         * m4/absolute-header.m4: Fix comments to match recent change.
144359 2006-07-11  Eric Blake  <ebb9@byu.net>
144361         * gnulib-tool: List --doc-base before --tests-base.
144363 2006-07-11  Derek R. Price  <derek@ximbiot.com>
144365         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
144367 2006-07-11  Bruno Haible  <bruno@clisp.org>
144369         * README: Mention where to put documentation.
144371 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
144373         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
144375 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
144377         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
144378         to stdint.m4.
144380 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
144382         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
144383         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
144384         "no/such/file/stdint.h" when there is no such file, so that
144385         the resulting C code can be parsed by dodgy compilers.
144386         Problems reported by Bob Proulx.
144388 2006-07-10  Derek R. Price  <derek@ximbiot.com>
144390         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
144391         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
144392         macros into the GNU _D_EXACT_NAMLEN.
144393         * lib/savedir.c:  Likewise.
144394         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
144396 2006-07-10  Derek R. Price  <derek@ximbiot.com>
144397         and Paul Eggert  <eggert@cs.ucla.edu>
144399         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
144400         * m4/savedir.m4:
144401         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
144402         macros into the GNU _D_EXACT_NAMLEN.
144404 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
144406         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
144407         around the absolute name, to work around a problem with the HP-UX
144408         11.23 native C compiler, reported by Bob Proulx.
144410 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
144412         * doc/maintain.texi, make-stds.texi: Sync from
144413         <http://savannah.gnu.org/projects/gnustandards>.
144415 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
144417         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
144419 2006-07-09  Jim Meyering  <jim@meyering.net>
144421         * m4/glob.m4: Remove a doubled word in a comment.
144423 2006-07-09  Jim Meyering  <jim@meyering.net>
144425         * lib/argp-pv.c: Remove a doubled word in a comment.
144426         * lib/check-version.c (check_version): Likewise.
144427         * lib/javacomp.c (compile_java_class): Likewise.
144429 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
144431         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
144432         for the benefit of people using Autoconf 2.60.  If you want to
144433         support older Autoconf versions you can copy m4/onceonly_2_57.m4
144434         (or m4/onceonly.m4, if pre-2.57) manually.
144436 2006-07-08  Jim Meyering  <jim@meyering.net>
144438         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
144439         comment.
144440         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
144441         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
144442         comment.
144444 2006-07-08  Jim Meyering  <jim@meyering.net>
144446         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
144448 2006-07-07  Simon Josefsson  <jas@extundo.com>
144450         * tests/test-crc.c: Change expected crc value, the test vector
144451         were probably computed using the old broken crc.c?
144453 2006-07-06  Simon Josefsson  <jas@extundo.com>
144455         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
144456         now the canonical place for the M4 file).
144458         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
144459         from the sys_socket dependency now.
144461         * modules/inet_pton (Files): Ditto.
144463         * modules/inet_ntop (Files): Ditto.
144465 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
144467         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
144468         not gl_PREREQ_GETUSERSHELL.
144470 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
144472         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
144473         with only one argument, for Autoconf 2.60.
144474         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
144475         expand to nothing, so add a shell command to avoid syntax error.
144476         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
144478 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
144480         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
144482 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
144484         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
144485         no longer needed.  Check for isblank decl.
144486         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
144487         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
144488         of existence.
144490 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
144492         * lib/getloadavg.c: Use __VMS, not VMS.
144493         * lib/getopt.c: Likewise.
144494         * lib/getpagesize.h: Likewise.
144495         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
144496         and probably does not work.
144498 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
144500         * lib/.cppi-disable: Add wcwidth.
144501         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
144502         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
144503         (ISGRAPH): Remove.  All uses changed to isgraph.
144504         (FOLD) [!defined _LIBC]: Remove special case.
144505         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
144506         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
144507         HAVE_ISBLANK.
144508         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
144509         case.
144511 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
144513         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
144514         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
144515         brackets.  Other minor changes to suppress some compiler
144516         warnings.
144518 2006-07-06  Derek R. Price  <derek@ximbiot.com>
144519         and Paul Eggert  <eggert@cs.ucla.edu>
144521         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
144522         of invoking obsolescent AC_HEADER_DIRENT macro.
144523         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
144524         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
144525         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
144526         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
144527         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
144528         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
144529         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
144530         * m4/readdir.m4: Remove; no longer needed.
144532 2006-07-06  Derek R. Price  <derek@ximbiot.com>
144533         and Paul Eggert  <eggert@cs.ucla.edu>
144535         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
144536         Don't worry about this obsolete case any more.
144537         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
144538         directories.
144539         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
144540         worry about this obsolete case any more.
144541         * lib/fts.c: Likewise.
144542         * lib/getcwd.c: Likewise.
144543         * lib/glob.h: Likewise.
144544         * lib/savedir.c: Likewise.
144546 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
144548         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
144549         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
144550         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
144551         needed.
144552         All uses removed.
144553         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
144554         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
144555         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
144556         needed.
144557         * m4/getdate.m4 (gl_GETDATE): Likewise.
144558         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
144559         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
144560         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
144561         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
144562         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
144563         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
144564         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
144565         needed.
144567 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
144569         * lib/memcasecmp.c: Include <limits.h>.
144570         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
144571         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
144572         Don't assume isdigit succeeds only on '0' through '9'.
144574 2006-07-05  Eric Blake  <ebb9@byu.net>
144576         * modules/getaddrinfo (Depends-on): Add snprintf.
144578 2006-07-05  Eric Blake  <ebb9@byu.net>
144580         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
144581         to avoid 'header present but could not be compiled' on cygwin.
144583 2006-07-05  Eric Blake  <ebb9@byu.net>
144585         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
144586         missing from netdb.h.
144587         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
144589 2006-07-05  Derek R. Price  <derek@ximbiot.com>
144591         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
144592         no longer needed.
144593         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
144594         * m4/getdate.m4 (gl_GETDATE): Likewise.
144595         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
144596         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
144597         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
144598         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
144599         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
144601 2006-07-05  Derek R. Price  <derek@ximbiot.com>
144603         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
144604         All uses of is_space replaced by isspace.
144605         * lib/exit.h: Don't talk about STDC_HEADERS.
144606         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
144607         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
144608         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
144609         replaced by isprint etc.
144610         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
144611         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
144612         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
144613         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
144614         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
144615         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
144617 2006-07-05  Bruno Haible  <bruno@clisp.org>
144619         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
144620         the function exists, before testing against AIX.
144621         Reported by Martin Lambers <marlam@marlam.de>.
144623 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
144625         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
144626         From Mark D. Baushke.
144628 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
144630         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
144631         to the absolute name, not just one, to bypass Sun C 5.8's
144632         "warning: #include of /usr/include/... may be non-portable".
144634 2006-07-04  Eric Blake  <ebb9@byu.net>
144636         * modules/dirname-tests: New test module.
144637         * tests/test-dirname.c: New file, replacing dirname.c
144638         TEST_DIRNAME section that was recently deleted.
144640 2006-07-04  Bruno Haible  <bruno@clisp.org>
144642         Assume ANSI C header files and <ctype.h> functions.
144643         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
144644         (mbsnwidth): Use isprint, iscntrl instead.
144646 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
144648         Merge from coreutils.
144649         * MODULES.html.sh: Add xstrtold.
144650         * modules/xstrtold: New file.
144651         * modules/cycle-check (Files): Add lib/same-inode.h.
144652         * modules/dirname (Files): Add m4/double-slash-root.m4.
144653         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
144654         * modules/mkdir-p (Files): Add lib/same-inode.h.
144655         * modules/same (Files): Add lib/same-inode.h.
144657 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
144659         * m4/absolute-header.m4: Renamed from full-header-path.m4.
144660         This is to keep the terminology clean; POSIX talks about
144661         "absolute pathnames", not "full pathnames", but the GNU
144662         Coding Standards say to use "path" for something else;
144663         so use "absolute" to keep both sides happy.
144664         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
144665         Set gl_absolute_header, not gl_full_header_path.
144666         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
144667         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
144668         All uses changed.
144670         Merge from coreutils.
144672         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
144674         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
144675         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
144676         want to require the building of c-strtod.o.
144677         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
144678         needs -lm directly.
144679         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
144681         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
144683         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
144684         --as-needed option if available.  Problem reported by Albert Chin in
144685         <http://lists.gnu.org/r/bug-gnulib/2006-06/msg00114.html>.
144686         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
144687         cc merely issues a bunch of annoying warnings for --as-needed
144688         (this problem was reported by Bob Proulx).  Also, try linking with
144689         -lm to detect a bug in binutils 2.16 (this problem was reported
144690         by Ralf Wildenhues).
144692         2006-06-18  Jim Meyering  <jim@meyering.net>
144694         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
144695         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
144696         macro.
144697         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
144698         also check for glibc-2.4's abort-inducing bug.
144700         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
144701         Low-probability clean-up should be to use rmdir to get rid of
144702         the just-created directory, not unlink.
144704         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
144705         configure fail, and request a bug report to inform us about it.
144706         Add a comment that, barring reports to the contrary, in 2007 we'll
144707         assume ftruncate is universally available.
144709         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
144711         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
144713         2006-03-12  Jim Meyering  <jim@meyering.net>
144715         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
144716         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
144717         * m4/same.m4 (gl_SAME): Likewise.
144718         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
144720         2006-03-11  Eric Blake  <ebb9@byu.net>
144722         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
144723         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
144724         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
144725         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
144727 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
144729         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
144730         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
144731         reported by Mark D. Baushke, one in
144732         <http://lists.gnu.org/r/bug-gnulib/2006-07/msg00015.html>.
144734         Merge from coreutils.
144736         * lib/.cppi-disable: Add stdint_.h.
144737         * lib/.cvsignore: Add stdint.h.
144739         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
144741         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
144742         both double and long double versions.
144743         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
144744         * lib/xstrtold.c: New file.
144745         * lib/xstrtod.h (xstrtold): New decl.
144747         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
144749         * lib/filemode.c (setst): Remove.
144750         (strmode): Rewrite to avoid setst.  This makes the code shorter,
144751         (arguably) clearer, and the generated code is a bit smaller on my
144752         Debian GNU/Linux stable x86 host.
144754         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
144756         * lib/filemode.c: Include "filemode.h" first, to test the interface.
144757         Assume that filemode.h includes sys/types.h and sys/stat.h.
144758         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
144759         (ftypelet): Reorder to put common cases first, for efficiency.
144760         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
144761         to do 'M'.
144762         (strmode): Renamed from mode_string, and now stores 12 bytes instead
144763         of 10, for compatibility with FreeBSD.  All callers changed.
144764         (filemodestring): Now stores 12 bytes instead of 10, and sets file
144765         types that can't be deduced solely from st_mode.  First arg is now a
144766         const pointer.
144767         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
144768         (strmode): Renamed from mode_string.
144769         (filemodestring): New decl.
144770         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
144771         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
144772         needed.
144773         (S_ISPORT, S_ISWHT): New macros, if not already defined.
144775         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
144777         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
144778         fsusage.h now does that.  Include fsusage.h first, to test interface.
144779         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
144780         at most one method (the old code could have generated decls that
144781         didn't conform to C89, not that this was ever exercised).
144782         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
144784         2006-03-19  Jim Meyering  <jim@meyering.net>
144786         Work even in a chroot where d_ino values for entries in "/"
144787         don't match the stat.st_ino values for the same names.
144788         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
144789         number, iterate through all entries again, using lstat instead.
144790         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
144791         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
144793         * lib/getcwd.c (__getcwd): Clarify a comment.
144794         Use memcpy in place of a call to strcpy.
144796         2006-03-12  Jim Meyering  <jim@meyering.net>
144798         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
144799         matches that of the current directory (which we're about to chdir ".."
144800         out of), then save the dev-ino of the parent, instead.
144802         * lib/same-inode.h (SAME_INODE): New file/macro.
144803         * lib/chdir-safer.c (SAME_INODE): Remove definition.
144804         Include "same-inode.h", instead.
144805         * lib/same.c: Likewise.
144806         * lib/cycle-check.h: Include "same-inode.h".
144807         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
144808         * lib/cycle-check.c (SAME_INODE): Remove definition.
144809         * lib/root-dev-ino.h: Include "same-inode.h".
144811         2006-03-11  Eric Blake  <ebb9@byu.net>
144813         * lib/same.c (same_name): s/base_name/last_component/
144814         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
144815         * lib/filenamecat.c (file_name_concat): Likewise.
144817         2006-03-11  Eric Blake  <ebb9@byu.net>,
144818                     Paul Eggert  <eggert@cs.ucla.edu>
144820         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
144821         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
144822         drive prefix.
144823         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
144824         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
144825         (last_component): New method.
144826         * lib/dirname.c (dir_len): Determine when drive letters need a
144827         subsequent slash.  Preserve // when it is special.
144828         (dir_name): Don't append dot when drive letter is absolute.
144829         [TEST_DIRNAME]: Move into a full-blown gnulib test.
144830         * lib/basename.c (base_name): New semantics - malloc the result.
144831         Preserve // when it is special.  Preserve relative files that look
144832         like drive letters.
144833         (base_len): Preserve // when it is special.
144834         (last_component): New method, similar to old base_name semantics.
144835         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
144836         base_name.  Strip redundant slashes from ///.
144838 2006-07-03  Jim Meyering  <jim@meyering.net>
144840         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
144841         macro is used before the first cycle_check call.
144843 2006-07-03  Eric Blake  <ebb9@byu.net>
144845         * modules/dirname (Depends-on): Add xstrndup.
144847 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
144849         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
144850         test cases, so that config.log is a bit easier to follow.
144852 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
144854         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
144855         both are 64 bits, since this seems to be the tradition, and this
144856         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
144857         we ever run into a host that prefers long long to long in this
144858         case, we'll need another configure-time test.  Problem reported by
144859         Jim Meyering.
144861 2006-07-02  Eric Blake  <ebb9@byu.net>
144863         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
144865 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
144867         * modules/inttypes (Depends-on): No longer depends on stdint.
144868         * modules/stdint (Description): Say more about assumptions.
144869         Say that the fast types might differ.  Say macros are used.
144870         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
144871         (Makefile.am): Revise list of substituted symbols to match
144872         new stdint.m4.
144873         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
144874         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
144875         * tests/test-stdint.c (verify_same_types)
144876         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
144877         the code conforms to C99/C89.
144878         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
144879         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
144881 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
144883         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
144884         but fix a bug, by requiring at least 64 bits.
144885         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
144886         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
144887         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
144888         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
144890         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
144891         changes.  Make 2.59 a prerequisite.  Check and substitute for
144892         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
144893         inttypes.h.  Do not use special include files; just use the
144894         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
144895         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
144896         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
144897         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
144898         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
144899         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
144900         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
144901         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
144902         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
144903         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
144904         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
144905         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
144906         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
144907         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
144908         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
144909         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
144910         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
144911         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
144912         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
144913         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
144914         WINT_MAX.  Check for C99 conformance more strictly, by detecting
144915         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
144916         not check for things that C99 does not require, e.g., int8_t.  If
144917         a test isn't needed unless <stdint.h> isn't working, and is
144918         unlikely to be needed for any other reason, then don't do it
144919         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
144920         size_t, since we assume C89 freestanding at least.  Do not check
144921         for sig_atomic_t, wchar_t, or wint_t, since the code now does
144922         the right thing even if the types are not defined.  Instead use:
144923         (gl_STDINT_TYPE_PROPERTIES): New macro.
144924         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
144925         testing whether <sys/types.h> clashes, as Autoconf does this for
144926         us now.  All uses removed.
144927         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
144928         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
144929         (gl_CHECK_TYPE_SAME):
144930         Remove; no longer needed.
144931         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
144932         exists, since we'll return 0 anyway in that case.
144933         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
144935 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
144937         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
144938         possible collision with system files.
144939         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
144940         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
144941         WCHAR_MIN and WCHAR_MAX in this case.
144942         (<stddef.h>): Do not include; no longer needed.
144943         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
144944         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
144945         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
144946         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
144947         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
144948         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
144949         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
144950         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
144951         !defined(__c99))]: Include in this case too, since it's harmless
144952         now.
144953         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
144954         dangerous to do so.
144955         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
144956         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
144957         (_STDINT_MIN, _STDINT_MAX): New macros.
144958         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
144959         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
144960         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
144961         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
144962         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
144963         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
144964         macros, not typedefs; this simplifies things quite a bit.
144965         Use long int for all types narrower than int64_t.
144966         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
144967         Define in terms of long long int or int64_t or long int,
144968         not int64_t or int32_t.  This saves some compile-time testing.
144969         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
144970         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
144971         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
144972         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
144973         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
144974         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
144975         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
144976         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
144977         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
144978         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
144979         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
144980         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
144981         undef any previous version and define our own version, for
144982         simplicity and consistency with the new macros for types.
144983         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
144984         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
144985         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
144986         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
144987         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
144988         @WINT_T_SUFFIX@ to keep things simple here.
144989         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
144990         Simplify by assuming typical 8/16/32/64 host, since we're
144991         already doing that elsewhere anyway.
144992         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
144993         and assume long long int is 64 bits if available.  This
144994         speeds up 'configure'.
144996 2006-07-01  Eric Blake  <ebb9@byu.net>
144998         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
144999         Reported by Andreas Buening.
145001 2006-07-01  Eric Blake  <ebb9@byu.net>
145003         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
145005 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
145007         * lib/getaddrinfo.c: fixed typo
145009 2006-06-29  Jim Meyering  <jim@meyering.net>
145011         * modules/strftime (Maintainer): Add my name, since with the
145012         FPRINTFTIME changes strftime.c has forked from glibc.
145014 2006-06-29  Eric Blake  <ebb9@byu.net>
145016         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
145018 2006-06-29  Eric Blake  <ebb9@byu.net>
145020         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
145022 2006-06-29  Eric Blake  <ebb9@byu.net>
145024         * lib/stat_.h: New file.
145026 2006-06-29  Eric Blake  <ebb9@byu.net>
145028         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
145029         unused static function.
145031 2006-06-29  Eric Blake  <ebb9@byu.net>
145033         * doc/functions.texi (Function Portability): Document missing lstat
145034         on mingw.
145036 2006-06-29  Eric Blake  <ebb9@byu.net>
145038         * MODULES.html.sh: Add sys_stat.
145039         * modules/sys_stat: New module.
145040         * modules/mkstemp (Depends-on): Add sys_stat.
145042 2006-06-29  Derek R. Price  <derek@ximbiot.com>
145044         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
145046 2006-06-29  Derek R. Price  <derek@ximbiot.com>
145048         * m4/c-bs-a.m4: Removed.
145050 2006-06-29  Derek R. Price  <derek@ximbiot.com>
145052         * lib/strftime.c: Assume strftime() exists.
145054 2006-06-29  Derek Price  <derek@ximbiot.com>
145056         * modules/c-bs-a: Removed - \a is C89.
145057         * MODULES.html.sh: Remove c-bs-a.
145059 2006-06-29  Bruno Haible  <bruno@clisp.org>
145061         * modules/wcwidth (License): Change to LGPL.
145063 2006-06-28  Simon Josefsson  <jas@extundo.com>
145065         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
145066         on _WIN32.
145068         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
145069         getnameinfo.
145071 2006-06-28  Simon Josefsson  <jas@extundo.com>
145073         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
145075 2006-06-28  Simon Josefsson  <jas@extundo.com>
145077         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
145078         functions there.  It will succeed on Windows XP, but on Windows
145079         2000 and (presumably) earlier, it will fail, and use the internal
145080         re-implementation.
145081         (use_win32_p): New function.
145082         (getaddrinfo): Use strtoul on servname, to support numeric ports.
145083         Support AI_NUMERICSERV to disable getservbyname.
145084         (getnameinfo): New function, only supports
145085         NI_NUMERICHOST|NI_NUMERICSERV for now.
145087         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
145088         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
145089         getnameinfo.
145091 2006-06-28  Eric Blake  <ebb9@byu.net>
145093         * modules/wcwidth: New file.
145094         * modules/mbchar (Depends-on): Add wcwidth.
145095         * modules/mbswidth (Depends-on): Add wcwidth.
145096         * MODULES.html.sh: Add wcwidth.
145098 2006-06-28  Eric Blake  <ebb9@byu.net>
145100         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
145101         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
145103 2006-06-28  Eric Blake  <ebb9@byu.net>
145105         * lib/xvasprintf.h: Fix comments.
145107 2006-06-28  Eric Blake  <ebb9@byu.net>
145109         * lib/mbchar.h (wcwidth): Include wcwidth.h.
145110         * lib/mbswidth.c (wcwidth): Move from here...
145111         * lib/wcwidth.h: ...to this new file.
145113 2006-06-28  Derek R. Price  <derek@ximbiot.com>
145115         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
145117         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
145118         it's obsolete.
145119         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
145121 2006-06-28  Derek R. Price  <derek@ximbiot.com>
145123         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
145124         Autoconf 2.60 says this stuff was obsolete.
145126 2006-06-28  Bruno Haible  <bruno@clisp.org>
145128         * modules/wcwidth (Files): Add m4/wchar_t.m4.
145130 2006-06-28  Bruno Haible  <bruno@clisp.org>
145132         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
145133         gt_TYPE_WCHAR_T.
145135 2006-06-28  Bruno Haible  <bruno@clisp.org>
145137         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
145138         declaration for wcwidth.
145139         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctype.h>.
145141 2006-06-28  Bruno Haible  <bruno@clisp.org>
145143         * lib/mkdtemp.c [MINGW]: Include <io.h>.
145144         (mkdir): Define using _mkdir.
145146 2006-06-28  Bruno Haible  <bruno@clisp.org>
145148         * lib/getaddrinfo.h: Fix POSIX URL.
145149         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
145150         _WIN32.
145151         (use_win32_p): Make static.
145152         (getaddrinfo): Reject service name if it is empty or does not consist
145153         solely of decimal digits, or if its value is > 65535.
145154         (getnameinfo): Remove useless casts.
145156 2006-06-27  Simon Josefsson  <jas@extundo.com>
145158         * modules/sys_select: New file, suggested by Bruno Haible, Paul
145159         Eggert and Martin Lambers.
145161 2006-06-27  Simon Josefsson  <jas@extundo.com>
145163         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
145164         Eggert and Martin Lambers.
145166 2006-06-27  Bruno Haible  <bruno@clisp.org>
145168         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
145169         result to 0, not to empty.
145170         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
145172 2006-06-27  Bruno Haible  <bruno@clisp.org>
145174         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
145176 2006-06-26  Simon Josefsson  <jas@extundo.com>
145178         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
145179         present.
145181 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
145183         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
145184         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
145185         <http://lists.gnu.org/r/bug-gnulib/2006-06/msg00181.html>.
145187 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
145189         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
145191 2006-06-26  Bruno Haible  <bruno@clisp.org>
145193         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
145195 2006-06-26  Bruno Haible  <bruno@clisp.org>
145197         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
145199 2006-06-26  Bruno Haible  <bruno@clisp.org>
145201         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
145202         SGI C compiler in pre-C99 mode.
145203         Suggested by Mark D. Baushke and Larry Jones.
145205 2006-06-26  Bruno Haible  <bruno@clisp.org>
145207         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
145208         WCHAR_MAX.
145209         Reported by Mark D. Baushke and Larry Jones.
145211 2006-06-26  Bruno Haible  <bruno@clisp.org>
145213         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
145214         in pre-C99 mode.
145215         Suggested by Mark D. Baushke and Larry Jones.
145217 2006-06-23  Simon Josefsson  <jas@extundo.com>
145218             Bruno Haible  <bruno@clisp.org>
145220         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
145221         Emit mostlyclean-local rule.
145222         (func_emit_tests_Makefile_am): Likewise.
145223         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
145225 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
145227         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
145229 2006-06-23  Bruno Haible  <bruno@clisp.org>
145231         * tests/test-stdint.c: Update to match ISO C 99 Technical
145232         Corrigendum 1.
145234 2006-06-23  Bruno Haible  <bruno@clisp.org>
145236         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
145238 2006-06-23  Bruno Haible  <bruno@clisp.org>
145240         * lib/stdint_.h: Treat IRIX like OpenBSD.
145242 2006-06-23  Bruno Haible  <bruno@clisp.org>
145244         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
145245         ISO C 99 Technical Corrigendum 1.
145247 2006-06-22  Simon Josefsson  <jas@extundo.com>
145249         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
145250         MinGW.
145252 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
145254         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
145255         needed.  Some compiler complained about some of them.  Problem reported
145256         by Larry Jones in
145257         <http://lists.gnu.org/r/bug-gnulib/2006-06/msg00172.html>.
145259 2006-06-21  Simon Josefsson  <jas@extundo.com>
145261         * tests/test-getaddrinfo.c: New file.
145263         * modules/getaddrinfo-tests: New file.
145265         * MODULES.html.sh: Add inet_pton.
145267         * modules/inet_pton: New file.
145269 2006-06-21  Simon Josefsson  <jas@extundo.com>
145271         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
145272         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
145273         of using the (limited) gnulib implementation on Windows XP.
145275         * m4/inet_pton.m4: New file.
145277 2006-06-21  Simon Josefsson  <jas@extundo.com>
145279         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
145280         variable.
145282         * lib/socket_.h: Don't define WINVER.
145284         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
145285         slightly modified to work in gnulib.
145287 2006-06-21  Simon Josefsson  <jas@extundo.com>
145289         * doc/gnulib.texi (Windows sockets): Add.
145291 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
145293         * lib/read-file.c (fread_file): Start with buffer allocation of
145294         0 bytes rather than 1 byte; this simplifies the code.
145295         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
145296         code to free buffer and save/restore errno.
145297         (internal_read_file): Remove unused local.
145299 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
145301         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
145302         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
145303         Problem reported by Denis Excoffier in
145304         <http://lists.gnu.org/r/bug-tar/2006-06/msg00023.html>.
145306 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
145308         * modules/sys_socket, modules/socklen: Include sys/types since
145309         FreeBSD 4.x's sys/socket.h needs it.
145311 2006-06-19  Simon Josefsson  <jas@extundo.com>
145313         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
145315 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
145317         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
145319 2006-06-19  Bruno Haible  <bruno@clisp.org>
145321         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
145322         and FULL_PATH_INTTYPES_H in angle brackets.
145323         Reported by Mark D. Baushke <mdb@gnu.org>.
145325 2006-06-17  Eric Blake  <ebb9@byu.net>
145327         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
145328         errno.
145330 2006-06-17  Bruno Haible  <bruno@clisp.org>
145332         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
145333         <sys/inttypes.h>.
145335 2006-06-17  Bruno Haible  <bruno@clisp.org>
145337         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
145338         whether errno is declared. Assume <errno.h> declares errno.
145340 2006-06-17  Bruno Haible  <bruno@clisp.org>
145342         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
145344 2006-06-17  Bruno Haible  <bruno@clisp.org>
145346         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
145347         problem on Solaris 2.5.1.
145349 2006-06-16  Eric Blake  <ebb9@byu.net>
145351         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
145352         * lib/unicodeio.c [!defined errno]: Likewise.
145353         * lib/strtol.c [!defined errno]: Likewise.
145354         * lib/strtod.c [!defined errno]: Likewise.
145356 2006-06-15  Eric Blake  <ebb9@byu.net>
145358         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
145360 2006-06-15  Eric Blake  <ebb9@byu.net>
145362         * config/srclist.txt (ssize_t.m4): Lose sync.
145364 2006-06-15  Bruno Haible  <bruno@clisp.org>
145366         * modules/stdint (Files): Include m4/full-header-path.m4,
145367         m4/size_max.m4, m4/wchar_t.m4.
145368         (Makefile.am): Many more substitutions.
145369         * modules/stdint-tests: New file.
145370         * tests/test-stdint.c: New file.
145372 2006-06-15  Bruno Haible  <bruno@clisp.org>
145374         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
145375         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
145376         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
145377         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
145378         gl_CHECK_TYPE_SAME): New macros.
145380 2006-06-15  Bruno Haible  <bruno@clisp.org>
145382         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
145384 2006-06-15  Bruno Haible  <bruno@clisp.org>
145386         * lib/stdint_.h: Rewritten to be fully auto-configured.
145387         Fixes bug on HP-UX/IA64.
145389 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
145391         * lib/getdate.y (__attribute__): Don't define if already defined.
145392         Problem reported by Larry Jones.
145393         * lib/utimens.c (__attribute__): Likewise.
145395 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
145397         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
145398         reported by Andreas Schwab.
145400 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
145401             Bruno Haible  <bruno@clisp.org>
145403         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
145404         check for the declaration of strnlen and a run test that exposes the
145405         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
145406         rpl_strndup.
145408 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
145409             Bruno Haible  <bruno@clisp.org>
145411         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
145413 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
145415         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
145416         compile test, for Tru64 4.0D.
145418 2006-05-28  Karl Berry  <karl@gnu.org>
145420         * config/srclist.txt (printf-args.c): lose sync.
145422 2006-05-26  Martin Lambers  <marlam@marlam.de>
145424         * lib/getpass.c: Updates the test for the native W32 API, and adds
145425         missing includes, thus fixing compilation warnings.
145427 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
145429         * lib/exclude.c (exclude_fnmatch): New function.
145430         (excluded_file_name): Call exclude_fnmatch.
145431         * lib/exclude.h (excluded_file_name): New prototype
145433 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
145435         * lib/tempname.c (small_open, large_open): New macros.
145436         (__open, __open64) [!_LIBC]: Remove.
145437         (__gen_tempname): Use small_open and large_open instead of __open
145438         and __open64.  This fixes a portability bug on HP-UX 11.11i
145439         reported by Simon Wing-Tang in
145440         <http://lists.gnu.org/r/bug-coreutils/2006-05/msg00114.html>.
145442 2006-05-24  Bruno Haible  <bruno@clisp.org>
145444         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
145445         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
145446         Reported by Thorsten Maerz <torte@netztorte.de> via
145447         Aaron Stone <aaron@serendipity.cx>.
145449 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
145451         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
145452         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
145453         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
145454         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
145455         not really conditional on the cache.
145456         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
145458 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
145460         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
145461         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
145462         (my_usleep): Don't mishandle maximum value.
145464 2006-05-19  Jim Meyering  <jim@meyering.net>
145466         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
145468 2006-05-17  Bruno Haible  <bruno@clisp.org>
145470         Cygwin portability.
145471         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
145473 2006-05-17  Bruno Haible  <bruno@clisp.org>
145475         * lib/stdint_.h: Fix recognition of Cygwin.
145477 2006-05-15  Bruno Haible  <bruno@clisp.org>
145479         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
145480         on libtool patch by Ralf Wildenhues.
145482 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
145484         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
145485         test for C99 conformance; (bool) 0.5 is an integer constant
145486         expression, but (bool) -0.5 is not.  Problem reported by Fedor
145487         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
145489 2006-05-11  Simon Josefsson  <jas@extundo.com>
145491         * m4/xvasprintf.m4: Fix obvious typo.
145493 2006-05-11  Jim Meyering  <jim@meyering.net>
145495         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
145496         James Lemley.
145498 2006-05-10  Simon Josefsson  <jas@extundo.com>
145500         * lib/md4.c: Typo fix, update copyright years.
145501         (K1, K2): Don't use L because it turn computations into 64-bit on
145502         64-bit platforms.
145504 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
145506         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
145507         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
145508         unwanted sign propagation, e.g., on hosts with 64-bit int.
145509         There still are some problems with reeelly weird theoretical hosts
145510         (e.g., 33-bit int) but it's not worth worrying about now.
145511         * lib/sha1.c (rol): Likewise.
145512         (K1, K2, K3, K4): Remove unnecessary L suffix.
145514 2006-05-10  Bruno Haible  <bruno@clisp.org>
145516         * lib/des.c: Cast to avoid warnings.
145518 2006-05-09  Bruno Haible  <bruno@clisp.org>
145520         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
145521         (Depends-on): Depend also on xsize, stdarg.
145522         (configure.ac): Add gl_XVASPRINTF.
145524 2006-05-09  Bruno Haible  <bruno@clisp.org>
145526         * m4/xvasprintf.m4: New file.
145528 2006-05-09  Bruno Haible  <bruno@clisp.org>
145530         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
145531         (EOVERFLOW): Define fallback value.
145532         (xstrcat): New function.
145533         (xvasprintf): Recognize the special case of a string concatenation.
145535 2006-05-08  Eric Blake  <ebb9@byu.net>
145537         * gnulib-tool (func_version): Base copyright year on CVS date.
145538         (func_emit_copyright_notice): New function.
145539         (func_emit_lib_Makefile_am): Use it.
145540         (func_emit_tests_Makefile_am): Likewise.
145541         (func_import): Likewise.
145543 2006-05-08  Bruno Haible  <bruno@clisp.org>
145545         * modules/stdarg: New file.
145546         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
145548 2006-05-08  Bruno Haible  <bruno@clisp.org>
145550         * m4/stdarg.m4: New file, from GNU gettext.
145552 2006-05-08  Bruno Haible  <bruno@clisp.org>
145554         * config/srclist.txt (build-aux/config.rpath): different from latest
145555         release.
145557 2006-05-08  Bruno Haible  <bruno@clisp.org>
145559         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
145561 2006-05-05  Jim Meyering  <jim@meyering.net>
145563         * m4/warning.m4: New file, derived from bison's file by the same name.
145565 2006-05-03  Bruno Haible  <bruno@clisp.org>
145567         * lib/stdint_.h: Shorter URL.
145568         * lib/inttypes.h: Likewise.
145570 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
145572         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
145574 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
145576         * lib/verify.h: Document the internals better.  Most of this change
145577         was written by Bruno Haible.
145579 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
145581         * doc/verify.texi: New file, partly based on a proposal by
145582         Bruno Haible.
145584 2006-05-02  Bruno Haible  <bruno@clisp.org>
145586         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
145587         test from here...
145588         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
145590 2006-04-29  Bruno Haible  <bruno@clisp.org>
145592         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
145593         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
145595 2006-04-29  Bruno Haible  <bruno@clisp.org>
145597         * gnulib-tool: Make --update option actually work.
145599 2006-04-29  Bruno Haible  <bruno@clisp.org>
145601         * doc/gcd.texi: New file.
145602         * doc/gnulib.texi: Include it.
145604 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
145606         * lib/getdate.y (get_date): When adding relative date, start with the
145607         initial time, not with the result of the first mktime call.
145609 2006-04-25  Bruno Haible  <bruno@clisp.org>
145611         * gnulib-tool (func_import): Output the include directives in three
145612         blocks, sorted separately.
145613         Reported by Ben Pfaff <blp@cs.stanford.edu>.
145615 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
145617         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
145618         to define main with arguments, for C++.  Reported by Eric Blake.
145619         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
145620         Prefer 'int main ()' to 'int main (void)', for C++.
145621         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
145622         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
145623         for 'main', for C99 and C++.
145625 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
145627         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
145628         Don't assume that exit status -1 is valid.
145629         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
145630         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
145631         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
145632         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
145633         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
145634         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
145635         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
145636         functions can be used without declaring them, or that you can
145637         exit with status -1.
145638         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
145640 2006-04-24  Karl Berry  <karl@gnu.org>
145642         * config/srclist.txt (longdouble.m4): sync lost.
145644 2006-04-24  Eric Blake  <ebb9@byu.net>
145646         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
145648 2006-04-24  Bruno Haible  <bruno@clisp.org>
145650         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
145651         poll() implementation in AIX.
145652         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
145654 2006-04-24  Bruno Haible  <bruno@clisp.org>
145656         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
145657         assigned exactly once.
145659 2006-04-23  Claudio Fontana  <claudio@gnu.org>
145660             Bruno Haible  <bruno@clisp.org>
145662         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
145663         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
145664         for AM_CPPFLAGS.
145666 2006-04-23  Bruno Haible  <bruno@clisp.org>
145668         * modules/copy-file: Depend on unistd.
145669         * modules/execute: Likewise.
145670         * modules/fatal-signal: Likewise.
145671         * modules/findprog: Likewise.
145672         * modules/mkdtemp : Likewise.
145673         * modules/pipe: Likewise.
145674         * modules/wait-process: Likewise.
145676 2006-04-23  Bruno Haible  <bruno@clisp.org>
145678         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
145679         condition was already detected.
145680         Reported by Ben Pfaff <blp@cs.stanford.edu>.
145682 2006-04-23  Bruno Haible  <bruno@clisp.org>
145684         * lib/copy-file.c: Include <unistd.h> unconditionally.
145685         * lib/execute.c: Likewise.
145686         * lib/fatal-signal.c: Likewise.
145687         * lib/findprog.c: Likewise.
145688         * lib/mkdtemp.c: Likewise.
145689         * lib/pipe.h: Likewise.
145690         * lib/pipe.c: Likewise.
145691         * lib/wait-process.h: Likewise.
145693 2006-04-23  Bruno Haible  <bruno@clisp.org>
145695         * gnulib-tool (func_usage): Fix --import description. Document
145696         --update.
145697         (func_import): Create temporary file in a temporary directory, if
145698         --dry-run is specified. Silence errors from 'grep' when there are no
145699         m4 files in $m4dir.
145700         (func_create_testdir): Silence errors from 'grep' when there are no
145701         m4 files in $m4dir.
145702         Reported by Karl Berry <karl@freefriends.org>.
145704 2006-04-20  Bruno Haible  <bruno@clisp.org>
145706         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
145707         one argument, so that the code will be portable to Autoconf 2.60.
145708         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
145709         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
145710         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
145712 2006-04-19  Derek Price  <derek@ximbiot.com>
145713             Eric Blake  <ebb9@byu.net>
145715         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
145716         rather than "/full/path.h".  Update comment to match.  Shorten &
145717         generalize m4_translit call via AS_TR_CPP.
145719 2006-04-19  Derek Price  <derek@ximbiot.com>
145720             Eric Blake  <ebb9@byu.net>
145722         * lib/inttypes.h: Correct grammar in comment.
145724 2006-04-18  Derek Price  <derek@ximbiot.com>
145725             Paul Eggert  <eggert@cs.ucla.edu>
145727         * modules/inttypes: New file.
145728         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
145730 2006-04-18  Derek Price  <derek@ximbiot.com>
145731             Paul Eggert  <eggert@cs.ucla.edu>
145733         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
145734         New files.
145736 2006-04-18  Derek Price  <derek@ximbiot.com>
145737             Paul Eggert  <eggert@cs.ucla.edu>
145739         * lib/inttypes.h: New file.
145740         * lib/strtoimax.c: Assume <inttypes.h>.
145742 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
145744         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
145745         isn't mounted.  Problem reported by Kir Kolyshkin.
145747 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
145749         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
145750         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
145751         Derek R. Price.
145752         * lib/regex.h (RE_DUP_MAX): Update comment to match current
145753         implementation.
145755 2006-04-12  Eric Blake  <ebb9@byu.net>
145757         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
145758         is now done automatically by the corresponding Autoconf macro.
145760 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
145762         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
145763         time_r.h.
145765 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
145767         Merge regex changes from libc, removing some of our
145768         POSIX-conformance changes that were rejected and redoing them in a
145769         less-intrusive way.
145771         * lib/regcomp.c (re_compile_internal, init_dfa):
145772         Length arg is now size_t, not Idx.  All uses changed.
145773         (peek_token): Forward decl now says internal_function.
145774         (__re_error_msgid, __re_error_msgid_idx):
145775         Now static rather than extern with attribute_hidden.
145776         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
145777         For some reason libc prefers K&R style defns for external functions.
145778         (regerror) [!defined _LIBC]: Likewise.
145779         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
145780         (seek_collating_symbol_entry, lookup_collation_sequence_value):
145781         (build_range_exp, build_collating_symbol):
145782         Use K&R-style defn.
145783         (re_compile_fastmap): Use '\0' to memset, not 0.
145784         (utf8_sb_map): Make the calculations more obvious.
145785         (init_dfa, parse_bracket_exp, build_charclass_op):
145786         Call calloc and cast result, as glibc does.
145787         (init_word_char, fetch_token, peek_token, peek_token_bracket):
145788         (build_range_exp, build_collating_symbol):
145789         Now internal functions.
145791         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
145793         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
145794         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
145795         Don't depend on VMS; depend on __VMS instead, for POSIX
145796         namespace cleanness.
145797         (regoff_t): Define to ssize_t, not long int.
145799         Remove the REG_ macros named below.  Instead, make the old names
145800         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
145801         __USE_GNU_REGEX.
145802         (REG_BACKSLASH_ESCAPE_IN_LISTS):
145803         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
145804         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
145805         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
145806         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
145807         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
145808         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
145809         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
145810         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
145811         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
145812         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
145813         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
145814         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
145815         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
145816         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
145817         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
145818         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
145819         (REG_NREGS):
145820         Remove.  All uses replaced by the old RE_* names.
145821         (RE_BACKSLASH_ESCAPE_IN_LISTS):
145822         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
145823         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
145824         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
145825         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
145826         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
145827         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
145828         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
145829         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
145830         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
145831         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
145832         Don't bother having these macros be independent of each others'
145833         values, since they no longer exist in the POSIX name space.
145835         Rename the following member names back to their old names,
145836         unless !__USE_GNU_REGEX.  All uses changed back.
145837         (buffer): Renamed from re_buffer.
145838         (allocated): Renamed from re_allocated.
145839         (used): Renamed from re_used.
145840         (syntax): Renamed from re_syntax.
145841         (fastmap): Renamed from re_fastmap.
145842         (translate): Renamed from re_translate.
145843         (can_be_null): Renamed from re_can_be_null.
145844         (regs_allocated): Renamed from re_regs_allocated.
145845         (fastmap_accurate): Renamed from re_fastmap_accurate.
145846         (no_sub): Renamed from re_no_sub.
145847         (not_bol): Renamed from re_not_bol.
145848         (not_eol): Renamed from re_not_eol.
145849         (newline_anchor): Renamed from re_newline_anchor.
145850         (num_regs): Renamed from rm_num_regs.
145851         (start): Renamed from rm_start.
145852         (end): Renamed from rm_end.
145854         (free_state): Move up a bit.
145856         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
145857         #define to be empty.
145858         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
145859         when that is what is intended.
145860         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
145861         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
145862         (MAX): New macro.
145863         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
145864         All uses changed back to re_malloc, etc.  It's now the caller's
145865         responsibility to check for overflow; all callers changed.
145866         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
145867         (re_x2nrealloc): Remove.
145868         (free_state): Remove decl.
145870         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
145871         (re_set_registers, re_exec):
145872         Use K&R-style defn.
145874         2006-01-31  Roland McGrath  <roland@redhat.com>
145876         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
145877         Reported by Mike Frysinger <vapier@gentoo.org>.
145879         2006-01-15  Andreas Jaeger  <aj@suse.de>
145881         [BZ #1950]
145882         * lib/regex_internal.c (re_string_reconstruct): Adjust for
145883         build_wcs_upper_buffer change.
145884         (build_wcs_upper_buffer): Change return type.
145886         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
145888         * lib/regex_internal.h: Include <stdint.h> if available.
145890         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
145892         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
145894         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
145896         * lib/regcomp.c: Adjust for changed secondary hash function.
145898         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
145900         * lib/regex.h: Pretty printing.
145901         Clean up namespace a bit.
145903         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
145905         * lib/regexec.c (update_cur_sifted_state, check_arrival,
145906         check_arrival_add_next_nodes): Avoid using uninitialized variable.
145908         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
145909                     Ulrich Drepper  <drepper@redhat.com>
145911         [BZ #1302]
145912         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
145913         changed.
145914         (bitset_word_t): Renamed from bitset_word.  All uses changed.
145916         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
145918         [BZ #281]
145919         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
145920         * lib/regcomp.c: Remove unnecessary uses of
145921         unsigned RE_TRANSLATE_TYPE.
145922         * lib/regex_internal.h: Likewise.
145923         * lib/regex_internal.c: Likewise.
145924         * lib/regexec.c: Likewise.
145925         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
145927         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
145929         * lib/regexec.c (find_recover_state): Remove unnecessary
145930         initialization.
145931         (transit_state_bkref): Make DFA a const pointer.
145932         (get_subexp): Likewise.
145933         (check_arrival): Likewise.
145934         (update_cur_sifted_state): Likewise.
145935         (re_search_internal): Likewise.
145936         (prune_impossible_nodes): Likewise.
145937         (acquire_init_state_context): Likewise.
145938         (proceed_next_node): Likewise.
145939         (set_regs): Likewise.
145940         (free_fail_stack_return): Likewise.
145941         (check_arrival_expand_ecl): Mark DFA parameter as const.
145942         (check_arrival_expand_ecl_sub): Likewise.
145943         (check_subexp_limits): Likewise.
145944         (sub_epsilon_src_nodes):  Likewise.
145945         (add_epsilon_src_nodes):  Likewise.
145946         (merge_state_array): Likewise.
145947         (update_regs): Likewise.
145948         (build_trtable): Likewise.
145949         (sift_states_backward): Mark MCTX parameter as const.
145950         (build_sifted_states): Likewise.
145951         (update_cur_sifted_state): Likewise.
145952         (sift_states_mkref): Likewise.
145953         (check_arrival_expand_ecl): Mark eclosure as const.
145954         (check_dst_limits_calc_pos_1): Likewise.
145955         * lib/regex_internal.h (re_match_context_t): Make dfa a const
145956         pointer.
145958         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
145960         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
145961         (transit_state_sb): Likewise.
145962         (transit_state_mb): Likewise.
145963         (sift_states_iter_mb): Likewise.
145964         (check_arrival_add_next_nodes): Likewise.
145965         (check_node_accept_bytes): Change first parameter to pointer-to-const.
145966         [_LIBC] (re_search_2_stub): Use mempcpy.
145968         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
145969         mbrtowc for very simple UTF-8 case.
145971         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
145972         a pointer-to-const.
145973         (re_acquire_state_context): Likewise.
145974         * lib/regex_internal.h: Adjust prototypes.
145976         * lib/regex.c: Prevent using C++ compilers.
145978         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
145979         (re_acquire_state_context): Likewise.
145981 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
145983         * modules/regex (Depends-on): Add ssize_t.
145985 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
145987         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
145988         translation table.
145990 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
145992         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
145994 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
145995             Bruno Haible  <bruno@clisp.org>
145997         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
145998         <sys/types.h> and <inttypes.h>.
146000 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
146002         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
146003         `__error_t_defined', so argp.h will not typedef the former.
146005 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
146007         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
146008         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
146009         glibc names.  Even if glibc is changed to conform to POSIX, the
146010         traditional names will be available anyway, since regex depends on
146011         the extensions module.  Also, fix a longstanding typo in the
146012         implementation of Spencer ERE test #75 from grep 2.3.  Problems
146013         reported by Emanuele Giaquinta.  Also, change sense of cached
146014         variable, so that the message makes sense.
146016 2006-03-24  Simon Josefsson  <jas@extundo.com>
146018         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
146019         including some doc fixes.
146020         (base64_encode_alloc): Fix +1 bug on allocation failures.
146022 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
146024         * lib/base64.c (base64_encode): Do not read past end of array with
146025         unsanitized input on systems with CHAR_BIT > 8.
146027 2006-03-24  Eric Blake  <ebb9@byu.net>
146029         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
146031 2006-03-22  Karl Berry  <karl@gnu.org>
146033         * config/srclist.txt (*setenv.[ch]): get from coreutils.
146034         * config/srclistvars.sh (COREUTILS): new var.
146036 2006-03-17  Jim Meyering  <jim@meyering.net>
146038         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
146039         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
146041 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
146043         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
146044         no longer needs it.  Instead, check that regoff_t is as least
146045         as wide as ptrdiff_t.
146047         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
146048         so that our regex.h stays compatible with the installed regex.
146049         This is helpful for installers who configure --without-included-regex.
146050         Problem reported by Emanuele Giaquinta.
146052 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
146054         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
146055         Typedef to long int, not to off_, as POSIX will likely change
146056         in that direction.
146058 2006-03-15  Eric Blake  <ebb9@byu.net>
146060         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
146062 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
146064         * lib/argp-help.c (validate_uparams): Fix typo
146065         * lib/argp-parse.c (argp_default_options): Consistently begin help
146066         messages with a lowercase letter.
146068 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
146070         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
146071         overrun buffers and shouldn't be used (much as gets shouldn't be
146072         used).
146073         * lib/time_r.c (asctime_r, ctime_r): Likewise.
146075 2006-03-08  Simon Josefsson  <jas@extundo.com>
146077         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
146078         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
146080 2006-03-08  Simon Josefsson  <jas@extundo.com>
146082         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
146083         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
146085 2006-03-08  Simon Josefsson  <jas@extundo.com>
146087         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
146088         signal that configure disabled the device.
146090 2006-03-08  Simon Josefsson  <jas@extundo.com>
146092         * build-aux/maint.mk: Fix refresh-po, to handle no translated
146093         languages.
146095 2006-03-07  Simon Josefsson  <jas@extundo.com>
146097         * modules/getopt (Depends-on): Add unistd.
146099         * modules/unistd: New file.
146101 2006-03-07  Simon Josefsson  <jas@extundo.com>
146103         * modules/gc-random: New file.
146105 2006-03-07  Simon Josefsson  <jas@extundo.com>
146107         * m4/unistd_h.m4: New file.
146109 2006-03-07  Simon Josefsson  <jas@extundo.com>
146111         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
146112         test to be side-effect free by storing the result in the cache
146113         variable gl_cv_lib_readline, and moving the assignment of
146114         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
146115         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
146117 2006-03-07  Simon Josefsson  <jas@extundo.com>
146119         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
146120         error on missing devices (the functions will return an error).
146122         * m4/gc.m4: Move random stuff to gc-random.m4
146124 2006-03-07  Simon Josefsson  <jas@extundo.com>
146126         * lib/unistd_.h: New file.
146128 2006-03-07  Simon Josefsson  <jas@extundo.com>
146130         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
146132 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
146134         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
146135         Problem reported by Juan Manuel Guerrero.
146137 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
146139         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
146140         the unistd module.
146141         * lib/getlogin_r.c: Likewise.
146142         * lib/getlogin_r.h: Likewise.
146143         * lib/glob.c: Likewise.
146144         * lib/pagealign_alloc.c: Likewise.
146145         * lib/unistd_.h: Remove; no longer needed.
146147 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
146149         * MODULES.html.sh (Support for systems lacking POSIX:2001):
146150         Add unistd.
146151         * modules/c-stack (Depends-on): Add unistd.
146152         * modules/getlogin_r: Likewise.
146153         * modules/glob: Likewise.
146154         * modules/pagealign_alloc: Likewise.
146155         * modules/unistd (Files): Remove lib/unistd_.h.
146156         (EXTRA_DIST): Remove.
146157         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
146158         need unistd_.h.
146159         (MOSTLYCLEANFILES): Remove unistd.h-t.
146161 2006-03-03  Simon Josefsson  <jas@extundo.com>
146163         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
146165 2006-03-03  Simon Josefsson  <jas@extundo.com>
146167         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
146168         libidn and bison.
146170 2006-03-03  Simon Josefsson  <jas@extundo.com>
146172         * build-aux/maint.mk: Add indent target.
146174 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
146176         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
146177         our replacement poll.h in any case, to avoid a differing
146178         declaration from a system header.  Seen on AIX.
146180 2006-03-01  Simon Josefsson  <jas@extundo.com>
146182         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
146183         <kasal@ucw.cz>.
146185 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
146187         * modules/gettime (Depends-on): Add extensions module.
146188         * modules/nanosleep (Depends-on): Likewise.
146189         * modules/settime (Depends-on): Likewise.
146191 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
146193         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
146194         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
146195         pedantically.
146196         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
146197         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
146199         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
146200         not "==".  Reported by Ralf Wildenhues.
146202 2006-03-01  Karl Berry  <karl@gnu.org>
146204         * doc/Copyright/request-*: new files, synced from gnuorg.
146206 2006-03-01  Karl Berry  <karl@gnu.org>
146208         * config/srclist.txt (Copyright/*): new entries.
146210 2006-02-28  Simon Josefsson  <jas@extundo.com>
146212         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
146214 2006-02-27  Simon Josefsson  <jas@extundo.com>
146216         * lib/base64.h: Indent #define's.  From Jim Meyering
146217         <jim@meyering.net>.
146219 2006-02-27  Jim Meyering  <jim@meyering.net>
146221         Revert the change of 2006-02-24, so these files can continue
146222         to be sync'd from gettext.
146223         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
146224         of `config.h'.
146226 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
146228         * modules/intprops: New file.
146229         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
146230         Add intprops.
146231         * modules/getloadavg (Files): Remove lib/intprops.h.
146232         (Depends-on): Add intprops.
146233         * modules/human: Likewise.
146234         * modules/inttostr: Likewise.
146235         * modules/openat: Likewise.
146236         * modules/sig2str: Likewise.
146237         * modules/userspec: Likewise.
146238         * modules/utimecmp: Likewise.
146239         * modules/xnanosleep: Likewise.
146240         * modules/xstrtol: Likewise.
146242 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
146244         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
146245         * modules/lock-tests (TESTS): Use $(EXEEXT).
146246         * modules/tls-tests: Likewise.
146247         * modules/argp-tests: Likewise.
146248         (check_PROGRAMS): New var, replacing...
146249         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
146251 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
146253         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
146254         `config.h'.
146256 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
146258         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
146260 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
146262         Sync from coreutils.
146263         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
146264         gl_CHDIR_SAFER.
146266 2006-02-22  Jim Meyering  <jim@meyering.net>
146268         Sync from coreutils.
146269         * m4/chdir-safer.m4: New file.
146271 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
146273         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
146274         AT_FDCWD exceeds INT_MAX.
146275         * lib/openat.h (AT_FDCWD): Likewise.
146277 2006-02-17  Eric Blake  <address@hidden>
146279         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
146281 2006-02-16  Simon Josefsson  <jas@extundo.com>
146283         * modules/getaddrinfo (Depends-on): Add sys_socket.
146285 2006-02-15  Simon Josefsson  <jas@extundo.com>
146287         * build-aux/maint.mk: Add dsyntax-check rule.
146289 2006-02-15  Eric Blake  <ebb9@byu.net>
146291         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
146292         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
146293         'present but cannot compile' warnings on cygwin.
146294         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
146295         use ws2tcpip.h if sys/socket.h works.
146296         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
146297         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
146299 2006-02-14  Simon Josefsson  <jas@extundo.com>
146301         * modules/maintainer-makefile (Files): Rename.
146303         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
146304         and (the local) Makefile.cfg to maint-cfg.mk.
146306         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
146307         to the latter.
146309         * modules/maintainer-makefile: New module.
146311         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
146312         severaly stripped to make it possible to build it up from scratch
146313         with reliable tests.
146315         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
146316         fixes to permit overriding the default actions when configure and
146317         makefile are not available.
146319 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
146321         Sync from coreutils.
146322         * modules/lstat (Depends-on): Don't depend on xalloc.
146323         (License): Change from GPL to LGPL, since this is now simply a
146324         replacement for a libc function.
146326 2006-02-14  Jim Meyering  <jim@meyering.net>
146328         Sync from coreutils.
146330         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
146331         failure on deficient systems, and simplify gnulib lgpl dependencies.
146332         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
146333         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
146335         * lib/xalloc-die.c: Remove unused definition of N_.
146337 2006-02-14  Jim Meyering  <jim@meyering.net>
146339         Sync from coreutils.
146340         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
146341         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
146342         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
146343         double-quote uses of that variable, to accommodate the rare case in
146344         which getmntent is available in none of the libraries checked.  This
146345         happens at least on FreeBSD 5.0.
146347 2006-02-13  Simon Josefsson  <jas@extundo.com>
146349         * gnulib-tool (Usage): Fix --import, from
146350         karl@freefriends.org (Karl Berry).
146352 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
146354         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
146356 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
146358         * lib/argp-namefrob.h: Restore changes accidentally lost during the
146359         "autoupdate" on 2005-12-12.
146361 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
146363         * modules/closeout (Depends-on): Remove atexit.
146365 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
146367         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
146368         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
146370 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
146372         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
146373         __EXTENSIONS__ if this causes compilation to fail.  Problem
146374         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
146375         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
146377 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
146379         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
146380         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
146381         <http://lists.gnu.org/r/bug-gnulib/2006-01/msg00074.html>.
146382         All uses changed.
146384 2006-01-26  Simon Josefsson  <jas@extundo.com>
146386         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
146387         prototype is visible on mingw32.
146389         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
146390         for mingw32.
146392         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
146393         mingw32).
146395 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
146397         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
146398         attempt to open for write; this always fails, at least on POSIX
146399         hosts.  This reinstates the 2006-01-09 change, which was
146400         inadvertently removed.
146402 2006-01-26  Bruno Haible  <bruno@clisp.org>
146404         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
146405         Reported by Paul Eggert.
146407 2006-01-26  Bruno Haible  <bruno@clisp.org>
146408             Paul Eggert  <eggert@cs.ucla.edu>
146410         * lib/stdbool_.h (_Bool)
146411         [(! (defined __cplusplus || defined __BEOS__)
146412           && !defined __GNUC__
146413           && !(defined __HP_cc || defined __xlc__
146414                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
146415                || defined __sgi))]:
146416         #define to signed char in these cases too; this simplifies
146417         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
146418         etc., separately) and makes it more conservative.
146420 2006-01-25  Simon Josefsson  <jas@extundo.com>
146422         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
146423         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
146424         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
146426 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
146428         * lib/argp-namefrob.h: Bugfix. Remove stray #
146430 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
146432         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
146433         so that we test the test.
146434         Check for yet another HP-UX cc bug involving *bool |= bool.
146436 2006-01-25  Karl Berry  <karl@gnu.org>
146438         * config/srclist.txt (vasnprintf.c): sync lost.
146440 2006-01-25  Jim Meyering  <jim@meyering.net>
146442         Sync from the stable (b5) branch of coreutils:
146444         * lib/fts.c (fts_children): Don't let close() clobber errno from
146445         failed fchdir().
146447         * lib/fts.c (fts_stat): When following a symlink-to-directory,
146448         don't necessarily interpret stat-fails+lstat-succeeds as indicating
146449         a dangling symlink.  That can also happen at least for ELOOP.
146450         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
146451         FYI, this bug predates the inclusion of fts.c in coreutils.
146453         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
146454         in their own block, so pre-c99 compilers don't object.
146456         Avoid the double-free (first in fts_read, second in fts_close) that
146457         would occur when an `active' directory is made inaccessible (e.g.,
146458         via chmod a-x) during a traversal.
146459         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
146460         before returning.  Reproduce this failure by
146461         mkdir -p a/b; cd a; chmod a-x . b
146462         Reported by Stavros Passas.
146464 2006-01-25  Jim Meyering  <jim@meyering.net>
146466         * lib/fileblocks.c: Remove more useless parentheses.
146467         * lib/readutmp.h: Likewise.
146469 2006-01-25  Bruno Haible  <bruno@clisp.org>
146471         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
146472         warnings.
146473         Reported by Paul Eggert.
146475 2006-01-25  Bruno Haible  <bruno@clisp.org>
146477         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
146478         rid of a trap command. For Solaris sh.
146479         Reported by Mark D. Baushke <mdb@gnu.org>.
146481 2006-01-24  Simon Josefsson  <jas@extundo.com>
146483         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
146484         Bruno.
146486 2006-01-24  Karl Berry  <karl@gnu.org>
146488         * config/srclist.txt (argp-namefrob.h): sync lost.
146490 2006-01-24  Jim Meyering  <jim@meyering.net>
146492         * modules/openat (Files): Add lib/intprops.h.
146493         From Mark D. Baushke.
146495 2006-01-24  Jim Meyering  <jim@meyering.net>
146497         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
146498         Reported by Mark D. Baushke.
146500 2006-01-24  Jim Meyering  <jim@meyering.net>
146502         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
146504 2006-01-24  Bruno Haible  <bruno@clisp.org>
146506         * modules/strnlen (Maintainer): Change from glibc to all.
146508 2006-01-24  Bruno Haible  <bruno@clisp.org>
146510         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
146511         Patch by Paul Eggert.
146513 2006-01-24  Bruno Haible  <bruno@clisp.org>
146515         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
146516         already has it.
146517         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
146518         2005-11-26.
146520         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
146521         'signed char' to avoid problems with the built-in _Bool type.
146522         Reported by Paul Eggert on 2005-11-26.
146524 2006-01-24  Bruno Haible  <bruno@clisp.org>
146526         * gnulib-tool (func_import): Avoid constructing complicated sed
146527         expressions inside backquote.
146528         Report and solution by Mark D. Baushke <mdb@gnu.org>.
146530 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
146532         These changes imported from libc.
146533         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
146534         test and two separate function calls.
146535         * lib/strndup.c (__strndup): Add libc_hidden_def.
146537 2006-01-23  Simon Josefsson  <jas@extundo.com>
146539         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
146540         Remove the test_*_SOURCES variable: automake infers it by default.
146541         * modules/tls-tests: Likewise.
146543 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
146545         Work around porting bugs reported by Dieter in
146546         <http://lists.gnu.org/r/bug-bison/2006-01/msg00049.html>.
146547         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
146548         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
146549         Include "getopt.h" first, to check interface.
146550         (getenv): Declare only if defined HAVE_DECL_GETENV &&
146551         !HAVE_DECL_GETENV.
146552         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
146553         (__strndup): Revert to K&R-style function dfns, the glibc style.
146554         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
146555         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
146556         Include strnlen.h first, to get prototype properly.
146557         (strnlen): Renamed from __strnlen.
146558         Remove weak alias.
146560 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
146562         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
146564 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
146566         * config/srclist.txt: Adjust to reflect glibc reorganization.
146567         This affects only comments.
146569 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
146571          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
146572          Reported by Bruce Korb <bkorb@gnu.org>.
146574 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
146576         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
146577         to pacify gcc -Wswitch-default.
146579 2006-01-22  Bruno Haible  <bruno@clisp.org>
146581         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
146582         temporary buffer for sprintf, take into account the precision also
146583         for 'd', 'i', 'u', 'o', 'x', 'X'.
146585 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
146587         * modules/argp-tests: New module
146588         * tests/test-argp.c: New file
146589         * tests/test-argp-2.sh: New file
146591 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
146593         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
146594         (__argp_base_name): Removed
146595         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
146596         typo.
146597         (__argp_base_name): Provide macro definition or extern declaration
146598         depending on the configuration
146600 2006-01-20  Simon Josefsson  <jas@extundo.com>
146602         * modules/inet_ntop (Depends-on): Depend on sys_socket.
146604 2006-01-20  Simon Josefsson  <jas@extundo.com>
146606         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
146608 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
146610         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
146611         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
146612         Suggested by Bruno Haible.
146614 2006-01-20  Karl Berry  <karl@gnu.org>
146616         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
146617         until changes propagate, I guess.
146619 2006-01-19  Simon Josefsson  <jas@extundo.com>
146621         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
146623 2006-01-19  Simon Josefsson  <jas@extundo.com>
146625         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
146627 2006-01-19  Simon Josefsson  <jas@extundo.com>
146629         * gnulib-tool: Set check_PROGRAMS.
146631         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
146632         modules/des-tests, modules/gc-arcfour-tests,
146633         modules/gc-arctwo-tests, modules/gc-des-tests,
146634         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
146635         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
146636         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
146637         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
146638         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
146639         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
146640         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
146641         test_*_SOURCES.
146643 2006-01-18  Simon Josefsson  <jas@extundo.com>
146645         * modules/socklen (Depends-on): Depend on sys_socket.
146647 2006-01-18  Simon Josefsson  <jas@extundo.com>
146649         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
146650         modules/des-tests, modules/gc-arcfour-tests,
146651         modules/gc-arctwo-tests, modules/gc-des-tests,
146652         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
146653         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
146654         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
146655         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
146656         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
146657         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
146658         $(EXEEXT) to automake TESTS variable, for mingw32.
146660 2006-01-17  Simon Josefsson  <jas@extundo.com>
146662         * modules/socklen (Include): Need sys/socket.h.
146664 2006-01-17  Bruno Haible  <bruno@clisp.org>
146666         * modules/ssize_t (Include): Add <sys/types.h>.
146668 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
146670         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
146671         it's not portable and it doesn't work with cross-compiles.
146672         Problem reported by Bruno Haible.  Fix missing-$ typo in
146673         'test "gl_cv_ignore_unused_libraries" ...' that prevented
146674         -zignore from being used with Sun's C compiler.
146676 2006-01-12  Simon Josefsson  <jas@extundo.com>
146678         * lib/base64.c: Fix warning, reported by Bruno Haible
146679         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
146681 2006-01-12  Bruno Haible  <bruno@clisp.org>
146683         * modules/ldd: New file.
146684         * build-aux/ldd.sh.in: New file.
146685         * MODULES.html.sh (Support for building libraries and executables): Add
146686         ldd.
146688 2006-01-12  Bruno Haible  <bruno@clisp.org>
146690         * m4/ldd.m4: New file.
146692 2006-01-12  Bruno Haible  <bruno@clisp.org>
146694         * gnulib-tool (func_import, func_create_testdir): Don't go into an
146695         endless loop while replacing $auxdir with build-aux.
146697 2006-01-11  Simon Josefsson  <jas@extundo.com>
146699         * lib/stdint_.h (SIZE_MAX): Add missing (.
146701 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
146703         Sync from coreutils.
146704         * lib/md5.c: Fix commentary typos.
146705         (alignof, UNALIGNED_P): No need for a GCC-specific version.
146706         * lib/md5.h (__attribute__): Remove; unused.
146707         * lib/sha1.c: Fix commentary to match md5 better.
146708         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
146709         so that we don't need to worry about alignment.  All uses changed.
146710         This merges the 2005-10-28 md5 change into sha1.
146712 2006-01-11  Jim Meyering  <jim@meyering.net>
146714         Sync from coreutils.
146715         * lib/md5.c (OP): Fix spacing.
146717 2006-01-11  Bruno Haible  <bruno@clisp.org>
146719         Ensure automatic ordering between gl_LOCK and gl_ARGP.
146720         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
146721         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
146723 2006-01-11  Bruno Haible  <bruno@clisp.org>
146725         Ensure automatic ordering between gl_LOCK and gl_ARGP.
146726         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
146727         the "early" section as well.
146729 2006-01-11  Bruno Haible  <bruno@clisp.org>
146731         Avoid "ar: no archive members specified" error on MacOS X.
146732         * gnulib-tool (func_modules_add_dummy): New function.
146733         (func_import, func_create_testdir): Invoke it.
146735 2006-01-11  Bruno Haible  <bruno@clisp.org>
146737         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
146738         with $auxdir in AC_CONFIG_FILES statements.
146740 2006-01-11  Bruno Haible  <bruno@clisp.org>
146742         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
146743         Initialize also noinst_HEADERS to empty.
146745 2006-01-11  Bruno Haible  <bruno@clisp.org>
146747         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
146748         variables.
146749         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
146750         autoreconf.
146752 2006-01-11  Bruno Haible  <bruno@clisp.org>
146754         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
146755         overridable by the user.
146756         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
146758 2006-01-10  Simon Josefsson  <jas@extundo.com>
146760         * modules/sys_socket: New file.
146762 2006-01-10  Simon Josefsson  <jas@extundo.com>
146764         * m4/sys_socket_h.m4: New file.
146766 2006-01-10  Simon Josefsson  <jas@extundo.com>
146768         * lib/socket_.h: New file.
146770 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
146772         * modules/readutmp (Maintainer): Add myself.
146774 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
146776         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
146777         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
146778         People who are still concerned with buggy memcmp implementations
146779         can invoke gl_FUNC_MEMCMP themselves.
146781 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
146783         * lib/regex_internal.h (BITSET_WORD_BITS):
146784         Work around a bug in 64-bit PGC (before version 6.1-2), where the
146785         preprocessor mishandles large unsigned values as if they were signed.
146786         Problem reported by Claudio Fontana in
146787         <http://lists.gnu.org/r/bug-gnulib/2005-12/msg00061.html>.
146789 2006-01-10  Jim Meyering  <jim@meyering.net>
146791         Avoid the double-free (first in fts_read, second in fts_close) that
146792         would occur when an `active' directory is made inaccessible (e.g.,
146793         via chmod a-x) during a traversal.
146794         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
146795         before returning.  Reproduce this failure by
146796         mkdir -p a/b; cd a; chmod a-x . b
146797         Reported by Stavros Passas.
146799         Sync from coreutils.
146800         * lib/sha1.c: Tweak grammar in a comment.
146802 2006-01-10  Jim Meyering  <jim@meyering.net>
146804         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
146805         Patch by Joerg Sonnenberger.
146807 2006-01-10  Bruno Haible  <bruno@clisp.org>
146809         * modules/readutmp: Depend on module free.
146810         * modules/strtok_r: Depend on module restrict.
146812 2006-01-10  Bruno Haible  <bruno@clisp.org>
146814         * modules/gettext (configure.ac): Add an invocation of
146815         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
146817 2006-01-10  Bruno Haible  <bruno@clisp.org>
146819         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
146820         Reported by Werner Lemberg <wl@gnu.org>.
146822 2006-01-10  Bruno Haible  <bruno@clisp.org>
146824         * lib/localcharset.c: Update from GNU gettext.
146826 2006-01-10  Bruno Haible  <bruno@clisp.org>
146828         * lib/argp.h (__const): Remove macro. Use const instead.
146829         * lib/argp-fmtstream.h (__const): Likewise.
146830         * lib/glob_.h (__const): Remove macro.
146831         * lib/glob-libc.h: Use const instead of __const.
146833 2006-01-10  Bruno Haible  <bruno@clisp.org>
146835         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
146836         variable.
146837         Needed to avoid an automake error regarding the 'gettext' module.
146839 2006-01-09  Simon Josefsson  <jas@extundo.com>
146841         * modules/inet_ntop (Depends-on): Add restrict.
146843 2006-01-09  Simon Josefsson  <jas@extundo.com>
146845         * modules/gc-rijndael-tests (License): Put under LGPL.
146847         * modules/gc-des-tests (License): Likewise.
146849         * modules/gc-arcfour-tests (License): Likewise.
146851         * modules/gc-arctwo-tests (License): Likewise.
146853         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
146855         * modules/gc-hmac-sha1-tests (Files): Likewise.
146857         * modules/gc-hmac-md5-tests (License): Likewise.
146859         * modules/gc-sha1-tests (License): Likewise.
146861         * modules/gc-md5-tests (License): Likewise.
146863         * modules/gc-md4-tests (License): Likewise.
146865         * modules/gc-md2-tests (License): Likewise.
146867         * modules/gc-tests (License): Likewise.
146869         * modules/des-tests (License): Likewise.
146871         * modules/md4-tests (License): Likewise.
146873         * modules/md2-tests (License): Likewise.
146875 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
146877         Sync from coreutils:
146879         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
146880         * modules/lib-ignore: New file.
146881         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
146882         chdir-safer.m4, lchmod.m4.
146883         * modules/openat: Add mkdirat.c, openat-priv.h.
146885 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
146887         Sync from coreutils.
146888         * m4/lib-ignore.m4: New file.
146889         * m4/lchmod.m4: New file.
146891 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
146893         Sync from coreutils.
146894         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
146895         for write access: POSIX says that must fail.
146896         * lib/fts.c (diropen): Likewise.
146897         * lib/save-cwd.c (save_cwd): Likewise.
146898         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
146899         well, for minor improvements on hosts that lack O_DIRECTORY.
146900         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
146901         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
146902         Fall back on chown if open failed with EACCES.
146904         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
146905         Report an error at compile-time if only a 1-second nominal clock
146906         resolution is found.
146908         * lib/lchmod.h: New file.
146909         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
146910         (make_dir_parents): Use lchown rather than chown, and
146911         lchmod rather than chmod.
146913         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
146914         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
146915         "proc" reported by n0dalus.
146917         * lib/mountlist.c: Include <limits.h>.
146918         (dev_from_mount_options)
146919         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
146920         New function.  It no longer assumes "dev=" has the System V meaning
146921         on Linux (since it doesn't).  It also parses "dev=" more carefully.
146922         (read_file_system_list)
146923         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
146924         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
146925         dev= in that case.
146927         * lib/posixtm.h (PDS_PRE_2000): New macro.
146928         * lib/posixtm.c (year): Arg is now syntax_bits rather than
146929         allow_century.  All usages changed.  Reject dates outside the range
146930         1969-1999 if PDS_PRE_2000 is used.
146932 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
146934         Sync from coreutils.
146935         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
146936         (Time of day items): Mention the possibility of leap seconds.
146937         Problem reported by Dr. David Alan Gilbert.
146939 2006-01-09  Jim Meyering  <jim@meyering.net>
146941         Sync from coreutils.
146943         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
146945         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
146947         * lib/modechange.c (mode_compile): Reject an invalid mode string
146948         that starts with an octal digit.  From Andreas Gruenbacher.
146950         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
146951         and dup to open_safer and dup_safer, respectively.
146952         (openat_permissive): Fix typo in comment.
146954         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
146955         "gettext.h"; either no longer needed or are guaranteed by openat.h.
146956         (_): Remove; no longer needed.
146957         (openat): Renamed from rpl_openat; no need for rpl_openat
146958         since openat.h renames openat for us.
146959         Replace most of the body with a call to openat_permissive,
146960         to avoid duplicate code.
146961         Port to (probably hypothetical) environments were mode_t is
146962         wider than int.
146963         (openat_permissive): Require mode arg, so that we can check
146964         types better.  Put it just after flags.  Change cwd failure
146965         indicator from pointer-to-bool to pointer-to-errno-value.
146966         All callers changed.
146967         Invoke openat_save_fail and/or openat_restore_fail if
146968         cwd_errno is null, so that openat can call us.
146969         (openat_permissive, fdopendir, fstatat, unlinkat):
146970         Simplify errno handling to avoid some duplicate code,
146971         as it's OK to set errno on success.
146972         * lib/openat.h: Revamp code so that function macros depend on
146973         __OPENAT_PREFIX only, not also on AT_FDCWD.
146974         (openat_ro): Remove.  Caller changed to use openat_permissive.
146975         (openat_permissive): Now a macro, if not a function.
146976         (openat_restore_fail, openat_save_fail): Now always functions,
146977         since mkdirat needs them even if __OPENAT_PREFIX is defined.
146979         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
146980         and openat.c.
146981         * lib/mkdirat.c: Include openat-priv.h.
146982         Remove definitions of macros defined therein.
146983         * lib/openat.c: Likewise.
146985         * lib/mkdirat.c (mkdirat): New file and function.
146986         * lib/openat.h (mkdirat): Declare.
146988         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
146990         * lib/openat.h (openat_permissive): Declare.
146991         (openat_ro): Define.
146993         * lib/openat.c (EXPECTED_ERRNO): New macro.
146994         (openat_permissive): New function -- used in remove.c rewrite.
146995         (all functions): Set errno just before returning, only if there
146996         was an actual failure.
146997         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
146999         Emulate openat-family functions using Linux's procfs, if possible.
147000         Idea and some code based on Ulrich Drepper's glibc changes.
147002         * lib/openat.c: (BUILD_PROC_NAME): New macro.
147003         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
147004         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
147005         before falling back on save_cwd and restore_cwd.
147006         (fdopendir, fstatat, unlinkat): Likewise.
147008         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
147009         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
147011         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
147012         as second argument to va_arg.  Otherwise, some versions of gcc
147013         warn that `if this code is reached, the program will abort'.
147015 2006-01-09  Jim Meyering  <jim@meyering.net>
147017         Sync from coreutils.
147018         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
147019         Require openat-priv.h.
147021 2006-01-09  Bruno Haible  <bruno@clisp.org>
147023         * modules/strnlen (Include): Use strnlen.h.
147025 2006-01-09  Bruno Haible  <bruno@clisp.org>
147027         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
147029 2006-01-09  Bruno Haible  <bruno@clisp.org>
147031         * lib/sysexit_.h (EX_OK): New macro.
147032         Suggested by Martin Lambers <marlam@marlam.de>.
147034 2006-01-09  Bruno Haible  <bruno@clisp.org>
147036         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
147037         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
147039 2006-01-09  Bruno Haible  <bruno@clisp.org>
147041         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
147042         numbers.
147044 2006-01-09  Bruno Haible  <bruno@clisp.org>
147046         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
147047         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
147048         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
147049         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
147051 2006-01-09  Bruno Haible  <bruno@clisp.org>
147053         * build-aux/javacomp.sh.in: New file, moved from lib/.
147054         * modules/javacomp-script (Files): Update.
147055         (configure.ac): Add AC_CONFIG_FILES invocation.
147056         (EXTRA_DIST): Remove variable.
147058         * build-aux/javaexec.sh.in: New file, moved from lib/.
147059         * modules/javaexec (Files): Update.
147060         (configure.ac): Add AC_CONFIG_FILES invocation.
147061         (EXTRA_DIST): Remove javaexec.sh.in.
147063         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
147064         * modules/csharpcomp-script (Files): Update.
147065         (configure.ac): Add AC_CONFIG_FILES invocation.
147066         (EXTRA_DIST): Remove variable.
147068         * build-aux/csharpexec.sh.in: New file, moved from lib/.
147069         * modules/csharpexec (Files): Update.
147070         (configure.ac): Add AC_CONFIG_FILES invocation.
147071         (EXTRA_DIST): Remove csharpexec.sh.in.
147073 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
147075         Sync from coreutils.
147077         Add POSIX ACL support
147078         * lib/acl.h (copy_acl, set_acl): Add declarations.
147079         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
147080         systems other than Linux.
147081         (chmod_or_fchmod): New function: use fchmod when possible,
147082         and chmod otherwise.
147083         (file_has_acl): Add a POSIX ACL implementation, with a
147084         Linux-specific subcase.
147085         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
147086         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
147087         acls are unsupported.
147088         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
147089         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
147090         are unsupported.
147092 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
147094         Sync from coreutils.
147095         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
147097 2006-01-07  Bruno Haible  <bruno@clisp.org>
147099         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
147100         gl_EARLY.
147102 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
147104         * lib/strftime.c (tzname): Don't declare if it is already #defined.
147105         Problem reported for Mingw by Mark Junker.
147107 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
147109         * README: Gnulib normally doesn't generate a tarball.
147111 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
147113         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
147114         long int, not int, for nanosecond counts, so that people who are
147115         used to POSIX struct timespec won't be surprised.  Reported by Jim
147116         Meyering.
147118 2005-12-28  Bruno Haible  <bruno@clisp.org>
147120         * build-aux/config.rpath: Update from GNU gettext.
147122 2005-12-16  Jim Meyering  <jim@meyering.net>
147124         * modules/fprintftime: New module.
147125         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
147127 2005-12-16  Jim Meyering  <jim@meyering.net>
147129         * m4/fprintftime.m4: New file.
147131 2005-12-16  Jim Meyering  <jim@meyering.net>
147133         * lib/fprintftime.c, lib/fprintftime.h: New files.
147135 2005-12-15  Simon Josefsson  <jas@extundo.com>
147137         * modules/socklen (configure.ac): Fix M4 macro name, to align with
147138         new m4/socklen.m4.
147140 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
147142         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
147143         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
147145 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
147147         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
147148         * lib/argp-help.c (fill_in_uparams): Check if the constructed
147149         struct uparams is valid. Fall back to the default values if it is
147150         not.
147152 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
147154         * modules/argp (Files): Add argp-pin.c
147155         (Depends-on): dirname
147156         (lib_SOURCES): Add argp-pin.c
147158 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
147160         * m4/argp.m4:  Check if program_invocation_name and
147161         program_invocation_short_name are declared and define appropriate
147162         macros if they are not.
147164 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
147166         * lib/argp-help.c (__argp_base_name): New function
147167         (__argp_short_program_name): Rewrite using __argp_base_name
147168         * lib/argp-namefrob.h: Define program_invocation_name and
147169         program_invocation_short_name if requested
147170         (__argp_base_name): Add prototype
147171         * lib/argp-parse.c (argp_def): Use gettext wrappers
147172         (argp_default_parser): Use __argp_base_name
147173         * lib/argp-pin.c: New file. Defines program_invocation_name and
147174         program_invocation_short_name on systems that lack them.
147176 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
147178         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
147179         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
147180         porting problem reported by Georg Schwarz in
147181         <http://lists.gnu.org/r/bug-coreutils/2005-12/msg00083.html>.
147183 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
147185         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
147186         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
147187         porting problem reported by Georg Schwarz in
147188         <http://lists.gnu.org/r/bug-coreutils/2005-12/msg00083.html>.
147190 2005-12-05  Bruno Haible  <bruno@clisp.org>
147192         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
147193         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
147194         Reported by Mark Junker <mjscod@gmx.de>.
147196 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
147198         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
147199         Use implementation from Albert Chin, with some
147200         comments/corrections by Stepan Kasal and myself.
147202 2005-12-02  Bruno Haible  <bruno@clisp.org>
147204         * gnulib-tool (func_import): Accept GPLed build tool modules when
147205         --lgpl is given.
147206         * modules/csharpcomp-script: New file.
147207         * modules/csharpcomp: Depend on it.
147208         * modules/javacomp-script: New file.
147209         * modules/javacomp: Depend on it.
147210         Suggested by Simon Josefsson.
147212 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
147214         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
147215         statement, to work around an HP-UX 10.20 compiler bug reported by
147216         Peter O'Gorman.
147218 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
147220         * modules/savedir (Depends-on): Add openat.
147222 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
147224         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
147225         (uintmax_t) [defined uintmax_t]: Do not declare.
147226         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
147227         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
147228         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
147229         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
147230         sake of portability to weird hosts that C allows (though we don't
147231         know of any practical examples).
147233         * lib/savedir.h (fdsavedir): New decl.
147234         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
147235         contains most of the former guts of savedir.
147236         (savedir): Use savedirstream.
147237         Include "openat.h".
147239 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
147241         * modules/obstack (Files): Add m4/ulonglong.m4.
147242         Problem reported by Davide Angelocola.
147244 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
147246         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
147247         coreutils no longer futzes with rounding modes.
147249 2005-11-14  Jim Meyering  <jim@meyering.net>
147251         * lib/mkstemp-safer.c: Include <config.h>, required for possible
147252         replacement of mkstemp.
147254 2005-11-10  Simon Josefsson  <jas@extundo.com>
147256         * lib/readline.c: Remove EOL.
147258 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
147260         * modules/gethrxtime (Depends-on): Add gettime.
147262 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
147264         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
147265         or gettimeofday; no longer needed.
147267 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
147269         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
147270         time business.
147271         (gethrxtime) [! (HAVE_NANOUPTIME
147272         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
147273         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
147274         our own approximation.
147276 2005-11-08  Eric Blake  <ebb9@byu.net>
147278         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
147280 2005-11-08  Eric Blake  <ebb9@byu.net>
147282         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
147284 2005-11-04  Bruno Haible  <bruno@clisp.org>
147286         * gnulib-tool: Implement --update mode.
147288 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
147290         Fix porting problem reported by Theodoros V. Kalamatianos.
147291         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
147292         Don't assume that futimes failing means we must fail.
147294 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
147296         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
147297         variables to suggest the intended function of the PATH_MAX check.
147299 2005-10-30  Kean Johnston  <jkj@sco.com>
147301         Trivial changes to support SCO systems.
147302         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
147303         as PATH_MAX.
147304         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
147305         where __ptr is null when no I/O is pending.
147307 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
147309         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
147310         leave errno alone.  Problem reported by Dmitry V. Levin.
147312 2005-10-28  Simon Josefsson  <jas@extundo.com>
147314         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
147315         Test more.
147317         * tests/test-gc-md2.c, tests/test-md2.c: New files.
147319         * modules/md2, modules/md2-tests: New files.
147321 2005-10-28  Simon Josefsson  <jas@extundo.com>
147323         * m4/inet_ntop.m4: More tests.
147325         * m4/gc-md2.m4, md2.m4: New file.
147327 2005-10-28  Simon Josefsson  <jas@extundo.com>
147329         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
147330         "restrict" keywords, as per POSIX.  Protect the function
147331         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
147332         Don't use K&R prototypes.  Check the sprintf return values.
147333         Re-define EAFNOSUPPORT if not present.  Indent.
147335         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
147336         suggested by Bruno Haible <bruno@clisp.org>.
147338         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
147340         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
147342         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
147343         libgcrypt).
147345         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
147347         * lib/md2.h, lib/md2.c: New files.
147349 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
147351         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
147352         errno alone.  Problem reported by Frederic Jolliton.
147354 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
147356         * modules/verify (License): Change from GPL to LGPL.  This is a
147357         tiny module and there are apparently near-equivalents that are
147358         under the BSD license.
147360 2005-10-24  Simon Josefsson  <jas@extundo.com>
147362         * modules/sha1: Relicense to LGPL.
147364 2005-10-24  Simon Josefsson  <jas@extundo.com>
147366         * lib/md4.h: Shrink buffer size, now that we changed the type.
147368 2005-10-23  Simon Josefsson  <jas@extundo.com>
147370         * gnulib-tool (func_import): Fix --tests-base.
147372 2005-10-22  Simon Josefsson  <jas@extundo.com>
147374         * modules/arcfour (Depends-on): Need stdint.
147376 2005-10-22  Simon Josefsson  <jas@extundo.com>
147378         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
147379         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
147381 2005-10-22  Simon Josefsson  <jas@extundo.com>
147383         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
147384         suggested by Bruno Haible <bruno@clisp.org>.
147386 2005-10-22  Simon Josefsson  <jas@extundo.com>
147388         * lib/crc.h: Include stddef.h, for size_t.
147390 2005-10-22  Simon Josefsson  <jas@extundo.com>
147392         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
147393         arcfour_context struct (simplify test vector testing in GNU
147394         Shishi).
147396 2005-10-21  Simon Josefsson  <jas@extundo.com>
147398         * modules/des, modules/des-tests: New files.
147400         * modules/gc-des, modules/gc-des-tests: New files.
147402         * tests/test-des.c, tests/test-gc-des.c: New file.
147404 2005-10-21  Simon Josefsson  <jas@extundo.com>
147406         * modules/arctwo, modules/arctwo-tests: New files.
147408         * tests/test-arctwo.c: New file.
147410         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
147412         * tests/test-gc-arctwo.c: New file.
147414 2005-10-21  Simon Josefsson  <jas@extundo.com>
147416         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
147417         Bruno Haible <bruno@clisp.org>.
147419         * m4/gc-des.m4: New file.
147421 2005-10-21  Simon Josefsson  <jas@extundo.com>
147423         * m4/arctwo.m4: New file.
147425         * m4/gc-arctwo.m4: New file.
147427 2005-10-21  Simon Josefsson  <jas@extundo.com>
147429         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
147430         block.
147432 2005-10-21  Simon Josefsson  <jas@extundo.com>
147434         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
147435         <bruno@clisp.org>.
147437         * lib/hmac-sha1.c (hmac_sha1): Likewise.
147439         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
147440         Bruno Haible <bruno@clisp.org>.
147442         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
147443         <bruno@clisp.org>.
147445 2005-10-21  Simon Josefsson  <jas@extundo.com>
147447         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
147449 2005-10-21  Simon Josefsson  <jas@extundo.com>
147451         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
147453 2005-10-21  Simon Josefsson  <jas@extundo.com>
147455         * lib/des.h, lib/des.c: New files.
147457         * lib/gc-gnulib.c: Support DES.c
147459 2005-10-21  Simon Josefsson  <jas@extundo.com>
147461         * lib/arctwo.h, lib/arctwo.c: New files.
147463         * lib/gc-gnulib.c: Support ARCTWO.
147465 2005-10-21  Simon Josefsson  <jas@extundo.com>
147467         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
147468         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
147470 2005-10-21  Simon Josefsson  <jas@extundo.com>
147472         * gnulib-tool (func_import, func_create_testdir): Define automake
147473         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
147474         Makefile.am snippet),
147475         suggested by Bruno Haible <bruno@clisp.org>.
147477         * modules/gc (Makefile.am): Use it.
147479 2005-10-21  Bruno Haible  <bruno@clisp.org>
147481         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
147482         patch.
147484 2005-10-19  Simon Josefsson  <jas@extundo.com>
147486         * tests/test-gc-rijndael.c: New file.
147488         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
147490 2005-10-19  Simon Josefsson  <jas@extundo.com>
147492         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
147493         interface too.
147495 2005-10-19  Simon Josefsson  <jas@extundo.com>
147497         * tests/test-gc-arcfour.c: New file.
147499         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
147501 2005-10-19  Simon Josefsson  <jas@extundo.com>
147503         * modules/gc-md4, modules/gc-md4-tests: New file.
147505         * tests/test-gc-md4.c: New file.
147507 2005-10-19  Simon Josefsson  <jas@extundo.com>
147509         * m4/gc-md4.m4: New file.
147511 2005-10-19  Simon Josefsson  <jas@extundo.com>
147513         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
147514         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
147515         <kasal@ucw.cz>.
147517 2005-10-19  Simon Josefsson  <jas@extundo.com>
147519         * m4/gc-arcfour.m4: New file.
147521         * m4/gc-rijndael.m4: New file.
147523 2005-10-19  Simon Josefsson  <jas@extundo.com>
147525         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
147527 2005-10-19  Simon Josefsson  <jas@extundo.com>
147529         * lib/gc-gnulib.c: Support ARCFOUR.
147531 2005-10-19  Simon Josefsson  <jas@extundo.com>
147533         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
147534         support.
147536         * lib/gc.h: Add ECB enum type.
147538         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
147540 2005-10-18  Simon Josefsson  <jas@extundo.com>
147542         * tests/test-md5.c: New file.
147544         * modules/md5-tests: New file.
147546 2005-10-18  Simon Josefsson  <jas@extundo.com>
147548         * tests/test-md4.c: New file.
147550         * modules/md4, modules/md4-tests: New files.
147552 2005-10-18  Simon Josefsson  <jas@extundo.com>
147554         * m4/md4.m4: New file.
147556 2005-10-18  Simon Josefsson  <jas@extundo.com>
147558         * lib/md4.h, lib/md4.c: New files, based on md5.?.
147560 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
147562         * gnulib-tool (func_create_testdir): Omit the second check whether
147563         BUILT_SOURCES in nonempty.
147565 2005-10-17  Simon Josefsson  <jas@extundo.com>
147567         * tests/test-rijndael.c: New file.
147569 2005-10-17  Simon Josefsson  <jas@extundo.com>
147571         * modules/sha1: Depend on stdint instead of md5.
147573         * modules/md5: Depend on stdint, remove uint32_t.
147575 2005-10-17  Simon Josefsson  <jas@extundo.com>
147577         * modules/gc-sha1-tests: New file.
147579         * tests/test-gc-sha1.c: New file.
147581 2005-10-17  Simon Josefsson  <jas@extundo.com>
147583         * m4/md5.m4: Remove call to uint32_t.m4.
147585 2005-10-17  Simon Josefsson  <jas@extundo.com>
147587         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
147589         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
147590         md5.h.
147592         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
147594         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
147596 2005-10-17  Simon Josefsson  <jas@extundo.com>
147598         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
147600 2005-10-17  Simon Josefsson  <jas@extundo.com>
147602         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
147604 2005-10-17  Simon Josefsson  <jas@extundo.com>
147606         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
147608         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
147610 2005-10-17  Bruno Haible  <bruno@clisp.org>
147612         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
147613         that it can also be used in a test.
147615 2005-10-16  Bruno Haible  <bruno@clisp.org>
147617         * gnulib-tool (func_emit_tests_Makefile_am): Also define
147618         TESTS_ENVIRONMENT, so that individual tests can augment it.
147620         * gnulib-tool (func_create_testdir): Use an intermediate target for
147621         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
147622         macros, like $(ALLOCA_H), which cannot be passed through the command
147623         line.
147625 2005-10-15  Simon Josefsson  <jas@extundo.com>
147627         * modules/rijndael-tests: New file.
147629         * modules/rijndael: New file.
147631 2005-10-15  Simon Josefsson  <jas@extundo.com>
147633         * m4/rijndael.m4: New file.
147635 2005-10-15  Simon Josefsson  <jas@extundo.com>
147637         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
147639         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
147641 2005-10-14  Simon Josefsson  <jas@extundo.com>
147643         * tests/test-arcfour.c: New file.
147645         * modules/arcfour, modules/arcfour-tests: New files.
147647 2005-10-14  Simon Josefsson  <jas@extundo.com>
147649         * m4/arcfour.m4: New file.
147651 2005-10-14  Simon Josefsson  <jas@extundo.com>
147653         * lib/arcfour.h, lib/arcfour.c: New files.
147655 2005-10-14  Roland McGrath  <roland@redhat.com>
147657         Import from libc.  [BZ #1331]
147658         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
147659         macro argument.
147660         Reported by Matej Vela <vela@debian.org>.
147662 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
147664         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
147665         include <wchar.h>; no longer needed.
147667 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
147669         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
147671 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
147672         and  Ulrich Drepper  <drepper@redhat.com>
147674         Import from libc.
147675         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
147676         instead of inline stream orientation test and two separate
147677         function calls.  Pay no attention to USE_IN_LIBIO.
147679 2005-10-13  Simon Josefsson  <jas@extundo.com>
147681         * modules/gc-hmac-md5-tests: New file.
147683         * tests/test-gc-hmac-sha1.c: New file.
147685         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
147687         * modules/gc-hmac-md5-tests: New file.
147689         * tests/test-gc-md5.c: New file.
147691         * modules/gc-md5-tests: New file.
147693 2005-10-13  Simon Josefsson  <jas@extundo.com>
147695         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
147696         Move memory allocation outside of loop.
147698 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
147700         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
147701         intermediate directory is in a read-only file system.  Problem
147702         reported by Eric Blake.
147704 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
147706         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
147708 2005-10-12  Simon Josefsson  <jas@extundo.com>
147710         * tests/test-hmac-sha1.c: New file.
147712         * modules/hmac-sha1-tests: New file.
147714         * modules/hmac-sha1: New file.
147716 2005-10-12  Simon Josefsson  <jas@extundo.com>
147718         * modules/gc-sha1: New file.
147720 2005-10-12  Simon Josefsson  <jas@extundo.com>
147722         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
147724         * tests/test-gc-pbkdf2-sha1.c: New file.
147726 2005-10-12  Simon Josefsson  <jas@extundo.com>
147728         * modules/gc-md5, modules/gc-hmac-md5: New files.
147730         * modules/gc (Files): Remove md5, memxor and hmac files.
147732 2005-10-12  Simon Josefsson  <jas@extundo.com>
147734         * m4/gc-pbkdf2-sha1.m4: New file.
147736         * m4/gc-hmac-sha1.m4: New file.
147738         * m4/gc-sha1: New file.
147740         * m4/hmac-sha1.m4: New file.
147742 2005-10-12  Simon Josefsson  <jas@extundo.com>
147744         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
147746         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
147748 2005-10-12  Simon Josefsson  <jas@extundo.com>
147750         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
147751         suggested by Bruno Haible <bruno@clisp.org>.
147753 2005-10-12  Simon Josefsson  <jas@extundo.com>
147755         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
147757 2005-10-12  Simon Josefsson  <jas@extundo.com>
147759         * lib/gc-pbkdf2-sha1.c: New file.
147761         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
147763 2005-10-12  Simon Josefsson  <jas@extundo.com>
147765         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
147767         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
147769 2005-10-12  Simon Josefsson  <jas@extundo.com>
147771         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
147772         GC_USE_HMAC_MD5, respectively.
147774         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
147775         (gc_md5): Fix typo.
147777         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
147779         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
147781         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
147783 2005-10-12  Bruno Haible  <bruno@clisp.org>
147785         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
147786         Reported by Stepan Kasal <kasal@ucw.cz>.
147788 2005-10-11  Simon Josefsson  <jas@extundo.com>
147790         * tests/test-crc.c: New file.
147792         * modules/crc, modules/crc-tests: New files.
147794 2005-10-11  Simon Josefsson  <jas@extundo.com>
147796         * m4/crc.m4: New file.
147798 2005-10-11  Simon Josefsson  <jas@extundo.com>
147800         * lib/gc.h: Add gc_hash and gc_hash_buffer.
147802         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
147804         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
147806 2005-10-11  Simon Josefsson  <jas@extundo.com>
147808         * lib/crc.h, lib/crc.c: New files.
147810         * lib/gc.h (gc_hash_buffer): Add doc.
147812 2005-10-11  Bruno Haible  <bruno@clisp.org>
147814         * modules/c-strcasestr: New file.
147815         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
147817 2005-10-11  Bruno Haible  <bruno@clisp.org>
147819         * modules/c-strcase: New file.
147820         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
147822 2005-10-11  Bruno Haible  <bruno@clisp.org>
147824         * lib/strcasecmp.c: Include limits.h.
147825         (strcasecmp): Avoid integer overflow on exotic platforms.
147826         * lib/strncasecmp.c: Include limits.h.
147827         (strncasecmp): Avoid integer overflow on exotic platforms.
147828         Reported by Paul Eggert.
147830 2005-10-11  Bruno Haible  <bruno@clisp.org>
147832         * lib/c-strcasestr.h: New file, from GNU gettext.
147833         * lib/c-strcasestr.c: New file, from GNU gettext.
147835 2005-10-11  Bruno Haible  <bruno@clisp.org>
147837         * lib/c-strcase.h: New file, from GNU gettext.
147838         * lib/c-strcasecmp.c: New file, from GNU gettext.
147839         * lib/c-strncasecmp.c: New file, from GNU gettext.
147841 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
147843         * modules/mempcpy (License): GPL -> LGPL.
147844         * modules/strchrnul (License): Likewise.
147845         * modules/sysexits (License): Likewise.
147847 2005-10-08  Simon Josefsson  <jas@extundo.com>
147849         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
147851 2005-10-07  Simon Josefsson  <jas@extundo.com>
147853         * m4/memxor.m4: Remove gl_C_RESTRICT call.
147855 2005-10-06  Simon Josefsson  <jas@extundo.com>
147857         * tests/test-hmac-md5.c: New file.
147859         * modules/hmac-md5-tests: New file.
147861         * modules/hmac-md5: New file.
147863 2005-10-06  Simon Josefsson  <jas@extundo.com>
147865         * m4/hmac-md5.m4: New file.
147867         * m4/memxor.m4: Require gl_C_RESTRICT.
147869 2005-10-06  Simon Josefsson  <jas@extundo.com>
147871         * lib/memxor.c (memxor): Avoid casts and warnings.
147873 2005-10-06  Simon Josefsson  <jas@extundo.com>
147875         * lib/hmac-md5.c: New file.
147877         * lib/hmac.h: New file.
147879 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
147881         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
147882         promotes to int, not unsigned int, to catch the AIX 5.3
147883         compiler bug.
147885 2005-10-05  Simon Josefsson  <jas@extundo.com>
147887         * modules/memxor: New file.
147889         * modules/iconv (Files): Move config.rpath to havelib, it is used
147890         there.
147892         * modules/havelib (Files): Add config.rpath.
147894 2005-10-05  Simon Josefsson  <jas@extundo.com>
147896         * m4/memxor.m4: New file.
147898 2005-10-05  Simon Josefsson  <jas@extundo.com>
147900         * lib/memxor.c (memxor): Fix compiler error.
147902         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
147903         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
147905         * lib/memxor.h, lib/memxor.c: New files.
147907         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
147908         we assume all systems have it, suggested by Jim Meyering
147909         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
147910         any systems lack sys/socket.h; mingw32 is known to lack it, but we
147911         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
147912         same reasons.
147914 2005-10-05  Simon Josefsson  <jas@extundo.com>
147916         * config/srclist.txt: Add glibc bug 1423 for md5.h.
147918 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
147920         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
147921         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
147922         needed, since the source code now assumes these .h files.
147924 2005-10-05  Derek Price  <derek@ximbiot.com>
147926         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
147928 2005-10-05  Bruno Haible  <bruno@clisp.org>
147930         * modules/stdint (License): Change to LGPL.
147932 2005-10-04  Simon Josefsson  <jas@extundo.com>
147934         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
147935         D. Baushke" <mdb@gnu.org>.
147937 2005-10-04  Bruno Haible  <bruno@clisp.org>
147939         * lib/verify.h (verify_true): Provide alternative definition for C++.
147941 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
147943         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
147944         (SSIZE_MAX): New macro, if not already defined.
147945         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
147946         than 2 GiB.
147948 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
147950         Sync from coreutils.
147951         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
147952         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
147953         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
147954         ULLONG_MAX doesn't work with 2.7.2.1.
147956 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
147958         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
147959         From Ben Pfaff.
147961         * modules/exclude (Depends-on): Depend on verify.
147962         * modules/strtoimax (Depends-on): Likewise.
147963         * modules/utimecmp (Depends-on): Likewise.
147965 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
147967         * lib/exclude.c: Include verify.h.
147968         (verify): Remove.  All callers changed to use verify.h's version.
147969         * lib/strtoimax.c: Likewise.
147970         * lib/utimecmp.c: Likewis.e
147972         Sync from coreutils.
147973         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
147974         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
147975         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
147976         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
147977         bother returning ENOSYS if settimeofday or stime fails; just let
147978         them return whatever errno they want to return.
147979         * lib/utimens.c: Include unistd.h, for dup2.
147980         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
147981         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
147983 2005-10-02  Jim Meyering  <jim@meyering.net>
147985         Sync from coreutils.
147986         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
147987         from glibc-2.2.5 that fails for read-only files.
147989 2005-10-02  Jim Meyering  <jim@meyering.net>
147991         Sync from coreutils.
147992         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
147993         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
147994         `#if HAVE_CONFIG_H'.
147995         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
147996         Remove AT_FDCWD test.
147997         Do not consume the fd unless successful.
147998         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
147999         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
148000         block, so that we don't even try to compile it if settimeofday is
148001         available.  This works around a compilation failure on OSF1 V5.1,
148002         due to stime requiring a `long int*' while tv_sec is `int'.
148004 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
148006         Sync from coreutils.
148007         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
148008         against `yes', rather than just testing for nonempty.
148010 2005-10-01  Simon Josefsson  <jas@extundo.com>
148012         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
148013         and Darwin.
148015         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
148016         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
148017         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
148018         freeaddrinfo and gai_strerror are declared by the POSIX headers.
148019         Check if struct addrinfo is declared.
148021 2005-10-01  Simon Josefsson  <jas@extundo.com>
148023         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
148024         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
148025         AI_* and EAI_* definitions.  Protect function declarations.
148027 2005-10-01  Jim Meyering  <jim@meyering.net>
148029         Sync from coreutils.
148031         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
148032         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
148033         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
148034         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
148035         in the inet and nsl libraries.  Required on Solaris 5.7.
148037 2005-10-01  Jim Meyering  <jim@meyering.net>
148039         Sync from coreutils.
148040         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
148041         in the inet and nsl libraries.  Required on Solaris 5.7.
148043 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
148045         * lib/getdelim.c (getdelim): Remove unused variables.
148047 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
148049         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
148050         so that the code works even with ancient cpp.  Portability problem
148051         with GCC 2.7.2.1 reported by Thomas M.Ott.
148053 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
148055         * modules/regex (Depends-on): Add strcase.
148057         * modules/gethostname (Licence): Change from GPL to LGPL, since
148058         gethostname.c is a trivial implementation of a standard library
148059         function.
148060         * modules/poll (License): Change from GPL to LGPL, since it's
148061         derived from LGPL code.
148063 2005-09-27  Jim Meyering  <jim@meyering.net>
148065         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
148066         HAVE_CONFIG_H.
148068         * lib/intprops.h (signed_type_or_expr__): Define.
148069         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
148070         for unsigned types.
148072 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
148074         * lib/verify.h (verify_expr): Remove, replacing with:
148075         (verify_true): New macro that returns true instead of void.
148076         (verify_type__): Remove.
148077         (verify): Use verify_true rather than verify_type__.
148079 2005-09-26  Bruno Haible  <bruno@clisp.org>
148081         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
148082         is necessary.
148083         (lib_SOURCES): Remove mbchar.c.
148084         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
148085         (Files): Add m4/mbrtowc.m4.
148086         * modules/mbiter: Likewise.
148087         * modules/mbuiter: Likewise.
148089 2005-09-26  Bruno Haible  <bruno@clisp.org>
148091         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
148092         compile mbchar.c if they are not both present.
148093         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
148094         * m4/mbiter.m4 (gl_MBITER): Likewise.
148095         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
148096         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
148097         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
148099 2005-09-25  Jim Meyering  <jim@meyering.net>
148101         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
148102         also uses socklen_t.
148104 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
148106         * lib/utimens.c (ENOSYS): Define if not already defined.
148107         (futimens): Support having a null PATH if the file descriptor
148108         is nonnegative.
148110         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
148111         Remove.
148112         (__attribute): Define to empty unless GCC 3.1 or later.
148113         This works around a core dump on OpenBSD 3.4, which has GCC
148114         2.95.3, which dumps core when given __attribute__(()).  It also
148115         simplifies other tests, since we really don't want to bother with
148116         worrying about which ancient version of GCC supported what.
148117         Original problem reported by Yoann Vandoorselaere, with part of
148118         the fix suggested by Derek Price.
148120 2005-09-24  Jim Meyering  <jim@meyering.net>
148122         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
148123         so we can once again use a positive bitfield width of 1 -- now we
148124         don't have to explain why we were using a bitfield width of 2.
148126 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
148128         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
148129         and similarly for the other external symbols.  Problem reported
148130         by James Gallager.
148132         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
148133         bug reported by Jim Meyering.
148135         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
148136         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
148137         not needed, since socklen is a prerequisite module.
148139 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
148141         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
148142         Problem reported by Eric Blake.
148143         (getaddrinfo): Initialize se so that it's not garbage.
148144         Redo internal storage allocation so that it doesn't make unportable
148145         assumptions about alignment.
148146         Fix a memory leak.
148148         * lib/utimens.c (futimens): Use futimesat if available.
148149         Prefer it to futimes since it doesn't have the futimes bug.
148151         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
148152         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
148153         Instead, declare a function that returns a pointer to an array,
148154         and use verify_type__ to declare the size of the array.
148155         Problem and germ of a solution reported by Bruno Haible.
148156         (verify_type__): Use 2, not 1, for bitfield size, to avoid
148157         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
148159 2005-09-23  Jim Meyering  <jim@meyering.net>
148161         Sync from coreutils.
148162         Correct build failure (socklen_t not defined) on at least
148163         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
148164         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
148166 2005-09-23  Jim Meyering  <jim@meyering.net>
148168         * modules/getaddrinfo (Depends-on): Add socklen.
148170 2005-09-23  Bruno Haible  <bruno@clisp.org>
148172         * tests/test-verify.c: New file.
148174 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
148176         Sync from coreutils.
148178         * modules/argmatch (Depends-on): Add verify.
148179         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
148180         unistd-safer.
148181         * modules/save-cwd (Depends-on): Likewise.
148183         * modules/openat (Files): Add lib/openat-die.c.
148184         (Depends-on): Remove error, exitfail.
148185         Add dirname.
148187         * modules/verify: New file.
148188         * MODULES.html.sh (Diagnostics <assert.h>): New section,
148189         with "verify" module.
148191 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
148193         Sync from coreutils.
148195         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
148196         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
148197         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
148198         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
148199         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
148200         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
148201         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
148202         Don't bother checking for string.h, stdlib.h, unistd.h.
148203         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
148204         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
148205         module's job.
148206         * m4/jm-macros.m4 (gl_MACROS): Likewise.
148207         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
148209         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
148210         (gl_GETDATE): Use it.
148212         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
148214 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
148216         Sync from coreutils.
148218         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
148219         stat-time.h.
148220         * lib/argmatch.h: Include verify.h
148221         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
148222         (ARGMATCH_ASSERT): Remove; unused.
148223         * lib/canonicalize.c: Assume STDC_HEADERS.
148224         * lib/exclude.c: Include "strcase.h".
148225         * lib/regex_internal.h [!defined _LIBC]: Likewise.
148226         * lib/getusershell.c: Include stdio--.h rather than stdio.h
148227         and stdio-safer.h.
148228         (getusershell): Call fopen, not fopen_safer.
148229         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
148230         Do not include unistd-safer.h.
148231         (save_cwd): Don't call fd_safer; no longer needed
148232         now that we include fcntl--.h.
148234         * lib/getdate.y (relative_time): New type.
148235         (RELATIVE_TIME_0): New constant.
148236         (parser_control): Use relative_time instead of doing it ourselves.
148237         (%union): Add new relative_time rel member.
148238         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
148239         Now typeless.
148240         (relunit, relunit_snumber): Now of type rel.
148241         (zone, rel, relunit, get_date): Adjust to above changes.
148243         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
148244         Do not include unistd-safer.h.
148245         (getloadavg): Don't call fd_safer; no longer needed
148246         now that we include fcntl--.h.
148248         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
148249         (make_dir_parents): Treat ENOSYS like EEXIST.
148251         Improve quality of diagnostics on restore_cwd failure.
148252         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
148253         (make_dir_parents): Last arg is now int * (for errno), not bool *.
148254         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
148255         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
148256         each time through the loop.  Do not diagnose restore_cwd failure;
148257         that is the caller's job (and perhaps the caller does not care).
148259         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
148260         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
148261         If the file already exists but is not a directory, don't bother
148262         to try to make its parents.
148263         Close potential file descriptor leak if we can't chdir("/") (!).
148264         Don't always return true if chdir($PWD) fails; return true only
148265         if the requested action was done successfully (except for the
148266         chdir($PWD)).
148267         Don't log final directory unless we actually made it.
148268         Refactor to avoid duplicate code to fix up permissions.
148269         Don't attempt to fix up parent permissions if chdir($PWD) fails.
148271         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
148272         to make it a bit faster and (I hope) clearer.
148273         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
148274         Fix bug in formats like %2N.
148276         * lib/verify.h: New file.
148278 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
148280         Sync from coreutils.
148281         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
148283 2005-09-22  Jim Meyering  <jim@meyering.net>
148285         Sync from coreutils.
148287         * m4/lstat.m4 (gl_FUNC_LSTAT):
148288         Use AC_LIBSOURCES to require lstat.c and lstat.h.
148289         Remove obsolete comment.
148290         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
148291         * m4/xstrtod.m4: Likewise.
148293         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
148295 2005-09-22  Jim Meyering  <jim@meyering.net>
148297         Sync from coreutils.
148299         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
148301         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
148302         the .tm_year member, since otherwise gcc-4.0 would now warn about
148303         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
148305         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
148306         order to avoid an unsuppressible warning from gcc on 64-bit systems.
148308         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
148309         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
148310         when run in a time zone for which daylight savings time is in effect
148311         for the starting date.
148313         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
148314         stop us from restricting permissions of just-created absolute-named
148315         directories.
148316         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
148317         to restore initial working directory.
148318         * lib/mkdir-p.c (make_dir_parents): New parameter:
148319         different_working_dir, to tell caller if/when we change the working
148320         directory and are unable to return to the initial one.
148321         * lib/mkdir-p.h (make_dir_parents): Update prototype.
148322         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
148323         `return false'.  This fixes a bug introduced on 2004-07-30.
148325         * lib/openat.c (fdopendir): Be sure to close the supplied
148326         file descriptor before returning.  This makes our replacement
148327         implementation a little closer to Solaris's, where fdopendir
148328         ties the file descriptor to the returned DIR* pointer.
148329         * lib/openat.c (unlinkat): New function.
148330         * lib/openat.h (unlinkat): Add prototype.
148331         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
148332         (openat_restore_fail): Rename from openat_restore_die.
148333         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
148335         Provide an alternative to exiting immediately upon save_cwd or
148336         restore_cwd failure.  Now, an application can arrange e.g.,
148337         to perform a longjump in that case.
148338         * lib/openat.c: Include dirname.h.
148339         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
148340         (rpl_openat, fdopendir, fstatat): Call openat_save_die
148341         and openat_restore_die rather than calling error directly.
148342         Don't include "error.h" or "exitfail.h"; they're no longer needed.
148344         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
148345         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
148346         define.
148348         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
148349         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
148350                             int utc, int nanoseconds);
148351         Background:
148352         date should not have to allocate a megabyte of virtual memory to
148353         handle a format argument like +%1048575T.  When implemented with
148354         strftime, it must allocate such a buffer, use strftime to fill it
148355         in, print it, then free it.
148356         With fprintftime, it simply prints everything and exits.
148357         With no need for memory allocation, that's one fewer way to fail.
148358         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
148359         optional field width, not before, so we accept %9:z, not %:9z.
148360         (my_strftime): Be sure to use L_('x') for literals.
148362         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
148363         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
148364         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
148365         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
148366         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
148367         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
148368         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
148369         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
148370         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
148371         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
148372         * lib/xgethostname.c, lib/xreadlink.c:
148373         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
148375         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
148376         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
148377         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
148378         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
148379         and don't include <sys/file.h>).
148381 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
148383         Sync from coreutils.
148385         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
148386         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
148387         [!LDAV_DONE]: Avoid unused variable warning.
148389 2005-09-21  Bruno Haible  <bruno@clisp.org>
148391         * lib/unicodeio.h (unicode_to_mb): New declaration.
148393 2005-09-20  Derek Price  <derek@ximbiot.com>
148395         * lib/getaddrinfo.c: Don't include <netdb.h> included from
148396         getaddrinfo.h.
148398 2005-09-20  Bruno Haible  <bruno@clisp.org>
148400         * gnulib-tool: Remove trailing slashes from the values specified for
148401         --source-base, --m4-base, --tests-base, --aux-dir.
148402         Suggested by Simon Josefsson <jas@extundo.com>.
148404 2005-09-20  Bruno Haible  <bruno@clisp.org>
148406         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
148407         func_modules_to_filelist, func_import, func_create_testdir): Make all
148408         sorting results locale-independent, so that gnulib-cache.m4 doesn't
148409         change when gnulib-tool is invoked in a different locale.
148411 2005-09-19  Simon Josefsson  <jas@extundo.com>
148413         * m4/socklen.m4: Fix typo.
148415 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
148417         Use a consistent style for including <config.h>.
148418         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
148419         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
148420         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
148421         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
148422         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
148423         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
148424         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
148425         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
148426         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
148427         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
148428         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
148429         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
148430         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
148431         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
148432         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
148433         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
148434         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
148435         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
148436         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
148437         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
148438         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
148439         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
148440         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
148441         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
148442         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
148443         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
148444         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
148445         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
148446         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
148447         lib/xstrtoumax.c, lib/yesno.c:
148448         Standardize inclusion of config.h.
148449         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
148450         lib/inttostr.h:  Removed inclusion of config.h from header files.
148451         * lib/inttostr.c:  Adjusted in-tree users.
148452         * lib/timespec.h: Remove superfluous warning to include config.h.
148453         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
148454         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
148455         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
148456         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
148457         config.h with HAVE_CONFIG_H.
148459 2005-09-19  Jim Meyering  <jim@meyering.net>
148461         * modules/pathmax (License): Change to LGPL.
148463 2005-09-19  Derek Price  <derek@ximbiot.com>
148465         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
148467 2005-09-19  Bruno Haible  <bruno@clisp.org>
148469         * gnulib-tool (import): Provide default for --tests-base.
148471 2005-09-19  Bruno Haible  <bruno@clisp.org>
148473         * doc/quote.texi: New file, extracted from gnulib.texi.
148474         * doc/ctime.texi: New file, extracted from gnulib.texi.
148475         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
148476         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
148477         * doc/gnulib.texi: Include them.
148479 2005-09-18  Bruno Haible  <bruno@clisp.org>
148481         Portability fix.
148482         * gnulib-tool (func_readlink): New function.
148483         (func_ln_if_changed): Use it.
148485 2005-09-18  Bruno Haible  <bruno@clisp.org>
148487         * gnulib-tool: Support --with-tests also with --import.
148488         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
148489         (func_import): Use variables $testsbase and $inctests. Emit a
148490         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
148491         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
148492         SUBDIRS += $testsdir.
148493         (func_create_testdir): Update.
148495 2005-09-18  Bruno Haible  <bruno@clisp.org>
148497         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
148498         instead of $dry_run.
148499         (func_cp_if_changed, func_mv_if_changed): Remove functions.
148500         (func_ln_if_changed): Don't handle dry-run here.
148501         (func_import): In dry-run mode, detect more precisely which actions
148502         would be performed, and don't use "...ing" verbs.
148504 2005-09-18  Bruno Haible  <bruno@clisp.org>
148506         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
148507         (func_import): Use join on two temporary files instead of three nested
148508         loops, in order to determine which files are new or old.
148510 2005-09-18  Bruno Haible  <bruno@clisp.org>
148512         * gnulib-tool (func_import): Comment out code that spits out the
148513         new files with --dry-run.
148515 2005-09-18  Bruno Haible  <bruno@clisp.org>
148517         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
148519 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
148521         * lib/stat-time.h: New file.
148522         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
148523         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
148524         in a different way.
148525         (timespec_cmp): New function.
148526         * lib/utimecmp.c: Include stat-time.h.
148527         (SYSCALL_RESOLUTION): Depend on whether various struct stat
148528         members exist, not on the obsolescent ST_MTIM_NSEC.
148529         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
148531 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
148533         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
148535 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
148537         * MODULES.html.sh (File system functions): Add stat-time.
148538         * modules/stat-time: New file.
148539         * modules/timespec (Files): Remove m4/st_mtim.m4; this
148540         is now done in a different way, by the stat-time module.
148541         * modules/utimecmp (Depends-on): Add stat-time.
148543 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
148545         * m4/st_mtim.m4: Remove.  Superseded by...
148546         * m4/stat-time.m4: New file.
148547         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
148548         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
148550 2005-09-15  Derek Price  <derek@ximbiot.com>
148552         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
148554 2005-09-15  Derek Price  <derek@ximbiot.com>
148556         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
148557         * lib/regex_internal.c: Ditto, using this...
148558         (__GNUC_PREREQ): ...new macro.
148559         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
148560         using...
148561         (__GNUC_PREREQ): ...this new macro.
148563         * lib/strstr.h: Include string.h. Define strstr as a macro here.
148565 2005-09-15  Derek Price  <derek@ximbiot.com>
148566             Paul Eggert  <eggert@cs.ucla.edu>
148568         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
148569         changes, consolidating in...
148570         * lib/regex_internal.h: ...this file.
148572 2005-09-13  Jim Meyering  <jim@meyering.net>
148574         * lib/canon-host.c: Filter through gnu indent and reword comments
148575         slightly.
148576         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
148578 2005-09-13  Derek Price  <derek@ximbiot.com>
148580         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
148581         failure.
148582         Reported by Jim Meyering  <jim@meyering.net>.
148584 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
148586         * lib/base64.c: Typo.
148587         (base64_encode): Put b64str in initialized data section.
148589 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
148591         Merge glibc and coreutils changes into gnulib, plus a few
148592         extra fixes.
148593         * lib/md5.c: Use #error rather than a string.
148594         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
148595         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
148596         (__attribute__): Define to empty for non recent-GCC.
148597         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
148598         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
148599         Renamed from their non-__ counterparts, with new macros replacing
148600         them if not _LIBC.  Add __THROW attribute.
148601         (rol): Remove.
148602         (struct md5_ctx): Align buffer if using GCC.
148603         * lib/sha1.h (struct sha1_ctx): Likewise.
148604         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
148605         The old name was backwards.
148606         (NOTSWAP): Remove; not used.
148607         (rol): New macro, moved here from md5.h.
148608         (sha1_process_block): Remove a FIXME that doesn't make sense.
148610 2005-09-12  Derek Price  <derek@ximbiot.com>
148612         Return usable errors from canon-host.
148613         * lib/canon-host.h: New file.
148614         * lib/canon-host.c (canon_host): Wrap...
148615         (canon_host_r): ...this new function, which now relies exclusively on
148616         getaddrinfo.
148617         (ch_strerror): New function.
148618         (last_cherror): New global.
148619         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
148620         interface.
148621         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
148622         void *.
148623         (freeaddrinfo): Free ai->ai_canonname when set.
148625 2005-09-12  Derek Price  <derek@ximbiot.com>
148627         Make canon-host require getaddrinfo.
148628         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
148629         AC_LIBSOURCE canon-host.h.  Call...
148630         (gl_PREREQ_CANON_HOST): ...this new function, which requires
148631         gl_GETADDRINFO.
148632         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
148634 2005-09-12  Derek Price  <derek@ximbiot.com>
148636         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
148637         LGPL.
148638         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
148640 2005-09-12  Derek Price  <derek@ximbiot.com>
148642         * lib/gai_strerror.c: Include config.h when available.  Include
148643         getaddrinfo.h before other headers to test interface.
148644         Reported by Larry Jones <lawrence.jones@ugs.com>.
148646 2005-09-12  Derek Price  <derek@ximbiot.com>
148647             Paul Eggert  <eggert@cs.ucla.edu>
148649         * modules/glob (Files): Add glob-libc.h.
148651 2005-09-12  Derek Price  <derek@ximbiot.com>
148652             Paul Eggert  <eggert@cs.ucla.edu>
148654         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
148655         glob_.h, glob-libc.h.
148656         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
148658 2005-09-12  Derek Price  <derek@ximbiot.com>
148659             Paul Eggert  <eggert@cs.ucla.edu>
148661         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
148662         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
148663         protecting things that should be done only in gnulib contexts.
148664         * lib/glob_.h: New file, containing only the glob things needed for
148665         gnulib.
148666         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
148667         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
148668         (glob, globfree, glob_pattern_p): Now defined simply in terms of
148669         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
148670         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
148671         and to respect the namespace rules better.
148673 2005-09-08  Simon Josefsson  <jas@extundo.com>
148675         * modules/socklen: New file.
148677 2005-09-08  Simon Josefsson  <jas@extundo.com>
148679         * m4/socklen.m4: New file.
148681 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
148683         * modules/utimens (Files): Add m4/utimbuf.m4, since
148684         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
148685         Reported by Sergey Poznyakoff.
148687 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
148689         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
148690         definitions, since that's the preferred style in glibc.
148691         Fix a minor spacing issue, and update copyright notice to match
148692         glibc's.
148694 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
148696         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
148698 2005-09-06  Simon Josefsson  <jas@extundo.com>
148700         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
148701         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
148703 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
148705         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
148706         warning.
148708 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
148710         * config/srclist.txt: Add glibc bug 1302.
148712 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
148714         Change bitset word type from unsigned int to unsigned long int,
148715         as this has better performance on typical 64-bit hosts.
148716         Port bitset code to hosts with unusual word sizes.
148717         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
148718         (build_collating_symbol):
148719         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
148720         argument is a bitset.  This is merely a style issue, but it makes
148721         it clearer that an entire array is expected.
148722         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
148723         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
148724         Port to the case where bitset_word is not the same as unsigned int.
148725         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
148726         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
148727         Likewise.
148728         * lib/regexec.c (check_dst_limits_calc_pos_1,
148729         check_subexp_matching_top):
148730         (build_trtable, group_nodes_into_DFAstates):
148731         Likewise.
148732         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
148733         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
148734         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
148735         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
148736         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
148737         * lib/regcomp.c (optimize_subexps, lower_subexp):
148738         Work even if bitset_word has holes in its bitwise representation.
148739         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
148740         * lib/regexec.c (check_dst_limits_calc_pos_1,
148741         check_subexp_matching_top):
148742         Likewise.
148743         * lib/regex_internal.c (re_string_reconstruct):
148744         Don't assume UCHAR_MAX == 255.
148745         * lib/regex_internal.h (bitset_set_all): Likewise.
148746         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
148747         All uses changed.
148748         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
148749         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
148750         All uses changed.
148751         (BITSET_WORD_MAX): New macro.
148752         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
148753         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
148754         (bitset_empty, bitset_copy):
148755         Prefer sizeof (bitset) to multiplying it out ourselves.
148756         (bitset_not_merge): Remove; unused.
148757         (bitset_contain): Return bool, not unsigned int with one bit on.
148758         All callers changed.
148759         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
148760         alignment than re_node_set; do this by defining a new internal
148761         type struct dests_alloc and using it to allocate memory.
148763 2005-09-05  Bruno Haible  <bruno@clisp.org>
148765         * gnulib-tool (func_import): Fix comparison in handling of symbolic
148766         links.
148768 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
148770         * modules/size_max (Makefile.am): Add size_max.h
148772 2005-09-04  Derek Price  <derek@ximbiot.com>
148774         * gnulib-tool (func_import): Fix reversed $symbolic logic.
148776 2005-09-03  Simon Josefsson  <jas@extundo.com>
148778         * gnulib-tool: Fix typo.
148780 2005-09-03  Simon Josefsson  <jas@extundo.com>
148782         * config/srclist.txt: Add glibc bug 1293.
148784 2005-09-03  Derek Price  <derek@ximbiot.com>
148786         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
148787         From Larry Jones <lawrence.jones@ugs.com>.
148789 2005-09-02  Simon Josefsson  <jas@extundo.com>
148791         * modules/socklen: New file.
148793 2005-09-02  Simon Josefsson  <jas@extundo.com>
148795         * modules/havelib: New module.
148797         * modules/gettext, modules/iconv, modules/lock, modules/readline:
148798         Use havelib.
148800 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
148802         Check for arithmetic overflow when calculating sizes, to prevent
148803         some buffer-overflow issues.  These patches are conservative, in the
148804         sense that when I couldn't determine whether an overflow was possible,
148805         I inserted a run-time check.
148806         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
148807         macros.
148808         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
148809         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
148810         (re_xnrealloc, re_x2nrealloc): New inline functions.
148811         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
148812         parse_bracket_exp):
148813         (build_equiv_class, build_charclass): Check for arithmetic overflow
148814         in size expression calculations.
148815         * lib/regex_internal.c (re_string_realloc_buffers):
148816         (build_wcs_upper_buffer, re_node_set_add_intersect):
148817         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
148818         (re_dfa_add_node, register_state): Likewise.
148819         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
148820         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
148821         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
148822         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
148824 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
148826         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
148827         m4/ulonglong.m4.  Problem reported by Martin Lambers.
148829 2005-09-02  Bruno Haible  <bruno@clisp.org>
148831         Support for lib vs. lib64 distinction on biarch platforms.
148832         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
148833         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
148834         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
148836 2005-09-02  Bruno Haible  <bruno@clisp.org>
148838         * gnulib-tool (import): In the other first-use case, provide defaults
148839         as well.
148841 2005-09-02  Bruno Haible  <bruno@clisp.org>
148843         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
148844         patches not yet found in the latest gettext release.
148846 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
148848         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
148849         to avoid a collision with bits/local_lim.h in glibc.
148850         All uses changed.  Problem reported by Dmitry V. Levin in
148851         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
148853         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
148854         bugs in int versus size_t comparisons.
148855         (re_string_context_at): Fix bug where the code assumed that
148856         Idx is signed.
148858         Use bool where appropriate.
148859         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
148860         All callers changed.
148861         (calc_eclosure_iter): Likewise, for ROOT arg.
148862         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
148863         (build_charclass_op): Likewise, for NON_MATCH arg.
148864         * lib/regex_internal.c (re_string_allocate, re_string_construct):
148865         (re_string_construct_common): Likewise, for ICASE arg.
148866         * lib/regexec.c (re_search_2_stub, re_search_stub):
148867         Likewise, for RET_LEN arg.
148868         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
148869         (set_regs): Likewise, for FL_BACKTRACK arg.
148870         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
148871         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
148872         (calc_eclosure_iter, parse_bracket_exp):
148873         Use bool for internal variables that are booleans.
148874         * lib/regexec.c (re_search_internal, check_matching,
148875         proceed_next_node):
148876         (set_regs, build_sifted_states, sift_states_bkref):
148877         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
148878         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
148879         (find_collation_sequence_value):
148880         Likewise.
148881         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
148882         (re_node_set_compare):
148883         Return bool, not int. All callers changed.
148884         * lib/regexec.c (check_halt_node_context, check_dst_limits):
148885         (build_trtable, check_node_accept): Likewise.
148886         * lib/regex_internal.h: Include stdbool.h.
148888         Fix bugs uncovered when converting to bool.
148889         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
148890         failure instead of charging ahead blindly.
148891         * lib/regex_internal.c (register_state): Likewise.
148892         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
148893         for freeing internal storage.
148894         (group_nodes_into_DFA_states): Use unsigned int, not int, for
148895         bitset pieces used as boolean, to avoid undefined behavior
148896         on hosts that do int overflow checking.
148898 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
148900         * config/srclist.txt: Add glibc bugs 1285-1287.
148902 2005-09-01  Jim Meyering  <jim@meyering.net>
148904         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
148905         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
148906         Require gl_STAT_MACROS, too.
148908 2005-09-01  Bruno Haible  <bruno@clisp.org>
148910         * gnulib-tool (import): In the first-use case, provide defaults.
148912 2005-09-01  Bruno Haible  <bruno@clisp.org>
148914         * gnulib-tool (func_import): Remove the .tmp files.
148916 2005-09-01  Bruno Haible  <bruno@clisp.org>
148918         * gnulib-tool (func_import): Fix handling of symbolic links.
148920 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
148922         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
148923         old glibc regex code mishandles strings longer than 2**31 bytes.
148924         This patch fixes this when the regex code is used in gnulib
148925         (i.e., outside glibc).
148927         This patch should not affect the use of the regex code inside
148928         glibc.  No doubt this problem also needs to be handled for glibc
148929         as well, but the result will be an incompatible change to the
148930         glibc ABI, and the old ABI will have to be supported too.  That
148931         can be the subject for another patch.
148933         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
148934         governing whether the rest of this patch is active.  By default,
148935         the macro is disabled and the patch has no effect.
148936         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
148937         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
148938         (struct re_pattern_buffer, re_search, re_search_2, re_match):
148939         (re_match_2, re_set_registers): Use the new types.
148940         * lib/regex_internal.h (Idx, re_hashval_t): New types.
148941         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
148942         New macros.
148943         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
148944         (re_string_context_at, bin_tree_t, re_dfastate_t):
148945         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
148946         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
148947         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
148948         (re_string_char_size_at, re_string_wchar_at):
148949         (re_string_elem_size_at):
148950         Use the new types and macros to port to 64-bit hosts.
148951         Use unsigned types for internal values, so that the code
148952         mostly works even for arrays larger than SSIZE_MAX.
148953         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
148954         (search_duplicated_node, calc_eclosure_iter, fetch_number):
148955         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
148956         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
148957         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
148958         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
148959         (calc_inveclosure, parse_dup_op, build_range_exp):
148960         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
148961         (fetch_number, create_token_tree, mark_opt_subexp):
148962         Likewise.
148963         * lib/regex_internal.c (re_string_construct_common,
148964         create_ci_newstate):
148965         (create_cd_newstate, re_string_allocate, re_string_construct):
148966         (re_string_realloc_buffers, build_wcs_upper_buffer):
148967         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
148968         (re_string_reconstruct, re_string_peek_byte_case):
148969         (re_string_fetch_byte_case, re_string_context_at):
148970         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
148971         (re_node_set_init_copy, re_node_set_add_intersect):
148972         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
148973         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
148974         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
148975         (re_acquire_state, re_acquire_state_context, register_state):
148976         Likewise.
148977         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
148978         search_cur_bkref_entry):
148979         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
148980         (re_search_internal, re_search_2_stub, re_search_stub)
148981         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
148982         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
148983         (update_cur_sifted_state, check_dst_limits):
148984         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
148985         (check_subexp_limits, sift_states_bkref, merge_state_array):
148986         (check_subexp_matching_top, get_subexp, get_subexp_sub):
148987         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
148988         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
148989         (expand_bkref_cache, check_node_accept_bytes):
148990         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
148991         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
148992         (acquire_init_state_context, check_halt_node_context):
148993         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
148994         (sift_states_backward, clean_state_log_if_needed):
148995         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
148996         (find_recover_state, transit_state_sb, transit_state_mb):
148997         (transit_state_bkref, build_trtable, match_ctx_clean):
148998         Likewise.
148999         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
149000         to work around an assumption that REG_MISSING is negative.
149002         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
149003         (seek_collating_symbol_entry) [defined _LIBC]:
149004         (lookup_collation_sequence_value) [defined _LIBC]:
149005         (build_range_exp, build_collating_symbol) [defined _LIBC]:
149006         Use prototypes rather than old-style function definitions.
149007         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
149008         (transit_state_sb) [0]:
149009         (find_collation_sequence_value) [defined _LIBC]: Likewise.
149011         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
149012         rm_eo.
149014         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
149015         (optimize_subexps, lower_subexp):
149016         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
149017         since the signed shift might overflow.  Use 1u<<31 instead.
149018         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
149019         Likewise.
149020         * lib/regexec.c (check_dst_limits_calc_pos_1,
149021         check_subexp_matching_top): Likewise.
149023         * lib/regcomp.c (optimize_subexps, lower_subexp):
149024         Use CHAR_BIT rather than 8, for clarity.
149025         * lib/regexec.c (check_dst_limits_calc_pos_1):
149026         (check_subexp_matching_top): Likewise.
149027         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
149028         have to worry about portability issues when shifting it left.
149029         Remove no-longer-needed test for table_size > 0.
149030         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
149031         in a word, as the resulting behavior is undefined.
149032         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
149033         in one case, a <= should have been an <, and in another case the
149034         whole test was missing.
149035         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
149036         the standard name CHAR_BIT.
149037         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
149038         this is not true on one's complement and signed-magnitude hosts.
149040         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
149041         next_last_offset.
149042         (struct re_dfa_t): Remove unused member states_alloc.
149043         * lib/regcomp.c (init_dfa): Don't initialize unused members.
149045 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
149047         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
149048         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
149049         and large-file glibc and in 32-bit large-file Solaris.
149051 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
149053         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
149054         lengths fit in regoff_t; this isn't true if regoff_t is the same
149055         width as size_t.
149056         * lib/regex.c (re_search_internal): 5th arg is LAST_START
149057         (= START + RANGE) instead of RANGE.  This avoids overflow
149058         problems when regoff_t is the same width as size_t.
149059         All callers changed.
149060         (re_search_2_stub): Check for overflow when adding the
149061         sizes of the two strings.
149062         (re_search_stub): Check for overflow when adding START
149063         to RANGE; if it occurs, substitute the extreme value.
149065 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
149067         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
149069 2005-08-31  Jim Meyering  <jim@meyering.net>
149071         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
149072         a pointer-to-const.
149073         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
149074         (register_state): Likewise.
149075         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
149076         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
149077         (group_nodes_into_DFAstates): Likewise.
149079 2005-08-31  Jim Meyering  <jim@meyering.net>
149081         * check-module: Add a FIXME comment.
149083 2005-08-31  Eric Blake  <ebb9@byu.net>
149085         * modules/unistd-safer (Files): Add unistd--.h.
149086         * modules/stdio-safer (Files): Add stdio--.h.
149088 2005-08-31  Derek Price  <derek@ximbiot.com>
149090         * lib/getdelim.c (getdelim): Return EOF on EOF.
149091         Reported by Larry Jones <lawrence.jones@ugs.com>.
149093 2005-08-31  Bruno Haible  <bruno@clisp.org>
149095         Avoid unnecessary diffs in the generated lib/Makefile.am.
149096         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
149097         the generated files.
149098         (func_import): Don't set cmd.
149100 2005-08-31  Bruno Haible  <bruno@clisp.org>
149102         * lib/strstr.c: Include <stddef.h>, for NULL.
149103         * lib/strcasestr.c: Likewise.
149104         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
149106 2005-08-31  Bruno Haible  <bruno@clisp.org>
149108         * gnulib-tool: New option --macro-prefix.
149109         (func_import): Use macro_prefix.
149110         (import): Handle option --macro-prefix.
149112 2005-08-31  Bruno Haible  <bruno@clisp.org>
149114         * gnulib-tool (import): Rename most ac_* variables to cached_*.
149115         Also use new variables cached_lgpl, cached_libtool.
149117 2005-08-31  Bruno Haible  <bruno@clisp.org>
149119         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
149120         always instantiating them.
149122 2005-08-31  Bruno Haible  <bruno@clisp.org>
149124         * gnulib-tool (func_import): Read the previous cached settings
149125         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
149126         earlier added by gnulib but are now dropped. Warn when a gnulib file
149127         overwrites a non-gnulib file.
149129 2005-08-31  Bruno Haible  <bruno@clisp.org>
149131         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
149132         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
149133         projects that don't keep autogenerated files in CVS. Put into
149134         actioncmd only the specified modules, not the transitive closure.
149136 2005-08-31  Bruno Haible  <bruno@clisp.org>
149138         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
149139         Create directories that shall be filled.
149140         (import): Don't look for gl_* macros in configure.ac. Recurse across
149141         all directories containing a gnulib-cache.m4 files, if meaningful.
149143 2005-08-31  Bruno Haible  <bruno@clisp.org>
149145         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
149146         (import): Set seen_libtool when we see gl_LIBTOOL.
149148 2005-08-31  Bruno Haible  <bruno@clisp.org>
149150         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
149151         declaration macro definitions from generated gnulib.m4.
149153 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
149155         * lib/iconvme.h: Add prototype for iconv_alloc.
149157 2005-08-29  Simon Josefsson  <jas@extundo.com>
149159         * lib/iconvme.c: Fix errno.
149161 2005-08-29  Bruno Haible  <bruno@clisp.org>
149163         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
149164         that it works when the directory contains spaces.
149166 2005-08-29  Bruno Haible  <bruno@clisp.org>
149168         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
149170 2005-08-29  Bruno Haible  <bruno@clisp.org>
149172         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
149173         Emit more advice.
149175 2005-08-29  Bruno Haible  <bruno@clisp.org>
149176         and Stepan Kasal  <kasal@ucw.cz>
149178         * check-module: If more parameters are given, check each of them
149179         separately; add more exceptions, as noted by Jim Meyering.
149180         (check_module): New procedure.
149181         (%exempt_header): Now contains all exceptions.
149183 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
149185         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
149187 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
149189         * lib/iconvme.c: Split iconv_string into iconv_alloc.
149191 2005-08-28  Bruno Haible  <bruno@clisp.org>
149193         * m4/gnulib-tool.m4: New file.
149195 2005-08-27  Jim Meyering  <jim@meyering.net>
149197         * modules/unistd-safer (Files): Add pipe-safer.c.
149198         * modules/fcntl-safer (Files): Add creat-safer.c.
149200 2005-08-27  Jim Meyering  <jim@meyering.net>
149202         * m4/stdlib-safer.m4: New file.  From coreutils.
149203         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
149204         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
149205         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
149206         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
149207         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
149209 2005-08-27  Jim Meyering  <jim@meyering.net>
149211         * lib/fopen-safer.c: Merge minor changes from coreutils.
149212         * lib/dup-safer.c: Likewise.
149213         * lib/fd-safer.c: Likewise.
149215         Merge from coreutils.
149216         * lib/stdio--.h: New file.
149217         * lib/stdlib--.h: New file.
149218         * lib/mkstemp-safer.c: New file.
149220         GNU tar needs these.
149221         * lib/pipe-safer.c: New file.
149222         * lib/creat-safer.c: New file.
149223         * lib/fcntl--.h (creat): Define to creat_safer.
149224         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
149225         * lib/unistd--.h (pipe): Define to pipe_safer.
149226         * lib/unistd-safer.h: Declare pipe_safer.
149228 2005-08-26  Simon Josefsson  <jas@extundo.com>
149230         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
149231         Haible <bruno@clisp.org>.
149233 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
149235         * lib/regex_internal.h: Remove all references to
149236         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
149237         or better.
149238         (bitset_not, bitset_merge, bitset_not_merge):
149239         (bitset_mask, re_string_allocate, re_string_construct):
149240         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
149241         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
149242         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
149243         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
149244         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
149245         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
149246         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
149247         (re_acquire_state_context):
149248         Remove unnecessary forward decls.
149249         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
149250         Put __attribute at function definition,
149251         now that the function decl has been removed.
149252         * lib/regex_internal.c (re_string_peek_byte_case):
149253         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
149254         Likewise.
149256 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
149258         * m4/regex.m4: Add AC_PREREQ(2.50).
149259         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
149261 2005-08-25  Simon Josefsson  <jas@extundo.com>
149263         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
149264         __fsetlocking.
149266 2005-08-25  Simon Josefsson  <jas@extundo.com>
149268         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
149269         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
149270         GLIBC specific code.
149272 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
149274         Make regex safe for g++.  This fixes one real bug (an "err"
149275         that should have been "*err").  g++ problem reported by
149276         Sam Steingold.
149277         * lib/regex_internal.h (re_calloc): New macro, consistent with
149278         re_malloc etc.  All callers of calloc changed to use re_calloc.
149279         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
149280         not int.  All callers changed.
149281         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
149282         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
149283         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
149284         (find_recover_state): Change "err" to "*err"; this fixes what
149285         appears to be a real bug.
149286         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
149287         versus int.
149289 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
149291         * modules/regex (Depends-on): Add malloc, since the code
149292         assumes that !malloc(0) means failure.
149294 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
149296         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
149298         alloca modernization/simplification for regex.
149299         * lib/regex.c: Remove portability cruft for alloca.  This no longer
149300         needs to be at the start of the file, and can be moved into
149301         regex_internal.h and simplified.
149302         * lib/regex_internal.h: Include <alloca.h>.
149303         (__libc_use_alloca) [!defined _LIBC]: New macro.
149304         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
149305         now works outside glibc.
149307 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
149309         * config/srclist.txt: Add glibc bugs 1241, 1245.
149311 2005-08-25  Jim Meyering  <jim@meyering.net>
149313         * lib/open-safer.c: Include <config.h>.
149314         Otherwise, we'd lose LARGEFILE support in any file using
149315         e.g. "fcntl--.h"
149317 2005-08-25  Bruno Haible  <bruno@clisp.org>
149319         * m4/minmax.m4: Require autoconf 2.52.
149320         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
149321         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
149322         alternatives of translit over the alphabet.
149323         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
149325 2005-08-24  Simon Josefsson  <jas@extundo.com>
149327         * tests/test-getpass.c: New file.
149329 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
149331         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
149332         for GNU regex features.
149334 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
149336         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
149337         * lib/regex.h (regerror): Likewise.
149339         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
149340         requires this.  (The code never needed it.)
149342         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
149343         All uses of recently-renamed identifiers changed to use the new,
149344         POSIX-compliant names.  The code will build and run just fine
149345         without these changes, but it's better to eat our own dog food
149346         and use the standard-conforming names.
149348         * lib/regex.h: Fix a multitude of POSIX name space violations.
149349         These changes have an effect only for programs that define
149350         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
149351         do not change anything for programs compiled in the normal way.
149352         Also, there is no effect on the ABI.
149354         (_REGEX_SOURCE): New macro.
149355         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
149356         defined and _GNU_SOURCE is not; this fixes a name space violation.
149358         Rename the following macros to obey POSIX requirements.
149359         The old names are still visible as macros if _REGEX_SOURCE is defined.
149360         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
149361         RE_BACKSLASH_ESCAPE_IN_LISTS.
149362         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
149363         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
149364         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
149365         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
149366         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
149367         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
149368         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
149369         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
149370         (REG_INTERVALS): renamed from RE_INTERVALS.
149371         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
149372         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
149373         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
149374         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
149375         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
149376         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
149377         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
149378         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
149379         RE_UNMATCHED_RIGHT_PAREN_ORD.
149380         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
149381         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
149382         (REG_DEBUG): renamed from RE_DEBUG.
149383         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
149384         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
149385         unusual, since we can't clash with the POSIX REG_ICASE.
149386         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
149387         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
149388         (REG_NO_SUB): renamed from RE_NO_SUB.
149389         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
149390         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
149391         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
149392         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
149393         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
149394         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
149395         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
149396         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
149397         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
149398         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
149399         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
149400         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
149401         RE_SYNTAX_POSIX_MINIMAL_BASIC.
149402         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
149403         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
149404         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
149405         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
149406         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
149407         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
149408         (REG_FIXED): Renamed from REGS_FIXED.
149409         (REG_NREGS): Renamed from RE_NREGS.
149411         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
149412         of other REG_* macros, since POSIX says the user is allowed to
149413         #undef these macros selectively.
149415         (reg_errcode_t): Update comment stating what other tables need
149416         to be consistent.
149418         Rename the following enum values to obey POSIX requirements.
149419         The old names are still visible as macros.
149420         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
149421         is not defined, since GNU is supposed to be a superset of POSIX as
149422         much as possible, and since we want reg_errcode_t to be a signed
149423         type for implementation consistency.
149424         (_REG_NOERROR): Renamed from REG_NOERROR.
149425         (_REG_NOMATCH): Renamed from REG_NOMATCH.
149426         (_REG_BADPAT): Renamed from REG_BADPAT.
149427         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
149428         (_REG_ECTYPE): Renamed from REG_ECTYPE.
149429         (_REG_EESCAPE): Renamed from REG_EESCAPE.
149430         (_REG_ESUBREG): Renamed from REG_ESUBREG.
149431         (_REG_EBRACK): Renamed from REG_EBRACK.
149432         (_REG_EPAREN): Renamed from REG_EPAREN.
149433         (_REG_EBRACE): Renamed from REG_EBRACE.
149434         (_REG_BADBR): Renamed from REG_BADBR.
149435         (_REG_ERANGE): Renamed from REG_ERANGE.
149436         (_REG_ESPACE): Renamed from REG_ESPACE.
149437         (_REG_BADRPT): Renamed from REG_BADRPT.
149438         (_REG_EEND): Renamed from REG_EEND.
149439         (_REG_ESIZE): Renamed from REG_ESIZE.
149440         (_REG_ERPAREN): Renamed from REG_ERPAREN.
149441         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
149442         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
149443         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
149444         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
149446         (_REG_RE_NAME, _REG_RM_NAME): New macros.
149447         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
149448         changed.  But support the old name if the new one is not defined
149449         and if _REGEX_SOURCE.
149451         Change the following member names in struct re_pattern_buffer.
149452         The old names are still supported if !_REGEX_SOURCE.
149453         The new names are always supported, regardless of _REGEX_SOURCE.
149454         (re_buffer): Renamed from buffer.
149455         (re_allocated): Renamed from allocated.
149456         (re_used): Renamed from used.
149457         (re_syntax): Renamed from syntax.
149458         (re_fastmap): Renamed from fastmap.
149459         (re_translate): Renamed from translate.
149460         (re_can_be_null): Renamed from can_be_null.
149461         (re_regs_allocated): Renamed from regs_allocated.
149462         (re_fastmap_accurate): Renamed from fastmap_accurate.
149463         (re_no_sub): Renamed from no_sub.
149464         (re_not_bol): Renamed from not_bol.
149465         (re_not_eol): Renamed from not_eol.
149466         (re_newline_anchor): Renamed from newline_anchor.
149468         Change the following member names in struct re_registers.
149469         The old names are still supported if !_REGEX_SOURCE.
149470         The new names are always supported, regardless of _REGEX_SOURCE.
149471         (rm_num_regs): Renamed from num_regs.
149472         (rm_start): Renamed from start.
149473         (rm_end): Renamed from end.
149475         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
149476         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
149477         Prepend __ to parameter names.
149479         Undo yesterday's changes.
149481 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
149483         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
149484         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
149485         lib/regex.c.
149487 2005-08-24  Jim Meyering  <jim@meyering.net>
149489         Sync from coreutils.
149490         * m4/fcntl-safer.m4: New file.
149492         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
149493         and object files for this module.
149495 2005-08-24  Jim Meyering  <jim@meyering.net>
149497         Sync from coreutils.
149498         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
149500 2005-08-24  Jim Meyering  <jim@meyering.net>
149502         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
149503         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
149505 2005-08-24  Jim Meyering  <jim@meyering.net>
149507         * modules/fcntl-safer: New module.
149508         * modules/fts (Depends-on): Add fcntl-safer.
149509         * MODULES.html.sh (File descriptor based Input/Output):
149510         Add fcntl-safer.
149512 2005-08-24  Bruno Haible  <bruno@clisp.org>
149514         Support for unit test modules.
149515         * modules/README: Mention tests modules.
149516         * modules/TEMPLATE-TESTS: New file.
149517         * gnulib-tool: New options --extract-tests-module, --with-tests and
149518         --tests-base (unused for the moment).
149519         (testsbase, inctests): New variables.
149520         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
149521         (func_verify_module): Exclude TEMPLATE-TESTS.
149522         (func_verify_nontests_module, func_verify_tests_module): New functions.
149523         (func_get_dependencies): Add implicit dependency for tests modules.
149524         (func_get_tests_module): New function.
149525         (func_modules_transitive_closure): When --with-tests was specified,
149526         include the unit tests as well, unless explicitly avoided.
149527         (func_emit_lib_Makefile_am): Ignore the tests modules here.
149528         (func_emit_tests_Makefile_am): New function.
149529         (func_create_testdir): When --with-tests was specified, emit a
149530         tests/ directory.
149531         * MODULES.html.sh (Future developments): Update.
149533 2005-08-24  Bruno Haible  <bruno@clisp.org>
149535         * modules/tls-tests: New file.
149536         * tests/test-tls.c: New file, from GNU gettext.
149538 2005-08-24  Bruno Haible  <bruno@clisp.org>
149540         * modules/lock-tests: New file.
149541         * tests/test-lock.c: New file, from GNU gettext.
149543 2005-08-24  Bruno Haible  <bruno@clisp.org>
149545         * lib/lock.h: Add multiple inclusion guard.
149546         * lib/tls.h: Add multiple inclusion guard.
149548 2005-08-24  Bruno Haible  <bruno@clisp.org>
149550         * gnulib-tool: Add support for the --aux-dir option to
149551         --create-testdir, --create-megatestdir, --test, --megatest.
149552         (func_create_testdir, func_create_megatestdir): Optionally emit a
149553         AC_CONFIG_AUX_DIR directive.
149554         (create-testdir, create-megatestdir, test, megatest): Provide a
149555         default value for $auxdir.
149557 2005-08-24  Bruno Haible  <bruno@clisp.org>
149559         * gnulib-tool (import): Use compound statement instead of subshell
149560         where possible.
149562 2005-08-24  Bruno Haible  <bruno@clisp.org>
149564         * gnulib-tool (import): Change --aux-dir default to "build-aux".
149566 2005-08-24  Bruno Haible  <bruno@clisp.org>
149568         * gnulib-tool (func_version): Update.
149570 2005-08-24  Bruno Haible  <bruno@clisp.org>
149572         * gnulib-tool (func_import, func_create_testdir,
149573         func_create_megatestdir): Quote all autoconf macro arguments.
149575 2005-08-24  Bruno Haible  <bruno@clisp.org>
149577         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
149578         option --force, because --force causes the aclocal.m4 of each
149579         subdirectory to be newer than the corresponding config.h.in.
149581 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
149583         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
149584         All contents moved to gl_REGEX.
149585         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
149586         assume that it does.
149588 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
149590         * lib/regex.h (REG_NOSYS)
149591         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
149592         Define, since POSIX requires it as of 2001.
149593         (_REG_ENOSYS)
149594         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
149595         New private symbol, used to keep the enum signed in all cases.
149596         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
149597         Youngman in
149598         <http://lists.gnu.org/r/bug-gnulib/2005-07/msg00132.html>.
149600         * lib/regex_internal.c (re_string_skip_chars, register_state):
149601         (calc_state_hash):
149602         Remove forward decls; no longer needed now that we use prototypes.
149603         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
149604         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
149605         (clean_state_log_if_needed): Likewise.
149607 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
149609         * config/srclist.txt: Add glibc bugs 1231-1233.
149611 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
149613         Fix problems reported by Sam Steingold in
149614         <http://lists.gnu.org/r/bug-gnulib/2005-08/msg00007.html>.
149615         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
149616         assumed that reg_errcode_t is a signed type, which is not
149617         necessarily true if _XOPEN_SOURCE is not defined.
149618         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
149619         since some compilers warn about it otherwise.
149621 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
149623         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
149624         (init_word_char, create_initial_state, duplicate_node_closure):
149625         (fetch_token, peek_token_bracket, build_range_exp):
149626         (build_collating_symbol): Remove forward decls; no longer needed
149627         now that we use prototypes.
149629         * lib/regcomp.c:
149630         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
149631         (re_compile_fastmap_iter, regcomp, regerror, regfree):
149632         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
149633         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
149634         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
149635         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
149636         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
149637         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
149638         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
149639         (build_range_exp, build_collating_symbol, parse_bracket_exp):
149640         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
149641         (build_charclass, build_charclass_op, fetch_number, create_tree):
149642         (create_token_tree, mark_opt_subexp, duplicate_tree):
149643         Use prototypes rather than old-style definitions.
149645         * lib/regex_internal.c:
149646         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
149647         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
149648         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
149649         (re_string_reconstruct, re_string_peek_byte_case):
149650         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
149651         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
149652         (re_node_set_init_copy, re_node_set_add_intersect):
149653         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
149654         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
149655         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
149656         (re_acquire_state, re_acquire_state_context, register_state):
149657         (create_ci_newstate, create_cd_newstate, free_state):
149658         Likewise.
149659         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
149660         re_search_2):
149661         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
149662         (re_search_internal, prune_impossible_nodes):
149663         (acquire_init_state_context, check_matching, static):
149664         (check_halt_node_context, check_halt_state_context, proceed_next_node):
149665         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
149666         (update_regs, sift_states_backward, build_sifted_states):
149667         (clean_state_log_if_needed, merge_state_array):
149668         (update_cur_sifted_state, add_epsilon_src_nodes):
149669         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
149670         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
149671         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
149672         (find_recover_state, check_subexp_matching_top, transit_state_mb):
149673         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
149674         (check_arrival, check_arrival_add_next_nodes):
149675         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
149676         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
149677         (check_node_accept_bytes, check_node_accept, extend_buffers):
149678         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
149679         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
149680         (sift_ctx_init):
149681         Likewise.
149683         * lib/regex_internal.h:
149684         (re_string_allocate, re_string_construct, re_string_reconstruct):
149685         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
149686         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
149687         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
149688         (re_string_context_at, re_string_peek_byte_case):
149689         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
149690         is defined, since we now use prototypes always.
149692         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
149693         C89 or better.  All uses removed.
149695 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
149697         * config/srclist.txt: Add glibc bugs 1220-1227.
149699 2005-08-20  Jim Meyering  <jim@meyering.net>
149701         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
149702         of unused local, dfa.
149704 2005-08-20  Bruno Haible  <bruno@clisp.org>
149706         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
149708 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
149710         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
149711         (re_node_set_insert_last, re_dfa_add_node):
149712         Rename local variables to avoid GCC shadowing warnings.
149714 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
149716         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
149717         [defined lint]: Suppress bogus uninitialized-variable warnings.
149719         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
149720         and let the caller return REG_ESPACE if out of space.  This
149721         removes an uninitialied-variable warning with GCC 4.0.1, and also
149722         avoids taking the address of a local variable.  All callers
149723         changed.
149725 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
149727         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
149728         $LIBCSRC/posix/regexec.c.
149729         Add glibc bug 1217 for regcomp.c.
149731 2005-08-19  Jim Meyering  <jim@meyering.net>
149733         * lib/regexec.c (proceed_next_node): Redo local variables to
149734         avoid GCC shadowing warnings.
149736 2005-08-18  Bruno Haible  <bruno@clisp.org>
149738         * lib/strstr.c (strstr): Fix return value in multibyte case.
149739         * lib/strcasestr.c (strcasestr): Likewise.
149741 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
149743         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
149745 2005-08-17  Jim Meyering  <jim@meyering.net>
149747         Make the %s format (seconds since the epoch) work for a negative
149748         number and when used with a zero-padded field width, e.g. %015s.
149750         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
149751         label so that it precedes the code to set `digits'.  Otherwise,
149752         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
149753         print `00-22'.  Now, it prints `-0022', as it should.
149755 2005-08-17  Bruno Haible  <bruno@clisp.org>
149757         * modules/strstr (Files): Add m4/mbrtowc.m4.
149758         (Depends-on): Add mbuiter.
149760 2005-08-17  Bruno Haible  <bruno@clisp.org>
149762         * modules/strcasestr: New file.
149763         * MODULES.html.sh (String handling, based on ANSI C 89): Add
149764         strcasestr.
149766 2005-08-17  Bruno Haible  <bruno@clisp.org>
149768         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
149770 2005-08-17  Bruno Haible  <bruno@clisp.org>
149772         * modules/mbuiter: New file.
149773         * MODULES.html.sh (Extended multibyte and wide character utilities):
149774         Add mbuiter.
149776 2005-08-17  Bruno Haible  <bruno@clisp.org>
149778         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
149779         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
149781 2005-08-17  Bruno Haible  <bruno@clisp.org>
149783         * m4/strcasestr.m4: New file.
149785 2005-08-17  Bruno Haible  <bruno@clisp.org>
149787         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
149788         * lib/strstr.c: Completely rewritten, with multibyte locale support.
149790 2005-08-17  Bruno Haible  <bruno@clisp.org>
149792         * lib/strcasestr.h: New file.
149793         * lib/strcasestr.c: New file.
149795 2005-08-17  Bruno Haible  <bruno@clisp.org>
149797         * lib/strcasecmp.c: Use mbuiter.h.
149799 2005-08-17  Bruno Haible  <bruno@clisp.org>
149801         * lib/mbuiter.h: New file.
149803 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
149805         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
149806         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
149807         and gl_GETOPT are both invoked via different paths (as happens
149808         with GNU tar CVS because it uses both argp and getopt), the former
149809         wins.
149811 2005-08-16  Bruno Haible  <bruno@clisp.org>
149813         * modules/tls: New file.
149814         * MODULES.html.sh (Multithreading): Add tls.
149816 2005-08-16  Bruno Haible  <bruno@clisp.org>
149818         * modules/strnlen1: New file.
149819         * MODULES.html.sh (String handling): Add strnlen1.
149821 2005-08-16  Bruno Haible  <bruno@clisp.org>
149823         * modules/strcase (Files): Add m4/mbrtowc.m4.
149824         (Depends-on): Add strnlen1, mbchar.
149826 2005-08-16  Bruno Haible  <bruno@clisp.org>
149828         * modules/mbiter: New file.
149829         * MODULES.html.sh (Extended multibyte and wide character utilities):
149830         Add mbiter.
149832 2005-08-16  Bruno Haible  <bruno@clisp.org>
149834         * modules/mbfile: New file.
149835         * MODULES.html.sh (Extended multibyte and wide character utilities):
149836         Add mbfile.
149838 2005-08-16  Bruno Haible  <bruno@clisp.org>
149840         * modules/mbchar: New file.
149841         * MODULES.html.sh (Extended multibyte and wide character utilities):
149842         New section.
149844 2005-08-16  Bruno Haible  <bruno@clisp.org>
149846         * m4/tls.m4: New file, from GNU gettext.
149848 2005-08-16  Bruno Haible  <bruno@clisp.org>
149850         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
149851         always.
149852         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
149854 2005-08-16  Bruno Haible  <bruno@clisp.org>
149856         * m4/mbiter.m4: New file.
149858 2005-08-16  Bruno Haible  <bruno@clisp.org>
149860         * m4/mbfile.m4: New file.
149862 2005-08-16  Bruno Haible  <bruno@clisp.org>
149864         * m4/mbchar.m4: New file.
149866 2005-08-16  Bruno Haible  <bruno@clisp.org>
149868         * lib/tls.h: New file, from GNU gettext.
149869         * lib/tls.c: New file, from GNU gettext.
149871 2005-08-16  Bruno Haible  <bruno@clisp.org>
149873         * lib/strnlen1.h: New file.
149874         * lib/strnlen1.c: New file.
149876 2005-08-16  Bruno Haible  <bruno@clisp.org>
149878         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
149879         (mbi_init): Update.
149880         (mbi_avail, mbi_advance): Let the iteration end before the terminating
149881         NUL byte, not after it.
149883 2005-08-16  Bruno Haible  <bruno@clisp.org>
149885         * lib/strcase.h (strcasecmp): Add note in comments.
149886         * lib/strncasecmp.c: Use code from strcasecmp.c.
149887         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
149888         (strcasecmp): Work correctly in multibyte locales.
149890 2005-08-16  Bruno Haible  <bruno@clisp.org>
149892         * lib/mbiter.h: New file.
149894 2005-08-16  Bruno Haible  <bruno@clisp.org>
149896         * lib/mbfile.h: New file.
149898 2005-08-16  Bruno Haible  <bruno@clisp.org>
149900         * lib/mbchar.h: New file.
149901         * lib/mbchar.c: New file.
149903 2005-08-16  Bruno Haible  <bruno@clisp.org>
149905         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
149906         the valid ones. Makes the comparison operations transitive:
149907         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
149908         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
149910 2005-08-15  Simon Josefsson  <jas@extundo.com>
149912         * modules/ssize_t (License): Change to 'unlimited'.
149914         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
149916 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
149918         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
149919         Add comments for each pending glibc patch.
149921 2005-08-15  Bruno Haible  <bruno@clisp.org>
149923         * lib/regex.h (__restrict_arr): Don't define to __restrict if
149924         __cplusplus is defined.
149926 2005-08-14  Jim Meyering  <jim@meyering.net>
149928         Sync from coreutils.
149930         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
149931         Use the hash-table-based cycle-detection code not just when
149932         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
149933         Reported by James Youngman in
149934         <http://lists.gnu.org/r/bug-gnulib/2005-08/msg00011.html>.
149935         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
149936         FTS_TIGHT_CYCLE_CHECK.
149937         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
149938         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
149939         once again.
149940         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
149941         * lib/fts.c (fd_safer): Remove decl.
149942         Include fcntl--.h rather than unistd-safer.h
149943         (fts_safe_changedir): Don't call fd_safer; no longer needed
149944         now that we include fcntl--.h.
149946 2005-08-12  Simon Josefsson  <jas@extundo.com>
149948         * modules/getndelim2: Use ssize_t module.
149949         * modules/getnline: Likewise.
149950         * modules/safe-read: Likewise.
149951         * modules/xreadlink: Likewise.
149953         * modules/ssize_t: New file.
149955 2005-08-12  Simon Josefsson  <jas@extundo.com>
149957         * m4/readline.m4: Look for termcap, curses or ncurses if required.
149959 2005-08-12  Simon Josefsson  <jas@extundo.com>
149961         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
149962         ssize_t.
149964 2005-08-12  Simon Josefsson  <jas@extundo.com>
149966         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
149967         readline, getdelim and check_version.
149968         (Support for systems lacking ISO C 99: Sizes of integer types):
149969         Add size_max.
149971 2005-08-12  Bruno Haible  <bruno@clisp.org>
149973         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
149975 2005-08-11  Simon Josefsson  <jas@extundo.com>
149977         * modules/readline: New file.
149979         * modules/strnlen (Files): Add strnlen.h.
149981 2005-08-11  Simon Josefsson  <jas@extundo.com>
149983         * m4/readline.m4: New file.
149985 2005-08-11  Simon Josefsson  <jas@extundo.com>
149987         * lib/readline.h, readline.c: New file.
149989 2005-08-11  Simon Josefsson  <jas@extundo.com>
149991         * doc/gnulib.texi (Initial import, Finishing touches): Mention
149992         gl_AVOID.
149994 2005-08-11  Bruno Haible  <bruno@clisp.org>
149996         * lib/strnlen.h (strnlen): Change parameter name to match comment.
149998 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
150000         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
150002 2005-08-10  Simon Josefsson  <jas@extundo.com>
150004         * tests/test-iconvme.c: New file.
150006 2005-08-10  Simon Josefsson  <jas@extundo.com>
150008         * m4/strnlen.m4: New file.
150010         * m4/strndup.m4: Don't check for strnlen declaration, done in
150011         strnlen.m4.
150013 2005-08-10  Simon Josefsson  <jas@extundo.com>
150015         * lib/strndup.c: Use strnlen.h.
150017         * lib/strnlen.h: New file.
150019 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
150021         * README: Typos.
150023 2005-08-02  Simon Josefsson  <jas@extundo.com>
150025         * modules/readline: New file.
150027 2005-08-02  Simon Josefsson  <jas@extundo.com>
150029         * modules/getdelim: New file.
150031         * modules/getline: Rewrite, don't use getndelim2.
150033 2005-08-02  Simon Josefsson  <jas@extundo.com>
150035         * m4/getline.m4: Separate out getdelim stuff into separate module.
150037         * m4/getdelim.m4: New file.
150039 2005-08-02  Simon Josefsson  <jas@extundo.com>
150041         * lib/getline.h, getline.c: Rewrite.
150043         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
150045 2005-07-31  Bruno Haible  <bruno@clisp.org>
150047         * lib/lock.h (gl_lock_initializer): New macro.
150048         (gl_lock_define_initialized): Use it.
150049         (gl_rwlock_initializer): New macro.
150050         (gl_rwlock_define_initialized): Use it.
150051         (gl_recursive_lock_initializer): New macro.
150052         (gl_recursive_lock_define_initialized): Use it.
150054 2005-07-30  Karl Berry  <karl@gnu.org>
150056         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
150057         Report from Ben Pfaff, regarding getopt.
150059 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
150061         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
150062         normal way.
150063         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
150064         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
150065         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
150066         (gl_GETOPT): Use the new macros.  Most of the implementation
150067         is moved to the new macros.  This is for programs like Emacs
150068         that don't want all the functionality of gl_GETOPT.
150070 2005-07-26  Bruno Haible  <bruno@clisp.org>
150072         * m4/lock.m4: Update from GNU gettext.
150074 2005-07-26  Bruno Haible  <bruno@clisp.org>
150076         * lib/lock.h: Update from GNU gettext.
150077         * lib/lock.c: Update from GNU gettext.
150079 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
150081         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
150082         obsolescent AC_TRY_RUN.  Include the default includes files, for
150083         'exit'.
150085 2005-07-24  Bruno Haible  <bruno@clisp.org>
150087         * modules/visibility: New file.
150088         * MODULES.html.sh (Misc): Add visibility.
150090 2005-07-24  Bruno Haible  <bruno@clisp.org>
150092         * m4/visibility.m4: New file.
150094 2005-07-24  Bruno Haible  <bruno@clisp.org>
150096         * doc/visibility.texi: New file.
150098 2005-07-22  Bruno Haible  <bruno@clisp.org>
150100         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
150101         $(ALLOCA_H), redundant through BUILT_SOURCES.
150102         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
150103         redundant through BUILT_SOURCES.
150104         * modules/byteswap (Makefile.am): Remove explicit dependency on
150105         $(BYTESWAP_H), redundant through BUILT_SOURCES.
150106         * modules/fnmatch (Makefile.am): Remove explicit dependency on
150107         $(FNMATCH_H), redundant through BUILT_SOURCES.
150108         * modules/getopt (Makefile.am): Remove explicit dependency on
150109         $(GETOPT_H), redundant through BUILT_SOURCES.
150110         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
150111         redundant through BUILT_SOURCES.
150112         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
150113         redundant through BUILT_SOURCES.
150114         * modules/stdbool (Makefile.am): Remove explicit dependency on
150115         $(STDBOOL_H), redundant through BUILT_SOURCES.
150116         * modules/stdint (Makefile.am): Remove explicit dependency on
150117         $(STDINT_H), redundant through BUILT_SOURCES.
150118         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
150119         Remove explicit dependency on $(SYSEXITS_H).
150120         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
150122 2005-07-18  Simon Josefsson  <jas@extundo.com>
150124         * lib/check-version.c (check_version): Accept identical versions too.
150126 2005-07-18  Bruno Haible  <bruno@clisp.org>
150128         * modules/lock: New file.
150129         * MODULES.html.sh (Multithreading): New section.
150131 2005-07-18  Bruno Haible  <bruno@clisp.org>
150133         * m4/lock.m4: New file, from GNU gettext.
150135 2005-07-18  Bruno Haible  <bruno@clisp.org>
150137         * lib/lock.h: New file, from GNU gettext.
150138         * lib/lock.c: New file, from GNU gettext.
150140 2005-07-18  Bruno Haible  <bruno@clisp.org>
150142         * lib/lock.h (gl_once_t): New type.
150143         (gl_once_define, gl_once): New macros.
150144         * lib/lock.c (fresh_once): New variable.
150145         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
150146         functions.
150148 2005-07-16  Simon Josefsson  <jas@extundo.com>
150150         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
150151         workaround, suggested by Bruno.
150153 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
150155         * modules/xalloc (Depends-on): Add xalloc-die.
150156         * modules/xvasprintf (Depends-on): Add xalloc-die.
150158 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
150160         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
150161         with a minor change.
150163 2005-07-15  Bruno Haible  <bruno@clisp.org>
150165         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
150166         When using lib/poll.c, define poll as rpl_poll.
150168 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
150170         * modules/argp (Depends-on): Remove unlocked-io.
150172 2005-07-14  Derek Price  <derek@ximbiot.com>
150174         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
150175         for glob symlink bug.
150177 2005-07-14  Bruno Haible  <bruno@clisp.org>
150179         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
150180         Instead, test for *_unlocked function declarations directly.
150182 2005-07-11  Simon Josefsson  <jas@extundo.com>
150184         * modules/size_max: New file.
150186         * modules/xsize: Depend on size_max module for size_max.m4.
150188 2005-07-11  Simon Josefsson  <jas@extundo.com>
150190         * lib/size_max.h: New file.
150192 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
150194         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
150195         copyright symbol and the year.
150196         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
150197         (version_etc_va): Use parameterized copyright notice.
150198         Reword to conform to the current GNU coding standards.
150200 2005-07-11  Karl Berry  <karl@gnu.org>
150202         * doc/gnulib.texi (Quoting): new node.
150203         (Initial import): more info, from Patrice.
150205 2005-07-11  Bruno Haible  <bruno@clisp.org>
150207         * gnulib-tool (func_usage): Document option --avoid.
150208         (Command line options): Handle --avoid.
150209         (func_acceptable): New function.
150210         (func_modules_transitive_closure): Use it.
150212 2005-07-11  Bruno Haible  <bruno@clisp.org>
150214         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
150215         Reported by Jim Meyering.
150217 2005-07-10  Bruno Haible  <bruno@clisp.org>
150219         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
150220         Needed when size_t is smaller than 'unsigned int'.
150221         Reported by Paul Eggert.
150223 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
150225         * modules/argp (Depends-on): Add unlocked-io
150227 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
150229         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
150230         block of defines.
150232 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
150234         * config/srclist.txt: Comment out regcomp.c, since we have a porting
150235         fix now.
150237 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
150238         and Paul Eggert  <eggert@cs.ucla.edu>
150240         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
150241         in wint_t, not wchar_t.  Remove now-unnecessary cast.
150243 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
150245         * modules/regex (Files): Add lib/regex_internal.c,
150246         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
150247         (Depends-on): Add extensions.
150248         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
150250 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
150252         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
150253         pathconf.
150254         * m4/same.m4 (gl_SAME): Likewise.
150255         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
150257         * m4/regex.m4: Adjust to new libc regex implementation.
150258         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
150259         all the .c and .h parts of (the new) regex.
150260         Quote the m4 stuff better.
150261         Check for RE_ICASE bug of old gnulib.
150262         Check for REG_STARTEND of recent libc.
150263         Rename local variables from jm_* to gl_*.
150264         Quote operand of "test -f".
150265         Say "recent enough" version of libc, not "version 2".
150266         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
150267         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
150268         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
150269         Remove check for btowc, isascii.
150270         Require AM_LANGINFO_CODESET.
150272 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
150274         * lib/regex.c, regex.h: Sync from libc.
150275         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
150276         * lib/regexec.c:
150277         New files, synced from libc, except that regex_internal.h
150278         currently has a small porting fix.
150280 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
150282         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
150283         regex_internal.c, regexec.c.
150284         Add regex_internal.h too, but as a comment, since the libc version
150285         is currently broken in gnulib mode.
150287 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
150289         Support programs like Emacs that use gnulib but not gettext.
150290         * MODULES.html.sh (Internationalization functions): Add gettext-h.
150291         * modules/gettext-h: New file.
150292         * modules/gettext (Files): Remove lib/gettext.h.
150293         (Depends-on): Add gettext-h.
150294         (Makefile.am): Remove lib_SOURCES.
150295         * modules/argmatch, modules/c-stack, modules/closeout:
150296         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
150297         * modules/execute, modules/file-type, modules/getaddrinfo:
150298         * modules/getopt, modules/human, modules/javacomp:
150299         * modules/javaexec, modules/mkdir-p, modules/obstack:
150300         * modules/openat, modules/pagealign_alloc, modules/pipe:
150301         * modules/quotearg, modules/regex, modules/rpmatch:
150302         * modules/unicodeio, modules/userspec, modules/version-etc:
150303         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
150304         * modules/xsetenv:
150305         Depend on gettext-h, not gettext.
150307 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
150309         * gnulib-tool (func_import): Add support for 'public domain' license.
150310         * modules/alloca, modules/atexit, modules/memmove:
150311         Now public domain, not GPL.
150312         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
150313         * modules/realloc, modules/strerror, modules/strtod:
150314         Now LGPL, not GPL.
150316 2005-07-05  Bruno Haible  <bruno@clisp.org>
150318         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
150319         autoconf CVS. Needed for mingw.
150321 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
150323         Remove the dependency of the strftime module on the tzset module.
150324         * modules/strftime (Depends-on): Remove dependency on tzset.
150326 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
150328         Remove the dependency of the strftime module on the tzset module.
150329         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
150330         gl_FUNC_TZSET_CLOBBER.
150332 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
150334         Remove the dependency of the strftime module on the tzset module.
150335         * lib/strftime.c (my_strftime)
150336         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
150337         Copy the input structure, to work around some of the bug with
150338         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
150339         Solaris releases, you should also use the tzset module, but we won't
150340         require it as a dependency any more since we don't want LGPLed code
150341         to depend on GPLed code.
150343 2005-07-02  Jim Meyering  <jim@meyering.net>
150345         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
150346         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
150347         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
150348         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
150350 2005-07-02  Jim Meyering  <jim@meyering.net>
150352         * lib/backupfile.c (backup_args): Change a `0' to NULL.
150354 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
150356         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
150357         declares only 'struct timespec;' (!).
150359 2005-07-01  Jim Meyering  <jim@meyering.net>
150361         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
150362         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
150363         * lib/save-cwd.c, tempname.c:
150364         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
150365         and don't include <sys/file.h>).
150367 2005-06-29  Jim Meyering  <jim@meyering.net>
150369         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
150370         type name.  Use the variable name instead.
150371         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
150372         Likewise.
150374 2005-06-28  Simon Josefsson  <jas@extundo.com>
150376         * modules/check-version (Files): Add check-version.m4.
150378 2005-06-28  Simon Josefsson  <jas@extundo.com>
150380         * m4/check-version.m4: New file, suggested by Jim Meyering
150381         <jim@meyering.net>.
150383 2005-06-28  Simon Josefsson  <jas@extundo.com>
150385         * lib/check-version.h, lib/check-version.c: New files.
150387 2005-06-28  Simon Josefsson  <jas@extundo.com>
150389         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
150390         collision with global variable.  Better indentation.  Don't
150391         increment buffer pointer beyond buffer end.  Based on comments
150392         from Paul Eggert <eggert@cs.ucla.edu>.
150394         * lib/base64.h: Indent.
150396 2005-06-28  Simon Josefsson  <jas@extundo.com>
150398         * doc/gnulib.texi (Library version handling): New section.
150400 2005-06-28  Jim Meyering  <jim@meyering.net>
150402         * check-module (find_included_lib_files): Hard-code another
150403         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
150404         but modules/fts-lgpl (correctly) does not list those files.
150406         * modules/canonicalize (Files): Add lib/pathmax.h.
150408 2005-06-25  Simon Josefsson  <jas@extundo.com>
150410         * modules/check-version: New file.
150412 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
150414         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
150415         initializer of struct addrinfo, as an indication that we don't
150416         care how many members the structure has.
150418 2005-06-24  Derek Price  <derek@ximbiot.com>
150419         and Bruno Haible  <bruno@clisp.org>
150421         Remove stat module & update lstat.
150422         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
150423         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
150424         * m4/stat.m4: Remove this file.
150426 2005-06-24  Derek Price  <derek@ximbiot.com>
150427         and Bruno Haible  <bruno@clisp.org>
150429         Remove stat module & update lstat.
150430         * lib/stat.c: Remove this file...
150431         (slash_aware_lstat): ...moving this content and its support...
150432         * lib/lstat.c (rpl_lstat): ...into here.
150433         * lib/lstat.h: New file.
150435 2005-06-24  Derek Price  <derek@ximbiot.com>
150436         and Bruno Haible  <bruno@clisp.org>
150438         Remove stat module & update lstat.
150439         * config/srclist.txt (libc sources): Remove stat.
150441 2005-06-24  Derek Price  <derek@ximbiot.com>
150442         and Bruno Haible  <bruno@clisp.org>
150444         Remove stat module & update lstat.
150445         * MODULES.html.sh (stat): Remove.
150446         * MODULES.html: Regenerated.
150447         * modules/lstat (Description): Correct function name.
150448         (Files): Add "lstat.h".
150449         (Depends-on): Remove stat, add xalloc, stat-macros.
150450         * modules/stat: Remove this file.
150451         (Include): Add "lstat.h", remove <sys/stat.h>.
150453 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
150455         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
150456         (ranged_convert): Don't save conversion in a temporary struct.
150457         This causes a warning with GCC 4.0.0, and anyway in the typical
150458         case it's not worth the extra 100 bytes or so of code.
150459         (ranged_convert, __mktime_internal): When calling a function via a
150460         pointer P, use P () rather than (*P) (), as we now assume C89 or
150461         better.
150463 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
150465         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
150466         "who -r" failed to give output.  Problem reported by Tim Waugh.
150468         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
150469         (xcalloc): Use it to avoid needless tests.
150470         Problem reported by Jim Meyering.
150472 2005-06-20  Derek Price  <derek@ximbiot.com>
150474         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
150475         unnecessary for Autoconfs > 2.59c.
150477 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
150479         * lib/argp.h (__option_is_short): Check upper limit of
150480         __key. Isprint() requires its argument to have the value
150481         of an unsigned char or EOF.
150483 2005-06-16  Jim Meyering  <jim@meyering.net>
150485         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
150486         when either N or S is zero.
150488 2005-06-16  Derek Price  <derek@ximbiot.com>
150490         * m4/bison.m4: Declare YACC & YFLAGS precious.
150492 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
150494         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
150495         multibyte string or pattern, fall back on unibyte matching.
150496         Problem reported by James Youngman.
150498 2005-06-08  Bruno Haible  <bruno@clisp.org>
150500         * modules/csharpcomp: New file.
150501         * MODULES.html.sh (C#): Add csharpcomp.
150503 2005-06-08  Bruno Haible  <bruno@clisp.org>
150505         * m4/csharpcomp.m4: New file, from GNU gettext.
150507 2005-06-08  Bruno Haible  <bruno@clisp.org>
150509         * lib/csharpcomp.h: New file, from GNU gettext.
150510         * lib/csharpcomp.c: New file, from GNU gettext.
150511         * lib/csharpcomp.sh.in: New file, from GNU gettext.
150513 2005-06-08  Bruno Haible  <bruno@clisp.org>
150515         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
150516         warning on mingw.
150518 2005-06-07  Derek Price  <derek@ximbiot.com>
150520         Sync from CVS.
150521         * lib/glob_.h: Indent nested #ifdef.
150523 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
150525         Sync from coreutils.
150526         Use "file name" when talking about file names, instead of "filename"
150527         or "path", as per the GNU coding standards.
150528         * lib/mkdir-p.c: Renamed from makepath.c.
150529         (make_dir_parents): Renamed from make_path.  All callers changed.
150530         * lib/mkdir-p.h: Likewise.  All includers changed.
150531         * lib/filenamecat.c: Renamed from path-concat.c.
150532         (file_name_concat): Renamed from path_concat.  All callers changed.
150533         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
150534         * lib/filenamecat.h: Likewise.  All includers changed.
150535         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
150536         in comments or local variable names.
150537         * lib/basename.c: Likewise.
150538         * lib/canonicalize.c, canonicalize.h: Likewise.
150539         * lib/dirname.c, dirname.h: Likewise.
150540         * lib/euidaccess.c: Likewise.
150541         * lib/exclude.c: Likewise
150542         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
150543         * lib/fsusage.c, fsuage.h: Likewise.
150544         * lib/fts.c, fts_.h: Likewise.
150545         * lib/getcwd.c: Likewise.
150546         * lib/getloadavg.c: Likewise.
150547         * lib/mkstemp.c: Likewise.
150548         * lib/mountlist.c, mountlist.h: Likewise.
150549         * lib/openat.c, openat.h: Likewise.
150550         * lib/readlink-stub.c: Likewise.
150551         * lib/readutmp.c, readutmp.h: Likewise.
150552         * lib/rename.c: Likewise.
150553         * lib/rmdir.c: Likewise.
150554         * lib/same.c: Likewise.
150555         * lib/savedir.c: Likewise.
150556         * lib/stripslash.c: Likewise.
150557         * lib/tempname.c: Likewise.
150558         * lib/xreadlink.c: Likewise.
150559         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
150560         All uses changed.
150561         * lib/exclude.h: Likewise.
150563         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
150564         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
150565         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
150566         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
150567         * lib/pathmax.h: Include <limits.h> unconditionally, since other
150568         files have been getting away with it for years (MORE/BSD 4.3
150569         is extinct now).
150570         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
150571         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
150573         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
150574         Define to 256, not 255, as per modern POSIX.
150576 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
150578         Sync from coreutils.
150579         Use "file name" when talking about file names, instead of "filename"
150580         or "path", as per the GNU coding standards.
150581         * MODULES.html.sh: mkdir-p renamed from makepath.
150582         filenamecat renamed from path-concat.
150583         * modules/filenamecat: Renamed from modules/path-concat.
150584         (Files): filenamecat.h and filenamecat.c renamed from
150585         path-concat.h and path-concat.c.
150586         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
150587         (Include): filenamecat.h, not path-concat.h.
150588         * modules/mkdir-p: Renamed from modules/makepath.
150589         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
150590         makepath.c.
150591         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
150592         (Include): mkdir-p.h, not makepath.h.
150594 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
150596         Sync from coreutils.
150597         * m4/mkdir-p.m4: Renamed from makepath.m4.
150598         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
150599         Rename files from makepath.c to mkdir-p.c, and from
150600         makepath.h to mkdir-p.h.
150601         * m4/filenamecat.m4: Renamed from path-concat.m4.
150602         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
150603         Rename files from path-concat.c to filenamecat.c,
150604         and from path-concat.h to filenamecat.h.
150605         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
150606         "file name" in local variables or comments.
150607         * m4/rename.m4: Likewise.
150609 2005-06-01  Bruno Haible  <bruno@clisp.org>
150611         * modules/csharpexec: New file.
150612         * MODULES.html.sh (C#): New section.
150614 2005-06-01  Bruno Haible  <bruno@clisp.org>
150616         * m4/csharp.m4: New file, from GNU gettext.
150617         * m4/csharpexec.m4: New file, from GNU gettext.
150619 2005-06-01  Bruno Haible  <bruno@clisp.org>
150621         * lib/csharpexec.h: New file, from GNU gettext.
150622         * lib/csharpexec.c: New file, from GNU gettext.
150623         * lib/csharpexec.sh.in: New file, from GNU gettext.
150625 2005-05-31  Derek Price  <derek@ximbiot.com>
150626             Paul Eggert  <eggert@cs.ucla.edu>
150628         Sync from cvs.
150629         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
150631 2005-05-31  Derek Price  <derek@ximbiot.com>
150632             Paul Eggert  <eggert@cs.ucla.edu>
150634         Sync from cvs.
150635         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
150637 2005-05-29  Derek Price  <derek@ximbiot.com>
150639         * config/srclist.txt (glob_.h, glob.c): Add these files.
150641 2005-05-29  Derek Price  <derek@ximbiot.com>
150643         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
150644         * modules/glob: New file.
150645         * modules/getlogin_r: Add link to POSIX spec in description.
150647 2005-05-29  Derek Price  <derek@ximbiot.com>
150648             Paul Eggert  <eggert@cs.ucla.edu>
150650         * m4/glob.m4: New file.
150652 2005-05-29  Derek Price  <derek@ximbiot.com>
150653             Paul Eggert  <eggert@cs.ucla.edu>
150655         * lib/glob_.h, lib/glob.c: New files.
150657 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
150659         * modules/fts (Files): Remove m4/inttypes-pri.m4.
150660         * modules/fts-lgpl (Depends-on): Remove gettext.
150662 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
150664         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
150665         and don't require gt_INTTYPES_PRI.
150667 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
150669         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
150671         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
150672         the configuration hassle isn't worth it.
150673         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
150674         (LONGEST_MODIFIER, PRIuMAX): Remove.
150676 2005-05-27  Bruno Haible  <bruno@clisp.org>
150678         * lib/getlogin_r.h: Remove second include of <stddef.h>.
150680 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
150682         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
150683         _POSIX_PTHREAD_SEMANTICS for Solaris.
150685 2005-05-25  Derek Price  <derek@ximbiot.com>
150687         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
150689 2005-05-25  Derek Price  <derek@ximbiot.com>
150690             Paul Eggert  <eggert@cs.ucla.edu>
150692         * modules/getlogin_r, m4/getlogin_r.m4: New files.
150693         * lib/getlogin_r.c, getlogin_r.h: New files.
150695 2005-05-25  Bruno Haible  <bruno@clisp.org>
150696             Derek Price  <derek@ximbiot.com>
150698         * lib/getlogin_r.h: Simplify API documentation.
150700 2005-05-23  Derek Price  <derek@ximbiot.com>
150702         * modules/minmax (Files): Add m4/minmax.m4.
150703         (configure.ac): Add gl_MINMAX.
150705 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
150707         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
150708         so that unistd-safer.h (GPL'ed code) need not be included.
150710 2005-05-22  Bruno Haible  <bruno@clisp.org>
150712         * m4/minmax.m4: New file.
150713         Based on a patch by Derek Price <derek@ximbiot.com>.
150715 2005-05-22  Bruno Haible  <bruno@clisp.org>
150717         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
150718         (INT64_MIN): Fix definition.
150719         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
150721         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
150722         NEED_SIGNED_INT_TYPES.
150724         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
150725         HAVE_SYSTEM_INTTYPES.
150727 2005-05-22  Bruno Haible  <bruno@clisp.org>
150729         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
150730         Also include <sys/param.h> if it defines MIN, MAX.
150731         Based on a patch by Derek Price <derek@ximbiot.com>.
150733 2005-05-21  Jim Meyering  <jim@meyering.net>
150735         * modules/fts (Files): Add m4/inttypes-pri.m4.
150736         (Depends-on): Add lstat and remove gettext.  Alphabetize.
150738 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
150740         New fts module.
150741         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
150742         (setup_dir, free_dir): New functions.
150743         (enter_dir, leave_dir): Define trivial
150744         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
150745         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
150746         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
150747         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
150748         Move to fts-cycle.c.
150749         (fts_open): Use setup_dir.
150750         (fts_close): Use free_dir.
150751         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
150752         This adds a label and some gotos, but the alternatives were messier.
150753         Check for memory allocation failure when entering a dir.
150754         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
150755         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
150756         (FTS): New member fts_cycle, that is a union that contains the
150757         old active_dir_ht and cycle_state.  All uses changed to mention
150758         fts_cycle.ht and fts_cycle.state.
150759         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
150760         fts.c, with the following changes:
150761         (setup_dir, free_dir): New functions.
150762         (enter_dir): Now returns bool.  Return true if successful, false
150763         if memory exhausted.  All callers changed.
150764         Do not bother partly cleaning up on
150765         memory allocation failure; that is free_dir's job.
150766         However, free ad if hash_insert fails, to avoid memory leak.
150767         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
150768         fts->fts_options to see which union member to use.
150770 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
150772         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
150773         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
150775 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
150777         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
150779 2005-05-20  Jim Meyering  <jim@meyering.net>
150781         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
150782         Now a macro, to pacify GCC.
150784 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
150786         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
150787         of -1.
150789 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
150791         * lib/chown.c (rpl_chown): Return -1 on failure.
150793 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
150795         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
150796         Don't check for stddef.h.
150797         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
150798         don't use its results.
150799         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
150800         since we include them unconditionally.  Don't require
150801         AM_STDBOOL_H, since stdbool is a prerequisite.
150802         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
150803         since we assume C89 or better.
150804         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
150805         as we don't use their results.
150806         Don't check for fchdir, memmove, memset, strrchr, as we use
150807         them unconditionally.
150808         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
150809         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
150811 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
150813         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
150814         Include <stddef.h> unconditionally, since we assume C89 now.
150815         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
150816         * lib/fts.c: Include fts_.h first, to check interface.
150817         Do not include intprops.h; no longer needed.
150818         Include cycle-check.h and hash.h, since fts_.h no longer does.
150819         Remove unnecessary casts of closedir to void.
150820         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
150821         decide whether to decrement nlinks.
150822         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
150823         (FTS): Use struct hash_table * instead of Hash_table, so that
150824         we no longer need to include hash.h here.
150826 2005-05-18  Jim Meyering  <jim@meyering.net>
150828         * modules/dirfd (License): Change to LGPL.  Most of the code
150829         is already in the public domain.
150831 2005-05-18  Jim Meyering  <jim@meyering.net>
150833         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
150834         Reported by Yoann Vandoorselaere.
150836 2005-05-17  Jim Meyering  <jim@meyering.net>
150838         * m4/fts.m4: New file, from coreutils.
150840 2005-05-17  Jim Meyering  <jim@meyering.net>
150842         * lib/fts.c, lib/fts_.h: New files, from coreutils.
150844 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
150846         Sync from coreutils.
150847         * m4/unlinkdir.m4: New file.
150849 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
150851         Sync from coreutils.
150852         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
150853         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
150854         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
150855         White space changes only.
150856         * lib/makepath.c (make_path): Port to hosts where leading "//" is
150857         special.
150858         * lib/yesno.c: Include getline.h, not ctype.h.
150859         (yesno): Don't remove leading white space; POSIX doesn't allow it.
150860         Use getline to remove arbitrary restriction on response length.
150862 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
150864         * config/srclist-update: Spell out "Street" in FSF postal
150865         mail address; this is the style the FSF seems to prefer.
150867         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
150868         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
150869         this updates FSF postal mail address.
150871         Sync from coreutils.
150872         * modules/unlinkdir: New file.
150873         * modules/yesno (Depends-on): Add getline.
150874         * MODULES.html.sh (File system functions): Add unlinkdir.
150876 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
150878         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
150879         lib/strsep.h:
150880         Change the initial comment to refer to GPL, not LGPL.
150881         gnulib-tool will change it to LGPL as needed.
150883         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
150884         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
150885         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
150886         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
150887         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
150888         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
150889         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
150890         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
150891         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
150892         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
150893         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
150894         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
150895         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
150896         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
150897         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
150898         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
150899         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
150900         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
150901         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
150902         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
150903         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
150904         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
150905         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
150906         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
150907         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
150908         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
150909         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
150910         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
150911         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
150912         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
150913         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
150914         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
150915         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
150916         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
150917         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
150918         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
150919         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
150920         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
150921         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
150922         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
150923         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
150924         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
150925         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
150926         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
150927         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
150928         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
150929         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
150930         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
150931         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
150932         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
150933         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
150934         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
150935         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
150936         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
150937         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
150938         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
150939         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
150940         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
150941         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
150942         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
150943         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
150944         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
150945         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
150946         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
150947         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
150948         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
150949         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
150950         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
150951         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
150952         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
150953         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
150954         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
150955         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
150956         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
150957         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
150958         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
150959         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
150960         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
150961         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
150962         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
150963         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
150964         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
150965         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
150966         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
150967         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
150968         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
150969         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
150970         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
150971         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
150972         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
150973         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
150974         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
150975         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
150976         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
150977         lib/yesno.c, lib/yesno.h:
150978         Update FSF postal mail address.
150980 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
150982         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
150983         tests/test-memmem.c, tests/test-stpncpy.c:
150984         Update FSF postal mail address.
150986 2005-05-13  Bruno Haible  <bruno@clisp.org>
150988         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
150989         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
150990         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
150991         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
150992         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
150993         Add support for 64-bit integers in the MSVC compiler.
150995 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
150997         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
150999 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
151001         * gnulib-tool (func_import): Sort and uniquify recommended includes.
151003 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
151005         * doc/getdate.texi (General date syntax): Don't say that date
151006         date --iso-8601=ns generates acceptable dates; it doesn't yet.
151007         Problem reported by Nic Ferrier.
151009 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
151011         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
151012         specified in ai_socktype. Fix invalid ai_protocol
151013         check. ai_protocol is usually set to 0 or depending on
151014         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
151015         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
151016         ai_socktype / ai_protocol in the returned addrinfo structure.
151018 2005-05-10  Simon Josefsson  <jas@extundo.com>
151020         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
151021         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
151023 2005-05-10  Karl Berry  <karl@gnu.org>
151025         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
151026         (from http://www.gnu.org/licenses).
151027         * doc/COPYING.LIB: also rename to COPYING.LESSER.
151028         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
151029         fdl.texi suffices.
151031 2005-05-10  Karl Berry  <karl@gnu.org>
151033         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
151034         (COPYING.DOC): remove.
151036         * config/srclist-update: new FSF address.
151038 2005-05-10  Derek Price  <derek@ximbiot.com>
151040         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
151041         possible.
151043 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
151044             Bruno Haible  <bruno@clisp.org>
151046         * modules/inet_ntop: New file.
151047         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
151048         inet_ntop.
151050 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
151051             Bruno Haible  <bruno@clisp.org>
151053         * m4/inet_ntop.m4: New file.
151055 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
151056             Bruno Haible  <bruno@clisp.org>
151058         * lib/inet_ntop.h: New file.
151059         * lib/inet_ntop.c: New file, from glibc with modifications.
151061 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
151063         * modules/time_r (License): Change to LGPL.
151064         * modules/extensions (License): Change to LGPL.  Actually,
151065         the license is more permissive than that, but currently gnulib-tool
151066         doesn't know how to handle more-permissive licenses.
151068         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
151069         Problem reported by Dave Love.
151071 2005-05-08  Jim Meyering  <jim@meyering.net>
151073         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
151074         blank.
151076 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
151078         * modules/argmatch (Depends-on): Add stdbool.
151079         * modules/backupfile (Depends-on): Likewise.
151080         * modules/chdir-long (Depends-on): Likewise.
151081         * modules/closeout (Depends-on): Likewise.
151082         * modules/cycle-check (Depends-on): Likewise.
151083         * modules/dirname (Depends-on): Likewise.
151084         * modules/fnmatch (Depends-on): Likewise.
151085         * modules/fsusage (Depends-on): Likewise.
151086         * modules/fwriteerror (Depends-on): Likewise.
151087         * modules/getcwd (Depends-on): Likewise.
151088         * modules/getloadavg (Depends-on): Likewise.
151089         * modules/hard-locale (Depends-on): Likewise.
151090         * modules/makepath (Depends-on): Likewise.
151091         * modules/mountlist (Depends-on): Likewise.
151092         * modules/nanosleep (Depends-on): Likewise.
151093         * modules/posixtm (Depends-on): Likewise.
151094         * modules/quotearg (Depends-on): Likewise.
151095         * modules/readtokens (Depends-on): Likewise.
151096         * modules/readtokens0 (Depends-on): Likewise.
151097         * modules/readutmp (Depends-on): Likewise.
151098         * modules/save-cwd (Depends-on): Likewise.
151099         * modules/strftime (Depends-on): Likewise.
151100         * modules/userspec (Depends-on): Likewise.
151101         * modules/utimecmp (Depends-on): Likewise.
151102         * modules/xgetcwd (Depends-on): Likewise.
151103         * modules/xnanosleep (Depends-on): Likewise.
151104         * modules/xstrtod (Depends-on): Likewise.
151105         * modules/yesno (Depends-on): Likewise.
151107 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
151109         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
151110         needless checks.
151112 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
151114         Merge from coreutils.  Among other things,
151115         add bulletproofing for cases where stdin, stdout, or stderr are closed.
151116         * lib/fd-safer.c: New file.
151117         * lib/fcntl-safer.h, open-safer.c: Remove.
151118         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
151119         * lib/dup-safer.c: Include unistd-safer.h first.
151120         Don't include errno.h.
151121         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
151122         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
151123         * lib/file-type.c: Rely on file-type.h change.
151124         * lib/getloadavg.c: Include unistd-safer.h.
151125         (getloadavg): Use safer open.
151126         * lib/getusershell.c: Include "stdio-safer.h".
151127         (getusershell): Use safer fopen.
151128         * lib/long-options.c (long_options): Use NULL rather than 0.
151129         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
151130         'free'.
151131         * lib/modechange.c: Likewise.
151132         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
151133         (MODE_DONE): New constant.
151134         (struct mode_change): Remove 'next' member.
151135         (make_node_op_equals): New function; like the old one of the
151136         same name, except it allocates an array.
151137         (mode_compile, mode_create_from_ref): Use it.
151138         (mode_compile): Allocate result as an array, not a linked list.
151139         Parse octal string ourself, so that we catch mistakes like "+0".
151140         (mode_adjust): Arg is an array, not a linked list.
151141         * lib/modechange.c: Include stat-macros.h, xalloc.h.
151142         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
151143         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
151144         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
151145         Remove.  This is now stat-macros.h's job.
151146         (talloc): Remove.  All callers replaced by xalloc, so that
151147         our invokers don't have to worry about reporting memory failures.
151148         (make_node_op_equals): Remove.
151149         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
151150         New constants.
151151         (struct mode_change): Moved here from modechange.h.
151152         (mode_append_entry): Remove.
151153         (mode_compile): Remove MASKED_OPS arg, since it encouraged
151154         apps to have incorrect behavior.  Use simpler algorithm for head
151155         and tail.  Don't futz with umask; that's now the job of mode_adjust.
151156         Detect more invalid usages rather than having somewhat-random behavior.
151157         Don't insert an "a=" action, as that leads to incorrect behavior.
151158         (mode_compile, mode_create_from_ref): Return NULL on error instead
151159         of an enum, since now there's only one way to have an error.  All
151160         callers changed.
151161         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
151162         at the correct time.  Simplify calculation of "+u" and its ilk.
151163         Don't mishandle "+X".
151164         (mode_free): Remove "register" and localize decls.
151165         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
151166         (struct mode_change): Move to modechange.c; callers don't
151167         need to see this stuff.
151168         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
151169         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
151170         (mode_change, mode_adjust): Reflect the new signatures noted above.
151171         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
151172         that might redefine system include files.
151173         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
151174         (my_usleep): Use NULL rather than (void *) 0.
151175         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
151176         Use siginterrupt to specify that system calls should be interrupted.
151177         (rpl_nanosleep): Move initialization of suspended closer to call of
151178         my_usleep.
151179         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
151180         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
151181         (desirable_utmp_entry): New function.
151182         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
151183         using x2nrealloc, to simplify logic.
151184         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
151185         size calculation.  Do not assume utmp file is a regular file.
151186         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
151187         (READ_UTMP_CHECK_PIDS): New constant.
151188         * lib/save-cwd.c: Include unistd-safer.h.
151189         (save_cwd): Use fd_safer.
151190         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
151191         [!_LIBC] Include "stat-macros.h" instead.
151192         * lib/unistd-safer.h (fd_safer): New decl.
151194 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
151196         * modules/getloadavg (Depends-on): Add unistd-safer.
151197         * modules/getusershell (Depends-on): Add stdio-safer.
151198         * modules/lstat (Depends-on): Remove xalloc.
151199         * modules/mkstemp (Depends-on): Add stat-macros.
151200         * modules/modechange (Depends-on): Remove xstrtol.
151201         Add stat-macros, xalloc.
151202         * modules/save-cwd (Depends-on): Add unistd-safer.
151203         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
151204         * modules/unistd-safer (Files): Add lib/fd-safer.c
151205         (Makefile.am): Remove lib_SOURCES.
151207         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
151208         Remove fcntl-safer; unistd-safer supersedes it.
151210 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
151212         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
151213         AC_HEADER_STAT.
151214         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
151215         (gl_PREREQ_CHOWN): Remove.
151216         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
151217         it.  Don't require AC_HEADER_STAT.
151218         (gl_PREREQ_LSTAT): Remove.
151219         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
151220         Don't require AC_HEADER_STAT.
151221         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
151222         (gl_PREREQ_RMDIR): Remove.
151223         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
151224         mention stat-macros.h or AC_HEADER_STAT, since we'll make
151225         the stat-macros module a prerequisite.
151226         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
151227         * m4/filemode.m4 (gl_FILEMODE): Likewise.
151228         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
151229         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
151230         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
151231         variable names.
151232         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
151233         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
151234         variable prefixes.
151235         * m4/fcntl-safer.m4: Remove.
151236         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
151237         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
151238         Invoke gl_PREREQ_FD_SAFER.
151239         (gl_PREREQ_FD_SAFER): New macro.
151240         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
151241         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
151242         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
151243         Remove duplicate call to AC_LIBOBJ(readutmp).
151244         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
151246         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
151247         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
151249 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
151251         * MODULES.html.sh (Misc): Add byteswap.
151253 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
151255         * modules/getcwd (Depends-on): Add extensions.
151256         * modules/openat (Depends-on): Likewise.
151258 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
151260         * modules/byteswap: New file.
151262 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
151264         * m4/byteswap.m4: New file.
151266 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
151268         * lib/byteswap_.h: New file.
151270 2005-04-25  Karl Berry  <karl@gnu.org>
151272         * m4/gettext.m4: Update from GNU gettext 0.14.4.
151274 2005-04-25  Albert Chin  <china@thewrittenword.com>
151276         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
151277         Toolkit C bug.
151279 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
151281         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
151282         (func_ln_if_changed): Remove forcibly for no error message
151283         in case file does not exist.
151285 2005-04-19  Simon Josefsson  <jas@extundo.com>
151287         * gnulib-tool (Options): Make --symlink mean --symbolic.
151289 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
151291         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
151293 2005-04-16  Simon Josefsson  <jas@extundo.com>
151295         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
151297 2005-04-15  Simon Josefsson  <jas@extundo.com>
151299         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
151301 2005-04-15  Simon Josefsson  <jas@extundo.com>
151303         * gnulib-tool: Rename --symlink to --symbolic.
151305 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
151307         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
151308         symbolic links to files instead of copying/moving.  Add --aux-dir,
151309         specifying directory relative --dir where auxiliary build tools
151310         are placed.
151312 2005-04-14  Bruno Haible  <bruno@clisp.org>
151314         * modules/allocsa (License): Change to LGPL.
151315         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
151317 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
151319         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
151320         that "UTC +1 second" continues to work.  Problem reported
151321         by Dmitry V. Levin.
151322         (relunit_snumber): New rule.
151323         (relunit): Use it.
151325 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
151327         * lib/getdate.y (universal_time_zone_table): New constant.
151328         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
151329         universal_time_zone_table.
151330         (lookup_zone): Prefer universal_time_zone_table to
151331         local_time_zone_table, so that "GMT" time stamps are allowed in
151332         London during the summer.  Problem reported by Ian Abbott.
151334 2005-04-12  Jim Meyering  <jim@meyering.net>
151336         * lib/human.c (humblock): Set *options even when returning due to
151337         xstrtoumax conversion failure.  Thanks to a used-uninitialized
151338         warning from gcc-4.
151340 2005-04-09  Jim Meyering  <jim@meyering.net>
151342         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
151343         -Wuninitialized: initialize tm0.tm_year.
151345 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
151347         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
151348         count, since there's no maximum.  All uses changed.
151349         Add member dsts_seen.
151350         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
151351         not being INT_MAX.
151352         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
151353         Use pc_rels_seen to decide whether a date is absolute.
151355         * lib/getdate.y (number): Don't overwrite year.
151356         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
151357         check.
151359 2005-04-02  Simon Josefsson  <jas@extundo.com>
151361         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
151362         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
151364 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
151366         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
151367         where no absolute path name can be longer than PATH_MAX.
151369 2005-03-27  Jim Meyering  <jim@meyering.net>
151371         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
151373 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
151375         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
151376         "one's complement" -> "ones' complement" in comment, as per Knuth.
151377         "value of type" -> "type or expression" in comment.
151378         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
151380 2005-03-26  Jim Meyering  <jim@meyering.net>
151382         Comment nits.
151383         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
151384         Correct typos: s/or/of/.
151386 2005-03-26  Jim Meyering  <jim@meyering.net>
151388         * modules/check-include-files: Move to ../ and rename to...
151389         * check-module: ...this.
151391 2005-03-25  Jim Meyering  <jim@meyering.net>
151393         * modules/xvasprintf (Files): Add xalloc.h.
151395 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
151397         * modules/gettext (Files): config/config.rpath ->
151398         build-aux/config.rpath
151399         * modules/iconv (Files): Likewise.
151400         Problem reported by Oskar Liljeblad.
151402 2005-03-23  Jim Meyering  <jim@meyering.net>
151404         * modules/check-include-files: New script to check for
151405         missing dependencies, multiple includes, etc.
151407         * modules/c-strtold (Depends-on): Add xalloc.
151408         * modules/c-strtod (Depends-on): Add xalloc.
151409         * modules/hash (Depends-on): Add xalloc.
151410         (Files): Remove lib/xalloc.h.
151412         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
151413         * modules/userspec (Files): Add lib/inttostr.h.
151415 2005-03-23  Jim Meyering  <jim@meyering.net>
151417         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
151419 2005-03-22  Jim Meyering  <jim@meyering.net>
151421         * modules/stat-macros: New module.
151422         * modules/canonicalize, modules/euidaccess, modules/file-type,
151423         * modules/filemode, modules/lchown, modules/makepath,
151424         * modules/rmdir, modules/stat: Depend on new stat-macros module
151425         rather than listing lib/stat-macros.h manually.
151426         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
151428 2005-03-22  Jim Meyering  <jim@meyering.net>
151430         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
151432 2005-03-22  Bruno Haible  <bruno@clisp.org>
151434         * config/srclist.txt: Replace target directory 'config' with
151435         'build-aux'.
151436         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
151437         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
151438         ../build-aux/.
151440 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
151442         * modules/chdir-long (Depends-on): Add mempcpy.
151444         * modules/acl, modules/backupfile, modules/c-strtod,
151445         modules/c-strtold, modules/canon-host, modules/canonicalize,
151446         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
151447         modules/exclude, modules/exitfail, modules/file-type,
151448         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
151449         modules/getdate, modules/getline, modules/getpagesize,
151450         modules/getpass, modules/getugroups, modules/group-member,
151451         modules/hard-locale, modules/hash, modules/human, modules/idcache,
151452         modules/inttostr, modules/long-options, modules/makepath,
151453         modules/md5, modules/memcasecmp, modules/memcoll,
151454         modules/modechange, modules/mountlist, modules/path-concat,
151455         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
151456         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
151457         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
151458         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
151459         modules/strftime, modules/strndup, modules/strverscmp,
151460         modules/timespec, modules/unlocked-io, modules/userspec,
151461         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
151462         modules/yesno:
151463         Remove lib_SOURCES line from Makefile.am section, as this is now
151464         done automatically by the corresponding Autoconf macro.
151466 2005-03-21  Jim Meyering  <jim@meyering.net>
151468         Changes imported from coreutils.
151470         * lib/cycle-check.c: Don't include xalloc.h.
151472         * lib/path-concat.c: Don't include assert.h.
151473         (path_concat): Remove assertion that would have triggered
151474         for ABASE starting with more than one slash.
151475         Reported by Andreas Schwab.
151477         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
151478         properly when ABASE is an absolute file name.
151479         Correct the description of this function.
151480         Include <assert.h>.
151481         Add an assertion and a test driver.
151482         This fixes a bug introduced on 2004-07-02.
151483         Andreas Schwab reported the resulting failure of cp --parents:
151484         http://lists.gnu.org/r/bug-coreutils/2005-01/msg00130.html
151486 2005-03-21  Jim Meyering  <jim@meyering.net>
151488         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
151489         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
151491 2005-03-21  Jim Meyering  <jim@meyering.net>
151492         and  Paul Eggert  <eggert@cs.ucla.edu>
151494         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
151495         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
151496         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
151497         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
151498         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
151499         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
151500         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
151501         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
151502         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
151503         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
151504         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
151505         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
151506         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
151507         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
151508         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
151509         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
151510         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
151511         for these modules.
151513 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
151515         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
151516         (which shouldn't happen), generate nothing instead of returning 0
151517         immediately, so that nstrftime (NULL, ...) doesn't return 0.
151519 2005-03-16  Bruno Haible  <bruno@clisp.org>
151521         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
151522         HAVE_LONGLONG_64BIT.
151524 2005-03-16  Bruno Haible  <bruno@clisp.org>
151526         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
151527         HAVE_LONGLONG_64BIT.
151529 2005-03-16  Bruno Haible  <bruno@clisp.org>
151531         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
151532         HAVE_LONGLONG_64BIT.
151534 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
151536         * lib/strftime.c (my_strftime): Prepend space to format so that we can
151537         reliably distinguish strftime failure from empty output on POSIX
151538         hosts.
151540 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
151542         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
151543         (iconv_string): Don't guess a size-zero buffer, as that might cause
151544         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
151545         result would be 'too large', where 'too large' is (heuristically)
151546         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
151547         overflow concerns.  This will prevent some unwanted malloc failures
151548         when the inputs are very large.
151550 2005-03-15  Karl Berry  <karl@gnu.org>
151552         * config/srclist.txt (config.rpath): from gettext.
151553         * config/config.rpath: update.
151555 2005-03-15  Bruno Haible  <bruno@clisp.org>
151557         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
151558         to 'negate'.
151560         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
151561         variable.
151563         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
151564         results.
151566 2005-03-14  Simon Josefsson  <jas@extundo.com>
151568         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
151569         <fx@gnu.org>.
151571 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
151573         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
151574         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
151575         intprops.h.
151576         * lib/strtol.c: Likewise.
151578 2005-03-14  Jim Meyering  <jim@meyering.net>
151580         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
151581         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
151582         to be nonzero so that we (and caller) can detect the difference
151583         between a valid zero-length expansion and an error return, even
151584         when the underlying strftime fails before writing anything into
151585         that location.
151587 2005-03-14  Bruno Haible  <bruno@clisp.org>
151589         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
151590         Update from GNU gettext 0.14.3.
151592 2005-03-10  Jim Meyering  <jim@meyering.net>
151594         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
151596 2005-03-10  Jim Meyering  <jim@meyering.net>
151598         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
151599         so that this module works on systems without fchdir.
151601 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
151603         Factor int-properties macros into a single file, except for
151604         glibc-related files.
151605         * lib/intprops.h: New file.
151606         * lib/getloadavg.c: Include it instead of limits.h.
151607         (INT_STRLEN_BOUND): Remove.
151608         * lib/human.c: Include intprops.h.
151609         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
151610         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
151611         302/1000.
151612         * lib/inttostr.h: Include intprops.h instead of limits.h.
151613         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
151614         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
151615         for consistency with intprops.h.
151616         (time_t_is_integer, twos_complement_arithmetic): Use them.
151617         * lib/sig2str.h: Include <signal.h>, intprops.h.
151618         (INT_STRLEN_BOUND): Remove.
151619         * lib/strftime.c (TYPE_SIGNED): Remove.
151620         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
151621         * lib/strtol.c: Adjust comments to match intprops.h.
151622         * lib/userspec.c: Include intprops.h.
151623         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
151624         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
151625         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
151626         instead of rolling our own expressions.
151627         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
151629         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
151630         instead of int.
151631         (my_strftime): Do not mishandle years close to INT_MAX, by doing
151632         the right thing even if adding 1900 would overflow.  Similarly
151633         for tm_mon + 1 and tm_yday + 1.
151634         Make %Y always equivalent to %C%y, and similarly for %G and %g.
151635         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
151636         (DO_SIGNED_NUMBER): New macro.
151637         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
151639 2005-03-07  Bruno Haible  <bruno@clisp.org>
151641         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
151643 2005-03-07  Bruno Haible  <bruno@clisp.org>
151645         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
151647 2005-03-04  Derek R. Price  <derek@ximbiot.com>
151649         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
151650         (func_import): Only replace files via --import when they have actually
151651         changed.
151653 2005-03-03  Derek R. Price  <derek@ximbiot.com>
151655         * m4/mmap-anon.m4: New file.
151656         * m4/pagealign_alloc.m4: New file.
151658 2005-03-03  Derek R. Price  <derek@ximbiot.com>
151659             Bruno Haible  <bruno@clisp.org>
151661         * modules/pagealign_alloc: New file.
151662         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
151664 2005-03-03  Derek R. Price  <derek@ximbiot.com>
151665             Bruno Haible  <bruno@clisp.org>
151667         * lib/pagealign_alloc.h: New file.
151668         * lib/pagealign_alloc.c: New file.
151670 2005-03-03  Bruno Haible  <bruno@clisp.org>
151672         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
151673         Use an all-permissive copyright notice, recommended by RMS.
151675 2005-03-02  Bruno Haible  <bruno@clisp.org>
151677         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
151678         of AIX, the replacement has to be done only after <string.h> is
151679         included, therefore not in config.h. stpncpy.h does the replacement,
151680         and stpncpy.c uses it.
151682 2005-03-02  Bruno Haible  <bruno@clisp.org>
151684         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
151685         stpncpy.c uses it.
151687 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
151689         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
151690         The workaround isn't strictly needed for POSIX conformance, and
151691         it's too much of a pain to configure and maintain.  We'll ask
151692         people to fix their kernels instead.
151693         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
151694         (NANOSLEEP_BUG_WORKAROUND): Remove.
151695         (xnanosleep): Remove the workaround.
151697 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
151699         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
151700         Reported by Derek Price.
151701         (Include): Add "timespec.h".
151703         * modules/xnanosleep (Depends-on): Remove gethrxtime.
151705 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
151707         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
151708         to detect nanosleep bug.
151710 2005-03-01  Bruno Haible  <bruno@clisp.org>
151712         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
151714 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
151716         * modules/gethrxtime: New file.
151717         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
151718         (Depends-on): Add gethrxtime.
151719         (configure.ac): Add gl_XNANOSLEEP.
151720         (Makefile.am): Remove lib_SOURCES line.
151722 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
151724         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
151725         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
151727 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
151729         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
151730         * lib/timespec.h (gettime): Return void, since it always
151731         succeeds now.  All uses changed.
151732         * lib/gettime.c (gettime): Likewise.
151733         [HAVE_NANOTIME]: Prefer nanotime.
151734         Assume gettimeofday succeeds, as POSIX requires.
151735         Assime time () succeeds, since other code already does.
151736         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
151737         (timespec_subtract): Remove.
151738         (NANOSLEEP_BUG_WORKAROUND): New constant.
151739         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
151740         things considerably.  Use it only on GNU/Linux hosts, since the
151741         workaround shouldn't be needed elsewhere.
151743 2005-02-24  Bruno Haible  <bruno@clisp.org>
151745         * modules/gettext (Files): Add m4/glibc2.m4.
151747 2005-02-24  Bruno Haible  <bruno@clisp.org>
151749         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
151750         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
151751         * m4/progtest.m4:
151752         Update from GNU gettext 0.14.2.
151753         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
151755 2005-02-24  Bruno Haible  <bruno@clisp.org>
151757         * lib/localcharset.c: Update from GNU gettext 0.14.2.
151758         * lib/config.charset: Update from GNU gettext 0.14.2.
151760 2005-02-24  Bruno Haible  <bruno@clisp.org>
151762         * lib/gettext.h: Update from GNU gettext 0.14.2.
151764 2005-02-23  Simon Josefsson  <jas@extundo.com>
151766         * m4/iconvme.m4: New file.
151768 2005-02-23  Jim Meyering  <jim@meyering.net>
151770         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
151771         change.
151772         Thanks to Bruno Haible for catching it.
151774 2005-02-22  Simon Josefsson  <jas@extundo.com>
151776         * modules/iconvme: New file.
151778         * MODULES.html.sh: Add iconvme.
151780 2005-02-22  Simon Josefsson  <jas@extundo.com>
151782         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
151784 2005-02-22  Simon Josefsson  <jas@extundo.com>
151786         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
151788 2005-02-22  Jim Meyering  <jim@meyering.net>
151790         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
151791         s/ifndef/ifdef/.
151793 2005-02-20  Neil Conway  <neilc@samurai.com>
151795         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
151796         returned by OSX/Darwin if the specified buffer is not large
151797         enough for the hostname.
151799 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
151801         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
151802         pass it to _help, otherwise the latter coredumps trying to
151803         dereference state.root_argp.
151805 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
151807         * modules/chdir-long (Depends-on): Add memrchr.
151808         * modules/memrchr (Files): Add lib/memrchr.h.
151809         (Include): "memrchr.h".
151811 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
151813         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
151815 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
151817         * lib/memrchr.h: New file.
151818         * lib/chdir-long.c: Include it.
151819         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
151820         Don't bother including stddef.h.
151822 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
151824         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
151825         inclusion.
151826         Include <sys/types.h>, for dev_t.
151827         (ME_DUMMY, ME_REMOTE): Move from here....
151828         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
151829         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
151830         Dmitry V. Levin.
151831         Include mountlist.h first, to test the interface.
151833 2005-01-29  Bruno Haible  <bruno@clisp.org>
151835         * lib/progname.c (program_name): Initialize.
151836         Needed when linking statically on MacOS X.
151838 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
151840         Sync from coreutils.
151841         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
151842         (Depends-on): Add c-strtod.
151843         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
151845 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
151847         Sync from coreutils.
151848         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
151850         Remove files that are specific to coreutils.
151851         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
151853 2005-01-28  Bruno Haible  <bruno@clisp.org>
151855         * modules/javacomp: New file.
151856         * MODULES.html.sh (Java): Add javacomp.
151858 2005-01-28  Bruno Haible  <bruno@clisp.org>
151860         * m4/javacomp.m4: New file, from GNU gettext.
151862 2005-01-28  Bruno Haible  <bruno@clisp.org>
151864         * lib/javacomp.sh.in: New file, from GNU gettext.
151865         * lib/javacomp.h: New file, from GNU gettext.
151866         * lib/javacomp.c: New file, from GNU gettext.
151868 2005-01-26  Simon Josefsson  <jas@extundo.com>
151870         * lib/gai_strerror.c: Use GPL in header.
151872 2005-01-26  Bruno Haible  <bruno@clisp.org>
151874         * modules/javaexec: New file.
151875         * MODULES.html.sh (Java): Add javaexec.
151877 2005-01-26  Bruno Haible  <bruno@clisp.org>
151879         * m4/javaexec.m4: New file, from GNU gettext.
151881 2005-01-26  Bruno Haible  <bruno@clisp.org>
151883         * lib/javaexec.sh.in: New file, from GNU gettext.
151884         * lib/javaexec.h: New file, from GNU gettext.
151885         * lib/javaexec.c: New file, from GNU gettext.
151887 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
151889         * modules/lchown (Depends-on): Remove lchown.h
151891 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
151893         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
151894         must be defined if the header file was not found, in order
151895         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
151897 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
151899         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
151900         initializers for struct pentry_state.
151901         (__argp_error): Check return value of __asprintf
151902         (__argp_failure): Translate error message
151904         * lib/argp-parse.c: Removed braces around the expansion of N_()
151906 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
151908         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
151909         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
151910         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
151911         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
151912         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
151913         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
151914         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
151915         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
151916         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
151917         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
151918         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
151919         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
151920         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
151921         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
151922         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
151923         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
151924         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
151925         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
151926         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
151927         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
151928         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
151929         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
151930         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
151931         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
151932         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
151933         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
151934         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
151935         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
151936         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
151937         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
151938         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
151939         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
151940         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
151941         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
151942         xstrtol.m4, xstrtoumax.m4, yesno.m4:
151943         Use an all-permissive copyright notice, recommended by RMS.
151945 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
151947         * modules/chdir-long (Depends-on): Remove mempcpy.
151949 2005-01-21  Jim Meyering  <jim@meyering.net>
151951         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
151952         same value as for Solaris 9.
151954         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
151955         component length.  This included changing the parameter to be
151956         of type `char *' rather than `char const *'.
151957         * lib/chdir-long.h (chdir_long): Update prototype.
151959         * lib/openat.c (fdopendir, fstatat): New functions.
151960         * lib/openat.h: Include headers required for use of DIR and struct
151961         stat.
151962         [AT_SYMLINK_NOFOLLOW]: Define.
151963         (fdopendir, fstatat): Add prototypes.
151965 2005-01-21  Bruno Haible  <bruno@clisp.org>
151967         * modules/classpath: New file.
151968         * MODULES.html.sh (Java): Add classpath.
151970 2005-01-21  Bruno Haible  <bruno@clisp.org>
151972         * lib/classpath.h: New file, from GNU gettext.
151973         * lib/classpath.c: New file, from GNU gettext.
151975 2005-01-20  Simon Josefsson  <jas@extundo.com>
151977         * modules/version-etc-fsf: New file.
151979 2005-01-20  Simon Josefsson  <jas@extundo.com>
151981         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
151982         * lib/version-etc.c: Remove version_etc_copyright.
151983         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
151984         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
151986 2005-01-20  Simon Josefsson  <jas@extundo.com>
151988         * lib/base64.h (isbase64): Add.
151990         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
151991         using a unsigned prototype, don't inline.
151992         (base64_decode): Use it.
151994 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
151996         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
151997         it.
151999 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
152001         * lib/save-cwd.c (save_cwd): Remove code to support the case
152002         where fchdir is missing or flaky.
152004 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
152006         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
152008 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
152010         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
152011         AC_LIBSOURCES now does this.
152012         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
152013         with new ullong_max module.
152015 2005-01-19  Bruno Haible  <bruno@clisp.org>
152017         * modules/sh-quote: New file.
152018         * MODULES.html.sh (Executing programs): Add sh-quote.
152020 2005-01-19  Bruno Haible  <bruno@clisp.org>
152022         * lib/sh-quote.h: New file, from GNU gettext.
152023         * lib/sh-quote.c: New file, from GNU gettext.
152025 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
152027         Merge from coreutils.
152028         * m4/ullong_max.m4: New file.
152029         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
152030         (gl_MACROS): Assume localeconv exists.
152032 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
152034         Merge changes from coreutils, as described below in several
152035         changelogs dated today.
152037         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
152038         (O_DIRECTORY): Remove; not needed here, since "." must be
152039         a directory.  All uses removed.
152040         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
152041         universal on Suns, and we also need to test for IRIX.
152042         Revamp code to use 'if' rather than '#if'.
152043         Avoid unnecessary comparison of cwd->desc to 0.
152045         * lib/utimens.c (futimens): Robustify the previous patch, by checking
152046         for known valid error numbers rather than observed invalid ones.
152048 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
152050         * modules/ullong_max: New file.
152052         * modules/chdir-long, modules/openat: New files.
152053         * modules/save-cwd (Depends-on): Depend on chdir-long.
152054         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
152056 2005-01-18  Jim Meyering  <jim@meyering.net>
152058         Merge from coreutils.
152059         * m4/chdir-long.m4, m4/openat.m4: New files.
152060         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
152061         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
152062         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
152063         is sane and DOES follow symlinks.  Besides, testing 20 different
152064         systems found no broken chown implementations.
152065         Prompted by a change in rsync's copy of this macro.
152066         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
152068         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
152070         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
152071         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
152072         NULL-means-set-to-current-time semantics.
152073         Remove temporary file immediately, rather than waiting
152074         for configure's at-exit trap code to do it.
152076 2005-01-18  Jim Meyering  <jim@meyering.net>
152078         * lib/version-etc.c (version_etc_copyright): Update copyright date.
152080         * lib/utimens.c (futimens): Account for the fact that futimes
152081         can also fail with errno == ENOSYS or errno == ENOENT.
152082         Patch from Dmitry V. Levin.
152084         Change the name of the robust chdir function from chdir to chdir_long.
152085         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
152086         (restore_cwd): Use chdir_long, not chdir.
152087         * lib/chdir-long.c: Renamed from chdir.c.
152088         * lib/chdir-long.h: Renamed from chdir.h.
152089         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
152090         Hurd.
152092 2005-01-18  Bruno Haible  <bruno@clisp.org>
152094         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
152095         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
152096         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
152097         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
152098         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
152099         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
152100         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
152101         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
152102         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
152103         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
152104         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
152105         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
152106         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
152107         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
152108         Use an all-permissive copyright notice, recommended by RMS.
152110 2005-01-18  Bob Proulx  <bob@proulx.com>
152112         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
152113         simplify offsetof() macro construct to avoid compile failure with
152114         native HP-UX 11.0 ANSI C compiler.
152116 2005-01-17  Bruno Haible  <bruno@clisp.org>
152118         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
152119         redundant because stpncpy.m4 takes care of it.
152121 2005-01-17  Bruno Haible  <bruno@clisp.org>
152123         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
152125 2005-01-17  Bruno Haible  <bruno@clisp.org>
152127         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
152128         used.
152130 2005-01-17  Bruno Haible  <bruno@clisp.org>
152132         * lib/fwriteerror.h (fwriteerror): Change specification to include
152133         fclose.
152134         * lib/fwriteerror.c: Include <stdbool.h>.
152135         (fwriteerror): At the end, close the file stream. Record whether
152136         stdout was already closed.
152138 2005-01-17  Bruno Haible  <bruno@clisp.org>
152140         * lib/execute.c (environ): Declare if needed.
152141         * lib/pipe.c (environ): Likewise.
152142         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
152144 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
152146         * modules/argp: Depend on vsnprintf
152148 2005-01-10  Jim Meyering  <jim@meyering.net>
152150         * modules/closeout (Depends-on): Add atexit.
152152 2005-01-06  Bruno Haible  <bruno@clisp.org>
152154         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
152156 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
152158         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
152159         definitions to be after all include files, to avoid collisions.
152160         Problem reported by Bob Proulx.
152162 2005-01-04  Jim Meyering  <jim@meyering.net>
152164         Changes imported from coreutils.
152165         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
152166         as the mkstemp template, use a temporary directory and an
152167         8.3-friendly template to avoid trouble on systems like DJGPP.
152168         Reported by Juan M. Guerrero via Stepan Kasal.
152169         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
152170         close. Remove the temporary directory right away, rather than waiting
152171         for configure's at-exit trap code to do it.
152172         Suggestion from Stepan Kasal.
152174 2005-01-01  Simon Josefsson  <jas@extundo.com>
152176         * gnulib-tool: Print #include directives when --import'ing.
152178 2004-12-28  Simon Josefsson  <jas@extundo.com>
152180         * tests/test-base64.c: Include required header files.  Remove
152181         unused variables.
152183 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
152185         * modules/error (Depends-on): Remove gettext.
152187 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
152189         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
152190         not needed.  This removes a dependency on the gettext module.
152191         [defined _LIBC]: Do not include <libintl.h>; not needed.
152193 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
152195         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
152196         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
152198 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
152200         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
152201         HAVE_DECL_STRTOLD.
152203 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
152205         * modules/getdate (Depends-on): Remove alloca-opt.
152207 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
152209         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
152211 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
152213         * lib/argp-parse.c: Include <stddef.h>.
152214         (alignof, alignto): New macros.
152215         (parser_init): Don't assume that void * is aligned sufficiently
152216         for struct option.
152218         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
152219         need to extend the stack.
152220         (YYINITDEPTH): New macro, so that the initial stack isn't overly
152221         large.
152223 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
152225         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
152227 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
152229         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
152230         (2004-10-24) change.  Apparently this was a false alarm.
152232         * modules/getdate: Depend on alloca-opt, not alloca.
152234 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
152236         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
152237         Remove now-obsolete comment about AIX.
152238         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
152239         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
152240         (YYMAXDEPTH): New macro.
152242 2004-12-18  Simon Josefsson  <jas@extundo.com>
152244         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
152246 2004-12-18  Bruno Haible  <bruno@clisp.org>
152248         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
152250 2004-12-18  Bruno Haible  <bruno@clisp.org>
152252         * lib/fatal-signal.c (fatal_signals): Make non-const.
152253         (init_fatal_signals): New function.
152254         (uninstall_handlers, install_handlers): Ignore signals that were set to
152255         SIG_IGN.
152256         (at_fatal_signal): Call init_fatal_signals.
152257         (init_fatal_signal_set): Likewise. Ignore signals that were set to
152258         SIG_IGN.
152259         Reported by Paul Eggert.
152261 2004-12-18  Bruno Haible  <bruno@clisp.org>
152263         * doc/alloca.texi: New file.
152264         * doc/alloca-opt.texi: New file.
152266 2004-12-17  Jim Meyering  <jim@meyering.net>
152268         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
152269         Otherwise, install-sh could exit with improper exit status when
152270         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
152272 2004-12-16  Simon Josefsson  <jas@extundo.com>
152274         * tests/test-base64.c: Add license.
152276 2004-12-15  Stepan Kasal  <address@hidden>
152278         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
152280 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
152282         * modules/getcwd (Files): Add m4/d-ino.m4.
152283         Suggested by Mark D. Baushke.
152285 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
152287         * lib/getdate.y (textint): New member "negative".
152288         (time_zone_hhmm): New function.
152289         Expect 14 shift-reduce conflicts, not 13.
152290         (o_colon_minutes): New rule.
152291         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
152292         (yylex): Set the "negative" member of signed numbers.
152294 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
152296         * doc/getdate.texi (Time of day items, Time zone items):
152297         Describe new formats +00:00, UTC+00:00.
152299 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
152301         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
152302         spurious "-l"s.  Problem reported by Stepan Kasal.
152304 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
152306         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
152307         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
152309 2004-12-04  Simon Josefsson  <jas@extundo.com>
152311         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
152312         Vandoorselaere <yoann@prelude-ids.org>.
152314 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
152316         Changes imported from coreutils.
152317         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
152318         exist.
152319         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
152321 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
152323         Changes imported from coreutils.
152324         * lib/hard-locale.c: Assume <locale.h> exists.
152325         Include "strdup.h".
152326         (GLIBC_VERSION): New macro.
152327         (hard_locale): Assume setlocale exists.
152328         Rewrite to avoid #ifdef.
152329         Use strdup rather than malloc + strcpy.
152330         * lib/human.c: Assume <locale.h> exists.
152331         (human_readable): Assume localeconv exists.
152333 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
152335         * modules/hard-locale (Depends-on): Add strdup.
152337 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
152339         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
152340         convert T2, not T.  (Imported from libc.)
152342 2004-11-30  Simon Josefsson  <jas@extundo.com>
152344         * modules/restrict (License): Change to LGPL.
152346 2004-11-30  Simon Josefsson  <jas@extundo.com>
152348         * m4/restrict.m4: Add copyright and copying conditions.
152350 2004-11-30  Simon Josefsson  <jas@extundo.com>
152352         * m4/base64.m4: New file.
152354 2004-11-30  Simon Josefsson  <jas@extundo.com>
152356         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
152357         base64.
152359         * tests/test-base64.c: New file.
152361         * modules/base64: New file.
152363 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
152365         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
152366         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
152368         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
152370 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
152372         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
152373         (__getcwd.c): Don't restore errno; glibc doesn't.
152374         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
152375         first, falling back to our code only if its results look suspicious.
152376         Ensure that the resulting buffer is only as large as necessary.
152378         * lib/readutmp.c: Include readutmp.h first.
152379         Include <errno.h>, since readutmp.h no longer does that.
152380         * lib/readutmp.h: Don't include <errno.h>,
152381         <sys/param.h>, <time.h>; not needed to establish interface.
152382         (errno): Remove decl.
152383         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
152384         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
152385         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
152387 2004-11-28  Simon Josefsson  <jas@extundo.com>
152389         * lib/base64.h, base64.c: New file.
152391 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
152393         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
152395 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
152397         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
152398         (Depends-on): Remove pathmax, same.  Add mempcpy.
152399         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
152400         (Makefile.am): Append getcwd.h to lib_SOURCES.
152401         (Include): Add getcwd.h.
152402         (Maintainer): Change from Jim Meyering to "all, glibc",
152403         since getdate now uses intended-for-glibc code.
152404         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
152405         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
152407 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
152409         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
152410         HP's ANSI C compiler.
152411         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
152412         Declaring int functions causes warnings on some modern systems and
152413         shouldn't be needed to compile on ancient ones.
152414         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
152415         defined.
152417         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
152418         with the following changes.
152419         (__set_errno): Parenthesize properly.
152420         Include <stdbool.h>.
152421         (MIN, MAX, MATCHING_INO): New macros.
152422         (__getcwd): Define with prototype, not K&R form.
152423         Use heuristics to allocate default buffer on stack if possible.
152424         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
152425         behavior, and to avoid the PATH_MAX limit when computing
152426         ../../../../...
152427         Use MATCHING_INO to compare inode number to file.
152428         Check for arithmetic overflow in size calculations.
152429         Fix bug in reallocation of dot array that caused getcwd to fail
152430         on directories nested deeper than 75.
152431         Be more careful about saving errno on error.
152432         Do not use realloc; use only free+malloc, as this is a bit
152433         more flexible and avoids a needless copy operation.
152434         Do not inspect st_dev and st_ino for symbolic links; POSIX
152435         doesn't specify the latter.
152436         Check for closedir errors.
152437         Avoid needless casts.
152438         Use "#ifdef weak_alias" around weak_alias, to be like other
152439         glibc code.
152440         The following changes to getcwd.c have effect only when used in
152441         gnulib; they have no effect inside glibc proper.
152442         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
152443         as alloca isn't used.
152444         (alloca, __alloca): Likewise.
152445         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
152446         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
152447         unconditionally, as gnulib assumes C89 or better.
152448         Do not include <sys/param.h>.
152449         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
152450         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
152451         better.
152452         (NULL) [!defined NULL]: Remove; we assume C89 or better.
152453         Include <dirent.h> in a way that is compatible with modern Autoconf.
152454         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
152455         New macros, if not already defined.
152456         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
152457         Use "_LIBC", not "defined _LIBC", for consistency.
152458         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
152459         a mempcpy module.
152460         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
152461         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
152462         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
152463         credit only to Jim Meyering and adjust the copyright dates.
152464         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
152465         <stdlib.h>, <unistd.h>, "pathmax.h".
152466         Instead, include "xgetcwd.h" (first) and "getcwd.h".
152467         (INITIAL_BUFFER_SIZE): Remove.
152468         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
152470 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
152472         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
152473         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
152474         Use the _ONCE methods, for efficiency.
152475         Check for fcntl.h.  In test program, include <errno.h>
152476         and <fcntl.h> if available.  Remove old K&R cruft from
152477         test program.  Check for common errors in GNU/Linux,
152478         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
152479         don't do AC_LIBOBJ, as that's getcwd.m4's job.
152480         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
152481         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
152482         name accordingly.
152483         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
152484         accommodate new getcwd.c.
152485         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
152486         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
152487         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
152488         that's all we need now.
152490 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
152492         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
152493         argp-parse.c depends on getopt internals, that means we should
152494         always use our getopt, to be on the safe side.
152495         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
152496         order not to spoil the result of an eventual previous invocation
152497         of gl_GETOPT_SUBSTITUTE.
152499 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
152501         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
152502         redefinition warnings. To avoid them, include the defines
152503         in `#if !defined __need_getopt ... #endif'. The only place
152504         where __getopt_argv_const is used is in definitions
152505         of getopt_long and getopt_long_only below, which are as well
152506         protected by `#ifndef __need_getopt'.
152507         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
152508         __need_getopt after including <stdio.h> and <unistd.h> These
152509         headers might have defined it.
152511 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
152513         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
152515 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
152517         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
152518         (futimens): New function, which uses futimes if available.
152519         (futimens, utimens): Support timespec==NULL, with same semantics
152520         as utime and utimens.
152521         * lib/utimens.h (futimens): New decl.
152523 2004-11-23  Jim Meyering  <jim@meyering.net>
152525         * lib/getopt_.h: Remove trailing blanks.
152527 2004-11-23  Jim Meyering  <jim@meyering.net>
152529         * lib/__fpending.c: Add comment.
152531 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
152533         * modules/canonicalize (Depends-on): Add xreadlink.
152534         Problem reported by James Youngman.
152536 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
152538         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
152539         New macros.
152540         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
152541         optopt): Use them instead of invoking ## directly; otherwise, the
152542         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
152544 2004-11-19  Bruno Haible  <bruno@clisp.org>
152546         * lib/strtok_r.c: Move comments from here...
152547         * lib/strtok_r.h: ... to here.
152549 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
152551         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
152552         implementations that mishandle size_t overflow.
152554 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
152556         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
152557         might fail.  Problem reported by Yoann Vandoorselaere.
152558         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
152559         implementations that mishandle size_t overflow.
152561 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
152563         * modules/canon-host (Depends-on): Add strdup.
152565 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
152567         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
152569 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
152571         * lib/canon-host.c: Include "strdup.h".
152572         (canon_host): Use getaddrinfo if available, so that IPv6 works.
152573         Use strdup instead of malloc/strcpy to duplicate strings.
152575         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
152576         (human_space_before_unit): New constant.
152577         * lib/human.c (human_readable): Support it.
152579         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
152580         (xgetcwd): Set errno correctly when failing.
152581         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
152582         the failure is actually due to a PATH_MAX problem.
152584         Further getopt changes to make it more likely that glibc will
152585         buy the changes back.
152586         * lib/getopt.c (POSIXLY_CORRECT): New constant.
152587         (getopt): Use it, so to preserve glibc semantic
152588         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
152589         when compiling for libc.
152590         * lib/getopt_.h (__getopt_argv_const): Bring it back.
152591         (getopt_long, getopt_long_only): Use it.
152593         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
152594         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
152595         (getopt): Argv is now char * const *, as per standard.
152596         (_getopt_internal_r, _getopt_internal): Argv is now char **,
152597         not char *__getopt_argv_const *.
152598         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
152599         _getopt_long_only_r): Likewise.
152600         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
152601         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
152602         _getopt_long_r, _getopt_long_only_r): Likewise.
152603         * lib/getopt_.h (__getopt_argv_const): Remove.
152604         (getopt): Argv is now char * const *, as per standard.
152606         * lib/getdate.y (tORDINAL): New token.
152607         (day, relunit): Allow it for relative times.
152608         (relative_time_table): Use tORDINAL for ordinals.
152610 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
152612         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
152613         Document that "second" isn't allowed as an ordinal number.
152615 2004-11-16  Jim Meyering  <jim@meyering.net>
152617         * modules/closeout (Depends-on): Add fpending.
152619 2004-11-15  Jim Meyering  <jim@meyering.net>
152621         * lib/closeout.c: Include "__fpending.h" once again.
152622         Include <stdbool.h>.
152623         (close_stdout): Don't fail just because stdout was closed initially,
152624         since some programs don't write to stdout in the normal course of
152625         operation (other than --version and --help), and we don't want this
152626         function to make e.g. `touch file >&-' fail.
152627         But do fail if it was closed and someone has tried to write to it.
152628         E.g., `printf foo >&-' must fail.
152630 2004-11-13  Jim Meyering  <jim@meyering.net>
152632         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
152634 2004-11-12  Simon Josefsson  <jas@extundo.com>
152636         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
152637         small doc fix is still pending.
152639 2004-11-11  Simon Josefsson  <jas@extundo.com>
152641         * modules/strtok_r: New file.
152643         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
152644         strtok_r.
152646 2004-11-11  Simon Josefsson  <jas@extundo.com>
152648         * m4/strtok_r.m4: New file.
152650         * m4/getopt.m4: Replace opterr.
152652 2004-11-11  Simon Josefsson  <jas@extundo.com>
152654         * lib/strtok_r.h, strtok_r.c: New file.
152656 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
152658         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
152659         of replacing opterr, getopt, etc.  This should handle the
152660         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
152662 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
152664         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
152665         we can stop lying to compilers about the constness of argv when we
152666         are compiled outside glibc.
152667         (getopt, getopt_long, getopt_long_only): Use it.
152668         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
152669         _getopt_internal, getopt): Likewise.
152670         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
152671         _getopt_long_only_r): Likewise.
152672         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
152673         _getopt_long_r, _getopt_long_only_r): Likewise.
152675         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
152676         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
152677         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
152678         the other external symbols.
152679         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
152680         declaration, since the above renaming now works around collisions.
152682 2004-11-11  Jim Meyering  <jim@meyering.net>
152684         * lib/linebreak.c: Remove trailing blanks.
152685         * lib/alloca_.h: Likewise.
152686         * lib/acosl.c: Likewise.
152687         * lib/euidaccess.c: Likewise.
152688         * lib/allocsa.h: Likewise.
152690 2004-11-10  Simon Josefsson  <jas@extundo.com>
152692         * m4/getaddrinfo.m4: New file.
152694 2004-11-10  Simon Josefsson  <jas@extundo.com>
152696         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
152698 2004-11-10  Simon Josefsson  <jas@extundo.com>
152700         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
152701         getaddrinfo.
152703         * modules/getaddrinfo: New file.
152705 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
152707         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
152709 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
152711         * lib/mktime.c (SHR): New macro, which is a portable
152712         substitute for >> that should work even on Crays.
152713         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
152714         Problem reported by Mark D. Baushke in
152715         <http://lists.gnu.org/r/bug-gnulib/2004-11/msg00071.html>.
152716         * lib/getdate.y (SHR): Likewise.
152717         (tm_diff): Use it.
152718         * lib/strftime.c (SHR): Likewise.
152719         (tm_diff): Use it.
152720         * lib/quotearg.c (struct quoting_options): Use unsigned int for
152721         quote_these_too, so that right shifts are well defined.  All uses
152722         changed.
152724 2004-11-10  Jim Meyering  <jim@meyering.net>
152726         Ensure that no close failure goes unreported.
152727         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
152728         return early when it seems there's nothing to flush.
152729         Don't include __fpending.h.
152731 2004-11-10  Jim Meyering  <jim@meyering.net>
152733         * modules/closeout (Depends-on): Remove fpending.
152735 2004-11-10  Jim Meyering  <jim@meyering.net>
152737         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
152739 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
152741         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
152742         gl_FUNC_STRFTIME.
152743         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
152744         and AC_REQUIRE when possible, to avoid duplicate checks.
152745         Check for <wchar.h>.
152747 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
152749         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
152751 2004-11-09  Bruno Haible  <bruno@clisp.org>
152753         * m4/sockpfaf.m4: New file.
152755 2004-11-05  Bruno Haible  <bruno@clisp.org>
152757         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
152758         Reported by Mark D. Baushke <mdb@cvshome.org>.
152760 2004-11-04  Bruno Haible  <bruno@clisp.org>
152762         2004-09-11  Bruno Haible  <bruno@clisp.org>
152763                 * allocsa.valgrind: New file.
152764         2004-02-06  Bruno Haible  <bruno@clisp.org>
152765                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
152766                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
152767                 Reported by Christopher Seip <chris.seip@hp.com>.
152769 2004-11-04  Bruno Haible  <bruno@clisp.org>
152771         * modules/allocsa (Files): Add lib/allocsa.valgrind.
152772         (Makefile.am): Distribute it.
152774 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
152776         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
152777         with errno == ERANGE if the buffer is too small.
152778         Problem reported by Mark D. Baushke.
152780 2004-11-03  Albert Chin  <china@thewrittenword.com>
152781             Paul Eggert  <eggert@cs.ucla.edu>
152783         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
152784         equivalent, substitute $ac_type for equivalent type rather than
152785         blindly using uint32_t *always* which won't work if uint32_t is not
152786         available.  Define _UINT32_T to work around typedef of uint32_t if
152787         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
152788         2.5.1.
152790 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
152792         * m4/jm-macros.m4: Sync from coreutils.
152793         (gl_MACROS): Check for mbrlen, for pathchk.
152794         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
152796 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
152798         * lib/xreadlink.c (MAXSIZE): New macro.
152799         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
152800         size does not exceed MAXSIZE.  Avoid cast.
152801         As suggested by Mark D. Baushke in
152802         <http://lists.gnu.org/r/bug-gnulib/2004-11/msg00009.html>,
152803         if readlink fails with buffer size just under MAXSIZE, try again
152804         with MAXSIZE.
152806 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
152808         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
152810 2004-11-02  Derek R. Price  <derek@ximbiot.com>
152811         and  Paul Eggert  <eggert@cs.ucla.edu>
152813         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
152814         (get_date): Overparenthesize to avoid GCC warning.
152816 2004-11-02  Bruno Haible  <bruno@clisp.org>
152818         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
152819         returns void.
152821 2004-11-02  Bruno Haible  <bruno@clisp.org>
152823         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
152824         function returns void.
152826 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
152828         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
152829         fflush_unlocked, flockfile, funlockfile, funlockfile,
152830         fputs_unlocked, putc_unlocked.
152832 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
152834         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
152835         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
152836         already declared.
152838 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
152840         * modules/getdate (Files): Add doc/getdate.texi.
152841         (Depends-on): Add setenv, xalloc.
152843 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
152845         * lib/getdate.y: Add support for TZ="foo" within a date string.
152846         Fix some bugs near time_t boundaries.  Reject dates with
152847         out-of-range components, e.g., "Sept 31".
152848         Include <stdlib.h>, "setenv.h", "xalloc.h".
152849         (ISDIGIT_LOCALE): Remove; unused.
152850         Note that the TZ and time functions used here are not reentrant.
152851         (mktime_ok, get_tz): New functions.
152852         (TZBUFSIZE): New constant.
152853         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
152854         This requires that we sometimes generate our own TZ="XXX..." setting.
152856 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
152858         * doc/getdate.texi: New file, from coreutils with modifications for
152859         the new TZ parsing.
152861 2004-10-27  Derek R. Price  <derek@ximbiot.com>
152863         * lib/mktime.c (not_equal_tm): Remove redundant check.
152865 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
152867         * modules/regex (lib_SOURCES): Add regex.c.
152868         Reported by James Youngman in
152869         <http://lists.gnu.org/r/bug-gnulib/2004-10/msg00199.html>.
152871 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
152873         * lib/getdate.y: Use Bison 1.875 features, and some minor
152874         code cleanups.  This change does not affect semantics.
152875         Don't include <stdlib.h>; no longer needed.
152876         Don't include unlocked-io.h; only the "#if TEST" code uses
152877         stdio, and performance isn't crucial there.
152878         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
152879         Bison 1.875 features as described below.
152880         All uses of "PC." replaced by "pc->".
152881         (YYSTYPE): Add a forward declaration.
152882         (yylex, yyerror): Use full prototypes in forward decls.
152883         Use "%pure-parser" rather than obsolescent "%pure_parser".
152884         Use %parse-param and %lex-param instead of obsolescent
152885         YYPARSE_PARAM and YYLEX_PARAM.
152886         (meridian_table, month_and_day_table, time_units_table,
152887         relative_time_table, time_zone_table, military_table,
152888         lookup_zone, lookup_word, get_date):
152889         Use NULL instead of 0 where appropriate.
152890         (to_hour): Avoid abort (), to avoid a dependency on
152891         stdlib.h.
152892         (yyerror, yylex): Now accepts parser_control * arg.
152893         (main) [TEST]: Use '\0' rather than 0 for char.
152895 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
152897         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
152899 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
152901         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
152902         It's now the caller's responsibility to handle the case where
152903         !HAVE_GETPAGESIZE && !defined getpagesize.
152905         * lib/mktime.c (leapyear): Arg is long int, not int.
152907 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
152909         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
152911 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
152913         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
152914         missing.  Problem reported by James Youngman.
152916 2004-10-16  Simon Josefsson  <jas@extundo.com>
152918         * gnulib-tool: Fix comments.  Fix parse problem.
152919         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
152921 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
152923         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
152924         implementation of getopt_long.  Problem reported by Alexander Taler in:
152925         http://lists.gnu.org/r/bug-gnulib/2004-10/msg00103.html
152927 2004-10-15  Bruno Haible  <bruno@clisp.org>
152929         * gnulib-tool: Untabify. Initialize supplied_libname.
152930         (func_usage): More homogenous output.
152931         (func_modules_transitive_closure, func_modules_to_filelist,
152932         func_emit_lib_Makefile_am): New functions.
152933         (func_import): New function, extracted from big case statement. Use
152934         func_get_license, func_modules_transitive_closure,
152935         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
152936         opt_lgpl. Don't use test -a, as it's not portable.
152937         (func_create_testdir): Use func_modules_transitive_closure,
152938         func_modules_to_filelist, func_emit_lib_Makefile_am.
152940 2004-10-15  Bruno Haible  <bruno@clisp.org>
152942         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
152944 2004-10-15  Bruno Haible  <bruno@clisp.org>
152946         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
152947         the portions belonging to each module.
152948         Suggested by Derek Robert Price <derek@ximbiot.com>.
152950 2004-10-12  Simon Josefsson  <jas@extundo.com>
152952         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
152953         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
152954         to real functions.
152956 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
152958         * modules/vsnprintf: New file.
152960 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
152962         * m4/vsnprintf.m4: New file.
152964 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
152966         * lib/vsnprintf.h: New file.
152967         * lib/vsnprintf.c: New file.
152969 2004-10-11  Bruno Haible  <bruno@clisp.org>
152971         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
152972         vsnprintf.
152974 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
152976         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
152978 2004-10-07  Bruno Haible  <bruno@clisp.org>
152980         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
152981         fits into the provided buffer.
152983 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
152985         * lib/diacrit.c, diacrit.h: Add GPL notice.
152987         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
152988         notice.
152989         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
152990         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
152991         This avoids a potential constant-folding bug.
152993 2004-10-05  Bruno Haible  <bruno@clisp.org>
152995         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
152996         for the declaration of strsep.
152998 2004-10-05  Bruno Haible  <bruno@clisp.org>
153000         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
153002 2004-10-04  Simon Josefsson  <jas@extundo.com>
153004         * modules/memmem: New file.
153005         * tests/test-memmem.c: New file.
153006         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
153008 2004-10-04  Simon Josefsson  <jas@extundo.com>
153010         * m4/memmem.m4: New file.
153012 2004-10-04  Simon Josefsson  <jas@extundo.com>
153014         * lib/memmem.h: New file.
153015         * lib/memmem.c: New file, taken from glibc.
153017 2004-10-04  Simon Josefsson  <jas@extundo.com>
153019         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
153020         '#ifdef USE_UNLOCKED_IO'.
153022 2004-10-04  Simon Josefsson  <jas@extundo.com>
153024         * config/srclist.txt: Add memmem from glibc.
153026 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
153028         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
153030         * modules/argmatch, modules/argp, modules/closeout, modules/error,
153031         modules/exclude, modules/getdate, modules/getline,
153032         modules/getndelim2, modules/getpass, modules/getpass-gnu,
153033         modules/getusershell, modules/linebuffer, modules/md5,
153034         modules/mountlist, modules/posixtm, modules/readtokens,
153035         modules/readutmp, modules/regex, modules/sha1,
153036         modules/version-etc, modules/yesno:
153037         Remove dependency on unlocked-io.
153039 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
153041         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
153043         * m4/unlocked-io.m4: Add copyright notice.
153044         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
153046 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
153048         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
153049         * lib/xmalloc.c (xmemdup): Likewise.
153050         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
153051         XFREE): Remove these long-obsolescent macros.
153052         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
153053         * lib/xstrdup.c: Remove.
153055         * lib/regex.c (re_comp): Cast gettext return value to char *,
153056         Problem reported by Martin Neitzel via Mark D. Baushke.
153058 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
153060         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
153061         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
153062         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
153063         regex.c, sha1.c, version-etc.c, yesno.c:
153064         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
153065         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
153066         the includer's responsibility.
153068         Sync from coreutils.
153070         * lib/modechange.c (mode_compile): Don't decrement a pointer that
153071         points to the start of a string, as the C Standard says the
153072         resulting behavior is undefined.
153074         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
153075         simple -> simple_backups, numbered_existing ->
153076         numbered_existing_backups, numbered -> numbered_backups
153077         to avoid shadowing problems.  All uses changed.
153078         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
153079         * lib/backupfile.c (check_extension, numbered_backup):
153080         Rename locals to avoid shadowing 'basename'.
153081         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
153082         once.
153084         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
153085         * lib/.cvsignore: Add getopt.h.
153087 2004-10-04  Bruno Haible  <bruno@clisp.org>
153089         * modules/README: New file.
153090         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
153091         not a module.
153093 2004-10-02  Jim Meyering  <jim@meyering.net>
153095         * lib/dirfd.h, getpagesize.h: Add copyright notice.
153097 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
153099         * modules/strsep: New file.
153101 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
153103         * m4/strsep.m4: New file.
153105 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
153107         * lib/strsep.h: New file.
153108         * lib/strsep.c: New file.
153110 2004-10-01  Simon Josefsson  <jas@extundo.com>
153112         * lib/snprintf.c (snprintf): Handle size==0.
153114 2004-10-01  Simon Josefsson  <jas@extundo.com>
153115             Bruno Haible  <bruno@clisp.org>
153117         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
153118         (snprintf): Declare 'args'.
153120 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
153122         * lib/snprintf.c: Remove comments as to why each header is needed.
153124 2004-10-01  Bruno Haible  <bruno@clisp.org>
153126         * MODULES.html.sh: Add strsep.
153128 2004-09-30  Simon Josefsson  <jas@extundo.com>
153130         * modules/snprintf: New file.
153132 2004-09-30  Simon Josefsson  <jas@extundo.com>
153134         * m4/snprintf.m4: New file.
153136 2004-09-30  Simon Josefsson  <jas@extundo.com>
153138         * lib/snprintf.h, lib/snprintf.c: New files.
153140 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
153142         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
153143         (hol_entry_help): Never translate an empty string.
153144         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
153145         * lib/argp.h (OPTION_NO_TRANS): New option.
153147 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
153149         * modules/argp (Maintainer): Replace Simon Josefsson
153150         by Sergey Poznyakoff.
153152 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
153154         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
153155         changes merged back into glibc.
153157 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
153159         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
153161 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
153163         * lib/xvasprintf.c: Include xalloc.h.
153164         (xvasprintf): Use xalloc_die, not xmalloc_die.
153166 2004-09-29  Bruno Haible  <bruno@clisp.org>
153168         * modules/alloca-opt: New file, derived from modules/alloca.
153169         * modules/allocsa: Depend on alloca-opt instead of alloca.
153170         * modules/setenv: Likewise.
153171         * modules/vasnprintf: Likewise.
153172         * MODULES.html.sh: Add alloca-opt.
153174 2004-09-28  Simon Josefsson  <jas@extundo.com>
153176         * gnulib-tool: New parameter --lgpl, to asseert that modules are
153177         LGPL, and to replace license template from GPL to LGPL.
153179 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
153181         * modules/dummy: Change license to LGPL.
153183 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
153185         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
153187 2004-09-24  Simon Josefsson  <jas@extundo.com>
153189         * modules/minmax (License): Change from GPL to LGPL.
153191 2004-09-23  Simon Josefsson  <jas@extundo.com>
153193         * gnulib-tool (--import): Typo.
153195 2004-09-23  Simon Josefsson  <jas@extundo.com>
153197         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
153199 2004-09-22  Bruno Haible  <bruno@clisp.org>
153201         * modules/*: Add 'License' field.
153202         * gnulib-tool: Accept --extract-license option.
153203         (func_get_license): New function.
153205 2004-09-21  Bruno Haible  <bruno@clisp.org>
153207         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
153208         Reported by Simon Josefsson.
153210 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
153212         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
153213         gl_AC_TYPE_LONG_LONG.
153215 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
153217         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
153219 2004-09-18  Simon Josefsson  <jas@extundo.com>
153220         and  Paul Eggert  <eggert@cs.ucla.edu>
153222         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
153223         calls with autoreconf.  Define GL_LIB.
153225 2004-09-14  Karl Berry  <karl@gnu.org>
153227         * config/srclist.txt: unsync setenv.c, sigh.
153229 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
153231         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
153232         Problem reported by Bruno Haible in:
153233         http://lists.gnu.org/r/bug-tar/2004-09/msg00023.html
153235 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
153237         * config/srclist.txt: Comment out argp-pvh.c.
153239 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
153241         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
153242         in case some system header has #define'd it.  Problem reported by
153243         Soeren D. Schulze in
153244         <http://lists.gnu.org/r/bug-gnulib/2004-09/msg00017.html>.
153246 2004-09-09  Karl Berry  <karl@gnu.org>
153248         * regex.[ch]: delete from the root.  These were supposed to be
153249                 synced with emacs cvs, but this has not happened for about
153250                 a year, and anyway nothing else uses emacs regex.[ch].
153251                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
153252                 lib/regex[.ch] is untouched.
153254 2004-09-09  Bruno Haible  <bruno@clisp.org>
153256         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
153258 2004-09-09  Bruno Haible  <bruno@clisp.org>
153260         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
153261         modifications.
153262         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
153264 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
153266         * modules/xvasprintf: New file.
153267         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
153269 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
153271         * lib/xvasprintf.h: New file.
153272         * lib/xvasprintf.c: New file.
153273         * lib/xasprintf.c: New file.
153275 2004-09-08  Bruno Haible  <bruno@clisp.org>
153277         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
153279 2004-09-08  Bruno Haible  <bruno@clisp.org>
153281         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
153282         length is > INT_MAX.
153283         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
153284         more.
153286 2004-09-08  Bruno Haible  <bruno@clisp.org>
153288         * lib/stdint_.h: New file, taken from GNU clisp.
153290 2004-09-08  Bruno Haible  <bruno@clisp.org>
153291             Oskar Liljeblad  <oskar@osk.mine.nu>
153293         * modules/stdint: New file.
153294         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
153296 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
153298         Import from coreutils.
153299         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
153300         strings on unbounded length.  alloca's performance benefits aren't
153301         that important here.
153302         (V_STRDUP): Remove.
153303         (parse_with_separator): New function, with most of the internals
153304         of the old parse_user_spec.  Allow user to omit both user and group,
153305         for compatibility with FreeBSD.
153306         Clone only the user name, not the entire spec.
153307         Do not set *uid, *gid unless entirely successful.
153308         Avoid memory leak in some failing cases.
153309         Fix regression for USER.GROUP reported by Dmitry V. Levin in
153310         <http://lists.gnu.org/r/bug-coreutils/2004-08/msg00102.html>
153311         (parse_user_spec): Rewrite to use parse_with_separator.
153313 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
153315         * modules/userspec: Don't depend on alloca.
153317 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
153319         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
153321 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
153323         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
153324         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
153325         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
153327 2004-08-16  Simon Josefsson  <jas@extundo.com>
153329         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
153330         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
153331         Add --dry-run for --import.
153332         Let user provided command line parameters override configure.ac
153333         settings.
153335 2004-08-12  Simon Josefsson  <jas@extundo.com>
153337         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
153338         as discussed with Paul Eggert in threads rooted at
153339         <http://lists.gnu.org/r/bug-gnulib/2004-06/msg00039.html>
153340         and
153341         <http://lists.gnu.org/r/bug-gnulib/2004-07/msg00001.html>.
153342         Before, the test was empty, and relied on ELIDE_CODE in source
153343         code.)
153344         (gl_PREREQ_GETOPT): New macro.
153345         (gl_GETOPT): Use them.
153347 2004-08-12  Simon Josefsson  <jas@extundo.com>
153349         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
153350         * lib/getopt_.h: Renamed from getopt.h.
153352 2004-08-12  Simon Josefsson  <jas@extundo.com>
153354         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
153355         Change default library name from libfoo to libgnu.
153356         Now, if you have a configure.ac that says:
153357                 gl_SOURCE_BASE(gl)
153358                 gl_M4_BASE(gl/m4)
153359                 gl_MODULES(error getopt etcetera)
153360                 gl_INIT
153361         you can import all you need by running:
153362                 ../gnulib/gnulib-tool --import
153364         * modules/getopt (Files): Rename getopt.h to getopt_.h.
153365         (Makefile.am): Rewrite, use logic from argz.
153366         (Include): Use <getopt.h> instead of "getopt.h".
153368 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
153370         * modules/argp (Files): Add m4/unlocked-io.m4.
153371         (Depends-on): Add extensions.
153373 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
153375         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
153376         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
153377         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
153378         Check for program_invocation_name, program_invocation_short_name,
153379         flockfile, funlockfile, features.h, _getopt_long_only_r.
153381 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
153383         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
153384         its complicated substitute.
153385         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
153386         and program_invocation_name.
153387         (__argp_basename) [!_LIBC]: Remove; the only use was
153388         replaced by its body.
153389         (__argp_short_program_name): Change condition from
153390         !defined __argp_short_program_name to
153391         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
153392         to match argp-namefrob.h.
153393         (__argp_failure): Don't assume strerror_r returns char *.
153394         * lib/argp-parse.c (N_): Define unconditionally.
153395         (argp_default_options): Fill out initializers with 0 to avoid
153396         gcc warnings.
153398 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
153400         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
153401         getopt1.c.
153403 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
153405         Merge from coreutils.
153407         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
153409         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
153410         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
153412 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
153414         Merge from coreutils.
153416         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
153417         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
153418         for Reliant Unix 5.43.
153420         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
153421         (union fooround): Use uintmax_t, not long int.
153422         The rest is a merge from libc:
153423         [defined _LIBC]: Include <shlib-compat.h>.
153424         (_obstack) [defined _LIBC]: Remove after 2.3.4.
153426         * lib/settime.c (settime): Recode to avoid warning with
153427         Sun Forte C 6U2.
153429         * lib/strverscmp.c: Convert to UTF-8.
153431 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
153433         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
153434         m4/uintmax_t.m4.
153436 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
153438         * modules/xalloc-die: New file.
153439         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
153441         * modules/md5 (Files): Add m4/uint32_t.m4.
153442         * modules/sha1: Renamed from modules/sha.
153443         (Files):
153444         Rename lib/sha.h to lib/sha1.h.
153445         Rename lib/sha.c to lib/sha1.c.
153446         Rename m4/sha.m4 to m4/sha1.m4.
153447         (lib_SOURCES): Likewise.
153448         (configure.ac): Rename gl_SHA to gl_SHA1.
153449         (Include): sha.h -> sha1.h.
153451 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
153453         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
153454         * m4/sha1.m4: Renamed from sha.m4.
153455         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
153457 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
153459         * lib/obstack.h (obstack_empty_p):
153460         Don't assume that chunk->contents is suitably aligned.
153461         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
153462         Likewise. Problem reported by Benno in
153463         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
153465         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
153466         readable.  This could be improved further but it'd take some work.
153468 2004-08-08  Simon Josefsson  <jas@extundo.com>
153470         * modules/xgethostname (Depends-on): Remove exit and error (not
153471         used).
153473         * modules/getpass-gnu: Add getpass.h.
153474         (Depends-on): Add stdbool.
153475         * modules/getpass: Add getpass.h.
153477 2004-08-08  Simon Josefsson  <jas@extundo.com>
153479         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
153480         Check getpass declaration.
153482 2004-08-08  Simon Josefsson  <jas@extundo.com>
153484         * lib/xgethostname.c: Don't include error.h (not used).
153486         * lib/getpass.h: Add.
153487         * lib/getpass.c: Include getpass.h first.
153489 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
153491         * lib/xalloc-die.c: New file.
153492         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
153493         All uses removed.
153494         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
153495         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
153496         xalloc-die.c.
153497         (_, N_, xalloc_die): Move to xalloc-die.c.
153498         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
153499         so that we needn't mess with xalloc_msg_memory_exhausted.
153501         * lib/sha1.h: Renamed from sha.h.
153502         (SHA1_H): Renamed from _SHA_H.
153503         (sha1_ctx): Renamed from sha_ctx.
153504         (sha1_init_ctx): Renamed from sha_init_ctx.
153505         (sha1_process_block): Renamed from sha_process_block.
153506         (sha1_process_bytes): Renamed from sha_process_bytes.
153507         (sha1_finish_ctx): Renamed from sha_finish_ctx.
153508         (sha1_read_ctx): Renamed from sha_read_ctx.
153509         (sha1_stream): Renamed from sha_stream.
153510         (sha1_buffer): Renamed from sha_buffer.
153511         * lib/sha1.c: Likewise; renamed from sha.c.
153512         Do not include <sys/types.h>.
153513         Include <stddef.h> rather than <stdlib.h>.
153515 2004-08-08  Bruno Haible  <bruno@clisp.org>
153517         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
153518         FILESYSTEM_PREFIX_LEN.
153519         * lib/progreloc.c: Likewise.
153520         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
153522 2004-08-06  Simon Josefsson  <jas@extundo.com>
153524         * modules/progname (Depends-on): Don't depend on stdbool.
153526 2004-08-06  Simon Josefsson  <jas@extundo.com>
153528         * modules/getsubopt: New file.
153529         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
153530         getsubopt.
153532 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
153534         More merge from coreutils.
153536         * m4/utimens.m4, m4/utimecmp.m4: New files.
153537         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
153538         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
153539         prereq.m4, sha.m4: Import changes from coreutils.
153541 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
153543         More merge from coreutils.
153544         * modules/raise, modules/readtokens0, modules/utimens:
153545         * modules/utimecmp, module/xnanosleep: New files.
153546         * modules/strftime: Add lib/strftime.h.
153547         Change include from <time.h> to "strftime.h".
153548         * modules/yesno: Add lib/yesno.h.
153549         * modules/backupfile: Remove lib/addext.c.
153550         * modules/euidaccess: Add stat-macros.h.
153551         * modules/canonicalize, modules/euidaccess,
153552         modules/filemode, modules/lchown, modules/makepath,
153553         modules/rmdir, modules/stat: Likewise.
153555 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
153557         Merge from tar.
153558         * lib/argp-help.c (make_hol, hol_append): Don't assume that
153559         SIZE_MAX is a valid preprocessor constant.
153560         (__argp_basename): Change from "#ifndef _LIBC"
153561         to "#ifndef __argp_short_program_name", so that
153562         we don't compile these functions for tar.
153564         More merges from coreutils.
153565         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
153566         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
153567         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
153568         * lib/addext.c: Remove; no longer needed.
153569         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
153570         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
153571         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
153572         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
153573         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
153574         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
153575         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
153576         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
153577         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
153578         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
153579         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
153580         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
153581         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
153582         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
153583         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
153584         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
153585         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
153586         Import changes from coreutils.
153588 2004-08-05  Simon Josefsson  <jas@extundo.com>
153590         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
153592 2004-08-05  Simon Josefsson  <jas@extundo.com>
153594         * m4/getsubopt.m4: New file.
153596 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
153598         Merge from coreutils.
153600         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
153601         * m4/getcwd-path-max.m4: New files.
153603         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
153604         FILESYSTEM_PREFIX_LEN ->
153605         FILE_SYSTEM_PREFIX_LEN.
153606         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
153607         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
153608         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
153609         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
153611         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
153612         prerequisite modules now handle the DOS stuff.
153613         Don't check for unistd.h.
153615 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
153617         Merge from coreutils.
153619         * lib/.gdb-history: Remove; this doesn't belong here.
153621         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
153622         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
153623         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
153624         * lib/getcwd.c: New files.
153626         * lib/dirname.h: Include <stdbool.h>.
153627         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
153628         for consistency with POSIX terminology.  All uses changed.
153629         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
153630         (strip_trailing_slashes): Use bool for booleans.
153631         * lib/stripslash.c (strip_trailing_slashes): Likewise.
153633         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
153634         sometimes returns a positive errno value even when it succeeds.
153635         (print_errno_message) [!LIBC]: Fall back on strerror if
153636         __strerror_r fails.
153638         * lib/path-concat.c (mempcpy): Don't define if a system header defines
153639         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
153640         (longest_relative_suffix): New function.
153641         (path_concat): Use it.  Assume first argument is not NULL.
153642         Port to DOS.  Omit redundant separators.
153643         Report an error instead of returning NULL.
153644         Use mempcpy instead of memcpy.
153645         (xpath_concat): Remove: not declared or used.
153647         * lib/same.h: Include <stdbool.h>
153648         (same_name): Return bool, not int.
153649         * lib/same.c (same_name): Likewise.
153650         (errno): Don't declare; we assume C89 or better now.
153652         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
153653         if not already defined.
153655         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
153656         * lib/dup-safer.c (errno): Likewise.
153658 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
153660         Merge from coreutils.
153661         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
153662         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
153663         * modules/path-concat: Don't depend on strdup.
153665 2004-08-03  Simon Josefsson  <jas@extundo.com>
153667         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
153668         * lib/progname.h: Don't include stdbool.h.
153670 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
153672         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
153673         * MODULES.html.sh (func_all_modules): Remove fatal.
153675 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
153677         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
153679 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
153681         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
153682         working.
153684 2004-08-02  Simon Josefsson  <jas@extundo.com>
153686         * lib/getsubopt.h: New file, with comments from Bruno Haible.
153687         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
153688         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
153690 2004-08-01  Simon Josefsson  <jas@extundo.com>
153692         * lib/xgetdomainname.c: Include stdlib.h, for free().
153694 2004-07-19  Bruno Haible  <bruno@clisp.org>
153696         * MODULES.html.sh (func_all_modules): Add dummy.
153698 2004-07-16  Simon Josefsson  <jas@extundo.com>
153700         * modules/dummy: New file.
153702 2004-07-16  Simon Josefsson  <jas@extundo.com>
153704         * lib/dummy.c: New file.
153706 2004-07-16  Bruno Haible  <bruno@clisp.org>
153708         * lib/backupfile.h: Add extern "C" for C++.
153709         * lib/closeout.h: Likewise.
153710         * lib/copy-file.h: Likewise.
153711         * lib/findprog.h: Likewise.
153712         * lib/full-write.h: Likewise.
153713         * lib/pathname.h: Likewise.
153714         * lib/progname.h: Likewise.
153715         * lib/stpcpy.h: Likewise.
153716         * lib/stpncpy.h: Likewise.
153717         * lib/strcase.h: Likewise.
153718         * lib/strstr.h: Likewise.
153719         * lib/xalloc.h: Likewise.
153721         * lib/mbswidth.h: Add extern "C" for C++.
153722         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
153724 2004-07-13  Robert Millan  <robertmh@gnu.org>
153726         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
153728 2004-07-09  Simon Josefsson  <jas@extundo.com>
153730         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
153731         failed without this.)
153733 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
153735         * modules/chown (Files): Add lib/fchown-stub.c, since
153736         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
153738 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
153740         * lib/fchown-stub.c: New file.
153742 2004-06-24  Jim Meyering  <jim@meyering.net>
153744         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
153746 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
153748         * modules/argz: Omit "#include".
153750         * MODULES.html.sh (func_all_modules): Add calloc, to match
153751         2004-06-01 addition of calloc module.
153753 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
153755         * m4/argz.m4: New file, which is autoupdated from libtool.
153757 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
153759         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
153760         libtool.
153762 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
153764         * config/srclist-update: Don't insist on "USA." before the
153765         close-comment, as libtool omits the period and puts the */ on a
153766         separate line.
153767         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
153768         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
153770 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
153772         * modules/argz: New file.
153773         * MODULES.html.sh (func_all_modules): Add argz.
153775 2004-06-12  Jim Meyering  <jim@meyering.net>
153776         and  Paul Eggert  <eggert@cs.ucla.edu>
153778         * modules/hash (Files): Add lib/xalloc.h.
153779         * modules/pipe (Depends-on): Add wait-process.
153780         * modules/stat (Depends-on): Add xalloc.
153781         * modules/userspec (Files): Add lib/userspec.h.
153782         * modules/xstrtol (Depends-on): Add error.
153784 2004-06-10  Jim Meyering  <jim@meyering.net>
153786         * lib/calloc.c: New file.
153788 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
153790         * lib/getdate.y (yylex): Allow space between sign and number.
153791         Problem reported by Dan Jacobson.
153793 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
153795         Merge from coreutils CVS.
153797         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
153798         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
153799         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
153800         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
153801         xstrtol.m4: Fix copyright date and/or serial number.
153803         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
153804         See if we need an fchown replacement.
153805         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
153806         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
153807         and use the replacement function if we detect either defect.
153809         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
153810         gl_UTIMECMP.
153812 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
153813         and  Jim Meyering  <jim@meyering.net>
153815         Merge from coreutils CVS.
153817         * lib/stat-macros.h: New file, with contents from file-type.h
153818         and coreutils' system.h.
153819         * lib/file-type.c: Include "stat-macros.h".
153820         * lib/file-type.h (file_type): Move all macro definitions to new file,
153821         stat-macros.h.
153822         * modules/file-type: Add lib/stat-macros.h.
153824         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
153825         Wrap old code with this conditional.
153826         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
153827         function that does not dereference symlinks.
153828         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
153830         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
153831         dependency problems.
153832         (xreadlink): Accept new arg SIZE, for efficiency.
153833         All decls and uses changed.
153834         * lib/xreadlink.h: Include <stddef.h>, for size_t.
153836         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
153837         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
153839         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
153840         sysexits.h.
153842 2004-06-01  Jim Meyering  <jim@meyering.net>
153844         * m4/calloc.m4: New file.
153845         * modules/calloc: New file.
153847 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
153849         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
153850         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
153851         Also, fix a typo in a diagnostic.
153853 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
153855         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
153856         or AC_FUNC_REALLOC.
153858 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
153860         * modules/hash (Depends-on): Remove malloc, realloc.
153861         * modules/xalloc (Depends-on): Likewise.
153863         * README: Mention that the 'free' module works around the
153864         problem with 'free (0)'.
153865         Mention LIA-1 and C99.
153866         Add a copyright notice.
153868         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
153869         macros to be defined.
153870         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
153871         the allocator returns NULL because the requested size is zero.
153873 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
153875         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
153876         var.  Add comment explaining why libc still defines it.  This
153877         merges the following patch from glibc:
153878         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
153880 2004-05-20  Andreas Schwab  <schwab@suse.de>
153882         * m4/free.m4: Replace free if it not known to work, not the other
153883         way round.
153885 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
153887         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
153888         present in glibc since revision 1.1 of this file.
153889         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
153890         obstack_alignment_mask, obstack_alloc, obstack_base,
153891         obstack_blank, obstack_blank_fast, obstack_chunk_size,
153892         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
153893         obstack_grow0, obstack_init, obstack_int_grow,
153894         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
153895         obstack_next_free, obstack_object_size, obstack_ptr_grow,
153896         obstack_ptr_grow_fast, obstack_room): Remove declarations of
153897         nonexistent functions.
153899 2004-05-18  Karl Berry  <karl@gnu.org>
153901         * config/srclist.txt: break link for vasnprintf.c.
153903 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
153905         Port obstack to the AS/400, where pointers are 16 bytes wide and
153906         you cannot cast an integer to a valid pointer.  This patch is
153907         currently waiting to be integrated into glibc; see
153908         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
153910         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
153911         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
153912         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
153913         (struct obstack): temp member is now a union of a pointer and
153914         an integer, instead of an integer.  All integer uses changed.
153915         This does not affect the physical layout of struct obstack,
153916         except on hosts (like the AS/400) where the size or alignment of
153917         void * is greater than that of ptrdiff_t.
153918         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
153919         __STDC__)]: Store temporary in pointer member of union, not
153920         integer member.
153921         * lib/obstack.c: Include <stddef.h>, for offsetof.
153922         (struct fooalign): Remove; it doesn't need a name.
153923         (union fooround): Change double to long double, and add void *.
153924         (DEFAULT_ALIGNMENT): Use offsetof to compute.
153925         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
153926         not a macro.  Hence the values are always int; so remove all
153927         casts-to-int in uses.
153929 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
153931         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
153932         we can get this patch merged into glibc.
153934 2004-05-17  Derek R. Price  <derek@ximbiot.com>
153935             Paul Eggert  <eggert@cs.ucla.edu>
153937         * m4/argp: Depend on alloca.
153939 2004-05-17  Derek R. Price  <derek@ximbiot.com>
153940             Paul Eggert  <eggert@cs.ucla.edu>
153942         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
153943         freecoding.
153945 2004-05-17  Bruno Haible  <bruno@clisp.org>
153947         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
153948         precision that consists of a '.' followed by an empty digit string.
153949         Patch by Tor Lillqvist <tml@iki.fi>.
153951 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
153953         * modules/getdate: Depend on alloca.
153954         * modules/setenv: Likewise.
153956 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
153958         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
153959         for backward compatibility with older code.  We need our own
153960         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
153961         it under some other name, and our alloca.h will define it.
153963 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
153964             Derek Price  <derek@ximbiot.com>
153966         * lib/alloca.c: Include <alloca.h>, to get our interface.
153967         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
153968         include <alloca.h> first.  Use C89 prototype for alloca; this
153969         requires including <stddef.h> for size_t.  Use extern "C" if C++.
153970         Use #elif for simplicity, since we can assume C89 now.
153971         Don't try to source the system alloca.h since it will not be found
153972         and to prevent recursively including its replacement.
153973         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
153974         * lib/regex.c: Likewise.
153976 2004-05-16  Derek Price  <derek@ximbiot.com>
153977             Paul Eggert  <eggert@cs.ucla.edu>
153979         getline cleanup.  This changes the getndelim2 API: both order of
153980         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
153981         no delimiter).
153983         * lib/getline.c: Don't include stddef.h or stdio.h, since our
153984         interface does that.
153985         (getline): Always use getdelim, so that we don't have two
153986         copies of this code.
153987         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
153988         if available.
153989         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
153990         (GETNDELIM2_MAXIMUM): New macro.
153991         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
153992         instead of the old practice of delim2==0.  All callers changed.
153993         Return -1 on overflow, instead of returning junk.
153994         Do not set *linesize unless allocation succeeds.
153995         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
153996         that we include sys/types.h.
153997         * lib/getnline.h: Likewise.
153998         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
153999         (getndelim2): Reorder arguments.
154000         * lib/getnline.c (getnline, getndelim):
154001         Don't discard the NMAX argument.
154002         (getnline): Invoke getndelim, to avoid code duplication.
154003         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
154004         of (size_t) -1 by callers of the getnline family.
154006 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
154008         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
154009         Check for gettimeofday.
154010         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
154011         Check for settimeofday, stime.
154013 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
154015         * lib/nanosleep.c (suspended): Change its type from int to
154016         sig_atomic_t volatile.
154017         (first_call): Make it private to rpl_nanosleep, and have it
154018         be zero initially as that's a bit faster.
154019         (my_usleep): Round up fractional times instead of truncating them,
154020         as this is the usual meaning for 'sleep'.
154022         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
154023         doesn't work.
154024         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
154025         (ENOSYS): Define if not defined.
154026         (settime): Fall back on stime if it exists and settimeofday fails.
154027         But don't bother with fallbacks if a method fails with errno == EPERM.
154029 2004-05-11  Jim Meyering  <jim@meyering.net>
154031         Prior to this change, the save_cwd caller required read access to the
154032         current directory on most systems (ones with the fchdir function).
154034         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
154035         fails, try write-only, and finally, resort to using xgetcwd.
154037 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
154039         * lib/obstack.c, obstack.h: Import changes from libc.
154041 2004-05-04  Derek Price  <derek@ximbiot.com>
154043         * modules/argp: Remove dependency on alloca.
154045 2004-04-28  Bruno Haible  <bruno@clisp.org>
154047         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
154048         also implicitly appends .exe to executables.
154049         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
154050         accepts Windows pathnames.
154051         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
154052         Treat Cygwin like Windows, since it now accepts Windows pathnames.
154053         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
154054         Treat Cygwin like Windows, since it now accepts Windows pathnames.
154055         Reported by Derek Robert Price <derek@ximbiot.com>.
154057 2004-04-27  Derek Price  <derek@ximbiot.com>
154059         * m4/dos.m4 (gl_AC_DOS): Add Cygwin to list of Windows/DOS
154060         environments that accept backslashes and drive letters in paths.
154062 2004-04-21  Karl Berry  <karl@gnu.org>
154064         * config/srclist.txt (localcharset.c): break sync.
154066 2004-04-20  Paul Eggert  <eggert@twinsun.com>
154068         * m4/host-os.m4: Add a copyright notice.
154070 2004-04-20  Jim Meyering  <jim@meyering.net>
154072         * modules/dirfd: Change UTILS_ macro name prefix to gl_.
154073         * modules/mkstemp: Likewise.
154074         * modules/mkdir: Likewise.
154076         Change UTILS_ to gl_ in AC_DEFINE'd names.
154077         Change utils_- and jm_-prefixed variables, too.
154078         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
154079         UTILS_FUNC_MKDIR_TRAILING_SLASH.
154080         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
154082         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
154083         Don't emit trailing blanks.
154084         Also rename jm_-prefixed variables to have gl_ prefix.
154086         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
154087         Also rename jm_-prefixed variables to have gl_ prefix.
154089         * m4/jm-macros.m4: Reflect the renamings.
154090         * m4/prereq.m4: Likewise.
154092 2004-04-20  Jim Meyering  <jim@meyering.net>
154094         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
154095         memory.
154097 2004-04-20  Jim Meyering  <jim@meyering.net>
154098             Bruno Haible  <bruno@clisp.org>
154100         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
154101         memory when realloc fails.
154103 2004-04-19  Jim Meyering  <jim@meyering.net>
154105         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
154106         now that readutmp.c may call `free (0)'.
154108 2004-04-19  Bruno Haible  <bruno@clisp.org>
154110         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
154111         * m4/inttypes_h.m4: Likewise.
154112         * m4/stdint_h.m4: Likewise.
154113         * m4/intmax_t.m4: Likewise.
154114         * m4/uintmax_t.m4: Likewise.
154116 2004-04-18  Jim Meyering  <jim@meyering.net>
154118         * m4/prereq.m4: Don't forbid jm_ prefix.
154120         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
154121         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
154122         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
154123         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
154124         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
154125         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
154126         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
154127         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
154128         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
154129         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
154130         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
154131         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
154132         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
154133         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
154134         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
154135         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
154136         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
154137         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
154138         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
154140 2004-04-18  Jim Meyering  <jim@meyering.net>
154142         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
154143         failure, don't leak memory and do call END_UTMP_ENT.
154145 2004-04-18  Jim Meyering  <jim@meyering.net>
154147         Change jm_ to gl_ in AC_DEFINE'd names.
154148         * modules/assert, modules/chown, modules/fpending:
154149         * modules/ftruncate, modules/getgroups, modules/group-member:
154150         * modules/lchown, modules/lstat, modules/memcmp:
154151         * modules/nanosleep, modules/putenv, modules/stat:
154152         * modules/strftime, modules/unlocked-io, modules/utime:
154153         * modules/xstrtoimax, modules/xstrtoumax:
154155 2004-04-16  Jim Meyering  <jim@meyering.net>
154157         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
154158         coreutils' stat program.
154159         (gl_PREREQ): Don't require jm_PREREQ_STAT.
154161 2004-04-12  Paul Eggert  <eggert@twinsun.com>
154163         * config/srclist.txt: Restore setenv.c, unsetenv.c from gettext.
154164         Add intmax.m4, printf-posix.m4, sig_atomic_t.m4,
154165         signalblocking.m4, ssize_t.m4.
154166         * lib/unsetenv.c: Regenerate: this subtracts 1 from the
154167         copyright year (!).
154168         * m4/printf-posix.m4: Regenerate.
154170         * modules/inttostr (EXTRA_DIST): Move inttostr.c here....
154171         (lib_SOURCES): from here.
154172         * modules/getopt (lib_SOURCES): Add getopt_int.h.
154174 2004-04-12  Jim Meyering  <jim@meyering.net>
154176         * MODULES.html.sh (func_all_modules): Add cloexec, inttostr, free,
154177         tzset.
154179 2004-04-11  Paul Eggert  <eggert@twinsun.com>
154181         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
154182         C89.
154183         (CHAR_BIT): Remove, since we assume C89.
154184         Include <stdint.h> if available, as per current Autoconf CVS advice.
154186 2004-03-31  Jim Meyering  <jim@meyering.net>
154188         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
154189         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
154190         * m4/xalloc.m4: Likewise.
154192 2004-03-30  Paul Eggert  <eggert@twinsun.com>
154194         Merge from coreutils.
154196         * m4/inttostr.m4: New file.
154197         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
154198         Require AM_STDBOOL_H and gl_TIMESPEC instead.
154199         Require gl_CLOCK_TIME.
154200         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
154202 2004-03-30  Paul Eggert  <eggert@twinsun.com>
154204         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
154205         not bool, to be more consistent with Unix conventions.
154206         Suggested by Bruno Haible.
154208         Merge from coreutils.
154210         * modules/inttostr: New file.
154211         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
154212         * lib/umaxtostr.c: New files.
154214         * modules/getdate: Depend on timespec, stdbool, gettime.
154215         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
154216         the usual <time.h> dance.
154217         (get_date): Change signature to support fractional time stamps.
154218         All callers changed.
154219         * lib/getdate.y: Include "getdate.h" first, as we can now
154220         assume C89 and don't need to worry about 'const'.
154221         Similarly, include "unlocked-io.h" near start, not in middle.
154222         Include <limits.h>.
154223         (textint.value): Use long int rather than int.
154224         (textint.digits): Use size_t rather than int.
154225         (BILLION, LOG10_BILLION): New constants.
154226         (parser_control): New member rel_ns.  Members day_ordinal,
154227         time_zone, month, day, hour, minutes, rel_year, rel_month,
154228         rel_day, rel_hour, rel_minutes, rel_seconds
154229         are now long int, not int.  Member seconds is now struct timespec,
154230         not int.  New member timespec_seen.  Members dates_seen, days_seen,
154231         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
154232         not int.
154233         (%union.intval): Now long int, not int.
154234         New member timespec.
154235         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
154236         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
154237         (spec): Now is a timespec or an item list.
154238         (timespec, items): New nonterminals.
154239         (time, rel, relunit, number, get_date):
154240         Add support for fractional seconds.
154241         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
154242         (gmtime, localtime, mktime): Remove decls; not needed with C89.
154243         (to_hour): First arg is now long int, not int.
154244         (to_year): Returns long int, not int.
154245         Don't treat year -70 like 70.
154246         (tm_diff): Returns long int, not int.
154247         (lookup_word): Use bool instead of int when appropriate.
154248         (yylex): Use size_t for count, not int.
154249         Detect overflow when parsing large integer constants.
154250         Add support for fractions.
154251         (get_date): Make pointers 'const' if possible.
154252         Use more-portable code to detect integer overflow.
154253         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
154254         Don't use ctime; it's not reliable if the year has >4 digits.
154256         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
154257         This is for compatibility with BSD.
154259         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
154260         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
154261         From coreutils' system.h.
154263         * lib/userspec.c: Don't include "posixver.h".
154264         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
154265         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
154266         compatible extension.  Simplify code by removing a boolean int
154267         that was always nonzero if a string was nonnull.
154269 2004-03-30  Jim Meyering  <jim@meyering.net>
154271         Merge from coreutils.
154273         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
154274         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
154275         on some systems one must include <grp.h> before it.
154276         Reported by Christian Krackowizer.
154278 2004-03-30  Jim Meyering  <jim@meyering.net>
154280         Merge from coreutils.
154282         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
154284         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
154285         an empty input stream.
154287         * lib/readtokens.c: Include <stdbool.h>.
154288         (readtoken): Use `size_t' rather than int/long.
154289         All callers adjusted.
154290         Use `bool' rather than `int' where appropriate.
154291         Use memset rather than an explicit loop.
154292         Use x2nrealloc rather than xrealloc.
154293         Allow the use of `\0' as a delimiter.
154294         (readtokens): Likewise.
154295         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
154297 2004-03-30  Jim Meyering  <jim@meyering.net>
154299         * modules/realloc (Files): Remove m4/realloc.m4.
154300         (configure.ac): Depend on AC_FUNC_REALLOC, rather than jm_FUNC_REALLOC.
154301         * modules/malloc (Files): Remove m4/malloc.m4.
154302         (configure.ac): Depend on AC_FUNC_MALLOC, rather than jm_FUNC_MALLOC.
154303         * m4/realloc.m4: Remove file, since now it does no more than
154304         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
154305         the `configure.ac' section of module/realloc.
154306         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
154308 2004-03-30  Bruno Haible  <bruno@clisp.org>
154310         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
154311         nonnull.
154313 2004-03-29  Paul Eggert  <eggert@twinsun.com>
154315         Merge changes to getloadavg.c from coreutils and Emacs.
154317         * modules/getloadvg: Depend on cloexec and xalloc.
154318         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
154319         Define to an expression, not to the empty string.
154320         Include cloexec.h and xalloc.h.
154321         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
154322         Use set_cloexec_flag rather than rolling our own.
154323         * lib/cloexec.c, lib/cloexec.h: New files.
154325 2004-03-29  Paul Eggert  <eggert@twinsun.com>
154327         * m4/cloexec.m4: New file.
154329 2004-03-18  Paul Eggert  <eggert@twinsun.com>
154331         * lib/getopt.h: Sync with libc CVS.
154333 2004-03-18  Paul Eggert  <eggert@twinsun.com>
154334             Bruno Haible  <bruno@clisp.org>
154336         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
154337         mbswidth.
154339 2004-03-18  Paul Eggert  <eggert@twinsun.com>
154340             Bruno Haible  <bruno@clisp.org>
154342         * lib/mbswidth.h: Include <wchar.h> only if
154343         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
154344         <wchar.h>.
154345         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
154347 2004-03-09  Paul Eggert  <eggert@twinsun.com>
154349         * modules/getopt: Add lib/getopt_int.h.
154350         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
154351         Sync with libc CVS.
154352         * lib/getopt_int.h: New file, also synced from libc.
154354 2004-03-09  Paul Eggert  <eggert@twinsun.com>
154356         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
154357         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
154358         Bring back getopt.c, getopt.h, getopt1.c.
154360 2004-03-07  Paul Eggert  <eggert@twinsun.com>
154362         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
154363         All uses changed.  Check for sa_sigaction member; this fixes
154364         a bug first reported by Jason Andrade in
154365         <http://mail.gnu.org/r/bug-textutils/2003-03/msg00027.html>.
154367 2004-03-07  Paul Eggert  <eggert@twinsun.com>
154369         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
154370         '#if' expressions.  Unlike the code it replaces, it does not
154371         depend on (defined _SC_PAGESIZE).  However, it does depend on
154372         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
154373         first reported by Jason Andrade in
154374         <http://mail.gnu.org/r/bug-textutils/2003-03/msg00027.html>.
154376 2004-02-25  Simon Josefsson  <jas@extundo.com>
154378         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
154380 2004-02-25  Simon Josefsson  <jas@extundo.com>
154382         * lib/strdup.h: New file.
154383         * lib/strdup.c: Include it.
154384         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
154385         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
154387 2004-02-23  Karl Berry  <karl@gnu.org>
154389         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
154390         (from fencepost.gnu.org:/gd/gnuorg).
154392 2004-02-23  Karl Berry  <karl@gnu.org>
154394         * config/srclistvars.sh (GNUORG) [karl]: redefine.
154395         * config/srclist.txt: add maintain/standards documents.
154397 2004-02-22  Bruno Haible  <bruno@clisp.org>
154399         * modules/xalloc: Remove dependency on stdbool.
154400         Reported by Derek Robert Price <derek@ximbiot.com>.
154402 2004-02-18  Bruno Haible  <bruno@clisp.org>
154404         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
154405         Reported by Derek Robert Price <derek@ximbiot.com>.
154407 2004-02-16  Karl Berry  <karl@gnu.org>
154409         * config/mkinstalldirs, install-sh: update from automake.
154411 2004-02-06  Karl Berry  <karl@gnu.org>
154413         * m4/po.m4: update from gettext 0.14.1.
154415 2004-02-06  Karl Berry  <karl@gnu.org>
154417         * lib/config.charset: update from gettext 0.14.1.
154419 2004-02-05  Paul Eggert  <eggert@twinsun.com>
154421         Add comments and code, prompted by suggestions from Bruno Haible
154422         for sh-quote.
154423         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
154424         describing the enum quoting_style values.
154425         * lib/quotearg.c (quotearg_alloc): New function.
154426         (quotearg_buffer_restyled): Treat lone { and } as special.
154427         Treat = as special.  Work around bug with older shells
154428         that "see" a '\' that is really the 2nd byte of a multibyte char.
154429         Quote empty string with shell_quoting_style.
154431 2004-02-03  Bruno Haible  <bruno@clisp.org>
154433         * modules/pipe: New file.
154434         * MODULES.html.sh (func_all_modules): Add pipe.
154435         * m4/pipe.m4: New file, from GNU gettext.
154437 2004-02-03  Bruno Haible  <bruno@clisp.org>
154439         * lib/pipe.h: New file, from GNU gettext.
154440         * lib/pipe.c: New file, from GNU gettext.
154442 2004-01-27  Bruno Haible  <bruno@clisp.org>
154444         * modules/execute: New file.
154445         * MODULES.html.sh (func_all_modules): Add execute.
154446         * m4/execute.m4: New file, from GNU gettext.
154448 2004-01-27  Bruno Haible  <bruno@clisp.org>
154450         * lib/execute.h: New file, from GNU gettext.
154451         * lib/execute.c: New file, from GNU gettext.
154452         * lib/w32spawn.h: New file, from GNU gettext.
154454 2004-01-24  Paul Eggert  <eggert@twinsun.com>
154456         Merge from diffutils.
154458         * lib/file-type.c (file_type): Add typed memory objects.
154459         * lib/file-type.h (S_TYPEISTMO): New macro.
154461         * lib/c-stack.h (c_stack_action): Remove argv argument.
154462         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
154463         (die): Don't calculate message unless segv_action returns.
154464         (get_stack_location, min_address_from_argv, max_address_from_argv,
154465         volatile stack_base, volatile_stack_size): Remove.
154466         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
154467         that every segmentation violation is a stack overflow.  (Ouch!)
154468         See Debian bug 136249 (still outstanding) for more info about why
154469         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
154471 2004-01-24  Paul Eggert  <eggert@twinsun.com>
154473         Exit-status fix from coreutils.
154475         Use exit_failure consistently in place of EXIT_FAILURE,
154476         so that program exit statuses are consistent on failure.
154478         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
154479         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
154480         * lib/argmatch.h: Comment fix to match the above.
154481         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
154482         Now a macro referring to exit_failure, instead of a separate
154483         variable.  Include "exitfail.h" to get it.
154484         * lib/xstrtol.h: Include "exitfail.h".
154485         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
154487         * lib/long-options.c (parse_long_options): Use prototype
154488         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
154489         for clarity.
154491 2004-01-23  Paul Eggert  <eggert@twinsun.com>
154493         * modules/argmatch, modules/obstack, modules/xstrtol:
154494         Depend on exitfail.
154496 2004-01-21  Jim Meyering  <jim@meyering.net>
154498         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
154499         so as not to conflict with a different-sized __mktime_internal
154500         function in GNU libc.
154501         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
154502         Problem building statically-linked `ls' reported by Michael Brunnbauer.
154504 2004-01-20  Karl Berry  <karl@gnu.org>
154506         * config/config.guess: update from config.
154508         * config/srclistvars.sh: GNUWWWLICENSES for karl.
154510 2004-01-20  Bruno Haible  <bruno@clisp.org>
154512         Safer stack allocation.
154513         * modules/setenv: Depend on allocsa instead of alloca.
154514         * lib/setenv.c: Include allocsa.h.
154515         (alloca): Remove fallback definition.
154516         (freea): Remove macro.
154517         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
154518         instead of freea.
154520 2004-01-20  Bruno Haible  <bruno@clisp.org>
154522         * m4/eealloc.m4: New file, from GNU gettext.
154524 2004-01-20  Bruno Haible  <bruno@clisp.org>
154526         * m4/allocsa.m4: New file, from GNU gettext.
154528 2004-01-20  Bruno Haible  <bruno@clisp.org>
154530         * modules/xallocsa: New file.
154531         * MODULES.html.sh (func_all_modules): Add xallocsa.
154532         * lib/xallocsa.h: New file, from GNU gettext.
154533         * lib/xallocsa.c: New file, from GNU gettext.
154535 2004-01-20  Bruno Haible  <bruno@clisp.org>
154537         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
154539 2004-01-20  Bruno Haible  <bruno@clisp.org>
154541         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
154542         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
154543         specially.
154545 2004-01-20  Bruno Haible  <bruno@clisp.org>
154547         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
154548         patch.
154550 2004-01-20  Bruno Haible  <bruno@clisp.org>
154552         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
154554 2004-01-20  Bruno Haible  <bruno@clisp.org>
154556         * modules/eealloc: New file.
154557         * MODULES.html.sh (func_all_modules): Add eealloc.
154558         * lib/eealloc.h: New file.
154560 2004-01-20  Bruno Haible  <bruno@clisp.org>
154562         * lib/binary-io.h: Avoid warnings on Cygwin.
154564 2004-01-20  Bruno Haible  <bruno@clisp.org>
154566         * modules/allocsa: New file.
154567         * MODULES.html.sh (func_all_modules): Add allocsa.
154568         * lib/allocsa.h: New file, from GNU gettext.
154569         * lib/allocsa.c: New file, from GNU gettext.
154571 2004-01-18  Karl Berry  <karl@gnu.org>
154573         * doc/gpl.texi, doc/lgpl.texi: new files.
154575 2004-01-18  Karl Berry  <karl@gnu.org>
154577         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
154578         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
154580 2004-01-18  Simon Josefsson  <jas@extundo.com>
154582         * modules/strdup (Files, Makefile.am): Add strdup.h.
154584 2004-01-15  Paul Eggert  <eggert@twinsun.com>
154586         * modules/poll: Add BUILT_SOURCES.
154587         Prefer "$@" to "poll.h" in rule for building poll.h.
154588         All this is for consistency with alloca and fnmatch.
154590         * modules/same: Depend on stdbool.
154592 2004-01-15  Paul Eggert  <eggert@twinsun.com>
154594         Merge from coreutils.
154596         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
154597         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
154598         (gl_DEFAULT_POSIX2_VERSION): Move
154599         the documentation from 'configure' into 'config.hin',
154600         so that 'configure --help' isn't burdened by it and
154601         we don't have to worry about its formatting there.
154602         Reword the documentation so that it's more succinct
154603         and can be run together into a single paragraph.
154604         * m4/same.m4 (gl_SAME): Check for pathconf.
154606 2004-01-15  Paul Eggert  <eggert@twinsun.com>
154608         Merge from coreutils.
154610         * lib/posixver.c: Include posixver.h.
154612         * lib/same.c: Include <stdbool.h>, <limits.h>.
154613         (_POSIX_NAME_MAX): Define if not defined.
154614         (MIN): New macro.
154615         (same_name): If file names are silently truncated, report
154616         that the file names are the same if they are the same after
154617         the silent truncation.
154619         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
154620         conversion function.
154621         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
154622         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
154623         longer needed.
154625 2004-01-15  Jim Meyering  <jim@meyering.net>
154627         Merge from coreutils.
154629         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
154630         if no library is required.
154631         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
154632         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
154633         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
154634         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
154635         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
154636         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
154637         value, $ac_cv_search_crypt, if it's "none required".
154638         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
154639         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
154640         not gl_FUNC_GETLOADAVG.
154641         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
154642         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
154644 2004-01-15  Jim Meyering  <jim@meyering.net>
154646         Merge from coreutils.
154648         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
154649         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
154650         http://mail.gnu.org/r/bug-coreutils/2003-11/msg00144.html
154652         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
154653         optional configure-time default.
154655         * lib/version-etc.c (version_etc_copyright): Update copyright date.
154657         * lib/xreadlink.c (xreadlink): Correct outdated comment.
154659 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
154661         Merge from coreutils.
154663         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
154664         value, $ac_cv_search_nanosleep, if it's "none required".
154666 2004-01-14  Paul Eggert  <eggert@twinsun.com>
154668         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
154669         with like-named macro in fnmatch.c.
154670         (EXT): Use an internal constant instead.
154672         Merge fnmatch patches from glibc.
154673         * lib/fnmatch.c (mbsinit): Remove define.
154674         Add libc_hidden_ver (__fnmatch, fnmatch).
154675         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
154676         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
154678 2004-01-14  Karl Berry  <karl@gnu.org>
154680         * config/install-sh: update from automake.
154682 2004-01-13  Karl Berry  <karl@gnu.org>
154684         * config/install-sh: update from automake.
154686 2004-01-09  Karl Berry  <karl@gnu.org>
154688         * config/install-sh: update from automake.
154690 2004-01-05  Karl Berry  <karl@gnu.org>
154692         * config/config.{sub,guess}: update from config.
154694 2003-12-31  Karl Berry  <karl@gnu.org>
154696         * config/depcomp: update from automake.
154698 2003-12-14  Karl Berry  <karl@gnu.org>
154700         * lib/config.charset: update from gettext-runtime.
154702 2003-12-03  Paul Eggert  <eggert@twinsun.com>
154704         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
154705         Bug reported by Alfred M. Szmidt.
154707 2003-12-03  Bruno Haible  <bruno@clisp.org>
154709         Upgrade from gettext-0.13.
154710         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
154711         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
154712         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
154713         * m4/gettext.m4: Upgrade from gettext-0.13.
154714         * m4/po.m4: Upgrade from gettext-0.13.
154715         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
154716         * m4/intmax.m4: New file, from gettext-0.13.
154717         * m4/printf-posix.m4: New file, from gettext-0.13.
154719 2003-11-29  Karl Berry  <karl@gnu.org>
154721         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
154723 2003-11-25  Paul Eggert  <eggert@twinsun.com>
154724             Bruno Haible  <bruno@clisp.org>
154726         * lib/printf-parse.h: Don't include sys/types.h.
154727         (ARG_NONE): New macro.
154728         (char_directive): Change type of *arg_index fields to size_t.
154729         * lib/printf-parse.c: Don't include sys/types.h.
154730         (SSIZE_MAX): Remove macro.
154731         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
154732         Remove unnecessary overflow check.
154733         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
154734         fields.
154736 2003-11-25  Bruno Haible  <bruno@clisp.org>
154738         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
154740 2003-11-25  Bruno Haible  <bruno@clisp.org>
154742         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
154743         gt_TYPE_SSIZE_T.
154745 2003-11-24  Paul Eggert  <eggert@twinsun.com>
154747         * modules/alloca: Remove dependency on xalloc.
154749 2003-11-24  Paul Eggert  <eggert@twinsun.com>
154751         * lib/alloca.c: Remove dependency on xalloc module.
154752         (xalloc_die): Remove.
154753         (memory_full) [!defined emacs]: New macro.
154754         [!defined emacs]: Don't include xalloc.h.
154755         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
154756         address arithmetic overflows.  Change datatypes a bit to avoid
154757         unnecessary casts.
154759 2003-11-22  Jim Meyering  <jim@meyering.net>
154761         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
154762         s/size/size_t/.
154764 2003-11-21  Karl Berry  <karl@gnu.org>
154766         * config/config.{sub,guess}: update from config.
154768 2003-11-18  Karl Berry  <karl@gnu.org>
154770         * config/config.{sub,guess}: update from config.
154772         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
154774 2003-11-17  Paul Eggert  <eggert@twinsun.com>
154776         * README: Mention that S+T cannot overflow if S is the size of
154777         an existing object and T is sufficiently small.
154779 2003-11-17  Jim Meyering  <jim@meyering.net>
154781         On systems without utime and without a utimes function capable of
154782         dealing with a NULL struct utimbuf* argument, this utime replacement
154783         could -- in unusual circumstances -- leak a file descriptor.
154784         * lib/utime.c: Include <unistd.h> and <errno.h>.
154785         (utime_null): Be sure to close `fd' and to preserve errno.
154786         Reported by Geoff Collyer via Arnold Robbins.
154788 2003-11-17  Bruno Haible  <bruno@clisp.org>
154790         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
154791         (Depends-on): Add xsize.
154793 2003-11-17  Bruno Haible  <bruno@clisp.org>
154795         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
154797 2003-11-17  Bruno Haible  <bruno@clisp.org>
154799         * lib/vasnprintf.c (alloca): Remove fallback definition.
154800         (freea): Remove definition.
154801         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
154802         Reported by Paul Eggert.
154804 2003-11-16  Paul Eggert  <eggert@twinsun.com>
154805             Bruno Haible  <bruno@clisp.org>
154807         Protect against address arithmetic overflow.
154808         * lib/printf-args.h: Include stddef.h.
154809         (arguments): Change type of field 'count' to size_t.
154810         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
154811         'unsigned int' where appropriate.
154812         * lib/printf-parse.h: Include sys/types.h.
154813         (char_directive): Change type of *arg_index fields to ssize_t.
154814         (char_directives): Change type of fields 'count', max_*_length to
154815         size_t.
154816         * lib/printf-parse.c: Include sys/types.h and xsize.h.
154817         (SSIZE_MAX): Define fallback value.
154818         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
154819         instead of 'int' where appropriate. Check a_allocated, d_allocated
154820         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
154821         * lib/vasnprintf.c: Include xsize.h.
154822         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
154823         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
154824         overflow. Avoid wraparound when converting a width or precision from
154825         decimal to binary.
154827 2003-11-16  Bruno Haible  <bruno@clisp.org>
154829         Update from GNU gettext.
154830         * lib/printf-parse.c: Generalize to it can be compiled for wide
154831         strings.
154832         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
154833         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
154834         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
154835         SNPRINTF): New macros.
154836         Don't include <alloca.h> if the file is used inside libintl.
154837         (local_wcslen): New function, for Solaris 2.5.1.
154838         (VASNPRINTF): Use it instead of wcslen.
154840 2003-11-16  Bruno Haible  <bruno@clisp.org>
154842         * lib/xsize.h (xmax): New function.
154843         (xsum, xsum3, xsum4): Declare as "pure" functions.
154845 2003-11-12  Paul Eggert  <eggert@twinsun.com>
154847         * modules/xalloc (Files): Undo latest change, since xalloc.h
154848         no longer needs SIZE_MAX or PTRDIFF_MAX.
154850 2003-11-12  Paul Eggert  <eggert@twinsun.com>
154852         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
154853         gl_PTRDIFF_MAX.
154855 2003-11-12  Paul Eggert  <eggert@twinsun.com>
154857         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
154858         "return", to pacify some unknown compiler.  Problem reported
154859         by Joerg Schilling.
154861 2003-11-12  Paul Eggert  <eggert@twinsun.com>
154863         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
154864         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
154865         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
154866         heuristic is just as accurate as far as we know, and it removes a
154867         dependency on size_max.m4 and ptrdiff_max.m4.
154869 2003-11-11  Bruno Haible  <bruno@clisp.org>
154871         * modules/xsize (Files): Add m4/size_max.m4.
154872         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
154874 2003-11-11  Bruno Haible  <bruno@clisp.org>
154876         * m4/size_max.m4: New file.
154877         * m4/ptrdiff_max.m4: New file.
154878         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
154879         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
154880         (gl_XALLOC): Invoke it.
154882 2003-11-11  Bruno Haible  <bruno@clisp.org>
154884         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
154885         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
154886         defined.
154888 2003-11-10  Paul Eggert  <eggert@twinsun.com>
154890         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
154891         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
154892         rejected some allocations of exactly SIZE_MAX - 2 bytes.
154893         From Bruno Haible.
154894         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
154895         not (size_t) -1, since it's defined here.
154897 2003-11-09  Karl Berry  <karl@gnu.org>
154899         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
154901 2003-11-06  Paul Eggert  <eggert@twinsun.com>
154903         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
154904         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
154905         Reject sizes of exactly SIZE_MAX bytes.
154906         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
154907         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
154909 2003-11-05  Bruno Haible  <bruno@clisp.org>
154911         * lib/xsize.h: Include limits.h, to avoid a possible collision with
154912         SIZE_MAX defined in <limits.h> on Solaris.
154914 2003-11-04  Jim Meyering  <jim@meyering.net>
154916         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
154917         variable names, rather than @VAR@.
154918         * modules/poll: Likewise.
154920 2003-11-04  Bruno Haible  <bruno@clisp.org>
154922         * modules/xsize: New file.
154923         * modules/linebreak: Depend on xsize.
154924         * MODULES.html.sh (func_all_modules): Add xsize.
154926 2003-11-04  Bruno Haible  <bruno@clisp.org>
154928         * m4/xsize.m4: New file.
154930 2003-11-04  Bruno Haible  <bruno@clisp.org>
154932         * lib/xsize.h: New file.
154933         * lib/linebreak.c: Include xsize.h.
154934         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
154935         argument for overflow.
154936         Suggested by Paul Eggert.
154938 2003-11-03  Karl Berry  <karl@gnu.org>
154940         * config/config.{guess,sub}: update from config.
154942 2003-11-03  Jim Meyering  <jim@meyering.net>
154944         * modules/userspec (lib_SOURCES): Add userspec.h.
154945         (Include): Add "userspec.h".
154946         Improve description.
154948 2003-11-03  Jim Meyering  <jim@meyering.net>
154950         * lib/userspec.c: Include "userspec.h".
154951         * lib/userspec.h: New file.
154953 2003-11-03  Bruno Haible  <bruno@clisp.org>
154955         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
154957 2003-11-03  Bruno Haible  <bruno@clisp.org>
154959         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
154960         available, to avoid (extremely rare) race condition.
154961         Suggested by Paul Eggert.
154963 2003-11-02  Karl Berry  <karl@gnu.org>
154965         * config/srclist.txt (vasprintf.c): sync broken, sigh.
154967 2003-10-31  Paul Eggert  <eggert@twinsun.com>
154969         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
154970         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
154971         (read_filesystem_list): Set and use me_type_malloced.
154972         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
154973         whatever the type happens to be), for brevity and consistency.
154974         Check for size calculation overflow on Alphas running OSF/1.
154976 2003-10-31  Jim Meyering  <jim@meyering.net>
154978         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
154980         * lib/linebuffer.c: Include <string.h> for declaration of memset.
154982 2003-10-30  Paul Eggert  <eggert@twinsun.com>
154983             Bruno Haible  <bruno@clisp.org>
154985         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
154986         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
154988 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
154990         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
154991         netbsd*-gnu*.  Suggested by Robert Millan.
154993 2003-10-29  Paul Eggert  <eggert@twinsun.com>
154995         * modules/group-member: Depend on stdbool.
154997 2003-10-29  Paul Eggert  <eggert@twinsun.com>
154999         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
155001 2003-10-29  Paul Eggert  <eggert@twinsun.com>
155003         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
155004         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
155005         after the 'gnu' in these cases.  This fixes some bugs in the
155006         previous change, and is based on suggestions by Robert Millan.
155008 2003-10-29  Paul Eggert  <eggert@twinsun.com>
155010         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
155011         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
155012         no longer needed.
155013         * lib/quotearg.c (quotearg_n_options): Use it.
155014         * lib/group-member.c: Include <stdbool.h>.
155015         (free_group_info): Arg is now const *; don't free arg.
155016         (get_group_info): Now returns bool and accepts struct group_info *,
155017         rather than returning a malloc'ed struct group_info *.
155018         All uses changed.  Check for overflow in internal size calculation.
155020         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
155021         rather than xmalloc/xrealloc.
155022         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
155023         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
155024         conformance bug: the old code used a pointer after freeing the
155025         storage that it addressed.
155026         * lib/hash.c (hash_initialize): Simplify the code by using
155027         xalloc_oversized rather than doing it by hand.
155028         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
155029         the buffer preserved.  Use free and xmalloc instead.
155030         * lib/quotearg.c (quotearg_n_options): Likewise.
155031         Use a simpler test for size overflow.  Don't use xalloc_oversized
155032         because unsigned int might be wider than size_t (!); this suggests
155033         that we should switch from unsigned int to size_t for slot numbers.
155035 2003-10-28  Paul Eggert  <eggert@twinsun.com>
155037         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
155038         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
155039         NetBSD kernels.  Requested by Richard Stallman.
155041 2003-10-27  Paul Eggert  <eggert@twinsun.com>
155043         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
155044         to allocate the returned structure.  Do not allocate a subarray,
155045         as x2nrealloc will do that.
155046         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
155047         instead of xnrealloc.
155048         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
155050 2003-10-27  Bruno Haible  <bruno@clisp.org>
155052         * lib/stdbool_.h: Better support for BeOS.
155054 2003-10-26  Paul Eggert  <eggert@twinsun.com>
155056         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
155057         now uses inline.
155059 2003-10-26  Paul Eggert  <eggert@twinsun.com>
155061         * lib/xalloc.h (xalloc_oversized): New static inline function, for
155062         callers that want to do their own size-overflow checking.  Include
155063         <stdbool.h>, since xalloc_oversized returns bool.
155064         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
155065         to use xalloc_oversized.
155067         Add two functions x2realloc, x2nrealloc, for programs that grow
155068         arrays dynamically by doubling their sizes.
155069         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
155070         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
155071         New functions.
155073         Port to C99 semantics for 'inline' of external functions.
155074         Bug reported by Bruno Haible.
155075         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
155076         with the old contents of xnmalloc.
155077         (xnmalloc, xmalloc): Use it.
155078         (xnrealloc_inline): New static inline function,
155079         with the old contents of xnrealloc.
155080         (xnrealloc, xrealloc): Use it.
155082         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
155083         that.
155085 2003-10-26  Karl Berry  <karl@gnu.org>
155087         * config/srclist.txt (COPYING.DOC): no longer available from
155088         /gd/gnuorg; don't know where the ultimate source is.
155090 2003-10-25  Paul Eggert  <eggert@twinsun.com>
155092         Fix several address-calculation bugs in the hash modules,
155093         plus some minor code cleanup.
155095         * lib/hash.h: Include <stdbool.h>, for bool.
155096         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
155097         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
155098         hash_get_n_entries, hash_get_max_bucket_length,
155099         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
155100         hash_rehash): Use size_t rather than unsigned.
155101         * lib/hash.c (struct hash_table, hash_get_n_buckets,
155102         hash_get_n_buckets_used, hash_get_n_entries,
155103         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
155104         hash_get_entries, hash_do_for_each, hash_string, is_prime,
155105         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
155106         Likewise.
155107         (SIZE_MAX): Define if not defined.
155108         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
155109         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
155110         hash_print):
155111         Use const * when possible.
155112         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
155113         (check_tuning): Fix bug: if tuning parameters were very close to
155114         0 or 1, rounding errors could have caused subscript violations.
155115         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
155116         (hash_initialize): Add 'fail:' label
155117         to free table and return NULL, and use it to simplify code.
155118         Use calloc rather than clearing the storage ourself.
155119         (hash_initialize, hash_rehash): Check for arithmetic overflow in
155120         buffer size calculations.
155121         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
155122         Include <stddef.h>, for size_t.
155123         * lib/hash-pjw.c (hash_pjw): Likewise.
155124         Switch to method described by Bruno Haible.
155125         Include <limits.h>, for CHAR_BIT.
155126         (SIZE_BITS): New macro.
155128 2003-10-23  Paul Eggert  <eggert@twinsun.com>
155130         * m4/getline.m4 (AM_FUNC_GETLINE):
155131         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
155132         hosts.  Problem reported by Derek Robert Price in
155133         <http://mail.gnu.org/r/bug-gnulib/2003-10/msg00092.html>.
155134         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
155135         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
155137 2003-10-21  Paul Eggert  <eggert@twinsun.com>
155139         * lib/getndelim2.c (getndelim2): When size calculation overflows,
155140         ceiling the allocation at NMAX bytes rather than silently
155141         discarding input bytes before NMAX is reached.  This makes
155142         a difference only if NMAX exceeds SIZE_MAX / 2.
155144         * lib/obstack.c: Merge from glibc.
155145         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
155146         Add libc_hidden_def (_obstack_newchunk).
155147         (_obstack_free) [! defined _LIBC]: Remove.
155148         [defined _LIBC]: Make a strong alias from obstack_free, rather than
155149         a clone of the function body.
155150         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
155151         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
155153         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
155154         glibc.
155155         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
155156         arg to memcpy.
155158         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
155159         (obstack_ptr_grow_fast, obstack_int_grow_fast):
155160         Don't use lvalue casts, as GCC plans to remove support for them
155161         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
155162         was also present in the non-GCC version, indicating that this
155163         code had always been buggy and had never been widely used.
155164         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
155165         Use the fast variant of each macro, rather than copying the
155166         definiens of the fast variant; that way, we'll be more likely to
155167         catch future bugs in the fast variants.
155169 2003-10-20  Bruno Haible  <bruno@clisp.org>
155171         * modules/wait-process: New file.
155172         * MODULES.html.sh (func_all_modules): Add wait-process.
155174 2003-10-20  Bruno Haible  <bruno@clisp.org>
155176         * m4/wait-process.m4: New file.
155178 2003-10-20  Bruno Haible  <bruno@clisp.org>
155180         * lib/wait-process.h: New file, from GNU gettext.
155181         * lib/wait-process.c: New file, from GNU gettext.
155183 2003-10-19  Jim Meyering  <jim@meyering.net>
155185         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
155186         HPUX 10.20.
155188 2003-10-18  Karl Berry  <karl@gnu.org>
155190         * config/config.guess: update from config.
155192 2003-10-16  Paul Eggert  <eggert@twinsun.com>
155194         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
155195         (getgroups): First arg is int, not size_t.
155196         Don't let 'free' mangle errno.
155198 2003-10-16  Paul Eggert  <eggert@twinsun.com>
155200         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
155202 2003-10-16  Karl Berry  <karl@gnu.org>
155204         * config/config.{guess,sub}: update from config.
155206 2003-10-16  Jim Meyering  <jim@meyering.net>
155208         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
155209         memcpy.
155211 2003-10-15  Paul Eggert  <eggert@twinsun.com>
155213         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
155214         (SIZE_MAX): Remove.
155215         (new_exclude, add_exclude_file): Initial size no longer needs to
155216         be a power of 2.
155217         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
155218         our own address arithmetic overflow checking.
155220         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
155221         (fnmatch): Do not alloca more than 2000 wide characters;
155222         instead, use malloc for large buffers.
155223         Check for address arithmetic overflow, and return -1
155224         with errno set to ENOMEM in that case.
155225         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
155226         (NEW_PATTERN): Do not alloca more than 8000 bytes;
155227         instead, return -1.  Check for address arithmetic overflow.
155229 2003-10-14  Paul Eggert  <eggert@twinsun.com>
155231         Handle invalid suffixes and overflow independently, so that
155232         callers can treat them independently as needed.  Fix some bugs in
155233         suffix handling, e.g., "100k@" was not diagnosed as an invalid
155234         suffix for a human-readable blocksize.  The major caller-visible
155235         change is the addition of a new
155236         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
155237         that both overflow and suffix chars were found.
155239         * lib/human.c (humblock): Don't check separately for invalid suffix
155240         char; that is xstrtoumax's job (now that its bug is fixed).
155241         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
155242         INTMAX_MAX]: New macros.
155243         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
155244         TYPE_MAXIMUM): New macros.
155245         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
155246         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
155247         if overflow occurs, as it's what __strtol does and it's more useful
155248         in practice.
155249         (__xstrtol): If __strtol reports some error other than ERANGE,
155250         reflect it to the caller as LONGINT_INVALID.  If it reports
155251         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
155252         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
155253         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
155254         value.
155255         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
155256         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
155257         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
155258         [defined UINTMAX_MAX]: New macros.
155260 2003-10-14  Bruno Haible  <bruno@clisp.org>
155262         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
155264 2003-10-14  Bruno Haible  <bruno@clisp.org>
155266         * m4/sig_atomic_t: New file, from GNU gettext.
155267         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
155269 2003-10-14  Bruno Haible  <bruno@clisp.org>
155271         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
155272         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
155273         Also use volatile where needed.
155275 2003-10-12  Paul Eggert  <eggert@twinsun.com>
155277         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
155278         Change maintainer from Bruno Haible to 'all'.
155280 2003-10-12  Paul Eggert  <eggert@twinsun.com>
155282         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
155284 2003-10-12  Paul Eggert  <eggert@twinsun.com>
155286         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
155287         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
155288         and define in terms of the other primitives.
155289         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
155290         (SIZE_MAX): Define if not already defined.
155291         (array_size_overflow): New function.
155292         (xalloc_die): Abort instead of exiting if 'error' returns.
155293         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
155294         (xmalloc, xrealloc): Use them.
155295         (xcalloc): Check for address arithmetic overflow.
155296         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
155297         a bit faster than strcpy.
155299 2003-10-10  Simon Josefsson  <jas@extundo.com>
155301         * modules/argp (Depends-on): Add restrict and strcase.
155303 2003-10-10  Simon Josefsson  <jas@extundo.com>
155305         * m4/argp.m4: Add AC_C_INLINE.
155307 2003-10-08  Paul Eggert  <eggert@twinsun.com>
155309         Merge getpass from libc, plus a few fixes.
155311         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
155312         Include <stdbool.h>.
155313         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
155314         __fsetlocking to empty.
155315         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
155316         do include <bits/libc-lock.h>.
155317         Do not include <fcntl.h>; not needed.
155318         [_LIBC]: Include <wchar.h>.
155319         (NOTCANCEL_MODE): New macro.
155320         (flockfile, funlockfile) [_LIBC]: New macros.
155321         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
155322         [!_LIBC]: New macros.
155323         (call_fclose): New function.
155324         (getpass): Use it.  Save tty stream separately; this simplifies the
155325         code and makes it more reliable if stdin happens to equal stdout.
155326         Invoke __fsetlocking on tty.
155327         Handle thread cancellation if needed.
155328         Namespace cleanup (use __tcgetattr, __getline).
155329         Use bool for Booleans.
155330         [USE_IN_LIBIO]: Handle wide streams.
155331         [!_LIBC]: Unconditionally do the fseek, since we don't know what
155332         stream might go where.
155334         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
155335         doesn't have to include <stdio.h> before us.
155336         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
155337         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
155338         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
155339         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
155340         if not declared, so that we can use getpass.c code from libc without
155341         rewriting it.
155342         (flockfile, ftrylockfile, funlockfile): New macros.
155344 2003-10-08  Paul Eggert  <eggert@twinsun.com>
155346         * modules/getpass: Depend on stdbool.
155348 2003-10-08  Paul Eggert  <eggert@twinsun.com>
155350         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
155352 2003-10-07  Karl Berry  <karl@gnu.org>
155354         * config/config.{guess,sub}: update from config.
155356 2003-10-06  Jim Meyering  <jim@meyering.net>
155357             Bruno Haible  <bruno@clisp.org>
155359         This lets translators provide better translations for the
155360         "Written by ..." part of --version output.
155361         * lib/version-etc.h: Include stdarg.h.
155362         (version_etc_copyright): Declare as readonly.
155363         (version_etc): Make this function variadic with a NULL-terminated list
155364         of author name strings.
155365         (version_etc_va): New declaration.
155366         * lib/version-etc.c: Include stdarg.h, stdlib.h.
155367         (version_etc_copyright): Declare as readonly.
155368         (version_etc_va): New function. Provide a different translatable string
155369         for each possible number of authors < 10. Abbreviate when there are 10
155370         authors or more.
155371         (version_etc): Make this function variadic. Call version_etc_va.
155372         Suggestion from Gary V. Vaughan.
155374         * lib/long-options.h (parse_long_options): Change prototype: the
155375         authors string is moved to the end and becomes variadic.
155376         * lib/long-options.c: Include stdarg.h.
155377         (parse_long_options): Make this function variadic, too.
155378         Call version_etc_va, not version_etc.
155380 2003-10-06  Bruno Haible  <bruno@clisp.org>
155382         * modules/version-etc-2: Remove file.
155383         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
155385 2003-10-06  Bruno Haible  <bruno@clisp.org>
155387         * modules/fatal-signal: New file.
155388         * MODULES.html.sh (func_all_modules): Add fatal-signal.
155390 2003-10-06  Bruno Haible  <bruno@clisp.org>
155392         * m4/fatal-signal.m4: New file.
155393         * m4/signalblocking.m4: New file, from GNU gettext.
155395 2003-10-06  Bruno Haible  <bruno@clisp.org>
155397         * lib/version-etc-2.h: Remove file.
155398         * lib/version-etc-2.c: Remove file.
155400 2003-10-06  Bruno Haible  <bruno@clisp.org>
155402         * lib/fatal-signal.h: New file, from GNU gettext.
155403         * lib/fatal-signal.c: New file, from GNU gettext.
155405 2003-10-05  Paul Eggert  <eggert@twinsun.com>
155407         * README: Rework advice for preventing empty .o files.
155408         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
155409         not <sys/types.h>.
155411 2003-10-04  Karl Berry  <karl@gnu.org>
155413         * lib/argp*: update from libc.
155415 2003-10-04  Karl Berry  <karl@gnu.org>
155417         * config/config.{guess,sub}: update from config.
155419 2003-10-02  Bruno Haible  <bruno@clisp.org>
155421         * modules/lchown (Include): Add lchown.h.
155422         * modules/time_r (Include): Use "..." syntax.
155423         * modules/xgetdomainname (Include): Add xgetdomainname.h.
155425 2003-10-01  Simon Josefsson  <jas@extundo.com>
155427         * MODULES.html.sh (func_all_modules): Move gethostname from section
155428         'based on' to section 'lacking' POSIX:2001.
155430 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
155432         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
155433         to output mode on the same stream.
155435 2003-09-29  Paul Eggert  <eggert@twinsun.com>
155437         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
155438         Fix arg typo in previous patch.
155440 2003-09-28  Jim Meyering  <jim@meyering.net>
155442         * lib/error.c: Correct cpp indentation.
155444 2003-09-27  Paul Eggert  <eggert@twinsun.com>
155446         * modules/free: New file.
155448 2003-09-27  Paul Eggert  <eggert@twinsun.com>
155450         * m4/free.m4: New file.
155452 2003-09-27  Paul Eggert  <eggert@twinsun.com>
155454         * lib/minmax.h (MIN, MAX)
155455         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
155456         Omit the special code that used __typeof__, since we worry that
155457         it could be more trouble than it's worth.  See:
155458         http://mail.gnu.org/r/bug-gnulib/2003-01/msg00090.html
155459         http://mail.gnu.org/r/bug-gnulib/2003-01/msg00095.html
155461         * lib/free.c: New file.
155463 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
155465         Trivial fixes to Makefile.am parts of module listings.
155466         * modules/strstr: Append strstr.h to lib_SOURCES.
155467         * modules/strcase: Likewise, for strcase.h.
155469 2003-09-27  Karl Berry  <karl@gnu.org>
155471         * config/mkinstalldirs: update from automake.
155473 2003-09-26  Paul Eggert  <eggert@twinsun.com>
155475         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
155476         (error_tail): Do not loop, reallocating temporary buffer, since
155477         the output cannot contain more wide characters than the input
155478         contains bytes, the size must be big enough already.  This avoids
155479         one potential size overflow calculation.  Check for size overflow
155480         when calculating temporary buffer size.  Free temporary buffer
155481         when done, if it was allocated with malloc; this plugs a memory
155482         leak.  Remove casts from void * to pointers, that are no longer
155483         needed now that we're assuming C89 or better.
155485         Merge error changes from glibc.
155487         * lib/error.c, error.h: Update copyright notice header to match glibc.
155488         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
155489         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
155490         Disable cancellation while printing error.
155491         * lib/error.h: Prepend __ to parameter names.
155493 2003-09-26  Jim Meyering  <jim@meyering.net>
155495         * lib/error.c (error_tail): Move some declarations
155496         into inner scope where the local variables are used.
155498 2003-09-26  Bruno Haible  <bruno@clisp.org>
155500         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
155501         stpncpy().
155502         Don't define stpncpy through config.h; it's now done through stpncpy.h.
155504 2003-09-26  Bruno Haible  <bruno@clisp.org>
155506         * lib/stpncpy.h (gnu_stpncpy): New declaration.
155507         (stpncpy): Define as alias for gnu_stpncpy.
155508         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
155510 2003-09-25  Simon Josefsson  <jas@extundo.com>
155512         * lib/xgetdomainname.h: New file.
155513         * lib/xgetdomainname.c: New file.
155515 2003-09-25  Simon Josefsson  <jas@extundo.com>
155516             Bruno Haible  <bruno@clisp.org>
155518         * modules/getdomainname: New file.
155519         * modules/xgetdomainname: New file.
155520         * MODULES.html.sh (func_all_modules): Add getdomainname,
155521         xgetdomainname.
155523 2003-09-25  Simon Josefsson  <jas@extundo.com>
155524             Bruno Haible  <bruno@clisp.org>
155526         * m4/getdomainname.m4: New file.
155528 2003-09-25  Simon Josefsson  <jas@extundo.com>
155529             Bruno Haible  <bruno@clisp.org>
155531         * lib/getdomainname.h: New file.
155532         * lib/getdomainname.c: New file.
155534 2003-09-25  Karl Berry  <karl@gnu.org>
155536         * lib/argp-fmtstream.c, argp-help.c: update from libc.
155538 2003-09-25  Karl Berry  <karl@gnu.org>
155540         * config/install-sh: update from automake.
155542 2003-09-25  Bruno Haible  <bruno@clisp.org>
155544         * modules/version-etc-2: New file, from modules/version-etc with
155545         modifications.
155546         * MODULES.html.sh (func_all_modules): Add version-etc-2.
155548 2003-09-25  Bruno Haible  <bruno@clisp.org>
155550         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
155551         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
155553 2003-09-24  Simon Josefsson  <jas@extundo.com>
155555         * modules/xgethostname: Add xgethostname.h.
155557 2003-09-24  Paul Eggert  <eggert@twinsun.com>
155559         * lib/linebuffer.c (freebuffer): Don't free the argument, just
155560         the buffer associated with the argument.  Bug reported by
155561         Simon Josefsson.
155563 2003-09-24  Paul Eggert  <eggert@twinsun.com>
155565         * README: Document assumptions that 'int' is at least 32 bits
155566         wide, that integer arithmetic is 2's complement without overflow,
155567         that there are no holes in integer values, that adding sizes of
155568         two nonoverlapping objects can't overflow, and that all-bits-zero
155569         yields scalar zero.  Fix spelling and capitalization typos.
155571 2003-09-19  Karl Berry  <karl@gnu.org>
155573         * lib/argp.h: update from libc.
155575 2003-09-17  Paul Eggert  <eggert@twinsun.com>
155577         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
155578         to avoid spurious warnings like "AC_RUN_IFELSE was called before
155579         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
155581 2003-09-17  Paul Eggert  <eggert@twinsun.com>
155583         * gnulib-tool: Use "test -h", not "test -L", for portability
155584         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
155585         (tags_regexp): Remove, since \| doesn't conform to POSIX.
155586         (sed_extract_prog): Issue s commands one-by-one, rather than
155587         using \| in one s command.
155589 2003-09-16  Paul Eggert  <eggert@twinsun.com>
155591         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
155592         input error, instead of returning NULL the next time we are called
155593         (and therefore losing track of errno).
155595 2003-09-16  Bruno Haible  <bruno@clisp.org>
155597         * gnulib-tool (func_create_testdir): Warn about duplicated
155598         dependencies.
155600 2003-09-15  Paul Eggert  <eggert@twinsun.com>
155602         * modules/argmatch, modules/fatal, modules/obstack,
155603         modules/xalloc, modules/xgethostname: Sort dependencies by
155604         importance, not alphabetically.
155606 2003-09-15  Paul Eggert  <eggert@twinsun.com>
155608         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
155609         fails, so that the caller gets the proper errno.
155611         * lib/readutmp.c (read_utmp): Likewise.
155612         Check for fstat error.  Close stream and free storage
155613         when failing.
155615 2003-09-14  Karl Berry  <karl@gnu.org>
155617         * config/srclist.txt (strdup.c): disable for c89 changes.
155619 2003-09-14  Jim Meyering  <jim@meyering.net>
155621         * lib/getloadavg.c: Correct cpp indentation.
155622         * lib/strdup.c: Likewise.
155623         * lib/vasnprintf.c: Likewise.
155625 2003-09-14  Bruno Haible  <bruno@clisp.org>
155627         * modules/fwriteerror: New file.
155628         * MODULES.html.sh (func_all_modules): Add fwriteerror.
155630 2003-09-14  Bruno Haible  <bruno@clisp.org>
155632         * lib/fwriteerror.h: New file.
155633         * lib/fwriteerror.c: New file.
155635 2003-09-12  Paul Eggert  <eggert@twinsun.com>
155637         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
155638         modules/xgethostname, modules/xalloc: Depend on exit.
155640 2003-09-12  Paul Eggert  <eggert@twinsun.com>
155642         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
155644         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
155645         and AC_MINIX, too, so that their extensions are available.
155647         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
155648         This macro has been superseded by gl_BACKUPFILE.
155650         More patches to assume C89 or better.
155652         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
155654         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
155655         unconditionally.
155656         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
155657         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
155658         Include <string.h>, <stdlib.h> unconditionally.
155659         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
155660         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
155661         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
155662         headers or for string.h.
155663         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
155664         or strtoul.
155666         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
155667         headers.
155668         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
155669         * m4/userspec.m4 (gl_USERSPEC): Likewise.
155670         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
155671         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
155672         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
155673         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
155674         memcpy, memset.
155675         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
155676         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
155677         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
155678         strtol.
155679         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
155680         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
155681         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
155682         strtoul.
155684 2003-09-12  Paul Eggert  <eggert@twinsun.com>
155686         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
155687         * lib/obstack.c [!defined _LIBC]: Likewise.
155688         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
155689         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
155690         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
155692         More changes to assume C89 or better.
155694         * lib/error.c (error_tail): Assume vprintf.
155696         * lib/argmatch.c (getenv): Remove decl.
155697         * lib/progreloc.c (get_full_program_name): Define via prototype.
155698         * lib/setenv.c (clearenv): Likewise.
155699         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
155700         needed.
155701         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
155702         (malloc, memcpy): Remove decls.
155703         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
155704         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
155705         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
155706         (memcpy): Remove macro.
155707         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
155708         (__P): Remove.  All uses removed.
155709         (PTR): Remove.  All uses changed to void *.
155710         (CHAR_BIT, NULL): Remove.
155711         (spaces, zeros, memset_space, memset_zero)
155712         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
155713         Remove.
155714         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
155715         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
155716         Define with prototype.
155717         Remove now-unnecessary prototype decl.
155718         (extra_args_spec): Assume ANSI C.  All uses changed.
155719         (extra_args_spec_iso): Remove.
155720         (my_strftime, emacs_strftimeu): Define via prototype.
155721         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
155722         unconditionally.
155723         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
155724         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
155725         (strtoul, strtol): Remove decls.
155726         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
155727         LONG_MAX): Remove.
155728         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
155729         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
155730         (LOCALE_PARAM_PROTO): New macro.
155731         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
155732         (INTERNAL (strtol), strtol): Define with a prototype.
155733         (PARAMS): Remove.  All uses removed.
155734         * lib/tempname.c: Include <string.h> unconditionally.
155735         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
155736         * lib/xgethostname.c (main): Define with a prototype.
155737         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
155738         Include <stdlib.h> unconditionally.
155739         (calloc, malloc, realloc, free): Remove decls.
155740         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
155741         Include <stdlib.h> unconditionally.  Sort include file names.
155742         (strtod): Remove.
155743         (xstrtod): Define with a prototype.
155744         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
155745         (strtol, strtoul): Remove decls.
155747 2003-09-11  Paul Eggert  <eggert@twinsun.com>
155749         More patches to assume C89 or better.
155750         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
155751         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
155752         string.h, memchr, STDC_HEADERS.
155754 2003-09-11  Paul Eggert  <eggert@twinsun.com>
155756         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
155757         Include <stdlib.h>, <string.h> unconditionally.
155758         Remove now-unnecessary cast to char *.
155759         * lib/strnlen.c: Include <string.h> unconditionally.
155760         * lib/yesno.c (yesno): Define with a prototype.
155762 2003-09-11  Bruno Haible  <bruno@clisp.org>
155764         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
155766 2003-09-10  Jim Meyering  <jim@meyering.net>
155768         * lib/error.c: Correct indentation of cpp directives.
155770 2003-09-10  Bruno Haible  <bruno@clisp.org>
155772         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
155773         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
155774         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
155775         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
155776         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
155777         <stdlib.h> and <string.h> checks.
155778         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
155779         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
155781 2003-09-10  Bruno Haible  <bruno@clisp.org>
155783         * lib/strcspn.c: Include <string.h> unconditionally.
155784         * lib/strpbrk.c: Include <string.h> unconditionally.
155785         * lib/strstr.c: Include <string.h> unconditionally.
155786         * lib/unicodeio.c: Include <string.h> unconditionally.
155787         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
155788         * lib/unsetenv.c: Likewise.
155789         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
155790         * lib/yesno.c: Include <stdlib.h> unconditionally.
155791         (rpmatch): Add prototype.
155793 2003-09-09  Paul Eggert  <eggert@twinsun.com>
155795         More patches to assume C89 or better.
155796         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
155797         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
155798         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
155799         or for string.h.
155800         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
155801         stdlib.h.
155802         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
155803         C headers.
155804         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
155805         string.h.
155806         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
155807         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
155808         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
155809         or for string.h.
155810         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
155811         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
155812         C headers.
155813         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
155814         memcpy.
155815         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
155816         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
155817         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
155818         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
155819         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
155820         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
155821         string.h, free.
155822         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
155823         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
155824         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
155825         C headers, or for string.h.
155826         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
155827         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
155828         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
155829         headers, memory.h, stdlib.h, string.h, strings.h.
155830         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
155831         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
155832         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
155833         strchr.
155834         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
155835         headers, memory.h, string.h.
155836         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
155837         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
155838         free.
155839         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
155840         headers.
155841         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
155842         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
155843         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
155844         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
155845         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
155847 2003-09-09  Paul Eggert  <eggert@twinsun.com>
155849         More K&R removal.
155851         * lib/acosl.c (main): Use a prototype.
155852         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
155853         tanl.c: Likewise.
155855         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
155857         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
155858         (getopt, etopt_long, getopt_long_only, _getopt_internal)
155859         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
155860         with a prototype.
155861         * lib/getopt.c (const): Remove macro.
155862         Include <string.h> unconditionally.
155863         (my_index): Remove; all uses changed to strchr.
155864         (strlen): Remove decl.
155865         (exchange): Remove forward decl; no longer needed.
155866         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
155867         Define with prototype.
155868         * lib/getopt1.c (const): Remove macro.
155869         (getopt_long, getopt_long_only, main): Define with prototype.
155871         * lib/getugroups.c: Include <string.h> unconditionally.
155873         * lib/getusershell.c: Include <stdlib.h> unconditionally.
155874         (getusershell, setusershell, endusershell, readname, main):
155875         Define with prototypes.
155877         * lib/group-member.c: Include group-member.h first.
155878         Include <stdlib.h> unconditionally.
155880         * lib/hard-locale.c: Include hard-locale.h first.
155881         Include <stdlib.h>, <string.h> unconditionally.
155883         * lib/hash.c (free, malloc): Remove decls.
155884         Include <stdlib.h> unconditionally.
155886         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
155887         (getenv): Do not declare.
155889         * lib/idcache.c: Include <string.h> unconditionally.
155891         * lib/long-options.c: Include long-options.h first, to test interface.
155892         Include <stdlib.h> unconditionally.
155894         * lib/makepath.c: Include makepath.h first, to test interface.
155895         Include <stdlib.h> and <string.h> unconditionally.
155897         * lib/linebuffer.c: Include <stdlib.h>.
155898         (free): Remove decl.
155900         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
155901         stddef.h. rpl_malloc returns void *, not char *.
155902         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
155903         prototype.
155905         * lib/md5.h: Include <limits.h> unconditionally.
155906         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
155907         (__P): Remove; all uses removed.
155908         * lib/md5.c: Include "md5.h" first.
155909         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
155910         md5_buffer, md5_process_bytes, md5_process_block):
155911         Define with prototypes.
155912         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
155913         * lib/sha.c: Include "sha.h" first.
155914         Include <stdlib.h>, <string.h> unconditionally.
155916         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
155917         * lib/memcmp.c (__ptr_t): Likewise.
155918         * lib/memrchr.c (__ptr_t): Likewise.
155919         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
155920         Include <string.h> unconditionally.
155921         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
155922         * lib/memchr.c: Include <stdlib.h> unconditionally.
155923         * lib/memchr.c (LONG_MAX): Remove.
155924         * lib/memrchr.c (LONG_MAX): Likewise.
155925         * lib/memchr.c (__memchr): Define via a prototype.
155926         * lib/memrchr.c (__memrchr): Likewise.
155927         * lib/memcmp.c (__P): Remove, and remove all uses.
155928         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
155929         Remove forward decls; no longer needed.
155930         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
155931         Use types required by C89 in prototype.
155933         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
155934         * lib/savedir.c: Likewise.
155935         * lib/mkdir.c (free): Remove decl.
155936         * lib/rmdir.c (rmdir): Define with a prototype.
155937         * lib/savedir.c: Include savedir.h first, to test interface.
155939         * lib/mktime.c (STDC_HEADERS): Remove.
155940         Include <stdlib.h>, <string.h> unconditionally.
155942         * lib/modechange.c: Include <stdlib.h> unconditionally.
155943         (malloc): Remove decl.
155945         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
155946         (free): Remove decl.
155948         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
155949         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
155950         (This type really should be intptr_t, but that's a C99ism.)
155951         (_obstack_memcpy): Remove: all uses changed to memcpy.
155952         Include <string.h> unconditionally.
155953         (struct obstack): Assume __STDC__ for types of members
155954         chunkfun, freefun, extra_arg.
155955         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
155956         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
155957         obstack_begin, obstack_specify_allocation,
155958         obstack_specify_allocation_with_arg, obstack_chunkfun,
155959         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
155960         Remove unprototyped decls and the macros that use them.
155961         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
155962         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
155963         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
155964         (defined __STDC__ && __STDC__)]:
155965         Remove nonprototyped code.
155966         Include <stdlib.h> unconditionally.
155967         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
155968         _obstack_allocated_p, _obstack_free, obstack_free,
155969         _obstack_memory_used, print_and_abort):
155970         Define using prototypes.
155971         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
155972         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
155973         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
155974         obstack_next_free, obstack_object_size, obstack_room) [0]:
155975         Remove unused, unprototyped code.
155977         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
155979         * lib/physmem.c (physmem_total, physmem_available, main): Define
155980         with prototypes.
155982         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
155983         (main): Define with a prototype.
155985         * lib/posixver.c (getenv): Remove decl.
155987         * lib/putenv.c (malloc): Returns void *, not char *.
155988         Include <string.h> unconditionally.
155989         (strchr, memcpy, NULL): Do not define.
155991         * lib/readtokens.c: Include readtokens.h first, to test interface.
155992         Include <stdlib.h>, <string.h> unconditionally.
155993         (init_tokenbuffer): Define with a prototype.
155995         * lib/regex.c (PARAMS): Remove.  All uses removed.
155996         All uses of _RE_ARGS removed, too.
155997         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
155998         unconditionally.
155999         (bzero): Assume memset exists.
156000         (memcmp, memcpy, NULL): Remove.
156001         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
156002         char, or assignments to local vars of type signed char.
156003         (init_syntax_once, PREFIX(extract_number_and_incr),
156004         PREFIX(print_partial_compiled_pattern),
156005         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
156006         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
156007         PREFIX(regex_grow_registers), PREFIX(regex_compile),
156008         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
156009         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
156010         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
156011         wcs_compile_range, byte_compile_range, truncate_wchar,
156012         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
156013         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
156014         count_mbs_length, wcs_re_match_2_internal,
156015         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
156016         PREFIX(alt_match_null_string_p),
156017         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
156018         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
156019         regfree, PREFIX(extract_number)): Define with prototype.  Remove
156020         now-unnecessary declaration, if any.
156021         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
156022         regcomp, regexec):
156023         Remove now-unnecessary casts among pointer types.
156024         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
156026         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
156027         (free): Remove decl.
156029         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
156031         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
156032         (free): Remove decl.
156034         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
156035         * lib/xgetcwd.c: Likewise.
156037         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
156038         (free): Remove decl.
156040         * lib/strchrnul.c (strchrnul): Define with a prototype.
156041         Fix bug: c_in was not converted to char before searching.
156043         The following changes are not K&R related:
156045         * lib/group-member.h: Include <sys/types.h>, so that this file is
156046         self-contained.
156047         * lib/makepath.h: Likewise.
156049         * lib/getusershell.c (readname, default_index, line_size, readname):
156050         Use size_t, not int, for sizes.
156051         (readname): If the size overflows, report an error instead of
156052         looping forever.
156054 2003-09-09  Paul Eggert  <eggert@twinsun.com>
156056         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
156057         libc.
156059 2003-09-09  Paul Eggert  <eggert@twinsun.com>
156061         * README: New section: portability guidelines.
156063 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
156065         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
156066         C89 spec.
156068 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
156070         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
156072 2003-09-08  Paul Eggert  <eggert@twinsun.com>
156074         Assume C89 or better; remove K&R cruft.
156075         A few of these changes were first proposed by Derek Robert Price
156076         in <http://mail.gnu.org/r/bug-gnulib/2003-07/msg00105.html>.
156078         * lib/addext.c: Include <string.h> unconditionally.
156079         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
156080         Don't declare getenv or malloc.
156082         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
156083         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
156084         (NULL): Remove.
156085         (find_stack_direction, alloca): Use prototypes.
156087         * lib/atexit.c (atexit): Define using a prototype.
156089         * lib/basename.c, dirname.c, stripslash.c:
156090         Include <string.h> unconditionally.
156092         * lib/bcopy.c: Include <stddef.h>.
156093         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
156095         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
156097         * lib/error.h (error, error_at_line, error_print_progname)
156098         [! (defined (__STDC__) && __STDC__)]: Remove decls.
156099         * lib/error.c: Include error.h first, to check interface.
156100         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
156101         (VA_START): Remove; all uses changeed to va_start.
156102         (exit, strerror): Remove decls.
156103         (error_print_progname): Prototype uncondionally.
156104         Don't include <errno.h>; no longer needed.
156105         (private_strerror): Remove.
156106         (error_tail): Always define.
156107         (error, error_at_line): Assume C89 or better; always use prototypes.
156108         * lib/fatal.c: Include "fatal.h" first, to test interface.
156109         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
156110         (VA_START): Remove; all uses changed to va_start.
156111         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
156112         this case.
156113         (exit): Remove decl.
156114         (fatal): Prototype unconditionally.  Assume va_start works.
156115         Abort at end, to pacify gcc.
156117         * lib/euidaccess.c (main): Define with a prototype.
156119         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
156121         * lib/exitfail.c: Include <stdlib.h> unconditionally.
156123         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
156124         prototypes.
156125         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
156126         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
156127         (getenv): Remove decl.
156128         (fnmatch): Define using a prototype.
156129         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
156130         (FCT): Define using a prototype.
156132         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
156134         * lib/gethostname.c: Include <stddef.h>.
156135         (gethostname): Define with prototype.  Length is size_t, not int.
156137 2003-09-08  Paul Eggert  <eggert@twinsun.com>
156139         Assume C89 or better; remove K&R cruft.
156140         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
156141         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
156142         string.h, getenv, malloc.
156143         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
156144         headers.
156145         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
156146         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
156147         do not check for strerror.
156148         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
156149         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
156150         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
156151         do not check for doprnt or vprintf.
156152         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
156153         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
156155 2003-09-08  Paul Eggert  <eggert@twinsun.com>
156157         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
156158         getversion.c should have been removed then, but was accidentally
156159         preserved.
156161         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
156162         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
156164 2003-09-08  Karl Berry  <karl@gnu.org>
156166         * config/config.sub, config.guess, srclistvars.sh: update from savannah
156167                 config, forget about prep.
156169         * config/depcomp, missing: update from automake.
156171 2003-09-07  Paul Eggert  <eggert@twinsun.com>
156173         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
156174         <http://mail.gnu.org/r/bug-gnulib/2003-09/msg00028.html>.
156176 2003-09-07  Paul Eggert  <eggert@twinsun.com>
156178         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
156179         copy_tm_result.  Bug reported by Simon Josefsson in
156180         <http://mail.gnu.org/r/bug-gnulib/2003-09/msg00028.html>.
156182 2003-09-06  Paul Eggert  <eggert@twinsun.com>
156184         * m4/time_r.m4: New file.
156185         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
156186         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
156187         is. Check for timegm declaration.
156188         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
156189         Do not check for gmtime_r.
156190         Replace mktime if __mktime_internal does not exist and if mktime
156191         hasn't been replaced already.
156193 2003-09-06  Paul Eggert  <eggert@twinsun.com>
156195         * lib/time_r.c, lib/time_r.h: New files.
156197         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
156198         __localtime_r.
156199         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
156200         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
156202         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
156203         __gmtime_r.
156204         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
156205         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
156206         Include <time_r.h>.
156208         * lib/timegm.c: Switch to glibc implementation, with the following
156209         changes:
156210         [defined HAVE_CONFIG_H]: Include <config.h>.
156211         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
156212         (__mktime_internal) [!defined _LIBC]: New decl.
156213         (__gmtime_r) [!defined _LIBC]: New macro and function.
156214         (timegm): Use a prototype, since gnulib assumes C89.
156215         Do not bother declaring tmp to be const, as it's not really usefu.
156216         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
156217         (timegm): Declare only if HAVE_DECL_TIMEGM.
156219 2003-09-06  Paul Eggert  <eggert@twinsun.com>
156221         * MODULES.html.sh (func_all_modules): Add time_r.
156222         * modules/time_r: New file.
156223         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
156224         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
156226 2003-09-03  Paul Eggert  <eggert@twinsun.com>
156228         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
156229         Bug reported by Lute Kamstra in
156230         <http://mail.gnu.org/r/bug-gnulib/2003-09/msg00003.html>.
156232         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
156233         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
156234         course with correspondingly smaller numbers for tomorrow and
156235         yesterday.  From Tadayoshi Funaba.  Originally installed into
156236         sh-utils on 1999-08-07, but the patch got lost (I guess during the
156237         coreutils merge?).
156239 2003-08-31  Simon Josefsson  <jas@extundo.com>
156241         * modules/timegm: New file.
156242         * MODULES.html.sh (func_all_modules): Add timegm.
156244 2003-08-31  Simon Josefsson  <jas@extundo.com>
156246         * m4/timegm.m4: New file.
156248 2003-08-31  Simon Josefsson  <jas@extundo.com>
156250         * lib/timegm.h: New file.
156251         * lib/timegm.c: New file.  Based on
156252         wget-1.8.2/src/http.c:mktime_from_utc.
156254 2003-08-31  Karl Berry  <karl@gnu.org>
156256         * lib/argp.h: update from libc.
156258 2003-08-28  Bruno Haible  <bruno@clisp.org>
156260         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
156261         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
156262         followed by '#define fnmatch fnmatch_posix' gives an error.
156264 2003-08-28  Bruno Haible  <bruno@clisp.org>
156266         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
156267         warning on QNX, which defines O_BINARY to 000000.
156269 2003-08-27  Jim Meyering  <jim@meyering.net>
156271         * m4/mkstemp.m4: Require that the system mkstemp be able to create
156272         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
156273         would fail after 32.  Reported by Danny Levinson.  Details here:
156274         http://mail.gnu.org/r/bug-coreutils/2003-08/msg00124.html
156276 2003-08-24  Bruno Haible  <bruno@clisp.org>
156278         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
156279         MSVC7 <stdio.h> is included later.
156281 2003-08-22  Simon Josefsson  <jas@extundo.com>
156283         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
156285 2003-08-20  Karl Berry  <karl@gnu.org>
156287         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
156289 2003-08-20  Bruno Haible  <bruno@clisp.org>
156291         * modules/progname: New file.
156292         * MODULES.html.sh (func_all_modules): Add progname.
156294 2003-08-20  Bruno Haible  <bruno@clisp.org>
156296         * lib/progname.h: New file, from GNU gettext.
156297         * lib/progname.c: New file, from GNU gettext.
156298         * lib/progreloc.c: New file, from GNU gettext.
156300 2003-08-19  Jim Meyering  <jim@meyering.net>
156302         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
156303         http://mail.gnu.org/r/bug-gnulib/2003-08/msg00155.html
156305 2003-08-19  Bruno Haible  <bruno@clisp.org>
156307         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
156308         more.
156310 2003-08-19  Bruno Haible  <bruno@clisp.org>
156312         * lib/xstrdup.c: Assume <string.h> exists.
156314 2003-08-18  Paul Eggert  <eggert@twinsun.com>
156316         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
156317         in makefile rules.
156319 2003-08-18  Jim Meyering  <jim@meyering.net>
156321         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
156322         * m4/lib-ld.m4: Likewise.
156324 2003-08-18  Jim Meyering  <jim@meyering.net>
156326         * lib/setenv.h: Indent nested cpp directive.
156327         * lib/vasnprintf.c: Remove trailing blanks.
156329 2003-08-17  Simon Josefsson  <jas@extundo.com>
156331         * modules/xstrndup: New file.
156332         * MODULES.html.sh (func_all_modules): Add xstrndup.
156334 2003-08-17  Simon Josefsson  <jas@extundo.com>
156336         * modules/argp: Fix autoconf macro name. Add more dependencies.
156338 2003-08-17  Simon Josefsson  <jas@extundo.com>
156340         * m4/xstrndup.m4: New file.
156342 2003-08-17  Simon Josefsson  <jas@extundo.com>
156344         * m4/argp.m4: New file.
156346 2003-08-17  Simon Josefsson  <jas@extundo.com>
156347             Bruno Haible  <bruno@clisp.org>
156349         * lib/xstrndup.h: New file.
156350         * lib/xstrndup.c: New file.
156352 2003-08-17  Bruno Haible  <bruno@clisp.org>
156354         * modules/strndup (Files, Include): Add lib/strndup.h.
156356 2003-08-17  Bruno Haible  <bruno@clisp.org>
156358         * modules/euidaccess (Files): Add lib/euidaccess.h.
156360 2003-08-17  Bruno Haible  <bruno@clisp.org>
156362         * lib/strndup.h: New file.
156364 2003-08-17  Bruno Haible  <bruno@clisp.org>
156366         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
156367         like AC_GNU_SOURCE.
156368         * modules/extensions (configure.ac): Comment out the invocation of
156369         gl_USE_SYSTEM_EXTENSIONS.
156371 2003-08-16  Paul Eggert  <eggert@twinsun.com>
156373         Merges from coreutils, etc.
156374         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
156375         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
156376         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
156377         fixing a typo.
156378         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
156379         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
156381 2003-08-16  Paul Eggert  <eggert@twinsun.com>
156383         Document merge from coreutils.
156384         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
156385         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
156386         * modules/utime: Add m4/utimes-null.m4.
156388 2003-08-16  Paul Eggert  <eggert@twinsun.com>
156390         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
156391         space, undoing this 2003-08-12 change:
156392         <http://mail.gnu.org/r/bug-gnulib/2003-08/msg00080.html>
156394 2003-08-16  Paul Eggert  <eggert@twinsun.com>
156396         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
156397         strtoul.c from libc, undoing this 2003-08-12 change:
156398         <http://mail.gnu.org/r/bug-gnulib/2003-08/msg00080.html>
156400 2003-08-16  Jim Meyering  <jim@meyering.net>
156402         Merges from coreutils.
156403         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
156404         prefix.  Adjust cache variables similarly.  Create 500 rather than
156405         just 300 files, to exercise bug on Darwin6.5, too.
156406         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
156407         $missing_dir.
156408         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
156409         AM_SYS_POSIX_TERMIOS.
156410         Reported by mkc@mathdogs.com.
156411         Also change use of $am_cv_sys_posix_termios
156412         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
156413         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
156414         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
156415         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
156416         in /proc/mounts until it finds one with matching device number.  This
156417         is unnecessary when the FILE argument *is* a mount point.  No stat call
156418         is necessary in that case.  So, disable the statvfs-testing code on
156419         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
156420         as RedHat bug# 84846.
156421         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
156422         to 1MB, so as not to render systems with no stack size limit (e.g.,
156423         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
156424         Include <unistd.h>.  On some systems,
156425         it is required for the definition of _SC_PAGESIZE.
156427 2003-08-16  Jim Meyering  <jim@meyering.net>
156429         Merge from coreutils.
156430         * lib/xstrtoimax.c: #else #if -> #elif.
156431         * lib/xstrtoumax.c: Likewise.
156433 2003-08-16  Jim Meyering  <jim@meyering.net>
156435         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
156436         * m4/utimes.m4: Removed.
156437         * m4/utimes-null.m4: Renamed from utimes.m4.
156439         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
156440         to 1MB, so as not to render systems with no stack size limit (e.g.,
156441         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
156442         Include <unistd.h>.  On some systems,
156443         it is required for the definition of _SC_PAGESIZE.
156445 2003-08-16  Jim Meyering  <jim@meyering.net>
156446         and Paul Eggert  <eggert@cs.ucla.edu>
156448         Merges from coreutils, etc.
156450         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
156451         using the latest version from cvs.  This avoids problems with #line
156452         directives using a vendor (Sun) compiler.
156453         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
156454         Don't set GETGROUPS_LIB here; now it's
156455         done via getgroups.m4's wrapper function.
156456         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
156457         rather than just in sh-util/configure.in, so that the
156458         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
156459         same.
156460         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
156461         AC_FUNC_GETLOADAVG where to find getloadavg.c.
156462         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
156463         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
156464         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
156465         Remove code that is now done by the newly-required macros.
156466         Append $(EXEEXT) to DF_PROG.
156467         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
156468         Do not invoke or require the following here,
156469         since prereq.m4 or some gnulib .m4 now does this for us:
156470         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
156471         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
156472         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
156473         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
156474         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
156475         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
156476         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
156477         AC_FUNC_OBSTACK.
156478         Do not replace the following functions, as this is now the job
156479         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
156480         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
156481         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
156482         atexit getpass, strdup, getpagesize.
156483         Replace 'raise'.
156484         Do not check for the following functions, as this is now the job
156485         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
156486         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
156487         setregid.
156488         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
156489         Check for sys/sysctl.h.
156490         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
156491         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
156492         of checking for ssize_t ourselves.
156494         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
156495         Require every macro that gnulib/modules/* suggests for us.
156496         (jm_PREREQ_ADDEXT): New macro.
156497         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
156498         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
156500         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
156501         (gl_PHYSMEM): Use it.
156502         Also check for `table' function.
156503         Check for new headers and functions.
156504         Add check for sys/sysmp.h.
156505         With suggestions from Kaveh Ghazi.
156506         Ignore headers that are present but cannot be compiled.  This
156507         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
156508         C 5.4.
156510 2003-08-15  Paul Eggert  <eggert@twinsun.com>
156512         Document merge from coreutils.
156513         * modules/userspec: Depend on posixver.
156514         * modules/strftime: Depend on tzset.
156516 2003-08-15  Paul Eggert  <eggert@twinsun.com>
156518         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
156519         rather than tab, after '#' in shell-script copyright notices.
156520         Suggested by Bruno Haible.
156522 2003-08-15  Paul Eggert  <eggert@twinsun.com>
156524         * config/srclist-update: Use three spaces, rather than tab, after '#'
156525         in shell-script copyright notices.  Suggested by Bruno Haible.
156526         Remove unnecessary parenthesization in regular expression.
156528 2003-08-15  Jim Meyering  <jim@meyering.net>
156530         Merge from coreutils.
156531         * lib/xgethostname.c: Include <stdlib.h>.
156532         (xghostname): Don't exit for anything other than memory-related
156533         failure; just return NULL.
156534         * lib/userspec.c: Include "posixver.h".
156535         (parse_user_spec): Accept `.' as a separator only
156536         in pre-POSIX-200112 mode.
156537         * lib/strtoimax.c: Use #elif rather than #else #if.
156538         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
156539         Remove function, now that we can rely on a working tzset function.
156540         [!_LIBC]: Ensure that the required autoconf test has been run.
156541         [!defined _NL_CURRENT && HAVE_STRFTIME]:
156542         Use underlying_strftime for %r.
156543         * lib/sha.c: Merge in some clean-up and optimization changes from
156544         glibc.
156545         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
156546         Ensure that it is a multiple of 64.
156547         Rearrange loop exit tests so as to avoid performing an
156548         additional fread after encountering an error or EOF.
156549         * lib/realloc.c: Update copyright date.
156551 2003-08-15  Jim Meyering  <jim@meyering.net>
156552         and Paul Eggert  <eggert@twinsun.com>
156554         Merge from coreutils.
156555         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
156556         member but strut utmpx does not.  Needed for AIX 4.3.3.
156557         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
156559 2003-08-15  Jim Meyering  <jim@meyering.net>
156560         and Paul Eggert  <eggert@cs.ucla.edu>
156562         Merges from coreutils, etc.
156563         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
156564         Require gl_FUNC_TZSET_CLOBBER.
156565         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
156566         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
156567         members.
156569 2003-08-14  Paul Eggert  <eggert@twinsun.com>
156571         Help the merge from coreutils.
156572         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
156573         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
156574         * m4/tzset.m4: Use it too.
156576 2003-08-14  Paul Eggert  <eggert@twinsun.com>
156578         * modules/tzset: New file.
156580 2003-08-14  Jim Meyering  <jim@meyering.net>
156582         Merges from coreutils.
156583         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
156584         variable names, rather than @FNMATCH_H@.
156585         * modules/alloca: Likewise for $(ALLOCA_H).
156587         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
156588         the three copies of the literal target, `fnmatch.h'.
156589         * modules/alloca (alloca.h): Likewise.
156591 2003-08-14  Jim Meyering  <jim@meyering.net>
156593         Merge from coreutils.
156594         * m4/tzset.m4: New file.
156595         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
156596         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
156597         otherwise, AIX 5.1 systems would end up using the latter.
156598         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
156599         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
156600         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
156601         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
156603 2003-08-14  Jim Meyering  <jim@meyering.net>
156605         Merge from coreutils.
156606         * lib/obstack.h: Whitespace changes.
156607         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
156608         and xcalloc return values.
156609         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
156610         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
156611         hang on OSF/1 5.1 for DIR on both local and remote file systems.
156612         Reported by (and fix confirmed by) Nelson H. F. Beebe.
156613         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
156614         error from mntctl.
156615         Use mntctl's return value to drive the entry-processing loop, since
156616         we can't rely on the value of the vmt_length member in the last
156617         entry.  On some systems doing so could result in exhausting
156618         virtual memory.  Based in part on a patch from Mike Jetzer.
156620 2003-08-14  Jim Meyering  <jim@meyering.net>
156621         and Paul Eggert  <eggert@twinsun.com>
156623         Merges from coreutils, plus other fixes.
156624         * lib/physmem.c: Merge in portability changes from gcc/libiberty
156625         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
156626         for credits and details.  Thanks to Kaveh Ghazi for helping
156627         to keep these files in sync.
156628         (ARRAY_SIZE): Define it.
156629         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
156630         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
156631         (memcasecmp): Don't assume size_t fits in unsigned int.
156632         Remove casts and duplicate code.
156633         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
156634         (memcpy): Remove definition.
156635         Merge in some clean-up and optimization changes from glibc.
156636         [BLOCKSIZE]: Move definition to top of file.
156637         Ensure that it is a multiple of 64.
156638         Rearrange loop exit tests so as to avoid performing an
156639         additional fread after encountering an error or EOF.
156640         * lib/md5.h (md5_uintptr): Define.
156641         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
156642         return to the initial working directory.  Preserve errno
156643         for caller.
156644         * lib/idcache.c: Include "xalloc.h".
156645         (xmalloc, xrealloc): Remove decls.
156646         (getuser): Remove casts no longer required in C89.
156647         * lib/human.c: Include stdio.h, for sprintf.
156648         * lib/group-member.c: Include "xalloc.h".
156649         (xmalloc, xrealloc): Remove decls.
156650         (get_group_info): Remove casts no longer required in C89.
156651         * lib/getusershell.c (readname): Remove casts no longer required in
156652         C89.
156653         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
156654         * lib/getline.c: Whitespace fix, from coreutils.
156656 2003-08-13  Paul Eggert  <eggert@twinsun.com>
156658         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
156659         Check for isascii.
156661         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
156662         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
156663         Undo previous (whitespace-only) change.
156665 2003-08-13  Paul Eggert  <eggert@twinsun.com>
156667         * lib/exclude.c: Include <ctype.h>
156668         (IN_CTYPE_DOMAIN): New macro.
156669         (is_space): New fn.
156670         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
156671         and empty lines.
156673         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
156674         Undo previous (whitespace-only) change.
156676 2003-08-13  Paul Eggert  <eggert@twinsun.com>
156678         * config/srclist-update: Change update back to the old behavior,
156679         leaving whitespace alone.  Use one 'sed' command rather than a
156680         pipeline.
156681         (fixlicense): Now a variable, not a function.
156682         (remove_trailing_blanks): Remove.
156683         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
156684         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
156685         Undo previous (whitespace-only) change.
156687 2003-08-12  Paul Eggert  <eggert@twinsun.com>
156689         Merge from coreutils.
156690         * modules/euidaccess: Add lib_SOURCES, include for new
156691         file euidaccess.h
156693 2003-08-12  Paul Eggert  <eggert@twinsun.com>
156695         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
156696         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
156697         Normalize leading white space and remove trailing white space.
156699         Merge from coreutils
156700         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
156702         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
156703         0.12.1.  These files are now being upgraded automatically by
156704         ../config/srclist-update.
156706 2003-08-12  Paul Eggert  <eggert@twinsun.com>
156708         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
156709         Normalize leading white space and remove trailing white space.
156710         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
156711         notice, as per ../config/srclist-update.
156713         Merge from coreutils.
156714         * lib/euidaccess.h: New file.
156715         * lib/euidaccess.c: Include it.
156716         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
156717         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
156718         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
156720 2003-08-12  Paul Eggert  <eggert@twinsun.com>
156722         * config/srclist-update: Add copyright notice.
156723         (remove_id_lines, remove_trailing_blanks): New constants.
156724         (fixfile): Use them to normalize spacing a bit in copied files.
156725         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
156726         Normalize leading white space and remove trailing white space.
156728         * config/texinfo.tex: Sync with texinfo.
156730         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
156731         strtoul.c from libc, to merge coreutils whitespace changes.
156733         * config/srclist.txt: Get the following m4 files from gettext:
156734         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
156735         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
156736         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
156737         wint_t.m4.
156739 2003-08-12  Karl Berry  <karl@gnu.org>
156741         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
156742         been made.
156744 2003-08-11  Paul Eggert  <eggert@twinsun.com>
156746         * modules/gnu-source, m4/gnu-source.m4:
156747         Remove; we're assuming Autoconf 2.54 or later now.
156748         Suggested by Bruno Haible.
156749         * MODULES.html.sh (func_all_modules): Remove gnu-source.
156751 2003-08-11  Bruno Haible  <bruno@clisp.org>
156753         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
156755 2003-08-11  Bruno Haible  <bruno@clisp.org>
156757         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
156758         (vasnprintf): Use it instead of wcslen.
156760 2003-08-11  Bruno Haible  <bruno@clisp.org>
156762         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
156763         value to ensure that _Bool promotes to int. Use #define for _Bool when
156764         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
156766 2003-08-10  Karl Berry  <karl@gnu.org>
156768         * lib/regex.h: update from libc (whitespace fix).
156770 2003-08-09  Paul Eggert  <eggert@twinsun.com>
156772         Merge some files from coreutils.  These changes were
156773         originally made by Jim Meyering.
156774         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
156775         many older Unixes require this.
156776         * lib/alloca.c (alloca): Remove cast to argument of free;
156777         no longer needed in C89.
156778         * lib/alloca_.h, regex.h: Fix white space to match
156779         what GNU indent does.
156781 2003-08-09  Paul Eggert  <eggert@twinsun.com>
156783         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
156784         apparently Emacs's Unicode mode got confused before my 2003-08-05
156785         checkin.
156787 2003-08-08  Paul Eggert  <eggert@twinsun.com>
156789         * m4/extensions.m4: New file.
156790         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
156791         Require gl_USE_SYSTEM_EXTENSIONS.
156792         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
156793         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
156795 2003-08-08  Paul Eggert  <eggert@twinsun.com>
156797         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
156798         * modules/extensions, modules/gnu-source: New files.
156799         * modules/timespec, modules/unlocked-io: Depend on extensions.
156801 2003-08-07  Paul Eggert  <eggert@twinsun.com>
156803         * modules/restrict: New file.
156804         * MODULES.html.sh (func_all_modules): Add restrict.
156805         * modules/regex: Depend on restrict.
156807 2003-08-07  Paul Eggert  <eggert@twinsun.com>
156809         * m4/restrict.m4: New file.
156810         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
156812 2003-08-07  Bruno Haible  <bruno@clisp.org>
156814         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
156815         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
156817 2003-08-07  Bruno Haible  <bruno@clisp.org>
156819         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
156820         makes the module 'getndelim2' compatible with the module 'getline'.
156822 2003-08-05  Paul Eggert  <eggert@twinsun.com>
156824         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
156825         byte with "\201" to avoid glitches when editing that source file
156826         with multi-gnome-terminal.
156828 2003-08-05  Paul Eggert  <eggert@twinsun.com>
156830         * lib/bumpalloc.h: Remove.
156832 2003-08-05  Paul Eggert  <eggert@twinsun.com>
156834         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
156835         * modules/bumpalloc: Remove.
156837 2003-08-04  Paul Eggert  <eggert@twinsun.com>
156839         * lib/getloadavg.c: Change copyright notice and spacing to conform to
156840         GNU coding style.
156842         Merge from coreutils.
156843         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
156844         1. From glibc.
156845         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
156846         from Karl Berry, implemented by Jim Meyering.
156847         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
156848         from Dmitry V. Levin.
156849         Remove anachronistic cast of xrealloc.
156850         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
156851         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
156852         type. Otherwise, it wouldn't compile with at least /bin/cc on
156853         ymp-cray-unicos9.0.2.X.
156854         Combine two mostly-identical uses of alloca into one.
156855         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
156857 2003-08-04  Dave Love  <d.love@dl.ac.uk>
156859         [From Emacs.]
156861         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
156862         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
156863         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
156864         obsolete NLIST_NAME_UNION.
156865         [__GNU__]: Undef BSD and FSCALE.
156866         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
156868 2003-08-03  Paul Eggert  <eggert@twinsun.com>
156870         * lib/stdbool_.h (_Bool): Make it signed char, instead of
156871         an enum type, so that it's guaranteed to promote to int.  See:
156872         <http://mail.gnu.org/r/bug-gnulib/2003-07/msg00124.html>
156874 2003-08-03  Karl Berry  <karl@gnu.org>
156876         * config/depcomp: update from automake.
156878 2003-07-31  Paul Eggert  <eggert@twinsun.com>
156880         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
156881         (strerror): Don't assume that a printable int fits in 14 bytes.
156883 2003-07-31  Bruno Haible  <bruno@clisp.org>
156885         * modules/getpass-gnu: New file.
156886         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
156888 2003-07-31  Bruno Haible  <bruno@clisp.org>
156890         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
156892 2003-07-24  Karl Berry  <karl@gnu.org>
156894         * config/missing: update from automake.
156896 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
156897             Bruno Haible  <bruno@clisp.org>
156899         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
156900         * lib/getline.c (getline, getdelim): Likewise.
156901         Remove _GNU_SOURCE define; now it's defined in config.h through
156902         m4/getline.m4.
156904 2003-07-23  Karl Berry  <karl@gnu.org>
156906         * config/config.sub: update from prep.
156908 2003-07-22  Paul Eggert  <eggert@twinsun.com>
156910         * modules/xalloc (Depends-on): Add exitfail.
156911         * modules/xmemcoll: Likewise.
156913 2003-07-22  Paul Eggert  <eggert@twinsun.com>
156915         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
156916         over-parenthesization in macros.
156918         Sync with coreutils.
156920         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
156921         required by C99.
156923         Use `exit_failure' for xalloc and xmemcoll instead of their own
156924         private exit-failure variables.
156925         * lib/xalloc.h (xalloc_exit_failure): Remove.
156926         * lib/xmalloc.c: Likewise.  Include exitfail.h.
156927         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
156928         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
156929         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
156930         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
156932 2003-07-20  Jim Meyering  <jim@meyering.net>
156934         * modules/closeout (Depends-on): Add exitfail.
156935         Suggestion from Bruno Haible.
156937 2003-07-19  Karl Berry  <karl@gnu.org>
156939         * config/config.sub: update from prep.
156941 2003-07-18  Paul Eggert  <eggert@twinsun.com>
156943         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
156944         Remove.
156945         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
156946         to test that it can stand by itself.  Include "exitfail.h".
156947         Clients should set exit_failure instead.
156948         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
156950 2003-07-18  Bruno Haible  <bruno@clisp.org>
156952         * modules/getndelim2: New file.
156953         * modules/getline: Share files with module getndelim2.
156954         * modules/getnline: Depend on getndelim2 instead of sharing files with
156955         it. Add getnline.c to lib_SOURCES.
156956         * MODULES.html.sh (func_all_modules): Add getndelim2.
156958 2003-07-18  Bruno Haible  <bruno@clisp.org>
156960         * m4/getndelim2.m4: New file.
156961         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
156962         invoke gl_PREREQ_GETNDELIM2.
156963         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
156964         gl_PREREQ_GETNDELIM2.
156965         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
156966         gl_GETNDELIM2.
156968 2003-07-18  Bruno Haible  <bruno@clisp.org>
156970         * lib/getndelim2.h: New file.
156971         * lib/getndelim2.c: Make into a module of its own. Include config.h,
156972         getndelim2.h.
156973         (getndelim2): Make non-static. Change return type to ssize_t.
156974         * lib/getline.h: Change argument names.
156975         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
156976         * lib/getnline.c: Include getndelim2.h.
156978 2003-07-18  Andreas Schwab  <schwab@suse.de>
156980         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
156982 2003-07-17  Karl Berry  <karl@gnu.org>
156984         * config/config.sub: update from prep.
156986 2003-07-17  Bruno Haible  <bruno@clisp.org>
156988         * modules/getnline: New file.
156989         * modules/getline: Add lib/getndelim2.c to source file list.
156990         * MODULES.html.sh (func_all_modules): Add getnline.
156992 2003-07-17  Bruno Haible  <bruno@clisp.org>
156994         * m4/getnline.m4: New file.
156996 2003-07-17  Bruno Haible  <bruno@clisp.org>
156998         * m4/Makefile.am.in: Remove file.
156999         * m4/Makefile.am: Remove file.
157000         * m4/Makefile.in: Remove file.
157002 2003-07-17  Bruno Haible  <bruno@clisp.org>
157004         * lib/getnline.h: New file.
157005         * lib/getnline.c: New file.
157006         * lib/getndelim2.c: New file, extracted from getline.c.
157007         (getndelim2): Renamed from getdelim2, with added nmax argument.
157008         * lib/getline.c: Include getndelim2.c.
157009         (getdelim2): Moved out to getndelim2.c.
157010         (getline, getdelim): Update.
157012 2003-07-17  Bruno Haible  <bruno@clisp.org>
157014         * lib/Makefile.am: Remove file.
157015         * lib/Makefile.in: Remove file.
157017 2003-07-17  Bruno Haible  <bruno@clisp.org>
157019         * configure.in: Remove file.
157020         * Makefile.in: Remove file.
157022 2003-07-17  Bruno Haible  <bruno@clisp.org>
157024         * MODULES.html.sh: Put the </BODY> right before </HTML>.
157026 2003-07-16  Karl Berry  <karl@gnu.org>
157028         * config/srclist-update: was running fixlicense twice, which caused
157029                 texinfo.tex to be nullified for some reason.  Simplify,
157030                 $gplsrc is no longer needed as far as I can see?
157032 2003-07-16  Jim Meyering  <jim@meyering.net>
157034         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
157036 2003-07-15  Paul Eggert  <eggert@twinsun.com>
157038         * config/srclist.txt: Get the following files from gettext-runtime/intl
157039         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
157040         ref-del.sin.  From Bruno Haible.
157041         * config/srclist-update (fixfile): Change grep pattern again, since the
157042         previous fix didn't work (there was another trailing $).  Use
157043         '[$]' to escape the $s.
157045 2003-07-15  Karl Berry  <karl@gnu.org>
157047         * lib/vasnprintf.c: update from gettext.
157049 2003-07-15  Karl Berry  <karl@gnu.org>
157051         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
157052         gets expanded when surrounded by '$'.
157054 2003-07-15  Jim Meyering  <jim@meyering.net>
157056         * modules/save-cwd: Don't depend on error.  From Derek Price.
157058 2003-07-15  Jim Meyering  <jim@meyering.net>
157060         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
157062 2003-07-14  Simon Josefsson  <jas@extundo.com>
157064         * modules/mempcpy: New file.
157065         * MODULES.html.sh (func_all_modules): Add mempcpy.
157067 2003-07-14  Simon Josefsson  <jas@extundo.com>
157069         * m4/mempcpy.m4: New file.
157071 2003-07-14  Simon Josefsson  <jas@extundo.com>
157073         * lib/mempcpy.h: New file.
157074         * lib/mempcpy.c: New file.
157076 2003-07-14  Paul Eggert  <eggert@twinsun.com>
157078         * modules/getdate, modules/posixtm: Depend on mktime.
157080 2003-07-14  Paul Eggert  <eggert@twinsun.com>
157082         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
157083         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
157084         unicodeio.c, unicodeio.h, unlocked-io.h:
157085         Switch from LGPL to GPL.
157087 2003-07-14  Paul Eggert  <eggert@twinsun.com>
157089         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
157090         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
157091         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
157092         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
157093         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
157094         updated automatically by ../config/srclist-update.  This changes
157095         their license from LPGL to GPL.
157097 2003-07-14  Paul Eggert  <eggert@twinsun.com>
157099         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
157100         assumed to refer to the root of the most recent stable gettext version.
157101         * config/srclistvars.sh: Add defaults for eggert.
157102         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
157103         Match "This program" as well as "The program".  This is needed
157104         for gettext.
157106 2003-07-14  Jim Meyering  <jim@meyering.net>
157108         Don't emit diagnostics.  Let callers do that.
157109         * lib/save-cwd.c: Don't include "error.h".
157110         (save_cwd): Don't call error.  Ensure that errno is valid
157111         when returning nonzero.
157113         * lib/save-cwd.h (restore_cwd): Update prototype.
157114         * lib/save-cwd.c (restore_cwd): Remove two parameters.
157115         Simplify.  Don't call error upon failure.  Let callers do that.
157116         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
157117         when auditing is enabled.  But don't bother updating the #if.
157119 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
157121         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
157122         it breaks C++ compilation.
157123         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
157125 2003-07-10  Simon Josefsson  <jas@extundo.com>
157127         * modules/strchrnul (Makefile.am): Add strchrnul.h.
157129 2003-07-10  Jim Meyering  <jim@meyering.net>
157131         * m4/clock_time.m4: Remove trailing blank.
157132         * m4/intmax_t.m4: Likewise.
157134 2003-07-10  Jim Meyering  <jim@meyering.net>
157136         * lib/vasnprintf.c: Remove trailing blanks.
157137         Make cpp indentation consistent.
157139 2003-07-09  Paul Eggert  <eggert@twinsun.com>
157141         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
157142         posixver.c, strftime.c, strnlen.c, strverscmp.c:
157143         Switch from LGPL to GPL.
157145 2003-07-09  Paul Eggert  <eggert@twinsun.com>
157147         * config/srclist.txt: Sort sublists.  Add
157148         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
157149         that differ from gnulib for one reason or another; we'd like this list
157150         to be smaller but for now let's document what we have.
157152 2003-07-08  Paul Eggert  <eggert@twinsun.com>
157154         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
157155         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
157156         and sweeter "eval x=$x".
157157         * config/srclist.txt: Get lib/argp* from glibc.
157159 2003-07-07  Paul Eggert  <eggert@twinsun.com>
157161         * lib/mktime.c: Fix some boundary cases and remove need for floating
157162         point.
157164         Issue a compile-time diagnostic if time_t is floating point, or if
157165         two's complement arithmetic is not in effect, or if arithmetic
157166         right shift does not propagate the sign.  These assumptions were
157167         all in the original code but they weren't checked.
157169         (TIME_T_MIDPOINT, verify): New macros.
157170         (__isleap): Remove; it has integer overflow problems.
157171         (leapyear): New function, without those problems.
157172         (ydhms_tm_diff): Remove; splitting into two parts.
157173         (ydhms_diff): New function, containing the arithmetic part of
157174         the old ydhms_tm_diff function.  Issue a compile-time
157175         diagnostic if we are not using C99 integer division.
157176         Avoid casts when possible.
157177         (guess_time_tm): New function, containing the checking part of
157178         the old ydhms_tm_diff function.  Return the new value, rather than
157179         the difference between it and the old.  Accept a new argument T
157180         so that *T specifies the old value.  Check for overflow in the result.
157182         (__mktime_internal): Use a time_t offset, not a long int offset.
157183         This undoes the 2003-06-04 change, which is no longer needed now
157184         that we have better overflow checking.
157185         (localtime_offset): Likewise.
157187         (__mktime_internal): Avoid harmful overflow on hosts where time_t
157188         and long are 64-bit but int is only 32-bit.
157189         (ydhms_diff): Use long int to store year1 and yday1.
157190         Issue a compile-time diagnostic if long int is not wide enough.
157192         (__mktime_internal): Use long int to store adjusted year and yday.
157193         Use plain C rather than preprocessor commands, if that doesn't
157194         affect efficiency.
157195         Check for overflow (and try to repair) after each probe
157196         rather than checking only at the very end.  This avoids some bugs
157197         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
157198         does not equal GMT offset at maximum time).
157199         Use integer to check for overflow rather than floating point; this
157200         is more portable to non-IEEE hosts, and is a tad faster.
157201         When we detect that we are oscillating between two values,
157202         don't check whether tm_isdst has the requested value, since
157203         we already know the answer.  When tm_isdst has the wrong value,
157204         use a different heuristic to find the right one, based on the
157205         extreme values actually observed in practice in tz2003a,
157206         rather than the (overly optimistic) "previous 3 calendar quarters".
157208         (not_equal_tm, print_tm, check_result): Use "const T" rather than
157209         "T const" to accommodate glibc style.
157210         (check_result): Use less-confusing report format.  "long" -> "long int.
157211         (main): Likewise.
157212         Don't loop if the iteration overflows time_t.
157213         Allow a negative step in the iteration.
157215 2003-07-06  Karl Berry  <karl@gnu.org>
157217         * config/depcomp: update from automake.
157218         * config/config.sub: update from prep.
157220 2003-07-03  Karl Berry  <karl@gnu.org>
157222         * config/config.guess: update from prep.
157224 2003-07-01  Paul Eggert  <eggert@twinsun.com>
157226         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
157227         xreadlink.c now includes it unconditionally.
157229 2003-07-01  Paul Eggert  <eggert@twinsun.com>
157231         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
157232         having it depend on HAVE_SYS_TYPES_H.
157234 2003-07-01  Bruno Haible  <bruno@clisp.org>
157236         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
157237         <sys/types.h> should be sufficient.
157238         Reported by Paul Eggert.
157240 2003-06-26  Karl Berry  <karl@gnu.org>
157242         * config/depcomp: update from automake.
157244 2003-06-26  Bruno Haible  <bruno@clisp.org>
157246         * modules/human: Depend on module stdbool.
157248 2003-06-25  Bruno Haible  <bruno@clisp.org>
157250         * modules/readlink: New file.
157251         * modules/xreadlink: Depend on it.
157252         * MODULES.html.sh (func_all_modules): Add readlink.
157254 2003-06-25  Bruno Haible  <bruno@clisp.org>
157256         * m4/readlink.m4: New file.
157258 2003-06-25  Bruno Haible  <bruno@clisp.org>
157260         * lib/readlink.c: New file.
157262 2003-06-22  Karl Berry  <karl@gnu.org>
157264         * config/srclist.txt: update mkinstalldirs from automake.
157265         * config/mkinstalldirs: update.
157267 2003-06-22  Bruno Haible  <bruno@clisp.org>
157269         Portability to mingw32.
157270         * m4/ssize_t.m4: New file, from GNU gettext.
157271         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
157272         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
157274 2003-06-22  Bruno Haible  <bruno@clisp.org>
157276         * modules/safe-read: Add m4/ssize_t.m4.
157277         * modules/xreadlink: Add m4/ssize_t.m4.
157279 2003-06-20  Bruno Haible  <bruno@clisp.org>
157281         Assume C89, so PARAMS isn't needed.
157282         * lib/unicodeio.h (PARAMS): Remove.
157283         * lib/unicodeio.c: Don't use PARAMS.
157285 2003-06-18  Karl Berry  <karl@gnu.org>
157287         * config/config.{guess,sub}: update from prep.
157289 2003-06-18  Jim Meyering  <jim@meyering.net>
157291         Merge changes from coreutils.
157292         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
157293         Remove explicit declarations of xmalloc and realloc.
157294         Include xalloc.h.
157295         (read_utmp): Remove anachronistic cast of xmalloc.
157297 2003-06-17  Paul Eggert  <eggert@twinsun.com>
157299         Assume C89, so PARAMS isn't needed.
157300         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
157301         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
157302         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
157303         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
157304         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
157305         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
157306         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
157307         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
157308         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
157309         lib/xstrtod.h, lib/xstrtol.h: Likewise.
157310         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
157311         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
157312         no longer needed. Anyway, config.h should always be included before any
157313         other file.
157315 2003-06-11  Simon Josefsson  <jas@extundo.com>
157317         * modules/sysexits: New file.
157318         * MODULES.html.sh (func_all_modules): Add sysexits.
157320 2003-06-11  Simon Josefsson  <jas@extundo.com>
157322         * lib/sysexit_.h: New file.
157324 2003-06-11  Derek Price  <derek@ximbiot.com>
157326         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
157327         necessary.
157329 2003-06-11  Bruno Haible  <bruno@clisp.org>
157331         * m4/sysexits.m4: New file.
157333 2003-06-10  Simon Josefsson  <jas@extundo.com>
157335         * lib/argp.h: New file, from glibc.
157336         * lib/argp-ba.c: New file, from glibc.
157337         * lib/argp-eexst.c: New file, from glibc.
157338         * lib/argp-fmtstream.c: New file, from glibc.
157339         * lib/argp-fmtstream.h: New file, from glibc.
157340         * lib/argp-fs-xinl.c: New file, from glibc.
157341         * lib/argp-help.c: New file, from glibc.
157342         * lib/argp-namefrob.h: New file, from glibc.
157343         * lib/argp-parse.c: New file, from glibc.
157344         * lib/argp-pv.c: New file, from glibc.
157345         * lib/argp-pvh.c: New file, from glibc.
157346         * lib/argp-xinl.c: New file, from glibc.
157348 2003-06-10  Simon Josefsson  <jas@extundo.com>
157350         * modules/strchrnul: New file.
157352 2003-06-10  Simon Josefsson  <jas@extundo.com>
157354         * modules/argp: New file.
157356 2003-06-10  Simon Josefsson  <jas@extundo.com>
157358         * m4/strchrnul.m4: New file.
157360 2003-06-10  Simon Josefsson  <jas@extundo.com>
157362         * lib/strchrnul.h: New file.
157363         * lib/strchrnul.c: New file.
157365 2003-06-10  Bruno Haible  <bruno@clisp.org>
157367         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
157369 2003-06-07  Karl Berry  <karl@gnu.org>
157371         * config/config.{guess,sub}: update from prep.
157373 2003-06-07  Jim Meyering  <jim@meyering.net>
157375         * modules/strtod: Use $(...) notation, not @...@ for
157376         AC_REPLACE'd variables.
157377         * modules/localcharset: Likewise.
157379 2003-06-07  Jim Meyering  <jim@meyering.net>
157381         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
157382         in place of my name in the copyright comment.
157383         Remove definition and uses of __P.
157385         From coreutils.
157386         * lib/stat.c: Don't declare xmalloc explicitly.
157387         Instead, include "xalloc.h".
157388         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
157389         xrealloc, and xcalloc return values.
157390         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
157391         Improve comment.
157392         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
157394 2003-06-07  Bruno Haible  <bruno@clisp.org>
157396         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
157397         avoid AC_CONFIG_LINKS.
157398         * modules/fnmatch (Makefile.am): Use explicit creation rule for
157399         fnmatch.h, to avoid AC_CONFIG_LINKS.
157400         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
157402 2003-06-07  Bruno Haible  <bruno@clisp.org>
157404         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
157405         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
157406         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
157407         directory.
157408         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
157409         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
157410         directory.
157412 2003-06-06  Jim Meyering  <jim@meyering.net>
157414         Merge from coreutils.
157415         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
157416         Consolidate declarations and initializations of *_base* locals.
157418         Merge from coreutils.
157419         This avoids a core dump on systems without GNU putenv,
157420         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
157421         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
157422         (unsetenv): New static function, from GNU libc.
157423         (rpl_putenv): Use it.
157425         * lib/modechange.c: Remove trailing blanks.
157427         Merge from coreutils.
157428         * lib/fsusage.c: Remove declaration of statfs.
157429         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
157431         * lib/posixtm.c: Include <stdbool.h> unconditionally.
157433 2003-06-06  Jim Meyering  <jim@meyering.net>
157435         * lib/stdbool_.h: Renamed from stdbool.h.in.
157437 2003-06-06  Jim Meyering  <jim@meyering.net>
157438             Bruno Haible  <bruno@clisp.org>
157440         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
157441         Adjust Makefile.am snippet not to redirect directly to target.
157442         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
157444 2003-06-05  Paul Eggert  <eggert@twinsun.com>
157446         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
157447         mismatch, look in future quarters as well as past.  This fixes a
157448         bug when processing fall-backwards gaps immediately after a long
157449         period of daylight-saving time.
157451         * lib/mktime.c: Assume freestanding C89 or better.
157452         (HAVE_LIMITS_H): Remove.  Assume it's 1.
157453         (__P): Remove; not used.
157454         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
157455         (mktime, not_equal_tm, print_tm, check_result,
157456         main): Use prototypes.  Use const * where appropriate.
157457         (main): Fix typo in testing code that uncovered by above changes.
157458         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
157460 2003-06-04  Paul Eggert  <eggert@twinsun.com>
157462         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
157463         locale.h, localeconv.  This merges changes from coreutils.
157465         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
157466         It can be removed after the next Autoconf is released.
157467         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
157468         needed.
157470 2003-06-04  Paul Eggert  <eggert@twinsun.com>
157472         * lib/mktime.c: Fix Debian bug 177940
157473         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
157474         (localtime_offset): Now long int, not time_t, because we want it
157475         to be guaranteed to be signed.  All uses changed.
157476         (__mktime_internal): If overflow would occur when adding offset,
157477         don't add it.
157479         Merge 'human' changes from coreutils.  Rewrite to support
157480         locale-specific notations like thousands separators.
157481         * lib/human.c: Simplify authorship notice.
157482         Include human.h immediately after config.h.
157483         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
157484         <limits.h>: Do not include, since human.h does.
157485         (SIZE_MAX, UINTMAX_MAX): New macros.
157486         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
157487         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
157488         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
157489         (power_letter): Renamed from suffixes.
157490         (generate_suffix_backwards): Remove.
157491         (adjust_value): Now takes int style (because of human.h changes)
157492         and long double value (for greater precision on some platforms).
157493         (group_number): New function.
157494         (human_readable): Use it.  Use integer options, not enum.
157495         Put the options before the sizes in the arg list.
157496         Support all the new options.
157497         The old human_readable function has been removed;
157498         use inttostr.h instead.
157499         (human_readable, default_block_size, humblock):
157500         Use uintmax_t, not int, for block sizes.
157501         (human_readable_inexact, block_size_types): Remove.
157502         (block_size_opts): New constant.
157503         (human_options): Renamed from human_block_size, with new signature
157504         that allows block sizes up to UINTMAX_MAX.  All callers changed.
157505         * lib/human.h: Add copyright and authorship notice.
157506         Include <limits.h> and <stdbool.h> unconditionally.
157507         (PARAMS): Remove.  All uses removed.
157508         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
157509         (enum human_inexact_style): Remove tag; now a nameless enum.
157510         (human_floor, human_ceiling, human_round_to_even): Now have
157511         values 2, 0, 1 rather than -1, 1, 0.
157512         (human_group_digits, human_suppress_point_zero, human_autoscale,
157513         human_base_1024, human_SI, human_B): New constants.
157514         (human_readable_inexact, human_block_size): Remove.
157515         (human_readable): Size args are now uintmax_t, not int.
157516         (human_options): New decl.
157518         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
157519         unnecessary now that we assume C89 or better.  This change
157520         imported from coreutils.
157522         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
157523         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
157524         in the 2003-05-30 sync from glibc.
157526         .h files should stand alone, but we shouldn't include <sys/types.h>
157527         if we can get away with just <stddef.h>.
157529         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
157530         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
157531         rather than <sys/types.h>, as we merely need size_t.
157532         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
157533         to get size_t.
157534         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
157535         Include <stdio.h>, to get FILE.
157536         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
157537         memcasecmp.h has included <stddef.h> and all we need is size_t.
157538         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
157539         our interface, instead of including <sys/types.h>
157541 2003-06-04  Paul Eggert  <eggert@twinsun.com>
157543         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
157544         now, as glibc mktime is buggy on non-glibc systems.
157546 2003-06-03  Karl Berry  <karl@gnu.org>
157548         * config/config.sub: update from prep.
157550 2003-06-02  Paul Eggert  <eggert@twinsun.com>
157552         [from coreutils]
157553         Fix some minor time-related bugs with POSIX time arguments.
157554         Some valid time stamps were being rejected (notably -1, and
157555         time stamps before 1900 on 64-bit hosts).  And some invalid
157556         time stamps were being accepted, e.g. September 31.
157558         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
157559         that we can return (time_t) -1 successfully.
157560         * lib/posixtm.c: Likewise.
157561         [HAVE_STDBOOL_H]: Include <stdbool.h>.
157562         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
157563         (t): Remove static var.
157564         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
157565         of static var.  All uses changed.
157566         (year): Do not reject years before 1900; they can occur with
157567         64-bit time_t.
157568         (posix_time_parse): Do not check for out-of-range components;
157569         that is now the caller's responsibility, since our checks were
157570         only approximations.
157571         (posixtime): Use mktime to check for out-of-range components,
157572         since it knows them exactly.
157573         If mktime returns (time_t) -1, check whether an error actually occurred
157574         by invoking localtime on -1.
157575         (main) [TEST_POSIXTIME]: Check for input data errors, and report
157576         posixtime failures better.
157577         Improve the test data (in comments only).
157579 2003-06-02  Karl Berry  <karl@gnu.org>
157581         * config/mkinstalldirs (version): new variable.
157582         (--version): new option.
157583         (usage): improve message.
157585 2003-05-30  Karl Berry  <karl@gnu.org>
157587         * lib/mktime.c: update from libc.
157589 2003-05-30  Bruno Haible  <bruno@clisp.org>
157591         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
157592         * config/config.rpath: Upgrade to gettext-0.12.1.
157594 2003-05-30  Bruno Haible  <bruno@clisp.org>
157596         * m4/gettext.m4: Upgrade to gettext-0.12.1.
157597         * m4/nls.m4: New file, from gettext-0.12.1.
157598         * m4/po.m4: New file, from gettext-0.12.1.
157599         * m4/progtest.m4: Upgrade to gettext-0.12.1.
157601 2003-05-30  Bruno Haible  <bruno@clisp.org>
157603         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
157604         * lib/localcharset.h: Likewise.
157605         * lib/localcharset.c: Likewise.
157607 2003-05-29  Karl Berry  <karl@gnu.org>
157609         * config/config.rpath: update from gettext.
157611 2003-05-28  Paul Eggert  <eggert@twinsun.com>
157613         Assume the headers required for C89 freestanding compilers.
157614         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
157615         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
157616         * m4/human.m4 (gl_HUMAN): Likewise.
157617         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
157618         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
157619         * m4/userspec.m4 (gl_USERSPEC): Likewise.
157620         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
157621         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
157622         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
157624 2003-05-28  Paul Eggert  <eggert@twinsun.com>
157626         Assume the headers required for C89 freestanding compilers.
157627         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
157628         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
157629         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
157630         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
157631         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
157632         define, since <limits.h> is guaranteed to do that.
157633         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
157634         * lib/exclude.c: Include <stdbool.h> unconditionally.
157635         * lib/tempname.c: Include <stddef.h> unconditionally.
157636         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
157637         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
157638         <stddef.h> does that.
157639         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
157640         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
157641         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
157642         needed.
157643         * lib/xstrtol.c: Likewise.
157644         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
157645         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
157647         * lib/addext.c (addext): Use assignment rather than cast, to avoid
157648         warnings on some platforms.
157650         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
157651         arbitrarily.
157653 2003-05-26  Jim Meyering  <jim@meyering.net>
157655         Merge in a change from coreutils:
157656         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
157657         that is guaranteed to be `no'.  Use `no_such_member' to indicate
157658         that condition, rather than `-1' which is slightly misleading.
157659         Change the name of the cache variable to have the gl_ prefix.
157660         Prompted by a patch from Richard Dawe for DJGPP.
157662 2003-05-24  Karl Berry  <karl@gnu.org>
157664         * config/config.guess: update from prep.
157666 2003-05-22  Karl Berry  <karl@gnu.org>
157668         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
157670 2003-05-20  Karl Berry  <karl@gnu.org>
157672         * config/config.guess: update from prep.
157674 2003-05-18  Karl Berry  <karl@gnu.org>
157676         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
157677         might actually be set by the user.
157679         * config/depcomp, install-sh, mdate-sh: update from automake.
157681 2003-05-17  Bruno Haible  <bruno@clisp.org>
157683         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
157684         invalid expansion for AC_EGREP_CPP.
157685         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
157686         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
157687         Suggested by Akim Demaille <akim@epita.fr> in
157688         http://mail.gnu.org/r/bug-autoconf/2003-05/threads.html
157690 2003-05-12  Jim Meyering  <jim@meyering.net>
157692         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
157693         the space-padded-by-default conversion specifiers, %e, %k, %l.
157695 2003-05-12  Bruno Haible  <bruno@clisp.org>
157697         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
157698         the string is longer than 4 KB.
157700 2003-05-11  Karl Berry  <karl@gnu.org>
157702         * config/config.{guess,sub}: update from prep.
157704 2003-05-09  Bruno Haible  <bruno@clisp.org>
157706         * modules/error: Add m4/strerror_r.m4 to file list.
157708 2003-05-03  Bruno Haible  <bruno@clisp.org>
157710         Upgrade to Unicode-4.0.
157711         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
157712         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
157713         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
157714         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
157715         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
157716         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
157717         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
157718         Change width of U+E0100..U+E01EF from 1 to 0.
157720 2003-04-25  Jim Meyering  <jim@meyering.net>
157722         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
157723         of type size_t, not int.
157725 2003-04-25  Bruno Haible  <bruno@clisp.org>
157727         * lib/copy-file.c: Include <stddef.h>, for size_t.
157729 2003-04-21  Paul Eggert  <eggert@twinsun.com>
157731         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
157732         code which expansion is under static control.  Patch imported from
157733         Akim Demaille's patch to Bison; see
157734         <http://mail.gnu.org/r/bison-patches/2003-03/msg00057.html>.
157736 2003-04-14  Bruno Haible  <bruno@clisp.org>
157738         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
157740 2003-04-11  Jim Meyering  <jim@meyering.net>
157742         Merge changes from Coreutils.
157744         2003-03-22  Jim Meyering  <jim@meyering.net>
157746         * lib/strftime.c (widen): Cast alloca return value to proper type.
157748         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
157750         From GNU libc.
157751         * lib/strftime.c (my_strftime): Handle very large width
157752         specifications for numeric values correctly.  Improve checks for
157753         overflow.
157755         2003-01-19  Jim Meyering  <jim@meyering.net>
157757         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
157758         definitions.
157759         (nl_get_alt_digit) [! defined my_strftime]: Define.
157760         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
157761         _nl_get_alt_digit and _nl_get_walt_digit.
157763         * lib/strftime.c (my_strftime): Merge in locale-related changes from
157764         libc. These changes have no effect outside of _LIBC.
157766 2003-04-10  Bruno Haible  <bruno@clisp.org>
157768         * modules/findprog: New file.
157769         * MODULES.html.sh (func_all_modules): Add it.
157771 2003-04-10  Bruno Haible  <bruno@clisp.org>
157773         * m4/findprog.m4: New file.
157774         * m4/eaccess.m4: New file.
157776 2003-04-10  Bruno Haible  <bruno@clisp.org>
157778         * lib/findprog.h: New file, from GNU gettext.
157779         * lib/findprog.c: New file, from GNU gettext.
157781 2003-04-05  Jim Meyering  <jim@meyering.net>
157783         Merge changes from Coreutils.
157785         * lib/exclude.h (PARAMS): Remove definition and uses.
157786         * lib/exclude.c: Remove uses of `PARAMS'.
157788         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
157789         Add test-cases for DOS filenames. Declare program_name.
157790         (main): Set up program_name.  Patch by Rich Dawe.
157792         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
157793         error from mntctl.
157794         Use mntctl's return value to drive the entry-processing loop, since
157795         we can't rely on the value of the vmt_length member in the last
157796         entry.  On some systems doing so could result in exhausting
157797         virtual memory.  Based in part on a patch from Mike Jetzer.
157799 2003-04-04  Bruno Haible  <bruno@clisp.org>
157801         * modules/linebreak: New file.
157802         * MODULES.html.sh (func_all_modules): Add it.
157804 2003-04-04  Bruno Haible  <bruno@clisp.org>
157806         * m4/linebreak.m4: New file.
157808 2003-04-04  Bruno Haible  <bruno@clisp.org>
157810         * lib/linebreak.h: New file, from GNU gettext.
157811         * lib/linebreak.c: New file, from GNU gettext with slight
157812         modifications.
157813         * lib/lbrkprop.h: New file, from GNU gettext.
157815 2003-04-03  Bruno Haible  <bruno@clisp.org>
157817         * modules/utf8-ucs4: New file.
157818         * modules/utf16-ucs4: New file.
157819         * modules/ucs4-utf8: New file.
157820         * modules/ucs4-utf16: New file.
157821         * MODULES.html.sh (func_all_modules): Add them.
157823 2003-04-03  Bruno Haible  <bruno@clisp.org>
157825         * m4/utf-ucs4.m4: New file.
157826         * m4/ucs4-utf.m4: New file.
157828 2003-04-03  Bruno Haible  <bruno@clisp.org>
157830         * lib/utf8-ucs4.h: New file, from GNU gettext.
157831         * lib/utf16-ucs4.h: New file, from GNU gettext.
157832         * lib/ucs4-utf8.h: New file, from GNU gettext.
157833         * lib/ucs4-utf16.h: New file, from GNU gettext.
157835 2003-04-02  Bruno Haible  <bruno@clisp.org>
157837         * modules/binary-io: New file.
157838         * MODULES.html.sh (func_all_modules): Add it.
157840 2003-04-02  Bruno Haible  <bruno@clisp.org>
157842         * lib/binary-io.h: New file, from GNU gettext.
157844 2003-04-01  Bruno Haible  <bruno@clisp.org>
157846         * modules/pathname: New file.
157847         * MODULES.html.sh (func_all_modules): Add it.
157849 2003-04-01  Bruno Haible  <bruno@clisp.org>
157851         * lib/pathname.h: New file, from GNU gettext.
157852         * lib/concatpath.c: New file, from GNU gettext.
157854 2003-03-30  Bruno Haible  <bruno@clisp.org>
157856         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
157858 2003-03-30  Bruno Haible  <bruno@clisp.org>
157860         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
157861         function chown() doesn't exist.
157863 2003-03-28  Bruno Haible  <bruno@clisp.org>
157865         * modules/copy-file: New file.
157866         * MODULES.html.sh (func_all_modules): Add it.
157868 2003-03-28  Bruno Haible  <bruno@clisp.org>
157870         * m4/copy-file.m4: New file.
157872 2003-03-28  Bruno Haible  <bruno@clisp.org>
157874         * lib/copy-file.h: New file, from GNU gettext.
157875         * lib/copy-file.c: New file, from GNU gettext.
157877 2003-03-18  Jim Meyering  <jim@meyering.net>
157879         * lib/quote.c (quote_n): Fix typo in comment.
157881 2003-03-18  Bruno Haible  <bruno@clisp.org>
157883         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
157884         checking.
157885         * m4/onceonly_2_57.m4: Likewise.
157887 2003-03-17  Bruno Haible  <bruno@clisp.org>
157889         * m4/onceonly.m4: Require autoconf 2.54 or newer.
157890         (m4_quote): Remove macro.
157891         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
157893 2003-03-14  Jim Meyering  <jim@meyering.net>
157895         Merge changes from Coreutils.
157896         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
157897         to be const, in order to avoid warnings.
157898         (obstack_room): Likewise.
157899         (obstack_empty_p): Likewise.
157901 2003-03-14  Bruno Haible  <bruno@clisp.org>
157903         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
157904         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
157906 2003-03-13  Paul Eggert  <eggert@twinsun.com>
157908         Merge changes from Bison.
157909         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
157910         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
157911         when compiling Bison 1.875's `bitset bset = obstack_alloc
157912         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
157913         * lib/hash.c: Include <stdbool.h> unconditionally.
157915 2003-03-13  Paul Eggert  <eggert@twinsun.com>
157917         * m4/onceonly.m4 (m4_quote): New macro.
157918         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
157919         Quote AC_FOREACH variable-expansions properly.
157921 2003-03-13  Paul Eggert  <eggert@twinsun.com>
157923         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
157925 2003-03-09  Paul Eggert  <eggert@twinsun.com>
157927         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
157928         Reported by Bruce Becker; see:
157929         http://mail.gnu.org/r/bug-bison/2003-03/msg00017.html
157931 2003-03-03  Paul Eggert  <eggert@twinsun.com>
157932             Bruno Haible  <bruno@clisp.org>
157934         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
157935         Reported by John Hughes, see
157936         http://mail.gnu.org/r/bug-bison/2003-02/msg00030.html
157938 2003-02-20  Bruno Haible  <bruno@clisp.org>
157940         * MODULES.html.sh (func_all_modules): Add poll.
157942 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
157944         * modules/poll: New file.
157946 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
157948         * lib/poll_.h: New file.
157949         * lib/poll.c: New file.
157951 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
157953         * m4/poll.m4: New file.
157955 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
157957         * modules/mathl: New file.
157959 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
157961         * lib/mathl.h: New file.
157962         * lib/acosl.c: New file.
157963         * lib/asinl.c: New file.
157964         * lib/atanl.c: New file.
157965         * lib/ceill.c: New file.
157966         * lib/cosl.c: New file.
157967         * lib/expl.c: New file.
157968         * lib/floorl.c: New file.
157969         * lib/frexpl.c: New file.
157970         * lib/ldexpl.c: New file.
157971         * lib/logl.c: New file.
157972         * lib/sincosl.c: New file.
157973         * lib/sinl.c: New file.
157974         * lib/sqrtl.c: New file.
157975         * lib/tanl.c: New file.
157976         * lib/trigl.c: New file.
157977         * lib/trigl.h: New file.
157979 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
157981         * m4/mathl.m4: New file.
157983 2003-02-18  Bruno Haible  <bruno@clisp.org>
157985         * MODULES.html.sh (func_all_modules): Add mathl.
157987 2003-02-17  Bruno Haible  <bruno@clisp.org>
157989         * modules/mkdtemp: New module.
157990         * MODULES.html.sh (func_all_modules): Add it.
157992 2003-02-17  Bruno Haible  <bruno@clisp.org>
157994         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
157996 2003-02-17  Bruno Haible  <bruno@clisp.org>
157998         * lib/mkdtemp.h: New file, from GNU gettext.
157999         * lib/mkdtemp.c: New file, from GNU gettext.
158001 2003-02-02  Jim Meyering  <jim@meyering.net>
158003         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
158004         e.g. glibc-2.2.93.
158006 2003-01-31  Bruno Haible  <bruno@clisp.org>
158008         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
158009         'rpl_rename'.
158010         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
158011         'rpl_strnlen'.
158012         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
158013         'rpl_strtod'.
158014         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
158015         'rpl_utime'.
158017 2003-01-31  Bruno Haible  <bruno@clisp.org>
158019         * lib/rename.c: #undef rename before defining rpl_rename.
158020         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
158022 2003-01-30  Bruno Haible  <bruno@clisp.org>
158024         * modules/vasnprintf, modules/vasprintf: New modules.
158025         * MODULES.html.sh (func_all_modules): Add them.
158027 2003-01-30  Bruno Haible  <bruno@clisp.org>
158029         * m4/signed.m4: New file, from GNU gettext.
158030         * m4/longdouble.m4: New file, from GNU gettext.
158031         * m4/wchar_t.m4: New file, from GNU gettext.
158032         * m4/wint_t.m4: New file, from GNU gettext.
158033         * m4/vasnprintf.m4: New file.
158034         * m4/vasprintf.m4: New file.
158036 2003-01-30  Bruno Haible  <bruno@clisp.org>
158038         * lib/printf-args.h: New file, from GNU gettext.
158039         * lib/printf-args.c: New file, from GNU gettext.
158040         * lib/printf-parse.h: New file, from GNU gettext.
158041         * lib/printf-parse.c: New file, from GNU gettext.
158042         * lib/vasnprintf.h: New file, from GNU gettext.
158043         * lib/vasnprintf.c: New file, from GNU gettext.
158044         * lib/asnprintf.c: New file, from GNU gettext.
158045         * lib/vasprintf.h: New file, from GNU gettext with modifications.
158046         * lib/vasprintf.c: New file, from GNU gettext.
158047         * lib/asprintf.c: New file, from GNU gettext.
158049 2003-01-29  Bruno Haible  <bruno@clisp.org>
158051         * modules/stpncpy: New module.
158052         * MODULES.html.sh (func_all_modules): Add it.
158054 2003-01-29  Bruno Haible  <bruno@clisp.org>
158056         * m4/stpncpy.m4: New file.
158058 2003-01-29  Bruno Haible  <bruno@clisp.org>
158060         * lib/stpncpy.h: New file, from GNU gettext with modifications.
158061         * lib/stpncpy.c: New file, from GNU gettext with modifications.
158063 2003-01-28  Bruno Haible  <bruno@clisp.org>
158065         * modules/c-ctype: New module.
158066         * MODULES.html.sh (func_all_modules): Add it.
158068 2003-01-28  Bruno Haible  <bruno@clisp.org>
158070         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
158071         Paul Eggert.
158072         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
158073         Paul Eggert.
158075 2003-01-27  Bruno Haible  <bruno@clisp.org>
158077         * modules/xsetenv: New module.
158078         * MODULES.html.sh (func_all_modules): Add it.
158080 2003-01-27  Bruno Haible  <bruno@clisp.org>
158082         * lib/xsetenv.h: New file, from GNU gettext.
158083         * lib/xsetenv.c: New file, from GNU gettext.
158085 2003-01-23  Jim Meyering  <jim@meyering.net>
158087         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
158088         from working on systems without dirfd (at least Irix and OSF1/Tru64).
158090 2003-01-23  Bruno Haible  <bruno@clisp.org>
158092         * modules/minmax: New module.
158093         * MODULES.html.sh (func_all_modules): Add it.
158095 2003-01-23  Bruno Haible  <bruno@clisp.org>
158097         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
158098         Eggert.
158100 2003-01-22  Bruno Haible  <bruno@clisp.org>
158102         * modules/exit: New module.
158103         * MODULES.html.sh (func_all_modules): Add it.
158105 2003-01-22  Bruno Haible  <bruno@clisp.org>
158107         * lib/exit.h: New file, from GNU gettext.
158109 2003-01-19  Bruno Haible  <bruno@clisp.org>
158111         * gnulib-tool: Recognize option --extract-maintainer.
158112         (func_get_maintainer): New function.
158113         * modules/*: Add Maintainer entry.
158115 2003-01-16  Jim Meyering  <jim@meyering.net>
158117         * m4/regex.m4: The `regex' struct is both input and output.
158118         Initialize it before each use.  Patch by Tim Waugh.
158120 2003-01-16  Bruno Haible  <bruno@clisp.org>
158122         * MODULES.html.sh: Add a table of contents. Add the module name as
158123         leftmost column. Add hyperlinks.
158125 2003-01-15  Bruno Haible  <bruno@clisp.org>
158127         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
158129 2003-01-15  Bruno Haible  <bruno@clisp.org>
158131         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
158132         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
158133         suffix.
158135 2003-01-15  Bruno Haible  <bruno@clisp.org>
158137         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
158139 2003-01-15  Bruno Haible  <bruno@clisp.org>
158141         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
158142         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
158144 2003-01-14  Jim Meyering  <jim@meyering.net>
158146         * lib/same.c (same_name): Tweak a comment.
158148 2003-01-14  Bruno Haible  <bruno@clisp.org>
158150         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
158151         when a string comparison is sufficient.
158153 2003-01-14  Bruno Haible  <bruno@clisp.org>
158155         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
158156         'unsigned int'.
158158 2003-01-14  Bruno Haible  <bruno@clisp.org>
158160         * lib/hash-pjw.c: Add comment about low quality of this function.
158162 2003-01-13  Bruno Haible  <bruno@clisp.org>
158164         * modules/stpcpy: Distribute lib/stpcpy.h.
158165         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
158167 2003-01-13  Bruno Haible  <bruno@clisp.org>
158169         * modules/*: Add a description.
158170         * modules/strpbrk: Fix Makefile.am snippet.
158171         * modules/strtoimax: Fix dependencies.
158172         * modules/strtoumax: Likewise.
158174 2003-01-13  Bruno Haible  <bruno@clisp.org>
158176         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
158177         * modules/alloca (Makefile.am): All object files depend on alloca.h.
158178         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
158180 2003-01-13  Bruno Haible  <bruno@clisp.org>
158182         * gnulib-tool (func_create_testdir): Store config/* files in the main
158183         directory.
158184         * config.rpath: Move to ...
158185         * config/config.rpath: ... here.
158186         * modules/gettext: Contains config/config.rpath, not config.rpath.
158187         * modules/iconv: Likewise.
158189 2003-01-12  Paul Eggert  <eggert@twinsun.com>
158191         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
158192         to avoid collisions with libcurses and libreadline.
158194         * m4/getstr.m4: Remove.
158195         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
158197 2003-01-12  Paul Eggert  <eggert@twinsun.com>
158199         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
158200         to avoid collisions with libcurses and libreadline.
158202         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
158203         * lib/getstr.h, getstr.c: Remove.
158204         * lib/getline.c: Include "getline.h", to check interface.
158205         Move body of old getstr.c here: this defines MIN_CHUNK and
158206         declares getdelim2, which is renamed from getstr.
158207         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
158209         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
158210         All uses changed.
158211         * lib/linebuffer.h: Likewise.
158212         (readline): Remove backward-compatibility macro.
158214 2003-01-12  Paul Eggert  <eggert@twinsun.com>
158216         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
158217         to avoid collisions with libcurses and libreadline.
158218         * getstr: Remove.
158219         * MODULES.html.sh: Remove getstr.
158220         * modules/getline: Depend on unlocked-io, not getstr.
158222 2003-01-12  Jim Meyering  <jim@meyering.net>
158224         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
158226 2003-01-10  Bruno Haible  <bruno@clisp.org>
158228         * modules/alloca: Change Makefile.am requirements. Simplify Include
158229         requirements. Add lib/alloca_.h to file list.
158231 2003-01-10  Bruno Haible  <bruno@clisp.org>
158233         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
158235 2003-01-10  Bruno Haible  <bruno@clisp.org>
158237         * lib/alloca_.h: New file.
158238         * lib/getdate.y: Unconditionally include alloca.h.
158239         * lib/makepath.c: Likewise.
158240         * lib/setenv.c: Likewise.
158241         * lib/userspec.c: Likewise.
158243 2003-01-09  Karl Berry  <karl@gnu.org>
158245         * MODULES.html.sh: include `dirname $0` in PATH, to find
158246         gnulib-tool.
158248 2003-01-09  Bruno Haible  <bruno@clisp.org>
158250         * modules/stdbool: Change configure.ac, Makefile.am requirements.
158251         Simplify Include requirements. Add lib/stdbool.h.in to file list.
158253 2003-01-09  Bruno Haible  <bruno@clisp.org>
158255         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
158257 2003-01-09  Bruno Haible  <bruno@clisp.org>
158259         * lib/stdbool.h.in: New file.
158261 2003-01-09  Bruno Haible  <bruno@clisp.org>
158263         * gnulib-tool (func_all_modules): Ignore files ending in ~.
158264         * MODULES.html.sh: Likewise.
158266 2003-01-08  Jim Meyering  <jim@meyering.net>
158268         * lib/full-write.c: Undefine and define-away `const' after inclusion
158269         of errno.h, not before.  Suggestion from Bruno Haible.
158271 2003-01-08  Bruno Haible  <bruno@clisp.org>
158273         * modules/full-read: Depend on full-write.
158275 2003-01-08  Bruno Haible  <bruno@clisp.org>
158277         * lib/safe-read.c: Include specification header first, to ensure its
158278         selfcontainedness.
158279         * lib/full-write.c: Likewise.
158281 2003-01-07  Jim Meyering  <jim@meyering.net>
158283         * lib/full-write.c: Rework so that it may serve to define full_read,
158284         too.
158285         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
158287 2003-01-07  Bruno Haible  <bruno@clisp.org>
158289         * lib/strtoimax.c: Include <stdint.h> as an alternative to
158290         <inttypes.h>.
158291         * lib/xstrtol.h: Likewise.
158292         * lib/xstrtoimax.c: Likewise.
158293         * lib/xstrtoumax.c: Likewise.
158294         * lib/human.h: Likewise.
158296         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
158297         on systems that have <inttypes.h> but not <stdint.h>.
158299 2003-01-07  Bruno Haible  <bruno@clisp.org>
158301         * MODULES.html.sh: Add copyright notice.
158302         (missed_files): Omit CVS directory entries.
158303         (func_module): Make it work with sed-3.02.
158304         * MODULES.txt: Remove file.
158306 2003-01-06  Jim Meyering  <jim@meyering.net>
158308         * lib/version-etc.c: Update year in translatable copyright string.
158310 2003-01-03  Karl Berry  <karl@gnu.org>
158312         * config/config.{guess,sub}: update from prep.
158314 2003-01-02  Karl Berry  <karl@gnu.org>
158316         * doc/COPYING.DOC: belatedly updated to 1.2.
158318 2003-01-01  Karl Berry  <karl@gnu.org>
158320         * gnulib-tool (func_verify_module): report module name $module in
158321         error message, not $1.
158322         * gnulib-tool (create-testdir): don't complain if destdir couldn't
158323         be created, only if it doesn't exist.
158324         * gnulib-tool (last_checkin_date): don't expand the $Date here.
158326 2002-12-31  Paul Eggert  <eggert@twinsun.com>
158328         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
158330 2002-12-31  Paul Eggert  <eggert@twinsun.com>
158332         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
158333         memcmp if strcoll doesn't work.
158335 2002-12-31  Bruno Haible  <bruno@clisp.org>
158337         * lib/utime.c (utime_null): No need to call ftruncate if the file was
158338         nonempty.
158340 2002-12-31  Bruno Haible  <bruno@clisp.org>
158342         * lib/memcoll.c (STRCOLL): New macro.
158343         (memcoll): Use it.
158345 2002-12-31  Bruno Haible  <bruno@clisp.org>
158347         * lib/localcharset.h: New file.
158348         * lib/localcharset.c: Include it.
158349         * lib/unicodeio.c: Likewise.
158351 2002-12-31  Bruno Haible  <bruno@clisp.org>
158353         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
158354         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
158356 2002-12-31  Bruno Haible  <bruno@clisp.org>
158358         * lib/getline.h: Include <stddef.h>, for size_t.
158360         * lib/unicodeio.h: Include <stddef.h>, for size_t.
158361         * lib/unicodeio.c: Don't include <stddef.h>.
158363 2002-12-31  Bruno Haible  <bruno@clisp.org>
158365         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
158366         HAVE_TM_ZONE.
158368 2002-12-24  Karl Berry  <karl@gnu.org>
158370         * config/config.guess: update from prep.
158372 2002-12-24  Bruno Haible  <bruno@clisp.org>
158374         General infrasructure.
158375         * m4/README: Rewritten.
158376         * m4/onceonly.m4: New file.
158377         * m4/onceonly_2_57.m4: New file.
158379         Module atexit.
158380         * m4/atexit.m4: New file.
158382         Module strtod.
158383         * m4/strtod.m4: New file.
158385         Module strtol.
158386         * m4/strtol.m4: New file.
158388         Module strtoul.
158389         * m4/strtoul.m4: New file.
158391         Module memchr.
158392         * m4/memchr.m4: New file.
158394         Module memcmp.
158395         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
158396         (jm_FUNC_MEMCMP): Invoke it.
158398         Module memcpy.
158399         * m4/memcpy.m4: New file.
158401         Module memmove.
158402         * m4/memmove.m4: New file.
158404         Module memset.
158405         * m4/memset.m4: New file.
158407         Module strcspn.
158408         * m4/strcspn.m4: New file.
158410         Module strpbrk.
158411         * m4/strpbrk.m4: New file.
158413         Module strstr.
158414         * m4/strstr.m4: New file.
158416         Module strerror.
158417         * m4/strerror.m4: New file.
158419         Module mktime.
158420         * m4/mktime.m4: Renamed from jm-mktime.m4.
158421         (gl_PREREQ_MKTIME): New macro.
158422         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
158424         Module malloc.
158425         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
158426         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
158427         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
158429         Module realloc.
158430         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
158431         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
158432         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
158434         Module strftime.
158435         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
158436         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
158437         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
158438         gl_TM_GMTOFF.
158439         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
158441         Module xalloc.
158442         * m4/xalloc.m4: New file.
158444         Module alloca.
158445         * m4/alloca.m4: New file.
158447         Module putenv.
158448         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
158449         (jm_FUNC_PUTENV): Invoke it.
158451         Module setenv.
158452         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
158453         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
158454         when invoked twice.
158455         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
158456         gt_FUNC_SETENV.
158458         Module memrchr.
158459         * m4/memrchr.m4: New file.
158461         Module stpcpy.
158462         * m4/stpcpy.m4: New file.
158464         Module strcase.
158465         * m4/strcase.m4: New file.
158467         Module strdup.
158468         * m4/strdup.m4: New file.
158470         Module strnlen.
158471         * m4/strnlen.m4: New file.
158473         Module strndup.
158474         * m4/strndup.m4: New file.
158476         Module xstrtod.
158477         * m4/xstrtod.m4: New file.
158479         Module xstrtol.
158480         * m4/xstrtol.m4: New file.
158482         Module getdate.
158483         * m4/getdate.m4: New file.
158485         Module unlocked-io.
158486         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
158487         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
158488         * m4/jm-glibc-io.m4n: Remove file.
158490         Module long-options.
158491         * m4/long-options.m4: New file.
158493         Module md5.
158494         * m4/md5.m4: New file.
158496         Module sha.
158497         * m4/sha.m4: New file.
158499         Module getstr.
158500         * m4/getstr.m4: New file.
158502         Module getline.
158503         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
158504         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
158505         <sys/types.h>, for size_t. Use the function name gnu_getline, not
158506         simply getline. Infoke gl_PREREQ_GETLINE.
158508         Module obstack.
158509         * m4/obstack.m4: New file.
158511         Module hash.
158512         * m4/hash.m4: New file.
158514         Module readtokens.
158515         * m4/readtokens.m4: New file.
158517         Module strverscmp.
158518         * m4/strverscmp.m4: New file.
158520         Module stdbool.
158521         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
158522         OSF/1.
158524         Module strtoll.
158525         * m4/strtoll.m4: New file.
158527         Module strtoull.
158528         * m4/strtoull.m4: New file.
158530         Module strtoimax.
158531         * m4/strtoimax.m4: New file.
158533         Module strtoumax.
158534         * m4/strtoumax.m4: New file.
158536         Module xstrtoimax.
158537         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
158538         jm_AC_PREREQ_XSTRTOIMAX.
158539         Moved the strtol prerequisites to strtol.m4.
158540         Moved the strtoll prerequisites to strtoll.m4.
158541         Moved the strtoimax prerequisites to strtoimax.m4.
158543         Module xstrtoumax.
158544         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
158545         jm_AC_PREREQ_XSTRTOUMAX.
158546         Moved the strtoul prerequisites to strtoul.m4.
158547         Moved the strtoull prerequisites to strtoull.m4.
158548         Moved the strtoumax prerequisites to strtoumax.m4.
158550         Module chown.
158551         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
158552         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
158554         Module dup2.
158555         * m4/dup2.m4: New file.
158557         Module ftruncate.
158558         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
158559         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
158561         Module getgroups.
158562         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
158563         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
158565         Module gettimeofday.
158566         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
158567         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
158568         gl_PREREQ_GETTIMEOFDAY.
158570         Module mkdir.
158571         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
158572         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
158574         Module mkstemp.
158575         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
158576         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
158577         jm_AC_TYPE_UINTMAX_T.
158578         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
158580         Module stat.
158581         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
158582         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
158584         Module lstat.
158585         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
158586         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
158588         Module timespec.
158589         * m4/timespec.m4 (gl_TIMESPEC): New macro.
158590         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
158591         * m4/st_mtim.m4: Indentation.
158593         Module nanosleep.
158594         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
158595         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
158596         gl_PREREQ_NANOSLEEP.
158598         Module regex.
158599         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
158600         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
158601         (gl_REGEX): New macro.
158603         Module rename.
158604         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
158605         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
158607         Module rmdir.
158608         * m4/rmdir.m4: New file.
158610         Module utime.
158611         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
158612         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
158613         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
158615         Module dirname.
158616         * m4/dirname.m4: New file.
158618         Module getopt.
158619         * m4/getopt.m4: New file.
158621         Module unistd-safer.
158622         * m4/unistd-safer.m4: New file.
158624         Module fnmatch.
158625         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
158626         declaration.
158627         (gl_PREREQ_FNMATCH_EXTRA): New macro.
158628         (gl_FUNC_FNMATCH_POSIX): New macro.
158629         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
158630         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
158631         simply fnmatch.
158633         Module exclude.
158634         * m4/exclude.m4: New file.
158636         Module human.
158637         * m4/human.m4: New file.
158639         Module acl.
158640         * m4/acl.m4: Nop.
158642         Module backupfile.
158643         * m4/backupfile.m4: New file.
158644         * m4/d-ino.m4: Indentation.
158646         Module fsusage.
158647         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
158648         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
158649         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
158651         Module dirfd.
158652         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
158653         requirements.
158655         Module euidaccess.
158656         * m4/euidaccess.m4: New file.
158658         Module file-type.
158659         * m4/file-type.m4: New file.
158661         Module fileblocks.
158662         * m4/fileblocks.m4: New file.
158664         Module filemode.
158665         * m4/filemode.m4: New file.
158667         Module isdir.
158668         * m4/isdir.m4: New file.
158670         Module lchown.
158671         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
158672         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
158674         Module makepath.
158675         * m4/makepath.m4: New file.
158677         Module modechange.
158678         * m4/modechange.m4: New file.
158680         Module mountlist.
158681         * m4/mountlist.m4: New file.
158682         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
158683         Indentation.
158685         Module path-concat.
158686         * m4/path-concat.m4: New file.
158688         Module pathmax.
158689         * m4/pathmax.m4: New file.
158691         Module same.
158692         * m4/same.m4: New file.
158694         Module save-cwd.
158695         * m4/save-cwd.m4: New file.
158697         Module savedir.
158698         * m4/savedir.m4: New file.
158700         Module xgetcwd.
158701         * m4/xgetcwd.m4: New file.
158702         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
158704         Module xreadlink.
158705         * m4/xreadlink.m4: New file.
158707         Module safe-read.
158708         * m4/safe-read.m4: New file.
158710         Module safe-write.
158711         * m4/safe-write.m4: New file.
158713         Module closeout.
158714         * m4/closeout.m4: New file.
158716         Module stdio-safer.
158717         * m4/stdio-safer.m4: New file.
158719         Module getpass.
158720         * m4/getpass.m4: New file.
158722         Module getugroups.
158723         * m4/getugroups.m4: New file.
158725         Module group-member.
158726         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
158727         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
158729         Module idcache.
158730         * m4/idcache.m4: New file.
158732         Module userspec.
158733         * m4/userspec.m4: New file.
158735         Module gettime.
158736         * m4/clock_time.m4: New file.
158737         * m4/gettime.m4: New file.
158739         Module settime.
158740         * m4/settime.m4: New file.
158742         Module posixtm.
158743         * m4/posixtm.m4: New file.
158745         Module gethostname.
158746         * m4/gethostname.m4: New file.
158748         Module canon-host.
158749         * m4/canon-host.m4: New file.
158751         Module gettext.
158752         * m4/codeset.m4: New file, from gettext-0.11.5.
158753         * m4/gettext.m4: New file, from gettext-0.11.5.
158754         * m4/glibc21.m4: New file, from gettext-0.11.5.
158755         * m4/iconv.m4: New file, from gettext-0.11.5.
158756         * m4/intdiv0.m4: New file, from gettext-0.11.5.
158757         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
158758         * m4/inttypes.m4: New file, from gettext-0.11.5.
158759         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
158760         * m4/isc-posix.m4: New file, from gettext-0.11.5.
158761         * m4/lcmessage.m4: New file, from gettext-0.11.5.
158762         * m4/lib-ld.m4: New file, from gettext-0.11.5.
158763         * m4/lib-link.m4: New file, from gettext-0.11.5.
158764         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
158765         * m4/progtest.m4: New file, from gettext-0.11.5.
158766         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
158767         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
158768         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
158770         Module localcharset.
158771         * m4/localcharset.m4: New file.
158773         Module hard-locale.
158774         * m4/hard-locale.m4: New file.
158776         Module mbswidth.
158777         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
158778         onceonly macros.
158779         * m4/mbrtowc.m4: Add comment.
158781         Module memcasecmp.
158782         * m4/memcasecmp.m4: New file.
158784         Module memcoll.
158785         * m4/memcoll.m4: New file.
158787         Module unicodeio.
158788         * m4/unicodeio.m4: New file.
158790         Module rpmatch.
158791         * m4/rpmatch.m4: New file.
158793         Module yesno.
158794         * m4/yesno.m4: New file.
158796         Module exitfail.
158797         * m4/exitfail.m4: New file.
158799         Module c-stack.
158800         * m4/c-stack.m4 (gl_C_STACK): New macro.
158801         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
158803         Module error.
158804         * m4/error.m4 (gl_ERROR): New macro.
158805         (jm_PREREQ_ERROR): Use onceonly macros.
158807         Module fatal.
158808         * m4/fatal.m4: New file.
158810         Module getloadavg.
158811         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
158812         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
158814         Module getpagesize.
158815         * m4/getpagesize.m4: New file.
158817         Module getusershell.
158818         * m4/getusershell.m4: New file.
158820         Module physmem.
158821         * m4/physmem.m4: New file.
158823         Module posixver.
158824         * m4/posixver.m4: New file.
158826         Module quotearg.
158827         * m4/quotearg.m4: New file.
158829         Module quote.
158830         * m4/quote.m4: New file.
158832         Module readutmp.
158833         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
158835         Module sig2str.
158836         * m4/sig2str.m4: New file.
158838         Other.
158839         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
158840         ulonglong.m4.
158841         * m4/intmax_t.m4: New file.
158842         * m4/d-type.m4: Indentation.
158843         * m4/jm-macros.m4: Update.
158844         * m4/prereq.m4 (jm_PREREQ): Update.
158845         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
158846         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
158847         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
158848         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
158849         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
158850         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
158851         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
158852         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
158853         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
158854         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
158855         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
158856         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
158857         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
158858         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
158859         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
158860         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
158861         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
158862         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
158863         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
158865 2002-12-24  Bruno Haible  <bruno@clisp.org>
158867         * MODULES.txt: Update according to m4/ changes.
158869         Module gettext.
158870         * config.rpath: New file, from gettext-0.11.5.
158872         * modules/*: New module descriptions.
158873         * gnulib-tool: New file.
158874         * MODULES.html.sh: New file.
158876 2002-12-21  Karl Berry  <karl@gnu.org>
158878         * doc/fdl.texi: update to version 1.2.
158880 2002-12-19  Karl Berry  <karl@gnu.org>
158882         * config/config.guess: update from prep.
158884 2002-12-18  Bruno Haible  <bruno@clisp.org>
158886         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
158887         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
158889 2002-12-17  Bruno Haible  <bruno@clisp.org>
158891         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
158892         stdlib.h, string.h.
158894 2002-12-17  Bruno Haible  <bruno@clisp.org>
158896         * lib/canon-host.c (strdup): Remove unused declaration.
158898         * lib/fsusage.c: Include full_read.h.
158899         (get_fs_usage): Use full_read instead of safe_read.
158901         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
158903 2002-12-12  Karl Berry  <karl@gnu.org>
158905         * config/config.guess: update from prep.
158907 2002-12-11  Bruno Haible  <bruno@clisp.org>
158909         * m4/setenv.m4: New file, from gettext-0.11.5.
158911 2002-12-11  Bruno Haible  <bruno@clisp.org>
158913         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
158914         not unsetenv().
158915         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
158916         modifications:
158918         2002-12-11  Bruno Haible  <bruno@clisp.org>
158920                 * setenv.c (alloca): Fall back to malloc.
158921                 (freea): New macro.
158922                 (setenv): Use freea() to free memory allocated with alloca().
158924         2002-11-13  Bruno Haible  <bruno@clisp.org>
158926                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
158927                 function declarations.
158928                 * unsetenv.c (unsetenv): Likewise.
158930         2002-03-04  Bruno Haible  <bruno@clisp.org>
158932                 Portability to AIX 4.3.3.
158933                 * unsetenv.c: New file, extracted from setenv.c.
158934                 * setenv.c: Move the unsetenv() function to unsetenv.c.
158936         2001-12-20  Bruno Haible  <bruno@clisp.org>
158938                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
158939                 use malloc instead. For SunOS 4.
158941         2001-12-11  Bruno Haible  <bruno@clisp.org>
158943                 * setenv.c: Declare alloca.
158944                 (compar_fn_t): New typedef.
158945                 (KNOWN_VALUE, STORE_VALUE): Use it.
158947         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
158948         setenv.h.
158950 2002-12-10  Paul Eggert  <eggert@twinsun.com>
158952         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
158953         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
158954         Choose values that are less likely to collide with system fnmatch
158955         options.
158956         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
158957         defined (e.g., a pure POSIX system).
158958         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
158959         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
158961 2002-12-06  Paul Eggert  <eggert@twinsun.com>
158963         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
158964         a pain in practice to deal with generated m4 files.  This change
158965         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
158967         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
158968         and jm-glibc-io.m4, as they are no longer a special case.
158969         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
158970         kludge and the auto-generation stuff.  Check only whether the
158971         functions are declared, not whether they exist, since older hosts
158972         that don't declare the functions can't use the optimization anyway.
158974 2002-12-06  Jim Meyering  <jim@meyering.net>
158976         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
158978         Merge in changes from libc's misc/error.c, in preparation
158979         for the merge of gnulib's changes back into libc.
158981         * lib/error.c (_): Define only if not already defined.
158982         Move definition to follow all #include directives.
158983         Include unlocked-io.h only if !_LIBC.
158984         [_LIBC]: Include <libio/libioP.h>.
158985         [USE_IN_LIBIO]: Include <libio/iolibio.h>
158986         (fflush): Tweak definition to use INTUSE.
158987         (putc): Define.
158989 2002-12-05  Paul Eggert  <eggert@twinsun.com>
158991         * lib/alloca.c [defined emacs]: Include "lisp.h".
158992         (xalloc_die) [defined emacs]: New macro.
158993         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
158994         [! defined emacs]: Include <xalloc.h>.
158995         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
158996         (pointer): Typedef to POINTER_TYPE *.
158997         (malloc): Remove decl; we now always use xmalloc.
158998         (alloca): Use old-style definition, since Emacs needs this.
158999         Check for arithmetic overflow when computing combined size.
159001 2002-12-04  Paul Eggert  <eggert@twinsun.com>
159003         Do not generate unlocked-io.h automatically, since it's easier to
159004         maintain it by hand.
159006         * lib/unlocked-io.h: New file, from GNU diffutils,
159007         but with proper copyright notice and attribution.
159008         * lib/gen-uio: Remove.
159009         * lib/Makefile.am: Add copyright notice.
159010         (libfetish_a_SOURCES): Add unlocked-io.h.
159011         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
159012         (DISTCLEANFILES, io_functions): Remove macros.
159013         (EXTRA_DIST): Remove gen_uio.
159014         (unlocked-io.h): Remove rule.
159016 2002-12-04  Jim Meyering  <jim@meyering.net>
159018         Reflect the fact that stat.c and lstat.c are no longer generated.
159019         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
159020         (DISTCLEANFILES): Likewise.
159021         (EXTRA_DIST): Likewise.
159022         (all_local): Don't depend on stat.c or lstat.c.
159023         (stat.c, lstat.c): Remove rules.
159024         (EXTRA_DIST): Remove xstat.in.
159026         * lib/xstat.in: Remove file.  Contents moved into stat.c.
159027         * lib/stat.c: New file.  Contents mostly from xstat.in.
159028         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
159029         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
159031         * lib/safe-read.c: Rework so that it may serve to define safe_write,
159032         too.
159033         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
159035 2002-12-03  Jim Meyering  <jim@meyering.net>
159037         * lib/safe-read.c, safe-write.c: Change variable names and comments,
159038         but not semantics, to minimize the differences between these two files.
159039         (safe_read): Change comment to mention SAFE_READ_ERROR.
159041         * lib/safe-read.c (IS_EINTR): Define.
159042         (safe_read): Use IS_EINTR in place of in-function cpp directives.
159044 2002-12-02  Jim Meyering  <jim@meyering.net>
159046         * lib/safe-read.c (EINTR): Define.
159047         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
159048         (INT_MAX): Provide fallback.
159049         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
159051         * lib/safe-read.h (SAFE_READ_ERROR): Define.
159053 2002-12-02  Bruno Haible  <bruno@clisp.org>
159055         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
159056         Define, taken from safe-read.c.
159057         (INT_MAX): Provide fallback.
159058         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
159059         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
159061         * lib/safe-read.c (EINTR): Remove definition.
159062         (safe_read): Don't use EINTR if it is absent.
159064 2002-12-01  Jim Meyering  <jim@meyering.net>
159066         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
159067         zero.
159068         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
159070 2002-11-27  Paul Eggert  <eggert@twinsun.com>
159072         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
159073         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
159074         with `if (! (value < limit)) abort ();', for readability.
159076 2002-11-26  Karl Berry  <karl@gnu.org>
159078         * lib/strdup.c: copy from libc again, with jim's ok.
159079         * lib/.cppi-disable: re-add strdup.c
159081 2002-11-25  Karl Berry  <karl@gnu.org>
159083         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
159084         instead of "strtol.c".
159086 2002-11-25  Karl Berry  <karl@gnu.org>
159088         * config/install-sh: update from automake for variable quoting, $0 in
159089         error msgs, etc.
159091         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
159092         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
159093         entry.
159095 2002-11-25  Jim Meyering  <jim@meyering.net>
159097         * lib/mktime.c: Sync from libc, now that it has the latest fix.
159099 2002-11-24  Karl Berry  <karl@gnu.org>
159101         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
159102         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
159104 2002-11-24  Jim Meyering  <jim@meyering.net>
159106         Update from coreutils:
159108         * lib/mktime.c: Merge in changes from libc.
159110         Avoid a link-time failure on some Linux systems.
159111         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
159112         (otherwise).
159113         (__mon_yday): Declare with the STATIC attribute.
159114         (__mktime_internal): Likewise.
159115         Based on a report from Greg Schafer.
159117 2002-11-23  Jim Meyering  <jim@meyering.net>
159119         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
159120         Use `unsigned', not `int', as type of index.
159122         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
159124         * lib/fsusage.c: Remove unneeded parentheses around operands of
159125         `defined'.
159127 2002-11-22  Paul Eggert  <eggert@twinsun.com>
159129         * lib/quotearg.h: Allow multiple inclusion by surrounding with
159130         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
159131         so that we can be included first.
159132         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
159133         * lib/quotearg.c: Include quotearg.h immediately after config.h.
159134         No need to include stddef.h or sys/types.h any more.
159135         Surround local include files with "", not "<>".
159136         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
159137         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
159138         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
159139         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
159140         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
159141         (ISPRINT): Remove; no longer needed now that we assume C89.
159143         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
159144         Preserve errno.
159146         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
159147         quotearg_char): Use SIZE_MAX rather than
159148         (size_t) -1 when we are talking about "infinity".
159150         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
159152 2002-11-22  Paul Eggert  <eggert@twinsun.com>
159154         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
159155         hint that one should use `if (! x) abort ();' rather than `assert
159156         (x);', and anyway it's one less thing to worry about configuring.
159157         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
159158         hash_rehash, hash_insert): Use abort rather than assert.
159160 2002-11-22  Bruno Haible  <bruno@clisp.org>
159162         * lib/safe-read.h: Assume C89. Add comments.
159163         (safe_read): Change return type to size_t.
159164         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
159165         byte counts > SSIZE_MAX correctly.
159166         * lib/safe-write.h: New file.
159167         * lib/safe-write.c: New file.
159168         * lib/full-read.h: New file.
159169         * lib/full-read.c: New file.
159170         * lib/full-write.h: Assume C89. Add comments.
159171         * lib/full-write.c: Include safe-write.h.
159172         (full_write): Rewritten to use safe_write.
159173         Suggested by Jim Meyering and Paul Eggert.
159175 2002-11-21  Jim Meyering  <jim@meyering.net>
159177         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
159179         Merge in changes from the coreutils.
159181         2002-09-25  Paul Eggert  <eggert@twinsun.com>
159182         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
159183         <stdint.h>.
159184         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
159185         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
159186         int.  Work more efficiently if X is the same width as uintmax_t.
159187         Do not compare X to -1, to avoid bogus compiler warning.
159188         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
159189         Don't assume that f_frsize and f_bsize are the same type.
159191         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
159192         warning on FreeBSD.
159194         * lib/makepath.c (make_path): Restore umask *before* creating the final
159195         component.
159196         (make_path): Minor reformatting.
159198         * lib/xmalloc.c: Adjust to work with new autoconf macros,
159199         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
159200         HAVE_MALLOC/HAVE_REALLOC.
159202         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
159203         dummy ones.  At least on GNU/Linux systems, `auto' means something
159204         else.
159205         From Michael Stone.
159207 2002-11-21  Bruno Haible  <bruno@clisp.org>
159209         Remove case insensitive option matching.
159210         * lib/argmatch.h (argcasematch): Remove declaration.
159211         (ARGCASEMATCH): Remove macro.
159212         (__xargmatch_internal): Remove case_sensitive argument.
159213         (XARGMATCH): Update.
159214         (XARGCASEMATCH): Remove macro.
159215         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
159216         case_sensitive argument.
159217         (argcasematch): Remove function.
159218         (__xargmatch_internal): Remove case_sensitive argument.
159219         (main): Use XARGMATCH instead of XARGCASEMATCH.
159221         * lib/xmalloc.c: Change compile-time error message. Add comment about
159222         required autoconf version.
159224 2002-11-20  Paul Eggert  <eggert@twinsun.com>
159226         Merge argmatch cleanups from Bison.  Assume C89.
159228         * lib/argmatch.c: Include config.h here, not in argmatch.h.
159229         Include stdlib.h, for EXIT_FAILURE.
159230         Always include <string.h>, since we assume C89.
159231         (EXIT_FAILURE): Remove pre-C89 bug workaround.
159232         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
159233         Include <stddef.h> instead, since it's all we need for size_t.
159234         (PARAMS): Remove.  All uses removed.
159235         (ARRAY_CARDINALITY): Do not bother to #undef.
159236         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
159237         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
159238         Remove unnecessary parentheses.
159239         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
159240         Insert necessary parentheses.
159241         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
159242         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
159244 2002-11-19  Bruno Haible  <bruno@clisp.org>
159246         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
159247         * lib/mbswidth.h: Include <stddef.h>, for size_t.
159249         * lib/mbswidth.h (PARAMS): Remove macro.
159250         (mbswidth, mbsnwidth): Use ANSI C function declarations.
159251         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
159253         * lib/gcd.h (PARAMS): Remove macro.
159254         (gcd): Use ANSI C function declarations.
159255         * lib/gcd.c (gcd): Likewise.
159257 2002-11-15  Bruno Haible  <bruno@clisp.org>
159259         * lib/strcspn.c: Include <stddef.h>.
159260         (strcspn): Use ANSI C function declaration. Change return type to
159261         size_t. Use NULL.
159262         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
159263         (strpbrk): Use NULL.
159264         * lib/strpbrk.h (PARAMS): Remove macro.
159265         (strpbrk): Use ANSI C function declaration.
159266         * lib/strstr.c: Don't include <sys/types.h>.
159267         * lib/strstr.h (PARAMS): Remove macro.
159268         (strstr): Use ANSI C function declarations.
159270 2002-11-14  Karl Berry  <karl@gnu.org>
159272         * config/mkinstalldirs: `do' on separate line, instead of
159273         `for var; do'.
159275 2002-11-06  Bruno Haible  <bruno@clisp.org>
159277         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
159278         * lib/gcd.c (gcd): Likewise.
159280 2002-11-05  Bruno Haible  <bruno@clisp.org>
159282         * lib/gcd.h: New file, from gettext-0.11.5.
159283         * lib/gcd.c: New file, from gettext-0.11.5.
159285 2002-11-05  Bruno Haible  <bruno@clisp.org>
159287         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
159288         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
159289         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
159290         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
159292         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
159293         <libintl.h>.
159294         * lib/makepath.c: Include gettext.h instead of <locale.h> and
159295         <libintl.h>.
159297         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
159298         * lib/human.c: Include gettext.h instead of <libintl.h>.
159299         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
159300         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
159301         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
159302         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
159303         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
159304         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
159305         (textdomain): Remove definition.
159306         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
159308         * lib/long-options.c: Remove include of <libintl.h> and definition of
159309         _.
159310         * lib/same.c: Remove include of <libintl.h> and definition of _.
159312 2002-11-04  Owen Taylor  <otaylor@redhat.com>
159314         * lib/config.charset: A few additions for Solaris.
159316 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
159318         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
159319         * lib/localcharset.c (locale_charset): Declare as extern "C".
159321 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
159323         * lib/config.charset: msdos in uk_UA uses CP1125.
159325 2002-11-04  Bruno Haible  <bruno@clisp.org>
159327         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
159328         * lib/strcase.h: New file, from GNU gettext-0.11.5.
159329         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
159330         * lib/strstr.h: New file, from GNU gettext-0.11.5.
159331         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
159333 2002-11-04  Bruno Haible  <bruno@clisp.org>
159335         * lib/localcharset.c (locale_charset): Don't return an empty string.
159337 2002-11-04  Bruno Haible  <bruno@clisp.org>
159339         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
159340         aliases.
159342 2002-11-04  Bruno Haible  <bruno@clisp.org>
159344         * lib/config.charset: Update for newest glibc. Add canonical names
159345         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
159347 2002-11-04  Bruno Haible  <bruno@clisp.org>
159349         * lib/config.charset: Add support for NetBSD.
159351 2002-11-04  Bruno Haible  <bruno@clisp.org>
159353         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
159355 2002-11-01  Bruno Haible  <bruno@clisp.org>
159357         * configure.in: Add AC_CONFIG_AUX_DIR call.
159358         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
159359         test/Makefile.
159360         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
159362 2002-09-28  Karl Berry  <karl@gnu.org>
159364         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
159365         installed automake until the next release, since changes have been
159366         made.
159368 2002-09-25  Karl Berry  <karl@gnu.org>
159370         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
159371         * lib/getopt*: copy from libc/posix.
159372         * lib/gettext.h: copy from gettext.
159373         * lib/.cppi-disable: add strdup.c, gettext.h.
159375 2002-09-25  Karl Berry  <karl@gnu.org>
159377         * config/srclist.txt: enable gettext.h check.
159378         * config/config.{guess,sub}: update from prep.
159379         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
159380                 from automake 1.6.3.
159381         See srclist*.
159383 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
159385         * regex.c (PATFETCH): Remove the translating fetch.
159386         (PATFETCH_RAW): Rename to PATFETCH.
159387         (set_image_of_range): New fun.
159388         (SET_RANGE_TABLE_WORK_AREA): Use it.
159389         (regex_compile): Don't translate the pattern chars so eagerly.
159390         Only do it when inserting an `exactn' bytecode or when handling
159391         a char-range.
159392         (mutually_exclusive_p): Avoid empty statement.
159394 2002-07-06  Jim Meyering  <meyering@lucent.com>
159396         * m4/README: Don't mention Makefile.am.in.
159397         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
159399 2002-07-01  Jim Meyering  <meyering@lucent.com>
159401         * lib/c-stack.c: Include sys/time.h.
159402         From Volker Borchert.
159404 2002-06-26  Paul Eggert  <eggert@twinsun.com>
159406         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
159408 2002-06-26  Paul Eggert  <eggert@twinsun.com>
159410         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
159411         New macro.  Use it uniformly instead of
159412         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
159413         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
159414         reported by Vin Shelton.
159416 2002-06-22  Paul Eggert  <eggert@twinsun.com>
159418         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
159419         Do not assume SA_SIGINFO behavior.
159420         Bug reported by Jim Meyering on NetBSD 1.5.2.
159422 2002-06-22  Jim Meyering  <meyering@lucent.com>
159424         * m4/c-stack.m4: New file, from diffutils-2.8.2.
159425         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
159427         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
159428         now that configure.ac uses AC_GNU_SOURCE.
159429         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
159430         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
159432         Update to latest tools.  Suggestions from Paul Eggert.
159433         * m4/stdbool.m4: New file, from diffutils-2.8.2.
159434         * m4/gnu-source.m4: Update from diffutils-2.8.2.
159435         * m4/fnmatch.m4: Likewise.
159436         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
159437         to AC_HEADER_STDBOOL
159439 2002-06-22  Jim Meyering  <meyering@lucent.com>
159441         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
159442         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
159444 2002-06-22  Jim Meyering  <meyering@lucent.com>
159446         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
159448         * lib/exitfail.c, exitfail.h: Likewise.
159449         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
159451         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
159452         of fnmatch.h.
159453         (EXTRA_DIST): Add fnmatch_loop.c.
159454         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
159456         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
159457         * lib/fnmatch.c: Update from diffutils-2.8.2.
159458         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
159459         * lib/fnmatch.h: Remove file.
159461 2002-06-21  Jim Meyering  <meyering@lucent.com>
159463         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
159464         * m4/mbrtowc.m4: Likewise.
159466         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
159467         * m4/mbswidth.m4: Reflect name change:
159468         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
159469         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
159471         * m4/lib-link.m4: Update from gettext-0.11.2.
159472         * m4/gettext.m4: Likewise.
159474         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
159475         From Alfred M. Szmidt.
159477 2002-06-18  Paul Eggert  <eggert@twinsun.com>
159479         * lib/file-type.h: Report an error if neither S_ISREG nor
159480         S_IFREG is defined, instead of using a test specific to glibc
159481         2.2.  This should be safe, since POSIX requires S_ISREG and
159482         Unix Version 7 had S_IFREG.  We don't need to check for
159483         <sys/types.h> since we don't use any symbols that it defines.
159485 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
159487         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
159488         $@-t, so that each temporary file name is unique and valid in the first
159489         8 characters, for operation under DOS.
159491 2002-06-15  Paul Eggert  <eggert@twinsun.com>
159493         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
159495 2002-06-15  Jim Meyering  <meyering@lucent.com>
159497         Work even with DJGPP 2.03, which lacks support for symlinks.
159498         From Richard Dawe.
159499         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
159500         is defined.
159501         * lib/lchown.c (S_ISLNK): Likewise.
159503 2002-06-15  Jim Meyering  <meyering@lucent.com>
159505         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
159506         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
159507         have been included before this file.
159509 2002-06-14  Jim Meyering  <meyering@lucent.com>
159511         * lib/file-type.h: Use the version from diffutils-2.8.2.
159512         * lib/file-type.c: Likewise.
159514 2002-06-07  Jim Meyering  <meyering@lucent.com>
159516         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
159517         They're needed at least for NetBSD 1.5.2.
159518         ($statxfs_includes): Include those same headers.
159519         ($statxfs_includes): Include sys/vfs.h if available.
159520         ($statxfs_includes): Likewise for sys/statvfs.h.
159521         Check for the following members in both structs statfs and statvfs:
159522         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
159524 2002-06-01  Jim Meyering  <meyering@lucent.com>
159526         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
159527         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
159529 2002-05-28  Jim Meyering  <meyering@lucent.com>
159531         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
159532         Reported by Volker Borchert.
159534 2002-05-27  Jim Meyering  <meyering@lucent.com>
159536         Fix a problem seen only on nonconforming systems whereby ls.c's
159537         use of localtime, and then of gettimeofday would cause trouble:
159538         the localtime call used to initialize rpl_gettimeofday's save
159539         mechanism would clobber ls's current local time information so
159540         that in any long listing the first file would always be listed
159541         with date 1970-01-01.  Analysis by Volker Borchert.
159543         * lib/gettimeofday.c (localtime): Undefine.
159544         (rpl_localtime): New function.
159546 2002-05-27  Jim Meyering  <meyering@lucent.com>
159548         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
159549         localtime.
159551         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
159552         use the replacement function; it wouldn't resolve at link time.
159553         Reported by Volker Borchert.
159555 2002-05-22  Jim Meyering  <meyering@lucent.com>
159557         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
159558         file-type.h.
159559         * lib/file-type.h: New file.
159560         * lib/file-type.c (file_type): New file/function.  Extracted from
159561         diffutils.
159563 2002-04-30  Jim Meyering  <meyering@lucent.com>
159565         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
159567 2002-04-29  Paul Eggert  <eggert@twinsun.com>
159569         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
159571 2002-04-29  Paul Eggert  <eggert@twinsun.com>
159573         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
159574         Do not check for alloca.h (no longer used) or stdbool.h (was never
159575         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
159577 2002-04-29  Paul Eggert  <eggert@twinsun.com>
159579         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
159581 2002-04-29  Jim Meyering  <meyering@lucent.com>
159583         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
159584         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
159585         Use AC_FUNC_STRNLEN here instead.
159587         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
159588         With autoconf-2.53a, it's part of AC_PROG_CC.
159590 2002-04-28  Paul Eggert  <eggert@twinsun.com>
159592         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
159593         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
159595 2002-04-28  Paul Eggert  <eggert@twinsun.com>
159597         * lib/sig2str.h, lib/sig2str.c: New files.
159598         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
159600 2002-04-28  Paul Eggert  <eggert@twinsun.com>
159602         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
159603         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
159604         of 127, since 64 is the largest conceivable number for ancient
159605         nonstandard hosts.
159606         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
159608 2002-04-28  Jim Meyering  <meyering@lucent.com>
159610         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
159612 2002-04-24  Jim Meyering  <meyering@lucent.com>
159614         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
159615         (jm_PREREQ): Use it.
159617         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
159618         mach/mach.h fcntl.h.
159619         Check for this function: setlocale.
159621 2002-04-24  Jim Meyering  <meyering@lucent.com>
159623         * lib/gettext.h: New file, from Gettext.
159624         * lib/Makefile.am (INCLUDES): Remove -I../intl.
159625         (libfetish_a_SOURCES): Add gettext.h.
159627 2002-04-16  Jim Meyering  <meyering@lucent.com>
159629         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
159630         ut_pid, ut_id, ut_exit.
159632 2002-04-16  Jim Meyering  <meyering@lucent.com>
159634         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
159635         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
159636         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
159638 2002-04-12  Jim Meyering  <meyering@lucent.com>
159640         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
159641         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
159642         existence of the getmntinfo function.  Needed for Darwin 5.3.
159644         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
159645         This is necessary at least on Darwin 5.3.
159647         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
159648         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
159649         strnlen.o in the library, and that makes some versions of ranlib
159650         object.
159652 2002-04-12  Jim Meyering  <meyering@lucent.com>
159654         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
159656 2002-04-09  Jim Meyering  <meyering@lucent.com>
159658         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
159659         to be more precise.  Rather than saying we're checking whether the
159660         function `works', say what we're testing.
159661         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
159662         Reported by Bruno Haible.
159664 2002-03-10  Jim Meyering  <meyering@lucent.com>
159666         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
159667         Suggestion from Santiago Vila.
159669 2002-03-08  Jim Meyering  <meyering@lucent.com>
159671         * lib/rename.c: Mention that this wrapper is needed also on
159672         mips-dec-ultrix4.4 systems.
159674 2002-03-02  Jim Meyering  <meyering@lucent.com>
159676         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
159677         not HAVE_CLOCK_SETTIME.
159679 2002-02-27  Paul Eggert  <eggert@twinsun.com>
159681         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
159682         Check for clock_settime.
159684 2002-02-27  Paul Eggert  <eggert@twinsun.com>
159686         * lib/nanosleep.h: Rename to....
159687         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
159689         * lib/gettime.c: New file.
159690         * lib/settime.c: New file.
159691         * lib/stime.c: Remove.
159693         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
159694         timespec.h.  Remove nanosleep.h.
159696 2002-02-25  Paul Eggert  <eggert@twinsun.com>
159698         * m4/acl.m4: New file.
159699         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
159700         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
159702 2002-02-25  Paul Eggert  <eggert@twinsun.com>
159704         * lib/acl.c, lib/acl.h: New files.
159705         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
159707 2002-02-24  Jim Meyering  <meyering@lucent.com>
159709         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
159710         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
159711         cause trouble.  Reported by Nelson Beebe.
159713 2002-02-23  Paul Eggert  <eggert@twinsun.com>
159715         * lib/path-concat.c (xpath_concat): Reorder code to pacify
159716         compilers that don't know that xalloc_die never returns.
159718 2002-02-20  Jim Meyering  <meyering@lucent.com>
159720         * lib/getdate.c: Regenerate using bison-1.33.
159722 2002-02-17  Jim Meyering  <meyering@lucent.com>
159724         * config/config.guess (main): Don't use `head -1'; it's no longer
159725         portable. Use `sed 1q' instead.
159727 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
159729         * m4/codeset.m4: Upgrade to gettext-0.11.
159730         * m4/gettext.m4: Upgrade to gettext-0.11.
159731         * m4/glibc21.m4: Upgrade to gettext-0.11.
159732         * m4/iconv.m4: Upgrade to gettext-0.11.
159733         * m4/isc-posix.m4: Upgrade to gettext-0.11.
159734         * m4/lcmessage.m4: Upgrade to gettext-0.11.
159735         * m4/lib-ld.m4: New file, from gettext-0.11.
159736         * m4/lib-link.m4: New file, from gettext-0.11.
159737         * m4/lib-prefix.m4: New file, from gettext-0.11.
159738         * m4/progtest.m4: Upgrade to gettext-0.11.
159740 2002-02-15  Paul Eggert  <eggert@twinsun.com>
159742         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
159743         (jm_PREREQ): Use it.
159745 2002-02-15  Paul Eggert  <eggert@twinsun.com>
159747         * lib/posixver.c, lib/posixver.h: New files.
159748         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
159750 2002-02-02  Paul Eggert  <eggert@twinsun.com>
159751             Bruno Haible  <bruno@clisp.org>
159753         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
159754         (fwrite_success_callback): New declaration.
159755         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
159756         print_unicode_char. Call failure callback instead of error.
159757         (fwrite_success_callback): New function.
159758         (exit_failure_callback): New function.
159759         (fallback_failure_callback): New function.
159760         (print_unicode_char): Call unicode_to_mb.
159762 2002-01-26  Jim Meyering  <meyering@lucent.com>
159764         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
159765         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
159767 2002-01-26  Jim Meyering  <meyering@lucent.com>
159769         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
159771 2002-01-22  Paul Eggert  <eggert@twinsun.com>
159773         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
159775 2002-01-22  Jim Meyering  <meyering@lucent.com>
159777         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
159778         Otherwise, some versions of automake would omit the rule that makes
159779         Makefile from Makefile.in.
159781 2002-01-21  Paul Eggert  <eggert@twinsun.com>
159783         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
159784         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
159785         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
159786         (memcoll): Set errno to zero if there is no error.
159788         * lib/quotearg.c (quotearg_buffer_restyled):
159789         Fix bug with quoting buffers containing NUL when backslashing escapes.
159790         This bug was exposed by the other changes in this patch.
159791         (quotearg_n_options): New arg ARGSIZE.
159792         All callers changed.
159793         (quoting_options_from_style): New function.
159794         (quotearg_n_style): Use it.
159795         (quotearg_n_style_mem): New function.
159797         * lib/quotearg.h (quotearg_n_style_mem): New function.
159799 2002-01-19  Jim Meyering  <meyering@lucent.com>
159801         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
159802         Remove useless quotes: DF_PROG="df".
159803         * m4/strnlen.m4: New file.
159805 2002-01-16  Paul Eggert  <eggert@twinsun.com>
159807         * lib/backupfile.c (ISDIGIT): Comment fix.
159808         * lib/getdate.y (ISDIGIT): Likewise.
159809         * lib/posixtm.c (ISDIGIT, year): Likewise.
159810         * lib/strverscmp.c (ISDIGIT): Likewise.
159811         * lib/userspec.c (ISDIGIT): Likewise.
159813 2002-01-16  Jim Meyering  <meyering@lucent.com>
159815         * lib/getdate.y: Add three semicolons, each just before a closing
159816         brace. Bison (as of version 1.31) no longer papers over that mistake.
159818 2002-01-05  Jim Meyering  <meyering@lucent.com>
159820         * lib/version-etc.c (version_etc_copyright): Update copyright year.
159822 2001-12-19  Paul Eggert  <eggert@twinsun.com>
159824         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
159825         not silently exit merely because the output buffer happens to
159826         have nothing pending.
159828 2001-12-18  Paul Eggert  <eggert@twinsun.com>
159830         See the big note in ../ChangeLog.
159831         * lib/human.c (suffixes): Prefer K to k for 1024.
159832         (generate_suffix_backwards): New function.
159833         (human_readable_inexact): Use it.
159834         * lib/xstrtol.c (__xstrtol): If there is no number but there
159835         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
159836         Accept 'K' as well as 'k'.
159838 2001-12-15  Jim Meyering  <meyering@lucent.com>
159840         * lib/regex.h (__restrict_arr): Update from libc.
159842         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
159843         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
159844         (STREQ): Define.
159846 2001-12-14  Jim Meyering  <meyering@lucent.com>
159848         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
159849         Suggestion from Bruno Haible.
159851 2001-12-10  Jim Meyering  <meyering@lucent.com>
159853         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
159854         xrealloc, Instead, include "xalloc.h".
159855         (initbuffer): Don't cast xmalloc return value to char*.
159856         (readline): Reword comment.
159857         Don't cast xrealloc return value to char*
159858         Return NULL, not 0.
159860 2001-12-09  Jim Meyering  <meyering@lucent.com>
159862         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
159863         about `signed and unsigned type in conditional expression'.
159864         * lib/posixtm.c (posix_time_parse): Likewise.
159866         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
159868         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
159869         to avoid a pedantic warning.
159871         * lib/getstr.c: Don't include assert.h.
159872         (getstr): Remove warning-evoking assertions.
159873         Return -1 if offset parameter is out of bounds.
159874         Change the type of a local from int to size_t.
159876         * lib/strftime.c (my_strftime_localtime_r): Include this function
159877         definition in the `#if ! HAVE_TM_GMTOFF' block.
159879         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
159880         Include xalloc.h instead.
159882 2001-12-02  Jim Meyering  <meyering@lucent.com>
159884         * lib/tempname.c: Don't declare getenv, thus reverting the change of
159885         2001-11-18.  It's no longer necessary, now that stdlib.h is always
159886         included.
159888         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
159889         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
159891 2001-11-30  Akim Demaille  <akim@epita.fr>
159893         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
159894         before being defined.
159896 2001-11-27  Paul Eggert  <eggert@twinsun.com>
159898         * lib/quotearg.h (quotearg_n, quotearg_n_style):
159899         First arg is int, not unsigned.
159900         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
159901         (SIZE_MAX, UINT_MAX): New macros.
159902         (quotearg_n_options): Abort if N is negative.
159903         Avoid overflow check on hosts where size_t is 64 bits and int
159904         is 32 bits, as overflow is impossible there.
159905         Fix off-by-one typo that caused unnecessary reallocation.
159907 2001-11-27  Jim Meyering  <meyering@lucent.com>
159909         * lib/tempname.c: Merge with version from libc.
159910         * lib/regex.c: Likewise.
159912         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
159913         systems for which STDC_HEADERS is 0, it was not included, resulting in
159914         a warning about an integer-to-pointer conversion problem with getenv.
159915         Reported by Volker Borchert.
159917 2001-11-26  Jim Meyering  <meyering@lucent.com>
159919         * lib/gtod.h: Remove file.
159920         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
159921         * lib/gettimeofday.c: Don't include gtod.h.
159922         (GTOD_init): Remove function.
159923         (rpl_gettimeofday): Do its job here instead, rather than aborting.
159924         Suggestion from Volker Borchert.
159926 2001-11-23  Jim Meyering  <meyering@lucent.com>
159928         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
159929         it.
159930         * lib/hash.c (struct hash_table): Define it here instead.
159932 2001-11-22  Jim Meyering  <meyering@lucent.com>
159934         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
159936 2001-11-20  Jim Meyering  <meyering@lucent.com>
159938         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
159939         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
159941 2001-11-19  Jim Meyering  <meyering@lucent.com>
159943         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
159944         directory.  Use "conftestXXXXXX" as the template.
159945         Suggestion from Paul Eggert.
159947         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
159948         immediately, so the test doesn't mistakenly hit the max-open-files
159949         limit.
159951 2001-11-18  Paul Eggert  <eggert@twinsun.com>
159953         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
159954         (TEMPORARIES): New macro.
159955         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
159956         removes an artificial limitation (e.g. HP-UX 10.20, where
159957         TMP_MAX is 17576).
159959 2001-11-18  Jim Meyering  <meyering@lucent.com>
159961         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
159963 2001-11-18  Jim Meyering  <meyering@lucent.com>
159965         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
159966         on SunOS 4.
159968         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
159969         files will be created before anything else.
159971 2001-11-17  Paul Eggert  <eggert@twinsun.com>
159973         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
159974         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
159976 2001-11-17  Jim Meyering  <meyering@lucent.com>
159978         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
159979         Prompted by a report from Bob Proulx.
159981         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
159982         Instead, require UTILS_FUNC_MKSTEMP.
159984 2001-11-17  Jim Meyering  <meyering@lucent.com>
159986         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
159987         Now, that's done as part of AC_FUNC_STRTOD.
159989 2001-11-17  Jim Meyering  <meyering@lucent.com>
159991         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
159992         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
159993         rather than group writable.  Patch by Juan F. Codagnone.
159995         * lib/readtokens.c: Remove explicit declarations of xmalloc and
159996         xrealloc, Instead, include "xalloc.h".
159998         * lib/mountlist.c: Include unlocked-io.h after all system headers.
159999         Remove explicit declarations of xmalloc, xrealloc,
160000         and xstrdup.  Instead, include "xalloc.h".
160002         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
160003         unlocked-io.h.
160004         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
160005         Likewise.
160006         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
160008         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
160009         Reported by Padraig Brady.
160011         * lib/mkstemp.c: #undef mkstemp.
160012         Include config.h.
160013         (rpl_mkstemp): Rename from mkstemp.
160014         Protoize.
160016 2001-11-16  Jim Meyering  <meyering@lucent.com>
160018         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
160019         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
160020         determine the amount of total physical memory, use pstat_getstatic.
160021         HPUX-11 doesn't define _SC_PHYS_PAGES.
160022         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
160023         If sysconf couldn't be used to determine the amount of available
160024         physical memory, use both pstat_getstatic and pstat_getdynamic.
160025         Based on a patch from Bob Proulx.
160027 2001-11-10  Jim Meyering  <meyering@lucent.com>
160029         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
160030         (jm_PREREQ): Use it.
160032 2001-11-09  Jim Meyering  <meyering@lucent.com>
160034         * m4/jm-macros.m4: Require autoconf-2.52f.
160035         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
160036         Use these AC_-prefixed names, not the AM_-prefixed ones.
160038         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
160040 2001-11-05  Jim Meyering  <meyering@lucent.com>
160042         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
160044 2001-11-04  Jim Meyering  <meyering@lucent.com>
160046         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
160047         $DEFS.
160049 2001-11-03  Jim Meyering  <meyering@lucent.com>
160051         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
160052         of AC_DEFUN.
160054         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
160055         know the name of the variable in the macro definition.
160057 2001-11-03  Jim Meyering  <meyering@lucent.com>
160059         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
160060         in argmatch_to_argument call.
160062         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
160063         argument.
160065         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
160066         e.g., a fault due to an attempt to free a NULL pointer.
160068 2001-11-01  Jim Meyering  <meyering@lucent.com>
160070         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
160071         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
160073 2001-11-01  Jim Meyering  <meyering@lucent.com>
160075         * lib/dirfd.c, lib/dirfd.h: New files.
160076         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
160078         * lib/hash.c (hash_print) [TESTING]: Clean up.
160080 2001-10-22  Paul Eggert  <eggert@twinsun.com>
160082         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
160083         to avoid a warning if -Wall.
160085 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
160087         * README: New file
160088         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
160089         (per RMS's instructions, this is now the canonical source)
160090         * lgpl/, gpl/: New directories.
160092 2001-10-21  Paul Eggert  <eggert@twinsun.com>
160094         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
160096 2001-10-21  Jim Meyering  <meyering@lucent.com>
160098         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
160099         this code would end up calling gettext even in packages built
160100         with --disable-nls.
160101         * lib/getopt.c (_): Likewise.
160102         * lib/regex.c (_): Likewise.
160104 2001-10-20  Paul Eggert  <eggert@twinsun.com>
160106         * m4/error.m4 (jm_PREREQ_ERROR):
160107         Do not invoke AC_CHECK_FUNCS with strerror_r, as
160108         AC_FUNC_STRERROR_R does that.
160109         Check for strerror declaration.
160111         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
160112         are supposed to have them these days.
160113         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
160114         Merge changes from latest Autoconf CVS.
160115         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
160116         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
160117         POSIX decided to standardize on the int flavor of strerror_r.
160119 2001-10-20  Paul Eggert  <eggert@twinsun.com>
160121         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
160122         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
160123         Use strerror_r that is only a macro, even if it is not a function.
160124         (strerror): Check for HAVE_DECL_STRERROR before declaring.
160125         (private_strerror): Use prototypes, not old-style function definition.
160126         (print_errno_message): New function.
160127         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
160128         char*-flavored one.
160129         (error_tail, error, error_at_line): Use it.
160131 2001-10-11  Jim Meyering  <meyering@lucent.com>
160133         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
160134         and quote_n (1, ... to avoid clobbering a buffer.
160136 2001-10-05  Jim Meyering  <meyering@lucent.com>
160138         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
160139         hash-pjw.h.
160140         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
160141         * lib/hash-pjw.h: New file.
160143 2001-09-30  Jim Meyering  <meyering@lucent.com>
160145         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
160146         `struct fsstat' has the `f_fstypename' member.
160147         Use that to define FS_TYPE, which is now used to make
160148         the getfsstat link test tighter.
160150 2001-09-30  Jim Meyering  <meyering@lucent.com>
160152         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
160153         Include <sys/ucred.h>, for Apple Darwin.
160154         Include sys/mount.h and sys/fs_types.h only if available.
160155         (FS_TYPE): Define.
160156         (read_filesystem_list): Use FS_TYPE.
160158 2001-09-29  Paul Eggert  <eggert@twinsun.com>
160160         * lib/exclude.c (excluded_filename): 0 -> false, since it's
160161         a boolean context.
160163 2001-09-29  Jim Meyering  <meyering@lucent.com>
160165         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
160166         [one-argument getmntent function]): Include stdio.h before mntent.h.
160167         SunOS 4.1.x needs it for the declaration of `FILE'.
160168         Patch by Volker Borchert.
160170         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
160171         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
160172         sys/fs_types.h, and make the link-test for getfsstat guard #include
160173         directives with appropriate #if HAVE_*_H tests so that we can
160174         detect getfsstat on Apple Darwin1.3.7 systems.
160175         Reported by Nelson Beebe.
160176         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
160178 2001-09-28  Paul Eggert  <eggert@twinsun.com>
160180         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
160181         #defines strtoimax.  Also treat the other strto* functions
160182         like strtoimax.
160184         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
160185         Check for strtoul and strtoumax,
160186         as those declarations are made even in the signed case.
160187         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
160188         Likewise, for strtol and strtoimax.
160190 2001-09-28  Paul Eggert  <eggert@twinsun.com>
160192         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
160193         #defines strtoimax.  Also treat the other strto* functions
160194         like strtoimax.
160196         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
160197         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
160198         (strtoimax, strtoumax): Do not declare if already defined as a macro.
160200 2001-09-26  Jim Meyering  <meyering@lucent.com>
160202         Most macros in unlocked-io.h had the wrong number of arguments.
160203         * lib/gen-uio: New script.
160204         (USE_UNLOCKED_IO): Define to 1 if not already defined.
160205         * lib/unlocked-io.hin: Remove file.
160206         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
160207         rather than trying to embed it here.
160208         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
160209         Reported by Padraig Brady.
160211 2001-09-25  Volker Borchert  <bt@teknon.de>
160213         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
160214         `result'.
160216 2001-09-24  Jim Meyering  <meyering@lucent.com>
160218         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
160220 2001-09-23  Jim Meyering  <meyering@lucent.com>
160222         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
160223         instead of the mere test for existence of mntent.h.  The latter
160224         would get a false-positive on AIX 3.4 systems.
160225         In the outer getmntent if-block, don't die if neither of the getmntent
160226         tests succeeds.  Instead, just fall through and continue with the
160227         remaining tests.
160229 2001-09-23  Jim Meyering  <meyering@lucent.com>
160231         * lib/mountlist.c: Remove useless parentheses in #if directives.
160232         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
160233         the deprecated MOUNTED symbol is no longer defined in mntent.h.
160235 2001-09-22  Jim Meyering  <meyering@lucent.com>
160237         * m4/gettext.m4: New file.  From gettext.
160238         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
160239         * m4/progtest.m4: Likewise
160240         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
160241         * m4/glibc21.m4: Likewise.
160243         * m4/libintl.m4: Remove.  No longer used.
160245 2001-09-22  Jim Meyering  <meyering@lucent.com>
160247         * lib/localcharset.c: Update from latest gettext.
160248         * lib/config.charset: Likewise.
160250 2001-09-20  Jim Meyering  <meyering@lucent.com>
160252         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
160253         strtoimax.
160254         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
160255         strtoumax.
160257 2001-09-20  Jim Meyering  <meyering@lucent.com>
160259         * lib/xstrtol.c (strtoimax): Guard declaration with
160260         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
160261         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
160262         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
160263         (strtoumax): Likewise, for completeness (it wasn't necessary).
160265 2001-09-17  Paul Eggert  <eggert@twinsun.com>
160267         * lib/strtoimax.c (HAVE_LONG_LONG):
160268         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
160269         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
160270         to work around bug in IBM C compiler.
160272 2001-09-17  Jim Meyering  <meyering@lucent.com>
160274         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
160275         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
160276         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
160277         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
160278         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
160279         whenever the right hand side need not be expanded by the shell.
160281 2001-09-16  Paul Eggert  <eggert@twinsun.com>
160283         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
160284         library.  It's not correct, as some older glibcs are buggy.
160285         fnmatch wasn't fixed until glibc 2.2.
160287         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
160288         special shell magic here.
160290 2001-09-16  Jim Meyering  <meyering@lucent.com>
160292         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
160293         * m4/jm-macros.m4: Require it.
160295 2001-09-16  Jim Meyering  <meyering@lucent.com>
160297         * lib/mkdir.c: New file.
160299 2001-09-15  Jim Meyering  <meyering@lucent.com>
160301         * m4/jm-macros.m4: Check for help2man.
160303 2001-09-11  Jim Meyering  <meyering@lucent.com>
160305         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
160306         The body, by Paul Eggert, was moved here from configure.in.
160307         * m4/jm-macros.m4: Require UTILS_HOST_OS.
160309 2001-09-04  Paul Eggert  <eggert@twinsun.com>
160311         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
160312         (jm_PREREQ): Use it.
160314 2001-09-04  Paul Eggert  <eggert@twinsun.com>
160316         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
160317         Use ssize_t, not int, to store result of readlink.
160318         Check for ssize_t overflow as well as size_t overflow,
160319         as POSIX says the result of readlink is implementation-defined
160320         when ssize_t overflows.
160321         Remove unnecessary cast to char*.
160322         Use free+malloc instead of realloc, as the storage doesn't need
160323         to be preserved and it's clearer and can be more efficient that way.
160324         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
160325         * lib/xreadlink.h (xreadlink): Update prototype.
160327 2001-09-04  Paul Eggert  <eggert@twinsun.com>
160329         * lib/xgetcwd.c: Revert some of the previous change; intead,
160330         fix the HAVE_GETCWD_NULL code to behave more like the
160331         !HAVE_GETCWD_NULL code used to.
160333         Include "xalloc.h".
160334         (xgetcwd): Do not return NULL when memory is exhausted; instead,
160335         invoke xalloc_die.
160337 2001-09-03  Paul Eggert  <eggert@twinsun.com>
160339         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
160340         sys/param.h, as pathmax.h includes them.
160342 2001-09-03  Paul Eggert  <eggert@twinsun.com>
160344         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
160345         (jm_PREREQ_XGETCWD): New macro.
160347         * m4/getcwd.m4: New file.
160349 2001-09-03  Paul Eggert  <eggert@twinsun.com>
160351         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
160352         like the HAVE_GETCWD_NULL code.
160353         Include pathmax.h if not HAVE_GETCWD.
160354         Do not include xalloc.h.
160355         (INITIAL_BUFFER_SIZE): New symbol.
160356         Do not use xmalloc / xrealloc, since the caller is responsible for
160357         handling errors.  Preserve errno around `free' during failure.
160358         Do not overrun buffer when using getwd.
160360 2001-09-03  Paul Eggert  <eggert@twinsun.com>
160362         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
160363         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
160364         getcwd (NULL, 0).
160366 2001-09-03  Paul Eggert  <eggert@twinsun.com>
160368         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
160369         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
160370         spotted by Jim Meyering.
160372 2001-09-03  Jim Meyering  <meyering@lucent.com>
160374         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
160375         failure.
160377 2001-09-02  Jim Meyering  <meyering@lucent.com>
160379         * lib/error.c: Update from GNU libc.
160381 2001-09-01  Jim Meyering  <meyering@lucent.com>
160383         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
160384         Used by df.
160386 2001-09-01  Jim Meyering  <meyering@lucent.com>
160388         * lib/xreadlink.c: New file.
160389         * lib/xreadlink.h: New file.
160390         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
160391         xreadlink.h.
160393         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
160394         doesn't conflict with sparc Solaris 7's definition in
160395         /usr/include/sys/int_types.h.
160397         * lib/exclude.c: Use `""', not `<>' to #include non-system header
160398         files.
160399         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
160400         and strncasecmp as r-values.  Unixware didn't have declarations.
160402 2001-08-31  Paul Eggert  <eggert@twinsun.com>
160404         * lib/xstrtol.h: Add copyright notice.
160405         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
160406         LONGINT_INVALID_SUFFIX_CHAR.
160408 2001-08-31  Paul Eggert  <eggert@twinsun.com>
160410         * lib/xstrtol.c (strtoimax): New decl.
160412 2001-08-31  Paul Eggert  <eggert@twinsun.com>
160414         * lib/xgetcwd.c: Don't include pathmax.h.
160415         Include stdlib.h and unistd.h if available.
160416         Include xalloc.h.
160417         (xmalloc, xstrdup, free): Remove decls.
160418         (xgetcwd): Don't assume sizes fit in unsigned.
160419         Check for overflow when computing sizes.
160420         Simplify reallocation code.
160422 2001-08-31  Paul Eggert  <eggert@twinsun.com>
160424         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
160425         a directory's st_size can have an arbitrary value, so the old
160426         usage could waste an arbitrary amount of memory.  All uses
160427         changed.
160428         * lib/savedir.h: Update prototype.
160430 2001-08-31  Paul Eggert  <eggert@twinsun.com>
160432         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
160434         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
160435         old strtoimax.c.
160437         Also, make the following further changes to make this file's
160438         configuration more similar to that of strtol.c:
160439         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
160440         (strtoumax, uintmax_t, strtoull, strtol): Remove.
160441         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
160442         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
160443         changed to signed values.
160445         And make the following changes as well:
160446         Fix copyright notice, as 1999 was missing.
160447         (verify): New macro.
160448         (strtoimax): Check sizes at compile-time, not run-time.
160449         Prefer strtol to strtoll if both work.
160450         (main): Remove; it was not that useful and was a pain to maintain.
160452         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
160454 2001-08-31  Jim Meyering  <meyering@lucent.com>
160456         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
160457         Use an initial, malloc'd, buffer of length 128 rather than
160458         a statically allocated one of length 1024.
160460 2001-08-30  Paul Eggert  <eggert@twinsun.com>
160462         Simplify code, partly by assuming autoconf 2.52 semantics.
160464         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
160466         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
160467         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
160468         All uses removed.
160469         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
160470         Move AC_REQUIRE to next-to-top level, to avoid confusion.
160471         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
160472         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
160473         jm_AC_HEADER_INTTYPES_H.
160474         * m4/jm-macros.m4 (jm_MACROS): Likewise.
160476         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
160478         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
160479         Quote first arg of AC_DEFUN.
160480         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
160481         since they are needed to parse the include file even if we need
160482         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
160483         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
160484         but with opposite signedness.
160486 2001-08-30  Paul Eggert  <eggert@twinsun.com>
160488         Merge 'exclude' changes from tar 1.13.22.
160489         This fixes one or two unlikely storage allocation overflow bugs,
160490         but doesn't change user-visible behavior otherwise.
160492 2001-08-30  Paul Eggert  <eggert@twinsun.com>
160494         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
160495         (jm_PREREQ_EXCLUDE): New macro.
160497 2001-08-30  Paul Eggert  <eggert@twinsun.com>
160499         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
160500         tm to be declared.
160502 2001-08-30  Paul Eggert  <eggert@twinsun.com>
160504         * lib/hash.c: Remove '2001' from copyright notice.
160506 2001-08-30  Paul Eggert  <eggert@twinsun.com>
160508         * lib/full-write.h: New file.
160509         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
160510         * lib/full-write.c: Correct credits, as cccp.c no longer
160511         exists and anyway it was so heavily changed from the old cccp
160512         code as to be unrecognizable.  Include full-write.h.
160513         (full_write): Return size_t, with short writes meaning failure.
160514         All callers changed.  This fixes a bug with large buffers
160515         on 64-bit hosts.
160516         * lib/utime.c: Include full-write.h.
160518 2001-08-30  Paul Eggert  <eggert@twinsun.com>
160520         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
160521         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
160522         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
160523         Include if available.
160524         (<xalloc.h>): Include
160525         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
160526         (verify): New macro.  Use it to verify that EXCLUDE macros do not
160527         collide with FNM macros.
160528         (struct patopts): New struct.
160529         (struct exclude): Use it, as exclude patterns now come with options.
160530         (new_exclude): Support above changes.
160531         (new_exclude, add_exclude_file):
160532         Initial size must now be a power of two to simplify overflow checking.
160533         (free_exclude, fnmatch_no_wildcards): New function.
160534         (excluded_filename): No longer requires options arg, as the options
160535         are determined by add_exclude.  Now returns bool, not int.
160536         (excluded_filename, add_exclude):
160537         Add support for the fancy new exclusion options.
160538         (add_exclude, add_exclude_file): Now takes int options arg.
160539         Check for arithmetic overflow when computing sizes.
160540         (add_exclude_file): xrealloc might modify errno, so don't
160541         realloc until after errno might be used.
160543         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
160544         New macros.
160545         (free_exclude): New decl.
160546         (add_exclude, add_exclude_file): Now takes int options arg.
160547         (excluded_filename): No longer requires options arg, as the options
160548         are determined by add_exclude.  Now returns bool, not int.
160550 2001-08-30  Paul Eggert  <eggert@twinsun.com>
160552         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
160554 2001-08-27  Jim Meyering  <meyering@lucent.com>
160556         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
160558         * lib/version-etc.c (N_): Remove definition.
160559         Revert most of last change.
160560         Instead, simply don't mark the `Copyright...' string for translation.
160561         Based on advice from Paul Eggert.
160563         * lib/strtoxmax.c: Tweak comment.
160565 2001-08-26  Jim Meyering  <meyering@lucent.com>
160567         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
160569         * m4/xstrtoimax.m4: New file.
160570         * m4/xstrtoumax.m4: Add comments explaining why we
160571         AC_REPLACE_FUNCS(strtol).
160573 2001-08-26  Jim Meyering  <meyering@lucent.com>
160575         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
160576         of copyright with `%s' so translators don't get an untranslated
160577         message in 2002.
160578         (COPYRIGHT_YEAR): Define.
160579         (version_etc): Use fprintf rather than fputs.
160580         Suggestion from Ulrich Drepper.
160582         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
160584         * lib/strtoll.c: New file, from GNU libc.
160585         * lib/xstrtoimax.c: New file.
160587         * lib/xstrtol.h: Add xstrtoimax.
160588         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
160589         * lib/strtoimax.c: New file.  Likewise, but first define
160590         STRTOUXMAX_SIGNED.
160592         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
160593         ...
160594         * lib/strtoxmax.c: ... then renamed to this.
160596 2001-08-18  Paul Eggert  <eggert@twinsun.com>
160598         * m4/inttypes.m4: Add AC_PREREQ(2.13).
160599         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
160600         (jm_AC_TYPE_INTMAX_T): New macro.
160601         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
160603         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
160605         * m4/longlong.m4: Renamed from ulonglong.m4.
160606         * m4/inttypes.m4: Renamed from inttypes_h.m4.
160607         * m4/uintmax_t.m4: Removed.
160609 2001-08-13  Paul Eggert  <eggert@twinsun.com>
160611         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
160612         Port to Solaris 8, where 'sed' requires a space after the 'r'
160613         command, and where sh dislikes "$/".  Clean up the spacing a bit.
160614         Redirect output to $tmp just once.
160616 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
160618         * lib/addext.c (<errno.h>): Include.
160619         (errno): Declare if not defined.
160620         (addext): Work correctly when pathconf returns -1 and leaves
160621         errno alone because there is no limit.  Also, work even if
160622         pathconf returns a value greater than SIZE_MAX.
160624 2001-08-12  Jim Meyering  <meyering@lucent.com>
160626         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
160627         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
160628         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
160629         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
160630         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
160631         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
160632         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
160633         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
160634         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
160635         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
160636         utime.m4, utimes.m4, xstrtoumax.m4:
160637         Quote the first argument in each use of AC_DEFUN.
160639 2001-08-12  Jim Meyering  <meyering@lucent.com>
160641         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
160642         Simply `return getcwd (NULL, 0);'.
160643         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
160644         Use 1300 as initial value for length, not PATH_MAX.
160646         * lib/pathmax.h: Clean up cpp syntax.
160648 2001-08-12  Jim Meyering  <meyering@lucent.com>
160650         * lib/gettimeofday.c: New file.
160651         * lib/gtod.h: New file.
160652         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
160654 2001-08-05  Jim Meyering  <meyering@lucent.com>
160656         * m4/jm-macros.m4: Require autoconf-2.52.
160658 2001-08-04  Jim Meyering  <meyering@lucent.com>
160660         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
160661         stmt, to get in sync with glibc.
160663 2001-08-03  Paul Eggert  <eggert@twinsun.com>
160665         The following changes are from gettext 0.10.39 as maintained by
160666         Bruno Haible.
160668         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
160669         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
160670         with inverted sense.  All uses changed.
160672         * lib/mbswidth.c: Don't include <limits.h>.
160673         Include <stdlib.h> and <string.h> unconditionally.
160674         (iswcntrl, mbsinit, ISCNTRL): New macros.
160675         (mbsnwidth): Use K&R style function declarations.
160676         Don't bother checking for MB_LEN_MAX == 1, since the compiler
160677         can optimize it when MB_CUR_MAX == 1.
160678         The width of control characters is zero, not 1.
160680 2001-08-03  Paul Eggert  <eggert@twinsun.com>
160682         The following changes are from gettext 0.10.39 as maintained by
160683         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
160685         * m4/codeset.m4: Upgrade to serial AM1.
160686         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
160687         all uses changed.  Quote first arg of AC_DEFUN.
160688         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
160690         * m4/iconv.m4: Upgrade to serial AM2.
160691         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
160692         Add --with-libconv-prefix.
160693         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
160694         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
160695         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
160696         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
160697         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
160699         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
160700         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
160701         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
160702         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
160703         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
160704         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
160705         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
160706         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
160707         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
160709         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
160710         string.h any more.
160712         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
160713         not the default value.
160715         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
160716         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
160717         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
160718         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
160719         Also check for iswcntrl, used for wcwidth fallback.
160720         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
160721         to Autoconf 2.13.
160723 2001-08-03  Jim Meyering  <meyering@lucent.com>
160725         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
160726         as it was in the original.  Reported by Paul Eggert.
160728 2001-07-16  Jim Meyering  <meyering@lucent.com>
160730         * m4/gettimeofday.m4: New file.
160731         Prompted by a report from Bernhard Baehr.
160733 2001-07-15  Jim Meyering  <meyering@lucent.com>
160735         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
160736         stuff. Now it's in ../Makefile.cfg.
160738 2001-07-15  Jim Meyering  <meyering@lucent.com>
160740         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
160741         (BUILT_SOURCES): Add unlocked-io.h.
160742         (io_functions): Define.
160743         (unlocked-io.h): New rule.
160744         (DISTCLEANFILES): Add unlocked-io.h.
160745         (all-local): Depend on unlocked-io.h, to ensure it is created.
160747         * lib/unlocked-io.hin: New file
160749         * lib/regex.c: Update from glibc.
160751 2001-07-05  Jim Meyering  <meyering@lucent.com>
160753         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
160754         recommendation.
160755         (libfetish_a_SOURCES): Put all .h files here instead.
160756         Remove a thus-exposed (better checks in automake) duplicate and
160757         two unnecessary .h files.
160759 2001-07-04  Jim Meyering  <meyering@lucent.com>
160761         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
160762         that generates jm-glibc-io.m4 so that it doesn't trigger any make
160763         distcheck failure.
160765 2001-07-02  Jim Meyering  <meyering@lucent.com>
160767         The following changes were prompted by suggestions from Bruno Haible.
160769         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
160770         is now generated.
160771         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
160772         definition of EXTRA_DIST.
160773         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
160774         ensure that the generated file is created/updated whenever the list
160775         of $(unlocked_functions) is changed.
160776         (jm-glibc-io.m4): New rule.
160777         (unlocked-io.h): New rule -- currently unused.
160779 2001-06-24  Jim Meyering  <meyering@lucent.com>
160781         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
160782         unmatched right bracket, rather than kludging it with an extra,
160783         falsely-matching quote in a comment.  Patch by Akim Demaille.
160785 2001-06-11  Jim Meyering  <meyering@lucent.com>
160787         * lib/regex.c: Update from GNU libc.
160789 2001-05-27  Jim Meyering  <meyering@lucent.com>
160791         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
160792         Check for ut_type in struct utmp.
160794 2001-05-27  Jim Meyering  <meyering@lucent.com>
160796         * lib/readutmp.h (UT_TYPE): Define.
160798 2001-05-24  Jim Meyering  <meyering@lucent.com>
160800         * lib/argmatch.c: Include "quote.h".
160801         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
160802         quote function.  Reported by Göran Uddeborg.
160804 2001-05-22  Jim Meyering  <meyering@lucent.com>
160806         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
160807         now that we use the package-supplied version unconditionally.
160808         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
160810 2001-05-21  Jim Meyering  <meyering@lucent.com>
160812         * m4/regex.m4: Change a couple backticks to single quotes to avoid
160813         shell syntax errors.
160815 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
160817         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
160819 2001-05-20  Paul Eggert  <eggert@twinsun.com>
160821         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
160822         Don't bother to check library strftime, since
160823         we'll be using our own my_strftime function anyway.
160824         Define my_strftime instead of strftime.
160826 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
160828         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
160829         which is not yet declared.
160831 2001-05-15  Jim Meyering  <meyering@lucent.com>
160833         * m4/regex.m4: Use proper quoting so brackets appear in the test
160834         program.
160835         Reported by, and with help from, Bruno Haible.
160837 2001-05-13  Jim Meyering  <meyering@lucent.com>
160839         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
160840         undefined.
160842 2001-05-11  Paul Eggert  <eggert@twinsun.com>
160844         dirname code cleanup.  base_name now behaves more compatibly
160845         with POSIX basename when given file names that have trailing
160846         slashes, and similarly for dir_name.  Add new primitives
160847         base_len and dir_len.  Put the directory-name-related decls
160848         into dirname.h.
160850         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
160851         * lib/backupfile.c (base_name): Likewise.
160852         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
160853         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
160854         * lib/makepath.c (strip_trailing_slashes): Likewise.
160855         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
160856         ISSLASH): Likewise.
160857         * lib/rename.c (strip_trailing_slashes): Likewise.
160858         * lib/same.c (base_name): Likewise.
160859         * lib/stripslash.c (ISSLASH): Likewise.
160861         * lib/addext.c: Include <dirname.h> after size_t is defined.
160862         * lib/backupfile.c: Likewise.
160864         * lib/addext.c (addext): Use base_len to trim redundant
160865         trailing slashes instead of doing it ourselves.
160866         But do not trim the last slash if it is not redundant.
160868         * lib/backupfile.c (find_backup_file_name,
160869         max_backup_version): Use base_len instead of rolling it ourselves.
160870         Handle the case of "" and (on DOS) "C:" correctly.
160872         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
160873         needed. Include <string.h>, <dirname.h>.
160874         (base_name): Allow file names ending in slashes, other than names
160875         that are all slashes.  In this case, return the basename followed
160876         by the slashes.  This is more general, and can be used in places
160877         where the original base_name purposely had an assertion failure.
160878         (base_len): New function.
160880         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
160881         Do not include <assert.h>; no longer needed.
160882         Include xalloc.h.
160883         (memrchr): Remove decl.
160884         (dir_name_r): Remove.
160885         (dir_len): Renamed from dirlen.  All callers changed.
160886         Rewrite in terms of base_name, for simplicity and consistency.
160887         (dir_name): Never return NULL.  All callers changed.
160888         Do not include <stdlib.h> in test program; no longer needed.
160889         return 0; is fine for test program.
160891         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
160892         New macros.
160893         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
160895         * lib/path-concat.c (path_concat): Use base_len to compute
160896         base length, not strlen; this means we cannot rely on memcpy
160897         to null-terminate.
160899         * lib/same.c (STREQ): Remove.
160900         (same_name): Handle the case where the basename ends in trailing '/'.
160902         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
160903         a slash was stripped.  Do not strip the last slash after a
160904         file system prefix.
160906 2001-05-11  Paul Eggert  <eggert@twinsun.com>
160908         * lib/Makefile.am (libfetish_a_SOURCES):
160909         Add strftime.c, since we now compile it on all hosts.
160911         * lib/strftime.c (my_strftime):
160912         Define to nstrftime if emacs, but only if my_strftime is not defined.
160913         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
160914         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
160915         Add one more extra argument: a nanoseconds value.
160916         All uses changed.
160917         (ns): New macro.
160918         (my_strftime function): Add %N format.
160919         (emacs_strftimeu): Renamed from emacs_strftime,
160920         with extra ut argument.
160922 2001-05-09  Paul Eggert  <eggert@twinsun.com>
160924         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
160926 2001-04-21  Jim Meyering  <meyering@lucent.com>
160928         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
160929         doesn't interfere.
160931 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
160933         * m4/ftruncate.m4: Check for chsize.
160934         Link with ftruncate.o unconditionally if ftruncate is missing.
160935         This was required when cross-compiling to i586-mingw32msvc.
160937 2001-04-08  Jim Meyering  <meyering@lucent.com>
160939         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
160940         recomputed; that's necessary when the offset spans a DST transition.
160941         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
160943 2001-04-02  Jim Meyering  <meyering@lucent.com>
160945         * lib/regex.h, regex.c: Update from GNU libc.
160947 2001-03-24  Jim Meyering  <meyering@lucent.com>
160949         * m4/jm-macros.m4: Require autoconf-2.49d.
160951 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
160953         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
160955 2001-03-19  Paul Eggert  <eggert@twinsun.com>
160957         * lib/version-etc.c (version_etc_copyright): Update to 2001.
160959 2001-03-17  Jim Meyering  <meyering@lucent.com>
160961         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
160962         now that the version in autoconf is equivalent.
160963         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
160965         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
160966         Suggestion from Akim Demaille.
160968         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
160969         (jm_PREREQ_TEMPNAME): New function.
160971 2001-03-16  Paul Eggert  <eggert@twinsun.com>
160973         * lib/tempname.c (uint64_t): Define to uintmax_t if
160974         not defined, and if UINT64_MAX is not defined.
160975         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
160976         Reported by John David Anglin.
160978 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
160980         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
160981         resolve alias if codeset is empty.
160982         * lib/config.charset (BeOS): Use wildcard syntax.
160984 2001-03-13  Jim Meyering  <meyering@lucent.com>
160986         * lib/path-concat.c (path_concat)
160987         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
160988         concatenating e.g., `C:' and `foo'.
160989         From Bruno Haible.
160991 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
160993         * lib/localcharset.c (locale_charset): Don't use
160994         setlocale(LC_CTYPE,NULL). Don't return NULL.
160995         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
160997 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
160999         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
161000         support for DOS/DJGPP.
161002 2001-03-01  Paul Eggert  <eggert@twinsun.com>
161004         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
161005         lacks mkstemp.  Compile our own tempname.c if we compile our own
161006         mkstemp.c, as mkstemp relies on tempname.
161008 2001-03-01  Jim Meyering  <meyering@lucent.com>
161010         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
161011         AH_VERBATIM really does output its argument verbatim.
161013 2001-02-28  Paul Eggert  <eggert@twinsun.com>
161015         * lib/Makefile.am (libfetish_a_SOURCES):
161016         Add dup-safer.c, fopen-safer.c.
161017         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
161019         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
161020         * lib/unistd-safer.h: New files.
161022 2001-02-25  Paul Eggert  <eggert@twinsun.com>
161024         The mkstemp replacement is taken from glibc 2.2.2, with some
161025         portability fixes for use outside glibc, as follows:
161027         * lib/tempname.c (struct_stat64): New macro.
161028         (direxists, __gen_tempname): Use it.
161029         This avoids a portability problem with Solaris 8.
161031         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
161032         (<stddef.h>, <stdint.h>, <string.h>):
161033         Include only if STDC_HEADERS || _LIBC.
161034         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
161035         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
161036         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
161037         (__set_errno): Define this macro if <errno.h> doesn't.
161038         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
161039         Define these macros if <stdio.h> doesn't.
161040         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
161041         Define these macros if <sys/stat.h>
161042         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
161043         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
161044         __xstat64): Define if not _LIBC.
161045         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
161046         (__gen_tempname): Invoke gettimeofday only if
161047         HAVE_GETTIMEOFDAY || _LIBC;
161048         otherwise, fall back on plain "time".
161049         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
161051         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
161053         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
161055 2001-02-18  Paul Eggert  <eggert@twinsun.com>
161057         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
161059 2001-02-17  Paul Eggert  <eggert@twinsun.com>
161061         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
161062         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
161063         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
161064         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
161066 2001-02-17  Paul Eggert  <eggert@twinsun.com>
161068         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
161069         Remove workaround macros for hosts that have mbrtowc but not
161070         mbstate_t, as we now insist on proper declarations for both
161071         before using mbrtowc.
161073 2001-02-17  Jim Meyering  <meyering@lucent.com>
161075         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
161076         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
161077         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
161078         UnixWare 7.1.1.
161080         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
161081         rather than AC_CACHE_VAL.
161083 2001-02-17  Jim Meyering  <meyering@lucent.com>
161085         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
161086         around included file name.
161088         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
161090         * lib/strftime.c: Update from GNU libc (the only changes were to
161091         comments).
161093 2001-02-17  Jim Meyering  <meyering@lucent.com>
161095         * lib/regex.c: Update from libc.
161097 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
161099         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
161100         clash.
161102 2001-02-16  Paul Eggert  <eggert@twinsun.com>
161104         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
161105         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
161106         Reported by Mark Hounschell via Paul Eggert.
161108 2001-02-07  Jim Meyering  <meyering@lucent.com>
161110         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
161112 2001-02-05  Jim Meyering  <meyering@lucent.com>
161114         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
161115         it includes the patch required for `large file' support with at least
161116         HP-UX's 10.20 /bin/cc.
161118 2001-02-03  Jim Meyering  <meyering@lucent.com>
161120         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
161121         AS_IF, now that it works once again (mysteriously).
161122         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
161124 2001-01-30  Jim Meyering  <meyering@lucent.com>
161126         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
161127         * m4/chown.m4: Rename conftestchown to conftest.chown.
161128         * m4/rename.m4: s/conftestdir/conftest.d1/ and
161129         s/conftestdir2/conftest.d2/.
161130         * m4/utimes.m4: s/conftestdata/conftest.data/
161131         Inspired by Pavel Roskin's change in autoconf.
161133 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
161135         * lib/config.charset: Update for FreeBSD 4.2.
161137 2001-01-27  Jim Meyering  <meyering@lucent.com>
161139         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
161140         a use of AS_IF.
161141         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
161143 2001-01-26  Jim Meyering  <meyering@lucent.com>
161145         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
161146         quotearg.c includes it.
161148 2001-01-26  Jim Meyering  <meyering@lucent.com>
161150         * lib/quotearg.c: Include stddef.h.
161151         * lib/quote.c: Include stddef.h.
161152         Reported by Axel Kittenberger.
161154         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
161155         line in double quotes so that it evokes a better diagnostic.
161156         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
161157         Reported by Axel Kittenberger.
161159 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
161161         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
161162         as if it was a `charset'.
161164 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
161166         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
161167         has const.
161169 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
161171         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
161172         to avoid a warning.  Add back 'const' to inptr.
161174 2001-01-20  Jim Meyering  <meyering@lucent.com>
161176         Be sure that headers are checked before used in code compiled
161177         for the type checks.
161178         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
161179         In place of that, invoke jm_CHECK_ALL_TYPES.
161180         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
161181         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
161182         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
161183         The check for ssize_t was mistakenly run before the test for unistd.h.
161185         The configure-time check for stdbool.h was missing.
161186         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
161187         (jm_PREREQ_HASH): New function.
161189 2001-01-17  Jim Meyering  <meyering@lucent.com>
161191         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
161192         for autoconf-2.49c.
161193         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
161195 2001-01-16  Jim Meyering  <meyering@lucent.com>
161197         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
161198         From Bruno Haible.
161200 2001-01-14  Jim Meyering  <meyering@lucent.com>
161202         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
161203         foo and bar.  Create conftestdir/ in the script, not in the C code.
161204         Remove directories in the script, not in the C code.
161205         Remove conftestdir{,2} before trying to create the directory.
161206         Make the entire configure script fail if the mkdir fails.
161208 2001-01-14  Jim Meyering  <meyering@lucent.com>
161210         * lib/rename.c: New file.  From Volker Borchert.
161211         Include stdlib.h, string.h or strings.h, and xalloc.h.
161212         Use strip_trailing_slashes rather than open-coding it.
161214 2001-01-03  Paul Eggert  <eggert@twinsun.com>
161216         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
161218 2001-01-03  Jim Meyering  <meyering@lucent.com>
161220         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
161221         of local `inptr' to avoid warning with some system declarations of
161222         iconv.
161224 2001-01-02  Volker Borchert  <bt@teknon.de>
161226         * m4/rename.m4: New file.
161227         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
161229 2001-01-01  Jim Meyering  <meyering@lucent.com>
161231         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
161232         even on systems with utmpx.h.  It's necessary for the declaration of
161233         utmp's ut_user member.  Reported by Andreas Jaeger.
161235         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
161236         available. They are required for the declarations of getgrgid and
161237         getpwuid resp.
161238         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
161239         Reported by Andreas Jaeger.
161241 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
161243         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
161244         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
161245         so `make install' also works in VPATH builds.
161247 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
161249         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
161250         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
161251         can be used in subdirectories.
161253 2000-12-29  Paul Eggert  <eggert@twinsun.com>
161255         * lib/modechange.c: Do not assume that mode_t uses the
161256         traditional octal encoding.  E.g. "chmod 1 FOO" should set
161257         the other-execute bit of FOO even if S_IXOTH != 1.
161259         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
161260         WOTH, XOTH, ALLM): New macros.
161261         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
161262          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
161263         Use them.
161264         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
161265         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
161266         (mode_compile):
161267         No need to use uintmax_t; unsigned long is long enough.
161268         Don't bother to get suffix since we don't use it.
161270 2000-12-26  Jim Meyering  <meyering@lucent.com>
161272         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
161273         better with autoheader.
161275 2000-12-24  Jim Meyering  <meyering@lucent.com>
161277         * lib/hash.c (is_prime): Return explicit boolean values.
161278         (hash_get_first): Return NULL to appease Irix5.6's 89.
161279         Reported by Nelson Beebe.
161281 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
161283         * lib/localcharset.c (locale_charset): Add support for Win32.
161285 2000-12-18  Paul Eggert  <eggert@twinsun.com>
161287         * lib/physmem.h, lib/physmem.c: New files.
161289         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
161290         (noinst_HEADERS): Add physmem.h.
161292         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
161293         't' for compatibility with Solaris 8 sort.
161295 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
161297         * lib/config.charset: Add support for BeOS.
161299 2000-12-17  Jim Meyering  <meyering@lucent.com>
161301         * m4/dos.m4 (jm_AC_DOS): New file and macro.
161302         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
161304 2000-12-16  Jim Meyering  <meyering@lucent.com>
161306         This bug had a serious impact on chown: `chown N:M FILE' (for integer
161307         N and M) would have treated it like `chown N:N FILE'.
161309         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
161311 2000-12-16  Jim Meyering  <meyering@lucent.com>
161313         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
161314         SHELLS_FILE to a file name that's useful on djgpp systems.
161315         Include stdlib.h.
161316         (ADDITIONAL_DEFAULT_SHELLS): Define.
161317         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
161318         Based mostly on a patch from Prashant TR.
161320 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
161322         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
161323         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
161324         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
161326 2000-12-08  Andreas Schwab  <schwab@suse.de>
161328         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
161329         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
161331 2000-12-07  Jim Meyering  <meyering@lucent.com>
161333         * lib/stripslash.c (ISSLASH): Define.
161334         (strip_trailing_slashes): Use ISSLASH rather than comparing against
161335         `/'.
161336         From Prashant TR.
161338         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
161339         (dir_name_r): Declare this function as static.
161340         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
161341         manifest itself on a name containing a mix of slashes and
161342         backslashes.
161343         Make this function work with names starting with a DOS-style
161344         drive letter and colon prefix.
161345         (dir_name): Append `.' if necessary.
161346         Based mostly on patches from Prashant TR and Eli Zaretskii.
161348         * lib/dirname.h (dir_name_r): Remove prototype.
161350 2000-12-06  Paul Eggert  <eggert@twinsun.com>
161352         * m4/off_t-format.m4: Remove this file.
161353         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
161355 2000-12-06  Jim Meyering  <meyering@lucent.com>
161357         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
161358         replacement strtoull, we may well need the replacement strtoul, too.
161359         Check for declarations of strtoul and strtoull.
161360         Check for strtol.  Mainly as a cue to cause automake to include
161361         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
161362         Check for limits.h -- strtol.c needs it.
161364 2000-12-05  Jim Meyering  <meyering@lucent.com>
161366         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
161368 2000-12-04  Jim Meyering  <meyering@lucent.com>
161370         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
161371         Also include memory.h, stdlib.h, unistd.h if appropriate.
161372         Reported by Andreas Jaeger (conflicting declaration of malloc).
161374 2000-12-02  Jim Meyering  <meyering@lucent.com>
161376         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
161377         * m4/jm-macros.m4 (jm_MACROS): require it.
161379 2000-12-02  Jim Meyering  <meyering@lucent.com>
161381         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
161383 2000-12-01  Paul Eggert  <eggert@twinsun.com>
161385         * lib/memrchr.c: Include <config.h> before any system include file.
161387 2000-11-30  Jim Meyering  <meyering@lucent.com>
161389         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
161391 2000-11-30  Jim Meyering  <meyering@lucent.com>
161393         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
161395 2000-11-29  Paul Eggert  <eggert@twinsun.com>
161397         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
161399 2000-11-26  Jim Meyering  <meyering@lucent.com>
161401         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
161403 2000-11-22  Paul Eggert  <eggert@twinsun.com>
161405         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
161406         size of (size_t) -1; it's not portable.
161408 2000-11-17  Jim Meyering  <meyering@lucent.com>
161410         * lib/strstr.c: Update from GNU libc.
161412 2000-11-17  Akim Demaille  <akim@epita.fr>
161414         * lib/obstack.h: Formatting changes.
161415         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
161416         prevent type checking.
161417         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
161418         cast the value to (void *): assigning a `foo *' to a `void *'
161419         variable is valid.
161420         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
161422 2000-11-16  Jim Meyering  <meyering@lucent.com>
161424         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
161426 2000-11-11  Jim Meyering  <meyering@lucent.com>
161428         * lib/error.c: Add a couple #includes, merging from GNU libc version.
161430 2000-11-10  Jim Meyering  <meyering@lucent.com>
161432         * lib/obstack.h: Update from GNU libc.
161433         * lib/obstack.c: Likewise.
161435 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
161437         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
161439 2000-11-06  Paul Eggert  <eggert@twinsun.com>
161441         * lib/getusershell.c (setusershell): Use rewind rather than
161442         fseek/fseeko, to avoid configuration hassles with fseeko.
161443         Don't bother opening SHELLS_FILE if shellstream is NULL;
161444         it's not necessary.
161446 2000-11-05  Jim Meyering  <meyering@lucent.com>
161448         * lib/makepath.h (make_dir): Declare.
161449         * lib/makepath.c (make_dir): Remove `static' attribute.
161450         Tweak a comment.
161452 2000-11-04  Jim Meyering  <meyering@lucent.com>
161454         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
161456 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
161458         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
161459         last one in a bucket, advance to the next bucket.
161461 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
161463         * lib/fnmatch.c: Do not comment out all the code if we are using
161464         the GNU C library, because in some cases we are replacing buggy
161465         code in the GNU C library itself.
161467 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
161469         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
161470         (regex_compile): Catch bogus \(\1\).
161472 2000-10-30  Paul Eggert  <eggert@twinsun.com>
161474         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
161475         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
161476         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
161478 2000-10-30  Paul Eggert  <eggert@twinsun.com>
161480         * lib/error.h, getline.h, modechange.h:
161481         Remove "2000" from Copyright line, as the file hasn't been
161482         changed this year other than in the copyright notice.
161484         * lib/xalloc.h: Add "2000" to Copyright line, as this file
161485         was changed this year.
161487 2000-10-29  Jim Meyering  <meyering@lucent.com>
161489         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
161490         renaming.
161491         * m4/ls-mntd-fs.m4: Likewise
161493 2000-10-29  Jim Meyering  <meyering@lucent.com>
161495         * lib/xstat.in: Fix grammar in comment.
161497 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
161499         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
161500         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
161501         doesn't define __restrict_arr.
161503 2000-10-28  Jim Meyering  <meyering@lucent.com>
161505         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
161506         (jm_PREREQ_MEMCHR): New function.
161508 2000-10-28  Jim Meyering  <meyering@lucent.com>
161510         * lib/memchr.c: Update from libc.
161511         Adjust for portability:
161512         [HAVE_STDLIB_H]: Include stdlib.h.
161513         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
161514         Undef __memchr, too.
161515         [!weak_alias]: Define __memchr to memchr.
161517         * lib/regex.c: Update from libc.
161518         * lib/regex.h: Likewise.
161519         * lib/getopt1.c: Likewise.
161520         * lib/memcmp.c: Likewise.
161522         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
161523         Avoid using fseek, when possible -- it's broken by design.
161524         Patch by Ulrich Drepper.
161526 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
161528         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
161529         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
161530         Giving in to popular pressure to shut up the compiler with casts.
161532 2000-10-26  Jim Meyering  <meyering@lucent.com>
161534         * lib/strftime.c: Update from libc.
161536 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
161538         * regex.c: More `unsigned char' -> `re_char' changes.
161539         Also change several `int' into `re_wchar_t'.
161540         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
161541         (PUSH_FAILURE_POINTER): Don't cast any more.
161542         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
161543         We want GCC to complain, since this piece of code makes
161544         re_match non-reentrant, which *should* be fixed.
161545         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
161546         (EXTEND_BUFFER): Use RETALLOC.
161547         (SET_LIST_BIT): Don't cast.
161548         (re_wchar_t): New type.
161549         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
161550         that those two functions will always properly return.
161551         (IMMEDIATE_QUIT_CHECK): Cast to void.
161552         (analyse_first): Use recursion rather than an explicit stack.
161553         (re_compile_fastmap): Can't fail anymore.
161554         (re_search_2): Don't check re_compile_fastmap for failure.
161555         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
161556         Now also sets the new value (passed in a new argument).
161557         (re_match_2_internal): Use it.
161558         Also, use a new var `reg' of type size_t when looping through regs
161559         rather than reuse the inappropriate `mcnt'.
161561 2000-10-25  Jim Meyering  <meyering@lucent.com>
161563         * lib/obstack.c: Update from libc.
161565 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
161567         * regex.c (regex_compile): Change the way of handling a range from
161568         a char less than 256 to a char not less than 256.
161570 2000-10-24  Andrew Innes  <andrewi@gnu.org>
161572         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
161573         NT-Emacs only.
161574         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
161575         so that re_search functions only quit when callers expect them to.
161577 2000-10-23  Jim Meyering  <meyering@lucent.com>
161579         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
161580         wrong.  That set_locale call must not have any side effects.
161581         From Paul Eggert.
161583 2000-10-22  Jim Meyering  <meyering@lucent.com>
161585         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
161586         [CYCLIC]: Remove now-unused definition.
161588         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
161589         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
161590         Suggestion from Ulrich Drepper.
161592 2000-10-21  Jim Meyering  <meyering@lucent.com>
161594         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
161595         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
161596         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
161598 2000-10-21  Jim Meyering  <meyering@lucent.com>
161600         * lib/dirname.c (memrchr): Declare if necessary.
161601         (dir_name): Remove the restriction that there be no
161602         trailing slashes.  Now, this code skips past them, effectively
161603         ignoring them.
161604         [TEST_DIRNAME] (main): New unit tests.
161606         * lib/memrchr.c: New file from GNU libc.
161607         Undef __memrchr, too.
161608         [!weak_alias]: Define __memrchr to memrchr.
161609         Guard weak_alias use with `#ifdef weak_alias'.
161611 2000-10-21  Jim Meyering  <meyering@lucent.com>
161613         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
161614         (dir_name): Use dir_name_r.
161615         * lib/dirname.h (dir_name_r): Declare it.
161617 2000-10-17  Jim Meyering  <meyering@lucent.com>
161619         * lib/quote.h (PARAMS): Define and use.
161620         Reported by Akim Demaille.
161622         * lib/getopt.c: Update from libc.
161624 2000-10-16  Jim Meyering  <meyering@lucent.com>
161626         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
161627         setlocale.
161628         From Jan Fedak.
161630 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
161632         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
161634 2000-09-25  Jim Meyering  <meyering@lucent.com>
161636         * lib/md5.h (rol): Define (from GnuPG).
161638         * lib/sha.c: Give credit (GnuPG) where due.
161639         (M): Use rol rather than open-coding it.
161640         Add a FIXME comment.
161642 2000-09-21  Jim Meyering  <meyering@lucent.com>
161644         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
161645         Reported by Michael Stone.
161647 2000-09-20  Jim Meyering  <meyering@lucent.com>
161649         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
161650         (noinst_HEADERS): Add sha.h.
161651         Based on code from Scott G. Miller and from GnuPG.
161653 2000-09-18  Jim Meyering  <meyering@lucent.com>
161655         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
161656         LIBS. Otherwise, everyone ends up linking with -lelf for some
161657         configurations.
161658         Reported by Mike Stone.
161660 2000-09-15  Jim Meyering  <meyering@lucent.com>
161662         * lib/regex.c: Update from libc.
161664 2000-09-10  Jim Meyering  <meyering@lucent.com>
161666         * lib/getopt.c (_getopt_internal): Update from glibc.
161668 2000-09-09  Jim Meyering  <meyering@lucent.com>
161670         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
161671         think it should be used as a general replacement for isascii.
161672         * lib/fnmatch.c: Likewise.
161673         * lib/mbswidth.c: Likewise
161674         * lib/regex.c: Likewise.
161676         Don't use atoi.
161677         * lib/userspec.c: Include sys/param.h and limits.h.
161678         Include xstrtol.h.
161679         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
161680         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
161681         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
161682         UID, GID.  Check range.
161684 2000-09-06  Jim Meyering  <meyering@lucent.com>
161686         * lib/getopt.c (_getopt_internal): Update from glibc.
161688 2000-08-30  Jim Meyering  <meyering@lucent.com>
161690         * lib/strftime.c: Merge in changes from GNU libc.
161692 2000-08-26  Jim Meyering  <meyering@lucent.com>
161694         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
161695         * m4/fpending.m4: New file.
161697 2000-08-26  Jim Meyering  <meyering@lucent.com>
161699         * lib/closeout.c: Include "__fpending.h".
161700         (close_stdout_status): Return right away if there's nothing to flush.
161702         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
161703         * lib/__fpending.c: New file.
161704         * lib/__fpending.h: New file.
161706 2000-08-20  Jim Meyering  <meyering@lucent.com>
161708         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
161709         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
161710         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
161712 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
161714         Improve fileutils installation on systems where running
161715         programs (like install) can't be unlinked.
161716         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
161717         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
161719 2000-08-07  Paul Eggert  <eggert@twinsun.com>
161721         Standardize on "memory exhausted" instead of "Memory exhausted"
161722         or "virtual memory exhausted".
161723         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
161724         "virtual memory exhausted".
161725         * lib/same.c (same_name): Invoke xalloc_die instead of printing
161726         our own message.
161727         * lib/userspec.c (parse_user_spec): Likewise.
161728         * lib/bumpalloc.h: comment fix
161729         * lib/same.c, userspec.c: Include xalloc.h.
161731         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
161732         not char *const and pointing to a constant array.
161733         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
161734         (xrealloc): Comment fix.
161736         * lib/userspec.c (parse_user_spec):
161737         Don't translate a message until just before returning,
161738         to avoid unnecessary translation.
161740 2000-08-07  Jim Meyering  <meyering@lucent.com>
161742         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
161743         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
161744         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
161745         getgroups.c, gethostname.c, getopt.h, group-member.c,
161746         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
161747         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
161748         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
161749         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
161750         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
161751         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
161752         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
161753         yesno.c: Back out Copyright date changes for each file with no change
161754         this year.  This eases coordination with other programs using the same
161755         source code modules.  From Paul Eggert.
161757 2000-08-06  Paul Eggert  <eggert@twinsun.com>
161759         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
161760         not char, for compatibility with glibc 2.1.3 strftime.c.
161762 2000-08-03  Greg McGary  <greg@mcgary.org>
161764         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
161765         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
161766         (EXTEND_BUFFER): Use them.
161768 2000-08-01  Jim Meyering  <meyering@lucent.com>
161770         * lib/dirname.c (ISSLASH): Define.
161771         (BACKSLASH_IS_PATH_SEPARATOR): Define.
161772         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
161773         both `\' and `/' may be use as path separators.
161774         Based on a patch from Prashant TR.
161776 2000-07-31  Paul Eggert  <eggert@twinsun.com>
161778         * lib/quotearg.c (quotearg_n_options): Don't make the initial
161779         slot vector a constant, since it might get modified.
161781 2000-07-31  Jim Meyering  <meyering@lucent.com>
161783         * lib/xmalloc.c: Use `virtual memory exhausted', not
161784         `Memory exhausted'.
161785         * lib/obstack.c (print_and_abort): Likewise.
161787 2000-07-30  Paul Eggert  <eggert@twinsun.com>
161789         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
161790         buffer, so that the caller can always quote one small
161791         component of a "memory exhausted" message in slot 0.
161792         From a suggestion by Jim Meyering.
161794 2000-07-30  Jim Meyering  <meyering@lucent.com>
161796         * lib/makepath.c (make_path): Quote the other instance, too.
161798         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
161799         (STATIC_BUF_SIZE): Define.
161800         (quotearg_n_options): Use only statically allocated storage when
161801         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
161802         than STATIC_BUF_SIZE.
161804 2000-07-29  Jim Meyering  <meyering@lucent.com>
161806         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
161807         * lib/dirname.c (dir_name): Likewise.
161809         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
161810         `/'.
161812         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
161813         (dir_name): Assert that there are no trailing slashes.
161815 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
161817         * lib/mbswidth.h (mbswidth): Add a flags argument.
161818         (mbswidth): New declaration.
161819         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
161820         * lib/mbswidth.c (mbswidth): Add a flags argument.
161821         (mbsnwidth): New function.
161823 2000-07-24  Jim Meyering  <meyering@lucent.com>
161825         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
161827 2000-07-23  Paul Eggert  <eggert@twinsun.com>
161829         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
161831 2000-07-23  Paul Eggert  <eggert@twinsun.com>
161833         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
161834         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
161835         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
161836         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
161837         invoke multibyte primitives.
161839 2000-07-23  Paul Eggert  <eggert@twinsun.com>
161841         * lib/quotearg.c:
161842         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
161843         so that mbstate_t is always defined.
161845         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
161846         be 1 in at least one GCC installation, and this configuration
161847         error is likely to be common.  Ignoring MB_LEN_MAX hurts
161848         performance on hosts that have mbrtowc but have only unibyte
161849         locales, but I assume these hosts are rare.
161851 2000-07-23  Paul Eggert  <eggert@twinsun.com>
161853         * lib/mbswidth.c (_XOPEN_SOURCE):
161854         Don't define; this causes problems on Solaris 7.
161855         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
161857 2000-07-23  Jim Meyering  <meyering@lucent.com>
161859         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
161860         too: getgrgid, getpwuid, getuid.
161862 2000-07-23  Jim Meyering  <meyering@lucent.com>
161864         * lib/basename.c (base_name): Add an assertion.
161866 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
161868         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
161869         shadow its mbsinit function.
161871 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
161873         * lib/mbswidth.h: New file.
161874         * lib/mbswidth.c: New file.
161875         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
161876         (noinst_HEADERS): Add mbswidth.h.
161878 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
161880         * lib/config.charset: Add support for FreeBSD. Improve support for
161881         HP-UX and IRIX 6.
161883 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
161885         * m4/mbswidth.m4: New file.
161886         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
161888 2000-07-15  Jim Meyering  <meyering@lucent.com>
161890         * lib/makepath.c: Include quote.h.
161891         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
161892         corresponding argument in a `quote (...)' call.
161893         Give better diagnostics.
161895         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
161896         (noinst_HEADERS): Add quote.h.
161898         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
161899         from tar's src/misc.c.
161900         * lib/quote.h: New file.  Prototypes for same.
161902 2000-07-14  Paul Eggert  <eggert@twinsun.com>
161904         From a suggestion by Bruno Haible.
161905         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
161906         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
161907         to decide whether to define the BeOS workaround macro;
161908         this adjusts to the change to AC_MBSTATE_T.
161910 2000-07-14  Jim Meyering  <meyering@lucent.com>
161912         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
161913         jm_AC_TYPE_UINTMAX_T.
161915 2000-07-13  Paul Eggert  <eggert@twinsun.com>
161917         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
161919         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
161920         quotearg_buffer_restyled): Add support for
161921         clocale_quoting_style.  Undo previous change to
161922         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
161923         and "{RIGHT QUOTATION MARK}" msgids.
161925 2000-07-10  Paul Eggert  <eggert@twinsun.com>
161927         From a suggestion by Bruno Haible.
161928         * m4/mbstate_t.m4 (AC_MBSTATE_T):
161929         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
161930         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
161931         and mbstate_t, to a single-part test that simply defines mbstate_t.
161932         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
161933         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
161935 2000-07-10  Jim Meyering  <meyering@lucent.com>
161937         * m4/strerror_r.m4: Mirror the correction made in autoconf.
161939         * m4/gnu-source.m4: Output to confdefs.h directly.
161940         Suggestion from Akim Demaille.
161942 2000-07-09  Paul Eggert  <eggert@twinsun.com>
161944         The old behavior of quoting `like this' doesn't look good with
161945         newer, ISO-style fonts.  See:
161946         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
161948         Instead, quote "like this" by default.  Let the translator
161949         tailor the locale-specific quoting behavior by providing
161950         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
161952         * lib/quotearg.c (N_): New macro.
161953         (gettext_default): New function.
161954         (quotearg_buffer_restyled): Use
161955         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
161956         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
161958 2000-07-09  Jim Meyering  <meyering@lucent.com>
161960         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
161961         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
161963         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
161964         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
161966 2000-07-09  Jim Meyering  <meyering@lucent.com>
161968         * lib/Most files: Update copyright dates to include 2000.
161970 2000-07-08  Jim Meyering  <meyering@lucent.com>
161972         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
161973         if not defined.
161974         (xgethostname): Remove now-unnecessary #ifdef.
161975         Move declaration of `err' into loop where it's used.
161977 2000-07-05  Paul Eggert  <eggert@twinsun.com>
161978         and Bruno Haible  <haible@clisp.cons.org>
161980         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
161981         only if the test for an object-type mbstate_t fails.  This
161982         prevents us from mistakenly reporting that mbstate_t is a
161983         system object type after we "#define mbstate_t int" to work
161984         around its lack.
161986 2000-07-05  Paul Eggert  <eggert@twinsun.com>
161987         and Bruno Haible  <haible@clisp.cons.org>
161989         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
161991 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
161993         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
161994         to strerror_r.
161995         Include <ctype.h> for use of isalpha.
161997 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
161999         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
162000         by allocating a larger buffer. Test the gethostname return value for
162001         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
162002         returns an error and ENAMETOOLONG isn't defined.
162004 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
162006         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
162007         dimension.
162009 2000-07-04  Jim Meyering  <meyering@lucent.com>
162011         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
162012         of the deprecated AC_CHECKING.
162014 2000-07-04  Jim Meyering  <meyering@lucent.com>
162016         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
162017         Reported by Bruno Haible.
162019 2000-07-04  Jim Meyering  <meyering@lucent.com>
162021         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
162022         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
162023         lacks mbrtowc.
162025 2000-07-03  Paul Eggert  <eggert@twinsun.com>
162027         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
162028         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
162030 2000-07-03  Paul Eggert  <eggert@twinsun.com>
162031         and Bruno Haible  <haible@clisp.cons.org>
162033         * lib/quotearg.c (mbrtowc):
162034         Assign to *pwc, and return 1 only if result is nonzero.
162035         (iswprint): Use ISPRINT when substituting our own mbrtowc.
162037 2000-07-03  Jim Meyering  <meyering@lucent.com>
162039         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
162041 2000-07-03  Jim Meyering  <meyering@lucent.com>
162043         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
162044         This is necessary to get a definition of e.g., UTMP_FILE on
162045         HP-UX 10.20.
162046         From Bob Proulx.
162048 2000-07-02  Jim Meyering  <meyering@lucent.com>
162050         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
162052         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
162053         AC_LIBOBJ(function_name).
162054         * m4/chown.m4: Likewise.
162055         * m4/fnmatch.m4: Likewise.
162056         * m4/ftruncate.m4: Likewise.
162057         * m4/getgroups.m4: Likewise.
162058         * m4/getline.m4: Likewise.
162059         * m4/group-member.m4: Likewise.
162060         * m4/jm-macros.m4: Likewise.
162061         * m4/lstat.m4: Likewise.
162062         * m4/malloc.m4: Likewise.
162063         * m4/memcmp.m4: Likewise.
162064         * m4/nanosleep.m4: Likewise.
162065         * m4/putenv.m4: Likewise.
162066         * m4/realloc.m4: Likewise.
162067         * m4/regex.m4: Likewise.
162068         * m4/stat.m4: Likewise.
162069         * m4/strftime.m4: Likewise.
162071 2000-07-02  Jim Meyering  <meyering@lucent.com>
162073         * lib/quotearg.c (mbstate_t): Don't define here.
162075 2000-07-02  Jim Meyering  <meyering@lucent.com>
162077         * lib/nanosleep.c (SIGCONT): Define if not already defined.
162079 2000-07-01  Jim Meyering  <meyering@lucent.com>
162081         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
162083 2000-07-01  Jim Meyering  <meyering@lucent.com>
162085         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
162086         problem.
162088 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
162090         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
162091         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
162093 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
162095         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
162096         per change in ../m4/ls-mntd-fs.m4.
162097         (read_filesystem_list): Ignore symbolic links.
162099 2000-06-29  Jim Meyering  <meyering@lucent.com>
162101         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
162102         for declaration of strcmp.
162104         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
162106         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
162107         Avoid warning by casting result to `char *' to remove `const'.
162109 2000-06-28  Jim Meyering  <meyering@lucent.com>
162111         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
162112         included by quotearg.c, for which we perform this test.  From
162113         Bruno Haible.
162115 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
162117         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
162118         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
162119         <utmpx.h> exists, put readutmp.o into LIBOBJS.
162121 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
162123         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
162125 2000-06-26  Paul Eggert  <eggert@twinsun.com>
162127         savedir now sets errno on failure and invokes xmalloc to get memory.
162128         Fix a couple of other minor bugs while we're at it.
162130         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
162131         (NAMLEN): Remove macro.
162132         (malloc, realloc): Remove decls.
162133         (stpcpy): Likewise.
162134         ("xalloc.h"): Include.
162135         (NAME_SIZE_DEFAULT): New macro.
162136         (savedir): Use xmalloc / xrealloc to allocate memory.
162137         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
162138         Skip "" directory entries.
162139         Use strlen to calculate directory entry length, since the old method
162140         is rarely used these days and isn't worth supporting.
162141         Don't use a pointer after freeing it.
162142         Check for integer overflow when calculating allocation size.
162143         Use memcpy to copy entries, instead of stpcpy.
162144         Set errno properly when returning NULL.
162145         Check for readdir error.
162147 2000-06-26  Jim Meyering  <meyering@lucent.com>
162149         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
162151 2000-06-25  Jim Meyering  <meyering@lucent.com>
162153         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
162154         Linux header bug when _XOPEN_SOURCE is defined to 500.
162156 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
162158         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
162159         deficiency.
162161 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
162163         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
162164         Include xalloc.h.
162165         Don't include <stdlib.h>.  Don't declare malloc, realloc.
162167 2000-06-24  Jim Meyering  <meyering@lucent.com>
162169         * m4/strerror_r.m4: Revive this file -- to try out an experimental
162170         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
162171         for which strerror does return char*, but which lacks a conveniently
162172         accessible declaration of the function.  If the compile-test says
162173         strerror_r doesn't work, then resort to a `run'-test that works on
162174         BeOS and segfaults on DEC Unix.
162176 2000-06-24  Jim Meyering  <meyering@lucent.com>
162178         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
162180 2000-06-23  Paul Eggert  <eggert@twinsun.com>
162182         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
162183         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
162185 2000-06-23  Paul Eggert  <eggert@twinsun.com>
162187         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
162188         (mbrtowc, mbstate_t): Define substitutes if
162189         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
162190         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
162191         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
162193 2000-06-23  Jim Meyering  <meyering@lucent.com>
162195         * m4/afs.m4: Add missing AC_MSG_RESULT.
162196         Reported by Bruno Haible.
162198         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
162199         Suggestion from Bruno Haible.
162201 2000-06-23  Jim Meyering  <meyering@lucent.com>
162203         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
162205 2000-06-21  Jim Meyering  <meyering@lucent.com>
162207         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
162209 2000-06-21  Jim Meyering  <meyering@lucent.com>
162211         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
162212         (noinst_HEADERS): Add getstr.h.
162214         * lib/getline.c (getstr): Move into a separate file.
162215         * lib/getstr.c (getstr): New file, extracted from getline.c, with
162216         the following changes: new parameter, delim2; both delim[12]
162217         parameters have type `int', not `char'.  The latter would lose
162218         with 8-bit delimiters.
162219         * lib/getstr.h: New file.
162221 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
162223         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
162224         than 1024, return a memory chunk of least possible size, instead
162225         of size PATH_MAX + 2. In the loop, increment the size proportionally.
162226         Use free/xmalloc instead of xrealloc to avoid copying for very long
162227         paths.
162229 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
162231         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
162232         the empty string.
162234 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
162236         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
162237         address, not strdup.  Include <stdlib.h> and don't declare free().
162239 2000-06-19  Jim Meyering  <meyering@lucent.com>
162241         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
162243 2000-06-18  Jim Meyering  <meyering@lucent.com>
162245         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
162247         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
162248         `checking whether...' message to be consistent with that of the
162249         lstat test.
162251 2000-06-18  Jim Meyering  <meyering@lucent.com>
162253         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
162254         Besides, these days every porting target provides a mkdir function.
162256         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
162257         needed. (this snippet comes from src/system.h).
162259 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
162261         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
162263 2000-06-15  Paul Eggert  <eggert@twinsun.com>
162265         * lib/human.c (adjust_value): New function.
162266         (human_readable_inexact): Apply rounding style even when
162267         printing approximate values.
162269 2000-06-14  Paul Eggert  <eggert@twinsun.com>
162271         * lib/human.c (human_readable_inexact): Allow an input block
162272         size that is not a multiple of the output block size, and vice versa.
162273         Reported by Piergiorgio Sartor.
162275 2000-06-14  Paul Eggert  <eggert@twinsun.com>
162277         * lib/getdate.y (get_date): Apply relative times after time
162278         zone indicator, not before.  Reported by Todd A. Jacobs.
162280 2000-06-13  Jim Meyering  <meyering@lucent.com>
162282         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
162284         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
162286 2000-06-12  Paul Eggert  <eggert@twinsun.com>
162288         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
162290 2000-06-12  Jim Meyering  <meyering@lucent.com>
162292         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
162293         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
162294         optional argument.
162295         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
162296         the optional argument, `lib'.
162298 2000-06-08  Jim Meyering  <meyering@lucent.com>
162300         * m4/largefile.m4: Remove file (now that it's part of autoconf).
162302 2000-06-04  Paul Eggert  <eggert@twinsun.com>
162304         Rewrite largefile configuration so that we don't need to run
162305         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
162306         AC_CANONICAL_HOST in configure.in -- jmm]
162308         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
162309         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
162310         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
162311         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
162312         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
162313         All uses changed.
162314         Instead of inspecting the output of getconf, try to compile the
162315         test program without and with the macro definition.
162316         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
162317         for getconf.  Instead, check for the needed flags by compiling
162318         test programs.
162320 2000-06-04  Paul Eggert  <eggert@twinsun.com>
162322         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
162324 2000-06-04  Jim Meyering  <meyering@lucent.com>
162326         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
162327         SunOS 4.1.4 for which gid_t is an unsigned type.
162329 2000-06-03  Jim Meyering  <meyering@lucent.com>
162331         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
162332         now that autoconf requires that.
162334         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
162335         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
162336         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
162338 2000-06-03  Jim Meyering  <meyering@lucent.com>
162340         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
162342 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
162344         * m4/glibc21.m4: New file.
162345         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
162347 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
162349         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
162350         newer, don't install charset.alias.
162351         * lib/config.charset: Change the Linux/glibc rules so they become empty
162352         on glibc-2.1 or newer.
162354 2000-06-02  Jim Meyering  <meyering@lucent.com>
162356         * lib/mountlist.c: Back out last change.  Instead, do this...
162357         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
162358         me_dummy member using the same `ignore'-testing code.
162359         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
162360         fs_type strings.
162361         From Mark D. Roth.
162363 2000-05-29  Jim Meyering  <meyering@lucent.com>
162365         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
162366         mounts with the `ignore' attribute.  Based on a patch from
162367         Mark D. Roth.
162369 2000-05-28  Jim Meyering  <meyering@lucent.com>
162371         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
162372         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
162373         * m4/stat.m4: Likewise.
162374         * m4/lstat.m4: Likewise.
162375         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
162377         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
162378         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
162380 2000-05-26  Jim Meyering  <meyering@lucent.com>
162382         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
162384 2000-05-24  Jim Meyering  <meyering@lucent.com>
162386         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
162387         autoconf requires that.
162388         * m4/lib-check.m4: Likewise.
162389         * m4/jm-macros.m4: Likewise.
162390         * m4/strftime.m4: Likewise.
162392         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
162393         AC_CHECK_DECLS, now that autoconf requires that.
162395 2000-05-22  Jim Meyering  <meyering@lucent.com>
162397         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
162398         * m4/lstat.m4: Likewise.
162400 2000-05-22  Jim Meyering  <meyering@lucent.com>
162402         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
162404 2000-05-20  Jim Meyering  <meyering@lucent.com>
162406         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
162407         (jm_PREREQ): Use it.
162409 2000-05-18  Jim Meyering  <meyering@lucent.com>
162411         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
162412         back, too, since it may have been modified by allocate_entry.
162413         (hash_delete): Rewrite to use neither the assignment operator
162414         nor the comma operator in an if-expression.
162416 2000-05-15  Paul Eggert  <eggert@twinsun.com>
162418         * lib/closeout.c:
162419         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
162420         Remove; no longer needed.
162421         "quotearg.h": Add include.
162422         (file_name): Do not bother to explicitly initialize to NULL; it's less
162423         efficient on some hosts.
162424         (close_stdout_status): Remove test as to whether stdout was already
162425         closed; it breaks for the case "echo x | sort >&-".
162426         Quote file name colons.
162427         Do not assume that _("write error") lacks format strings.
162429 2000-05-15  Jim Meyering  <meyering@lucent.com>
162431         * lib/version-etc.c (version_etc_copyright): Update the copyright
162432         string used in all --version output.
162434 2000-05-14  Jim Meyering  <meyering@lucent.com>
162436         * lib/closeout.c (close_stdout_set_file_name): New function.
162437         (close_stdout_status): Use new file-scoped global.
162438         Return right away if fstat says the stdout file descriptor is invalid.
162439         * lib/closeout.h (close_stdout_set_file_name): Declare.
162441 2000-05-10  Jim Meyering  <meyering@lucent.com>
162443         * lib/closeout.c [default_exit_status]: New file-scoped variable.
162444         (close_stdout_set_status): New function.
162445         * lib/closeout.h (close_stdout_set_status): Declare.
162447 2000-05-09  Jim Meyering  <meyering@lucent.com>
162449         * m4/gettext.m4: Rename this...
162450         * m4/libintl.m4: ...to this.
162452 2000-05-08  Jim Meyering  <meyering@lucent.com>
162454         * lib/long-options.c: Don't include closeout.h.
162455         (parse_long_options): Don't call close_stdout for --version.
162457 2000-05-06  Paul Eggert  <eggert@twinsun.com>
162459         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
162460         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
162461         2.1.3 bug.  This avoids a clash when files like regex.c define
162462         _GNU_SOURCE.
162464 2000-05-06  Jim Meyering  <meyering@lucent.com>
162466         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
162467         (AC_REPLACE_FUNCS): Add strnlen.
162469         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
162470         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
162472         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
162473         AC_SEARCH_LIBS call for nanosleep.
162474         (LIB_NANOSLEEP): Set and AC_SUBST.
162476 2000-05-06  Jim Meyering  <meyering@lucent.com>
162478         * lib/strnlen.c: Undefine __strnlen and strnlen.
162479         [!weak_alias]: Define __strnlen to strnlen.
162481         * lib/atexit.c: New file, from libiberty.
162483 2000-05-06  Jim Meyering  <meyering@lucent.com>
162485         * lib/closeout.c (close_stdout_status): Also check for errors on the
162486         stderr stream.
162488 2000-05-05  Jim Meyering  <meyering@lucent.com>
162490         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
162491         AC_SEARCH_LIBS call for clock_gettime.
162492         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
162494         * m4/search-libs.m4: Update from autoconf.
162496         su doesn't work on Solaris 2.6.
162497         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
162498         <shadow.h>.  Reported by Dragos Harabor.
162500 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
162502         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
162503         memcpy instead of xmalloc, xrealloc, path_concat.
162504         (locale_charset): Treat empty environment variables as absent.
162505         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
162507 2000-05-04  Jim Meyering  <meyering@lucent.com>
162509         * lib/getopt.c: Update from glibc.
162510         * lib/obstack.c: Likewise.
162511         * lib/obstack.h: Likewise.
162512         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
162513         file
162515         * lib/regex.h: Likewise.
162516         * lib/strndup.c: Likewise.
162517         * lib/strnlen.c: New file, from glibc.
162519 2000-05-03  Jim Meyering  <meyering@lucent.com>
162521         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
162523 2000-05-02  Paul Eggert  <eggert@twinsun.com>
162525         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
162526         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
162527         compile-time test, rather than inspecting host and OS, to
162528         decide whether to define _LARGEFILE_SOURCE.
162530 2000-05-01  Jim Meyering  <meyering@lucent.com>
162532         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
162534         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
162535         Based on a patch from Bruno Haible.
162537 2000-05-01  Jim Meyering  <meyering@lucent.com>
162539         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
162541 2000-04-29  Jim Meyering  <meyering@lucent.com>
162543         * lib/path-concat.c: Declare strdup only if it's not defined.
162544         * lib/canon-host.c: Likewise.
162546 2000-04-28  Jim Meyering  <meyering@lucent.com>
162548         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
162549         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
162550         is included first, then limits.h is included by locale.h by libintl.h.
162551         From John David Anglin.
162553 2000-04-25  Jim Meyering  <meyering@lucent.com>
162555         * lib/makepath.c (S_IRWXUGO): Define.
162556         (make_path): Always perform explicit chmod if MODE specifies any
162557         of the `special' permission bits.  Prompted by a bug report against
162558         install from Mate Wierdl and Joost van Baal.
162560 2000-04-18  Jim Meyering  <meyering@lucent.com>
162562         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
162563         (jm_PREREQ): Use it.
162565 2000-04-18  Jim Meyering  <meyering@lucent.com>
162567         * lib/README: New file.
162569         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
162570         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
162572 2000-04-17  Jim Meyering  <meyering@lucent.com>
162574         Get it right :-)
162575         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
162576         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
162577         Suggestion from Akim Demaille.
162579 2000-04-17  Jim Meyering  <meyering@lucent.com>
162581         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
162582         the definition of it to rpl_strftime also defined-away the system's
162583         declaration.
162585 2000-04-15  Jim Meyering  <meyering@lucent.com>
162587         Use `C' to denote so-called `contiguous' files, the same way
162588         that tar does.
162589         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
162590         (ftypelet): Use S_ISCTG.
162591         From Michael Deutschmann.
162593 2000-04-14  Jim Meyering  <meyering@lucent.com>
162595         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
162596         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
162597         clobbered.
162599 2000-04-14  Jim Meyering  <meyering@lucent.com>
162601         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
162603 2000-04-13  Jim Meyering  <meyering@lucent.com>
162605         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
162606         AH_VERBATIM to insert required #ifndef into config.h.in.
162607         Suggestion from Akim Demaille.
162609 2000-04-12  Jim Meyering  <meyering@lucent.com>
162611         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
162612         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
162613         Christian Krackowizer.
162615         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
162616         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
162617         (AC_SYS_LARGEFILE): Require.
162618         (AM_C_PROTOTYPES): Require.
162620 2000-04-08  Jim Meyering  <meyering@lucent.com>
162622         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
162623         names don't conflict.  Reported by Eli Zaretskii.
162625 2000-04-07  Jim Meyering  <meyering@lucent.com>
162627         * lib/putenv.c: Move inclusion of errno.h so it follows that of
162628         sys/types.h, to work around system header problems on AIX 3.2.5.
162629         From Bruno Haible.
162631 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
162633         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
162634         bug.  Deal with the different error behavior of Irix iconv.
162636 2000-04-05  Paul Eggert  <eggert@twinsun.com>
162638         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
162639         IRIX if the installer said otherwise.
162641 2000-04-05  Jim Meyering  <meyering@lucent.com>
162643         Portability tweaks required for ultrix4.3.
162644         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
162645         (jm_CHECK_DECLS): Add getutent to the list of functions.
162646         (_jm_DECL_HEADERS): Add utmpx.h.
162647         From John David Anglin.
162649         * m4/strftime.m4: Back out the 2000-04-02 change.
162650         Instead of that change, simply undefine putenv in the test program.
162652 2000-04-05  Jim Meyering  <meyering@lucent.com>
162654         Portability tweaks required for ultrix4.3.
162655         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
162656         getutent.
162657         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
162658         * lib/canon-host.c: Declare strdup.
162659         * lib/path-concat.c: Likewise.
162660         From John David Anglin.
162662 2000-04-04  Jim Meyering  <meyering@lucent.com>
162664         Be more DOS 8.3-friendly.
162665         * lib/ref-add.sin: Renamed from ref-add.sed.in.
162666         * lib/ref-del.sin: Renamed from ref-del.sed.in.
162667         * lib/Makefile.am: Reflect renaming.
162668         Reported by Eli Zaretskii.
162670         Use a temporary file name that won't clash with `charset.alias'
162671         in the DOS 8.3 name space.
162672         * lib/Makefile.am (charset_tmp): Define.
162673         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
162674         (uninstall-local): Likewise.
162675         Reported by Eli Zaretskii.
162677 2000-04-03  Jim Meyering  <meyering@lucent.com>
162679         * m4/gettext.m4: Fix typo in comment.
162681         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
162682         textutils/configure.in).  Suggestion from Paul Eggert.
162683         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
162685 2000-04-02  Paul Eggert  <eggert@twinsun.com>
162687         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
162688         variable in the shell rather than using putenv, which isn't
162689         portable.  This avoids the configure-time inter-test dependency
162690         on the potentially-renamed putenv function.
162692 2000-03-30  Paul Eggert  <eggert@twinsun.com>
162694         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
162695         before checking struct stat.st_blksize, so that
162696         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
162698 2000-03-29  Paul Eggert  <eggert@twinsun.com>
162700         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
162701         since strftime.c uses HAVE_STRFTIME to decide whether to use
162702         the underlying strftime.
162704 2000-03-29  Paul Eggert  <eggert@twinsun.com>
162706         * lib/time/strftime.c (my_strftime): Make sure we call the system
162707         strftime, not ourselves, when invoking the underlying strftime.
162709 2000-03-24  Jim Meyering  <meyering@lucent.com>
162711         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
162712         (charset_alias): Define.
162713         (install-exec-local): Factor out common code.
162714         (uninstall-local): Split lines longer than 80.
162715         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
162716         (SUFFIXES): Define.
162717         (.sed.in.sed): New rule.  Don't redirect directly to $@.
162718         (CLEANFILES): Add ref-add.sed and ref-del.sed.
162720 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
162722         * lib/config.charset: Output a line containing "Packages using this
162723         file".
162724         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
162725         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
162726         ref-del.sed): New rules.
162728 2000-03-17  Jim Meyering  <meyering@lucent.com>
162730         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
162731         Otherwise, include <strings.h>
162733 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
162735         * lib/unicodeio.c (utf8_wctomb): New function.
162736         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
162737         format instead of in UCS-4 with platform dependent endianness.
162739 2000-03-10  Jim Meyering  <meyering@lucent.com>
162741         * m4/lib-check.m4: Look for getspnam in -lgen, too.
162742         From Marco Franzen.
162744 2000-03-07  Paul Eggert  <eggert@twinsun.com>
162746         * lib/savedir.c (savedir): Work even if directory size is
162747         negative; this can happen with some screwy NFS configurations.
162749 2000-03-06  Jim Meyering  <meyering@lucent.com>
162751         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
162752         if it's NULL (because we ran out of memory).  From Bruno Haible.
162754 2000-03-05  Jim Meyering  <meyering@lucent.com>
162756         * lib/localcharset.c ("path-concat.h"): Include.
162757         (get_charset_aliases): Use path_concat instead of ANSI string
162758         concatenation.
162760         * lib/unicodeio.h (PARAMS): Define.
162761         Use it to guard prototype.
162763 2000-03-04  Jim Meyering  <meyering@lucent.com>
162765         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
162766         for lib/localcharset.c.
162768 2000-03-04  Jim Meyering  <meyering@lucent.com>
162770         * lib/Makefile.am (install-exec-local): Create $(libdir) before
162771         installing into it.
162772         (uninstall-local): Uncomment this rule so `make distcheck' works
162773         once again.
162775         * lib/unicodeio.c (<errno.h>): Include it.
162776         (errno): Declare if not defined.
162778         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
162780         * lib/config.charset: New version, incorporating remarks from a linux
162781         i18n mailing list.  From Bruno Haible.
162783 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
162785         * m4/codeset.m4: New file.
162786         * m4/iconv.m4: New file.
162787         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
162789 2000-03-03  Jim Meyering  <meyering@lucent.com>
162791         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
162793 2000-03-02  Jim Meyering  <meyering@lucent.com>
162795         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
162796         the messages come out on separate lines.
162798         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
162799         rather than jm_CHECK_DECLARATIONS.
162800         * m4/decl.m4: Remove now-unused file.
162802         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
162803         geteuid.
162805 2000-03-02  Jim Meyering  <meyering@lucent.com>
162807         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
162809 2000-03-01  Jim Meyering  <meyering@lucent.com>
162811         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
162812         * lib/unicodeio.c: Likewise.
162814 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
162816         * lib/config.charset: New file.
162817         * lib/localcharset.c: New file.
162818         * lib/unicodeio.h, lib/unicodeio.c: New files.
162819         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
162820         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
162821         (noinst_HEADERS): Add unicodeio.h.
162822         (all-local, install-exec-local, charset.alias): New targets.
162824 2000-02-28  Paul Eggert  <eggert@twinsun.com>
162826         * lib/quotearg.c (ALERT_CHAR): New macro.
162827         (quotearg_buffer_restyled): Use it.
162829 2000-02-27  Jim Meyering  <meyering@lucent.com>
162831         * m4/check-decl.m4: Add getenv to the list.
162833 2000-02-27  Jim Meyering  <meyering@lucent.com>
162835         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
162836         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
162838         * lib/backupfile.c: Guard inclusion of stdlib.h with
162839         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
162840         Declare malloc if needed.
162842         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
162843         `#ifndef HAVE_DECL..'
162844         now that autoconf always defines the HAVE_DECL_ symbols.
162845         * lib/human.c: Likewise.
162846         * lib/same.c: Likewise.
162847         * lib/strtoumax.c: Likewise.
162849         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
162850         declaration check was not run.
162851         * lib/hash.c: Likewise.
162852         * lib/human.c: Likewise.
162853         * lib/same.c: Likewise.
162854         * lib/strtoumax.c: Likewise.
162856         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
162857         `.', then first look up the entire `.'-containing string as a login
162858         name.
162860 2000-02-23  Jim Meyering  <meyering@lucent.com>
162862         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
162863         in place of my hack.
162865 2000-02-18  Paul Eggert  <eggert@twinsun.com>
162867         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
162868         (textint): New typedef.
162869         (parser_control): Member year changed from int to textint.
162870         All uses changed.
162871         (YYSTYPE): Removed; replaced by %union with int and textint members.
162872         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
162873         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
162874         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
162875         (tSNUMBER, tUNUMBER): Now of type <textintval>.
162876         (date, number, to_year): Use width of number in digits, not its value,
162877         to determine whether it's a 2-digit year, or a 2-digit time.
162878         (yylex): Store number of digits of numeric tokens.
162879         Reported by John Kendall.
162881         (parser_control): Changed from struct parser_control to typedef (for
162882         consistency).  All uses changed.
162884         (tID): Removed; not used.
162885         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
162887 2000-02-14  Paul Eggert  <eggert@twinsun.com>
162889         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
162890         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
162892 2000-02-12  Jim Meyering  <meyering@lucent.com>
162894         * lib/userspec.c (ISDIGIT): Define it.
162895         (isdigit): Remove definition.
162896         (is_number): Use ISDIGIT, not isdigit.
162897         <libintl.h>: Include.
162898         (_ and N_): Define.
162899         (parse_user_spec): Mark translatable strings.
162901 2000-02-10  Jim Meyering  <meyering@lucent.com>
162903         With these changes, nanosleep.[ch] are finally enough like the other
162904         lib/* replacement files to compile on a few more losing systems.
162906         * lib/nanosleep.h: Don't include config.h.
162907         Remove prototype from declaration of nanosleep.
162908         (PARAMS): Remove now-unneeded definition.
162909         * lib/nanosleep.c: #undef nanosleep.
162910         (rpl_nanosleep): Rename from nanosleep.
162912 2000-02-10  Jim Meyering  <meyering@lucent.com>
162914         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
162915         gnu_nanosleep to rpl_nanosleep.
162917 2000-02-09  Jim Meyering  <meyering@lucent.com>
162919         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
162920         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
162922 2000-02-08  Akim Demaille  <akim@epita.fr>
162924         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
162925         `[' and `]' and remove uses of `changequote'.
162926         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
162927         (AC_SYS_LARGEFILE): Likewise.
162928         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
162929         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
162930         of changequote.
162931         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
162932         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
162933         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
162934         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
162936 2000-02-05  Jim Meyering  <meyering@lucent.com>
162938         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
162939         Remove explicit use of AC_HEADER_TIME.  It is required by
162940         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
162941         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
162942         in autoconf whereby the expansion of the latter ended up preceding
162943         the expansion of its prerequisite, AC_HEADER_TIME.
162944         Reported by Volker Borchert.
162946 2000-02-03  Jim Meyering  <meyering@lucent.com>
162948         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
162950 2000-02-03  Jim Meyering  <meyering@lucent.com>
162952         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
162953         rather than with `#if HAVE_UTMPNAME'.
162955 2000-02-02  Jim Meyering  <meyering@lucent.com>
162957         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
162958         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
162959         Reported by Eli Zaretskii.
162961 2000-02-01  Jim Meyering  <meyering@lucent.com>
162963         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
162965 2000-01-31  Jim Meyering  <meyering@lucent.com>
162967         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
162968         functions.  Add the time.h and sys/time.h headers along with the
162969         AC_REQUIRE'ment of AC_HEADER_TIME.
162971 2000-01-31  Jim Meyering  <meyering@lucent.com>
162973         * lib/nanosleep.h (nanosleep): Guard declaration with
162974         `#if ! HAVE_DECL_NANOSLEEP'.
162975         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
162976         the declaration in that vendor's sys/timers.h.
162977         Reported by Christian Krackowizer.
162979         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
162980         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
162981         (ISPRINT): Likewise.
162982         Reported by Tom Tromey.
162984 2000-01-30  Jim Meyering  <meyering@lucent.com>
162986         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
162988         * m4/prereq.m4 (utmp_includes): Define.
162989         Check for ut_user and ut_name members in both struct utmpx
162990         and struct utmp.
162992 2000-01-30  Jim Meyering  <meyering@lucent.com>
162994         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
162995         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
162996         header files where only utmpx.ut_user is declared.
162998         * lib/readutmp.h (UT_USER): Define.
163000 2000-01-29  Jim Meyering  <meyering@lucent.com>
163002         * m4/lib-check.m4: New file containing library-related checks from
163003         fileutils and sh-utils (textutils had none).
163005 2000-01-28  Jim Meyering  <meyering@lucent.com>
163007         * m4/perl.m4: Change format of warning message to look more like that
163008         from the missing script.  Suggestion from François Pinard.
163010 2000-01-25  Jim Meyering  <meyering@lucent.com>
163012         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
163013         well as time.h in the compile check.
163014         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
163015         Fix typo in cross-compiling case: s/yes/no/.
163017 2000-01-23  Jim Meyering  <meyering@lucent.com>
163019         * m4/jm-macros.m4: Move df-related tests here from
163020         fileutils/configure.in
163022         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
163023         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
163025         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
163026         s/space/ac_fsusage_space/.
163027         (jm_FILE_SYSTEM_USAGE): Take two parameters.
163029         * m4/ftruncate.m4: New file (derived from part of
163030         fileutils/configure.in).
163031         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
163032         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
163034         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
163035         AC_SUBST these here, rather than just in sh-util/configure.in, so
163036         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
163037         all the same.
163038         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
163039         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
163040         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
163041         (AC_SUBST(POW_LIBM)): Likewise.
163042         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
163044 2000-01-23  Jim Meyering  <meyering@lucent.com>
163046         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
163047         obstack.c.
163049 2000-01-22  Jim Meyering  <meyering@lucent.com>
163051         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
163053         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
163055         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
163056         configure.in
163057         (AC_CHECK_HEADERS): Likewise for sh-utils.
163058         (AC_CHECK_HEADERS): Likewise for textutils.
163059         Merge the three lists of headers.
163061         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
163062         from fileutils' configure.in.
163064         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
163065         code. Moved tests into their own function (_jm_DECL_HEADERS) in
163066         check-decl.m4.
163068         * m4/check-decl.m4: Use #if rather than #ifdef.
163069         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
163070         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
163071         (_jm_DECL_HEADERS): Define new function.
163072         (jm_CHECK_DECLARATIONS): Require it.
163074 2000-01-22  Jim Meyering  <meyering@lucent.com>
163076         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
163077         [! HAVE_DECL_STRTOULL]: Declare strtoull.
163078         Required for some AIX systems.  Reported by Christian Krackowizer.
163079         [TESTING] (main): New function.
163081         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
163082         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
163083         letters.
163085         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
163086         iswprint.
163088         * lib/strverscmp.c (ISDIGIT): Define.
163089         (strverscmp): Use ISDIGIT, not isdigit.
163091 2000-01-19  Jim Meyering  <meyering@lucent.com>
163093         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
163094         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
163095         defines `struct timespec' in <sys/time.h>
163097         * m4/c-bs-a.m4: Remove uses of changequote altogether.
163098         Thanks to Akim for explaining.
163100 2000-01-17  Paul Eggert  <eggert@twinsun.com>
163102         * lib/nanosleep.c (nanosleep):
163103         Don't use SA_INTERRUPT to decide whether to call sigaction, as
163104         POSIX.1 doesn't require SA_INTERRUPT and some systems
163105         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
163106         it's been part of POSIX.1 since day 1 (in 1988).
163108 2000-01-17  Jim Meyering  <meyering@lucent.com>
163110         * lib/interlock: Remove unused file.  Reported by François Pinard.
163112 2000-01-16  Paul Eggert  <eggert@twinsun.com>
163114         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
163115         alert, backslash, formfeed, and vertical tab unnecessarily in
163116         shell quoting style.
163118 2000-01-16  Jim Meyering  <meyering@lucent.com>
163120         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
163121         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
163122         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
163123         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
163125 2000-01-16  Jim Meyering  <meyering@lucent.com>
163127         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
163128         because the latter didn't work.
163130 2000-01-15  Jim Meyering  <meyering@lucent.com>
163132         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
163133         (AC_REPLACE_FUNCS): Add memcpy and memset.
163134         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
163135         Add strpbrk.
163136         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
163138 2000-01-12  Jim Meyering  <meyering@lucent.com>
163140         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
163141         (jm_PREREQ): Use it.
163142         (jm_PREREQ_READUTMP): New macro.
163143         (jm_PREREQ): Use it.
163145 2000-01-11  Paul Eggert  <eggert@twinsun.com>
163147         Quote multibyte characters correctly.
163148         * m4/c-bs-a.m4: New file.
163149         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
163150         (jm_PREREQ): Use it.
163152 2000-01-11  Paul Eggert  <eggert@twinsun.com>
163154         * m4/uintmax_t.m4: Port to autoconf 2.13.
163156 2000-01-08  Jim Meyering  <meyering@ascend.com>
163158         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
163159         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
163161 2000-01-04  Jim Meyering  <meyering@ascend.com>
163163         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
163164         jm_STRUCT_DIRENT_D_TYPE.
163165         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
163166         jm_STRUCT_DIRENT_D_INO.
163167         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
163168         jm_STRUCT_UTIMBUF.
163169         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
163170         renamings.
163171         * m4/utime.m4: Likewise.
163173         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
163174         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
163176 2000-01-03  Paul Eggert  <eggert@twinsun.com>
163178         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
163179         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
163181 2000-01-02  Jim Meyering  <meyering@ascend.com>
163183         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
163184         remember if this is necessary.
163186 1999-12-26  Jim Meyering  <meyering@ascend.com>
163188         * m4/jm-macros.m4: Use it here.
163189         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
163191 1999-12-23  Jim Meyering  <meyering@ascend.com>
163193         * m4/jm-macros.m4: Check for clock_gettime (moved from
163194         fileutils/configure.in)
163195         Check for gettimeofday.
163197 1999-12-20  Jim Meyering  <meyering@ascend.com>
163199         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
163200         autoconf-2.14a-1999-12-20.
163202 1999-12-19  Jim Meyering  <meyering@ascend.com>
163204         * m4/lstat-slash.m4: New file.
163205         * m4/jm-macros.m4: Use the new macro:
163206         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
163208 1999-12-07  Jim Meyering  <meyering@ascend.com>
163210         * m4/perl.m4: Require that File::Compare be available, too.
163211         Too many systems seem to lack it.
163213         * m4/strftime.m4: Add checks for most of the cpp macros tested in
163214         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
163216 1999-11-18  Paul Eggert  <eggert@twinsun.com>
163218         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
163219         problem with the QNX 4.25 shell, which doesn't propagate exit
163220         status of failed commands inside shell assignments.
163222 1999-11-17  Jim Meyering  <meyering@ascend.com>
163224         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
163226 1999-11-07  Jim Meyering  <meyering@ascend.com>
163228         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
163230 1999-11-06  Jim Meyering  <meyering@ascend.com>
163232         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
163233         * m4/jm-macros.m4 (jm_MACROS): Use it here.
163235 1999-11-05  Jim Meyering  <meyering@ascend.com>
163237         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
163238         configure.in of textutils, fileutils, and sh-utils into this one
163239         (shared between those packages) file.
163240         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
163241         AC_STRUCT_ST_BLKSIZE.
163243 1999-11-03  Jim Meyering  <meyering@ascend.com>
163245         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
163246         of AC_CHECK_TYPE checks includes unistd.h.
163247         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
163248         Suggestion from Akim Demaille.
163250 1999-10-30  Jim Meyering  <meyering@ascend.com>
163252         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
163253         m4-quoted string.
163254         * m4/ls-mntd-fs.m4: Likewise.
163255         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
163256         * m4/jm-winsz1.m4: Likewise.
163258         * m4/const.m4: Remove file, since the fix made it into the experimental
163259         version of autoconf.
163260         * m4/mktime.m4: Likewise.
163262         * m4/check-type.m4: Remove file, now that the latest version of
163263         AC_CHECK_TYPE takes a third arg to specify additional #includes.
163265         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
163266         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
163267         AC_CHECK_TYPE.
163269 1999-10-04  Jim Meyering  <meyering@ascend.com>
163271         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
163273 1999-09-22  Paul Eggert  <eggert@twinsun.com>
163275         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
163276         2.95.1 bug with HP-UX 10.20.
163278 1999-09-17  Jim Meyering  <meyering@ascend.com>
163280         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
163281         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
163282         due to missing strdup (against sh-utils-2.0).
163284 1999-08-29  Jim Meyering  <meyering@ascend.com>
163286         * m4/jm-macros.m4: Require jm_BISON.
163287         * m4/bison.m4: New file.
163289 1999-08-17  Paul Eggert  <eggert@twinsun.com>
163291         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
163292         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
163294 1999-08-05  Jim Meyering  <meyering@ascend.com>
163296         * m4/getline.m4: Rename test file from conftestdata to conftest.data
163297         to avoid conflicts with `conftest' on 8+3 filesystems.
163298         Suggestion from Eli Zaretskii.
163300 1999-08-04  Jim Meyering  <meyering@ascend.com>
163302         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
163303         fileutils and sh-utils (textutils's getline test was inadequate).
163304         (AM_FUNC_GETLINE): Run this test.
163305         (AC_CHECK_FUNCS): Check for getdelim.
163306         Reported by Bob Proulx.
163308 1999-08-02  Jim Meyering  <meyering@ascend.com>
163310         * m4/jm-macros.m4: Add a comment.
163312 1999-08-01  Paul Eggert  <eggert@twinsun.com>
163314         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
163315         <inttypes.h> defines strtoumax as a macro (and not as a
163316         function).
163318 1999-08-01  Paul Eggert  <eggert@twinsun.com>
163320         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
163321         that we can shift, multiply and divide unsigned long long
163322         values; Ultrix cc can't do it.
163324 1999-08-01  Paul Eggert  <eggert@twinsun.com>
163326         * m4/mktime.m4: New file, which is a preview of what should appear
163327         in the next public autoconf release.
163329 1999-08-01  Paul Eggert  <eggert@twinsun.com>
163331         * m4/lfs.m4: Remove this file.
163332         * m4/largefile.m4: New file.  It contains the old contents of
163333         lfs.m4, except that all names with prefix AC_LFS have been
163334         changed to use the prefix AC_SYS_LARGEFILE instead, to be
163335         compatible with future autoconf versions.  Also, some minor m4
163336         quoting problems have been fixed.
163338 1999-08-01  Paul Eggert  <eggert@twinsun.com>
163340         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
163341         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
163342         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
163343         and simplify the shell code.
163345 1999-08-01  Jim Meyering  <meyering@ascend.com>
163347         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
163348         m4.
163350 1999-07-20  Jim Meyering  <meyering@ascend.com>
163352         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
163354 1999-07-15  Jim Meyering  <meyering@ascend.com>
163356         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
163358 1999-05-22  Jim Meyering  <meyering@ascend.com>
163360         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
163362 1999-05-20  Jim Meyering  <meyering@ascend.com>
163364         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
163365         Add a colon after each `then' in case $4 is empty.
163367 1999-05-16  Jim Meyering  <meyering@ascend.com>
163369         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
163371 1999-05-10  Jim Meyering  <meyering@ascend.com>
163373         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
163375         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
163376         AC_FUNC_MKTIME.
163378 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
163380         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
163382 1999-05-04  Paul Eggert  <eggert@twinsun.com>
163384         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
163385         not CPPFLAGS, so that linking works correctly in IRIX.
163387 1999-04-30  Paul Eggert  <eggert@twinsun.com>
163389         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
163391 1999-04-20  Paul Eggert  <eggert@twinsun.com>
163393         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
163394         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
163395         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
163396         jm_AC_TYPE_UNSIGNED_LONG_LONG.
163397         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
163399         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
163401 1999-04-20  Jim Meyering  <meyering@ascend.com>
163403         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
163404         AC_REPLACE xstroull if necessary.  From Paul Eggert.
163405         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
163407 1999-04-18  Jim Meyering  <meyering@ascend.com>
163409         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
163410         * m4/jm-macros.m4: Use it.
163412 1999-04-06  Jim Meyering  <meyering@ascend.com>
163414         * m4/strftime.m4: Remove test for %f.
163416 1999-03-29  Jim Meyering  <meyering@ascend.com>
163418         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
163419         superset of the AC_TYPE_* checks in the textutils, fileutils,
163420         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
163421         AC_TYPE_PID_T.
163423 1999-03-28  Jim Meyering  <meyering@ascend.com>
163425         * m4/jm-macros.m4: Define GNU_PACKAGE here.
163426         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
163427         replaced e.g., in the *.sh files of the sh-utils.
163429 1999-03-20  Jim Meyering  <meyering@ascend.com>
163431         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
163432         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
163433         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
163435 1999-03-19  Jim Meyering  <meyering@ascend.com>
163437         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
163439 1999-03-12  Jim Meyering  <meyering@ascend.com>
163441         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
163443 1999-03-07  Jim Meyering  <meyering@ascend.com>
163445         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
163446         declared.
163448 1999-02-17  Jim Meyering  <meyering@ascend.com>
163450         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
163451         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
163453 1999-02-07  Jim Meyering  <meyering@ascend.com>
163455         * m4/group-member.m4: New file -- extracted from sh-utils'
163456         configure.in.
163458         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
163459         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
163461 1999-02-06  Jim Meyering  <meyering@ascend.com>
163463         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
163464         * m4/fnmatch.m4: Likewise.
163465         * m4/getgroups.m4: Likewise.
163466         * m4/lstat.m4: Likewise.
163467         * m4/malloc.m4: Likewise.
163468         * m4/putenv.m4: Likewise.
163469         * m4/realloc.m4: Likewise.
163470         * m4/regex.m4: Likewise.
163471         * m4/stat.m4: Likewise.
163472         * m4/strftime.m4: Likewise.
163473         Suggestion from Alain Magloire.
163475         * m4/chown.m4: Use `.$ac_objext', not `.o'.
163476         * m4/fnmatch.m4: Likewise.
163477         * m4/getgroups.m4: Likewise.
163478         * m4/getline.m4: Likewise.
163479         * m4/lstat.m4: Likewise.
163480         * m4/malloc.m4: Likewise.
163481         * m4/memcmp.m4: Likewise.
163482         * m4/putenv.m4: Likewise.
163483         * m4/realloc.m4: Likewise.
163484         * m4/regex.m4: Likewise.
163485         * m4/stat.m4: Likewise.
163486         * m4/strftime.m4: Likewise.
163487         Suggestion from Alain Magloire.
163489         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
163490         an argument.
163492         * m4/regex.m4: Add a run-time Test for proper operation of
163493         re_compile_pattern.
163495 1999-01-31  Jim Meyering  <meyering@ascend.com>
163497         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
163499 1999-01-30  Jim Meyering  <meyering@ascend.com>
163501         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
163503         * m4/jm-mktime.m4: Make this a wrapper around the official
163504         AM_FUNC_MKTIME rather than my private copy, now that the official one
163505         is up to date.
163506         * m4/mktime.m4: Remove file.
163508         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
163509         * m4/uptime.m4: Likewise.
163510         * m4/uintmax_t.m4: Likewise.
163512 1999-01-28  Jim Meyering  <meyering@ascend.com>
163514         * m4/jm-macros.m4: Use jm_AFS.
163515         * m4/afs.m4: New file (from fileutils' configure.in).
163517         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
163518         * m4/chown.m4: Likewise.
163519         * m4/d-ino.m4: Likewise.
163520         * m4/d-type.m4: Likewise.
163521         * m4/fnmatch.m4: Likewise.
163522         * m4/getgroups.m4: Likewise.
163523         * m4/gettext.m4: Likewise.
163524         * m4/jm-mktime.m4: Likewise.
163525         * m4/jm-winsz2.m4: Likewise.
163526         * m4/lcmessage.m4: Likewise.
163527         * m4/ls-mntd-fs.m4: Likewise.
163528         * m4/malloc.m4: Likewise.
163529         * m4/memcmp.m4: Likewise.
163530         * m4/putenv.m4: Likewise.
163531         * m4/realloc.m4: Likewise.
163532         * m4/st_mtim.m4: Likewise.
163533         * m4/strftime.m4: Likewise.
163535 1999-01-16  Jim Meyering  <meyering@ascend.com>
163537         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
163538         (ARGMATCH_DIE_DECL): Define.
163540 1999-01-12  Jim Meyering  <meyering@ascend.com>
163542         * m4/Makefile.am.in: Rewrite to avoid using fmt.
163543         Reported by Lars Hecking.
163545 1999-01-10  Jim Meyering  <meyering@ascend.com>
163547         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
163548         gross kludge.
163549         * m4/inttypes_h.m4: Likewise.
163550         * m4/lstat.m4: Likewise.
163551         * m4/malloc.m4: Likewise.
163552         * m4/readdir.m4: Likewise.
163553         * m4/realloc.m4: Likewise.
163554         * m4/st_dm_mode.m4: Likewise.
163555         * m4/stat.m4: Likewise.
163556         * m4/utimbuf.m4: Likewise.
163557         * m4/utimes.m4: Likewise.
163559         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
163560         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
163561         comments in config.h.in are meaningful.
163563         * m4/jm-macros.m4: Require autoconf-2.13 here.
163565         * m4/regex.m4: By default, don't use the included regex.c on systems
163566         with glibc 2.  Suggestion from Uli Drepper.
163568 1999-01-02  Jim Meyering  <meyering@ascend.com>
163570         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
163572 1998-12-18  Jim Meyering  <meyering@ascend.com>
163574         * m4/Makefile.am.in (Makefile.am): Simplify rule.
163575         Based on a suggestion from Lars Hecking.
163577 1998-11-16  Paul Eggert  <eggert@twinsun.com>
163579         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
163581 1998-11-16  Jim Meyering  <meyering@ascend.com>
163583         * m4/lfs.m4: Double-quote the `uname...` expression.
163585 1998-11-14  Jim Meyering  <meyering@ascend.com>
163587         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
163588         * m4/stat.m4: Likewise.
163590 1998-11-03  Jim Meyering  <meyering@ascend.com>
163592         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
163593         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
163595 1998-10-18  Jim Meyering  <meyering@ascend.com>
163597         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
163599 1998-10-17  Jim Meyering  <meyering@ascend.com>
163601         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
163602         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
163603         calls for those previously hard-coded headers.  Instead, take a new
163604         parameter.
163605         (jm_CHECK_DECLARATIONS): Reflect interface change.
163606         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
163607         (jm_CHECK_DECL_LOCALTIME_R): New macro.
163609         * m4/mktime.m4: Test for spring-forward gap before long-running test.
163611 1998-10-14  Jim Meyering  <meyering@ascend.com>
163613         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
163614         instead of "TZ=America/Vancouver".  From Paul Eggert.
163616 1998-10-11  Jim Meyering  <meyering@ascend.com>
163618         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
163619         This adds a test for a recently added compatibility fix for mktime.c.
163620         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
163622 1998-09-27  Jim Meyering  <meyering@ascend.com>
163624         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
163626         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
163627         ../configure.in, including a change from Gordon Matzigkeit to allow
163628         cross-compiling for the Hurd.
163630         * m4/glibc.m4: New file/macro to test for the GNU C Library
163631         versions 1 and 2.  From Gordon Matzigkeit.
163632         Indent.
163634 1998-09-21  Jim Meyering  <meyering@ascend.com>
163636         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
163638 1998-08-18  Paul Eggert  <eggert@twinsun.com>
163640         Port nanosecond-resolution times to UnixWare 2.1.2 and
163641         pedantic Solaris 2.6.
163643         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
163644         AC_STRUCT_ST_MTIM.
163645         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
163646         Generate name of ns member, instead of just 1 or undef.
163647         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
163649 1998-08-15  Jim Meyering  <meyering@ascend.com>
163651         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
163652         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
163653         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
163654         instead of jm_TYPE_SSIZE_T.
163656 1998-08-12  Jim Meyering  <meyering@ascend.com>
163658         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
163660 1998-08-02  Jim Meyering  <meyering@ascend.com>
163662         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
163663         in acconfig.h manually.
163665 1998-07-31  Paul Eggert  <eggert@twinsun.com>
163667         * m4/st_mtim.m4: New file.
163669 1998-07-28  Jim Meyering  <meyering@ascend.com>
163671         * m4/utimes.m4: Undef stat.
163673 1998-07-25  Jim Meyering  <meyering@ascend.com>
163675         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
163676         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
163678 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
163680         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
163681         uid and gid actually remain unchanged.
163683 1998-07-07  Jim Meyering  <meyering@ascend.com>
163685         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
163687 1998-07-04  Jim Meyering  <meyering@ascend.com>
163689         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
163690         to prove that this macro can be used in packages without regex.c.
163692 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
163694         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
163695         is to be used.
163697 1998-07-03  Jim Meyering  <meyering@ascend.com>
163699         * m4/gettext.m4: Add -lintl if it's found to be necessary.
163701         * m4/gettext.m4: New file -- from gettext-0.10.35.
163702         * m4/lcmessage.m4: Likewise.
163703         * m4/progtest.m4: Likewise.
163705         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
163706         * m4/jm-macros.m4: Require the new macro.
163708 1998-06-29  Jim Meyering  <meyering@ascend.com>
163710         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
163711         for the definition of NGROUPS (used in a system header included
163712         by sys/mount.h).
163714 1998-06-28  Jim Meyering  <meyering@ascend.com>
163716         * m4/ls-mntd-fs.m4: New file.
163717         * m4/fstypename.m4: New file.
163719         * m4/jm-macros.m4: Require the new macro.
163720         * m4/jm-glibc-io.m4: New file.
163722 1998-05-19  Jim Meyering  <meyering@ascend.com>
163724         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
163725         * m4/lchown.m4: New file.
163727         * m4/Makefile.am.in: New file.
163728         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
163730 1998-05-14  Jim Meyering  <meyering@ascend.com>
163732         * m4/Makefile.am (EXTRA_DIST): Add them.
163733         * m4/jm-macros.m4: New file.
163734         * m4/utimbuf.m4: New file.
163736 1998-05-12  Jim Meyering  <meyering@ascend.com>
163738         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
163740 1998-05-11  Jim Meyering  <meyering@ascend.com>
163742         * m4/isc-posix.m4: New file.
163744 1998-05-10  Jim Meyering  <meyering@ascend.com>
163746         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
163748 1998-05-09  Jim Meyering  <meyering@ascend.com>
163750         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
163751         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
163752         with automake.
163754         * m4/ssize_t.m4: New file.
163755         * m4/mktime.m4: Remove file -- the new automake has this now.
163757 1998-04-26  Jim Meyering  <meyering@ascend.com>
163759         * m4/assert.m4: New file.
163760         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
163762 1998-04-05  Jim Meyering  <meyering@ascend.com>
163764         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
163765         (jm_PREREQ): Use it here.
163767 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
163769         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
163770         in acconfig.h.
163772 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
163774         * m4/prereq.m4: New file.
163775         * m4/error.m4: New file.
163776         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
163778 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
163780         * m4/getline.m4: Don't set am_cv_func_working_getline before the
163781         cache-check for the same variable -- that defeated the purpose of
163782         the test; the test program was never run.  This was a problem only
163783         on systems with losing getline functions -- HP-UX 10.20 is one.
163784         Reported by Bjorn Helgaas.
163786 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
163788         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
163790 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
163792         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
163794         * m4/const.m4: New file.  Use an initializer in this declaration
163795         typedef int charset[2]; const charset x;
163796         Reported by Bob Glickstein.
163798 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
163800         * m4/chown.m4: Fix reversed types on -1 args to chown.
163801         From Kaveh Ghazi.
163803 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
163805         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
163806         Add lseek and memchr.
163808         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
163809         T.E.Dickey <dickey@clark.net> said that some older preprocessors
163810         have a 20-character limit on names.
163812 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
163814         * m4/inttypes_h.m4: New file.
163815         * m4/uintmax_t.m4: New file.
163816         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
163819         -----
163821         Local Variables:
163822         coding: utf-8
163823         End:
163825         Copyright (C) 1997-2024 Free Software Foundation, Inc.
163827         Copying and distribution of this file, with or without
163828         modification, are permitted provided the copyright notice
163829         and this notice are preserved.